diff --git a/reactos/include/ddk/ntddbeep.h b/reactos/include/ddk/ntddbeep.h index 1fa4630dfd3..00798d475b9 100644 --- a/reactos/include/ddk/ntddbeep.h +++ b/reactos/include/ddk/ntddbeep.h @@ -3,7 +3,7 @@ * * Beep device IOCTL interface * - * This file is part of the MinGW package. + * This file is part of the w32api package. * * Contributors: * Created by Casper S. Hornstrup @@ -15,7 +15,7 @@ * * This code is distributed in the hope that it will be useful but * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAMED. This includes but is not limited to warranties of + * DISCLAIMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * */ @@ -33,10 +33,16 @@ extern "C" { #pragma pack(push,4) +#include "ntddk.h" + + +#define DD_BEEP_DEVICE_NAME "\\Device\\Beep" +#define DD_BEEP_DEVICE_NAME_U L"\\Device\\Beep" + #define IOCTL_BEEP_SET \ CTL_CODE(FILE_DEVICE_BEEP,0,METHOD_BUFFERED,FILE_ANY_ACCESS) -typedef struct tagBEEP_SET_PARAMETERS { +typedef struct _BEEP_SET_PARAMETERS { ULONG Frequency; ULONG Duration; } BEEP_SET_PARAMETERS, *PBEEP_SET_PARAMETERS; diff --git a/reactos/include/ddk/ntddk.h b/reactos/include/ddk/ntddk.h index dc38c548b00..d5bd9becc4e 100644 --- a/reactos/include/ddk/ntddk.h +++ b/reactos/include/ddk/ntddk.h @@ -1,4 +1,4 @@ -/* $Id: ntddk.h,v 1.36 2003/06/07 10:14:39 chorns Exp $ +/* $Id: ntddk.h,v 1.37 2003/10/17 05:36:39 robd Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -19,8 +19,7 @@ #define __NTDDK_H #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif /* INCLUDES ***************************************************************/ @@ -86,7 +85,7 @@ extern "C" #endif /*__NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ */ #ifdef __cplusplus -}; +} #endif #endif /* __NTDDK_H */ diff --git a/reactos/include/ddk/ntddkbd.h b/reactos/include/ddk/ntddkbd.h index 328045e5eee..002c33f189f 100644 --- a/reactos/include/ddk/ntddkbd.h +++ b/reactos/include/ddk/ntddkbd.h @@ -3,7 +3,7 @@ * * Keyboard IOCTL interface * - * This file is part of the MinGW package. + * This file is part of the w32api package. * * Contributors: * Created by Casper S. Hornstrup @@ -15,7 +15,7 @@ * * This code is distributed in the hope that it will be useful but * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAMED. This includes but is not limited to warranties of + * DISCLAIMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * */ @@ -33,23 +33,109 @@ extern "C" { #pragma pack(push,4) +#include "ntddk.h" + + +#define DD_KEYBOARD_DEVICE_NAME "\\Device\\KeyboardClass" +#define DD_KEYBOARD_DEVICE_NAME_U L"\\Device\\KeyboardClass" + +#define IOCTL_KEYBOARD_QUERY_ATTRIBUTES \ + CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS) + +#define IOCTL_KEYBOARD_QUERY_INDICATORS \ + CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS) + +#define IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION \ + CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0020, METHOD_BUFFERED, FILE_ANY_ACCESS) + +#define IOCTL_KEYBOARD_QUERY_TYPEMATIC \ + CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0008, METHOD_BUFFERED, FILE_ANY_ACCESS) + +#define IOCTL_KEYBOARD_SET_TYPEMATIC \ + CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0001, METHOD_BUFFERED, FILE_ANY_ACCESS) + +#define IOCTL_KEYBOARD_SET_INDICATORS \ + CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0002, METHOD_BUFFERED, FILE_ANY_ACCESS) + + +//DEFINE_GUID(GUID_DEVINTERFACE_KEYBOARD, \ +// 0x884b96c3, 0x56ef, 0x11d1, 0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd); + +#define KEYBOARD_ERROR_VALUE_BASE 10000 + +/* KEYBOARD_INPUT_DATA.MakeCode constants */ +#define KEYBOARD_OVERRUN_MAKE_CODE 0xFF + +/* KEYBOARD_INPUT_DATA.Flags constants */ +#define KEY_MAKE 0 +#define KEY_BREAK 1 +#define KEY_E0 2 +#define KEY_E1 4 -typedef struct _KEYBOARD_INPUT_DATA { /* * Unit number. E.g., for \Device\KeyboardPort0 the unit is '0', * for \Device\KeyboardPort1 the unit is '1', and so on. */ - +typedef struct _KEYBOARD_INPUT_DATA { USHORT UnitId; USHORT MakeCode; USHORT Flags; USHORT Reserved; ULONG ExtraInformation; - } KEYBOARD_INPUT_DATA, *PKEYBOARD_INPUT_DATA; +typedef struct _KEYBOARD_TYPEMATIC_PARAMETERS { + USHORT UnitId; + USHORT Rate; + USHORT Delay; +} KEYBOARD_TYPEMATIC_PARAMETERS, *PKEYBOARD_TYPEMATIC_PARAMETERS; + +typedef struct _KEYBOARD_ID { + UCHAR Type; + UCHAR Subtype; +} KEYBOARD_ID, *PKEYBOARD_ID; + +#define ENHANCED_KEYBOARD(Id) ((Id).Type == 2 || (Id).Type == 4 || FAREAST_KEYBOARD(Id)) +#define FAREAST_KEYBOARD(Id) ((Id).Type == 7 || (Id).Type == 8) + +typedef struct _KEYBOARD_INDICATOR_PARAMETERS { + USHORT UnitId; + USHORT LedFlags; +} KEYBOARD_INDICATOR_PARAMETERS, *PKEYBOARD_INDICATOR_PARAMETERS; + +typedef struct _INDICATOR_LIST { + USHORT MakeCode; + USHORT IndicatorFlags; +} INDICATOR_LIST, *PINDICATOR_LIST; + +typedef struct _KEYBOARD_INDICATOR_TRANSLATION { + USHORT NumberOfIndicatorKeys; + INDICATOR_LIST IndicatorList[1]; +} KEYBOARD_INDICATOR_TRANSLATION, *PKEYBOARD_INDICATOR_TRANSLATION; + +typedef struct _KEYBOARD_ATTRIBUTES { + KEYBOARD_ID KeyboardIdentifier; + USHORT KeyboardMode; + USHORT NumberOfFunctionKeys; + USHORT NumberOfIndicators; + USHORT NumberOfKeysTotal; + ULONG InputDataQueueLength; + KEYBOARD_TYPEMATIC_PARAMETERS KeyRepeatMinimum; + KEYBOARD_TYPEMATIC_PARAMETERS KeyRepeatMaximum; +} KEYBOARD_ATTRIBUTES, *PKEYBOARD_ATTRIBUTES; + +typedef struct _KEYBOARD_UNIT_ID_PARAMETER { + USHORT UnitId; +} KEYBOARD_UNIT_ID_PARAMETER, *PKEYBOARD_UNIT_ID_PARAMETER; + +typedef struct _KEYBOARD_IME_STATUS { + USHORT UnitId; + ULONG ImeOpen; + ULONG ImeConvMode; +} KEYBOARD_IME_STATUS, *PKEYBOARD_IME_STATUS; + #pragma pack(pop) #ifdef __cplusplus diff --git a/reactos/include/ddk/ntddmou.h b/reactos/include/ddk/ntddmou.h index ff2e945da7f..013d6942a1a 100644 --- a/reactos/include/ddk/ntddmou.h +++ b/reactos/include/ddk/ntddmou.h @@ -1,4 +1,40 @@ -/* Mouse definitions common to both mouse class and port drivers */ +/* + * ntddmou.h + * + * Mouse device IOCTL interface. + * + * This file is part of the w32api package. + * + * Contributors: + * Created by Casper S. Hornstrup + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#ifndef __NTDDMOU_H +#define __NTDDMOU_H + +#if __GNUC__ >=3 +#pragma GCC system_header +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#pragma pack(push,4) + +#include "ntddk.h" + #define DD_MOUSE_DEVICE_NAME "\\Device\\PointerClass" #define DD_MOUSE_DEVICE_NAME_U L"\\Device\\PointerClass" @@ -11,38 +47,40 @@ #define IOCTL_INTERNAL_MOUSE_ENABLE CTL_CODE(FILE_DEVICE_MOUSE, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS) #define IOCTL_INTERNAL_MOUSE_DISABLE CTL_CODE(FILE_DEVICE_MOUSE, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS) -#define IOCTL_MOUSE_QUERY_ATTRIBUTES CTL_CODE(FILE_DEVICE_MOUSE, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_MOUSE_QUERY_ATTRIBUTES \ + CTL_CODE(FILE_DEVICE_MOUSE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define MOUSE_BUTTON_1_DOWN 0x0001 -#define MOUSE_BUTTON_1_UP 0x0002 -#define MOUSE_BUTTON_2_DOWN 0x0004 -#define MOUSE_BUTTON_2_UP 0x0008 -#define MOUSE_BUTTON_3_DOWN 0x0010 -#define MOUSE_BUTTON_3_UP 0x0020 -#define MOUSE_BUTTON_4_DOWN 0x0040 -#define MOUSE_BUTTON_4_UP 0x0080 -#define MOUSE_BUTTON_5_DOWN 0x0100 -#define MOUSE_BUTTON_5_UP 0x0200 -#define MOUSE_WHEEL 0x0400 +//DEFINE_GUID(GUID_DEVINTERFACE_MOUSE, \ +// 0x378de44c, 0x56ef, 0x11d1, 0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd); -#define MOUSE_LEFT_BUTTON_DOWN MOUSE_BUTTON_1_DOWN -#define MOUSE_LEFT_BUTTON_UP MOUSE_BUTTON_1_UP -#define MOUSE_RIGHT_BUTTON_DOWN MOUSE_BUTTON_2_DOWN -#define MOUSE_RIGHT_BUTTON_UP MOUSE_BUTTON_2_UP -#define MOUSE_MIDDLE_BUTTON_DOWN MOUSE_BUTTON_3_DOWN -#define MOUSE_MIDDLE_BUTTON_UP MOUSE_BUTTON_3_UP +#define MOUSE_ERROR_VALUE_BASE 20000 -#define MOUSE_SERIAL_HARDWARE 0x0004 -#define WHEELMOUSE_SERIAL_HARDWARE 0x0040 +/* MOUSE_INPUT_DATA.ButtonFlags constants */ +#define MOUSE_LEFT_BUTTON_DOWN 0x0001 +#define MOUSE_LEFT_BUTTON_UP 0x0002 +#define MOUSE_RIGHT_BUTTON_DOWN 0x0004 +#define MOUSE_RIGHT_BUTTON_UP 0x0008 +#define MOUSE_MIDDLE_BUTTON_DOWN 0x0010 +#define MOUSE_MIDDLE_BUTTON_UP 0x0020 +#define MOUSE_BUTTON_4_DOWN 0x0040 +#define MOUSE_BUTTON_4_UP 0x0080 +#define MOUSE_BUTTON_5_DOWN 0x0100 +#define MOUSE_BUTTON_5_UP 0x0200 +#define MOUSE_WHEEL 0x0400 -typedef struct _MOUSE_ATTRIBUTES { - USHORT MouseIdentifier; - USHORT NumberOfButtons; - USHORT SampleRate; - ULONG InputDataQueueLength; -} MOUSE_ATTRIBUTES, *PMOUSE_ATTRIBUTES; +#define MOUSE_BUTTON_1_DOWN MOUSE_LEFT_BUTTON_DOWN +#define MOUSE_BUTTON_1_UP MOUSE_LEFT_BUTTON_UP +#define MOUSE_BUTTON_2_DOWN MOUSE_RIGHT_BUTTON_DOWN +#define MOUSE_BUTTON_2_UP MOUSE_RIGHT_BUTTON_UP +#define MOUSE_BUTTON_3_DOWN MOUSE_MIDDLE_BUTTON_DOWN +#define MOUSE_BUTTON_3_UP MOUSE_MIDDLE_BUTTON_UP + +/* MOUSE_INPUT_DATA.Flags constants */ +#define MOUSE_MOVE_RELATIVE 0 +#define MOUSE_MOVE_ABSOLUTE 1 +#define MOUSE_VIRTUAL_DESKTOP 0x02 +#define MOUSE_ATTRIBUTES_CHANGED 0x04 -/* Mouse input data structure */ typedef struct _MOUSE_INPUT_DATA { USHORT UnitId; USHORT Flags; @@ -59,6 +97,28 @@ typedef struct _MOUSE_INPUT_DATA { ULONG ExtraInformation; } MOUSE_INPUT_DATA, *PMOUSE_INPUT_DATA; +typedef struct _MOUSE_UNIT_ID_PARAMETER { + USHORT UnitId; +} MOUSE_UNIT_ID_PARAMETER, *PMOUSE_UNIT_ID_PARAMETER; + +/* MOUSE_ATTRIBUTES.MouseIdentifier constants */ +#define MOUSE_INPORT_HARDWARE 0x0001 +#define MOUSE_I8042_HARDWARE 0x0002 +#define MOUSE_SERIAL_HARDWARE 0x0004 +#define BALLPOINT_I8042_HARDWARE 0x0008 +#define BALLPOINT_SERIAL_HARDWARE 0x0010 +#define WHEELMOUSE_I8042_HARDWARE 0x0020 +#define WHEELMOUSE_SERIAL_HARDWARE 0x0040 +#define MOUSE_HID_HARDWARE 0x0080 +#define WHEELMOUSE_HID_HARDWARE 0x0100 + +typedef struct _MOUSE_ATTRIBUTES { + USHORT MouseIdentifier; + USHORT NumberOfButtons; + USHORT SampleRate; + ULONG InputDataQueueLength; +} MOUSE_ATTRIBUTES, *PMOUSE_ATTRIBUTES; + typedef struct _CLASS_INFORMATION { PDEVICE_OBJECT DeviceObject; PVOID CallBack; @@ -84,3 +144,10 @@ VOID IN ULONG SystemArgument2 ); +#pragma pack(pop) + +#ifdef __cplusplus +} +#endif + +#endif /* __NTDDMOU_H */ diff --git a/reactos/include/ddk/ntddser.h b/reactos/include/ddk/ntddser.h index 1d53db4bfbb..1be17241b11 100644 --- a/reactos/include/ddk/ntddser.h +++ b/reactos/include/ddk/ntddser.h @@ -3,7 +3,7 @@ * * Serial port driver interface * - * This file is part of the MinGW package. + * This file is part of the w32api package. * * Contributors: * Created by Casper S. Hornstrup @@ -15,7 +15,7 @@ * * This code is distributed in the hope that it will be useful but * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAMED. This includes but is not limited to warranties of + * DISCLAIMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * */