summaryrefslogtreecommitdiff
path: root/wintable/NEWevents.h
blob: cef722a444109fb9090ae82cf5819948a4354b79 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// 5 december 2014

static handlerfunc keyDownHandlers[] = {
	NULL,
};

static handlerfunc keyUpHandlers[] = {
	NULL,
};

static handlerfunc charHandlers[] = {
	NULL,
};

static handlerfunc mouseMoveHandlers[] = {
	NULL,
};

static handlerfunc mouseLeaveHandlers[] = {
	NULL,
};

static handlerfunc lbuttonDownHandlers[] = {
	NULL,
};

static handlerufnc lbuttonUpHandlers[] = {
	NULL,
};

static handlerfunc mouseWheelHandlers[] = {
	NULL,
};

// TODO WM_MOUSEHOVER, other mouse buttons

HANDLER(events)
{
	switch (uMsg) {
#define eventHandler(msg, array) \
	case msg: \
		return runHandlers(array, t, uMsg, wParam, lParam, lResult);
	eventHandler(WM_KEYDOWN, keyDownHandlers)
	eventHandler(WM_KEYUP, keyUpHandlers)
	eventHandler(WM_CHAR, charHandlers)
	eventHandler(WM_MOUSEMOVE, mouseMoveHandlers)
	eventHandler(WM_MOUSELEAVE, mouseLeaveHandlers)
	eventHandler(WM_LBUTTONDOWN, lbuttonDownHandlers)
	eventHandler(WM_LBUTTONUP, lbuttonUpHandlers)
	eventHandler(WM_MOUSEWHEEL, mouseWheelHandlers)
#undef eventHandler
	}
	return FALSE;
}