diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2022-06-19 16:21:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-19 16:21:00 +0100 |
| commit | 9c52a11b1bf1ec35a80684b613793f604929a27a (patch) | |
| tree | b9ca5ab7cf9c4c5e0f3d79b455c3b12a951815c6 | |
| parent | 173286de65181ca6c3ce321610ba3076c86a282c (diff) | |
| parent | c6903fbcd5d56c08b73b3cb269758e791bedbd50 (diff) | |
Merge pull request #1850 from ftphikari/master
sys/windows: add RegSetKeyValueW
| -rw-r--r-- | core/sys/windows/advapi32.odin | 9 | ||||
| -rw-r--r-- | core/sys/windows/types.odin | 12 | ||||
| -rw-r--r-- | core/sys/windows/user32.odin | 6 |
3 files changed, 26 insertions, 1 deletions
diff --git a/core/sys/windows/advapi32.odin b/core/sys/windows/advapi32.odin index ab2c6737f..82031d4f7 100644 --- a/core/sys/windows/advapi32.odin +++ b/core/sys/windows/advapi32.odin @@ -119,4 +119,13 @@ foreign advapi32 { lpData: ^BYTE, cbData: DWORD, ) -> LSTATUS --- + + RegSetKeyValueW :: proc( + hKey: HKEY, + lpSubKey: LPCWSTR, + lpValueName: LPCWSTR, + dwType: DWORD, + lpData: LPCVOID, + cbData: DWORD, + ) -> LSTATUS --- } diff --git a/core/sys/windows/types.odin b/core/sys/windows/types.odin index d79197532..1b5189b13 100644 --- a/core/sys/windows/types.odin +++ b/core/sys/windows/types.odin @@ -633,6 +633,18 @@ ES_READONLY :: 0x0800 ES_WANTRETURN :: 0x1000 ES_NUMBER :: 0x2000 +// Edit Control Notification Codes +EN_SETFOCUS :: 0x0100 +EN_KILLFOCUS :: 0x0200 +EN_CHANGE :: 0x0300 +EN_UPDATE :: 0x0400 +EN_ERRSPACE :: 0x0500 +EN_MAXTEXT :: 0x0501 +EN_HSCROLL :: 0x0601 +EN_VSCROLL :: 0x0602 +EN_ALIGN_LTR_EC :: 0x0700 +EN_ALIGN_RTL_EC :: 0x0701 + // Font Weights FW_DONTCARE :: 0 FW_THIN :: 100 diff --git a/core/sys/windows/user32.odin b/core/sys/windows/user32.odin index 9fe64a92c..6a4e75b7b 100644 --- a/core/sys/windows/user32.odin +++ b/core/sys/windows/user32.odin @@ -237,6 +237,10 @@ GET_NCHITTEST_WPARAM :: #force_inline proc "contextless" (wParam: WPARAM) -> c_s return cast(c_short)LOWORD(cast(DWORD)wParam) } -GET_XBUTTON_WPARAM :: #force_inline proc "contextless" (wParam: WPARAM) -> WORD { +GET_XBUTTON_WPARAM :: #force_inline proc "contextless" (wParam: WPARAM) -> WORD { return HIWORD(cast(DWORD)wParam) } + +MAKEINTRESOURCEW :: #force_inline proc "contextless" (#any_int i: int) -> LPWSTR { + return cast(LPWSTR)uintptr(WORD(i)) +} |