-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmsg.c
More file actions
32 lines (30 loc) · 712 Bytes
/
msg.c
File metadata and controls
32 lines (30 loc) · 712 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
#include "msg.h"
#include "types.h"
#include "defs.h"
int handleMessage(message* msg)
{
/*
if (msg->msg_type == M_KEY_UP)
{
cprintf("KEY UP: %x, %x\n", msg->params[0], msg->params[1]);
}
else if (msg->msg_type == M_KEY_DOWN)
{
cprintf("KEY DOWN: %x, %x\n", msg->params[0], msg->params[1]);
}
else if (msg->msg_type == M_MOUSE_MOVE)
{
cprintf("MOUSE MOVE: dx=%d, dy=%d, btn=%x\n", msg->params[0], msg->params[1], msg->params[2]);
}
else if (msg->msg_type == M_MOUSE_DOWN)
{
cprintf("MOUSE DOWN: btn=%x\n", msg->params[0]);
}
else if (msg->msg_type == M_MOUSE_UP)
{
cprintf("MOUSE UP: btn=%x\n", msg->params[0]);
}
*/
wmHandleMessage(msg);
return 0;
}