Sweden-Number/include/wincon.h

118 lines
2.8 KiB
C

#ifndef __WINE_WINCON_H
#define __WINE_WINCON_H
#define CTRL_C_EVENT 0
#define CTRL_BREAK_EVENT 1
#define CTRL_CLOSE_EVENT 2
#define CTRL_LOGOFF_EVENT 5
#define CTRL_SHUTDOWN_EVENT 6
/* Console Mode flags */
#define ENABLE_PROCESSED_INPUT 0x01
#define ENABLE_LINE_INPUT 0x02
#define ENABLE_ECHO_INPUT 0x04
#define ENABLE_WINDOW_INPUT 0x08
#define ENABLE_MOUSE_INPUT 0x10
#define ENABLE_PROCESSED_OUTPUT 0x01
#define ENABLE_WRAP_AT_EOL_OUTPUT 0x02
typedef BOOL32 HANDLER_ROUTINE(WORD);
/* Attributes flags: */
#define FOREGROUND_BLUE 0x0001 /* text color contains blue. */
#define FOREGROUND_GREEN 0x0002 /* text color contains green. */
#define FOREGROUND_RED 0x0004 /* text color contains red. */
#define FOREGROUND_INTENSITY 0x0008 /* text color is intensified. */
#define BACKGROUND_BLUE 0x0010 /* background color contains blue. */
#define BACKGROUND_GREEN 0x0020 /* background color contains green. */
#define BACKGROUND_RED 0x0040 /* background color contains red. */
#define BACKGROUND_INTENSITY 0x0080 /* background color is intensified. */
typedef struct tagCOORD
{
INT16 x;
INT16 y;
} COORD,*LPCOORD;
typedef struct tagSMALL_RECT
{
INT16 Left;
INT16 Right;
INT16 Top;
INT16 Bottom;
} SMALL_RECT,*LPSMALL_RECT;
typedef struct tagCONSOLE_SCREEN_BUFFER_INFO
{
COORD dwSize;
COORD dwCursorPosition;
WORD wAttributes;
SMALL_RECT srWindow;
COORD dwMaximumWindowSize;
} CONSOLE_SCREEN_BUFFER_INFO,*LPCONSOLE_SCREEN_BUFFER_INFO;
typedef struct tagCHAR_INFO
{
union
{
WCHAR UnicodeChar;
CHAR AsciiChar;
} Char;
WORD Attributes;
} CHAR_INFO,*LPCHAR_INFO;
typedef struct tagKEY_EVENT_RECORD
{
BOOL32 bKeyDown;
WORD wRepeatCount;
WORD wVirtualKeyCode;
WORD wVirtualScanCode;
union
{
WCHAR UniCodeChar;
CHAR AsciiChar;
} uChar;
DWORD dwControlKeyState;
} KEY_EVENT_RECORD,*LPKEY_EVENT_RECORD;
typedef struct tagMOUSE_EVENT_RECORD
{
COORD dwMousePosition;
DWORD dwButtonState;
DWORD dwControlKeyState;
DWORD dwEventFlags;
} MOUSE_EVENT_RECORD,*LPMOUSE_EVENT_RECORD;
typedef struct tagWINDOW_BUFFER_SIZE_RECORD
{
COORD dwSize;
} WINDOW_BUFFER_SIZE_RECORD,*LPWINDOW_BUFFER_SIZE_RECORD;
typedef struct tagMENU_EVENT_RECORD
{
UINT32 dwCommandId; /* perhaps UINT16 ??? */
} MENU_EVENT_RECORD,*LPMENU_EVENT_RECORD;
typedef struct tagFOCUS_EVENT_RECORD
{
BOOL32 bSetFocus; /* perhaps BOOL16 ??? */
} FOCUS_EVENT_RECORD,*LPFOCUS_EVENT_RECORD;
typedef struct tagINPUT_RECORD
{
WORD EventType;
union
{
KEY_EVENT_RECORD KeyEvent;
MOUSE_EVENT_RECORD MouseEvent;
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
MENU_EVENT_RECORD MenuEvent;
FOCUS_EVENT_RECORD FocusEvent;
} Event;
} INPUT_RECORD,*LPINPUT_RECORD;
#endif /* __WINE_WINCON_H */