mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
Stop using &mut in Objective-C delegate methods (#2925)
* Make iOS declared classes not use &mut * Prepare `init` methods for not having access to &mut self * Prepare WinitWindow methods for not having access to &mut self * Convert a bit of WinitView's to use interior mutability * Convert a bit more of WinitView's to use interior mutability * Convert the rest of WinitView to use interior mutability * Use interior mutability instead of a Mutex for the CursorState * Use interior mutability in WinitWindowDelegate
This commit is contained in:
@@ -70,6 +70,10 @@ impl From<UIUserInterfaceIdiom> for Idiom {
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub struct UIRectEdge(NSUInteger);
|
||||
|
||||
impl UIRectEdge {
|
||||
pub(crate) const NONE: Self = Self(0);
|
||||
}
|
||||
|
||||
unsafe impl Encode for UIRectEdge {
|
||||
const ENCODING: Encoding = NSUInteger::ENCODING;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user