mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-14 07:13:14 +00:00
sys/windows: add a couple macros
This commit is contained in:
@@ -15,6 +15,14 @@ HIWORD :: #force_inline proc "contextless" (x: DWORD) -> WORD {
|
||||
return WORD(x >> 16)
|
||||
}
|
||||
|
||||
GET_X_LPARAM :: #force_inline proc "contextless" (lp: LPARAM) -> c_int {
|
||||
return cast(c_int)cast(c_short)LOWORD(cast(DWORD)lp)
|
||||
}
|
||||
|
||||
GET_Y_LPARAM :: #force_inline proc "contextless" (lp: LPARAM) -> c_int {
|
||||
return cast(c_int)cast(c_short)HIWORD(cast(DWORD)lp)
|
||||
}
|
||||
|
||||
utf8_to_utf16 :: proc(s: string, allocator := context.temp_allocator) -> []u16 {
|
||||
if len(s) < 1 {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user