Rename internal structs for consistency (#2149)

Proxy -> EventLoopProxy
Id -> WindowId or DeviceId
WindowTarget -> EventLoopWindowTarget
Handle -> MonitorHandle
Mode -> VideoMode
PlatformSpecificBuilderAttributes -> PlatformSpecificWindowBuilderAttributes
SuperWindowId -> RootWindowId
This commit is contained in:
Mads Marquart 2022-03-18 14:09:39 +01:00 committed by GitHub
parent 85baf79d17
commit a438091266
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 134 additions and 135 deletions

View file

@ -23,7 +23,8 @@ use crate::platform_impl::platform::{
definitions::{IDataObjectVtbl, IDropTarget, IDropTargetVtbl, IUnknownVtbl},
WindowId,
};
use crate::{event::Event, window::WindowId as SuperWindowId};
use crate::{event::Event, window::WindowId as RootWindowId};
#[repr(C)]
pub struct FileDropHandlerData {
@ -95,7 +96,7 @@ impl FileDropHandler {
let drop_handler = Self::from_interface(this);
let hdrop = Self::iterate_filenames(pDataObj, |filename| {
drop_handler.send_event(Event::WindowEvent {
window_id: SuperWindowId(WindowId(drop_handler.window)),
window_id: RootWindowId(WindowId(drop_handler.window)),
event: HoveredFile(filename),
});
});
@ -127,7 +128,7 @@ impl FileDropHandler {
let drop_handler = Self::from_interface(this);
if drop_handler.hovered_is_valid {
drop_handler.send_event(Event::WindowEvent {
window_id: SuperWindowId(WindowId(drop_handler.window)),
window_id: RootWindowId(WindowId(drop_handler.window)),
event: HoveredFileCancelled,
});
}
@ -146,7 +147,7 @@ impl FileDropHandler {
let drop_handler = Self::from_interface(this);
let hdrop = Self::iterate_filenames(pDataObj, |filename| {
drop_handler.send_event(Event::WindowEvent {
window_id: SuperWindowId(WindowId(drop_handler.window)),
window_id: RootWindowId(WindowId(drop_handler.window)),
event: DroppedFile(filename),
});
});