mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
* Upgrade to objc2 v0.4.0 and icrate v0.0.3 * Fix `touchBar` method * Use ClassType::alloc * Use #[method_id(...)] functionality in declare_class!
20 lines
465 B
Rust
20 lines
465 B
Rust
use icrate::Foundation::{CGSize, NSObject};
|
|
use objc2::{extern_class, extern_methods, mutability, ClassType};
|
|
|
|
extern_class!(
|
|
#[derive(Debug, PartialEq, Eq, Hash)]
|
|
pub(crate) struct UIScreenMode;
|
|
|
|
unsafe impl ClassType for UIScreenMode {
|
|
type Super = NSObject;
|
|
type Mutability = mutability::InteriorMutable;
|
|
}
|
|
);
|
|
|
|
extern_methods!(
|
|
unsafe impl UIScreenMode {
|
|
#[method(size)]
|
|
pub fn size(&self) -> CGSize;
|
|
}
|
|
);
|