-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxeventstemplate.h
More file actions
52 lines (39 loc) · 777 Bytes
/
xeventstemplate.h
File metadata and controls
52 lines (39 loc) · 777 Bytes
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef XEVENTSTEMPLATE_H
#define XEVENTSTEMPLATE_H
#define R_KEY 82
#define DELETE_KEY 0
#define BACKSPACE_KEY 8
#include <xcb/xcb.h>
#include <xcb/xcb_util.h>
#include <QEvent>
#define XEVENT_ID QEvent::User+0x10
enum XEVENTS
{
GENERAL=XEVENT_ID,
MAP_REQUEST,
DESTROY_NOTIFY,
FOCUS_IN,
FOCUS_OUT,
ENTER_NOTIFY,
UNMAP_NOTIFY,
BUTTON_PRESS,
BUTTON_RELEASE,
KEY_PRESS,
KEY_RELEASE
};
class XEventsTemplate
{
protected:
uint8_t response_type;
public:
XEventsTemplate(uint8_t response);
uint8_t responseType()
{
return response_type & XCB_EVENT_RESPONSE_TYPE_MASK;
}
const char* ResponseString()
{
return xcb_event_get_label(response_type);
}
};
#endif // XEVENTSTEMPLATE_H