mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-20 05:20:28 +00:00
sys/windows: add several functions and constants
This commit is contained in:
@@ -34,6 +34,7 @@ HBITMAP :: distinct HANDLE
|
||||
HGLOBAL :: distinct HANDLE
|
||||
HHOOK :: distinct HANDLE
|
||||
HKEY :: distinct HANDLE
|
||||
HDESK :: distinct HANDLE
|
||||
BOOL :: distinct b32
|
||||
BYTE :: distinct u8
|
||||
BOOLEAN :: distinct b8
|
||||
@@ -415,6 +416,40 @@ REG_RESOURCE_REQUIREMENTS_LIST :: 10
|
||||
REG_QWORD :: 11
|
||||
REG_QWORD_LITTLE_ENDIAN :: 11
|
||||
|
||||
BSMINFO :: struct {
|
||||
cbSize: UINT,
|
||||
hdesk: HDESK,
|
||||
hwnd: HWND,
|
||||
luid: LUID,
|
||||
}
|
||||
PBSMINFO :: ^BSMINFO
|
||||
|
||||
// Broadcast Special Message Recipient list
|
||||
BSM_ALLCOMPONENTS :: 0x00000000
|
||||
BSM_VXDS :: 0x00000001
|
||||
BSM_NETDRIVER :: 0x00000002
|
||||
BSM_INSTALLABLEDRIVERS :: 0x00000004
|
||||
BSM_APPLICATIONS :: 0x00000008
|
||||
BSM_ALLDESKTOPS :: 0x00000010
|
||||
|
||||
// Broadcast Special Message Flags
|
||||
BSF_QUERY :: 0x00000001
|
||||
BSF_IGNORECURRENTTASK :: 0x00000002
|
||||
BSF_FLUSHDISK :: 0x00000004
|
||||
BSF_NOHANG :: 0x00000008
|
||||
BSF_POSTMESSAGE :: 0x00000010
|
||||
BSF_FORCEIFHUNG :: 0x00000020
|
||||
BSF_NOTIMEOUTIFNOTHUNG :: 0x00000040
|
||||
BSF_ALLOWSFW :: 0x00000080
|
||||
BSF_SENDNOTIFYMESSAGE :: 0x00000100
|
||||
BSF_RETURNHDESK :: 0x00000200
|
||||
BSF_LUID :: 0x00000400
|
||||
|
||||
BROADCAST_QUERY_DENY :: 0x424D5144
|
||||
|
||||
// Special HWND value for use with PostMessage() and SendMessage()
|
||||
HWND_BROADCAST :: HWND(uintptr(0xffff))
|
||||
HWND_MESSAGE :: HWND(~uintptr(0) - 2) // -3
|
||||
|
||||
PTIMERAPCROUTINE :: #type proc "stdcall" (lpArgToCompletionRoutine: LPVOID, dwTimerLowValue, dwTimerHighValue: DWORD)
|
||||
|
||||
|
||||
@@ -134,6 +134,33 @@ foreign user32 {
|
||||
GetCursorPos :: proc(lpPoint: LPPOINT) -> BOOL ---
|
||||
SetCursorPos :: proc(X: c_int, Y: c_int) -> BOOL ---
|
||||
SetCursor :: proc(hCursor: HCURSOR) -> HCURSOR ---
|
||||
|
||||
BroadcastSystemMessageW :: proc(
|
||||
flags: DWORD,
|
||||
lpInfo: LPDWORD,
|
||||
Msg: UINT,
|
||||
wParam: WPARAM,
|
||||
lParam: LPARAM,
|
||||
) -> c_long ---
|
||||
|
||||
BroadcastSystemMessageExW :: proc(
|
||||
flags: DWORD,
|
||||
lpInfo: LPDWORD,
|
||||
Msg: UINT,
|
||||
wParam: WPARAM,
|
||||
lParam: LPARAM,
|
||||
pbsmInfo: PBSMINFO,
|
||||
) -> c_long ---
|
||||
|
||||
SendMessageTimeoutW :: proc(
|
||||
hWnd: HWND,
|
||||
Msg: UINT,
|
||||
wParam: WPARAM,
|
||||
lParam: LPARAM,
|
||||
fuFlags: UINT,
|
||||
uTimeout: UINT,
|
||||
lpdwResult: PDWORD_PTR,
|
||||
) -> LRESULT ---
|
||||
}
|
||||
|
||||
CreateWindowW :: #force_inline proc "stdcall" (
|
||||
|
||||
@@ -25,6 +25,7 @@ WM_ENDSESSION :: 0x0016
|
||||
WM_SHOWWINDOW :: 0x0018
|
||||
WM_CTLCOLOR :: 0x0019
|
||||
WM_WININICHANGE :: 0x001a
|
||||
WM_SETTINGCHANGE :: WM_WININICHANGE
|
||||
WM_DEVMODECHANGE :: 0x001b
|
||||
WM_ACTIVATEAPP :: 0x001c
|
||||
WM_FONTCHANGE :: 0x001d
|
||||
|
||||
Reference in New Issue
Block a user