Move a few externs into appropriate header files
This commit is contained in:
parent
0b656246fd
commit
0423c55dc1
@ -492,8 +492,6 @@ render_cursor(Window *w, double now) {
|
||||
}
|
||||
}
|
||||
|
||||
extern bool drag_scroll(Window *);
|
||||
|
||||
static inline bool
|
||||
render(ChildMonitor *self, double now) {
|
||||
double time_since_last_render = now - last_render_at;
|
||||
|
||||
@ -314,4 +314,6 @@ void copy_color_table_to_buffer(ColorProfile *self, void *address, int offset, s
|
||||
|
||||
unsigned int safe_wcwidth(uint32_t ch);
|
||||
void change_wcwidth(bool use9);
|
||||
|
||||
void set_mouse_cursor(MouseShape);
|
||||
void mouse_event(int, int);
|
||||
void scroll_event(double, double);
|
||||
|
||||
@ -67,9 +67,6 @@ key_callback(GLFWwindow UNUSED *w, int key, int scancode, int action, int mods)
|
||||
WINDOW_CALLBACK(key_callback, "iiii", key, scancode, action, mods);
|
||||
}
|
||||
|
||||
extern void mouse_event(int, int);
|
||||
extern void scroll_event(double, double);
|
||||
|
||||
static void
|
||||
mouse_button_callback(GLFWwindow *w, int button, int action, int mods) {
|
||||
if (!global_state.mouse_visible) { glfwSetInputMode(w, GLFW_CURSOR, GLFW_CURSOR_NORMAL); global_state.mouse_visible = true; }
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
#include <math.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
extern void set_mouse_cursor(MouseShape);
|
||||
static MouseShape mouse_cursor_shape = BEAM;
|
||||
typedef enum MouseActions { PRESS, RELEASE, DRAG, MOVE } MouseAction;
|
||||
|
||||
|
||||
@ -74,7 +74,9 @@ typedef struct {
|
||||
PyObject *boss;
|
||||
bool is_key_pressed[MAX_KEY_COUNT];
|
||||
} GlobalState;
|
||||
|
||||
extern GlobalState global_state;
|
||||
bool drag_scroll(Window *);
|
||||
|
||||
#define EXTERNAL_FUNC(name, ret, ...) typedef ret (*name##_func)(__VA_ARGS__); extern name##_func name
|
||||
#define EXTERNAL_FUNC0(name, ret) typedef ret (*name##_func)(); extern name##_func name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user