mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
* Use objc2::foundation CG types * Add safe abstraction over UIApplication * Add safe abstraction over UIDevice * Add safe abstraction over UIScreen * Add safe abstraction over UIWindow * Add safe abstraction over UIViewController * Add safe abstraction over UIView * Appease clippy
19 lines
394 B
Rust
19 lines
394 B
Rust
use objc2::foundation::{CGSize, NSObject};
|
|
use objc2::{extern_class, extern_methods, ClassType};
|
|
|
|
extern_class!(
|
|
#[derive(Debug, PartialEq, Eq, Hash)]
|
|
pub(crate) struct UIScreenMode;
|
|
|
|
unsafe impl ClassType for UIScreenMode {
|
|
type Super = NSObject;
|
|
}
|
|
);
|
|
|
|
extern_methods!(
|
|
unsafe impl UIScreenMode {
|
|
#[sel(size)]
|
|
pub fn size(&self) -> CGSize;
|
|
}
|
|
);
|