Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/win/drop_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,22 @@ use super::WindowState;
// These function pointers have to be stored in a (const) variable before they can be transmuted
// Transmuting is needed because winapi has a bug where the pt parameter has an incorrect
// type `*const POINTL`
#[allow(non_snake_case)]
const DRAG_ENTER_PTR: unsafe extern "system" fn(
this: *mut IDropTarget,
pDataObj: *const IDataObject,
grfKeyState: DWORD,
pt: POINTL,
pdwEffect: *mut DWORD,
) -> HRESULT = DropTarget::drag_enter;
#[allow(non_snake_case)]
const DRAG_OVER_PTR: unsafe extern "system" fn(
this: *mut IDropTarget,
grfKeyState: DWORD,
pt: POINTL,
pdwEffect: *mut DWORD,
) -> HRESULT = DropTarget::drag_over;
#[allow(non_snake_case)]
const DROP_PTR: unsafe extern "system" fn(
this: *mut IDropTarget,
pDataObj: *const IDataObject,
Expand Down
8 changes: 4 additions & 4 deletions src/win/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,19 +519,19 @@ pub(super) struct WindowState {
}

impl WindowState {
pub(super) fn create_window(&self) -> Window {
pub(super) fn create_window(&self) -> Window<'_> {
Window { state: self }
}

pub(super) fn window_info(&self) -> Ref<WindowInfo> {
pub(super) fn window_info(&self) -> Ref<'_, WindowInfo> {
self.window_info.borrow()
}

pub(super) fn keyboard_state(&self) -> Ref<KeyboardState> {
pub(super) fn keyboard_state(&self) -> Ref<'_, KeyboardState> {
self.keyboard_state.borrow()
}

pub(super) fn handler_mut(&self) -> RefMut<Option<Box<dyn WindowHandler>>> {
pub(super) fn handler_mut(&self) -> RefMut<'_, Option<Box<dyn WindowHandler>>> {
self.handler.borrow_mut()
}

Expand Down