Update objc2 crates (#3634)
Changes relevant to Winit: - `icrate` has been deprecated in favour of separate crates per framework, in our case `objc2-foundation` and `objc2-app-kit` (and in the future `objc2-ui-kit` on iOS). - Moved `MainThreadMarker::run_on_main` to free-standing function `run_on_main`. - Changed how features work, this should result in less code that we need to compile. - Enums are now real structs instead of type-aliases and free constants.
This commit is contained in:
parent
575d978202
commit
259e868c05
38 changed files with 289 additions and 270 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use icrate::Foundation::{CGRect, MainThreadMarker, NSArray, NSObject};
|
||||
use objc2::rc::Id;
|
||||
use objc2::{extern_class, extern_methods, msg_send_id, mutability, ClassType};
|
||||
use objc2_foundation::{CGRect, MainThreadMarker, NSArray, NSObject};
|
||||
|
||||
use super::{UIResponder, UIWindow};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use icrate::Foundation::NSObject;
|
||||
use objc2::{extern_class, mutability, ClassType};
|
||||
use objc2_foundation::NSObject;
|
||||
|
||||
extern_class!(
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use icrate::Foundation::{MainThreadMarker, NSInteger, NSObject};
|
||||
use objc2::encode::{Encode, Encoding};
|
||||
use objc2::rc::Id;
|
||||
use objc2::{extern_class, extern_methods, msg_send_id, mutability, ClassType};
|
||||
use objc2_foundation::{MainThreadMarker, NSInteger, NSObject};
|
||||
|
||||
extern_class!(
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use icrate::Foundation::NSObject;
|
||||
use objc2::{extern_class, mutability, ClassType};
|
||||
use objc2_foundation::NSObject;
|
||||
|
||||
extern_class!(
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use icrate::Foundation::NSUInteger;
|
||||
use objc2::encode::{Encode, Encoding};
|
||||
use objc2_foundation::NSUInteger;
|
||||
|
||||
#[repr(transparent)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use icrate::Foundation::{CGFloat, NSInteger, NSObject, NSUInteger};
|
||||
use objc2::{
|
||||
encode::{Encode, Encoding},
|
||||
extern_class, extern_methods, mutability, ClassType,
|
||||
};
|
||||
use objc2_foundation::{CGFloat, NSInteger, NSObject, NSUInteger};
|
||||
|
||||
// https://developer.apple.com/documentation/uikit/uigesturerecognizer
|
||||
extern_class!(
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
use std::os::raw::{c_char, c_int};
|
||||
|
||||
use icrate::Foundation::NSString;
|
||||
use objc2_foundation::NSString;
|
||||
|
||||
mod application;
|
||||
mod coordinate_space;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use icrate::Foundation::NSObject;
|
||||
use objc2::{extern_class, mutability, ClassType};
|
||||
use objc2_foundation::NSObject;
|
||||
|
||||
extern_class!(
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use icrate::Foundation::{CGFloat, CGRect, MainThreadMarker, NSArray, NSInteger, NSObject};
|
||||
use objc2::encode::{Encode, Encoding};
|
||||
use objc2::rc::Id;
|
||||
use objc2::{extern_class, extern_methods, msg_send_id, mutability, ClassType};
|
||||
use objc2_foundation::{CGFloat, CGRect, MainThreadMarker, NSArray, NSInteger, NSObject};
|
||||
|
||||
use super::{UICoordinateSpace, UIScreenMode};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use icrate::Foundation::{CGSize, NSObject};
|
||||
use objc2::{extern_class, extern_methods, mutability, ClassType};
|
||||
use objc2_foundation::{CGSize, NSObject};
|
||||
|
||||
extern_class!(
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use icrate::Foundation::NSInteger;
|
||||
use objc2::encode::{Encode, Encoding};
|
||||
use objc2_foundation::NSInteger;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
|
||||
#[allow(dead_code)]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use icrate::Foundation::{CGFloat, CGPoint, NSInteger, NSObject};
|
||||
use objc2::encode::{Encode, Encoding};
|
||||
use objc2::{extern_class, extern_methods, mutability, ClassType};
|
||||
use objc2_foundation::{CGFloat, CGPoint, NSInteger, NSObject};
|
||||
|
||||
use super::UIView;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use icrate::Foundation::{NSInteger, NSObject};
|
||||
use objc2::encode::{Encode, Encoding};
|
||||
use objc2::{extern_class, extern_methods, mutability, ClassType};
|
||||
use objc2_foundation::{NSInteger, NSObject};
|
||||
|
||||
extern_class!(
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use icrate::Foundation::{CGFloat, CGRect, NSObject};
|
||||
use objc2::encode::{Encode, Encoding};
|
||||
use objc2::rc::Id;
|
||||
use objc2::{extern_class, extern_methods, msg_send_id, mutability, ClassType};
|
||||
use objc2_foundation::{CGFloat, CGRect, NSObject};
|
||||
|
||||
use super::{UICoordinateSpace, UIGestureRecognizer, UIResponder, UIViewController};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use icrate::Foundation::{NSObject, NSUInteger};
|
||||
use objc2::encode::{Encode, Encoding};
|
||||
use objc2::rc::Id;
|
||||
use objc2::{extern_class, extern_methods, msg_send_id, mutability, ClassType};
|
||||
use objc2_foundation::{NSObject, NSUInteger};
|
||||
|
||||
use super::{UIResponder, UIView};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use icrate::Foundation::NSObject;
|
||||
use objc2::rc::Id;
|
||||
use objc2::{extern_class, extern_methods, msg_send_id, mutability, ClassType};
|
||||
use objc2_foundation::NSObject;
|
||||
|
||||
use super::{UIResponder, UIScreen, UIView};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue