NHDT->ANH, nethack->anethack, nhdat->anhdat
[aNetHack.git] / sys / wince / mhinput.h
blobbef4242ec988737f4112fbf27a9802b983565b8c
1 /* aNetHack 0.0.1 mhinput.h $ANH-Date: 1432512801 2015/05/25 00:13:21 $ $ANH-Branch: master $:$ANH-Revision: 1.11 $ */
2 /* Copyright (C) 2001 by Alex Kompel */
3 /* aNetHack may be freely redistributed. See license for details. */
5 #ifndef MSWINInput_h
6 #define MSWINInput_h
8 /* anethack input queue - store/extract input events */
9 #include "winMS.h"
11 #define NHEVENT_CHAR 1
12 #define NHEVENT_MOUSE 2
13 typedef struct mswin_event {
14 int type;
15 union {
16 struct {
17 int ch;
18 } kbd;
20 struct {
21 int mod;
22 int x, y;
23 } ms;
25 } MSNHEvent, *PMSNHEvent;
27 #define NHEVENT_KBD(c) \
28 { \
29 MSNHEvent e; \
30 e.type = NHEVENT_CHAR; \
31 e.kbd.ch = (c); \
32 mswin_input_push(&e); \
34 #define NHEVENT_MS(_mod, _x, _y) \
35 { \
36 MSNHEvent e; \
37 e.type = NHEVENT_MOUSE; \
38 e.ms.mod = (_mod); \
39 e.ms.x = (_x); \
40 e.ms.y = (_y); \
41 mswin_input_push(&e); \
44 void mswin_nh_input_init();
45 int mswin_have_input();
46 void mswin_input_push(PMSNHEvent event);
47 PMSNHEvent mswin_input_pop();
48 PMSNHEvent mswin_input_peek();
50 #endif /* MSWINInput_h */