blob: 8d380ea3dfa7069d13ccdbc39c94426cca96fb29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#ifndef COMET_EVENT_H
#define COMET_EVENT_H
#include "window.h"
typedef enum {
EVENT_HOVER,
EVENT_LEFT_CLICK,
EVENT_MIDDLE_CLICK,
EVENT_RIGHT_CLICK,
EVENT_SCROLL_UP,
EVENT_SCROLL_DOWN,
EVENT_TRIGGER,
} event_type_t;
typedef struct {
event_type_t type;
int x, y;
} event_t;
typedef struct layout layout_t;
const char *event_type_to_string(event_type_t type);
bool event_is_hover(event_t event);
bool event_is_click(event_t event);
bool event_is_scroll(event_t event);
void event_dispatch(window_t *window, layout_t *layout);
#endif
|