diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-03-29 22:11:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-29 22:11:16 +0200 |
| commit | a3c81374bebedf87374e0e15ffda3cae0e2d8cfe (patch) | |
| tree | c83415230057e506cfb26353f12dcf0afc206233 | |
| parent | 740ba6ad47b7259299ec4210f9d5a9a166dd4bc9 (diff) | |
| parent | 6a3ec5eb3647965d6792c5ff17a4534d0e458548 (diff) | |
Merge pull request #1670 from ftphikari/master
sys/windows: add WM_SYSCOMMAND related constants
| -rw-r--r-- | core/sys/windows/types.odin | 25 | ||||
| -rw-r--r-- | core/sys/windows/user32.odin | 4 |
2 files changed, 29 insertions, 0 deletions
diff --git a/core/sys/windows/types.odin b/core/sys/windows/types.odin index a01ac80eb..50098a59c 100644 --- a/core/sys/windows/types.odin +++ b/core/sys/windows/types.odin @@ -594,6 +594,31 @@ SM_CARETBLINKINGENABLED :: 0x2002 SM_CONVERTIBLESLATEMODE :: 0x2003 SM_SYSTEMDOCKED :: 0x2004 +// System Menu Command Values +SC_SIZE :: 0xF000 +SC_MOVE :: 0xF010 +SC_MINIMIZE :: 0xF020 +SC_MAXIMIZE :: 0xF030 +SC_NEXTWINDOW :: 0xF040 +SC_PREVWINDOW :: 0xF050 +SC_CLOSE :: 0xF060 +SC_VSCROLL :: 0xF070 +SC_HSCROLL :: 0xF080 +SC_MOUSEMENU :: 0xF090 +SC_KEYMENU :: 0xF100 +SC_ARRANGE :: 0xF110 +SC_RESTORE :: 0xF120 +SC_TASKLIST :: 0xF130 +SC_SCREENSAVE :: 0xF140 +SC_HOTKEY :: 0xF150 +SC_DEFAULT :: 0xF160 +SC_MONITORPOWER :: 0xF170 +SC_CONTEXTHELP :: 0xF180 +SC_SEPARATOR :: 0xF00F +SCF_ISSECURE :: 0x00000001 +SC_ICON :: SC_MINIMIZE +SC_ZOOM :: SC_MAXIMIZE + CW_USEDEFAULT : c_int : -2147483648 SIZE_RESTORED :: 0 diff --git a/core/sys/windows/user32.odin b/core/sys/windows/user32.odin index 772cad028..bdab77e27 100644 --- a/core/sys/windows/user32.odin +++ b/core/sys/windows/user32.odin @@ -192,3 +192,7 @@ CreateWindowW :: #force_inline proc "stdcall" ( lpParam, ) } + +GET_SC_WPARAM :: #force_inline proc(wparam: WPARAM) -> i32 { + return i32(wparam) & 0xFFF0 +} |