forked from Mirrors/wine-wine
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).oldstable
parent
55768384ff
commit
537772a6bb
|
@ -31,6 +31,11 @@ typedef BOOL32 HANDLER_ROUTINE(WORD);
|
||||||
#define BACKGROUND_RED 0x0040 /* background color contains red. */
|
#define BACKGROUND_RED 0x0040 /* background color contains red. */
|
||||||
#define BACKGROUND_INTENSITY 0x0080 /* background color is intensified. */
|
#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
|
typedef struct tagCOORD
|
||||||
{
|
{
|
||||||
|
@ -68,18 +73,29 @@ typedef struct tagCHAR_INFO
|
||||||
|
|
||||||
typedef struct tagKEY_EVENT_RECORD
|
typedef struct tagKEY_EVENT_RECORD
|
||||||
{
|
{
|
||||||
BOOL32 bKeyDown;
|
BOOL32 bKeyDown; /* 04 */
|
||||||
WORD wRepeatCount;
|
WORD wRepeatCount; /* 08 */
|
||||||
WORD wVirtualKeyCode;
|
WORD wVirtualKeyCode; /* 0A */
|
||||||
WORD wVirtualScanCode;
|
WORD wVirtualScanCode; /* 0C */
|
||||||
union
|
union /* 0E */
|
||||||
{
|
{
|
||||||
WCHAR UniCodeChar;
|
WCHAR UniCodeChar; /* 0E */
|
||||||
CHAR AsciiChar;
|
CHAR AsciiChar; /* 0E */
|
||||||
} uChar;
|
} uChar;
|
||||||
DWORD dwControlKeyState;
|
DWORD dwControlKeyState; /* 10 */
|
||||||
} KEY_EVENT_RECORD,*LPKEY_EVENT_RECORD;
|
} 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
|
typedef struct tagMOUSE_EVENT_RECORD
|
||||||
{
|
{
|
||||||
COORD dwMousePosition;
|
COORD dwMousePosition;
|
||||||
|
@ -105,7 +121,7 @@ typedef struct tagFOCUS_EVENT_RECORD
|
||||||
|
|
||||||
typedef struct tagINPUT_RECORD
|
typedef struct tagINPUT_RECORD
|
||||||
{
|
{
|
||||||
WORD EventType;
|
WORD EventType; /* 00 */
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
KEY_EVENT_RECORD KeyEvent;
|
KEY_EVENT_RECORD KeyEvent;
|
||||||
|
@ -116,4 +132,11 @@ typedef struct tagINPUT_RECORD
|
||||||
} Event;
|
} Event;
|
||||||
} INPUT_RECORD,*LPINPUT_RECORD;
|
} 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 */
|
#endif /* __WINE_WINCON_H */
|
||||||
|
|
|
@ -244,6 +244,9 @@ static void TASK_CallToStart(void)
|
||||||
|
|
||||||
LPTHREAD_START_ROUTINE entry = (LPTHREAD_START_ROUTINE)
|
LPTHREAD_START_ROUTINE entry = (LPTHREAD_START_ROUTINE)
|
||||||
RVA_PTR(pModule->module32, OptionalHeader.AddressOfEntryPoint);
|
RVA_PTR(pModule->module32, OptionalHeader.AddressOfEntryPoint);
|
||||||
|
|
||||||
|
if (PE_HEADER(pModule->module32)->OptionalHeader.Subsystem==IMAGE_SUBSYSTEM_WINDOWS_CUI)
|
||||||
|
AllocConsole();
|
||||||
|
|
||||||
if (pModule->heap_size)
|
if (pModule->heap_size)
|
||||||
LocalInit( pTask->hInstance, 0, pModule->heap_size );
|
LocalInit( pTask->hInstance, 0, pModule->heap_size );
|
||||||
|
|
|
@ -584,7 +584,7 @@ init MAIN_KernelInit
|
||||||
566 stub QueueUserAPC
|
566 stub QueueUserAPC
|
||||||
567 register RaiseException() RaiseException
|
567 register RaiseException() RaiseException
|
||||||
568 stdcall ReadConsoleA(long ptr long ptr ptr) ReadConsole32A
|
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
|
570 stub ReadConsoleInputW
|
||||||
571 stub ReadConsoleOutputA
|
571 stub ReadConsoleOutputA
|
||||||
572 stub ReadConsoleOutputAttribute
|
572 stub ReadConsoleOutputAttribute
|
||||||
|
|
933
win32/console.c
933
win32/console.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue