mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 14:48:47 +00:00
Merge pull request #4665 from GrumpyLion/add_some_missing_win_functions
Add SetWindowSubclass and RegisterHotKey functions
This commit is contained in:
@@ -6,4 +6,5 @@ foreign import "system:Comctl32.lib"
|
|||||||
@(default_calling_convention="system")
|
@(default_calling_convention="system")
|
||||||
foreign Comctl32 {
|
foreign Comctl32 {
|
||||||
LoadIconWithScaleDown :: proc(hinst: HINSTANCE, pszName: PCWSTR, cx: c_int, cy: c_int, phico: ^HICON) -> HRESULT ---
|
LoadIconWithScaleDown :: proc(hinst: HINSTANCE, pszName: PCWSTR, cx: c_int, cy: c_int, phico: ^HICON) -> HRESULT ---
|
||||||
|
SetWindowSubclass :: proc(hwnd: HWND, pfnSubclass: SUBCLASSPROC, uIdSubclass: UINT_PTR, dwRefData: DWORD_PTR) ---
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -796,6 +796,8 @@ TIMERPROC :: #type proc "system" (HWND, UINT, UINT_PTR, DWORD)
|
|||||||
|
|
||||||
WNDPROC :: #type proc "system" (HWND, UINT, WPARAM, LPARAM) -> LRESULT
|
WNDPROC :: #type proc "system" (HWND, UINT, WPARAM, LPARAM) -> LRESULT
|
||||||
|
|
||||||
|
SUBCLASSPROC :: #type proc "system" (HWND, UINT, WPARAM, LPARAM, UINT_PTR, DWORD_PTR) -> LRESULT
|
||||||
|
|
||||||
HOOKPROC :: #type proc "system" (code: c_int, wParam: WPARAM, lParam: LPARAM) -> LRESULT
|
HOOKPROC :: #type proc "system" (code: c_int, wParam: WPARAM, lParam: LPARAM) -> LRESULT
|
||||||
|
|
||||||
WINEVENTPROC :: #type proc "system" (
|
WINEVENTPROC :: #type proc "system" (
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
package sys_windows
|
package sys_windows
|
||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
|
import "core:c"
|
||||||
foreign import user32 "system:User32.lib"
|
foreign import user32 "system:User32.lib"
|
||||||
|
|
||||||
@(default_calling_convention="system")
|
@(default_calling_convention="system")
|
||||||
@@ -32,6 +33,8 @@ foreign user32 {
|
|||||||
RegisterClassExW :: proc(^WNDCLASSEXW) -> ATOM ---
|
RegisterClassExW :: proc(^WNDCLASSEXW) -> ATOM ---
|
||||||
UnregisterClassW :: proc(lpClassName: LPCWSTR, hInstance: HINSTANCE) -> BOOL ---
|
UnregisterClassW :: proc(lpClassName: LPCWSTR, hInstance: HINSTANCE) -> BOOL ---
|
||||||
|
|
||||||
|
RegisterHotKey :: proc(hnwd: HWND, id: c.int, fsModifiers: UINT, vk: UINT) -> BOOL ---
|
||||||
|
|
||||||
CreateWindowExW :: proc(
|
CreateWindowExW :: proc(
|
||||||
dwExStyle: DWORD,
|
dwExStyle: DWORD,
|
||||||
lpClassName: LPCWSTR,
|
lpClassName: LPCWSTR,
|
||||||
|
|||||||
Reference in New Issue
Block a user