Created
November 10, 2012 14:47
-
-
Save progschj/4051303 to your computer and use it in GitHub Desktop.
GLWT event prototype
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define GLWT_EVENT_INPUT 1 | |
#define GLWT_EVENT_WINDOW 2 | |
#define GLWT_EVENT_HOTPLUG 3 | |
#define GLWT_EVENT_INPUT_KEY 1 | |
#define GLWT_EVENT_INPUT_BUTTON 2 | |
#define GLWT_EVENT_INPUT_ABS 3 | |
#define GLWT_EVENT_INPUT_REL 4 | |
#define GLWT_EVENT_WINDOW_RESIZE 1 | |
#define GLWT_EVENT_WINDOW_CLOSE 2 | |
#define GLWT_EVENT_WINDOW_EXPOSE 3 | |
#define GLWT_EVENT_WINDOW_SHOW 4 | |
#define GLWT_EVENT_WINDOW_FOCUS 5 | |
#define GLWT_EVENT_WINDOW_MOUSEOVER 6 | |
#define GLWT_DEVICE_MOUSE 1 | |
#define GLWT_DEVICE_KEYBOARD 2 | |
#define GLWT_DEVICE_GAMEPAD 3 | |
#define GLWT_DEVICE_JOYSTICK 4 | |
#define GLWT_DEVICE_TOUCH 5 | |
typedef struct GLWTEvent { | |
int type; | |
GLWTWindow *window; | |
GLWTTime timestamp; | |
void *userdata; | |
union { | |
struct { | |
int type; | |
int device_type; | |
int device_id; | |
union { | |
struct { | |
int down; | |
int keysym; | |
int scancode; | |
int mod; | |
} key; | |
struct { | |
int down; | |
int button; | |
int mod; | |
} button; | |
struct { | |
int x, y; | |
int xmin, xmax; | |
int ymin, ymax; | |
} motion; | |
}; | |
} input; | |
struct { | |
int type; | |
union { | |
struct { | |
int width, height; | |
} resize; | |
int focus; | |
int show; | |
int enter; | |
}; | |
} window; | |
struct { | |
int device_type; | |
int device_id; | |
} hotplug; | |
} data; | |
} GLWTEvent; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment