ReactOS 0.4.16-dev-306-g647d351
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>
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
21typedef enum
22{
31
32typedef 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
112 IN PIRP Irp);
113
117 IN PIRP Irp);
118
119/************************************ dispatch.c */
120
124 IN PIRP Irp);
125
126/************************************ keyboard.c */
127
132
136 IN PIRP Irp);
137
138/************************************ misc.c */
139
143 IN ULONG CtlCode,
145 IN ULONG InputBufferSize,
147 IN OUT PULONG OutputBufferSize);
148
153
154/************************************ pnp.c */
155
160
164 IN PIRP Irp);
165
166/************************************ power.c */
167
171 IN PIRP Irp);
172
173/************************************ screen.c */
174
179
183 IN PIRP Irp);
184
188 IN PIRP Irp);
189
190/************************************ green.c */
191
194 IN ULONG Flags,
197
198#endif
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
NTSTATUS NTAPI GreenDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:15
NTSTATUS GreenDuplicateUnicodeString(IN ULONG Flags, IN PCUNICODE_STRING SourceString, OUT PUNICODE_STRING DestinationString)
Definition: green.c:71
struct _GREEN_DEVICE_EXTENSION GREEN_DEVICE_EXTENSION
GREEN_DEVICE_TYPE
Definition: green.h:22
@ KeyboardFDO
Definition: green.h:28
@ KeyboardPDO
Definition: green.h:25
@ ScreenPDO
Definition: green.h:24
@ GreenPDO
Definition: green.h:23
@ GreenFDO
Definition: green.h:26
@ PassThroughFDO
Definition: green.h:29
@ ScreenFDO
Definition: green.h:27
struct _SCREEN_DEVICE_EXTENSION SCREEN_DEVICE_EXTENSION
NTSTATUS NTAPI GreenAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT Pdo)
Definition: pnp.c:179
#define KEYBOARD_BUFFER_SIZE
Definition: green.h:19
struct _SECURITY_ATTRIBUTES * PSECURITY_ATTRIBUTES
Definition: green.h:9
struct _GREEN_DEVICE_EXTENSION * PGREEN_DEVICE_EXTENSION
struct _GREEN_DRIVER_EXTENSION * PGREEN_DRIVER_EXTENSION
NTSTATUS KeyboardAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT Pdo)
Definition: keyboard.c:109
struct _COMMON_FDO_DEVICE_EXTENSION * PCOMMON_FDO_DEVICE_EXTENSION
NTSTATUS ReadRegistryEntries(IN PUNICODE_STRING RegistryPath, IN PGREEN_DRIVER_EXTENSION DriverExtension)
Definition: misc.c:63
NTSTATUS ScreenWrite(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: screen.c:265
struct _COMMON_FDO_DEVICE_EXTENSION COMMON_FDO_DEVICE_EXTENSION
NTSTATUS GreenCreate(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: createclose.c:15
struct _GREEN_DRIVER_EXTENSION GREEN_DRIVER_EXTENSION
struct _KEYBOARD_DEVICE_EXTENSION KEYBOARD_DEVICE_EXTENSION
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
struct _COMMON_DEVICE_EXTENSION COMMON_DEVICE_EXTENSION
NTSTATUS KeyboardInternalDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: keyboard.c:272
NTSTATUS GreenPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: power.c:15
NTSTATUS ScreenAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT Pdo)
Definition: screen.c:111
struct _KEYBOARD_DEVICE_EXTENSION * PKEYBOARD_DEVICE_EXTENSION
NTSTATUS GreenPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pnp.c:408
NTSTATUS ScreenDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: screen.c:408
NTSTATUS GreenClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: createclose.c:28
struct _COMMON_DEVICE_EXTENSION * PCOMMON_DEVICE_EXTENSION
struct _SCREEN_DEVICE_EXTENSION * PSCREEN_DEVICE_EXTENSION
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1922
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1921
PPCI_DRIVER_EXTENSION DriverExtension
Definition: pci.c:31
unsigned short USHORT
Definition: pedump.c:61
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
GREEN_DEVICE_TYPE Type
Definition: green.h:34
GREEN_DEVICE_TYPE Type
Definition: green.h:40
PDEVICE_OBJECT LowerDevice
Definition: green.h:41
SERIAL_LINE_CONTROL LineControl
Definition: green.h:86
PDEVICE_OBJECT Serial
Definition: green.h:84
COMMON_FDO_DEVICE_EXTENSION Common
Definition: green.h:83
PDEVICE_OBJECT ScreenFdo
Definition: green.h:92
PDEVICE_OBJECT KeyboardPdo
Definition: green.h:89
PDEVICE_OBJECT ScreenPdo
Definition: green.h:90
SERIAL_TIMEOUTS Timeouts
Definition: green.h:87
PDEVICE_OBJECT KeyboardFdo
Definition: green.h:91
UNICODE_STRING AttachedDeviceName
Definition: green.h:99
UNICODE_STRING RegistryPath
Definition: green.h:97
PDEVICE_OBJECT LowerDevice
Definition: green.h:104
PDEVICE_OBJECT GreenMainDO
Definition: green.h:103
Definition: ketypes.h:699
COMMON_FDO_DEVICE_EXTENSION Common
Definition: green.h:47
ULONG InputDataCount[2]
Definition: green.h:55
CONNECT_DATA ClassInformation
Definition: green.h:50
KEYBOARD_INPUT_DATA KeyboardInputData[2][KEYBOARD_BUFFER_SIZE]
Definition: green.h:56
PDEVICE_OBJECT Green
Definition: green.h:48
PDEVICE_OBJECT Green
Definition: green.h:63
COMMON_FDO_DEVICE_EXTENSION Common
Definition: green.h:62
ULONG SendBufferPosition
Definition: green.h:76
PDEVICE_OBJECT PreviousBlue
Definition: green.h:77
UCHAR SendBuffer[1024]
Definition: green.h:75
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:953
WDF_EXTERN_C_START typedef _Must_inspect_result_ _In_ WDFDRIVER _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PDEVICE_OBJECT _In_opt_ PDEVICE_OBJECT _In_opt_ PDEVICE_OBJECT Pdo
Definition: wdfminiport.h:72
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
unsigned char UCHAR
Definition: xmlstorage.h:181