core/sys/windows: added various procedures and constants related to the hid library

This commit is contained in:
IllusionMan1212
2024-05-07 21:18:25 +02:00
parent a37826e646
commit ad3675cdd6
3 changed files with 791 additions and 24 deletions
+19 -21
View File
@@ -356,9 +356,9 @@ RAWHID :: struct {
RAWMOUSE :: struct {
usFlags: USHORT,
DUMMYUNIONNAME: struct #raw_union {
using DUMMYUNIONNAME: struct #raw_union {
ulButtons: ULONG,
DUMMYSTRUCTNAME: struct {
using DUMMYSTRUCTNAME: struct {
usButtonFlags: USHORT,
usButtonData: USHORT,
},
@@ -434,7 +434,7 @@ RID_DEVICE_INFO_MOUSE :: struct {
RID_DEVICE_INFO :: struct {
cbSize: DWORD,
dwType: DWORD,
DUMMYUNIONNAME: struct #raw_union {
using DUMMYUNIONNAME: struct #raw_union {
mouse: RID_DEVICE_INFO_MOUSE,
keyboard: RID_DEVICE_INFO_KEYBOARD,
hid: RID_DEVICE_INFO_HID,
@@ -455,10 +455,21 @@ RIDEV_DEVNOTIFY :: 0x00002000
RID_HEADER :: 0x10000005
RID_INPUT :: 0x10000003
RIDI_PREPARSEDDATA :: 0x20000005
RIDI_DEVICENAME :: 0x20000007
RIDI_DEVICEINFO :: 0x2000000b
RIM_TYPEMOUSE :: 0
RIM_TYPEKEYBOARD :: 1
RIM_TYPEHID :: 2
RI_KEY_MAKE :: 0
RI_KEY_BREAK :: 1
RI_KEY_E0 :: 2
RI_KEY_E1 :: 4
RI_KEY_TERMSRV_SET_LED :: 8
RI_KEY_TERMSRV_SHADOW :: 0x10
MOUSE_MOVE_RELATIVE :: 0x00
MOUSE_MOVE_ABSOLUTE :: 0x01
MOUSE_VIRTUAL_DESKTOP :: 0x02
@@ -484,19 +495,6 @@ RI_MOUSE_BUTTON_5_UP :: 0x0200
RI_MOUSE_WHEEL :: 0x0400
RI_MOUSE_HWHEEL :: 0x0800
HID_USAGE_PAGE_GENERIC :: 0x01
HID_USAGE_PAGE_GAME :: 0x05
HID_USAGE_PAGE_LED :: 0x08
HID_USAGE_PAGE_BUTTON :: 0x09
HID_USAGE_GENERIC_POINTER :: 0x01
HID_USAGE_GENERIC_MOUSE :: 0x02
HID_USAGE_GENERIC_JOYSTICK :: 0x04
HID_USAGE_GENERIC_GAMEPAD :: 0x05
HID_USAGE_GENERIC_KEYBOARD :: 0x06
HID_USAGE_GENERIC_KEYPAD :: 0x07
HID_USAGE_GENERIC_MULTI_AXIS_CONTROLLER :: 0x08
WINDOWPLACEMENT :: struct {
length: UINT,
flags: UINT,
@@ -521,11 +519,11 @@ WINDOWINFO :: struct {
PWINDOWINFO :: ^WINDOWINFO
DRAWTEXTPARAMS :: struct {
cbSize : UINT ,
iTabLength: int ,
iLeftMargin: int ,
iRightMargin: int ,
uiLengthDrawn: UINT ,
cbSize: UINT,
iTabLength: int,
iLeftMargin: int,
iRightMargin: int,
uiLengthDrawn: UINT,
}
PDRAWTEXTPARAMS :: ^DRAWTEXTPARAMS