2014-12-05 09:18:37 -06:00
|
|
|
// 5 december 2014
|
|
|
|
|
2014-12-05 21:23:39 -06:00
|
|
|
static const handlerfunc keyDownHandlers[] = {
|
2014-12-05 09:18:37 -06:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2014-12-05 20:58:16 -06:00
|
|
|
static const handlerfunc keyUpHandlers[] = {
|
2014-12-05 09:18:37 -06:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2014-12-05 20:58:16 -06:00
|
|
|
static const handlerfunc charHandlers[] = {
|
2014-12-05 09:18:37 -06:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2014-12-05 20:58:16 -06:00
|
|
|
static const handlerfunc mouseMoveHandlers[] = {
|
2014-12-05 09:18:37 -06:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2014-12-05 20:58:16 -06:00
|
|
|
static const handlerfunc mouseLeaveHandlers[] = {
|
2014-12-05 09:18:37 -06:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2014-12-05 20:58:16 -06:00
|
|
|
static const handlerfunc lbuttonDownHandlers[] = {
|
2014-12-05 09:18:37 -06:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2014-12-05 21:23:39 -06:00
|
|
|
static const handlerfunc lbuttonUpHandlers[] = {
|
2014-12-05 09:18:37 -06:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2014-12-05 20:58:16 -06:00
|
|
|
static const handlerfunc mouseWheelHandlers[] = {
|
2014-12-05 09:18:37 -06:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
// TODO WM_MOUSEHOVER, other mouse buttons
|
|
|
|
|
2014-12-05 21:23:39 -06:00
|
|
|
HANDLER(eventHandlers)
|
2014-12-05 09:18:37 -06:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|