source: trunk/src/kernel32/console2.h@ 1036

Last change on this file since 1036 was 296, checked in by phaller, 26 years ago

Fix: console input queue fixes

File size: 28.4 KB
Line 
1/* $Id: console2.h,v 1.7 1999-07-12 17:20:04 phaller Exp $ */
2
3/*
4 * Project Odin Software License can be found in LICENSE.TXT
5 * Win32 Console Subsystem for OS/2
6 * 1998/02/11 PH Patrick Haller (haller@zebra.fh-weingarten.de)
7 *
8 * @(#) HandleManager.Cpp 1.0.0 1998/02/11 PH start
9 */
10
11#ifndef _CONSOLESUBSYSTEM_H_
12#define _CONSOLESUBSYSTEM_H_
13
14
15/*****************************************************************************
16 * Remark *
17 *****************************************************************************
18 */
19
20/*****************************************************************************
21 * Includes *
22 *****************************************************************************/
23
24#pragma pack(4)
25
26#ifndef _OS2WIN_H_
27typedef struct _COORD
28{
29 SHORT X;
30 SHORT Y;
31} COORD, *PCOORD;
32#endif
33
34
35typedef struct _SMALL_RECT
36{
37 SHORT Left;
38 SHORT Top;
39 SHORT Right;
40 SHORT Bottom;
41} SMALL_RECT, *PSMALL_RECT;
42
43
44typedef struct _KEY_EVENT_RECORD
45{
46 BOOL bKeyDown;
47 WORD wRepeatCount;
48 WORD wVirtualKeyCode;
49 WORD wVirtualScanCode;
50 union
51 {
52 WCHAR UnicodeChar;
53 CHAR AsciiChar;
54 } uChar;
55 DWORD dwControlKeyState;
56} KEY_EVENT_RECORD, *PKEY_EVENT_RECORD;
57
58
59//
60// ControlKeyState flags
61//
62
63#define RIGHT_ALT_PRESSED 0x0001 // the right alt key is pressed.
64#define LEFT_ALT_PRESSED 0x0002 // the left alt key is pressed.
65#define RIGHT_CTRL_PRESSED 0x0004 // the right ctrl key is pressed.
66#define LEFT_CTRL_PRESSED 0x0008 // the left ctrl key is pressed.
67#define SHIFT_PRESSED 0x0010 // the shift key is pressed.
68#define NUMLOCK_ON 0x0020 // the numlock light is on.
69#define SCROLLLOCK_ON 0x0040 // the scrolllock light is on.
70#define CAPSLOCK_ON 0x0080 // the capslock light is on.
71#define ENHANCED_KEY 0x0100 // the key is enhanced.
72
73typedef struct _MOUSE_EVENT_RECORD
74{
75 COORD dwMousePosition;
76 DWORD dwButtonState;
77 DWORD dwControlKeyState;
78 DWORD dwEventFlags;
79} MOUSE_EVENT_RECORD, *PMOUSE_EVENT_RECORD;
80
81
82//
83// ButtonState flags
84//
85
86#define FROM_LEFT_1ST_BUTTON_PRESSED 0x0001
87#define RIGHTMOST_BUTTON_PRESSED 0x0002
88#define FROM_LEFT_2ND_BUTTON_PRESSED 0x0004
89#define FROM_LEFT_3RD_BUTTON_PRESSED 0x0008
90#define FROM_LEFT_4TH_BUTTON_PRESSED 0x0010
91
92//
93// EventFlags
94//
95
96#define MOUSE_MOVED 0x0001
97#define DOUBLE_CLICK 0x0002
98
99typedef struct _WINDOW_BUFFER_SIZE_RECORD
100{
101 COORD dwSize;
102} WINDOW_BUFFER_SIZE_RECORD, *PWINDOW_BUFFER_SIZE_RECORD;
103
104typedef struct _MENU_EVENT_RECORD
105{
106 UINT dwCommandId;
107} MENU_EVENT_RECORD, *PMENU_EVENT_RECORD;
108
109typedef struct _FOCUS_EVENT_RECORD
110{
111 BOOL bSetFocus;
112} FOCUS_EVENT_RECORD, *PFOCUS_EVENT_RECORD;
113
114typedef struct _INPUT_RECORD
115{
116 WORD EventType;
117 union
118 {
119 KEY_EVENT_RECORD KeyEvent;
120 MOUSE_EVENT_RECORD MouseEvent;
121 WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
122 MENU_EVENT_RECORD MenuEvent;
123 FOCUS_EVENT_RECORD FocusEvent;
124 } Event;
125} INPUT_RECORD, *PINPUT_RECORD;
126
127
128//
129// EventType flags:
130//
131
132#define KEY_EVENT 0x0001 // Event contains key event record
133#define MOUSE_EVENT 0x0002 // Event contains mouse event record
134#define WINDOW_BUFFER_SIZE_EVENT 0x0004 // Event contains window change event record
135#define MENU_EVENT 0x0008 // Event contains menu event record
136#define FOCUS_EVENT 0x0010 // event contains focus change
137
138typedef struct _CHAR_INFO
139{
140 union
141 {
142 WCHAR UnicodeChar;
143 CHAR AsciiChar;
144 } Char;
145 WORD Attributes;
146} CHAR_INFO, *PCHAR_INFO;
147
148//
149// Attributes flags:
150//
151
152#define FOREGROUND_BLUE 0x0001 // text color contains blue.
153#define FOREGROUND_GREEN 0x0002 // text color contains green.
154#define FOREGROUND_RED 0x0004 // text color contains red.
155#define FOREGROUND_INTENSITY 0x0008 // text color is intensified.
156#define BACKGROUND_BLUE 0x0010 // background color contains blue.
157#define BACKGROUND_GREEN 0x0020 // background color contains green.
158#define BACKGROUND_RED 0x0040 // background color contains red.
159#define BACKGROUND_INTENSITY 0x0080 // background color is intensified.
160
161
162typedef struct _CONSOLE_SCREEN_BUFFER_INFO
163{
164 COORD dwSize;
165 COORD dwCursorPosition;
166 WORD wAttributes;
167 SMALL_RECT srWindow;
168 COORD dwMaximumWindowSize;
169} CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO;
170
171typedef struct _CONSOLE_CURSOR_INFO
172{
173 DWORD dwSize;
174 BOOL bVisible;
175} CONSOLE_CURSOR_INFO, *PCONSOLE_CURSOR_INFO;
176
177//
178// typedef for ctrl-c handler routines
179//
180
181typedef BOOL (* __stdcall PHANDLER_ROUTINE)(DWORD CtrlType); /*PLF Fri 97-06-20 17:17:42*/
182
183#define CTRL_C_EVENT 0
184#define CTRL_BREAK_EVENT 1
185#define CTRL_CLOSE_EVENT 2
186// 3 is reserved!
187// 4 is reserved!
188#define CTRL_LOGOFF_EVENT 5
189#define CTRL_SHUTDOWN_EVENT 6
190
191//
192// Input Mode flags:
193//
194
195#define ENABLE_PROCESSED_INPUT 0x0001
196#define ENABLE_LINE_INPUT 0x0002
197#define ENABLE_ECHO_INPUT 0x0004
198#define ENABLE_WINDOW_INPUT 0x0008
199#define ENABLE_MOUSE_INPUT 0x0010
200
201//
202// Output Mode flags:
203//
204
205#define ENABLE_PROCESSED_OUTPUT 0x0001
206#define ENABLE_WRAP_AT_EOL_OUTPUT 0x0002
207
208#pragma pack()
209
210
211/*****************************************************************************
212 * Defines & Macros *
213 *****************************************************************************/
214
215#define CONSOLE_TEXTMODE_BUFFER 1
216
217#define SZ_CONSOLE_CLASS "WIN32CONSOLECLASS"
218
219
220/* according to the updated AVIO documentation of Warp 4 */
221#define MAX_OS2_ROWS 255
222#define MAX_OS2_COLUMNS 255
223#define FORMAT_CGA 1
224#define CONSOLE_TIMER_ID 1
225#define CONSOLE_INPUTQUEUESIZE 256
226
227
228#define CONSOLECURSOR_HIDE 1
229#define CONSOLECURSOR_SHOW 2
230#define CONSOLECURSOR_BLINK 3
231#define CONSOLECURSOR_OVERWRITTEN 4
232
233#define UM_CONSOLE_CREATE WM_USER + 0x1000
234
235
236/* device request codes for use in the pseudo-device handlers */
237#define DRQ_CONSOLE 0x00010000
238#define DRQ_FILLCONSOLEOUTPUTATTRIBUTE DRQ_CONSOLE + 0
239#define DRQ_FILLCONSOLEOUTPUTCHARACTERA DRQ_CONSOLE + 1
240#define DRQ_FILLCONSOLEOUTPUTCHARACTERW DRQ_CONSOLE + 2
241#define DRQ_FLUSHCONSOLEINPUTBUFFER DRQ_CONSOLE + 3
242#define DRQ_GETCONSOLECURSORINFO DRQ_CONSOLE + 4
243#define DRQ_GETCONSOLEMODE DRQ_CONSOLE + 5
244#define DRQ_GETCONSOLESCREENBUFFERINFO DRQ_CONSOLE + 6
245#define DRQ_GETLARGESTCONSOLEWINDOWSIZE DRQ_CONSOLE + 7
246#define DRQ_GETNUMBEROFCONSOLEINPUTEVENTS DRQ_CONSOLE + 8
247#define DRQ_PEEKCONSOLEINPUTW DRQ_CONSOLE + 9
248#define DRQ_PEEKCONSOLEINPUTA DRQ_CONSOLE + 10
249#define DRQ_READCONSOLEA DRQ_CONSOLE + 11
250#define DRQ_READCONSOLEW DRQ_CONSOLE + 12
251#define DRQ_READCONSOLEINPUTA DRQ_CONSOLE + 14
252#define DRQ_READCONSOLEINPUTW DRQ_CONSOLE + 15
253#define DRQ_READCONSOLEOUTPUTA DRQ_CONSOLE + 16
254#define DRQ_READCONSOLEOUTPUTW DRQ_CONSOLE + 17
255#define DRQ_READCONSOLEOUTPUTATTRIBUTE DRQ_CONSOLE + 18
256#define DRQ_READCONSOLEOUTPUTCHARACTERA DRQ_CONSOLE + 19
257#define DRQ_READCONSOLEOUTPUTCHARACTERW DRQ_CONSOLE + 20
258#define DRQ_SCROLLCONSOLESCREENBUFFERA DRQ_CONSOLE + 21
259#define DRQ_SCROLLCONSOLESCREENBUFFERW DRQ_CONSOLE + 22
260#define DRQ_SETCONSOLEACTIVESCREENBUFFER DRQ_CONSOLE + 23
261#define DRQ_SETCONSOLECURSORINFO DRQ_CONSOLE + 24
262#define DRQ_SETCONSOLECURSORPOSITION DRQ_CONSOLE + 25
263#define DRQ_SETCONSOLEMODE DRQ_CONSOLE + 26
264#define DRQ_SETCONSOLESCREENBUFFERSIZE DRQ_CONSOLE + 27
265#define DRQ_SETCONSOLETEXTATTRIBUTE DRQ_CONSOLE + 28
266#define DRQ_SETCONSOLEWINDOWINFO DRQ_CONSOLE + 29
267#define DRQ_WRITECONSOLEA DRQ_CONSOLE + 30
268#define DRQ_WRITECONSOLEW DRQ_CONSOLE + 31
269#define DRQ_WRITECONSOLEINPUTA DRQ_CONSOLE + 32
270#define DRQ_WRITECONSOLEINPUTW DRQ_CONSOLE + 33
271#define DRQ_WRITECONSOLEOUTPUTA DRQ_CONSOLE + 34
272#define DRQ_WRITECONSOLEOUTPUTW DRQ_CONSOLE + 35
273#define DRQ_WRITECONSOLEOUTPUTATTRIBUTE DRQ_CONSOLE + 36
274#define DRQ_WRITECONSOLEOUTPUTCHARACTERA DRQ_CONSOLE + 37
275#define DRQ_WRITECONSOLEOUTPUTCHARACTERW DRQ_CONSOLE + 38
276#define DRQ_INTERNAL_CONSOLEBUFFERMAP DRQ_CONSOLE + 39
277#define DRQ_INTERNAL_CONSOLECURSORSHOW DRQ_CONSOLE + 40
278#define DRQ_INTERNAL_CONSOLEADJUSTWINDOW DRQ_CONSOLE + 41
279
280
281#define COORD2ULONG(c) ((ULONG)( ((ULONG)c.X << 16) + (ULONG)c.Y))
282#define ULONG2COORD(c,u) c.X = u >> 16; c.Y = u & 0x0000FFFF;
283
284
285/*****************************************************************************
286 * Structures *
287 *****************************************************************************/
288
289
290typedef struct _ConsoleBuffer
291{
292 /* A console buffer is a indexed array of lines. This technique allows */
293 /* much faster scrolling than a single large textbuffer. */
294 PSZ *ppszLine; /* an array of line pointers */
295 ULONG ulScrollLineOffset; /* offset to the 1st line in the buffer */
296
297 /* the following structures reflect the Win32 API structures */
298 CONSOLE_CURSOR_INFO CursorInfo;
299 COORD coordCursorPosition;
300
301 /* the mode the console is currently in */
302 DWORD dwConsoleMode;
303
304 /* information about the current screen buffer */
305 // CONSOLE_SCREEN_BUFFER_INFO ConsoleScreenBufferInfo;
306 COORD coordBufferSize;
307 UCHAR ucDefaultAttribute; /* default text attribute */
308 COORD coordWindowPosition; /* viewport position */
309 COORD coordWindowSize; /* viewport size */
310} CONSOLEBUFFER, *PCONSOLEBUFFER;
311
312
313typedef struct _ConsoleOptions
314{
315 HMODULE hmodResources; /* module handle for PM resources */
316
317 BOOL fTerminateAutomatically; /* wait for window termination or not */
318 BOOL fSpeakerEnabled; /* whether we process BEL 0x07 or not */
319 ULONG ulSpeakerDuration; /* duration and frequency for speaker beep */
320 ULONG ulSpeakerFrequency;
321 ULONG ulUpdateLimit; /* when exceeding this line counter, automatic */
322 /* screen update is performed */
323
324 BOOL fSetWindowPosition; /* TRUE if window has to be positioned */
325
326 COORD coordDefaultPosition; /* default position of the console window */
327 COORD coordDefaultSize; /* default size of the console window */
328 COORD coordBufferSize; /* size of the console buffer */
329
330 BOOL fQuickInsert; /* like NT's quick insert mode */
331 BOOL fInsertMode; /* insert mode */
332 BOOL fMouseActions; /* like Warp 4's "mouse action" mode */
333 BOOL fToolbarActive; /* windows95-like toolbar on / off */
334
335 ULONG ulTabSize; /* tabulator size */
336
337 UCHAR ucDefaultAttribute; /* the default text attribute */
338
339 UCHAR ucCursorDivisor; /* cursor timer divisor for blinking */
340
341 ULONG ulConsoleThreadPriorityClass; /* priority settings for message */
342 ULONG ulConsoleThreadPriorityDelta; /* thread */
343 ULONG ulAppThreadPriorityClass; /* priority settings for application */
344 ULONG ulAppThreadPriorityDelta; /* thread */
345
346} ICONSOLEOPTIONS, *PICONSOLEOPTIONS;
347
348
349
350typedef struct _iConsoleGlobals
351{
352 TID tidConsole; /* console message thread */
353 HEV hevConsole; /* console event semaphore */
354 APIRET rcConsole; /* initialization status of the console */
355 HAB hab; /* anchor block handle */
356 HMQ hmq; /* message queue handle for the console window */
357 QMSG qmsg; /* message for the console window */
358 ULONG flFrameFlags; /* frame window creation flags */
359 PSZ pszWindowTitle; /* name of the window */
360 HWND hwndFrame; /* frame window handle */
361 HWND hwndClient; /* client window handle */
362
363 HWND hwndHorzScroll; /* handle of horizontal scroll bar */
364 HWND hwndVertScroll; /* handle of vertical scroll bar */
365 BOOL fHasVertScroll; /* indicates if scrollbars are visible */
366 BOOL fHasHorzScroll;
367
368 HDC hdcConsole; /* console device context */
369 PFNWP pfnwpFrameOriginal; /* original frame window procedure */
370
371 HWND hwndMenuConsole; /* console popup menu */
372 HMODULE hmodResource; /* resources are stored in KERNEL32.DLL */
373 HPOINTER hPtrConsole; /* console icon */
374
375 HANDLE hConsoleBuffer; /* handle of the active console buffer */
376 HANDLE hConsoleBufferDefault; /* handle of the default console buffer */
377
378 HVPS hvpsConsole; /* console AVIO presentation space */
379
380 COORD coordMaxWindowPels; /* maximum window size in pixels */
381 COORD coordWindowSize; /* current console window size */
382 COORD coordWindowPos; /* scroller's positions */
383
384 SHORT sCellCX; /* height and width of a avio cell with the current font */
385 SHORT sCellCY;
386
387 BOOL fUpdateRequired; /* set to TRUE if next WM_TIMER shall update the */
388 /* AVIO presentation space from the consolebuffer */
389
390 ULONG idTimer; /* Timer identifier */
391 ULONG ulTimerFrequency; /* cursor + blitter timer frequency */
392 ULONG ulTimerCursor; /* cursor loop counter for divisor */
393
394 ICONSOLEOPTIONS Options; /* the console's options / properties */
395
396} ICONSOLEGLOBALS, *PICONSOLEGLOBALS;
397
398
399typedef struct _iConsoleInput
400{
401 INPUT_RECORD arrInputRecord[CONSOLE_INPUTQUEUESIZE]; /* packet queue */
402 HEV hevInputQueue; /* becomes posted if input arrives */
403
404 ULONG ulIndexFree; /* index of first free event record */
405 ULONG ulIndexEvent; /* index of first valid event in queue */
406 ULONG ulEvents; /* number of events in queue */
407 DWORD dwConsoleMode; /* input console mode */
408
409 HMTX hmtxInputQueue; /* console input queue mutex semaphore */
410} ICONSOLEINPUT, *PICONSOLEINPUT;
411
412
413
414/*****************************************************************************
415 * Prototypes *
416 *****************************************************************************/
417
418#ifdef __cplusplus
419extern "C" {
420#endif
421
422
423 /* console message thread */
424VOID _Optlink iConsoleMsgThread (void *pParameters);
425
426MRESULT EXPENTRY iConsoleWindowProc(HWND hwnd, /* window procedure */
427 ULONG msg,
428 MPARAM mp1,
429 MPARAM mp2);
430
431MRESULT EXPENTRY iConsoleFrameWindowProc(HWND hwnd,
432 ULONG msg,
433 MPARAM mp1,
434 MPARAM mp2);
435
436void iConsoleBufferMap (PCONSOLEBUFFER pConsoleBuffer);
437
438void iConsoleBufferScrollUp (PCONSOLEBUFFER pConsoleBuffer,
439 ULONG ulLines);
440
441void iConsoleBufferFillLine (ULONG ulPattern,
442 PUSHORT pusTarget,
443 ULONG ulSize);
444
445APIRET iConsoleInputEventPush (PINPUT_RECORD pInputRecord);
446
447APIRET iConsoleInputEventPop (PINPUT_RECORD pInputRecord);
448
449APIRET iConsoleInputEventPushKey (MPARAM mp1,
450 MPARAM mp2);
451
452APIRET iConsoleInputEventPushMouse (ULONG ulMessage,
453 MPARAM mp1,
454 MPARAM mp2);
455
456APIRET iConsoleInputEventPushWindow(COORD coordWindowSize);
457
458APIRET iConsoleInputEventPushMenu (DWORD dwCommandId);
459
460APIRET iConsoleInputEventPushFocus (BOOL bSetFocus);
461
462ULONG iConsoleInputQueryEvents (void);
463
464void iConsoleCursorShow (PCONSOLEBUFFER pConsoleBuffer,
465 ULONG ulCursorMode);
466
467APIRET iConsoleFontQuery (void);
468
469void iConsoleAdjustWindow (PCONSOLEBUFFER pConsoleBuffer);
470
471
472#ifndef _OS2WIN_H
473
474BOOL WIN32API AllocConsole (VOID);
475
476HANDLE WIN32API CreateConsoleScreenBuffer (DWORD dwDesiredAccess,
477 DWORD dwShareMode,
478 LPVOID lpSecurityAttributes,
479 DWORD dwFlags,
480 LPVOID lpScreenBufferData);
481
482BOOL WIN32API FillConsoleOutputAttribute (HANDLE hConsoleOutput,
483 WORD wAttribute,
484 DWORD nLength,
485 COORD dwWriteCoord,
486 LPDWORD lpNumberOfAttrsWritten);
487
488BOOL WIN32API FillConsoleOutputCharacterW (HANDLE hConsoleOutput,
489 WCHAR cCharacter,
490 DWORD nLength,
491 COORD dwWriteCoord,
492 LPDWORD lpNumberOfCharsWritten);
493
494BOOL WIN32API FillConsoleOutputCharacterA (HANDLE hConsoleOutput,
495 UCHAR cCharacter,
496 DWORD nLength,
497 COORD dwWriteCoord,
498 LPDWORD lpNumberOfCharsWritten);
499
500
501BOOL WIN32API FlushConsoleInputBuffer (HANDLE hConsoleInput);
502
503BOOL WIN32API FreeConsole (VOID);
504
505BOOL WIN32API GenerateConsoleCtrlEvent (DWORD dwCtrlEvent,
506 DWORD dwProcessGroupId);
507
508UINT WIN32API GetConsoleCP (VOID);
509
510BOOL WIN32API GetConsoleCursorInfo (HANDLE hConsoleOutput,
511 PCONSOLE_CURSOR_INFO lpConsoleCursorInfo);
512
513BOOL WIN32API GetConsoleMode (HANDLE hConsole,
514 LPDWORD lpMode);
515
516UINT WIN32API GetConsoleOutputCP (VOID);
517
518BOOL WIN32API GetConsoleScreenBufferInfo (HANDLE hConsoleOutput,
519 PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
520
521DWORD WIN32API GetConsoleTitleA (LPTSTR lpConsoleTitle,
522 DWORD nSize);
523
524DWORD WIN32API GetConsoleTitleW (LPTSTR lpConsoleTitle,
525 DWORD nSize);
526
527COORD WIN32API GetLargestConsoleWindowSize (HANDLE hConsoleOutput);
528
529BOOL WIN32API GetNumberOfConsoleInputEvents (HANDLE hConsoleInput,
530 LPDWORD lpNumberOfEvents);
531
532BOOL WIN32API GetNumberOfConsoleMouseButtons(LPDWORD lpcNumberOfMouseButtons);
533
534BOOL WIN32API PeekConsoleInputA (HANDLE hConsoleInput,
535 PINPUT_RECORD pirBuffer,
536 DWORD cInRecords,
537 LPDWORD lpcRead);
538
539BOOL WIN32API PeekConsoleInputW (HANDLE hConsoleInput,
540 PINPUT_RECORD pirBuffer,
541 DWORD cInRecords,
542 LPDWORD lpcRead);
543
544BOOL WIN32API ReadConsoleA (HANDLE hConsoleInput,
545 LPVOID lpvBuffer,
546 DWORD cchToRead,
547 LPDWORD lpcchRead,
548 LPVOID lpvReserved);
549
550BOOL WIN32API ReadConsoleInputA (HANDLE hConsoleInput,
551 PINPUT_RECORD pirBuffer,
552 DWORD cInRecords,
553 LPDWORD lpcRead);
554
555BOOL WIN32API ReadConsoleInputW (HANDLE hConsoleInput,
556 PINPUT_RECORD pirBuffer,
557 DWORD cInRecords,
558 LPDWORD lpcRead);
559
560BOOL WIN32API ReadConsoleOutputA (HANDLE hConsoleOutput,
561 PCHAR_INFO pchiDestBuffer,
562 COORD coordDestBufferSize,
563 COORD coordDestBufferCoord,
564 PSMALL_RECT psrctSourceRect);
565
566BOOL WIN32API ReadConsoleOutputW (HANDLE hConsoleOutput,
567 PCHAR_INFO pchiDestBuffer,
568 COORD coordDestBufferSize,
569 COORD coordDestBufferCoord,
570 PSMALL_RECT psrctSourceRect);
571
572BOOL WIN32API ReadConsoleOutputAttribute (HANDLE hConsoleOutput,
573 LPWORD lpwAttribute,
574 DWORD cReadCells,
575 COORD coordReadCoord,
576 LPDWORD lpcNumberRead);
577
578BOOL WIN32API ReadConsoleOutputCharacter (HANDLE hConsoleOutput,
579 LPTSTR lpReadBuffer,
580 DWORD cchRead,
581 COORD coordReadCoord,
582 LPDWORD lpcNumberRead);
583
584BOOL WIN32API ScrollConsoleScreenBufferA (HANDLE hConsoleOutput,
585 PSMALL_RECT psrctSourceRect,
586 PSMALL_RECT psrctClipRect,
587 COORD coordDestOrigin,
588 PCHAR_INFO pchiFill);
589
590BOOL WIN32API ScrollConsoleScreenBufferW (HANDLE hConsoleOutput,
591 PSMALL_RECT psrctSourceRect,
592 PSMALL_RECT psrctClipRect,
593 COORD coordDestOrigin,
594 PCHAR_INFO pchiFill);
595
596BOOL WIN32API SetConsoleActiveScreenBuffer (HANDLE hConsoleOutput);
597
598BOOL WIN32API SetConsoleCP (UINT IDCodePage);
599
600BOOL WIN32API SetConsoleCtrlHandler (PHANDLER_ROUTINE pHandlerRoutine,
601 BOOL fAdd);
602
603BOOL WIN32API SetConsoleCursorInfo (HANDLE hConsoleOutput,
604 PCONSOLE_CURSOR_INFO lpConsoleCursorInfo);
605
606BOOL WIN32API SetConsoleCursorPosition (HANDLE hConsoleOutput,
607 COORD coordCursor);
608
609BOOL WIN32API SetConsoleMode (HANDLE hConsole,
610 DWORD fdwMode);
611
612BOOL WIN32API SetConsoleOutputCP (UINT IDCodePage);
613
614BOOL WIN32API SetConsoleScreenBufferSize (HANDLE hConsoleOutput,
615 COORD coordSize);
616
617BOOL WIN32API SetConsoleTextAttribute (HANDLE hConsoleOutput,
618 WORD wAttr);
619
620BOOL WIN32API SetConsoleTitleA (LPTSTR lpszTitle);
621
622BOOL WIN32API SetConsoleTitleW (LPTSTR lpszTitle);
623
624BOOL WIN32API SetConsoleWindowInfo (HANDLE hConsoleOutput,
625 BOOL fAbsolute,
626 PSMALL_RECT psrctWindowRect);
627
628BOOL WIN32API WriteConsoleA (HANDLE hConsoleOutput,
629 CONST VOID* lpvBuffer,
630 DWORD cchToWrite,
631 LPDWORD lpcchWritten,
632 LPVOID lpvReserved);
633
634BOOL WIN32API WriteConsoleInputA (HANDLE hConsoleInput,
635 PINPUT_RECORD pirBuffer,
636 DWORD cInRecords,
637 LPDWORD lpcWritten);
638
639BOOL WIN32API WriteConsoleInputW (HANDLE hConsoleInput,
640 PINPUT_RECORD pirBuffer,
641 DWORD cInRecords,
642 LPDWORD lpcWritten);
643
644BOOL WIN32API WriteConsoleOutputA (HANDLE hConsoleOutput,
645 PCHAR_INFO pchiSrcBuffer,
646 COORD coordSrcBufferSize,
647 COORD coordSrcBufferCoord,
648 PSMALL_RECT psrctDestRect);
649
650BOOL WIN32API WriteConsoleOutputW (HANDLE hConsoleOutput,
651 PCHAR_INFO pchiSrcBuffer,
652 COORD coordSrcBufferSize,
653 COORD coordSrcBufferCoord,
654 PSMALL_RECT psrctDestRect);
655
656BOOL WIN32API WriteConsoleOutputAttribute (HANDLE hConsoleOutput,
657 LPWORD lpwAttribute,
658 DWORD cWriteCells,
659 COORD coordWriteCoord,
660 LPDWORD lpcNumberWritten);
661
662BOOL WIN32API WriteConsoleOutputCharacterA (HANDLE hConsoleOutput,
663 LPTSTR lpWriteBuffer,
664 DWORD cchWrite,
665 COORD coordWriteCoord,
666 LPDWORD lpcWritten);
667
668BOOL WIN32API WriteConsoleOutputCharacterW (HANDLE hConsoleOutput,
669 LPTSTR lpWriteBuffer,
670 DWORD cchWrite,
671 COORD coordWriteCoord,
672 LPDWORD lpcWritten);
673
674
675#endif // _OS2WIN_H
676
677#ifdef __cplusplus
678 }
679#endif
680
681#endif /* _CONSOLESUBSYSTEM_H_ */
Note: See TracBrowser for help on using the repository browser.