Clean up macOS class declaration (#2458)
* Begin abstraction over AppKit * Clean up NSApplication delegate declaration * Clean up NSApplication override declaration * Clean up NSWindow delegate declaration * Clean up NSWindow override declaration * Clean up NSView delegate declaration
This commit is contained in:
parent
112965b4ff
commit
d67c928120
15 changed files with 873 additions and 1013 deletions
|
|
@ -12,8 +12,7 @@ use cocoa::{
|
|||
foundation::{NSPoint, NSRect, NSString},
|
||||
};
|
||||
use core_graphics::display::CGDisplay;
|
||||
use objc::foundation::{NSRange, NSUInteger};
|
||||
use objc::runtime::{Class, Object};
|
||||
use objc2::foundation::{NSRange, NSUInteger};
|
||||
|
||||
use crate::dpi::LogicalPosition;
|
||||
use crate::platform_impl::platform::ffi;
|
||||
|
|
@ -144,11 +143,6 @@ pub unsafe fn app_name() -> Option<id> {
|
|||
}
|
||||
}
|
||||
|
||||
pub unsafe fn superclass(this: &Object) -> &Class {
|
||||
let superclass: *const Class = msg_send![this, superclass];
|
||||
&*superclass
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub unsafe fn open_emoji_picker() {
|
||||
let _: () = msg_send![NSApp(), orderFrontCharacterPalette: nil];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue