chore: remove platform WindowId's
WindowId is a window _identifier_, and as such doesn't store anything (unlike a _handle_). So we can safely make only be defined once, in the core crate. There are a few backends where we still use `into_raw` internally; I consider these patterns discouraged, we should not be passing around important state in the window id.
This commit is contained in:
parent
eccd9e415d
commit
da2268ae22
35 changed files with 226 additions and 379 deletions
|
|
@ -15,8 +15,7 @@ use crate::event::Event;
|
|||
use crate::platform_impl::platform::definitions::{
|
||||
IDataObjectVtbl, IDropTarget, IDropTargetVtbl, IUnknownVtbl,
|
||||
};
|
||||
use crate::platform_impl::platform::WindowId;
|
||||
use crate::window::WindowId as RootWindowId;
|
||||
use crate::window::WindowId;
|
||||
|
||||
#[repr(C)]
|
||||
pub struct FileDropHandlerData {
|
||||
|
|
@ -86,7 +85,7 @@ impl FileDropHandler {
|
|||
let hdrop = unsafe {
|
||||
Self::iterate_filenames(pDataObj, |filename| {
|
||||
drop_handler.send_event(Event::WindowEvent {
|
||||
window_id: RootWindowId(WindowId(drop_handler.window)),
|
||||
window_id: WindowId::from_raw(drop_handler.window as usize),
|
||||
event: HoveredFile(filename),
|
||||
});
|
||||
})
|
||||
|
|
@ -120,7 +119,7 @@ impl FileDropHandler {
|
|||
let drop_handler = unsafe { Self::from_interface(this) };
|
||||
if drop_handler.hovered_is_valid {
|
||||
drop_handler.send_event(Event::WindowEvent {
|
||||
window_id: RootWindowId(WindowId(drop_handler.window)),
|
||||
window_id: WindowId::from_raw(drop_handler.window as usize),
|
||||
event: HoveredFileCancelled,
|
||||
});
|
||||
}
|
||||
|
|
@ -140,7 +139,7 @@ impl FileDropHandler {
|
|||
let hdrop = unsafe {
|
||||
Self::iterate_filenames(pDataObj, |filename| {
|
||||
drop_handler.send_event(Event::WindowEvent {
|
||||
window_id: RootWindowId(WindowId(drop_handler.window)),
|
||||
window_id: WindowId::from_raw(drop_handler.window as usize),
|
||||
event: DroppedFile(filename),
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -80,14 +80,12 @@ use crate::platform_impl::platform::window::InitData;
|
|||
use crate::platform_impl::platform::window_state::{
|
||||
CursorFlags, ImeState, WindowFlags, WindowState,
|
||||
};
|
||||
use crate::platform_impl::platform::{
|
||||
raw_input, util, wrap_device_id, FingerId, Fullscreen, WindowId,
|
||||
};
|
||||
use crate::platform_impl::platform::{raw_input, util, wrap_device_id, FingerId, Fullscreen};
|
||||
use crate::platform_impl::Window;
|
||||
use crate::utils::Lazy;
|
||||
use crate::window::{
|
||||
CustomCursor as RootCustomCursor, CustomCursorSource, Theme, Window as CoreWindow,
|
||||
WindowAttributes, WindowId as CoreWindowId,
|
||||
WindowAttributes, WindowId,
|
||||
};
|
||||
|
||||
pub(crate) struct WindowData {
|
||||
|
|
@ -920,7 +918,7 @@ fn update_modifiers(window: HWND, userdata: &WindowData) {
|
|||
drop(window_state);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: ModifiersChanged(modifiers.into()),
|
||||
});
|
||||
}
|
||||
|
|
@ -932,7 +930,7 @@ unsafe fn gain_active_focus(window: HWND, userdata: &WindowData) {
|
|||
update_modifiers(window, userdata);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: Focused(true),
|
||||
});
|
||||
}
|
||||
|
|
@ -942,12 +940,12 @@ unsafe fn lose_active_focus(window: HWND, userdata: &WindowData) {
|
|||
|
||||
userdata.window_state_lock().modifiers_state = ModifiersState::empty();
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: ModifiersChanged(ModifiersState::empty().into()),
|
||||
});
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: Focused(false),
|
||||
});
|
||||
}
|
||||
|
|
@ -1045,7 +1043,7 @@ unsafe fn public_window_callback_inner(
|
|||
userdata.key_event_builder.process_message(window, msg, wparam, lparam, &mut result);
|
||||
for event in events {
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: KeyboardInput {
|
||||
device_id: None,
|
||||
event: event.event,
|
||||
|
|
@ -1130,7 +1128,7 @@ unsafe fn public_window_callback_inner(
|
|||
WM_CLOSE => {
|
||||
use crate::event::WindowEvent::CloseRequested;
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: CloseRequested,
|
||||
});
|
||||
result = ProcResult::Value(0);
|
||||
|
|
@ -1140,7 +1138,7 @@ unsafe fn public_window_callback_inner(
|
|||
use crate::event::WindowEvent::Destroyed;
|
||||
unsafe { RevokeDragDrop(window) };
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: Destroyed,
|
||||
});
|
||||
result = ProcResult::Value(0);
|
||||
|
|
@ -1161,7 +1159,7 @@ unsafe fn public_window_callback_inner(
|
|||
// and request a normal redraw with `RedrawWindow`.
|
||||
if !userdata.event_loop_runner.should_buffer() {
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: WindowEvent::RedrawRequested,
|
||||
});
|
||||
}
|
||||
|
|
@ -1264,7 +1262,7 @@ unsafe fn public_window_callback_inner(
|
|||
let physical_position =
|
||||
unsafe { PhysicalPosition::new((*windowpos).x, (*windowpos).y) };
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: Moved(physical_position),
|
||||
});
|
||||
}
|
||||
|
|
@ -1280,7 +1278,7 @@ unsafe fn public_window_callback_inner(
|
|||
|
||||
let physical_size = PhysicalSize::new(w, h);
|
||||
let event = Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: SurfaceResized(physical_size),
|
||||
};
|
||||
|
||||
|
|
@ -1395,7 +1393,7 @@ unsafe fn public_window_callback_inner(
|
|||
userdata.window_state_lock().ime_state = ImeState::Enabled;
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: WindowEvent::Ime(Ime::Enabled),
|
||||
});
|
||||
}
|
||||
|
|
@ -1415,7 +1413,7 @@ unsafe fn public_window_callback_inner(
|
|||
|
||||
if lparam == 0 {
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: WindowEvent::Ime(Ime::Preedit(String::new(), None)),
|
||||
});
|
||||
}
|
||||
|
|
@ -1427,11 +1425,11 @@ unsafe fn public_window_callback_inner(
|
|||
userdata.window_state_lock().ime_state = ImeState::Enabled;
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: WindowEvent::Ime(Ime::Preedit(String::new(), None)),
|
||||
});
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: WindowEvent::Ime(Ime::Commit(text)),
|
||||
});
|
||||
}
|
||||
|
|
@ -1446,7 +1444,7 @@ unsafe fn public_window_callback_inner(
|
|||
let cursor_range = first.map(|f| (f, last.unwrap_or(f)));
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: WindowEvent::Ime(Ime::Preedit(text, cursor_range)),
|
||||
});
|
||||
}
|
||||
|
|
@ -1469,11 +1467,11 @@ unsafe fn public_window_callback_inner(
|
|||
let ime_context = unsafe { ImeContext::current(window) };
|
||||
if let Some(text) = unsafe { ime_context.get_composed_text() } {
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: WindowEvent::Ime(Ime::Preedit(String::new(), None)),
|
||||
});
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: WindowEvent::Ime(Ime::Commit(text)),
|
||||
});
|
||||
}
|
||||
|
|
@ -1482,7 +1480,7 @@ unsafe fn public_window_callback_inner(
|
|||
userdata.window_state_lock().ime_state = ImeState::Disabled;
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: WindowEvent::Ime(Ime::Disabled),
|
||||
});
|
||||
}
|
||||
|
|
@ -1541,7 +1539,7 @@ unsafe fn public_window_callback_inner(
|
|||
|
||||
drop(w);
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: PointerEntered {
|
||||
device_id: None,
|
||||
position,
|
||||
|
|
@ -1566,7 +1564,7 @@ unsafe fn public_window_callback_inner(
|
|||
|
||||
drop(w);
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: PointerLeft {
|
||||
device_id: None,
|
||||
position: Some(position),
|
||||
|
|
@ -1589,7 +1587,7 @@ unsafe fn public_window_callback_inner(
|
|||
update_modifiers(window, userdata);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: PointerMoved { device_id: None, position, source: PointerSource::Mouse },
|
||||
});
|
||||
}
|
||||
|
|
@ -1607,7 +1605,7 @@ unsafe fn public_window_callback_inner(
|
|||
}
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: PointerLeft { device_id: None, position: None, kind: Mouse },
|
||||
});
|
||||
|
||||
|
|
@ -1623,7 +1621,7 @@ unsafe fn public_window_callback_inner(
|
|||
update_modifiers(window, userdata);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: WindowEvent::MouseWheel {
|
||||
device_id: None,
|
||||
delta: LineDelta(0.0, value),
|
||||
|
|
@ -1643,7 +1641,7 @@ unsafe fn public_window_callback_inner(
|
|||
update_modifiers(window, userdata);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: WindowEvent::MouseWheel {
|
||||
device_id: None,
|
||||
delta: LineDelta(value, 0.0),
|
||||
|
|
@ -1682,7 +1680,7 @@ unsafe fn public_window_callback_inner(
|
|||
let position = PhysicalPosition::new(x as f64, y as f64);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: PointerButton {
|
||||
device_id: None,
|
||||
state: Pressed,
|
||||
|
|
@ -1707,7 +1705,7 @@ unsafe fn public_window_callback_inner(
|
|||
let position = PhysicalPosition::new(x as f64, y as f64);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: PointerButton {
|
||||
device_id: None,
|
||||
state: Released,
|
||||
|
|
@ -1732,7 +1730,7 @@ unsafe fn public_window_callback_inner(
|
|||
let position = PhysicalPosition::new(x as f64, y as f64);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: PointerButton {
|
||||
device_id: None,
|
||||
state: Pressed,
|
||||
|
|
@ -1757,7 +1755,7 @@ unsafe fn public_window_callback_inner(
|
|||
let position = PhysicalPosition::new(x as f64, y as f64);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: PointerButton {
|
||||
device_id: None,
|
||||
state: Released,
|
||||
|
|
@ -1782,7 +1780,7 @@ unsafe fn public_window_callback_inner(
|
|||
let position = PhysicalPosition::new(x as f64, y as f64);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: PointerButton {
|
||||
device_id: None,
|
||||
state: Pressed,
|
||||
|
|
@ -1807,7 +1805,7 @@ unsafe fn public_window_callback_inner(
|
|||
let position = PhysicalPosition::new(x as f64, y as f64);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: PointerButton {
|
||||
device_id: None,
|
||||
state: Released,
|
||||
|
|
@ -1833,7 +1831,7 @@ unsafe fn public_window_callback_inner(
|
|||
let position = PhysicalPosition::new(x as f64, y as f64);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: PointerButton {
|
||||
device_id: None,
|
||||
state: Pressed,
|
||||
|
|
@ -1864,7 +1862,7 @@ unsafe fn public_window_callback_inner(
|
|||
let position = PhysicalPosition::new(x as f64, y as f64);
|
||||
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: PointerButton {
|
||||
device_id: None,
|
||||
state: Released,
|
||||
|
|
@ -1919,7 +1917,7 @@ unsafe fn public_window_callback_inner(
|
|||
let y = position.y as f64 + (input.y % 100) as f64 / 100f64;
|
||||
let position = PhysicalPosition::new(x, y);
|
||||
|
||||
let window_id = CoreWindowId(WindowId(window));
|
||||
let window_id = WindowId::from_raw(window as usize);
|
||||
let finger_id = RootFingerId(FingerId {
|
||||
id: input.dwID,
|
||||
primary: util::has_flag(input.dwFlags, TOUCHEVENTF_PRIMARY),
|
||||
|
|
@ -2087,7 +2085,7 @@ unsafe fn public_window_callback_inner(
|
|||
let y = location.y as f64 + y.fract();
|
||||
let position = PhysicalPosition::new(x, y);
|
||||
|
||||
let window_id = CoreWindowId(WindowId(window));
|
||||
let window_id = WindowId::from_raw(window as usize);
|
||||
let finger_id = RootFingerId(FingerId {
|
||||
id: pointer_info.pointerId,
|
||||
primary: util::has_flag(pointer_info.pointerFlags, POINTER_FLAG_PRIMARY),
|
||||
|
|
@ -2320,7 +2318,7 @@ unsafe fn public_window_callback_inner(
|
|||
|
||||
let new_surface_size = Arc::new(Mutex::new(new_physical_surface_size));
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: ScaleFactorChanged {
|
||||
scale_factor: new_scale_factor,
|
||||
surface_size_writer: SurfaceSizeWriter::new(Arc::downgrade(&new_surface_size)),
|
||||
|
|
@ -2472,7 +2470,7 @@ unsafe fn public_window_callback_inner(
|
|||
window_state.current_theme = new_theme;
|
||||
drop(window_state);
|
||||
userdata.send_event(Event::WindowEvent {
|
||||
window_id: CoreWindowId(WindowId(window)),
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: ThemeChanged(new_theme),
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ pub(crate) enum RunnerState {
|
|||
|
||||
enum BufferedEvent {
|
||||
Event(Event),
|
||||
ScaleFactorChanged(WindowId, f64, PhysicalSize<u32>),
|
||||
ScaleFactorChanged(HWND, f64, PhysicalSize<u32>),
|
||||
}
|
||||
|
||||
impl EventLoopRunner {
|
||||
|
|
@ -360,7 +360,7 @@ impl BufferedEvent {
|
|||
event: WindowEvent::ScaleFactorChanged { scale_factor, surface_size_writer },
|
||||
window_id,
|
||||
} => BufferedEvent::ScaleFactorChanged(
|
||||
window_id,
|
||||
window_id.into_raw() as HWND,
|
||||
scale_factor,
|
||||
*surface_size_writer.new_surface_size.upgrade().unwrap().lock().unwrap(),
|
||||
),
|
||||
|
|
@ -371,10 +371,10 @@ impl BufferedEvent {
|
|||
pub fn dispatch_event(self, dispatch: impl FnOnce(Event)) {
|
||||
match self {
|
||||
Self::Event(event) => dispatch(event),
|
||||
Self::ScaleFactorChanged(window_id, scale_factor, new_surface_size) => {
|
||||
Self::ScaleFactorChanged(window, scale_factor, new_surface_size) => {
|
||||
let user_new_surface_size = Arc::new(Mutex::new(new_surface_size));
|
||||
dispatch(Event::WindowEvent {
|
||||
window_id,
|
||||
window_id: WindowId::from_raw(window as usize),
|
||||
event: WindowEvent::ScaleFactorChanged {
|
||||
scale_factor,
|
||||
surface_size_writer: SurfaceSizeWriter::new(Arc::downgrade(
|
||||
|
|
@ -388,12 +388,11 @@ impl BufferedEvent {
|
|||
|
||||
if surface_size != new_surface_size {
|
||||
let window_flags = unsafe {
|
||||
let userdata =
|
||||
get_window_long(window_id.0.into(), GWL_USERDATA) as *mut WindowData;
|
||||
let userdata = get_window_long(window, GWL_USERDATA) as *mut WindowData;
|
||||
(*userdata).window_state_lock().window_flags
|
||||
};
|
||||
|
||||
window_flags.set_size((window_id.0).0, surface_size);
|
||||
window_flags.set_size(window, surface_size);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,27 +101,6 @@ pub struct KeyEventExtra {
|
|||
pub key_without_modifiers: Key,
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct WindowId(HWND);
|
||||
unsafe impl Send for WindowId {}
|
||||
unsafe impl Sync for WindowId {}
|
||||
|
||||
impl WindowId {
|
||||
pub const fn into_raw(self) -> u64 {
|
||||
self.0 as u64
|
||||
}
|
||||
|
||||
pub const fn from_raw(id: u64) -> Self {
|
||||
Self(id as HWND)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<WindowId> for HWND {
|
||||
fn from(window_id: WindowId) -> Self {
|
||||
window_id.0
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
const fn get_xbutton_wparam(x: u32) -> u16 {
|
||||
hiword(x)
|
||||
|
|
|
|||
|
|
@ -66,11 +66,11 @@ use crate::platform_impl::platform::keyboard::KeyEventBuilder;
|
|||
use crate::platform_impl::platform::window_state::{
|
||||
CursorFlags, SavedWindow, WindowFlags, WindowState,
|
||||
};
|
||||
use crate::platform_impl::platform::{monitor, util, Fullscreen, SelectedCursor, WindowId};
|
||||
use crate::platform_impl::platform::{monitor, util, Fullscreen, SelectedCursor};
|
||||
use crate::window::{
|
||||
CursorGrabMode, Fullscreen as CoreFullscreen, ImePurpose, ResizeDirection, Theme,
|
||||
UserAttentionType, Window as CoreWindow, WindowAttributes, WindowButtons,
|
||||
WindowId as CoreWindowId, WindowLevel,
|
||||
UserAttentionType, Window as CoreWindow, WindowAttributes, WindowButtons, WindowId,
|
||||
WindowLevel,
|
||||
};
|
||||
|
||||
/// The Win32 implementation of the main `Window` object.
|
||||
|
|
@ -696,8 +696,8 @@ impl CoreWindow for Window {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn id(&self) -> CoreWindowId {
|
||||
CoreWindowId(WindowId(self.hwnd()))
|
||||
fn id(&self) -> WindowId {
|
||||
WindowId::from_raw(self.hwnd() as usize)
|
||||
}
|
||||
|
||||
fn set_minimized(&self, minimized: bool) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue