ReactOS  0.4.14-dev-50-g13bb5e2
green.h
Go to the documentation of this file.
1 #ifndef __GREEN_H__
2 #define __GREEN_H__
3 
4 #include <ntddk.h>
5 #include <ntifs.h>
6 #include <ntndk.h>
7 #include <windef.h>
8 #define WINBASEAPI
10 #include <ntddser.h>
11 #include <kbdmou.h>
12 #include <wincon.h>
13 #include <drivers/blue/ntddblue.h>
14 
15 #define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE 1
16 #define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING 2
17 
18 #define INFINITE -1
19 #define KEYBOARD_BUFFER_SIZE 100
20 
21 typedef enum
22 {
31 
32 typedef struct _COMMON_DEVICE_EXTENSION
33 {
36 
37 /* For PassThroughFDO devices */
39 {
43 
44 /* For KeyboardFDO devices */
46 {
49 
53 
58 
59 /* For ScreenFDO devices */
61 {
64 
65  PUCHAR VideoMemory; /* Pointer to video memory */
66  USHORT CharAttribute; /* Current color attribute */
68  UCHAR ScanLines; /* Height of a text line */
69  UCHAR Rows; /* Number of rows */
70  UCHAR Columns; /* Number of columns */
72 
73  ULONG LogicalOffset; /* Position of the cursor */
74 
79 
80 /* For GreenFDO devices */
82 {
85 
88 
94 
96 {
98 
102 
106 
107 /************************************ createclose.c */
108 
109 NTSTATUS
112  IN PIRP Irp);
113 
114 NTSTATUS
115 GreenClose(
117  IN PIRP Irp);
118 
119 /************************************ dispatch.c */
120 
124  IN PIRP Irp);
125 
126 /************************************ keyboard.c */
127 
128 NTSTATUS
132 
133 NTSTATUS
136  IN PIRP Irp);
137 
138 /************************************ misc.c */
139 
140 NTSTATUS
143  IN ULONG CtlCode,
145  IN ULONG InputBufferSize,
147  IN OUT PULONG OutputBufferSize);
148 
149 NTSTATUS
153 
154 /************************************ pnp.c */
155 
160 
161 NTSTATUS
162 GreenPnp(
164  IN PIRP Irp);
165 
166 /************************************ power.c */
167 
168 NTSTATUS
169 GreenPower(
171  IN PIRP Irp);
172 
173 /************************************ screen.c */
174 
175 NTSTATUS
179 
180 NTSTATUS
183  IN PIRP Irp);
184 
185 NTSTATUS
188  IN PIRP Irp);
189 
190 /************************************ green.c */
191 
192 NTSTATUS
194  IN ULONG Flags,
197 
198 #endif
NTSTATUS ReadRegistryEntries(IN PUNICODE_STRING RegistryPath, IN PGREEN_DRIVER_EXTENSION DriverExtension)
Definition: misc.c:63
#define IN
Definition: typedefs.h:38
UNICODE_STRING AttachedDeviceName
Definition: green.h:99
NTSTATUS GreenDeviceIoControl(IN PDEVICE_OBJECT DeviceObject, IN ULONG CtlCode, IN PVOID InputBuffer OPTIONAL, IN ULONG InputBufferSize, IN OUT PVOID OutputBuffer OPTIONAL, IN OUT PULONG OutputBufferSize)
Definition: misc.c:15
NTSTATUS ScreenAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT Pdo)
Definition: screen.c:111
_In_ PDEVICE_OBJECT Pdo
Definition: classpnp.h:301
ULONG InputDataCount[2]
Definition: green.h:55
struct _GREEN_DRIVER_EXTENSION * PGREEN_DRIVER_EXTENSION
_In_ PIRP Irp
Definition: csq.h:116
unsigned char * PUCHAR
Definition: retypes.h:3
CONNECT_DATA ClassInformation
Definition: green.h:50
LONG NTSTATUS
Definition: precomp.h:26
struct _KEYBOARD_DEVICE_EXTENSION * PKEYBOARD_DEVICE_EXTENSION
ULONG SendBufferPosition
Definition: green.h:76
struct _COMMON_DEVICE_EXTENSION * PCOMMON_DEVICE_EXTENSION
UNICODE_STRING RegistryPath
Definition: green.h:97
struct _SCREEN_DEVICE_EXTENSION * PSCREEN_DEVICE_EXTENSION
CHAR InputBuffer[80]
Definition: conmgr.c:33
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
Definition: green.h:23
NTSTATUS GreenClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: createclose.c:28
struct _COMMON_FDO_DEVICE_EXTENSION * PCOMMON_FDO_DEVICE_EXTENSION
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1869
NTSTATUS GreenDuplicateUnicodeString(IN ULONG Flags, IN PCUNICODE_STRING SourceString, OUT PUNICODE_STRING DestinationString)
Definition: green.c:71
GREEN_DEVICE_TYPE Type
Definition: green.h:40
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
UCHAR SendBuffer[1024]
Definition: green.h:75
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
PDEVICE_OBJECT ScreenPdo
Definition: green.h:90
struct _GREEN_DEVICE_EXTENSION * PGREEN_DEVICE_EXTENSION
PDEVICE_OBJECT KeyboardFdo
Definition: green.h:91
NTSTATUS NTAPI GreenAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT Pdo)
Definition: pnp.c:179
struct _KEYBOARD_DEVICE_EXTENSION KEYBOARD_DEVICE_EXTENSION
PDEVICE_OBJECT Serial
Definition: green.h:84
Definition: green.h:26
GREEN_DEVICE_TYPE Type
Definition: green.h:34
NTSTATUS ScreenWrite(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: screen.c:265
unsigned char UCHAR
Definition: xmlstorage.h:181
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1869
struct _GREEN_DEVICE_EXTENSION GREEN_DEVICE_EXTENSION
Definition: ketypes.h:687
PDEVICE_OBJECT KeyboardPdo
Definition: green.h:89
NTSTATUS NTAPI GreenDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:15
PPCI_DRIVER_EXTENSION DriverExtension
Definition: pci.c:41
NTSTATUS ScreenDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: screen.c:408
#define KEYBOARD_BUFFER_SIZE
Definition: green.h:19
KEYBOARD_INPUT_DATA KeyboardInputData[2][KEYBOARD_BUFFER_SIZE]
Definition: green.h:56
PDEVICE_OBJECT Green
Definition: green.h:48
SERIAL_LINE_CONTROL LineControl
Definition: green.h:86
COMMON_FDO_DEVICE_EXTENSION Common
Definition: green.h:47
NTSTATUS GreenPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: power.c:15
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
PDEVICE_OBJECT GreenMainDO
Definition: green.h:103
NTSTATUS KeyboardAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT Pdo)
Definition: keyboard.c:109
unsigned short USHORT
Definition: pedump.c:61
PDEVICE_OBJECT PreviousBlue
Definition: green.h:77
GREEN_DEVICE_TYPE
Definition: green.h:21
NTSTATUS KeyboardInternalDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: keyboard.c:272
NTSTATUS GreenPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pnp.c:408
unsigned int * PULONG
Definition: retypes.h:1
SERIAL_TIMEOUTS Timeouts
Definition: green.h:87
COMMON_FDO_DEVICE_EXTENSION Common
Definition: green.h:83
struct _COMMON_FDO_DEVICE_EXTENSION COMMON_FDO_DEVICE_EXTENSION
#define OUT
Definition: typedefs.h:39
struct _COMMON_DEVICE_EXTENSION COMMON_DEVICE_EXTENSION
PDEVICE_OBJECT Green
Definition: green.h:63
struct _GREEN_DRIVER_EXTENSION GREEN_DRIVER_EXTENSION
unsigned int ULONG
Definition: retypes.h:1
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
PDEVICE_OBJECT ScreenFdo
Definition: green.h:92
COMMON_FDO_DEVICE_EXTENSION Common
Definition: green.h:62
PDEVICE_OBJECT LowerDevice
Definition: green.h:41
struct _SECURITY_ATTRIBUTES * PSECURITY_ATTRIBUTES
Definition: green.h:9
struct _SCREEN_DEVICE_EXTENSION SCREEN_DEVICE_EXTENSION
NTSTATUS GreenCreate(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: createclose.c:15
PDEVICE_OBJECT LowerDevice
Definition: green.h:104
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68