diff options
Diffstat (limited to 'src/event.h')
-rw-r--r-- | src/event.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/event.h b/src/event.h index 249bac9..08f95f3 100644 --- a/src/event.h +++ b/src/event.h @@ -12,12 +12,25 @@ enum Events { KEY_PRESSED }; +typedef struct CherryEventMouse { + int x; + int y; +} CherryEventMouse; + +typedef struct CherryEventKey { + XKeyEvent xkey; +} CherryEventKey; + typedef struct CherryEvent { Display *display; Window window; int event_id; - int x, y; - XKeyEvent xkey; -}; + CherryEventKey key; + CherryEventMouse mouse; +} CherryEvent; + +CherryEvent cherry_event_create(Display *, Window, int); +CherryEvent cherry_event_mouse_create(Display *, Window, int, int x, int y); +CherryEvent cherry_event_key_create(int, XKeyEvent); #endif /* __CHERRY_EVENT_H__ */ |