Undefined CHAR_MAX and CHAR_MIN (#defined by NetBSD's system headers).
[wine/multimedia.git] / include / wincon.h
blob6383f6341f89e6c82cc7f7cb858c7cdce5e012b3
1 #ifndef __WINE_WINCON_H
2 #define __WINE_WINCON_H
4 #define CTRL_C_EVENT 0
5 #define CTRL_BREAK_EVENT 1
6 #define CTRL_CLOSE_EVENT 2
7 #define CTRL_LOGOFF_EVENT 5
8 #define CTRL_SHUTDOWN_EVENT 6
10 /* Console Mode flags */
11 #define ENABLE_PROCESSED_INPUT 0x01
12 #define ENABLE_LINE_INPUT 0x02
13 #define ENABLE_ECHO_INPUT 0x04
14 #define ENABLE_WINDOW_INPUT 0x08
15 #define ENABLE_MOUSE_INPUT 0x10
17 #define ENABLE_PROCESSED_OUTPUT 0x01
18 #define ENABLE_WRAP_AT_EOL_OUTPUT 0x02
21 typedef BOOL32 HANDLER_ROUTINE(WORD);
23 /* Attributes flags: */
25 #define FOREGROUND_BLUE 0x0001 /* text color contains blue. */
26 #define FOREGROUND_GREEN 0x0002 /* text color contains green. */
27 #define FOREGROUND_RED 0x0004 /* text color contains red. */
28 #define FOREGROUND_INTENSITY 0x0008 /* text color is intensified. */
29 #define BACKGROUND_BLUE 0x0010 /* background color contains blue. */
30 #define BACKGROUND_GREEN 0x0020 /* background color contains green. */
31 #define BACKGROUND_RED 0x0040 /* background color contains red. */
32 #define BACKGROUND_INTENSITY 0x0080 /* background color is intensified. */
34 typedef struct _CONSOLE_CURSOR_INFO {
35 DWORD dwSize; /* Between 1 & 100 for percentage of cell filled */
36 BOOL32 bVisible; /* Visibility of cursor */
37 } CONSOLE_CURSOR_INFO, *LPCONSOLE_CURSOR_INFO;
40 typedef struct tagCOORD
42 INT16 x;
43 INT16 y;
44 } COORD,*LPCOORD;
47 typedef struct tagSMALL_RECT
49 INT16 Left;
50 INT16 Top;
51 INT16 Right;
52 INT16 Bottom;
53 } SMALL_RECT,*LPSMALL_RECT;
55 typedef struct tagCONSOLE_SCREEN_BUFFER_INFO
57 COORD dwSize;
58 COORD dwCursorPosition;
59 WORD wAttributes;
60 SMALL_RECT srWindow;
61 COORD dwMaximumWindowSize;
62 } CONSOLE_SCREEN_BUFFER_INFO,*LPCONSOLE_SCREEN_BUFFER_INFO;
64 typedef struct tagCHAR_INFO
66 union
68 WCHAR UnicodeChar;
69 CHAR AsciiChar;
70 } Char;
71 WORD Attributes;
72 } CHAR_INFO,*LPCHAR_INFO;
74 typedef struct tagKEY_EVENT_RECORD
76 BOOL32 bKeyDown; /* 04 */
77 WORD wRepeatCount; /* 08 */
78 WORD wVirtualKeyCode; /* 0A */
79 WORD wVirtualScanCode; /* 0C */
80 union /* 0E */
82 WCHAR UniCodeChar; /* 0E */
83 CHAR AsciiChar; /* 0E */
84 } uChar;
85 DWORD dwControlKeyState; /* 10 */
86 } KEY_EVENT_RECORD,*LPKEY_EVENT_RECORD;
88 /* dwControlKeyState bitmask */
89 #define RIGHT_ALT_PRESSED 0x0001
90 #define LEFT_ALT_PRESSED 0x0002
91 #define RIGHT_CTRL_PRESSED 0x0004
92 #define LEFT_CTRL_PRESSED 0x0008
93 #define SHIFT_PRESSED 0x0010
94 #define NUMLOCK_ON 0x0020
95 #define SCROLLLOCK_ON 0x0040
96 #define CAPSLOCK_ON 0x0080
97 #define ENHANCED_KEY 0x0100
99 typedef struct tagMOUSE_EVENT_RECORD
101 COORD dwMousePosition;
102 DWORD dwButtonState;
103 DWORD dwControlKeyState;
104 DWORD dwEventFlags;
105 } MOUSE_EVENT_RECORD,*LPMOUSE_EVENT_RECORD;
107 typedef struct tagWINDOW_BUFFER_SIZE_RECORD
109 COORD dwSize;
110 } WINDOW_BUFFER_SIZE_RECORD,*LPWINDOW_BUFFER_SIZE_RECORD;
112 typedef struct tagMENU_EVENT_RECORD
114 UINT32 dwCommandId; /* perhaps UINT16 ??? */
115 } MENU_EVENT_RECORD,*LPMENU_EVENT_RECORD;
117 typedef struct tagFOCUS_EVENT_RECORD
119 BOOL32 bSetFocus; /* perhaps BOOL16 ??? */
120 } FOCUS_EVENT_RECORD,*LPFOCUS_EVENT_RECORD;
122 typedef struct tagINPUT_RECORD
124 WORD EventType; /* 00 */
125 union
127 KEY_EVENT_RECORD KeyEvent;
128 MOUSE_EVENT_RECORD MouseEvent;
129 WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
130 MENU_EVENT_RECORD MenuEvent;
131 FOCUS_EVENT_RECORD FocusEvent;
132 } Event;
133 } INPUT_RECORD,*LPINPUT_RECORD;
135 /* INPUT_RECORD.wEventType */
136 #define KEY_EVENT 0x01
137 #define MOUSE_EVENT 0x02
138 #define WINDOW_BUFFER_SIZE_EVENT 0x04
139 #define MENU_EVENT 0x08
140 #define FOCUS_EVENT 0x10
142 #endif /* __WINE_WINCON_H */