source: trunk/src/kernel32/conout.h@ 8706

Last change on this file since 8706 was 7549, checked in by sandervl, 24 years ago

preliminary changes for new overlapped io framework

File size: 3.7 KB
Line 
1/* $Id: conout.h,v 1.4 2001-12-05 14:15:58 sandervl 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
9#ifndef _CONSOLE_OUT_H_
10#define _CONSOLE_OUT_H_
11
12
13/*****************************************************************************
14 * Remark *
15 *****************************************************************************
16
17 */
18
19
20/*****************************************************************************
21 * Resources *
22 *****************************************************************************/
23
24
25/*****************************************************************************
26 * Includes *
27 *****************************************************************************/
28
29//#include <win32type.h>
30#include "handlemanager.h"
31#include "HMDevice.h"
32#include "Console2.h"
33
34/*****************************************************************************
35 * ConsoleOutput - redirects requests to the currently active buffer *
36 *****************************************************************************/
37
38class HMDeviceConsoleOutClass : public HMDeviceHandler
39{
40 protected:
41 HANDLE hConsoleBuffer; /* handle to the active console buffer */
42 PICONSOLEINPUT pConsoleInput; /* pointer to console input area */
43 PICONSOLEGLOBALS pConsoleGlobals; /* pointer to console global area */
44
45 public:
46 HMDeviceConsoleOutClass(LPCSTR lpDeviceName,
47 PICONSOLEINPUT piConsoleInput,
48 PICONSOLEGLOBALS piConsoleGlobals)
49 : HMDeviceHandler(lpDeviceName)
50 {
51 pConsoleInput = piConsoleInput; // save pointers to this data
52 pConsoleGlobals = piConsoleGlobals;
53 }
54
55 /* this is a handler method for calls to CreateFile() */
56 virtual DWORD CreateFile (LPCSTR lpFileName,
57 PHMHANDLEDATA pHMHandleData,
58 PVOID lpSecurityAttributes,
59 PHMHANDLEDATA pHMHandleDataTemplate);
60
61 /* this is a handler method for calls to GetFileType() */
62 virtual DWORD GetFileType (PHMHANDLEDATA pHMHandleData);
63
64 /* this is a handler method for calls to ReadFile() */
65 virtual BOOL ReadFile (PHMHANDLEDATA pHMHandleData,
66 LPCVOID lpBuffer,
67 DWORD nNumberOfBytesToRead,
68 LPDWORD lpNumberOfBytesRead,
69 LPOVERLAPPED lpOverlapped,
70 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
71
72 /* this is a handler method for calls to WriteFile() */
73 virtual BOOL WriteFile (PHMHANDLEDATA pHMHandleData,
74 LPCVOID lpBuffer,
75 DWORD nNumberOfBytesToWrite,
76 LPDWORD lpNumberOfBytesWritten,
77 LPOVERLAPPED lpOverlapped,
78 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
79
80
81 /* handling non-standard I/O */
82 virtual DWORD _DeviceRequest (PHMHANDLEDATA pHMHandleData,
83 ULONG ulRequestCode,
84 ULONG arg1,
85 ULONG arg2,
86 ULONG arg3,
87 ULONG arg4);
88
89};
90
91#endif /* _CONSOLE_OUT_H_ */
92
Note: See TracBrowser for help on using the repository browser.