Port to windows-sys v0.48.0 (#2842)
This commit is contained in:
parent
5bbe87960e
commit
642ce2bfa7
5 changed files with 10 additions and 6 deletions
|
|
@ -30,7 +30,10 @@ use windows_sys::Win32::{
|
|||
SC_SCREENSAVE,
|
||||
},
|
||||
Media::{timeBeginPeriod, timeEndPeriod, timeGetDevCaps, TIMECAPS, TIMERR_NOERROR},
|
||||
System::{Ole::RevokeDragDrop, Threading::GetCurrentThreadId, WindowsProgramming::INFINITE},
|
||||
System::{
|
||||
Ole::RevokeDragDrop,
|
||||
Threading::{GetCurrentThreadId, INFINITE},
|
||||
},
|
||||
UI::{
|
||||
Controls::{HOVER_DEFAULT, WM_MOUSELEAVE},
|
||||
Input::{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use once_cell::sync::Lazy;
|
|||
use windows_sys::{
|
||||
core::{HRESULT, PCWSTR},
|
||||
Win32::{
|
||||
Foundation::{BOOL, HINSTANCE, HWND, RECT},
|
||||
Foundation::{BOOL, HMODULE, HWND, RECT},
|
||||
Graphics::Gdi::{ClientToScreen, HMONITOR},
|
||||
System::{
|
||||
LibraryLoader::{GetProcAddress, LoadLibraryA},
|
||||
|
|
@ -149,7 +149,7 @@ pub fn is_minimized(window: HWND) -> bool {
|
|||
unsafe { IsIconic(window) != false.into() }
|
||||
}
|
||||
|
||||
pub fn get_instance_handle() -> HINSTANCE {
|
||||
pub fn get_instance_handle() -> HMODULE {
|
||||
// Gets the instance handle by taking the address of the
|
||||
// pseudo-variable created by the microsoft linker:
|
||||
// https://devblogs.microsoft.com/oldnewthing/20041025-00/?p=37483
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use std::{
|
|||
|
||||
use windows_sys::Win32::{
|
||||
Foundation::{
|
||||
HINSTANCE, HWND, LPARAM, OLE_E_WRONGCOMPOBJ, POINT, POINTS, RECT, RPC_E_CHANGED_MODE, S_OK,
|
||||
HMODULE, HWND, LPARAM, OLE_E_WRONGCOMPOBJ, POINT, POINTS, RECT, RPC_E_CHANGED_MODE, S_OK,
|
||||
WPARAM,
|
||||
},
|
||||
Graphics::{
|
||||
|
|
@ -315,7 +315,7 @@ impl Window {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn hinstance(&self) -> HINSTANCE {
|
||||
pub fn hinstance(&self) -> HMODULE {
|
||||
unsafe { super::get_window_long(self.hwnd(), GWLP_HINSTANCE) }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue