Commit 537772a6 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Enhanced Win32 Console (XTERM)

- inputhandling enhanced (keys and mouseclicks) - win32 synchronization (partial) - lots of enhancements to drawing functions - simple/complex console (simple-stdin/stdout -> complex-xterm).
parent 55768384
......@@ -31,6 +31,11 @@ typedef BOOL32 HANDLER_ROUTINE(WORD);
#define BACKGROUND_RED 0x0040 /* background color contains red. */
#define BACKGROUND_INTENSITY 0x0080 /* background color is intensified. */
typedef struct _CONSOLE_CURSOR_INFO {
DWORD dwSize; /* Between 1 & 100 for percentage of cell filled */
BOOL32 bVisible; /* Visibility of cursor */
} CONSOLE_CURSOR_INFO, *LPCONSOLE_CURSOR_INFO;
/*
typedef struct tagCOORD
{
......@@ -68,18 +73,29 @@ typedef struct tagCHAR_INFO
typedef struct tagKEY_EVENT_RECORD
{
BOOL32 bKeyDown;
WORD wRepeatCount;
WORD wVirtualKeyCode;
WORD wVirtualScanCode;
union
BOOL32 bKeyDown; /* 04 */
WORD wRepeatCount; /* 08 */
WORD wVirtualKeyCode; /* 0A */
WORD wVirtualScanCode; /* 0C */
union /* 0E */
{
WCHAR UniCodeChar;
CHAR AsciiChar;
WCHAR UniCodeChar; /* 0E */
CHAR AsciiChar; /* 0E */
} uChar;
DWORD dwControlKeyState;
DWORD dwControlKeyState; /* 10 */
} KEY_EVENT_RECORD,*LPKEY_EVENT_RECORD;
/* dwControlKeyState bitmask */
#define RIGHT_ALT_PRESSED 0x0001
#define LEFT_ALT_PRESSED 0x0002
#define RIGHT_CTRL_PRESSED 0x0004
#define LEFT_CTRL_PRESSED 0x0008
#define SHIFT_PRESSED 0x0010
#define NUMLOCK_ON 0x0020
#define SCROLLLOCK_ON 0x0040
#define CAPSLOCK_ON 0x0080
#define ENHANCED_KEY 0x0100
typedef struct tagMOUSE_EVENT_RECORD
{
COORD dwMousePosition;
......@@ -105,7 +121,7 @@ typedef struct tagFOCUS_EVENT_RECORD
typedef struct tagINPUT_RECORD
{
WORD EventType;
WORD EventType; /* 00 */
union
{
KEY_EVENT_RECORD KeyEvent;
......@@ -116,4 +132,11 @@ typedef struct tagINPUT_RECORD
} Event;
} INPUT_RECORD,*LPINPUT_RECORD;
/* INPUT_RECORD.wEventType */
#define KEY_EVENT 0x01
#define MOUSE_EVENT 0x02
#define WINDOW_BUFFER_SIZE_EVENT 0x04
#define MENU_EVENT 0x08
#define FOCUS_EVENT 0x10
#endif /* __WINE_WINCON_H */
......@@ -244,6 +244,9 @@ static void TASK_CallToStart(void)
LPTHREAD_START_ROUTINE entry = (LPTHREAD_START_ROUTINE)
RVA_PTR(pModule->module32, OptionalHeader.AddressOfEntryPoint);
if (PE_HEADER(pModule->module32)->OptionalHeader.Subsystem==IMAGE_SUBSYSTEM_WINDOWS_CUI)
AllocConsole();
if (pModule->heap_size)
LocalInit( pTask->hInstance, 0, pModule->heap_size );
......
......@@ -584,7 +584,7 @@ init MAIN_KernelInit
566 stub QueueUserAPC
567 register RaiseException() RaiseException
568 stdcall ReadConsoleA(long ptr long ptr ptr) ReadConsole32A
569 stdcall ReadConsoleInputA(long ptr long ptr) ReadConsoleInputA
569 stdcall ReadConsoleInputA(long ptr long ptr) ReadConsoleInput32A
570 stub ReadConsoleInputW
571 stub ReadConsoleOutputA
572 stub ReadConsoleOutputAttribute
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment