From ad331de5c240b7fad94ea74236b2ddc307d6c3fc Mon Sep 17 00:00:00 2001 From: smb123w64gb Date: Tue, 11 Oct 2022 10:12:00 -0700 Subject: [PATCH] ARM and AARCH64 Windows Support (#300) * ARM and AARCH64 Windows Support --- src/os/windows/mod.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/os/windows/mod.rs b/src/os/windows/mod.rs index 81e58fd..924d785 100644 --- a/src/os/windows/mod.rs +++ b/src/os/windows/mod.rs @@ -170,6 +170,25 @@ unsafe fn set_window_long(window: windef::HWND, data: ntdef::LONG) -> ntdef::LON unsafe fn get_window_long(window: windef::HWND) -> ntdef::LONG { winuser::GetWindowLongW(window, winuser::GWLP_USERDATA) } +#[cfg(target_arch = "aarch64")] +unsafe fn set_window_long(window: windef::HWND, data: basetsd::LONG_PTR) -> basetsd::LONG_PTR { + winuser::SetWindowLongPtrW(window, winuser::GWLP_USERDATA, data) +} + +#[cfg(target_arch = "aarch64")] +unsafe fn get_window_long(window: windef::HWND) -> basetsd::LONG_PTR { + winuser::GetWindowLongPtrW(window, winuser::GWLP_USERDATA) +} + +#[cfg(target_arch = "arm")] +unsafe fn set_window_long(window: windef::HWND, data: basetsd::LONG_PTR) -> basetsd::LONG_PTR { + winuser::SetWindowLongPtrW(window, winuser::GWLP_USERDATA, data) +} + +#[cfg(target_arch = "arm")] +unsafe fn get_window_long(window: windef::HWND) -> basetsd::LONG_PTR { + winuser::GetWindowLongPtrW(window, winuser::GWLP_USERDATA) +} unsafe extern "system" fn wnd_proc( window: windef::HWND,