Moved a few non-standard headers into their respective dlls.
[wine/multimedia.git] / include / wincon.h
blob5b55a858873aea88f342582086c1c8d9ed8f951d
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 BOOL 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 BOOL bVisible; /* Visibility of cursor */
37 } CONSOLE_CURSOR_INFO, *LPCONSOLE_CURSOR_INFO;
39 typedef struct tagCOORD
41 SHORT X;
42 SHORT Y;
43 } COORD, *LPCOORD;
45 typedef struct tagSMALL_RECT
47 SHORT Left;
48 SHORT Top;
49 SHORT Right;
50 SHORT Bottom;
51 } SMALL_RECT,*LPSMALL_RECT;
53 typedef struct tagCONSOLE_SCREEN_BUFFER_INFO
55 COORD dwSize;
56 COORD dwCursorPosition;
57 WORD wAttributes;
58 SMALL_RECT srWindow;
59 COORD dwMaximumWindowSize;
60 } CONSOLE_SCREEN_BUFFER_INFO,*LPCONSOLE_SCREEN_BUFFER_INFO;
62 typedef struct tagCHAR_INFO
64 union
66 WCHAR UnicodeChar;
67 CHAR AsciiChar;
68 } Char;
69 WORD Attributes;
70 } CHAR_INFO,*LPCHAR_INFO;
72 typedef struct tagKEY_EVENT_RECORD
74 BOOL bKeyDown; /* 04 */
75 WORD wRepeatCount; /* 08 */
76 WORD wVirtualKeyCode; /* 0A */
77 WORD wVirtualScanCode; /* 0C */
78 union /* 0E */
80 WCHAR UniCodeChar; /* 0E */
81 CHAR AsciiChar; /* 0E */
82 } uChar;
83 DWORD dwControlKeyState; /* 10 */
84 } KEY_EVENT_RECORD,*LPKEY_EVENT_RECORD;
86 /* dwControlKeyState bitmask */
87 #define RIGHT_ALT_PRESSED 0x0001
88 #define LEFT_ALT_PRESSED 0x0002
89 #define RIGHT_CTRL_PRESSED 0x0004
90 #define LEFT_CTRL_PRESSED 0x0008
91 #define SHIFT_PRESSED 0x0010
92 #define NUMLOCK_ON 0x0020
93 #define SCROLLLOCK_ON 0x0040
94 #define CAPSLOCK_ON 0x0080
95 #define ENHANCED_KEY 0x0100
97 typedef struct tagMOUSE_EVENT_RECORD
99 COORD dwMousePosition;
100 DWORD dwButtonState;
101 DWORD dwControlKeyState;
102 DWORD dwEventFlags;
103 } MOUSE_EVENT_RECORD,*LPMOUSE_EVENT_RECORD;
105 typedef struct tagWINDOW_BUFFER_SIZE_RECORD
107 COORD dwSize;
108 } WINDOW_BUFFER_SIZE_RECORD,*LPWINDOW_BUFFER_SIZE_RECORD;
110 typedef struct tagMENU_EVENT_RECORD
112 UINT dwCommandId; /* perhaps UINT16 ??? */
113 } MENU_EVENT_RECORD,*LPMENU_EVENT_RECORD;
115 typedef struct tagFOCUS_EVENT_RECORD
117 BOOL bSetFocus; /* perhaps BOOL16 ??? */
118 } FOCUS_EVENT_RECORD,*LPFOCUS_EVENT_RECORD;
120 typedef struct tagINPUT_RECORD
122 WORD EventType; /* 00 */
123 union
125 KEY_EVENT_RECORD KeyEvent;
126 MOUSE_EVENT_RECORD MouseEvent;
127 WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
128 MENU_EVENT_RECORD MenuEvent;
129 FOCUS_EVENT_RECORD FocusEvent;
130 } Event;
131 } INPUT_RECORD,*LPINPUT_RECORD;
133 /* INPUT_RECORD.wEventType */
134 #define KEY_EVENT 0x01
135 #define MOUSE_EVENT 0x02
136 #define WINDOW_BUFFER_SIZE_EVENT 0x04
137 #define MENU_EVENT 0x08
138 #define FOCUS_EVENT 0x10
140 COORD WINAPI GetLargestConsoleWindowSize(HANDLE);
141 BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE,LPSTR,DWORD,COORD,LPDWORD);
142 BOOL WINAPI ReadConsoleOutputCharacterW(HANDLE,LPWSTR,DWORD,COORD,LPDWORD);
143 #define ReadConsoleOutputCharacter WINELIB_NAME_AW(ReadConsoleOutputCharacter)
144 BOOL WINAPI SetConsoleCursorPosition(HANDLE,COORD);
146 BOOL WINAPI WriteConsoleOutputA( HANDLE hConsoleOutput, LPCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, LPSMALL_RECT lpWriteRegion);
147 BOOL WINAPI WriteConsoleOutputW( HANDLE hConsoleOutput, LPCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, LPSMALL_RECT lpWriteRegion);
148 #define WriteConsoleOutput WINELIB_NAME_AW(WriteConsoleOutput)
149 BOOL WINAPI WriteConsoleInputA( HANDLE handle, INPUT_RECORD *buffer,
150 DWORD count, LPDWORD written );
151 BOOL WINAPI WriteConsoleInputW( HANDLE handle, INPUT_RECORD *buffer,
152 DWORD count, LPDWORD written );
153 #define WriteConsoleInput WINELIB_NAME_AW(WriteConsoleInput)
154 BOOL WINAPI PeekConsoleInputA( HANDLE handle, LPINPUT_RECORD buffer,
155 DWORD count, LPDWORD read );
156 BOOL WINAPI PeekConsoleInputW( HANDLE handle, LPINPUT_RECORD buffer,
157 DWORD count, LPDWORD read );
158 #define PeekConsoleInput WINELIB_NAME_AW(PeekConsoleInput)
159 BOOL WINAPI ReadConsoleA( HANDLE hConsoleInput, LPVOID lpBuffer,
160 DWORD nNumberOfCharsToRead,
161 LPDWORD lpNumberOfCharsRead, LPVOID lpReserved);
162 BOOL WINAPI ReadConsoleW( HANDLE hConsoleInput, LPVOID lpBuffer,
163 DWORD nNumberOfCharsToRead,
164 LPDWORD lpNumberOfCharsRead, LPVOID lpReserved);
165 #define ReadConsole WINELIB_NAME_AW(ReadConsole)
166 BOOL WINAPI ReadConsoleInputA(HANDLE hConsoleInput,
167 LPINPUT_RECORD lpBuffer, DWORD nLength,
168 LPDWORD lpNumberOfEventsRead);
169 BOOL WINAPI ReadConsoleInputW(HANDLE hConsoleInput,
170 LPINPUT_RECORD lpBuffer, DWORD nLength,
171 LPDWORD lpNumberOfEventsRead);
172 #define ReadConsoleInput WINELIB_NAME_AW(ReadConsoleInput)
174 BOOL WINAPI GetConsoleScreenBufferInfo(HANDLE hConsoleOutput,
175 LPCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
176 BOOL WINAPI SetConsoleScreenBufferSize(HANDLE hConsoleOutput,
177 COORD dwSize);
179 #ifdef __WINE__
180 extern HANDLE CONSOLE_OpenHandle( BOOL output, DWORD access, LPSECURITY_ATTRIBUTES sa );
181 #endif
183 #endif /* __WINE_WINCON_H */