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:
Mads Marquart 2022-09-02 18:46:18 +02:00 committed by GitHub
parent 112965b4ff
commit d67c928120
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 873 additions and 1013 deletions

View file

@ -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];