Browse Source

missign cursorinfo

Thomas la Cour 1 year ago
parent
commit
58ab6e5f94
1 changed files with 15 additions and 0 deletions
  1. 15 0
      core/sys/windows/user32.odin

+ 15 - 0
core/sys/windows/user32.odin

@@ -287,6 +287,8 @@ foreign user32 {
 	CreateRectRgnIndirect :: proc(lprect: ^RECT) -> HRGN ---
 	GetSystemMetricsForDpi :: proc(nIndex: int, dpi: UINT) -> int ---
 
+	GetCursorInfo :: proc(pci: PCURSORINFO) -> BOOL ---
+
 	GetSystemMenu :: proc(hWnd: HWND, bRevert: BOOL) -> HMENU ---
 	EnableMenuItem :: proc(hMenu: HMENU, uIDEnableItem: UINT, uEnable: UINT) -> BOOL ---
 	MenuItemFromPoint :: proc(hWnd: HWND, hMenu: HMENU, ptScreen: POINT) -> INT ---
@@ -371,6 +373,10 @@ GET_XBUTTON_WPARAM :: #force_inline proc "contextless" (wParam: WPARAM) -> WORD
 	return HIWORD(cast(DWORD)wParam)
 }
 
+GET_RAWINPUT_CODE_WPARAM :: #force_inline proc "contextless" (wParam: WPARAM) -> BYTE {
+	return BYTE(wParam) & 0xFF
+}
+
 MAKEINTRESOURCEW :: #force_inline proc "contextless" (#any_int i: int) -> LPWSTR {
 	return cast(LPWSTR)uintptr(WORD(i))
 }
@@ -569,6 +575,15 @@ WINDOWINFO :: struct {
 }
 PWINDOWINFO :: ^WINDOWINFO
 
+CURSORINFO :: struct {
+	cbSize: DWORD,
+	flags: DWORD,
+	hCursor: HCURSOR,
+	ptScreenPos: POINT,
+}
+PCURSORINFO :: ^CURSORINFO
+
+
 DRAWTEXTPARAMS :: struct {
 	cbSize: UINT,
 	iTabLength: INT,