Remove functionality already exposed through raw-window-handle
Nothing changed from the user point of view, other than they should use the `raw-window-handle`, which is objectively better, given that it reduces the amount of `cfg` guards in downstream code.
This commit is contained in:
parent
8a7e18aaf0
commit
3c3a863cc9
12 changed files with 27 additions and 250 deletions
|
|
@ -14,8 +14,7 @@ use std::{
|
|||
|
||||
use windows_sys::Win32::{
|
||||
Foundation::{
|
||||
HMODULE, HWND, LPARAM, OLE_E_WRONGCOMPOBJ, POINT, POINTS, RECT, RPC_E_CHANGED_MODE, S_OK,
|
||||
WPARAM,
|
||||
HWND, LPARAM, OLE_E_WRONGCOMPOBJ, POINT, POINTS, RECT, RPC_E_CHANGED_MODE, S_OK, WPARAM,
|
||||
},
|
||||
Graphics::{
|
||||
Dwm::{DwmEnableBlurBehindWindow, DWM_BB_BLURREGION, DWM_BB_ENABLE, DWM_BLURBEHIND},
|
||||
|
|
@ -322,16 +321,12 @@ impl Window {
|
|||
self.window.0
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn hinstance(&self) -> HMODULE {
|
||||
unsafe { super::get_window_long(self.hwnd(), GWLP_HINSTANCE) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn raw_window_handle(&self) -> RawWindowHandle {
|
||||
let mut window_handle = Win32WindowHandle::empty();
|
||||
window_handle.hwnd = self.window.0 as *mut _;
|
||||
window_handle.hinstance = self.hinstance() as *mut _;
|
||||
let hinstance = unsafe { super::get_window_long(self.hwnd(), GWLP_HINSTANCE) };
|
||||
window_handle.hinstance = hinstance as *mut _;
|
||||
RawWindowHandle::Win32(window_handle)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue