diff --git a/Accessibility/AXHearingUtilities.rs b/Accessibility/AXHearingUtilities.rs index 524ffae2e..5272bc2dd 100644 --- a/Accessibility/AXHearingUtilities.rs +++ b/Accessibility/AXHearingUtilities.rs @@ -6,26 +6,34 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "macos")))] pub enum AXHearingDeviceEar { + #[cfg(not(any(target_os = "macos")))] AXHearingDeviceEarNone = 0, + #[cfg(not(any(target_os = "macos")))] AXHearingDeviceEarLeft = 1 << 1, + #[cfg(not(any(target_os = "macos")))] AXHearingDeviceEarRight = 1 << 2, + #[cfg(not(any(target_os = "macos")))] AXHearingDeviceEarBoth = AXHearingDeviceEarLeft | AXHearingDeviceEarRight, } ); extern_fn!( + #[cfg(not(any(target_os = "macos")))] pub unsafe fn AXMFiHearingDeviceStreamingEar() -> AXHearingDeviceEar; ); extern_static!(AXMFiHearingDeviceStreamingEarDidChangeNotification: &'static NSNotificationName); extern_fn!( + #[cfg(not(any(target_os = "macos")))] pub unsafe fn AXSupportsBidirectionalAXMFiHearingDeviceStreaming() -> Bool; ); extern_fn!( #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSUUID"))] + #[cfg(not(any(target_os = "macos")))] pub unsafe fn AXMFiHearingDevicePairedUUIDs() -> NonNull>; ); diff --git a/AdSupport/ASIdentifierManager.rs b/AdSupport/ASIdentifierManager.rs index 59f7cbfb0..a847a961a 100644 --- a/AdSupport/ASIdentifierManager.rs +++ b/AdSupport/ASIdentifierManager.rs @@ -32,6 +32,7 @@ extern_methods!( #[method(isAdvertisingTrackingEnabled)] pub unsafe fn isAdvertisingTrackingEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios", target_os = "macos")))] #[method(clearAdvertisingIdentifier)] pub unsafe fn clearAdvertisingIdentifier(&self); } diff --git a/AppKit/AppKitErrors.rs b/AppKit/AppKitErrors.rs index 8bd60c90a..9be4e3cf7 100644 --- a/AppKit/AppKitErrors.rs +++ b/AppKit/AppKitErrors.rs @@ -7,27 +7,49 @@ use crate::Foundation::*; extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { + #[cfg(not(any(target_os = "ios")))] NSTextReadInapplicableDocumentTypeError = 65806, + #[cfg(not(any(target_os = "ios")))] NSTextWriteInapplicableDocumentTypeError = 66062, + #[cfg(not(any(target_os = "ios")))] NSTextReadWriteErrorMinimum = 65792, + #[cfg(not(any(target_os = "ios")))] NSTextReadWriteErrorMaximum = 66303, + #[cfg(not(any(target_os = "ios")))] NSFontAssetDownloadError = 66304, + #[cfg(not(any(target_os = "ios")))] NSFontErrorMinimum = 66304, + #[cfg(not(any(target_os = "ios")))] NSFontErrorMaximum = 66335, + #[cfg(not(any(target_os = "ios")))] NSServiceApplicationNotFoundError = 66560, + #[cfg(not(any(target_os = "ios")))] NSServiceApplicationLaunchFailedError = 66561, + #[cfg(not(any(target_os = "ios")))] NSServiceRequestTimedOutError = 66562, + #[cfg(not(any(target_os = "ios")))] NSServiceInvalidPasteboardDataError = 66563, + #[cfg(not(any(target_os = "ios")))] NSServiceMalformedServiceDictionaryError = 66564, + #[cfg(not(any(target_os = "ios")))] NSServiceMiscellaneousError = 66800, + #[cfg(not(any(target_os = "ios")))] NSServiceErrorMinimum = 66560, + #[cfg(not(any(target_os = "ios")))] NSServiceErrorMaximum = 66817, + #[cfg(not(any(target_os = "ios")))] NSSharingServiceNotConfiguredError = 67072, + #[cfg(not(any(target_os = "ios")))] NSSharingServiceErrorMinimum = 67072, + #[cfg(not(any(target_os = "ios")))] NSSharingServiceErrorMaximum = 67327, + #[cfg(not(any(target_os = "ios")))] NSWorkspaceAuthorizationInvalidError = 67328, + #[cfg(not(any(target_os = "ios")))] NSWorkspaceErrorMinimum = 67328, + #[cfg(not(any(target_os = "ios")))] NSWorkspaceErrorMaximum = 67455, } ); diff --git a/AppKit/NSAccessibility.rs b/AppKit/NSAccessibility.rs index 877ab615e..e2e7f5655 100644 --- a/AppKit/NSAccessibility.rs +++ b/AppKit/NSAccessibility.rs @@ -9,18 +9,23 @@ extern_methods!( /// NSWorkspaceAccessibilityDisplay #[cfg(feature = "AppKit_NSWorkspace")] unsafe impl NSWorkspace { + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityDisplayShouldIncreaseContrast)] pub unsafe fn accessibilityDisplayShouldIncreaseContrast(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityDisplayShouldDifferentiateWithoutColor)] pub unsafe fn accessibilityDisplayShouldDifferentiateWithoutColor(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityDisplayShouldReduceTransparency)] pub unsafe fn accessibilityDisplayShouldReduceTransparency(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityDisplayShouldReduceMotion)] pub unsafe fn accessibilityDisplayShouldReduceMotion(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityDisplayShouldInvertColors)] pub unsafe fn accessibilityDisplayShouldInvertColors(&self) -> bool; } @@ -30,9 +35,11 @@ extern_methods!( /// NSWorkspaceAccessibility #[cfg(feature = "AppKit_NSWorkspace")] unsafe impl NSWorkspace { + #[cfg(not(any(target_os = "ios")))] #[method(isVoiceOverEnabled)] pub unsafe fn isVoiceOverEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isSwitchControlEnabled)] pub unsafe fn isSwitchControlEnabled(&self) -> bool; } @@ -44,20 +51,24 @@ extern_static!( extern_fn!( #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilityFrameInView(parent_view: &NSView, frame: NSRect) -> NSRect; ); extern_fn!( #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilityPointInView(parent_view: &NSView, point: NSPoint) -> NSPoint; ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilitySetMayContainProtectedContent(flag: Bool) -> Bool; ); extern_fn!( #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilityRoleDescription( role: &NSAccessibilityRole, subrole: Option<&NSAccessibilitySubrole>, @@ -66,11 +77,13 @@ extern_fn!( extern_fn!( #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilityRoleDescriptionForUIElement(element: &Object) -> *mut NSString; ); extern_fn!( #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilityActionDescription( action: &NSAccessibilityActionName, ) -> *mut NSString; @@ -78,6 +91,7 @@ extern_fn!( extern_fn!( #[deprecated = "Exceptions are no longer appropriate for indicating errors in accessibility API. Unexpected values should be handled through appropriate type checking."] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilityRaiseBadArgumentException( element: Option<&Object>, attribute: Option<&NSAccessibilityAttributeName>, @@ -86,27 +100,32 @@ extern_fn!( ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilityUnignoredAncestor(element: &Object) -> *mut Object; ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilityUnignoredDescendant(element: &Object) -> *mut Object; ); extern_fn!( #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilityUnignoredChildren(original_children: &NSArray) -> NonNull; ); extern_fn!( #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilityUnignoredChildrenForOnlyChild( original_child: &Object, ) -> NonNull; ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilityPostNotification( element: &Object, notification: &NSAccessibilityNotificationName, diff --git a/AppKit/NSAccessibilityConstants.rs b/AppKit/NSAccessibilityConstants.rs index d4219c45a..7dd1091ab 100644 --- a/AppKit/NSAccessibilityConstants.rs +++ b/AppKit/NSAccessibilityConstants.rs @@ -244,9 +244,13 @@ extern_static!(NSAccessibilityAnnotationLocation: &'static NSAccessibilityAnnota ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAccessibilityAnnotationPosition { + #[cfg(not(any(target_os = "ios")))] NSAccessibilityAnnotationPositionFullRange = 0, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityAnnotationPositionStart = 1, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityAnnotationPositionEnd = 2, } ); @@ -305,9 +309,13 @@ extern_static!(NSAccessibilityExtrasMenuBarAttribute: &'static NSAccessibilityAt ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAccessibilityOrientation { + #[cfg(not(any(target_os = "ios")))] NSAccessibilityOrientationUnknown = 0, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityOrientationVertical = 1, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityOrientationHorizontal = 2, } ); @@ -417,9 +425,13 @@ extern_static!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAccessibilitySortDirection { + #[cfg(not(any(target_os = "ios")))] NSAccessibilitySortDirectionUnknown = 0, + #[cfg(not(any(target_os = "ios")))] NSAccessibilitySortDirectionAscending = 1, + #[cfg(not(any(target_os = "ios")))] NSAccessibilitySortDirectionDescending = 2, } ); @@ -498,14 +510,23 @@ extern_static!(NSAccessibilityUnknownMarkerTypeValue: &'static NSAccessibilityRu ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAccessibilityRulerMarkerType { + #[cfg(not(any(target_os = "ios")))] NSAccessibilityRulerMarkerTypeUnknown = 0, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityRulerMarkerTypeTabStopLeft = 1, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityRulerMarkerTypeTabStopRight = 2, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityRulerMarkerTypeTabStopCenter = 3, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityRulerMarkerTypeTabStopDecimal = 4, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityRulerMarkerTypeIndentHead = 5, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityRulerMarkerTypeIndentTail = 6, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityRulerMarkerTypeIndentFirstLine = 7, } ); @@ -526,11 +547,17 @@ extern_static!(NSAccessibilityUnknownUnitValue: &'static NSAccessibilityRulerUni ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAccessibilityUnits { + #[cfg(not(any(target_os = "ios")))] NSAccessibilityUnitsUnknown = 0, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityUnitsInches = 1, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityUnitsCentimeters = 2, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityUnitsPoints = 3, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityUnitsPicas = 4, } ); @@ -863,6 +890,7 @@ extern_static!(NSAccessibilityAnnouncementKey: &'static NSAccessibilityNotificat extern_fn!( #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAccessibilityPostNotificationWithUserInfo( element: &Object, notification: &NSAccessibilityNotificationName, @@ -872,9 +900,13 @@ extern_fn!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAccessibilityPriorityLevel { + #[cfg(not(any(target_os = "ios")))] NSAccessibilityPriorityLow = 10, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityPriorityMedium = 50, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityPriorityHigh = 90, } ); diff --git a/AppKit/NSAccessibilityCustomAction.rs b/AppKit/NSAccessibilityCustomAction.rs index 6cd1534dd..612e11ba2 100644 --- a/AppKit/NSAccessibilityCustomAction.rs +++ b/AppKit/NSAccessibilityCustomAction.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSAccessibilityCustomAction")] + #[cfg(not(any(target_os = "ios")))] pub struct NSAccessibilityCustomAction; #[cfg(feature = "AppKit_NSAccessibilityCustomAction")] @@ -23,6 +24,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSAccessibilityCustomAction")] unsafe impl NSAccessibilityCustomAction { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithName:handler:)] pub unsafe fn initWithName_handler( this: Option>, @@ -31,6 +33,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithName:target:selector:)] pub unsafe fn initWithName_target_selector( this: Option>, @@ -40,28 +43,36 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setName:)] pub unsafe fn setName(&self, name: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(handler)] pub unsafe fn handler(&self) -> *mut Block<(), Bool>; + #[cfg(not(any(target_os = "ios")))] #[method(setHandler:)] pub unsafe fn setHandler(&self, handler: Option<&Block<(), Bool>>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&NSObject>); + #[cfg(not(any(target_os = "ios")))] #[method(selector)] pub unsafe fn selector(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(setSelector:)] pub unsafe fn setSelector(&self, selector: Option); } diff --git a/AppKit/NSAccessibilityCustomRotor.rs b/AppKit/NSAccessibilityCustomRotor.rs index 3dd0a17f8..027f701b0 100644 --- a/AppKit/NSAccessibilityCustomRotor.rs +++ b/AppKit/NSAccessibilityCustomRotor.rs @@ -7,36 +7,62 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAccessibilityCustomRotorSearchDirection { + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorSearchDirectionPrevious = 0, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorSearchDirectionNext = 1, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAccessibilityCustomRotorType { + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeCustom = 0, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeAny = 1, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeAnnotation = 2, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeBoldText = 3, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeHeading = 4, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeHeadingLevel1 = 5, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeHeadingLevel2 = 6, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeHeadingLevel3 = 7, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeHeadingLevel4 = 8, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeHeadingLevel5 = 9, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeHeadingLevel6 = 10, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeImage = 11, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeItalicText = 12, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeLandmark = 13, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeLink = 14, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeList = 15, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeMisspelledWord = 16, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeTable = 17, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeTextField = 18, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeUnderlinedText = 19, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeVisitedLink = 20, + #[cfg(not(any(target_os = "ios")))] NSAccessibilityCustomRotorTypeAudiograph = 21, } ); @@ -44,6 +70,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSAccessibilityCustomRotor")] + #[cfg(not(any(target_os = "ios")))] pub struct NSAccessibilityCustomRotor; #[cfg(feature = "AppKit_NSAccessibilityCustomRotor")] @@ -59,6 +86,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSAccessibilityCustomRotor")] unsafe impl NSAccessibilityCustomRotor { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithLabel:itemSearchDelegate:)] pub unsafe fn initWithLabel_itemSearchDelegate( this: Option>, @@ -66,6 +94,7 @@ extern_methods!( item_search_delegate: &ProtocolObject, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithRotorType:itemSearchDelegate:)] pub unsafe fn initWithRotorType_itemSearchDelegate( this: Option>, @@ -73,25 +102,31 @@ extern_methods!( item_search_delegate: &ProtocolObject, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(type)] pub unsafe fn r#type(&self) -> NSAccessibilityCustomRotorType; + #[cfg(not(any(target_os = "ios")))] #[method(setType:)] pub unsafe fn setType(&self, r#type: NSAccessibilityCustomRotorType); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other label)] pub unsafe fn label(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setLabel:)] pub unsafe fn setLabel(&self, label: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemSearchDelegate)] pub unsafe fn itemSearchDelegate( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setItemSearchDelegate:)] pub unsafe fn setItemSearchDelegate( &self, @@ -100,11 +135,13 @@ extern_methods!( >, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemLoadingDelegate)] pub unsafe fn itemLoadingDelegate( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setItemLoadingDelegate:)] pub unsafe fn setItemLoadingDelegate( &self, @@ -116,6 +153,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSAccessibilityCustomRotorSearchParameters")] + #[cfg(not(any(target_os = "ios")))] pub struct NSAccessibilityCustomRotorSearchParameters; #[cfg(feature = "AppKit_NSAccessibilityCustomRotorSearchParameters")] @@ -131,19 +169,23 @@ extern_methods!( #[cfg(feature = "AppKit_NSAccessibilityCustomRotorSearchParameters")] unsafe impl NSAccessibilityCustomRotorSearchParameters { #[cfg(feature = "AppKit_NSAccessibilityCustomRotorItemResult")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentItem)] pub unsafe fn currentItem(&self) -> Option>; #[cfg(feature = "AppKit_NSAccessibilityCustomRotorItemResult")] + #[cfg(not(any(target_os = "ios")))] #[method(setCurrentItem:)] pub unsafe fn setCurrentItem( &self, current_item: Option<&NSAccessibilityCustomRotorItemResult>, ); + #[cfg(not(any(target_os = "ios")))] #[method(searchDirection)] pub unsafe fn searchDirection(&self) -> NSAccessibilityCustomRotorSearchDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setSearchDirection:)] pub unsafe fn setSearchDirection( &self, @@ -151,10 +193,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other filterString)] pub unsafe fn filterString(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setFilterString:)] pub unsafe fn setFilterString(&self, filter_string: &NSString); } @@ -163,6 +207,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSAccessibilityCustomRotorItemResult")] + #[cfg(not(any(target_os = "ios")))] pub struct NSAccessibilityCustomRotorItemResult; #[cfg(feature = "AppKit_NSAccessibilityCustomRotorItemResult")] @@ -177,12 +222,15 @@ unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorItemResult {} extern_methods!( #[cfg(feature = "AppKit_NSAccessibilityCustomRotorItemResult")] unsafe impl NSAccessibilityCustomRotorItemResult { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithTargetElement:)] pub unsafe fn initWithTargetElement( this: Option>, @@ -190,6 +238,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithItemLoadingToken:customLabel:)] pub unsafe fn initWithItemLoadingToken_customLabel( this: Option>, @@ -197,37 +246,45 @@ extern_methods!( custom_label: &NSString, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other targetElement)] pub unsafe fn targetElement( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemLoadingToken)] pub unsafe fn itemLoadingToken(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(targetRange)] pub unsafe fn targetRange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(setTargetRange:)] pub unsafe fn setTargetRange(&self, target_range: NSRange); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other customLabel)] pub unsafe fn customLabel(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setCustomLabel:)] pub unsafe fn setCustomLabel(&self, custom_label: Option<&NSString>); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityCustomRotorItemSearchDelegate: NSObjectProtocol { #[cfg(all( feature = "AppKit_NSAccessibilityCustomRotor", feature = "AppKit_NSAccessibilityCustomRotorItemResult", feature = "AppKit_NSAccessibilityCustomRotorSearchParameters" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other rotor:resultForSearchParameters:)] unsafe fn rotor_resultForSearchParameters( &self, diff --git a/AppKit/NSAccessibilityElement.rs b/AppKit/NSAccessibilityElement.rs index 48e1ff32a..7e5c35feb 100644 --- a/AppKit/NSAccessibilityElement.rs +++ b/AppKit/NSAccessibilityElement.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSAccessibilityElement")] + #[cfg(not(any(target_os = "ios")))] pub struct NSAccessibilityElement; #[cfg(feature = "AppKit_NSAccessibilityElement")] @@ -26,6 +27,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSAccessibilityElement")] unsafe impl NSAccessibilityElement { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityElementWithRole:frame:label:parent:)] pub unsafe fn accessibilityElementWithRole_frame_label_parent( role: &NSAccessibilityRole, @@ -34,12 +36,15 @@ extern_methods!( parent: Option<&Object>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityAddChildElement:)] pub unsafe fn accessibilityAddChildElement(&self, child_element: &NSAccessibilityElement); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityFrameInParentSpace)] pub unsafe fn accessibilityFrameInParentSpace(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityFrameInParentSpace:)] pub unsafe fn setAccessibilityFrameInParentSpace( &self, diff --git a/AppKit/NSAccessibilityProtocols.rs b/AppKit/NSAccessibilityProtocols.rs index ffc228049..3c5e1a54f 100644 --- a/AppKit/NSAccessibilityProtocols.rs +++ b/AppKit/NSAccessibilityProtocols.rs @@ -6,18 +6,23 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityElementProtocol: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityFrame)] unsafe fn accessibilityFrame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityParent)] unsafe fn accessibilityParent(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(isAccessibilityFocused)] unsafe fn isAccessibilityFocused(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilityIdentifier)] unsafe fn accessibilityIdentifier(&self) -> Id; @@ -27,17 +32,21 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityGroup: NSAccessibilityElementProtocol {} unsafe impl ProtocolType for dyn NSAccessibilityGroup {} ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityButton: NSAccessibilityElementProtocol { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityLabel)] unsafe fn accessibilityLabel(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformPress)] unsafe fn accessibilityPerformPress(&self) -> bool; } @@ -46,15 +55,19 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilitySwitch: NSAccessibilityButton { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityValue)] unsafe fn accessibilityValue(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(accessibilityPerformIncrement)] unsafe fn accessibilityPerformIncrement(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(accessibilityPerformDecrement)] unsafe fn accessibilityPerformDecrement(&self) -> bool; @@ -64,8 +77,10 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityRadioButton: NSAccessibilityButton { #[cfg(feature = "Foundation_NSNumber")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityValue)] unsafe fn accessibilityValue(&self) -> Option>; } @@ -74,8 +89,10 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityCheckBox: NSAccessibilityButton { #[cfg(feature = "Foundation_NSNumber")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityValue)] unsafe fn accessibilityValue(&self) -> Option>; } @@ -84,12 +101,15 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityStaticText: NSAccessibilityElementProtocol { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityValue)] unsafe fn accessibilityValue(&self) -> Option>; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilityAttributedStringForRange:)] unsafe fn accessibilityAttributedStringForRange( @@ -97,6 +117,7 @@ extern_protocol!( range: NSRange, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(accessibilityVisibleCharacterRange)] unsafe fn accessibilityVisibleCharacterRange(&self) -> NSRange; @@ -106,17 +127,22 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityNavigableStaticText: NSAccessibilityStaticText { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityStringForRange:)] unsafe fn accessibilityStringForRange(&self, range: NSRange) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityLineForIndex:)] unsafe fn accessibilityLineForIndex(&self, index: NSInteger) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityRangeForLine:)] unsafe fn accessibilityRangeForLine(&self, line_number: NSInteger) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityFrameForRange:)] unsafe fn accessibilityFrameForRange(&self, range: NSRange) -> NSRect; } @@ -125,8 +151,10 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityProgressIndicator: NSAccessibilityGroup { #[cfg(feature = "Foundation_NSNumber")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityValue)] unsafe fn accessibilityValue(&self) -> Option>; } @@ -135,17 +163,22 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityStepper: NSAccessibilityElementProtocol { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityLabel)] unsafe fn accessibilityLabel(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformIncrement)] unsafe fn accessibilityPerformIncrement(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformDecrement)] unsafe fn accessibilityPerformDecrement(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilityValue)] unsafe fn accessibilityValue(&self) -> Option>; @@ -155,17 +188,22 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilitySlider: NSAccessibilityElementProtocol { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityLabel)] unsafe fn accessibilityLabel(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityValue)] unsafe fn accessibilityValue(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformIncrement)] unsafe fn accessibilityPerformIncrement(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformDecrement)] unsafe fn accessibilityPerformDecrement(&self) -> bool; } @@ -174,8 +212,10 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityImage: NSAccessibilityElementProtocol { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityLabel)] unsafe fn accessibilityLabel(&self) -> Option>; } @@ -184,15 +224,19 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityContainsTransientUI: NSAccessibilityElementProtocol { + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformShowAlternateUI)] unsafe fn accessibilityPerformShowAlternateUI(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformShowDefaultUI)] unsafe fn accessibilityPerformShowDefaultUI(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityAlternateUIVisible)] unsafe fn isAccessibilityAlternateUIVisible(&self) -> bool; } @@ -201,18 +245,22 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityTable: NSAccessibilityGroup { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityLabel)] unsafe fn accessibilityLabel(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityRows)] unsafe fn accessibilityRows( &self, ) -> Option>>>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilitySelectedRows)] unsafe fn accessibilitySelectedRows( @@ -220,6 +268,7 @@ extern_protocol!( ) -> Option>>>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setAccessibilitySelectedRows:)] unsafe fn setAccessibilitySelectedRows( @@ -228,6 +277,7 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilityVisibleRows)] unsafe fn accessibilityVisibleRows( @@ -235,42 +285,50 @@ extern_protocol!( ) -> Option>>>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilityColumns)] unsafe fn accessibilityColumns(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilityVisibleColumns)] unsafe fn accessibilityVisibleColumns(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilitySelectedColumns)] unsafe fn accessibilitySelectedColumns(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilityHeaderGroup)] unsafe fn accessibilityHeaderGroup(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilitySelectedCells)] unsafe fn accessibilitySelectedCells(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilityVisibleCells)] unsafe fn accessibilityVisibleCells(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilityRowHeaderUIElements)] unsafe fn accessibilityRowHeaderUIElements(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other accessibilityColumnHeaderUIElements)] unsafe fn accessibilityColumnHeaderUIElements(&self) -> Option>; @@ -280,22 +338,27 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityOutline: NSAccessibilityTable {} unsafe impl ProtocolType for dyn NSAccessibilityOutline {} ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityList: NSAccessibilityTable {} unsafe impl ProtocolType for dyn NSAccessibilityList {} ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityRow: NSAccessibilityGroup { + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityIndex)] unsafe fn accessibilityIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(accessibilityDisclosureLevel)] unsafe fn accessibilityDisclosureLevel(&self) -> NSInteger; @@ -305,19 +368,24 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityLayoutArea: NSAccessibilityGroup { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityLabel)] unsafe fn accessibilityLabel(&self) -> Id; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityChildren)] unsafe fn accessibilityChildren(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySelectedChildren)] unsafe fn accessibilitySelectedChildren(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityFocusedUIElement)] unsafe fn accessibilityFocusedUIElement(&self) -> Id; } @@ -326,7 +394,9 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityLayoutItem: NSAccessibilityGroup { + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setAccessibilityFrame:)] unsafe fn setAccessibilityFrame(&self, frame: NSRect); @@ -336,13 +406,16 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibilityElementLoading: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityElementWithToken:)] unsafe fn accessibilityElementWithToken( &self, token: &NSAccessibilityLoadingToken, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(accessibilityRangeInTargetElementWithToken:)] unsafe fn accessibilityRangeInTargetElementWithToken( @@ -355,34 +428,45 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAccessibility: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityElement)] unsafe fn isAccessibilityElement(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityElement:)] unsafe fn setAccessibilityElement(&self, accessibility_element: bool); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityFrame)] unsafe fn accessibilityFrame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityFrame:)] unsafe fn setAccessibilityFrame(&self, accessibility_frame: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityFocused)] unsafe fn isAccessibilityFocused(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityFocused:)] unsafe fn setAccessibilityFocused(&self, accessibility_focused: bool); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityActivationPoint)] unsafe fn accessibilityActivationPoint(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityActivationPoint:)] unsafe fn setAccessibilityActivationPoint(&self, accessibility_activation_point: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityTopLevelUIElement)] unsafe fn accessibilityTopLevelUIElement(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityTopLevelUIElement:)] unsafe fn setAccessibilityTopLevelUIElement( &self, @@ -390,24 +474,30 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityURL)] unsafe fn accessibilityURL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityURL:)] unsafe fn setAccessibilityURL(&self, accessibility_url: Option<&NSURL>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityValue)] unsafe fn accessibilityValue(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityValue:)] unsafe fn setAccessibilityValue(&self, accessibility_value: Option<&Object>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityValueDescription)] unsafe fn accessibilityValueDescription(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityValueDescription:)] unsafe fn setAccessibilityValueDescription( &self, @@ -415,19 +505,23 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityVisibleChildren)] unsafe fn accessibilityVisibleChildren(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityVisibleChildren:)] unsafe fn setAccessibilityVisibleChildren( &self, accessibility_visible_children: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySubrole)] unsafe fn accessibilitySubrole(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySubrole:)] unsafe fn setAccessibilitySubrole( &self, @@ -435,16 +529,20 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityTitle)] unsafe fn accessibilityTitle(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityTitle:)] unsafe fn setAccessibilityTitle(&self, accessibility_title: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityTitleUIElement)] unsafe fn accessibilityTitleUIElement(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityTitleUIElement:)] unsafe fn setAccessibilityTitleUIElement( &self, @@ -452,45 +550,55 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityNextContents)] unsafe fn accessibilityNextContents(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityNextContents:)] unsafe fn setAccessibilityNextContents( &self, accessibility_next_contents: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityOrientation)] unsafe fn accessibilityOrientation(&self) -> NSAccessibilityOrientation; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityOrientation:)] unsafe fn setAccessibilityOrientation( &self, accessibility_orientation: NSAccessibilityOrientation, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityOverflowButton)] unsafe fn accessibilityOverflowButton(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityOverflowButton:)] unsafe fn setAccessibilityOverflowButton( &self, accessibility_overflow_button: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityParent)] unsafe fn accessibilityParent(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityParent:)] unsafe fn setAccessibilityParent(&self, accessibility_parent: Option<&Object>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityPlaceholderValue)] unsafe fn accessibilityPlaceholderValue(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityPlaceholderValue:)] unsafe fn setAccessibilityPlaceholderValue( &self, @@ -498,56 +606,70 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityPreviousContents)] unsafe fn accessibilityPreviousContents(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityPreviousContents:)] unsafe fn setAccessibilityPreviousContents( &self, accessibility_previous_contents: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityRole)] unsafe fn accessibilityRole(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityRole:)] unsafe fn setAccessibilityRole(&self, accessibility_role: Option<&NSAccessibilityRole>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityRoleDescription)] unsafe fn accessibilityRoleDescription(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityRoleDescription:)] unsafe fn setAccessibilityRoleDescription( &self, accessibility_role_description: Option<&NSString>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySearchButton)] unsafe fn accessibilitySearchButton(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySearchButton:)] unsafe fn setAccessibilitySearchButton(&self, accessibility_search_button: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySearchMenu)] unsafe fn accessibilitySearchMenu(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySearchMenu:)] unsafe fn setAccessibilitySearchMenu(&self, accessibility_search_menu: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilitySelected)] unsafe fn isAccessibilitySelected(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySelected:)] unsafe fn setAccessibilitySelected(&self, accessibility_selected: bool); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySelectedChildren)] unsafe fn accessibilitySelectedChildren(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySelectedChildren:)] unsafe fn setAccessibilitySelectedChildren( &self, @@ -555,108 +677,136 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityServesAsTitleForUIElements)] unsafe fn accessibilityServesAsTitleForUIElements(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityServesAsTitleForUIElements:)] unsafe fn setAccessibilityServesAsTitleForUIElements( &self, accessibility_serves_as_title_for_ui_elements: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityShownMenu)] unsafe fn accessibilityShownMenu(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityShownMenu:)] unsafe fn setAccessibilityShownMenu(&self, accessibility_shown_menu: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityMinValue)] unsafe fn accessibilityMinValue(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityMinValue:)] unsafe fn setAccessibilityMinValue(&self, accessibility_min_value: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityMaxValue)] unsafe fn accessibilityMaxValue(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityMaxValue:)] unsafe fn setAccessibilityMaxValue(&self, accessibility_max_value: Option<&Object>); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityLinkedUIElements)] unsafe fn accessibilityLinkedUIElements(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityLinkedUIElements:)] unsafe fn setAccessibilityLinkedUIElements( &self, accessibility_linked_ui_elements: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityWindow)] unsafe fn accessibilityWindow(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityWindow:)] unsafe fn setAccessibilityWindow(&self, accessibility_window: Option<&Object>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityIdentifier)] unsafe fn accessibilityIdentifier(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityIdentifier:)] unsafe fn setAccessibilityIdentifier(&self, accessibility_identifier: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityHelp)] unsafe fn accessibilityHelp(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityHelp:)] unsafe fn setAccessibilityHelp(&self, accessibility_help: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityFilename)] unsafe fn accessibilityFilename(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityFilename:)] unsafe fn setAccessibilityFilename(&self, accessibility_filename: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityExpanded)] unsafe fn isAccessibilityExpanded(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityExpanded:)] unsafe fn setAccessibilityExpanded(&self, accessibility_expanded: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityEdited)] unsafe fn isAccessibilityEdited(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityEdited:)] unsafe fn setAccessibilityEdited(&self, accessibility_edited: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityEnabled)] unsafe fn isAccessibilityEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityEnabled:)] unsafe fn setAccessibilityEnabled(&self, accessibility_enabled: bool); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityChildren)] unsafe fn accessibilityChildren(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityChildren:)] unsafe fn setAccessibilityChildren(&self, accessibility_children: Option<&NSArray>); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityChildrenInNavigationOrder)] unsafe fn accessibilityChildrenInNavigationOrder( &self, ) -> Option>>>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityChildrenInNavigationOrder:)] unsafe fn setAccessibilityChildrenInNavigationOrder( &self, @@ -665,43 +815,55 @@ extern_protocol!( >, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityClearButton)] unsafe fn accessibilityClearButton(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityClearButton:)] unsafe fn setAccessibilityClearButton(&self, accessibility_clear_button: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityCancelButton)] unsafe fn accessibilityCancelButton(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityCancelButton:)] unsafe fn setAccessibilityCancelButton(&self, accessibility_cancel_button: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityProtectedContent)] unsafe fn isAccessibilityProtectedContent(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityProtectedContent:)] unsafe fn setAccessibilityProtectedContent(&self, accessibility_protected_content: bool); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityContents)] unsafe fn accessibilityContents(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityContents:)] unsafe fn setAccessibilityContents(&self, accessibility_contents: Option<&NSArray>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityLabel)] unsafe fn accessibilityLabel(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityLabel:)] unsafe fn setAccessibilityLabel(&self, accessibility_label: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityAlternateUIVisible)] unsafe fn isAccessibilityAlternateUIVisible(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityAlternateUIVisible:)] unsafe fn setAccessibilityAlternateUIVisible( &self, @@ -709,19 +871,23 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySharedFocusElements)] unsafe fn accessibilitySharedFocusElements(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySharedFocusElements:)] unsafe fn setAccessibilitySharedFocusElements( &self, accessibility_shared_focus_elements: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityRequired)] unsafe fn isAccessibilityRequired(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityRequired:)] unsafe fn setAccessibilityRequired(&self, accessibility_required: bool); @@ -729,6 +895,7 @@ extern_protocol!( feature = "AppKit_NSAccessibilityCustomRotor", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityCustomRotors)] unsafe fn accessibilityCustomRotors(&self) -> Id>; @@ -736,42 +903,53 @@ extern_protocol!( feature = "AppKit_NSAccessibilityCustomRotor", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityCustomRotors:)] unsafe fn setAccessibilityCustomRotors( &self, accessibility_custom_rotors: &NSArray, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityApplicationFocusedUIElement)] unsafe fn accessibilityApplicationFocusedUIElement(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityApplicationFocusedUIElement:)] unsafe fn setAccessibilityApplicationFocusedUIElement( &self, accessibility_application_focused_ui_element: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityMainWindow)] unsafe fn accessibilityMainWindow(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityMainWindow:)] unsafe fn setAccessibilityMainWindow(&self, accessibility_main_window: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityHidden)] unsafe fn isAccessibilityHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityHidden:)] unsafe fn setAccessibilityHidden(&self, accessibility_hidden: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityFrontmost)] unsafe fn isAccessibilityFrontmost(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityFrontmost:)] unsafe fn setAccessibilityFrontmost(&self, accessibility_frontmost: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityFocusedWindow)] unsafe fn accessibilityFocusedWindow(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityFocusedWindow:)] unsafe fn setAccessibilityFocusedWindow( &self, @@ -779,57 +957,71 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityWindows)] unsafe fn accessibilityWindows(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityWindows:)] unsafe fn setAccessibilityWindows(&self, accessibility_windows: Option<&NSArray>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityExtrasMenuBar)] unsafe fn accessibilityExtrasMenuBar(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityExtrasMenuBar:)] unsafe fn setAccessibilityExtrasMenuBar( &self, accessibility_extras_menu_bar: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityMenuBar)] unsafe fn accessibilityMenuBar(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityMenuBar:)] unsafe fn setAccessibilityMenuBar(&self, accessibility_menu_bar: Option<&Object>); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityColumnTitles)] unsafe fn accessibilityColumnTitles(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityColumnTitles:)] unsafe fn setAccessibilityColumnTitles( &self, accessibility_column_titles: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityOrderedByRow)] unsafe fn isAccessibilityOrderedByRow(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityOrderedByRow:)] unsafe fn setAccessibilityOrderedByRow(&self, accessibility_ordered_by_row: bool); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityHorizontalUnits)] unsafe fn accessibilityHorizontalUnits(&self) -> NSAccessibilityUnits; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityHorizontalUnits:)] unsafe fn setAccessibilityHorizontalUnits( &self, accessibility_horizontal_units: NSAccessibilityUnits, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityVerticalUnits)] unsafe fn accessibilityVerticalUnits(&self) -> NSAccessibilityUnits; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityVerticalUnits:)] unsafe fn setAccessibilityVerticalUnits( &self, @@ -837,10 +1029,12 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityHorizontalUnitDescription)] unsafe fn accessibilityHorizontalUnitDescription(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityHorizontalUnitDescription:)] unsafe fn setAccessibilityHorizontalUnitDescription( &self, @@ -848,127 +1042,159 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityVerticalUnitDescription)] unsafe fn accessibilityVerticalUnitDescription(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityVerticalUnitDescription:)] unsafe fn setAccessibilityVerticalUnitDescription( &self, accessibility_vertical_unit_description: Option<&NSString>, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityLayoutPointForScreenPoint:)] unsafe fn accessibilityLayoutPointForScreenPoint(&self, point: NSPoint) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityLayoutSizeForScreenSize:)] unsafe fn accessibilityLayoutSizeForScreenSize(&self, size: NSSize) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityScreenPointForLayoutPoint:)] unsafe fn accessibilityScreenPointForLayoutPoint(&self, point: NSPoint) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityScreenSizeForLayoutSize:)] unsafe fn accessibilityScreenSizeForLayoutSize(&self, size: NSSize) -> NSSize; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityHandles)] unsafe fn accessibilityHandles(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityHandles:)] unsafe fn setAccessibilityHandles(&self, accessibility_handles: Option<&NSArray>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityWarningValue)] unsafe fn accessibilityWarningValue(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityWarningValue:)] unsafe fn setAccessibilityWarningValue(&self, accessibility_warning_value: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityCriticalValue)] unsafe fn accessibilityCriticalValue(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityCriticalValue:)] unsafe fn setAccessibilityCriticalValue( &self, accessibility_critical_value: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityDisclosed)] unsafe fn isAccessibilityDisclosed(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityDisclosed:)] unsafe fn setAccessibilityDisclosed(&self, accessibility_disclosed: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityDisclosedByRow)] unsafe fn accessibilityDisclosedByRow(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityDisclosedByRow:)] unsafe fn setAccessibilityDisclosedByRow( &self, accessibility_disclosed_by_row: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityDisclosedRows)] unsafe fn accessibilityDisclosedRows(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityDisclosedRows:)] unsafe fn setAccessibilityDisclosedRows( &self, accessibility_disclosed_rows: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityDisclosureLevel)] unsafe fn accessibilityDisclosureLevel(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityDisclosureLevel:)] unsafe fn setAccessibilityDisclosureLevel(&self, accessibility_disclosure_level: NSInteger); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityMarkerUIElements)] unsafe fn accessibilityMarkerUIElements(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityMarkerUIElements:)] unsafe fn setAccessibilityMarkerUIElements( &self, accessibility_marker_ui_elements: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityMarkerValues)] unsafe fn accessibilityMarkerValues(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityMarkerValues:)] unsafe fn setAccessibilityMarkerValues(&self, accessibility_marker_values: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityMarkerGroupUIElement)] unsafe fn accessibilityMarkerGroupUIElement(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityMarkerGroupUIElement:)] unsafe fn setAccessibilityMarkerGroupUIElement( &self, accessibility_marker_group_ui_element: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityUnits)] unsafe fn accessibilityUnits(&self) -> NSAccessibilityUnits; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityUnits:)] unsafe fn setAccessibilityUnits(&self, accessibility_units: NSAccessibilityUnits); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityUnitDescription)] unsafe fn accessibilityUnitDescription(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityUnitDescription:)] unsafe fn setAccessibilityUnitDescription( &self, accessibility_unit_description: Option<&NSString>, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityRulerMarkerType)] unsafe fn accessibilityRulerMarkerType(&self) -> NSAccessibilityRulerMarkerType; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityRulerMarkerType:)] unsafe fn setAccessibilityRulerMarkerType( &self, @@ -976,28 +1202,34 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityMarkerTypeDescription)] unsafe fn accessibilityMarkerTypeDescription(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityMarkerTypeDescription:)] unsafe fn setAccessibilityMarkerTypeDescription( &self, accessibility_marker_type_description: Option<&NSString>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityHorizontalScrollBar)] unsafe fn accessibilityHorizontalScrollBar(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityHorizontalScrollBar:)] unsafe fn setAccessibilityHorizontalScrollBar( &self, accessibility_horizontal_scroll_bar: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityVerticalScrollBar)] unsafe fn accessibilityVerticalScrollBar(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityVerticalScrollBar:)] unsafe fn setAccessibilityVerticalScrollBar( &self, @@ -1005,10 +1237,12 @@ extern_protocol!( ); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityAllowedValues)] unsafe fn accessibilityAllowedValues(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityAllowedValues:)] unsafe fn setAccessibilityAllowedValues( &self, @@ -1016,42 +1250,52 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityLabelUIElements)] unsafe fn accessibilityLabelUIElements(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityLabelUIElements:)] unsafe fn setAccessibilityLabelUIElements( &self, accessibility_label_ui_elements: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityLabelValue)] unsafe fn accessibilityLabelValue(&self) -> c_float; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityLabelValue:)] unsafe fn setAccessibilityLabelValue(&self, accessibility_label_value: c_float); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySplitters)] unsafe fn accessibilitySplitters(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySplitters:)] unsafe fn setAccessibilitySplitters(&self, accessibility_splitters: Option<&NSArray>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityDecrementButton)] unsafe fn accessibilityDecrementButton(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityDecrementButton:)] unsafe fn setAccessibilityDecrementButton( &self, accessibility_decrement_button: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityIncrementButton)] unsafe fn accessibilityIncrementButton(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityIncrementButton:)] unsafe fn setAccessibilityIncrementButton( &self, @@ -1059,66 +1303,84 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityTabs)] unsafe fn accessibilityTabs(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityTabs:)] unsafe fn setAccessibilityTabs(&self, accessibility_tabs: Option<&NSArray>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityHeader)] unsafe fn accessibilityHeader(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityHeader:)] unsafe fn setAccessibilityHeader(&self, accessibility_header: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityColumnCount)] unsafe fn accessibilityColumnCount(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityColumnCount:)] unsafe fn setAccessibilityColumnCount(&self, accessibility_column_count: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityRowCount)] unsafe fn accessibilityRowCount(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityRowCount:)] unsafe fn setAccessibilityRowCount(&self, accessibility_row_count: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityIndex)] unsafe fn accessibilityIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityIndex:)] unsafe fn setAccessibilityIndex(&self, accessibility_index: NSInteger); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityColumns)] unsafe fn accessibilityColumns(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityColumns:)] unsafe fn setAccessibilityColumns(&self, accessibility_columns: Option<&NSArray>); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityRows)] unsafe fn accessibilityRows(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityRows:)] unsafe fn setAccessibilityRows(&self, accessibility_rows: Option<&NSArray>); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityVisibleRows)] unsafe fn accessibilityVisibleRows(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityVisibleRows:)] unsafe fn setAccessibilityVisibleRows(&self, accessibility_visible_rows: Option<&NSArray>); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySelectedRows)] unsafe fn accessibilitySelectedRows(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySelectedRows:)] unsafe fn setAccessibilitySelectedRows( &self, @@ -1126,10 +1388,12 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityVisibleColumns)] unsafe fn accessibilityVisibleColumns(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityVisibleColumns:)] unsafe fn setAccessibilityVisibleColumns( &self, @@ -1137,19 +1401,23 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySelectedColumns)] unsafe fn accessibilitySelectedColumns(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySelectedColumns:)] unsafe fn setAccessibilitySelectedColumns( &self, accessibility_selected_columns: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilitySortDirection)] unsafe fn accessibilitySortDirection(&self) -> NSAccessibilitySortDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySortDirection:)] unsafe fn setAccessibilitySortDirection( &self, @@ -1157,10 +1425,12 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityRowHeaderUIElements)] unsafe fn accessibilityRowHeaderUIElements(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityRowHeaderUIElements:)] unsafe fn setAccessibilityRowHeaderUIElements( &self, @@ -1168,10 +1438,12 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySelectedCells)] unsafe fn accessibilitySelectedCells(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySelectedCells:)] unsafe fn setAccessibilitySelectedCells( &self, @@ -1179,10 +1451,12 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityVisibleCells)] unsafe fn accessibilityVisibleCells(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityVisibleCells:)] unsafe fn setAccessibilityVisibleCells( &self, @@ -1190,16 +1464,19 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityColumnHeaderUIElements)] unsafe fn accessibilityColumnHeaderUIElements(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityColumnHeaderUIElements:)] unsafe fn setAccessibilityColumnHeaderUIElements( &self, accessibility_column_header_ui_elements: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityCellForColumn:row:)] unsafe fn accessibilityCellForColumn_row( &self, @@ -1207,33 +1484,41 @@ extern_protocol!( row: NSInteger, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityRowIndexRange)] unsafe fn accessibilityRowIndexRange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityRowIndexRange:)] unsafe fn setAccessibilityRowIndexRange(&self, accessibility_row_index_range: NSRange); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityColumnIndexRange)] unsafe fn accessibilityColumnIndexRange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityColumnIndexRange:)] unsafe fn setAccessibilityColumnIndexRange( &self, accessibility_column_index_range: NSRange, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityInsertionPointLineNumber)] unsafe fn accessibilityInsertionPointLineNumber(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityInsertionPointLineNumber:)] unsafe fn setAccessibilityInsertionPointLineNumber( &self, accessibility_insertion_point_line_number: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilitySharedCharacterRange)] unsafe fn accessibilitySharedCharacterRange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySharedCharacterRange:)] unsafe fn setAccessibilitySharedCharacterRange( &self, @@ -1241,28 +1526,34 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySharedTextUIElements)] unsafe fn accessibilitySharedTextUIElements(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySharedTextUIElements:)] unsafe fn setAccessibilitySharedTextUIElements( &self, accessibility_shared_text_ui_elements: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityVisibleCharacterRange)] unsafe fn accessibilityVisibleCharacterRange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityVisibleCharacterRange:)] unsafe fn setAccessibilityVisibleCharacterRange( &self, accessibility_visible_character_range: NSRange, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityNumberOfCharacters)] unsafe fn accessibilityNumberOfCharacters(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityNumberOfCharacters:)] unsafe fn setAccessibilityNumberOfCharacters( &self, @@ -1270,19 +1561,23 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySelectedText)] unsafe fn accessibilitySelectedText(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySelectedText:)] unsafe fn setAccessibilitySelectedText( &self, accessibility_selected_text: Option<&NSString>, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilitySelectedTextRange)] unsafe fn accessibilitySelectedTextRange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySelectedTextRange:)] unsafe fn setAccessibilitySelectedTextRange( &self, @@ -1290,10 +1585,12 @@ extern_protocol!( ); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilitySelectedTextRanges)] unsafe fn accessibilitySelectedTextRanges(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilitySelectedTextRanges:)] unsafe fn setAccessibilitySelectedTextRanges( &self, @@ -1301,121 +1598,154 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityAttributedStringForRange:)] unsafe fn accessibilityAttributedStringForRange( &self, range: NSRange, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityRangeForLine:)] unsafe fn accessibilityRangeForLine(&self, line: NSInteger) -> NSRange; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityStringForRange:)] unsafe fn accessibilityStringForRange(&self, range: NSRange) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityRangeForPosition:)] unsafe fn accessibilityRangeForPosition(&self, point: NSPoint) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityRangeForIndex:)] unsafe fn accessibilityRangeForIndex(&self, index: NSInteger) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityFrameForRange:)] unsafe fn accessibilityFrameForRange(&self, range: NSRange) -> NSRect; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityRTFForRange:)] unsafe fn accessibilityRTFForRange(&self, range: NSRange) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityStyleRangeForIndex:)] unsafe fn accessibilityStyleRangeForIndex(&self, index: NSInteger) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityLineForIndex:)] unsafe fn accessibilityLineForIndex(&self, index: NSInteger) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityToolbarButton)] unsafe fn accessibilityToolbarButton(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityToolbarButton:)] unsafe fn setAccessibilityToolbarButton( &self, accessibility_toolbar_button: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityModal)] unsafe fn isAccessibilityModal(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityModal:)] unsafe fn setAccessibilityModal(&self, accessibility_modal: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityProxy)] unsafe fn accessibilityProxy(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityProxy:)] unsafe fn setAccessibilityProxy(&self, accessibility_proxy: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityMain)] unsafe fn isAccessibilityMain(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityMain:)] unsafe fn setAccessibilityMain(&self, accessibility_main: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityFullScreenButton)] unsafe fn accessibilityFullScreenButton(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityFullScreenButton:)] unsafe fn setAccessibilityFullScreenButton( &self, accessibility_full_screen_button: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityGrowArea)] unsafe fn accessibilityGrowArea(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityGrowArea:)] unsafe fn setAccessibilityGrowArea(&self, accessibility_grow_area: Option<&Object>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityDocument)] unsafe fn accessibilityDocument(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityDocument:)] unsafe fn setAccessibilityDocument(&self, accessibility_document: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityDefaultButton)] unsafe fn accessibilityDefaultButton(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityDefaultButton:)] unsafe fn setAccessibilityDefaultButton( &self, accessibility_default_button: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityCloseButton)] unsafe fn accessibilityCloseButton(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityCloseButton:)] unsafe fn setAccessibilityCloseButton(&self, accessibility_close_button: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityZoomButton)] unsafe fn accessibilityZoomButton(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityZoomButton:)] unsafe fn setAccessibilityZoomButton(&self, accessibility_zoom_button: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityMinimizeButton)] unsafe fn accessibilityMinimizeButton(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityMinimizeButton:)] unsafe fn setAccessibilityMinimizeButton( &self, accessibility_minimize_button: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilityMinimized)] unsafe fn isAccessibilityMinimized(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityMinimized:)] unsafe fn setAccessibilityMinimized(&self, accessibility_minimized: bool); @@ -1423,6 +1753,7 @@ extern_protocol!( feature = "AppKit_NSAccessibilityCustomAction", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityCustomActions)] unsafe fn accessibilityCustomActions( &self, @@ -1432,45 +1763,58 @@ extern_protocol!( feature = "AppKit_NSAccessibilityCustomAction", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityCustomActions:)] unsafe fn setAccessibilityCustomActions( &self, accessibility_custom_actions: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformCancel)] unsafe fn accessibilityPerformCancel(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformConfirm)] unsafe fn accessibilityPerformConfirm(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformDecrement)] unsafe fn accessibilityPerformDecrement(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformDelete)] unsafe fn accessibilityPerformDelete(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformIncrement)] unsafe fn accessibilityPerformIncrement(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformPick)] unsafe fn accessibilityPerformPick(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformPress)] unsafe fn accessibilityPerformPress(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformRaise)] unsafe fn accessibilityPerformRaise(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformShowAlternateUI)] unsafe fn accessibilityPerformShowAlternateUI(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformShowDefaultUI)] unsafe fn accessibilityPerformShowDefaultUI(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(accessibilityPerformShowMenu)] unsafe fn accessibilityPerformShowMenu(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isAccessibilitySelectorAllowed:)] unsafe fn isAccessibilitySelectorAllowed(&self, selector: Sel) -> bool; } diff --git a/AppKit/NSActionCell.rs b/AppKit/NSActionCell.rs index 9f512651d..2fbe69023 100644 --- a/AppKit/NSActionCell.rs +++ b/AppKit/NSActionCell.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSActionCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSActionCell; #[cfg(feature = "AppKit_NSActionCell")] @@ -35,21 +36,27 @@ unsafe impl NSUserInterfaceItemIdentification for NSActionCell {} extern_methods!( #[cfg(feature = "AppKit_NSActionCell")] unsafe impl NSActionCell { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(action)] pub unsafe fn action(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[cfg(not(any(target_os = "ios")))] #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); } @@ -60,10 +67,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSActionCell")] unsafe impl NSActionCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSAffineTransform.rs b/AppKit/NSAffineTransform.rs index 882450f74..7e729117f 100644 --- a/AppKit/NSAffineTransform.rs +++ b/AppKit/NSAffineTransform.rs @@ -10,12 +10,15 @@ extern_methods!( #[cfg(feature = "Foundation_NSAffineTransform")] unsafe impl NSAffineTransform { #[cfg(feature = "AppKit_NSBezierPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other transformBezierPath:)] pub unsafe fn transformBezierPath(&self, path: &NSBezierPath) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(set)] pub unsafe fn set(&self); + #[cfg(not(any(target_os = "ios")))] #[method(concat)] pub unsafe fn concat(&self); } diff --git a/AppKit/NSAlert.rs b/AppKit/NSAlert.rs index 60788b7d9..6a1ab61f1 100644 --- a/AppKit/NSAlert.rs +++ b/AppKit/NSAlert.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAlertStyle { + #[cfg(not(any(target_os = "ios")))] NSAlertStyleWarning = 0, + #[cfg(not(any(target_os = "ios")))] NSAlertStyleInformational = 1, + #[cfg(not(any(target_os = "ios")))] NSAlertStyleCritical = 2, } ); @@ -23,6 +27,7 @@ extern_static!(NSAlertThirdButtonReturn: NSModalResponse = 1002); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSAlert")] + #[cfg(not(any(target_os = "ios")))] pub struct NSAlert; #[cfg(feature = "AppKit_NSAlert")] @@ -38,90 +43,115 @@ extern_methods!( #[cfg(feature = "AppKit_NSAlert")] unsafe impl NSAlert { #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alertWithError:)] pub unsafe fn alertWithError(error: &NSError) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other messageText)] pub unsafe fn messageText(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setMessageText:)] pub unsafe fn setMessageText(&self, message_text: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other informativeText)] pub unsafe fn informativeText(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setInformativeText:)] pub unsafe fn setInformativeText(&self, informative_text: &NSString); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other icon)] pub unsafe fn icon(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setIcon:)] pub unsafe fn setIcon(&self, icon: Option<&NSImage>); #[cfg(all(feature = "AppKit_NSButton", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other addButtonWithTitle:)] pub unsafe fn addButtonWithTitle(&self, title: &NSString) -> Id; #[cfg(all(feature = "AppKit_NSButton", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttons)] pub unsafe fn buttons(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(showsHelp)] pub unsafe fn showsHelp(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsHelp:)] pub unsafe fn setShowsHelp(&self, shows_help: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other helpAnchor)] pub unsafe fn helpAnchor(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setHelpAnchor:)] pub unsafe fn setHelpAnchor(&self, help_anchor: Option<&NSHelpAnchorName>); + #[cfg(not(any(target_os = "ios")))] #[method(alertStyle)] pub unsafe fn alertStyle(&self) -> NSAlertStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setAlertStyle:)] pub unsafe fn setAlertStyle(&self, alert_style: NSAlertStyle); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[method(showsSuppressionButton)] pub unsafe fn showsSuppressionButton(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsSuppressionButton:)] pub unsafe fn setShowsSuppressionButton(&self, shows_suppression_button: bool); #[cfg(feature = "AppKit_NSButton")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other suppressionButton)] pub unsafe fn suppressionButton(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessory_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(layout)] pub unsafe fn layout(&self); + #[cfg(not(any(target_os = "ios")))] #[method(runModal)] pub unsafe fn runModal(&self) -> NSModalResponse; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(beginSheetModalForWindow:completionHandler:)] pub unsafe fn beginSheetModalForWindow_completionHandler( &self, @@ -130,14 +160,17 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other window)] pub unsafe fn window(&self) -> Id; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAlertDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSAlert")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(alertShowHelp:)] unsafe fn alertShowHelp(&self, alert: &NSAlert) -> bool; @@ -152,6 +185,7 @@ extern_methods!( unsafe impl NSAlert { #[cfg(feature = "AppKit_NSWindow")] #[deprecated = "Use -beginSheetModalForWindow:completionHandler: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:)] pub unsafe fn beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo( &self, diff --git a/AppKit/NSAlignmentFeedbackFilter.rs b/AppKit/NSAlignmentFeedbackFilter.rs index 70477d4f8..de04cb181 100644 --- a/AppKit/NSAlignmentFeedbackFilter.rs +++ b/AppKit/NSAlignmentFeedbackFilter.rs @@ -14,6 +14,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSAlignmentFeedbackFilter")] + #[cfg(not(any(target_os = "ios")))] pub struct NSAlignmentFeedbackFilter; #[cfg(feature = "AppKit_NSAlignmentFeedbackFilter")] @@ -28,18 +29,22 @@ unsafe impl NSObjectProtocol for NSAlignmentFeedbackFilter {} extern_methods!( #[cfg(feature = "AppKit_NSAlignmentFeedbackFilter")] unsafe impl NSAlignmentFeedbackFilter { + #[cfg(not(any(target_os = "ios")))] #[method(inputEventMask)] pub unsafe fn inputEventMask() -> NSEventMask; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(updateWithEvent:)] pub unsafe fn updateWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSPanGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] #[method(updateWithPanRecognizer:)] pub unsafe fn updateWithPanRecognizer(&self, pan_recognizer: &NSPanGestureRecognizer); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alignmentFeedbackTokenForMovementInView:previousPoint:alignedPoint:defaultPoint:)] pub unsafe fn alignmentFeedbackTokenForMovementInView_previousPoint_alignedPoint_defaultPoint( &self, @@ -50,6 +55,7 @@ extern_methods!( ) -> Option>>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alignmentFeedbackTokenForHorizontalMovementInView:previousX:alignedX:defaultX:)] pub unsafe fn alignmentFeedbackTokenForHorizontalMovementInView_previousX_alignedX_defaultX( &self, @@ -60,6 +66,7 @@ extern_methods!( ) -> Option>>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alignmentFeedbackTokenForVerticalMovementInView:previousY:alignedY:defaultY:)] pub unsafe fn alignmentFeedbackTokenForVerticalMovementInView_previousY_alignedY_defaultY( &self, @@ -70,6 +77,7 @@ extern_methods!( ) -> Option>>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(performFeedback:performanceTime:)] pub unsafe fn performFeedback_performanceTime( &self, diff --git a/AppKit/NSAnimation.rs b/AppKit/NSAnimation.rs index 508448618..dcb4e0849 100644 --- a/AppKit/NSAnimation.rs +++ b/AppKit/NSAnimation.rs @@ -7,19 +7,28 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAnimationCurve { + #[cfg(not(any(target_os = "ios")))] NSAnimationEaseInOut = 0, + #[cfg(not(any(target_os = "ios")))] NSAnimationEaseIn = 1, + #[cfg(not(any(target_os = "ios")))] NSAnimationEaseOut = 2, + #[cfg(not(any(target_os = "ios")))] NSAnimationLinear = 3, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAnimationBlockingMode { + #[cfg(not(any(target_os = "ios")))] NSAnimationBlocking = 0, + #[cfg(not(any(target_os = "ios")))] NSAnimationNonblocking = 1, + #[cfg(not(any(target_os = "ios")))] NSAnimationNonblockingThreaded = 2, } ); @@ -33,6 +42,7 @@ extern_static!(NSAnimationProgressMark: &'static NSString); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSAnimation")] + #[cfg(not(any(target_os = "ios")))] pub struct NSAnimation; #[cfg(feature = "AppKit_NSAnimation")] @@ -50,6 +60,7 @@ unsafe impl NSObjectProtocol for NSAnimation {} extern_methods!( #[cfg(feature = "AppKit_NSAnimation")] unsafe impl NSAnimation { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithDuration:animationCurve:)] pub unsafe fn initWithDuration_animationCurve( this: Option>, @@ -58,60 +69,77 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(startAnimation)] pub unsafe fn startAnimation(&self); + #[cfg(not(any(target_os = "ios")))] #[method(stopAnimation)] pub unsafe fn stopAnimation(&self); + #[cfg(not(any(target_os = "ios")))] #[method(isAnimating)] pub unsafe fn isAnimating(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(currentProgress)] pub unsafe fn currentProgress(&self) -> NSAnimationProgress; + #[cfg(not(any(target_os = "ios")))] #[method(setCurrentProgress:)] pub unsafe fn setCurrentProgress(&self, current_progress: NSAnimationProgress); + #[cfg(not(any(target_os = "ios")))] #[method(duration)] pub unsafe fn duration(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(setDuration:)] pub unsafe fn setDuration(&self, duration: NSTimeInterval); + #[cfg(not(any(target_os = "ios")))] #[method(animationBlockingMode)] pub unsafe fn animationBlockingMode(&self) -> NSAnimationBlockingMode; + #[cfg(not(any(target_os = "ios")))] #[method(setAnimationBlockingMode:)] pub unsafe fn setAnimationBlockingMode( &self, animation_blocking_mode: NSAnimationBlockingMode, ); + #[cfg(not(any(target_os = "ios")))] #[method(frameRate)] pub unsafe fn frameRate(&self) -> c_float; + #[cfg(not(any(target_os = "ios")))] #[method(setFrameRate:)] pub unsafe fn setFrameRate(&self, frame_rate: c_float); + #[cfg(not(any(target_os = "ios")))] #[method(animationCurve)] pub unsafe fn animationCurve(&self) -> NSAnimationCurve; + #[cfg(not(any(target_os = "ios")))] #[method(setAnimationCurve:)] pub unsafe fn setAnimationCurve(&self, animation_curve: NSAnimationCurve); + #[cfg(not(any(target_os = "ios")))] #[method(currentValue)] pub unsafe fn currentValue(&self) -> c_float; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -119,19 +147,24 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other progressMarks)] pub unsafe fn progressMarks(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))] + #[cfg(not(any(target_os = "ios")))] #[method(setProgressMarks:)] pub unsafe fn setProgressMarks(&self, progress_marks: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(addProgressMark:)] pub unsafe fn addProgressMark(&self, progress_mark: NSAnimationProgress); + #[cfg(not(any(target_os = "ios")))] #[method(removeProgressMark:)] pub unsafe fn removeProgressMark(&self, progress_mark: NSAnimationProgress); + #[cfg(not(any(target_os = "ios")))] #[method(startWhenAnimation:reachesProgress:)] pub unsafe fn startWhenAnimation_reachesProgress( &self, @@ -139,6 +172,7 @@ extern_methods!( start_progress: NSAnimationProgress, ); + #[cfg(not(any(target_os = "ios")))] #[method(stopWhenAnimation:reachesProgress:)] pub unsafe fn stopWhenAnimation_reachesProgress( &self, @@ -146,36 +180,44 @@ extern_methods!( stop_progress: NSAnimationProgress, ); + #[cfg(not(any(target_os = "ios")))] #[method(clearStartAnimation)] pub unsafe fn clearStartAnimation(&self); + #[cfg(not(any(target_os = "ios")))] #[method(clearStopAnimation)] pub unsafe fn clearStopAnimation(&self); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other runLoopModesForAnimating)] pub unsafe fn runLoopModesForAnimating(&self) -> Option>>; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAnimationDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSAnimation")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(animationShouldStart:)] unsafe fn animationShouldStart(&self, animation: &NSAnimation) -> bool; #[cfg(feature = "AppKit_NSAnimation")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(animationDidStop:)] unsafe fn animationDidStop(&self, animation: &NSAnimation); #[cfg(feature = "AppKit_NSAnimation")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(animationDidEnd:)] unsafe fn animationDidEnd(&self, animation: &NSAnimation); #[cfg(feature = "AppKit_NSAnimation")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(animation:valueForProgress:)] unsafe fn animation_valueForProgress( @@ -185,6 +227,7 @@ extern_protocol!( ) -> c_float; #[cfg(feature = "AppKit_NSAnimation")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(animation:didReachProgressMark:)] unsafe fn animation_didReachProgressMark( @@ -220,6 +263,7 @@ extern_static!(NSViewAnimationFadeOutEffect: &'static NSViewAnimationEffectName) extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSViewAnimation")] + #[cfg(not(any(target_os = "ios")))] pub struct NSViewAnimation; #[cfg(feature = "AppKit_NSViewAnimation")] @@ -239,6 +283,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSViewAnimation")] unsafe impl NSViewAnimation { #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSDictionary"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithViewAnimations:)] pub unsafe fn initWithViewAnimations( this: Option>, @@ -246,12 +291,14 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSDictionary"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other viewAnimations)] pub unsafe fn viewAnimations( &self, ) -> Id>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSDictionary"))] + #[cfg(not(any(target_os = "ios")))] #[method(setViewAnimations:)] pub unsafe fn setViewAnimations( &self, @@ -264,20 +311,25 @@ pub type NSAnimatablePropertyKey = NSString; extern_protocol!( pub unsafe trait NSAnimatablePropertyContainer { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other animator)] unsafe fn animator(&self) -> Id; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other animations)] unsafe fn animations(&self) -> Id>; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(setAnimations:)] unsafe fn setAnimations(&self, animations: &NSDictionary); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other animationForKey:)] unsafe fn animationForKey(&self, key: &NSAnimatablePropertyKey) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultAnimationForKey:)] unsafe fn defaultAnimationForKey(key: &NSAnimatablePropertyKey) -> Option>; } @@ -293,6 +345,7 @@ extern_methods!( /// Methods declared on superclass `NSAnimation` #[cfg(feature = "AppKit_NSViewAnimation")] unsafe impl NSViewAnimation { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithDuration:animationCurve:)] pub unsafe fn initWithDuration_animationCurve( this: Option>, diff --git a/AppKit/NSAnimationContext.rs b/AppKit/NSAnimationContext.rs index 53edd7fd2..f333d5119 100644 --- a/AppKit/NSAnimationContext.rs +++ b/AppKit/NSAnimationContext.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSAnimationContext")] + #[cfg(not(any(target_os = "ios")))] pub struct NSAnimationContext; #[cfg(feature = "AppKit_NSAnimationContext")] @@ -22,39 +23,50 @@ unsafe impl NSObjectProtocol for NSAnimationContext {} extern_methods!( #[cfg(feature = "AppKit_NSAnimationContext")] unsafe impl NSAnimationContext { + #[cfg(not(any(target_os = "ios")))] #[method(runAnimationGroup:completionHandler:)] pub unsafe fn runAnimationGroup_completionHandler( changes: &Block<(NonNull,), ()>, completion_handler: Option<&Block<(), ()>>, ); + #[cfg(not(any(target_os = "ios")))] #[method(runAnimationGroup:)] pub unsafe fn runAnimationGroup(changes: &Block<(NonNull,), ()>); + #[cfg(not(any(target_os = "ios")))] #[method(beginGrouping)] pub unsafe fn beginGrouping(); + #[cfg(not(any(target_os = "ios")))] #[method(endGrouping)] pub unsafe fn endGrouping(); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentContext)] pub unsafe fn currentContext() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(duration)] pub unsafe fn duration(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(setDuration:)] pub unsafe fn setDuration(&self, duration: NSTimeInterval); + #[cfg(not(any(target_os = "ios")))] #[method(completionHandler)] pub unsafe fn completionHandler(&self) -> *mut Block<(), ()>; + #[cfg(not(any(target_os = "ios")))] #[method(setCompletionHandler:)] pub unsafe fn setCompletionHandler(&self, completion_handler: Option<&Block<(), ()>>); + #[cfg(not(any(target_os = "ios")))] #[method(allowsImplicitAnimation)] pub unsafe fn allowsImplicitAnimation(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsImplicitAnimation:)] pub unsafe fn setAllowsImplicitAnimation(&self, allows_implicit_animation: bool); } diff --git a/AppKit/NSAppearance.rs b/AppKit/NSAppearance.rs index 8e721a00e..edf91d902 100644 --- a/AppKit/NSAppearance.rs +++ b/AppKit/NSAppearance.rs @@ -12,6 +12,7 @@ typed_extensible_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSAppearance")] + #[cfg(not(any(target_os = "ios")))] pub struct NSAppearance; #[cfg(feature = "AppKit_NSAppearance")] @@ -32,27 +33,34 @@ unsafe impl NSSecureCoding for NSAppearance {} extern_methods!( #[cfg(feature = "AppKit_NSAppearance")] unsafe impl NSAppearance { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; #[deprecated = "Use -performAsCurrentDrawingAppearance: to temporarily set the drawing appearance, or +currentDrawingAppearance to access the currently drawing appearance."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentAppearance)] pub unsafe fn currentAppearance() -> Option>; #[deprecated = "Use -performAsCurrentDrawingAppearance: to temporarily set the drawing appearance, or +currentDrawingAppearance to access the currently drawing appearance."] + #[cfg(not(any(target_os = "ios")))] #[method(setCurrentAppearance:)] pub unsafe fn setCurrentAppearance(current_appearance: Option<&NSAppearance>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentDrawingAppearance)] pub unsafe fn currentDrawingAppearance() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(performAsCurrentDrawingAppearance:)] pub unsafe fn performAsCurrentDrawingAppearance(&self, block: &Block<(), ()>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other appearanceNamed:)] pub unsafe fn appearanceNamed(name: &NSAppearanceName) -> Option>; #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithAppearanceNamed:bundle:)] pub unsafe fn initWithAppearanceNamed_bundle( this: Option>, @@ -61,16 +69,19 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(allowsVibrancy)] pub unsafe fn allowsVibrancy(&self) -> bool; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bestMatchFromAppearancesWithNames:)] pub unsafe fn bestMatchFromAppearancesWithNames( &self, @@ -98,16 +109,20 @@ extern_static!(NSAppearanceNameAccessibilityHighContrastVibrantLight: &'static N extern_static!(NSAppearanceNameAccessibilityHighContrastVibrantDark: &'static NSAppearanceName); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSAppearanceCustomization: NSObjectProtocol { #[cfg(feature = "AppKit_NSAppearance")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other appearance)] unsafe fn appearance(&self) -> Option>; #[cfg(feature = "AppKit_NSAppearance")] + #[cfg(not(any(target_os = "ios")))] #[method(setAppearance:)] unsafe fn setAppearance(&self, appearance: Option<&NSAppearance>); #[cfg(feature = "AppKit_NSAppearance")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other effectiveAppearance)] unsafe fn effectiveAppearance(&self) -> Id; } diff --git a/AppKit/NSAppleScriptExtensions.rs b/AppKit/NSAppleScriptExtensions.rs index d24ffadfc..691b0dabf 100644 --- a/AppKit/NSAppleScriptExtensions.rs +++ b/AppKit/NSAppleScriptExtensions.rs @@ -10,6 +10,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSAppleScript")] unsafe impl NSAppleScript { #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other richTextSource)] pub unsafe fn richTextSource(&self) -> Option>; } diff --git a/AppKit/NSApplication.rs b/AppKit/NSApplication.rs index f99a74625..2d0c6eb76 100644 --- a/AppKit/NSApplication.rs +++ b/AppKit/NSApplication.rs @@ -83,7 +83,7 @@ extern_static!(NSAppKitVersionNumber10_11_3: NSAppKitVersion = 1404.34); extern_static!(NSAppKitVersionNumber10_12: NSAppKitVersion = 1504); -extern_static!(NSAppKitVersionNumber10_12_1: NSAppKitVersion = 1504.6); +extern_static!(NSAppKitVersionNumber10_12_1: NSAppKitVersion = 1504.60); extern_static!(NSAppKitVersionNumber10_12_2: NSAppKitVersion = 1504.76); @@ -131,24 +131,6 @@ extern_static!(NSAppKitVersionNumber11_3: NSAppKitVersion = 2022.4); extern_static!(NSAppKitVersionNumber11_4: NSAppKitVersion = 2022.5); -extern_static!(NSAppKitVersionNumber11_5: NSAppKitVersion = 2022.6); - -extern_static!(NSAppKitVersionNumber12_0: NSAppKitVersion = 2113); - -extern_static!(NSAppKitVersionNumber12_1: NSAppKitVersion = 2113.2); - -extern_static!(NSAppKitVersionNumber12_2: NSAppKitVersion = 2113.3); - -extern_static!(NSAppKitVersionNumber12_3: NSAppKitVersion = 2113.4); - -extern_static!(NSAppKitVersionNumber12_4: NSAppKitVersion = 2113.5); - -extern_static!(NSAppKitVersionNumber12_5: NSAppKitVersion = 2113.6); - -extern_static!(NSAppKitVersionNumber13_0: NSAppKitVersion = 2299); - -extern_static!(NSAppKitVersionNumber13_1: NSAppKitVersion = 2299.3); - extern_static!(NSModalPanelRunLoopMode: &'static NSRunLoopMode); extern_static!(NSEventTrackingRunLoopMode: &'static NSRunLoopMode); @@ -165,41 +147,62 @@ extern_static!(NSModalResponseContinue: NSModalResponse = -1002); extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { + #[cfg(not(any(target_os = "ios")))] NSUpdateWindowsRunLoopOrdering = 500000, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSApplicationPresentationOptions { + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationAutoHideDock = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationHideDock = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationAutoHideMenuBar = 1 << 2, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationHideMenuBar = 1 << 3, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationDisableAppleMenu = 1 << 4, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationDisableProcessSwitching = 1 << 5, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationDisableForceQuit = 1 << 6, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationDisableSessionTermination = 1 << 7, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationDisableHideApplication = 1 << 8, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationDisableMenuBarTransparency = 1 << 9, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationFullScreen = 1 << 10, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationAutoHideToolbar = 1 << 11, + #[cfg(not(any(target_os = "ios")))] NSApplicationPresentationDisableCursorLocationAssistance = 1 << 12, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSApplicationOcclusionState { + #[cfg(not(any(target_os = "ios")))] NSApplicationOcclusionStateVisible = 1 << 1, } ); ns_options!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowListOptions { + #[cfg(not(any(target_os = "ios")))] NSWindowListOrderedFrontToBack = 1 << 0, } ); @@ -210,17 +213,24 @@ extern_static!(NSApp: Option<&'static NSApplication>); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSRequestUserAttentionType { + #[cfg(not(any(target_os = "ios")))] NSCriticalRequest = 0, + #[cfg(not(any(target_os = "ios")))] NSInformationalRequest = 10, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSApplicationDelegateReply { + #[cfg(not(any(target_os = "ios")))] NSApplicationDelegateReplySuccess = 0, + #[cfg(not(any(target_os = "ios")))] NSApplicationDelegateReplyCancel = 1, + #[cfg(not(any(target_os = "ios")))] NSApplicationDelegateReplyFailure = 2, } ); @@ -228,6 +238,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSApplication")] + #[cfg(not(any(target_os = "ios")))] pub struct NSApplication; #[cfg(feature = "AppKit_NSApplication")] @@ -258,109 +269,140 @@ unsafe impl NSUserInterfaceValidations for NSApplication {} extern_methods!( #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedApplication)] pub unsafe fn sharedApplication() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(hide:)] pub unsafe fn hide(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(unhide:)] pub unsafe fn unhide(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(unhideWithoutActivation)] pub unsafe fn unhideWithoutActivation(&self); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowWithWindowNumber:)] pub unsafe fn windowWithWindowNumber(&self, window_num: NSInteger) -> Option>; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mainWindow)] pub unsafe fn mainWindow(&self) -> Option>; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other keyWindow)] pub unsafe fn keyWindow(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(isActive)] pub unsafe fn isActive(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isRunning)] pub unsafe fn isRunning(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(deactivate)] pub unsafe fn deactivate(&self); + #[cfg(not(any(target_os = "ios")))] #[method(activateIgnoringOtherApps:)] pub unsafe fn activateIgnoringOtherApps(&self, flag: bool); + #[cfg(not(any(target_os = "ios")))] #[method(hideOtherApplications:)] pub unsafe fn hideOtherApplications(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(unhideAllApplications:)] pub unsafe fn unhideAllApplications(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(finishLaunching)] pub unsafe fn finishLaunching(&self); + #[cfg(not(any(target_os = "ios")))] #[method(run)] pub unsafe fn run(&self); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(runModalForWindow:)] pub unsafe fn runModalForWindow(&self, window: &NSWindow) -> NSModalResponse; + #[cfg(not(any(target_os = "ios")))] #[method(stop:)] pub unsafe fn stop(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(stopModal)] pub unsafe fn stopModal(&self); + #[cfg(not(any(target_os = "ios")))] #[method(stopModalWithCode:)] pub unsafe fn stopModalWithCode(&self, return_code: NSModalResponse); + #[cfg(not(any(target_os = "ios")))] #[method(abortModal)] pub unsafe fn abortModal(&self); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other modalWindow)] pub unsafe fn modalWindow(&self) -> Option>; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(beginModalSessionForWindow:)] pub unsafe fn beginModalSessionForWindow(&self, window: &NSWindow) -> NSModalSession; + #[cfg(not(any(target_os = "ios")))] #[method(runModalSession:)] pub unsafe fn runModalSession(&self, session: NSModalSession) -> NSModalResponse; + #[cfg(not(any(target_os = "ios")))] #[method(endModalSession:)] pub unsafe fn endModalSession(&self, session: NSModalSession); + #[cfg(not(any(target_os = "ios")))] #[method(terminate:)] pub unsafe fn terminate(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(requestUserAttention:)] pub unsafe fn requestUserAttention( &self, request_type: NSRequestUserAttentionType, ) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(cancelUserAttentionRequest:)] pub unsafe fn cancelUserAttentionRequest(&self, request: NSInteger); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(enumerateWindowsWithOptions:usingBlock:)] pub unsafe fn enumerateWindowsWithOptions_usingBlock( &self, @@ -368,46 +410,58 @@ extern_methods!( block: &Block<(NonNull, NonNull), ()>, ); + #[cfg(not(any(target_os = "ios")))] #[method(preventWindowOrdering)] pub unsafe fn preventWindowOrdering(&self); #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windows)] pub unsafe fn windows(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(setWindowsNeedUpdate:)] pub unsafe fn setWindowsNeedUpdate(&self, need_update: bool); + #[cfg(not(any(target_os = "ios")))] #[method(updateWindows)] pub unsafe fn updateWindows(&self); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mainMenu)] pub unsafe fn mainMenu(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setMainMenu:)] pub unsafe fn setMainMenu(&self, main_menu: Option<&NSMenu>); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other helpMenu)] pub unsafe fn helpMenu(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setHelpMenu:)] pub unsafe fn setHelpMenu(&self, help_menu: Option<&NSMenu>); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other applicationIconImage)] pub unsafe fn applicationIconImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setApplicationIconImage:)] pub unsafe fn setApplicationIconImage(&self, application_icon_image: Option<&NSImage>); + #[cfg(not(any(target_os = "ios")))] #[method(activationPolicy)] pub unsafe fn activationPolicy(&self) -> NSApplicationActivationPolicy; + #[cfg(not(any(target_os = "ios")))] #[method(setActivationPolicy:)] pub unsafe fn setActivationPolicy( &self, @@ -415,13 +469,16 @@ extern_methods!( ) -> bool; #[cfg(feature = "AppKit_NSDockTile")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dockTile)] pub unsafe fn dockTile(&self) -> Id; #[cfg(feature = "Foundation_NSException")] + #[cfg(not(any(target_os = "ios")))] #[method(reportException:)] pub unsafe fn reportException(&self, exception: &NSException); + #[cfg(not(any(target_os = "ios")))] #[method(detachDrawingThread:toTarget:withObject:)] pub unsafe fn detachDrawingThread_toTarget_withObject( selector: Sel, @@ -429,30 +486,38 @@ extern_methods!( argument: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method(replyToApplicationShouldTerminate:)] pub unsafe fn replyToApplicationShouldTerminate(&self, should_terminate: bool); + #[cfg(not(any(target_os = "ios")))] #[method(replyToOpenOrPrint:)] pub unsafe fn replyToOpenOrPrint(&self, reply: NSApplicationDelegateReply); + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontCharacterPalette:)] pub unsafe fn orderFrontCharacterPalette(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(presentationOptions)] pub unsafe fn presentationOptions(&self) -> NSApplicationPresentationOptions; + #[cfg(not(any(target_os = "ios")))] #[method(setPresentationOptions:)] pub unsafe fn setPresentationOptions( &self, presentation_options: NSApplicationPresentationOptions, ); + #[cfg(not(any(target_os = "ios")))] #[method(currentSystemPresentationOptions)] pub unsafe fn currentSystemPresentationOptions(&self) -> NSApplicationPresentationOptions; + #[cfg(not(any(target_os = "ios")))] #[method(occlusionState)] pub unsafe fn occlusionState(&self) -> NSApplicationOcclusionState; + #[cfg(not(any(target_os = "ios")))] #[method(isProtectedDataAvailable)] pub unsafe fn isProtectedDataAvailable(&self) -> bool; } @@ -463,14 +528,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { #[cfg(feature = "AppKit_NSAppearance")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other appearance)] pub unsafe fn appearance(&self) -> Option>; #[cfg(feature = "AppKit_NSAppearance")] + #[cfg(not(any(target_os = "ios")))] #[method(setAppearance:)] pub unsafe fn setAppearance(&self, appearance: Option<&NSAppearance>); #[cfg(feature = "AppKit_NSAppearance")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other effectiveAppearance)] pub unsafe fn effectiveAppearance(&self) -> Id; } @@ -484,18 +552,22 @@ extern_methods!( #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(sendEvent:)] pub unsafe fn sendEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(postEvent:atStart:)] pub unsafe fn postEvent_atStart(&self, event: &NSEvent, flag: bool); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentEvent)] pub unsafe fn currentEvent(&self) -> Option>; #[cfg(all(feature = "AppKit_NSEvent", feature = "Foundation_NSDate"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other nextEventMatchingMask:untilDate:inMode:dequeue:)] pub unsafe fn nextEventMatchingMask_untilDate_inMode_dequeue( &self, @@ -506,6 +578,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(discardEventsMatchingMask:beforeEvent:)] pub unsafe fn discardEventsMatchingMask_beforeEvent( &self, @@ -519,6 +592,7 @@ extern_methods!( /// NSResponder #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method(sendAction:to:from:)] pub unsafe fn sendAction_to_from( &self, @@ -527,9 +601,11 @@ extern_methods!( sender: Option<&Object>, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other targetForAction:)] pub unsafe fn targetForAction(&self, action: Sel) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other targetForAction:to:from:)] pub unsafe fn targetForAction_to_from( &self, @@ -538,9 +614,11 @@ extern_methods!( sender: Option<&Object>, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(tryToPerform:with:)] pub unsafe fn tryToPerform_with(&self, action: Sel, object: Option<&Object>) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other validRequestorForSendType:returnType:)] pub unsafe fn validRequestorForSendType_returnType( &self, @@ -555,21 +633,26 @@ extern_methods!( #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowsMenu)] pub unsafe fn windowsMenu(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setWindowsMenu:)] pub unsafe fn setWindowsMenu(&self, windows_menu: Option<&NSMenu>); + #[cfg(not(any(target_os = "ios")))] #[method(arrangeInFront:)] pub unsafe fn arrangeInFront(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(removeWindowsItem:)] pub unsafe fn removeWindowsItem(&self, win: &NSWindow); #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(addWindowsItem:title:filename:)] pub unsafe fn addWindowsItem_title_filename( &self, @@ -579,6 +662,7 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(changeWindowsItem:title:filename:)] pub unsafe fn changeWindowsItem_title_filename( &self, @@ -588,9 +672,11 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(updateWindowsItem:)] pub unsafe fn updateWindowsItem(&self, win: &NSWindow); + #[cfg(not(any(target_os = "ios")))] #[method(miniaturizeAll:)] pub unsafe fn miniaturizeAll(&self, sender: Option<&Object>); } @@ -600,6 +686,7 @@ extern_methods!( /// NSFullKeyboardAccess #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method(isFullKeyboardAccessEnabled)] pub unsafe fn isFullKeyboardAccessEnabled(&self) -> bool; } @@ -607,26 +694,37 @@ extern_methods!( ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSApplicationTerminateReply { + #[cfg(not(any(target_os = "ios")))] NSTerminateCancel = 0, + #[cfg(not(any(target_os = "ios")))] NSTerminateNow = 1, + #[cfg(not(any(target_os = "ios")))] NSTerminateLater = 2, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSApplicationPrintReply { + #[cfg(not(any(target_os = "ios")))] NSPrintingCancelled = 0, + #[cfg(not(any(target_os = "ios")))] NSPrintingSuccess = 1, + #[cfg(not(any(target_os = "ios")))] NSPrintingFailure = 3, + #[cfg(not(any(target_os = "ios")))] NSPrintingReplyLater = 2, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSApplicationDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSApplication")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationShouldTerminate:)] unsafe fn applicationShouldTerminate( @@ -639,11 +737,13 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:openURLs:)] unsafe fn application_openURLs(&self, application: &NSApplication, urls: &NSArray); #[cfg(all(feature = "AppKit_NSApplication", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:openFile:)] unsafe fn application_openFile(&self, sender: &NSApplication, filename: &NSString) -> bool; @@ -653,6 +753,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:openFiles:)] unsafe fn application_openFiles( @@ -662,6 +763,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSApplication", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:openTempFile:)] unsafe fn application_openTempFile( @@ -671,16 +773,19 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSApplication")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationShouldOpenUntitledFile:)] unsafe fn applicationShouldOpenUntitledFile(&self, sender: &NSApplication) -> bool; #[cfg(feature = "AppKit_NSApplication")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationOpenUntitledFile:)] unsafe fn applicationOpenUntitledFile(&self, sender: &NSApplication) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:openFileWithoutUI:)] unsafe fn application_openFileWithoutUI( @@ -690,6 +795,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSApplication", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:printFile:)] unsafe fn application_printFile(&self, sender: &NSApplication, filename: &NSString) @@ -701,6 +807,7 @@ extern_protocol!( feature = "Foundation_NSDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:printFiles:withSettings:showPrintPanels:)] unsafe fn application_printFiles_withSettings_showPrintPanels( @@ -712,6 +819,7 @@ extern_protocol!( ) -> NSApplicationPrintReply; #[cfg(feature = "AppKit_NSApplication")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationShouldTerminateAfterLastWindowClosed:)] unsafe fn applicationShouldTerminateAfterLastWindowClosed( @@ -720,6 +828,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSApplication")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationShouldHandleReopen:hasVisibleWindows:)] unsafe fn applicationShouldHandleReopen_hasVisibleWindows( @@ -729,11 +838,13 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSApplication", feature = "AppKit_NSMenu"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other applicationDockMenu:)] unsafe fn applicationDockMenu(&self, sender: &NSApplication) -> Option>; #[cfg(all(feature = "AppKit_NSApplication", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other application:willPresentError:)] unsafe fn application_willPresentError( @@ -743,6 +854,7 @@ extern_protocol!( ) -> Id; #[cfg(all(feature = "AppKit_NSApplication", feature = "Foundation_NSData"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:didRegisterForRemoteNotificationsWithDeviceToken:)] unsafe fn application_didRegisterForRemoteNotificationsWithDeviceToken( @@ -752,6 +864,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSApplication", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:didFailToRegisterForRemoteNotificationsWithError:)] unsafe fn application_didFailToRegisterForRemoteNotificationsWithError( @@ -765,6 +878,7 @@ extern_protocol!( feature = "Foundation_NSDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:didReceiveRemoteNotification:)] unsafe fn application_didReceiveRemoteNotification( @@ -774,11 +888,13 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSApplication")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationSupportsSecureRestorableState:)] unsafe fn applicationSupportsSecureRestorableState(&self, app: &NSApplication) -> bool; #[cfg(all(feature = "AppKit_NSApplication", feature = "Foundation_NSCoder"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:willEncodeRestorableState:)] unsafe fn application_willEncodeRestorableState( @@ -788,11 +904,13 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSApplication", feature = "Foundation_NSCoder"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:didDecodeRestorableState:)] unsafe fn application_didDecodeRestorableState(&self, app: &NSApplication, coder: &NSCoder); #[cfg(all(feature = "AppKit_NSApplication", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:willContinueUserActivityWithType:)] unsafe fn application_willContinueUserActivityWithType( @@ -806,6 +924,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSUserActivity" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:continueUserActivity:restorationHandler:)] unsafe fn application_continueUserActivity_restorationHandler( @@ -823,6 +942,7 @@ extern_protocol!( feature = "Foundation_NSError", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:didFailToContinueUserActivityWithType:error:)] unsafe fn application_didFailToContinueUserActivityWithType_error( @@ -836,6 +956,7 @@ extern_protocol!( feature = "AppKit_NSApplication", feature = "Foundation_NSUserActivity" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:didUpdateUserActivity:)] unsafe fn application_didUpdateUserActivity( @@ -845,6 +966,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSApplication", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(application:delegateHandlesKey:)] unsafe fn application_delegateHandlesKey( @@ -854,6 +976,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSApplication")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationShouldAutomaticallyLocalizeKeyEquivalents:)] unsafe fn applicationShouldAutomaticallyLocalizeKeyEquivalents( @@ -862,81 +985,97 @@ extern_protocol!( ) -> bool; #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationWillFinishLaunching:)] unsafe fn applicationWillFinishLaunching(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationDidFinishLaunching:)] unsafe fn applicationDidFinishLaunching(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationWillHide:)] unsafe fn applicationWillHide(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationDidHide:)] unsafe fn applicationDidHide(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationWillUnhide:)] unsafe fn applicationWillUnhide(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationDidUnhide:)] unsafe fn applicationDidUnhide(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationWillBecomeActive:)] unsafe fn applicationWillBecomeActive(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationDidBecomeActive:)] unsafe fn applicationDidBecomeActive(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationWillResignActive:)] unsafe fn applicationWillResignActive(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationDidResignActive:)] unsafe fn applicationDidResignActive(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationWillUpdate:)] unsafe fn applicationWillUpdate(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationDidUpdate:)] unsafe fn applicationDidUpdate(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationWillTerminate:)] unsafe fn applicationWillTerminate(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationDidChangeScreenParameters:)] unsafe fn applicationDidChangeScreenParameters(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationDidChangeOcclusionState:)] unsafe fn applicationDidChangeOcclusionState(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationProtectedDataWillBecomeUnavailable:)] unsafe fn applicationProtectedDataWillBecomeUnavailable( @@ -945,6 +1084,7 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applicationProtectedDataDidBecomeAvailable:)] unsafe fn applicationProtectedDataDidBecomeAvailable(&self, notification: &NSNotification); @@ -958,14 +1098,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other servicesMenu)] pub unsafe fn servicesMenu(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setServicesMenu:)] pub unsafe fn setServicesMenu(&self, services_menu: Option<&NSMenu>); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(registerServicesMenuSendTypes:returnTypes:)] pub unsafe fn registerServicesMenuSendTypes_returnTypes( &self, @@ -976,8 +1119,10 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSServicesMenuRequestor: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSPasteboard", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(writeSelectionToPasteboard:types:)] unsafe fn writeSelectionToPasteboard_types( @@ -987,6 +1132,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(readSelectionFromPasteboard:)] unsafe fn readSelectionFromPasteboard(&self, pboard: &NSPasteboard) -> bool; @@ -999,9 +1145,11 @@ extern_methods!( /// NSServicesHandling #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other servicesProvider)] pub unsafe fn servicesProvider(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setServicesProvider:)] pub unsafe fn setServicesProvider(&self, services_provider: Option<&Object>); } @@ -1025,10 +1173,12 @@ extern_methods!( /// NSStandardAboutPanel #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontStandardAboutPanel:)] pub unsafe fn orderFrontStandardAboutPanel(&self, sender: Option<&Object>); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontStandardAboutPanelWithOptions:)] pub unsafe fn orderFrontStandardAboutPanelWithOptions( &self, @@ -1041,6 +1191,7 @@ extern_methods!( /// NSApplicationLayoutDirection #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method(userInterfaceLayoutDirection)] pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; } @@ -1050,9 +1201,11 @@ extern_methods!( /// NSRestorableUserInterface #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method(disableRelaunchOnLogin)] pub unsafe fn disableRelaunchOnLogin(&self); + #[cfg(not(any(target_os = "ios")))] #[method(enableRelaunchOnLogin)] pub unsafe fn enableRelaunchOnLogin(&self); } @@ -1060,10 +1213,15 @@ extern_methods!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSRemoteNotificationType { + #[cfg(not(any(target_os = "ios")))] NSRemoteNotificationTypeNone = 0, + #[cfg(not(any(target_os = "ios")))] NSRemoteNotificationTypeBadge = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSRemoteNotificationTypeSound = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSRemoteNotificationTypeAlert = 1 << 2, } ); @@ -1072,53 +1230,65 @@ extern_methods!( /// NSRemoteNotifications #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method(registerForRemoteNotifications)] pub unsafe fn registerForRemoteNotifications(&self); + #[cfg(not(any(target_os = "ios")))] #[method(unregisterForRemoteNotifications)] pub unsafe fn unregisterForRemoteNotifications(&self); + #[cfg(not(any(target_os = "ios")))] #[method(isRegisteredForRemoteNotifications)] pub unsafe fn isRegisteredForRemoteNotifications(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(registerForRemoteNotificationTypes:)] pub unsafe fn registerForRemoteNotificationTypes(&self, types: NSRemoteNotificationType); + #[cfg(not(any(target_os = "ios")))] #[method(enabledRemoteNotificationTypes)] pub unsafe fn enabledRemoteNotificationTypes(&self) -> NSRemoteNotificationType; } ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSApplicationMain(argc: c_int, argv: NonNull>) -> c_int; ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSApplicationLoad() -> Bool; ); extern_fn!( #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSShowsServicesMenuItem(item_name: &NSString) -> Bool; ); extern_fn!( #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSSetShowsServicesMenuItem(item_name: &NSString, enabled: Bool) -> NSInteger; ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSUpdateDynamicServices(); ); extern_fn!( #[cfg(all(feature = "AppKit_NSPasteboard", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSPerformService(item_name: &NSString, pboard: Option<&NSPasteboard>) -> Bool; ); pub type NSServiceProviderName = NSString; extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSRegisterServicesProvider( provider: Option<&Object>, name: &NSServiceProviderName, @@ -1126,6 +1296,7 @@ extern_fn!( ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSUnregisterServicesProvider(name: &NSServiceProviderName); ); @@ -1175,12 +1346,16 @@ extern_static!(NSApplicationDidChangeOcclusionStateNotification: &'static NSNoti extern_enum!( #[underlying(c_int)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { #[deprecated = "Use NSModalResponseStop instead"] + #[cfg(not(any(target_os = "ios")))] NSRunStoppedResponse = -1000, #[deprecated = "Use NSModalResponseAbort instead"] + #[cfg(not(any(target_os = "ios")))] NSRunAbortedResponse = -1001, #[deprecated = "Use NSModalResponseContinue instead"] + #[cfg(not(any(target_os = "ios")))] NSRunContinuesResponse = -1002, } ); @@ -1191,6 +1366,7 @@ extern_methods!( unsafe impl NSApplication { #[cfg(feature = "AppKit_NSWindow")] #[deprecated = "Use -[NSWindow beginSheet:completionHandler:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method(runModalForWindow:relativeToWindow:)] pub unsafe fn runModalForWindow_relativeToWindow( &self, @@ -1200,6 +1376,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSWindow")] #[deprecated = "Use -[NSWindow beginSheet:completionHandler:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method(beginModalSessionForWindow:relativeToWindow:)] pub unsafe fn beginModalSessionForWindow_relativeToWindow( &self, @@ -1209,6 +1386,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(application:printFiles:)] pub unsafe fn application_printFiles( &self, @@ -1218,6 +1396,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSWindow")] #[deprecated = "Use -[NSWindow beginSheet:completionHandler:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method(beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:)] pub unsafe fn beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo( &self, @@ -1230,16 +1409,19 @@ extern_methods!( #[cfg(feature = "AppKit_NSWindow")] #[deprecated = "Use -[NSWindow endSheet:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method(endSheet:)] pub unsafe fn endSheet(&self, sheet: &NSWindow); #[cfg(feature = "AppKit_NSWindow")] #[deprecated = "Use -[NSWindow endSheet:returnCode:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method(endSheet:returnCode:)] pub unsafe fn endSheet_returnCode(&self, sheet: &NSWindow, return_code: NSInteger); #[cfg(feature = "AppKit_NSWindow")] #[deprecated = "Use -enumerateWindowsWithOptions:usingBlock: instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeWindowsPerform:inOrder:)] pub unsafe fn makeWindowsPerform_inOrder( &self, @@ -1249,6 +1431,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSGraphicsContext")] #[deprecated = "This method always returns nil. If you need access to the current drawing context, use [NSGraphicsContext currentContext] inside of a draw operation."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other context)] pub unsafe fn context(&self) -> Option>; } diff --git a/AppKit/NSApplicationScripting.rs b/AppKit/NSApplicationScripting.rs index 0c1fbe206..9ae942552 100644 --- a/AppKit/NSApplicationScripting.rs +++ b/AppKit/NSApplicationScripting.rs @@ -10,10 +10,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { #[cfg(all(feature = "AppKit_NSDocument", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other orderedDocuments)] pub unsafe fn orderedDocuments(&self) -> Id>; #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other orderedWindows)] pub unsafe fn orderedWindows(&self) -> Id>; } diff --git a/AppKit/NSArrayController.rs b/AppKit/NSArrayController.rs index 9279dcf8f..626cc76bf 100644 --- a/AppKit/NSArrayController.rs +++ b/AppKit/NSArrayController.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSArrayController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSArrayController; #[cfg(feature = "AppKit_NSArrayController")] @@ -32,12 +33,15 @@ unsafe impl NSObjectProtocol for NSArrayController {} extern_methods!( #[cfg(feature = "AppKit_NSArrayController")] unsafe impl NSArrayController { + #[cfg(not(any(target_os = "ios")))] #[method(rearrangeObjects)] pub unsafe fn rearrangeObjects(&self); + #[cfg(not(any(target_os = "ios")))] #[method(automaticallyRearrangesObjects)] pub unsafe fn automaticallyRearrangesObjects(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticallyRearrangesObjects:)] pub unsafe fn setAutomaticallyRearrangesObjects( &self, @@ -45,9 +49,11 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other automaticRearrangementKeyPaths)] pub unsafe fn automaticRearrangementKeyPaths(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(didChangeArrangementCriteria)] pub unsafe fn didChangeArrangementCriteria(&self); @@ -55,6 +61,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSSortDescriptor" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id>; @@ -62,20 +69,25 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSSortDescriptor" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setSortDescriptors:)] pub unsafe fn setSortDescriptors(&self, sort_descriptors: &NSArray); #[cfg(feature = "Foundation_NSPredicate")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other filterPredicate)] pub unsafe fn filterPredicate(&self) -> Option>; #[cfg(feature = "Foundation_NSPredicate")] + #[cfg(not(any(target_os = "ios")))] #[method(setFilterPredicate:)] pub unsafe fn setFilterPredicate(&self, filter_predicate: Option<&NSPredicate>); + #[cfg(not(any(target_os = "ios")))] #[method(clearsFilterPredicateOnInsertion)] pub unsafe fn clearsFilterPredicateOnInsertion(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setClearsFilterPredicateOnInsertion:)] pub unsafe fn setClearsFilterPredicateOnInsertion( &self, @@ -83,33 +95,43 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other arrangeObjects:)] pub unsafe fn arrangeObjects(&self, objects: &NSArray) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other arrangedObjects)] pub unsafe fn arrangedObjects(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(avoidsEmptySelection)] pub unsafe fn avoidsEmptySelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAvoidsEmptySelection:)] pub unsafe fn setAvoidsEmptySelection(&self, avoids_empty_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(preservesSelection)] pub unsafe fn preservesSelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPreservesSelection:)] pub unsafe fn setPreservesSelection(&self, preserves_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(selectsInsertedObjects)] pub unsafe fn selectsInsertedObjects(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectsInsertedObjects:)] pub unsafe fn setSelectsInsertedObjects(&self, selects_inserted_objects: bool); + #[cfg(not(any(target_os = "ios")))] #[method(alwaysUsesMultipleValuesMarker)] pub unsafe fn alwaysUsesMultipleValuesMarker(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAlwaysUsesMultipleValuesMarker:)] pub unsafe fn setAlwaysUsesMultipleValuesMarker( &self, @@ -117,78 +139,100 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionIndexes:)] pub unsafe fn setSelectionIndexes(&self, indexes: &NSIndexSet) -> bool; #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectionIndexes)] pub unsafe fn selectionIndexes(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionIndex:)] pub unsafe fn setSelectionIndex(&self, index: NSUInteger) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(selectionIndex)] pub unsafe fn selectionIndex(&self) -> NSUInteger; #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(addSelectionIndexes:)] pub unsafe fn addSelectionIndexes(&self, indexes: &NSIndexSet) -> bool; #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(removeSelectionIndexes:)] pub unsafe fn removeSelectionIndexes(&self, indexes: &NSIndexSet) -> bool; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedObjects:)] pub unsafe fn setSelectedObjects(&self, objects: &NSArray) -> bool; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedObjects)] pub unsafe fn selectedObjects(&self) -> Id; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(addSelectedObjects:)] pub unsafe fn addSelectedObjects(&self, objects: &NSArray) -> bool; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(removeSelectedObjects:)] pub unsafe fn removeSelectedObjects(&self, objects: &NSArray) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(add:)] pub unsafe fn add(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(remove:)] pub unsafe fn remove(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(insert:)] pub unsafe fn insert(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(canInsert)] pub unsafe fn canInsert(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(selectNext:)] pub unsafe fn selectNext(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(selectPrevious:)] pub unsafe fn selectPrevious(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(canSelectNext)] pub unsafe fn canSelectNext(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(canSelectPrevious)] pub unsafe fn canSelectPrevious(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(addObject:)] pub unsafe fn addObject(&self, object: &Object); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(addObjects:)] pub unsafe fn addObjects(&self, objects: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(insertObject:atArrangedObjectIndex:)] pub unsafe fn insertObject_atArrangedObjectIndex(&self, object: &Object, index: NSUInteger); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexSet"))] + #[cfg(not(any(target_os = "ios")))] #[method(insertObjects:atArrangedObjectIndexes:)] pub unsafe fn insertObjects_atArrangedObjectIndexes( &self, @@ -196,17 +240,21 @@ extern_methods!( indexes: &NSIndexSet, ); + #[cfg(not(any(target_os = "ios")))] #[method(removeObjectAtArrangedObjectIndex:)] pub unsafe fn removeObjectAtArrangedObjectIndex(&self, index: NSUInteger); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(removeObjectsAtArrangedObjectIndexes:)] pub unsafe fn removeObjectsAtArrangedObjectIndexes(&self, indexes: &NSIndexSet); + #[cfg(not(any(target_os = "ios")))] #[method(removeObject:)] pub unsafe fn removeObject(&self, object: &Object); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(removeObjects:)] pub unsafe fn removeObjects(&self, objects: &NSArray); } @@ -216,6 +264,7 @@ extern_methods!( /// Methods declared on superclass `NSObjectController` #[cfg(feature = "AppKit_NSArrayController")] unsafe impl NSArrayController { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContent:)] pub unsafe fn initWithContent( this: Option>, diff --git a/AppKit/NSBezierPath.rs b/AppKit/NSBezierPath.rs index 12bf5a771..47b063b4f 100644 --- a/AppKit/NSBezierPath.rs +++ b/AppKit/NSBezierPath.rs @@ -7,36 +7,52 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSLineCapStyle { + #[cfg(not(any(target_os = "ios")))] NSLineCapStyleButt = 0, + #[cfg(not(any(target_os = "ios")))] NSLineCapStyleRound = 1, + #[cfg(not(any(target_os = "ios")))] NSLineCapStyleSquare = 2, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSLineJoinStyle { + #[cfg(not(any(target_os = "ios")))] NSLineJoinStyleMiter = 0, + #[cfg(not(any(target_os = "ios")))] NSLineJoinStyleRound = 1, + #[cfg(not(any(target_os = "ios")))] NSLineJoinStyleBevel = 2, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindingRule { + #[cfg(not(any(target_os = "ios")))] NSWindingRuleNonZero = 0, + #[cfg(not(any(target_os = "ios")))] NSWindingRuleEvenOdd = 1, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSBezierPathElement { + #[cfg(not(any(target_os = "ios")))] NSBezierPathElementMoveTo = 0, + #[cfg(not(any(target_os = "ios")))] NSBezierPathElementLineTo = 1, + #[cfg(not(any(target_os = "ios")))] NSBezierPathElementCurveTo = 2, + #[cfg(not(any(target_os = "ios")))] NSBezierPathElementClosePath = 3, } ); @@ -44,6 +60,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSBezierPath")] + #[cfg(not(any(target_os = "ios")))] pub struct NSBezierPath; #[cfg(feature = "AppKit_NSBezierPath")] @@ -64,15 +81,19 @@ unsafe impl NSSecureCoding for NSBezierPath {} extern_methods!( #[cfg(feature = "AppKit_NSBezierPath")] unsafe impl NSBezierPath { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bezierPath)] pub unsafe fn bezierPath() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bezierPathWithRect:)] pub unsafe fn bezierPathWithRect(rect: NSRect) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bezierPathWithOvalInRect:)] pub unsafe fn bezierPathWithOvalInRect(rect: NSRect) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bezierPathWithRoundedRect:xRadius:yRadius:)] pub unsafe fn bezierPathWithRoundedRect_xRadius_yRadius( rect: NSRect, @@ -80,63 +101,83 @@ extern_methods!( y_radius: CGFloat, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(fillRect:)] pub unsafe fn fillRect(rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(strokeRect:)] pub unsafe fn strokeRect(rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(clipRect:)] pub unsafe fn clipRect(rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(strokeLineFromPoint:toPoint:)] pub unsafe fn strokeLineFromPoint_toPoint(point1: NSPoint, point2: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(drawPackedGlyphs:atPoint:)] pub unsafe fn drawPackedGlyphs_atPoint(packed_glyphs: NonNull, point: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(defaultMiterLimit)] pub unsafe fn defaultMiterLimit() -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultMiterLimit:)] pub unsafe fn setDefaultMiterLimit(default_miter_limit: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(defaultFlatness)] pub unsafe fn defaultFlatness() -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultFlatness:)] pub unsafe fn setDefaultFlatness(default_flatness: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(defaultWindingRule)] pub unsafe fn defaultWindingRule() -> NSWindingRule; + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultWindingRule:)] pub unsafe fn setDefaultWindingRule(default_winding_rule: NSWindingRule); + #[cfg(not(any(target_os = "ios")))] #[method(defaultLineCapStyle)] pub unsafe fn defaultLineCapStyle() -> NSLineCapStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultLineCapStyle:)] pub unsafe fn setDefaultLineCapStyle(default_line_cap_style: NSLineCapStyle); + #[cfg(not(any(target_os = "ios")))] #[method(defaultLineJoinStyle)] pub unsafe fn defaultLineJoinStyle() -> NSLineJoinStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultLineJoinStyle:)] pub unsafe fn setDefaultLineJoinStyle(default_line_join_style: NSLineJoinStyle); + #[cfg(not(any(target_os = "ios")))] #[method(defaultLineWidth)] pub unsafe fn defaultLineWidth() -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultLineWidth:)] pub unsafe fn setDefaultLineWidth(default_line_width: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(moveToPoint:)] pub unsafe fn moveToPoint(&self, point: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(lineToPoint:)] pub unsafe fn lineToPoint(&self, point: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(curveToPoint:controlPoint1:controlPoint2:)] pub unsafe fn curveToPoint_controlPoint1_controlPoint2( &self, @@ -145,18 +186,23 @@ extern_methods!( control_point2: NSPoint, ); + #[cfg(not(any(target_os = "ios")))] #[method(closePath)] pub unsafe fn closePath(&self); + #[cfg(not(any(target_os = "ios")))] #[method(removeAllPoints)] pub unsafe fn removeAllPoints(&self); + #[cfg(not(any(target_os = "ios")))] #[method(relativeMoveToPoint:)] pub unsafe fn relativeMoveToPoint(&self, point: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(relativeLineToPoint:)] pub unsafe fn relativeLineToPoint(&self, point: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(relativeCurveToPoint:controlPoint1:controlPoint2:)] pub unsafe fn relativeCurveToPoint_controlPoint1_controlPoint2( &self, @@ -165,42 +211,55 @@ extern_methods!( control_point2: NSPoint, ); + #[cfg(not(any(target_os = "ios")))] #[method(lineWidth)] pub unsafe fn lineWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setLineWidth:)] pub unsafe fn setLineWidth(&self, line_width: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(lineCapStyle)] pub unsafe fn lineCapStyle(&self) -> NSLineCapStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setLineCapStyle:)] pub unsafe fn setLineCapStyle(&self, line_cap_style: NSLineCapStyle); + #[cfg(not(any(target_os = "ios")))] #[method(lineJoinStyle)] pub unsafe fn lineJoinStyle(&self) -> NSLineJoinStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setLineJoinStyle:)] pub unsafe fn setLineJoinStyle(&self, line_join_style: NSLineJoinStyle); + #[cfg(not(any(target_os = "ios")))] #[method(windingRule)] pub unsafe fn windingRule(&self) -> NSWindingRule; + #[cfg(not(any(target_os = "ios")))] #[method(setWindingRule:)] pub unsafe fn setWindingRule(&self, winding_rule: NSWindingRule); + #[cfg(not(any(target_os = "ios")))] #[method(miterLimit)] pub unsafe fn miterLimit(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMiterLimit:)] pub unsafe fn setMiterLimit(&self, miter_limit: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(flatness)] pub unsafe fn flatness(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setFlatness:)] pub unsafe fn setFlatness(&self, flatness: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(getLineDash:count:phase:)] pub unsafe fn getLineDash_count_phase( &self, @@ -209,6 +268,7 @@ extern_methods!( phase: *mut CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(setLineDash:count:phase:)] pub unsafe fn setLineDash_count_phase( &self, @@ -217,43 +277,56 @@ extern_methods!( phase: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(stroke)] pub unsafe fn stroke(&self); + #[cfg(not(any(target_os = "ios")))] #[method(fill)] pub unsafe fn fill(&self); + #[cfg(not(any(target_os = "ios")))] #[method(addClip)] pub unsafe fn addClip(&self); + #[cfg(not(any(target_os = "ios")))] #[method(setClip)] pub unsafe fn setClip(&self); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bezierPathByFlatteningPath)] pub unsafe fn bezierPathByFlatteningPath(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bezierPathByReversingPath)] pub unsafe fn bezierPathByReversingPath(&self) -> Id; #[cfg(feature = "Foundation_NSAffineTransform")] + #[cfg(not(any(target_os = "ios")))] #[method(transformUsingAffineTransform:)] pub unsafe fn transformUsingAffineTransform(&self, transform: &NSAffineTransform); + #[cfg(not(any(target_os = "ios")))] #[method(isEmpty)] pub unsafe fn isEmpty(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(currentPoint)] pub unsafe fn currentPoint(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(controlPointBounds)] pub unsafe fn controlPointBounds(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(bounds)] pub unsafe fn bounds(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(elementCount)] pub unsafe fn elementCount(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(elementAtIndex:associatedPoints:)] pub unsafe fn elementAtIndex_associatedPoints( &self, @@ -261,18 +334,23 @@ extern_methods!( points: NSPointArray, ) -> NSBezierPathElement; + #[cfg(not(any(target_os = "ios")))] #[method(elementAtIndex:)] pub unsafe fn elementAtIndex(&self, index: NSInteger) -> NSBezierPathElement; + #[cfg(not(any(target_os = "ios")))] #[method(setAssociatedPoints:atIndex:)] pub unsafe fn setAssociatedPoints_atIndex(&self, points: NSPointArray, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(appendBezierPath:)] pub unsafe fn appendBezierPath(&self, path: &NSBezierPath); + #[cfg(not(any(target_os = "ios")))] #[method(appendBezierPathWithRect:)] pub unsafe fn appendBezierPathWithRect(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(appendBezierPathWithPoints:count:)] pub unsafe fn appendBezierPathWithPoints_count( &self, @@ -280,9 +358,11 @@ extern_methods!( count: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(appendBezierPathWithOvalInRect:)] pub unsafe fn appendBezierPathWithOvalInRect(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise:)] pub unsafe fn appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise( &self, @@ -293,6 +373,7 @@ extern_methods!( clockwise: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:)] pub unsafe fn appendBezierPathWithArcWithCenter_radius_startAngle_endAngle( &self, @@ -302,6 +383,7 @@ extern_methods!( end_angle: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(appendBezierPathWithArcFromPoint:toPoint:radius:)] pub unsafe fn appendBezierPathWithArcFromPoint_toPoint_radius( &self, @@ -310,6 +392,7 @@ extern_methods!( radius: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(appendBezierPathWithRoundedRect:xRadius:yRadius:)] pub unsafe fn appendBezierPathWithRoundedRect_xRadius_yRadius( &self, @@ -318,6 +401,7 @@ extern_methods!( y_radius: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(containsPoint:)] pub unsafe fn containsPoint(&self, point: NSPoint) -> bool; } @@ -328,20 +412,24 @@ extern_methods!( #[cfg(feature = "AppKit_NSBezierPath")] unsafe impl NSBezierPath { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(cachesBezierPath)] pub unsafe fn cachesBezierPath(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setCachesBezierPath:)] pub unsafe fn setCachesBezierPath(&self, flag: bool); #[cfg(feature = "AppKit_NSFont")] #[deprecated = "Use -appendBezierPathWithCGGlyph:inFont: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(appendBezierPathWithGlyph:inFont:)] pub unsafe fn appendBezierPathWithGlyph_inFont(&self, glyph: NSGlyph, font: &NSFont); #[cfg(feature = "AppKit_NSFont")] #[deprecated = "Use -appendBezierPathWithCGGlyphs:count:inFont: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(appendBezierPathWithGlyphs:count:inFont:)] pub unsafe fn appendBezierPathWithGlyphs_count_inFont( &self, @@ -351,6 +439,7 @@ extern_methods!( ); #[deprecated = "Use -appendBezierPathWithCGGlyphs:count:inFont: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(appendBezierPathWithPackedGlyphs:)] pub unsafe fn appendBezierPathWithPackedGlyphs(&self, packed_glyphs: NonNull); } diff --git a/AppKit/NSBitmapImageRep.rs b/AppKit/NSBitmapImageRep.rs index 5068e6f5e..f9935dde1 100644 --- a/AppKit/NSBitmapImageRep.rs +++ b/AppKit/NSBitmapImageRep.rs @@ -7,51 +7,82 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTIFFCompression { + #[cfg(not(any(target_os = "ios")))] NSTIFFCompressionNone = 1, + #[cfg(not(any(target_os = "ios")))] NSTIFFCompressionCCITTFAX3 = 3, + #[cfg(not(any(target_os = "ios")))] NSTIFFCompressionCCITTFAX4 = 4, + #[cfg(not(any(target_os = "ios")))] NSTIFFCompressionLZW = 5, + #[cfg(not(any(target_os = "ios")))] NSTIFFCompressionJPEG = 6, + #[cfg(not(any(target_os = "ios")))] NSTIFFCompressionNEXT = 32766, + #[cfg(not(any(target_os = "ios")))] NSTIFFCompressionPackBits = 32773, + #[cfg(not(any(target_os = "ios")))] NSTIFFCompressionOldJPEG = 32865, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSBitmapImageFileType { + #[cfg(not(any(target_os = "ios")))] NSBitmapImageFileTypeTIFF = 0, + #[cfg(not(any(target_os = "ios")))] NSBitmapImageFileTypeBMP = 1, + #[cfg(not(any(target_os = "ios")))] NSBitmapImageFileTypeGIF = 2, + #[cfg(not(any(target_os = "ios")))] NSBitmapImageFileTypeJPEG = 3, + #[cfg(not(any(target_os = "ios")))] NSBitmapImageFileTypePNG = 4, + #[cfg(not(any(target_os = "ios")))] NSBitmapImageFileTypeJPEG2000 = 5, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSImageRepLoadStatus { + #[cfg(not(any(target_os = "ios")))] NSImageRepLoadStatusUnknownType = -1, + #[cfg(not(any(target_os = "ios")))] NSImageRepLoadStatusReadingHeader = -2, + #[cfg(not(any(target_os = "ios")))] NSImageRepLoadStatusWillNeedAllData = -3, + #[cfg(not(any(target_os = "ios")))] NSImageRepLoadStatusInvalidData = -4, + #[cfg(not(any(target_os = "ios")))] NSImageRepLoadStatusUnexpectedEOF = -5, + #[cfg(not(any(target_os = "ios")))] NSImageRepLoadStatusCompleted = -6, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSBitmapFormat { + #[cfg(not(any(target_os = "ios")))] NSBitmapFormatAlphaFirst = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSBitmapFormatAlphaNonpremultiplied = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSBitmapFormatFloatingPointSamples = 1 << 2, + #[cfg(not(any(target_os = "ios")))] NSBitmapFormatSixteenBitLittleEndian = 1 << 8, + #[cfg(not(any(target_os = "ios")))] NSBitmapFormatThirtyTwoBitLittleEndian = 1 << 9, + #[cfg(not(any(target_os = "ios")))] NSBitmapFormatSixteenBitBigEndian = 1 << 10, + #[cfg(not(any(target_os = "ios")))] NSBitmapFormatThirtyTwoBitBigEndian = 1 << 11, } ); @@ -93,6 +124,7 @@ extern_static!(NSImageFallbackBackgroundColor: &'static NSBitmapImageRepProperty extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSBitmapImageRep")] + #[cfg(not(any(target_os = "ios")))] pub struct NSBitmapImageRep; #[cfg(feature = "AppKit_NSBitmapImageRep")] @@ -115,12 +147,14 @@ extern_methods!( #[cfg(feature = "AppKit_NSBitmapImageRep")] unsafe impl NSBitmapImageRep { #[deprecated = "Use -[NSView cacheDisplayInRect:toBitmapImageRep:] to snapshot a view."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFocusedViewRect:)] pub unsafe fn initWithFocusedViewRect( this: Option>, rect: NSRect, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:)] pub unsafe fn initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel( this: Option>, @@ -136,6 +170,7 @@ extern_methods!( p_bits: NSInteger, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:)] pub unsafe fn initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel( this: Option>, @@ -153,47 +188,60 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSData"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageRepsWithData:)] pub unsafe fn imageRepsWithData(data: &NSData) -> Id>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageRepWithData:)] pub unsafe fn imageRepWithData(data: &NSData) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, data: &NSData, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(bitmapData)] pub unsafe fn bitmapData(&self) -> *mut c_uchar; + #[cfg(not(any(target_os = "ios")))] #[method(getBitmapDataPlanes:)] pub unsafe fn getBitmapDataPlanes(&self, data: NonNull<*mut c_uchar>); + #[cfg(not(any(target_os = "ios")))] #[method(isPlanar)] pub unsafe fn isPlanar(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(samplesPerPixel)] pub unsafe fn samplesPerPixel(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(bitsPerPixel)] pub unsafe fn bitsPerPixel(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(bytesPerRow)] pub unsafe fn bytesPerRow(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(bytesPerPlane)] pub unsafe fn bytesPerPlane(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfPlanes)] pub unsafe fn numberOfPlanes(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(bitmapFormat)] pub unsafe fn bitmapFormat(&self) -> NSBitmapFormat; + #[cfg(not(any(target_os = "ios")))] #[method(getCompression:factor:)] pub unsafe fn getCompression_factor( &self, @@ -201,14 +249,17 @@ extern_methods!( factor: *mut c_float, ); + #[cfg(not(any(target_os = "ios")))] #[method(setCompression:factor:)] pub unsafe fn setCompression_factor(&self, compression: NSTIFFCompression, factor: c_float); #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other TIFFRepresentation)] pub unsafe fn TIFFRepresentation(&self) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other TIFFRepresentationUsingCompression:factor:)] pub unsafe fn TIFFRepresentationUsingCompression_factor( &self, @@ -217,12 +268,14 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSData"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other TIFFRepresentationOfImageRepsInArray:)] pub unsafe fn TIFFRepresentationOfImageRepsInArray( array: &NSArray, ) -> Option>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSData"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other TIFFRepresentationOfImageRepsInArray:usingCompression:factor:)] pub unsafe fn TIFFRepresentationOfImageRepsInArray_usingCompression_factor( array: &NSArray, @@ -230,6 +283,7 @@ extern_methods!( factor: c_float, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(getTIFFCompressionTypes:count:)] pub unsafe fn getTIFFCompressionTypes_count( list: NonNull<*mut NSTIFFCompression>, @@ -237,15 +291,18 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedNameForTIFFCompressionType:)] pub unsafe fn localizedNameForTIFFCompressionType( compression: NSTIFFCompression, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(canBeCompressedUsing:)] pub unsafe fn canBeCompressedUsing(&self, compression: NSTIFFCompression) -> bool; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(colorizeByMappingGray:toColor:blackMapping:whiteMapping:)] pub unsafe fn colorizeByMappingGray_toColor_blackMapping_whiteMapping( &self, @@ -255,10 +312,12 @@ extern_methods!( light_color: Option<&NSColor>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initForIncrementalLoad)] pub unsafe fn initForIncrementalLoad(this: Option>) -> Id; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method(incrementalLoadFromData:complete:)] pub unsafe fn incrementalLoadFromData_complete( &self, @@ -267,24 +326,30 @@ extern_methods!( ) -> NSInteger; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setColor:atX:y:)] pub unsafe fn setColor_atX_y(&self, color: &NSColor, x: NSInteger, y: NSInteger); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorAtX:y:)] pub unsafe fn colorAtX_y(&self, x: NSInteger, y: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(getPixel:atX:y:)] pub unsafe fn getPixel_atX_y(&self, p: NonNull, x: NSInteger, y: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(setPixel:atX:y:)] pub unsafe fn setPixel_atX_y(&self, p: NonNull, x: NSInteger, y: NSInteger); #[cfg(feature = "AppKit_NSColorSpace")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorSpace)] pub unsafe fn colorSpace(&self) -> Id; #[cfg(feature = "AppKit_NSColorSpace")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bitmapImageRepByConvertingToColorSpace:renderingIntent:)] pub unsafe fn bitmapImageRepByConvertingToColorSpace_renderingIntent( &self, @@ -293,6 +358,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSColorSpace")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bitmapImageRepByRetaggingWithColorSpace:)] pub unsafe fn bitmapImageRepByRetaggingWithColorSpace( &self, @@ -311,6 +377,7 @@ extern_methods!( feature = "Foundation_NSData", feature = "Foundation_NSDictionary" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other representationOfImageRepsInArray:usingType:properties:)] pub unsafe fn representationOfImageRepsInArray_usingType_properties( image_reps: &NSArray, @@ -319,6 +386,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSDictionary"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other representationUsingType:properties:)] pub unsafe fn representationUsingType_properties( &self, @@ -326,6 +394,7 @@ extern_methods!( properties: &NSDictionary, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setProperty:withValue:)] pub unsafe fn setProperty_withValue( &self, @@ -333,6 +402,7 @@ extern_methods!( value: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other valueForProperty:)] pub unsafe fn valueForProperty( &self, diff --git a/AppKit/NSBox.rs b/AppKit/NSBox.rs index edb41beb8..dff6d7cf2 100644 --- a/AppKit/NSBox.rs +++ b/AppKit/NSBox.rs @@ -7,22 +7,34 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTitlePosition { + #[cfg(not(any(target_os = "ios")))] NSNoTitle = 0, + #[cfg(not(any(target_os = "ios")))] NSAboveTop = 1, + #[cfg(not(any(target_os = "ios")))] NSAtTop = 2, + #[cfg(not(any(target_os = "ios")))] NSBelowTop = 3, + #[cfg(not(any(target_os = "ios")))] NSAboveBottom = 4, + #[cfg(not(any(target_os = "ios")))] NSAtBottom = 5, + #[cfg(not(any(target_os = "ios")))] NSBelowBottom = 6, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSBoxType { + #[cfg(not(any(target_os = "ios")))] NSBoxPrimary = 0, + #[cfg(not(any(target_os = "ios")))] NSBoxSeparator = 2, + #[cfg(not(any(target_os = "ios")))] NSBoxCustom = 4, } ); @@ -30,6 +42,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSBox")] + #[cfg(not(any(target_os = "ios")))] pub struct NSBox; #[cfg(feature = "AppKit_NSBox")] @@ -66,92 +79,119 @@ unsafe impl NSUserInterfaceItemIdentification for NSBox {} extern_methods!( #[cfg(feature = "AppKit_NSBox")] unsafe impl NSBox { + #[cfg(not(any(target_os = "ios")))] #[method(boxType)] pub unsafe fn boxType(&self) -> NSBoxType; + #[cfg(not(any(target_os = "ios")))] #[method(setBoxType:)] pub unsafe fn setBoxType(&self, box_type: NSBoxType); + #[cfg(not(any(target_os = "ios")))] #[method(titlePosition)] pub unsafe fn titlePosition(&self) -> NSTitlePosition; + #[cfg(not(any(target_os = "ios")))] #[method(setTitlePosition:)] pub unsafe fn setTitlePosition(&self, title_position: NSTitlePosition); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleFont)] pub unsafe fn titleFont(&self) -> Id; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleFont:)] pub unsafe fn setTitleFont(&self, title_font: &NSFont); + #[cfg(not(any(target_os = "ios")))] #[method(borderRect)] pub unsafe fn borderRect(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(titleRect)] pub unsafe fn titleRect(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleCell)] pub unsafe fn titleCell(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(contentViewMargins)] pub unsafe fn contentViewMargins(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setContentViewMargins:)] pub unsafe fn setContentViewMargins(&self, content_view_margins: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); + #[cfg(not(any(target_os = "ios")))] #[method(setFrameFromContentFrame:)] pub unsafe fn setFrameFromContentFrame(&self, content_frame: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentView)] pub unsafe fn contentView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setContentView:)] pub unsafe fn setContentView(&self, content_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(isTransparent)] pub unsafe fn isTransparent(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setTransparent:)] pub unsafe fn setTransparent(&self, transparent: bool); + #[cfg(not(any(target_os = "ios")))] #[method(borderWidth)] pub unsafe fn borderWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setBorderWidth:)] pub unsafe fn setBorderWidth(&self, border_width: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(cornerRadius)] pub unsafe fn cornerRadius(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setCornerRadius:)] pub unsafe fn setCornerRadius(&self, corner_radius: CGFloat); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other borderColor)] pub unsafe fn borderColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBorderColor:)] pub unsafe fn setBorderColor(&self, border_color: &NSColor); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fillColor)] pub unsafe fn fillColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setFillColor:)] pub unsafe fn setFillColor(&self, fill_color: &NSColor); } @@ -162,15 +202,18 @@ extern_methods!( #[cfg(feature = "AppKit_NSBox")] unsafe impl NSBox { #[deprecated = "borderType is only applicable to NSBoxOldStyle, which is deprecated. To replace a borderType of NSNoBorder, use the `transparent` property."] + #[cfg(not(any(target_os = "ios")))] #[method(borderType)] pub unsafe fn borderType(&self) -> NSBorderType; #[deprecated = "borderType is only applicable to NSBoxOldStyle, which is deprecated. To replace a borderType of NSNoBorder, use the `transparent` property."] + #[cfg(not(any(target_os = "ios")))] #[method(setBorderType:)] pub unsafe fn setBorderType(&self, border_type: NSBorderType); #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, string_with_ampersand: Option<&NSString>); } @@ -184,6 +227,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSBox")] unsafe impl NSBox { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSBrowser.rs b/AppKit/NSBrowser.rs index 551a8eec1..d79b8bb64 100644 --- a/AppKit/NSBrowser.rs +++ b/AppKit/NSBrowser.rs @@ -13,17 +13,24 @@ pub type NSBrowserColumnsAutosaveName = NSString; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSBrowserColumnResizingType { + #[cfg(not(any(target_os = "ios")))] NSBrowserNoColumnResizing = 0, + #[cfg(not(any(target_os = "ios")))] NSBrowserAutoColumnResizing = 1, + #[cfg(not(any(target_os = "ios")))] NSBrowserUserColumnResizing = 2, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSBrowserDropOperation { + #[cfg(not(any(target_os = "ios")))] NSBrowserDropOn = 0, + #[cfg(not(any(target_os = "ios")))] NSBrowserDropAbove = 1, } ); @@ -31,6 +38,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] pub struct NSBrowser; #[cfg(feature = "AppKit_NSBrowser")] @@ -67,115 +75,151 @@ unsafe impl NSUserInterfaceItemIdentification for NSBrowser {} extern_methods!( #[cfg(feature = "AppKit_NSBrowser")] unsafe impl NSBrowser { + #[cfg(not(any(target_os = "ios")))] #[method(cellClass)] pub unsafe fn cellClass() -> &'static Class; + #[cfg(not(any(target_os = "ios")))] #[method(loadColumnZero)] pub unsafe fn loadColumnZero(&self); + #[cfg(not(any(target_os = "ios")))] #[method(isLoaded)] pub unsafe fn isLoaded(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(doubleAction)] pub unsafe fn doubleAction(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, double_action: Option); + #[cfg(not(any(target_os = "ios")))] #[method(setCellClass:)] pub unsafe fn setCellClass(&self, factory_id: &Class); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cellPrototype)] pub unsafe fn cellPrototype(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setCellPrototype:)] pub unsafe fn setCellPrototype(&self, cell_prototype: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[method(reusesColumns)] pub unsafe fn reusesColumns(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setReusesColumns:)] pub unsafe fn setReusesColumns(&self, reuses_columns: bool); + #[cfg(not(any(target_os = "ios")))] #[method(hasHorizontalScroller)] pub unsafe fn hasHorizontalScroller(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHasHorizontalScroller:)] pub unsafe fn setHasHorizontalScroller(&self, has_horizontal_scroller: bool); + #[cfg(not(any(target_os = "ios")))] #[method(autohidesScroller)] pub unsafe fn autohidesScroller(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutohidesScroller:)] pub unsafe fn setAutohidesScroller(&self, autohides_scroller: bool); + #[cfg(not(any(target_os = "ios")))] #[method(separatesColumns)] pub unsafe fn separatesColumns(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSeparatesColumns:)] pub unsafe fn setSeparatesColumns(&self, separates_columns: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isTitled)] pub unsafe fn isTitled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setTitled:)] pub unsafe fn setTitled(&self, titled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(minColumnWidth)] pub unsafe fn minColumnWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMinColumnWidth:)] pub unsafe fn setMinColumnWidth(&self, min_column_width: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(maxVisibleColumns)] pub unsafe fn maxVisibleColumns(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxVisibleColumns:)] pub unsafe fn setMaxVisibleColumns(&self, max_visible_columns: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(allowsMultipleSelection)] pub unsafe fn allowsMultipleSelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsMultipleSelection:)] pub unsafe fn setAllowsMultipleSelection(&self, allows_multiple_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsBranchSelection)] pub unsafe fn allowsBranchSelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsBranchSelection:)] pub unsafe fn setAllowsBranchSelection(&self, allows_branch_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsEmptySelection)] pub unsafe fn allowsEmptySelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsEmptySelection:)] pub unsafe fn setAllowsEmptySelection(&self, allows_empty_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(takesTitleFromPreviousColumn)] pub unsafe fn takesTitleFromPreviousColumn(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setTakesTitleFromPreviousColumn:)] pub unsafe fn setTakesTitleFromPreviousColumn( &self, takes_title_from_previous_column: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(sendsActionOnArrowKeys)] pub unsafe fn sendsActionOnArrowKeys(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSendsActionOnArrowKeys:)] pub unsafe fn setSendsActionOnArrowKeys(&self, sends_action_on_arrow_keys: bool); #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemAtIndexPath:)] pub unsafe fn itemAtIndexPath(&self, index_path: &NSIndexPath) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemAtRow:inColumn:)] pub unsafe fn itemAtRow_inColumn( &self, @@ -184,13 +228,16 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPathForColumn:)] pub unsafe fn indexPathForColumn(&self, column: NSInteger) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(isLeafItem:)] pub unsafe fn isLeafItem(&self, item: Option<&Object>) -> bool; #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(reloadDataForRowIndexes:inColumn:)] pub unsafe fn reloadDataForRowIndexes_inColumn( &self, @@ -198,125 +245,160 @@ extern_methods!( column: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other parentForItemsInColumn:)] pub unsafe fn parentForItemsInColumn(&self, column: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(scrollRowToVisible:inColumn:)] pub unsafe fn scrollRowToVisible_inColumn(&self, row: NSInteger, column: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:ofColumn:)] pub unsafe fn setTitle_ofColumn(&self, string: &NSString, column: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleOfColumn:)] pub unsafe fn titleOfColumn(&self, column: NSInteger) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pathSeparator)] pub unsafe fn pathSeparator(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPathSeparator:)] pub unsafe fn setPathSeparator(&self, path_separator: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPath:)] pub unsafe fn setPath(&self, path: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other path)] pub unsafe fn path(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pathToColumn:)] pub unsafe fn pathToColumn(&self, column: NSInteger) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(clickedColumn)] pub unsafe fn clickedColumn(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(clickedRow)] pub unsafe fn clickedRow(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(selectedColumn)] pub unsafe fn selectedColumn(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedCell)] pub unsafe fn selectedCell(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedCellInColumn:)] pub unsafe fn selectedCellInColumn(&self, column: NSInteger) -> Option>; #[cfg(all(feature = "AppKit_NSCell", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedCells)] pub unsafe fn selectedCells(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(selectRow:inColumn:)] pub unsafe fn selectRow_inColumn(&self, row: NSInteger, column: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(selectedRowInColumn:)] pub unsafe fn selectedRowInColumn(&self, column: NSInteger) -> NSInteger; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectionIndexPath)] pub unsafe fn selectionIndexPath(&self) -> Option>; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionIndexPath:)] pub unsafe fn setSelectionIndexPath(&self, selection_index_path: Option<&NSIndexPath>); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectionIndexPaths)] pub unsafe fn selectionIndexPaths(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionIndexPaths:)] pub unsafe fn setSelectionIndexPaths(&self, selection_index_paths: &NSArray); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(selectRowIndexes:inColumn:)] pub unsafe fn selectRowIndexes_inColumn(&self, indexes: &NSIndexSet, column: NSInteger); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedRowIndexesInColumn:)] pub unsafe fn selectedRowIndexesInColumn( &self, column: NSInteger, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(reloadColumn:)] pub unsafe fn reloadColumn(&self, column: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(validateVisibleColumns)] pub unsafe fn validateVisibleColumns(&self); + #[cfg(not(any(target_os = "ios")))] #[method(scrollColumnsRightBy:)] pub unsafe fn scrollColumnsRightBy(&self, shift_amount: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(scrollColumnsLeftBy:)] pub unsafe fn scrollColumnsLeftBy(&self, shift_amount: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(scrollColumnToVisible:)] pub unsafe fn scrollColumnToVisible(&self, column: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(lastColumn)] pub unsafe fn lastColumn(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setLastColumn:)] pub unsafe fn setLastColumn(&self, last_column: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(addColumn)] pub unsafe fn addColumn(&self); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfVisibleColumns)] pub unsafe fn numberOfVisibleColumns(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(firstVisibleColumn)] pub unsafe fn firstVisibleColumn(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(lastVisibleColumn)] pub unsafe fn lastVisibleColumn(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other loadedCellAtRow:column:)] pub unsafe fn loadedCellAtRow_column( &self, @@ -324,39 +406,51 @@ extern_methods!( col: NSInteger, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(selectAll:)] pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(tile)] pub unsafe fn tile(&self); + #[cfg(not(any(target_os = "ios")))] #[method(doClick:)] pub unsafe fn doClick(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(doDoubleClick:)] pub unsafe fn doDoubleClick(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(sendAction)] pub unsafe fn sendAction(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(titleFrameOfColumn:)] pub unsafe fn titleFrameOfColumn(&self, column: NSInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(drawTitleOfColumn:inRect:)] pub unsafe fn drawTitleOfColumn_inRect(&self, column: NSInteger, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(titleHeight)] pub unsafe fn titleHeight(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(frameOfColumn:)] pub unsafe fn frameOfColumn(&self, column: NSInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(frameOfInsideOfColumn:)] pub unsafe fn frameOfInsideOfColumn(&self, column: NSInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(frameOfRow:inColumn:)] pub unsafe fn frameOfRow_inColumn(&self, row: NSInteger, column: NSInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(getRow:column:forPoint:)] pub unsafe fn getRow_column_forPoint( &self, @@ -365,46 +459,57 @@ extern_methods!( point: NSPoint, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(columnWidthForColumnContentWidth:)] pub unsafe fn columnWidthForColumnContentWidth( &self, column_content_width: CGFloat, ) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(columnContentWidthForColumnWidth:)] pub unsafe fn columnContentWidthForColumnWidth(&self, column_width: CGFloat) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(columnResizingType)] pub unsafe fn columnResizingType(&self) -> NSBrowserColumnResizingType; + #[cfg(not(any(target_os = "ios")))] #[method(setColumnResizingType:)] pub unsafe fn setColumnResizingType( &self, column_resizing_type: NSBrowserColumnResizingType, ); + #[cfg(not(any(target_os = "ios")))] #[method(prefersAllColumnUserResizing)] pub unsafe fn prefersAllColumnUserResizing(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPrefersAllColumnUserResizing:)] pub unsafe fn setPrefersAllColumnUserResizing( &self, prefers_all_column_user_resizing: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(setWidth:ofColumn:)] pub unsafe fn setWidth_ofColumn(&self, column_width: CGFloat, column_index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(widthOfColumn:)] pub unsafe fn widthOfColumn(&self, column: NSInteger) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(rowHeight)] pub unsafe fn rowHeight(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setRowHeight:)] pub unsafe fn setRowHeight(&self, row_height: CGFloat); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(noteHeightOfRowsWithIndexesChanged:inColumn:)] pub unsafe fn noteHeightOfRowsWithIndexesChanged_inColumn( &self, @@ -412,25 +517,31 @@ extern_methods!( column_index: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultColumnWidth:)] pub unsafe fn setDefaultColumnWidth(&self, column_width: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(defaultColumnWidth)] pub unsafe fn defaultColumnWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other columnsAutosaveName)] pub unsafe fn columnsAutosaveName(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setColumnsAutosaveName:)] pub unsafe fn setColumnsAutosaveName( &self, columns_autosave_name: &NSBrowserColumnsAutosaveName, ); + #[cfg(not(any(target_os = "ios")))] #[method(removeSavedColumnsWithAutosaveName:)] pub unsafe fn removeSavedColumnsWithAutosaveName(name: &NSBrowserColumnsAutosaveName); #[cfg(all(feature = "AppKit_NSEvent", feature = "Foundation_NSIndexSet"))] + #[cfg(not(any(target_os = "ios")))] #[method(canDragRowsWithIndexes:inColumn:withEvent:)] pub unsafe fn canDragRowsWithIndexes_inColumn_withEvent( &self, @@ -444,6 +555,7 @@ extern_methods!( feature = "AppKit_NSImage", feature = "Foundation_NSIndexSet" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other draggingImageForRowsWithIndexes:inColumn:withEvent:offset:)] pub unsafe fn draggingImageForRowsWithIndexes_inColumn_withEvent_offset( &self, @@ -453,6 +565,7 @@ extern_methods!( drag_image_offset: NSPointPointer, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setDraggingSourceOperationMask:forLocal:)] pub unsafe fn setDraggingSourceOperationMask_forLocal( &self, @@ -460,21 +573,26 @@ extern_methods!( is_local: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(allowsTypeSelect)] pub unsafe fn allowsTypeSelect(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsTypeSelect:)] pub unsafe fn setAllowsTypeSelect(&self, allows_type_select: bool); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: &NSColor); #[cfg(all(feature = "AppKit_NSEvent", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method(editItemAtIndexPath:withEvent:select:)] pub unsafe fn editItemAtIndexPath_withEvent_select( &self, @@ -488,8 +606,10 @@ extern_methods!( extern_static!(NSBrowserColumnConfigurationDidChangeNotification: &'static NSNotificationName); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSBrowserDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:numberOfRowsInColumn:)] unsafe fn browser_numberOfRowsInColumn( @@ -499,6 +619,7 @@ extern_protocol!( ) -> NSInteger; #[cfg(all(feature = "AppKit_NSBrowser", feature = "AppKit_NSMatrix"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:createRowsForColumn:inMatrix:)] unsafe fn browser_createRowsForColumn_inMatrix( @@ -509,6 +630,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:numberOfChildrenOfItem:)] unsafe fn browser_numberOfChildrenOfItem( @@ -518,6 +640,7 @@ extern_protocol!( ) -> NSInteger; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other browser:child:ofItem:)] unsafe fn browser_child_ofItem( @@ -528,11 +651,13 @@ extern_protocol!( ) -> Id; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:isLeafItem:)] unsafe fn browser_isLeafItem(&self, browser: &NSBrowser, item: Option<&Object>) -> bool; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other browser:objectValueForItem:)] unsafe fn browser_objectValueForItem( @@ -542,6 +667,7 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:heightOfRow:inColumn:)] unsafe fn browser_heightOfRow_inColumn( @@ -552,11 +678,13 @@ extern_protocol!( ) -> CGFloat; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other rootItemForBrowser:)] unsafe fn rootItemForBrowser(&self, browser: &NSBrowser) -> Option>; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:setObjectValue:forItem:)] unsafe fn browser_setObjectValue_forItem( @@ -567,12 +695,14 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:shouldEditItem:)] unsafe fn browser_shouldEditItem(&self, browser: &NSBrowser, item: Option<&Object>) -> bool; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:willDisplayCell:atRow:column:)] unsafe fn browser_willDisplayCell_atRow_column( @@ -584,6 +714,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSBrowser", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other browser:titleOfColumn:)] unsafe fn browser_titleOfColumn( @@ -593,6 +724,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSBrowser", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:selectCellWithString:inColumn:)] unsafe fn browser_selectCellWithString_inColumn( @@ -603,6 +735,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:selectRow:inColumn:)] unsafe fn browser_selectRow_inColumn( @@ -613,21 +746,25 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:isColumnValid:)] unsafe fn browser_isColumnValid(&self, sender: &NSBrowser, column: NSInteger) -> bool; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browserWillScroll:)] unsafe fn browserWillScroll(&self, sender: &NSBrowser); #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browserDidScroll:)] unsafe fn browserDidScroll(&self, sender: &NSBrowser); #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:shouldSizeColumn:forUserResize:toWidth:)] unsafe fn browser_shouldSizeColumn_forUserResize_toWidth( @@ -639,6 +776,7 @@ extern_protocol!( ) -> CGFloat; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:sizeToFitWidthOfColumn:)] unsafe fn browser_sizeToFitWidthOfColumn( @@ -648,11 +786,13 @@ extern_protocol!( ) -> CGFloat; #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browserColumnConfigurationDidChange:)] unsafe fn browserColumnConfigurationDidChange(&self, notification: &NSNotification); #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:shouldShowCellExpansionForRow:column:)] unsafe fn browser_shouldShowCellExpansionForRow_column( @@ -667,6 +807,7 @@ extern_protocol!( feature = "AppKit_NSPasteboard", feature = "Foundation_NSIndexSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:writeRowsWithIndexes:inColumn:toPasteboard:)] unsafe fn browser_writeRowsWithIndexes_inColumn_toPasteboard( @@ -685,6 +826,7 @@ extern_protocol!( feature = "Foundation_NSURL" ))] #[deprecated = "Use NSFilePromiseReceiver objects instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other browser:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:inColumn:)] unsafe fn browser_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_inColumn( @@ -700,6 +842,7 @@ extern_protocol!( feature = "AppKit_NSEvent", feature = "Foundation_NSIndexSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:canDragRowsWithIndexes:inColumn:withEvent:)] unsafe fn browser_canDragRowsWithIndexes_inColumn_withEvent( @@ -716,6 +859,7 @@ extern_protocol!( feature = "AppKit_NSImage", feature = "Foundation_NSIndexSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other browser:draggingImageForRowsWithIndexes:inColumn:withEvent:offset:)] unsafe fn browser_draggingImageForRowsWithIndexes_inColumn_withEvent_offset( @@ -728,6 +872,7 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:validateDrop:proposedRow:column:dropOperation:)] unsafe fn browser_validateDrop_proposedRow_column_dropOperation( @@ -740,6 +885,7 @@ extern_protocol!( ) -> NSDragOperation; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:acceptDrop:atRow:column:dropOperation:)] unsafe fn browser_acceptDrop_atRow_column_dropOperation( @@ -752,6 +898,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSBrowser", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other browser:typeSelectStringForRow:inColumn:)] unsafe fn browser_typeSelectStringForRow_inColumn( @@ -766,6 +913,7 @@ extern_protocol!( feature = "AppKit_NSEvent", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:shouldTypeSelectForEvent:withCurrentSearchString:)] unsafe fn browser_shouldTypeSelectForEvent_withCurrentSearchString( @@ -776,6 +924,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSBrowser", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:nextTypeSelectMatchFromRow:toRow:inColumn:forString:)] unsafe fn browser_nextTypeSelectMatchFromRow_toRow_inColumn_forString( @@ -788,6 +937,7 @@ extern_protocol!( ) -> NSInteger; #[cfg(all(feature = "AppKit_NSBrowser", feature = "AppKit_NSViewController"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other browser:previewViewControllerForLeafItem:)] unsafe fn browser_previewViewControllerForLeafItem( @@ -797,6 +947,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSBrowser", feature = "AppKit_NSViewController"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other browser:headerViewControllerForItem:)] unsafe fn browser_headerViewControllerForItem( @@ -806,6 +957,7 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSBrowser")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(browser:didChangeLastColumn:toColumn:)] unsafe fn browser_didChangeLastColumn_toColumn( @@ -816,6 +968,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSBrowser", feature = "Foundation_NSIndexSet"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other browser:selectionIndexesForProposedSelection:inColumn:)] unsafe fn browser_selectionIndexesForProposedSelection_inColumn( @@ -834,45 +987,55 @@ extern_methods!( #[cfg(feature = "AppKit_NSBrowser")] unsafe impl NSBrowser { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setAcceptsArrowKeys:)] pub unsafe fn setAcceptsArrowKeys(&self, flag: bool); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(acceptsArrowKeys)] pub unsafe fn acceptsArrowKeys(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(displayColumn:)] pub unsafe fn displayColumn(&self, column: NSInteger); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(displayAllColumns)] pub unsafe fn displayAllColumns(&self); #[cfg(feature = "AppKit_NSScroller")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(scrollViaScroller:)] pub unsafe fn scrollViaScroller(&self, sender: Option<&NSScroller>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(updateScroller)] pub unsafe fn updateScroller(&self); #[deprecated = "Use the item based NSBrowser instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setMatrixClass:)] pub unsafe fn setMatrixClass(&self, factory_id: &Class); #[deprecated = "Use the item based NSBrowser instead"] + #[cfg(not(any(target_os = "ios")))] #[method(matrixClass)] pub unsafe fn matrixClass(&self) -> &'static Class; #[cfg(feature = "AppKit_NSMatrix")] #[deprecated = "Use the item based NSBrowser instead"] + #[cfg(not(any(target_os = "ios")))] #[method(columnOfMatrix:)] pub unsafe fn columnOfMatrix(&self, matrix: &NSMatrix) -> NSInteger; #[cfg(feature = "AppKit_NSMatrix")] #[deprecated = "Use the item based NSBrowser instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other matrixInColumn:)] pub unsafe fn matrixInColumn(&self, column: NSInteger) -> Option>; } @@ -882,6 +1045,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSBrowser")] unsafe impl NSBrowser { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSBrowserCell.rs b/AppKit/NSBrowserCell.rs index 9a7257d61..9505c53e9 100644 --- a/AppKit/NSBrowserCell.rs +++ b/AppKit/NSBrowserCell.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSBrowserCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSBrowserCell; #[cfg(feature = "AppKit_NSBrowserCell")] @@ -36,10 +37,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSBrowserCell")] unsafe impl NSBrowserCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, @@ -47,52 +50,66 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other branchImage)] pub unsafe fn branchImage() -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other highlightedBranchImage)] pub unsafe fn highlightedBranchImage() -> Option>; #[cfg(all(feature = "AppKit_NSColor", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other highlightColorInView:)] pub unsafe fn highlightColorInView(&self, control_view: &NSView) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(isLeaf)] pub unsafe fn isLeaf(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setLeaf:)] pub unsafe fn setLeaf(&self, leaf: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isLoaded)] pub unsafe fn isLoaded(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setLoaded:)] pub unsafe fn setLoaded(&self, loaded: bool); + #[cfg(not(any(target_os = "ios")))] #[method(reset)] pub unsafe fn reset(&self); + #[cfg(not(any(target_os = "ios")))] #[method(set)] pub unsafe fn set(&self); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setAlternateImage:)] pub unsafe fn setAlternateImage(&self, alternate_image: Option<&NSImage>); } diff --git a/AppKit/NSButton.rs b/AppKit/NSButton.rs index 1fcd0d561..230fd6db8 100644 --- a/AppKit/NSButton.rs +++ b/AppKit/NSButton.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSButton")] + #[cfg(not(any(target_os = "ios")))] pub struct NSButton; #[cfg(feature = "AppKit_NSButton")] @@ -54,6 +55,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSButton")] unsafe impl NSButton { #[cfg(all(feature = "AppKit_NSImage", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonWithTitle:image:target:action:)] pub unsafe fn buttonWithTitle_image_target_action( title: &NSString, @@ -63,6 +65,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonWithTitle:target:action:)] pub unsafe fn buttonWithTitle_target_action( title: &NSString, @@ -71,6 +74,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonWithImage:target:action:)] pub unsafe fn buttonWithImage_target_action( image: &NSImage, @@ -79,6 +83,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other checkboxWithTitle:target:action:)] pub unsafe fn checkboxWithTitle_target_action( title: &NSString, @@ -87,6 +92,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other radioButtonWithTitle:target:action:)] pub unsafe fn radioButtonWithTitle_target_action( title: &NSString, @@ -94,73 +100,92 @@ extern_methods!( action: Option, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setButtonType:)] pub unsafe fn setButtonType(&self, r#type: NSButtonType); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributed_title: &NSAttributedString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alternateTitle)] pub unsafe fn alternateTitle(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAlternateTitle:)] pub unsafe fn setAlternateTitle(&self, alternate_title: &NSString); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedAlternateTitle)] pub unsafe fn attributedAlternateTitle(&self) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAttributedAlternateTitle:)] pub unsafe fn setAttributedAlternateTitle( &self, attributed_alternate_title: &NSAttributedString, ); + #[cfg(not(any(target_os = "ios")))] #[method(hasDestructiveAction)] pub unsafe fn hasDestructiveAction(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHasDestructiveAction:)] pub unsafe fn setHasDestructiveAction(&self, has_destructive_action: bool); #[cfg(feature = "AppKit_NSSound")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sound)] pub unsafe fn sound(&self) -> Option>; #[cfg(feature = "AppKit_NSSound")] + #[cfg(not(any(target_os = "ios")))] #[method(setSound:)] pub unsafe fn setSound(&self, sound: Option<&NSSound>); + #[cfg(not(any(target_os = "ios")))] #[method(isSpringLoaded)] pub unsafe fn isSpringLoaded(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSpringLoaded:)] pub unsafe fn setSpringLoaded(&self, spring_loaded: bool); + #[cfg(not(any(target_os = "ios")))] #[method(maxAcceleratorLevel)] pub unsafe fn maxAcceleratorLevel(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxAcceleratorLevel:)] pub unsafe fn setMaxAcceleratorLevel(&self, max_accelerator_level: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(setPeriodicDelay:interval:)] pub unsafe fn setPeriodicDelay_interval(&self, delay: c_float, interval: c_float); + #[cfg(not(any(target_os = "ios")))] #[method(getPeriodicDelay:interval:)] pub unsafe fn getPeriodicDelay_interval( &self, @@ -168,27 +193,35 @@ extern_methods!( interval: NonNull, ); + #[cfg(not(any(target_os = "ios")))] #[method(bezelStyle)] pub unsafe fn bezelStyle(&self) -> NSBezelStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setBezelStyle:)] pub unsafe fn setBezelStyle(&self, bezel_style: NSBezelStyle); + #[cfg(not(any(target_os = "ios")))] #[method(isBordered)] pub unsafe fn isBordered(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setBordered:)] pub unsafe fn setBordered(&self, bordered: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isTransparent)] pub unsafe fn isTransparent(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setTransparent:)] pub unsafe fn setTransparent(&self, transparent: bool); + #[cfg(not(any(target_os = "ios")))] #[method(showsBorderOnlyWhileMouseInside)] pub unsafe fn showsBorderOnlyWhileMouseInside(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsBorderOnlyWhileMouseInside:)] pub unsafe fn setShowsBorderOnlyWhileMouseInside( &self, @@ -196,44 +229,56 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setAlternateImage:)] pub unsafe fn setAlternateImage(&self, alternate_image: Option<&NSImage>); + #[cfg(not(any(target_os = "ios")))] #[method(imagePosition)] pub unsafe fn imagePosition(&self) -> NSCellImagePosition; + #[cfg(not(any(target_os = "ios")))] #[method(setImagePosition:)] pub unsafe fn setImagePosition(&self, image_position: NSCellImagePosition); + #[cfg(not(any(target_os = "ios")))] #[method(imageScaling)] pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[cfg(not(any(target_os = "ios")))] #[method(setImageScaling:)] pub unsafe fn setImageScaling(&self, image_scaling: NSImageScaling); + #[cfg(not(any(target_os = "ios")))] #[method(imageHugsTitle)] pub unsafe fn imageHugsTitle(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setImageHugsTitle:)] pub unsafe fn setImageHugsTitle(&self, image_hugs_title: bool); #[cfg(feature = "AppKit_NSImageSymbolConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other symbolConfiguration)] pub unsafe fn symbolConfiguration(&self) -> Option>; #[cfg(feature = "AppKit_NSImageSymbolConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method(setSymbolConfiguration:)] pub unsafe fn setSymbolConfiguration( &self, @@ -241,50 +286,64 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bezelColor)] pub unsafe fn bezelColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBezelColor:)] pub unsafe fn setBezelColor(&self, bezel_color: Option<&NSColor>); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentTintColor)] pub unsafe fn contentTintColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setContentTintColor:)] pub unsafe fn setContentTintColor(&self, content_tint_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method(state)] pub unsafe fn state(&self) -> NSControlStateValue; + #[cfg(not(any(target_os = "ios")))] #[method(setState:)] pub unsafe fn setState(&self, state: NSControlStateValue); + #[cfg(not(any(target_os = "ios")))] #[method(allowsMixedState)] pub unsafe fn allowsMixedState(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsMixedState:)] pub unsafe fn setAllowsMixedState(&self, allows_mixed_state: bool); + #[cfg(not(any(target_os = "ios")))] #[method(setNextState)] pub unsafe fn setNextState(&self); + #[cfg(not(any(target_os = "ios")))] #[method(highlight:)] pub unsafe fn highlight(&self, flag: bool); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other keyEquivalent)] pub unsafe fn keyEquivalent(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setKeyEquivalent:)] pub unsafe fn setKeyEquivalent(&self, key_equivalent: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(keyEquivalentModifierMask)] pub unsafe fn keyEquivalentModifierMask(&self) -> NSEventModifierFlags; + #[cfg(not(any(target_os = "ios")))] #[method(setKeyEquivalentModifierMask:)] pub unsafe fn setKeyEquivalentModifierMask( &self, @@ -292,6 +351,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(performKeyEquivalent:)] pub unsafe fn performKeyEquivalent(&self, key: &NSEvent) -> bool; @@ -299,6 +359,7 @@ extern_methods!( feature = "AppKit_NSUserInterfaceCompressionOptions", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(compressWithPrioritizedCompressionOptions:)] pub unsafe fn compressWithPrioritizedCompressionOptions( &self, @@ -309,6 +370,7 @@ extern_methods!( feature = "AppKit_NSUserInterfaceCompressionOptions", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(minimumSizeWithPrioritizedCompressionOptions:)] pub unsafe fn minimumSizeWithPrioritizedCompressionOptions( &self, @@ -316,6 +378,7 @@ extern_methods!( ) -> NSSize; #[cfg(feature = "AppKit_NSUserInterfaceCompressionOptions")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other activeCompressionOptions)] pub unsafe fn activeCompressionOptions(&self) -> Id; } @@ -327,6 +390,7 @@ extern_methods!( unsafe impl NSButton { #[cfg(feature = "Foundation_NSString")] #[deprecated = "Mnemonics are not used on macOS. Set the title property directly instead."] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, string_with_ampersand: Option<&NSString>); } @@ -336,6 +400,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSButton")] unsafe impl NSButton { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSButtonCell.rs b/AppKit/NSButtonCell.rs index c798436b9..ed570fd7b 100644 --- a/AppKit/NSButtonCell.rs +++ b/AppKit/NSButtonCell.rs @@ -7,35 +7,60 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSButtonType { + #[cfg(not(any(target_os = "ios")))] NSButtonTypeMomentaryLight = 0, + #[cfg(not(any(target_os = "ios")))] NSButtonTypePushOnPushOff = 1, + #[cfg(not(any(target_os = "ios")))] NSButtonTypeToggle = 2, + #[cfg(not(any(target_os = "ios")))] NSButtonTypeSwitch = 3, + #[cfg(not(any(target_os = "ios")))] NSButtonTypeRadio = 4, + #[cfg(not(any(target_os = "ios")))] NSButtonTypeMomentaryChange = 5, + #[cfg(not(any(target_os = "ios")))] NSButtonTypeOnOff = 6, + #[cfg(not(any(target_os = "ios")))] NSButtonTypeMomentaryPushIn = 7, + #[cfg(not(any(target_os = "ios")))] NSButtonTypeAccelerator = 8, + #[cfg(not(any(target_os = "ios")))] NSButtonTypeMultiLevelAccelerator = 9, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSBezelStyle { + #[cfg(not(any(target_os = "ios")))] NSBezelStyleRounded = 1, + #[cfg(not(any(target_os = "ios")))] NSBezelStyleRegularSquare = 2, + #[cfg(not(any(target_os = "ios")))] NSBezelStyleDisclosure = 5, + #[cfg(not(any(target_os = "ios")))] NSBezelStyleShadowlessSquare = 6, + #[cfg(not(any(target_os = "ios")))] NSBezelStyleCircular = 7, + #[cfg(not(any(target_os = "ios")))] NSBezelStyleTexturedSquare = 8, + #[cfg(not(any(target_os = "ios")))] NSBezelStyleHelpButton = 9, + #[cfg(not(any(target_os = "ios")))] NSBezelStyleSmallSquare = 10, + #[cfg(not(any(target_os = "ios")))] NSBezelStyleTexturedRounded = 11, + #[cfg(not(any(target_os = "ios")))] NSBezelStyleRoundRect = 12, + #[cfg(not(any(target_os = "ios")))] NSBezelStyleRecessed = 13, + #[cfg(not(any(target_os = "ios")))] NSBezelStyleRoundedDisclosure = 14, + #[cfg(not(any(target_os = "ios")))] NSBezelStyleInline = 15, } ); @@ -43,6 +68,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSButtonCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSButtonCell; #[cfg(feature = "AppKit_NSButtonCell")] @@ -71,10 +97,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSButtonCell")] unsafe impl NSButtonCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, @@ -82,59 +110,75 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(bezelStyle)] pub unsafe fn bezelStyle(&self) -> NSBezelStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setBezelStyle:)] pub unsafe fn setBezelStyle(&self, bezel_style: NSBezelStyle); + #[cfg(not(any(target_os = "ios")))] #[method(setButtonType:)] pub unsafe fn setButtonType(&self, r#type: NSButtonType); + #[cfg(not(any(target_os = "ios")))] #[method(highlightsBy)] pub unsafe fn highlightsBy(&self) -> NSCellStyleMask; + #[cfg(not(any(target_os = "ios")))] #[method(setHighlightsBy:)] pub unsafe fn setHighlightsBy(&self, highlights_by: NSCellStyleMask); + #[cfg(not(any(target_os = "ios")))] #[method(showsStateBy)] pub unsafe fn showsStateBy(&self) -> NSCellStyleMask; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsStateBy:)] pub unsafe fn setShowsStateBy(&self, shows_state_by: NSCellStyleMask); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributed_title: &NSAttributedString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alternateTitle)] pub unsafe fn alternateTitle(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAlternateTitle:)] pub unsafe fn setAlternateTitle(&self, alternate_title: &NSString); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedAlternateTitle)] pub unsafe fn attributedAlternateTitle(&self) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAttributedAlternateTitle:)] pub unsafe fn setAttributedAlternateTitle( &self, @@ -142,60 +186,77 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setAlternateImage:)] pub unsafe fn setAlternateImage(&self, alternate_image: Option<&NSImage>); + #[cfg(not(any(target_os = "ios")))] #[method(imagePosition)] pub unsafe fn imagePosition(&self) -> NSCellImagePosition; + #[cfg(not(any(target_os = "ios")))] #[method(setImagePosition:)] pub unsafe fn setImagePosition(&self, image_position: NSCellImagePosition); + #[cfg(not(any(target_os = "ios")))] #[method(imageScaling)] pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[cfg(not(any(target_os = "ios")))] #[method(setImageScaling:)] pub unsafe fn setImageScaling(&self, image_scaling: NSImageScaling); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other keyEquivalent)] pub unsafe fn keyEquivalent(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setKeyEquivalent:)] pub unsafe fn setKeyEquivalent(&self, key_equivalent: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(keyEquivalentModifierMask)] pub unsafe fn keyEquivalentModifierMask(&self) -> NSEventModifierFlags; + #[cfg(not(any(target_os = "ios")))] #[method(setKeyEquivalentModifierMask:)] pub unsafe fn setKeyEquivalentModifierMask( &self, key_equivalent_modifier_mask: NSEventModifierFlags, ); + #[cfg(not(any(target_os = "ios")))] #[method(isTransparent)] pub unsafe fn isTransparent(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setTransparent:)] pub unsafe fn setTransparent(&self, transparent: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(imageDimsWhenDisabled)] pub unsafe fn imageDimsWhenDisabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setImageDimsWhenDisabled:)] pub unsafe fn setImageDimsWhenDisabled(&self, image_dims_when_disabled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(showsBorderOnlyWhileMouseInside)] pub unsafe fn showsBorderOnlyWhileMouseInside(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsBorderOnlyWhileMouseInside:)] pub unsafe fn setShowsBorderOnlyWhileMouseInside( &self, @@ -203,24 +264,30 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSSound")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sound)] pub unsafe fn sound(&self) -> Option>; #[cfg(feature = "AppKit_NSSound")] + #[cfg(not(any(target_os = "ios")))] #[method(setSound:)] pub unsafe fn setSound(&self, sound: Option<&NSSound>); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method(setPeriodicDelay:interval:)] pub unsafe fn setPeriodicDelay_interval(&self, delay: c_float, interval: c_float); + #[cfg(not(any(target_os = "ios")))] #[method(getPeriodicDelay:interval:)] pub unsafe fn getPeriodicDelay_interval( &self, @@ -228,22 +295,27 @@ extern_methods!( interval: NonNull, ); + #[cfg(not(any(target_os = "ios")))] #[method(performClick:)] pub unsafe fn performClick(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseEntered:)] pub unsafe fn mouseEntered(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseExited:)] pub unsafe fn mouseExited(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawBezelWithFrame:inView:)] pub unsafe fn drawBezelWithFrame_inView(&self, frame: NSRect, control_view: &NSView); #[cfg(all(feature = "AppKit_NSImage", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(drawImage:withFrame:inView:)] pub unsafe fn drawImage_withFrame_inView( &self, @@ -253,6 +325,7 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSView", feature = "Foundation_NSAttributedString"))] + #[cfg(not(any(target_os = "ios")))] #[method(drawTitle:withFrame:inView:)] pub unsafe fn drawTitle_withFrame_inView( &self, @@ -266,11 +339,17 @@ extern_methods!( ns_enum!( #[underlying(NSUInteger)] #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub enum NSGradientType { + #[cfg(not(any(target_os = "ios")))] NSGradientNone = 0, + #[cfg(not(any(target_os = "ios")))] NSGradientConcaveWeak = 1, + #[cfg(not(any(target_os = "ios")))] NSGradientConcaveStrong = 2, + #[cfg(not(any(target_os = "ios")))] NSGradientConvexWeak = 3, + #[cfg(not(any(target_os = "ios")))] NSGradientConvexStrong = 4, } ); @@ -336,20 +415,24 @@ extern_methods!( #[cfg(feature = "AppKit_NSButtonCell")] unsafe impl NSButtonCell { #[deprecated = "The gradientType property is unused, and setting it has no effect."] + #[cfg(not(any(target_os = "ios")))] #[method(gradientType)] pub unsafe fn gradientType(&self) -> NSGradientType; #[deprecated = "The gradientType property is unused, and setting it has no effect."] + #[cfg(not(any(target_os = "ios")))] #[method(setGradientType:)] pub unsafe fn setGradientType(&self, gradient_type: NSGradientType); #[cfg(feature = "Foundation_NSString")] #[deprecated = "Mnemonics are not used on macOS. Set the title property directly instead."] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, string_with_ampersand: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] #[deprecated = "Mnemonics are not used on macOS. Set the alternateTitle property directly instead."] + #[cfg(not(any(target_os = "ios")))] #[method(setAlternateTitleWithMnemonic:)] pub unsafe fn setAlternateTitleWithMnemonic( &self, @@ -357,30 +440,36 @@ extern_methods!( ); #[deprecated = "Mnemonics are not used on macOS. Calling this method has no effect."] + #[cfg(not(any(target_os = "ios")))] #[method(setAlternateMnemonicLocation:)] pub unsafe fn setAlternateMnemonicLocation(&self, location: NSUInteger); #[deprecated = "Mnemonics are not used on macOS. This property always returns NSNotFound."] + #[cfg(not(any(target_os = "ios")))] #[method(alternateMnemonicLocation)] pub unsafe fn alternateMnemonicLocation(&self) -> NSUInteger; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Mnemonics are not used on macOS. This property always returns an empty string."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alternateMnemonic)] pub unsafe fn alternateMnemonic(&self) -> Option>; #[cfg(feature = "AppKit_NSFont")] #[deprecated = "The keyEquivalentFont property is no longer used. It always returns the NSButtonCell's font, and setting it has no effect."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other keyEquivalentFont)] pub unsafe fn keyEquivalentFont(&self) -> Option>; #[cfg(feature = "AppKit_NSFont")] #[deprecated = "The keyEquivalentFont property is no longer used. It always returns the NSButtonCell's font, and setting it has no effect."] + #[cfg(not(any(target_os = "ios")))] #[method(setKeyEquivalentFont:)] pub unsafe fn setKeyEquivalentFont(&self, key_equivalent_font: Option<&NSFont>); #[cfg(feature = "Foundation_NSString")] #[deprecated = "The keyEquivalentFont property is no longer used. Setting it has no effect."] + #[cfg(not(any(target_os = "ios")))] #[method(setKeyEquivalentFont:size:)] pub unsafe fn setKeyEquivalentFont_size(&self, font_name: &NSString, font_size: CGFloat); } diff --git a/AppKit/NSCachedImageRep.rs b/AppKit/NSCachedImageRep.rs index 69bd7f170..8796a0dbb 100644 --- a/AppKit/NSCachedImageRep.rs +++ b/AppKit/NSCachedImageRep.rs @@ -9,6 +9,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCachedImageRep")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub struct NSCachedImageRep; #[cfg(feature = "AppKit_NSCachedImageRep")] @@ -29,6 +30,7 @@ extern_methods!( unsafe impl NSCachedImageRep { #[cfg(feature = "AppKit_NSWindow")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithWindow:rect:)] pub unsafe fn initWithWindow_rect( this: Option>, @@ -37,6 +39,7 @@ extern_methods!( ) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithSize:depth:separate:alpha:)] pub unsafe fn initWithSize_depth_separate_alpha( this: Option>, @@ -48,10 +51,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSWindow")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other window)] pub unsafe fn window(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(rect)] pub unsafe fn rect(&self) -> NSRect; } diff --git a/AppKit/NSCandidateListTouchBarItem.rs b/AppKit/NSCandidateListTouchBarItem.rs index e004a885e..0726facbe 100644 --- a/AppKit/NSCandidateListTouchBarItem.rs +++ b/AppKit/NSCandidateListTouchBarItem.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; __inner_extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCandidateListTouchBarItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCandidateListTouchBarItem< CandidateType: Message = Object, CandidateTypeOwnership: Ownership = Shared, @@ -43,45 +44,57 @@ extern_methods!( NSCandidateListTouchBarItem { #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other client)] pub unsafe fn client(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setClient:)] pub unsafe fn setClient(&self, client: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(isCollapsed)] pub unsafe fn isCollapsed(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCollapsed:)] pub unsafe fn setCollapsed(&self, collapsed: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsCollapsing)] pub unsafe fn allowsCollapsing(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsCollapsing:)] pub unsafe fn setAllowsCollapsing(&self, allows_collapsing: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isCandidateListVisible)] pub unsafe fn isCandidateListVisible(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(updateWithInsertionPointVisibility:)] pub unsafe fn updateWithInsertionPointVisibility(&self, is_visible: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsTextInputContextCandidates)] pub unsafe fn allowsTextInputContextCandidates(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsTextInputContextCandidates:)] pub unsafe fn setAllowsTextInputContextCandidates( &self, @@ -89,12 +102,14 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(attributedStringForCandidate)] pub unsafe fn attributedStringForCandidate( &self, ) -> *mut Block<(NonNull, NSInteger), NonNull>; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAttributedStringForCandidate:)] pub unsafe fn setAttributedStringForCandidate( &self, @@ -104,10 +119,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other candidates)] pub unsafe fn candidates(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setCandidates:forSelectedRange:inString:)] pub unsafe fn setCandidates_forSelectedRange_inString( &self, @@ -117,18 +134,22 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customization_label: Option<&NSString>); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSCandidateListTouchBarItemDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSCandidateListTouchBarItem")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(candidateListTouchBarItem:beginSelectingCandidateAtIndex:)] unsafe fn candidateListTouchBarItem_beginSelectingCandidateAtIndex( @@ -138,6 +159,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSCandidateListTouchBarItem")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(candidateListTouchBarItem:changeSelectionFromCandidateAtIndex:toIndex:)] unsafe fn candidateListTouchBarItem_changeSelectionFromCandidateAtIndex_toIndex( @@ -148,6 +170,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSCandidateListTouchBarItem")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(candidateListTouchBarItem:endSelectingCandidateAtIndex:)] unsafe fn candidateListTouchBarItem_endSelectingCandidateAtIndex( @@ -157,6 +180,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSCandidateListTouchBarItem")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(candidateListTouchBarItem:changedCandidateListVisibility:)] unsafe fn candidateListTouchBarItem_changedCandidateListVisibility( @@ -174,6 +198,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(feature = "AppKit_NSCandidateListTouchBarItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other candidateListTouchBarItem)] pub unsafe fn candidateListTouchBarItem(&self) -> Option>; } diff --git a/AppKit/NSCell.rs b/AppKit/NSCell.rs index 55b764075..d2fdee7a7 100644 --- a/AppKit/NSCell.rs +++ b/AppKit/NSCell.rs @@ -7,63 +7,103 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSCellType { + #[cfg(not(any(target_os = "ios")))] NSNullCellType = 0, + #[cfg(not(any(target_os = "ios")))] NSTextCellType = 1, + #[cfg(not(any(target_os = "ios")))] NSImageCellType = 2, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSCellAttribute { + #[cfg(not(any(target_os = "ios")))] NSCellDisabled = 0, + #[cfg(not(any(target_os = "ios")))] NSCellState = 1, + #[cfg(not(any(target_os = "ios")))] NSPushInCell = 2, + #[cfg(not(any(target_os = "ios")))] NSCellEditable = 3, + #[cfg(not(any(target_os = "ios")))] NSChangeGrayCell = 4, + #[cfg(not(any(target_os = "ios")))] NSCellHighlighted = 5, + #[cfg(not(any(target_os = "ios")))] NSCellLightsByContents = 6, + #[cfg(not(any(target_os = "ios")))] NSCellLightsByGray = 7, + #[cfg(not(any(target_os = "ios")))] NSChangeBackgroundCell = 8, + #[cfg(not(any(target_os = "ios")))] NSCellLightsByBackground = 9, + #[cfg(not(any(target_os = "ios")))] NSCellIsBordered = 10, + #[cfg(not(any(target_os = "ios")))] NSCellHasOverlappingImage = 11, + #[cfg(not(any(target_os = "ios")))] NSCellHasImageHorizontal = 12, + #[cfg(not(any(target_os = "ios")))] NSCellHasImageOnLeftOrBottom = 13, + #[cfg(not(any(target_os = "ios")))] NSCellChangesContents = 14, + #[cfg(not(any(target_os = "ios")))] NSCellIsInsetButton = 15, + #[cfg(not(any(target_os = "ios")))] NSCellAllowsMixedState = 16, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSCellImagePosition { + #[cfg(not(any(target_os = "ios")))] NSNoImage = 0, + #[cfg(not(any(target_os = "ios")))] NSImageOnly = 1, + #[cfg(not(any(target_os = "ios")))] NSImageLeft = 2, + #[cfg(not(any(target_os = "ios")))] NSImageRight = 3, + #[cfg(not(any(target_os = "ios")))] NSImageBelow = 4, + #[cfg(not(any(target_os = "ios")))] NSImageAbove = 5, + #[cfg(not(any(target_os = "ios")))] NSImageOverlaps = 6, + #[cfg(not(any(target_os = "ios")))] NSImageLeading = 7, + #[cfg(not(any(target_os = "ios")))] NSImageTrailing = 8, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSImageScaling { + #[cfg(not(any(target_os = "ios")))] NSImageScaleProportionallyDown = 0, + #[cfg(not(any(target_os = "ios")))] NSImageScaleAxesIndependently = 1, + #[cfg(not(any(target_os = "ios")))] NSImageScaleNone = 2, + #[cfg(not(any(target_os = "ios")))] NSImageScaleProportionallyUpOrDown = 3, #[deprecated = "Use NSImageScaleProportionallyDown instead"] + #[cfg(not(any(target_os = "ios")))] NSScaleProportionally = 0, #[deprecated = "Use NSImageScaleAxesIndependently instead"] + #[cfg(not(any(target_os = "ios")))] NSScaleToFit = 1, #[deprecated = "Use NSImageScaleNone instead"] + #[cfg(not(any(target_os = "ios")))] NSScaleNone = 2, } ); @@ -80,31 +120,47 @@ extern_static!(NSControlStateValueOn: NSControlStateValue = 1); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSCellStyleMask { + #[cfg(not(any(target_os = "ios")))] NSNoCellMask = 0, + #[cfg(not(any(target_os = "ios")))] NSContentsCellMask = 1, + #[cfg(not(any(target_os = "ios")))] NSPushInCellMask = 2, + #[cfg(not(any(target_os = "ios")))] NSChangeGrayCellMask = 4, + #[cfg(not(any(target_os = "ios")))] NSChangeBackgroundCellMask = 8, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSControlTint { + #[cfg(not(any(target_os = "ios")))] NSDefaultControlTint = 0, + #[cfg(not(any(target_os = "ios")))] NSBlueControlTint = 1, + #[cfg(not(any(target_os = "ios")))] NSGraphiteControlTint = 6, + #[cfg(not(any(target_os = "ios")))] NSClearControlTint = 7, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSControlSize { + #[cfg(not(any(target_os = "ios")))] NSControlSizeRegular = 0, + #[cfg(not(any(target_os = "ios")))] NSControlSizeSmall = 1, + #[cfg(not(any(target_os = "ios")))] NSControlSizeMini = 2, + #[cfg(not(any(target_os = "ios")))] NSControlSizeLarge = 3, } ); @@ -112,6 +168,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCell; #[cfg(feature = "AppKit_NSCell")] @@ -138,14 +195,17 @@ unsafe impl NSUserInterfaceItemIdentification for NSCell {} extern_methods!( #[cfg(feature = "AppKit_NSCell")] unsafe impl NSCell { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, @@ -153,248 +213,325 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(prefersTrackingUntilMouseUp)] pub unsafe fn prefersTrackingUntilMouseUp() -> bool; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other controlView)] pub unsafe fn controlView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setControlView:)] pub unsafe fn setControlView(&self, control_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(type)] pub unsafe fn r#type(&self) -> NSCellType; + #[cfg(not(any(target_os = "ios")))] #[method(setType:)] pub unsafe fn setType(&self, r#type: NSCellType); + #[cfg(not(any(target_os = "ios")))] #[method(state)] pub unsafe fn state(&self) -> NSControlStateValue; + #[cfg(not(any(target_os = "ios")))] #[method(setState:)] pub unsafe fn setState(&self, state: NSControlStateValue); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(action)] pub unsafe fn action(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[cfg(not(any(target_os = "ios")))] #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(sendActionOn:)] pub unsafe fn sendActionOn(&self, mask: NSEventMask) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(isContinuous)] pub unsafe fn isContinuous(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setContinuous:)] pub unsafe fn setContinuous(&self, continuous: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isSelectable)] pub unsafe fn isSelectable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectable:)] pub unsafe fn setSelectable(&self, selectable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isBordered)] pub unsafe fn isBordered(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setBordered:)] pub unsafe fn setBordered(&self, bordered: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isBezeled)] pub unsafe fn isBezeled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setBezeled:)] pub unsafe fn setBezeled(&self, bezeled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isScrollable)] pub unsafe fn isScrollable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setScrollable:)] pub unsafe fn setScrollable(&self, scrollable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isHighlighted)] pub unsafe fn isHighlighted(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHighlighted:)] pub unsafe fn setHighlighted(&self, highlighted: bool); + #[cfg(not(any(target_os = "ios")))] #[method(alignment)] pub unsafe fn alignment(&self) -> NSTextAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(setAlignment:)] pub unsafe fn setAlignment(&self, alignment: NSTextAlignment); + #[cfg(not(any(target_os = "ios")))] #[method(wraps)] pub unsafe fn wraps(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setWraps:)] pub unsafe fn setWraps(&self, wraps: bool); #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other font)] pub unsafe fn font(&self) -> Option>; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(setFont:)] pub unsafe fn setFont(&self, font: Option<&NSFont>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other keyEquivalent)] pub unsafe fn keyEquivalent(&self) -> Id; #[cfg(feature = "Foundation_NSFormatter")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other formatter)] pub unsafe fn formatter(&self) -> Option>; #[cfg(feature = "Foundation_NSFormatter")] + #[cfg(not(any(target_os = "ios")))] #[method(setFormatter:)] pub unsafe fn setFormatter(&self, formatter: Option<&NSFormatter>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other objectValue)] pub unsafe fn objectValue(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, object_value: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(hasValidObjectValue)] pub unsafe fn hasValidObjectValue(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other stringValue)] pub unsafe fn stringValue(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setStringValue:)] pub unsafe fn setStringValue(&self, string_value: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(compare:)] pub unsafe fn compare(&self, other_cell: &Object) -> NSComparisonResult; + #[cfg(not(any(target_os = "ios")))] #[method(intValue)] pub unsafe fn intValue(&self) -> c_int; + #[cfg(not(any(target_os = "ios")))] #[method(setIntValue:)] pub unsafe fn setIntValue(&self, int_value: c_int); + #[cfg(not(any(target_os = "ios")))] #[method(floatValue)] pub unsafe fn floatValue(&self) -> c_float; + #[cfg(not(any(target_os = "ios")))] #[method(setFloatValue:)] pub unsafe fn setFloatValue(&self, float_value: c_float); + #[cfg(not(any(target_os = "ios")))] #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setDoubleValue:)] pub unsafe fn setDoubleValue(&self, double_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(integerValue)] pub unsafe fn integerValue(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setIntegerValue:)] pub unsafe fn setIntegerValue(&self, integer_value: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(takeIntValueFrom:)] pub unsafe fn takeIntValueFrom(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(takeFloatValueFrom:)] pub unsafe fn takeFloatValueFrom(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(takeDoubleValueFrom:)] pub unsafe fn takeDoubleValueFrom(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(takeStringValueFrom:)] pub unsafe fn takeStringValueFrom(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(takeObjectValueFrom:)] pub unsafe fn takeObjectValueFrom(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(takeIntegerValueFrom:)] pub unsafe fn takeIntegerValueFrom(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[cfg(not(any(target_os = "ios")))] #[method(controlSize)] pub unsafe fn controlSize(&self) -> NSControlSize; + #[cfg(not(any(target_os = "ios")))] #[method(setControlSize:)] pub unsafe fn setControlSize(&self, control_size: NSControlSize); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other representedObject)] pub unsafe fn representedObject(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setRepresentedObject:)] pub unsafe fn setRepresentedObject(&self, represented_object: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(cellAttribute:)] pub unsafe fn cellAttribute(&self, parameter: NSCellAttribute) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setCellAttribute:to:)] pub unsafe fn setCellAttribute_to(&self, parameter: NSCellAttribute, value: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(imageRectForBounds:)] pub unsafe fn imageRectForBounds(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(titleRectForBounds:)] pub unsafe fn titleRectForBounds(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(drawingRectForBounds:)] pub unsafe fn drawingRectForBounds(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(cellSize)] pub unsafe fn cellSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(cellSizeForBounds:)] pub unsafe fn cellSizeForBounds(&self, rect: NSRect) -> NSSize; #[cfg(all(feature = "AppKit_NSColor", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other highlightColorWithFrame:inView:)] pub unsafe fn highlightColorWithFrame_inView( &self, @@ -402,14 +539,17 @@ extern_methods!( control_view: &NSView, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(calcDrawInfo:)] pub unsafe fn calcDrawInfo(&self, rect: NSRect); #[cfg(feature = "AppKit_NSText")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other setUpFieldEditorAttributes:)] pub unsafe fn setUpFieldEditorAttributes(&self, text_obj: &NSText) -> Id; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawInteriorWithFrame:inView:)] pub unsafe fn drawInteriorWithFrame_inView( &self, @@ -418,10 +558,12 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawWithFrame:inView:)] pub unsafe fn drawWithFrame_inView(&self, cell_frame: NSRect, control_view: &NSView); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(highlight:withFrame:inView:)] pub unsafe fn highlight_withFrame_inView( &self, @@ -430,9 +572,11 @@ extern_methods!( control_view: &NSView, ); + #[cfg(not(any(target_os = "ios")))] #[method(mouseDownFlags)] pub unsafe fn mouseDownFlags(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(getPeriodicDelay:interval:)] pub unsafe fn getPeriodicDelay_interval( &self, @@ -441,6 +585,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(startTrackingAt:inView:)] pub unsafe fn startTrackingAt_inView( &self, @@ -449,6 +594,7 @@ extern_methods!( ) -> bool; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(continueTracking:at:inView:)] pub unsafe fn continueTracking_at_inView( &self, @@ -458,6 +604,7 @@ extern_methods!( ) -> bool; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(stopTracking:at:inView:mouseIsUp:)] pub unsafe fn stopTracking_at_inView_mouseIsUp( &self, @@ -468,6 +615,7 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(trackMouse:inRect:ofView:untilMouseUp:)] pub unsafe fn trackMouse_inRect_ofView_untilMouseUp( &self, @@ -482,6 +630,7 @@ extern_methods!( feature = "AppKit_NSText", feature = "AppKit_NSView" ))] + #[cfg(not(any(target_os = "ios")))] #[method(editWithFrame:inView:editor:delegate:event:)] pub unsafe fn editWithFrame_inView_editor_delegate_event( &self, @@ -493,6 +642,7 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSText", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(selectWithFrame:inView:editor:delegate:start:length:)] pub unsafe fn selectWithFrame_inView_editor_delegate_start_length( &self, @@ -505,18 +655,22 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSText")] + #[cfg(not(any(target_os = "ios")))] #[method(endEditing:)] pub unsafe fn endEditing(&self, text_obj: &NSText); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(resetCursorRect:inView:)] pub unsafe fn resetCursorRect_inView(&self, cell_frame: NSRect, control_view: &NSView); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); @@ -525,6 +679,7 @@ extern_methods!( feature = "AppKit_NSMenu", feature = "AppKit_NSView" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuForEvent:inRect:ofView:)] pub unsafe fn menuForEvent_inRect_ofView( &self, @@ -534,42 +689,55 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultMenu)] pub unsafe fn defaultMenu() -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(sendsActionOnEndEditing)] pub unsafe fn sendsActionOnEndEditing(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSendsActionOnEndEditing:)] pub unsafe fn setSendsActionOnEndEditing(&self, sends_action_on_end_editing: bool); + #[cfg(not(any(target_os = "ios")))] #[method(baseWritingDirection)] pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setBaseWritingDirection:)] pub unsafe fn setBaseWritingDirection(&self, base_writing_direction: NSWritingDirection); + #[cfg(not(any(target_os = "ios")))] #[method(lineBreakMode)] pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode; + #[cfg(not(any(target_os = "ios")))] #[method(setLineBreakMode:)] pub unsafe fn setLineBreakMode(&self, line_break_mode: NSLineBreakMode); + #[cfg(not(any(target_os = "ios")))] #[method(allowsUndo)] pub unsafe fn allowsUndo(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsUndo:)] pub unsafe fn setAllowsUndo(&self, allows_undo: bool); + #[cfg(not(any(target_os = "ios")))] #[method(truncatesLastVisibleLine)] pub unsafe fn truncatesLastVisibleLine(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setTruncatesLastVisibleLine:)] pub unsafe fn setTruncatesLastVisibleLine(&self, truncates_last_visible_line: bool); + #[cfg(not(any(target_os = "ios")))] #[method(userInterfaceLayoutDirection)] pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setUserInterfaceLayoutDirection:)] pub unsafe fn setUserInterfaceLayoutDirection( &self, @@ -577,12 +745,15 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSTextView", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fieldEditorForView:)] pub unsafe fn fieldEditorForView(&self, control_view: &NSView) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(usesSingleLineMode)] pub unsafe fn usesSingleLineMode(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesSingleLineMode:)] pub unsafe fn setUsesSingleLineMode(&self, uses_single_line_mode: bool); @@ -591,6 +762,7 @@ extern_methods!( feature = "AppKit_NSView", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other draggingImageComponentsWithFrame:inView:)] pub unsafe fn draggingImageComponentsWithFrame_inView( &self, @@ -604,34 +776,44 @@ extern_methods!( /// NSKeyboardUI #[cfg(feature = "AppKit_NSCell")] unsafe impl NSCell { + #[cfg(not(any(target_os = "ios")))] #[method(refusesFirstResponder)] pub unsafe fn refusesFirstResponder(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setRefusesFirstResponder:)] pub unsafe fn setRefusesFirstResponder(&self, refuses_first_responder: bool); + #[cfg(not(any(target_os = "ios")))] #[method(acceptsFirstResponder)] pub unsafe fn acceptsFirstResponder(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(showsFirstResponder)] pub unsafe fn showsFirstResponder(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsFirstResponder:)] pub unsafe fn setShowsFirstResponder(&self, shows_first_responder: bool); + #[cfg(not(any(target_os = "ios")))] #[method(performClick:)] pub unsafe fn performClick(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(focusRingType)] pub unsafe fn focusRingType(&self) -> NSFocusRingType; + #[cfg(not(any(target_os = "ios")))] #[method(setFocusRingType:)] pub unsafe fn setFocusRingType(&self, focus_ring_type: NSFocusRingType); + #[cfg(not(any(target_os = "ios")))] #[method(defaultFocusRingType)] pub unsafe fn defaultFocusRingType() -> NSFocusRingType; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawFocusRingMaskWithFrame:inView:)] pub unsafe fn drawFocusRingMaskWithFrame_inView( &self, @@ -640,6 +822,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(focusRingMaskBoundsForFrame:inView:)] pub unsafe fn focusRingMaskBoundsForFrame_inView( &self, @@ -647,6 +830,7 @@ extern_methods!( control_view: &NSView, ) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(wantsNotificationForMarkedText)] pub unsafe fn wantsNotificationForMarkedText(&self) -> bool; } @@ -657,22 +841,28 @@ extern_methods!( #[cfg(feature = "AppKit_NSCell")] unsafe impl NSCell { #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedStringValue)] pub unsafe fn attributedStringValue(&self) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAttributedStringValue:)] pub unsafe fn setAttributedStringValue(&self, attributed_string_value: &NSAttributedString); + #[cfg(not(any(target_os = "ios")))] #[method(allowsEditingTextAttributes)] pub unsafe fn allowsEditingTextAttributes(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsEditingTextAttributes:)] pub unsafe fn setAllowsEditingTextAttributes(&self, allows_editing_text_attributes: bool); + #[cfg(not(any(target_os = "ios")))] #[method(importsGraphics)] pub unsafe fn importsGraphics(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setImportsGraphics:)] pub unsafe fn setImportsGraphics(&self, imports_graphics: bool); } @@ -682,15 +872,19 @@ extern_methods!( /// NSCellMixedState #[cfg(feature = "AppKit_NSCell")] unsafe impl NSCell { + #[cfg(not(any(target_os = "ios")))] #[method(allowsMixedState)] pub unsafe fn allowsMixedState(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsMixedState:)] pub unsafe fn setAllowsMixedState(&self, allows_mixed_state: bool); + #[cfg(not(any(target_os = "ios")))] #[method(nextState)] pub unsafe fn nextState(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNextState)] pub unsafe fn setNextState(&self); } @@ -698,10 +892,15 @@ extern_methods!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSCellHitResult { + #[cfg(not(any(target_os = "ios")))] NSCellHitNone = 0, + #[cfg(not(any(target_os = "ios")))] NSCellHitContentArea = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSCellHitEditableTextArea = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSCellHitTrackableArea = 1 << 2, } ); @@ -711,6 +910,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSCell")] unsafe impl NSCell { #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(hitTestForEvent:inRect:ofView:)] pub unsafe fn hitTestForEvent_inRect_ofView( &self, @@ -726,6 +926,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSCell")] unsafe impl NSCell { #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(expansionFrameWithFrame:inView:)] pub unsafe fn expansionFrameWithFrame_inView( &self, @@ -734,6 +935,7 @@ extern_methods!( ) -> NSRect; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawWithExpansionFrame:inView:)] pub unsafe fn drawWithExpansionFrame_inView(&self, cell_frame: NSRect, view: &NSView); } @@ -741,10 +943,15 @@ extern_methods!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSBackgroundStyle { + #[cfg(not(any(target_os = "ios")))] NSBackgroundStyleNormal = 0, + #[cfg(not(any(target_os = "ios")))] NSBackgroundStyleEmphasized = 1, + #[cfg(not(any(target_os = "ios")))] NSBackgroundStyleRaised = 2, + #[cfg(not(any(target_os = "ios")))] NSBackgroundStyleLowered = 3, } ); @@ -753,12 +960,15 @@ extern_methods!( /// NSCellBackgroundStyle #[cfg(feature = "AppKit_NSCell")] unsafe impl NSCell { + #[cfg(not(any(target_os = "ios")))] #[method(backgroundStyle)] pub unsafe fn backgroundStyle(&self) -> NSBackgroundStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundStyle:)] pub unsafe fn setBackgroundStyle(&self, background_style: NSBackgroundStyle); + #[cfg(not(any(target_os = "ios")))] #[method(interiorBackgroundStyle)] pub unsafe fn interiorBackgroundStyle(&self) -> NSBackgroundStyle; } @@ -766,6 +976,7 @@ extern_methods!( extern_fn!( #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDrawThreePartImage( frame: NSRect, start_cap: Option<&NSImage>, @@ -780,6 +991,7 @@ extern_fn!( extern_fn!( #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDrawNinePartImage( frame: NSRect, top_left_corner: Option<&NSImage>, @@ -802,27 +1014,33 @@ extern_methods!( #[cfg(feature = "AppKit_NSCell")] unsafe impl NSCell { #[deprecated = "The controlTint property is not respected on 10.14 and later. For custom cells, use +[NSColor controlAccentColor] to respect the user's preferred accent color when drawing."] + #[cfg(not(any(target_os = "ios")))] #[method(controlTint)] pub unsafe fn controlTint(&self) -> NSControlTint; #[deprecated = "The controlTint property is not respected on 10.14 and later. For custom cells, use +[NSColor controlAccentColor] to respect the user's preferred accent color when drawing."] + #[cfg(not(any(target_os = "ios")))] #[method(setControlTint:)] pub unsafe fn setControlTint(&self, control_tint: NSControlTint); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(entryType)] pub unsafe fn entryType(&self) -> NSInteger; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setEntryType:)] pub unsafe fn setEntryType(&self, r#type: NSInteger); #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(isEntryAcceptable:)] pub unsafe fn isEntryAcceptable(&self, string: &NSString) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setFloatingPointFormat:left:right:)] pub unsafe fn setFloatingPointFormat_left_right( &self, @@ -832,20 +1050,24 @@ extern_methods!( ); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setMnemonicLocation:)] pub unsafe fn setMnemonicLocation(&self, location: NSUInteger); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(mnemonicLocation)] pub unsafe fn mnemonicLocation(&self) -> NSUInteger; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mnemonic)] pub unsafe fn mnemonic(&self) -> Id; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, string_with_ampersand: &NSString); } @@ -873,20 +1095,28 @@ extern_static!(NSControlTintDidChangeNotification: &'static NSNotificationName); extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { #[deprecated = "Use formatters instead"] + #[cfg(not(any(target_os = "ios")))] NSAnyType = 0, #[deprecated = "Use formatters instead"] + #[cfg(not(any(target_os = "ios")))] NSIntType = 1, #[deprecated = "Use formatters instead"] + #[cfg(not(any(target_os = "ios")))] NSPositiveIntType = 2, #[deprecated = "Use formatters instead"] + #[cfg(not(any(target_os = "ios")))] NSFloatType = 3, #[deprecated = "Use formatters instead"] + #[cfg(not(any(target_os = "ios")))] NSPositiveFloatType = 4, #[deprecated = "Use formatters instead"] + #[cfg(not(any(target_os = "ios")))] NSDoubleType = 6, #[deprecated = "Use formatters instead"] + #[cfg(not(any(target_os = "ios")))] NSPositiveDoubleType = 7, } ); diff --git a/AppKit/NSClickGestureRecognizer.rs b/AppKit/NSClickGestureRecognizer.rs index 02d56bb0e..e2f2fbdb4 100644 --- a/AppKit/NSClickGestureRecognizer.rs +++ b/AppKit/NSClickGestureRecognizer.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSClickGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] pub struct NSClickGestureRecognizer; #[cfg(feature = "AppKit_NSClickGestureRecognizer")] @@ -26,21 +27,27 @@ unsafe impl NSObjectProtocol for NSClickGestureRecognizer {} extern_methods!( #[cfg(feature = "AppKit_NSClickGestureRecognizer")] unsafe impl NSClickGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method(buttonMask)] pub unsafe fn buttonMask(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setButtonMask:)] pub unsafe fn setButtonMask(&self, button_mask: NSUInteger); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfClicksRequired)] pub unsafe fn numberOfClicksRequired(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfClicksRequired:)] pub unsafe fn setNumberOfClicksRequired(&self, number_of_clicks_required: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfTouchesRequired)] pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfTouchesRequired:)] pub unsafe fn setNumberOfTouchesRequired(&self, number_of_touches_required: NSInteger); } @@ -50,6 +57,7 @@ extern_methods!( /// Methods declared on superclass `NSGestureRecognizer` #[cfg(feature = "AppKit_NSClickGestureRecognizer")] unsafe impl NSClickGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithTarget:action:)] pub unsafe fn initWithTarget_action( this: Option>, diff --git a/AppKit/NSClipView.rs b/AppKit/NSClipView.rs index 2dd62e119..c26067b93 100644 --- a/AppKit/NSClipView.rs +++ b/AppKit/NSClipView.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSClipView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSClipView; #[cfg(feature = "AppKit_NSClipView")] @@ -45,66 +46,85 @@ extern_methods!( #[cfg(feature = "AppKit_NSClipView")] unsafe impl NSClipView { #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: &NSColor); + #[cfg(not(any(target_os = "ios")))] #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, draws_background: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other documentView)] pub unsafe fn documentView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setDocumentView:)] pub unsafe fn setDocumentView(&self, document_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(documentRect)] pub unsafe fn documentRect(&self) -> NSRect; #[cfg(feature = "AppKit_NSCursor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other documentCursor)] pub unsafe fn documentCursor(&self) -> Option>; #[cfg(feature = "AppKit_NSCursor")] + #[cfg(not(any(target_os = "ios")))] #[method(setDocumentCursor:)] pub unsafe fn setDocumentCursor(&self, document_cursor: Option<&NSCursor>); + #[cfg(not(any(target_os = "ios")))] #[method(documentVisibleRect)] pub unsafe fn documentVisibleRect(&self) -> NSRect; #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[method(viewFrameChanged:)] pub unsafe fn viewFrameChanged(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[method(viewBoundsChanged:)] pub unsafe fn viewBoundsChanged(&self, notification: &NSNotification); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(autoscroll:)] pub unsafe fn autoscroll(&self, event: &NSEvent) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(scrollToPoint:)] pub unsafe fn scrollToPoint(&self, new_origin: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(constrainBoundsRect:)] pub unsafe fn constrainBoundsRect(&self, proposed_bounds: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(contentInsets)] pub unsafe fn contentInsets(&self) -> NSEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(setContentInsets:)] pub unsafe fn setContentInsets(&self, content_insets: NSEdgeInsets); + #[cfg(not(any(target_os = "ios")))] #[method(automaticallyAdjustsContentInsets)] pub unsafe fn automaticallyAdjustsContentInsets(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticallyAdjustsContentInsets:)] pub unsafe fn setAutomaticallyAdjustsContentInsets( &self, @@ -118,10 +138,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(feature = "AppKit_NSClipView")] + #[cfg(not(any(target_os = "ios")))] #[method(reflectScrolledClipView:)] pub unsafe fn reflectScrolledClipView(&self, clip_view: &NSClipView); #[cfg(feature = "AppKit_NSClipView")] + #[cfg(not(any(target_os = "ios")))] #[method(scrollClipView:toPoint:)] pub unsafe fn scrollClipView_toPoint(&self, clip_view: &NSClipView, point: NSPoint); } @@ -131,14 +153,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSClipView")] unsafe impl NSClipView { #[deprecated = "Use -constrainBoundsRect: instead."] + #[cfg(not(any(target_os = "ios")))] #[method(constrainScrollPoint:)] pub unsafe fn constrainScrollPoint(&self, new_origin: NSPoint) -> NSPoint; #[deprecated = "Setting this property has no effect. NSClipView will always minimize the area of the document view that is invalidated. To force invalidation of the document view, use -[NSView setNeedsDisplayInRect:]."] + #[cfg(not(any(target_os = "ios")))] #[method(copiesOnScroll)] pub unsafe fn copiesOnScroll(&self) -> bool; #[deprecated = "Setting this property has no effect. NSClipView will always minimize the area of the document view that is invalidated. To force invalidation of the document view, use -[NSView setNeedsDisplayInRect:]."] + #[cfg(not(any(target_os = "ios")))] #[method(setCopiesOnScroll:)] pub unsafe fn setCopiesOnScroll(&self, copies_on_scroll: bool); } @@ -148,6 +173,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSClipView")] unsafe impl NSClipView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSCollectionView.rs b/AppKit/NSCollectionView.rs index 0c827e22f..6c0faa151 100644 --- a/AppKit/NSCollectionView.rs +++ b/AppKit/NSCollectionView.rs @@ -43,14 +43,17 @@ ns_options!( pub type NSCollectionViewSupplementaryElementKind = NSString; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSCollectionViewElement: NSObjectProtocol + NSUserInterfaceItemIdentification { + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(prepareForReuse)] unsafe fn prepareForReuse(&self); #[cfg(feature = "AppKit_NSCollectionViewLayoutAttributes")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(applyLayoutAttributes:)] unsafe fn applyLayoutAttributes( @@ -59,6 +62,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSCollectionViewLayout")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(willTransitionFromLayout:toLayout:)] unsafe fn willTransitionFromLayout_toLayout( @@ -68,6 +72,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSCollectionViewLayout")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(didTransitionFromLayout:toLayout:)] unsafe fn didTransitionFromLayout_toLayout( @@ -77,6 +82,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSCollectionViewLayoutAttributes")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other preferredLayoutAttributesFittingAttributes:)] unsafe fn preferredLayoutAttributesFittingAttributes( @@ -89,13 +95,16 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSCollectionViewSectionHeaderView: NSCollectionViewElement { #[cfg(feature = "AppKit_NSButton")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other sectionCollapseButton)] unsafe fn sectionCollapseButton(&self) -> Option>; #[cfg(feature = "AppKit_NSButton")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setSectionCollapseButton:)] unsafe fn setSectionCollapseButton(&self, section_collapse_button: Option<&NSButton>); @@ -107,6 +116,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionViewItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionViewItem; #[cfg(feature = "AppKit_NSCollectionViewItem")] @@ -138,34 +148,43 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewItem")] unsafe impl NSCollectionViewItem { #[cfg(feature = "AppKit_NSCollectionView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other collectionView)] pub unsafe fn collectionView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(isSelected)] pub unsafe fn isSelected(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSelected:)] pub unsafe fn setSelected(&self, selected: bool); + #[cfg(not(any(target_os = "ios")))] #[method(highlightState)] pub unsafe fn highlightState(&self) -> NSCollectionViewItemHighlightState; + #[cfg(not(any(target_os = "ios")))] #[method(setHighlightState:)] pub unsafe fn setHighlightState(&self, highlight_state: NSCollectionViewItemHighlightState); #[cfg(feature = "AppKit_NSImageView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageView)] pub unsafe fn imageView(&self) -> Option>; #[cfg(feature = "AppKit_NSImageView")] + #[cfg(not(any(target_os = "ios")))] #[method(setImageView:)] pub unsafe fn setImageView(&self, image_view: Option<&NSImageView>); #[cfg(feature = "AppKit_NSTextField")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textField)] pub unsafe fn textField(&self) -> Option>; #[cfg(feature = "AppKit_NSTextField")] + #[cfg(not(any(target_os = "ios")))] #[method(setTextField:)] pub unsafe fn setTextField(&self, text_field: Option<&NSTextField>); @@ -173,6 +192,7 @@ extern_methods!( feature = "AppKit_NSDraggingImageComponent", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other draggingImageComponents)] pub unsafe fn draggingImageComponents(&self) -> Id>; } @@ -181,6 +201,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionView; #[cfg(feature = "AppKit_NSCollectionView")] @@ -220,22 +241,26 @@ unsafe impl NSUserInterfaceItemIdentification for NSCollectionView {} extern_methods!( #[cfg(feature = "AppKit_NSCollectionView")] unsafe impl NSCollectionView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataSource)] pub unsafe fn dataSource( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDataSource:)] pub unsafe fn setDataSource( &self, data_source: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other prefetchDataSource)] pub unsafe fn prefetchDataSource( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setPrefetchDataSource:)] pub unsafe fn setPrefetchDataSource( &self, @@ -243,34 +268,43 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other content)] pub unsafe fn content(&self) -> Id>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setContent:)] pub unsafe fn setContent(&self, content: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(reloadData)] pub unsafe fn reloadData(&self); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundView)] pub unsafe fn backgroundView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundView:)] pub unsafe fn setBackgroundView(&self, background_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(backgroundViewScrollsWithContent)] pub unsafe fn backgroundViewScrollsWithContent(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundViewScrollsWithContent:)] pub unsafe fn setBackgroundViewScrollsWithContent( &self, @@ -278,10 +312,12 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSCollectionViewLayout")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other collectionViewLayout)] pub unsafe fn collectionViewLayout(&self) -> Option>; #[cfg(feature = "AppKit_NSCollectionViewLayout")] + #[cfg(not(any(target_os = "ios")))] #[method(setCollectionViewLayout:)] pub unsafe fn setCollectionViewLayout( &self, @@ -292,6 +328,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForItemAtIndexPath:)] pub unsafe fn layoutAttributesForItemAtIndexPath( &self, @@ -302,6 +339,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForSupplementaryElementOfKind:atIndexPath:)] pub unsafe fn layoutAttributesForSupplementaryElementOfKind_atIndexPath( &self, @@ -309,9 +347,11 @@ extern_methods!( index_path: &NSIndexPath, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(frameForItemAtIndex:)] pub unsafe fn frameForItemAtIndex(&self, index: NSUInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(frameForItemAtIndex:withNumberOfItems:)] pub unsafe fn frameForItemAtIndex_withNumberOfItems( &self, @@ -320,57 +360,73 @@ extern_methods!( ) -> NSRect; #[cfg(all(feature = "AppKit_NSColor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColors)] pub unsafe fn backgroundColors(&self) -> Id>; #[cfg(all(feature = "AppKit_NSColor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColors:)] pub unsafe fn setBackgroundColors(&self, background_colors: Option<&NSArray>); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfSections)] pub unsafe fn numberOfSections(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfItemsInSection:)] pub unsafe fn numberOfItemsInSection(&self, section: NSInteger) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(isFirstResponder)] pub unsafe fn isFirstResponder(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isSelectable)] pub unsafe fn isSelectable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectable:)] pub unsafe fn setSelectable(&self, selectable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsEmptySelection)] pub unsafe fn allowsEmptySelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsEmptySelection:)] pub unsafe fn setAllowsEmptySelection(&self, allows_empty_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsMultipleSelection)] pub unsafe fn allowsMultipleSelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsMultipleSelection:)] pub unsafe fn setAllowsMultipleSelection(&self, allows_multiple_selection: bool); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectionIndexes)] pub unsafe fn selectionIndexes(&self) -> Id; #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionIndexes:)] pub unsafe fn setSelectionIndexes(&self, selection_indexes: &NSIndexSet); #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectionIndexPaths)] pub unsafe fn selectionIndexPaths(&self) -> Id>; #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionIndexPaths:)] pub unsafe fn setSelectionIndexPaths(&self, selection_index_paths: &NSSet); #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method(selectItemsAtIndexPaths:scrollPosition:)] pub unsafe fn selectItemsAtIndexPaths_scrollPosition( &self, @@ -379,15 +435,19 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method(deselectItemsAtIndexPaths:)] pub unsafe fn deselectItemsAtIndexPaths(&self, index_paths: &NSSet); + #[cfg(not(any(target_os = "ios")))] #[method(selectAll:)] pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(deselectAll:)] pub unsafe fn deselectAll(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(registerClass:forItemWithIdentifier:)] pub unsafe fn registerClass_forItemWithIdentifier( &self, @@ -396,6 +456,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSNib")] + #[cfg(not(any(target_os = "ios")))] #[method(registerNib:forItemWithIdentifier:)] pub unsafe fn registerNib_forItemWithIdentifier( &self, @@ -403,6 +464,7 @@ extern_methods!( identifier: &NSUserInterfaceItemIdentifier, ); + #[cfg(not(any(target_os = "ios")))] #[method(registerClass:forSupplementaryViewOfKind:withIdentifier:)] pub unsafe fn registerClass_forSupplementaryViewOfKind_withIdentifier( &self, @@ -412,6 +474,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSNib")] + #[cfg(not(any(target_os = "ios")))] #[method(registerNib:forSupplementaryViewOfKind:withIdentifier:)] pub unsafe fn registerNib_forSupplementaryViewOfKind_withIdentifier( &self, @@ -424,6 +487,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewItem", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeItemWithIdentifier:forIndexPath:)] pub unsafe fn makeItemWithIdentifier_forIndexPath( &self, @@ -432,6 +496,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeSupplementaryViewOfKind:withIdentifier:forIndexPath:)] pub unsafe fn makeSupplementaryViewOfKind_withIdentifier_forIndexPath( &self, @@ -441,6 +506,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSCollectionViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemAtIndex:)] pub unsafe fn itemAtIndex(&self, index: NSUInteger) -> Option>; @@ -448,6 +514,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewItem", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemAtIndexPath:)] pub unsafe fn itemAtIndexPath( &self, @@ -458,10 +525,12 @@ extern_methods!( feature = "AppKit_NSCollectionViewItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other visibleItems)] pub unsafe fn visibleItems(&self) -> Id>; #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPathsForVisibleItems)] pub unsafe fn indexPathsForVisibleItems(&self) -> Id>; @@ -469,6 +538,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewItem", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPathForItem:)] pub unsafe fn indexPathForItem( &self, @@ -476,10 +546,12 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPathForItemAtPoint:)] pub unsafe fn indexPathForItemAtPoint(&self, point: NSPoint) -> Option>; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other supplementaryViewForElementKind:atIndexPath:)] pub unsafe fn supplementaryViewForElementKind_atIndexPath( &self, @@ -488,6 +560,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other visibleSupplementaryViewsOfKind:)] pub unsafe fn visibleSupplementaryViewsOfKind( &self, @@ -495,6 +568,7 @@ extern_methods!( ) -> Id>; #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPathsForVisibleSupplementaryElementsOfKind:)] pub unsafe fn indexPathsForVisibleSupplementaryElementsOfKind( &self, @@ -502,33 +576,41 @@ extern_methods!( ) -> Id>; #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(insertSections:)] pub unsafe fn insertSections(&self, sections: &NSIndexSet); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(deleteSections:)] pub unsafe fn deleteSections(&self, sections: &NSIndexSet); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(reloadSections:)] pub unsafe fn reloadSections(&self, sections: &NSIndexSet); + #[cfg(not(any(target_os = "ios")))] #[method(moveSection:toSection:)] pub unsafe fn moveSection_toSection(&self, section: NSInteger, new_section: NSInteger); #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method(insertItemsAtIndexPaths:)] pub unsafe fn insertItemsAtIndexPaths(&self, index_paths: &NSSet); #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method(deleteItemsAtIndexPaths:)] pub unsafe fn deleteItemsAtIndexPaths(&self, index_paths: &NSSet); #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method(reloadItemsAtIndexPaths:)] pub unsafe fn reloadItemsAtIndexPaths(&self, index_paths: &NSSet); #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method(moveItemAtIndexPath:toIndexPath:)] pub unsafe fn moveItemAtIndexPath_toIndexPath( &self, @@ -536,6 +618,7 @@ extern_methods!( new_index_path: &NSIndexPath, ); + #[cfg(not(any(target_os = "ios")))] #[method(performBatchUpdates:completionHandler:)] pub unsafe fn performBatchUpdates_completionHandler( &self, @@ -543,10 +626,12 @@ extern_methods!( completion_handler: Option<&Block<(Bool,), ()>>, ); + #[cfg(not(any(target_os = "ios")))] #[method(toggleSectionCollapse:)] pub unsafe fn toggleSectionCollapse(&self, sender: &Object); #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method(scrollToItemsAtIndexPaths:scrollPosition:)] pub unsafe fn scrollToItemsAtIndexPaths_scrollPosition( &self, @@ -554,6 +639,7 @@ extern_methods!( scroll_position: NSCollectionViewScrollPosition, ); + #[cfg(not(any(target_os = "ios")))] #[method(setDraggingSourceOperationMask:forLocal:)] pub unsafe fn setDraggingSourceOperationMask_forLocal( &self, @@ -567,6 +653,7 @@ extern_methods!( feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other draggingImageForItemsAtIndexPaths:withEvent:offset:)] pub unsafe fn draggingImageForItemsAtIndexPaths_withEvent_offset( &self, @@ -580,6 +667,7 @@ extern_methods!( feature = "AppKit_NSImage", feature = "Foundation_NSIndexSet" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other draggingImageForItemsAtIndexes:withEvent:offset:)] pub unsafe fn draggingImageForItemsAtIndexes_withEvent_offset( &self, @@ -591,8 +679,10 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSCollectionViewDataSource: NSObjectProtocol { #[cfg(feature = "AppKit_NSCollectionView")] + #[cfg(not(any(target_os = "ios")))] #[method(collectionView:numberOfItemsInSection:)] unsafe fn collectionView_numberOfItemsInSection( &self, @@ -605,6 +695,7 @@ extern_protocol!( feature = "AppKit_NSCollectionViewItem", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other collectionView:itemForRepresentedObjectAtIndexPath:)] unsafe fn collectionView_itemForRepresentedObjectAtIndexPath( &self, @@ -613,6 +704,7 @@ extern_protocol!( ) -> Id; #[cfg(feature = "AppKit_NSCollectionView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(numberOfSectionsInCollectionView:)] unsafe fn numberOfSectionsInCollectionView( @@ -625,6 +717,7 @@ extern_protocol!( feature = "AppKit_NSView", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other collectionView:viewForSupplementaryElementOfKind:atIndexPath:)] unsafe fn collectionView_viewForSupplementaryElementOfKind_atIndexPath( @@ -639,12 +732,14 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSCollectionViewPrefetching: NSObjectProtocol { #[cfg(all( feature = "AppKit_NSCollectionView", feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method(collectionView:prefetchItemsAtIndexPaths:)] unsafe fn collectionView_prefetchItemsAtIndexPaths( &self, @@ -657,6 +752,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:cancelPrefetchingForItemsAtIndexPaths:)] unsafe fn collectionView_cancelPrefetchingForItemsAtIndexPaths( @@ -670,6 +766,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSCollectionViewDelegate: NSObjectProtocol { #[cfg(all( feature = "AppKit_NSCollectionView", @@ -677,6 +774,7 @@ extern_protocol!( feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:canDragItemsAtIndexPaths:withEvent:)] unsafe fn collectionView_canDragItemsAtIndexPaths_withEvent( @@ -691,6 +789,7 @@ extern_protocol!( feature = "AppKit_NSEvent", feature = "Foundation_NSIndexSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:canDragItemsAtIndexes:withEvent:)] unsafe fn collectionView_canDragItemsAtIndexes_withEvent( @@ -707,6 +806,7 @@ extern_protocol!( feature = "Foundation_NSSet" ))] #[deprecated = "Use -collectionView:pasteboardWriterForItemAtIndexPath: instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:writeItemsAtIndexPaths:toPasteboard:)] unsafe fn collectionView_writeItemsAtIndexPaths_toPasteboard( @@ -722,6 +822,7 @@ extern_protocol!( feature = "Foundation_NSIndexSet" ))] #[deprecated = "Use -collectionView:pasteboardWriterForItemAtIndexPath: instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:writeItemsAtIndexes:toPasteboard:)] unsafe fn collectionView_writeItemsAtIndexes_toPasteboard( @@ -740,6 +841,7 @@ extern_protocol!( feature = "Foundation_NSURL" ))] #[deprecated = "Use NSFilePromiseReceiver objects instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other collectionView:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAtIndexPaths:)] unsafe fn collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexPaths( @@ -757,6 +859,7 @@ extern_protocol!( feature = "Foundation_NSURL" ))] #[deprecated = "Use NSFilePromiseReceiver objects instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other collectionView:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAtIndexes:)] unsafe fn collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexes( @@ -773,6 +876,7 @@ extern_protocol!( feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other collectionView:draggingImageForItemsAtIndexPaths:withEvent:offset:)] unsafe fn collectionView_draggingImageForItemsAtIndexPaths_withEvent_offset( @@ -789,6 +893,7 @@ extern_protocol!( feature = "AppKit_NSImage", feature = "Foundation_NSIndexSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other collectionView:draggingImageForItemsAtIndexes:withEvent:offset:)] unsafe fn collectionView_draggingImageForItemsAtIndexes_withEvent_offset( @@ -803,6 +908,7 @@ extern_protocol!( feature = "AppKit_NSCollectionView", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:validateDrop:proposedIndexPath:dropOperation:)] unsafe fn collectionView_validateDrop_proposedIndexPath_dropOperation( @@ -814,6 +920,7 @@ extern_protocol!( ) -> NSDragOperation; #[cfg(feature = "AppKit_NSCollectionView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:validateDrop:proposedIndex:dropOperation:)] unsafe fn collectionView_validateDrop_proposedIndex_dropOperation( @@ -828,6 +935,7 @@ extern_protocol!( feature = "AppKit_NSCollectionView", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:acceptDrop:indexPath:dropOperation:)] unsafe fn collectionView_acceptDrop_indexPath_dropOperation( @@ -839,6 +947,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSCollectionView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:acceptDrop:index:dropOperation:)] unsafe fn collectionView_acceptDrop_index_dropOperation( @@ -853,6 +962,7 @@ extern_protocol!( feature = "AppKit_NSCollectionView", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other collectionView:pasteboardWriterForItemAtIndexPath:)] unsafe fn collectionView_pasteboardWriterForItemAtIndexPath( @@ -862,6 +972,7 @@ extern_protocol!( ) -> Option>>; #[cfg(feature = "AppKit_NSCollectionView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other collectionView:pasteboardWriterForItemAtIndex:)] unsafe fn collectionView_pasteboardWriterForItemAtIndex( @@ -876,6 +987,7 @@ extern_protocol!( feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:draggingSession:willBeginAtPoint:forItemsAtIndexPaths:)] unsafe fn collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexPaths( @@ -891,6 +1003,7 @@ extern_protocol!( feature = "AppKit_NSDraggingSession", feature = "Foundation_NSIndexSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:draggingSession:willBeginAtPoint:forItemsAtIndexes:)] unsafe fn collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexes( @@ -905,6 +1018,7 @@ extern_protocol!( feature = "AppKit_NSCollectionView", feature = "AppKit_NSDraggingSession" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:draggingSession:endedAtPoint:dragOperation:)] unsafe fn collectionView_draggingSession_endedAtPoint_dragOperation( @@ -916,6 +1030,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSCollectionView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:updateDraggingItemsForDrag:)] unsafe fn collectionView_updateDraggingItemsForDrag( @@ -929,6 +1044,7 @@ extern_protocol!( feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other collectionView:shouldChangeItemsAtIndexPaths:toHighlightState:)] unsafe fn collectionView_shouldChangeItemsAtIndexPaths_toHighlightState( @@ -943,6 +1059,7 @@ extern_protocol!( feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:didChangeItemsAtIndexPaths:toHighlightState:)] unsafe fn collectionView_didChangeItemsAtIndexPaths_toHighlightState( @@ -957,6 +1074,7 @@ extern_protocol!( feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other collectionView:shouldSelectItemsAtIndexPaths:)] unsafe fn collectionView_shouldSelectItemsAtIndexPaths( @@ -970,6 +1088,7 @@ extern_protocol!( feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other collectionView:shouldDeselectItemsAtIndexPaths:)] unsafe fn collectionView_shouldDeselectItemsAtIndexPaths( @@ -983,6 +1102,7 @@ extern_protocol!( feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:didSelectItemsAtIndexPaths:)] unsafe fn collectionView_didSelectItemsAtIndexPaths( @@ -996,6 +1116,7 @@ extern_protocol!( feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:didDeselectItemsAtIndexPaths:)] unsafe fn collectionView_didDeselectItemsAtIndexPaths( @@ -1009,6 +1130,7 @@ extern_protocol!( feature = "AppKit_NSCollectionViewItem", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:willDisplayItem:forRepresentedObjectAtIndexPath:)] unsafe fn collectionView_willDisplayItem_forRepresentedObjectAtIndexPath( @@ -1023,6 +1145,7 @@ extern_protocol!( feature = "AppKit_NSView", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:willDisplaySupplementaryView:forElementKind:atIndexPath:)] unsafe fn collectionView_willDisplaySupplementaryView_forElementKind_atIndexPath( @@ -1038,6 +1161,7 @@ extern_protocol!( feature = "AppKit_NSCollectionViewItem", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:didEndDisplayingItem:forRepresentedObjectAtIndexPath:)] unsafe fn collectionView_didEndDisplayingItem_forRepresentedObjectAtIndexPath( @@ -1052,6 +1176,7 @@ extern_protocol!( feature = "AppKit_NSView", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:didEndDisplayingSupplementaryView:forElementOfKind:atIndexPath:)] unsafe fn collectionView_didEndDisplayingSupplementaryView_forElementOfKind_atIndexPath( @@ -1067,6 +1192,7 @@ extern_protocol!( feature = "AppKit_NSCollectionViewLayout", feature = "AppKit_NSCollectionViewTransitionLayout" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other collectionView:transitionLayoutForOldLayout:newLayout:)] unsafe fn collectionView_transitionLayoutForOldLayout_newLayout( @@ -1084,15 +1210,18 @@ extern_methods!( /// NSCollectionViewAdditions #[cfg(feature = "Foundation_NSIndexPath")] unsafe impl NSIndexPath { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPathForItem:inSection:)] pub unsafe fn indexPathForItem_inSection( item: NSInteger, section: NSInteger, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(item)] pub unsafe fn item(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(section)] pub unsafe fn section(&self) -> NSInteger; } @@ -1103,16 +1232,19 @@ extern_methods!( #[cfg(feature = "Foundation_NSSet")] unsafe impl NSSet { #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other setWithCollectionViewIndexPath:)] pub unsafe fn setWithCollectionViewIndexPath(index_path: &NSIndexPath) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other setWithCollectionViewIndexPaths:)] pub unsafe fn setWithCollectionViewIndexPaths( index_paths: &NSArray, ) -> Id; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method(enumerateIndexPathsWithOptions:usingBlock:)] pub unsafe fn enumerateIndexPathsWithOptions_usingBlock( &self, @@ -1128,6 +1260,7 @@ extern_methods!( unsafe impl NSCollectionView { #[cfg(feature = "AppKit_NSCollectionViewItem")] #[deprecated = "Use -[NSCollectionViewDataSource collectionView:itemForRepresentedObjectAtIndexPath:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New newItemForRepresentedObject:)] pub unsafe fn newItemForRepresentedObject( &self, @@ -1136,43 +1269,53 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewItem")] #[deprecated = "Use -registerNib:forItemWithIdentifier: or -registerClass:forItemWithIdentifier: instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemPrototype)] pub unsafe fn itemPrototype(&self) -> Option>; #[cfg(feature = "AppKit_NSCollectionViewItem")] #[deprecated = "Use -registerNib:forItemWithIdentifier: or -registerClass:forItemWithIdentifier: instead."] + #[cfg(not(any(target_os = "ios")))] #[method(setItemPrototype:)] pub unsafe fn setItemPrototype(&self, item_prototype: Option<&NSCollectionViewItem>); #[deprecated = "Use NSCollectionViewGridLayout as the receiver's collectionViewLayout, setting its maximumNumberOfRows instead"] + #[cfg(not(any(target_os = "ios")))] #[method(maxNumberOfRows)] pub unsafe fn maxNumberOfRows(&self) -> NSUInteger; #[deprecated = "Use NSCollectionViewGridLayout as the receiver's collectionViewLayout, setting its maximumNumberOfRows instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setMaxNumberOfRows:)] pub unsafe fn setMaxNumberOfRows(&self, max_number_of_rows: NSUInteger); #[deprecated = "Use NSCollectionViewGridLayout as the receiver's collectionViewLayout, setting its maximumNumberOfColumns instead"] + #[cfg(not(any(target_os = "ios")))] #[method(maxNumberOfColumns)] pub unsafe fn maxNumberOfColumns(&self) -> NSUInteger; #[deprecated = "Use NSCollectionViewGridLayout as the receiver's collectionViewLayout, setting its maximumNumberOfColumns instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setMaxNumberOfColumns:)] pub unsafe fn setMaxNumberOfColumns(&self, max_number_of_columns: NSUInteger); #[deprecated = "Use NSCollectionViewGridLayout as the receiver's collectionViewLayout, setting its minimumItemSize instead"] + #[cfg(not(any(target_os = "ios")))] #[method(minItemSize)] pub unsafe fn minItemSize(&self) -> NSSize; #[deprecated = "Use NSCollectionViewGridLayout as the receiver's collectionViewLayout, setting its minimumItemSize instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setMinItemSize:)] pub unsafe fn setMinItemSize(&self, min_item_size: NSSize); #[deprecated = "Use NSCollectionViewGridLayout as the receiver's collectionViewLayout, setting its maximumItemSize instead"] + #[cfg(not(any(target_os = "ios")))] #[method(maxItemSize)] pub unsafe fn maxItemSize(&self) -> NSSize; #[deprecated = "Use NSCollectionViewGridLayout as the receiver's collectionViewLayout, setting its maximumItemSize instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setMaxItemSize:)] pub unsafe fn setMaxItemSize(&self, max_item_size: NSSize); } @@ -1183,6 +1326,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewItem")] unsafe impl NSCollectionViewItem { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, @@ -1196,6 +1340,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSCollectionView")] unsafe impl NSCollectionView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSCollectionViewCompositionalLayout.rs b/AppKit/NSCollectionViewCompositionalLayout.rs index b7c2e3604..a6e229d44 100644 --- a/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/AppKit/NSCollectionViewCompositionalLayout.rs @@ -7,12 +7,19 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSDirectionalRectEdge { + #[cfg(not(any(target_os = "ios")))] NSDirectionalRectEdgeNone = 0, + #[cfg(not(any(target_os = "ios")))] NSDirectionalRectEdgeTop = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSDirectionalRectEdgeLeading = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSDirectionalRectEdgeBottom = 1 << 2, + #[cfg(not(any(target_os = "ios")))] NSDirectionalRectEdgeTrailing = 1 << 3, + #[cfg(not(any(target_os = "ios")))] NSDirectionalRectEdgeAll = NSDirectionalRectEdgeTop | NSDirectionalRectEdgeLeading | NSDirectionalRectEdgeBottom @@ -21,6 +28,7 @@ ns_options!( ); extern_struct!( + #[cfg(not(any(target_os = "ios")))] pub struct NSDirectionalEdgeInsets { pub top: CGFloat, pub leading: CGFloat, @@ -33,20 +41,31 @@ extern_static!(NSDirectionalEdgeInsetsZero: NSDirectionalEdgeInsets); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSRectAlignment { + #[cfg(not(any(target_os = "ios")))] NSRectAlignmentNone = 0, + #[cfg(not(any(target_os = "ios")))] NSRectAlignmentTop = 1, + #[cfg(not(any(target_os = "ios")))] NSRectAlignmentTopLeading = 2, + #[cfg(not(any(target_os = "ios")))] NSRectAlignmentLeading = 3, + #[cfg(not(any(target_os = "ios")))] NSRectAlignmentBottomLeading = 4, + #[cfg(not(any(target_os = "ios")))] NSRectAlignmentBottom = 5, + #[cfg(not(any(target_os = "ios")))] NSRectAlignmentBottomTrailing = 6, + #[cfg(not(any(target_os = "ios")))] NSRectAlignmentTrailing = 7, + #[cfg(not(any(target_os = "ios")))] NSRectAlignmentTopTrailing = 8, } ); inline_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDirectionalEdgeInsetsMake( top: CGFloat, leading: CGFloat, @@ -60,6 +79,7 @@ inline_fn!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionViewCompositionalLayoutConfiguration")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionViewCompositionalLayoutConfiguration; #[cfg(feature = "AppKit_NSCollectionViewCompositionalLayoutConfiguration")] @@ -74,15 +94,19 @@ unsafe impl NSObjectProtocol for NSCollectionViewCompositionalLayoutConfiguratio extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewCompositionalLayoutConfiguration")] unsafe impl NSCollectionViewCompositionalLayoutConfiguration { + #[cfg(not(any(target_os = "ios")))] #[method(scrollDirection)] pub unsafe fn scrollDirection(&self) -> NSCollectionViewScrollDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setScrollDirection:)] pub unsafe fn setScrollDirection(&self, scroll_direction: NSCollectionViewScrollDirection); + #[cfg(not(any(target_os = "ios")))] #[method(interSectionSpacing)] pub unsafe fn interSectionSpacing(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setInterSectionSpacing:)] pub unsafe fn setInterSectionSpacing(&self, inter_section_spacing: CGFloat); @@ -90,6 +114,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutBoundarySupplementaryItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other boundarySupplementaryItems)] pub unsafe fn boundarySupplementaryItems( &self, @@ -99,6 +124,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutBoundarySupplementaryItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setBoundarySupplementaryItems:)] pub unsafe fn setBoundarySupplementaryItems( &self, @@ -118,6 +144,7 @@ pub type NSCollectionViewCompositionalLayoutSectionProvider = *mut Block< extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionViewCompositionalLayout")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionViewCompositionalLayout; #[cfg(feature = "AppKit_NSCollectionViewCompositionalLayout")] @@ -137,6 +164,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewCompositionalLayout")] unsafe impl NSCollectionViewCompositionalLayout { #[cfg(feature = "AppKit_NSCollectionLayoutSection")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithSection:)] pub unsafe fn initWithSection( this: Option>, @@ -147,6 +175,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSection", feature = "AppKit_NSCollectionViewCompositionalLayoutConfiguration" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithSection:configuration:)] pub unsafe fn initWithSection_configuration( this: Option>, @@ -154,6 +183,7 @@ extern_methods!( configuration: &NSCollectionViewCompositionalLayoutConfiguration, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithSectionProvider:)] pub unsafe fn initWithSectionProvider( this: Option>, @@ -161,6 +191,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSCollectionViewCompositionalLayoutConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithSectionProvider:configuration:)] pub unsafe fn initWithSectionProvider_configuration( this: Option>, @@ -168,17 +199,21 @@ extern_methods!( configuration: &NSCollectionViewCompositionalLayoutConfiguration, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[cfg(feature = "AppKit_NSCollectionViewCompositionalLayoutConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configuration)] pub unsafe fn configuration(&self) -> Id; #[cfg(feature = "AppKit_NSCollectionViewCompositionalLayoutConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method(setConfiguration:)] pub unsafe fn setConfiguration( &self, @@ -189,12 +224,19 @@ extern_methods!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSCollectionLayoutSectionOrthogonalScrollingBehavior { + #[cfg(not(any(target_os = "ios")))] NSCollectionLayoutSectionOrthogonalScrollingBehaviorNone = 0, + #[cfg(not(any(target_os = "ios")))] NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuous = 1, + #[cfg(not(any(target_os = "ios")))] NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuousGroupLeadingBoundary = 2, + #[cfg(not(any(target_os = "ios")))] NSCollectionLayoutSectionOrthogonalScrollingBehaviorPaging = 3, + #[cfg(not(any(target_os = "ios")))] NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging = 4, + #[cfg(not(any(target_os = "ios")))] NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPagingCentered = 5, } ); @@ -211,6 +253,7 @@ pub type NSCollectionLayoutSectionVisibleItemsInvalidationHandler = *mut Block< extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionLayoutSection")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionLayoutSection; #[cfg(feature = "AppKit_NSCollectionLayoutSection")] @@ -226,32 +269,41 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutSection")] unsafe impl NSCollectionLayoutSection { #[cfg(feature = "AppKit_NSCollectionLayoutGroup")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sectionWithGroup:)] pub unsafe fn sectionWithGroup(group: &NSCollectionLayoutGroup) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(contentInsets)] pub unsafe fn contentInsets(&self) -> NSDirectionalEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(setContentInsets:)] pub unsafe fn setContentInsets(&self, content_insets: NSDirectionalEdgeInsets); + #[cfg(not(any(target_os = "ios")))] #[method(interGroupSpacing)] pub unsafe fn interGroupSpacing(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setInterGroupSpacing:)] pub unsafe fn setInterGroupSpacing(&self, inter_group_spacing: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(orthogonalScrollingBehavior)] pub unsafe fn orthogonalScrollingBehavior( &self, ) -> NSCollectionLayoutSectionOrthogonalScrollingBehavior; + #[cfg(not(any(target_os = "ios")))] #[method(setOrthogonalScrollingBehavior:)] pub unsafe fn setOrthogonalScrollingBehavior( &self, @@ -262,6 +314,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutBoundarySupplementaryItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other boundarySupplementaryItems)] pub unsafe fn boundarySupplementaryItems( &self, @@ -271,26 +324,31 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutBoundarySupplementaryItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setBoundarySupplementaryItems:)] pub unsafe fn setBoundarySupplementaryItems( &self, boundary_supplementary_items: &NSArray, ); + #[cfg(not(any(target_os = "ios")))] #[method(supplementariesFollowContentInsets)] pub unsafe fn supplementariesFollowContentInsets(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSupplementariesFollowContentInsets:)] pub unsafe fn setSupplementariesFollowContentInsets( &self, supplementaries_follow_content_insets: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(visibleItemsInvalidationHandler)] pub unsafe fn visibleItemsInvalidationHandler( &self, ) -> NSCollectionLayoutSectionVisibleItemsInvalidationHandler; + #[cfg(not(any(target_os = "ios")))] #[method(setVisibleItemsInvalidationHandler:)] pub unsafe fn setVisibleItemsInvalidationHandler( &self, @@ -301,6 +359,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutDecorationItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other decorationItems)] pub unsafe fn decorationItems(&self) -> Id>; @@ -308,6 +367,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutDecorationItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setDecorationItems:)] pub unsafe fn setDecorationItems( &self, @@ -319,6 +379,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionLayoutItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionLayoutItem; #[cfg(feature = "AppKit_NSCollectionLayoutItem")] @@ -334,6 +395,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutItem")] unsafe impl NSCollectionLayoutItem { #[cfg(feature = "AppKit_NSCollectionLayoutSize")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithLayoutSize:)] pub unsafe fn itemWithLayoutSize(layout_size: &NSCollectionLayoutSize) -> Id; @@ -342,33 +404,41 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSupplementaryItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithLayoutSize:supplementaryItems:)] pub unsafe fn itemWithLayoutSize_supplementaryItems( layout_size: &NSCollectionLayoutSize, supplementary_items: &NSArray, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(contentInsets)] pub unsafe fn contentInsets(&self) -> NSDirectionalEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(setContentInsets:)] pub unsafe fn setContentInsets(&self, content_insets: NSDirectionalEdgeInsets); #[cfg(feature = "AppKit_NSCollectionLayoutEdgeSpacing")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other edgeSpacing)] pub unsafe fn edgeSpacing(&self) -> Option>; #[cfg(feature = "AppKit_NSCollectionLayoutEdgeSpacing")] + #[cfg(not(any(target_os = "ios")))] #[method(setEdgeSpacing:)] pub unsafe fn setEdgeSpacing(&self, edge_spacing: Option<&NSCollectionLayoutEdgeSpacing>); #[cfg(feature = "AppKit_NSCollectionLayoutSize")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutSize)] pub unsafe fn layoutSize(&self) -> Id; @@ -376,6 +446,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSupplementaryItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other supplementaryItems)] pub unsafe fn supplementaryItems(&self) -> Id>; @@ -385,6 +456,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionLayoutGroupCustomItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionLayoutGroupCustomItem; #[cfg(feature = "AppKit_NSCollectionLayoutGroupCustomItem")] @@ -399,21 +471,27 @@ unsafe impl NSObjectProtocol for NSCollectionLayoutGroupCustomItem {} extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutGroupCustomItem")] unsafe impl NSCollectionLayoutGroupCustomItem { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other customItemWithFrame:)] pub unsafe fn customItemWithFrame(frame: NSRect) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other customItemWithFrame:zIndex:)] pub unsafe fn customItemWithFrame_zIndex(frame: NSRect, z_index: NSInteger) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(zIndex)] pub unsafe fn zIndex(&self) -> NSInteger; } @@ -427,6 +505,7 @@ pub type NSCollectionLayoutGroupCustomItemProvider = *mut Block< extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionLayoutGroup")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionLayoutGroup; #[cfg(feature = "AppKit_NSCollectionLayoutGroup")] @@ -443,6 +522,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutGroup")] unsafe impl NSCollectionLayoutGroup { #[cfg(feature = "AppKit_NSCollectionLayoutSize")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other horizontalGroupWithLayoutSize:subitem:count:)] pub unsafe fn horizontalGroupWithLayoutSize_subitem_count( layout_size: &NSCollectionLayoutSize, @@ -454,6 +534,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSize", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other horizontalGroupWithLayoutSize:subitems:)] pub unsafe fn horizontalGroupWithLayoutSize_subitems( layout_size: &NSCollectionLayoutSize, @@ -461,6 +542,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSCollectionLayoutSize")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other verticalGroupWithLayoutSize:subitem:count:)] pub unsafe fn verticalGroupWithLayoutSize_subitem_count( layout_size: &NSCollectionLayoutSize, @@ -472,6 +554,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSize", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other verticalGroupWithLayoutSize:subitems:)] pub unsafe fn verticalGroupWithLayoutSize_subitems( layout_size: &NSCollectionLayoutSize, @@ -479,15 +562,18 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSCollectionLayoutSize")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other customGroupWithLayoutSize:itemProvider:)] pub unsafe fn customGroupWithLayoutSize_itemProvider( layout_size: &NSCollectionLayoutSize, item_provider: NSCollectionLayoutGroupCustomItemProvider, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; @@ -495,6 +581,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSupplementaryItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other supplementaryItems)] pub unsafe fn supplementaryItems(&self) -> Id>; @@ -503,6 +590,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSupplementaryItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setSupplementaryItems:)] pub unsafe fn setSupplementaryItems( &self, @@ -510,10 +598,12 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSCollectionLayoutSpacing")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other interItemSpacing)] pub unsafe fn interItemSpacing(&self) -> Option>; #[cfg(feature = "AppKit_NSCollectionLayoutSpacing")] + #[cfg(not(any(target_os = "ios")))] #[method(setInterItemSpacing:)] pub unsafe fn setInterItemSpacing( &self, @@ -521,10 +611,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other subitems)] pub unsafe fn subitems(&self) -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other visualDescription)] pub unsafe fn visualDescription(&self) -> Id; } @@ -533,6 +625,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionLayoutDimension")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionLayoutDimension; #[cfg(feature = "AppKit_NSCollectionLayoutDimension")] @@ -547,36 +640,47 @@ unsafe impl NSObjectProtocol for NSCollectionLayoutDimension {} extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutDimension")] unsafe impl NSCollectionLayoutDimension { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fractionalWidthDimension:)] pub unsafe fn fractionalWidthDimension(fractional_width: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fractionalHeightDimension:)] pub unsafe fn fractionalHeightDimension(fractional_height: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other absoluteDimension:)] pub unsafe fn absoluteDimension(absolute_dimension: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other estimatedDimension:)] pub unsafe fn estimatedDimension(estimated_dimension: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(isFractionalWidth)] pub unsafe fn isFractionalWidth(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isFractionalHeight)] pub unsafe fn isFractionalHeight(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isAbsolute)] pub unsafe fn isAbsolute(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isEstimated)] pub unsafe fn isEstimated(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(dimension)] pub unsafe fn dimension(&self) -> CGFloat; } @@ -585,6 +689,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionLayoutSize")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionLayoutSize; #[cfg(feature = "AppKit_NSCollectionLayoutSize")] @@ -600,23 +705,28 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutSize")] unsafe impl NSCollectionLayoutSize { #[cfg(feature = "AppKit_NSCollectionLayoutDimension")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sizeWithWidthDimension:heightDimension:)] pub unsafe fn sizeWithWidthDimension_heightDimension( width: &NSCollectionLayoutDimension, height: &NSCollectionLayoutDimension, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[cfg(feature = "AppKit_NSCollectionLayoutDimension")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other widthDimension)] pub unsafe fn widthDimension(&self) -> Id; #[cfg(feature = "AppKit_NSCollectionLayoutDimension")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other heightDimension)] pub unsafe fn heightDimension(&self) -> Id; } @@ -625,6 +735,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionLayoutSpacing")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionLayoutSpacing; #[cfg(feature = "AppKit_NSCollectionLayoutSpacing")] @@ -639,24 +750,31 @@ unsafe impl NSObjectProtocol for NSCollectionLayoutSpacing {} extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutSpacing")] unsafe impl NSCollectionLayoutSpacing { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other flexibleSpacing:)] pub unsafe fn flexibleSpacing(flexible_spacing: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fixedSpacing:)] pub unsafe fn fixedSpacing(fixed_spacing: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(spacing)] pub unsafe fn spacing(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(isFlexibleSpacing)] pub unsafe fn isFlexibleSpacing(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isFixedSpacing)] pub unsafe fn isFixedSpacing(&self) -> bool; } @@ -665,6 +783,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionLayoutEdgeSpacing")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionLayoutEdgeSpacing; #[cfg(feature = "AppKit_NSCollectionLayoutEdgeSpacing")] @@ -680,6 +799,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutEdgeSpacing")] unsafe impl NSCollectionLayoutEdgeSpacing { #[cfg(feature = "AppKit_NSCollectionLayoutSpacing")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other spacingForLeading:top:trailing:bottom:)] pub unsafe fn spacingForLeading_top_trailing_bottom( leading: Option<&NSCollectionLayoutSpacing>, @@ -688,25 +808,31 @@ extern_methods!( bottom: Option<&NSCollectionLayoutSpacing>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[cfg(feature = "AppKit_NSCollectionLayoutSpacing")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other leading)] pub unsafe fn leading(&self) -> Option>; #[cfg(feature = "AppKit_NSCollectionLayoutSpacing")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other top)] pub unsafe fn top(&self) -> Option>; #[cfg(feature = "AppKit_NSCollectionLayoutSpacing")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other trailing)] pub unsafe fn trailing(&self) -> Option>; #[cfg(feature = "AppKit_NSCollectionLayoutSpacing")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bottom)] pub unsafe fn bottom(&self) -> Option>; } @@ -715,6 +841,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionLayoutSupplementaryItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionLayoutSupplementaryItem; #[cfg(feature = "AppKit_NSCollectionLayoutSupplementaryItem")] @@ -735,6 +862,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSize", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other supplementaryItemWithLayoutSize:elementKind:containerAnchor:)] pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor( layout_size: &NSCollectionLayoutSize, @@ -747,6 +875,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSize", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other supplementaryItemWithLayoutSize:elementKind:containerAnchor:itemAnchor:)] pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor_itemAnchor( layout_size: &NSCollectionLayoutSize, @@ -755,27 +884,34 @@ extern_methods!( item_anchor: &NSCollectionLayoutAnchor, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(zIndex)] pub unsafe fn zIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setZIndex:)] pub unsafe fn setZIndex(&self, z_index: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other elementKind)] pub unsafe fn elementKind(&self) -> Id; #[cfg(feature = "AppKit_NSCollectionLayoutAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other containerAnchor)] pub unsafe fn containerAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSCollectionLayoutAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemAnchor)] pub unsafe fn itemAnchor(&self) -> Option>; } @@ -784,6 +920,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionLayoutBoundarySupplementaryItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionLayoutBoundarySupplementaryItem; #[cfg(feature = "AppKit_NSCollectionLayoutBoundarySupplementaryItem")] @@ -803,6 +940,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSize", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other boundarySupplementaryItemWithLayoutSize:elementKind:alignment:)] pub unsafe fn boundarySupplementaryItemWithLayoutSize_elementKind_alignment( layout_size: &NSCollectionLayoutSize, @@ -814,6 +952,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSize", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other boundarySupplementaryItemWithLayoutSize:elementKind:alignment:absoluteOffset:)] pub unsafe fn boundarySupplementaryItemWithLayoutSize_elementKind_alignment_absoluteOffset( layout_size: &NSCollectionLayoutSize, @@ -822,27 +961,35 @@ extern_methods!( absolute_offset: NSPoint, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(extendsBoundary)] pub unsafe fn extendsBoundary(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setExtendsBoundary:)] pub unsafe fn setExtendsBoundary(&self, extends_boundary: bool); + #[cfg(not(any(target_os = "ios")))] #[method(pinToVisibleBounds)] pub unsafe fn pinToVisibleBounds(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPinToVisibleBounds:)] pub unsafe fn setPinToVisibleBounds(&self, pin_to_visible_bounds: bool); + #[cfg(not(any(target_os = "ios")))] #[method(alignment)] pub unsafe fn alignment(&self) -> NSRectAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(offset)] pub unsafe fn offset(&self) -> NSPoint; } @@ -851,6 +998,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionLayoutDecorationItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionLayoutDecorationItem; #[cfg(feature = "AppKit_NSCollectionLayoutDecorationItem")] @@ -867,22 +1015,28 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutDecorationItem")] unsafe impl NSCollectionLayoutDecorationItem { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundDecorationItemWithElementKind:)] pub unsafe fn backgroundDecorationItemWithElementKind(element_kind: &NSString) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(zIndex)] pub unsafe fn zIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setZIndex:)] pub unsafe fn setZIndex(&self, z_index: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other elementKind)] pub unsafe fn elementKind(&self) -> Id; } @@ -891,6 +1045,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionLayoutAnchor")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionLayoutAnchor; #[cfg(feature = "AppKit_NSCollectionLayoutAnchor")] @@ -905,52 +1060,66 @@ unsafe impl NSObjectProtocol for NSCollectionLayoutAnchor {} extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutAnchor")] unsafe impl NSCollectionLayoutAnchor { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAnchorWithEdges:)] pub unsafe fn layoutAnchorWithEdges(edges: NSDirectionalRectEdge) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAnchorWithEdges:absoluteOffset:)] pub unsafe fn layoutAnchorWithEdges_absoluteOffset( edges: NSDirectionalRectEdge, absolute_offset: NSPoint, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAnchorWithEdges:fractionalOffset:)] pub unsafe fn layoutAnchorWithEdges_fractionalOffset( edges: NSDirectionalRectEdge, fractional_offset: NSPoint, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(edges)] pub unsafe fn edges(&self) -> NSDirectionalRectEdge; + #[cfg(not(any(target_os = "ios")))] #[method(offset)] pub unsafe fn offset(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(isAbsoluteOffset)] pub unsafe fn isAbsoluteOffset(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isFractionalOffset)] pub unsafe fn isFractionalOffset(&self) -> bool; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSCollectionLayoutContainer: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[method(contentSize)] unsafe fn contentSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(effectiveContentSize)] unsafe fn effectiveContentSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(contentInsets)] unsafe fn contentInsets(&self) -> NSDirectionalEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(effectiveContentInsets)] unsafe fn effectiveContentInsets(&self) -> NSDirectionalEdgeInsets; } @@ -959,7 +1128,9 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSCollectionLayoutEnvironment: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other container)] unsafe fn container(&self) -> Id>; } @@ -968,49 +1139,64 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSCollectionLayoutVisibleItem: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[method(alpha)] unsafe fn alpha(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setAlpha:)] unsafe fn setAlpha(&self, alpha: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(zIndex)] unsafe fn zIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setZIndex:)] unsafe fn setZIndex(&self, z_index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(isHidden)] unsafe fn isHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHidden:)] unsafe fn setHidden(&self, hidden: bool); + #[cfg(not(any(target_os = "ios")))] #[method(center)] unsafe fn center(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(setCenter:)] unsafe fn setCenter(&self, center: NSPoint); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other name)] unsafe fn name(&self) -> Id; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPath)] unsafe fn indexPath(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(frame)] unsafe fn frame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(bounds)] unsafe fn bounds(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(representedElementCategory)] unsafe fn representedElementCategory(&self) -> NSCollectionElementCategory; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other representedElementKind)] unsafe fn representedElementKind(&self) -> Option>; } @@ -1023,6 +1209,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutGroup")] unsafe impl NSCollectionLayoutGroup { #[cfg(feature = "AppKit_NSCollectionLayoutSize")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithLayoutSize:)] pub unsafe fn itemWithLayoutSize(layout_size: &NSCollectionLayoutSize) -> Id; @@ -1031,6 +1218,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSupplementaryItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithLayoutSize:supplementaryItems:)] pub unsafe fn itemWithLayoutSize_supplementaryItems( layout_size: &NSCollectionLayoutSize, @@ -1044,6 +1232,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutSupplementaryItem")] unsafe impl NSCollectionLayoutSupplementaryItem { #[cfg(feature = "AppKit_NSCollectionLayoutSize")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithLayoutSize:)] pub unsafe fn itemWithLayoutSize(layout_size: &NSCollectionLayoutSize) -> Id; @@ -1051,6 +1240,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSize", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithLayoutSize:supplementaryItems:)] pub unsafe fn itemWithLayoutSize_supplementaryItems( layout_size: &NSCollectionLayoutSize, @@ -1068,6 +1258,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSize", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other supplementaryItemWithLayoutSize:elementKind:containerAnchor:)] pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor( layout_size: &NSCollectionLayoutSize, @@ -1080,6 +1271,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSize", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other supplementaryItemWithLayoutSize:elementKind:containerAnchor:itemAnchor:)] pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor_itemAnchor( layout_size: &NSCollectionLayoutSize, @@ -1095,6 +1287,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutBoundarySupplementaryItem")] unsafe impl NSCollectionLayoutBoundarySupplementaryItem { #[cfg(feature = "AppKit_NSCollectionLayoutSize")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithLayoutSize:)] pub unsafe fn itemWithLayoutSize(layout_size: &NSCollectionLayoutSize) -> Id; @@ -1102,6 +1295,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSize", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithLayoutSize:supplementaryItems:)] pub unsafe fn itemWithLayoutSize_supplementaryItems( layout_size: &NSCollectionLayoutSize, @@ -1115,6 +1309,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionLayoutDecorationItem")] unsafe impl NSCollectionLayoutDecorationItem { #[cfg(feature = "AppKit_NSCollectionLayoutSize")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithLayoutSize:)] pub unsafe fn itemWithLayoutSize(layout_size: &NSCollectionLayoutSize) -> Id; @@ -1123,6 +1318,7 @@ extern_methods!( feature = "AppKit_NSCollectionLayoutSupplementaryItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithLayoutSize:supplementaryItems:)] pub unsafe fn itemWithLayoutSize_supplementaryItems( layout_size: &NSCollectionLayoutSize, diff --git a/AppKit/NSCollectionViewFlowLayout.rs b/AppKit/NSCollectionViewFlowLayout.rs index 85bf166c3..0424c3eb8 100644 --- a/AppKit/NSCollectionViewFlowLayout.rs +++ b/AppKit/NSCollectionViewFlowLayout.rs @@ -24,6 +24,7 @@ extern_static!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionViewFlowLayoutInvalidationContext")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionViewFlowLayoutInvalidationContext; #[cfg(feature = "AppKit_NSCollectionViewFlowLayoutInvalidationContext")] @@ -39,18 +40,22 @@ unsafe impl NSObjectProtocol for NSCollectionViewFlowLayoutInvalidationContext { extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewFlowLayoutInvalidationContext")] unsafe impl NSCollectionViewFlowLayoutInvalidationContext { + #[cfg(not(any(target_os = "ios")))] #[method(invalidateFlowLayoutDelegateMetrics)] pub unsafe fn invalidateFlowLayoutDelegateMetrics(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setInvalidateFlowLayoutDelegateMetrics:)] pub unsafe fn setInvalidateFlowLayoutDelegateMetrics( &self, invalidate_flow_layout_delegate_metrics: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(invalidateFlowLayoutAttributes)] pub unsafe fn invalidateFlowLayoutAttributes(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setInvalidateFlowLayoutAttributes:)] pub unsafe fn setInvalidateFlowLayoutAttributes( &self, @@ -60,12 +65,14 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSCollectionViewDelegateFlowLayout: NSCollectionViewDelegate { #[cfg(all( feature = "AppKit_NSCollectionView", feature = "AppKit_NSCollectionViewLayout", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:layout:sizeForItemAtIndexPath:)] unsafe fn collectionView_layout_sizeForItemAtIndexPath( @@ -79,6 +86,7 @@ extern_protocol!( feature = "AppKit_NSCollectionView", feature = "AppKit_NSCollectionViewLayout" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:layout:insetForSectionAtIndex:)] unsafe fn collectionView_layout_insetForSectionAtIndex( @@ -92,6 +100,7 @@ extern_protocol!( feature = "AppKit_NSCollectionView", feature = "AppKit_NSCollectionViewLayout" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:layout:minimumLineSpacingForSectionAtIndex:)] unsafe fn collectionView_layout_minimumLineSpacingForSectionAtIndex( @@ -105,6 +114,7 @@ extern_protocol!( feature = "AppKit_NSCollectionView", feature = "AppKit_NSCollectionViewLayout" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:layout:minimumInteritemSpacingForSectionAtIndex:)] unsafe fn collectionView_layout_minimumInteritemSpacingForSectionAtIndex( @@ -118,6 +128,7 @@ extern_protocol!( feature = "AppKit_NSCollectionView", feature = "AppKit_NSCollectionViewLayout" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:layout:referenceSizeForHeaderInSection:)] unsafe fn collectionView_layout_referenceSizeForHeaderInSection( @@ -131,6 +142,7 @@ extern_protocol!( feature = "AppKit_NSCollectionView", feature = "AppKit_NSCollectionViewLayout" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(collectionView:layout:referenceSizeForFooterInSection:)] unsafe fn collectionView_layout_referenceSizeForFooterInSection( @@ -147,6 +159,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionViewFlowLayout")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionViewFlowLayout; #[cfg(feature = "AppKit_NSCollectionViewFlowLayout")] @@ -165,78 +178,101 @@ unsafe impl NSObjectProtocol for NSCollectionViewFlowLayout {} extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewFlowLayout")] unsafe impl NSCollectionViewFlowLayout { + #[cfg(not(any(target_os = "ios")))] #[method(minimumLineSpacing)] pub unsafe fn minimumLineSpacing(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMinimumLineSpacing:)] pub unsafe fn setMinimumLineSpacing(&self, minimum_line_spacing: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(minimumInteritemSpacing)] pub unsafe fn minimumInteritemSpacing(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMinimumInteritemSpacing:)] pub unsafe fn setMinimumInteritemSpacing(&self, minimum_interitem_spacing: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(itemSize)] pub unsafe fn itemSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setItemSize:)] pub unsafe fn setItemSize(&self, item_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(estimatedItemSize)] pub unsafe fn estimatedItemSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setEstimatedItemSize:)] pub unsafe fn setEstimatedItemSize(&self, estimated_item_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(scrollDirection)] pub unsafe fn scrollDirection(&self) -> NSCollectionViewScrollDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setScrollDirection:)] pub unsafe fn setScrollDirection(&self, scroll_direction: NSCollectionViewScrollDirection); + #[cfg(not(any(target_os = "ios")))] #[method(headerReferenceSize)] pub unsafe fn headerReferenceSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setHeaderReferenceSize:)] pub unsafe fn setHeaderReferenceSize(&self, header_reference_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(footerReferenceSize)] pub unsafe fn footerReferenceSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setFooterReferenceSize:)] pub unsafe fn setFooterReferenceSize(&self, footer_reference_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(sectionInset)] pub unsafe fn sectionInset(&self) -> NSEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(setSectionInset:)] pub unsafe fn setSectionInset(&self, section_inset: NSEdgeInsets); + #[cfg(not(any(target_os = "ios")))] #[method(sectionHeadersPinToVisibleBounds)] pub unsafe fn sectionHeadersPinToVisibleBounds(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSectionHeadersPinToVisibleBounds:)] pub unsafe fn setSectionHeadersPinToVisibleBounds( &self, section_headers_pin_to_visible_bounds: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(sectionFootersPinToVisibleBounds)] pub unsafe fn sectionFootersPinToVisibleBounds(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSectionFootersPinToVisibleBounds:)] pub unsafe fn setSectionFootersPinToVisibleBounds( &self, section_footers_pin_to_visible_bounds: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(sectionAtIndexIsCollapsed:)] pub unsafe fn sectionAtIndexIsCollapsed(&self, section_index: NSUInteger) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(collapseSectionAtIndex:)] pub unsafe fn collapseSectionAtIndex(&self, section_index: NSUInteger); + #[cfg(not(any(target_os = "ios")))] #[method(expandSectionAtIndex:)] pub unsafe fn expandSectionAtIndex(&self, section_index: NSUInteger); } diff --git a/AppKit/NSCollectionViewGridLayout.rs b/AppKit/NSCollectionViewGridLayout.rs index 91f8de0d6..cdb99fd88 100644 --- a/AppKit/NSCollectionViewGridLayout.rs +++ b/AppKit/NSCollectionViewGridLayout.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionViewGridLayout")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionViewGridLayout; #[cfg(feature = "AppKit_NSCollectionViewGridLayout")] @@ -26,53 +27,69 @@ unsafe impl NSObjectProtocol for NSCollectionViewGridLayout {} extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewGridLayout")] unsafe impl NSCollectionViewGridLayout { + #[cfg(not(any(target_os = "ios")))] #[method(margins)] pub unsafe fn margins(&self) -> NSEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(setMargins:)] pub unsafe fn setMargins(&self, margins: NSEdgeInsets); + #[cfg(not(any(target_os = "ios")))] #[method(minimumInteritemSpacing)] pub unsafe fn minimumInteritemSpacing(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMinimumInteritemSpacing:)] pub unsafe fn setMinimumInteritemSpacing(&self, minimum_interitem_spacing: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(minimumLineSpacing)] pub unsafe fn minimumLineSpacing(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMinimumLineSpacing:)] pub unsafe fn setMinimumLineSpacing(&self, minimum_line_spacing: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(maximumNumberOfRows)] pub unsafe fn maximumNumberOfRows(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setMaximumNumberOfRows:)] pub unsafe fn setMaximumNumberOfRows(&self, maximum_number_of_rows: NSUInteger); + #[cfg(not(any(target_os = "ios")))] #[method(maximumNumberOfColumns)] pub unsafe fn maximumNumberOfColumns(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setMaximumNumberOfColumns:)] pub unsafe fn setMaximumNumberOfColumns(&self, maximum_number_of_columns: NSUInteger); + #[cfg(not(any(target_os = "ios")))] #[method(minimumItemSize)] pub unsafe fn minimumItemSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setMinimumItemSize:)] pub unsafe fn setMinimumItemSize(&self, minimum_item_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(maximumItemSize)] pub unsafe fn maximumItemSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setMaximumItemSize:)] pub unsafe fn setMaximumItemSize(&self, maximum_item_size: NSSize); #[cfg(all(feature = "AppKit_NSColor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColors)] pub unsafe fn backgroundColors(&self) -> Id>; #[cfg(all(feature = "AppKit_NSColor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColors:)] pub unsafe fn setBackgroundColors(&self, background_colors: Option<&NSArray>); } diff --git a/AppKit/NSCollectionViewLayout.rs b/AppKit/NSCollectionViewLayout.rs index 9df5468f2..6f930aa95 100644 --- a/AppKit/NSCollectionViewLayout.rs +++ b/AppKit/NSCollectionViewLayout.rs @@ -24,6 +24,7 @@ extern_static!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionViewLayoutAttributes")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionViewLayoutAttributes; #[cfg(feature = "AppKit_NSCollectionViewLayoutAttributes")] @@ -38,62 +39,79 @@ unsafe impl NSObjectProtocol for NSCollectionViewLayoutAttributes {} extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewLayoutAttributes")] unsafe impl NSCollectionViewLayoutAttributes { + #[cfg(not(any(target_os = "ios")))] #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setFrame:)] pub unsafe fn setFrame(&self, frame: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(size)] pub unsafe fn size(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setSize:)] pub unsafe fn setSize(&self, size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(alpha)] pub unsafe fn alpha(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setAlpha:)] pub unsafe fn setAlpha(&self, alpha: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(zIndex)] pub unsafe fn zIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setZIndex:)] pub unsafe fn setZIndex(&self, z_index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPath)] pub unsafe fn indexPath(&self) -> Option>; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method(setIndexPath:)] pub unsafe fn setIndexPath(&self, index_path: Option<&NSIndexPath>); + #[cfg(not(any(target_os = "ios")))] #[method(representedElementCategory)] pub unsafe fn representedElementCategory(&self) -> NSCollectionElementCategory; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other representedElementKind)] pub unsafe fn representedElementKind(&self) -> Option>; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForItemWithIndexPath:)] pub unsafe fn layoutAttributesForItemWithIndexPath(index_path: &NSIndexPath) -> Id; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForInterItemGapBeforeIndexPath:)] pub unsafe fn layoutAttributesForInterItemGapBeforeIndexPath( index_path: &NSIndexPath, ) -> Id; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForSupplementaryViewOfKind:withIndexPath:)] pub unsafe fn layoutAttributesForSupplementaryViewOfKind_withIndexPath( element_kind: &NSCollectionViewSupplementaryElementKind, @@ -101,6 +119,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForDecorationViewOfKind:withIndexPath:)] pub unsafe fn layoutAttributesForDecorationViewOfKind_withIndexPath( decoration_view_kind: &NSCollectionViewDecorationElementKind, @@ -111,11 +130,17 @@ extern_methods!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSCollectionUpdateAction { + #[cfg(not(any(target_os = "ios")))] NSCollectionUpdateActionInsert = 0, + #[cfg(not(any(target_os = "ios")))] NSCollectionUpdateActionDelete = 1, + #[cfg(not(any(target_os = "ios")))] NSCollectionUpdateActionReload = 2, + #[cfg(not(any(target_os = "ios")))] NSCollectionUpdateActionMove = 3, + #[cfg(not(any(target_os = "ios")))] NSCollectionUpdateActionNone = 4, } ); @@ -123,6 +148,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionViewUpdateItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionViewUpdateItem; #[cfg(feature = "AppKit_NSCollectionViewUpdateItem")] @@ -138,13 +164,16 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewUpdateItem")] unsafe impl NSCollectionViewUpdateItem { #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPathBeforeUpdate)] pub unsafe fn indexPathBeforeUpdate(&self) -> Option>; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPathAfterUpdate)] pub unsafe fn indexPathAfterUpdate(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(updateAction)] pub unsafe fn updateAction(&self) -> NSCollectionUpdateAction; } @@ -153,6 +182,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionViewLayoutInvalidationContext")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionViewLayoutInvalidationContext; #[cfg(feature = "AppKit_NSCollectionViewLayoutInvalidationContext")] @@ -167,17 +197,21 @@ unsafe impl NSObjectProtocol for NSCollectionViewLayoutInvalidationContext {} extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewLayoutInvalidationContext")] unsafe impl NSCollectionViewLayoutInvalidationContext { + #[cfg(not(any(target_os = "ios")))] #[method(invalidateEverything)] pub unsafe fn invalidateEverything(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(invalidateDataSourceCounts)] pub unsafe fn invalidateDataSourceCounts(&self) -> bool; #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method(invalidateItemsAtIndexPaths:)] pub unsafe fn invalidateItemsAtIndexPaths(&self, index_paths: &NSSet); #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method(invalidateSupplementaryElementsOfKind:atIndexPaths:)] pub unsafe fn invalidateSupplementaryElementsOfKind_atIndexPaths( &self, @@ -186,6 +220,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method(invalidateDecorationElementsOfKind:atIndexPaths:)] pub unsafe fn invalidateDecorationElementsOfKind_atIndexPaths( &self, @@ -194,6 +229,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other invalidatedItemIndexPaths)] pub unsafe fn invalidatedItemIndexPaths(&self) -> Option>>; @@ -202,6 +238,7 @@ extern_methods!( feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other invalidatedSupplementaryIndexPaths)] pub unsafe fn invalidatedSupplementaryIndexPaths( &self, @@ -212,20 +249,25 @@ extern_methods!( feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other invalidatedDecorationIndexPaths)] pub unsafe fn invalidatedDecorationIndexPaths( &self, ) -> Option>>>; + #[cfg(not(any(target_os = "ios")))] #[method(contentOffsetAdjustment)] pub unsafe fn contentOffsetAdjustment(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(setContentOffsetAdjustment:)] pub unsafe fn setContentOffsetAdjustment(&self, content_offset_adjustment: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(contentSizeAdjustment)] pub unsafe fn contentSizeAdjustment(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setContentSizeAdjustment:)] pub unsafe fn setContentSizeAdjustment(&self, content_size_adjustment: NSSize); } @@ -234,6 +276,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionViewLayout")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionViewLayout; #[cfg(feature = "AppKit_NSCollectionViewLayout")] @@ -252,19 +295,23 @@ extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewLayout")] unsafe impl NSCollectionViewLayout { #[cfg(feature = "AppKit_NSCollectionView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other collectionView)] pub unsafe fn collectionView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(invalidateLayout)] pub unsafe fn invalidateLayout(&self); #[cfg(feature = "AppKit_NSCollectionViewLayoutInvalidationContext")] + #[cfg(not(any(target_os = "ios")))] #[method(invalidateLayoutWithContext:)] pub unsafe fn invalidateLayoutWithContext( &self, context: &NSCollectionViewLayoutInvalidationContext, ); + #[cfg(not(any(target_os = "ios")))] #[method(registerClass:forDecorationViewOfKind:)] pub unsafe fn registerClass_forDecorationViewOfKind( &self, @@ -273,6 +320,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSNib")] + #[cfg(not(any(target_os = "ios")))] #[method(registerNib:forDecorationViewOfKind:)] pub unsafe fn registerNib_forDecorationViewOfKind( &self, @@ -286,12 +334,15 @@ extern_methods!( /// NSSubclassingHooks #[cfg(feature = "AppKit_NSCollectionViewLayout")] unsafe impl NSCollectionViewLayout { + #[cfg(not(any(target_os = "ios")))] #[method(layoutAttributesClass)] pub unsafe fn layoutAttributesClass() -> &'static Class; + #[cfg(not(any(target_os = "ios")))] #[method(invalidationContextClass)] pub unsafe fn invalidationContextClass() -> &'static Class; + #[cfg(not(any(target_os = "ios")))] #[method(prepareLayout)] pub unsafe fn prepareLayout(&self); @@ -299,6 +350,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForElementsInRect:)] pub unsafe fn layoutAttributesForElementsInRect( &self, @@ -309,6 +361,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForItemAtIndexPath:)] pub unsafe fn layoutAttributesForItemAtIndexPath( &self, @@ -319,6 +372,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForSupplementaryViewOfKind:atIndexPath:)] pub unsafe fn layoutAttributesForSupplementaryViewOfKind_atIndexPath( &self, @@ -330,6 +384,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForDecorationViewOfKind:atIndexPath:)] pub unsafe fn layoutAttributesForDecorationViewOfKind_atIndexPath( &self, @@ -338,6 +393,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSCollectionViewLayoutAttributes")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForDropTargetAtPoint:)] pub unsafe fn layoutAttributesForDropTargetAtPoint( &self, @@ -348,16 +404,19 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForInterItemGapBeforeIndexPath:)] pub unsafe fn layoutAttributesForInterItemGapBeforeIndexPath( &self, index_path: &NSIndexPath, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(shouldInvalidateLayoutForBoundsChange:)] pub unsafe fn shouldInvalidateLayoutForBoundsChange(&self, new_bounds: NSRect) -> bool; #[cfg(feature = "AppKit_NSCollectionViewLayoutInvalidationContext")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other invalidationContextForBoundsChange:)] pub unsafe fn invalidationContextForBoundsChange( &self, @@ -365,6 +424,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSCollectionViewLayoutAttributes")] + #[cfg(not(any(target_os = "ios")))] #[method(shouldInvalidateLayoutForPreferredLayoutAttributes:withOriginalAttributes:)] pub unsafe fn shouldInvalidateLayoutForPreferredLayoutAttributes_withOriginalAttributes( &self, @@ -376,6 +436,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "AppKit_NSCollectionViewLayoutInvalidationContext" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other invalidationContextForPreferredLayoutAttributes:withOriginalAttributes:)] pub unsafe fn invalidationContextForPreferredLayoutAttributes_withOriginalAttributes( &self, @@ -383,6 +444,7 @@ extern_methods!( original_attributes: &NSCollectionViewLayoutAttributes, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(targetContentOffsetForProposedContentOffset:withScrollingVelocity:)] pub unsafe fn targetContentOffsetForProposedContentOffset_withScrollingVelocity( &self, @@ -390,12 +452,14 @@ extern_methods!( velocity: NSPoint, ) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(targetContentOffsetForProposedContentOffset:)] pub unsafe fn targetContentOffsetForProposedContentOffset( &self, proposed_content_offset: NSPoint, ) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(collectionViewContentSize)] pub unsafe fn collectionViewContentSize(&self) -> NSSize; } @@ -409,27 +473,34 @@ extern_methods!( feature = "AppKit_NSCollectionViewUpdateItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(prepareForCollectionViewUpdates:)] pub unsafe fn prepareForCollectionViewUpdates( &self, update_items: &NSArray, ); + #[cfg(not(any(target_os = "ios")))] #[method(finalizeCollectionViewUpdates)] pub unsafe fn finalizeCollectionViewUpdates(&self); + #[cfg(not(any(target_os = "ios")))] #[method(prepareForAnimatedBoundsChange:)] pub unsafe fn prepareForAnimatedBoundsChange(&self, old_bounds: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(finalizeAnimatedBoundsChange)] pub unsafe fn finalizeAnimatedBoundsChange(&self); + #[cfg(not(any(target_os = "ios")))] #[method(prepareForTransitionToLayout:)] pub unsafe fn prepareForTransitionToLayout(&self, new_layout: &NSCollectionViewLayout); + #[cfg(not(any(target_os = "ios")))] #[method(prepareForTransitionFromLayout:)] pub unsafe fn prepareForTransitionFromLayout(&self, old_layout: &NSCollectionViewLayout); + #[cfg(not(any(target_os = "ios")))] #[method(finalizeLayoutTransition)] pub unsafe fn finalizeLayoutTransition(&self); @@ -437,6 +508,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other initialLayoutAttributesForAppearingItemAtIndexPath:)] pub unsafe fn initialLayoutAttributesForAppearingItemAtIndexPath( &self, @@ -447,6 +519,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other finalLayoutAttributesForDisappearingItemAtIndexPath:)] pub unsafe fn finalLayoutAttributesForDisappearingItemAtIndexPath( &self, @@ -457,6 +530,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other initialLayoutAttributesForAppearingSupplementaryElementOfKind:atIndexPath:)] pub unsafe fn initialLayoutAttributesForAppearingSupplementaryElementOfKind_atIndexPath( &self, @@ -468,6 +542,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other finalLayoutAttributesForDisappearingSupplementaryElementOfKind:atIndexPath:)] pub unsafe fn finalLayoutAttributesForDisappearingSupplementaryElementOfKind_atIndexPath( &self, @@ -479,6 +554,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other initialLayoutAttributesForAppearingDecorationElementOfKind:atIndexPath:)] pub unsafe fn initialLayoutAttributesForAppearingDecorationElementOfKind_atIndexPath( &self, @@ -490,6 +566,7 @@ extern_methods!( feature = "AppKit_NSCollectionViewLayoutAttributes", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other finalLayoutAttributesForDisappearingDecorationElementOfKind:atIndexPath:)] pub unsafe fn finalLayoutAttributesForDisappearingDecorationElementOfKind_atIndexPath( &self, @@ -498,6 +575,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPathsToDeleteForSupplementaryViewOfKind:)] pub unsafe fn indexPathsToDeleteForSupplementaryViewOfKind( &self, @@ -505,6 +583,7 @@ extern_methods!( ) -> Id>; #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPathsToDeleteForDecorationViewOfKind:)] pub unsafe fn indexPathsToDeleteForDecorationViewOfKind( &self, @@ -512,6 +591,7 @@ extern_methods!( ) -> Id>; #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPathsToInsertForSupplementaryViewOfKind:)] pub unsafe fn indexPathsToInsertForSupplementaryViewOfKind( &self, @@ -519,6 +599,7 @@ extern_methods!( ) -> Id>; #[cfg(all(feature = "Foundation_NSIndexPath", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPathsToInsertForDecorationViewOfKind:)] pub unsafe fn indexPathsToInsertForDecorationViewOfKind( &self, diff --git a/AppKit/NSCollectionViewTransitionLayout.rs b/AppKit/NSCollectionViewTransitionLayout.rs index a76f992a2..5193de71a 100644 --- a/AppKit/NSCollectionViewTransitionLayout.rs +++ b/AppKit/NSCollectionViewTransitionLayout.rs @@ -10,6 +10,7 @@ pub type NSCollectionViewTransitionLayoutAnimatedKey = NSString; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCollectionViewTransitionLayout")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCollectionViewTransitionLayout; #[cfg(feature = "AppKit_NSCollectionViewTransitionLayout")] @@ -28,18 +29,23 @@ unsafe impl NSObjectProtocol for NSCollectionViewTransitionLayout {} extern_methods!( #[cfg(feature = "AppKit_NSCollectionViewTransitionLayout")] unsafe impl NSCollectionViewTransitionLayout { + #[cfg(not(any(target_os = "ios")))] #[method(transitionProgress)] pub unsafe fn transitionProgress(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setTransitionProgress:)] pub unsafe fn setTransitionProgress(&self, transition_progress: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentLayout)] pub unsafe fn currentLayout(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other nextLayout)] pub unsafe fn nextLayout(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCurrentLayout:nextLayout:)] pub unsafe fn initWithCurrentLayout_nextLayout( this: Option>, @@ -47,6 +53,7 @@ extern_methods!( new_layout: &NSCollectionViewLayout, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(updateValue:forAnimatedKey:)] pub unsafe fn updateValue_forAnimatedKey( &self, @@ -54,6 +61,7 @@ extern_methods!( key: &NSCollectionViewTransitionLayoutAnimatedKey, ); + #[cfg(not(any(target_os = "ios")))] #[method(valueForAnimatedKey:)] pub unsafe fn valueForAnimatedKey( &self, diff --git a/AppKit/NSColor.rs b/AppKit/NSColor.rs index 654337745..1b36adbcc 100644 --- a/AppKit/NSColor.rs +++ b/AppKit/NSColor.rs @@ -9,20 +9,30 @@ extern_static!(NSAppKitVersionNumberWithPatternColorLeakFix: NSAppKitVersion = 6 ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSColorType { + #[cfg(not(any(target_os = "ios")))] NSColorTypeComponentBased = 0, + #[cfg(not(any(target_os = "ios")))] NSColorTypePattern = 1, + #[cfg(not(any(target_os = "ios")))] NSColorTypeCatalog = 2, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSColorSystemEffect { + #[cfg(not(any(target_os = "ios")))] NSColorSystemEffectNone = 0, + #[cfg(not(any(target_os = "ios")))] NSColorSystemEffectPressed = 1, + #[cfg(not(any(target_os = "ios")))] NSColorSystemEffectDeepPressed = 2, + #[cfg(not(any(target_os = "ios")))] NSColorSystemEffectDisabled = 3, + #[cfg(not(any(target_os = "ios")))] NSColorSystemEffectRollover = 4, } ); @@ -30,6 +40,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] pub struct NSColor; #[cfg(feature = "AppKit_NSColor")] @@ -56,10 +67,12 @@ unsafe impl NSSecureCoding for NSColor {} extern_methods!( #[cfg(feature = "AppKit_NSColor")] unsafe impl NSColor { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, @@ -67,6 +80,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSColorSpace")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithColorSpace:components:count:)] pub unsafe fn colorWithColorSpace_components_count( space: &NSColorSpace, @@ -74,6 +88,7 @@ extern_methods!( number_of_components: NSInteger, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithSRGBRed:green:blue:alpha:)] pub unsafe fn colorWithSRGBRed_green_blue_alpha( red: CGFloat, @@ -82,12 +97,14 @@ extern_methods!( alpha: CGFloat, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithGenericGamma22White:alpha:)] pub unsafe fn colorWithGenericGamma22White_alpha( white: CGFloat, alpha: CGFloat, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithDisplayP3Red:green:blue:alpha:)] pub unsafe fn colorWithDisplayP3Red_green_blue_alpha( red: CGFloat, @@ -96,9 +113,11 @@ extern_methods!( alpha: CGFloat, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithWhite:alpha:)] pub unsafe fn colorWithWhite_alpha(white: CGFloat, alpha: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithRed:green:blue:alpha:)] pub unsafe fn colorWithRed_green_blue_alpha( red: CGFloat, @@ -107,6 +126,7 @@ extern_methods!( alpha: CGFloat, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithHue:saturation:brightness:alpha:)] pub unsafe fn colorWithHue_saturation_brightness_alpha( hue: CGFloat, @@ -116,6 +136,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSColorSpace")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithColorSpace:hue:saturation:brightness:alpha:)] pub unsafe fn colorWithColorSpace_hue_saturation_brightness_alpha( space: &NSColorSpace, @@ -125,6 +146,7 @@ extern_methods!( alpha: CGFloat, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithCatalogName:colorName:)] pub unsafe fn colorWithCatalogName_colorName( list_name: &NSColorListName, @@ -132,25 +154,30 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorNamed:bundle:)] pub unsafe fn colorNamed_bundle( name: &NSColorName, bundle: Option<&NSBundle>, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorNamed:)] pub unsafe fn colorNamed(name: &NSColorName) -> Option>; #[cfg(feature = "AppKit_NSAppearance")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithName:dynamicProvider:)] pub unsafe fn colorWithName_dynamicProvider( color_name: Option<&NSColorName>, dynamic_provider: &Block<(NonNull,), NonNull>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithDeviceWhite:alpha:)] pub unsafe fn colorWithDeviceWhite_alpha(white: CGFloat, alpha: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithDeviceRed:green:blue:alpha:)] pub unsafe fn colorWithDeviceRed_green_blue_alpha( red: CGFloat, @@ -159,6 +186,7 @@ extern_methods!( alpha: CGFloat, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithDeviceHue:saturation:brightness:alpha:)] pub unsafe fn colorWithDeviceHue_saturation_brightness_alpha( hue: CGFloat, @@ -167,6 +195,7 @@ extern_methods!( alpha: CGFloat, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithDeviceCyan:magenta:yellow:black:alpha:)] pub unsafe fn colorWithDeviceCyan_magenta_yellow_black_alpha( cyan: CGFloat, @@ -176,10 +205,12 @@ extern_methods!( alpha: CGFloat, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithCalibratedWhite:alpha:)] pub unsafe fn colorWithCalibratedWhite_alpha(white: CGFloat, alpha: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithCalibratedRed:green:blue:alpha:)] pub unsafe fn colorWithCalibratedRed_green_blue_alpha( red: CGFloat, @@ -188,6 +219,7 @@ extern_methods!( alpha: CGFloat, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithCalibratedHue:saturation:brightness:alpha:)] pub unsafe fn colorWithCalibratedHue_saturation_brightness_alpha( hue: CGFloat, @@ -197,237 +229,313 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithPatternImage:)] pub unsafe fn colorWithPatternImage(image: &NSImage) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(type)] pub unsafe fn r#type(&self) -> NSColorType; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorUsingType:)] pub unsafe fn colorUsingType(&self, r#type: NSColorType) -> Option>; #[cfg(feature = "AppKit_NSColorSpace")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorUsingColorSpace:)] pub unsafe fn colorUsingColorSpace(&self, space: &NSColorSpace) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other blackColor)] pub unsafe fn blackColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other darkGrayColor)] pub unsafe fn darkGrayColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other lightGrayColor)] pub unsafe fn lightGrayColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other whiteColor)] pub unsafe fn whiteColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other grayColor)] pub unsafe fn grayColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other redColor)] pub unsafe fn redColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other greenColor)] pub unsafe fn greenColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other blueColor)] pub unsafe fn blueColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cyanColor)] pub unsafe fn cyanColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other yellowColor)] pub unsafe fn yellowColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other magentaColor)] pub unsafe fn magentaColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other orangeColor)] pub unsafe fn orangeColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other purpleColor)] pub unsafe fn purpleColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other brownColor)] pub unsafe fn brownColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other clearColor)] pub unsafe fn clearColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelColor)] pub unsafe fn labelColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other secondaryLabelColor)] pub unsafe fn secondaryLabelColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tertiaryLabelColor)] pub unsafe fn tertiaryLabelColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other quaternaryLabelColor)] pub unsafe fn quaternaryLabelColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other linkColor)] pub unsafe fn linkColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other placeholderTextColor)] pub unsafe fn placeholderTextColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowFrameTextColor)] pub unsafe fn windowFrameTextColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedMenuItemTextColor)] pub unsafe fn selectedMenuItemTextColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alternateSelectedControlTextColor)] pub unsafe fn alternateSelectedControlTextColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other headerTextColor)] pub unsafe fn headerTextColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other separatorColor)] pub unsafe fn separatorColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other gridColor)] pub unsafe fn gridColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowBackgroundColor)] pub unsafe fn windowBackgroundColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other underPageBackgroundColor)] pub unsafe fn underPageBackgroundColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other controlBackgroundColor)] pub unsafe fn controlBackgroundColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedContentBackgroundColor)] pub unsafe fn selectedContentBackgroundColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other unemphasizedSelectedContentBackgroundColor)] pub unsafe fn unemphasizedSelectedContentBackgroundColor() -> Id; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alternatingContentBackgroundColors)] pub unsafe fn alternatingContentBackgroundColors() -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other findHighlightColor)] pub unsafe fn findHighlightColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textColor)] pub unsafe fn textColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textBackgroundColor)] pub unsafe fn textBackgroundColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedTextColor)] pub unsafe fn selectedTextColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedTextBackgroundColor)] pub unsafe fn selectedTextBackgroundColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other unemphasizedSelectedTextBackgroundColor)] pub unsafe fn unemphasizedSelectedTextBackgroundColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other unemphasizedSelectedTextColor)] pub unsafe fn unemphasizedSelectedTextColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other controlColor)] pub unsafe fn controlColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other controlTextColor)] pub unsafe fn controlTextColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedControlColor)] pub unsafe fn selectedControlColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedControlTextColor)] pub unsafe fn selectedControlTextColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other disabledControlTextColor)] pub unsafe fn disabledControlTextColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other keyboardFocusIndicatorColor)] pub unsafe fn keyboardFocusIndicatorColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other scrubberTexturedBackgroundColor)] pub unsafe fn scrubberTexturedBackgroundColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemRedColor)] pub unsafe fn systemRedColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemGreenColor)] pub unsafe fn systemGreenColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemBlueColor)] pub unsafe fn systemBlueColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemOrangeColor)] pub unsafe fn systemOrangeColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemYellowColor)] pub unsafe fn systemYellowColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemBrownColor)] pub unsafe fn systemBrownColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemPinkColor)] pub unsafe fn systemPinkColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemPurpleColor)] pub unsafe fn systemPurpleColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemGrayColor)] pub unsafe fn systemGrayColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemTealColor)] pub unsafe fn systemTealColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemIndigoColor)] pub unsafe fn systemIndigoColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemMintColor)] pub unsafe fn systemMintColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemCyanColor)] pub unsafe fn systemCyanColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other controlAccentColor)] pub unsafe fn controlAccentColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(currentControlTint)] pub unsafe fn currentControlTint() -> NSControlTint; #[deprecated = "NSControlTint does not describe the full range of available control accent colors. Use +[NSColor controlAccentColor] instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorForControlTint:)] pub unsafe fn colorForControlTint(control_tint: NSControlTint) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other highlightColor)] pub unsafe fn highlightColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other shadowColor)] pub unsafe fn shadowColor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other highlightWithLevel:)] pub unsafe fn highlightWithLevel(&self, val: CGFloat) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other shadowWithLevel:)] pub unsafe fn shadowWithLevel(&self, val: CGFloat) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithSystemEffect:)] pub unsafe fn colorWithSystemEffect( &self, system_effect: NSColorSystemEffect, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(set)] pub unsafe fn set(&self); + #[cfg(not(any(target_os = "ios")))] #[method(setFill)] pub unsafe fn setFill(&self); + #[cfg(not(any(target_os = "ios")))] #[method(setStroke)] pub unsafe fn setStroke(&self); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other blendedColorWithFraction:ofColor:)] pub unsafe fn blendedColorWithFraction_ofColor( &self, @@ -435,32 +543,41 @@ extern_methods!( color: &NSColor, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithAlphaComponent:)] pub unsafe fn colorWithAlphaComponent(&self, alpha: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other catalogNameComponent)] pub unsafe fn catalogNameComponent(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorNameComponent)] pub unsafe fn colorNameComponent(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedCatalogNameComponent)] pub unsafe fn localizedCatalogNameComponent(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedColorNameComponent)] pub unsafe fn localizedColorNameComponent(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(redComponent)] pub unsafe fn redComponent(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(greenComponent)] pub unsafe fn greenComponent(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(blueComponent)] pub unsafe fn blueComponent(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(getRed:green:blue:alpha:)] pub unsafe fn getRed_green_blue_alpha( &self, @@ -470,15 +587,19 @@ extern_methods!( alpha: *mut CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(hueComponent)] pub unsafe fn hueComponent(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(saturationComponent)] pub unsafe fn saturationComponent(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(brightnessComponent)] pub unsafe fn brightnessComponent(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(getHue:saturation:brightness:alpha:)] pub unsafe fn getHue_saturation_brightness_alpha( &self, @@ -488,24 +609,31 @@ extern_methods!( alpha: *mut CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(whiteComponent)] pub unsafe fn whiteComponent(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(getWhite:alpha:)] pub unsafe fn getWhite_alpha(&self, white: *mut CGFloat, alpha: *mut CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(cyanComponent)] pub unsafe fn cyanComponent(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(magentaComponent)] pub unsafe fn magentaComponent(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(yellowComponent)] pub unsafe fn yellowComponent(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(blackComponent)] pub unsafe fn blackComponent(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(getCyan:magenta:yellow:black:alpha:)] pub unsafe fn getCyan_magenta_yellow_black_alpha( &self, @@ -517,36 +645,46 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSColorSpace")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorSpace)] pub unsafe fn colorSpace(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfComponents)] pub unsafe fn numberOfComponents(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(getComponents:)] pub unsafe fn getComponents(&self, components: NonNull); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other patternImage)] pub unsafe fn patternImage(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(alphaComponent)] pub unsafe fn alphaComponent(&self) -> CGFloat; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorFromPasteboard:)] pub unsafe fn colorFromPasteboard(paste_board: &NSPasteboard) -> Option>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method(writeToPasteboard:)] pub unsafe fn writeToPasteboard(&self, paste_board: &NSPasteboard); + #[cfg(not(any(target_os = "ios")))] #[method(drawSwatchInRect:)] pub unsafe fn drawSwatchInRect(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(ignoresAlpha)] pub unsafe fn ignoresAlpha() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setIgnoresAlpha:)] pub unsafe fn setIgnoresAlpha(ignores_alpha: bool); } @@ -557,64 +695,79 @@ extern_methods!( #[cfg(feature = "AppKit_NSColor")] unsafe impl NSColor { #[deprecated = "Use a color that matches the semantics being used, such as `separatorColor`"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other controlHighlightColor)] pub unsafe fn controlHighlightColor() -> Id; #[deprecated = "Use a color that matches the semantics being used, such as `separatorColor`"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other controlLightHighlightColor)] pub unsafe fn controlLightHighlightColor() -> Id; #[deprecated = "Use a color that matches the semantics being used, such as `separatorColor`"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other controlShadowColor)] pub unsafe fn controlShadowColor() -> Id; #[deprecated = "Use a color that matches the semantics being used, such as `separatorColor`"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other controlDarkShadowColor)] pub unsafe fn controlDarkShadowColor() -> Id; #[deprecated = "Use NSScroller instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other scrollBarColor)] pub unsafe fn scrollBarColor() -> Id; #[deprecated = "Use NSScroller instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other knobColor)] pub unsafe fn knobColor() -> Id; #[deprecated = "Use NSScroller instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedKnobColor)] pub unsafe fn selectedKnobColor() -> Id; #[deprecated = "Use NSVisualEffectMaterialTitlebar"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowFrameColor)] pub unsafe fn windowFrameColor() -> Id; #[deprecated = "Use NSVisualEffectMaterialSelection"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedMenuItemColor)] pub unsafe fn selectedMenuItemColor() -> Id; #[deprecated = "Use NSVisualEffectMaterialHeaderView"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other headerColor)] pub unsafe fn headerColor() -> Id; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other secondarySelectedControlColor)] pub unsafe fn secondarySelectedControlColor() -> Id; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alternateSelectedControlColor)] pub unsafe fn alternateSelectedControlColor() -> Id; #[cfg(feature = "Foundation_NSArray")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other controlAlternatingRowBackgroundColors)] pub unsafe fn controlAlternatingRowBackgroundColors() -> Id>; #[deprecated = "Use -type and NSColorType instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorSpaceName)] pub unsafe fn colorSpaceName(&self) -> Id; #[cfg(feature = "Foundation_NSDictionary")] #[deprecated = "Use -colorUsingType: or -colorUsingColorSpace: instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorUsingColorSpaceName:device:)] pub unsafe fn colorUsingColorSpaceName_device( &self, @@ -623,6 +776,7 @@ extern_methods!( ) -> Option>; #[deprecated = "Use -colorUsingType: or -colorUsingColorSpace: instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorUsingColorSpaceName:)] pub unsafe fn colorUsingColorSpaceName( &self, @@ -643,6 +797,7 @@ extern_methods!( unsafe impl NSCoder { #[cfg(feature = "AppKit_NSColor")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other decodeNXColor)] pub unsafe fn decodeNXColor(&self) -> Option>; } diff --git a/AppKit/NSColorList.rs b/AppKit/NSColorList.rs index 5ac973094..1835613dc 100644 --- a/AppKit/NSColorList.rs +++ b/AppKit/NSColorList.rs @@ -12,6 +12,7 @@ pub type NSColorName = NSString; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSColorList")] + #[cfg(not(any(target_os = "ios")))] pub struct NSColorList; #[cfg(feature = "AppKit_NSColorList")] @@ -33,12 +34,15 @@ extern_methods!( #[cfg(feature = "AppKit_NSColorList")] unsafe impl NSColorList { #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other availableColorLists)] pub unsafe fn availableColorLists() -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorListNamed:)] pub unsafe fn colorListNamed(name: &NSColorListName) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithName:)] pub unsafe fn initWithName( this: Option>, @@ -46,6 +50,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithName:fromFile:)] pub unsafe fn initWithName_fromFile( this: Option>, @@ -53,14 +58,17 @@ extern_methods!( path: Option<&NSString>, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setColor:forKey:)] pub unsafe fn setColor_forKey(&self, color: &NSColor, key: &NSColorName); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(insertColor:key:atIndex:)] pub unsafe fn insertColor_key_atIndex( &self, @@ -69,29 +77,36 @@ extern_methods!( loc: NSUInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(removeColorWithKey:)] pub unsafe fn removeColorWithKey(&self, key: &NSColorName); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWithKey:)] pub unsafe fn colorWithKey(&self, key: &NSColorName) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other allKeys)] pub unsafe fn allKeys(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method(writeToURL:error:_)] pub unsafe fn writeToURL_error(&self, url: Option<&NSURL>) -> Result<(), Id>; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -writeToURL:error: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(writeToFile:)] pub unsafe fn writeToFile(&self, path: Option<&NSString>) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(removeFile)] pub unsafe fn removeFile(&self); } diff --git a/AppKit/NSColorPanel.rs b/AppKit/NSColorPanel.rs index ca1fc22c4..fad6af173 100644 --- a/AppKit/NSColorPanel.rs +++ b/AppKit/NSColorPanel.rs @@ -7,30 +7,50 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSColorPanelMode { + #[cfg(not(any(target_os = "ios")))] NSColorPanelModeNone = -1, + #[cfg(not(any(target_os = "ios")))] NSColorPanelModeGray = 0, + #[cfg(not(any(target_os = "ios")))] NSColorPanelModeRGB = 1, + #[cfg(not(any(target_os = "ios")))] NSColorPanelModeCMYK = 2, + #[cfg(not(any(target_os = "ios")))] NSColorPanelModeHSB = 3, + #[cfg(not(any(target_os = "ios")))] NSColorPanelModeCustomPalette = 4, + #[cfg(not(any(target_os = "ios")))] NSColorPanelModeColorList = 5, + #[cfg(not(any(target_os = "ios")))] NSColorPanelModeWheel = 6, + #[cfg(not(any(target_os = "ios")))] NSColorPanelModeCrayon = 7, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSColorPanelOptions { + #[cfg(not(any(target_os = "ios")))] NSColorPanelGrayModeMask = 0x00000001, + #[cfg(not(any(target_os = "ios")))] NSColorPanelRGBModeMask = 0x00000002, + #[cfg(not(any(target_os = "ios")))] NSColorPanelCMYKModeMask = 0x00000004, + #[cfg(not(any(target_os = "ios")))] NSColorPanelHSBModeMask = 0x00000008, + #[cfg(not(any(target_os = "ios")))] NSColorPanelCustomPaletteModeMask = 0x00000010, + #[cfg(not(any(target_os = "ios")))] NSColorPanelColorListModeMask = 0x00000020, + #[cfg(not(any(target_os = "ios")))] NSColorPanelWheelModeMask = 0x00000040, + #[cfg(not(any(target_os = "ios")))] NSColorPanelCrayonModeMask = 0x00000080, + #[cfg(not(any(target_os = "ios")))] NSColorPanelAllModesMask = 0x0000ffff, } ); @@ -38,6 +58,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSColorPanel")] + #[cfg(not(any(target_os = "ios")))] pub struct NSColorPanel; #[cfg(feature = "AppKit_NSColorPanel")] @@ -77,9 +98,11 @@ unsafe impl NSUserInterfaceValidations for NSColorPanel {} extern_methods!( #[cfg(feature = "AppKit_NSColorPanel")] unsafe impl NSColorPanel { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedColorPanel)] pub unsafe fn sharedColorPanel() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(sharedColorPanelExists)] pub unsafe fn sharedColorPanelExists() -> bool; @@ -88,6 +111,7 @@ extern_methods!( feature = "AppKit_NSEvent", feature = "AppKit_NSView" ))] + #[cfg(not(any(target_os = "ios")))] #[method(dragColor:withEvent:fromView:)] pub unsafe fn dragColor_withEvent_fromView( color: &NSColor, @@ -95,60 +119,77 @@ extern_methods!( source_view: &NSView, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPickerMask:)] pub unsafe fn setPickerMask(mask: NSColorPanelOptions); + #[cfg(not(any(target_os = "ios")))] #[method(setPickerMode:)] pub unsafe fn setPickerMode(mode: NSColorPanelMode); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessory_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(isContinuous)] pub unsafe fn isContinuous(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setContinuous:)] pub unsafe fn setContinuous(&self, continuous: bool); + #[cfg(not(any(target_os = "ios")))] #[method(showsAlpha)] pub unsafe fn showsAlpha(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsAlpha:)] pub unsafe fn setShowsAlpha(&self, shows_alpha: bool); + #[cfg(not(any(target_os = "ios")))] #[method(mode)] pub unsafe fn mode(&self) -> NSColorPanelMode; + #[cfg(not(any(target_os = "ios")))] #[method(setMode:)] pub unsafe fn setMode(&self, mode: NSColorPanelMode); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other color)] pub unsafe fn color(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setColor:)] pub unsafe fn setColor(&self, color: &NSColor); + #[cfg(not(any(target_os = "ios")))] #[method(alpha)] pub unsafe fn alpha(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setAction:)] pub unsafe fn setAction(&self, selector: Option); + #[cfg(not(any(target_os = "ios")))] #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); #[cfg(feature = "AppKit_NSColorList")] + #[cfg(not(any(target_os = "ios")))] #[method(attachColorList:)] pub unsafe fn attachColorList(&self, color_list: &NSColorList); #[cfg(feature = "AppKit_NSColorList")] + #[cfg(not(any(target_os = "ios")))] #[method(detachColorList:)] pub unsafe fn detachColorList(&self, color_list: &NSColorList); } @@ -158,14 +199,17 @@ extern_methods!( /// NSColorPanel #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontColorPanel:)] pub unsafe fn orderFrontColorPanel(&self, sender: Option<&Object>); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSColorChanging: NSObjectProtocol { #[cfg(feature = "AppKit_NSColorPanel")] + #[cfg(not(any(target_os = "ios")))] #[method(changeColor:)] unsafe fn changeColor(&self, sender: Option<&NSColorPanel>); } @@ -197,6 +241,7 @@ extern_methods!( /// Methods declared on superclass `NSWindow` #[cfg(feature = "AppKit_NSColorPanel")] unsafe impl NSColorPanel { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:)] pub unsafe fn initWithContentRect_styleMask_backing_defer( this: Option>, @@ -207,6 +252,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSScreen")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:screen:)] pub unsafe fn initWithContentRect_styleMask_backing_defer_screen( this: Option>, @@ -218,6 +264,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowWithContentViewController:)] pub unsafe fn windowWithContentViewController( content_view_controller: &NSViewController, diff --git a/AppKit/NSColorPicker.rs b/AppKit/NSColorPicker.rs index 958e6b564..f955b3299 100644 --- a/AppKit/NSColorPicker.rs +++ b/AppKit/NSColorPicker.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSColorPicker")] + #[cfg(not(any(target_os = "ios")))] pub struct NSColorPicker; #[cfg(feature = "AppKit_NSColorPicker")] @@ -26,6 +27,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSColorPicker")] unsafe impl NSColorPicker { #[cfg(feature = "AppKit_NSColorPanel")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithPickerMask:colorPanel:)] pub unsafe fn initWithPickerMask_colorPanel( this: Option>, @@ -34,14 +36,17 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSColorPanel")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorPanel)] pub unsafe fn colorPanel(&self) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other provideNewButtonImage)] pub unsafe fn provideNewButtonImage(&self) -> Id; #[cfg(all(feature = "AppKit_NSButtonCell", feature = "AppKit_NSImage"))] + #[cfg(not(any(target_os = "ios")))] #[method(insertNewButtonImage:in:)] pub unsafe fn insertNewButtonImage_in( &self, @@ -49,24 +54,30 @@ extern_methods!( button_cell: &NSButtonCell, ); + #[cfg(not(any(target_os = "ios")))] #[method(viewSizeChanged:)] pub unsafe fn viewSizeChanged(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSColorList")] + #[cfg(not(any(target_os = "ios")))] #[method(attachColorList:)] pub unsafe fn attachColorList(&self, color_list: &NSColorList); #[cfg(feature = "AppKit_NSColorList")] + #[cfg(not(any(target_os = "ios")))] #[method(detachColorList:)] pub unsafe fn detachColorList(&self, color_list: &NSColorList); + #[cfg(not(any(target_os = "ios")))] #[method(setMode:)] pub unsafe fn setMode(&self, mode: NSColorPanelMode); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonToolTip)] pub unsafe fn buttonToolTip(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(minContentSize)] pub unsafe fn minContentSize(&self) -> NSSize; } diff --git a/AppKit/NSColorPickerTouchBarItem.rs b/AppKit/NSColorPickerTouchBarItem.rs index 2805a4b2a..d005f39c1 100644 --- a/AppKit/NSColorPickerTouchBarItem.rs +++ b/AppKit/NSColorPickerTouchBarItem.rs @@ -61,10 +61,12 @@ extern_methods!( pub unsafe fn setShowsAlpha(&self, shows_alpha: bool); #[cfg(all(feature = "AppKit_NSColorSpace", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other allowedColorSpaces)] pub unsafe fn allowedColorSpaces(&self) -> Option>>; #[cfg(all(feature = "AppKit_NSColorSpace", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setAllowedColorSpaces:)] pub unsafe fn setAllowedColorSpaces( &self, @@ -72,10 +74,12 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSColorList")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorList)] pub unsafe fn colorList(&self) -> Option>; #[cfg(feature = "AppKit_NSColorList")] + #[cfg(not(any(target_os = "ios")))] #[method(setColorList:)] pub unsafe fn setColorList(&self, color_list: Option<&NSColorList>); diff --git a/AppKit/NSColorPicking.rs b/AppKit/NSColorPicking.rs index efd125123..0523d8f72 100644 --- a/AppKit/NSColorPicking.rs +++ b/AppKit/NSColorPicking.rs @@ -6,8 +6,10 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSColorPickingDefault { #[cfg(feature = "AppKit_NSColorPanel")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithPickerMask:colorPanel:)] unsafe fn initWithPickerMask_colorPanel( this: Option>, @@ -16,10 +18,12 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other provideNewButtonImage)] unsafe fn provideNewButtonImage(&self) -> Id; #[cfg(all(feature = "AppKit_NSButtonCell", feature = "AppKit_NSImage"))] + #[cfg(not(any(target_os = "ios")))] #[method(insertNewButtonImage:in:)] unsafe fn insertNewButtonImage_in( &self, @@ -27,27 +31,34 @@ extern_protocol!( button_cell: &NSButtonCell, ); + #[cfg(not(any(target_os = "ios")))] #[method(viewSizeChanged:)] unsafe fn viewSizeChanged(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(alphaControlAddedOrRemoved:)] unsafe fn alphaControlAddedOrRemoved(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSColorList")] + #[cfg(not(any(target_os = "ios")))] #[method(attachColorList:)] unsafe fn attachColorList(&self, color_list: &NSColorList); #[cfg(feature = "AppKit_NSColorList")] + #[cfg(not(any(target_os = "ios")))] #[method(detachColorList:)] unsafe fn detachColorList(&self, color_list: &NSColorList); + #[cfg(not(any(target_os = "ios")))] #[method(setMode:)] unsafe fn setMode(&self, mode: NSColorPanelMode); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonToolTip)] unsafe fn buttonToolTip(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(minContentSize)] unsafe fn minContentSize(&self) -> NSSize; } @@ -56,18 +67,23 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSColorPickingCustom: NSColorPickingDefault { + #[cfg(not(any(target_os = "ios")))] #[method(supportsMode:)] unsafe fn supportsMode(&self, mode: NSColorPanelMode) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(currentMode)] unsafe fn currentMode(&self) -> NSColorPanelMode; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other provideNewView:)] unsafe fn provideNewView(&self, initial_request: bool) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setColor:)] unsafe fn setColor(&self, new_color: &NSColor); } diff --git a/AppKit/NSColorSampler.rs b/AppKit/NSColorSampler.rs index 3df6bc3e5..c6646e49a 100644 --- a/AppKit/NSColorSampler.rs +++ b/AppKit/NSColorSampler.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSColorSampler")] + #[cfg(not(any(target_os = "ios")))] pub struct NSColorSampler; #[cfg(feature = "AppKit_NSColorSampler")] @@ -23,6 +24,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSColorSampler")] unsafe impl NSColorSampler { #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(showSamplerWithSelectionHandler:)] pub unsafe fn showSamplerWithSelectionHandler( &self, diff --git a/AppKit/NSColorSpace.rs b/AppKit/NSColorSpace.rs index d09e497fc..062629850 100644 --- a/AppKit/NSColorSpace.rs +++ b/AppKit/NSColorSpace.rs @@ -7,14 +7,23 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSColorSpaceModel { + #[cfg(not(any(target_os = "ios")))] NSColorSpaceModelUnknown = -1, + #[cfg(not(any(target_os = "ios")))] NSColorSpaceModelGray = 0, + #[cfg(not(any(target_os = "ios")))] NSColorSpaceModelRGB = 1, + #[cfg(not(any(target_os = "ios")))] NSColorSpaceModelCMYK = 2, + #[cfg(not(any(target_os = "ios")))] NSColorSpaceModelLAB = 3, + #[cfg(not(any(target_os = "ios")))] NSColorSpaceModelDeviceN = 4, + #[cfg(not(any(target_os = "ios")))] NSColorSpaceModelIndexed = 5, + #[cfg(not(any(target_os = "ios")))] NSColorSpaceModelPatterned = 6, } ); @@ -22,6 +31,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSColorSpace")] + #[cfg(not(any(target_os = "ios")))] pub struct NSColorSpace; #[cfg(feature = "AppKit_NSColorSpace")] @@ -43,6 +53,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSColorSpace")] unsafe impl NSColorSpace { #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithICCProfileData:)] pub unsafe fn initWithICCProfileData( this: Option>, @@ -50,65 +61,84 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other ICCProfileData)] pub unsafe fn ICCProfileData(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithColorSyncProfile:)] pub unsafe fn initWithColorSyncProfile( this: Option>, prof: NonNull, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(colorSyncProfile)] pub unsafe fn colorSyncProfile(&self) -> *mut c_void; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfColorComponents)] pub unsafe fn numberOfColorComponents(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(colorSpaceModel)] pub unsafe fn colorSpaceModel(&self) -> NSColorSpaceModel; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedName)] pub unsafe fn localizedName(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sRGBColorSpace)] pub unsafe fn sRGBColorSpace() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other genericGamma22GrayColorSpace)] pub unsafe fn genericGamma22GrayColorSpace() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other extendedSRGBColorSpace)] pub unsafe fn extendedSRGBColorSpace() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other extendedGenericGamma22GrayColorSpace)] pub unsafe fn extendedGenericGamma22GrayColorSpace() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other displayP3ColorSpace)] pub unsafe fn displayP3ColorSpace() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other adobeRGB1998ColorSpace)] pub unsafe fn adobeRGB1998ColorSpace() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other genericRGBColorSpace)] pub unsafe fn genericRGBColorSpace() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other genericGrayColorSpace)] pub unsafe fn genericGrayColorSpace() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other genericCMYKColorSpace)] pub unsafe fn genericCMYKColorSpace() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other deviceRGBColorSpace)] pub unsafe fn deviceRGBColorSpace() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other deviceGrayColorSpace)] pub unsafe fn deviceGrayColorSpace() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other deviceCMYKColorSpace)] pub unsafe fn deviceCMYKColorSpace() -> Id; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other availableColorSpacesWithModel:)] pub unsafe fn availableColorSpacesWithModel( model: NSColorSpaceModel, diff --git a/AppKit/NSColorWell.rs b/AppKit/NSColorWell.rs index 4a1b7be91..ab8624727 100644 --- a/AppKit/NSColorWell.rs +++ b/AppKit/NSColorWell.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSColorWellStyle { + #[cfg(not(any(target_os = "ios")))] NSColorWellStyleDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSColorWellStyleMinimal = 1, + #[cfg(not(any(target_os = "ios")))] NSColorWellStyleExpanded = 2, } ); @@ -17,6 +21,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSColorWell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSColorWell; #[cfg(feature = "AppKit_NSColorWell")] @@ -53,63 +58,81 @@ unsafe impl NSUserInterfaceItemIdentification for NSColorWell {} extern_methods!( #[cfg(feature = "AppKit_NSColorWell")] unsafe impl NSColorWell { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorWellWithStyle:)] pub unsafe fn colorWellWithStyle(style: NSColorWellStyle) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(deactivate)] pub unsafe fn deactivate(&self); + #[cfg(not(any(target_os = "ios")))] #[method(activate:)] pub unsafe fn activate(&self, exclusive: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isActive)] pub unsafe fn isActive(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(drawWellInside:)] pub unsafe fn drawWellInside(&self, inside_rect: NSRect); #[deprecated = "This property will be deprecated in a future release."] + #[cfg(not(any(target_os = "ios")))] #[method(isBordered)] pub unsafe fn isBordered(&self) -> bool; #[deprecated = "This property will be deprecated in a future release."] + #[cfg(not(any(target_os = "ios")))] #[method(setBordered:)] pub unsafe fn setBordered(&self, bordered: bool); + #[cfg(not(any(target_os = "ios")))] #[method(takeColorFrom:)] pub unsafe fn takeColorFrom(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other color)] pub unsafe fn color(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setColor:)] pub unsafe fn setColor(&self, color: &NSColor); + #[cfg(not(any(target_os = "ios")))] #[method(colorWellStyle)] pub unsafe fn colorWellStyle(&self) -> NSColorWellStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setColorWellStyle:)] pub unsafe fn setColorWellStyle(&self, color_well_style: NSColorWellStyle); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pulldownTarget)] pub unsafe fn pulldownTarget(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setPulldownTarget:)] pub unsafe fn setPulldownTarget(&self, pulldown_target: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(pulldownAction)] pub unsafe fn pulldownAction(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(setPulldownAction:)] pub unsafe fn setPulldownAction(&self, pulldown_action: Option); } @@ -119,6 +142,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSColorWell")] unsafe impl NSColorWell { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSComboBox.rs b/AppKit/NSComboBox.rs index f9f8fa3eb..c42d228ac 100644 --- a/AppKit/NSComboBox.rs +++ b/AppKit/NSComboBox.rs @@ -14,13 +14,16 @@ extern_static!(NSComboBoxSelectionDidChangeNotification: &'static NSNotification extern_static!(NSComboBoxSelectionIsChangingNotification: &'static NSNotificationName); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSComboBoxDataSource: NSObjectProtocol { #[cfg(feature = "AppKit_NSComboBox")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(numberOfItemsInComboBox:)] unsafe fn numberOfItemsInComboBox(&self, combo_box: &NSComboBox) -> NSInteger; #[cfg(feature = "AppKit_NSComboBox")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other comboBox:objectValueForItemAtIndex:)] unsafe fn comboBox_objectValueForItemAtIndex( @@ -30,6 +33,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSComboBox", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(comboBox:indexOfItemWithStringValue:)] unsafe fn comboBox_indexOfItemWithStringValue( @@ -39,6 +43,7 @@ extern_protocol!( ) -> NSUInteger; #[cfg(all(feature = "AppKit_NSComboBox", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other comboBox:completedString:)] unsafe fn comboBox_completedString( @@ -52,23 +57,28 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSComboBoxDelegate: NSTextFieldDelegate { #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(comboBoxWillPopUp:)] unsafe fn comboBoxWillPopUp(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(comboBoxWillDismiss:)] unsafe fn comboBoxWillDismiss(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(comboBoxSelectionDidChange:)] unsafe fn comboBoxSelectionDidChange(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(comboBoxSelectionIsChanging:)] unsafe fn comboBoxSelectionIsChanging(&self, notification: &NSNotification); @@ -80,6 +90,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSComboBox")] + #[cfg(not(any(target_os = "ios")))] pub struct NSComboBox; #[cfg(feature = "AppKit_NSComboBox")] @@ -128,119 +139,156 @@ unsafe impl NSUserInterfaceValidations for NSComboBox {} extern_methods!( #[cfg(feature = "AppKit_NSComboBox")] unsafe impl NSComboBox { + #[cfg(not(any(target_os = "ios")))] #[method(hasVerticalScroller)] pub unsafe fn hasVerticalScroller(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHasVerticalScroller:)] pub unsafe fn setHasVerticalScroller(&self, has_vertical_scroller: bool); + #[cfg(not(any(target_os = "ios")))] #[method(intercellSpacing)] pub unsafe fn intercellSpacing(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setIntercellSpacing:)] pub unsafe fn setIntercellSpacing(&self, intercell_spacing: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(itemHeight)] pub unsafe fn itemHeight(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setItemHeight:)] pub unsafe fn setItemHeight(&self, item_height: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfVisibleItems)] pub unsafe fn numberOfVisibleItems(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfVisibleItems:)] pub unsafe fn setNumberOfVisibleItems(&self, number_of_visible_items: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(isButtonBordered)] pub unsafe fn isButtonBordered(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setButtonBordered:)] pub unsafe fn setButtonBordered(&self, button_bordered: bool); + #[cfg(not(any(target_os = "ios")))] #[method(reloadData)] pub unsafe fn reloadData(&self); + #[cfg(not(any(target_os = "ios")))] #[method(noteNumberOfItemsChanged)] pub unsafe fn noteNumberOfItemsChanged(&self); + #[cfg(not(any(target_os = "ios")))] #[method(usesDataSource)] pub unsafe fn usesDataSource(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesDataSource:)] pub unsafe fn setUsesDataSource(&self, uses_data_source: bool); + #[cfg(not(any(target_os = "ios")))] #[method(scrollItemAtIndexToTop:)] pub unsafe fn scrollItemAtIndexToTop(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(scrollItemAtIndexToVisible:)] pub unsafe fn scrollItemAtIndexToVisible(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(selectItemAtIndex:)] pub unsafe fn selectItemAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(deselectItemAtIndex:)] pub unsafe fn deselectItemAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(indexOfSelectedItem)] pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(completes)] pub unsafe fn completes(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCompletes:)] pub unsafe fn setCompletes(&self, completes: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataSource)] pub unsafe fn dataSource(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDataSource:)] pub unsafe fn setDataSource( &self, data_source: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(addItemWithObjectValue:)] pub unsafe fn addItemWithObjectValue(&self, object: &Object); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(addItemsWithObjectValues:)] pub unsafe fn addItemsWithObjectValues(&self, objects: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(insertItemWithObjectValue:atIndex:)] pub unsafe fn insertItemWithObjectValue_atIndex(&self, object: &Object, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(removeItemWithObjectValue:)] pub unsafe fn removeItemWithObjectValue(&self, object: &Object); + #[cfg(not(any(target_os = "ios")))] #[method(removeItemAtIndex:)] pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); + #[cfg(not(any(target_os = "ios")))] #[method(selectItemWithObjectValue:)] pub unsafe fn selectItemWithObjectValue(&self, object: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemObjectValueAtIndex:)] pub unsafe fn itemObjectValueAtIndex(&self, index: NSInteger) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other objectValueOfSelectedItem)] pub unsafe fn objectValueOfSelectedItem(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithObjectValue:)] pub unsafe fn indexOfItemWithObjectValue(&self, object: &Object) -> NSInteger; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other objectValues)] pub unsafe fn objectValues(&self) -> Id; } @@ -253,20 +301,24 @@ extern_methods!( #[cfg(feature = "AppKit_NSComboBox")] unsafe impl NSComboBox { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelWithString:)] pub unsafe fn labelWithString(string_value: &NSString) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other wrappingLabelWithString:)] pub unsafe fn wrappingLabelWithString(string_value: &NSString) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelWithAttributedString:)] pub unsafe fn labelWithAttributedString( attributed_string_value: &NSAttributedString, ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textFieldWithString:)] pub unsafe fn textFieldWithString(string_value: &NSString) -> Id; } @@ -276,6 +328,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSComboBox")] unsafe impl NSComboBox { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSComboBoxCell.rs b/AppKit/NSComboBoxCell.rs index c8f249931..f65feb609 100644 --- a/AppKit/NSComboBoxCell.rs +++ b/AppKit/NSComboBoxCell.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSComboBoxCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSComboBoxCell; #[cfg(feature = "AppKit_NSComboBoxCell")] @@ -35,131 +36,170 @@ unsafe impl NSUserInterfaceItemIdentification for NSComboBoxCell {} extern_methods!( #[cfg(feature = "AppKit_NSComboBoxCell")] unsafe impl NSComboBoxCell { + #[cfg(not(any(target_os = "ios")))] #[method(hasVerticalScroller)] pub unsafe fn hasVerticalScroller(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHasVerticalScroller:)] pub unsafe fn setHasVerticalScroller(&self, has_vertical_scroller: bool); + #[cfg(not(any(target_os = "ios")))] #[method(intercellSpacing)] pub unsafe fn intercellSpacing(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setIntercellSpacing:)] pub unsafe fn setIntercellSpacing(&self, intercell_spacing: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(itemHeight)] pub unsafe fn itemHeight(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setItemHeight:)] pub unsafe fn setItemHeight(&self, item_height: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfVisibleItems)] pub unsafe fn numberOfVisibleItems(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfVisibleItems:)] pub unsafe fn setNumberOfVisibleItems(&self, number_of_visible_items: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(isButtonBordered)] pub unsafe fn isButtonBordered(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setButtonBordered:)] pub unsafe fn setButtonBordered(&self, button_bordered: bool); + #[cfg(not(any(target_os = "ios")))] #[method(reloadData)] pub unsafe fn reloadData(&self); + #[cfg(not(any(target_os = "ios")))] #[method(noteNumberOfItemsChanged)] pub unsafe fn noteNumberOfItemsChanged(&self); + #[cfg(not(any(target_os = "ios")))] #[method(usesDataSource)] pub unsafe fn usesDataSource(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesDataSource:)] pub unsafe fn setUsesDataSource(&self, uses_data_source: bool); + #[cfg(not(any(target_os = "ios")))] #[method(scrollItemAtIndexToTop:)] pub unsafe fn scrollItemAtIndexToTop(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(scrollItemAtIndexToVisible:)] pub unsafe fn scrollItemAtIndexToVisible(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(selectItemAtIndex:)] pub unsafe fn selectItemAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(deselectItemAtIndex:)] pub unsafe fn deselectItemAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(indexOfSelectedItem)] pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(completes)] pub unsafe fn completes(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCompletes:)] pub unsafe fn setCompletes(&self, completes: bool); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other completedString:)] pub unsafe fn completedString(&self, string: &NSString) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataSource)] pub unsafe fn dataSource(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDataSource:)] pub unsafe fn setDataSource( &self, data_source: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(addItemWithObjectValue:)] pub unsafe fn addItemWithObjectValue(&self, object: &Object); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(addItemsWithObjectValues:)] pub unsafe fn addItemsWithObjectValues(&self, objects: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(insertItemWithObjectValue:atIndex:)] pub unsafe fn insertItemWithObjectValue_atIndex(&self, object: &Object, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(removeItemWithObjectValue:)] pub unsafe fn removeItemWithObjectValue(&self, object: &Object); + #[cfg(not(any(target_os = "ios")))] #[method(removeItemAtIndex:)] pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); + #[cfg(not(any(target_os = "ios")))] #[method(selectItemWithObjectValue:)] pub unsafe fn selectItemWithObjectValue(&self, object: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemObjectValueAtIndex:)] pub unsafe fn itemObjectValueAtIndex(&self, index: NSInteger) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other objectValueOfSelectedItem)] pub unsafe fn objectValueOfSelectedItem(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithObjectValue:)] pub unsafe fn indexOfItemWithObjectValue(&self, object: &Object) -> NSInteger; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other objectValues)] pub unsafe fn objectValues(&self) -> Id; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSComboBoxCellDataSource: NSObjectProtocol { #[cfg(feature = "AppKit_NSComboBoxCell")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(numberOfItemsInComboBoxCell:)] unsafe fn numberOfItemsInComboBoxCell(&self, combo_box_cell: &NSComboBoxCell) -> NSInteger; #[cfg(feature = "AppKit_NSComboBoxCell")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other comboBoxCell:objectValueForItemAtIndex:)] unsafe fn comboBoxCell_objectValueForItemAtIndex( @@ -169,6 +209,7 @@ extern_protocol!( ) -> Id; #[cfg(all(feature = "AppKit_NSComboBoxCell", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(comboBoxCell:indexOfItemWithStringValue:)] unsafe fn comboBoxCell_indexOfItemWithStringValue( @@ -178,6 +219,7 @@ extern_protocol!( ) -> NSUInteger; #[cfg(all(feature = "AppKit_NSComboBoxCell", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other comboBoxCell:completedString:)] unsafe fn comboBoxCell_completedString( @@ -195,10 +237,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSComboBoxCell")] unsafe impl NSComboBoxCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSComboButton.rs b/AppKit/NSComboButton.rs index 7fb0bce83..c829a5205 100644 --- a/AppKit/NSComboButton.rs +++ b/AppKit/NSComboButton.rs @@ -7,8 +7,11 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSComboButtonStyle { + #[cfg(not(any(target_os = "ios")))] NSComboButtonStyleSplit = 0, + #[cfg(not(any(target_os = "ios")))] NSComboButtonStyleUnified = 1, } ); @@ -16,6 +19,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSComboButton")] + #[cfg(not(any(target_os = "ios")))] pub struct NSComboButton; #[cfg(feature = "AppKit_NSComboButton")] @@ -53,6 +57,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSComboButton")] unsafe impl NSComboButton { #[cfg(all(feature = "AppKit_NSMenu", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other comboButtonWithTitle:menu:target:action:)] pub unsafe fn comboButtonWithTitle_menu_target_action( title: &NSString, @@ -62,6 +67,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "AppKit_NSImage", feature = "AppKit_NSMenu"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other comboButtonWithImage:menu:target:action:)] pub unsafe fn comboButtonWithImage_menu_target_action( image: &NSImage, @@ -75,6 +81,7 @@ extern_methods!( feature = "AppKit_NSMenu", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other comboButtonWithTitle:image:menu:target:action:)] pub unsafe fn comboButtonWithTitle_image_menu_target_action( title: &NSString, @@ -85,38 +92,48 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[cfg(not(any(target_os = "ios")))] #[method(imageScaling)] pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[cfg(not(any(target_os = "ios")))] #[method(setImageScaling:)] pub unsafe fn setImageScaling(&self, image_scaling: NSImageScaling); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Id; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: &NSMenu); + #[cfg(not(any(target_os = "ios")))] #[method(style)] pub unsafe fn style(&self) -> NSComboButtonStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setStyle:)] pub unsafe fn setStyle(&self, style: NSComboButtonStyle); } @@ -126,6 +143,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSComboButton")] unsafe impl NSComboButton { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSControl.rs b/AppKit/NSControl.rs index db473be1e..b4278f2ec 100644 --- a/AppKit/NSControl.rs +++ b/AppKit/NSControl.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSControl")] + #[cfg(not(any(target_os = "ios")))] pub struct NSControl; #[cfg(feature = "AppKit_NSControl")] @@ -44,202 +45,264 @@ unsafe impl NSUserInterfaceItemIdentification for NSControl {} extern_methods!( #[cfg(feature = "AppKit_NSControl")] unsafe impl NSControl { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(action)] pub unsafe fn action(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[cfg(not(any(target_os = "ios")))] #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(ignoresMultiClick)] pub unsafe fn ignoresMultiClick(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setIgnoresMultiClick:)] pub unsafe fn setIgnoresMultiClick(&self, ignores_multi_click: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isContinuous)] pub unsafe fn isContinuous(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setContinuous:)] pub unsafe fn setContinuous(&self, continuous: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(refusesFirstResponder)] pub unsafe fn refusesFirstResponder(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setRefusesFirstResponder:)] pub unsafe fn setRefusesFirstResponder(&self, refuses_first_responder: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isHighlighted)] pub unsafe fn isHighlighted(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHighlighted:)] pub unsafe fn setHighlighted(&self, highlighted: bool); + #[cfg(not(any(target_os = "ios")))] #[method(controlSize)] pub unsafe fn controlSize(&self) -> NSControlSize; + #[cfg(not(any(target_os = "ios")))] #[method(setControlSize:)] pub unsafe fn setControlSize(&self, control_size: NSControlSize); #[cfg(feature = "Foundation_NSFormatter")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other formatter)] pub unsafe fn formatter(&self) -> Option>; #[cfg(feature = "Foundation_NSFormatter")] + #[cfg(not(any(target_os = "ios")))] #[method(setFormatter:)] pub unsafe fn setFormatter(&self, formatter: Option<&NSFormatter>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other objectValue)] pub unsafe fn objectValue(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, object_value: Option<&Object>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other stringValue)] pub unsafe fn stringValue(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setStringValue:)] pub unsafe fn setStringValue(&self, string_value: &NSString); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedStringValue)] pub unsafe fn attributedStringValue(&self) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAttributedStringValue:)] pub unsafe fn setAttributedStringValue(&self, attributed_string_value: &NSAttributedString); + #[cfg(not(any(target_os = "ios")))] #[method(intValue)] pub unsafe fn intValue(&self) -> c_int; + #[cfg(not(any(target_os = "ios")))] #[method(setIntValue:)] pub unsafe fn setIntValue(&self, int_value: c_int); + #[cfg(not(any(target_os = "ios")))] #[method(integerValue)] pub unsafe fn integerValue(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setIntegerValue:)] pub unsafe fn setIntegerValue(&self, integer_value: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(floatValue)] pub unsafe fn floatValue(&self) -> c_float; + #[cfg(not(any(target_os = "ios")))] #[method(setFloatValue:)] pub unsafe fn setFloatValue(&self, float_value: c_float); + #[cfg(not(any(target_os = "ios")))] #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setDoubleValue:)] pub unsafe fn setDoubleValue(&self, double_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(sizeThatFits:)] pub unsafe fn sizeThatFits(&self, size: NSSize) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); + #[cfg(not(any(target_os = "ios")))] #[method(sendActionOn:)] pub unsafe fn sendActionOn(&self, mask: NSEventMask) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(sendAction:to:)] pub unsafe fn sendAction_to(&self, action: Option, target: Option<&Object>) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(takeIntValueFrom:)] pub unsafe fn takeIntValueFrom(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(takeFloatValueFrom:)] pub unsafe fn takeFloatValueFrom(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(takeDoubleValueFrom:)] pub unsafe fn takeDoubleValueFrom(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(takeStringValueFrom:)] pub unsafe fn takeStringValueFrom(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(takeObjectValueFrom:)] pub unsafe fn takeObjectValueFrom(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(takeIntegerValueFrom:)] pub unsafe fn takeIntegerValueFrom(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseDown:)] pub unsafe fn mouseDown(&self, event: &NSEvent); + #[cfg(not(any(target_os = "ios")))] #[method(performClick:)] pub unsafe fn performClick(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other font)] pub unsafe fn font(&self) -> Option>; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(setFont:)] pub unsafe fn setFont(&self, font: Option<&NSFont>); + #[cfg(not(any(target_os = "ios")))] #[method(usesSingleLineMode)] pub unsafe fn usesSingleLineMode(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesSingleLineMode:)] pub unsafe fn setUsesSingleLineMode(&self, uses_single_line_mode: bool); + #[cfg(not(any(target_os = "ios")))] #[method(lineBreakMode)] pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode; + #[cfg(not(any(target_os = "ios")))] #[method(setLineBreakMode:)] pub unsafe fn setLineBreakMode(&self, line_break_mode: NSLineBreakMode); + #[cfg(not(any(target_os = "ios")))] #[method(alignment)] pub unsafe fn alignment(&self) -> NSTextAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(setAlignment:)] pub unsafe fn setAlignment(&self, alignment: NSTextAlignment); + #[cfg(not(any(target_os = "ios")))] #[method(baseWritingDirection)] pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setBaseWritingDirection:)] pub unsafe fn setBaseWritingDirection(&self, base_writing_direction: NSWritingDirection); + #[cfg(not(any(target_os = "ios")))] #[method(allowsExpansionToolTips)] pub unsafe fn allowsExpansionToolTips(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsExpansionToolTips:)] pub unsafe fn setAllowsExpansionToolTips(&self, allows_expansion_tool_tips: bool); + #[cfg(not(any(target_os = "ios")))] #[method(expansionFrameWithFrame:)] pub unsafe fn expansionFrameWithFrame(&self, content_frame: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(drawWithExpansionFrame:inView:)] pub unsafe fn drawWithExpansionFrame_inView(&self, content_frame: NSRect, view: &NSView); } @@ -250,16 +313,20 @@ extern_methods!( #[cfg(feature = "AppKit_NSControl")] unsafe impl NSControl { #[cfg(feature = "AppKit_NSText")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentEditor)] pub unsafe fn currentEditor(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(abortEditing)] pub unsafe fn abortEditing(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(validateEditing)] pub unsafe fn validateEditing(&self); #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSText"))] + #[cfg(not(any(target_os = "ios")))] #[method(editWithFrame:editor:delegate:event:)] pub unsafe fn editWithFrame_editor_delegate_event( &self, @@ -270,6 +337,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSText")] + #[cfg(not(any(target_os = "ios")))] #[method(selectWithFrame:editor:delegate:start:length:)] pub unsafe fn selectWithFrame_editor_delegate_start_length( &self, @@ -281,29 +349,35 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSText")] + #[cfg(not(any(target_os = "ios")))] #[method(endEditing:)] pub unsafe fn endEditing(&self, text_obj: &NSText); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSControlTextEditingDelegate: NSObjectProtocol { #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(controlTextDidBeginEditing:)] unsafe fn controlTextDidBeginEditing(&self, obj: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(controlTextDidEndEditing:)] unsafe fn controlTextDidEndEditing(&self, obj: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(controlTextDidChange:)] unsafe fn controlTextDidChange(&self, obj: &NSNotification); #[cfg(all(feature = "AppKit_NSControl", feature = "AppKit_NSText"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(control:textShouldBeginEditing:)] unsafe fn control_textShouldBeginEditing( @@ -313,6 +387,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSControl", feature = "AppKit_NSText"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(control:textShouldEndEditing:)] unsafe fn control_textShouldEndEditing( @@ -322,6 +397,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSControl", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(control:didFailToFormatString:errorDescription:)] unsafe fn control_didFailToFormatString_errorDescription( @@ -332,6 +408,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSControl", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(control:didFailToValidatePartialString:errorDescription:)] unsafe fn control_didFailToValidatePartialString_errorDescription( @@ -342,11 +419,13 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSControl")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(control:isValidObject:)] unsafe fn control_isValidObject(&self, control: &NSControl, obj: Option<&Object>) -> bool; #[cfg(all(feature = "AppKit_NSControl", feature = "AppKit_NSTextView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(control:textView:doCommandBySelector:)] unsafe fn control_textView_doCommandBySelector( @@ -362,6 +441,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other control:textView:completions:forPartialWordRange:indexOfSelectedItem:)] unsafe fn control_textView_completions_forPartialWordRange_indexOfSelectedItem( @@ -388,6 +468,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSControl")] unsafe impl NSControl { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setFloatingPointFormat:left:right:)] pub unsafe fn setFloatingPointFormat_left_right( &self, @@ -396,52 +477,65 @@ extern_methods!( right_digits: NSUInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(cellClass)] pub unsafe fn cellClass() -> Option<&'static Class>; + #[cfg(not(any(target_os = "ios")))] #[method(setCellClass:)] pub unsafe fn setCellClass(cell_class: Option<&Class>); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cell)] pub unsafe fn cell(&self) -> Option>; #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method(setCell:)] pub unsafe fn setCell(&self, cell: Option<&NSCell>); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedCell)] pub unsafe fn selectedCell(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(selectedTag)] pub unsafe fn selectedTag(&self) -> NSInteger; #[deprecated = "Set the needsDisplay property to YES instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setNeedsDisplay)] pub unsafe fn setNeedsDisplay(&self); #[deprecated = "Override -layout instead. This method should never be called"] + #[cfg(not(any(target_os = "ios")))] #[method(calcSize)] pub unsafe fn calcSize(&self); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method(updateCell:)] pub unsafe fn updateCell(&self, cell: &NSCell); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method(updateCellInside:)] pub unsafe fn updateCellInside(&self, cell: &NSCell); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method(drawCellInside:)] pub unsafe fn drawCellInside(&self, cell: &NSCell); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method(drawCell:)] pub unsafe fn drawCell(&self, cell: &NSCell); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method(selectCell:)] pub unsafe fn selectCell(&self, cell: &NSCell); } diff --git a/AppKit/NSController.rs b/AppKit/NSController.rs index 5ff4f2c74..a79f10af1 100644 --- a/AppKit/NSController.rs +++ b/AppKit/NSController.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSController; #[cfg(feature = "AppKit_NSController")] @@ -31,28 +32,35 @@ unsafe impl NSObjectProtocol for NSController {} extern_methods!( #[cfg(feature = "AppKit_NSController")] unsafe impl NSController { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(objectDidBeginEditing:)] pub unsafe fn objectDidBeginEditing(&self, editor: &ProtocolObject); + #[cfg(not(any(target_os = "ios")))] #[method(objectDidEndEditing:)] pub unsafe fn objectDidEndEditing(&self, editor: &ProtocolObject); + #[cfg(not(any(target_os = "ios")))] #[method(discardEditing)] pub unsafe fn discardEditing(&self); + #[cfg(not(any(target_os = "ios")))] #[method(commitEditing)] pub unsafe fn commitEditing(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(commitEditingWithDelegate:didCommitSelector:contextInfo:)] pub unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( &self, @@ -61,6 +69,7 @@ extern_methods!( context_info: *mut c_void, ); + #[cfg(not(any(target_os = "ios")))] #[method(isEditing)] pub unsafe fn isEditing(&self) -> bool; } diff --git a/AppKit/NSCursor.rs b/AppKit/NSCursor.rs index 84714cd89..f4a7c4772 100644 --- a/AppKit/NSCursor.rs +++ b/AppKit/NSCursor.rs @@ -135,6 +135,7 @@ extern_methods!( unsafe impl NSCursor { #[cfg(all(feature = "AppKit_NSColor", feature = "AppKit_NSImage"))] #[deprecated = "Color hints are ignored. Use -initWithImage:hotSpot: instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithImage:foregroundColorHint:backgroundColorHint:hotSpot:)] pub unsafe fn initWithImage_foregroundColorHint_backgroundColorHint_hotSpot( this: Option>, @@ -145,28 +146,34 @@ extern_methods!( ) -> Id; #[deprecated = "setOnMouseExited is unused and should not be called"] + #[cfg(not(any(target_os = "ios")))] #[method(setOnMouseExited:)] pub unsafe fn setOnMouseExited(&self, flag: bool); #[deprecated = "setOnMouseEntered is unused and should not be called"] + #[cfg(not(any(target_os = "ios")))] #[method(setOnMouseEntered:)] pub unsafe fn setOnMouseEntered(&self, flag: bool); #[deprecated = "isSetOnMouseExited is unused"] + #[cfg(not(any(target_os = "ios")))] #[method(isSetOnMouseExited)] pub unsafe fn isSetOnMouseExited(&self) -> bool; #[deprecated = "isSetOnMouseEntered is unused"] + #[cfg(not(any(target_os = "ios")))] #[method(isSetOnMouseEntered)] pub unsafe fn isSetOnMouseEntered(&self) -> bool; #[cfg(feature = "AppKit_NSEvent")] #[deprecated = "mouseEntered: is unused and should not be called"] + #[cfg(not(any(target_os = "ios")))] #[method(mouseEntered:)] pub unsafe fn mouseEntered(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] #[deprecated = "mouseExited: is unused and should not be called"] + #[cfg(not(any(target_os = "ios")))] #[method(mouseExited:)] pub unsafe fn mouseExited(&self, event: &NSEvent); } diff --git a/AppKit/NSCustomImageRep.rs b/AppKit/NSCustomImageRep.rs index bc62d78b5..0936478e4 100644 --- a/AppKit/NSCustomImageRep.rs +++ b/AppKit/NSCustomImageRep.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCustomImageRep")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCustomImageRep; #[cfg(feature = "AppKit_NSCustomImageRep")] @@ -26,6 +27,7 @@ unsafe impl NSObjectProtocol for NSCustomImageRep {} extern_methods!( #[cfg(feature = "AppKit_NSCustomImageRep")] unsafe impl NSCustomImageRep { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithSize:flipped:drawingHandler:)] pub unsafe fn initWithSize_flipped_drawingHandler( this: Option>, @@ -34,9 +36,11 @@ extern_methods!( drawing_handler: &Block<(NSRect,), Bool>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(drawingHandler)] pub unsafe fn drawingHandler(&self) -> *mut Block<(NSRect,), Bool>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithDrawSelector:delegate:)] pub unsafe fn initWithDrawSelector_delegate( this: Option>, @@ -44,9 +48,11 @@ extern_methods!( delegate: &Object, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(drawSelector)] pub unsafe fn drawSelector(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; } diff --git a/AppKit/NSCustomTouchBarItem.rs b/AppKit/NSCustomTouchBarItem.rs index 99da2c602..e1d741984 100644 --- a/AppKit/NSCustomTouchBarItem.rs +++ b/AppKit/NSCustomTouchBarItem.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSCustomTouchBarItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSCustomTouchBarItem; #[cfg(feature = "AppKit_NSCustomTouchBarItem")] @@ -27,26 +28,32 @@ extern_methods!( #[cfg(feature = "AppKit_NSCustomTouchBarItem")] unsafe impl NSCustomTouchBarItem { #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Id; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setView:)] pub unsafe fn setView(&self, view: &NSView); #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other viewController)] pub unsafe fn viewController(&self) -> Option>; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(setViewController:)] pub unsafe fn setViewController(&self, view_controller: Option<&NSViewController>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customization_label: Option<&NSString>); } diff --git a/AppKit/NSDatePicker.rs b/AppKit/NSDatePicker.rs index 3ab6a3329..9b9f64646 100644 --- a/AppKit/NSDatePicker.rs +++ b/AppKit/NSDatePicker.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSDatePicker")] + #[cfg(not(any(target_os = "ios")))] pub struct NSDatePicker; #[cfg(feature = "AppKit_NSDatePicker")] @@ -44,121 +45,155 @@ unsafe impl NSUserInterfaceItemIdentification for NSDatePicker {} extern_methods!( #[cfg(feature = "AppKit_NSDatePicker")] unsafe impl NSDatePicker { + #[cfg(not(any(target_os = "ios")))] #[method(datePickerStyle)] pub unsafe fn datePickerStyle(&self) -> NSDatePickerStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setDatePickerStyle:)] pub unsafe fn setDatePickerStyle(&self, date_picker_style: NSDatePickerStyle); + #[cfg(not(any(target_os = "ios")))] #[method(isBezeled)] pub unsafe fn isBezeled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setBezeled:)] pub unsafe fn setBezeled(&self, bezeled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isBordered)] pub unsafe fn isBordered(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setBordered:)] pub unsafe fn setBordered(&self, bordered: bool); + #[cfg(not(any(target_os = "ios")))] #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, draws_background: bool); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: &NSColor); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textColor)] pub unsafe fn textColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setTextColor:)] pub unsafe fn setTextColor(&self, text_color: &NSColor); + #[cfg(not(any(target_os = "ios")))] #[method(datePickerMode)] pub unsafe fn datePickerMode(&self) -> NSDatePickerMode; + #[cfg(not(any(target_os = "ios")))] #[method(setDatePickerMode:)] pub unsafe fn setDatePickerMode(&self, date_picker_mode: NSDatePickerMode); + #[cfg(not(any(target_os = "ios")))] #[method(datePickerElements)] pub unsafe fn datePickerElements(&self) -> NSDatePickerElementFlags; + #[cfg(not(any(target_os = "ios")))] #[method(setDatePickerElements:)] pub unsafe fn setDatePickerElements(&self, date_picker_elements: NSDatePickerElementFlags); #[cfg(feature = "Foundation_NSCalendar")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other calendar)] pub unsafe fn calendar(&self) -> Option>; #[cfg(feature = "Foundation_NSCalendar")] + #[cfg(not(any(target_os = "ios")))] #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); #[cfg(feature = "Foundation_NSLocale")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Option>; #[cfg(feature = "Foundation_NSLocale")] + #[cfg(not(any(target_os = "ios")))] #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); #[cfg(feature = "Foundation_NSTimeZone")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other timeZone)] pub unsafe fn timeZone(&self) -> Option>; #[cfg(feature = "Foundation_NSTimeZone")] + #[cfg(not(any(target_os = "ios")))] #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, time_zone: Option<&NSTimeZone>); #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dateValue)] pub unsafe fn dateValue(&self) -> Id; #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method(setDateValue:)] pub unsafe fn setDateValue(&self, date_value: &NSDate); + #[cfg(not(any(target_os = "ios")))] #[method(timeInterval)] pub unsafe fn timeInterval(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(setTimeInterval:)] pub unsafe fn setTimeInterval(&self, time_interval: NSTimeInterval); #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other minDate)] pub unsafe fn minDate(&self) -> Option>; #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method(setMinDate:)] pub unsafe fn setMinDate(&self, min_date: Option<&NSDate>); #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other maxDate)] pub unsafe fn maxDate(&self) -> Option>; #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method(setMaxDate:)] pub unsafe fn setMaxDate(&self, max_date: Option<&NSDate>); + #[cfg(not(any(target_os = "ios")))] #[method(presentsCalendarOverlay)] pub unsafe fn presentsCalendarOverlay(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPresentsCalendarOverlay:)] pub unsafe fn setPresentsCalendarOverlay(&self, presents_calendar_overlay: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -171,6 +206,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSDatePicker")] unsafe impl NSDatePicker { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSDatePickerCell.rs b/AppKit/NSDatePickerCell.rs index eafdc972e..c8ba1f7af 100644 --- a/AppKit/NSDatePickerCell.rs +++ b/AppKit/NSDatePickerCell.rs @@ -7,29 +7,43 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSDatePickerStyle { + #[cfg(not(any(target_os = "ios")))] NSDatePickerStyleTextFieldAndStepper = 0, + #[cfg(not(any(target_os = "ios")))] NSDatePickerStyleClockAndCalendar = 1, + #[cfg(not(any(target_os = "ios")))] NSDatePickerStyleTextField = 2, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSDatePickerMode { + #[cfg(not(any(target_os = "ios")))] NSDatePickerModeSingle = 0, + #[cfg(not(any(target_os = "ios")))] NSDatePickerModeRange = 1, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSDatePickerElementFlags { + #[cfg(not(any(target_os = "ios")))] NSDatePickerElementFlagHourMinute = 0x000c, + #[cfg(not(any(target_os = "ios")))] NSDatePickerElementFlagHourMinuteSecond = 0x000e, + #[cfg(not(any(target_os = "ios")))] NSDatePickerElementFlagTimeZone = 0x0010, + #[cfg(not(any(target_os = "ios")))] NSDatePickerElementFlagYearMonth = 0x00c0, + #[cfg(not(any(target_os = "ios")))] NSDatePickerElementFlagYearMonthDay = 0x00e0, + #[cfg(not(any(target_os = "ios")))] NSDatePickerElementFlagEra = 0x0100, } ); @@ -37,6 +51,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSDatePickerCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSDatePickerCell; #[cfg(feature = "AppKit_NSDatePickerCell")] @@ -65,117 +80,148 @@ extern_methods!( #[cfg(feature = "AppKit_NSDatePickerCell")] unsafe impl NSDatePickerCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, image: Option<&NSImage>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(datePickerStyle)] pub unsafe fn datePickerStyle(&self) -> NSDatePickerStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setDatePickerStyle:)] pub unsafe fn setDatePickerStyle(&self, date_picker_style: NSDatePickerStyle); + #[cfg(not(any(target_os = "ios")))] #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, draws_background: bool); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: &NSColor); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textColor)] pub unsafe fn textColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setTextColor:)] pub unsafe fn setTextColor(&self, text_color: &NSColor); + #[cfg(not(any(target_os = "ios")))] #[method(datePickerMode)] pub unsafe fn datePickerMode(&self) -> NSDatePickerMode; + #[cfg(not(any(target_os = "ios")))] #[method(setDatePickerMode:)] pub unsafe fn setDatePickerMode(&self, date_picker_mode: NSDatePickerMode); + #[cfg(not(any(target_os = "ios")))] #[method(datePickerElements)] pub unsafe fn datePickerElements(&self) -> NSDatePickerElementFlags; + #[cfg(not(any(target_os = "ios")))] #[method(setDatePickerElements:)] pub unsafe fn setDatePickerElements(&self, date_picker_elements: NSDatePickerElementFlags); #[cfg(feature = "Foundation_NSCalendar")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other calendar)] pub unsafe fn calendar(&self) -> Option>; #[cfg(feature = "Foundation_NSCalendar")] + #[cfg(not(any(target_os = "ios")))] #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); #[cfg(feature = "Foundation_NSLocale")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Option>; #[cfg(feature = "Foundation_NSLocale")] + #[cfg(not(any(target_os = "ios")))] #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); #[cfg(feature = "Foundation_NSTimeZone")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other timeZone)] pub unsafe fn timeZone(&self) -> Option>; #[cfg(feature = "Foundation_NSTimeZone")] + #[cfg(not(any(target_os = "ios")))] #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, time_zone: Option<&NSTimeZone>); #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dateValue)] pub unsafe fn dateValue(&self) -> Id; #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method(setDateValue:)] pub unsafe fn setDateValue(&self, date_value: &NSDate); + #[cfg(not(any(target_os = "ios")))] #[method(timeInterval)] pub unsafe fn timeInterval(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(setTimeInterval:)] pub unsafe fn setTimeInterval(&self, time_interval: NSTimeInterval); #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other minDate)] pub unsafe fn minDate(&self) -> Option>; #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method(setMinDate:)] pub unsafe fn setMinDate(&self, min_date: Option<&NSDate>); #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other maxDate)] pub unsafe fn maxDate(&self) -> Option>; #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method(setMaxDate:)] pub unsafe fn setMaxDate(&self, max_date: Option<&NSDate>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -185,8 +231,10 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSDatePickerCellDelegate: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSDatePickerCell", feature = "Foundation_NSDate"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(datePickerCell:validateProposedDateValue:timeInterval:)] unsafe fn datePickerCell_validateProposedDateValue_timeInterval( diff --git a/AppKit/NSDictionaryController.rs b/AppKit/NSDictionaryController.rs index 89d9eefa5..7fcea1625 100644 --- a/AppKit/NSDictionaryController.rs +++ b/AppKit/NSDictionaryController.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSDictionaryControllerKeyValuePair")] + #[cfg(not(any(target_os = "ios")))] pub struct NSDictionaryControllerKeyValuePair; #[cfg(feature = "AppKit_NSDictionaryControllerKeyValuePair")] @@ -22,31 +23,39 @@ unsafe impl NSObjectProtocol for NSDictionaryControllerKeyValuePair {} extern_methods!( #[cfg(feature = "AppKit_NSDictionaryControllerKeyValuePair")] unsafe impl NSDictionaryControllerKeyValuePair { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other key)] pub unsafe fn key(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setKey:)] pub unsafe fn setKey(&self, key: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other value)] pub unsafe fn value(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setValue:)] pub unsafe fn setValue(&self, value: Option<&Object>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedKey)] pub unsafe fn localizedKey(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setLocalizedKey:)] pub unsafe fn setLocalizedKey(&self, localized_key: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method(isExplicitlyIncluded)] pub unsafe fn isExplicitlyIncluded(&self) -> bool; } @@ -55,6 +64,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSDictionaryController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSDictionaryController; #[cfg(feature = "AppKit_NSDictionaryController")] @@ -80,44 +90,55 @@ extern_methods!( #[cfg(feature = "AppKit_NSDictionaryController")] unsafe impl NSDictionaryController { #[cfg(feature = "AppKit_NSDictionaryControllerKeyValuePair")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New newObject)] pub unsafe fn newObject(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other initialKey)] pub unsafe fn initialKey(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setInitialKey:)] pub unsafe fn setInitialKey(&self, initial_key: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other initialValue)] pub unsafe fn initialValue(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setInitialValue:)] pub unsafe fn setInitialValue(&self, initial_value: &Object); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other includedKeys)] pub unsafe fn includedKeys(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setIncludedKeys:)] pub unsafe fn setIncludedKeys(&self, included_keys: &NSArray); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other excludedKeys)] pub unsafe fn excludedKeys(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setExcludedKeys:)] pub unsafe fn setExcludedKeys(&self, excluded_keys: &NSArray); #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedKeyDictionary)] pub unsafe fn localizedKeyDictionary(&self) -> Id>; #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setLocalizedKeyDictionary:)] pub unsafe fn setLocalizedKeyDictionary( &self, @@ -125,10 +146,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedKeyTable)] pub unsafe fn localizedKeyTable(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setLocalizedKeyTable:)] pub unsafe fn setLocalizedKeyTable(&self, localized_key_table: Option<&NSString>); } @@ -138,6 +161,7 @@ extern_methods!( /// Methods declared on superclass `NSObjectController` #[cfg(feature = "AppKit_NSDictionaryController")] unsafe impl NSDictionaryController { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContent:)] pub unsafe fn initWithContent( this: Option>, diff --git a/AppKit/NSDockTile.rs b/AppKit/NSDockTile.rs index f4430cdac..7c29e263c 100644 --- a/AppKit/NSDockTile.rs +++ b/AppKit/NSDockTile.rs @@ -10,6 +10,7 @@ extern_static!(NSAppKitVersionNumberWithDockTilePlugInSupport: NSAppKitVersion = extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSDockTile")] + #[cfg(not(any(target_os = "ios")))] pub struct NSDockTile; #[cfg(feature = "AppKit_NSDockTile")] @@ -24,46 +25,58 @@ unsafe impl NSObjectProtocol for NSDockTile {} extern_methods!( #[cfg(feature = "AppKit_NSDockTile")] unsafe impl NSDockTile { + #[cfg(not(any(target_os = "ios")))] #[method(size)] pub unsafe fn size(&self) -> NSSize; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentView)] pub unsafe fn contentView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setContentView:)] pub unsafe fn setContentView(&self, content_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(display)] pub unsafe fn display(&self); + #[cfg(not(any(target_os = "ios")))] #[method(showsApplicationBadge)] pub unsafe fn showsApplicationBadge(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsApplicationBadge:)] pub unsafe fn setShowsApplicationBadge(&self, shows_application_badge: bool); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other badgeLabel)] pub unsafe fn badgeLabel(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setBadgeLabel:)] pub unsafe fn setBadgeLabel(&self, badge_label: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other owner)] pub unsafe fn owner(&self) -> Option>; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSDockTilePlugIn: NSObjectProtocol { #[cfg(feature = "AppKit_NSDockTile")] + #[cfg(not(any(target_os = "ios")))] #[method(setDockTile:)] unsafe fn setDockTile(&self, dock_tile: Option<&NSDockTile>); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other dockMenu)] unsafe fn dockMenu(&self) -> Option>; diff --git a/AppKit/NSDocument.rs b/AppKit/NSDocument.rs index 289338033..47850a5dc 100644 --- a/AppKit/NSDocument.rs +++ b/AppKit/NSDocument.rs @@ -7,27 +7,43 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSDocumentChangeType { + #[cfg(not(any(target_os = "ios")))] NSChangeDone = 0, + #[cfg(not(any(target_os = "ios")))] NSChangeUndone = 1, + #[cfg(not(any(target_os = "ios")))] NSChangeRedone = 5, + #[cfg(not(any(target_os = "ios")))] NSChangeCleared = 2, + #[cfg(not(any(target_os = "ios")))] NSChangeReadOtherContents = 3, + #[cfg(not(any(target_os = "ios")))] NSChangeAutosaved = 4, + #[cfg(not(any(target_os = "ios")))] NSChangeDiscardable = 256, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSaveOperationType { + #[cfg(not(any(target_os = "ios")))] NSSaveOperation = 0, + #[cfg(not(any(target_os = "ios")))] NSSaveAsOperation = 1, + #[cfg(not(any(target_os = "ios")))] NSSaveToOperation = 2, + #[cfg(not(any(target_os = "ios")))] NSAutosaveInPlaceOperation = 4, + #[cfg(not(any(target_os = "ios")))] NSAutosaveElsewhereOperation = 3, + #[cfg(not(any(target_os = "ios")))] NSAutosaveAsOperation = 5, #[deprecated = "Use NSAutosaveElsewhereOperation instead"] + #[cfg(not(any(target_os = "ios")))] NSAutosaveOperation = 3, } ); @@ -35,6 +51,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSDocument")] + #[cfg(not(any(target_os = "ios")))] pub struct NSDocument; #[cfg(feature = "AppKit_NSDocument")] @@ -61,10 +78,12 @@ unsafe impl NSUserInterfaceValidations for NSDocument {} extern_methods!( #[cfg(feature = "AppKit_NSDocument")] unsafe impl NSDocument { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithType:error:_)] pub unsafe fn initWithType_error( this: Option>, @@ -72,6 +91,7 @@ extern_methods!( ) -> Result, Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(canConcurrentlyReadDocumentsOfType:)] pub unsafe fn canConcurrentlyReadDocumentsOfType(type_name: &NSString) -> bool; @@ -80,6 +100,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:ofType:error:_)] pub unsafe fn initWithContentsOfURL_ofType_error( this: Option>, @@ -92,6 +113,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initForURL:withContentsOfURL:ofType:error:_)] pub unsafe fn initForURL_withContentsOfURL_ofType_error( this: Option>, @@ -101,35 +123,44 @@ extern_methods!( ) -> Result, Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileType)] pub unsafe fn fileType(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setFileType:)] pub unsafe fn setFileType(&self, file_type: Option<&NSString>); #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileURL)] pub unsafe fn fileURL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method(setFileURL:)] pub unsafe fn setFileURL(&self, file_url: Option<&NSURL>); #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileModificationDate)] pub unsafe fn fileModificationDate(&self) -> Option>; #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method(setFileModificationDate:)] pub unsafe fn setFileModificationDate(&self, file_modification_date: Option<&NSDate>); + #[cfg(not(any(target_os = "ios")))] #[method(isDraft)] pub unsafe fn isDraft(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDraft:)] pub unsafe fn setDraft(&self, draft: bool); + #[cfg(not(any(target_os = "ios")))] #[method(performActivityWithSynchronousWaiting:usingBlock:)] pub unsafe fn performActivityWithSynchronousWaiting_usingBlock( &self, @@ -137,21 +168,26 @@ extern_methods!( block: &Block<(NonNull>,), ()>, ); + #[cfg(not(any(target_os = "ios")))] #[method(continueActivityUsingBlock:)] pub unsafe fn continueActivityUsingBlock(&self, block: &Block<(), ()>); + #[cfg(not(any(target_os = "ios")))] #[method(continueAsynchronousWorkOnMainThreadUsingBlock:)] pub unsafe fn continueAsynchronousWorkOnMainThreadUsingBlock(&self, block: &Block<(), ()>); + #[cfg(not(any(target_os = "ios")))] #[method(performSynchronousFileAccessUsingBlock:)] pub unsafe fn performSynchronousFileAccessUsingBlock(&self, block: &Block<(), ()>); + #[cfg(not(any(target_os = "ios")))] #[method(performAsynchronousFileAccessUsingBlock:)] pub unsafe fn performAsynchronousFileAccessUsingBlock( &self, block: &Block<(NonNull>,), ()>, ); + #[cfg(not(any(target_os = "ios")))] #[method(revertDocumentToSaved:)] pub unsafe fn revertDocumentToSaved(&self, sender: Option<&Object>); @@ -160,6 +196,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(revertToContentsOfURL:ofType:error:_)] pub unsafe fn revertToContentsOfURL_ofType_error( &self, @@ -172,6 +209,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(readFromURL:ofType:error:_)] pub unsafe fn readFromURL_ofType_error( &self, @@ -184,6 +222,7 @@ extern_methods!( feature = "Foundation_NSFileWrapper", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method(readFromFileWrapper:ofType:error:_)] pub unsafe fn readFromFileWrapper_ofType_error( &self, @@ -196,6 +235,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method(readFromData:ofType:error:_)] pub unsafe fn readFromData_ofType_error( &self, @@ -203,6 +243,7 @@ extern_methods!( type_name: &NSString, ) -> Result<(), Id>; + #[cfg(not(any(target_os = "ios")))] #[method(isEntireFileLoaded)] pub unsafe fn isEntireFileLoaded(&self) -> bool; @@ -211,6 +252,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(writeToURL:ofType:error:_)] pub unsafe fn writeToURL_ofType_error( &self, @@ -223,6 +265,7 @@ extern_methods!( feature = "Foundation_NSFileWrapper", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileWrapperOfType:error:_)] pub unsafe fn fileWrapperOfType_error( &self, @@ -234,15 +277,18 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataOfType:error:_)] pub unsafe fn dataOfType_error( &self, type_name: &NSString, ) -> Result, Id>; + #[cfg(not(any(target_os = "ios")))] #[method(unblockUserInteraction)] pub unsafe fn unblockUserInteraction(&self); + #[cfg(not(any(target_os = "ios")))] #[method(autosavingIsImplicitlyCancellable)] pub unsafe fn autosavingIsImplicitlyCancellable(&self) -> bool; @@ -251,6 +297,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(writeSafelyToURL:ofType:forSaveOperation:error:_)] pub unsafe fn writeSafelyToURL_ofType_forSaveOperation_error( &self, @@ -264,6 +311,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(writeToURL:ofType:forSaveOperation:originalContentsURL:error:_)] pub unsafe fn writeToURL_ofType_forSaveOperation_originalContentsURL_error( &self, @@ -279,6 +327,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileAttributesToWriteToURL:ofType:forSaveOperation:originalContentsURL:error:_)] pub unsafe fn fileAttributesToWriteToURL_ofType_forSaveOperation_originalContentsURL_error( &self, @@ -288,22 +337,28 @@ extern_methods!( absolute_original_contents_url: Option<&NSURL>, ) -> Result>, Id>; + #[cfg(not(any(target_os = "ios")))] #[method(keepBackupFile)] pub unsafe fn keepBackupFile(&self) -> bool; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backupFileURL)] pub unsafe fn backupFileURL(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(saveDocument:)] pub unsafe fn saveDocument(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(saveDocumentAs:)] pub unsafe fn saveDocumentAs(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(saveDocumentTo:)] pub unsafe fn saveDocumentTo(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(saveDocumentWithDelegate:didSaveSelector:contextInfo:)] pub unsafe fn saveDocumentWithDelegate_didSaveSelector_contextInfo( &self, @@ -312,6 +367,7 @@ extern_methods!( context_info: *mut c_void, ); + #[cfg(not(any(target_os = "ios")))] #[method(runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:)] pub unsafe fn runModalSavePanelForSaveOperation_delegate_didSaveSelector_contextInfo( &self, @@ -321,21 +377,26 @@ extern_methods!( context_info: *mut c_void, ); + #[cfg(not(any(target_os = "ios")))] #[method(shouldRunSavePanelWithAccessoryView)] pub unsafe fn shouldRunSavePanelWithAccessoryView(&self) -> bool; #[cfg(feature = "AppKit_NSSavePanel")] + #[cfg(not(any(target_os = "ios")))] #[method(prepareSavePanel:)] pub unsafe fn prepareSavePanel(&self, save_panel: &NSSavePanel) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(fileNameExtensionWasHiddenInLastRunSavePanel)] pub unsafe fn fileNameExtensionWasHiddenInLastRunSavePanel(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileTypeFromLastRunSavePanel)] pub unsafe fn fileTypeFromLastRunSavePanel(&self) -> Option>; #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method(saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:)] pub unsafe fn saveToURL_ofType_forSaveOperation_delegate_didSaveSelector_contextInfo( &self, @@ -352,6 +413,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(saveToURL:ofType:forSaveOperation:completionHandler:)] pub unsafe fn saveToURL_ofType_forSaveOperation_completionHandler( &self, @@ -362,6 +424,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method(canAsynchronouslyWriteToURL:ofType:forSaveOperation:)] pub unsafe fn canAsynchronouslyWriteToURL_ofType_forSaveOperation( &self, @@ -371,15 +434,19 @@ extern_methods!( ) -> bool; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(checkAutosavingSafetyAndReturnError:_)] pub unsafe fn checkAutosavingSafetyAndReturnError(&self) -> Result<(), Id>; + #[cfg(not(any(target_os = "ios")))] #[method(scheduleAutosaving)] pub unsafe fn scheduleAutosaving(&self); + #[cfg(not(any(target_os = "ios")))] #[method(hasUnautosavedChanges)] pub unsafe fn hasUnautosavedChanges(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(autosaveDocumentWithDelegate:didAutosaveSelector:contextInfo:)] pub unsafe fn autosaveDocumentWithDelegate_didAutosaveSelector_contextInfo( &self, @@ -389,6 +456,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(autosaveWithImplicitCancellability:completionHandler:)] pub unsafe fn autosaveWithImplicitCancellability_completionHandler( &self, @@ -396,42 +464,52 @@ extern_methods!( completion_handler: &Block<(*mut NSError,), ()>, ); + #[cfg(not(any(target_os = "ios")))] #[method(autosavesInPlace)] pub unsafe fn autosavesInPlace() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(preservesVersions)] pub unsafe fn preservesVersions() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(browseDocumentVersions:)] pub unsafe fn browseDocumentVersions(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(isBrowsingVersions)] pub unsafe fn isBrowsingVersions(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(stopBrowsingVersionsWithCompletionHandler:)] pub unsafe fn stopBrowsingVersionsWithCompletionHandler( &self, completion_handler: Option<&Block<(), ()>>, ); + #[cfg(not(any(target_os = "ios")))] #[method(autosavesDrafts)] pub unsafe fn autosavesDrafts() -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other autosavingFileType)] pub unsafe fn autosavingFileType(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other autosavedContentsFileURL)] pub unsafe fn autosavedContentsFileURL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method(setAutosavedContentsFileURL:)] pub unsafe fn setAutosavedContentsFileURL( &self, autosaved_contents_file_url: Option<&NSURL>, ); + #[cfg(not(any(target_os = "ios")))] #[method(canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:)] pub unsafe fn canCloseDocumentWithDelegate_shouldCloseSelector_contextInfo( &self, @@ -440,12 +518,15 @@ extern_methods!( context_info: *mut c_void, ); + #[cfg(not(any(target_os = "ios")))] #[method(close)] pub unsafe fn close(&self); + #[cfg(not(any(target_os = "ios")))] #[method(duplicateDocument:)] pub unsafe fn duplicateDocument(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(duplicateDocumentWithDelegate:didDuplicateSelector:contextInfo:)] pub unsafe fn duplicateDocumentWithDelegate_didDuplicateSelector_contextInfo( &self, @@ -455,18 +536,23 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other duplicateAndReturnError:_)] pub unsafe fn duplicateAndReturnError(&self) -> Result, Id>; + #[cfg(not(any(target_os = "ios")))] #[method(renameDocument:)] pub unsafe fn renameDocument(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(moveDocumentToUbiquityContainer:)] pub unsafe fn moveDocumentToUbiquityContainer(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(moveDocument:)] pub unsafe fn moveDocument(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(moveDocumentWithCompletionHandler:)] pub unsafe fn moveDocumentWithCompletionHandler( &self, @@ -474,6 +560,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method(moveToURL:completionHandler:)] pub unsafe fn moveToURL_completionHandler( &self, @@ -481,12 +568,15 @@ extern_methods!( completion_handler: Option<&Block<(*mut NSError,), ()>>, ); + #[cfg(not(any(target_os = "ios")))] #[method(lockDocument:)] pub unsafe fn lockDocument(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(unlockDocument:)] pub unsafe fn unlockDocument(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(lockDocumentWithCompletionHandler:)] pub unsafe fn lockDocumentWithCompletionHandler( &self, @@ -494,12 +584,14 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(lockWithCompletionHandler:)] pub unsafe fn lockWithCompletionHandler( &self, completion_handler: Option<&Block<(*mut NSError,), ()>>, ); + #[cfg(not(any(target_os = "ios")))] #[method(unlockDocumentWithCompletionHandler:)] pub unsafe fn unlockDocumentWithCompletionHandler( &self, @@ -507,19 +599,23 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(unlockWithCompletionHandler:)] pub unsafe fn unlockWithCompletionHandler( &self, completion_handler: Option<&Block<(*mut NSError,), ()>>, ); + #[cfg(not(any(target_os = "ios")))] #[method(isLocked)] pub unsafe fn isLocked(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(runPageLayout:)] pub unsafe fn runPageLayout(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSPrintInfo")] + #[cfg(not(any(target_os = "ios")))] #[method(runModalPageLayoutWithPrintInfo:delegate:didRunSelector:contextInfo:)] pub unsafe fn runModalPageLayoutWithPrintInfo_delegate_didRunSelector_contextInfo( &self, @@ -530,25 +626,31 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSPageLayout")] + #[cfg(not(any(target_os = "ios")))] #[method(preparePageLayout:)] pub unsafe fn preparePageLayout(&self, page_layout: &NSPageLayout) -> bool; #[cfg(feature = "AppKit_NSPrintInfo")] + #[cfg(not(any(target_os = "ios")))] #[method(shouldChangePrintInfo:)] pub unsafe fn shouldChangePrintInfo(&self, new_print_info: &NSPrintInfo) -> bool; #[cfg(feature = "AppKit_NSPrintInfo")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printInfo)] pub unsafe fn printInfo(&self) -> Id; #[cfg(feature = "AppKit_NSPrintInfo")] + #[cfg(not(any(target_os = "ios")))] #[method(setPrintInfo:)] pub unsafe fn setPrintInfo(&self, print_info: &NSPrintInfo); + #[cfg(not(any(target_os = "ios")))] #[method(printDocument:)] pub unsafe fn printDocument(&self, sender: Option<&Object>); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(printDocumentWithSettings:showPrintPanel:delegate:didPrintSelector:contextInfo:)] pub unsafe fn printDocumentWithSettings_showPrintPanel_delegate_didPrintSelector_contextInfo( &self, @@ -564,6 +666,7 @@ extern_methods!( feature = "Foundation_NSDictionary", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printOperationWithSettings:error:_)] pub unsafe fn printOperationWithSettings_error( &self, @@ -571,6 +674,7 @@ extern_methods!( ) -> Result, Id>; #[cfg(feature = "AppKit_NSPrintOperation")] + #[cfg(not(any(target_os = "ios")))] #[method(runModalPrintOperation:delegate:didRunSelector:contextInfo:)] pub unsafe fn runModalPrintOperation_delegate_didRunSelector_contextInfo( &self, @@ -580,17 +684,21 @@ extern_methods!( context_info: *mut c_void, ); + #[cfg(not(any(target_os = "ios")))] #[method(saveDocumentToPDF:)] pub unsafe fn saveDocumentToPDF(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSPrintOperation")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other PDFPrintOperation)] pub unsafe fn PDFPrintOperation(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(allowsDocumentSharing)] pub unsafe fn allowsDocumentSharing(&self) -> bool; #[cfg(feature = "AppKit_NSSharingService")] + #[cfg(not(any(target_os = "ios")))] #[method(shareDocumentWithSharingService:completionHandler:)] pub unsafe fn shareDocumentWithSharingService_completionHandler( &self, @@ -599,27 +707,33 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSSharingServicePicker")] + #[cfg(not(any(target_os = "ios")))] #[method(prepareSharingServicePicker:)] pub unsafe fn prepareSharingServicePicker( &self, sharing_service_picker: &NSSharingServicePicker, ); + #[cfg(not(any(target_os = "ios")))] #[method(isDocumentEdited)] pub unsafe fn isDocumentEdited(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isInViewingMode)] pub unsafe fn isInViewingMode(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(updateChangeCount:)] pub unsafe fn updateChangeCount(&self, change: NSDocumentChangeType); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other changeCountTokenForSaveOperation:)] pub unsafe fn changeCountTokenForSaveOperation( &self, save_operation: NSSaveOperationType, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(updateChangeCountWithToken:forSaveOperation:)] pub unsafe fn updateChangeCountWithToken_forSaveOperation( &self, @@ -628,20 +742,25 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSUndoManager")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other undoManager)] pub unsafe fn undoManager(&self) -> Option>; #[cfg(feature = "Foundation_NSUndoManager")] + #[cfg(not(any(target_os = "ios")))] #[method(setUndoManager:)] pub unsafe fn setUndoManager(&self, undo_manager: Option<&NSUndoManager>); + #[cfg(not(any(target_os = "ios")))] #[method(hasUndoManager)] pub unsafe fn hasUndoManager(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHasUndoManager:)] pub unsafe fn setHasUndoManager(&self, has_undo_manager: bool); #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "ios")))] #[method(presentError:modalForWindow:delegate:didPresentSelector:contextInfo:)] pub unsafe fn presentError_modalForWindow_delegate_didPresentSelector_contextInfo( &self, @@ -653,51 +772,64 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(presentError:)] pub unsafe fn presentError(&self, error: &NSError) -> bool; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other willPresentError:)] pub unsafe fn willPresentError(&self, error: &NSError) -> Id; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(willNotPresentError:)] pub unsafe fn willNotPresentError(&self, error: &NSError); + #[cfg(not(any(target_os = "ios")))] #[method(makeWindowControllers)] pub unsafe fn makeWindowControllers(&self); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowNibName)] pub unsafe fn windowNibName(&self) -> Option>; #[cfg(feature = "AppKit_NSWindowController")] + #[cfg(not(any(target_os = "ios")))] #[method(windowControllerWillLoadNib:)] pub unsafe fn windowControllerWillLoadNib(&self, window_controller: &NSWindowController); #[cfg(feature = "AppKit_NSWindowController")] + #[cfg(not(any(target_os = "ios")))] #[method(windowControllerDidLoadNib:)] pub unsafe fn windowControllerDidLoadNib(&self, window_controller: &NSWindowController); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(setWindow:)] pub unsafe fn setWindow(&self, window: Option<&NSWindow>); #[cfg(feature = "AppKit_NSWindowController")] + #[cfg(not(any(target_os = "ios")))] #[method(addWindowController:)] pub unsafe fn addWindowController(&self, window_controller: &NSWindowController); #[cfg(feature = "AppKit_NSWindowController")] + #[cfg(not(any(target_os = "ios")))] #[method(removeWindowController:)] pub unsafe fn removeWindowController(&self, window_controller: &NSWindowController); + #[cfg(not(any(target_os = "ios")))] #[method(showWindows)] pub unsafe fn showWindows(&self); #[cfg(all(feature = "AppKit_NSWindowController", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowControllers)] pub unsafe fn windowControllers(&self) -> Id>; #[cfg(feature = "AppKit_NSWindowController")] + #[cfg(not(any(target_os = "ios")))] #[method(shouldCloseWindowController:delegate:shouldCloseSelector:contextInfo:)] pub unsafe fn shouldCloseWindowController_delegate_shouldCloseSelector_contextInfo( &self, @@ -708,30 +840,37 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other displayName)] pub unsafe fn displayName(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultDraftName)] pub unsafe fn defaultDraftName(&self) -> Id; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowForSheet)] pub unsafe fn windowForSheet(&self) -> Option>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other readableTypes)] pub unsafe fn readableTypes() -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other writableTypes)] pub unsafe fn writableTypes() -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(isNativeType:)] pub unsafe fn isNativeType(r#type: &NSString) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other writableTypesForSaveOperation:)] pub unsafe fn writableTypesForSaveOperation( &self, @@ -739,6 +878,7 @@ extern_methods!( ) -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileNameExtensionForType:saveOperation:)] pub unsafe fn fileNameExtensionForType_saveOperation( &self, @@ -746,30 +886,36 @@ extern_methods!( save_operation: NSSaveOperationType, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(validateUserInterfaceItem:)] pub unsafe fn validateUserInterfaceItem( &self, item: &ProtocolObject, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(usesUbiquitousStorage)] pub unsafe fn usesUbiquitousStorage() -> bool; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other presentedItemURL)] pub unsafe fn presentedItemURL(&self) -> Option>; #[cfg(feature = "Foundation_NSSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other observedPresentedItemUbiquityAttributes)] pub unsafe fn observedPresentedItemUbiquityAttributes(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(relinquishPresentedItemToReader:)] pub unsafe fn relinquishPresentedItemToReader( &self, reader: &Block<(*mut Block<(), ()>,), ()>, ); + #[cfg(not(any(target_os = "ios")))] #[method(relinquishPresentedItemToWriter:)] pub unsafe fn relinquishPresentedItemToWriter( &self, @@ -777,6 +923,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(savePresentedItemChangesWithCompletionHandler:)] pub unsafe fn savePresentedItemChangesWithCompletionHandler( &self, @@ -784,6 +931,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(accommodatePresentedItemDeletionWithCompletionHandler:)] pub unsafe fn accommodatePresentedItemDeletionWithCompletionHandler( &self, @@ -791,9 +939,11 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method(presentedItemDidMoveToURL:)] pub unsafe fn presentedItemDidMoveToURL(&self, new_url: &NSURL); + #[cfg(not(any(target_os = "ios")))] #[method(presentedItemDidChange)] pub unsafe fn presentedItemDidChange(&self); @@ -805,14 +955,17 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSFileVersion")] + #[cfg(not(any(target_os = "ios")))] #[method(presentedItemDidGainVersion:)] pub unsafe fn presentedItemDidGainVersion(&self, version: &NSFileVersion); #[cfg(feature = "Foundation_NSFileVersion")] + #[cfg(not(any(target_os = "ios")))] #[method(presentedItemDidLoseVersion:)] pub unsafe fn presentedItemDidLoseVersion(&self, version: &NSFileVersion); #[cfg(feature = "Foundation_NSFileVersion")] + #[cfg(not(any(target_os = "ios")))] #[method(presentedItemDidResolveConflictVersion:)] pub unsafe fn presentedItemDidResolveConflictVersion(&self, version: &NSFileVersion); } @@ -828,6 +981,7 @@ extern_methods!( feature = "Foundation_NSURL" ))] #[deprecated = "Use -saveToURL:ofType:forSaveOperation:completionHandler: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(saveToURL:ofType:forSaveOperation:error:_)] pub unsafe fn saveToURL_ofType_forSaveOperation_error( &self, @@ -838,11 +992,13 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataRepresentationOfType:)] pub unsafe fn dataRepresentationOfType(&self, r#type: &NSString) -> Option>; #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileAttributesToWriteToFile:ofType:saveOperation:)] pub unsafe fn fileAttributesToWriteToFile_ofType_saveOperation( &self, @@ -853,11 +1009,13 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileName)] pub unsafe fn fileName(&self) -> Option>; #[cfg(all(feature = "Foundation_NSFileWrapper", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileWrapperRepresentationOfType:)] pub unsafe fn fileWrapperRepresentationOfType( &self, @@ -866,6 +1024,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfFile:ofType:)] pub unsafe fn initWithContentsOfFile_ofType( this: Option>, @@ -875,6 +1034,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURL"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:ofType:)] pub unsafe fn initWithContentsOfURL_ofType( this: Option>, @@ -884,6 +1044,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(loadDataRepresentation:ofType:)] pub unsafe fn loadDataRepresentation_ofType( &self, @@ -893,6 +1054,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSFileWrapper", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(loadFileWrapperRepresentation:ofType:)] pub unsafe fn loadFileWrapperRepresentation_ofType( &self, @@ -901,21 +1063,25 @@ extern_methods!( ) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(printShowingPrintPanel:)] pub unsafe fn printShowingPrintPanel(&self, flag: bool); #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(readFromFile:ofType:)] pub unsafe fn readFromFile_ofType(&self, file_name: &NSString, r#type: &NSString) -> bool; #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURL"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(readFromURL:ofType:)] pub unsafe fn readFromURL_ofType(&self, url: &NSURL, r#type: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(revertToSavedFromFile:ofType:)] pub unsafe fn revertToSavedFromFile_ofType( &self, @@ -925,17 +1091,20 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURL"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(revertToSavedFromURL:ofType:)] pub unsafe fn revertToSavedFromURL_ofType(&self, url: &NSURL, r#type: &NSString) -> bool; #[cfg(feature = "AppKit_NSPrintInfo")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(runModalPageLayoutWithPrintInfo:)] pub unsafe fn runModalPageLayoutWithPrintInfo(&self, print_info: &NSPrintInfo) -> NSInteger; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(saveToFile:saveOperation:delegate:didSaveSelector:contextInfo:)] pub unsafe fn saveToFile_saveOperation_delegate_didSaveSelector_contextInfo( &self, @@ -948,16 +1117,19 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setFileName:)] pub unsafe fn setFileName(&self, file_name: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(writeToFile:ofType:)] pub unsafe fn writeToFile_ofType(&self, file_name: &NSString, r#type: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(writeToFile:ofType:originalFile:saveOperation:)] pub unsafe fn writeToFile_ofType_originalFile_saveOperation( &self, @@ -969,11 +1141,13 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURL"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(writeToURL:ofType:)] pub unsafe fn writeToURL_ofType(&self, url: &NSURL, r#type: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(writeWithBackupToFile:ofType:saveOperation:)] pub unsafe fn writeWithBackupToFile_ofType_saveOperation( &self, diff --git a/AppKit/NSDocumentController.rs b/AppKit/NSDocumentController.rs index e1a5ceeb1..1398f3cb7 100644 --- a/AppKit/NSDocumentController.rs +++ b/AppKit/NSDocumentController.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSDocumentController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSDocumentController; #[cfg(feature = "AppKit_NSDocumentController")] @@ -31,13 +32,16 @@ unsafe impl NSUserInterfaceValidations for NSDocumentController {} extern_methods!( #[cfg(feature = "AppKit_NSDocumentController")] unsafe impl NSDocumentController { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedDocumentController)] pub unsafe fn sharedDocumentController() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, @@ -45,37 +49,46 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "AppKit_NSDocument", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other documents)] pub unsafe fn documents(&self) -> Id>; #[cfg(feature = "AppKit_NSDocument")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentDocument)] pub unsafe fn currentDocument(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentDirectory)] pub unsafe fn currentDirectory(&self) -> Option>; #[cfg(all(feature = "AppKit_NSDocument", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other documentForURL:)] pub unsafe fn documentForURL(&self, url: &NSURL) -> Option>; #[cfg(all(feature = "AppKit_NSDocument", feature = "AppKit_NSWindow"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other documentForWindow:)] pub unsafe fn documentForWindow(&self, window: &NSWindow) -> Option>; #[cfg(feature = "AppKit_NSDocument")] + #[cfg(not(any(target_os = "ios")))] #[method(addDocument:)] pub unsafe fn addDocument(&self, document: &NSDocument); #[cfg(feature = "AppKit_NSDocument")] + #[cfg(not(any(target_os = "ios")))] #[method(removeDocument:)] pub unsafe fn removeDocument(&self, document: &NSDocument); + #[cfg(not(any(target_os = "ios")))] #[method(newDocument:)] pub unsafe fn newDocument(&self, sender: Option<&Object>); #[cfg(all(feature = "AppKit_NSDocument", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other openUntitledDocumentAndDisplay:error:_)] pub unsafe fn openUntitledDocumentAndDisplay_error( &self, @@ -87,16 +100,19 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeUntitledDocumentOfType:error:_)] pub unsafe fn makeUntitledDocumentOfType_error( &self, type_name: &NSString, ) -> Result, Id>; + #[cfg(not(any(target_os = "ios")))] #[method(openDocument:)] pub unsafe fn openDocument(&self, sender: Option<&Object>); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URLsFromRunningOpenPanel)] pub unsafe fn URLsFromRunningOpenPanel(&self) -> Option>>; @@ -105,6 +121,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method(runModalOpenPanel:forTypes:)] pub unsafe fn runModalOpenPanel_forTypes( &self, @@ -113,6 +130,7 @@ extern_methods!( ) -> NSInteger; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method(beginOpenPanelWithCompletionHandler:)] pub unsafe fn beginOpenPanelWithCompletionHandler( &self, @@ -124,6 +142,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method(beginOpenPanel:forTypes:completionHandler:)] pub unsafe fn beginOpenPanel_forTypes_completionHandler( &self, @@ -137,6 +156,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(openDocumentWithContentsOfURL:display:completionHandler:)] pub unsafe fn openDocumentWithContentsOfURL_display_completionHandler( &self, @@ -151,6 +171,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeDocumentWithContentsOfURL:ofType:error:_)] pub unsafe fn makeDocumentWithContentsOfURL_ofType_error( &self, @@ -163,6 +184,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(reopenDocumentForURL:withContentsOfURL:display:completionHandler:)] pub unsafe fn reopenDocumentForURL_withContentsOfURL_display_completionHandler( &self, @@ -178,6 +200,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeDocumentForURL:withContentsOfURL:ofType:error:_)] pub unsafe fn makeDocumentForURL_withContentsOfURL_ofType_error( &self, @@ -186,19 +209,24 @@ extern_methods!( type_name: &NSString, ) -> Result, Id>; + #[cfg(not(any(target_os = "ios")))] #[method(autosavingDelay)] pub unsafe fn autosavingDelay(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(setAutosavingDelay:)] pub unsafe fn setAutosavingDelay(&self, autosaving_delay: NSTimeInterval); + #[cfg(not(any(target_os = "ios")))] #[method(saveAllDocuments:)] pub unsafe fn saveAllDocuments(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(hasEditedDocuments)] pub unsafe fn hasEditedDocuments(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(reviewUnsavedDocumentsWithAlertTitle:cancellable:delegate:didReviewAllSelector:contextInfo:)] pub unsafe fn reviewUnsavedDocumentsWithAlertTitle_cancellable_delegate_didReviewAllSelector_contextInfo( &self, @@ -209,6 +237,7 @@ extern_methods!( context_info: *mut c_void, ); + #[cfg(not(any(target_os = "ios")))] #[method(closeAllDocumentsWithDelegate:didCloseAllSelector:contextInfo:)] pub unsafe fn closeAllDocumentsWithDelegate_didCloseAllSelector_contextInfo( &self, @@ -223,6 +252,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other duplicateDocumentWithContentsOfURL:copying:displayName:error:_)] pub unsafe fn duplicateDocumentWithContentsOfURL_copying_displayName_error( &self, @@ -231,14 +261,17 @@ extern_methods!( display_name_or_nil: Option<&NSString>, ) -> Result, Id>; + #[cfg(not(any(target_os = "ios")))] #[method(allowsAutomaticShareMenu)] pub unsafe fn allowsAutomaticShareMenu(&self) -> bool; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other standardShareMenuItem)] pub unsafe fn standardShareMenuItem(&self) -> Id; #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "ios")))] #[method(presentError:modalForWindow:delegate:didPresentSelector:contextInfo:)] pub unsafe fn presentError_modalForWindow_delegate_didPresentSelector_contextInfo( &self, @@ -250,32 +283,40 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(presentError:)] pub unsafe fn presentError(&self, error: &NSError) -> bool; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other willPresentError:)] pub unsafe fn willPresentError(&self, error: &NSError) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(maximumRecentDocumentCount)] pub unsafe fn maximumRecentDocumentCount(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(clearRecentDocuments:)] pub unsafe fn clearRecentDocuments(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSDocument")] + #[cfg(not(any(target_os = "ios")))] #[method(noteNewRecentDocument:)] pub unsafe fn noteNewRecentDocument(&self, document: &NSDocument); #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method(noteNewRecentDocumentURL:)] pub unsafe fn noteNewRecentDocumentURL(&self, url: &NSURL); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other recentDocumentURLs)] pub unsafe fn recentDocumentURLs(&self) -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultType)] pub unsafe fn defaultType(&self) -> Option>; @@ -284,6 +325,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other typeForContentsOfURL:error:_)] pub unsafe fn typeForContentsOfURL_error( &self, @@ -291,17 +333,21 @@ extern_methods!( ) -> Result, Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other documentClassNames)] pub unsafe fn documentClassNames(&self) -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(documentClassForType:)] pub unsafe fn documentClassForType(&self, type_name: &NSString) -> Option<&'static Class>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other displayNameForType:)] pub unsafe fn displayNameForType(&self, type_name: &NSString) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(validateUserInterfaceItem:)] pub unsafe fn validateUserInterfaceItem( &self, @@ -316,6 +362,7 @@ extern_methods!( unsafe impl NSDocumentController { #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] #[deprecated = "Use -openDocumentWithContentsOfURL:display:completionHandler: instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other openDocumentWithContentsOfURL:display:error:_)] pub unsafe fn openDocumentWithContentsOfURL_display_error( &self, @@ -325,6 +372,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] #[deprecated = "Use -reopenDocumentForURL:withContentsOfURL:display:completionHandler: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(reopenDocumentForURL:withContentsOfURL:error:_)] pub unsafe fn reopenDocumentForURL_withContentsOfURL_error( &self, @@ -334,11 +382,13 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileExtensionsFromType:)] pub unsafe fn fileExtensionsFromType(&self, type_name: &NSString) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other typeFromFileExtension:)] pub unsafe fn typeFromFileExtension( &self, @@ -347,16 +397,19 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other documentForFileName:)] pub unsafe fn documentForFileName(&self, file_name: &NSString) -> Option>; #[cfg(feature = "Foundation_NSArray")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileNamesFromRunningOpenPanel)] pub unsafe fn fileNamesFromRunningOpenPanel(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeDocumentWithContentsOfFile:ofType:)] pub unsafe fn makeDocumentWithContentsOfFile_ofType( &self, @@ -366,6 +419,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURL"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeDocumentWithContentsOfURL:ofType:)] pub unsafe fn makeDocumentWithContentsOfURL_ofType( &self, @@ -375,11 +429,13 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeUntitledDocumentOfType:)] pub unsafe fn makeUntitledDocumentOfType(&self, r#type: &NSString) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other openDocumentWithContentsOfFile:display:)] pub unsafe fn openDocumentWithContentsOfFile_display( &self, @@ -389,6 +445,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSURL")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other openDocumentWithContentsOfURL:display:)] pub unsafe fn openDocumentWithContentsOfURL_display( &self, @@ -398,6 +455,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other openUntitledDocumentOfType:display:)] pub unsafe fn openUntitledDocumentOfType_display( &self, @@ -406,10 +464,12 @@ extern_methods!( ) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setShouldCreateUI:)] pub unsafe fn setShouldCreateUI(&self, flag: bool); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(shouldCreateUI)] pub unsafe fn shouldCreateUI(&self) -> bool; } diff --git a/AppKit/NSDocumentScripting.rs b/AppKit/NSDocumentScripting.rs index fd152b875..8d56b7520 100644 --- a/AppKit/NSDocumentScripting.rs +++ b/AppKit/NSDocumentScripting.rs @@ -10,14 +10,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSDocument")] unsafe impl NSDocument { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other lastComponentOfFileName)] pub unsafe fn lastComponentOfFileName(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setLastComponentOfFileName:)] pub unsafe fn setLastComponentOfFileName(&self, last_component_of_file_name: &NSString); #[cfg(feature = "Foundation_NSScriptCommand")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other handleSaveScriptCommand:)] pub unsafe fn handleSaveScriptCommand( &self, @@ -25,6 +28,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSCloseCommand")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other handleCloseScriptCommand:)] pub unsafe fn handleCloseScriptCommand( &self, @@ -32,6 +36,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSScriptCommand")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other handlePrintScriptCommand:)] pub unsafe fn handlePrintScriptCommand( &self, @@ -39,6 +44,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSScriptObjectSpecifier")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other objectSpecifier)] pub unsafe fn objectSpecifier(&self) -> Id; } diff --git a/AppKit/NSDragging.rs b/AppKit/NSDragging.rs index 69dd715cd..31290f6b9 100644 --- a/AppKit/NSDragging.rs +++ b/AppKit/NSDragging.rs @@ -7,88 +7,125 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSDragOperation { + #[cfg(not(any(target_os = "ios")))] NSDragOperationNone = 0, + #[cfg(not(any(target_os = "ios")))] NSDragOperationCopy = 1, + #[cfg(not(any(target_os = "ios")))] NSDragOperationLink = 2, + #[cfg(not(any(target_os = "ios")))] NSDragOperationGeneric = 4, + #[cfg(not(any(target_os = "ios")))] NSDragOperationPrivate = 8, + #[cfg(not(any(target_os = "ios")))] NSDragOperationMove = 16, + #[cfg(not(any(target_os = "ios")))] NSDragOperationDelete = 32, + #[cfg(not(any(target_os = "ios")))] NSDragOperationEvery = NSUIntegerMax as _, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSDragOperationAll_Obsolete = 15, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSDragOperationAll = NSDragOperationAll_Obsolete, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSDraggingFormation { + #[cfg(not(any(target_os = "ios")))] NSDraggingFormationDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSDraggingFormationNone = 1, + #[cfg(not(any(target_os = "ios")))] NSDraggingFormationPile = 2, + #[cfg(not(any(target_os = "ios")))] NSDraggingFormationList = 3, + #[cfg(not(any(target_os = "ios")))] NSDraggingFormationStack = 4, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSDraggingContext { + #[cfg(not(any(target_os = "ios")))] NSDraggingContextOutsideApplication = 0, + #[cfg(not(any(target_os = "ios")))] NSDraggingContextWithinApplication = 1, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSDraggingItemEnumerationOptions { + #[cfg(not(any(target_os = "ios")))] NSDraggingItemEnumerationConcurrent = NSEnumerationConcurrent, + #[cfg(not(any(target_os = "ios")))] NSDraggingItemEnumerationClearNonenumeratedImages = 1 << 16, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSpringLoadingHighlight { + #[cfg(not(any(target_os = "ios")))] NSSpringLoadingHighlightNone = 0, + #[cfg(not(any(target_os = "ios")))] NSSpringLoadingHighlightStandard = 1, + #[cfg(not(any(target_os = "ios")))] NSSpringLoadingHighlightEmphasized = 2, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSDraggingInfo: NSObjectProtocol { #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other draggingDestinationWindow)] unsafe fn draggingDestinationWindow(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(draggingSourceOperationMask)] unsafe fn draggingSourceOperationMask(&self) -> NSDragOperation; + #[cfg(not(any(target_os = "ios")))] #[method(draggingLocation)] unsafe fn draggingLocation(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(draggedImageLocation)] unsafe fn draggedImageLocation(&self) -> NSPoint; #[cfg(feature = "AppKit_NSImage")] #[deprecated = "Use NSDraggingItem objects instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other draggedImage)] unsafe fn draggedImage(&self) -> Option>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other draggingPasteboard)] unsafe fn draggingPasteboard(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other draggingSource)] unsafe fn draggingSource(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(draggingSequenceNumber)] unsafe fn draggingSequenceNumber(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(slideDraggedImageTo:)] unsafe fn slideDraggedImageTo(&self, screen_point: NSPoint); @@ -98,27 +135,34 @@ extern_protocol!( feature = "Foundation_NSURL" ))] #[deprecated = "Use NSFilePromiseReceiver objects instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other namesOfPromisedFilesDroppedAtDestination:)] unsafe fn namesOfPromisedFilesDroppedAtDestination( &self, drop_destination: &NSURL, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(draggingFormation)] unsafe fn draggingFormation(&self) -> NSDraggingFormation; + #[cfg(not(any(target_os = "ios")))] #[method(setDraggingFormation:)] unsafe fn setDraggingFormation(&self, dragging_formation: NSDraggingFormation); + #[cfg(not(any(target_os = "ios")))] #[method(animatesToDestination)] unsafe fn animatesToDestination(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAnimatesToDestination:)] unsafe fn setAnimatesToDestination(&self, animates_to_destination: bool); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfValidItemsForDrop)] unsafe fn numberOfValidItemsForDrop(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfValidItemsForDrop:)] unsafe fn setNumberOfValidItemsForDrop(&self, number_of_valid_items_for_drop: NSInteger); @@ -128,6 +172,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSDictionary" ))] + #[cfg(not(any(target_os = "ios")))] #[method(enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:)] unsafe fn enumerateDraggingItemsWithOptions_forView_classes_searchOptions_usingBlock( &self, @@ -138,9 +183,11 @@ extern_protocol!( block: &Block<(NonNull, NSInteger, NonNull), ()>, ); + #[cfg(not(any(target_os = "ios")))] #[method(springLoadingHighlight)] unsafe fn springLoadingHighlight(&self) -> NSSpringLoadingHighlight; + #[cfg(not(any(target_os = "ios")))] #[method(resetSpringLoading)] unsafe fn resetSpringLoading(&self); } @@ -149,7 +196,9 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSDraggingDestination: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(draggingEntered:)] unsafe fn draggingEntered( @@ -157,6 +206,7 @@ extern_protocol!( sender: &ProtocolObject, ) -> NSDragOperation; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(draggingUpdated:)] unsafe fn draggingUpdated( @@ -164,10 +214,12 @@ extern_protocol!( sender: &ProtocolObject, ) -> NSDragOperation; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(draggingExited:)] unsafe fn draggingExited(&self, sender: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(prepareForDragOperation:)] unsafe fn prepareForDragOperation( @@ -175,22 +227,27 @@ extern_protocol!( sender: &ProtocolObject, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(performDragOperation:)] unsafe fn performDragOperation(&self, sender: &ProtocolObject) -> bool; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(concludeDragOperation:)] unsafe fn concludeDragOperation(&self, sender: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(draggingEnded:)] unsafe fn draggingEnded(&self, sender: &ProtocolObject); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(wantsPeriodicDraggingUpdates)] unsafe fn wantsPeriodicDraggingUpdates(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(updateDraggingItemsForDrag:)] unsafe fn updateDraggingItemsForDrag( @@ -203,8 +260,10 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSDraggingSource: NSObjectProtocol { #[cfg(feature = "AppKit_NSDraggingSession")] + #[cfg(not(any(target_os = "ios")))] #[method(draggingSession:sourceOperationMaskForDraggingContext:)] unsafe fn draggingSession_sourceOperationMaskForDraggingContext( &self, @@ -213,6 +272,7 @@ extern_protocol!( ) -> NSDragOperation; #[cfg(feature = "AppKit_NSDraggingSession")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(draggingSession:willBeginAtPoint:)] unsafe fn draggingSession_willBeginAtPoint( @@ -222,6 +282,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSDraggingSession")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(draggingSession:movedToPoint:)] unsafe fn draggingSession_movedToPoint( @@ -231,6 +292,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSDraggingSession")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(draggingSession:endedAtPoint:operation:)] unsafe fn draggingSession_endedAtPoint_operation( @@ -241,6 +303,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSDraggingSession")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(ignoreModifierKeysForDraggingSession:)] unsafe fn ignoreModifierKeysForDraggingSession(&self, session: &NSDraggingSession) -> bool; @@ -251,16 +314,23 @@ extern_protocol!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSpringLoadingOptions { + #[cfg(not(any(target_os = "ios")))] NSSpringLoadingDisabled = 0, + #[cfg(not(any(target_os = "ios")))] NSSpringLoadingEnabled = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSSpringLoadingContinuousActivation = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSSpringLoadingNoHover = 1 << 3, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSSpringLoadingDestination: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[method(springLoadingActivated:draggingInfo:)] unsafe fn springLoadingActivated_draggingInfo( &self, @@ -268,12 +338,14 @@ extern_protocol!( dragging_info: &ProtocolObject, ); + #[cfg(not(any(target_os = "ios")))] #[method(springLoadingHighlightChanged:)] unsafe fn springLoadingHighlightChanged( &self, dragging_info: &ProtocolObject, ); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(springLoadingEntered:)] unsafe fn springLoadingEntered( @@ -281,6 +353,7 @@ extern_protocol!( dragging_info: &ProtocolObject, ) -> NSSpringLoadingOptions; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(springLoadingUpdated:)] unsafe fn springLoadingUpdated( @@ -288,10 +361,12 @@ extern_protocol!( dragging_info: &ProtocolObject, ) -> NSSpringLoadingOptions; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(springLoadingExited:)] unsafe fn springLoadingExited(&self, dragging_info: &ProtocolObject); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(draggingEnded:)] unsafe fn draggingEnded(&self, dragging_info: &ProtocolObject); diff --git a/AppKit/NSDraggingItem.rs b/AppKit/NSDraggingItem.rs index 10c2d3831..a81684f6d 100644 --- a/AppKit/NSDraggingItem.rs +++ b/AppKit/NSDraggingItem.rs @@ -16,6 +16,7 @@ extern_static!(NSDraggingImageComponentLabelKey: &'static NSDraggingImageCompone extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSDraggingImageComponent")] + #[cfg(not(any(target_os = "ios")))] pub struct NSDraggingImageComponent; #[cfg(feature = "AppKit_NSDraggingImageComponent")] @@ -30,35 +31,44 @@ unsafe impl NSObjectProtocol for NSDraggingImageComponent {} extern_methods!( #[cfg(feature = "AppKit_NSDraggingImageComponent")] unsafe impl NSDraggingImageComponent { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other draggingImageComponentWithKey:)] pub unsafe fn draggingImageComponentWithKey( key: &NSDraggingImageComponentKey, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithKey:)] pub unsafe fn initWithKey( this: Option>, key: &NSDraggingImageComponentKey, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other key)] pub unsafe fn key(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setKey:)] pub unsafe fn setKey(&self, key: &NSDraggingImageComponentKey); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contents)] pub unsafe fn contents(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setContents:)] pub unsafe fn setContents(&self, contents: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setFrame:)] pub unsafe fn setFrame(&self, frame: NSRect); } @@ -67,6 +77,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSDraggingItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSDraggingItem; #[cfg(feature = "AppKit_NSDraggingItem")] @@ -81,21 +92,26 @@ unsafe impl NSObjectProtocol for NSDraggingItem {} extern_methods!( #[cfg(feature = "AppKit_NSDraggingItem")] unsafe impl NSDraggingItem { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithPasteboardWriter:)] pub unsafe fn initWithPasteboardWriter( this: Option>, pasteboard_writer: &ProtocolObject, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other item)] pub unsafe fn item(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(draggingFrame)] pub unsafe fn draggingFrame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setDraggingFrame:)] pub unsafe fn setDraggingFrame(&self, dragging_frame: NSRect); @@ -103,6 +119,7 @@ extern_methods!( feature = "AppKit_NSDraggingImageComponent", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(imageComponentsProvider)] pub unsafe fn imageComponentsProvider( &self, @@ -112,6 +129,7 @@ extern_methods!( feature = "AppKit_NSDraggingImageComponent", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setImageComponentsProvider:)] pub unsafe fn setImageComponentsProvider( &self, @@ -120,6 +138,7 @@ extern_methods!( >, ); + #[cfg(not(any(target_os = "ios")))] #[method(setDraggingFrame:contents:)] pub unsafe fn setDraggingFrame_contents(&self, frame: NSRect, contents: Option<&Object>); @@ -127,6 +146,7 @@ extern_methods!( feature = "AppKit_NSDraggingImageComponent", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageComponents)] pub unsafe fn imageComponents(&self) -> Option>>; } diff --git a/AppKit/NSDraggingSession.rs b/AppKit/NSDraggingSession.rs index 4134e76f9..1f926679b 100644 --- a/AppKit/NSDraggingSession.rs +++ b/AppKit/NSDraggingSession.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSDraggingSession")] + #[cfg(not(any(target_os = "ios")))] pub struct NSDraggingSession; #[cfg(feature = "AppKit_NSDraggingSession")] @@ -22,34 +23,43 @@ unsafe impl NSObjectProtocol for NSDraggingSession {} extern_methods!( #[cfg(feature = "AppKit_NSDraggingSession")] unsafe impl NSDraggingSession { + #[cfg(not(any(target_os = "ios")))] #[method(draggingFormation)] pub unsafe fn draggingFormation(&self) -> NSDraggingFormation; + #[cfg(not(any(target_os = "ios")))] #[method(setDraggingFormation:)] pub unsafe fn setDraggingFormation(&self, dragging_formation: NSDraggingFormation); + #[cfg(not(any(target_os = "ios")))] #[method(animatesToStartingPositionsOnCancelOrFail)] pub unsafe fn animatesToStartingPositionsOnCancelOrFail(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAnimatesToStartingPositionsOnCancelOrFail:)] pub unsafe fn setAnimatesToStartingPositionsOnCancelOrFail( &self, animates_to_starting_positions_on_cancel_or_fail: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(draggingLeaderIndex)] pub unsafe fn draggingLeaderIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setDraggingLeaderIndex:)] pub unsafe fn setDraggingLeaderIndex(&self, dragging_leader_index: NSInteger); #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other draggingPasteboard)] pub unsafe fn draggingPasteboard(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(draggingSequenceNumber)] pub unsafe fn draggingSequenceNumber(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(draggingLocation)] pub unsafe fn draggingLocation(&self) -> NSPoint; @@ -59,6 +69,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSDictionary" ))] + #[cfg(not(any(target_os = "ios")))] #[method(enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:)] pub unsafe fn enumerateDraggingItemsWithOptions_forView_classes_searchOptions_usingBlock( &self, diff --git a/AppKit/NSDrawer.rs b/AppKit/NSDrawer.rs index 758c9a23a..9a1234876 100644 --- a/AppKit/NSDrawer.rs +++ b/AppKit/NSDrawer.rs @@ -7,14 +7,19 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSDrawerState { #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] NSDrawerClosedState = 0, #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] NSDrawerOpeningState = 1, #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] NSDrawerOpenState = 2, #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] NSDrawerClosingState = 3, } ); @@ -23,6 +28,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSDrawer")] #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] pub struct NSDrawer; #[cfg(feature = "AppKit_NSDrawer")] @@ -47,6 +53,7 @@ unsafe impl NSObjectProtocol for NSDrawer {} extern_methods!( #[cfg(feature = "AppKit_NSDrawer")] unsafe impl NSDrawer { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentSize:preferredEdge:)] pub unsafe fn initWithContentSize_preferredEdge( this: Option>, @@ -55,84 +62,110 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other parentWindow)] pub unsafe fn parentWindow(&self) -> Option>; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(setParentWindow:)] pub unsafe fn setParentWindow(&self, parent_window: Option<&NSWindow>); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentView)] pub unsafe fn contentView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setContentView:)] pub unsafe fn setContentView(&self, content_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(preferredEdge)] pub unsafe fn preferredEdge(&self) -> NSRectEdge; + #[cfg(not(any(target_os = "ios")))] #[method(setPreferredEdge:)] pub unsafe fn setPreferredEdge(&self, preferred_edge: NSRectEdge); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[method(open)] pub unsafe fn open(&self); + #[cfg(not(any(target_os = "ios")))] #[method(openOnEdge:)] pub unsafe fn openOnEdge(&self, edge: NSRectEdge); + #[cfg(not(any(target_os = "ios")))] #[method(close)] pub unsafe fn close(&self); + #[cfg(not(any(target_os = "ios")))] #[method(open:)] pub unsafe fn open_(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(close:)] pub unsafe fn close_(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(toggle:)] pub unsafe fn toggle(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(state)] pub unsafe fn state(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(edge)] pub unsafe fn edge(&self) -> NSRectEdge; + #[cfg(not(any(target_os = "ios")))] #[method(contentSize)] pub unsafe fn contentSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setContentSize:)] pub unsafe fn setContentSize(&self, content_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(minContentSize)] pub unsafe fn minContentSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setMinContentSize:)] pub unsafe fn setMinContentSize(&self, min_content_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(maxContentSize)] pub unsafe fn maxContentSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxContentSize:)] pub unsafe fn setMaxContentSize(&self, max_content_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(leadingOffset)] pub unsafe fn leadingOffset(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setLeadingOffset:)] pub unsafe fn setLeadingOffset(&self, leading_offset: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(trailingOffset)] pub unsafe fn trailingOffset(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setTrailingOffset:)] pub unsafe fn setTrailingOffset(&self, trailing_offset: CGFloat); } @@ -144,27 +177,32 @@ extern_methods!( unsafe impl NSWindow { #[cfg(all(feature = "AppKit_NSDrawer", feature = "Foundation_NSArray"))] #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other drawers)] pub unsafe fn drawers(&self) -> Option>>; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSDrawerDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSDrawer")] #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(drawerShouldOpen:)] unsafe fn drawerShouldOpen(&self, sender: &NSDrawer) -> bool; #[cfg(feature = "AppKit_NSDrawer")] #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(drawerShouldClose:)] unsafe fn drawerShouldClose(&self, sender: &NSDrawer) -> bool; #[cfg(feature = "AppKit_NSDrawer")] #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(drawerWillResizeContents:toSize:)] unsafe fn drawerWillResizeContents_toSize( @@ -175,24 +213,28 @@ extern_protocol!( #[cfg(feature = "Foundation_NSNotification")] #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(drawerWillOpen:)] unsafe fn drawerWillOpen(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(drawerDidOpen:)] unsafe fn drawerDidOpen(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(drawerWillClose:)] unsafe fn drawerWillClose(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] #[deprecated = "Drawers are deprecated; consider using NSSplitViewController"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(drawerDidClose:)] unsafe fn drawerDidClose(&self, notification: &NSNotification); diff --git a/AppKit/NSEPSImageRep.rs b/AppKit/NSEPSImageRep.rs index 37688cc01..bbb148db0 100644 --- a/AppKit/NSEPSImageRep.rs +++ b/AppKit/NSEPSImageRep.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSEPSImageRep")] + #[cfg(not(any(target_os = "ios")))] pub struct NSEPSImageRep; #[cfg(feature = "AppKit_NSEPSImageRep")] @@ -27,10 +28,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSEPSImageRep")] unsafe impl NSEPSImageRep { #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageRepWithData:)] pub unsafe fn imageRepWithData(eps_data: &NSData) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, @@ -38,13 +41,16 @@ extern_methods!( ) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(prepareGState)] pub unsafe fn prepareGState(&self); #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other EPSRepresentation)] pub unsafe fn EPSRepresentation(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(boundingBox)] pub unsafe fn boundingBox(&self) -> NSRect; } diff --git a/AppKit/NSEvent.rs b/AppKit/NSEvent.rs index 0abdffdca..146fcd7e7 100644 --- a/AppKit/NSEvent.rs +++ b/AppKit/NSEvent.rs @@ -7,40 +7,75 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSEventType { + #[cfg(not(any(target_os = "ios")))] NSEventTypeLeftMouseDown = 1, + #[cfg(not(any(target_os = "ios")))] NSEventTypeLeftMouseUp = 2, + #[cfg(not(any(target_os = "ios")))] NSEventTypeRightMouseDown = 3, + #[cfg(not(any(target_os = "ios")))] NSEventTypeRightMouseUp = 4, + #[cfg(not(any(target_os = "ios")))] NSEventTypeMouseMoved = 5, + #[cfg(not(any(target_os = "ios")))] NSEventTypeLeftMouseDragged = 6, + #[cfg(not(any(target_os = "ios")))] NSEventTypeRightMouseDragged = 7, + #[cfg(not(any(target_os = "ios")))] NSEventTypeMouseEntered = 8, + #[cfg(not(any(target_os = "ios")))] NSEventTypeMouseExited = 9, + #[cfg(not(any(target_os = "ios")))] NSEventTypeKeyDown = 10, + #[cfg(not(any(target_os = "ios")))] NSEventTypeKeyUp = 11, + #[cfg(not(any(target_os = "ios")))] NSEventTypeFlagsChanged = 12, + #[cfg(not(any(target_os = "ios")))] NSEventTypeAppKitDefined = 13, + #[cfg(not(any(target_os = "ios")))] NSEventTypeSystemDefined = 14, + #[cfg(not(any(target_os = "ios")))] NSEventTypeApplicationDefined = 15, + #[cfg(not(any(target_os = "ios")))] NSEventTypePeriodic = 16, + #[cfg(not(any(target_os = "ios")))] NSEventTypeCursorUpdate = 17, + #[cfg(not(any(target_os = "ios")))] NSEventTypeScrollWheel = 22, + #[cfg(not(any(target_os = "ios")))] NSEventTypeTabletPoint = 23, + #[cfg(not(any(target_os = "ios")))] NSEventTypeTabletProximity = 24, + #[cfg(not(any(target_os = "ios")))] NSEventTypeOtherMouseDown = 25, + #[cfg(not(any(target_os = "ios")))] NSEventTypeOtherMouseUp = 26, + #[cfg(not(any(target_os = "ios")))] NSEventTypeOtherMouseDragged = 27, + #[cfg(not(any(target_os = "ios")))] NSEventTypeGesture = 29, + #[cfg(not(any(target_os = "ios")))] NSEventTypeMagnify = 30, + #[cfg(not(any(target_os = "ios")))] NSEventTypeSwipe = 31, + #[cfg(not(any(target_os = "ios")))] NSEventTypeRotate = 18, + #[cfg(not(any(target_os = "ios")))] NSEventTypeBeginGesture = 19, + #[cfg(not(any(target_os = "ios")))] NSEventTypeEndGesture = 20, + #[cfg(not(any(target_os = "ios")))] NSEventTypeSmartMagnify = 32, + #[cfg(not(any(target_os = "ios")))] NSEventTypeQuickLook = 33, + #[cfg(not(any(target_os = "ios")))] NSEventTypePressure = 34, + #[cfg(not(any(target_os = "ios")))] NSEventTypeDirectTouch = 37, + #[cfg(not(any(target_os = "ios")))] NSEventTypeChangeMode = 38, } ); @@ -93,40 +128,75 @@ extern_static!(NSOtherMouseDragged: NSEventType = NSEventTypeOtherMouseDragged); ns_options!( #[underlying(c_ulonglong)] + #[cfg(not(any(target_os = "ios")))] pub enum NSEventMask { + #[cfg(not(any(target_os = "ios")))] NSEventMaskLeftMouseDown = 1 << NSEventTypeLeftMouseDown, + #[cfg(not(any(target_os = "ios")))] NSEventMaskLeftMouseUp = 1 << NSEventTypeLeftMouseUp, + #[cfg(not(any(target_os = "ios")))] NSEventMaskRightMouseDown = 1 << NSEventTypeRightMouseDown, + #[cfg(not(any(target_os = "ios")))] NSEventMaskRightMouseUp = 1 << NSEventTypeRightMouseUp, + #[cfg(not(any(target_os = "ios")))] NSEventMaskMouseMoved = 1 << NSEventTypeMouseMoved, + #[cfg(not(any(target_os = "ios")))] NSEventMaskLeftMouseDragged = 1 << NSEventTypeLeftMouseDragged, + #[cfg(not(any(target_os = "ios")))] NSEventMaskRightMouseDragged = 1 << NSEventTypeRightMouseDragged, + #[cfg(not(any(target_os = "ios")))] NSEventMaskMouseEntered = 1 << NSEventTypeMouseEntered, + #[cfg(not(any(target_os = "ios")))] NSEventMaskMouseExited = 1 << NSEventTypeMouseExited, + #[cfg(not(any(target_os = "ios")))] NSEventMaskKeyDown = 1 << NSEventTypeKeyDown, + #[cfg(not(any(target_os = "ios")))] NSEventMaskKeyUp = 1 << NSEventTypeKeyUp, + #[cfg(not(any(target_os = "ios")))] NSEventMaskFlagsChanged = 1 << NSEventTypeFlagsChanged, + #[cfg(not(any(target_os = "ios")))] NSEventMaskAppKitDefined = 1 << NSEventTypeAppKitDefined, + #[cfg(not(any(target_os = "ios")))] NSEventMaskSystemDefined = 1 << NSEventTypeSystemDefined, + #[cfg(not(any(target_os = "ios")))] NSEventMaskApplicationDefined = 1 << NSEventTypeApplicationDefined, + #[cfg(not(any(target_os = "ios")))] NSEventMaskPeriodic = 1 << NSEventTypePeriodic, + #[cfg(not(any(target_os = "ios")))] NSEventMaskCursorUpdate = 1 << NSEventTypeCursorUpdate, + #[cfg(not(any(target_os = "ios")))] NSEventMaskScrollWheel = 1 << NSEventTypeScrollWheel, + #[cfg(not(any(target_os = "ios")))] NSEventMaskTabletPoint = 1 << NSEventTypeTabletPoint, + #[cfg(not(any(target_os = "ios")))] NSEventMaskTabletProximity = 1 << NSEventTypeTabletProximity, + #[cfg(not(any(target_os = "ios")))] NSEventMaskOtherMouseDown = 1 << NSEventTypeOtherMouseDown, + #[cfg(not(any(target_os = "ios")))] NSEventMaskOtherMouseUp = 1 << NSEventTypeOtherMouseUp, + #[cfg(not(any(target_os = "ios")))] NSEventMaskOtherMouseDragged = 1 << NSEventTypeOtherMouseDragged, + #[cfg(not(any(target_os = "ios")))] NSEventMaskGesture = 1 << NSEventTypeGesture, + #[cfg(not(any(target_os = "ios")))] NSEventMaskMagnify = 1 << NSEventTypeMagnify, + #[cfg(not(any(target_os = "ios")))] NSEventMaskSwipe = 1 << NSEventTypeSwipe, + #[cfg(not(any(target_os = "ios")))] NSEventMaskRotate = 1 << NSEventTypeRotate, + #[cfg(not(any(target_os = "ios")))] NSEventMaskBeginGesture = 1 << NSEventTypeBeginGesture, + #[cfg(not(any(target_os = "ios")))] NSEventMaskEndGesture = 1 << NSEventTypeEndGesture, + #[cfg(not(any(target_os = "ios")))] NSEventMaskSmartMagnify = 1 << NSEventTypeSmartMagnify, + #[cfg(not(any(target_os = "ios")))] NSEventMaskPressure = 1 << NSEventTypePressure, + #[cfg(not(any(target_os = "ios")))] NSEventMaskDirectTouch = 1 << NSEventTypeDirectTouch, + #[cfg(not(any(target_os = "ios")))] NSEventMaskChangeMode = 1 << NSEventTypeChangeMode, + #[cfg(not(any(target_os = "ios")))] NSEventMaskAny = NSUIntegerMax as _, } ); @@ -178,6 +248,7 @@ extern_static!(NSOtherMouseUpMask: NSEventMask = NSEventMaskOtherMouseUp); extern_static!(NSOtherMouseDraggedMask: NSEventMask = NSEventMaskOtherMouseDragged); inline_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSEventMaskFromType(r#type: NSEventType) -> NSEventMask { todo!() } @@ -185,15 +256,25 @@ inline_fn!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSEventModifierFlags { + #[cfg(not(any(target_os = "ios")))] NSEventModifierFlagCapsLock = 1 << 16, + #[cfg(not(any(target_os = "ios")))] NSEventModifierFlagShift = 1 << 17, + #[cfg(not(any(target_os = "ios")))] NSEventModifierFlagControl = 1 << 18, + #[cfg(not(any(target_os = "ios")))] NSEventModifierFlagOption = 1 << 19, + #[cfg(not(any(target_os = "ios")))] NSEventModifierFlagCommand = 1 << 20, + #[cfg(not(any(target_os = "ios")))] NSEventModifierFlagNumericPad = 1 << 21, + #[cfg(not(any(target_os = "ios")))] NSEventModifierFlagHelp = 1 << 22, + #[cfg(not(any(target_os = "ios")))] NSEventModifierFlagFunction = 1 << 23, + #[cfg(not(any(target_os = "ios")))] NSEventModifierFlagDeviceIndependentFlagsMask = 0xffff0000, } ); @@ -221,10 +302,15 @@ extern_static!( ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPointingDeviceType { + #[cfg(not(any(target_os = "ios")))] NSPointingDeviceTypeUnknown = 0, + #[cfg(not(any(target_os = "ios")))] NSPointingDeviceTypePen = 1, + #[cfg(not(any(target_os = "ios")))] NSPointingDeviceTypeCursor = 2, + #[cfg(not(any(target_os = "ios")))] NSPointingDeviceTypeEraser = 3, } ); @@ -239,9 +325,13 @@ extern_static!(NSEraserPointingDevice: NSPointingDeviceType = NSPointingDeviceTy ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSEventButtonMask { + #[cfg(not(any(target_os = "ios")))] NSEventButtonMaskPenTip = 1, + #[cfg(not(any(target_os = "ios")))] NSEventButtonMaskPenLowerSide = 2, + #[cfg(not(any(target_os = "ios")))] NSEventButtonMaskPenUpperSide = 4, } ); @@ -254,46 +344,72 @@ extern_static!(NSPenUpperSideMask: NSEventButtonMask = NSEventButtonMaskPenUpper ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSEventPhase { + #[cfg(not(any(target_os = "ios")))] NSEventPhaseNone = 0, + #[cfg(not(any(target_os = "ios")))] NSEventPhaseBegan = 0x1 << 0, + #[cfg(not(any(target_os = "ios")))] NSEventPhaseStationary = 0x1 << 1, + #[cfg(not(any(target_os = "ios")))] NSEventPhaseChanged = 0x1 << 2, + #[cfg(not(any(target_os = "ios")))] NSEventPhaseEnded = 0x1 << 3, + #[cfg(not(any(target_os = "ios")))] NSEventPhaseCancelled = 0x1 << 4, + #[cfg(not(any(target_os = "ios")))] NSEventPhaseMayBegin = 0x1 << 5, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSEventGestureAxis { + #[cfg(not(any(target_os = "ios")))] NSEventGestureAxisNone = 0, + #[cfg(not(any(target_os = "ios")))] NSEventGestureAxisHorizontal = 1, + #[cfg(not(any(target_os = "ios")))] NSEventGestureAxisVertical = 2, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSEventSwipeTrackingOptions { + #[cfg(not(any(target_os = "ios")))] NSEventSwipeTrackingLockDirection = 0x1 << 0, + #[cfg(not(any(target_os = "ios")))] NSEventSwipeTrackingClampGestureAmount = 0x1 << 1, } ); ns_enum!( #[underlying(c_short)] + #[cfg(not(any(target_os = "ios")))] pub enum NSEventSubtype { + #[cfg(not(any(target_os = "ios")))] NSEventSubtypeWindowExposed = 0, + #[cfg(not(any(target_os = "ios")))] NSEventSubtypeApplicationActivated = 1, + #[cfg(not(any(target_os = "ios")))] NSEventSubtypeApplicationDeactivated = 2, + #[cfg(not(any(target_os = "ios")))] NSEventSubtypeWindowMoved = 4, + #[cfg(not(any(target_os = "ios")))] NSEventSubtypeScreenChanged = 8, + #[cfg(not(any(target_os = "ios")))] NSEventSubtypePowerOff = 1, + #[cfg(not(any(target_os = "ios")))] NSEventSubtypeMouseEvent = 0, + #[cfg(not(any(target_os = "ios")))] NSEventSubtypeTabletPoint = 1, + #[cfg(not(any(target_os = "ios")))] NSEventSubtypeTabletProximity = 2, + #[cfg(not(any(target_os = "ios")))] NSEventSubtypeTouch = 3, } ); @@ -326,13 +442,21 @@ extern_static!(NSTouchEventSubtype: NSEventSubtype = NSEventSubtypeTouch); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPressureBehavior { + #[cfg(not(any(target_os = "ios")))] NSPressureBehaviorUnknown = -1, + #[cfg(not(any(target_os = "ios")))] NSPressureBehaviorPrimaryDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSPressureBehaviorPrimaryClick = 1, + #[cfg(not(any(target_os = "ios")))] NSPressureBehaviorPrimaryGeneric = 2, + #[cfg(not(any(target_os = "ios")))] NSPressureBehaviorPrimaryAccelerator = 3, + #[cfg(not(any(target_os = "ios")))] NSPressureBehaviorPrimaryDeepClick = 5, + #[cfg(not(any(target_os = "ios")))] NSPressureBehaviorPrimaryDeepDrag = 6, } ); @@ -340,6 +464,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] pub struct NSEvent; #[cfg(feature = "AppKit_NSEvent")] @@ -357,175 +482,229 @@ unsafe impl NSObjectProtocol for NSEvent {} extern_methods!( #[cfg(feature = "AppKit_NSEvent")] unsafe impl NSEvent { + #[cfg(not(any(target_os = "ios")))] #[method(type)] pub unsafe fn r#type(&self) -> NSEventType; + #[cfg(not(any(target_os = "ios")))] #[method(modifierFlags)] pub unsafe fn modifierFlags(&self) -> NSEventModifierFlags; + #[cfg(not(any(target_os = "ios")))] #[method(timestamp)] pub unsafe fn timestamp(&self) -> NSTimeInterval; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other window)] pub unsafe fn window(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(windowNumber)] pub unsafe fn windowNumber(&self) -> NSInteger; #[cfg(feature = "AppKit_NSGraphicsContext")] #[deprecated = "This method always returns nil. If you need access to the current drawing context, use [NSGraphicsContext currentContext] inside of a draw operation."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other context)] pub unsafe fn context(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(clickCount)] pub unsafe fn clickCount(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(buttonNumber)] pub unsafe fn buttonNumber(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(eventNumber)] pub unsafe fn eventNumber(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(pressure)] pub unsafe fn pressure(&self) -> c_float; + #[cfg(not(any(target_os = "ios")))] #[method(locationInWindow)] pub unsafe fn locationInWindow(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(deltaX)] pub unsafe fn deltaX(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(deltaY)] pub unsafe fn deltaY(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(deltaZ)] pub unsafe fn deltaZ(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(hasPreciseScrollingDeltas)] pub unsafe fn hasPreciseScrollingDeltas(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(scrollingDeltaX)] pub unsafe fn scrollingDeltaX(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(scrollingDeltaY)] pub unsafe fn scrollingDeltaY(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(momentumPhase)] pub unsafe fn momentumPhase(&self) -> NSEventPhase; + #[cfg(not(any(target_os = "ios")))] #[method(isDirectionInvertedFromDevice)] pub unsafe fn isDirectionInvertedFromDevice(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other characters)] pub unsafe fn characters(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other charactersIgnoringModifiers)] pub unsafe fn charactersIgnoringModifiers(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other charactersByApplyingModifiers:)] pub unsafe fn charactersByApplyingModifiers( &self, modifiers: NSEventModifierFlags, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(isARepeat)] pub unsafe fn isARepeat(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(keyCode)] pub unsafe fn keyCode(&self) -> c_ushort; + #[cfg(not(any(target_os = "ios")))] #[method(trackingNumber)] pub unsafe fn trackingNumber(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(userData)] pub unsafe fn userData(&self) -> *mut c_void; #[cfg(feature = "AppKit_NSTrackingArea")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other trackingArea)] pub unsafe fn trackingArea(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(subtype)] pub unsafe fn subtype(&self) -> NSEventSubtype; + #[cfg(not(any(target_os = "ios")))] #[method(data1)] pub unsafe fn data1(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(data2)] pub unsafe fn data2(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(eventRef)] pub unsafe fn eventRef(&self) -> *mut c_void; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other eventWithEventRef:)] pub unsafe fn eventWithEventRef(event_ref: NonNull) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(isMouseCoalescingEnabled)] pub unsafe fn isMouseCoalescingEnabled() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setMouseCoalescingEnabled:)] pub unsafe fn setMouseCoalescingEnabled(mouse_coalescing_enabled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(magnification)] pub unsafe fn magnification(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(deviceID)] pub unsafe fn deviceID(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(rotation)] pub unsafe fn rotation(&self) -> c_float; + #[cfg(not(any(target_os = "ios")))] #[method(absoluteX)] pub unsafe fn absoluteX(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(absoluteY)] pub unsafe fn absoluteY(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(absoluteZ)] pub unsafe fn absoluteZ(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(buttonMask)] pub unsafe fn buttonMask(&self) -> NSEventButtonMask; + #[cfg(not(any(target_os = "ios")))] #[method(tilt)] pub unsafe fn tilt(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(tangentialPressure)] pub unsafe fn tangentialPressure(&self) -> c_float; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other vendorDefined)] pub unsafe fn vendorDefined(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(vendorID)] pub unsafe fn vendorID(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(tabletID)] pub unsafe fn tabletID(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(pointingDeviceID)] pub unsafe fn pointingDeviceID(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(systemTabletID)] pub unsafe fn systemTabletID(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(vendorPointingDeviceType)] pub unsafe fn vendorPointingDeviceType(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(pointingDeviceSerialNumber)] pub unsafe fn pointingDeviceSerialNumber(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(uniqueID)] pub unsafe fn uniqueID(&self) -> c_ulonglong; + #[cfg(not(any(target_os = "ios")))] #[method(capabilityMask)] pub unsafe fn capabilityMask(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(pointingDeviceType)] pub unsafe fn pointingDeviceType(&self) -> NSPointingDeviceType; + #[cfg(not(any(target_os = "ios")))] #[method(isEnteringProximity)] pub unsafe fn isEnteringProximity(&self) -> bool; @@ -534,6 +713,7 @@ extern_methods!( feature = "AppKit_NSView", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other touchesMatchingPhase:inView:)] pub unsafe fn touchesMatchingPhase_inView( &self, @@ -542,6 +722,7 @@ extern_methods!( ) -> Id>; #[cfg(all(feature = "AppKit_NSTouch", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other allTouches)] pub unsafe fn allTouches(&self) -> Id>; @@ -550,31 +731,40 @@ extern_methods!( feature = "AppKit_NSView", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other touchesForView:)] pub unsafe fn touchesForView(&self, view: &NSView) -> Id>; #[cfg(all(feature = "AppKit_NSTouch", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other coalescedTouchesForTouch:)] pub unsafe fn coalescedTouchesForTouch(&self, touch: &NSTouch) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(phase)] pub unsafe fn phase(&self) -> NSEventPhase; + #[cfg(not(any(target_os = "ios")))] #[method(stage)] pub unsafe fn stage(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(stageTransition)] pub unsafe fn stageTransition(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(associatedEventsMask)] pub unsafe fn associatedEventsMask(&self) -> NSEventMask; + #[cfg(not(any(target_os = "ios")))] #[method(pressureBehavior)] pub unsafe fn pressureBehavior(&self) -> NSPressureBehavior; + #[cfg(not(any(target_os = "ios")))] #[method(isSwipeTrackingFromScrollEventsEnabled)] pub unsafe fn isSwipeTrackingFromScrollEventsEnabled() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(trackSwipeEventWithOptions:dampenAmountThresholdMin:max:usingHandler:)] pub unsafe fn trackSwipeEventWithOptions_dampenAmountThresholdMin_max_usingHandler( &self, @@ -584,16 +774,19 @@ extern_methods!( tracking_handler: &Block<(CGFloat, NSEventPhase, Bool, NonNull), ()>, ); + #[cfg(not(any(target_os = "ios")))] #[method(startPeriodicEventsAfterDelay:withPeriod:)] pub unsafe fn startPeriodicEventsAfterDelay_withPeriod( delay: NSTimeInterval, period: NSTimeInterval, ); + #[cfg(not(any(target_os = "ios")))] #[method(stopPeriodicEvents)] pub unsafe fn stopPeriodicEvents(); #[cfg(feature = "AppKit_NSGraphicsContext")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:)] pub unsafe fn mouseEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_clickCount_pressure( r#type: NSEventType, @@ -608,6 +801,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "AppKit_NSGraphicsContext", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:)] pub unsafe fn keyEventWithType_location_modifierFlags_timestamp_windowNumber_context_characters_charactersIgnoringModifiers_isARepeat_keyCode( r#type: NSEventType, @@ -623,6 +817,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSGraphicsContext")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:)] pub unsafe fn enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData( r#type: NSEventType, @@ -637,6 +832,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSGraphicsContext")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:)] pub unsafe fn otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2( r#type: NSEventType, @@ -650,36 +846,45 @@ extern_methods!( d2: NSInteger, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(mouseLocation)] pub unsafe fn mouseLocation() -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(modifierFlags)] pub unsafe fn modifierFlags_class() -> NSEventModifierFlags; + #[cfg(not(any(target_os = "ios")))] #[method(pressedMouseButtons)] pub unsafe fn pressedMouseButtons() -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(doubleClickInterval)] pub unsafe fn doubleClickInterval() -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(keyRepeatDelay)] pub unsafe fn keyRepeatDelay() -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(keyRepeatInterval)] pub unsafe fn keyRepeatInterval() -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other addGlobalMonitorForEventsMatchingMask:handler:)] pub unsafe fn addGlobalMonitorForEventsMatchingMask_handler( mask: NSEventMask, block: &Block<(NonNull,), ()>, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other addLocalMonitorForEventsMatchingMask:handler:)] pub unsafe fn addLocalMonitorForEventsMatchingMask_handler( mask: NSEventMask, block: &Block<(NonNull,), *mut NSEvent>, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(removeMonitor:)] pub unsafe fn removeMonitor(event_monitor: &Object); } @@ -687,78 +892,151 @@ extern_methods!( extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { + #[cfg(not(any(target_os = "ios")))] NSUpArrowFunctionKey = 0xF700, + #[cfg(not(any(target_os = "ios")))] NSDownArrowFunctionKey = 0xF701, + #[cfg(not(any(target_os = "ios")))] NSLeftArrowFunctionKey = 0xF702, + #[cfg(not(any(target_os = "ios")))] NSRightArrowFunctionKey = 0xF703, + #[cfg(not(any(target_os = "ios")))] NSF1FunctionKey = 0xF704, + #[cfg(not(any(target_os = "ios")))] NSF2FunctionKey = 0xF705, + #[cfg(not(any(target_os = "ios")))] NSF3FunctionKey = 0xF706, + #[cfg(not(any(target_os = "ios")))] NSF4FunctionKey = 0xF707, + #[cfg(not(any(target_os = "ios")))] NSF5FunctionKey = 0xF708, + #[cfg(not(any(target_os = "ios")))] NSF6FunctionKey = 0xF709, + #[cfg(not(any(target_os = "ios")))] NSF7FunctionKey = 0xF70A, + #[cfg(not(any(target_os = "ios")))] NSF8FunctionKey = 0xF70B, + #[cfg(not(any(target_os = "ios")))] NSF9FunctionKey = 0xF70C, + #[cfg(not(any(target_os = "ios")))] NSF10FunctionKey = 0xF70D, + #[cfg(not(any(target_os = "ios")))] NSF11FunctionKey = 0xF70E, + #[cfg(not(any(target_os = "ios")))] NSF12FunctionKey = 0xF70F, + #[cfg(not(any(target_os = "ios")))] NSF13FunctionKey = 0xF710, + #[cfg(not(any(target_os = "ios")))] NSF14FunctionKey = 0xF711, + #[cfg(not(any(target_os = "ios")))] NSF15FunctionKey = 0xF712, + #[cfg(not(any(target_os = "ios")))] NSF16FunctionKey = 0xF713, + #[cfg(not(any(target_os = "ios")))] NSF17FunctionKey = 0xF714, + #[cfg(not(any(target_os = "ios")))] NSF18FunctionKey = 0xF715, + #[cfg(not(any(target_os = "ios")))] NSF19FunctionKey = 0xF716, + #[cfg(not(any(target_os = "ios")))] NSF20FunctionKey = 0xF717, + #[cfg(not(any(target_os = "ios")))] NSF21FunctionKey = 0xF718, + #[cfg(not(any(target_os = "ios")))] NSF22FunctionKey = 0xF719, + #[cfg(not(any(target_os = "ios")))] NSF23FunctionKey = 0xF71A, + #[cfg(not(any(target_os = "ios")))] NSF24FunctionKey = 0xF71B, + #[cfg(not(any(target_os = "ios")))] NSF25FunctionKey = 0xF71C, + #[cfg(not(any(target_os = "ios")))] NSF26FunctionKey = 0xF71D, + #[cfg(not(any(target_os = "ios")))] NSF27FunctionKey = 0xF71E, + #[cfg(not(any(target_os = "ios")))] NSF28FunctionKey = 0xF71F, + #[cfg(not(any(target_os = "ios")))] NSF29FunctionKey = 0xF720, + #[cfg(not(any(target_os = "ios")))] NSF30FunctionKey = 0xF721, + #[cfg(not(any(target_os = "ios")))] NSF31FunctionKey = 0xF722, + #[cfg(not(any(target_os = "ios")))] NSF32FunctionKey = 0xF723, + #[cfg(not(any(target_os = "ios")))] NSF33FunctionKey = 0xF724, + #[cfg(not(any(target_os = "ios")))] NSF34FunctionKey = 0xF725, + #[cfg(not(any(target_os = "ios")))] NSF35FunctionKey = 0xF726, + #[cfg(not(any(target_os = "ios")))] NSInsertFunctionKey = 0xF727, + #[cfg(not(any(target_os = "ios")))] NSDeleteFunctionKey = 0xF728, + #[cfg(not(any(target_os = "ios")))] NSHomeFunctionKey = 0xF729, + #[cfg(not(any(target_os = "ios")))] NSBeginFunctionKey = 0xF72A, + #[cfg(not(any(target_os = "ios")))] NSEndFunctionKey = 0xF72B, + #[cfg(not(any(target_os = "ios")))] NSPageUpFunctionKey = 0xF72C, + #[cfg(not(any(target_os = "ios")))] NSPageDownFunctionKey = 0xF72D, + #[cfg(not(any(target_os = "ios")))] NSPrintScreenFunctionKey = 0xF72E, + #[cfg(not(any(target_os = "ios")))] NSScrollLockFunctionKey = 0xF72F, + #[cfg(not(any(target_os = "ios")))] NSPauseFunctionKey = 0xF730, + #[cfg(not(any(target_os = "ios")))] NSSysReqFunctionKey = 0xF731, + #[cfg(not(any(target_os = "ios")))] NSBreakFunctionKey = 0xF732, + #[cfg(not(any(target_os = "ios")))] NSResetFunctionKey = 0xF733, + #[cfg(not(any(target_os = "ios")))] NSStopFunctionKey = 0xF734, + #[cfg(not(any(target_os = "ios")))] NSMenuFunctionKey = 0xF735, + #[cfg(not(any(target_os = "ios")))] NSUserFunctionKey = 0xF736, + #[cfg(not(any(target_os = "ios")))] NSSystemFunctionKey = 0xF737, + #[cfg(not(any(target_os = "ios")))] NSPrintFunctionKey = 0xF738, + #[cfg(not(any(target_os = "ios")))] NSClearLineFunctionKey = 0xF739, + #[cfg(not(any(target_os = "ios")))] NSClearDisplayFunctionKey = 0xF73A, + #[cfg(not(any(target_os = "ios")))] NSInsertLineFunctionKey = 0xF73B, + #[cfg(not(any(target_os = "ios")))] NSDeleteLineFunctionKey = 0xF73C, + #[cfg(not(any(target_os = "ios")))] NSInsertCharFunctionKey = 0xF73D, + #[cfg(not(any(target_os = "ios")))] NSDeleteCharFunctionKey = 0xF73E, + #[cfg(not(any(target_os = "ios")))] NSPrevFunctionKey = 0xF73F, + #[cfg(not(any(target_os = "ios")))] NSNextFunctionKey = 0xF740, + #[cfg(not(any(target_os = "ios")))] NSSelectFunctionKey = 0xF741, + #[cfg(not(any(target_os = "ios")))] NSExecuteFunctionKey = 0xF742, + #[cfg(not(any(target_os = "ios")))] NSUndoFunctionKey = 0xF743, + #[cfg(not(any(target_os = "ios")))] NSRedoFunctionKey = 0xF744, + #[cfg(not(any(target_os = "ios")))] NSFindFunctionKey = 0xF745, + #[cfg(not(any(target_os = "ios")))] NSHelpFunctionKey = 0xF746, + #[cfg(not(any(target_os = "ios")))] NSModeSwitchFunctionKey = 0xF747, } ); diff --git a/AppKit/NSFilePromiseProvider.rs b/AppKit/NSFilePromiseProvider.rs index 62c7854df..ed9e1b58b 100644 --- a/AppKit/NSFilePromiseProvider.rs +++ b/AppKit/NSFilePromiseProvider.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSFilePromiseProvider")] + #[cfg(not(any(target_os = "ios")))] pub struct NSFilePromiseProvider; #[cfg(feature = "AppKit_NSFilePromiseProvider")] @@ -26,31 +27,38 @@ extern_methods!( #[cfg(feature = "AppKit_NSFilePromiseProvider")] unsafe impl NSFilePromiseProvider { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileType)] pub unsafe fn fileType(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setFileType:)] pub unsafe fn setFileType(&self, file_type: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, user_info: Option<&Object>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFileType:delegate:)] pub unsafe fn initWithFileType_delegate( this: Option>, @@ -58,17 +66,20 @@ extern_methods!( delegate: &ProtocolObject, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSFilePromiseProviderDelegate: NSObjectProtocol { #[cfg(all( feature = "AppKit_NSFilePromiseProvider", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other filePromiseProvider:fileNameForType:)] unsafe fn filePromiseProvider_fileNameForType( &self, @@ -81,6 +92,7 @@ extern_protocol!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(filePromiseProvider:writePromiseToURL:completionHandler:)] unsafe fn filePromiseProvider_writePromiseToURL_completionHandler( &self, @@ -93,6 +105,7 @@ extern_protocol!( feature = "AppKit_NSFilePromiseProvider", feature = "Foundation_NSOperationQueue" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other operationQueueForFilePromiseProvider:)] unsafe fn operationQueueForFilePromiseProvider( diff --git a/AppKit/NSFilePromiseReceiver.rs b/AppKit/NSFilePromiseReceiver.rs index ea554dc57..4651e141f 100644 --- a/AppKit/NSFilePromiseReceiver.rs +++ b/AppKit/NSFilePromiseReceiver.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSFilePromiseReceiver")] + #[cfg(not(any(target_os = "ios")))] pub struct NSFilePromiseReceiver; #[cfg(feature = "AppKit_NSFilePromiseReceiver")] @@ -26,14 +27,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSFilePromiseReceiver")] unsafe impl NSFilePromiseReceiver { #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other readableDraggedTypes)] pub unsafe fn readableDraggedTypes() -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileTypes)] pub unsafe fn fileTypes(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileNames)] pub unsafe fn fileNames(&self) -> Id>; @@ -43,6 +47,7 @@ extern_methods!( feature = "Foundation_NSOperationQueue", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(receivePromisedFilesAtDestination:options:operationQueue:reader:)] pub unsafe fn receivePromisedFilesAtDestination_options_operationQueue_reader( &self, diff --git a/AppKit/NSFileWrapperExtensions.rs b/AppKit/NSFileWrapperExtensions.rs index 33ace4d27..925d68c38 100644 --- a/AppKit/NSFileWrapperExtensions.rs +++ b/AppKit/NSFileWrapperExtensions.rs @@ -10,10 +10,12 @@ extern_methods!( #[cfg(feature = "Foundation_NSFileWrapper")] unsafe impl NSFileWrapper { #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other icon)] pub unsafe fn icon(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setIcon:)] pub unsafe fn setIcon(&self, icon: Option<&NSImage>); } diff --git a/AppKit/NSFont.rs b/AppKit/NSFont.rs index 78f08c94d..71cc4fa89 100644 --- a/AppKit/NSFont.rs +++ b/AppKit/NSFont.rs @@ -10,6 +10,7 @@ extern_static!(NSFontIdentityMatrix: NonNull); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] pub struct NSFont; #[cfg(feature = "AppKit_NSFont")] @@ -31,6 +32,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSFont")] unsafe impl NSFont { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontWithName:size:)] pub unsafe fn fontWithName_size( font_name: &NSString, @@ -38,6 +40,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontWithName:matrix:)] pub unsafe fn fontWithName_matrix( font_name: &NSString, @@ -45,6 +48,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSFontDescriptor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontWithDescriptor:size:)] pub unsafe fn fontWithDescriptor_size( font_descriptor: &NSFontDescriptor, @@ -55,66 +59,84 @@ extern_methods!( feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSAffineTransform" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontWithDescriptor:textTransform:)] pub unsafe fn fontWithDescriptor_textTransform( font_descriptor: &NSFontDescriptor, text_transform: Option<&NSAffineTransform>, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other userFontOfSize:)] pub unsafe fn userFontOfSize(font_size: CGFloat) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other userFixedPitchFontOfSize:)] pub unsafe fn userFixedPitchFontOfSize(font_size: CGFloat) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setUserFont:)] pub unsafe fn setUserFont(font: Option<&NSFont>); + #[cfg(not(any(target_os = "ios")))] #[method(setUserFixedPitchFont:)] pub unsafe fn setUserFixedPitchFont(font: Option<&NSFont>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemFontOfSize:)] pub unsafe fn systemFontOfSize(font_size: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other boldSystemFontOfSize:)] pub unsafe fn boldSystemFontOfSize(font_size: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelFontOfSize:)] pub unsafe fn labelFontOfSize(font_size: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleBarFontOfSize:)] pub unsafe fn titleBarFontOfSize(font_size: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuFontOfSize:)] pub unsafe fn menuFontOfSize(font_size: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuBarFontOfSize:)] pub unsafe fn menuBarFontOfSize(font_size: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other messageFontOfSize:)] pub unsafe fn messageFontOfSize(font_size: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other paletteFontOfSize:)] pub unsafe fn paletteFontOfSize(font_size: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolTipsFontOfSize:)] pub unsafe fn toolTipsFontOfSize(font_size: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other controlContentFontOfSize:)] pub unsafe fn controlContentFontOfSize(font_size: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemFontOfSize:weight:)] pub unsafe fn systemFontOfSize_weight( font_size: CGFloat, weight: NSFontWeight, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other monospacedDigitSystemFontOfSize:weight:)] pub unsafe fn monospacedDigitSystemFontOfSize_weight( font_size: CGFloat, weight: NSFontWeight, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemFontOfSize:weight:width:)] pub unsafe fn systemFontOfSize_weight_width( font_size: CGFloat, @@ -122,106 +144,137 @@ extern_methods!( width: NSFontWidth, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other monospacedSystemFontOfSize:weight:)] pub unsafe fn monospacedSystemFontOfSize_weight( font_size: CGFloat, weight: NSFontWeight, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontWithSize:)] pub unsafe fn fontWithSize(&self, font_size: CGFloat) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(systemFontSize)] pub unsafe fn systemFontSize() -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(smallSystemFontSize)] pub unsafe fn smallSystemFontSize() -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(labelFontSize)] pub unsafe fn labelFontSize() -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(systemFontSizeForControlSize:)] pub unsafe fn systemFontSizeForControlSize(control_size: NSControlSize) -> CGFloat; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontName)] pub unsafe fn fontName(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(pointSize)] pub unsafe fn pointSize(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(matrix)] pub unsafe fn matrix(&self) -> NonNull; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other familyName)] pub unsafe fn familyName(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other displayName)] pub unsafe fn displayName(&self) -> Option>; #[cfg(feature = "AppKit_NSFontDescriptor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontDescriptor)] pub unsafe fn fontDescriptor(&self) -> Id; #[cfg(feature = "Foundation_NSAffineTransform")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textTransform)] pub unsafe fn textTransform(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfGlyphs)] pub unsafe fn numberOfGlyphs(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(mostCompatibleStringEncoding)] pub unsafe fn mostCompatibleStringEncoding(&self) -> NSStringEncoding; #[cfg(feature = "Foundation_NSCharacterSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other coveredCharacterSet)] pub unsafe fn coveredCharacterSet(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(boundingRectForFont)] pub unsafe fn boundingRectForFont(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(maximumAdvancement)] pub unsafe fn maximumAdvancement(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(ascender)] pub unsafe fn ascender(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(descender)] pub unsafe fn descender(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(leading)] pub unsafe fn leading(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(underlinePosition)] pub unsafe fn underlinePosition(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(underlineThickness)] pub unsafe fn underlineThickness(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(italicAngle)] pub unsafe fn italicAngle(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(capHeight)] pub unsafe fn capHeight(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(xHeight)] pub unsafe fn xHeight(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(isFixedPitch)] pub unsafe fn isFixedPitch(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(set)] pub unsafe fn set(&self); #[cfg(feature = "AppKit_NSGraphicsContext")] + #[cfg(not(any(target_os = "ios")))] #[method(setInContext:)] pub unsafe fn setInContext(&self, graphics_context: &NSGraphicsContext); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other verticalFont)] pub unsafe fn verticalFont(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(isVertical)] pub unsafe fn isVertical(&self) -> bool; } @@ -235,18 +288,26 @@ pub type NSGlyph = c_uint; extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { + #[cfg(not(any(target_os = "ios")))] NSControlGlyph = 0x00FFFFFF, + #[cfg(not(any(target_os = "ios")))] NSNullGlyph = 0x0, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSFontRenderingMode { + #[cfg(not(any(target_os = "ios")))] NSFontDefaultRenderingMode = 0, + #[cfg(not(any(target_os = "ios")))] NSFontAntialiasedRenderingMode = 1, + #[cfg(not(any(target_os = "ios")))] NSFontIntegerAdvancementsRenderingMode = 2, + #[cfg(not(any(target_os = "ios")))] NSFontAntialiasedIntegerAdvancementsRenderingMode = 3, } ); @@ -254,14 +315,17 @@ ns_enum!( ns_enum!( #[underlying(NSUInteger)] #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub enum NSMultibyteGlyphPacking { #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSNativeShortGlyphPacking = 5, } ); extern_fn!( #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSConvertGlyphsToPackedGlyphs( gl_buf: NonNull, count: NSInteger, @@ -275,15 +339,19 @@ extern_methods!( #[cfg(feature = "AppKit_NSFont")] unsafe impl NSFont { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(glyphWithName:)] pub unsafe fn glyphWithName(&self, name: &NSString) -> NSGlyph; + #[cfg(not(any(target_os = "ios")))] #[method(boundingRectForGlyph:)] pub unsafe fn boundingRectForGlyph(&self, glyph: NSGlyph) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(advancementForGlyph:)] pub unsafe fn advancementForGlyph(&self, glyph: NSGlyph) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(getBoundingRects:forGlyphs:count:)] pub unsafe fn getBoundingRects_forGlyphs_count( &self, @@ -292,6 +360,7 @@ extern_methods!( glyph_count: NSUInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(getAdvancements:forGlyphs:count:)] pub unsafe fn getAdvancements_forGlyphs_count( &self, @@ -300,6 +369,7 @@ extern_methods!( glyph_count: NSUInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(getAdvancements:forPackedGlyphs:length:)] pub unsafe fn getAdvancements_forPackedGlyphs_length( &self, @@ -308,18 +378,22 @@ extern_methods!( length: NSUInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printerFont)] pub unsafe fn printerFont(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other screenFont)] pub unsafe fn screenFont(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other screenFontWithRenderingMode:)] pub unsafe fn screenFontWithRenderingMode( &self, rendering_mode: NSFontRenderingMode, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(renderingMode)] pub unsafe fn renderingMode(&self) -> NSFontRenderingMode; } @@ -330,6 +404,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSFont")] unsafe impl NSFont { #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other preferredFontForTextStyle:options:)] pub unsafe fn preferredFontForTextStyle_options( style: &NSFontTextStyle, diff --git a/AppKit/NSFontAssetRequest.rs b/AppKit/NSFontAssetRequest.rs index fc7d442f2..092b31cd9 100644 --- a/AppKit/NSFontAssetRequest.rs +++ b/AppKit/NSFontAssetRequest.rs @@ -7,7 +7,9 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSFontAssetRequestOptions { + #[cfg(not(any(target_os = "ios")))] NSFontAssetRequestOptionUsesStandardUI = 1 << 0, } ); @@ -15,6 +17,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSFontAssetRequest")] + #[cfg(not(any(target_os = "ios")))] pub struct NSFontAssetRequest; #[cfg(feature = "AppKit_NSFontAssetRequest")] @@ -32,10 +35,12 @@ unsafe impl NSProgressReporting for NSFontAssetRequest {} extern_methods!( #[cfg(feature = "AppKit_NSFontAssetRequest")] unsafe impl NSFontAssetRequest { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFontDescriptors:options:)] pub unsafe fn initWithFontDescriptors_options( this: Option>, @@ -44,14 +49,17 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other downloadedFontDescriptors)] pub unsafe fn downloadedFontDescriptors(&self) -> Id>; #[cfg(feature = "Foundation_NSProgress")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other progress)] pub unsafe fn progress(&self) -> Id; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(downloadFontAssetsWithCompletionHandler:)] pub unsafe fn downloadFontAssetsWithCompletionHandler( &self, diff --git a/AppKit/NSFontCollection.rs b/AppKit/NSFontCollection.rs index 850a214f4..3f27bb74f 100644 --- a/AppKit/NSFontCollection.rs +++ b/AppKit/NSFontCollection.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSFontCollectionVisibility { + #[cfg(not(any(target_os = "ios")))] NSFontCollectionVisibilityProcess = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSFontCollectionVisibilityUser = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSFontCollectionVisibilityComputer = 1 << 2, } ); @@ -35,6 +39,7 @@ typed_extensible_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSFontCollection")] + #[cfg(not(any(target_os = "ios")))] pub struct NSFontCollection; #[cfg(feature = "AppKit_NSFontCollection")] @@ -53,19 +58,23 @@ extern_methods!( #[cfg(feature = "AppKit_NSFontCollection")] unsafe impl NSFontCollection { #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontCollectionWithDescriptors:)] pub unsafe fn fontCollectionWithDescriptors( query_descriptors: &NSArray, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontCollectionWithAllAvailableDescriptors)] pub unsafe fn fontCollectionWithAllAvailableDescriptors() -> Id; #[cfg(feature = "Foundation_NSLocale")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontCollectionWithLocale:)] pub unsafe fn fontCollectionWithLocale(locale: &NSLocale) -> Option>; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(showFontCollection:withName:visibility:error:_)] pub unsafe fn showFontCollection_withName_visibility_error( collection: &NSFontCollection, @@ -74,6 +83,7 @@ extern_methods!( ) -> Result<(), Id>; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(hideFontCollectionWithName:visibility:error:_)] pub unsafe fn hideFontCollectionWithName_visibility_error( name: &NSFontCollectionName, @@ -81,6 +91,7 @@ extern_methods!( ) -> Result<(), Id>; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(renameFontCollectionWithName:visibility:toName:error:_)] pub unsafe fn renameFontCollectionWithName_visibility_toName_error( old_name: &NSFontCollectionName, @@ -89,14 +100,17 @@ extern_methods!( ) -> Result<(), Id>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other allFontCollectionNames)] pub unsafe fn allFontCollectionNames() -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontCollectionWithName:)] pub unsafe fn fontCollectionWithName( name: &NSFontCollectionName, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontCollectionWithName:visibility:)] pub unsafe fn fontCollectionWithName_visibility( name: &NSFontCollectionName, @@ -104,14 +118,17 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other queryDescriptors)] pub unsafe fn queryDescriptors(&self) -> Option>>; #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other exclusionDescriptors)] pub unsafe fn exclusionDescriptors(&self) -> Option>>; #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other matchingDescriptors)] pub unsafe fn matchingDescriptors(&self) -> Option>>; @@ -121,6 +138,7 @@ extern_methods!( feature = "Foundation_NSDictionary", feature = "Foundation_NSNumber" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other matchingDescriptorsWithOptions:)] pub unsafe fn matchingDescriptorsWithOptions( &self, @@ -132,6 +150,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other matchingDescriptorsForFamily:)] pub unsafe fn matchingDescriptorsForFamily( &self, @@ -145,6 +164,7 @@ extern_methods!( feature = "Foundation_NSNumber", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other matchingDescriptorsForFamily:options:)] pub unsafe fn matchingDescriptorsForFamily_options( &self, @@ -157,6 +177,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSMutableFontCollection")] + #[cfg(not(any(target_os = "ios")))] pub struct NSMutableFontCollection; #[cfg(feature = "AppKit_NSMutableFontCollection")] @@ -176,23 +197,28 @@ extern_methods!( #[cfg(feature = "AppKit_NSMutableFontCollection")] unsafe impl NSMutableFontCollection { #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontCollectionWithDescriptors:)] pub unsafe fn fontCollectionWithDescriptors( query_descriptors: &NSArray, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontCollectionWithAllAvailableDescriptors)] pub unsafe fn fontCollectionWithAllAvailableDescriptors() -> Id; #[cfg(feature = "Foundation_NSLocale")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontCollectionWithLocale:)] pub unsafe fn fontCollectionWithLocale(locale: &NSLocale) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontCollectionWithName:)] pub unsafe fn fontCollectionWithName( name: &NSFontCollectionName, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontCollectionWithName:visibility:)] pub unsafe fn fontCollectionWithName_visibility( name: &NSFontCollectionName, @@ -200,10 +226,12 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other queryDescriptors)] pub unsafe fn queryDescriptors(&self) -> Option>>; #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setQueryDescriptors:)] pub unsafe fn setQueryDescriptors( &self, @@ -211,10 +239,12 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other exclusionDescriptors)] pub unsafe fn exclusionDescriptors(&self) -> Option>>; #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setExclusionDescriptors:)] pub unsafe fn setExclusionDescriptors( &self, @@ -222,10 +252,12 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(addQueryForDescriptors:)] pub unsafe fn addQueryForDescriptors(&self, descriptors: &NSArray); #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(removeQueryForDescriptors:)] pub unsafe fn removeQueryForDescriptors(&self, descriptors: &NSArray); } diff --git a/AppKit/NSFontDescriptor.rs b/AppKit/NSFontDescriptor.rs index 6dcaddf70..6e98a39a0 100644 --- a/AppKit/NSFontDescriptor.rs +++ b/AppKit/NSFontDescriptor.rs @@ -9,28 +9,51 @@ pub type NSFontSymbolicTraits = u32; ns_options!( #[underlying(u32)] + #[cfg(not(any(target_os = "ios")))] pub enum NSFontDescriptorSymbolicTraits { + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorTraitItalic = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorTraitBold = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorTraitExpanded = 1 << 5, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorTraitCondensed = 1 << 6, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorTraitMonoSpace = 1 << 10, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorTraitVertical = 1 << 11, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorTraitUIOptimized = 1 << 12, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorTraitTightLeading = 1 << 15, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorTraitLooseLeading = 1 << 16, + #[cfg(not(any(target_os = "ios", target_os = "macos")))] NSFontDescriptorTraitEmphasized = NSFontDescriptorTraitBold, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorClassMask = 0xF0000000, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorClassUnknown = 0 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorClassOldStyleSerifs = 1 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorClassTransitionalSerifs = 2 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorClassModernSerifs = 3 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorClassClarendonSerifs = 4 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorClassSlabSerifs = 5 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorClassFreeformSerifs = 7 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorClassSansSerif = 8 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorClassOrnamentals = 9 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorClassScripts = 10 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontDescriptorClassSymbolic = 12 << 28, } ); @@ -74,6 +97,7 @@ typed_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSFontDescriptor")] + #[cfg(not(any(target_os = "ios")))] pub struct NSFontDescriptor; #[cfg(feature = "AppKit_NSFontDescriptor")] @@ -95,22 +119,28 @@ extern_methods!( #[cfg(feature = "AppKit_NSFontDescriptor")] unsafe impl NSFontDescriptor { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other postscriptName)] pub unsafe fn postscriptName(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(pointSize)] pub unsafe fn pointSize(&self) -> CGFloat; #[cfg(feature = "Foundation_NSAffineTransform")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other matrix)] pub unsafe fn matrix(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(symbolicTraits)] pub unsafe fn symbolicTraits(&self) -> NSFontDescriptorSymbolicTraits; + #[cfg(not(any(target_os = "ios")))] #[method(requiresFontAssetRequest)] pub unsafe fn requiresFontAssetRequest(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other objectForKey:)] pub unsafe fn objectForKey( &self, @@ -118,18 +148,21 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontAttributes)] pub unsafe fn fontAttributes( &self, ) -> Id>; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontDescriptorWithFontAttributes:)] pub unsafe fn fontDescriptorWithFontAttributes( attributes: Option<&NSDictionary>, ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontDescriptorWithName:size:)] pub unsafe fn fontDescriptorWithName_size( font_name: &NSString, @@ -140,6 +173,7 @@ extern_methods!( feature = "Foundation_NSAffineTransform", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontDescriptorWithName:matrix:)] pub unsafe fn fontDescriptorWithName_matrix( font_name: &NSString, @@ -147,6 +181,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFontAttributes:)] pub unsafe fn initWithFontAttributes( this: Option>, @@ -154,6 +189,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other matchingFontDescriptorsWithMandatoryKeys:)] pub unsafe fn matchingFontDescriptorsWithMandatoryKeys( &self, @@ -161,6 +197,7 @@ extern_methods!( ) -> Id>; #[cfg(feature = "Foundation_NSSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other matchingFontDescriptorWithMandatoryKeys:)] pub unsafe fn matchingFontDescriptorWithMandatoryKeys( &self, @@ -168,18 +205,21 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontDescriptorByAddingAttributes:)] pub unsafe fn fontDescriptorByAddingAttributes( &self, attributes: &NSDictionary, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontDescriptorWithSymbolicTraits:)] pub unsafe fn fontDescriptorWithSymbolicTraits( &self, symbolic_traits: NSFontDescriptorSymbolicTraits, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontDescriptorWithSize:)] pub unsafe fn fontDescriptorWithSize( &self, @@ -187,6 +227,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSAffineTransform")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontDescriptorWithMatrix:)] pub unsafe fn fontDescriptorWithMatrix( &self, @@ -194,16 +235,19 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontDescriptorWithFace:)] pub unsafe fn fontDescriptorWithFace(&self, new_face: &NSString) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontDescriptorWithFamily:)] pub unsafe fn fontDescriptorWithFamily( &self, new_family: &NSString, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontDescriptorWithDesign:)] pub unsafe fn fontDescriptorWithDesign( &self, @@ -318,37 +362,59 @@ pub type NSFontFamilyClass = u32; extern_enum!( #[underlying(c_int)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { + #[cfg(not(any(target_os = "ios")))] NSFontUnknownClass = 0 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontOldStyleSerifsClass = 1 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontTransitionalSerifsClass = 2 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontModernSerifsClass = 3 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontClarendonSerifsClass = 4 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontSlabSerifsClass = 5 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontFreeformSerifsClass = 7 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontSansSerifClass = 8 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontOrnamentalsClass = 9 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontScriptsClass = 10 << 28, + #[cfg(not(any(target_os = "ios")))] NSFontSymbolicClass = 12 << 28, } ); extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { + #[cfg(not(any(target_os = "ios")))] NSFontFamilyClassMask = 0xF0000000, } ); extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { + #[cfg(not(any(target_os = "ios")))] NSFontItalicTrait = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSFontBoldTrait = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSFontExpandedTrait = 1 << 5, + #[cfg(not(any(target_os = "ios")))] NSFontCondensedTrait = 1 << 6, + #[cfg(not(any(target_os = "ios")))] NSFontMonoSpaceTrait = 1 << 10, + #[cfg(not(any(target_os = "ios")))] NSFontVerticalTrait = 1 << 11, + #[cfg(not(any(target_os = "ios")))] NSFontUIOptimizedTrait = 1 << 12, } ); @@ -360,6 +426,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSFontDescriptor")] unsafe impl NSFontDescriptor { #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other preferredFontDescriptorForTextStyle:options:)] pub unsafe fn preferredFontDescriptorForTextStyle_options( style: &NSFontTextStyle, diff --git a/AppKit/NSFontManager.rs b/AppKit/NSFontManager.rs index fa86ddc2c..a54a01cbb 100644 --- a/AppKit/NSFontManager.rs +++ b/AppKit/NSFontManager.rs @@ -7,39 +7,63 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSFontTraitMask { + #[cfg(not(any(target_os = "ios")))] NSItalicFontMask = 0x00000001, + #[cfg(not(any(target_os = "ios")))] NSBoldFontMask = 0x00000002, + #[cfg(not(any(target_os = "ios")))] NSUnboldFontMask = 0x00000004, + #[cfg(not(any(target_os = "ios")))] NSNonStandardCharacterSetFontMask = 0x00000008, + #[cfg(not(any(target_os = "ios")))] NSNarrowFontMask = 0x00000010, + #[cfg(not(any(target_os = "ios")))] NSExpandedFontMask = 0x00000020, + #[cfg(not(any(target_os = "ios")))] NSCondensedFontMask = 0x00000040, + #[cfg(not(any(target_os = "ios")))] NSSmallCapsFontMask = 0x00000080, + #[cfg(not(any(target_os = "ios")))] NSPosterFontMask = 0x00000100, + #[cfg(not(any(target_os = "ios")))] NSCompressedFontMask = 0x00000200, + #[cfg(not(any(target_os = "ios")))] NSFixedPitchFontMask = 0x00000400, + #[cfg(not(any(target_os = "ios")))] NSUnitalicFontMask = 0x01000000, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSFontCollectionOptions { + #[cfg(not(any(target_os = "ios")))] NSFontCollectionApplicationOnlyMask = 1 << 0, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSFontAction { + #[cfg(not(any(target_os = "ios")))] NSNoFontChangeAction = 0, + #[cfg(not(any(target_os = "ios")))] NSViaPanelFontAction = 1, + #[cfg(not(any(target_os = "ios")))] NSAddTraitFontAction = 2, + #[cfg(not(any(target_os = "ios")))] NSSizeUpFontAction = 3, + #[cfg(not(any(target_os = "ios")))] NSSizeDownFontAction = 4, + #[cfg(not(any(target_os = "ios")))] NSHeavierFontAction = 5, + #[cfg(not(any(target_os = "ios")))] NSLighterFontAction = 6, + #[cfg(not(any(target_os = "ios")))] NSRemoveTraitFontAction = 7, } ); @@ -47,6 +71,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSFontManager")] + #[cfg(not(any(target_os = "ios")))] pub struct NSFontManager; #[cfg(feature = "AppKit_NSFontManager")] @@ -64,39 +89,49 @@ unsafe impl NSObjectProtocol for NSFontManager {} extern_methods!( #[cfg(feature = "AppKit_NSFontManager")] unsafe impl NSFontManager { + #[cfg(not(any(target_os = "ios")))] #[method(setFontPanelFactory:)] pub unsafe fn setFontPanelFactory(factory_id: Option<&Class>); + #[cfg(not(any(target_os = "ios")))] #[method(setFontManagerFactory:)] pub unsafe fn setFontManagerFactory(factory_id: Option<&Class>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedFontManager)] pub unsafe fn sharedFontManager() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(isMultiple)] pub unsafe fn isMultiple(&self) -> bool; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedFont)] pub unsafe fn selectedFont(&self) -> Option>; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedFont:isMultiple:)] pub unsafe fn setSelectedFont_isMultiple(&self, font_obj: &NSFont, flag: bool); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setFontMenu:)] pub unsafe fn setFontMenu(&self, new_menu: &NSMenu); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontMenu:)] pub unsafe fn fontMenu(&self, create: bool) -> Option>; #[cfg(feature = "AppKit_NSFontPanel")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontPanel:)] pub unsafe fn fontPanel(&self, create: bool) -> Option>; #[cfg(all(feature = "AppKit_NSFont", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontWithFamily:traits:weight:size:)] pub unsafe fn fontWithFamily_traits_weight_size( &self, @@ -107,22 +142,27 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(traitsOfFont:)] pub unsafe fn traitsOfFont(&self, font_obj: &NSFont) -> NSFontTraitMask; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(weightOfFont:)] pub unsafe fn weightOfFont(&self, font_obj: &NSFont) -> NSInteger; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other availableFonts)] pub unsafe fn availableFonts(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other availableFontFamilies)] pub unsafe fn availableFontFamilies(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other availableMembersOfFontFamily:)] pub unsafe fn availableMembersOfFontFamily( &self, @@ -130,14 +170,17 @@ extern_methods!( ) -> Option>>; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other convertFont:)] pub unsafe fn convertFont(&self, font_obj: &NSFont) -> Id; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other convertFont:toSize:)] pub unsafe fn convertFont_toSize(&self, font_obj: &NSFont, size: CGFloat) -> Id; #[cfg(all(feature = "AppKit_NSFont", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other convertFont:toFace:)] pub unsafe fn convertFont_toFace( &self, @@ -146,6 +189,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "AppKit_NSFont", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other convertFont:toFamily:)] pub unsafe fn convertFont_toFamily( &self, @@ -154,6 +198,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other convertFont:toHaveTrait:)] pub unsafe fn convertFont_toHaveTrait( &self, @@ -162,6 +207,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other convertFont:toNotHaveTrait:)] pub unsafe fn convertFont_toNotHaveTrait( &self, @@ -170,33 +216,42 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other convertWeight:ofFont:)] pub unsafe fn convertWeight_ofFont(&self, up_flag: bool, font_obj: &NSFont) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(action)] pub unsafe fn action(&self) -> Sel; + #[cfg(not(any(target_os = "ios")))] #[method(setAction:)] pub unsafe fn setAction(&self, action: Sel); #[deprecated = "NSFontManager doesn't have any delegate method. This property should not be used."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[deprecated = "NSFontManager doesn't have any delegate method. This property should not be used."] + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(sendAction)] pub unsafe fn sendAction(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedNameForFamily:face:)] pub unsafe fn localizedNameForFamily_face( &self, @@ -205,6 +260,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedAttributes:isMultiple:)] pub unsafe fn setSelectedAttributes_isMultiple( &self, @@ -213,6 +269,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other convertAttributes:)] pub unsafe fn convertAttributes( &self, @@ -221,6 +278,7 @@ extern_methods!( #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSArray"))] #[deprecated = "Use -[NSFontDescriptor matchingFontDescriptorsWithMandatoryKeys:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other availableFontNamesMatchingFontDescriptor:)] pub unsafe fn availableFontNamesMatchingFontDescriptor( &self, @@ -229,11 +287,13 @@ extern_methods!( #[cfg(feature = "Foundation_NSArray")] #[deprecated = "Use +[NSFontCollection allFontCollectionNames] instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other collectionNames)] pub unsafe fn collectionNames(&self) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated = "Use -[NSFontCollection matchingDescriptors] instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fontDescriptorsInCollection:)] pub unsafe fn fontDescriptorsInCollection( &self, @@ -242,6 +302,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use +[NSFontCollection showFontCollection:withName:visibility:name:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method(addCollection:options:)] pub unsafe fn addCollection_options( &self, @@ -251,11 +312,13 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use +[NSFontCollection hideFontCollectionWithName:visibility:error:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method(removeCollection:)] pub unsafe fn removeCollection(&self, collection_name: &NSString) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated = "Use -[NSMutableFontCollection addQueryForDescriptors:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method(addFontDescriptors:toCollection:)] pub unsafe fn addFontDescriptors_toCollection( &self, @@ -265,6 +328,7 @@ extern_methods!( #[cfg(all(feature = "AppKit_NSFontDescriptor", feature = "Foundation_NSString"))] #[deprecated = "Use -[NSMutableFontCollection removeQueryForDescriptors:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method(removeFontDescriptor:fromCollection:)] pub unsafe fn removeFontDescriptor_fromCollection( &self, @@ -272,15 +336,19 @@ extern_methods!( collection: &NSString, ); + #[cfg(not(any(target_os = "ios")))] #[method(currentFontAction)] pub unsafe fn currentFontAction(&self) -> NSFontAction; + #[cfg(not(any(target_os = "ios")))] #[method(convertFontTraits:)] pub unsafe fn convertFontTraits(&self, traits: NSFontTraitMask) -> NSFontTraitMask; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); } @@ -291,6 +359,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSFontManager")] unsafe impl NSFontManager { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(fontNamed:hasTraits:)] pub unsafe fn fontNamed_hasTraits( &self, @@ -299,27 +368,34 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other availableFontNamesWithTraits:)] pub unsafe fn availableFontNamesWithTraits( &self, some_traits: NSFontTraitMask, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(addFontTrait:)] pub unsafe fn addFontTrait(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(removeFontTrait:)] pub unsafe fn removeFontTrait(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(modifyFontViaPanel:)] pub unsafe fn modifyFontViaPanel(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(modifyFont:)] pub unsafe fn modifyFont(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontFontPanel:)] pub unsafe fn orderFrontFontPanel(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontStylesPanel:)] pub unsafe fn orderFrontStylesPanel(&self, sender: Option<&Object>); } diff --git a/AppKit/NSFontPanel.rs b/AppKit/NSFontPanel.rs index 0790b8f20..44a2b952b 100644 --- a/AppKit/NSFontPanel.rs +++ b/AppKit/NSFontPanel.rs @@ -7,29 +7,44 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSFontPanelModeMask { + #[cfg(not(any(target_os = "ios")))] NSFontPanelModeMaskFace = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSFontPanelModeMaskSize = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSFontPanelModeMaskCollection = 1 << 2, + #[cfg(not(any(target_os = "ios")))] NSFontPanelModeMaskUnderlineEffect = 1 << 8, + #[cfg(not(any(target_os = "ios")))] NSFontPanelModeMaskStrikethroughEffect = 1 << 9, + #[cfg(not(any(target_os = "ios")))] NSFontPanelModeMaskTextColorEffect = 1 << 10, + #[cfg(not(any(target_os = "ios")))] NSFontPanelModeMaskDocumentColorEffect = 1 << 11, + #[cfg(not(any(target_os = "ios")))] NSFontPanelModeMaskShadowEffect = 1 << 12, + #[cfg(not(any(target_os = "ios")))] NSFontPanelModeMaskAllEffects = 0xFFF00, + #[cfg(not(any(target_os = "ios")))] NSFontPanelModesMaskStandardModes = 0xFFFF, + #[cfg(not(any(target_os = "ios")))] NSFontPanelModesMaskAllModes = 0xFFFFFFFF, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSFontChanging: NSObjectProtocol { #[cfg(feature = "AppKit_NSFontManager")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(changeFont:)] unsafe fn changeFont(&self, sender: Option<&NSFontManager>); #[cfg(feature = "AppKit_NSFontPanel")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(validModesForFontPanel:)] unsafe fn validModesForFontPanel(&self, font_panel: &NSFontPanel) -> NSFontPanelModeMask; @@ -41,6 +56,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSFontPanel")] + #[cfg(not(any(target_os = "ios")))] pub struct NSFontPanel; #[cfg(feature = "AppKit_NSFontPanel")] @@ -80,40 +96,51 @@ unsafe impl NSUserInterfaceValidations for NSFontPanel {} extern_methods!( #[cfg(feature = "AppKit_NSFontPanel")] unsafe impl NSFontPanel { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedFontPanel)] pub unsafe fn sharedFontPanel() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(sharedFontPanelExists)] pub unsafe fn sharedFontPanelExists() -> bool; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessory_view: Option<&NSView>); #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(setPanelFont:isMultiple:)] pub unsafe fn setPanelFont_isMultiple(&self, font_obj: &NSFont, flag: bool); #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other panelConvertFont:)] pub unsafe fn panelConvertFont(&self, font_obj: &NSFont) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(worksWhenModal)] pub unsafe fn worksWhenModal(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setWorksWhenModal:)] pub unsafe fn setWorksWhenModal(&self, works_when_modal: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(reloadDefaultFontFamilies)] pub unsafe fn reloadDefaultFontFamilies(&self); } @@ -121,17 +148,29 @@ extern_methods!( extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { + #[cfg(not(any(target_os = "ios")))] NSFontPanelFaceModeMask = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSFontPanelSizeModeMask = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSFontPanelCollectionModeMask = 1 << 2, + #[cfg(not(any(target_os = "ios")))] NSFontPanelUnderlineEffectModeMask = 1 << 8, + #[cfg(not(any(target_os = "ios")))] NSFontPanelStrikethroughEffectModeMask = 1 << 9, + #[cfg(not(any(target_os = "ios")))] NSFontPanelTextColorEffectModeMask = 1 << 10, + #[cfg(not(any(target_os = "ios")))] NSFontPanelDocumentColorEffectModeMask = 1 << 11, + #[cfg(not(any(target_os = "ios")))] NSFontPanelShadowEffectModeMask = 1 << 12, + #[cfg(not(any(target_os = "ios")))] NSFontPanelAllEffectsModeMask = 0xFFF00, + #[cfg(not(any(target_os = "ios")))] NSFontPanelStandardModesMask = 0xFFFF, + #[cfg(not(any(target_os = "ios")))] NSFontPanelAllModesMask = 0xFFFFFFFF, } ); @@ -139,13 +178,21 @@ extern_enum!( extern_enum!( #[underlying(c_uint)] #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { + #[cfg(not(any(target_os = "ios")))] NSFPPreviewButton = 131, + #[cfg(not(any(target_os = "ios")))] NSFPRevertButton = 130, + #[cfg(not(any(target_os = "ios")))] NSFPSetButton = 132, + #[cfg(not(any(target_os = "ios")))] NSFPPreviewField = 128, + #[cfg(not(any(target_os = "ios")))] NSFPSizeField = 129, + #[cfg(not(any(target_os = "ios")))] NSFPSizeTitle = 133, + #[cfg(not(any(target_os = "ios")))] NSFPCurrentField = 134, } ); @@ -154,6 +201,7 @@ extern_methods!( /// Methods declared on superclass `NSWindow` #[cfg(feature = "AppKit_NSFontPanel")] unsafe impl NSFontPanel { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:)] pub unsafe fn initWithContentRect_styleMask_backing_defer( this: Option>, @@ -164,6 +212,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSScreen")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:screen:)] pub unsafe fn initWithContentRect_styleMask_backing_defer_screen( this: Option>, @@ -175,6 +224,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowWithContentViewController:)] pub unsafe fn windowWithContentViewController( content_view_controller: &NSViewController, diff --git a/AppKit/NSForm.rs b/AppKit/NSForm.rs index 548ecfec6..3f05630f3 100644 --- a/AppKit/NSForm.rs +++ b/AppKit/NSForm.rs @@ -9,6 +9,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSForm")] #[deprecated = "Use NSTextField directly instead, and consider NSStackView for layout assistance"] + #[cfg(not(any(target_os = "ios")))] pub struct NSForm; #[cfg(feature = "AppKit_NSForm")] @@ -51,46 +52,59 @@ unsafe impl NSViewToolTipOwner for NSForm {} extern_methods!( #[cfg(feature = "AppKit_NSForm")] unsafe impl NSForm { + #[cfg(not(any(target_os = "ios")))] #[method(indexOfSelectedItem)] pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setEntryWidth:)] pub unsafe fn setEntryWidth(&self, width: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(setInterlineSpacing:)] pub unsafe fn setInterlineSpacing(&self, spacing: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(setBordered:)] pub unsafe fn setBordered(&self, flag: bool); + #[cfg(not(any(target_os = "ios")))] #[method(setBezeled:)] pub unsafe fn setBezeled(&self, flag: bool); + #[cfg(not(any(target_os = "ios")))] #[method(setTitleAlignment:)] pub unsafe fn setTitleAlignment(&self, mode: NSTextAlignment); + #[cfg(not(any(target_os = "ios")))] #[method(setTextAlignment:)] pub unsafe fn setTextAlignment(&self, mode: NSTextAlignment); #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleFont:)] pub unsafe fn setTitleFont(&self, font_obj: &NSFont); #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(setTextFont:)] pub unsafe fn setTextFont(&self, font_obj: &NSFont); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cellAtIndex:)] pub unsafe fn cellAtIndex(&self, index: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(drawCellAtIndex:)] pub unsafe fn drawCellAtIndex(&self, index: NSInteger); #[cfg(all(feature = "AppKit_NSFormCell", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other addEntry:)] pub unsafe fn addEntry(&self, title: &NSString) -> Id; #[cfg(all(feature = "AppKit_NSFormCell", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other insertEntry:atIndex:)] pub unsafe fn insertEntry_atIndex( &self, @@ -98,27 +112,35 @@ extern_methods!( index: NSInteger, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(removeEntryAtIndex:)] pub unsafe fn removeEntryAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(indexOfCellWithTag:)] pub unsafe fn indexOfCellWithTag(&self, tag: NSInteger) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(selectTextAtIndex:)] pub unsafe fn selectTextAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(setFrameSize:)] pub unsafe fn setFrameSize(&self, new_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(setTitleBaseWritingDirection:)] pub unsafe fn setTitleBaseWritingDirection(&self, writing_direction: NSWritingDirection); + #[cfg(not(any(target_os = "ios")))] #[method(setTextBaseWritingDirection:)] pub unsafe fn setTextBaseWritingDirection(&self, writing_direction: NSWritingDirection); + #[cfg(not(any(target_os = "ios")))] #[method(setPreferredTextFieldWidth:)] pub unsafe fn setPreferredTextFieldWidth(&self, preferred_width: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(preferredTextFieldWidth)] pub unsafe fn preferredTextFieldWidth(&self) -> CGFloat; } @@ -128,10 +150,12 @@ extern_methods!( /// Methods declared on superclass `NSMatrix` #[cfg(feature = "AppKit_NSForm")] unsafe impl NSForm { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:mode:prototype:numberOfRows:numberOfColumns:)] pub unsafe fn initWithFrame_mode_prototype_numberOfRows_numberOfColumns( this: Option>, @@ -142,6 +166,7 @@ extern_methods!( cols_wide: NSInteger, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:mode:cellClass:numberOfRows:numberOfColumns:)] pub unsafe fn initWithFrame_mode_cellClass_numberOfRows_numberOfColumns( this: Option>, diff --git a/AppKit/NSFormCell.rs b/AppKit/NSFormCell.rs index 56663dbda..dea2eb471 100644 --- a/AppKit/NSFormCell.rs +++ b/AppKit/NSFormCell.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSFormCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSFormCell; #[cfg(feature = "AppKit_NSFormCell")] @@ -36,6 +37,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSFormCell")] unsafe impl NSFormCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell( this: Option>, @@ -43,81 +45,101 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, image: Option<&NSImage>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(titleWidth:)] pub unsafe fn titleWidth_(&self, size: NSSize) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(titleWidth)] pub unsafe fn titleWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setTitleWidth:)] pub unsafe fn setTitleWidth(&self, title_width: CGFloat); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleFont)] pub unsafe fn titleFont(&self) -> Id; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleFont:)] pub unsafe fn setTitleFont(&self, title_font: &NSFont); + #[cfg(not(any(target_os = "ios")))] #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholder_string: Option<&NSString>); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPlaceholderAttributedString:)] pub unsafe fn setPlaceholderAttributedString( &self, placeholder_attributed_string: Option<&NSAttributedString>, ); + #[cfg(not(any(target_os = "ios")))] #[method(titleAlignment)] pub unsafe fn titleAlignment(&self) -> NSTextAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(setTitleAlignment:)] pub unsafe fn setTitleAlignment(&self, title_alignment: NSTextAlignment); + #[cfg(not(any(target_os = "ios")))] #[method(titleBaseWritingDirection)] pub unsafe fn titleBaseWritingDirection(&self) -> NSWritingDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setTitleBaseWritingDirection:)] pub unsafe fn setTitleBaseWritingDirection( &self, title_base_writing_direction: NSWritingDirection, ); + #[cfg(not(any(target_os = "ios")))] #[method(preferredTextFieldWidth)] pub unsafe fn preferredTextFieldWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setPreferredTextFieldWidth:)] pub unsafe fn setPreferredTextFieldWidth(&self, preferred_text_field_width: CGFloat); } @@ -129,6 +151,7 @@ extern_methods!( unsafe impl NSFormCell { #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, string_with_ampersand: Option<&NSString>); } @@ -139,10 +162,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSFormCell")] unsafe impl NSFormCell { #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributed_title: &NSAttributedString); } diff --git a/AppKit/NSGestureRecognizer.rs b/AppKit/NSGestureRecognizer.rs index beeb067a8..c7155b0e8 100644 --- a/AppKit/NSGestureRecognizer.rs +++ b/AppKit/NSGestureRecognizer.rs @@ -7,13 +7,21 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSGestureRecognizerState { + #[cfg(not(any(target_os = "ios")))] NSGestureRecognizerStatePossible = 0, + #[cfg(not(any(target_os = "ios")))] NSGestureRecognizerStateBegan = 1, + #[cfg(not(any(target_os = "ios")))] NSGestureRecognizerStateChanged = 2, + #[cfg(not(any(target_os = "ios")))] NSGestureRecognizerStateEnded = 3, + #[cfg(not(any(target_os = "ios")))] NSGestureRecognizerStateCancelled = 4, + #[cfg(not(any(target_os = "ios")))] NSGestureRecognizerStateFailed = 5, + #[cfg(not(any(target_os = "ios")))] NSGestureRecognizerStateRecognized = NSGestureRecognizerStateEnded, } ); @@ -21,6 +29,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] pub struct NSGestureRecognizer; #[cfg(feature = "AppKit_NSGestureRecognizer")] @@ -38,6 +47,7 @@ unsafe impl NSObjectProtocol for NSGestureRecognizer {} extern_methods!( #[cfg(feature = "AppKit_NSGestureRecognizer")] unsafe impl NSGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithTarget:action:)] pub unsafe fn initWithTarget_action( this: Option>, @@ -46,102 +56,127 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(action)] pub unsafe fn action(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[cfg(feature = "AppKit_NSPressureConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pressureConfiguration)] pub unsafe fn pressureConfiguration(&self) -> Id; #[cfg(feature = "AppKit_NSPressureConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method(setPressureConfiguration:)] pub unsafe fn setPressureConfiguration( &self, pressure_configuration: &NSPressureConfiguration, ); + #[cfg(not(any(target_os = "ios")))] #[method(delaysPrimaryMouseButtonEvents)] pub unsafe fn delaysPrimaryMouseButtonEvents(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDelaysPrimaryMouseButtonEvents:)] pub unsafe fn setDelaysPrimaryMouseButtonEvents( &self, delays_primary_mouse_button_events: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(delaysSecondaryMouseButtonEvents)] pub unsafe fn delaysSecondaryMouseButtonEvents(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDelaysSecondaryMouseButtonEvents:)] pub unsafe fn setDelaysSecondaryMouseButtonEvents( &self, delays_secondary_mouse_button_events: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(delaysOtherMouseButtonEvents)] pub unsafe fn delaysOtherMouseButtonEvents(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDelaysOtherMouseButtonEvents:)] pub unsafe fn setDelaysOtherMouseButtonEvents( &self, delays_other_mouse_button_events: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(delaysKeyEvents)] pub unsafe fn delaysKeyEvents(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDelaysKeyEvents:)] pub unsafe fn setDelaysKeyEvents(&self, delays_key_events: bool); + #[cfg(not(any(target_os = "ios")))] #[method(delaysMagnificationEvents)] pub unsafe fn delaysMagnificationEvents(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDelaysMagnificationEvents:)] pub unsafe fn setDelaysMagnificationEvents(&self, delays_magnification_events: bool); + #[cfg(not(any(target_os = "ios")))] #[method(delaysRotationEvents)] pub unsafe fn delaysRotationEvents(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDelaysRotationEvents:)] pub unsafe fn setDelaysRotationEvents(&self, delays_rotation_events: bool); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(locationInView:)] pub unsafe fn locationInView(&self, view: Option<&NSView>) -> NSPoint; } @@ -151,17 +186,21 @@ extern_methods!( /// NSTouchBar #[cfg(feature = "AppKit_NSGestureRecognizer")] unsafe impl NSGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method(allowedTouchTypes)] pub unsafe fn allowedTouchTypes(&self) -> NSTouchTypeMask; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowedTouchTypes:)] pub unsafe fn setAllowedTouchTypes(&self, allowed_touch_types: NSTouchTypeMask); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSGestureRecognizerDelegate: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSGestureRecognizer"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(gestureRecognizer:shouldAttemptToRecognizeWithEvent:)] unsafe fn gestureRecognizer_shouldAttemptToRecognizeWithEvent( @@ -171,6 +210,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(gestureRecognizerShouldBegin:)] unsafe fn gestureRecognizerShouldBegin( @@ -179,6 +219,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:)] unsafe fn gestureRecognizer_shouldRecognizeSimultaneouslyWithGestureRecognizer( @@ -188,6 +229,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(gestureRecognizer:shouldRequireFailureOfGestureRecognizer:)] unsafe fn gestureRecognizer_shouldRequireFailureOfGestureRecognizer( @@ -197,6 +239,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:)] unsafe fn gestureRecognizer_shouldBeRequiredToFailByGestureRecognizer( @@ -206,6 +249,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSGestureRecognizer", feature = "AppKit_NSTouch"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(gestureRecognizer:shouldReceiveTouch:)] unsafe fn gestureRecognizer_shouldReceiveTouch( @@ -222,30 +266,36 @@ extern_methods!( /// NSSubclassUse #[cfg(feature = "AppKit_NSGestureRecognizer")] unsafe impl NSGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method(setState:)] pub unsafe fn setState(&self, state: NSGestureRecognizerState); + #[cfg(not(any(target_os = "ios")))] #[method(reset)] pub unsafe fn reset(&self); + #[cfg(not(any(target_os = "ios")))] #[method(canPreventGestureRecognizer:)] pub unsafe fn canPreventGestureRecognizer( &self, prevented_gesture_recognizer: &NSGestureRecognizer, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(canBePreventedByGestureRecognizer:)] pub unsafe fn canBePreventedByGestureRecognizer( &self, preventing_gesture_recognizer: &NSGestureRecognizer, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(shouldRequireFailureOfGestureRecognizer:)] pub unsafe fn shouldRequireFailureOfGestureRecognizer( &self, other_gesture_recognizer: &NSGestureRecognizer, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(shouldBeRequiredToFailByGestureRecognizer:)] pub unsafe fn shouldBeRequiredToFailByGestureRecognizer( &self, @@ -253,82 +303,102 @@ extern_methods!( ) -> bool; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseDown:)] pub unsafe fn mouseDown(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(rightMouseDown:)] pub unsafe fn rightMouseDown(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(otherMouseDown:)] pub unsafe fn otherMouseDown(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseUp:)] pub unsafe fn mouseUp(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(rightMouseUp:)] pub unsafe fn rightMouseUp(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(otherMouseUp:)] pub unsafe fn otherMouseUp(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseDragged:)] pub unsafe fn mouseDragged(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(rightMouseDragged:)] pub unsafe fn rightMouseDragged(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(otherMouseDragged:)] pub unsafe fn otherMouseDragged(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(keyDown:)] pub unsafe fn keyDown(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(keyUp:)] pub unsafe fn keyUp(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(flagsChanged:)] pub unsafe fn flagsChanged(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(tabletPoint:)] pub unsafe fn tabletPoint(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(magnifyWithEvent:)] pub unsafe fn magnifyWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(rotateWithEvent:)] pub unsafe fn rotateWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(pressureChangeWithEvent:)] pub unsafe fn pressureChangeWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(touchesBeganWithEvent:)] pub unsafe fn touchesBeganWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(touchesMovedWithEvent:)] pub unsafe fn touchesMovedWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(touchesEndedWithEvent:)] pub unsafe fn touchesEndedWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(touchesCancelledWithEvent:)] pub unsafe fn touchesCancelledWithEvent(&self, event: &NSEvent); } diff --git a/AppKit/NSGradient.rs b/AppKit/NSGradient.rs index c8848ed67..833e1be7c 100644 --- a/AppKit/NSGradient.rs +++ b/AppKit/NSGradient.rs @@ -7,8 +7,11 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSGradientDrawingOptions { + #[cfg(not(any(target_os = "ios")))] NSGradientDrawsBeforeStartingLocation = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSGradientDrawsAfterEndingLocation = 1 << 1, } ); @@ -16,6 +19,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSGradient")] + #[cfg(not(any(target_os = "ios")))] pub struct NSGradient; #[cfg(feature = "AppKit_NSGradient")] @@ -37,6 +41,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSGradient")] unsafe impl NSGradient { #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithStartingColor:endingColor:)] pub unsafe fn initWithStartingColor_endingColor( this: Option>, @@ -45,6 +50,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "AppKit_NSColor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithColors:)] pub unsafe fn initWithColors( this: Option>, @@ -56,6 +62,7 @@ extern_methods!( feature = "AppKit_NSColorSpace", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithColors:atLocations:colorSpace:)] pub unsafe fn initWithColors_atLocations_colorSpace( this: Option>, @@ -65,9 +72,11 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(drawFromPoint:toPoint:options:)] pub unsafe fn drawFromPoint_toPoint_options( &self, @@ -76,13 +85,16 @@ extern_methods!( options: NSGradientDrawingOptions, ); + #[cfg(not(any(target_os = "ios")))] #[method(drawInRect:angle:)] pub unsafe fn drawInRect_angle(&self, rect: NSRect, angle: CGFloat); #[cfg(feature = "AppKit_NSBezierPath")] + #[cfg(not(any(target_os = "ios")))] #[method(drawInBezierPath:angle:)] pub unsafe fn drawInBezierPath_angle(&self, path: &NSBezierPath, angle: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(drawFromCenter:radius:toCenter:radius:options:)] pub unsafe fn drawFromCenter_radius_toCenter_radius_options( &self, @@ -93,6 +105,7 @@ extern_methods!( options: NSGradientDrawingOptions, ); + #[cfg(not(any(target_os = "ios")))] #[method(drawInRect:relativeCenterPosition:)] pub unsafe fn drawInRect_relativeCenterPosition( &self, @@ -101,6 +114,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSBezierPath")] + #[cfg(not(any(target_os = "ios")))] #[method(drawInBezierPath:relativeCenterPosition:)] pub unsafe fn drawInBezierPath_relativeCenterPosition( &self, @@ -109,13 +123,16 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSColorSpace")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorSpace)] pub unsafe fn colorSpace(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfColorStops)] pub unsafe fn numberOfColorStops(&self) -> NSInteger; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(getColor:location:atIndex:)] pub unsafe fn getColor_location_atIndex( &self, @@ -125,6 +142,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other interpolatedColorAtLocation:)] pub unsafe fn interpolatedColorAtLocation(&self, location: CGFloat) -> Id; } diff --git a/AppKit/NSGraphics.rs b/AppKit/NSGraphics.rs index 99f95ebdd..53936eeb3 100644 --- a/AppKit/NSGraphics.rs +++ b/AppKit/NSGraphics.rs @@ -7,36 +7,66 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSCompositingOperation { + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationClear = 0, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationCopy = 1, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationSourceOver = 2, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationSourceIn = 3, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationSourceOut = 4, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationSourceAtop = 5, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationDestinationOver = 6, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationDestinationIn = 7, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationDestinationOut = 8, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationDestinationAtop = 9, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationXOR = 10, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationPlusDarker = 11, #[deprecated = "Use NSCompositingOperationSourceOver instead"] + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationHighlight = 12, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationPlusLighter = 13, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationMultiply = 14, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationScreen = 15, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationOverlay = 16, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationDarken = 17, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationLighten = 18, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationColorDodge = 19, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationColorBurn = 20, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationSoftLight = 21, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationHardLight = 22, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationDifference = 23, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationExclusion = 24, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationHue = 25, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationSaturation = 26, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationColor = 27, + #[cfg(not(any(target_os = "ios")))] NSCompositingOperationLuminosity = 28, } ); @@ -109,49 +139,71 @@ extern_static!(NSCompositeLuminosity: NSCompositingOperation = NSCompositingOper ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSBackingStoreType { #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSBackingStoreRetained = 0, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSBackingStoreNonretained = 1, + #[cfg(not(any(target_os = "ios")))] NSBackingStoreBuffered = 2, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowOrderingMode { + #[cfg(not(any(target_os = "ios")))] NSWindowAbove = 1, + #[cfg(not(any(target_os = "ios")))] NSWindowBelow = -1, + #[cfg(not(any(target_os = "ios")))] NSWindowOut = 0, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSFocusRingPlacement { + #[cfg(not(any(target_os = "ios")))] NSFocusRingOnly = 0, + #[cfg(not(any(target_os = "ios")))] NSFocusRingBelow = 1, + #[cfg(not(any(target_os = "ios")))] NSFocusRingAbove = 2, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSFocusRingType { + #[cfg(not(any(target_os = "ios")))] NSFocusRingTypeDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSFocusRingTypeNone = 1, + #[cfg(not(any(target_os = "ios")))] NSFocusRingTypeExterior = 2, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSColorRenderingIntent { + #[cfg(not(any(target_os = "ios")))] NSColorRenderingIntentDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSColorRenderingIntentAbsoluteColorimetric = 1, + #[cfg(not(any(target_os = "ios")))] NSColorRenderingIntentRelativeColorimetric = 2, + #[cfg(not(any(target_os = "ios")))] NSColorRenderingIntentPerceptual = 3, + #[cfg(not(any(target_os = "ios")))] NSColorRenderingIntentSaturation = 4, } ); @@ -182,14 +234,19 @@ extern_static!(NSDeviceBlackColorSpace: &'static NSColorSpaceName); ns_enum!( #[underlying(i32)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowDepth { + #[cfg(not(any(target_os = "ios")))] NSWindowDepthTwentyfourBitRGB = 0x208, + #[cfg(not(any(target_os = "ios")))] NSWindowDepthSixtyfourBitRGB = 0x210, + #[cfg(not(any(target_os = "ios")))] NSWindowDepthOnehundredtwentyeightBitRGB = 0x220, } ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSBestDepth( color_space: &NSColorSpaceName, bps: NSInteger, @@ -200,26 +257,32 @@ extern_fn!( ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSPlanarFromDepth(depth: NSWindowDepth) -> Bool; ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSColorSpaceFromDepth(depth: NSWindowDepth) -> *mut NSColorSpaceName; ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSBitsPerSampleFromDepth(depth: NSWindowDepth) -> NSInteger; ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSBitsPerPixelFromDepth(depth: NSWindowDepth) -> NSInteger; ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSNumberOfColorComponents(color_space_name: &NSColorSpaceName) -> NSInteger; ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSAvailableWindowDepths() -> NonNull; ); @@ -233,8 +296,11 @@ extern_static!(NSBlack: CGFloat); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSDisplayGamut { + #[cfg(not(any(target_os = "ios")))] NSDisplayGamutSRGB = 1, + #[cfg(not(any(target_os = "ios")))] NSDisplayGamutP3 = 2, } ); @@ -256,14 +322,17 @@ extern_static!(NSDeviceIsPrinter: &'static NSDeviceDescriptionKey); extern_static!(NSDeviceSize: &'static NSDeviceDescriptionKey); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSRectFill(rect: NSRect); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSRectFillList(rects: NonNull, count: NSInteger); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSRectFillListWithGrays( rects: NonNull, grays: NonNull, @@ -273,6 +342,7 @@ extern_fn!( extern_fn!( #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSRectFillListWithColors( rects: NonNull, colors: NonNull>, @@ -281,10 +351,12 @@ extern_fn!( ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSRectFillUsingOperation(rect: NSRect, op: NSCompositingOperation); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSRectFillListUsingOperation( rects: NonNull, count: NSInteger, @@ -294,6 +366,7 @@ extern_fn!( extern_fn!( #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSRectFillListWithColorsUsingOperation( rects: NonNull, colors: NonNull>, @@ -303,14 +376,17 @@ extern_fn!( ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSFrameRect(rect: NSRect); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSFrameRectWithWidth(rect: NSRect, frame_width: CGFloat); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSFrameRectWithWidthUsingOperation( rect: NSRect, frame_width: CGFloat, @@ -319,14 +395,17 @@ extern_fn!( ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSRectClip(rect: NSRect); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSRectClipList(rects: NonNull, count: NSInteger); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDrawTiledRects( bounds_rect: NSRect, clip_rect: NSRect, @@ -337,43 +416,52 @@ extern_fn!( ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDrawGrayBezel(rect: NSRect, clip_rect: NSRect); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDrawGroove(rect: NSRect, clip_rect: NSRect); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDrawWhiteBezel(rect: NSRect, clip_rect: NSRect); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDrawButton(rect: NSRect, clip_rect: NSRect); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSEraseRect(rect: NSRect); ); extern_fn!( #[cfg(feature = "AppKit_NSColor")] #[deprecated = "Use -[NSBitmapImageRep colorAtX:y:] to interrogate pixel values. If necessary, use -[NSView cacheDisplayInRect:toBitmapImageRep:] to snapshot a view hierarchy into an NSBitmapImageRep."] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSReadPixel(passed_point: NSPoint) -> *mut NSColor; ); extern_fn!( #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSHighlightRect(rect: NSRect); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSBeep(); ); extern_fn!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Doesn't return anything useful since 10.0"] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSGetWindowServerMemory( context: NSInteger, virtual_memory: NonNull, @@ -384,6 +472,7 @@ extern_fn!( extern_fn!( #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDrawColorTiledRects( bounds_rect: NSRect, clip_rect: NSRect, @@ -394,44 +483,55 @@ extern_fn!( ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDrawDarkBezel(rect: NSRect, clip_rect: NSRect); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDrawLightBezel(rect: NSRect, clip_rect: NSRect); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDottedFrameRect(rect: NSRect); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDrawWindowBackground(rect: NSRect); ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSSetFocusRingStyle(placement: NSFocusRingPlacement); ); extern_fn!( #[deprecated = "As of 10.11 it is not generally necessary to take explicit action to achieve visual atomicity. +[NSAnimationContext runAnimationGroup:] and other similar methods can be used when a stronger than normal need for visual atomicity is required. The NSAnimationContext methods do not suffer from the same performance problems as NSDisableScreenUpdates."] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSDisableScreenUpdates(); ); extern_fn!( #[deprecated = "As of 10.11 it is not generally necessary to take explicit action to achieve visual atomicity. +[NSAnimationContext runAnimationGroup:] and other similar methods can be used when a stronger than normal need for visual atomicity is required. The NSAnimationContext methods do not suffer from the same performance problems as NSEnableScreenUpdates."] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSEnableScreenUpdates(); ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAnimationEffect { + #[cfg(not(any(target_os = "ios")))] NSAnimationEffectDisappearingItemDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSAnimationEffectPoof = 10, } ); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSShowAnimationEffect( animation_effect: NSAnimationEffect, center_location: NSPoint, @@ -444,21 +544,25 @@ extern_fn!( extern_fn!( #[deprecated = "Use +[NSWindow windowNumbersWithOptions:] instead"] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSCountWindows(count: NonNull); ); extern_fn!( #[deprecated = "Use +[NSWindow windowNumbersWithOptions:] instead"] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSWindowList(size: NSInteger, list: NonNull); ); extern_fn!( #[deprecated = "Use +[NSWindow windowNumbersWithOptions:] instead"] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSCountWindowsForContext(context: NSInteger, count: NonNull); ); extern_fn!( #[deprecated = "Use +[NSWindow windowNumbersWithOptions:] instead"] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSWindowListForContext( context: NSInteger, size: NSInteger, @@ -468,5 +572,6 @@ extern_fn!( extern_fn!( #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSCopyBits(src_g_state: NSInteger, src_rect: NSRect, dest_point: NSPoint); ); diff --git a/AppKit/NSGraphicsContext.rs b/AppKit/NSGraphicsContext.rs index 2a3526dc4..88120a9c2 100644 --- a/AppKit/NSGraphicsContext.rs +++ b/AppKit/NSGraphicsContext.rs @@ -25,11 +25,17 @@ extern_static!(NSGraphicsContextPDFFormat: &'static NSGraphicsContextRepresentat ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSImageInterpolation { + #[cfg(not(any(target_os = "ios")))] NSImageInterpolationDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSImageInterpolationNone = 1, + #[cfg(not(any(target_os = "ios")))] NSImageInterpolationLow = 2, + #[cfg(not(any(target_os = "ios")))] NSImageInterpolationMedium = 4, + #[cfg(not(any(target_os = "ios")))] NSImageInterpolationHigh = 3, } ); @@ -37,6 +43,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSGraphicsContext")] + #[cfg(not(any(target_os = "ios")))] pub struct NSGraphicsContext; #[cfg(feature = "AppKit_NSGraphicsContext")] @@ -52,54 +59,68 @@ extern_methods!( #[cfg(feature = "AppKit_NSGraphicsContext")] unsafe impl NSGraphicsContext { #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other graphicsContextWithAttributes:)] pub unsafe fn graphicsContextWithAttributes( attributes: &NSDictionary, ) -> Option>; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other graphicsContextWithWindow:)] pub unsafe fn graphicsContextWithWindow(window: &NSWindow) -> Id; #[cfg(feature = "AppKit_NSBitmapImageRep")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other graphicsContextWithBitmapImageRep:)] pub unsafe fn graphicsContextWithBitmapImageRep( bitmap_rep: &NSBitmapImageRep, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentContext)] pub unsafe fn currentContext() -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setCurrentContext:)] pub unsafe fn setCurrentContext(current_context: Option<&NSGraphicsContext>); + #[cfg(not(any(target_os = "ios")))] #[method(currentContextDrawingToScreen)] pub unsafe fn currentContextDrawingToScreen() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(saveGraphicsState)] pub unsafe fn saveGraphicsState_class(); + #[cfg(not(any(target_os = "ios")))] #[method(restoreGraphicsState)] pub unsafe fn restoreGraphicsState_class(); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributes)] pub unsafe fn attributes( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(isDrawingToScreen)] pub unsafe fn isDrawingToScreen(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(saveGraphicsState)] pub unsafe fn saveGraphicsState(&self); + #[cfg(not(any(target_os = "ios")))] #[method(restoreGraphicsState)] pub unsafe fn restoreGraphicsState(&self); + #[cfg(not(any(target_os = "ios")))] #[method(flushGraphics)] pub unsafe fn flushGraphics(&self); + #[cfg(not(any(target_os = "ios")))] #[method(isFlipped)] pub unsafe fn isFlipped(&self) -> bool; } @@ -109,33 +130,43 @@ extern_methods!( /// NSGraphicsContext_RenderingOptions #[cfg(feature = "AppKit_NSGraphicsContext")] unsafe impl NSGraphicsContext { + #[cfg(not(any(target_os = "ios")))] #[method(shouldAntialias)] pub unsafe fn shouldAntialias(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShouldAntialias:)] pub unsafe fn setShouldAntialias(&self, should_antialias: bool); + #[cfg(not(any(target_os = "ios")))] #[method(imageInterpolation)] pub unsafe fn imageInterpolation(&self) -> NSImageInterpolation; + #[cfg(not(any(target_os = "ios")))] #[method(setImageInterpolation:)] pub unsafe fn setImageInterpolation(&self, image_interpolation: NSImageInterpolation); + #[cfg(not(any(target_os = "ios")))] #[method(patternPhase)] pub unsafe fn patternPhase(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(setPatternPhase:)] pub unsafe fn setPatternPhase(&self, pattern_phase: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(compositingOperation)] pub unsafe fn compositingOperation(&self) -> NSCompositingOperation; + #[cfg(not(any(target_os = "ios")))] #[method(setCompositingOperation:)] pub unsafe fn setCompositingOperation(&self, compositing_operation: NSCompositingOperation); + #[cfg(not(any(target_os = "ios")))] #[method(colorRenderingIntent)] pub unsafe fn colorRenderingIntent(&self) -> NSColorRenderingIntent; + #[cfg(not(any(target_os = "ios")))] #[method(setColorRenderingIntent:)] pub unsafe fn setColorRenderingIntent( &self, @@ -155,18 +186,22 @@ extern_methods!( #[cfg(feature = "AppKit_NSGraphicsContext")] unsafe impl NSGraphicsContext { #[deprecated = "This method has no effect"] + #[cfg(not(any(target_os = "ios")))] #[method(setGraphicsState:)] pub unsafe fn setGraphicsState(g_state: NSInteger); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other focusStack)] pub unsafe fn focusStack(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setFocusStack:)] pub unsafe fn setFocusStack(&self, stack: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other graphicsContextWithGraphicsPort:flipped:)] pub unsafe fn graphicsContextWithGraphicsPort_flipped( graphics_port: NonNull, @@ -174,6 +209,7 @@ extern_methods!( ) -> Id; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(graphicsPort)] pub unsafe fn graphicsPort(&self) -> NonNull; } diff --git a/AppKit/NSGridView.rs b/AppKit/NSGridView.rs index efe2dcf71..cc479f292 100644 --- a/AppKit/NSGridView.rs +++ b/AppKit/NSGridView.rs @@ -7,24 +7,38 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSGridCellPlacement { + #[cfg(not(any(target_os = "ios")))] NSGridCellPlacementInherited = 0, + #[cfg(not(any(target_os = "ios")))] NSGridCellPlacementNone = 1, + #[cfg(not(any(target_os = "ios")))] NSGridCellPlacementLeading = 2, + #[cfg(not(any(target_os = "ios")))] NSGridCellPlacementTop = NSGridCellPlacementLeading, + #[cfg(not(any(target_os = "ios")))] NSGridCellPlacementTrailing = 3, + #[cfg(not(any(target_os = "ios")))] NSGridCellPlacementBottom = NSGridCellPlacementTrailing, + #[cfg(not(any(target_os = "ios")))] NSGridCellPlacementCenter = 4, + #[cfg(not(any(target_os = "ios")))] NSGridCellPlacementFill = 5, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSGridRowAlignment { + #[cfg(not(any(target_os = "ios")))] NSGridRowAlignmentInherited = 0, + #[cfg(not(any(target_os = "ios")))] NSGridRowAlignmentNone = 1, + #[cfg(not(any(target_os = "ios")))] NSGridRowAlignmentFirstBaseline = 2, + #[cfg(not(any(target_os = "ios")))] NSGridRowAlignmentLastBaseline = 3, } ); @@ -34,6 +48,7 @@ extern_static!(NSGridViewSizeForContent: CGFloat); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSGridView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSGridView; #[cfg(feature = "AppKit_NSGridView")] @@ -70,16 +85,19 @@ unsafe impl NSUserInterfaceItemIdentification for NSGridView {} extern_methods!( #[cfg(feature = "AppKit_NSGridView")] unsafe impl NSGridView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other gridViewWithNumberOfColumns:rows:)] pub unsafe fn gridViewWithNumberOfColumns_rows( column_count: NSInteger, @@ -87,32 +105,40 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other gridViewWithViews:)] pub unsafe fn gridViewWithViews(rows: &NSArray>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfRows)] pub unsafe fn numberOfRows(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfColumns)] pub unsafe fn numberOfColumns(&self) -> NSInteger; #[cfg(feature = "AppKit_NSGridRow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other rowAtIndex:)] pub unsafe fn rowAtIndex(&self, index: NSInteger) -> Id; #[cfg(feature = "AppKit_NSGridRow")] + #[cfg(not(any(target_os = "ios")))] #[method(indexOfRow:)] pub unsafe fn indexOfRow(&self, row: &NSGridRow) -> NSInteger; #[cfg(feature = "AppKit_NSGridColumn")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other columnAtIndex:)] pub unsafe fn columnAtIndex(&self, index: NSInteger) -> Id; #[cfg(feature = "AppKit_NSGridColumn")] + #[cfg(not(any(target_os = "ios")))] #[method(indexOfColumn:)] pub unsafe fn indexOfColumn(&self, column: &NSGridColumn) -> NSInteger; #[cfg(feature = "AppKit_NSGridCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cellAtColumnIndex:rowIndex:)] pub unsafe fn cellAtColumnIndex_rowIndex( &self, @@ -121,14 +147,17 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSGridCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cellForView:)] pub unsafe fn cellForView(&self, view: &NSView) -> Option>; #[cfg(all(feature = "AppKit_NSGridRow", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other addRowWithViews:)] pub unsafe fn addRowWithViews(&self, views: &NSArray) -> Id; #[cfg(all(feature = "AppKit_NSGridRow", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other insertRowAtIndex:withViews:)] pub unsafe fn insertRowAtIndex_withViews( &self, @@ -136,17 +165,21 @@ extern_methods!( views: &NSArray, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(moveRowAtIndex:toIndex:)] pub unsafe fn moveRowAtIndex_toIndex(&self, from_index: NSInteger, to_index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(removeRowAtIndex:)] pub unsafe fn removeRowAtIndex(&self, index: NSInteger); #[cfg(all(feature = "AppKit_NSGridColumn", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other addColumnWithViews:)] pub unsafe fn addColumnWithViews(&self, views: &NSArray) -> Id; #[cfg(all(feature = "AppKit_NSGridColumn", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other insertColumnAtIndex:withViews:)] pub unsafe fn insertColumnAtIndex_withViews( &self, @@ -154,42 +187,55 @@ extern_methods!( views: &NSArray, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(moveColumnAtIndex:toIndex:)] pub unsafe fn moveColumnAtIndex_toIndex(&self, from_index: NSInteger, to_index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(removeColumnAtIndex:)] pub unsafe fn removeColumnAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(xPlacement)] pub unsafe fn xPlacement(&self) -> NSGridCellPlacement; + #[cfg(not(any(target_os = "ios")))] #[method(setXPlacement:)] pub unsafe fn setXPlacement(&self, x_placement: NSGridCellPlacement); + #[cfg(not(any(target_os = "ios")))] #[method(yPlacement)] pub unsafe fn yPlacement(&self) -> NSGridCellPlacement; + #[cfg(not(any(target_os = "ios")))] #[method(setYPlacement:)] pub unsafe fn setYPlacement(&self, y_placement: NSGridCellPlacement); + #[cfg(not(any(target_os = "ios")))] #[method(rowAlignment)] pub unsafe fn rowAlignment(&self) -> NSGridRowAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(setRowAlignment:)] pub unsafe fn setRowAlignment(&self, row_alignment: NSGridRowAlignment); + #[cfg(not(any(target_os = "ios")))] #[method(rowSpacing)] pub unsafe fn rowSpacing(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setRowSpacing:)] pub unsafe fn setRowSpacing(&self, row_spacing: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(columnSpacing)] pub unsafe fn columnSpacing(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setColumnSpacing:)] pub unsafe fn setColumnSpacing(&self, column_spacing: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(mergeCellsInHorizontalRange:verticalRange:)] pub unsafe fn mergeCellsInHorizontalRange_verticalRange( &self, @@ -202,6 +248,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSGridRow")] + #[cfg(not(any(target_os = "ios")))] pub struct NSGridRow; #[cfg(feature = "AppKit_NSGridRow")] @@ -220,52 +267,68 @@ extern_methods!( #[cfg(feature = "AppKit_NSGridRow")] unsafe impl NSGridRow { #[cfg(feature = "AppKit_NSGridView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other gridView)] pub unsafe fn gridView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfCells)] pub unsafe fn numberOfCells(&self) -> NSInteger; #[cfg(feature = "AppKit_NSGridCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cellAtIndex:)] pub unsafe fn cellAtIndex(&self, index: NSInteger) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(yPlacement)] pub unsafe fn yPlacement(&self) -> NSGridCellPlacement; + #[cfg(not(any(target_os = "ios")))] #[method(setYPlacement:)] pub unsafe fn setYPlacement(&self, y_placement: NSGridCellPlacement); + #[cfg(not(any(target_os = "ios")))] #[method(rowAlignment)] pub unsafe fn rowAlignment(&self) -> NSGridRowAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(setRowAlignment:)] pub unsafe fn setRowAlignment(&self, row_alignment: NSGridRowAlignment); + #[cfg(not(any(target_os = "ios")))] #[method(height)] pub unsafe fn height(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setHeight:)] pub unsafe fn setHeight(&self, height: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(topPadding)] pub unsafe fn topPadding(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setTopPadding:)] pub unsafe fn setTopPadding(&self, top_padding: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(bottomPadding)] pub unsafe fn bottomPadding(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setBottomPadding:)] pub unsafe fn setBottomPadding(&self, bottom_padding: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); + #[cfg(not(any(target_os = "ios")))] #[method(mergeCellsInRange:)] pub unsafe fn mergeCellsInRange(&self, range: NSRange); } @@ -274,6 +337,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSGridColumn")] + #[cfg(not(any(target_os = "ios")))] pub struct NSGridColumn; #[cfg(feature = "AppKit_NSGridColumn")] @@ -292,46 +356,60 @@ extern_methods!( #[cfg(feature = "AppKit_NSGridColumn")] unsafe impl NSGridColumn { #[cfg(feature = "AppKit_NSGridView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other gridView)] pub unsafe fn gridView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfCells)] pub unsafe fn numberOfCells(&self) -> NSInteger; #[cfg(feature = "AppKit_NSGridCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cellAtIndex:)] pub unsafe fn cellAtIndex(&self, index: NSInteger) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(xPlacement)] pub unsafe fn xPlacement(&self) -> NSGridCellPlacement; + #[cfg(not(any(target_os = "ios")))] #[method(setXPlacement:)] pub unsafe fn setXPlacement(&self, x_placement: NSGridCellPlacement); + #[cfg(not(any(target_os = "ios")))] #[method(width)] pub unsafe fn width(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setWidth:)] pub unsafe fn setWidth(&self, width: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(leadingPadding)] pub unsafe fn leadingPadding(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setLeadingPadding:)] pub unsafe fn setLeadingPadding(&self, leading_padding: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(trailingPadding)] pub unsafe fn trailingPadding(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setTrailingPadding:)] pub unsafe fn setTrailingPadding(&self, trailing_padding: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); + #[cfg(not(any(target_os = "ios")))] #[method(mergeCellsInRange:)] pub unsafe fn mergeCellsInRange(&self, range: NSRange); } @@ -340,6 +418,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSGridCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSGridCell; #[cfg(feature = "AppKit_NSGridCell")] @@ -358,48 +437,61 @@ extern_methods!( #[cfg(feature = "AppKit_NSGridCell")] unsafe impl NSGridCell { #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentView)] pub unsafe fn contentView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setContentView:)] pub unsafe fn setContentView(&self, content_view: Option<&NSView>); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other emptyContentView)] pub unsafe fn emptyContentView() -> Id; #[cfg(feature = "AppKit_NSGridRow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other row)] pub unsafe fn row(&self) -> Option>; #[cfg(feature = "AppKit_NSGridColumn")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other column)] pub unsafe fn column(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(xPlacement)] pub unsafe fn xPlacement(&self) -> NSGridCellPlacement; + #[cfg(not(any(target_os = "ios")))] #[method(setXPlacement:)] pub unsafe fn setXPlacement(&self, x_placement: NSGridCellPlacement); + #[cfg(not(any(target_os = "ios")))] #[method(yPlacement)] pub unsafe fn yPlacement(&self) -> NSGridCellPlacement; + #[cfg(not(any(target_os = "ios")))] #[method(setYPlacement:)] pub unsafe fn setYPlacement(&self, y_placement: NSGridCellPlacement); + #[cfg(not(any(target_os = "ios")))] #[method(rowAlignment)] pub unsafe fn rowAlignment(&self) -> NSGridRowAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(setRowAlignment:)] pub unsafe fn setRowAlignment(&self, row_alignment: NSGridRowAlignment); #[cfg(all(feature = "AppKit_NSLayoutConstraint", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other customPlacementConstraints)] pub unsafe fn customPlacementConstraints(&self) -> Id>; #[cfg(all(feature = "AppKit_NSLayoutConstraint", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setCustomPlacementConstraints:)] pub unsafe fn setCustomPlacementConstraints( &self, diff --git a/AppKit/NSGroupTouchBarItem.rs b/AppKit/NSGroupTouchBarItem.rs index b002a9d86..e3d8a3322 100644 --- a/AppKit/NSGroupTouchBarItem.rs +++ b/AppKit/NSGroupTouchBarItem.rs @@ -37,6 +37,7 @@ extern_methods!( feature = "AppKit_NSUserInterfaceCompressionOptions", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other groupItemWithIdentifier:items:allowedCompressionOptions:)] pub unsafe fn groupItemWithIdentifier_items_allowedCompressionOptions( identifier: &NSTouchBarItemIdentifier, @@ -65,9 +66,11 @@ extern_methods!( #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customization_label: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method(groupUserInterfaceLayoutDirection)] pub unsafe fn groupUserInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setGroupUserInterfaceLayoutDirection:)] pub unsafe fn setGroupUserInterfaceLayoutDirection( &self, @@ -87,6 +90,7 @@ extern_methods!( pub unsafe fn setPreferredItemWidth(&self, preferred_item_width: CGFloat); #[cfg(feature = "AppKit_NSUserInterfaceCompressionOptions")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other effectiveCompressionOptions)] pub unsafe fn effectiveCompressionOptions(&self) -> Id; @@ -94,6 +98,7 @@ extern_methods!( feature = "AppKit_NSUserInterfaceCompressionOptions", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other prioritizedCompressionOptions)] pub unsafe fn prioritizedCompressionOptions( &self, @@ -103,6 +108,7 @@ extern_methods!( feature = "AppKit_NSUserInterfaceCompressionOptions", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setPrioritizedCompressionOptions:)] pub unsafe fn setPrioritizedCompressionOptions( &self, diff --git a/AppKit/NSHapticFeedback.rs b/AppKit/NSHapticFeedback.rs index dde331097..483eae83e 100644 --- a/AppKit/NSHapticFeedback.rs +++ b/AppKit/NSHapticFeedback.rs @@ -7,24 +7,34 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSHapticFeedbackPattern { + #[cfg(not(any(target_os = "ios")))] NSHapticFeedbackPatternGeneric = 0, + #[cfg(not(any(target_os = "ios")))] NSHapticFeedbackPatternAlignment = 1, + #[cfg(not(any(target_os = "ios")))] NSHapticFeedbackPatternLevelChange = 2, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSHapticFeedbackPerformanceTime { + #[cfg(not(any(target_os = "ios")))] NSHapticFeedbackPerformanceTimeDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSHapticFeedbackPerformanceTimeNow = 1, + #[cfg(not(any(target_os = "ios")))] NSHapticFeedbackPerformanceTimeDrawCompleted = 2, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSHapticFeedbackPerformer: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[method(performFeedbackPattern:performanceTime:)] unsafe fn performFeedbackPattern_performanceTime( &self, @@ -39,6 +49,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSHapticFeedbackManager")] + #[cfg(not(any(target_os = "ios")))] pub struct NSHapticFeedbackManager; #[cfg(feature = "AppKit_NSHapticFeedbackManager")] @@ -53,6 +64,7 @@ unsafe impl NSObjectProtocol for NSHapticFeedbackManager {} extern_methods!( #[cfg(feature = "AppKit_NSHapticFeedbackManager")] unsafe impl NSHapticFeedbackManager { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultPerformer)] pub unsafe fn defaultPerformer() -> Id>; } diff --git a/AppKit/NSHelpManager.rs b/AppKit/NSHelpManager.rs index c4c1f40d1..ad7700892 100644 --- a/AppKit/NSHelpManager.rs +++ b/AppKit/NSHelpManager.rs @@ -14,6 +14,7 @@ pub type NSHelpManagerContextHelpKey = NSString; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSHelpManager")] + #[cfg(not(any(target_os = "ios")))] pub struct NSHelpManager; #[cfg(feature = "AppKit_NSHelpManager")] @@ -28,16 +29,20 @@ unsafe impl NSObjectProtocol for NSHelpManager {} extern_methods!( #[cfg(feature = "AppKit_NSHelpManager")] unsafe impl NSHelpManager { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedHelpManager)] pub unsafe fn sharedHelpManager() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(isContextHelpModeActive)] pub unsafe fn isContextHelpModeActive() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setContextHelpModeActive:)] pub unsafe fn setContextHelpModeActive(context_help_mode_active: bool); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setContextHelp:forObject:)] pub unsafe fn setContextHelp_forObject( &self, @@ -45,16 +50,19 @@ extern_methods!( object: &Object, ); + #[cfg(not(any(target_os = "ios")))] #[method(removeContextHelpForObject:)] pub unsafe fn removeContextHelpForObject(&self, object: &Object); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contextHelpForObject:)] pub unsafe fn contextHelpForObject( &self, object: &Object, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(showContextHelpForObject:locationHint:)] pub unsafe fn showContextHelpForObject_locationHint( &self, @@ -62,6 +70,7 @@ extern_methods!( pt: NSPoint, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(openHelpAnchor:inBook:)] pub unsafe fn openHelpAnchor_inBook( &self, @@ -70,10 +79,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(findString:inBook:)] pub unsafe fn findString_inBook(&self, query: &NSString, book: Option<&NSHelpBookName>); #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method(registerBooksInBundle:)] pub unsafe fn registerBooksInBundle(&self, bundle: &NSBundle) -> bool; } @@ -88,6 +99,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSBundle")] unsafe impl NSBundle { #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contextHelpForKey:)] pub unsafe fn contextHelpForKey( &self, @@ -100,9 +112,11 @@ extern_methods!( /// NSApplicationHelpExtension #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method(activateContextHelpMode:)] pub unsafe fn activateContextHelpMode(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(showHelp:)] pub unsafe fn showHelp(&self, sender: Option<&Object>); } diff --git a/AppKit/NSImage.rs b/AppKit/NSImage.rs index 57b5703d0..6f16c0bae 100644 --- a/AppKit/NSImage.rs +++ b/AppKit/NSImage.rs @@ -15,21 +15,32 @@ extern_static!(NSImageHintUserInterfaceLayoutDirection: &'static NSImageHintKey) ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSImageLoadStatus { + #[cfg(not(any(target_os = "ios")))] NSImageLoadStatusCompleted = 0, + #[cfg(not(any(target_os = "ios")))] NSImageLoadStatusCancelled = 1, + #[cfg(not(any(target_os = "ios")))] NSImageLoadStatusInvalidData = 2, + #[cfg(not(any(target_os = "ios")))] NSImageLoadStatusUnexpectedEOF = 3, + #[cfg(not(any(target_os = "ios")))] NSImageLoadStatusReadError = 4, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSImageCacheMode { + #[cfg(not(any(target_os = "ios")))] NSImageCacheDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSImageCacheAlways = 1, + #[cfg(not(any(target_os = "ios")))] NSImageCacheBySize = 2, + #[cfg(not(any(target_os = "ios")))] NSImageCacheNever = 3, } ); @@ -51,10 +62,12 @@ unsafe impl NSObjectProtocol for NSImage {} extern_methods!( #[cfg(feature = "AppKit_NSImage")] unsafe impl NSImage { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageNamed:)] pub unsafe fn imageNamed(name: &NSImageName) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageWithSystemSymbolName:accessibilityDescription:)] pub unsafe fn imageWithSystemSymbolName_accessibilityDescription( name: &NSString, @@ -62,6 +75,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageWithSystemSymbolName:variableValue:accessibilityDescription:)] pub unsafe fn imageWithSystemSymbolName_variableValue_accessibilityDescription( name: &NSString, @@ -70,6 +84,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageWithSymbolName:variableValue:)] pub unsafe fn imageWithSymbolName_variableValue( name: &NSString, @@ -77,6 +92,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSBundle", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageWithSymbolName:bundle:variableValue:)] pub unsafe fn imageWithSymbolName_bundle_variableValue( name: &NSString, @@ -84,14 +100,17 @@ extern_methods!( value: c_double, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithSize:)] pub unsafe fn initWithSize(this: Option>, size: NSSize) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, @@ -99,6 +118,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( this: Option>, @@ -106,6 +126,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, @@ -113,6 +134,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initByReferencingFile:)] pub unsafe fn initByReferencingFile( this: Option>, @@ -120,10 +142,12 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initByReferencingURL:)] pub unsafe fn initByReferencingURL(this: Option>, url: &NSURL) -> Id; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithPasteboard:)] pub unsafe fn initWithPasteboard( this: Option>, @@ -131,12 +155,14 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithDataIgnoringOrientation:)] pub unsafe fn initWithDataIgnoringOrientation( this: Option>, data: &NSData, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageWithSize:flipped:drawingHandler:)] pub unsafe fn imageWithSize_flipped_drawingHandler( size: NSSize, @@ -144,53 +170,68 @@ extern_methods!( drawing_handler: &Block<(NSRect,), Bool>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(size)] pub unsafe fn size(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setSize:)] pub unsafe fn setSize(&self, size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(setName:)] pub unsafe fn setName(&self, string: Option<&NSImageName>) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: &NSColor); + #[cfg(not(any(target_os = "ios")))] #[method(usesEPSOnResolutionMismatch)] pub unsafe fn usesEPSOnResolutionMismatch(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesEPSOnResolutionMismatch:)] pub unsafe fn setUsesEPSOnResolutionMismatch(&self, uses_eps_on_resolution_mismatch: bool); + #[cfg(not(any(target_os = "ios")))] #[method(prefersColorMatch)] pub unsafe fn prefersColorMatch(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPrefersColorMatch:)] pub unsafe fn setPrefersColorMatch(&self, prefers_color_match: bool); + #[cfg(not(any(target_os = "ios")))] #[method(matchesOnMultipleResolution)] pub unsafe fn matchesOnMultipleResolution(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setMatchesOnMultipleResolution:)] pub unsafe fn setMatchesOnMultipleResolution(&self, matches_on_multiple_resolution: bool); + #[cfg(not(any(target_os = "ios")))] #[method(matchesOnlyOnBestFittingAxis)] pub unsafe fn matchesOnlyOnBestFittingAxis(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setMatchesOnlyOnBestFittingAxis:)] pub unsafe fn setMatchesOnlyOnBestFittingAxis( &self, matches_only_on_best_fitting_axis: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(drawAtPoint:fromRect:operation:fraction:)] pub unsafe fn drawAtPoint_fromRect_operation_fraction( &self, @@ -200,6 +241,7 @@ extern_methods!( delta: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(drawInRect:fromRect:operation:fraction:)] pub unsafe fn drawInRect_fromRect_operation_fraction( &self, @@ -210,6 +252,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(drawInRect:fromRect:operation:fraction:respectFlipped:hints:)] pub unsafe fn drawInRect_fromRect_operation_fraction_respectFlipped_hints( &self, @@ -222,6 +265,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSImageRep")] + #[cfg(not(any(target_os = "ios")))] #[method(drawRepresentation:inRect:)] pub unsafe fn drawRepresentation_inRect( &self, @@ -229,17 +273,21 @@ extern_methods!( rect: NSRect, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(drawInRect:)] pub unsafe fn drawInRect(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(recache)] pub unsafe fn recache(&self); #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other TIFFRepresentation)] pub unsafe fn TIFFRepresentation(&self) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other TIFFRepresentationUsingCompression:factor:)] pub unsafe fn TIFFRepresentationUsingCompression_factor( &self, @@ -248,80 +296,102 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "AppKit_NSImageRep", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other representations)] pub unsafe fn representations(&self) -> Id>; #[cfg(all(feature = "AppKit_NSImageRep", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(addRepresentations:)] pub unsafe fn addRepresentations(&self, image_reps: &NSArray); #[cfg(feature = "AppKit_NSImageRep")] + #[cfg(not(any(target_os = "ios")))] #[method(addRepresentation:)] pub unsafe fn addRepresentation(&self, image_rep: &NSImageRep); #[cfg(feature = "AppKit_NSImageRep")] + #[cfg(not(any(target_os = "ios")))] #[method(removeRepresentation:)] pub unsafe fn removeRepresentation(&self, image_rep: &NSImageRep); + #[cfg(not(any(target_os = "ios")))] #[method(isValid)] pub unsafe fn isValid(&self) -> bool; #[deprecated = "This method is incompatible with resolution-independent drawing and should not be used. Instead, use +[NSImage imageWithSize:flipped:drawingHandler:] to create a block-based image describing the desired image drawing, or use +[NSGraphicsContext graphicsContextWithBitmapImageRep:] to manipulate specific bitmap image representations."] + #[cfg(not(any(target_os = "ios")))] #[method(lockFocus)] pub unsafe fn lockFocus(&self); #[deprecated = "This method is incompatible with resolution-independent drawing and should not be used. Instead, use +[NSImage imageWithSize:flipped:drawingHandler:] to create a block-based image describing the desired image drawing, or use +[NSGraphicsContext graphicsContextWithBitmapImageRep:] to manipulate specific bitmap image representations."] + #[cfg(not(any(target_os = "ios")))] #[method(lockFocusFlipped:)] pub unsafe fn lockFocusFlipped(&self, flipped: bool); #[deprecated = "This method is incompatible with resolution-independent drawing and should not be used. Instead, use +[NSImage imageWithSize:flipped:drawingHandler:] to create a block-based image describing the desired image drawing, or use +[NSGraphicsContext graphicsContextWithBitmapImageRep:] to manipulate specific bitmap image representations."] + #[cfg(not(any(target_os = "ios")))] #[method(unlockFocus)] pub unsafe fn unlockFocus(&self); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageTypes)] pub unsafe fn imageTypes() -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageUnfilteredTypes)] pub unsafe fn imageUnfilteredTypes() -> Id>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method(canInitWithPasteboard:)] pub unsafe fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(cancelIncrementalLoad)] pub unsafe fn cancelIncrementalLoad(&self); + #[cfg(not(any(target_os = "ios")))] #[method(cacheMode)] pub unsafe fn cacheMode(&self) -> NSImageCacheMode; + #[cfg(not(any(target_os = "ios")))] #[method(setCacheMode:)] pub unsafe fn setCacheMode(&self, cache_mode: NSImageCacheMode); + #[cfg(not(any(target_os = "ios")))] #[method(alignmentRect)] pub unsafe fn alignmentRect(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setAlignmentRect:)] pub unsafe fn setAlignmentRect(&self, alignment_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(isTemplate)] pub unsafe fn isTemplate(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setTemplate:)] pub unsafe fn setTemplate(&self, template: bool); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessibilityDescription)] pub unsafe fn accessibilityDescription(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessibilityDescription:)] pub unsafe fn setAccessibilityDescription( &self, @@ -333,6 +403,7 @@ extern_methods!( feature = "AppKit_NSImageRep", feature = "Foundation_NSDictionary" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bestRepresentationForRect:context:hints:)] pub unsafe fn bestRepresentationForRect_context_hints( &self, @@ -345,6 +416,7 @@ extern_methods!( feature = "AppKit_NSGraphicsContext", feature = "Foundation_NSDictionary" ))] + #[cfg(not(any(target_os = "ios")))] #[method(hitTestRect:withImageDestinationRect:context:hints:flipped:)] pub unsafe fn hitTestRect_withImageDestinationRect_context_hints_flipped( &self, @@ -355,31 +427,38 @@ extern_methods!( flipped: bool, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(recommendedLayerContentsScale:)] pub unsafe fn recommendedLayerContentsScale( &self, preferred_contents_scale: CGFloat, ) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layerContentsForContentsScale:)] pub unsafe fn layerContentsForContentsScale( &self, layer_contents_scale: CGFloat, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(capInsets)] pub unsafe fn capInsets(&self) -> NSEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(setCapInsets:)] pub unsafe fn setCapInsets(&self, cap_insets: NSEdgeInsets); + #[cfg(not(any(target_os = "ios")))] #[method(resizingMode)] pub unsafe fn resizingMode(&self) -> NSImageResizingMode; + #[cfg(not(any(target_os = "ios")))] #[method(setResizingMode:)] pub unsafe fn setResizingMode(&self, resizing_mode: NSImageResizingMode); #[cfg(feature = "AppKit_NSImageSymbolConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageWithSymbolConfiguration:)] pub unsafe fn imageWithSymbolConfiguration( &self, @@ -387,6 +466,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSImageSymbolConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other symbolConfiguration)] pub unsafe fn symbolConfiguration(&self) -> Id; } @@ -418,8 +498,10 @@ unsafe impl NSItemProviderReading for NSImage {} unsafe impl NSItemProviderWriting for NSImage {} extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSImageDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other imageDidNotDraw:inRect:)] unsafe fn imageDidNotDraw_inRect( @@ -429,16 +511,19 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSImage", feature = "AppKit_NSImageRep"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(image:willLoadRepresentation:)] unsafe fn image_willLoadRepresentation(&self, image: &NSImage, rep: &NSImageRep); #[cfg(all(feature = "AppKit_NSImage", feature = "AppKit_NSImageRep"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(image:didLoadRepresentationHeader:)] unsafe fn image_didLoadRepresentationHeader(&self, image: &NSImage, rep: &NSImageRep); #[cfg(all(feature = "AppKit_NSImage", feature = "AppKit_NSImageRep"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(image:didLoadPartOfRepresentation:withValidRows:)] unsafe fn image_didLoadPartOfRepresentation_withValidRows( @@ -449,6 +534,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSImage", feature = "AppKit_NSImageRep"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(image:didLoadRepresentation:withStatus:)] unsafe fn image_didLoadRepresentation_withStatus( @@ -467,14 +553,17 @@ extern_methods!( #[cfg(feature = "Foundation_NSBundle")] unsafe impl NSBundle { #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageForResource:)] pub unsafe fn imageForResource(&self, name: &NSImageName) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pathForImageResource:)] pub unsafe fn pathForImageResource(&self, name: &NSImageName) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URLForImageResource:)] pub unsafe fn URLForImageResource(&self, name: &NSImageName) -> Option>; } @@ -485,6 +574,7 @@ extern_methods!( unsafe impl NSImage { #[cfg(all(feature = "AppKit_NSImageRep", feature = "Foundation_NSDictionary"))] #[deprecated = "Use -[NSImage bestRepresentationForRect:context:hints:] instead. Any deviceDescription dictionary is also a valid hints dictionary."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bestRepresentationForDevice:)] pub unsafe fn bestRepresentationForDevice( &self, @@ -493,37 +583,45 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated = "Use +imageUnfilteredTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageUnfilteredFileTypes)] pub unsafe fn imageUnfilteredFileTypes() -> Id>; #[cfg(feature = "Foundation_NSArray")] #[deprecated = "Use +imageUnfilteredTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageUnfilteredPasteboardTypes)] pub unsafe fn imageUnfilteredPasteboardTypes() -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated = "Use +imageTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageFileTypes)] pub unsafe fn imageFileTypes() -> Id>; #[cfg(feature = "Foundation_NSArray")] #[deprecated = "Use +imageTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imagePasteboardTypes)] pub unsafe fn imagePasteboardTypes() -> Id>; #[deprecated = "The concept of flippedness for NSImage is deprecated. Please see the AppKit 10.6 release notes for a discussion of why and for how to replace existing usage."] + #[cfg(not(any(target_os = "ios")))] #[method(setFlipped:)] pub unsafe fn setFlipped(&self, flag: bool); #[deprecated = "The concept of flippedness for NSImage is deprecated. Please see the AppKit 10.6 release notes for a discussion of why and for how to replace existing usage."] + #[cfg(not(any(target_os = "ios")))] #[method(isFlipped)] pub unsafe fn isFlipped(&self) -> bool; #[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"] + #[cfg(not(any(target_os = "ios")))] #[method(dissolveToPoint:fraction:)] pub unsafe fn dissolveToPoint_fraction(&self, point: NSPoint, fraction: CGFloat); #[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"] + #[cfg(not(any(target_os = "ios")))] #[method(dissolveToPoint:fromRect:fraction:)] pub unsafe fn dissolveToPoint_fromRect_fraction( &self, @@ -533,10 +631,12 @@ extern_methods!( ); #[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"] + #[cfg(not(any(target_os = "ios")))] #[method(compositeToPoint:operation:)] pub unsafe fn compositeToPoint_operation(&self, point: NSPoint, op: NSCompositingOperation); #[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"] + #[cfg(not(any(target_os = "ios")))] #[method(compositeToPoint:fromRect:operation:)] pub unsafe fn compositeToPoint_fromRect_operation( &self, @@ -546,6 +646,7 @@ extern_methods!( ); #[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"] + #[cfg(not(any(target_os = "ios")))] #[method(compositeToPoint:operation:fraction:)] pub unsafe fn compositeToPoint_operation_fraction( &self, @@ -555,6 +656,7 @@ extern_methods!( ); #[deprecated = "Use -drawAtPoint:... or -drawInRect:... methods instead"] + #[cfg(not(any(target_os = "ios")))] #[method(compositeToPoint:fromRect:operation:fraction:)] pub unsafe fn compositeToPoint_fromRect_operation_fraction( &self, @@ -566,38 +668,47 @@ extern_methods!( #[cfg(feature = "AppKit_NSImageRep")] #[deprecated = "Create an image using +[NSImage imageWithSize:flipped:drawingHandler:], and begin your custom drawing with -[NSImageRep drawInRect:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method(lockFocusOnRepresentation:)] pub unsafe fn lockFocusOnRepresentation(&self, image_representation: Option<&NSImageRep>); #[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."] + #[cfg(not(any(target_os = "ios")))] #[method(setScalesWhenResized:)] pub unsafe fn setScalesWhenResized(&self, flag: bool); #[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."] + #[cfg(not(any(target_os = "ios")))] #[method(scalesWhenResized)] pub unsafe fn scalesWhenResized(&self) -> bool; #[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."] + #[cfg(not(any(target_os = "ios")))] #[method(setDataRetained:)] pub unsafe fn setDataRetained(&self, flag: bool); #[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."] + #[cfg(not(any(target_os = "ios")))] #[method(isDataRetained)] pub unsafe fn isDataRetained(&self) -> bool; #[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."] + #[cfg(not(any(target_os = "ios")))] #[method(setCachedSeparately:)] pub unsafe fn setCachedSeparately(&self, flag: bool); #[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."] + #[cfg(not(any(target_os = "ios")))] #[method(isCachedSeparately)] pub unsafe fn isCachedSeparately(&self) -> bool; #[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."] + #[cfg(not(any(target_os = "ios")))] #[method(setCacheDepthMatchesImageDepth:)] pub unsafe fn setCacheDepthMatchesImageDepth(&self, flag: bool); #[deprecated = "You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details."] + #[cfg(not(any(target_os = "ios")))] #[method(cacheDepthMatchesImageDepth)] pub unsafe fn cacheDepthMatchesImageDepth(&self) -> bool; } @@ -883,9 +994,13 @@ extern_static!(NSImageNameTouchBarPlayheadTemplate: &'static NSImageName); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSImageSymbolScale { + #[cfg(not(any(target_os = "ios")))] NSImageSymbolScaleSmall = 1, + #[cfg(not(any(target_os = "ios")))] NSImageSymbolScaleMedium = 2, + #[cfg(not(any(target_os = "ios")))] NSImageSymbolScaleLarge = 3, } ); @@ -893,6 +1008,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSImageSymbolConfiguration")] + #[cfg(not(any(target_os = "ios")))] pub struct NSImageSymbolConfiguration; #[cfg(feature = "AppKit_NSImageSymbolConfiguration")] @@ -913,6 +1029,7 @@ unsafe impl NSSecureCoding for NSImageSymbolConfiguration {} extern_methods!( #[cfg(feature = "AppKit_NSImageSymbolConfiguration")] unsafe impl NSImageSymbolConfiguration { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationWithPointSize:weight:scale:)] pub unsafe fn configurationWithPointSize_weight_scale( point_size: CGFloat, @@ -920,42 +1037,52 @@ extern_methods!( scale: NSImageSymbolScale, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationWithPointSize:weight:)] pub unsafe fn configurationWithPointSize_weight( point_size: CGFloat, weight: NSFontWeight, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationWithTextStyle:scale:)] pub unsafe fn configurationWithTextStyle_scale( style: &NSFontTextStyle, scale: NSImageSymbolScale, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationWithTextStyle:)] pub unsafe fn configurationWithTextStyle(style: &NSFontTextStyle) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationWithScale:)] pub unsafe fn configurationWithScale(scale: NSImageSymbolScale) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationPreferringMonochrome)] pub unsafe fn configurationPreferringMonochrome() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationPreferringHierarchical)] pub unsafe fn configurationPreferringHierarchical() -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationWithHierarchicalColor:)] pub unsafe fn configurationWithHierarchicalColor(hierarchical_color: &NSColor) -> Id; #[cfg(all(feature = "AppKit_NSColor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationWithPaletteColors:)] pub unsafe fn configurationWithPaletteColors(palette_colors: &NSArray) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationPreferringMulticolor)] pub unsafe fn configurationPreferringMulticolor() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationByApplyingConfiguration:)] pub unsafe fn configurationByApplyingConfiguration( &self, diff --git a/AppKit/NSImageCell.rs b/AppKit/NSImageCell.rs index a5236d23a..3c2084984 100644 --- a/AppKit/NSImageCell.rs +++ b/AppKit/NSImageCell.rs @@ -7,26 +7,42 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSImageAlignment { + #[cfg(not(any(target_os = "ios")))] NSImageAlignCenter = 0, + #[cfg(not(any(target_os = "ios")))] NSImageAlignTop = 1, + #[cfg(not(any(target_os = "ios")))] NSImageAlignTopLeft = 2, + #[cfg(not(any(target_os = "ios")))] NSImageAlignTopRight = 3, + #[cfg(not(any(target_os = "ios")))] NSImageAlignLeft = 4, + #[cfg(not(any(target_os = "ios")))] NSImageAlignBottom = 5, + #[cfg(not(any(target_os = "ios")))] NSImageAlignBottomLeft = 6, + #[cfg(not(any(target_os = "ios")))] NSImageAlignBottomRight = 7, + #[cfg(not(any(target_os = "ios")))] NSImageAlignRight = 8, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSImageFrameStyle { + #[cfg(not(any(target_os = "ios")))] NSImageFrameNone = 0, + #[cfg(not(any(target_os = "ios")))] NSImageFramePhoto = 1, + #[cfg(not(any(target_os = "ios")))] NSImageFrameGrayBezel = 2, + #[cfg(not(any(target_os = "ios")))] NSImageFrameGroove = 3, + #[cfg(not(any(target_os = "ios")))] NSImageFrameButton = 4, } ); @@ -34,6 +50,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSImageCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSImageCell; #[cfg(feature = "AppKit_NSImageCell")] @@ -61,21 +78,27 @@ unsafe impl NSUserInterfaceItemIdentification for NSImageCell {} extern_methods!( #[cfg(feature = "AppKit_NSImageCell")] unsafe impl NSImageCell { + #[cfg(not(any(target_os = "ios")))] #[method(imageAlignment)] pub unsafe fn imageAlignment(&self) -> NSImageAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(setImageAlignment:)] pub unsafe fn setImageAlignment(&self, image_alignment: NSImageAlignment); + #[cfg(not(any(target_os = "ios")))] #[method(imageScaling)] pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[cfg(not(any(target_os = "ios")))] #[method(setImageScaling:)] pub unsafe fn setImageScaling(&self, image_scaling: NSImageScaling); + #[cfg(not(any(target_os = "ios")))] #[method(imageFrameStyle)] pub unsafe fn imageFrameStyle(&self) -> NSImageFrameStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setImageFrameStyle:)] pub unsafe fn setImageFrameStyle(&self, image_frame_style: NSImageFrameStyle); } @@ -86,10 +109,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSImageCell")] unsafe impl NSImageCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSImageRep.rs b/AppKit/NSImageRep.rs index aa8d3fe7f..6b998fa7e 100644 --- a/AppKit/NSImageRep.rs +++ b/AppKit/NSImageRep.rs @@ -11,16 +11,22 @@ typed_enum!( extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { + #[cfg(not(any(target_os = "ios")))] NSImageRepMatchesDevice = 0, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSImageLayoutDirection { + #[cfg(not(any(target_os = "ios")))] NSImageLayoutDirectionUnspecified = -1, + #[cfg(not(any(target_os = "ios")))] NSImageLayoutDirectionLeftToRight = 2, + #[cfg(not(any(target_os = "ios")))] NSImageLayoutDirectionRightToLeft = 3, } ); @@ -28,6 +34,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSImageRep")] + #[cfg(not(any(target_os = "ios")))] pub struct NSImageRep; #[cfg(feature = "AppKit_NSImageRep")] @@ -45,26 +52,32 @@ unsafe impl NSObjectProtocol for NSImageRep {} extern_methods!( #[cfg(feature = "AppKit_NSImageRep")] unsafe impl NSImageRep { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(draw)] pub unsafe fn draw(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(drawAtPoint:)] pub unsafe fn drawAtPoint(&self, point: NSPoint) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(drawInRect:)] pub unsafe fn drawInRect(&self, rect: NSRect) -> bool; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(drawInRect:fromRect:operation:fraction:respectFlipped:hints:)] pub unsafe fn drawInRect_fromRect_operation_fraction_respectFlipped_hints( &self, @@ -76,144 +89,181 @@ extern_methods!( hints: Option<&NSDictionary>, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(size)] pub unsafe fn size(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setSize:)] pub unsafe fn setSize(&self, size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(hasAlpha)] pub unsafe fn hasAlpha(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAlpha:)] pub unsafe fn setAlpha(&self, alpha: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setOpaque:)] pub unsafe fn setOpaque(&self, opaque: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorSpaceName)] pub unsafe fn colorSpaceName(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setColorSpaceName:)] pub unsafe fn setColorSpaceName(&self, color_space_name: &NSColorSpaceName); + #[cfg(not(any(target_os = "ios")))] #[method(bitsPerSample)] pub unsafe fn bitsPerSample(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setBitsPerSample:)] pub unsafe fn setBitsPerSample(&self, bits_per_sample: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(pixelsWide)] pub unsafe fn pixelsWide(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setPixelsWide:)] pub unsafe fn setPixelsWide(&self, pixels_wide: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(pixelsHigh)] pub unsafe fn pixelsHigh(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setPixelsHigh:)] pub unsafe fn setPixelsHigh(&self, pixels_high: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(layoutDirection)] pub unsafe fn layoutDirection(&self) -> NSImageLayoutDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setLayoutDirection:)] pub unsafe fn setLayoutDirection(&self, layout_direction: NSImageLayoutDirection); + #[cfg(not(any(target_os = "ios")))] #[method(registerImageRepClass:)] pub unsafe fn registerImageRepClass(image_rep_class: &Class); + #[cfg(not(any(target_os = "ios")))] #[method(unregisterImageRepClass:)] pub unsafe fn unregisterImageRepClass(image_rep_class: &Class); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other registeredImageRepClasses)] pub unsafe fn registeredImageRepClasses() -> Id>; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use +imageRepClassForType: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(imageRepClassForFileType:)] pub unsafe fn imageRepClassForFileType(r#type: &NSString) -> Option<&'static Class>; #[deprecated = "Use +imageRepClassForType: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(imageRepClassForPasteboardType:)] pub unsafe fn imageRepClassForPasteboardType( r#type: &NSPasteboardType, ) -> Option<&'static Class>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(imageRepClassForType:)] pub unsafe fn imageRepClassForType(r#type: &NSString) -> Option<&'static Class>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method(imageRepClassForData:)] pub unsafe fn imageRepClassForData(data: &NSData) -> Option<&'static Class>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method(canInitWithData:)] pub unsafe fn canInitWithData(data: &NSData) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated = "Use +imageUnfilteredTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageUnfilteredFileTypes)] pub unsafe fn imageUnfilteredFileTypes() -> Id>; #[cfg(feature = "Foundation_NSArray")] #[deprecated = "Use +imageUnfilteredTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageUnfilteredPasteboardTypes)] pub unsafe fn imageUnfilteredPasteboardTypes() -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated = "Use +imageTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageFileTypes)] pub unsafe fn imageFileTypes() -> Id>; #[cfg(feature = "Foundation_NSArray")] #[deprecated = "Use +imageTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imagePasteboardTypes)] pub unsafe fn imagePasteboardTypes() -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageUnfilteredTypes)] pub unsafe fn imageUnfilteredTypes() -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageTypes)] pub unsafe fn imageTypes() -> Id>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method(canInitWithPasteboard:)] pub unsafe fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageRepsWithContentsOfFile:)] pub unsafe fn imageRepsWithContentsOfFile( filename: &NSString, ) -> Option>>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageRepWithContentsOfFile:)] pub unsafe fn imageRepWithContentsOfFile(filename: &NSString) -> Option>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageRepsWithContentsOfURL:)] pub unsafe fn imageRepsWithContentsOfURL(url: &NSURL) -> Option>>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageRepWithContentsOfURL:)] pub unsafe fn imageRepWithContentsOfURL(url: &NSURL) -> Option>; #[cfg(all(feature = "AppKit_NSPasteboard", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageRepsWithPasteboard:)] pub unsafe fn imageRepsWithPasteboard( pasteboard: &NSPasteboard, ) -> Option>>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageRepWithPasteboard:)] pub unsafe fn imageRepWithPasteboard(pasteboard: &NSPasteboard) -> Option>; } diff --git a/AppKit/NSImageView.rs b/AppKit/NSImageView.rs index 07cbd0699..5fffaa492 100644 --- a/AppKit/NSImageView.rs +++ b/AppKit/NSImageView.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSImageView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSImageView; #[cfg(feature = "AppKit_NSImageView")] @@ -51,46 +52,59 @@ extern_methods!( #[cfg(feature = "AppKit_NSImageView")] unsafe impl NSImageView { #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageViewWithImage:)] pub unsafe fn imageViewWithImage(image: &NSImage) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[cfg(not(any(target_os = "ios")))] #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(imageAlignment)] pub unsafe fn imageAlignment(&self) -> NSImageAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(setImageAlignment:)] pub unsafe fn setImageAlignment(&self, image_alignment: NSImageAlignment); + #[cfg(not(any(target_os = "ios")))] #[method(imageScaling)] pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[cfg(not(any(target_os = "ios")))] #[method(setImageScaling:)] pub unsafe fn setImageScaling(&self, image_scaling: NSImageScaling); + #[cfg(not(any(target_os = "ios")))] #[method(imageFrameStyle)] pub unsafe fn imageFrameStyle(&self) -> NSImageFrameStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setImageFrameStyle:)] pub unsafe fn setImageFrameStyle(&self, image_frame_style: NSImageFrameStyle); #[cfg(feature = "AppKit_NSImageSymbolConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other symbolConfiguration)] pub unsafe fn symbolConfiguration(&self) -> Option>; #[cfg(feature = "AppKit_NSImageSymbolConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method(setSymbolConfiguration:)] pub unsafe fn setSymbolConfiguration( &self, @@ -98,22 +112,28 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentTintColor)] pub unsafe fn contentTintColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setContentTintColor:)] pub unsafe fn setContentTintColor(&self, content_tint_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method(animates)] pub unsafe fn animates(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAnimates:)] pub unsafe fn setAnimates(&self, animates: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsCutCopyPaste)] pub unsafe fn allowsCutCopyPaste(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsCutCopyPaste:)] pub unsafe fn setAllowsCutCopyPaste(&self, allows_cut_copy_paste: bool); } @@ -123,6 +143,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSImageView")] unsafe impl NSImageView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSInputManager.rs b/AppKit/NSInputManager.rs index 039a2808d..90b3e7f79 100644 --- a/AppKit/NSInputManager.rs +++ b/AppKit/NSInputManager.rs @@ -6,33 +6,41 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTextInput { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(insertText:)] unsafe fn insertText(&self, string: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(doCommandBySelector:)] unsafe fn doCommandBySelector(&self, selector: Option); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setMarkedText:selectedRange:)] unsafe fn setMarkedText_selectedRange(&self, string: Option<&Object>, sel_range: NSRange); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(unmarkText)] unsafe fn unmarkText(&self); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(hasMarkedText)] unsafe fn hasMarkedText(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(conversationIdentifier)] unsafe fn conversationIdentifier(&self) -> NSInteger; #[cfg(feature = "Foundation_NSAttributedString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedSubstringFromRange:)] unsafe fn attributedSubstringFromRange( &self, @@ -40,23 +48,28 @@ extern_protocol!( ) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(markedRange)] unsafe fn markedRange(&self) -> NSRange; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(selectedRange)] unsafe fn selectedRange(&self) -> NSRange; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(firstRectForCharacterRange:)] unsafe fn firstRectForCharacterRange(&self, range: NSRange) -> NSRect; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(characterIndexForPoint:)] unsafe fn characterIndexForPoint(&self, point: NSPoint) -> NSUInteger; #[cfg(feature = "Foundation_NSArray")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other validAttributesForMarkedText)] unsafe fn validAttributesForMarkedText(&self) -> Option>; } @@ -68,6 +81,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSInputManager")] #[deprecated = "Use NSTextInputContext instead"] + #[cfg(not(any(target_os = "ios")))] pub struct NSInputManager; #[cfg(feature = "AppKit_NSInputManager")] @@ -86,19 +100,23 @@ extern_methods!( #[cfg(feature = "AppKit_NSInputManager")] unsafe impl NSInputManager { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentInputManager)] pub unsafe fn currentInputManager() -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(cycleToNextInputLanguage:)] pub unsafe fn cycleToNextInputLanguage(sender: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(cycleToNextInputServerInLanguage:)] pub unsafe fn cycleToNextInputServerInLanguage(sender: Option<&Object>); #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithName:host:)] pub unsafe fn initWithName_host( this: Option>, @@ -108,14 +126,17 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedInputManagerName)] pub unsafe fn localizedInputManagerName(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(markedTextAbandoned:)] pub unsafe fn markedTextAbandoned(&self, cli: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(markedTextSelectionChanged:client:)] pub unsafe fn markedTextSelectionChanged_client( &self, @@ -124,34 +145,41 @@ extern_methods!( ); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(wantsToInterpretAllKeystrokes)] pub unsafe fn wantsToInterpretAllKeystrokes(&self) -> bool; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other language)] pub unsafe fn language(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSInputServer")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other server)] pub unsafe fn server(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(wantsToHandleMouseEvents)] pub unsafe fn wantsToHandleMouseEvents(&self) -> bool; #[cfg(feature = "AppKit_NSEvent")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(handleMouseEvent:)] pub unsafe fn handleMouseEvent(&self, mouse_event: Option<&NSEvent>) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(wantsToDelayTextChangeNotifications)] pub unsafe fn wantsToDelayTextChangeNotifications(&self) -> bool; } diff --git a/AppKit/NSInputServer.rs b/AppKit/NSInputServer.rs index 2d4a5a185..49c5030d1 100644 --- a/AppKit/NSInputServer.rs +++ b/AppKit/NSInputServer.rs @@ -6,20 +6,25 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSInputServiceProvider { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(insertText:client:)] unsafe fn insertText_client(&self, string: Option<&Object>, sender: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(doCommandBySelector:client:)] unsafe fn doCommandBySelector_client(&self, selector: Option, sender: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(markedTextAbandoned:)] unsafe fn markedTextAbandoned(&self, sender: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(markedTextSelectionChanged:client:)] unsafe fn markedTextSelectionChanged_client( &self, @@ -28,42 +33,52 @@ extern_protocol!( ); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(terminate:)] unsafe fn terminate(&self, sender: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(canBeDisabled)] unsafe fn canBeDisabled(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(wantsToInterpretAllKeystrokes)] unsafe fn wantsToInterpretAllKeystrokes(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(wantsToHandleMouseEvents)] unsafe fn wantsToHandleMouseEvents(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(wantsToDelayTextChangeNotifications)] unsafe fn wantsToDelayTextChangeNotifications(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(inputClientBecomeActive:)] unsafe fn inputClientBecomeActive(&self, sender: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(inputClientResignActive:)] unsafe fn inputClientResignActive(&self, sender: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(inputClientEnabled:)] unsafe fn inputClientEnabled(&self, sender: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(inputClientDisabled:)] unsafe fn inputClientDisabled(&self, sender: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(activeConversationWillChange:fromOldConversation:)] unsafe fn activeConversationWillChange_fromOldConversation( &self, @@ -72,6 +87,7 @@ extern_protocol!( ); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(activeConversationChanged:toNewConversation:)] unsafe fn activeConversationChanged_toNewConversation( &self, @@ -84,8 +100,10 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSInputServerMouseTracker { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(mouseDownOnCharacterIndex:atCoordinate:withModifier:client:)] unsafe fn mouseDownOnCharacterIndex_atCoordinate_withModifier_client( &self, @@ -96,6 +114,7 @@ extern_protocol!( ) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(mouseDraggedOnCharacterIndex:atCoordinate:withModifier:client:)] unsafe fn mouseDraggedOnCharacterIndex_atCoordinate_withModifier_client( &self, @@ -106,6 +125,7 @@ extern_protocol!( ) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(mouseUpOnCharacterIndex:atCoordinate:withModifier:client:)] unsafe fn mouseUpOnCharacterIndex_atCoordinate_withModifier_client( &self, @@ -123,6 +143,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSInputServer")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub struct NSInputServer; #[cfg(feature = "AppKit_NSInputServer")] @@ -145,6 +166,7 @@ extern_methods!( unsafe impl NSInputServer { #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithDelegate:name:)] pub unsafe fn initWithDelegate_name( this: Option>, diff --git a/AppKit/NSInterfaceStyle.rs b/AppKit/NSInterfaceStyle.rs index 508d6fe38..6bf9cb1c0 100644 --- a/AppKit/NSInterfaceStyle.rs +++ b/AppKit/NSInterfaceStyle.rs @@ -7,14 +7,19 @@ use crate::Foundation::*; extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSNoInterfaceStyle = 0, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSNextStepInterfaceStyle = 1, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSWindows95InterfaceStyle = 2, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSMacintoshInterfaceStyle = 3, } ); @@ -24,6 +29,7 @@ pub type NSInterfaceStyle = NSUInteger; extern_fn!( #[cfg(all(feature = "AppKit_NSResponder", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSInterfaceStyleForKey( key: Option<&NSString>, responder: Option<&NSResponder>, @@ -35,10 +41,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSResponder")] unsafe impl NSResponder { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(interfaceStyle)] pub unsafe fn interfaceStyle(&self) -> NSInterfaceStyle; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setInterfaceStyle:)] pub unsafe fn setInterfaceStyle(&self, interface_style: NSInterfaceStyle); } diff --git a/AppKit/NSItemProvider.rs b/AppKit/NSItemProvider.rs index e076b46fd..256aa96bf 100644 --- a/AppKit/NSItemProvider.rs +++ b/AppKit/NSItemProvider.rs @@ -9,12 +9,15 @@ extern_methods!( /// NSItemSourceInfo #[cfg(feature = "Foundation_NSItemProvider")] unsafe impl NSItemProvider { + #[cfg(not(any(target_os = "ios")))] #[method(sourceFrame)] pub unsafe fn sourceFrame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(containerFrame)] pub unsafe fn containerFrame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(preferredPresentationSize)] pub unsafe fn preferredPresentationSize(&self) -> NSSize; } diff --git a/AppKit/NSKeyValueBinding.rs b/AppKit/NSKeyValueBinding.rs index 296649978..3406af98c 100644 --- a/AppKit/NSKeyValueBinding.rs +++ b/AppKit/NSKeyValueBinding.rs @@ -16,6 +16,7 @@ typed_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSBindingSelectionMarker")] + #[cfg(not(any(target_os = "ios")))] pub struct NSBindingSelectionMarker; #[cfg(feature = "AppKit_NSBindingSelectionMarker")] @@ -30,18 +31,23 @@ unsafe impl NSObjectProtocol for NSBindingSelectionMarker {} extern_methods!( #[cfg(feature = "AppKit_NSBindingSelectionMarker")] unsafe impl NSBindingSelectionMarker { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other multipleValuesSelectionMarker)] pub unsafe fn multipleValuesSelectionMarker() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other noSelectionMarker)] pub unsafe fn noSelectionMarker() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other notApplicableSelectionMarker)] pub unsafe fn notApplicableSelectionMarker() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultPlaceholder:forMarker:onClass:withBinding:)] pub unsafe fn setDefaultPlaceholder_forMarker_onClass_withBinding( placeholder: Option<&Object>, @@ -50,6 +56,7 @@ extern_methods!( binding: &NSBindingName, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultPlaceholderForMarker:onClass:withBinding:)] pub unsafe fn defaultPlaceholderForMarker_onClass_withBinding( marker: Option<&NSBindingSelectionMarker>, @@ -66,6 +73,7 @@ extern_static!(NSNoSelectionMarker: &'static Object); extern_static!(NSNotApplicableMarker: &'static Object); extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSIsControllerMarker(object: Option<&Object>) -> Bool; ); @@ -80,13 +88,17 @@ extern_static!(NSObservedKeyPathKey: &'static NSBindingInfoKey); extern_static!(NSOptionsKey: &'static NSBindingInfoKey); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSEditor: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[method(discardEditing)] unsafe fn discardEditing(&self); + #[cfg(not(any(target_os = "ios")))] #[method(commitEditing)] unsafe fn commitEditing(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(commitEditingWithDelegate:didCommitSelector:contextInfo:)] unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( &self, @@ -96,6 +108,7 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(commitEditingAndReturnError:_)] unsafe fn commitEditingAndReturnError(&self) -> Result<(), Id>; } @@ -104,11 +117,14 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSEditorRegistration: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(objectDidBeginEditing:)] unsafe fn objectDidBeginEditing(&self, editor: &ProtocolObject); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(objectDidEndEditing:)] unsafe fn objectDidEndEditing(&self, editor: &ProtocolObject); diff --git a/AppKit/NSLayoutAnchor.rs b/AppKit/NSLayoutAnchor.rs index e249e0c89..8be54b094 100644 --- a/AppKit/NSLayoutAnchor.rs +++ b/AppKit/NSLayoutAnchor.rs @@ -56,16 +56,20 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other item)] pub unsafe fn item(&self) -> Option>; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(hasAmbiguousLayout)] pub unsafe fn hasAmbiguousLayout(&self) -> bool; #[cfg(all(feature = "AppKit_NSLayoutConstraint", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other constraintsAffectingLayout)] pub unsafe fn constraintsAffectingLayout(&self) -> Id>; } diff --git a/AppKit/NSLayoutConstraint.rs b/AppKit/NSLayoutConstraint.rs index d01eb7915..ab52fb24b 100644 --- a/AppKit/NSLayoutConstraint.rs +++ b/AppKit/NSLayoutConstraint.rs @@ -25,59 +25,96 @@ extern_static!(NSLayoutPriorityFittingSizeCompression: NSLayoutPriority = 50); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSLayoutConstraintOrientation { + #[cfg(not(any(target_os = "ios")))] NSLayoutConstraintOrientationHorizontal = 0, + #[cfg(not(any(target_os = "ios")))] NSLayoutConstraintOrientationVertical = 1, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSLayoutRelation { + #[cfg(not(any(target_os = "ios")))] NSLayoutRelationLessThanOrEqual = -1, + #[cfg(not(any(target_os = "ios")))] NSLayoutRelationEqual = 0, + #[cfg(not(any(target_os = "ios")))] NSLayoutRelationGreaterThanOrEqual = 1, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSLayoutAttribute { + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeLeft = 1, + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeRight = 2, + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeTop = 3, + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeBottom = 4, + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeLeading = 5, + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeTrailing = 6, + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeWidth = 7, + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeHeight = 8, + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeCenterX = 9, + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeCenterY = 10, + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeLastBaseline = 11, + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeBaseline = NSLayoutAttributeLastBaseline, NSLayoutAttributeFirstBaseline = 12, + #[cfg(not(any(target_os = "ios")))] NSLayoutAttributeNotAnAttribute = 0, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSLayoutFormatOptions { + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatAlignAllLeft = 1 << NSLayoutAttributeLeft, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatAlignAllRight = 1 << NSLayoutAttributeRight, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatAlignAllTop = 1 << NSLayoutAttributeTop, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatAlignAllBottom = 1 << NSLayoutAttributeBottom, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatAlignAllLeading = 1 << NSLayoutAttributeLeading, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatAlignAllTrailing = 1 << NSLayoutAttributeTrailing, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatAlignAllCenterX = 1 << NSLayoutAttributeCenterX, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatAlignAllCenterY = 1 << NSLayoutAttributeCenterY, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatAlignAllLastBaseline = 1 << NSLayoutAttributeLastBaseline, NSLayoutFormatAlignAllFirstBaseline = 1 << NSLayoutAttributeFirstBaseline, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatAlignAllBaseline = NSLayoutFormatAlignAllLastBaseline, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatAlignmentMask = 0xFFFF, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatDirectionLeadingToTrailing = 0 << 16, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatDirectionLeftToRight = 1 << 16, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatDirectionRightToLeft = 2 << 16, + #[cfg(not(any(target_os = "ios")))] NSLayoutFormatDirectionMask = 0x3 << 16, } ); @@ -123,27 +160,35 @@ extern_methods!( c: CGFloat, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(priority)] pub unsafe fn priority(&self) -> NSLayoutPriority; + #[cfg(not(any(target_os = "ios")))] #[method(setPriority:)] pub unsafe fn setPriority(&self, priority: NSLayoutPriority); + #[cfg(not(any(target_os = "ios")))] #[method(shouldBeArchived)] pub unsafe fn shouldBeArchived(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShouldBeArchived:)] pub unsafe fn setShouldBeArchived(&self, should_be_archived: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other firstItem)] pub unsafe fn firstItem(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other secondItem)] pub unsafe fn secondItem(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(firstAttribute)] pub unsafe fn firstAttribute(&self) -> NSLayoutAttribute; + #[cfg(not(any(target_os = "ios")))] #[method(secondAttribute)] pub unsafe fn secondAttribute(&self) -> NSLayoutAttribute; @@ -155,15 +200,19 @@ extern_methods!( #[method_id(@__retain_semantics Other secondAnchor)] pub unsafe fn secondAnchor(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(relation)] pub unsafe fn relation(&self) -> NSLayoutRelation; + #[cfg(not(any(target_os = "ios")))] #[method(multiplier)] pub unsafe fn multiplier(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(constant)] pub unsafe fn constant(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setConstant:)] pub unsafe fn setConstant(&self, constant: CGFloat); @@ -210,70 +259,87 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(feature = "AppKit_NSLayoutXAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other leadingAnchor)] pub unsafe fn leadingAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutXAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other trailingAnchor)] pub unsafe fn trailingAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutXAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other leftAnchor)] pub unsafe fn leftAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutXAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other rightAnchor)] pub unsafe fn rightAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutYAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other topAnchor)] pub unsafe fn topAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutYAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bottomAnchor)] pub unsafe fn bottomAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutDimension")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other widthAnchor)] pub unsafe fn widthAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutDimension")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other heightAnchor)] pub unsafe fn heightAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutXAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other centerXAnchor)] pub unsafe fn centerXAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutYAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other centerYAnchor)] pub unsafe fn centerYAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutYAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other firstBaselineAnchor)] pub unsafe fn firstBaselineAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutYAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other lastBaselineAnchor)] pub unsafe fn lastBaselineAnchor(&self) -> Id; #[cfg(all(feature = "AppKit_NSLayoutConstraint", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other constraints)] pub unsafe fn constraints(&self) -> Id>; #[cfg(feature = "AppKit_NSLayoutConstraint")] + #[cfg(not(any(target_os = "ios")))] #[method(addConstraint:)] pub unsafe fn addConstraint(&self, constraint: &NSLayoutConstraint); #[cfg(all(feature = "AppKit_NSLayoutConstraint", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(addConstraints:)] pub unsafe fn addConstraints(&self, constraints: &NSArray); #[cfg(feature = "AppKit_NSLayoutConstraint")] + #[cfg(not(any(target_os = "ios")))] #[method(removeConstraint:)] pub unsafe fn removeConstraint(&self, constraint: &NSLayoutConstraint); #[cfg(all(feature = "AppKit_NSLayoutConstraint", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(removeConstraints:)] pub unsafe fn removeConstraints(&self, constraints: &NSArray); } @@ -283,9 +349,11 @@ extern_methods!( /// NSConstraintBasedLayoutCoreMethods #[cfg(feature = "AppKit_NSWindow")] unsafe impl NSWindow { + #[cfg(not(any(target_os = "ios")))] #[method(updateConstraintsIfNeeded)] pub unsafe fn updateConstraintsIfNeeded(&self); + #[cfg(not(any(target_os = "ios")))] #[method(layoutIfNeeded)] pub unsafe fn layoutIfNeeded(&self); } @@ -295,15 +363,19 @@ extern_methods!( /// NSConstraintBasedLayoutCoreMethods #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { + #[cfg(not(any(target_os = "ios")))] #[method(updateConstraintsForSubtreeIfNeeded)] pub unsafe fn updateConstraintsForSubtreeIfNeeded(&self); + #[cfg(not(any(target_os = "ios")))] #[method(updateConstraints)] pub unsafe fn updateConstraints(&self); + #[cfg(not(any(target_os = "ios")))] #[method(needsUpdateConstraints)] pub unsafe fn needsUpdateConstraints(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setNeedsUpdateConstraints:)] pub unsafe fn setNeedsUpdateConstraints(&self, needs_update_constraints: bool); } @@ -313,15 +385,18 @@ extern_methods!( /// NSConstraintBasedCompatibility #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { + #[cfg(not(any(target_os = "ios")))] #[method(translatesAutoresizingMaskIntoConstraints)] pub unsafe fn translatesAutoresizingMaskIntoConstraints(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setTranslatesAutoresizingMaskIntoConstraints:)] pub unsafe fn setTranslatesAutoresizingMaskIntoConstraints( &self, translates_autoresizing_mask_into_constraints: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(requiresConstraintBasedLayout)] pub unsafe fn requiresConstraintBasedLayout() -> bool; } @@ -335,36 +410,46 @@ extern_methods!( /// NSConstraintBasedLayoutLayering #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { + #[cfg(not(any(target_os = "ios")))] #[method(alignmentRectForFrame:)] pub unsafe fn alignmentRectForFrame(&self, frame: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(frameForAlignmentRect:)] pub unsafe fn frameForAlignmentRect(&self, alignment_rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(alignmentRectInsets)] pub unsafe fn alignmentRectInsets(&self) -> NSEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(firstBaselineOffsetFromTop)] pub unsafe fn firstBaselineOffsetFromTop(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(lastBaselineOffsetFromBottom)] pub unsafe fn lastBaselineOffsetFromBottom(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(baselineOffsetFromBottom)] pub unsafe fn baselineOffsetFromBottom(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(intrinsicContentSize)] pub unsafe fn intrinsicContentSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(invalidateIntrinsicContentSize)] pub unsafe fn invalidateIntrinsicContentSize(&self); + #[cfg(not(any(target_os = "ios")))] #[method(contentHuggingPriorityForOrientation:)] pub unsafe fn contentHuggingPriorityForOrientation( &self, orientation: NSLayoutConstraintOrientation, ) -> NSLayoutPriority; + #[cfg(not(any(target_os = "ios")))] #[method(setContentHuggingPriority:forOrientation:)] pub unsafe fn setContentHuggingPriority_forOrientation( &self, @@ -372,12 +457,14 @@ extern_methods!( orientation: NSLayoutConstraintOrientation, ); + #[cfg(not(any(target_os = "ios")))] #[method(contentCompressionResistancePriorityForOrientation:)] pub unsafe fn contentCompressionResistancePriorityForOrientation( &self, orientation: NSLayoutConstraintOrientation, ) -> NSLayoutPriority; + #[cfg(not(any(target_os = "ios")))] #[method(setContentCompressionResistancePriority:forOrientation:)] pub unsafe fn setContentCompressionResistancePriority_forOrientation( &self, @@ -385,18 +472,22 @@ extern_methods!( orientation: NSLayoutConstraintOrientation, ); + #[cfg(not(any(target_os = "ios")))] #[method(isHorizontalContentSizeConstraintActive)] pub unsafe fn isHorizontalContentSizeConstraintActive(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHorizontalContentSizeConstraintActive:)] pub unsafe fn setHorizontalContentSizeConstraintActive( &self, horizontal_content_size_constraint_active: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(isVerticalContentSizeConstraintActive)] pub unsafe fn isVerticalContentSizeConstraintActive(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setVerticalContentSizeConstraintActive:)] pub unsafe fn setVerticalContentSizeConstraintActive( &self, @@ -410,6 +501,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSControl")] unsafe impl NSControl { #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method(invalidateIntrinsicContentSizeForCell:)] pub unsafe fn invalidateIntrinsicContentSizeForCell(&self, cell: &NSCell); } @@ -419,12 +511,14 @@ extern_methods!( /// NSConstraintBasedLayoutAnchoring #[cfg(feature = "AppKit_NSWindow")] unsafe impl NSWindow { + #[cfg(not(any(target_os = "ios")))] #[method(anchorAttributeForOrientation:)] pub unsafe fn anchorAttributeForOrientation( &self, orientation: NSLayoutConstraintOrientation, ) -> NSLayoutAttribute; + #[cfg(not(any(target_os = "ios")))] #[method(setAnchorAttribute:forOrientation:)] pub unsafe fn setAnchorAttribute_forOrientation( &self, @@ -438,6 +532,7 @@ extern_methods!( /// NSConstraintBasedLayoutFittingSize #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { + #[cfg(not(any(target_os = "ios")))] #[method(fittingSize)] pub unsafe fn fittingSize(&self) -> NSSize; } @@ -448,15 +543,18 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(all(feature = "AppKit_NSLayoutConstraint", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other constraintsAffectingLayoutForOrientation:)] pub unsafe fn constraintsAffectingLayoutForOrientation( &self, orientation: NSLayoutConstraintOrientation, ) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(hasAmbiguousLayout)] pub unsafe fn hasAmbiguousLayout(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(exerciseAmbiguityInLayout)] pub unsafe fn exerciseAmbiguityInLayout(&self); } @@ -467,6 +565,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSWindow")] unsafe impl NSWindow { #[cfg(all(feature = "AppKit_NSLayoutConstraint", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(visualizeConstraints:)] pub unsafe fn visualizeConstraints( &self, diff --git a/AppKit/NSLayoutGuide.rs b/AppKit/NSLayoutGuide.rs index f9a9856bd..faab32e49 100644 --- a/AppKit/NSLayoutGuide.rs +++ b/AppKit/NSLayoutGuide.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSLayoutGuide")] + #[cfg(not(any(target_os = "ios")))] pub struct NSLayoutGuide; #[cfg(feature = "AppKit_NSLayoutGuide")] @@ -28,67 +29,84 @@ unsafe impl NSUserInterfaceItemIdentification for NSLayoutGuide {} extern_methods!( #[cfg(feature = "AppKit_NSLayoutGuide")] unsafe impl NSLayoutGuide { + #[cfg(not(any(target_os = "ios")))] #[method(frame)] pub unsafe fn frame(&self) -> NSRect; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other owningView)] pub unsafe fn owningView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setOwningView:)] pub unsafe fn setOwningView(&self, owning_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: &NSUserInterfaceItemIdentifier); #[cfg(feature = "AppKit_NSLayoutXAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other leadingAnchor)] pub unsafe fn leadingAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutXAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other trailingAnchor)] pub unsafe fn trailingAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutXAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other leftAnchor)] pub unsafe fn leftAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutXAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other rightAnchor)] pub unsafe fn rightAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutYAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other topAnchor)] pub unsafe fn topAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutYAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bottomAnchor)] pub unsafe fn bottomAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutDimension")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other widthAnchor)] pub unsafe fn widthAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutDimension")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other heightAnchor)] pub unsafe fn heightAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutXAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other centerXAnchor)] pub unsafe fn centerXAnchor(&self) -> Id; #[cfg(feature = "AppKit_NSLayoutYAxisAnchor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other centerYAnchor)] pub unsafe fn centerYAnchor(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(hasAmbiguousLayout)] pub unsafe fn hasAmbiguousLayout(&self) -> bool; #[cfg(all(feature = "AppKit_NSLayoutConstraint", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other constraintsAffectingLayoutForOrientation:)] pub unsafe fn constraintsAffectingLayoutForOrientation( &self, @@ -102,14 +120,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(feature = "AppKit_NSLayoutGuide")] + #[cfg(not(any(target_os = "ios")))] #[method(addLayoutGuide:)] pub unsafe fn addLayoutGuide(&self, guide: &NSLayoutGuide); #[cfg(feature = "AppKit_NSLayoutGuide")] + #[cfg(not(any(target_os = "ios")))] #[method(removeLayoutGuide:)] pub unsafe fn removeLayoutGuide(&self, guide: &NSLayoutGuide); #[cfg(all(feature = "AppKit_NSLayoutGuide", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutGuides)] pub unsafe fn layoutGuides(&self) -> Id>; } diff --git a/AppKit/NSLevelIndicator.rs b/AppKit/NSLevelIndicator.rs index cedbfbbb2..45c988aa6 100644 --- a/AppKit/NSLevelIndicator.rs +++ b/AppKit/NSLevelIndicator.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSLevelIndicatorPlaceholderVisibility { + #[cfg(not(any(target_os = "ios")))] NSLevelIndicatorPlaceholderVisibilityAutomatic = 0, + #[cfg(not(any(target_os = "ios")))] NSLevelIndicatorPlaceholderVisibilityAlways = 1, + #[cfg(not(any(target_os = "ios")))] NSLevelIndicatorPlaceholderVisibilityWhileEditing = 2, } ); @@ -17,6 +21,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSLevelIndicator")] + #[cfg(not(any(target_os = "ios")))] pub struct NSLevelIndicator; #[cfg(feature = "AppKit_NSLevelIndicator")] @@ -53,99 +58,129 @@ unsafe impl NSUserInterfaceItemIdentification for NSLevelIndicator {} extern_methods!( #[cfg(feature = "AppKit_NSLevelIndicator")] unsafe impl NSLevelIndicator { + #[cfg(not(any(target_os = "ios")))] #[method(levelIndicatorStyle)] pub unsafe fn levelIndicatorStyle(&self) -> NSLevelIndicatorStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setLevelIndicatorStyle:)] pub unsafe fn setLevelIndicatorStyle(&self, level_indicator_style: NSLevelIndicatorStyle); + #[cfg(not(any(target_os = "ios")))] #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMinValue:)] pub unsafe fn setMinValue(&self, min_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, max_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(warningValue)] pub unsafe fn warningValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setWarningValue:)] pub unsafe fn setWarningValue(&self, warning_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(criticalValue)] pub unsafe fn criticalValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setCriticalValue:)] pub unsafe fn setCriticalValue(&self, critical_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(tickMarkPosition)] pub unsafe fn tickMarkPosition(&self) -> NSTickMarkPosition; + #[cfg(not(any(target_os = "ios")))] #[method(setTickMarkPosition:)] pub unsafe fn setTickMarkPosition(&self, tick_mark_position: NSTickMarkPosition); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfTickMarks)] pub unsafe fn numberOfTickMarks(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfTickMarks:)] pub unsafe fn setNumberOfTickMarks(&self, number_of_tick_marks: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfMajorTickMarks)] pub unsafe fn numberOfMajorTickMarks(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfMajorTickMarks:)] pub unsafe fn setNumberOfMajorTickMarks(&self, number_of_major_tick_marks: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(tickMarkValueAtIndex:)] pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(rectOfTickMarkAtIndex:)] pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fillColor)] pub unsafe fn fillColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setFillColor:)] pub unsafe fn setFillColor(&self, fill_color: Option<&NSColor>); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other warningFillColor)] pub unsafe fn warningFillColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setWarningFillColor:)] pub unsafe fn setWarningFillColor(&self, warning_fill_color: Option<&NSColor>); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other criticalFillColor)] pub unsafe fn criticalFillColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setCriticalFillColor:)] pub unsafe fn setCriticalFillColor(&self, critical_fill_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method(drawsTieredCapacityLevels)] pub unsafe fn drawsTieredCapacityLevels(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsTieredCapacityLevels:)] pub unsafe fn setDrawsTieredCapacityLevels(&self, draws_tiered_capacity_levels: bool); + #[cfg(not(any(target_os = "ios")))] #[method(placeholderVisibility)] pub unsafe fn placeholderVisibility(&self) -> NSLevelIndicatorPlaceholderVisibility; + #[cfg(not(any(target_os = "ios")))] #[method(setPlaceholderVisibility:)] pub unsafe fn setPlaceholderVisibility( &self, @@ -153,18 +188,22 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other ratingImage)] pub unsafe fn ratingImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setRatingImage:)] pub unsafe fn setRatingImage(&self, rating_image: Option<&NSImage>); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other ratingPlaceholderImage)] pub unsafe fn ratingPlaceholderImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setRatingPlaceholderImage:)] pub unsafe fn setRatingPlaceholderImage(&self, rating_placeholder_image: Option<&NSImage>); } @@ -174,6 +213,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSLevelIndicator")] unsafe impl NSLevelIndicator { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSLevelIndicatorCell.rs b/AppKit/NSLevelIndicatorCell.rs index d994ee886..b7ce083a5 100644 --- a/AppKit/NSLevelIndicatorCell.rs +++ b/AppKit/NSLevelIndicatorCell.rs @@ -7,10 +7,15 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSLevelIndicatorStyle { + #[cfg(not(any(target_os = "ios")))] NSLevelIndicatorStyleRelevancy = 0, + #[cfg(not(any(target_os = "ios")))] NSLevelIndicatorStyleContinuousCapacity = 1, + #[cfg(not(any(target_os = "ios")))] NSLevelIndicatorStyleDiscreteCapacity = 2, + #[cfg(not(any(target_os = "ios")))] NSLevelIndicatorStyleRating = 3, } ); @@ -18,6 +23,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSLevelIndicatorCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSLevelIndicatorCell; #[cfg(feature = "AppKit_NSLevelIndicatorCell")] @@ -45,63 +51,82 @@ unsafe impl NSUserInterfaceItemIdentification for NSLevelIndicatorCell {} extern_methods!( #[cfg(feature = "AppKit_NSLevelIndicatorCell")] unsafe impl NSLevelIndicatorCell { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithLevelIndicatorStyle:)] pub unsafe fn initWithLevelIndicatorStyle( this: Option>, level_indicator_style: NSLevelIndicatorStyle, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(levelIndicatorStyle)] pub unsafe fn levelIndicatorStyle(&self) -> NSLevelIndicatorStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setLevelIndicatorStyle:)] pub unsafe fn setLevelIndicatorStyle(&self, level_indicator_style: NSLevelIndicatorStyle); + #[cfg(not(any(target_os = "ios")))] #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMinValue:)] pub unsafe fn setMinValue(&self, min_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, max_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(warningValue)] pub unsafe fn warningValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setWarningValue:)] pub unsafe fn setWarningValue(&self, warning_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(criticalValue)] pub unsafe fn criticalValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setCriticalValue:)] pub unsafe fn setCriticalValue(&self, critical_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(tickMarkPosition)] pub unsafe fn tickMarkPosition(&self) -> NSTickMarkPosition; + #[cfg(not(any(target_os = "ios")))] #[method(setTickMarkPosition:)] pub unsafe fn setTickMarkPosition(&self, tick_mark_position: NSTickMarkPosition); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfTickMarks)] pub unsafe fn numberOfTickMarks(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfTickMarks:)] pub unsafe fn setNumberOfTickMarks(&self, number_of_tick_marks: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfMajorTickMarks)] pub unsafe fn numberOfMajorTickMarks(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfMajorTickMarks:)] pub unsafe fn setNumberOfMajorTickMarks(&self, number_of_major_tick_marks: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(rectOfTickMarkAtIndex:)] pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(tickMarkValueAtIndex:)] pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; } @@ -128,10 +153,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSLevelIndicatorCell")] unsafe impl NSLevelIndicatorCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSMagnificationGestureRecognizer.rs b/AppKit/NSMagnificationGestureRecognizer.rs index dcaa115a7..55e14529e 100644 --- a/AppKit/NSMagnificationGestureRecognizer.rs +++ b/AppKit/NSMagnificationGestureRecognizer.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSMagnificationGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] pub struct NSMagnificationGestureRecognizer; #[cfg(feature = "AppKit_NSMagnificationGestureRecognizer")] @@ -26,9 +27,11 @@ unsafe impl NSObjectProtocol for NSMagnificationGestureRecognizer {} extern_methods!( #[cfg(feature = "AppKit_NSMagnificationGestureRecognizer")] unsafe impl NSMagnificationGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method(magnification)] pub unsafe fn magnification(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMagnification:)] pub unsafe fn setMagnification(&self, magnification: CGFloat); } @@ -38,6 +41,7 @@ extern_methods!( /// Methods declared on superclass `NSGestureRecognizer` #[cfg(feature = "AppKit_NSMagnificationGestureRecognizer")] unsafe impl NSMagnificationGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithTarget:action:)] pub unsafe fn initWithTarget_action( this: Option>, diff --git a/AppKit/NSMatrix.rs b/AppKit/NSMatrix.rs index e9f7a8c83..e1b7116eb 100644 --- a/AppKit/NSMatrix.rs +++ b/AppKit/NSMatrix.rs @@ -7,10 +7,15 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSMatrixMode { + #[cfg(not(any(target_os = "ios")))] NSRadioModeMatrix = 0, + #[cfg(not(any(target_os = "ios")))] NSHighlightModeMatrix = 1, + #[cfg(not(any(target_os = "ios")))] NSListModeMatrix = 2, + #[cfg(not(any(target_os = "ios")))] NSTrackModeMatrix = 3, } ); @@ -18,6 +23,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSMatrix")] + #[cfg(not(any(target_os = "ios")))] pub struct NSMatrix; #[cfg(feature = "AppKit_NSMatrix")] @@ -60,10 +66,12 @@ unsafe impl NSViewToolTipOwner for NSMatrix {} extern_methods!( #[cfg(feature = "AppKit_NSMatrix")] unsafe impl NSMatrix { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:mode:prototype:numberOfRows:numberOfColumns:)] pub unsafe fn initWithFrame_mode_prototype_numberOfRows_numberOfColumns( this: Option>, @@ -74,6 +82,7 @@ extern_methods!( cols_wide: NSInteger, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:mode:cellClass:numberOfRows:numberOfColumns:)] pub unsafe fn initWithFrame_mode_cellClass_numberOfRows_numberOfColumns( this: Option>, @@ -84,46 +93,59 @@ extern_methods!( cols_wide: NSInteger, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(cellClass)] pub unsafe fn cellClass(&self) -> &'static Class; + #[cfg(not(any(target_os = "ios")))] #[method(setCellClass:)] pub unsafe fn setCellClass(&self, cell_class: &Class); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other prototype)] pub unsafe fn prototype(&self) -> Option>; #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method(setPrototype:)] pub unsafe fn setPrototype(&self, prototype: Option<&NSCell>); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeCellAtRow:column:)] pub unsafe fn makeCellAtRow_column(&self, row: NSInteger, col: NSInteger) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(mode)] pub unsafe fn mode(&self) -> NSMatrixMode; + #[cfg(not(any(target_os = "ios")))] #[method(setMode:)] pub unsafe fn setMode(&self, mode: NSMatrixMode); + #[cfg(not(any(target_os = "ios")))] #[method(allowsEmptySelection)] pub unsafe fn allowsEmptySelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsEmptySelection:)] pub unsafe fn setAllowsEmptySelection(&self, allows_empty_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(sendAction:to:forAllCells:)] pub unsafe fn sendAction_to_forAllCells(&self, selector: Sel, object: &Object, flag: bool); #[cfg(all(feature = "AppKit_NSCell", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cells)] pub unsafe fn cells(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(sortUsingSelector:)] pub unsafe fn sortUsingSelector(&self, comparator: Sel); + #[cfg(not(any(target_os = "ios")))] #[method(sortUsingFunction:context:)] pub unsafe fn sortUsingFunction_context( &self, @@ -136,25 +158,32 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedCell)] pub unsafe fn selectedCell(&self) -> Option>; #[cfg(all(feature = "AppKit_NSCell", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedCells)] pub unsafe fn selectedCells(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(selectedRow)] pub unsafe fn selectedRow(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(selectedColumn)] pub unsafe fn selectedColumn(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(isSelectionByRect)] pub unsafe fn isSelectionByRect(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionByRect:)] pub unsafe fn setSelectionByRect(&self, selection_by_rect: bool); + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionFrom:to:anchor:highlight:)] pub unsafe fn setSelectionFrom_to_anchor_highlight( &self, @@ -164,64 +193,83 @@ extern_methods!( lit: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(deselectSelectedCell)] pub unsafe fn deselectSelectedCell(&self); + #[cfg(not(any(target_os = "ios")))] #[method(deselectAllCells)] pub unsafe fn deselectAllCells(&self); + #[cfg(not(any(target_os = "ios")))] #[method(selectCellAtRow:column:)] pub unsafe fn selectCellAtRow_column(&self, row: NSInteger, col: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(selectAll:)] pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(selectCellWithTag:)] pub unsafe fn selectCellWithTag(&self, tag: NSInteger) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(cellSize)] pub unsafe fn cellSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setCellSize:)] pub unsafe fn setCellSize(&self, cell_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(intercellSpacing)] pub unsafe fn intercellSpacing(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setIntercellSpacing:)] pub unsafe fn setIntercellSpacing(&self, intercell_spacing: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(setScrollable:)] pub unsafe fn setScrollable(&self, flag: bool); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: &NSColor); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cellBackgroundColor)] pub unsafe fn cellBackgroundColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setCellBackgroundColor:)] pub unsafe fn setCellBackgroundColor(&self, cell_background_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method(drawsCellBackground)] pub unsafe fn drawsCellBackground(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsCellBackground:)] pub unsafe fn setDrawsCellBackground(&self, draws_cell_background: bool); + #[cfg(not(any(target_os = "ios")))] #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, draws_background: bool); + #[cfg(not(any(target_os = "ios")))] #[method(setState:atRow:column:)] pub unsafe fn setState_atRow_column( &self, @@ -230,6 +278,7 @@ extern_methods!( col: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(getNumberOfRows:columns:)] pub unsafe fn getNumberOfRows_columns( &self, @@ -237,21 +286,26 @@ extern_methods!( col_count: *mut NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfRows)] pub unsafe fn numberOfRows(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfColumns)] pub unsafe fn numberOfColumns(&self) -> NSInteger; #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cellAtRow:column:)] pub unsafe fn cellAtRow_column(&self, row: NSInteger, col: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(cellFrameAtRow:column:)] pub unsafe fn cellFrameAtRow_column(&self, row: NSInteger, col: NSInteger) -> NSRect; #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method(getRow:column:ofCell:)] pub unsafe fn getRow_column_ofCell( &self, @@ -260,6 +314,7 @@ extern_methods!( cell: &NSCell, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(getRow:column:forPoint:)] pub unsafe fn getRow_column_forPoint( &self, @@ -268,10 +323,12 @@ extern_methods!( point: NSPoint, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(renewRows:columns:)] pub unsafe fn renewRows_columns(&self, new_rows: NSInteger, new_cols: NSInteger); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method(putCell:atRow:column:)] pub unsafe fn putCell_atRow_column( &self, @@ -280,17 +337,21 @@ extern_methods!( col: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(addRow)] pub unsafe fn addRow(&self); #[cfg(all(feature = "AppKit_NSCell", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(addRowWithCells:)] pub unsafe fn addRowWithCells(&self, new_cells: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(insertRow:)] pub unsafe fn insertRow(&self, row: NSInteger); #[cfg(all(feature = "AppKit_NSCell", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(insertRow:withCells:)] pub unsafe fn insertRow_withCells( &self, @@ -298,20 +359,25 @@ extern_methods!( new_cells: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method(removeRow:)] pub unsafe fn removeRow(&self, row: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(addColumn)] pub unsafe fn addColumn(&self); #[cfg(all(feature = "AppKit_NSCell", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(addColumnWithCells:)] pub unsafe fn addColumnWithCells(&self, new_cells: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(insertColumn:)] pub unsafe fn insertColumn(&self, column: NSInteger); #[cfg(all(feature = "AppKit_NSCell", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(insertColumn:withCells:)] pub unsafe fn insertColumn_withCells( &self, @@ -319,93 +385,120 @@ extern_methods!( new_cells: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method(removeColumn:)] pub unsafe fn removeColumn(&self, col: NSInteger); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cellWithTag:)] pub unsafe fn cellWithTag(&self, tag: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(doubleAction)] pub unsafe fn doubleAction(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, double_action: Option); + #[cfg(not(any(target_os = "ios")))] #[method(autosizesCells)] pub unsafe fn autosizesCells(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutosizesCells:)] pub unsafe fn setAutosizesCells(&self, autosizes_cells: bool); + #[cfg(not(any(target_os = "ios")))] #[method(sizeToCells)] pub unsafe fn sizeToCells(&self); + #[cfg(not(any(target_os = "ios")))] #[method(setValidateSize:)] pub unsafe fn setValidateSize(&self, flag: bool); + #[cfg(not(any(target_os = "ios")))] #[method(drawCellAtRow:column:)] pub unsafe fn drawCellAtRow_column(&self, row: NSInteger, col: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(highlightCell:atRow:column:)] pub unsafe fn highlightCell_atRow_column(&self, flag: bool, row: NSInteger, col: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(isAutoscroll)] pub unsafe fn isAutoscroll(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutoscroll:)] pub unsafe fn setAutoscroll(&self, autoscroll: bool); + #[cfg(not(any(target_os = "ios")))] #[method(scrollCellToVisibleAtRow:column:)] pub unsafe fn scrollCellToVisibleAtRow_column(&self, row: NSInteger, col: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(mouseDownFlags)] pub unsafe fn mouseDownFlags(&self) -> NSInteger; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseDown:)] pub unsafe fn mouseDown(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(performKeyEquivalent:)] pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(sendAction)] pub unsafe fn sendAction(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(sendDoubleAction)] pub unsafe fn sendDoubleAction(&self); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); #[cfg(feature = "AppKit_NSText")] + #[cfg(not(any(target_os = "ios")))] #[method(textShouldBeginEditing:)] pub unsafe fn textShouldBeginEditing(&self, text_object: &NSText) -> bool; #[cfg(feature = "AppKit_NSText")] + #[cfg(not(any(target_os = "ios")))] #[method(textShouldEndEditing:)] pub unsafe fn textShouldEndEditing(&self, text_object: &NSText) -> bool; #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[method(textDidBeginEditing:)] pub unsafe fn textDidBeginEditing(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[method(textDidEndEditing:)] pub unsafe fn textDidEndEditing(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[method(textDidChange:)] pub unsafe fn textDidChange(&self, notification: &NSNotification); + #[cfg(not(any(target_os = "ios")))] #[method(selectText:)] pub unsafe fn selectText(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectTextAtRow:column:)] pub unsafe fn selectTextAtRow_column( &self, @@ -414,23 +507,29 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(acceptsFirstMouse:)] pub unsafe fn acceptsFirstMouse(&self, event: Option<&NSEvent>) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(resetCursorRects)] pub unsafe fn resetCursorRects(&self); #[cfg(all(feature = "AppKit_NSCell", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setToolTip:forCell:)] pub unsafe fn setToolTip_forCell(&self, tool_tip_string: Option<&NSString>, cell: &NSCell); #[cfg(all(feature = "AppKit_NSCell", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolTipForCell:)] pub unsafe fn toolTipForCell(&self, cell: &NSCell) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(autorecalculatesCellSize)] pub unsafe fn autorecalculatesCellSize(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutorecalculatesCellSize:)] pub unsafe fn setAutorecalculatesCellSize(&self, autorecalculates_cell_size: bool); } @@ -440,23 +539,28 @@ extern_methods!( /// NSKeyboardUI #[cfg(feature = "AppKit_NSMatrix")] unsafe impl NSMatrix { + #[cfg(not(any(target_os = "ios")))] #[method(tabKeyTraversesCells)] pub unsafe fn tabKeyTraversesCells(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setTabKeyTraversesCells:)] pub unsafe fn setTabKeyTraversesCells(&self, tab_key_traverses_cells: bool); #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other keyCell)] pub unsafe fn keyCell(&self) -> Option>; #[cfg(feature = "AppKit_NSCell")] + #[cfg(not(any(target_os = "ios")))] #[method(setKeyCell:)] pub unsafe fn setKeyCell(&self, key_cell: Option<&NSCell>); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSMatrixDelegate: NSControlTextEditingDelegate {} unsafe impl ProtocolType for dyn NSMatrixDelegate {} diff --git a/AppKit/NSMediaLibraryBrowserController.rs b/AppKit/NSMediaLibraryBrowserController.rs index 6d4fd4d27..05a9f3a07 100644 --- a/AppKit/NSMediaLibraryBrowserController.rs +++ b/AppKit/NSMediaLibraryBrowserController.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSMediaLibrary { + #[cfg(not(any(target_os = "ios")))] NSMediaLibraryAudio = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSMediaLibraryImage = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSMediaLibraryMovie = 1 << 2, } ); @@ -17,6 +21,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSMediaLibraryBrowserController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSMediaLibraryBrowserController; #[cfg(feature = "AppKit_NSMediaLibraryBrowserController")] @@ -31,27 +36,35 @@ unsafe impl NSObjectProtocol for NSMediaLibraryBrowserController {} extern_methods!( #[cfg(feature = "AppKit_NSMediaLibraryBrowserController")] unsafe impl NSMediaLibraryBrowserController { + #[cfg(not(any(target_os = "ios")))] #[method(isVisible)] pub unsafe fn isVisible(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setVisible:)] pub unsafe fn setVisible(&self, visible: bool); + #[cfg(not(any(target_os = "ios")))] #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setFrame:)] pub unsafe fn setFrame(&self, frame: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(mediaLibraries)] pub unsafe fn mediaLibraries(&self) -> NSMediaLibrary; + #[cfg(not(any(target_os = "ios")))] #[method(setMediaLibraries:)] pub unsafe fn setMediaLibraries(&self, media_libraries: NSMediaLibrary); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedMediaLibraryBrowserController)] pub unsafe fn sharedMediaLibraryBrowserController() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(togglePanel:)] pub unsafe fn togglePanel(&self, sender: Option<&Object>); } diff --git a/AppKit/NSMenu.rs b/AppKit/NSMenu.rs index de51ac4ec..d9728322b 100644 --- a/AppKit/NSMenu.rs +++ b/AppKit/NSMenu.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] pub struct NSMenu; #[cfg(feature = "AppKit_NSMenu")] @@ -38,22 +39,27 @@ extern_methods!( #[cfg(feature = "AppKit_NSMenu")] unsafe impl NSMenu { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithTitle:)] pub unsafe fn initWithTitle(this: Option>, title: &NSString) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(popUpContextMenu:withEvent:forView:)] pub unsafe fn popUpContextMenu_withEvent_forView( menu: &NSMenu, @@ -66,6 +72,7 @@ extern_methods!( feature = "AppKit_NSFont", feature = "AppKit_NSView" ))] + #[cfg(not(any(target_os = "ios")))] #[method(popUpContextMenu:withEvent:forView:withFont:)] pub unsafe fn popUpContextMenu_withEvent_forView_withFont( menu: &NSMenu, @@ -75,6 +82,7 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSMenuItem", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(popUpMenuPositioningItem:atLocation:inView:)] pub unsafe fn popUpMenuPositioningItem_atLocation_inView( &self, @@ -83,27 +91,34 @@ extern_methods!( view: Option<&NSView>, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setMenuBarVisible:)] pub unsafe fn setMenuBarVisible(visible: bool); + #[cfg(not(any(target_os = "ios")))] #[method(menuBarVisible)] pub unsafe fn menuBarVisible() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other supermenu)] pub unsafe fn supermenu(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setSupermenu:)] pub unsafe fn setSupermenu(&self, supermenu: Option<&NSMenu>); #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(insertItem:atIndex:)] pub unsafe fn insertItem_atIndex(&self, new_item: &NSMenuItem, index: NSInteger); #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(addItem:)] pub unsafe fn addItem(&self, new_item: &NSMenuItem); #[cfg(all(feature = "AppKit_NSMenuItem", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other insertItemWithTitle:action:keyEquivalent:atIndex:)] pub unsafe fn insertItemWithTitle_action_keyEquivalent_atIndex( &self, @@ -114,6 +129,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "AppKit_NSMenuItem", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other addItemWithTitle:action:keyEquivalent:)] pub unsafe fn addItemWithTitle_action_keyEquivalent( &self, @@ -122,53 +138,67 @@ extern_methods!( char_code: &NSString, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(removeItemAtIndex:)] pub unsafe fn removeItemAtIndex(&self, index: NSInteger); #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(removeItem:)] pub unsafe fn removeItem(&self, item: &NSMenuItem); #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(setSubmenu:forItem:)] pub unsafe fn setSubmenu_forItem(&self, menu: Option<&NSMenu>, item: &NSMenuItem); + #[cfg(not(any(target_os = "ios")))] #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); #[cfg(all(feature = "AppKit_NSMenuItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemArray)] pub unsafe fn itemArray(&self) -> Id>; #[cfg(all(feature = "AppKit_NSMenuItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setItemArray:)] pub unsafe fn setItemArray(&self, item_array: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemAtIndex:)] pub unsafe fn itemAtIndex(&self, index: NSInteger) -> Option>; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItem:)] pub unsafe fn indexOfItem(&self, item: &NSMenuItem) -> NSInteger; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithTitle:)] pub unsafe fn indexOfItemWithTitle(&self, title: &NSString) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithTag:)] pub unsafe fn indexOfItemWithTag(&self, tag: NSInteger) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithRepresentedObject:)] pub unsafe fn indexOfItemWithRepresentedObject(&self, object: Option<&Object>) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithSubmenu:)] pub unsafe fn indexOfItemWithSubmenu(&self, submenu: Option<&NSMenu>) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithTarget:andAction:)] pub unsafe fn indexOfItemWithTarget_andAction( &self, @@ -177,84 +207,109 @@ extern_methods!( ) -> NSInteger; #[cfg(all(feature = "AppKit_NSMenuItem", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithTitle:)] pub unsafe fn itemWithTitle(&self, title: &NSString) -> Option>; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithTag:)] pub unsafe fn itemWithTag(&self, tag: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(autoenablesItems)] pub unsafe fn autoenablesItems(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutoenablesItems:)] pub unsafe fn setAutoenablesItems(&self, autoenables_items: bool); + #[cfg(not(any(target_os = "ios")))] #[method(update)] pub unsafe fn update(&self); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(performKeyEquivalent:)] pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(itemChanged:)] pub unsafe fn itemChanged(&self, item: &NSMenuItem); + #[cfg(not(any(target_os = "ios")))] #[method(performActionForItemAtIndex:)] pub unsafe fn performActionForItemAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[method(menuBarHeight)] pub unsafe fn menuBarHeight(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(cancelTracking)] pub unsafe fn cancelTracking(&self); + #[cfg(not(any(target_os = "ios")))] #[method(cancelTrackingWithoutAnimation)] pub unsafe fn cancelTrackingWithoutAnimation(&self); #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other highlightedItem)] pub unsafe fn highlightedItem(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(minimumWidth)] pub unsafe fn minimumWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMinimumWidth:)] pub unsafe fn setMinimumWidth(&self, minimum_width: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(size)] pub unsafe fn size(&self) -> NSSize; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other font)] pub unsafe fn font(&self) -> Option>; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(setFont:)] pub unsafe fn setFont(&self, font: Option<&NSFont>); + #[cfg(not(any(target_os = "ios")))] #[method(allowsContextMenuPlugIns)] pub unsafe fn allowsContextMenuPlugIns(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsContextMenuPlugIns:)] pub unsafe fn setAllowsContextMenuPlugIns(&self, allows_context_menu_plug_ins: bool); + #[cfg(not(any(target_os = "ios")))] #[method(showsStateColumn)] pub unsafe fn showsStateColumn(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsStateColumn:)] pub unsafe fn setShowsStateColumn(&self, shows_state_column: bool); + #[cfg(not(any(target_os = "ios")))] #[method(userInterfaceLayoutDirection)] pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setUserInterfaceLayoutDirection:)] pub unsafe fn setUserInterfaceLayoutDirection( &self, @@ -267,14 +322,17 @@ extern_methods!( /// NSSubmenuAction #[cfg(feature = "AppKit_NSMenu")] unsafe impl NSMenu { + #[cfg(not(any(target_os = "ios")))] #[method(submenuAction:)] pub unsafe fn submenuAction(&self, sender: Option<&Object>); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSMenuItemValidation: NSObjectProtocol { #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(validateMenuItem:)] unsafe fn validateMenuItem(&self, menu_item: &NSMenuItem) -> bool; } @@ -283,18 +341,22 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSMenuDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(menuNeedsUpdate:)] unsafe fn menuNeedsUpdate(&self, menu: &NSMenu); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(numberOfItemsInMenu:)] unsafe fn numberOfItemsInMenu(&self, menu: &NSMenu) -> NSInteger; #[cfg(all(feature = "AppKit_NSMenu", feature = "AppKit_NSMenuItem"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(menu:updateItem:atIndex:shouldCancel:)] unsafe fn menu_updateItem_atIndex_shouldCancel( @@ -306,21 +368,25 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(menuWillOpen:)] unsafe fn menuWillOpen(&self, menu: &NSMenu); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(menuDidClose:)] unsafe fn menuDidClose(&self, menu: &NSMenu); #[cfg(all(feature = "AppKit_NSMenu", feature = "AppKit_NSMenuItem"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(menu:willHighlightItem:)] unsafe fn menu_willHighlightItem(&self, menu: &NSMenu, item: Option<&NSMenuItem>); #[cfg(all(feature = "AppKit_NSMenu", feature = "AppKit_NSScreen"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(confinementRectForMenu:onScreen:)] unsafe fn confinementRectForMenu_onScreen( @@ -335,12 +401,19 @@ extern_protocol!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSMenuProperties { + #[cfg(not(any(target_os = "ios")))] NSMenuPropertyItemTitle = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSMenuPropertyItemAttributedTitle = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSMenuPropertyItemKeyEquivalent = 1 << 2, + #[cfg(not(any(target_os = "ios")))] NSMenuPropertyItemImage = 1 << 3, + #[cfg(not(any(target_os = "ios")))] NSMenuPropertyItemEnabled = 1 << 4, + #[cfg(not(any(target_os = "ios")))] NSMenuPropertyItemAccessibilityDescription = 1 << 5, } ); @@ -349,6 +422,7 @@ extern_methods!( /// NSMenuPropertiesToUpdate #[cfg(feature = "AppKit_NSMenu")] unsafe impl NSMenu { + #[cfg(not(any(target_os = "ios")))] #[method(propertiesToUpdate)] pub unsafe fn propertiesToUpdate(&self) -> NSMenuProperties; } @@ -373,67 +447,83 @@ extern_methods!( #[cfg(feature = "AppKit_NSMenu")] unsafe impl NSMenu { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setMenuRepresentation:)] pub unsafe fn setMenuRepresentation(&self, menu_rep: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuRepresentation)] pub unsafe fn menuRepresentation(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setContextMenuRepresentation:)] pub unsafe fn setContextMenuRepresentation(&self, menu_rep: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contextMenuRepresentation)] pub unsafe fn contextMenuRepresentation(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setTearOffMenuRepresentation:)] pub unsafe fn setTearOffMenuRepresentation(&self, menu_rep: Option<&Object>); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tearOffMenuRepresentation)] pub unsafe fn tearOffMenuRepresentation(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(menuZone)] pub unsafe fn menuZone() -> *mut NSZone; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setMenuZone:)] pub unsafe fn setMenuZone(zone: *mut NSZone); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attachedMenu)] pub unsafe fn attachedMenu(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(isAttached)] pub unsafe fn isAttached(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(locationForSubmenu:)] pub unsafe fn locationForSubmenu(&self, submenu: Option<&NSMenu>) -> NSPoint; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(menuChangedMessagesEnabled)] pub unsafe fn menuChangedMessagesEnabled(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setMenuChangedMessagesEnabled:)] pub unsafe fn setMenuChangedMessagesEnabled(&self, menu_changed_messages_enabled: bool); #[cfg(feature = "AppKit_NSEvent")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(helpRequested:)] pub unsafe fn helpRequested(&self, event_ptr: &NSEvent); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(isTornOff)] pub unsafe fn isTornOff(&self) -> bool; } diff --git a/AppKit/NSMenuItem.rs b/AppKit/NSMenuItem.rs index c7c0db54a..23ca828ea 100644 --- a/AppKit/NSMenuItem.rs +++ b/AppKit/NSMenuItem.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSMenuItem; #[cfg(feature = "AppKit_NSMenuItem")] @@ -37,16 +38,20 @@ unsafe impl NSValidatedUserInterfaceItem for NSMenuItem {} extern_methods!( #[cfg(feature = "AppKit_NSMenuItem")] unsafe impl NSMenuItem { + #[cfg(not(any(target_os = "ios")))] #[method(usesUserKeyEquivalents)] pub unsafe fn usesUserKeyEquivalents() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesUserKeyEquivalents:)] pub unsafe fn setUsesUserKeyEquivalents(uses_user_key_equivalents: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other separatorItem)] pub unsafe fn separatorItem() -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithTitle:action:keyEquivalent:)] pub unsafe fn initWithTitle_action_keyEquivalent( this: Option>, @@ -56,61 +61,77 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[cfg(not(any(target_os = "ios")))] #[method(hasSubmenu)] pub unsafe fn hasSubmenu(&self) -> bool; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other submenu)] pub unsafe fn submenu(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setSubmenu:)] pub unsafe fn setSubmenu(&self, submenu: Option<&NSMenu>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other parentItem)] pub unsafe fn parentItem(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Option>; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributed_title: Option<&NSAttributedString>); + #[cfg(not(any(target_os = "ios")))] #[method(isSeparatorItem)] pub unsafe fn isSeparatorItem(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other keyEquivalent)] pub unsafe fn keyEquivalent(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setKeyEquivalent:)] pub unsafe fn setKeyEquivalent(&self, key_equivalent: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(keyEquivalentModifierMask)] pub unsafe fn keyEquivalentModifierMask(&self) -> NSEventModifierFlags; + #[cfg(not(any(target_os = "ios")))] #[method(setKeyEquivalentModifierMask:)] pub unsafe fn setKeyEquivalentModifierMask( &self, @@ -118,30 +139,37 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other userKeyEquivalent)] pub unsafe fn userKeyEquivalent(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(allowsKeyEquivalentWhenHidden)] pub unsafe fn allowsKeyEquivalentWhenHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsKeyEquivalentWhenHidden:)] pub unsafe fn setAllowsKeyEquivalentWhenHidden( &self, allows_key_equivalent_when_hidden: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(allowsAutomaticKeyEquivalentLocalization)] pub unsafe fn allowsAutomaticKeyEquivalentLocalization(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsAutomaticKeyEquivalentLocalization:)] pub unsafe fn setAllowsAutomaticKeyEquivalentLocalization( &self, allows_automatic_key_equivalent_localization: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(allowsAutomaticKeyEquivalentMirroring)] pub unsafe fn allowsAutomaticKeyEquivalentMirroring(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsAutomaticKeyEquivalentMirroring:)] pub unsafe fn setAllowsAutomaticKeyEquivalentMirroring( &self, @@ -149,110 +177,142 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[cfg(not(any(target_os = "ios")))] #[method(state)] pub unsafe fn state(&self) -> NSControlStateValue; + #[cfg(not(any(target_os = "ios")))] #[method(setState:)] pub unsafe fn setState(&self, state: NSControlStateValue); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other onStateImage)] pub unsafe fn onStateImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setOnStateImage:)] pub unsafe fn setOnStateImage(&self, on_state_image: Option<&NSImage>); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other offStateImage)] pub unsafe fn offStateImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setOffStateImage:)] pub unsafe fn setOffStateImage(&self, off_state_image: Option<&NSImage>); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mixedStateImage)] pub unsafe fn mixedStateImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setMixedStateImage:)] pub unsafe fn setMixedStateImage(&self, mixed_state_image: Option<&NSImage>); + #[cfg(not(any(target_os = "ios")))] #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isAlternate)] pub unsafe fn isAlternate(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAlternate:)] pub unsafe fn setAlternate(&self, alternate: bool); + #[cfg(not(any(target_os = "ios")))] #[method(indentationLevel)] pub unsafe fn indentationLevel(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setIndentationLevel:)] pub unsafe fn setIndentationLevel(&self, indentation_level: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(action)] pub unsafe fn action(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[cfg(not(any(target_os = "ios")))] #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other representedObject)] pub unsafe fn representedObject(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setRepresentedObject:)] pub unsafe fn setRepresentedObject(&self, represented_object: Option<&Object>); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(isHighlighted)] pub unsafe fn isHighlighted(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isHiddenOrHasHiddenAncestor)] pub unsafe fn isHiddenOrHasHiddenAncestor(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolTip)] pub unsafe fn toolTip(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setToolTip:)] pub unsafe fn setToolTip(&self, tool_tip: Option<&NSString>); } @@ -263,6 +323,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other enclosingMenuItem)] pub unsafe fn enclosingMenuItem(&self) -> Option>; } @@ -275,20 +336,24 @@ extern_methods!( #[cfg(feature = "AppKit_NSMenuItem")] unsafe impl NSMenuItem { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setMnemonicLocation:)] pub unsafe fn setMnemonicLocation(&self, location: NSUInteger); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(mnemonicLocation)] pub unsafe fn mnemonicLocation(&self) -> NSUInteger; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mnemonic)] pub unsafe fn mnemonic(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, string_with_ampersand: &NSString); } diff --git a/AppKit/NSMenuItemCell.rs b/AppKit/NSMenuItemCell.rs index 98d64c36c..e2f8e51f2 100644 --- a/AppKit/NSMenuItemCell.rs +++ b/AppKit/NSMenuItemCell.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSMenuItemCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSMenuItemCell; #[cfg(feature = "AppKit_NSMenuItemCell")] @@ -36,58 +37,75 @@ extern_methods!( #[cfg(feature = "AppKit_NSMenuItemCell")] unsafe impl NSMenuItemCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuItem)] pub unsafe fn menuItem(&self) -> Option>; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenuItem:)] pub unsafe fn setMenuItem(&self, menu_item: Option<&NSMenuItem>); + #[cfg(not(any(target_os = "ios")))] #[method(needsSizing)] pub unsafe fn needsSizing(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setNeedsSizing:)] pub unsafe fn setNeedsSizing(&self, needs_sizing: bool); + #[cfg(not(any(target_os = "ios")))] #[method(calcSize)] pub unsafe fn calcSize(&self); + #[cfg(not(any(target_os = "ios")))] #[method(needsDisplay)] pub unsafe fn needsDisplay(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setNeedsDisplay:)] pub unsafe fn setNeedsDisplay(&self, needs_display: bool); + #[cfg(not(any(target_os = "ios")))] #[method(stateImageWidth)] pub unsafe fn stateImageWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(imageWidth)] pub unsafe fn imageWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(titleWidth)] pub unsafe fn titleWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(keyEquivalentWidth)] pub unsafe fn keyEquivalentWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(stateImageRectForBounds:)] pub unsafe fn stateImageRectForBounds(&self, cell_frame: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(titleRectForBounds:)] pub unsafe fn titleRectForBounds(&self, cell_frame: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(keyEquivalentRectForBounds:)] pub unsafe fn keyEquivalentRectForBounds(&self, cell_frame: NSRect) -> NSRect; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawSeparatorItemWithFrame:inView:)] pub unsafe fn drawSeparatorItemWithFrame_inView( &self, @@ -96,6 +114,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawStateImageWithFrame:inView:)] pub unsafe fn drawStateImageWithFrame_inView( &self, @@ -104,14 +123,17 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawImageWithFrame:inView:)] pub unsafe fn drawImageWithFrame_inView(&self, cell_frame: NSRect, control_view: &NSView); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawTitleWithFrame:inView:)] pub unsafe fn drawTitleWithFrame_inView(&self, cell_frame: NSRect, control_view: &NSView); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawKeyEquivalentWithFrame:inView:)] pub unsafe fn drawKeyEquivalentWithFrame_inView( &self, @@ -120,6 +142,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawBorderAndBackgroundWithFrame:inView:)] pub unsafe fn drawBorderAndBackgroundWithFrame_inView( &self, @@ -127,9 +150,11 @@ extern_methods!( control_view: &NSView, ); + #[cfg(not(any(target_os = "ios")))] #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); } @@ -140,6 +165,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSMenuItemCell")] unsafe impl NSMenuItemCell { #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSMenuToolbarItem.rs b/AppKit/NSMenuToolbarItem.rs index 105f29ac6..129d91479 100644 --- a/AppKit/NSMenuToolbarItem.rs +++ b/AppKit/NSMenuToolbarItem.rs @@ -24,10 +24,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSMenuToolbarItem")] unsafe impl NSMenuToolbarItem { #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Id; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: &NSMenu); diff --git a/AppKit/NSMovie.rs b/AppKit/NSMovie.rs index 9aa80d9d3..aef6755b0 100644 --- a/AppKit/NSMovie.rs +++ b/AppKit/NSMovie.rs @@ -9,6 +9,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSMovie")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub struct NSMovie; #[cfg(feature = "AppKit_NSMovie")] @@ -27,6 +28,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSMovie")] unsafe impl NSMovie { #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, @@ -34,6 +36,7 @@ extern_methods!( ) -> Option>; #[deprecated = "As of macOS 10.15 this method always returns nil."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Option>; } diff --git a/AppKit/NSNib.rs b/AppKit/NSNib.rs index b1f8f9183..f8eb2ac71 100644 --- a/AppKit/NSNib.rs +++ b/AppKit/NSNib.rs @@ -10,6 +10,7 @@ pub type NSNibName = NSString; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSNib")] + #[cfg(not(any(target_os = "ios")))] pub struct NSNib; #[cfg(feature = "AppKit_NSNib")] @@ -28,6 +29,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSNib")] unsafe impl NSNib { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibNamed:bundle:)] pub unsafe fn initWithNibNamed_bundle( this: Option>, @@ -36,6 +38,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSBundle", feature = "Foundation_NSData"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibData:bundle:)] pub unsafe fn initWithNibData_bundle( this: Option>, @@ -51,6 +54,7 @@ extern_methods!( unsafe impl NSNib { #[cfg(feature = "Foundation_NSURL")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, @@ -59,6 +63,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSDictionary")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(instantiateNibWithExternalNameTable:)] pub unsafe fn instantiateNibWithExternalNameTable( &self, @@ -67,6 +72,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSArray")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(instantiateNibWithOwner:topLevelObjects:)] pub unsafe fn instantiateNibWithOwner_topLevelObjects( &self, diff --git a/AppKit/NSNibLoading.rs b/AppKit/NSNibLoading.rs index 242d74418..0927a3c87 100644 --- a/AppKit/NSNibLoading.rs +++ b/AppKit/NSNibLoading.rs @@ -17,6 +17,7 @@ extern_methods!( unsafe impl NSBundle { #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(loadNibFile:externalNameTable:withZone:)] pub unsafe fn loadNibFile_externalNameTable_withZone_class( file_name: Option<&NSString>, @@ -26,6 +27,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(loadNibNamed:owner:)] pub unsafe fn loadNibNamed_owner( nib_name: Option<&NSString>, @@ -34,6 +36,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(loadNibFile:externalNameTable:withZone:)] pub unsafe fn loadNibFile_externalNameTable_withZone( &self, diff --git a/AppKit/NSObjectController.rs b/AppKit/NSObjectController.rs index 14f70ff4e..00ce49e8c 100644 --- a/AppKit/NSObjectController.rs +++ b/AppKit/NSObjectController.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSObjectController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSObjectController; #[cfg(feature = "AppKit_NSObjectController")] @@ -32,6 +33,7 @@ unsafe impl NSObjectProtocol for NSObjectController {} extern_methods!( #[cfg(feature = "AppKit_NSObjectController")] unsafe impl NSObjectController { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContent:)] pub unsafe fn initWithContent( this: Option>, @@ -39,67 +41,87 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other content)] pub unsafe fn content(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setContent:)] pub unsafe fn setContent(&self, content: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selection)] pub unsafe fn selection(&self) -> Id; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedObjects)] pub unsafe fn selectedObjects(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(automaticallyPreparesContent)] pub unsafe fn automaticallyPreparesContent(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticallyPreparesContent:)] pub unsafe fn setAutomaticallyPreparesContent(&self, automatically_prepares_content: bool); + #[cfg(not(any(target_os = "ios")))] #[method(prepareContent)] pub unsafe fn prepareContent(&self); + #[cfg(not(any(target_os = "ios")))] #[method(objectClass)] pub unsafe fn objectClass(&self) -> Option<&'static Class>; + #[cfg(not(any(target_os = "ios")))] #[method(setObjectClass:)] pub unsafe fn setObjectClass(&self, object_class: Option<&Class>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New newObject)] pub unsafe fn newObject(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(addObject:)] pub unsafe fn addObject(&self, object: &Object); + #[cfg(not(any(target_os = "ios")))] #[method(removeObject:)] pub unsafe fn removeObject(&self, object: &Object); + #[cfg(not(any(target_os = "ios")))] #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(add:)] pub unsafe fn add(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(canAdd)] pub unsafe fn canAdd(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(remove:)] pub unsafe fn remove(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(canRemove)] pub unsafe fn canRemove(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(validateUserInterfaceItem:)] pub unsafe fn validateUserInterfaceItem( &self, @@ -113,10 +135,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSObjectController")] unsafe impl NSObjectController { #[cfg(feature = "CoreData_NSManagedObjectContext")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other managedObjectContext)] pub unsafe fn managedObjectContext(&self) -> Option>; #[cfg(feature = "CoreData_NSManagedObjectContext")] + #[cfg(not(any(target_os = "ios")))] #[method(setManagedObjectContext:)] pub unsafe fn setManagedObjectContext( &self, @@ -124,22 +148,27 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other entityName)] pub unsafe fn entityName(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setEntityName:)] pub unsafe fn setEntityName(&self, entity_name: Option<&NSString>); #[cfg(feature = "Foundation_NSPredicate")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fetchPredicate)] pub unsafe fn fetchPredicate(&self) -> Option>; #[cfg(feature = "Foundation_NSPredicate")] + #[cfg(not(any(target_os = "ios")))] #[method(setFetchPredicate:)] pub unsafe fn setFetchPredicate(&self, fetch_predicate: Option<&NSPredicate>); #[cfg(all(feature = "CoreData_NSFetchRequest", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "ios")))] #[method(fetchWithRequest:merge:error:_)] pub unsafe fn fetchWithRequest_merge_error( &self, @@ -147,16 +176,20 @@ extern_methods!( merge: bool, ) -> Result<(), Id>; + #[cfg(not(any(target_os = "ios")))] #[method(fetch:)] pub unsafe fn fetch(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(usesLazyFetching)] pub unsafe fn usesLazyFetching(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesLazyFetching:)] pub unsafe fn setUsesLazyFetching(&self, uses_lazy_fetching: bool); #[cfg(feature = "CoreData_NSFetchRequest")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultFetchRequest)] pub unsafe fn defaultFetchRequest(&self) -> Id; } diff --git a/AppKit/NSOpenGL.rs b/AppKit/NSOpenGL.rs index 9e67f2b7f..bd54a1f59 100644 --- a/AppKit/NSOpenGL.rs +++ b/AppKit/NSOpenGL.rs @@ -8,100 +8,146 @@ use crate::Foundation::*; ns_enum!( #[underlying(u32)] #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] pub enum NSOpenGLGlobalOption { #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLGOFormatCacheSize = 501, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLGOClearFormatCache = 502, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLGORetainRenderers = 503, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLGOUseBuildCache = 506, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLGOResetLibrary = 504, } ); extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAAllRenderers = 1, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFATripleBuffer = 3, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFADoubleBuffer = 5, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAAuxBuffers = 7, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAColorSize = 8, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAAlphaSize = 11, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFADepthSize = 12, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAStencilSize = 13, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAAccumSize = 14, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAMinimumPolicy = 51, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAMaximumPolicy = 52, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFASampleBuffers = 55, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFASamples = 56, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAAuxDepthStencil = 57, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAColorFloat = 58, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAMultisample = 59, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFASupersample = 60, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFASampleAlpha = 61, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFARendererID = 70, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFANoRecovery = 72, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAAccelerated = 73, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAClosestPolicy = 74, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFABackingStore = 76, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAScreenMask = 84, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAAllowOfflineRenderers = 96, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAAcceleratedCompute = 97, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAOpenGLProfile = 99, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAVirtualScreenCount = 128, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAStereo = 6, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAOffScreen = 53, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAFullScreen = 54, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFASingleRenderer = 71, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFARobust = 75, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAMPSafe = 78, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAWindow = 80, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAMultiScreen = 81, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFACompliant = 83, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFAPixelBuffer = 90, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLPFARemotePixelBuffer = 91, } ); @@ -110,12 +156,16 @@ pub type NSOpenGLPixelFormatAttribute = u32; extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLProfileVersionLegacy = 0x1000, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLProfileVersion3_2Core = 0x3200, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLProfileVersion4_1Core = 0x4100, } ); @@ -123,36 +173,52 @@ extern_enum!( ns_enum!( #[underlying(NSInteger)] #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] pub enum NSOpenGLContextParameter { #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterSwapInterval = 222, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterSurfaceOrder = 235, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterSurfaceOpacity = 236, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterSurfaceBackingSize = 304, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterReclaimResources = 308, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterCurrentRendererID = 309, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterGPUVertexProcessing = 310, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterGPUFragmentProcessing = 311, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterHasDrawable = 314, #[deprecated = "OpenGL API deprecated; please use Metal and MetalKit. (Define GL_SILENCE_DEPRECATION to silence these warnings.)"] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterMPSwapsInFlight = 315, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterSwapRectangle = 200, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterSwapRectangleEnable = 201, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterRasterizationEnable = 221, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterStateValidation = 301, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSOpenGLContextParameterSurfaceSurfaceVolatile = 306, } ); diff --git a/AppKit/NSOpenGLView.rs b/AppKit/NSOpenGLView.rs index 50696891b..4617c89cc 100644 --- a/AppKit/NSOpenGLView.rs +++ b/AppKit/NSOpenGLView.rs @@ -10,10 +10,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[deprecated = "Use NSOpenGLView instead."] + #[cfg(not(any(target_os = "ios")))] #[method(wantsBestResolutionOpenGLSurface)] pub unsafe fn wantsBestResolutionOpenGLSurface(&self) -> bool; #[deprecated = "Use NSOpenGLView instead."] + #[cfg(not(any(target_os = "ios")))] #[method(setWantsBestResolutionOpenGLSurface:)] pub unsafe fn setWantsBestResolutionOpenGLSurface( &self, @@ -27,10 +29,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[deprecated = "Use NSOpenGLView instead."] + #[cfg(not(any(target_os = "ios")))] #[method(wantsExtendedDynamicRangeOpenGLSurface)] pub unsafe fn wantsExtendedDynamicRangeOpenGLSurface(&self) -> bool; #[deprecated = "Use NSOpenGLView instead."] + #[cfg(not(any(target_os = "ios")))] #[method(setWantsExtendedDynamicRangeOpenGLSurface:)] pub unsafe fn setWantsExtendedDynamicRangeOpenGLSurface( &self, diff --git a/AppKit/NSOpenPanel.rs b/AppKit/NSOpenPanel.rs index 2569209fa..e9cd59a86 100644 --- a/AppKit/NSOpenPanel.rs +++ b/AppKit/NSOpenPanel.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSOpenPanel")] + #[cfg(not(any(target_os = "ios")))] pub struct NSOpenPanel; #[cfg(feature = "AppKit_NSOpenPanel")] @@ -47,58 +48,74 @@ unsafe impl NSUserInterfaceValidations for NSOpenPanel {} extern_methods!( #[cfg(feature = "AppKit_NSOpenPanel")] unsafe impl NSOpenPanel { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other openPanel)] pub unsafe fn openPanel() -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URLs)] pub unsafe fn URLs(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(resolvesAliases)] pub unsafe fn resolvesAliases(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setResolvesAliases:)] pub unsafe fn setResolvesAliases(&self, resolves_aliases: bool); + #[cfg(not(any(target_os = "ios")))] #[method(canChooseDirectories)] pub unsafe fn canChooseDirectories(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanChooseDirectories:)] pub unsafe fn setCanChooseDirectories(&self, can_choose_directories: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsMultipleSelection)] pub unsafe fn allowsMultipleSelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsMultipleSelection:)] pub unsafe fn setAllowsMultipleSelection(&self, allows_multiple_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(canChooseFiles)] pub unsafe fn canChooseFiles(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanChooseFiles:)] pub unsafe fn setCanChooseFiles(&self, can_choose_files: bool); + #[cfg(not(any(target_os = "ios")))] #[method(canResolveUbiquitousConflicts)] pub unsafe fn canResolveUbiquitousConflicts(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanResolveUbiquitousConflicts:)] pub unsafe fn setCanResolveUbiquitousConflicts( &self, can_resolve_ubiquitous_conflicts: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(canDownloadUbiquitousContents)] pub unsafe fn canDownloadUbiquitousContents(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanDownloadUbiquitousContents:)] pub unsafe fn setCanDownloadUbiquitousContents( &self, can_download_ubiquitous_contents: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(isAccessoryViewDisclosed)] pub unsafe fn isAccessoryViewDisclosed(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessoryViewDisclosed:)] pub unsafe fn setAccessoryViewDisclosed(&self, accessory_view_disclosed: bool); } @@ -110,6 +127,7 @@ extern_methods!( unsafe impl NSOpenPanel { #[cfg(feature = "Foundation_NSArray")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other filenames)] pub unsafe fn filenames(&self) -> Id; @@ -119,6 +137,7 @@ extern_methods!( feature = "Foundation_NSString" ))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:)] pub unsafe fn beginSheetForDirectory_file_types_modalForWindow_modalDelegate_didEndSelector_contextInfo( &self, @@ -133,6 +152,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(beginForDirectory:file:types:modelessDelegate:didEndSelector:contextInfo:)] pub unsafe fn beginForDirectory_file_types_modelessDelegate_didEndSelector_contextInfo( &self, @@ -146,6 +166,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(runModalForDirectory:file:types:)] pub unsafe fn runModalForDirectory_file_types( &self, @@ -156,6 +177,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSArray")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(runModalForTypes:)] pub unsafe fn runModalForTypes(&self, file_types: Option<&NSArray>) -> NSInteger; } @@ -165,6 +187,7 @@ extern_methods!( /// Methods declared on superclass `NSWindow` #[cfg(feature = "AppKit_NSOpenPanel")] unsafe impl NSOpenPanel { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:)] pub unsafe fn initWithContentRect_styleMask_backing_defer( this: Option>, @@ -175,6 +198,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSScreen")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:screen:)] pub unsafe fn initWithContentRect_styleMask_backing_defer_screen( this: Option>, @@ -186,6 +210,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowWithContentViewController:)] pub unsafe fn windowWithContentViewController( content_view_controller: &NSViewController, diff --git a/AppKit/NSOutlineView.rs b/AppKit/NSOutlineView.rs index 17822d1d2..eb78d48d7 100644 --- a/AppKit/NSOutlineView.rs +++ b/AppKit/NSOutlineView.rs @@ -7,7 +7,9 @@ use crate::Foundation::*; extern_enum!( #[underlying(c_int)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { + #[cfg(not(any(target_os = "ios")))] NSOutlineViewDropOnItemIndex = -1, } ); @@ -15,6 +17,7 @@ extern_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSOutlineView; #[cfg(feature = "AppKit_NSOutlineView")] @@ -72,18 +75,22 @@ unsafe impl NSUserInterfaceValidations for NSOutlineView {} extern_methods!( #[cfg(feature = "AppKit_NSOutlineView")] unsafe impl NSOutlineView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataSource)] pub unsafe fn dataSource(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDataSource:)] pub unsafe fn setDataSource( &self, @@ -91,19 +98,24 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSTableColumn")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other outlineTableColumn)] pub unsafe fn outlineTableColumn(&self) -> Option>; #[cfg(feature = "AppKit_NSTableColumn")] + #[cfg(not(any(target_os = "ios")))] #[method(setOutlineTableColumn:)] pub unsafe fn setOutlineTableColumn(&self, outline_table_column: Option<&NSTableColumn>); + #[cfg(not(any(target_os = "ios")))] #[method(isExpandable:)] pub unsafe fn isExpandable(&self, item: Option<&Object>) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfChildrenOfItem:)] pub unsafe fn numberOfChildrenOfItem(&self, item: Option<&Object>) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other child:ofItem:)] pub unsafe fn child_ofItem( &self, @@ -111,6 +123,7 @@ extern_methods!( item: Option<&Object>, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(expandItem:expandChildren:)] pub unsafe fn expandItem_expandChildren( &self, @@ -118,9 +131,11 @@ extern_methods!( expand_children: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(expandItem:)] pub unsafe fn expandItem(&self, item: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(collapseItem:collapseChildren:)] pub unsafe fn collapseItem_collapseChildren( &self, @@ -128,9 +143,11 @@ extern_methods!( collapse_children: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(collapseItem:)] pub unsafe fn collapseItem(&self, item: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(reloadItem:reloadChildren:)] pub unsafe fn reloadItem_reloadChildren( &self, @@ -138,64 +155,84 @@ extern_methods!( reload_children: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(reloadItem:)] pub unsafe fn reloadItem(&self, item: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other parentForItem:)] pub unsafe fn parentForItem(&self, item: Option<&Object>) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(childIndexForItem:)] pub unsafe fn childIndexForItem(&self, item: &Object) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemAtRow:)] pub unsafe fn itemAtRow(&self, row: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(rowForItem:)] pub unsafe fn rowForItem(&self, item: Option<&Object>) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(levelForItem:)] pub unsafe fn levelForItem(&self, item: Option<&Object>) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(levelForRow:)] pub unsafe fn levelForRow(&self, row: NSInteger) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(isItemExpanded:)] pub unsafe fn isItemExpanded(&self, item: Option<&Object>) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(indentationPerLevel)] pub unsafe fn indentationPerLevel(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setIndentationPerLevel:)] pub unsafe fn setIndentationPerLevel(&self, indentation_per_level: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(indentationMarkerFollowsCell)] pub unsafe fn indentationMarkerFollowsCell(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setIndentationMarkerFollowsCell:)] pub unsafe fn setIndentationMarkerFollowsCell(&self, indentation_marker_follows_cell: bool); + #[cfg(not(any(target_os = "ios")))] #[method(autoresizesOutlineColumn)] pub unsafe fn autoresizesOutlineColumn(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutoresizesOutlineColumn:)] pub unsafe fn setAutoresizesOutlineColumn(&self, autoresizes_outline_column: bool); + #[cfg(not(any(target_os = "ios")))] #[method(frameOfOutlineCellAtRow:)] pub unsafe fn frameOfOutlineCellAtRow(&self, row: NSInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setDropItem:dropChildIndex:)] pub unsafe fn setDropItem_dropChildIndex(&self, item: Option<&Object>, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(shouldCollapseAutoExpandedItemsForDeposited:)] pub unsafe fn shouldCollapseAutoExpandedItemsForDeposited(&self, deposited: bool) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(autosaveExpandedItems)] pub unsafe fn autosaveExpandedItems(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutosaveExpandedItems:)] pub unsafe fn setAutosaveExpandedItems(&self, autosave_expanded_items: bool); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(insertItemsAtIndexes:inParent:withAnimation:)] pub unsafe fn insertItemsAtIndexes_inParent_withAnimation( &self, @@ -205,6 +242,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(removeItemsAtIndexes:inParent:withAnimation:)] pub unsafe fn removeItemsAtIndexes_inParent_withAnimation( &self, @@ -213,6 +251,7 @@ extern_methods!( animation_options: NSTableViewAnimationOptions, ); + #[cfg(not(any(target_os = "ios")))] #[method(moveItemAtIndex:inParent:toIndex:inParent:)] pub unsafe fn moveItemAtIndex_inParent_toIndex_inParent( &self, @@ -223,6 +262,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(insertRowsAtIndexes:withAnimation:)] pub unsafe fn insertRowsAtIndexes_withAnimation( &self, @@ -231,6 +271,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(removeRowsAtIndexes:withAnimation:)] pub unsafe fn removeRowsAtIndexes_withAnimation( &self, @@ -238,29 +279,36 @@ extern_methods!( animation_options: NSTableViewAnimationOptions, ); + #[cfg(not(any(target_os = "ios")))] #[method(moveRowAtIndex:toIndex:)] pub unsafe fn moveRowAtIndex_toIndex(&self, old_index: NSInteger, new_index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(userInterfaceLayoutDirection)] pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setUserInterfaceLayoutDirection:)] pub unsafe fn setUserInterfaceLayoutDirection( &self, user_interface_layout_direction: NSUserInterfaceLayoutDirection, ); + #[cfg(not(any(target_os = "ios")))] #[method(stronglyReferencesItems)] pub unsafe fn stronglyReferencesItems(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setStronglyReferencesItems:)] pub unsafe fn setStronglyReferencesItems(&self, strongly_references_items: bool); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSOutlineViewDataSource: NSObjectProtocol { #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:numberOfChildrenOfItem:)] unsafe fn outlineView_numberOfChildrenOfItem( @@ -270,6 +318,7 @@ extern_protocol!( ) -> NSInteger; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:child:ofItem:)] unsafe fn outlineView_child_ofItem( @@ -280,6 +329,7 @@ extern_protocol!( ) -> Id; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:isItemExpandable:)] unsafe fn outlineView_isItemExpandable( @@ -289,6 +339,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:objectValueForTableColumn:byItem:)] unsafe fn outlineView_objectValueForTableColumn_byItem( @@ -299,6 +350,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:setObjectValue:forTableColumn:byItem:)] unsafe fn outlineView_setObjectValue_forTableColumn_byItem( @@ -310,6 +362,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:itemForPersistentObject:)] unsafe fn outlineView_itemForPersistentObject( @@ -319,6 +372,7 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:persistentObjectForItem:)] unsafe fn outlineView_persistentObjectForItem( @@ -332,6 +386,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSSortDescriptor" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:sortDescriptorsDidChange:)] unsafe fn outlineView_sortDescriptorsDidChange( @@ -341,6 +396,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:pasteboardWriterForItem:)] unsafe fn outlineView_pasteboardWriterForItem( @@ -354,6 +410,7 @@ extern_protocol!( feature = "AppKit_NSOutlineView", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:draggingSession:willBeginAtPoint:forItems:)] unsafe fn outlineView_draggingSession_willBeginAtPoint_forItems( @@ -365,6 +422,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSDraggingSession", feature = "AppKit_NSOutlineView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:draggingSession:endedAtPoint:operation:)] unsafe fn outlineView_draggingSession_endedAtPoint_operation( @@ -381,6 +439,7 @@ extern_protocol!( feature = "Foundation_NSArray" ))] #[deprecated = "Use -outlineView:pasteboardWriterForItem: instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:writeItems:toPasteboard:)] unsafe fn outlineView_writeItems_toPasteboard( @@ -391,6 +450,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:updateDraggingItemsForDrag:)] unsafe fn outlineView_updateDraggingItemsForDrag( @@ -400,6 +460,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:validateDrop:proposedItem:proposedChildIndex:)] unsafe fn outlineView_validateDrop_proposedItem_proposedChildIndex( @@ -411,6 +472,7 @@ extern_protocol!( ) -> NSDragOperation; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:acceptDrop:item:childIndex:)] unsafe fn outlineView_acceptDrop_item_childIndex( @@ -428,6 +490,7 @@ extern_protocol!( feature = "Foundation_NSURL" ))] #[deprecated = "Use NSFilePromiseReceiver objects instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:)] unsafe fn outlineView_namesOfPromisedFilesDroppedAtDestination_forDraggedItems( @@ -442,12 +505,14 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSOutlineViewDelegate: NSControlTextEditingDelegate { #[cfg(all( feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn", feature = "AppKit_NSView" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:viewForTableColumn:item:)] unsafe fn outlineView_viewForTableColumn_item( @@ -458,6 +523,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableRowView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:rowViewForItem:)] unsafe fn outlineView_rowViewForItem( @@ -467,6 +533,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableRowView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:didAddRowView:forRow:)] unsafe fn outlineView_didAddRowView_forRow( @@ -477,6 +544,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableRowView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:didRemoveRowView:forRow:)] unsafe fn outlineView_didRemoveRowView_forRow( @@ -487,6 +555,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:willDisplayCell:forTableColumn:item:)] unsafe fn outlineView_willDisplayCell_forTableColumn_item( @@ -498,6 +567,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:shouldEditTableColumn:item:)] unsafe fn outlineView_shouldEditTableColumn_item( @@ -508,11 +578,13 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(selectionShouldChangeInOutlineView:)] unsafe fn selectionShouldChangeInOutlineView(&self, outline_view: &NSOutlineView) -> bool; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:shouldSelectItem:)] unsafe fn outlineView_shouldSelectItem( @@ -522,6 +594,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSOutlineView", feature = "Foundation_NSIndexSet"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:selectionIndexesForProposedSelection:)] unsafe fn outlineView_selectionIndexesForProposedSelection( @@ -531,6 +604,7 @@ extern_protocol!( ) -> Id; #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:shouldSelectTableColumn:)] unsafe fn outlineView_shouldSelectTableColumn( @@ -540,6 +614,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:mouseDownInHeaderOfTableColumn:)] unsafe fn outlineView_mouseDownInHeaderOfTableColumn( @@ -549,6 +624,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:didClickTableColumn:)] unsafe fn outlineView_didClickTableColumn( @@ -558,6 +634,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:didDragTableColumn:)] unsafe fn outlineView_didDragTableColumn( @@ -572,6 +649,7 @@ extern_protocol!( feature = "AppKit_NSTableColumn", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:toolTipForCell:rect:tableColumn:item:mouseLocation:)] unsafe fn outlineView_toolTipForCell_rect_tableColumn_item_mouseLocation( @@ -585,6 +663,7 @@ extern_protocol!( ) -> Id; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:heightOfRowByItem:)] unsafe fn outlineView_heightOfRowByItem( @@ -597,6 +676,7 @@ extern_protocol!( feature = "AppKit_NSOutlineView", feature = "AppKit_NSTintConfiguration" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:tintConfigurationForItem:)] unsafe fn outlineView_tintConfigurationForItem( @@ -610,6 +690,7 @@ extern_protocol!( feature = "AppKit_NSTableColumn", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:typeSelectStringForTableColumn:item:)] unsafe fn outlineView_typeSelectStringForTableColumn_item( @@ -620,6 +701,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSOutlineView", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:nextTypeSelectMatchFromItem:toItem:forString:)] unsafe fn outlineView_nextTypeSelectMatchFromItem_toItem_forString( @@ -635,6 +717,7 @@ extern_protocol!( feature = "AppKit_NSOutlineView", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:shouldTypeSelectForEvent:withCurrentSearchString:)] unsafe fn outlineView_shouldTypeSelectForEvent_withCurrentSearchString( @@ -645,6 +728,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:shouldShowCellExpansionForTableColumn:item:)] unsafe fn outlineView_shouldShowCellExpansionForTableColumn_item( @@ -659,6 +743,7 @@ extern_protocol!( feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:shouldTrackCell:forTableColumn:item:)] unsafe fn outlineView_shouldTrackCell_forTableColumn_item( @@ -674,6 +759,7 @@ extern_protocol!( feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other outlineView:dataCellForTableColumn:item:)] unsafe fn outlineView_dataCellForTableColumn_item( @@ -684,6 +770,7 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:isGroupItem:)] unsafe fn outlineView_isGroupItem( @@ -693,6 +780,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:shouldExpandItem:)] unsafe fn outlineView_shouldExpandItem( @@ -702,6 +790,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:shouldCollapseItem:)] unsafe fn outlineView_shouldCollapseItem( @@ -711,6 +800,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSOutlineView", feature = "AppKit_NSTableColumn"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:willDisplayOutlineCell:forTableColumn:item:)] unsafe fn outlineView_willDisplayOutlineCell_forTableColumn_item( @@ -722,6 +812,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:sizeToFitWidthOfColumn:)] unsafe fn outlineView_sizeToFitWidthOfColumn( @@ -731,6 +822,7 @@ extern_protocol!( ) -> CGFloat; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:shouldReorderColumn:toColumn:)] unsafe fn outlineView_shouldReorderColumn_toColumn( @@ -741,6 +833,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSOutlineView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineView:shouldShowOutlineCellForItem:)] unsafe fn outlineView_shouldShowOutlineCellForItem( @@ -750,41 +843,49 @@ extern_protocol!( ) -> bool; #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineViewSelectionDidChange:)] unsafe fn outlineViewSelectionDidChange(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineViewColumnDidMove:)] unsafe fn outlineViewColumnDidMove(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineViewColumnDidResize:)] unsafe fn outlineViewColumnDidResize(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineViewSelectionIsChanging:)] unsafe fn outlineViewSelectionIsChanging(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineViewItemWillExpand:)] unsafe fn outlineViewItemWillExpand(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineViewItemDidExpand:)] unsafe fn outlineViewItemDidExpand(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineViewItemWillCollapse:)] unsafe fn outlineViewItemWillCollapse(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(outlineViewItemDidCollapse:)] unsafe fn outlineViewItemDidCollapse(&self, notification: &NSNotification); @@ -817,6 +918,7 @@ extern_methods!( /// Methods declared on superclass `NSTableView` #[cfg(feature = "AppKit_NSOutlineView")] unsafe impl NSOutlineView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSPDFImageRep.rs b/AppKit/NSPDFImageRep.rs index 8bd70a6ac..beb87763c 100644 --- a/AppKit/NSPDFImageRep.rs +++ b/AppKit/NSPDFImageRep.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPDFImageRep")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPDFImageRep; #[cfg(feature = "AppKit_NSPDFImageRep")] @@ -27,10 +28,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSPDFImageRep")] unsafe impl NSPDFImageRep { #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageRepWithData:)] pub unsafe fn imageRepWithData(pdf_data: &NSData) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, @@ -38,18 +41,23 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other PDFRepresentation)] pub unsafe fn PDFRepresentation(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(bounds)] pub unsafe fn bounds(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(currentPage)] pub unsafe fn currentPage(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setCurrentPage:)] pub unsafe fn setCurrentPage(&self, current_page: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(pageCount)] pub unsafe fn pageCount(&self) -> NSInteger; } diff --git a/AppKit/NSPDFInfo.rs b/AppKit/NSPDFInfo.rs index eeda272d9..e15085166 100644 --- a/AppKit/NSPDFInfo.rs +++ b/AppKit/NSPDFInfo.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPDFInfo")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPDFInfo; #[cfg(feature = "AppKit_NSPDFInfo")] @@ -26,40 +27,51 @@ extern_methods!( #[cfg(feature = "AppKit_NSPDFInfo")] unsafe impl NSPDFInfo { #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method(setURL:)] pub unsafe fn setURL(&self, url: Option<&NSURL>); + #[cfg(not(any(target_os = "ios")))] #[method(isFileExtensionHidden)] pub unsafe fn isFileExtensionHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setFileExtensionHidden:)] pub unsafe fn setFileExtensionHidden(&self, file_extension_hidden: bool); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tagNames)] pub unsafe fn tagNames(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setTagNames:)] pub unsafe fn setTagNames(&self, tag_names: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(orientation)] pub unsafe fn orientation(&self) -> NSPaperOrientation; + #[cfg(not(any(target_os = "ios")))] #[method(setOrientation:)] pub unsafe fn setOrientation(&self, orientation: NSPaperOrientation); + #[cfg(not(any(target_os = "ios")))] #[method(paperSize)] pub unsafe fn paperSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setPaperSize:)] pub unsafe fn setPaperSize(&self, paper_size: NSSize); #[cfg(feature = "Foundation_NSMutableDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributes)] pub unsafe fn attributes( &self, diff --git a/AppKit/NSPDFPanel.rs b/AppKit/NSPDFPanel.rs index 4172acf20..d6749e7f5 100644 --- a/AppKit/NSPDFPanel.rs +++ b/AppKit/NSPDFPanel.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; ns_options!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPDFPanelOptions { + #[cfg(not(any(target_os = "ios")))] NSPDFPanelShowsPaperSize = 1 << 2, + #[cfg(not(any(target_os = "ios")))] NSPDFPanelShowsOrientation = 1 << 3, + #[cfg(not(any(target_os = "ios")))] NSPDFPanelRequestsParentDirectory = 1 << 24, } ); @@ -17,6 +21,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPDFPanel")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPDFPanel; #[cfg(feature = "AppKit_NSPDFPanel")] @@ -31,35 +36,43 @@ unsafe impl NSObjectProtocol for NSPDFPanel {} extern_methods!( #[cfg(feature = "AppKit_NSPDFPanel")] unsafe impl NSPDFPanel { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other panel)] pub unsafe fn panel() -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryController)] pub unsafe fn accessoryController(&self) -> Option>; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessoryController:)] pub unsafe fn setAccessoryController( &self, accessory_controller: Option<&NSViewController>, ); + #[cfg(not(any(target_os = "ios")))] #[method(options)] pub unsafe fn options(&self) -> NSPDFPanelOptions; + #[cfg(not(any(target_os = "ios")))] #[method(setOptions:)] pub unsafe fn setOptions(&self, options: NSPDFPanelOptions); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultFileName)] pub unsafe fn defaultFileName(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultFileName:)] pub unsafe fn setDefaultFileName(&self, default_file_name: &NSString); #[cfg(all(feature = "AppKit_NSPDFInfo", feature = "AppKit_NSWindow"))] + #[cfg(not(any(target_os = "ios")))] #[method(beginSheetWithPDFInfo:modalForWindow:completionHandler:)] pub unsafe fn beginSheetWithPDFInfo_modalForWindow_completionHandler( &self, diff --git a/AppKit/NSPICTImageRep.rs b/AppKit/NSPICTImageRep.rs index 4490c0b6d..d878fcc43 100644 --- a/AppKit/NSPICTImageRep.rs +++ b/AppKit/NSPICTImageRep.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPICTImageRep")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPICTImageRep; #[cfg(feature = "AppKit_NSPICTImageRep")] @@ -27,10 +28,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSPICTImageRep")] unsafe impl NSPICTImageRep { #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageRepWithData:)] pub unsafe fn imageRepWithData(pict_data: &NSData) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, @@ -38,9 +41,11 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other PICTRepresentation)] pub unsafe fn PICTRepresentation(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(boundingBox)] pub unsafe fn boundingBox(&self) -> NSRect; } diff --git a/AppKit/NSPageController.rs b/AppKit/NSPageController.rs index 4f6c37a65..2db465d47 100644 --- a/AppKit/NSPageController.rs +++ b/AppKit/NSPageController.rs @@ -9,9 +9,13 @@ pub type NSPageControllerObjectIdentifier = NSString; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPageControllerTransitionStyle { + #[cfg(not(any(target_os = "ios")))] NSPageControllerTransitionStyleStackHistory = 0, + #[cfg(not(any(target_os = "ios")))] NSPageControllerTransitionStyleStackBook = 1, + #[cfg(not(any(target_os = "ios")))] NSPageControllerTransitionStyleHorizontalStrip = 2, } ); @@ -19,6 +23,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPageController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPageController; #[cfg(feature = "AppKit_NSPageController")] @@ -49,58 +54,74 @@ unsafe impl NSUserInterfaceItemIdentification for NSPageController {} extern_methods!( #[cfg(feature = "AppKit_NSPageController")] unsafe impl NSPageController { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedViewController)] pub unsafe fn selectedViewController(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(transitionStyle)] pub unsafe fn transitionStyle(&self) -> NSPageControllerTransitionStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setTransitionStyle:)] pub unsafe fn setTransitionStyle(&self, transition_style: NSPageControllerTransitionStyle); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other arrangedObjects)] pub unsafe fn arrangedObjects(&self) -> Id; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setArrangedObjects:)] pub unsafe fn setArrangedObjects(&self, arranged_objects: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(selectedIndex)] pub unsafe fn selectedIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedIndex:)] pub unsafe fn setSelectedIndex(&self, selected_index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(navigateForwardToObject:)] pub unsafe fn navigateForwardToObject(&self, object: &Object); + #[cfg(not(any(target_os = "ios")))] #[method(completeTransition)] pub unsafe fn completeTransition(&self); + #[cfg(not(any(target_os = "ios")))] #[method(navigateBack:)] pub unsafe fn navigateBack(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(navigateForward:)] pub unsafe fn navigateForward(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(takeSelectedIndexFrom:)] pub unsafe fn takeSelectedIndexFrom(&self, sender: Option<&Object>); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSPageControllerDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSPageController")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other pageController:identifierForObject:)] unsafe fn pageController_identifierForObject( @@ -113,6 +134,7 @@ extern_protocol!( feature = "AppKit_NSPageController", feature = "AppKit_NSViewController" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other pageController:viewControllerForIdentifier:)] unsafe fn pageController_viewControllerForIdentifier( @@ -122,6 +144,7 @@ extern_protocol!( ) -> Id; #[cfg(feature = "AppKit_NSPageController")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pageController:frameForObject:)] unsafe fn pageController_frameForObject( @@ -134,6 +157,7 @@ extern_protocol!( feature = "AppKit_NSPageController", feature = "AppKit_NSViewController" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pageController:prepareViewController:withObject:)] unsafe fn pageController_prepareViewController_withObject( @@ -144,6 +168,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSPageController")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pageController:didTransitionToObject:)] unsafe fn pageController_didTransitionToObject( @@ -153,11 +178,13 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSPageController")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pageControllerWillStartLiveTransition:)] unsafe fn pageControllerWillStartLiveTransition(&self, page_controller: &NSPageController); #[cfg(feature = "AppKit_NSPageController")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pageControllerDidEndLiveTransition:)] unsafe fn pageControllerDidEndLiveTransition(&self, page_controller: &NSPageController); @@ -171,6 +198,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSPageController")] unsafe impl NSPageController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/AppKit/NSPageLayout.rs b/AppKit/NSPageLayout.rs index 553ae40e1..b05613edd 100644 --- a/AppKit/NSPageLayout.rs +++ b/AppKit/NSPageLayout.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPageLayout")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPageLayout; #[cfg(feature = "AppKit_NSPageLayout")] @@ -22,22 +23,27 @@ unsafe impl NSObjectProtocol for NSPageLayout {} extern_methods!( #[cfg(feature = "AppKit_NSPageLayout")] unsafe impl NSPageLayout { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pageLayout)] pub unsafe fn pageLayout() -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(addAccessoryController:)] pub unsafe fn addAccessoryController(&self, accessory_controller: &NSViewController); #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(removeAccessoryController:)] pub unsafe fn removeAccessoryController(&self, accessory_controller: &NSViewController); #[cfg(all(feature = "AppKit_NSViewController", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryControllers)] pub unsafe fn accessoryControllers(&self) -> Id>; #[cfg(all(feature = "AppKit_NSPrintInfo", feature = "AppKit_NSWindow"))] + #[cfg(not(any(target_os = "ios")))] #[method(beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:)] pub unsafe fn beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo( &self, @@ -49,13 +55,16 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSPrintInfo")] + #[cfg(not(any(target_os = "ios")))] #[method(runModalWithPrintInfo:)] pub unsafe fn runModalWithPrintInfo(&self, print_info: &NSPrintInfo) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(runModal)] pub unsafe fn runModal(&self) -> NSInteger; #[cfg(feature = "AppKit_NSPrintInfo")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printInfo)] pub unsafe fn printInfo(&self) -> Option>; } @@ -67,19 +76,23 @@ extern_methods!( unsafe impl NSPageLayout { #[cfg(feature = "AppKit_NSView")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessory_view: Option<&NSView>); #[cfg(feature = "AppKit_NSView")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(readPrintInfo)] pub unsafe fn readPrintInfo(&self); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(writePrintInfo)] pub unsafe fn writePrintInfo(&self); } @@ -89,6 +102,7 @@ extern_methods!( /// NSPageLayoutPanel #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method(runPageLayout:)] pub unsafe fn runPageLayout(&self, sender: Option<&Object>); } diff --git a/AppKit/NSPanGestureRecognizer.rs b/AppKit/NSPanGestureRecognizer.rs index a1de929ad..da6782191 100644 --- a/AppKit/NSPanGestureRecognizer.rs +++ b/AppKit/NSPanGestureRecognizer.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPanGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPanGestureRecognizer; #[cfg(feature = "AppKit_NSPanGestureRecognizer")] @@ -26,27 +27,34 @@ unsafe impl NSObjectProtocol for NSPanGestureRecognizer {} extern_methods!( #[cfg(feature = "AppKit_NSPanGestureRecognizer")] unsafe impl NSPanGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method(buttonMask)] pub unsafe fn buttonMask(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setButtonMask:)] pub unsafe fn setButtonMask(&self, button_mask: NSUInteger); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(translationInView:)] pub unsafe fn translationInView(&self, view: Option<&NSView>) -> NSPoint; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setTranslation:inView:)] pub unsafe fn setTranslation_inView(&self, translation: NSPoint, view: Option<&NSView>); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(velocityInView:)] pub unsafe fn velocityInView(&self, view: Option<&NSView>) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfTouchesRequired)] pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfTouchesRequired:)] pub unsafe fn setNumberOfTouchesRequired(&self, number_of_touches_required: NSInteger); } @@ -56,6 +64,7 @@ extern_methods!( /// Methods declared on superclass `NSGestureRecognizer` #[cfg(feature = "AppKit_NSPanGestureRecognizer")] unsafe impl NSPanGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithTarget:action:)] pub unsafe fn initWithTarget_action( this: Option>, diff --git a/AppKit/NSPanel.rs b/AppKit/NSPanel.rs index d047fe216..f076d178d 100644 --- a/AppKit/NSPanel.rs +++ b/AppKit/NSPanel.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPanel")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPanel; #[cfg(feature = "AppKit_NSPanel")] @@ -47,21 +48,27 @@ unsafe impl NSUserInterfaceValidations for NSPanel {} extern_methods!( #[cfg(feature = "AppKit_NSPanel")] unsafe impl NSPanel { + #[cfg(not(any(target_os = "ios")))] #[method(isFloatingPanel)] pub unsafe fn isFloatingPanel(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setFloatingPanel:)] pub unsafe fn setFloatingPanel(&self, floating_panel: bool); + #[cfg(not(any(target_os = "ios")))] #[method(becomesKeyOnlyIfNeeded)] pub unsafe fn becomesKeyOnlyIfNeeded(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setBecomesKeyOnlyIfNeeded:)] pub unsafe fn setBecomesKeyOnlyIfNeeded(&self, becomes_key_only_if_needed: bool); + #[cfg(not(any(target_os = "ios")))] #[method(worksWhenModal)] pub unsafe fn worksWhenModal(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setWorksWhenModal:)] pub unsafe fn setWorksWhenModal(&self, works_when_modal: bool); } @@ -69,19 +76,25 @@ extern_methods!( extern_fn!( #[deprecated = "Use NSAlert instead"] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSReleaseAlertPanel(panel: Option<&Object>); ); extern_enum!( #[underlying(c_int)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { #[deprecated = "Use NSAlertFirstButtonReturn with an NSAlert presentation instead"] + #[cfg(not(any(target_os = "ios")))] NSAlertDefaultReturn = 1, #[deprecated = "Use NSAlertFirstButtonReturn and other NSModalResponses with an NSAlert presentation instead"] + #[cfg(not(any(target_os = "ios")))] NSAlertAlternateReturn = 0, #[deprecated = "Use NSAlertFirstButtonReturn and other NSModalResponses with an NSAlert presentation instead"] + #[cfg(not(any(target_os = "ios")))] NSAlertOtherReturn = -1, #[deprecated = "Use NSAlertFirstButtonReturn and other NSModalResponses with an NSAlert presentation instead"] + #[cfg(not(any(target_os = "ios")))] NSAlertErrorReturn = -2, } ); @@ -90,6 +103,7 @@ extern_methods!( /// Methods declared on superclass `NSWindow` #[cfg(feature = "AppKit_NSPanel")] unsafe impl NSPanel { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:)] pub unsafe fn initWithContentRect_styleMask_backing_defer( this: Option>, @@ -100,6 +114,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSScreen")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:screen:)] pub unsafe fn initWithContentRect_styleMask_backing_defer_screen( this: Option>, @@ -111,6 +126,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowWithContentViewController:)] pub unsafe fn windowWithContentViewController( content_view_controller: &NSViewController, diff --git a/AppKit/NSPasteboard.rs b/AppKit/NSPasteboard.rs index 626d6457f..b4e4f75dc 100644 --- a/AppKit/NSPasteboard.rs +++ b/AppKit/NSPasteboard.rs @@ -57,7 +57,9 @@ extern_static!(NSPasteboardNameDrag: &'static NSPasteboardName); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPasteboardContentsOptions { + #[cfg(not(any(target_os = "ios")))] NSPasteboardContentsCurrentHostOnly = 1 << 0, } ); @@ -75,6 +77,7 @@ extern_static!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPasteboard; #[cfg(feature = "AppKit_NSPasteboard")] @@ -89,31 +92,39 @@ unsafe impl NSObjectProtocol for NSPasteboard {} extern_methods!( #[cfg(feature = "AppKit_NSPasteboard")] unsafe impl NSPasteboard { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other generalPasteboard)] pub unsafe fn generalPasteboard() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pasteboardWithName:)] pub unsafe fn pasteboardWithName(name: &NSPasteboardName) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pasteboardWithUniqueName)] pub unsafe fn pasteboardWithUniqueName() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(changeCount)] pub unsafe fn changeCount(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(prepareForNewContentsWithOptions:)] pub unsafe fn prepareForNewContentsWithOptions( &self, options: NSPasteboardContentsOptions, ) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(clearContents)] pub unsafe fn clearContents(&self) -> NSInteger; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(writeObjects:)] pub unsafe fn writeObjects( &self, @@ -121,6 +132,7 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSDictionary"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other readObjectsForClasses:options:)] pub unsafe fn readObjectsForClasses_options( &self, @@ -129,10 +141,12 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "AppKit_NSPasteboardItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pasteboardItems)] pub unsafe fn pasteboardItems(&self) -> Option>>; #[cfg(feature = "AppKit_NSPasteboardItem")] + #[cfg(not(any(target_os = "ios")))] #[method(indexOfPasteboardItem:)] pub unsafe fn indexOfPasteboardItem( &self, @@ -140,6 +154,7 @@ extern_methods!( ) -> NSUInteger; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(canReadItemWithDataConformingToTypes:)] pub unsafe fn canReadItemWithDataConformingToTypes( &self, @@ -147,6 +162,7 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSDictionary"))] + #[cfg(not(any(target_os = "ios")))] #[method(canReadObjectForClasses:options:)] pub unsafe fn canReadObjectForClasses_options( &self, @@ -155,6 +171,7 @@ extern_methods!( ) -> bool; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(declareTypes:owner:)] pub unsafe fn declareTypes_owner( &self, @@ -163,6 +180,7 @@ extern_methods!( ) -> NSInteger; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(addTypes:owner:)] pub unsafe fn addTypes_owner( &self, @@ -171,10 +189,12 @@ extern_methods!( ) -> NSInteger; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other types)] pub unsafe fn types(&self) -> Option>>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other availableTypeFromArray:)] pub unsafe fn availableTypeFromArray( &self, @@ -182,6 +202,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method(setData:forType:)] pub unsafe fn setData_forType( &self, @@ -189,6 +210,7 @@ extern_methods!( data_type: &NSPasteboardType, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPropertyList:forType:)] pub unsafe fn setPropertyList_forType( &self, @@ -197,6 +219,7 @@ extern_methods!( ) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setString:forType:)] pub unsafe fn setString_forType( &self, @@ -205,9 +228,11 @@ extern_methods!( ) -> bool; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataForType:)] pub unsafe fn dataForType(&self, data_type: &NSPasteboardType) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other propertyListForType:)] pub unsafe fn propertyListForType( &self, @@ -215,6 +240,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other stringForType:)] pub unsafe fn stringForType(&self, data_type: &NSPasteboardType) -> Option>; } @@ -225,21 +251,25 @@ extern_methods!( #[cfg(feature = "AppKit_NSPasteboard")] unsafe impl NSPasteboard { #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other typesFilterableTo:)] pub unsafe fn typesFilterableTo(r#type: &NSPasteboardType) -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pasteboardByFilteringFile:)] pub unsafe fn pasteboardByFilteringFile(filename: &NSString) -> Id; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pasteboardByFilteringData:ofType:)] pub unsafe fn pasteboardByFilteringData_ofType( data: &NSData, r#type: &NSPasteboardType, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pasteboardByFilteringTypesInPasteboard:)] pub unsafe fn pasteboardByFilteringTypesInPasteboard( pboard: &NSPasteboard, @@ -248,8 +278,10 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSPasteboardTypeOwner: NSObjectProtocol { #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method(pasteboard:provideDataForType:)] unsafe fn pasteboard_provideDataForType( &self, @@ -258,6 +290,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pasteboardChangedOwner:)] unsafe fn pasteboardChangedOwner(&self, sender: &NSPasteboard); @@ -268,14 +301,18 @@ extern_protocol!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPasteboardWritingOptions { + #[cfg(not(any(target_os = "ios")))] NSPasteboardWritingPromised = 1 << 9, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSPasteboardWriting: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSPasteboard", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other writableTypesForPasteboard:)] unsafe fn writableTypesForPasteboard( &self, @@ -283,6 +320,7 @@ extern_protocol!( ) -> Id>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(writingOptionsForType:pasteboard:)] unsafe fn writingOptionsForType_pasteboard( @@ -291,6 +329,7 @@ extern_protocol!( pasteboard: &NSPasteboard, ) -> NSPasteboardWritingOptions; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pasteboardPropertyListForType:)] unsafe fn pasteboardPropertyListForType( &self, @@ -303,23 +342,31 @@ extern_protocol!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPasteboardReadingOptions { + #[cfg(not(any(target_os = "ios")))] NSPasteboardReadingAsData = 0, + #[cfg(not(any(target_os = "ios")))] NSPasteboardReadingAsString = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSPasteboardReadingAsPropertyList = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSPasteboardReadingAsKeyedArchive = 1 << 2, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSPasteboardReading: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSPasteboard", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other readableTypesForPasteboard:)] unsafe fn readableTypesForPasteboard( pasteboard: &NSPasteboard, ) -> Id>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(readingOptionsForType:pasteboard:)] unsafe fn readingOptionsForType_pasteboard( @@ -327,6 +374,7 @@ extern_protocol!( pasteboard: &NSPasteboard, ) -> NSPasteboardReadingOptions; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Init initWithPasteboardPropertyList:ofType:)] unsafe fn initWithPasteboardPropertyList_ofType( @@ -344,10 +392,12 @@ extern_methods!( #[cfg(feature = "Foundation_NSURL")] unsafe impl NSURL { #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URLFromPasteboard:)] pub unsafe fn URLFromPasteboard(paste_board: &NSPasteboard) -> Option>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method(writeToPasteboard:)] pub unsafe fn writeToPasteboard(&self, paste_board: &NSPasteboard); } @@ -376,10 +426,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSPasteboard")] unsafe impl NSPasteboard { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(writeFileContents:)] pub unsafe fn writeFileContents(&self, filename: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other readFileContentsType:toFile:)] pub unsafe fn readFileContentsType_toFile( &self, @@ -388,10 +440,12 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSFileWrapper")] + #[cfg(not(any(target_os = "ios")))] #[method(writeFileWrapper:)] pub unsafe fn writeFileWrapper(&self, wrapper: &NSFileWrapper) -> bool; #[cfg(feature = "Foundation_NSFileWrapper")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other readFileWrapper)] pub unsafe fn readFileWrapper(&self) -> Option>; } @@ -401,21 +455,25 @@ extern_static!(NSFileContentsPboardType: &'static NSPasteboardType); extern_fn!( #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSCreateFilenamePboardType(file_type: &NSString) -> *mut NSPasteboardType; ); extern_fn!( #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSCreateFileContentsPboardType(file_type: &NSString) -> *mut NSPasteboardType; ); extern_fn!( #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSGetFileType(pboard_type: &NSPasteboardType) -> *mut NSString; ); extern_fn!( #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSGetFileTypes( pboard_types: &NSArray, ) -> *mut NSArray; diff --git a/AppKit/NSPasteboardItem.rs b/AppKit/NSPasteboardItem.rs index 1ac99d22b..18dd60b52 100644 --- a/AppKit/NSPasteboardItem.rs +++ b/AppKit/NSPasteboardItem.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPasteboardItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPasteboardItem; #[cfg(feature = "AppKit_NSPasteboardItem")] @@ -29,10 +30,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSPasteboardItem")] unsafe impl NSPasteboardItem { #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other types)] pub unsafe fn types(&self) -> Id>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other availableTypeFromArray:)] pub unsafe fn availableTypeFromArray( &self, @@ -40,6 +43,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setDataProvider:forTypes:)] pub unsafe fn setDataProvider_forTypes( &self, @@ -48,10 +52,12 @@ extern_methods!( ) -> bool; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method(setData:forType:)] pub unsafe fn setData_forType(&self, data: &NSData, r#type: &NSPasteboardType) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setString:forType:)] pub unsafe fn setString_forType( &self, @@ -59,6 +65,7 @@ extern_methods!( r#type: &NSPasteboardType, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPropertyList:forType:)] pub unsafe fn setPropertyList_forType( &self, @@ -67,21 +74,26 @@ extern_methods!( ) -> bool; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataForType:)] pub unsafe fn dataForType(&self, r#type: &NSPasteboardType) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other stringForType:)] pub unsafe fn stringForType(&self, r#type: &NSPasteboardType) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other propertyListForType:)] pub unsafe fn propertyListForType(&self, r#type: &NSPasteboardType) -> Option>; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSPasteboardItemDataProvider: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSPasteboard", feature = "AppKit_NSPasteboardItem"))] + #[cfg(not(any(target_os = "ios")))] #[method(pasteboard:item:provideDataForType:)] unsafe fn pasteboard_item_provideDataForType( &self, @@ -91,6 +103,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pasteboardFinishedWithDataProvider:)] unsafe fn pasteboardFinishedWithDataProvider(&self, pasteboard: &NSPasteboard); diff --git a/AppKit/NSPathCell.rs b/AppKit/NSPathCell.rs index c9645461e..ea06496b9 100644 --- a/AppKit/NSPathCell.rs +++ b/AppKit/NSPathCell.rs @@ -7,10 +7,14 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPathStyle { + #[cfg(not(any(target_os = "ios")))] NSPathStyleStandard = 0, + #[cfg(not(any(target_os = "ios")))] NSPathStylePopUp = 2, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSPathStyleNavigationBar = 1, } ); @@ -18,6 +22,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPathCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPathCell; #[cfg(feature = "AppKit_NSPathCell")] @@ -51,45 +56,57 @@ unsafe impl NSUserInterfaceItemIdentification for NSPathCell {} extern_methods!( #[cfg(feature = "AppKit_NSPathCell")] unsafe impl NSPathCell { + #[cfg(not(any(target_os = "ios")))] #[method(pathStyle)] pub unsafe fn pathStyle(&self) -> NSPathStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setPathStyle:)] pub unsafe fn setPathStyle(&self, path_style: NSPathStyle); #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method(setURL:)] pub unsafe fn setURL(&self, url: Option<&NSURL>); + #[cfg(not(any(target_os = "ios")))] #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, obj: Option<&Object>); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other allowedTypes)] pub unsafe fn allowedTypes(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setAllowedTypes:)] pub unsafe fn setAllowedTypes(&self, allowed_types: Option<&NSArray>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[method(pathComponentCellClass)] pub unsafe fn pathComponentCellClass() -> &'static Class; #[cfg(all(feature = "AppKit_NSPathComponentCell", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pathComponentCells)] pub unsafe fn pathComponentCells(&self) -> Id>; #[cfg(all(feature = "AppKit_NSPathComponentCell", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setPathComponentCells:)] pub unsafe fn setPathComponentCells( &self, @@ -97,6 +114,7 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSPathComponentCell", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rectOfPathComponentCell:withFrame:inView:)] pub unsafe fn rectOfPathComponentCell_withFrame_inView( &self, @@ -106,6 +124,7 @@ extern_methods!( ) -> NSRect; #[cfg(all(feature = "AppKit_NSPathComponentCell", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pathComponentCellAtPoint:withFrame:inView:)] pub unsafe fn pathComponentCellAtPoint_withFrame_inView( &self, @@ -115,10 +134,12 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSPathComponentCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other clickedPathComponentCell)] pub unsafe fn clickedPathComponentCell(&self) -> Option>; #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(mouseEntered:withFrame:inView:)] pub unsafe fn mouseEntered_withFrame_inView( &self, @@ -128,6 +149,7 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(mouseExited:withFrame:inView:)] pub unsafe fn mouseExited_withFrame_inView( &self, @@ -136,33 +158,41 @@ extern_methods!( view: &NSView, ); + #[cfg(not(any(target_os = "ios")))] #[method(doubleAction)] pub unsafe fn doubleAction(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, double_action: Option); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholder_string: Option<&NSString>); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPlaceholderAttributedString:)] pub unsafe fn setPlaceholderAttributedString( &self, @@ -172,8 +202,10 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSPathCellDelegate: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSOpenPanel", feature = "AppKit_NSPathCell"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pathCell:willDisplayOpenPanel:)] unsafe fn pathCell_willDisplayOpenPanel( @@ -183,6 +215,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSMenu", feature = "AppKit_NSPathCell"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pathCell:willPopUpMenu:)] unsafe fn pathCell_willPopUpMenu(&self, path_cell: &NSPathCell, menu: &NSMenu); @@ -196,10 +229,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSPathCell")] unsafe impl NSPathCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSPathComponentCell.rs b/AppKit/NSPathComponentCell.rs index daa5bac5e..ca3a25358 100644 --- a/AppKit/NSPathComponentCell.rs +++ b/AppKit/NSPathComponentCell.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPathComponentCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPathComponentCell; #[cfg(feature = "AppKit_NSPathComponentCell")] @@ -36,18 +37,22 @@ extern_methods!( #[cfg(feature = "AppKit_NSPathComponentCell")] unsafe impl NSPathComponentCell { #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method(setURL:)] pub unsafe fn setURL(&self, url: Option<&NSURL>); } @@ -58,10 +63,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSPathComponentCell")] unsafe impl NSPathComponentCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSPathControl.rs b/AppKit/NSPathControl.rs index e62f17fbc..7c7748360 100644 --- a/AppKit/NSPathControl.rs +++ b/AppKit/NSPathControl.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPathControl")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPathControl; #[cfg(feature = "AppKit_NSPathControl")] @@ -44,33 +45,41 @@ unsafe impl NSUserInterfaceItemIdentification for NSPathControl {} extern_methods!( #[cfg(feature = "AppKit_NSPathControl")] unsafe impl NSPathControl { + #[cfg(not(any(target_os = "ios")))] #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other allowedTypes)] pub unsafe fn allowedTypes(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setAllowedTypes:)] pub unsafe fn setAllowedTypes(&self, allowed_types: Option<&NSArray>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholder_string: Option<&NSString>); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPlaceholderAttributedString:)] pub unsafe fn setPlaceholderAttributedString( &self, @@ -78,54 +87,68 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method(setURL:)] pub unsafe fn setURL(&self, url: Option<&NSURL>); + #[cfg(not(any(target_os = "ios")))] #[method(doubleAction)] pub unsafe fn doubleAction(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, double_action: Option); + #[cfg(not(any(target_os = "ios")))] #[method(pathStyle)] pub unsafe fn pathStyle(&self) -> NSPathStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setPathStyle:)] pub unsafe fn setPathStyle(&self, path_style: NSPathStyle); #[cfg(feature = "AppKit_NSPathControlItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other clickedPathItem)] pub unsafe fn clickedPathItem(&self) -> Option>; #[cfg(all(feature = "AppKit_NSPathControlItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pathItems)] pub unsafe fn pathItems(&self) -> Id>; #[cfg(all(feature = "AppKit_NSPathControlItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setPathItems:)] pub unsafe fn setPathItems(&self, path_items: &NSArray); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(setDraggingSourceOperationMask:forLocal:)] pub unsafe fn setDraggingSourceOperationMask_forLocal( &self, @@ -134,22 +157,26 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSPathControlDelegate: NSObjectProtocol { #[cfg(all( feature = "AppKit_NSPasteboard", feature = "AppKit_NSPathControl", feature = "AppKit_NSPathControlItem" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pathControl:shouldDragItem:withPasteboard:)] unsafe fn pathControl_shouldDragItem_withPasteboard( @@ -164,6 +191,7 @@ extern_protocol!( feature = "AppKit_NSPathComponentCell", feature = "AppKit_NSPathControl" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pathControl:shouldDragPathComponentCell:withPasteboard:)] unsafe fn pathControl_shouldDragPathComponentCell_withPasteboard( @@ -174,6 +202,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSPathControl")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pathControl:validateDrop:)] unsafe fn pathControl_validateDrop( @@ -183,6 +212,7 @@ extern_protocol!( ) -> NSDragOperation; #[cfg(feature = "AppKit_NSPathControl")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pathControl:acceptDrop:)] unsafe fn pathControl_acceptDrop( @@ -192,6 +222,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSOpenPanel", feature = "AppKit_NSPathControl"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pathControl:willDisplayOpenPanel:)] unsafe fn pathControl_willDisplayOpenPanel( @@ -201,6 +232,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSMenu", feature = "AppKit_NSPathControl"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pathControl:willPopUpMenu:)] unsafe fn pathControl_willPopUpMenu(&self, path_control: &NSPathControl, menu: &NSMenu); @@ -215,16 +247,19 @@ extern_methods!( unsafe impl NSPathControl { #[cfg(feature = "AppKit_NSPathComponentCell")] #[deprecated = "Use the clickedPathItem property instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other clickedPathComponentCell)] pub unsafe fn clickedPathComponentCell(&self) -> Option>; #[cfg(all(feature = "AppKit_NSPathComponentCell", feature = "Foundation_NSArray"))] #[deprecated = "Use the pathItems property instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pathComponentCells)] pub unsafe fn pathComponentCells(&self) -> Id>; #[cfg(all(feature = "AppKit_NSPathComponentCell", feature = "Foundation_NSArray"))] #[deprecated = "Use the pathItems property instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setPathComponentCells:)] pub unsafe fn setPathComponentCells(&self, cells: &NSArray); } @@ -234,6 +269,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSPathControl")] unsafe impl NSPathControl { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSPathControlItem.rs b/AppKit/NSPathControlItem.rs index 188fa8e3f..cd9834985 100644 --- a/AppKit/NSPathControlItem.rs +++ b/AppKit/NSPathControlItem.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPathControlItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPathControlItem; #[cfg(feature = "AppKit_NSPathControlItem")] @@ -23,30 +24,37 @@ extern_methods!( #[cfg(feature = "AppKit_NSPathControlItem")] unsafe impl NSPathControlItem { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributed_title: &NSAttributedString); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; } diff --git a/AppKit/NSPersistentDocument.rs b/AppKit/NSPersistentDocument.rs index 155866dd5..05204a4ba 100644 --- a/AppKit/NSPersistentDocument.rs +++ b/AppKit/NSPersistentDocument.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPersistentDocument")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPersistentDocument; #[cfg(feature = "AppKit_NSPersistentDocument")] @@ -36,10 +37,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSPersistentDocument")] unsafe impl NSPersistentDocument { #[cfg(feature = "CoreData_NSManagedObjectContext")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other managedObjectContext)] pub unsafe fn managedObjectContext(&self) -> Option>; #[cfg(feature = "CoreData_NSManagedObjectContext")] + #[cfg(not(any(target_os = "ios")))] #[method(setManagedObjectContext:)] pub unsafe fn setManagedObjectContext( &self, @@ -47,6 +50,7 @@ extern_methods!( ); #[cfg(feature = "CoreData_NSManagedObjectModel")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other managedObjectModel)] pub unsafe fn managedObjectModel(&self) -> Option>; @@ -56,6 +60,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error:_)] pub unsafe fn configurePersistentStoreCoordinatorForURL_ofType_modelConfiguration_storeOptions_error( &self, @@ -66,6 +71,7 @@ extern_methods!( ) -> Result<(), Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other persistentStoreTypeForFileType:)] pub unsafe fn persistentStoreTypeForFileType(&self, file_type: &NSString) -> Id; @@ -74,6 +80,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(writeToURL:ofType:forSaveOperation:originalContentsURL:error:_)] pub unsafe fn writeToURL_ofType_forSaveOperation_originalContentsURL_error( &self, @@ -88,6 +95,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(readFromURL:ofType:error:_)] pub unsafe fn readFromURL_ofType_error( &self, @@ -100,6 +108,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(revertToContentsOfURL:ofType:error:_)] pub unsafe fn revertToContentsOfURL_ofType_error( &self, @@ -119,6 +128,7 @@ extern_methods!( feature = "Foundation_NSURL" ))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(configurePersistentStoreCoordinatorForURL:ofType:error:_)] pub unsafe fn configurePersistentStoreCoordinatorForURL_ofType_error( &self, @@ -133,6 +143,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSPersistentDocument")] unsafe impl NSPersistentDocument { #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithType:error:_)] pub unsafe fn initWithType_error( this: Option>, @@ -144,6 +155,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:ofType:error:_)] pub unsafe fn initWithContentsOfURL_ofType_error( this: Option>, @@ -156,6 +168,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initForURL:withContentsOfURL:ofType:error:_)] pub unsafe fn initForURL_withContentsOfURL_ofType_error( this: Option>, @@ -174,6 +187,7 @@ extern_methods!( unsafe impl NSPersistentDocument { #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfFile:ofType:)] pub unsafe fn initWithContentsOfFile_ofType( this: Option>, @@ -183,6 +197,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURL"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:ofType:)] pub unsafe fn initWithContentsOfURL_ofType( this: Option>, diff --git a/AppKit/NSPopUpButton.rs b/AppKit/NSPopUpButton.rs index b274ccd51..c182c1d07 100644 --- a/AppKit/NSPopUpButton.rs +++ b/AppKit/NSPopUpButton.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPopUpButton")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPopUpButton; #[cfg(feature = "AppKit_NSPopUpButton")] @@ -53,6 +54,7 @@ unsafe impl NSUserInterfaceValidations for NSPopUpButton {} extern_methods!( #[cfg(feature = "AppKit_NSPopUpButton")] unsafe impl NSPopUpButton { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:pullsDown:)] pub unsafe fn initWithFrame_pullsDown( this: Option>, @@ -61,74 +63,95 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[cfg(not(any(target_os = "ios")))] #[method(pullsDown)] pub unsafe fn pullsDown(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPullsDown:)] pub unsafe fn setPullsDown(&self, pulls_down: bool); + #[cfg(not(any(target_os = "ios")))] #[method(autoenablesItems)] pub unsafe fn autoenablesItems(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutoenablesItems:)] pub unsafe fn setAutoenablesItems(&self, autoenables_items: bool); + #[cfg(not(any(target_os = "ios")))] #[method(preferredEdge)] pub unsafe fn preferredEdge(&self) -> NSRectEdge; + #[cfg(not(any(target_os = "ios")))] #[method(setPreferredEdge:)] pub unsafe fn setPreferredEdge(&self, preferred_edge: NSRectEdge); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(addItemWithTitle:)] pub unsafe fn addItemWithTitle(&self, title: &NSString); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(addItemsWithTitles:)] pub unsafe fn addItemsWithTitles(&self, item_titles: &NSArray); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(insertItemWithTitle:atIndex:)] pub unsafe fn insertItemWithTitle_atIndex(&self, title: &NSString, index: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(removeItemWithTitle:)] pub unsafe fn removeItemWithTitle(&self, title: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(removeItemAtIndex:)] pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); #[cfg(all(feature = "AppKit_NSMenuItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemArray)] pub unsafe fn itemArray(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItem:)] pub unsafe fn indexOfItem(&self, item: &NSMenuItem) -> NSInteger; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithTitle:)] pub unsafe fn indexOfItemWithTitle(&self, title: &NSString) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithTag:)] pub unsafe fn indexOfItemWithTag(&self, tag: NSInteger) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithRepresentedObject:)] pub unsafe fn indexOfItemWithRepresentedObject(&self, obj: Option<&Object>) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithTarget:andAction:)] pub unsafe fn indexOfItemWithTarget_andAction( &self, @@ -137,57 +160,72 @@ extern_methods!( ) -> NSInteger; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemAtIndex:)] pub unsafe fn itemAtIndex(&self, index: NSInteger) -> Option>; #[cfg(all(feature = "AppKit_NSMenuItem", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithTitle:)] pub unsafe fn itemWithTitle(&self, title: &NSString) -> Option>; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other lastItem)] pub unsafe fn lastItem(&self) -> Option>; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(selectItem:)] pub unsafe fn selectItem(&self, item: Option<&NSMenuItem>); + #[cfg(not(any(target_os = "ios")))] #[method(selectItemAtIndex:)] pub unsafe fn selectItemAtIndex(&self, index: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(selectItemWithTitle:)] pub unsafe fn selectItemWithTitle(&self, title: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(selectItemWithTag:)] pub unsafe fn selectItemWithTag(&self, tag: NSInteger) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, string: &NSString); #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedItem)] pub unsafe fn selectedItem(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfSelectedItem)] pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(selectedTag)] pub unsafe fn selectedTag(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(synchronizeTitleAndSelectedItem)] pub unsafe fn synchronizeTitleAndSelectedItem(&self); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemTitleAtIndex:)] pub unsafe fn itemTitleAtIndex(&self, index: NSInteger) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemTitles)] pub unsafe fn itemTitles(&self) -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleOfSelectedItem)] pub unsafe fn titleOfSelectedItem(&self) -> Option>; } @@ -200,6 +238,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSPopUpButton")] unsafe impl NSPopUpButton { #[cfg(all(feature = "AppKit_NSImage", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonWithTitle:image:target:action:)] pub unsafe fn buttonWithTitle_image_target_action( title: &NSString, @@ -209,6 +248,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonWithTitle:target:action:)] pub unsafe fn buttonWithTitle_target_action( title: &NSString, @@ -217,6 +257,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonWithImage:target:action:)] pub unsafe fn buttonWithImage_target_action( image: &NSImage, @@ -225,6 +266,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other checkboxWithTitle:target:action:)] pub unsafe fn checkboxWithTitle_target_action( title: &NSString, @@ -233,6 +275,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other radioButtonWithTitle:target:action:)] pub unsafe fn radioButtonWithTitle_target_action( title: &NSString, @@ -246,6 +289,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSPopUpButton")] unsafe impl NSPopUpButton { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSPopUpButtonCell.rs b/AppKit/NSPopUpButtonCell.rs index 5da5c8c54..622cfec97 100644 --- a/AppKit/NSPopUpButtonCell.rs +++ b/AppKit/NSPopUpButtonCell.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPopUpArrowPosition { + #[cfg(not(any(target_os = "ios")))] NSPopUpNoArrow = 0, + #[cfg(not(any(target_os = "ios")))] NSPopUpArrowAtCenter = 1, + #[cfg(not(any(target_os = "ios")))] NSPopUpArrowAtBottom = 2, } ); @@ -17,6 +21,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPopUpButtonCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPopUpButtonCell; #[cfg(feature = "AppKit_NSPopUpButtonCell")] @@ -48,6 +53,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSPopUpButtonCell")] unsafe impl NSPopUpButtonCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:pullsDown:)] pub unsafe fn initTextCell_pullsDown( this: Option>, @@ -56,90 +62,116 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[cfg(not(any(target_os = "ios")))] #[method(pullsDown)] pub unsafe fn pullsDown(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPullsDown:)] pub unsafe fn setPullsDown(&self, pulls_down: bool); + #[cfg(not(any(target_os = "ios")))] #[method(autoenablesItems)] pub unsafe fn autoenablesItems(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutoenablesItems:)] pub unsafe fn setAutoenablesItems(&self, autoenables_items: bool); + #[cfg(not(any(target_os = "ios")))] #[method(preferredEdge)] pub unsafe fn preferredEdge(&self) -> NSRectEdge; + #[cfg(not(any(target_os = "ios")))] #[method(setPreferredEdge:)] pub unsafe fn setPreferredEdge(&self, preferred_edge: NSRectEdge); + #[cfg(not(any(target_os = "ios")))] #[method(usesItemFromMenu)] pub unsafe fn usesItemFromMenu(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesItemFromMenu:)] pub unsafe fn setUsesItemFromMenu(&self, uses_item_from_menu: bool); + #[cfg(not(any(target_os = "ios")))] #[method(altersStateOfSelectedItem)] pub unsafe fn altersStateOfSelectedItem(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAltersStateOfSelectedItem:)] pub unsafe fn setAltersStateOfSelectedItem(&self, alters_state_of_selected_item: bool); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(addItemWithTitle:)] pub unsafe fn addItemWithTitle(&self, title: &NSString); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(addItemsWithTitles:)] pub unsafe fn addItemsWithTitles(&self, item_titles: &NSArray); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(insertItemWithTitle:atIndex:)] pub unsafe fn insertItemWithTitle_atIndex(&self, title: &NSString, index: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(removeItemWithTitle:)] pub unsafe fn removeItemWithTitle(&self, title: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(removeItemAtIndex:)] pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); #[cfg(all(feature = "AppKit_NSMenuItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemArray)] pub unsafe fn itemArray(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItem:)] pub unsafe fn indexOfItem(&self, item: &NSMenuItem) -> NSInteger; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithTitle:)] pub unsafe fn indexOfItemWithTitle(&self, title: &NSString) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithTag:)] pub unsafe fn indexOfItemWithTag(&self, tag: NSInteger) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithRepresentedObject:)] pub unsafe fn indexOfItemWithRepresentedObject(&self, obj: Option<&Object>) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfItemWithTarget:andAction:)] pub unsafe fn indexOfItemWithTarget_andAction( &self, @@ -148,71 +180,90 @@ extern_methods!( ) -> NSInteger; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemAtIndex:)] pub unsafe fn itemAtIndex(&self, index: NSInteger) -> Option>; #[cfg(all(feature = "AppKit_NSMenuItem", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemWithTitle:)] pub unsafe fn itemWithTitle(&self, title: &NSString) -> Option>; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other lastItem)] pub unsafe fn lastItem(&self) -> Option>; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(selectItem:)] pub unsafe fn selectItem(&self, item: Option<&NSMenuItem>); + #[cfg(not(any(target_os = "ios")))] #[method(selectItemAtIndex:)] pub unsafe fn selectItemAtIndex(&self, index: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(selectItemWithTitle:)] pub unsafe fn selectItemWithTitle(&self, title: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(selectItemWithTag:)] pub unsafe fn selectItemWithTag(&self, tag: NSInteger) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, string: Option<&NSString>); #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedItem)] pub unsafe fn selectedItem(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfSelectedItem)] pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(synchronizeTitleAndSelectedItem)] pub unsafe fn synchronizeTitleAndSelectedItem(&self); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemTitleAtIndex:)] pub unsafe fn itemTitleAtIndex(&self, index: NSInteger) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemTitles)] pub unsafe fn itemTitles(&self) -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleOfSelectedItem)] pub unsafe fn titleOfSelectedItem(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(attachPopUpWithFrame:inView:)] pub unsafe fn attachPopUpWithFrame_inView(&self, cell_frame: NSRect, control_view: &NSView); + #[cfg(not(any(target_os = "ios")))] #[method(dismissPopUp)] pub unsafe fn dismissPopUp(&self); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(performClickWithFrame:inView:)] pub unsafe fn performClickWithFrame_inView(&self, frame: NSRect, control_view: &NSView); + #[cfg(not(any(target_os = "ios")))] #[method(arrowPosition)] pub unsafe fn arrowPosition(&self) -> NSPopUpArrowPosition; + #[cfg(not(any(target_os = "ios")))] #[method(setArrowPosition:)] pub unsafe fn setArrowPosition(&self, arrow_position: NSPopUpArrowPosition); } @@ -225,6 +276,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSPopUpButtonCell")] unsafe impl NSPopUpButtonCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; } @@ -235,6 +287,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSPopUpButtonCell")] unsafe impl NSPopUpButtonCell { #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSPopover.rs b/AppKit/NSPopover.rs index 0b68bcc3f..6256d7fe6 100644 --- a/AppKit/NSPopover.rs +++ b/AppKit/NSPopover.rs @@ -8,19 +8,26 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub enum NSPopoverAppearance { #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSPopoverAppearanceMinimal = 0, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSPopoverAppearanceHUD = 1, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPopoverBehavior { + #[cfg(not(any(target_os = "ios")))] NSPopoverBehaviorApplicationDefined = 0, + #[cfg(not(any(target_os = "ios")))] NSPopoverBehaviorTransient = 1, + #[cfg(not(any(target_os = "ios")))] NSPopoverBehaviorSemitransient = 2, } ); @@ -28,64 +35,81 @@ ns_enum!( extern_methods!( #[cfg(feature = "AppKit_NSPopover")] unsafe impl NSPopover { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[method(behavior)] pub unsafe fn behavior(&self) -> NSPopoverBehavior; + #[cfg(not(any(target_os = "ios")))] #[method(setBehavior:)] pub unsafe fn setBehavior(&self, behavior: NSPopoverBehavior); + #[cfg(not(any(target_os = "ios")))] #[method(animates)] pub unsafe fn animates(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAnimates:)] pub unsafe fn setAnimates(&self, animates: bool); #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentViewController)] pub unsafe fn contentViewController(&self) -> Option>; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(setContentViewController:)] pub unsafe fn setContentViewController( &self, content_view_controller: Option<&NSViewController>, ); + #[cfg(not(any(target_os = "ios")))] #[method(contentSize)] pub unsafe fn contentSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setContentSize:)] pub unsafe fn setContentSize(&self, content_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(isShown)] pub unsafe fn isShown(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isDetached)] pub unsafe fn isDetached(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(positioningRect)] pub unsafe fn positioningRect(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setPositioningRect:)] pub unsafe fn setPositioningRect(&self, positioning_rect: NSRect); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(showRelativeToRect:ofView:preferredEdge:)] pub unsafe fn showRelativeToRect_ofView_preferredEdge( &self, @@ -94,9 +118,11 @@ extern_methods!( preferred_edge: NSRectEdge, ); + #[cfg(not(any(target_os = "ios")))] #[method(performClose:)] pub unsafe fn performClose(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(close)] pub unsafe fn close(&self); } @@ -121,43 +147,52 @@ extern_static!(NSPopoverWillCloseNotification: &'static NSNotificationName); extern_static!(NSPopoverDidCloseNotification: &'static NSNotificationName); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSPopoverDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSPopover")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(popoverShouldClose:)] unsafe fn popoverShouldClose(&self, popover: &NSPopover) -> bool; #[cfg(feature = "AppKit_NSPopover")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(popoverShouldDetach:)] unsafe fn popoverShouldDetach(&self, popover: &NSPopover) -> bool; #[cfg(feature = "AppKit_NSPopover")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(popoverDidDetach:)] unsafe fn popoverDidDetach(&self, popover: &NSPopover); #[cfg(all(feature = "AppKit_NSPopover", feature = "AppKit_NSWindow"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other detachableWindowForPopover:)] unsafe fn detachableWindowForPopover(&self, popover: &NSPopover) -> Option>; #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(popoverWillShow:)] unsafe fn popoverWillShow(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(popoverDidShow:)] unsafe fn popoverDidShow(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(popoverWillClose:)] unsafe fn popoverWillClose(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(popoverDidClose:)] unsafe fn popoverDidClose(&self, notification: &NSNotification); diff --git a/AppKit/NSPopoverTouchBarItem.rs b/AppKit/NSPopoverTouchBarItem.rs index ada83e85e..a59e42cca 100644 --- a/AppKit/NSPopoverTouchBarItem.rs +++ b/AppKit/NSPopoverTouchBarItem.rs @@ -43,10 +43,12 @@ extern_methods!( pub unsafe fn setCustomizationLabel(&self, customization_label: Option<&NSString>); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other collapsedRepresentation)] pub unsafe fn collapsedRepresentation(&self) -> Id; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setCollapsedRepresentation:)] pub unsafe fn setCollapsedRepresentation(&self, collapsed_representation: &NSView); @@ -93,6 +95,7 @@ extern_methods!( pub unsafe fn dismissPopover(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeStandardActivatePopoverGestureRecognizer)] pub unsafe fn makeStandardActivatePopoverGestureRecognizer( &self, diff --git a/AppKit/NSPredicateEditor.rs b/AppKit/NSPredicateEditor.rs index bfa483d0e..fc50337d1 100644 --- a/AppKit/NSPredicateEditor.rs +++ b/AppKit/NSPredicateEditor.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPredicateEditor")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPredicateEditor; #[cfg(feature = "AppKit_NSPredicateEditor")] @@ -48,6 +49,7 @@ extern_methods!( feature = "AppKit_NSPredicateEditorRowTemplate", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other rowTemplates)] pub unsafe fn rowTemplates(&self) -> Id>; @@ -55,6 +57,7 @@ extern_methods!( feature = "AppKit_NSPredicateEditorRowTemplate", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setRowTemplates:)] pub unsafe fn setRowTemplates(&self, row_templates: &NSArray); } @@ -64,6 +67,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSPredicateEditor")] unsafe impl NSPredicateEditor { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSPredicateEditorRowTemplate.rs b/AppKit/NSPredicateEditorRowTemplate.rs index 02c77b9c1..44ea9a849 100644 --- a/AppKit/NSPredicateEditorRowTemplate.rs +++ b/AppKit/NSPredicateEditorRowTemplate.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPredicateEditorRowTemplate")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPredicateEditorRowTemplate; #[cfg(feature = "AppKit_NSPredicateEditorRowTemplate")] @@ -26,18 +27,22 @@ extern_methods!( #[cfg(feature = "AppKit_NSPredicateEditorRowTemplate")] unsafe impl NSPredicateEditorRowTemplate { #[cfg(feature = "Foundation_NSPredicate")] + #[cfg(not(any(target_os = "ios")))] #[method(matchForPredicate:)] pub unsafe fn matchForPredicate(&self, predicate: &NSPredicate) -> c_double; #[cfg(all(feature = "AppKit_NSView", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other templateViews)] pub unsafe fn templateViews(&self) -> Id>; #[cfg(feature = "Foundation_NSPredicate")] + #[cfg(not(any(target_os = "ios")))] #[method(setPredicate:)] pub unsafe fn setPredicate(&self, predicate: &NSPredicate); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSPredicate"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other predicateWithSubpredicates:)] pub unsafe fn predicateWithSubpredicates( &self, @@ -45,6 +50,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSPredicate"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other displayableSubpredicatesOfPredicate:)] pub unsafe fn displayableSubpredicatesOfPredicate( &self, @@ -56,6 +62,7 @@ extern_methods!( feature = "Foundation_NSExpression", feature = "Foundation_NSNumber" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithLeftExpressions:rightExpressions:modifier:operators:options:)] pub unsafe fn initWithLeftExpressions_rightExpressions_modifier_operators_options( this: Option>, @@ -71,6 +78,7 @@ extern_methods!( feature = "Foundation_NSExpression", feature = "Foundation_NSNumber" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithLeftExpressions:rightExpressionAttributeType:modifier:operators:options:)] pub unsafe fn initWithLeftExpressions_rightExpressionAttributeType_modifier_operators_options( this: Option>, @@ -82,6 +90,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCompoundTypes:)] pub unsafe fn initWithCompoundTypes( this: Option>, @@ -89,27 +98,34 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSExpression"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other leftExpressions)] pub unsafe fn leftExpressions(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSExpression"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other rightExpressions)] pub unsafe fn rightExpressions(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(rightExpressionAttributeType)] pub unsafe fn rightExpressionAttributeType(&self) -> NSAttributeType; + #[cfg(not(any(target_os = "ios")))] #[method(modifier)] pub unsafe fn modifier(&self) -> NSComparisonPredicateModifier; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other operators)] pub unsafe fn operators(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(options)] pub unsafe fn options(&self) -> NSUInteger; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other compoundTypes)] pub unsafe fn compoundTypes(&self) -> Option>>; @@ -118,6 +134,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other templatesWithAttributeKeyPaths:inEntityDescription:)] pub unsafe fn templatesWithAttributeKeyPaths_inEntityDescription( key_paths: &NSArray, diff --git a/AppKit/NSPressGestureRecognizer.rs b/AppKit/NSPressGestureRecognizer.rs index b5a261235..d88744f0e 100644 --- a/AppKit/NSPressGestureRecognizer.rs +++ b/AppKit/NSPressGestureRecognizer.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPressGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPressGestureRecognizer; #[cfg(feature = "AppKit_NSPressGestureRecognizer")] @@ -26,27 +27,35 @@ unsafe impl NSObjectProtocol for NSPressGestureRecognizer {} extern_methods!( #[cfg(feature = "AppKit_NSPressGestureRecognizer")] unsafe impl NSPressGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method(buttonMask)] pub unsafe fn buttonMask(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setButtonMask:)] pub unsafe fn setButtonMask(&self, button_mask: NSUInteger); + #[cfg(not(any(target_os = "ios")))] #[method(minimumPressDuration)] pub unsafe fn minimumPressDuration(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(setMinimumPressDuration:)] pub unsafe fn setMinimumPressDuration(&self, minimum_press_duration: NSTimeInterval); + #[cfg(not(any(target_os = "ios")))] #[method(allowableMovement)] pub unsafe fn allowableMovement(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowableMovement:)] pub unsafe fn setAllowableMovement(&self, allowable_movement: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfTouchesRequired)] pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfTouchesRequired:)] pub unsafe fn setNumberOfTouchesRequired(&self, number_of_touches_required: NSInteger); } @@ -56,6 +65,7 @@ extern_methods!( /// Methods declared on superclass `NSGestureRecognizer` #[cfg(feature = "AppKit_NSPressGestureRecognizer")] unsafe impl NSPressGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithTarget:action:)] pub unsafe fn initWithTarget_action( this: Option>, diff --git a/AppKit/NSPressureConfiguration.rs b/AppKit/NSPressureConfiguration.rs index f2e252867..228a7b9ad 100644 --- a/AppKit/NSPressureConfiguration.rs +++ b/AppKit/NSPressureConfiguration.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPressureConfiguration")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPressureConfiguration; #[cfg(feature = "AppKit_NSPressureConfiguration")] @@ -22,15 +23,18 @@ unsafe impl NSObjectProtocol for NSPressureConfiguration {} extern_methods!( #[cfg(feature = "AppKit_NSPressureConfiguration")] unsafe impl NSPressureConfiguration { + #[cfg(not(any(target_os = "ios")))] #[method(pressureBehavior)] pub unsafe fn pressureBehavior(&self) -> NSPressureBehavior; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithPressureBehavior:)] pub unsafe fn initWithPressureBehavior( this: Option>, pressure_behavior: NSPressureBehavior, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(set)] pub unsafe fn set(&self); } @@ -41,10 +45,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(feature = "AppKit_NSPressureConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pressureConfiguration)] pub unsafe fn pressureConfiguration(&self) -> Option>; #[cfg(feature = "AppKit_NSPressureConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method(setPressureConfiguration:)] pub unsafe fn setPressureConfiguration( &self, diff --git a/AppKit/NSPreviewRepresentingActivityItem.rs b/AppKit/NSPreviewRepresentingActivityItem.rs index 0e8b22f23..4379cb506 100644 --- a/AppKit/NSPreviewRepresentingActivityItem.rs +++ b/AppKit/NSPreviewRepresentingActivityItem.rs @@ -6,21 +6,26 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSPreviewRepresentableActivityItem: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other item)] unsafe fn item(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other title)] unsafe fn title(&self) -> Option>; #[cfg(feature = "Foundation_NSItemProvider")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other imageProvider)] unsafe fn imageProvider(&self) -> Option>; #[cfg(feature = "Foundation_NSItemProvider")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other iconProvider)] unsafe fn iconProvider(&self) -> Option>; @@ -32,6 +37,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPreviewRepresentingActivityItem")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct NSPreviewRepresentingActivityItem; #[cfg(feature = "AppKit_NSPreviewRepresentingActivityItem")] @@ -50,6 +56,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSPreviewRepresentingActivityItem")] unsafe impl NSPreviewRepresentingActivityItem { #[cfg(all(feature = "AppKit_NSImage", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithItem:title:image:icon:)] pub unsafe fn initWithItem_title_image_icon( this: Option>, @@ -60,6 +67,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "Foundation_NSItemProvider", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithItem:title:imageProvider:iconProvider:)] pub unsafe fn initWithItem_title_imageProvider_iconProvider( this: Option>, @@ -69,9 +77,11 @@ extern_methods!( icon_provider: Option<&NSItemProvider>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } diff --git a/AppKit/NSPrintInfo.rs b/AppKit/NSPrintInfo.rs index 664f55bfd..40ac69d2c 100644 --- a/AppKit/NSPrintInfo.rs +++ b/AppKit/NSPrintInfo.rs @@ -7,17 +7,24 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPaperOrientation { + #[cfg(not(any(target_os = "ios")))] NSPaperOrientationPortrait = 0, + #[cfg(not(any(target_os = "ios")))] NSPaperOrientationLandscape = 1, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPrintingPaginationMode { + #[cfg(not(any(target_os = "ios")))] NSPrintingPaginationModeAutomatic = 0, + #[cfg(not(any(target_os = "ios")))] NSPrintingPaginationModeFit = 1, + #[cfg(not(any(target_os = "ios")))] NSPrintingPaginationModeClip = 2, } ); @@ -103,6 +110,7 @@ pub type NSPrintInfoSettingKey = NSString; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPrintInfo")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPrintInfo; #[cfg(feature = "AppKit_NSPrintInfo")] @@ -120,13 +128,16 @@ unsafe impl NSObjectProtocol for NSPrintInfo {} extern_methods!( #[cfg(feature = "AppKit_NSPrintInfo")] unsafe impl NSPrintInfo { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedPrintInfo)] pub unsafe fn sharedPrintInfo() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setSharedPrintInfo:)] pub unsafe fn setSharedPrintInfo(shared_print_info: &NSPrintInfo); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithDictionary:)] pub unsafe fn initWithDictionary( this: Option>, @@ -134,149 +145,193 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSMutableDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dictionary)] pub unsafe fn dictionary( &self, ) -> Id, Owned>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other paperName)] pub unsafe fn paperName(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setPaperName:)] pub unsafe fn setPaperName(&self, paper_name: Option<&NSPrinterPaperName>); + #[cfg(not(any(target_os = "ios")))] #[method(paperSize)] pub unsafe fn paperSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setPaperSize:)] pub unsafe fn setPaperSize(&self, paper_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(orientation)] pub unsafe fn orientation(&self) -> NSPaperOrientation; + #[cfg(not(any(target_os = "ios")))] #[method(setOrientation:)] pub unsafe fn setOrientation(&self, orientation: NSPaperOrientation); + #[cfg(not(any(target_os = "ios")))] #[method(scalingFactor)] pub unsafe fn scalingFactor(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setScalingFactor:)] pub unsafe fn setScalingFactor(&self, scaling_factor: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(leftMargin)] pub unsafe fn leftMargin(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setLeftMargin:)] pub unsafe fn setLeftMargin(&self, left_margin: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(rightMargin)] pub unsafe fn rightMargin(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setRightMargin:)] pub unsafe fn setRightMargin(&self, right_margin: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(topMargin)] pub unsafe fn topMargin(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setTopMargin:)] pub unsafe fn setTopMargin(&self, top_margin: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(bottomMargin)] pub unsafe fn bottomMargin(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setBottomMargin:)] pub unsafe fn setBottomMargin(&self, bottom_margin: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(isHorizontallyCentered)] pub unsafe fn isHorizontallyCentered(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHorizontallyCentered:)] pub unsafe fn setHorizontallyCentered(&self, horizontally_centered: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isVerticallyCentered)] pub unsafe fn isVerticallyCentered(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setVerticallyCentered:)] pub unsafe fn setVerticallyCentered(&self, vertically_centered: bool); + #[cfg(not(any(target_os = "ios")))] #[method(horizontalPagination)] pub unsafe fn horizontalPagination(&self) -> NSPrintingPaginationMode; + #[cfg(not(any(target_os = "ios")))] #[method(setHorizontalPagination:)] pub unsafe fn setHorizontalPagination( &self, horizontal_pagination: NSPrintingPaginationMode, ); + #[cfg(not(any(target_os = "ios")))] #[method(verticalPagination)] pub unsafe fn verticalPagination(&self) -> NSPrintingPaginationMode; + #[cfg(not(any(target_os = "ios")))] #[method(setVerticalPagination:)] pub unsafe fn setVerticalPagination(&self, vertical_pagination: NSPrintingPaginationMode); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other jobDisposition)] pub unsafe fn jobDisposition(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setJobDisposition:)] pub unsafe fn setJobDisposition(&self, job_disposition: &NSPrintJobDispositionValue); #[cfg(feature = "AppKit_NSPrinter")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printer)] pub unsafe fn printer(&self) -> Id; #[cfg(feature = "AppKit_NSPrinter")] + #[cfg(not(any(target_os = "ios")))] #[method(setPrinter:)] pub unsafe fn setPrinter(&self, printer: &NSPrinter); + #[cfg(not(any(target_os = "ios")))] #[method(setUpPrintOperationDefaultValues)] pub unsafe fn setUpPrintOperationDefaultValues(&self); + #[cfg(not(any(target_os = "ios")))] #[method(imageablePageBounds)] pub unsafe fn imageablePageBounds(&self) -> NSRect; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedPaperName)] pub unsafe fn localizedPaperName(&self) -> Option>; #[cfg(feature = "AppKit_NSPrinter")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultPrinter)] pub unsafe fn defaultPrinter() -> Option>; #[cfg(feature = "Foundation_NSMutableDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printSettings)] pub unsafe fn printSettings( &self, ) -> Id, Owned>; + #[cfg(not(any(target_os = "ios")))] #[method(PMPrintSession)] pub unsafe fn PMPrintSession(&self) -> NonNull; + #[cfg(not(any(target_os = "ios")))] #[method(PMPageFormat)] pub unsafe fn PMPageFormat(&self) -> NonNull; + #[cfg(not(any(target_os = "ios")))] #[method(PMPrintSettings)] pub unsafe fn PMPrintSettings(&self) -> NonNull; + #[cfg(not(any(target_os = "ios")))] #[method(updateFromPMPageFormat)] pub unsafe fn updateFromPMPageFormat(&self); + #[cfg(not(any(target_os = "ios")))] #[method(updateFromPMPrintSettings)] pub unsafe fn updateFromPMPrintSettings(&self); + #[cfg(not(any(target_os = "ios")))] #[method(isSelectionOnly)] pub unsafe fn isSelectionOnly(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionOnly:)] pub unsafe fn setSelectionOnly(&self, selection_only: bool); #[cfg(feature = "AppKit_NSPDFInfo")] + #[cfg(not(any(target_os = "ios")))] #[method(takeSettingsFromPDFInfo:)] pub unsafe fn takeSettingsFromPDFInfo(&self, in_pdf_info: &NSPDFInfo); } @@ -288,10 +343,12 @@ extern_methods!( unsafe impl NSPrintInfo { #[cfg(feature = "AppKit_NSPrinter")] #[deprecated = "NSPrintInfo's implementation has no effect"] + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultPrinter:)] pub unsafe fn setDefaultPrinter(printer: Option<&NSPrinter>); #[deprecated = "Use -[NSPrinter pageSizeForPaper:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method(sizeForPaperName:)] pub unsafe fn sizeForPaperName(name: Option<&NSPrinterPaperName>) -> NSSize; } @@ -312,10 +369,13 @@ extern_static!(NSPrintSavePath: &'static NSString); ns_enum!( #[underlying(NSUInteger)] #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub enum NSPrintingOrientation { #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSPortraitOrientation = 0, #[deprecated] + #[cfg(not(any(target_os = "ios")))] NSLandscapeOrientation = 1, } ); diff --git a/AppKit/NSPrintOperation.rs b/AppKit/NSPrintOperation.rs index c5608c726..8dd2116b5 100644 --- a/AppKit/NSPrintOperation.rs +++ b/AppKit/NSPrintOperation.rs @@ -7,18 +7,26 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPrintingPageOrder { + #[cfg(not(any(target_os = "ios")))] NSDescendingPageOrder = -1, + #[cfg(not(any(target_os = "ios")))] NSSpecialPageOrder = 0, + #[cfg(not(any(target_os = "ios")))] NSAscendingPageOrder = 1, + #[cfg(not(any(target_os = "ios")))] NSUnknownPageOrder = 2, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPrintRenderingQuality { + #[cfg(not(any(target_os = "ios")))] NSPrintRenderingQualityBest = 0, + #[cfg(not(any(target_os = "ios")))] NSPrintRenderingQualityResponsive = 1, } ); @@ -28,6 +36,7 @@ extern_static!(NSPrintOperationExistsException: &'static NSExceptionName); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPrintOperation")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPrintOperation; #[cfg(feature = "AppKit_NSPrintOperation")] @@ -43,6 +52,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSPrintOperation")] unsafe impl NSPrintOperation { #[cfg(all(feature = "AppKit_NSPrintInfo", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printOperationWithView:printInfo:)] pub unsafe fn printOperationWithView_printInfo( view: &NSView, @@ -54,6 +64,7 @@ extern_methods!( feature = "AppKit_NSView", feature = "Foundation_NSMutableData" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other PDFOperationWithView:insideRect:toData:printInfo:)] pub unsafe fn PDFOperationWithView_insideRect_toData_printInfo( view: &NSView, @@ -67,6 +78,7 @@ extern_methods!( feature = "AppKit_NSView", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other PDFOperationWithView:insideRect:toPath:printInfo:)] pub unsafe fn PDFOperationWithView_insideRect_toPath_printInfo( view: &NSView, @@ -80,6 +92,7 @@ extern_methods!( feature = "AppKit_NSView", feature = "Foundation_NSMutableData" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other EPSOperationWithView:insideRect:toData:printInfo:)] pub unsafe fn EPSOperationWithView_insideRect_toData_printInfo( view: &NSView, @@ -93,6 +106,7 @@ extern_methods!( feature = "AppKit_NSView", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other EPSOperationWithView:insideRect:toPath:printInfo:)] pub unsafe fn EPSOperationWithView_insideRect_toPath_printInfo( view: &NSView, @@ -102,10 +116,12 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printOperationWithView:)] pub unsafe fn printOperationWithView(view: &NSView) -> Id; #[cfg(all(feature = "AppKit_NSView", feature = "Foundation_NSMutableData"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other PDFOperationWithView:insideRect:toData:)] pub unsafe fn PDFOperationWithView_insideRect_toData( view: &NSView, @@ -114,6 +130,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "AppKit_NSView", feature = "Foundation_NSMutableData"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other EPSOperationWithView:insideRect:toData:)] pub unsafe fn EPSOperationWithView_insideRect_toData( view: &NSView, @@ -121,67 +138,86 @@ extern_methods!( data: Option<&NSMutableData>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentOperation)] pub unsafe fn currentOperation() -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setCurrentOperation:)] pub unsafe fn setCurrentOperation(current_operation: Option<&NSPrintOperation>); + #[cfg(not(any(target_os = "ios")))] #[method(isCopyingOperation)] pub unsafe fn isCopyingOperation(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(preferredRenderingQuality)] pub unsafe fn preferredRenderingQuality(&self) -> NSPrintRenderingQuality; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other jobTitle)] pub unsafe fn jobTitle(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setJobTitle:)] pub unsafe fn setJobTitle(&self, job_title: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method(showsPrintPanel)] pub unsafe fn showsPrintPanel(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsPrintPanel:)] pub unsafe fn setShowsPrintPanel(&self, shows_print_panel: bool); + #[cfg(not(any(target_os = "ios")))] #[method(showsProgressPanel)] pub unsafe fn showsProgressPanel(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsProgressPanel:)] pub unsafe fn setShowsProgressPanel(&self, shows_progress_panel: bool); #[cfg(feature = "AppKit_NSPrintPanel")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printPanel)] pub unsafe fn printPanel(&self) -> Id; #[cfg(feature = "AppKit_NSPrintPanel")] + #[cfg(not(any(target_os = "ios")))] #[method(setPrintPanel:)] pub unsafe fn setPrintPanel(&self, print_panel: &NSPrintPanel); #[cfg(feature = "AppKit_NSPDFPanel")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other PDFPanel)] pub unsafe fn PDFPanel(&self) -> Id; #[cfg(feature = "AppKit_NSPDFPanel")] + #[cfg(not(any(target_os = "ios")))] #[method(setPDFPanel:)] pub unsafe fn setPDFPanel(&self, pdf_panel: &NSPDFPanel); + #[cfg(not(any(target_os = "ios")))] #[method(canSpawnSeparateThread)] pub unsafe fn canSpawnSeparateThread(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanSpawnSeparateThread:)] pub unsafe fn setCanSpawnSeparateThread(&self, can_spawn_separate_thread: bool); + #[cfg(not(any(target_os = "ios")))] #[method(pageOrder)] pub unsafe fn pageOrder(&self) -> NSPrintingPageOrder; + #[cfg(not(any(target_os = "ios")))] #[method(setPageOrder:)] pub unsafe fn setPageOrder(&self, page_order: NSPrintingPageOrder); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(runOperationModalForWindow:delegate:didRunSelector:contextInfo:)] pub unsafe fn runOperationModalForWindow_delegate_didRunSelector_contextInfo( &self, @@ -191,41 +227,52 @@ extern_methods!( context_info: *mut c_void, ); + #[cfg(not(any(target_os = "ios")))] #[method(runOperation)] pub unsafe fn runOperation(&self) -> bool; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[cfg(feature = "AppKit_NSPrintInfo")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printInfo)] pub unsafe fn printInfo(&self) -> Id; #[cfg(feature = "AppKit_NSPrintInfo")] + #[cfg(not(any(target_os = "ios")))] #[method(setPrintInfo:)] pub unsafe fn setPrintInfo(&self, print_info: &NSPrintInfo); #[cfg(feature = "AppKit_NSGraphicsContext")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other context)] pub unsafe fn context(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(pageRange)] pub unsafe fn pageRange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(currentPage)] pub unsafe fn currentPage(&self) -> NSInteger; #[cfg(feature = "AppKit_NSGraphicsContext")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other createContext)] pub unsafe fn createContext(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(destroyContext)] pub unsafe fn destroyContext(&self); + #[cfg(not(any(target_os = "ios")))] #[method(deliverResult)] pub unsafe fn deliverResult(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(cleanUpOperation)] pub unsafe fn cleanUpOperation(&self); } @@ -237,29 +284,35 @@ extern_methods!( unsafe impl NSPrintOperation { #[cfg(feature = "AppKit_NSView")] #[deprecated = "Use -[NSPrintPanel addAccessoryController:] and -[NSPrintPanel removeAccessoryController:] instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, view: Option<&NSView>); #[cfg(feature = "AppKit_NSView")] #[deprecated = "Use -[NSPrintPanel accessoryControllers] instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setJobStyleHint:)] pub unsafe fn setJobStyleHint(&self, hint: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other jobStyleHint)] pub unsafe fn jobStyleHint(&self) -> Option>; #[deprecated = "Use -setShowsPrintPanel: and -setShowsProgressPanel: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setShowPanels:)] pub unsafe fn setShowPanels(&self, flag: bool); #[deprecated = "Use -showsPrintPanel and -showsProgressPanel instead"] + #[cfg(not(any(target_os = "ios")))] #[method(showPanels)] pub unsafe fn showPanels(&self) -> bool; } diff --git a/AppKit/NSPrintPanel.rs b/AppKit/NSPrintPanel.rs index 303784c85..c7a692a63 100644 --- a/AppKit/NSPrintPanel.rs +++ b/AppKit/NSPrintPanel.rs @@ -7,14 +7,23 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPrintPanelOptions { + #[cfg(not(any(target_os = "ios")))] NSPrintPanelShowsCopies = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSPrintPanelShowsPageRange = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSPrintPanelShowsPaperSize = 1 << 2, + #[cfg(not(any(target_os = "ios")))] NSPrintPanelShowsOrientation = 1 << 3, + #[cfg(not(any(target_os = "ios")))] NSPrintPanelShowsScaling = 1 << 4, + #[cfg(not(any(target_os = "ios")))] NSPrintPanelShowsPrintSelection = 1 << 5, + #[cfg(not(any(target_os = "ios")))] NSPrintPanelShowsPageSetupAccessory = 1 << 8, + #[cfg(not(any(target_os = "ios")))] NSPrintPanelShowsPreview = 1 << 17, } ); @@ -40,18 +49,21 @@ extern_static!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSPrintPanelAccessorizing { #[cfg(all( feature = "Foundation_NSArray", feature = "Foundation_NSDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedSummaryItems)] unsafe fn localizedSummaryItems( &self, ) -> Id>>; #[cfg(all(feature = "Foundation_NSSet", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other keyPathsForValuesAffectingPreview)] unsafe fn keyPathsForValuesAffectingPreview(&self) -> Id>; @@ -63,6 +75,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPrintPanel")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPrintPanel; #[cfg(feature = "AppKit_NSPrintPanel")] @@ -77,48 +90,61 @@ unsafe impl NSObjectProtocol for NSPrintPanel {} extern_methods!( #[cfg(feature = "AppKit_NSPrintPanel")] unsafe impl NSPrintPanel { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printPanel)] pub unsafe fn printPanel() -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(addAccessoryController:)] pub unsafe fn addAccessoryController(&self, accessory_controller: &NSViewController); #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(removeAccessoryController:)] pub unsafe fn removeAccessoryController(&self, accessory_controller: &NSViewController); #[cfg(all(feature = "AppKit_NSViewController", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryControllers)] pub unsafe fn accessoryControllers(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(options)] pub unsafe fn options(&self) -> NSPrintPanelOptions; + #[cfg(not(any(target_os = "ios")))] #[method(setOptions:)] pub unsafe fn setOptions(&self, options: NSPrintPanelOptions); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultButtonTitle:)] pub unsafe fn setDefaultButtonTitle(&self, default_button_title: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultButtonTitle)] pub unsafe fn defaultButtonTitle(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other helpAnchor)] pub unsafe fn helpAnchor(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setHelpAnchor:)] pub unsafe fn setHelpAnchor(&self, help_anchor: Option<&NSHelpAnchorName>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other jobStyleHint)] pub unsafe fn jobStyleHint(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setJobStyleHint:)] pub unsafe fn setJobStyleHint(&self, job_style_hint: Option<&NSPrintPanelJobStyleHint>); #[cfg(all(feature = "AppKit_NSPrintInfo", feature = "AppKit_NSWindow"))] + #[cfg(not(any(target_os = "ios")))] #[method(beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:)] pub unsafe fn beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo( &self, @@ -130,13 +156,16 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSPrintInfo")] + #[cfg(not(any(target_os = "ios")))] #[method(runModalWithPrintInfo:)] pub unsafe fn runModalWithPrintInfo(&self, print_info: &NSPrintInfo) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(runModal)] pub unsafe fn runModal(&self) -> NSInteger; #[cfg(feature = "AppKit_NSPrintInfo")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printInfo)] pub unsafe fn printInfo(&self) -> Id; } @@ -148,19 +177,23 @@ extern_methods!( unsafe impl NSPrintPanel { #[cfg(feature = "AppKit_NSView")] #[deprecated = "Use -addAccessoryController instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessory_view: Option<&NSView>); #[cfg(feature = "AppKit_NSView")] #[deprecated = "Use -accessoryControllers instead. For compatibility this returns the view of the first accessory controller, or nil"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(updateFromPrintInfo)] pub unsafe fn updateFromPrintInfo(&self); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(finalWritePrintInfo)] pub unsafe fn finalWritePrintInfo(&self); } diff --git a/AppKit/NSPrinter.rs b/AppKit/NSPrinter.rs index 2b809261a..5c8d1bfde 100644 --- a/AppKit/NSPrinter.rs +++ b/AppKit/NSPrinter.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSPrinterTableStatus { + #[cfg(not(any(target_os = "ios")))] NSPrinterTableOK = 0, + #[cfg(not(any(target_os = "ios")))] NSPrinterTableNotFound = 1, + #[cfg(not(any(target_os = "ios")))] NSPrinterTableError = 2, } ); @@ -25,6 +29,7 @@ typed_extensible_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSPrinter")] + #[cfg(not(any(target_os = "ios")))] pub struct NSPrinter; #[cfg(feature = "AppKit_NSPrinter")] @@ -43,34 +48,43 @@ extern_methods!( #[cfg(feature = "AppKit_NSPrinter")] unsafe impl NSPrinter { #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printerNames)] pub unsafe fn printerNames() -> Id>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printerTypes)] pub unsafe fn printerTypes() -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printerWithName:)] pub unsafe fn printerWithName(name: &NSString) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printerWithType:)] pub unsafe fn printerWithType(r#type: &NSPrinterTypeName) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other type)] pub unsafe fn r#type(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(languageLevel)] pub unsafe fn languageLevel(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(pageSizeForPaper:)] pub unsafe fn pageSizeForPaper(&self, paper_name: &NSPrinterPaperName) -> NSSize; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other deviceDescription)] pub unsafe fn deviceDescription(&self) -> Id>; } @@ -82,16 +96,19 @@ extern_methods!( unsafe impl NSPrinter { #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(statusForTable:)] pub unsafe fn statusForTable(&self, table_name: &NSString) -> NSPrinterTableStatus; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(isKey:inTable:)] pub unsafe fn isKey_inTable(&self, key: Option<&NSString>, table: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(booleanForKey:inTable:)] pub unsafe fn booleanForKey_inTable( &self, @@ -101,6 +118,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(floatForKey:inTable:)] pub unsafe fn floatForKey_inTable( &self, @@ -110,23 +128,27 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(intForKey:inTable:)] pub unsafe fn intForKey_inTable(&self, key: Option<&NSString>, table: &NSString) -> c_int; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(rectForKey:inTable:)] pub unsafe fn rectForKey_inTable(&self, key: Option<&NSString>, table: &NSString) -> NSRect; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(sizeForKey:inTable:)] pub unsafe fn sizeForKey_inTable(&self, key: Option<&NSString>, table: &NSString) -> NSSize; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other stringForKey:inTable:)] pub unsafe fn stringForKey_inTable( &self, @@ -136,6 +158,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other stringListForKey:inTable:)] pub unsafe fn stringListForKey_inTable( &self, @@ -145,28 +168,34 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(imageRectForPaper:)] pub unsafe fn imageRectForPaper(&self, paper_name: Option<&NSString>) -> NSRect; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(acceptsBinary)] pub unsafe fn acceptsBinary(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(isColor)] pub unsafe fn isColor(&self) -> bool; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(isFontAvailable:)] pub unsafe fn isFontAvailable(&self, face_name: Option<&NSString>) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(isOutputStackInReverseOrder)] pub unsafe fn isOutputStackInReverseOrder(&self) -> bool; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printerWithName:domain:includeUnavailable:)] pub unsafe fn printerWithName_domain_includeUnavailable( name: &NSString, @@ -176,16 +205,19 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other domain)] pub unsafe fn domain(&self) -> Id; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other host)] pub unsafe fn host(&self) -> Id; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other note)] pub unsafe fn note(&self) -> Id; } diff --git a/AppKit/NSProgressIndicator.rs b/AppKit/NSProgressIndicator.rs index 261bb1f22..429530569 100644 --- a/AppKit/NSProgressIndicator.rs +++ b/AppKit/NSProgressIndicator.rs @@ -7,8 +7,11 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSProgressIndicatorStyle { + #[cfg(not(any(target_os = "ios")))] NSProgressIndicatorStyleBar = 0, + #[cfg(not(any(target_os = "ios")))] NSProgressIndicatorStyleSpinning = 1, } ); @@ -16,6 +19,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSProgressIndicator")] + #[cfg(not(any(target_os = "ios")))] pub struct NSProgressIndicator; #[cfg(feature = "AppKit_NSProgressIndicator")] @@ -58,75 +62,99 @@ unsafe impl NSUserInterfaceItemIdentification for NSProgressIndicator {} extern_methods!( #[cfg(feature = "AppKit_NSProgressIndicator")] unsafe impl NSProgressIndicator { + #[cfg(not(any(target_os = "ios")))] #[method(isIndeterminate)] pub unsafe fn isIndeterminate(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setIndeterminate:)] pub unsafe fn setIndeterminate(&self, indeterminate: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isBezeled)] pub unsafe fn isBezeled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setBezeled:)] pub unsafe fn setBezeled(&self, bezeled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(controlTint)] pub unsafe fn controlTint(&self) -> NSControlTint; + #[cfg(not(any(target_os = "ios")))] #[method(setControlTint:)] pub unsafe fn setControlTint(&self, control_tint: NSControlTint); + #[cfg(not(any(target_os = "ios")))] #[method(controlSize)] pub unsafe fn controlSize(&self) -> NSControlSize; + #[cfg(not(any(target_os = "ios")))] #[method(setControlSize:)] pub unsafe fn setControlSize(&self, control_size: NSControlSize); + #[cfg(not(any(target_os = "ios")))] #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setDoubleValue:)] pub unsafe fn setDoubleValue(&self, double_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(incrementBy:)] pub unsafe fn incrementBy(&self, delta: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMinValue:)] pub unsafe fn setMinValue(&self, min_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, max_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(usesThreadedAnimation)] pub unsafe fn usesThreadedAnimation(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesThreadedAnimation:)] pub unsafe fn setUsesThreadedAnimation(&self, uses_threaded_animation: bool); + #[cfg(not(any(target_os = "ios")))] #[method(startAnimation:)] pub unsafe fn startAnimation(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(stopAnimation:)] pub unsafe fn stopAnimation(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(style)] pub unsafe fn style(&self) -> NSProgressIndicatorStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setStyle:)] pub unsafe fn setStyle(&self, style: NSProgressIndicatorStyle); + #[cfg(not(any(target_os = "ios")))] #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); + #[cfg(not(any(target_os = "ios")))] #[method(isDisplayedWhenStopped)] pub unsafe fn isDisplayedWhenStopped(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDisplayedWhenStopped:)] pub unsafe fn setDisplayedWhenStopped(&self, displayed_when_stopped: bool); } @@ -135,14 +163,19 @@ extern_methods!( ns_enum!( #[underlying(NSUInteger)] #[deprecated = "These constants do not accurately represent the geometry of NSProgressIndicator. Use `controlSize` and `sizeToFit` instead."] + #[cfg(not(any(target_os = "ios")))] pub enum NSProgressIndicatorThickness { #[deprecated = "These constants do not accurately represent the geometry of NSProgressIndicator. Use `controlSize` and `sizeToFit` instead."] + #[cfg(not(any(target_os = "ios")))] NSProgressIndicatorPreferredThickness = 14, #[deprecated = "These constants do not accurately represent the geometry of NSProgressIndicator. Use `controlSize` and `sizeToFit` instead."] + #[cfg(not(any(target_os = "ios")))] NSProgressIndicatorPreferredSmallThickness = 10, #[deprecated = "These constants do not accurately represent the geometry of NSProgressIndicator. Use `controlSize` and `sizeToFit` instead."] + #[cfg(not(any(target_os = "ios")))] NSProgressIndicatorPreferredLargeThickness = 18, #[deprecated = "These constants do not accurately represent the geometry of NSProgressIndicator. Use `controlSize` and `sizeToFit` instead."] + #[cfg(not(any(target_os = "ios")))] NSProgressIndicatorPreferredAquaThickness = 12, } ); @@ -158,14 +191,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSProgressIndicator")] unsafe impl NSProgressIndicator { #[deprecated = "The animationDelay property does nothing."] + #[cfg(not(any(target_os = "ios")))] #[method(animationDelay)] pub unsafe fn animationDelay(&self) -> NSTimeInterval; #[deprecated = "The animationDelay property does nothing."] + #[cfg(not(any(target_os = "ios")))] #[method(setAnimationDelay:)] pub unsafe fn setAnimationDelay(&self, delay: NSTimeInterval); #[deprecated = "Use -startAnimation and -stopAnimation instead."] + #[cfg(not(any(target_os = "ios")))] #[method(animate:)] pub unsafe fn animate(&self, sender: Option<&Object>); } @@ -175,6 +211,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSProgressIndicator")] unsafe impl NSProgressIndicator { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSResponder.rs b/AppKit/NSResponder.rs index 05dd5e77a..b9509826f 100644 --- a/AppKit/NSResponder.rs +++ b/AppKit/NSResponder.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSResponder")] + #[cfg(not(any(target_os = "ios")))] pub struct NSResponder; #[cfg(feature = "AppKit_NSResponder")] @@ -25,29 +26,36 @@ unsafe impl NSObjectProtocol for NSResponder {} extern_methods!( #[cfg(feature = "AppKit_NSResponder")] unsafe impl NSResponder { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other nextResponder)] pub unsafe fn nextResponder(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setNextResponder:)] pub unsafe fn setNextResponder(&self, next_responder: Option<&NSResponder>); + #[cfg(not(any(target_os = "ios")))] #[method(tryToPerform:with:)] pub unsafe fn tryToPerform_with(&self, action: Sel, object: Option<&Object>) -> bool; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(performKeyEquivalent:)] pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other validRequestorForSendType:returnType:)] pub unsafe fn validRequestorForSendType_returnType( &self, @@ -56,180 +64,226 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseDown:)] pub unsafe fn mouseDown(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(rightMouseDown:)] pub unsafe fn rightMouseDown(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(otherMouseDown:)] pub unsafe fn otherMouseDown(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseUp:)] pub unsafe fn mouseUp(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(rightMouseUp:)] pub unsafe fn rightMouseUp(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(otherMouseUp:)] pub unsafe fn otherMouseUp(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseMoved:)] pub unsafe fn mouseMoved(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseDragged:)] pub unsafe fn mouseDragged(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(scrollWheel:)] pub unsafe fn scrollWheel(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(rightMouseDragged:)] pub unsafe fn rightMouseDragged(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(otherMouseDragged:)] pub unsafe fn otherMouseDragged(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseEntered:)] pub unsafe fn mouseEntered(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(mouseExited:)] pub unsafe fn mouseExited(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(keyDown:)] pub unsafe fn keyDown(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(keyUp:)] pub unsafe fn keyUp(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(flagsChanged:)] pub unsafe fn flagsChanged(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(tabletPoint:)] pub unsafe fn tabletPoint(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(tabletProximity:)] pub unsafe fn tabletProximity(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(cursorUpdate:)] pub unsafe fn cursorUpdate(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(magnifyWithEvent:)] pub unsafe fn magnifyWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(rotateWithEvent:)] pub unsafe fn rotateWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(swipeWithEvent:)] pub unsafe fn swipeWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(beginGestureWithEvent:)] pub unsafe fn beginGestureWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(endGestureWithEvent:)] pub unsafe fn endGestureWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(smartMagnifyWithEvent:)] pub unsafe fn smartMagnifyWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(changeModeWithEvent:)] pub unsafe fn changeModeWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(touchesBeganWithEvent:)] pub unsafe fn touchesBeganWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(touchesMovedWithEvent:)] pub unsafe fn touchesMovedWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(touchesEndedWithEvent:)] pub unsafe fn touchesEndedWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(touchesCancelledWithEvent:)] pub unsafe fn touchesCancelledWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(quickLookWithEvent:)] pub unsafe fn quickLookWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(pressureChangeWithEvent:)] pub unsafe fn pressureChangeWithEvent(&self, event: &NSEvent); + #[cfg(not(any(target_os = "ios")))] #[method(noResponderFor:)] pub unsafe fn noResponderFor(&self, event_selector: Sel); + #[cfg(not(any(target_os = "ios")))] #[method(acceptsFirstResponder)] pub unsafe fn acceptsFirstResponder(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(becomeFirstResponder)] pub unsafe fn becomeFirstResponder(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(resignFirstResponder)] pub unsafe fn resignFirstResponder(&self) -> bool; #[cfg(all(feature = "AppKit_NSEvent", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(interpretKeyEvents:)] pub unsafe fn interpretKeyEvents(&self, event_array: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(flushBufferedKeyEvents)] pub unsafe fn flushBufferedKeyEvents(&self); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[cfg(not(any(target_os = "ios")))] #[method(showContextHelp:)] pub unsafe fn showContextHelp(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(helpRequested:)] pub unsafe fn helpRequested(&self, event_ptr: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(shouldBeTreatedAsInkEvent:)] pub unsafe fn shouldBeTreatedAsInkEvent(&self, event: &NSEvent) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(wantsScrollEventsForSwipeTrackingOnAxis:)] pub unsafe fn wantsScrollEventsForSwipeTrackingOnAxis( &self, axis: NSEventGestureAxis, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(wantsForwardedScrollEventsForAxis:)] pub unsafe fn wantsForwardedScrollEventsForAxis(&self, axis: NSEventGestureAxis) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other supplementalTargetForAction:sender:)] pub unsafe fn supplementalTargetForAction_sender( &self, @@ -240,383 +294,479 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSStandardKeyBindingResponding: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(insertText:)] unsafe fn insertText(&self, insert_string: &Object); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(doCommandBySelector:)] unsafe fn doCommandBySelector(&self, selector: Sel); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveForward:)] unsafe fn moveForward(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveRight:)] unsafe fn moveRight(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveBackward:)] unsafe fn moveBackward(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveLeft:)] unsafe fn moveLeft(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveUp:)] unsafe fn moveUp(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveDown:)] unsafe fn moveDown(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveWordForward:)] unsafe fn moveWordForward(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveWordBackward:)] unsafe fn moveWordBackward(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToBeginningOfLine:)] unsafe fn moveToBeginningOfLine(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToEndOfLine:)] unsafe fn moveToEndOfLine(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToBeginningOfParagraph:)] unsafe fn moveToBeginningOfParagraph(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToEndOfParagraph:)] unsafe fn moveToEndOfParagraph(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToEndOfDocument:)] unsafe fn moveToEndOfDocument(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToBeginningOfDocument:)] unsafe fn moveToBeginningOfDocument(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pageDown:)] unsafe fn pageDown(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pageUp:)] unsafe fn pageUp(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(centerSelectionInVisibleArea:)] unsafe fn centerSelectionInVisibleArea(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveBackwardAndModifySelection:)] unsafe fn moveBackwardAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveForwardAndModifySelection:)] unsafe fn moveForwardAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveWordForwardAndModifySelection:)] unsafe fn moveWordForwardAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveWordBackwardAndModifySelection:)] unsafe fn moveWordBackwardAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveUpAndModifySelection:)] unsafe fn moveUpAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveDownAndModifySelection:)] unsafe fn moveDownAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToBeginningOfLineAndModifySelection:)] unsafe fn moveToBeginningOfLineAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToEndOfLineAndModifySelection:)] unsafe fn moveToEndOfLineAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToBeginningOfParagraphAndModifySelection:)] unsafe fn moveToBeginningOfParagraphAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToEndOfParagraphAndModifySelection:)] unsafe fn moveToEndOfParagraphAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToEndOfDocumentAndModifySelection:)] unsafe fn moveToEndOfDocumentAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToBeginningOfDocumentAndModifySelection:)] unsafe fn moveToBeginningOfDocumentAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pageDownAndModifySelection:)] unsafe fn pageDownAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(pageUpAndModifySelection:)] unsafe fn pageUpAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveParagraphForwardAndModifySelection:)] unsafe fn moveParagraphForwardAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveParagraphBackwardAndModifySelection:)] unsafe fn moveParagraphBackwardAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveWordRight:)] unsafe fn moveWordRight(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveWordLeft:)] unsafe fn moveWordLeft(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveRightAndModifySelection:)] unsafe fn moveRightAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveLeftAndModifySelection:)] unsafe fn moveLeftAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveWordRightAndModifySelection:)] unsafe fn moveWordRightAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveWordLeftAndModifySelection:)] unsafe fn moveWordLeftAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToLeftEndOfLine:)] unsafe fn moveToLeftEndOfLine(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToRightEndOfLine:)] unsafe fn moveToRightEndOfLine(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToLeftEndOfLineAndModifySelection:)] unsafe fn moveToLeftEndOfLineAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(moveToRightEndOfLineAndModifySelection:)] unsafe fn moveToRightEndOfLineAndModifySelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(scrollPageUp:)] unsafe fn scrollPageUp(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(scrollPageDown:)] unsafe fn scrollPageDown(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(scrollLineUp:)] unsafe fn scrollLineUp(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(scrollLineDown:)] unsafe fn scrollLineDown(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(scrollToBeginningOfDocument:)] unsafe fn scrollToBeginningOfDocument(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(scrollToEndOfDocument:)] unsafe fn scrollToEndOfDocument(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(transpose:)] unsafe fn transpose(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(transposeWords:)] unsafe fn transposeWords(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(selectAll:)] unsafe fn selectAll(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(selectParagraph:)] unsafe fn selectParagraph(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(selectLine:)] unsafe fn selectLine(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(selectWord:)] unsafe fn selectWord(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(indent:)] unsafe fn indent(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(insertTab:)] unsafe fn insertTab(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(insertBacktab:)] unsafe fn insertBacktab(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(insertNewline:)] unsafe fn insertNewline(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(insertParagraphSeparator:)] unsafe fn insertParagraphSeparator(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(insertNewlineIgnoringFieldEditor:)] unsafe fn insertNewlineIgnoringFieldEditor(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(insertTabIgnoringFieldEditor:)] unsafe fn insertTabIgnoringFieldEditor(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(insertLineBreak:)] unsafe fn insertLineBreak(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(insertContainerBreak:)] unsafe fn insertContainerBreak(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(insertSingleQuoteIgnoringSubstitution:)] unsafe fn insertSingleQuoteIgnoringSubstitution(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(insertDoubleQuoteIgnoringSubstitution:)] unsafe fn insertDoubleQuoteIgnoringSubstitution(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(changeCaseOfLetter:)] unsafe fn changeCaseOfLetter(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(uppercaseWord:)] unsafe fn uppercaseWord(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(lowercaseWord:)] unsafe fn lowercaseWord(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(capitalizeWord:)] unsafe fn capitalizeWord(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(deleteForward:)] unsafe fn deleteForward(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(deleteBackward:)] unsafe fn deleteBackward(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(deleteBackwardByDecomposingPreviousCharacter:)] unsafe fn deleteBackwardByDecomposingPreviousCharacter(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(deleteWordForward:)] unsafe fn deleteWordForward(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(deleteWordBackward:)] unsafe fn deleteWordBackward(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(deleteToBeginningOfLine:)] unsafe fn deleteToBeginningOfLine(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(deleteToEndOfLine:)] unsafe fn deleteToEndOfLine(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(deleteToBeginningOfParagraph:)] unsafe fn deleteToBeginningOfParagraph(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(deleteToEndOfParagraph:)] unsafe fn deleteToEndOfParagraph(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(yank:)] unsafe fn yank(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(complete:)] unsafe fn complete(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setMark:)] unsafe fn setMark(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(deleteToMark:)] unsafe fn deleteToMark(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(selectToMark:)] unsafe fn selectToMark(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(swapWithMark:)] unsafe fn swapWithMark(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(cancelOperation:)] unsafe fn cancelOperation(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(makeBaseWritingDirectionNatural:)] unsafe fn makeBaseWritingDirectionNatural(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(makeBaseWritingDirectionLeftToRight:)] unsafe fn makeBaseWritingDirectionLeftToRight(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(makeBaseWritingDirectionRightToLeft:)] unsafe fn makeBaseWritingDirectionRightToLeft(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(makeTextWritingDirectionNatural:)] unsafe fn makeTextWritingDirectionNatural(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(makeTextWritingDirectionLeftToRight:)] unsafe fn makeTextWritingDirectionLeftToRight(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(makeTextWritingDirectionRightToLeft:)] unsafe fn makeTextWritingDirectionRightToLeft(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(quickLookPreviewItems:)] unsafe fn quickLookPreviewItems(&self, sender: Option<&Object>); @@ -639,6 +789,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSResponder")] unsafe impl NSResponder { #[cfg(feature = "Foundation_NSUndoManager")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other undoManager)] pub unsafe fn undoManager(&self) -> Option>; } @@ -649,6 +800,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSResponder")] unsafe impl NSResponder { #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(validateProposedFirstResponder:forEvent:)] pub unsafe fn validateProposedFirstResponder_forEvent( &self, @@ -663,6 +815,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSResponder")] unsafe impl NSResponder { #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "ios")))] #[method(presentError:modalForWindow:delegate:didPresentSelector:contextInfo:)] pub unsafe fn presentError_modalForWindow_delegate_didPresentSelector_contextInfo( &self, @@ -674,10 +827,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(presentError:)] pub unsafe fn presentError(&self, error: &NSError) -> bool; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other willPresentError:)] pub unsafe fn willPresentError(&self, error: &NSError) -> Id; } @@ -687,6 +842,7 @@ extern_methods!( /// NSTextFinderSupport #[cfg(feature = "AppKit_NSResponder")] unsafe impl NSResponder { + #[cfg(not(any(target_os = "ios")))] #[method(performTextFinderAction:)] pub unsafe fn performTextFinderAction(&self, sender: Option<&Object>); } @@ -696,6 +852,7 @@ extern_methods!( /// NSWindowTabbing #[cfg(feature = "AppKit_NSResponder")] unsafe impl NSResponder { + #[cfg(not(any(target_os = "ios")))] #[method(newWindowForTab:)] pub unsafe fn newWindowForTab(&self, sender: Option<&Object>); } @@ -707,6 +864,7 @@ extern_methods!( unsafe impl NSResponder { #[cfg(feature = "Foundation_NSString")] #[deprecated = "This has always returned NO and had no effect on macOS"] + #[cfg(not(any(target_os = "ios")))] #[method(performMnemonic:)] pub unsafe fn performMnemonic(&self, string: &NSString) -> bool; } diff --git a/AppKit/NSRotationGestureRecognizer.rs b/AppKit/NSRotationGestureRecognizer.rs index 9291e44d6..c9536de98 100644 --- a/AppKit/NSRotationGestureRecognizer.rs +++ b/AppKit/NSRotationGestureRecognizer.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSRotationGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] pub struct NSRotationGestureRecognizer; #[cfg(feature = "AppKit_NSRotationGestureRecognizer")] @@ -26,15 +27,19 @@ unsafe impl NSObjectProtocol for NSRotationGestureRecognizer {} extern_methods!( #[cfg(feature = "AppKit_NSRotationGestureRecognizer")] unsafe impl NSRotationGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method(rotation)] pub unsafe fn rotation(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setRotation:)] pub unsafe fn setRotation(&self, rotation: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(rotationInDegrees)] pub unsafe fn rotationInDegrees(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setRotationInDegrees:)] pub unsafe fn setRotationInDegrees(&self, rotation_in_degrees: CGFloat); } @@ -44,6 +49,7 @@ extern_methods!( /// Methods declared on superclass `NSGestureRecognizer` #[cfg(feature = "AppKit_NSRotationGestureRecognizer")] unsafe impl NSRotationGestureRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithTarget:action:)] pub unsafe fn initWithTarget_action( this: Option>, diff --git a/AppKit/NSRuleEditor.rs b/AppKit/NSRuleEditor.rs index 0d415467e..e37471c98 100644 --- a/AppKit/NSRuleEditor.rs +++ b/AppKit/NSRuleEditor.rs @@ -25,18 +25,26 @@ extern_static!(NSRuleEditorPredicateCompoundType: &'static NSRuleEditorPredicate ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSRuleEditorNestingMode { + #[cfg(not(any(target_os = "ios")))] NSRuleEditorNestingModeSingle = 0, + #[cfg(not(any(target_os = "ios")))] NSRuleEditorNestingModeList = 1, + #[cfg(not(any(target_os = "ios")))] NSRuleEditorNestingModeCompound = 2, + #[cfg(not(any(target_os = "ios")))] NSRuleEditorNestingModeSimple = 3, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSRuleEditorRowType { + #[cfg(not(any(target_os = "ios")))] NSRuleEditorRowTypeSimple = 0, + #[cfg(not(any(target_os = "ios")))] NSRuleEditorRowTypeCompound = 1, } ); @@ -44,6 +52,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSRuleEditor")] + #[cfg(not(any(target_os = "ios")))] pub struct NSRuleEditor; #[cfg(feature = "AppKit_NSRuleEditor")] @@ -80,9 +89,11 @@ unsafe impl NSUserInterfaceItemIdentification for NSRuleEditor {} extern_methods!( #[cfg(feature = "AppKit_NSRuleEditor")] unsafe impl NSRuleEditor { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -90,10 +101,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other formattingStringsFilename)] pub unsafe fn formattingStringsFilename(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setFormattingStringsFilename:)] pub unsafe fn setFormattingStringsFilename( &self, @@ -101,81 +114,104 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other formattingDictionary)] pub unsafe fn formattingDictionary(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setFormattingDictionary:)] pub unsafe fn setFormattingDictionary( &self, formatting_dictionary: Option<&NSDictionary>, ); + #[cfg(not(any(target_os = "ios")))] #[method(reloadCriteria)] pub unsafe fn reloadCriteria(&self); + #[cfg(not(any(target_os = "ios")))] #[method(nestingMode)] pub unsafe fn nestingMode(&self) -> NSRuleEditorNestingMode; + #[cfg(not(any(target_os = "ios")))] #[method(setNestingMode:)] pub unsafe fn setNestingMode(&self, nesting_mode: NSRuleEditorNestingMode); + #[cfg(not(any(target_os = "ios")))] #[method(rowHeight)] pub unsafe fn rowHeight(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setRowHeight:)] pub unsafe fn setRowHeight(&self, row_height: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(canRemoveAllRows)] pub unsafe fn canRemoveAllRows(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanRemoveAllRows:)] pub unsafe fn setCanRemoveAllRows(&self, can_remove_all_rows: bool); #[cfg(feature = "Foundation_NSPredicate")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other predicate)] pub unsafe fn predicate(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(reloadPredicate)] pub unsafe fn reloadPredicate(&self); #[cfg(feature = "Foundation_NSPredicate")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other predicateForRow:)] pub unsafe fn predicateForRow(&self, row: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfRows)] pub unsafe fn numberOfRows(&self) -> NSInteger; #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other subrowIndexesForRow:)] pub unsafe fn subrowIndexesForRow(&self, row_index: NSInteger) -> Id; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other criteriaForRow:)] pub unsafe fn criteriaForRow(&self, row: NSInteger) -> Id; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other displayValuesForRow:)] pub unsafe fn displayValuesForRow(&self, row: NSInteger) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(rowForDisplayValue:)] pub unsafe fn rowForDisplayValue(&self, display_value: &Object) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(rowTypeForRow:)] pub unsafe fn rowTypeForRow(&self, row_index: NSInteger) -> NSRuleEditorRowType; + #[cfg(not(any(target_os = "ios")))] #[method(parentRowForRow:)] pub unsafe fn parentRowForRow(&self, row_index: NSInteger) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(addRow:)] pub unsafe fn addRow(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(insertRowAtIndex:withType:asSubrowOfRow:animate:)] pub unsafe fn insertRowAtIndex_withType_asSubrowOfRow_animate( &self, @@ -186,6 +222,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setCriteria:andDisplayValues:forRowAtIndex:)] pub unsafe fn setCriteria_andDisplayValues_forRowAtIndex( &self, @@ -194,10 +231,12 @@ extern_methods!( row_index: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(removeRowAtIndex:)] pub unsafe fn removeRowAtIndex(&self, row_index: NSInteger); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(removeRowsAtIndexes:includeSubrows:)] pub unsafe fn removeRowsAtIndexes_includeSubrows( &self, @@ -206,10 +245,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedRowIndexes)] pub unsafe fn selectedRowIndexes(&self) -> Id; #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(selectRowIndexes:byExtendingSelection:)] pub unsafe fn selectRowIndexes_byExtendingSelection( &self, @@ -217,49 +258,61 @@ extern_methods!( extend: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(rowClass)] pub unsafe fn rowClass(&self) -> &'static Class; + #[cfg(not(any(target_os = "ios")))] #[method(setRowClass:)] pub unsafe fn setRowClass(&self, row_class: &Class); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other rowTypeKeyPath)] pub unsafe fn rowTypeKeyPath(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setRowTypeKeyPath:)] pub unsafe fn setRowTypeKeyPath(&self, row_type_key_path: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other subrowsKeyPath)] pub unsafe fn subrowsKeyPath(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setSubrowsKeyPath:)] pub unsafe fn setSubrowsKeyPath(&self, subrows_key_path: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other criteriaKeyPath)] pub unsafe fn criteriaKeyPath(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setCriteriaKeyPath:)] pub unsafe fn setCriteriaKeyPath(&self, criteria_key_path: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other displayValuesKeyPath)] pub unsafe fn displayValuesKeyPath(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setDisplayValuesKeyPath:)] pub unsafe fn setDisplayValuesKeyPath(&self, display_values_key_path: &NSString); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSRuleEditorDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSRuleEditor")] + #[cfg(not(any(target_os = "ios")))] #[method(ruleEditor:numberOfChildrenForCriterion:withRowType:)] unsafe fn ruleEditor_numberOfChildrenForCriterion_withRowType( &self, @@ -269,6 +322,7 @@ extern_protocol!( ) -> NSInteger; #[cfg(feature = "AppKit_NSRuleEditor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other ruleEditor:child:forCriterion:withRowType:)] unsafe fn ruleEditor_child_forCriterion_withRowType( &self, @@ -279,6 +333,7 @@ extern_protocol!( ) -> Id; #[cfg(feature = "AppKit_NSRuleEditor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other ruleEditor:displayValueForCriterion:inRow:)] unsafe fn ruleEditor_displayValueForCriterion_inRow( &self, @@ -288,6 +343,7 @@ extern_protocol!( ) -> Id; #[cfg(all(feature = "AppKit_NSRuleEditor", feature = "Foundation_NSDictionary"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other ruleEditor:predicatePartsForCriterion:withDisplayValue:inRow:)] unsafe fn ruleEditor_predicatePartsForCriterion_withDisplayValue_inRow( @@ -299,6 +355,7 @@ extern_protocol!( ) -> Option>>; #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(ruleEditorRowsDidChange:)] unsafe fn ruleEditorRowsDidChange(&self, notification: &NSNotification); @@ -313,6 +370,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSRuleEditor")] unsafe impl NSRuleEditor { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSRulerMarker.rs b/AppKit/NSRulerMarker.rs index 870cb0841..54503411d 100644 --- a/AppKit/NSRulerMarker.rs +++ b/AppKit/NSRulerMarker.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSRulerMarker")] + #[cfg(not(any(target_os = "ios")))] pub struct NSRulerMarker; #[cfg(feature = "AppKit_NSRulerMarker")] @@ -26,6 +27,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSRulerMarker")] unsafe impl NSRulerMarker { #[cfg(all(feature = "AppKit_NSImage", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithRulerView:markerLocation:image:imageOrigin:)] pub unsafe fn initWithRulerView_markerLocation_image_imageOrigin( this: Option>, @@ -36,67 +38,87 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "AppKit_NSRulerView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other ruler)] pub unsafe fn ruler(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(markerLocation)] pub unsafe fn markerLocation(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMarkerLocation:)] pub unsafe fn setMarkerLocation(&self, marker_location: CGFloat); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: &NSImage); + #[cfg(not(any(target_os = "ios")))] #[method(imageOrigin)] pub unsafe fn imageOrigin(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(setImageOrigin:)] pub unsafe fn setImageOrigin(&self, image_origin: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(isMovable)] pub unsafe fn isMovable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setMovable:)] pub unsafe fn setMovable(&self, movable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isRemovable)] pub unsafe fn isRemovable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setRemovable:)] pub unsafe fn setRemovable(&self, removable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isDragging)] pub unsafe fn isDragging(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other representedObject)] pub unsafe fn representedObject(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setRepresentedObject:)] pub unsafe fn setRepresentedObject(&self, represented_object: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(imageRectInRuler)] pub unsafe fn imageRectInRuler(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(thicknessRequiredInRuler)] pub unsafe fn thicknessRequiredInRuler(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(drawRect:)] pub unsafe fn drawRect(&self, rect: NSRect); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(trackMouse:adding:)] pub unsafe fn trackMouse_adding(&self, mouse_down_event: &NSEvent, is_adding: bool) -> bool; diff --git a/AppKit/NSRulerView.rs b/AppKit/NSRulerView.rs index 005697311..c22d9ddea 100644 --- a/AppKit/NSRulerView.rs +++ b/AppKit/NSRulerView.rs @@ -7,8 +7,11 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSRulerOrientation { + #[cfg(not(any(target_os = "ios")))] NSHorizontalRuler = 0, + #[cfg(not(any(target_os = "ios")))] NSVerticalRuler = 1, } ); @@ -28,6 +31,7 @@ extern_static!(NSRulerViewUnitPicas: &'static NSRulerViewUnitName); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSRulerView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSRulerView; #[cfg(feature = "AppKit_NSRulerView")] @@ -69,6 +73,7 @@ extern_methods!( feature = "Foundation_NSNumber", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method(registerUnitWithName:abbreviation:unitToPointsConversionFactor:stepUpCycle:stepDownCycle:)] pub unsafe fn registerUnitWithName_abbreviation_unitToPointsConversionFactor_stepUpCycle_stepDownCycle( unit_name: &NSRulerViewUnitName, @@ -79,10 +84,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "AppKit_NSScrollView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithScrollView:orientation:)] pub unsafe fn initWithScrollView_orientation( this: Option>, @@ -91,84 +98,107 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSScrollView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other scrollView)] pub unsafe fn scrollView(&self) -> Option>; #[cfg(feature = "AppKit_NSScrollView")] + #[cfg(not(any(target_os = "ios")))] #[method(setScrollView:)] pub unsafe fn setScrollView(&self, scroll_view: Option<&NSScrollView>); + #[cfg(not(any(target_os = "ios")))] #[method(orientation)] pub unsafe fn orientation(&self) -> NSRulerOrientation; + #[cfg(not(any(target_os = "ios")))] #[method(setOrientation:)] pub unsafe fn setOrientation(&self, orientation: NSRulerOrientation); + #[cfg(not(any(target_os = "ios")))] #[method(baselineLocation)] pub unsafe fn baselineLocation(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(requiredThickness)] pub unsafe fn requiredThickness(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(ruleThickness)] pub unsafe fn ruleThickness(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setRuleThickness:)] pub unsafe fn setRuleThickness(&self, rule_thickness: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(reservedThicknessForMarkers)] pub unsafe fn reservedThicknessForMarkers(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setReservedThicknessForMarkers:)] pub unsafe fn setReservedThicknessForMarkers( &self, reserved_thickness_for_markers: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(reservedThicknessForAccessoryView)] pub unsafe fn reservedThicknessForAccessoryView(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setReservedThicknessForAccessoryView:)] pub unsafe fn setReservedThicknessForAccessoryView( &self, reserved_thickness_for_accessory_view: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other measurementUnits)] pub unsafe fn measurementUnits(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setMeasurementUnits:)] pub unsafe fn setMeasurementUnits(&self, measurement_units: &NSRulerViewUnitName); + #[cfg(not(any(target_os = "ios")))] #[method(originOffset)] pub unsafe fn originOffset(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setOriginOffset:)] pub unsafe fn setOriginOffset(&self, origin_offset: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other clientView)] pub unsafe fn clientView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setClientView:)] pub unsafe fn setClientView(&self, client_view: Option<&NSView>); #[cfg(feature = "AppKit_NSRulerMarker")] + #[cfg(not(any(target_os = "ios")))] #[method(addMarker:)] pub unsafe fn addMarker(&self, marker: &NSRulerMarker); #[cfg(feature = "AppKit_NSRulerMarker")] + #[cfg(not(any(target_os = "ios")))] #[method(removeMarker:)] pub unsafe fn removeMarker(&self, marker: &NSRulerMarker); #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other markers)] pub unsafe fn markers(&self) -> Option>>; #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setMarkers:)] pub unsafe fn setMarkers(&self, markers: Option<&NSArray>); #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSRulerMarker"))] + #[cfg(not(any(target_os = "ios")))] #[method(trackMarker:withMouseEvent:)] pub unsafe fn trackMarker_withMouseEvent( &self, @@ -176,12 +206,15 @@ extern_methods!( event: &NSEvent, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessory_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(moveRulerlineFromLocation:toLocation:)] pub unsafe fn moveRulerlineFromLocation_toLocation( &self, @@ -189,15 +222,19 @@ extern_methods!( new_location: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(invalidateHashMarks)] pub unsafe fn invalidateHashMarks(&self); + #[cfg(not(any(target_os = "ios")))] #[method(drawHashMarksAndLabelsInRect:)] pub unsafe fn drawHashMarksAndLabelsInRect(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(drawMarkersInRect:)] pub unsafe fn drawMarkersInRect(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(isFlipped)] pub unsafe fn isFlipped(&self) -> bool; } @@ -208,6 +245,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:shouldMoveMarker:)] pub unsafe fn rulerView_shouldMoveMarker( &self, @@ -216,6 +254,7 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:willMoveMarker:toLocation:)] pub unsafe fn rulerView_willMoveMarker_toLocation( &self, @@ -225,10 +264,12 @@ extern_methods!( ) -> CGFloat; #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:didMoveMarker:)] pub unsafe fn rulerView_didMoveMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:shouldRemoveMarker:)] pub unsafe fn rulerView_shouldRemoveMarker( &self, @@ -237,10 +278,12 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:didRemoveMarker:)] pub unsafe fn rulerView_didRemoveMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:shouldAddMarker:)] pub unsafe fn rulerView_shouldAddMarker( &self, @@ -249,6 +292,7 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:willAddMarker:atLocation:)] pub unsafe fn rulerView_willAddMarker_atLocation( &self, @@ -258,18 +302,22 @@ extern_methods!( ) -> CGFloat; #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:didAddMarker:)] pub unsafe fn rulerView_didAddMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:handleMouseDown:)] pub unsafe fn rulerView_handleMouseDown(&self, ruler: &NSRulerView, event: &NSEvent); #[cfg(feature = "AppKit_NSRulerView")] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:willSetClientView:)] pub unsafe fn rulerView_willSetClientView(&self, ruler: &NSRulerView, new_client: &NSView); #[cfg(feature = "AppKit_NSRulerView")] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:locationForPoint:)] pub unsafe fn rulerView_locationForPoint( &self, @@ -278,6 +326,7 @@ extern_methods!( ) -> CGFloat; #[cfg(feature = "AppKit_NSRulerView")] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:pointForLocation:)] pub unsafe fn rulerView_pointForLocation( &self, @@ -291,6 +340,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSRulerView")] unsafe impl NSRulerView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSRunningApplication.rs b/AppKit/NSRunningApplication.rs index 3eacd5644..306d7fd4a 100644 --- a/AppKit/NSRunningApplication.rs +++ b/AppKit/NSRunningApplication.rs @@ -7,17 +7,24 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSApplicationActivationOptions { + #[cfg(not(any(target_os = "ios")))] NSApplicationActivateAllWindows = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSApplicationActivateIgnoringOtherApps = 1 << 1, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSApplicationActivationPolicy { + #[cfg(not(any(target_os = "ios")))] NSApplicationActivationPolicyRegular = 0, + #[cfg(not(any(target_os = "ios")))] NSApplicationActivationPolicyAccessory = 1, + #[cfg(not(any(target_os = "ios")))] NSApplicationActivationPolicyProhibited = 2, } ); @@ -25,6 +32,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSRunningApplication")] + #[cfg(not(any(target_os = "ios")))] pub struct NSRunningApplication; #[cfg(feature = "AppKit_NSRunningApplication")] @@ -39,75 +47,96 @@ unsafe impl NSObjectProtocol for NSRunningApplication {} extern_methods!( #[cfg(feature = "AppKit_NSRunningApplication")] unsafe impl NSRunningApplication { + #[cfg(not(any(target_os = "ios")))] #[method(isTerminated)] pub unsafe fn isTerminated(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isFinishedLaunching)] pub unsafe fn isFinishedLaunching(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isActive)] pub unsafe fn isActive(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(ownsMenuBar)] pub unsafe fn ownsMenuBar(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(activationPolicy)] pub unsafe fn activationPolicy(&self) -> NSApplicationActivationPolicy; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedName)] pub unsafe fn localizedName(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bundleIdentifier)] pub unsafe fn bundleIdentifier(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bundleURL)] pub unsafe fn bundleURL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other executableURL)] pub unsafe fn executableURL(&self) -> Option>; #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other launchDate)] pub unsafe fn launchDate(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other icon)] pub unsafe fn icon(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(executableArchitecture)] pub unsafe fn executableArchitecture(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(hide)] pub unsafe fn hide(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(unhide)] pub unsafe fn unhide(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(activateWithOptions:)] pub unsafe fn activateWithOptions(&self, options: NSApplicationActivationOptions) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(terminate)] pub unsafe fn terminate(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(forceTerminate)] pub unsafe fn forceTerminate(&self) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other runningApplicationsWithBundleIdentifier:)] pub unsafe fn runningApplicationsWithBundleIdentifier( bundle_identifier: &NSString, ) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentApplication)] pub unsafe fn currentApplication() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(terminateAutomaticallyTerminableApplications)] pub unsafe fn terminateAutomaticallyTerminableApplications(); } @@ -121,6 +150,7 @@ extern_methods!( feature = "AppKit_NSRunningApplication", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other runningApplications)] pub unsafe fn runningApplications(&self) -> Id>; } diff --git a/AppKit/NSSavePanel.rs b/AppKit/NSSavePanel.rs index a3285d416..c009b6312 100644 --- a/AppKit/NSSavePanel.rs +++ b/AppKit/NSSavePanel.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSavePanel")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSavePanel; #[cfg(feature = "AppKit_NSSavePanel")] @@ -47,68 +48,87 @@ unsafe impl NSUserInterfaceValidations for NSSavePanel {} extern_methods!( #[cfg(feature = "AppKit_NSSavePanel")] unsafe impl NSSavePanel { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other savePanel)] pub unsafe fn savePanel() -> Id; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other directoryURL)] pub unsafe fn directoryURL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method(setDirectoryURL:)] pub unsafe fn setDirectoryURL(&self, directory_url: Option<&NSURL>); + #[cfg(not(any(target_os = "ios")))] #[method(allowsOtherFileTypes)] pub unsafe fn allowsOtherFileTypes(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsOtherFileTypes:)] pub unsafe fn setAllowsOtherFileTypes(&self, allows_other_file_types: bool); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessory_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(isExpanded)] pub unsafe fn isExpanded(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(canCreateDirectories)] pub unsafe fn canCreateDirectories(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanCreateDirectories:)] pub unsafe fn setCanCreateDirectories(&self, can_create_directories: bool); + #[cfg(not(any(target_os = "ios")))] #[method(canSelectHiddenExtension)] pub unsafe fn canSelectHiddenExtension(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanSelectHiddenExtension:)] pub unsafe fn setCanSelectHiddenExtension(&self, can_select_hidden_extension: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isExtensionHidden)] pub unsafe fn isExtensionHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setExtensionHidden:)] pub unsafe fn setExtensionHidden(&self, extension_hidden: bool); + #[cfg(not(any(target_os = "ios")))] #[method(treatsFilePackagesAsDirectories)] pub unsafe fn treatsFilePackagesAsDirectories(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setTreatsFilePackagesAsDirectories:)] pub unsafe fn setTreatsFilePackagesAsDirectories( &self, @@ -116,74 +136,94 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other prompt)] pub unsafe fn prompt(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPrompt:)] pub unsafe fn setPrompt(&self, prompt: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other nameFieldLabel)] pub unsafe fn nameFieldLabel(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setNameFieldLabel:)] pub unsafe fn setNameFieldLabel(&self, name_field_label: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other nameFieldStringValue)] pub unsafe fn nameFieldStringValue(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setNameFieldStringValue:)] pub unsafe fn setNameFieldStringValue(&self, name_field_string_value: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other message)] pub unsafe fn message(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setMessage:)] pub unsafe fn setMessage(&self, message: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method(validateVisibleColumns)] pub unsafe fn validateVisibleColumns(&self); + #[cfg(not(any(target_os = "ios")))] #[method(showsHiddenFiles)] pub unsafe fn showsHiddenFiles(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsHiddenFiles:)] pub unsafe fn setShowsHiddenFiles(&self, shows_hidden_files: bool); + #[cfg(not(any(target_os = "ios")))] #[method(showsTagField)] pub unsafe fn showsTagField(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsTagField:)] pub unsafe fn setShowsTagField(&self, shows_tag_field: bool); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tagNames)] pub unsafe fn tagNames(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setTagNames:)] pub unsafe fn setTagNames(&self, tag_names: Option<&NSArray>); + #[cfg(not(any(target_os = "ios")))] #[method(ok:)] pub unsafe fn ok(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(cancel:)] pub unsafe fn cancel(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(beginSheetModalForWindow:completionHandler:)] pub unsafe fn beginSheetModalForWindow_completionHandler( &self, @@ -191,22 +231,27 @@ extern_methods!( handler: &Block<(NSModalResponse,), ()>, ); + #[cfg(not(any(target_os = "ios")))] #[method(beginWithCompletionHandler:)] pub unsafe fn beginWithCompletionHandler(&self, handler: &Block<(NSModalResponse,), ()>); + #[cfg(not(any(target_os = "ios")))] #[method(runModal)] pub unsafe fn runModal(&self) -> NSModalResponse; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSOpenSavePanelDelegate: NSObjectProtocol { #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(panel:shouldEnableURL:)] unsafe fn panel_shouldEnableURL(&self, sender: &Object, url: &NSURL) -> bool; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(panel:validateURL:error:_)] unsafe fn panel_validateURL_error( @@ -216,11 +261,13 @@ extern_protocol!( ) -> Result<(), Id>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(panel:didChangeToDirectoryURL:)] unsafe fn panel_didChangeToDirectoryURL(&self, sender: &Object, url: Option<&NSURL>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other panel:userEnteredFilename:confirmed:)] unsafe fn panel_userEnteredFilename_confirmed( @@ -230,10 +277,12 @@ extern_protocol!( ok_flag: bool, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(panel:willExpand:)] unsafe fn panel_willExpand(&self, sender: &Object, expanding: bool); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(panelSelectionDidChange:)] unsafe fn panelSelectionDidChange(&self, sender: Option<&Object>); @@ -248,31 +297,37 @@ extern_methods!( unsafe impl NSSavePanel { #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -URL instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other filename)] pub unsafe fn filename(&self) -> Id; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -directoryURL instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other directory)] pub unsafe fn directory(&self) -> Id; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -setDirectoryURL: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setDirectory:)] pub unsafe fn setDirectory(&self, path: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -allowedFileTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other requiredFileType)] pub unsafe fn requiredFileType(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -setAllowedFileTypes: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setRequiredFileType:)] pub unsafe fn setRequiredFileType(&self, r#type: Option<&NSString>); #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSString"))] #[deprecated = "Use beginSheetModalForWindow:completionHandler: instead. The following parameters are replaced by properties: 'path' is replaced by 'directoryURL' and 'name' by 'nameFieldStringValue'."] + #[cfg(not(any(target_os = "ios")))] #[method(beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo:)] pub unsafe fn beginSheetForDirectory_file_modalForWindow_modalDelegate_didEndSelector_contextInfo( &self, @@ -286,6 +341,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -runModal instead. The following parameters are replaced by properties: 'path' is replaced by 'directoryURL' and 'name' by 'nameFieldStringValue'."] + #[cfg(not(any(target_os = "ios")))] #[method(runModalForDirectory:file:)] pub unsafe fn runModalForDirectory_file( &self, @@ -294,16 +350,19 @@ extern_methods!( ) -> NSInteger; #[deprecated = "Default implementation does nothing."] + #[cfg(not(any(target_os = "ios")))] #[method(selectText:)] pub unsafe fn selectText(&self, sender: Option<&Object>); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated = "Use -allowedContentTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other allowedFileTypes)] pub unsafe fn allowedFileTypes(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated = "Use -allowedContentTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setAllowedFileTypes:)] pub unsafe fn setAllowedFileTypes(&self, allowed_file_types: Option<&NSArray>); } @@ -313,6 +372,7 @@ extern_methods!( /// Methods declared on superclass `NSWindow` #[cfg(feature = "AppKit_NSSavePanel")] unsafe impl NSSavePanel { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:)] pub unsafe fn initWithContentRect_styleMask_backing_defer( this: Option>, @@ -323,6 +383,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSScreen")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:screen:)] pub unsafe fn initWithContentRect_styleMask_backing_defer_screen( this: Option>, @@ -334,6 +395,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowWithContentViewController:)] pub unsafe fn windowWithContentViewController( content_view_controller: &NSViewController, diff --git a/AppKit/NSScreen.rs b/AppKit/NSScreen.rs index cdf0d3de6..3bf2ebb70 100644 --- a/AppKit/NSScreen.rs +++ b/AppKit/NSScreen.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScreen")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScreen; #[cfg(feature = "AppKit_NSScreen")] @@ -23,47 +24,61 @@ extern_methods!( #[cfg(feature = "AppKit_NSScreen")] unsafe impl NSScreen { #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other screens)] pub unsafe fn screens() -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mainScreen)] pub unsafe fn mainScreen() -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other deepestScreen)] pub unsafe fn deepestScreen() -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(screensHaveSeparateSpaces)] pub unsafe fn screensHaveSeparateSpaces() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(depth)] pub unsafe fn depth(&self) -> NSWindowDepth; + #[cfg(not(any(target_os = "ios")))] #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(visibleFrame)] pub unsafe fn visibleFrame(&self) -> NSRect; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other deviceDescription)] pub unsafe fn deviceDescription(&self) -> Id>; #[cfg(feature = "AppKit_NSColorSpace")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorSpace)] pub unsafe fn colorSpace(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(supportedWindowDepths)] pub unsafe fn supportedWindowDepths(&self) -> NonNull; + #[cfg(not(any(target_os = "ios")))] #[method(canRepresentDisplayGamut:)] pub unsafe fn canRepresentDisplayGamut(&self, display_gamut: NSDisplayGamut) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(convertRectToBacking:)] pub unsafe fn convertRectToBacking(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(convertRectFromBacking:)] pub unsafe fn convertRectFromBacking(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(backingAlignedRect:options:)] pub unsafe fn backingAlignedRect_options( &self, @@ -71,19 +86,24 @@ extern_methods!( options: NSAlignmentOptions, ) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(backingScaleFactor)] pub unsafe fn backingScaleFactor(&self) -> CGFloat; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedName)] pub unsafe fn localizedName(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(safeAreaInsets)] pub unsafe fn safeAreaInsets(&self) -> NSEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(auxiliaryTopLeftArea)] pub unsafe fn auxiliaryTopLeftArea(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(auxiliaryTopRightArea)] pub unsafe fn auxiliaryTopRightArea(&self) -> NSRect; } @@ -94,12 +114,15 @@ extern_static!(NSScreenColorSpaceDidChangeNotification: &'static NSNotificationN extern_methods!( #[cfg(feature = "AppKit_NSScreen")] unsafe impl NSScreen { + #[cfg(not(any(target_os = "ios")))] #[method(maximumExtendedDynamicRangeColorComponentValue)] pub unsafe fn maximumExtendedDynamicRangeColorComponentValue(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(maximumPotentialExtendedDynamicRangeColorComponentValue)] pub unsafe fn maximumPotentialExtendedDynamicRangeColorComponentValue(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(maximumReferenceExtendedDynamicRangeColorComponentValue)] pub unsafe fn maximumReferenceExtendedDynamicRangeColorComponentValue(&self) -> CGFloat; } @@ -108,18 +131,23 @@ extern_methods!( extern_methods!( #[cfg(feature = "AppKit_NSScreen")] unsafe impl NSScreen { + #[cfg(not(any(target_os = "ios")))] #[method(maximumFramesPerSecond)] pub unsafe fn maximumFramesPerSecond(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(minimumRefreshInterval)] pub unsafe fn minimumRefreshInterval(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(maximumRefreshInterval)] pub unsafe fn maximumRefreshInterval(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(displayUpdateGranularity)] pub unsafe fn displayUpdateGranularity(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(lastDisplayUpdateTimestamp)] pub unsafe fn lastDisplayUpdateTimestamp(&self) -> NSTimeInterval; } @@ -130,6 +158,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSScreen")] unsafe impl NSScreen { #[deprecated = "Use -convertRectToBacking: or -backingScaleFactor instead"] + #[cfg(not(any(target_os = "ios")))] #[method(userSpaceScaleFactor)] pub unsafe fn userSpaceScaleFactor(&self) -> CGFloat; } diff --git a/AppKit/NSScrollView.rs b/AppKit/NSScrollView.rs index c9cf72154..f4e2e2504 100644 --- a/AppKit/NSScrollView.rs +++ b/AppKit/NSScrollView.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSScrollElasticity { + #[cfg(not(any(target_os = "ios")))] NSScrollElasticityAutomatic = 0, + #[cfg(not(any(target_os = "ios")))] NSScrollElasticityNone = 1, + #[cfg(not(any(target_os = "ios")))] NSScrollElasticityAllowed = 2, } ); @@ -17,6 +21,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScrollView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScrollView; #[cfg(feature = "AppKit_NSScrollView")] @@ -56,16 +61,19 @@ unsafe impl NSUserInterfaceItemIdentification for NSScrollView {} extern_methods!( #[cfg(feature = "AppKit_NSScrollView")] unsafe impl NSScrollView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:)] pub unsafe fn frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle( c_size: NSSize, @@ -76,6 +84,7 @@ extern_methods!( scroller_style: NSScrollerStyle, ) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(contentSizeForFrameSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:)] pub unsafe fn contentSizeForFrameSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle( f_size: NSSize, @@ -87,6 +96,7 @@ extern_methods!( ) -> NSSize; #[deprecated = "Use +frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(frameSizeForContentSize:hasHorizontalScroller:hasVerticalScroller:borderType:)] pub unsafe fn frameSizeForContentSize_hasHorizontalScroller_hasVerticalScroller_borderType( c_size: NSSize, @@ -96,6 +106,7 @@ extern_methods!( ) -> NSSize; #[deprecated = "+contentSizeForFrameSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(contentSizeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:)] pub unsafe fn contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType( f_size: NSSize, @@ -104,207 +115,269 @@ extern_methods!( r#type: NSBorderType, ) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(documentVisibleRect)] pub unsafe fn documentVisibleRect(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(contentSize)] pub unsafe fn contentSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other documentView)] pub unsafe fn documentView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setDocumentView:)] pub unsafe fn setDocumentView(&self, document_view: Option<&NSView>); #[cfg(feature = "AppKit_NSClipView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentView)] pub unsafe fn contentView(&self) -> Id; #[cfg(feature = "AppKit_NSClipView")] + #[cfg(not(any(target_os = "ios")))] #[method(setContentView:)] pub unsafe fn setContentView(&self, content_view: &NSClipView); #[cfg(feature = "AppKit_NSCursor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other documentCursor)] pub unsafe fn documentCursor(&self) -> Option>; #[cfg(feature = "AppKit_NSCursor")] + #[cfg(not(any(target_os = "ios")))] #[method(setDocumentCursor:)] pub unsafe fn setDocumentCursor(&self, document_cursor: Option<&NSCursor>); + #[cfg(not(any(target_os = "ios")))] #[method(borderType)] pub unsafe fn borderType(&self) -> NSBorderType; + #[cfg(not(any(target_os = "ios")))] #[method(setBorderType:)] pub unsafe fn setBorderType(&self, border_type: NSBorderType); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: &NSColor); + #[cfg(not(any(target_os = "ios")))] #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, draws_background: bool); + #[cfg(not(any(target_os = "ios")))] #[method(hasVerticalScroller)] pub unsafe fn hasVerticalScroller(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHasVerticalScroller:)] pub unsafe fn setHasVerticalScroller(&self, has_vertical_scroller: bool); + #[cfg(not(any(target_os = "ios")))] #[method(hasHorizontalScroller)] pub unsafe fn hasHorizontalScroller(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHasHorizontalScroller:)] pub unsafe fn setHasHorizontalScroller(&self, has_horizontal_scroller: bool); #[cfg(feature = "AppKit_NSScroller")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other verticalScroller)] pub unsafe fn verticalScroller(&self) -> Option>; #[cfg(feature = "AppKit_NSScroller")] + #[cfg(not(any(target_os = "ios")))] #[method(setVerticalScroller:)] pub unsafe fn setVerticalScroller(&self, vertical_scroller: Option<&NSScroller>); #[cfg(feature = "AppKit_NSScroller")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other horizontalScroller)] pub unsafe fn horizontalScroller(&self) -> Option>; #[cfg(feature = "AppKit_NSScroller")] + #[cfg(not(any(target_os = "ios")))] #[method(setHorizontalScroller:)] pub unsafe fn setHorizontalScroller(&self, horizontal_scroller: Option<&NSScroller>); + #[cfg(not(any(target_os = "ios")))] #[method(autohidesScrollers)] pub unsafe fn autohidesScrollers(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutohidesScrollers:)] pub unsafe fn setAutohidesScrollers(&self, autohides_scrollers: bool); + #[cfg(not(any(target_os = "ios")))] #[method(horizontalLineScroll)] pub unsafe fn horizontalLineScroll(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setHorizontalLineScroll:)] pub unsafe fn setHorizontalLineScroll(&self, horizontal_line_scroll: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(verticalLineScroll)] pub unsafe fn verticalLineScroll(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setVerticalLineScroll:)] pub unsafe fn setVerticalLineScroll(&self, vertical_line_scroll: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(lineScroll)] pub unsafe fn lineScroll(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setLineScroll:)] pub unsafe fn setLineScroll(&self, line_scroll: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(horizontalPageScroll)] pub unsafe fn horizontalPageScroll(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setHorizontalPageScroll:)] pub unsafe fn setHorizontalPageScroll(&self, horizontal_page_scroll: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(verticalPageScroll)] pub unsafe fn verticalPageScroll(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setVerticalPageScroll:)] pub unsafe fn setVerticalPageScroll(&self, vertical_page_scroll: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(pageScroll)] pub unsafe fn pageScroll(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setPageScroll:)] pub unsafe fn setPageScroll(&self, page_scroll: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(scrollsDynamically)] pub unsafe fn scrollsDynamically(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setScrollsDynamically:)] pub unsafe fn setScrollsDynamically(&self, scrolls_dynamically: bool); + #[cfg(not(any(target_os = "ios")))] #[method(tile)] pub unsafe fn tile(&self); #[cfg(feature = "AppKit_NSClipView")] + #[cfg(not(any(target_os = "ios")))] #[method(reflectScrolledClipView:)] pub unsafe fn reflectScrolledClipView(&self, c_view: &NSClipView); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(scrollWheel:)] pub unsafe fn scrollWheel(&self, event: &NSEvent); + #[cfg(not(any(target_os = "ios")))] #[method(scrollerStyle)] pub unsafe fn scrollerStyle(&self) -> NSScrollerStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setScrollerStyle:)] pub unsafe fn setScrollerStyle(&self, scroller_style: NSScrollerStyle); + #[cfg(not(any(target_os = "ios")))] #[method(scrollerKnobStyle)] pub unsafe fn scrollerKnobStyle(&self) -> NSScrollerKnobStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setScrollerKnobStyle:)] pub unsafe fn setScrollerKnobStyle(&self, scroller_knob_style: NSScrollerKnobStyle); + #[cfg(not(any(target_os = "ios")))] #[method(flashScrollers)] pub unsafe fn flashScrollers(&self); + #[cfg(not(any(target_os = "ios")))] #[method(horizontalScrollElasticity)] pub unsafe fn horizontalScrollElasticity(&self) -> NSScrollElasticity; + #[cfg(not(any(target_os = "ios")))] #[method(setHorizontalScrollElasticity:)] pub unsafe fn setHorizontalScrollElasticity( &self, horizontal_scroll_elasticity: NSScrollElasticity, ); + #[cfg(not(any(target_os = "ios")))] #[method(verticalScrollElasticity)] pub unsafe fn verticalScrollElasticity(&self) -> NSScrollElasticity; + #[cfg(not(any(target_os = "ios")))] #[method(setVerticalScrollElasticity:)] pub unsafe fn setVerticalScrollElasticity( &self, vertical_scroll_elasticity: NSScrollElasticity, ); + #[cfg(not(any(target_os = "ios")))] #[method(usesPredominantAxisScrolling)] pub unsafe fn usesPredominantAxisScrolling(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesPredominantAxisScrolling:)] pub unsafe fn setUsesPredominantAxisScrolling(&self, uses_predominant_axis_scrolling: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsMagnification)] pub unsafe fn allowsMagnification(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsMagnification:)] pub unsafe fn setAllowsMagnification(&self, allows_magnification: bool); + #[cfg(not(any(target_os = "ios")))] #[method(magnification)] pub unsafe fn magnification(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMagnification:)] pub unsafe fn setMagnification(&self, magnification: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(maxMagnification)] pub unsafe fn maxMagnification(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxMagnification:)] pub unsafe fn setMaxMagnification(&self, max_magnification: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(minMagnification)] pub unsafe fn minMagnification(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMinMagnification:)] pub unsafe fn setMinMagnification(&self, min_magnification: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(magnifyToFitRect:)] pub unsafe fn magnifyToFitRect(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(setMagnification:centeredAtPoint:)] pub unsafe fn setMagnification_centeredAtPoint( &self, @@ -312,27 +385,34 @@ extern_methods!( point: NSPoint, ); + #[cfg(not(any(target_os = "ios")))] #[method(addFloatingSubview:forAxis:)] pub unsafe fn addFloatingSubview_forAxis(&self, view: &NSView, axis: NSEventGestureAxis); + #[cfg(not(any(target_os = "ios")))] #[method(automaticallyAdjustsContentInsets)] pub unsafe fn automaticallyAdjustsContentInsets(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticallyAdjustsContentInsets:)] pub unsafe fn setAutomaticallyAdjustsContentInsets( &self, automatically_adjusts_content_insets: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(contentInsets)] pub unsafe fn contentInsets(&self) -> NSEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(setContentInsets:)] pub unsafe fn setContentInsets(&self, content_insets: NSEdgeInsets); + #[cfg(not(any(target_os = "ios")))] #[method(scrollerInsets)] pub unsafe fn scrollerInsets(&self) -> NSEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(setScrollerInsets:)] pub unsafe fn setScrollerInsets(&self, scroller_insets: NSEdgeInsets); } @@ -352,43 +432,55 @@ extern_methods!( /// NSRulerSupport #[cfg(feature = "AppKit_NSScrollView")] unsafe impl NSScrollView { + #[cfg(not(any(target_os = "ios")))] #[method(rulerViewClass)] pub unsafe fn rulerViewClass() -> Option<&'static Class>; + #[cfg(not(any(target_os = "ios")))] #[method(setRulerViewClass:)] pub unsafe fn setRulerViewClass(ruler_view_class: Option<&Class>); + #[cfg(not(any(target_os = "ios")))] #[method(rulersVisible)] pub unsafe fn rulersVisible(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setRulersVisible:)] pub unsafe fn setRulersVisible(&self, rulers_visible: bool); + #[cfg(not(any(target_os = "ios")))] #[method(hasHorizontalRuler)] pub unsafe fn hasHorizontalRuler(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHasHorizontalRuler:)] pub unsafe fn setHasHorizontalRuler(&self, has_horizontal_ruler: bool); + #[cfg(not(any(target_os = "ios")))] #[method(hasVerticalRuler)] pub unsafe fn hasVerticalRuler(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHasVerticalRuler:)] pub unsafe fn setHasVerticalRuler(&self, has_vertical_ruler: bool); #[cfg(feature = "AppKit_NSRulerView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other horizontalRulerView)] pub unsafe fn horizontalRulerView(&self) -> Option>; #[cfg(feature = "AppKit_NSRulerView")] + #[cfg(not(any(target_os = "ios")))] #[method(setHorizontalRulerView:)] pub unsafe fn setHorizontalRulerView(&self, horizontal_ruler_view: Option<&NSRulerView>); #[cfg(feature = "AppKit_NSRulerView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other verticalRulerView)] pub unsafe fn verticalRulerView(&self) -> Option>; #[cfg(feature = "AppKit_NSRulerView")] + #[cfg(not(any(target_os = "ios")))] #[method(setVerticalRulerView:)] pub unsafe fn setVerticalRulerView(&self, vertical_ruler_view: Option<&NSRulerView>); } @@ -396,9 +488,13 @@ extern_methods!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSScrollViewFindBarPosition { + #[cfg(not(any(target_os = "ios")))] NSScrollViewFindBarPositionAboveHorizontalRuler = 0, + #[cfg(not(any(target_os = "ios")))] NSScrollViewFindBarPositionAboveContent = 1, + #[cfg(not(any(target_os = "ios")))] NSScrollViewFindBarPositionBelowContent = 2, } ); @@ -407,9 +503,11 @@ extern_methods!( /// NSFindBarSupport #[cfg(feature = "AppKit_NSScrollView")] unsafe impl NSScrollView { + #[cfg(not(any(target_os = "ios")))] #[method(findBarPosition)] pub unsafe fn findBarPosition(&self) -> NSScrollViewFindBarPosition; + #[cfg(not(any(target_os = "ios")))] #[method(setFindBarPosition:)] pub unsafe fn setFindBarPosition(&self, find_bar_position: NSScrollViewFindBarPosition); } diff --git a/AppKit/NSScroller.rs b/AppKit/NSScroller.rs index 5f4d6d9d2..13714ec94 100644 --- a/AppKit/NSScroller.rs +++ b/AppKit/NSScroller.rs @@ -7,42 +7,61 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSUsableScrollerParts { + #[cfg(not(any(target_os = "ios")))] NSNoScrollerParts = 0, #[deprecated = "Scroller arrows are not used anymore."] + #[cfg(not(any(target_os = "ios")))] NSOnlyScrollerArrows = 1, + #[cfg(not(any(target_os = "ios")))] NSAllScrollerParts = 2, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSScrollerPart { + #[cfg(not(any(target_os = "ios")))] NSScrollerNoPart = 0, + #[cfg(not(any(target_os = "ios")))] NSScrollerDecrementPage = 1, + #[cfg(not(any(target_os = "ios")))] NSScrollerKnob = 2, + #[cfg(not(any(target_os = "ios")))] NSScrollerIncrementPage = 3, #[deprecated = "Scroller arrows are not used anymore."] + #[cfg(not(any(target_os = "ios")))] NSScrollerDecrementLine = 4, #[deprecated = "Scroller arrows are not used anymore."] + #[cfg(not(any(target_os = "ios")))] NSScrollerIncrementLine = 5, + #[cfg(not(any(target_os = "ios")))] NSScrollerKnobSlot = 6, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSScrollerStyle { + #[cfg(not(any(target_os = "ios")))] NSScrollerStyleLegacy = 0, + #[cfg(not(any(target_os = "ios")))] NSScrollerStyleOverlay = 1, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSScrollerKnobStyle { + #[cfg(not(any(target_os = "ios")))] NSScrollerKnobStyleDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSScrollerKnobStyleDark = 1, + #[cfg(not(any(target_os = "ios")))] NSScrollerKnobStyleLight = 2, } ); @@ -50,6 +69,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScroller")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScroller; #[cfg(feature = "AppKit_NSScroller")] @@ -86,64 +106,83 @@ unsafe impl NSUserInterfaceItemIdentification for NSScroller {} extern_methods!( #[cfg(feature = "AppKit_NSScroller")] unsafe impl NSScroller { + #[cfg(not(any(target_os = "ios")))] #[method(isCompatibleWithOverlayScrollers)] pub unsafe fn isCompatibleWithOverlayScrollers() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(scrollerWidthForControlSize:scrollerStyle:)] pub unsafe fn scrollerWidthForControlSize_scrollerStyle( control_size: NSControlSize, scroller_style: NSScrollerStyle, ) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(preferredScrollerStyle)] pub unsafe fn preferredScrollerStyle() -> NSScrollerStyle; + #[cfg(not(any(target_os = "ios")))] #[method(scrollerStyle)] pub unsafe fn scrollerStyle(&self) -> NSScrollerStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setScrollerStyle:)] pub unsafe fn setScrollerStyle(&self, scroller_style: NSScrollerStyle); + #[cfg(not(any(target_os = "ios")))] #[method(knobStyle)] pub unsafe fn knobStyle(&self) -> NSScrollerKnobStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setKnobStyle:)] pub unsafe fn setKnobStyle(&self, knob_style: NSScrollerKnobStyle); + #[cfg(not(any(target_os = "ios")))] #[method(rectForPart:)] pub unsafe fn rectForPart(&self, part_code: NSScrollerPart) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(checkSpaceForParts)] pub unsafe fn checkSpaceForParts(&self); + #[cfg(not(any(target_os = "ios")))] #[method(usableParts)] pub unsafe fn usableParts(&self) -> NSUsableScrollerParts; + #[cfg(not(any(target_os = "ios")))] #[method(controlSize)] pub unsafe fn controlSize(&self) -> NSControlSize; + #[cfg(not(any(target_os = "ios")))] #[method(setControlSize:)] pub unsafe fn setControlSize(&self, control_size: NSControlSize); + #[cfg(not(any(target_os = "ios")))] #[method(drawKnob)] pub unsafe fn drawKnob(&self); + #[cfg(not(any(target_os = "ios")))] #[method(drawKnobSlotInRect:highlight:)] pub unsafe fn drawKnobSlotInRect_highlight(&self, slot_rect: NSRect, flag: bool); + #[cfg(not(any(target_os = "ios")))] #[method(testPart:)] pub unsafe fn testPart(&self, point: NSPoint) -> NSScrollerPart; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(trackKnob:)] pub unsafe fn trackKnob(&self, event: &NSEvent); + #[cfg(not(any(target_os = "ios")))] #[method(hitPart)] pub unsafe fn hitPart(&self) -> NSScrollerPart; + #[cfg(not(any(target_os = "ios")))] #[method(knobProportion)] pub unsafe fn knobProportion(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setKnobProportion:)] pub unsafe fn setKnobProportion(&self, knob_proportion: CGFloat); } @@ -154,10 +193,15 @@ extern_static!(NSPreferredScrollerStyleDidChangeNotification: &'static NSNotific ns_enum!( #[underlying(NSUInteger)] #[deprecated = "Scroller arrows are not used anymore."] + #[cfg(not(any(target_os = "ios")))] pub enum NSScrollArrowPosition { + #[cfg(not(any(target_os = "ios")))] NSScrollerArrowsMaxEnd = 0, + #[cfg(not(any(target_os = "ios")))] NSScrollerArrowsMinEnd = 1, + #[cfg(not(any(target_os = "ios")))] NSScrollerArrowsDefaultSetting = 0, + #[cfg(not(any(target_os = "ios")))] NSScrollerArrowsNone = 2, } ); @@ -165,8 +209,11 @@ ns_enum!( ns_enum!( #[underlying(NSUInteger)] #[deprecated = "Scroller arrows are not used anymore."] + #[cfg(not(any(target_os = "ios")))] pub enum NSScrollerArrow { + #[cfg(not(any(target_os = "ios")))] NSScrollerIncrementArrow = 0, + #[cfg(not(any(target_os = "ios")))] NSScrollerDecrementArrow = 1, } ); @@ -176,47 +223,58 @@ extern_methods!( #[cfg(feature = "AppKit_NSScroller")] unsafe impl NSScroller { #[deprecated = "Use +scrollerWidthForControlSize:scrollerStyle: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(scrollerWidthForControlSize:)] pub unsafe fn scrollerWidthForControlSize(control_size: NSControlSize) -> CGFloat; #[deprecated = "Use +scrollerWidthForControlSize:scrollerStyle: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(scrollerWidth)] pub unsafe fn scrollerWidth() -> CGFloat; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setFloatValue:knobProportion:)] pub unsafe fn setFloatValue_knobProportion(&self, value: c_float, proportion: CGFloat); #[deprecated = "Has had no effect since 10.7"] + #[cfg(not(any(target_os = "ios")))] #[method(arrowsPosition)] pub unsafe fn arrowsPosition(&self) -> NSScrollArrowPosition; #[deprecated = "Has had no effect since 10.7"] + #[cfg(not(any(target_os = "ios")))] #[method(setArrowsPosition:)] pub unsafe fn setArrowsPosition(&self, arrows_position: NSScrollArrowPosition); #[deprecated = "Has had no effect since 10.7"] + #[cfg(not(any(target_os = "ios")))] #[method(controlTint)] pub unsafe fn controlTint(&self) -> NSControlTint; #[deprecated = "Has had no effect since 10.7"] + #[cfg(not(any(target_os = "ios")))] #[method(setControlTint:)] pub unsafe fn setControlTint(&self, control_tint: NSControlTint); #[deprecated = "Has had no effect since 10.7"] + #[cfg(not(any(target_os = "ios")))] #[method(highlight:)] pub unsafe fn highlight(&self, flag: bool); #[cfg(feature = "AppKit_NSEvent")] #[deprecated = "Not invoked since 10.7"] + #[cfg(not(any(target_os = "ios")))] #[method(trackScrollButtons:)] pub unsafe fn trackScrollButtons(&self, event: &NSEvent); #[deprecated = "Not invoked on any macOS version"] + #[cfg(not(any(target_os = "ios")))] #[method(drawParts)] pub unsafe fn drawParts(&self); #[deprecated = "Scrollers don't have arrows as of 10.7"] + #[cfg(not(any(target_os = "ios")))] #[method(drawArrow:highlight:)] pub unsafe fn drawArrow_highlight(&self, which_arrow: NSScrollerArrow, flag: bool); } @@ -226,6 +284,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSScroller")] unsafe impl NSScroller { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSScrubber.rs b/AppKit/NSScrubber.rs index 305ce52b1..ae0df95f2 100644 --- a/AppKit/NSScrubber.rs +++ b/AppKit/NSScrubber.rs @@ -6,12 +6,15 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSScrubberDataSource: NSObjectProtocol { #[cfg(feature = "AppKit_NSScrubber")] + #[cfg(not(any(target_os = "ios")))] #[method(numberOfItemsForScrubber:)] unsafe fn numberOfItemsForScrubber(&self, scrubber: &NSScrubber) -> NSInteger; #[cfg(all(feature = "AppKit_NSScrubber", feature = "AppKit_NSScrubberItemView"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other scrubber:viewForItemAtIndex:)] unsafe fn scrubber_viewForItemAtIndex( &self, @@ -24,8 +27,10 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSScrubberDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSScrubber")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(scrubber:didSelectItemAtIndex:)] unsafe fn scrubber_didSelectItemAtIndex( @@ -35,6 +40,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSScrubber")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(scrubber:didHighlightItemAtIndex:)] unsafe fn scrubber_didHighlightItemAtIndex( @@ -44,6 +50,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSScrubber")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(scrubber:didChangeVisibleRange:)] unsafe fn scrubber_didChangeVisibleRange( @@ -53,16 +60,19 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSScrubber")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(didBeginInteractingWithScrubber:)] unsafe fn didBeginInteractingWithScrubber(&self, scrubber: &NSScrubber); #[cfg(feature = "AppKit_NSScrubber")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(didFinishInteractingWithScrubber:)] unsafe fn didFinishInteractingWithScrubber(&self, scrubber: &NSScrubber); #[cfg(feature = "AppKit_NSScrubber")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(didCancelInteractingWithScrubber:)] unsafe fn didCancelInteractingWithScrubber(&self, scrubber: &NSScrubber); @@ -73,18 +83,26 @@ extern_protocol!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSScrubberMode { + #[cfg(not(any(target_os = "ios")))] NSScrubberModeFixed = 0, + #[cfg(not(any(target_os = "ios")))] NSScrubberModeFree = 1, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSScrubberAlignment { + #[cfg(not(any(target_os = "ios")))] NSScrubberAlignmentNone = 0, + #[cfg(not(any(target_os = "ios")))] NSScrubberAlignmentLeading = 1, + #[cfg(not(any(target_os = "ios")))] NSScrubberAlignmentTrailing = 2, + #[cfg(not(any(target_os = "ios")))] NSScrubberAlignmentCenter = 3, } ); @@ -92,6 +110,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScrubberSelectionStyle")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScrubberSelectionStyle; #[cfg(feature = "AppKit_NSScrubberSelectionStyle")] @@ -109,20 +128,25 @@ unsafe impl NSObjectProtocol for NSScrubberSelectionStyle {} extern_methods!( #[cfg(feature = "AppKit_NSScrubberSelectionStyle")] unsafe impl NSScrubberSelectionStyle { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other outlineOverlayStyle)] pub unsafe fn outlineOverlayStyle() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other roundedBackgroundStyle)] pub unsafe fn roundedBackgroundStyle() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "AppKit_NSScrubberSelectionView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeSelectionView)] pub unsafe fn makeSelectionView(&self) -> Option>; } @@ -131,6 +155,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScrubber")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScrubber; #[cfg(feature = "AppKit_NSScrubber")] @@ -167,70 +192,90 @@ unsafe impl NSUserInterfaceItemIdentification for NSScrubber {} extern_methods!( #[cfg(feature = "AppKit_NSScrubber")] unsafe impl NSScrubber { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataSource)] pub unsafe fn dataSource(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDataSource:)] pub unsafe fn setDataSource( &self, data_source: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); #[cfg(feature = "AppKit_NSScrubberLayout")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other scrubberLayout)] pub unsafe fn scrubberLayout(&self) -> Id; #[cfg(feature = "AppKit_NSScrubberLayout")] + #[cfg(not(any(target_os = "ios")))] #[method(setScrubberLayout:)] pub unsafe fn setScrubberLayout(&self, scrubber_layout: &NSScrubberLayout); + #[cfg(not(any(target_os = "ios")))] #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(highlightedIndex)] pub unsafe fn highlightedIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(selectedIndex)] pub unsafe fn selectedIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedIndex:)] pub unsafe fn setSelectedIndex(&self, selected_index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(mode)] pub unsafe fn mode(&self) -> NSScrubberMode; + #[cfg(not(any(target_os = "ios")))] #[method(setMode:)] pub unsafe fn setMode(&self, mode: NSScrubberMode); + #[cfg(not(any(target_os = "ios")))] #[method(itemAlignment)] pub unsafe fn itemAlignment(&self) -> NSScrubberAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(setItemAlignment:)] pub unsafe fn setItemAlignment(&self, item_alignment: NSScrubberAlignment); + #[cfg(not(any(target_os = "ios")))] #[method(isContinuous)] pub unsafe fn isContinuous(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setContinuous:)] pub unsafe fn setContinuous(&self, continuous: bool); + #[cfg(not(any(target_os = "ios")))] #[method(floatsSelectionViews)] pub unsafe fn floatsSelectionViews(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setFloatsSelectionViews:)] pub unsafe fn setFloatsSelectionViews(&self, floats_selection_views: bool); #[cfg(feature = "AppKit_NSScrubberSelectionStyle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectionBackgroundStyle)] pub unsafe fn selectionBackgroundStyle(&self) -> Option>; #[cfg(feature = "AppKit_NSScrubberSelectionStyle")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionBackgroundStyle:)] pub unsafe fn setSelectionBackgroundStyle( &self, @@ -238,25 +283,31 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSScrubberSelectionStyle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectionOverlayStyle)] pub unsafe fn selectionOverlayStyle(&self) -> Option>; #[cfg(feature = "AppKit_NSScrubberSelectionStyle")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionOverlayStyle:)] pub unsafe fn setSelectionOverlayStyle( &self, selection_overlay_style: Option<&NSScrubberSelectionStyle>, ); + #[cfg(not(any(target_os = "ios")))] #[method(showsArrowButtons)] pub unsafe fn showsArrowButtons(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsArrowButtons:)] pub unsafe fn setShowsArrowButtons(&self, shows_arrow_buttons: bool); + #[cfg(not(any(target_os = "ios")))] #[method(showsAdditionalContentIndicators)] pub unsafe fn showsAdditionalContentIndicators(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsAdditionalContentIndicators:)] pub unsafe fn setShowsAdditionalContentIndicators( &self, @@ -264,47 +315,60 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundView)] pub unsafe fn backgroundView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundView:)] pub unsafe fn setBackgroundView(&self, background_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(reloadData)] pub unsafe fn reloadData(&self); + #[cfg(not(any(target_os = "ios")))] #[method(performSequentialBatchUpdates:)] pub unsafe fn performSequentialBatchUpdates(&self, update_block: &Block<(), ()>); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(insertItemsAtIndexes:)] pub unsafe fn insertItemsAtIndexes(&self, indexes: &NSIndexSet); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(removeItemsAtIndexes:)] pub unsafe fn removeItemsAtIndexes(&self, indexes: &NSIndexSet); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(reloadItemsAtIndexes:)] pub unsafe fn reloadItemsAtIndexes(&self, indexes: &NSIndexSet); + #[cfg(not(any(target_os = "ios")))] #[method(moveItemAtIndex:toIndex:)] pub unsafe fn moveItemAtIndex_toIndex(&self, old_index: NSInteger, new_index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(scrollItemAtIndex:toAlignment:)] pub unsafe fn scrollItemAtIndex_toAlignment( &self, @@ -313,12 +377,14 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSScrubberItemView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemViewForItemAtIndex:)] pub unsafe fn itemViewForItemAtIndex( &self, index: NSInteger, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(registerClass:forItemIdentifier:)] pub unsafe fn registerClass_forItemIdentifier( &self, @@ -327,6 +393,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSNib")] + #[cfg(not(any(target_os = "ios")))] #[method(registerNib:forItemIdentifier:)] pub unsafe fn registerNib_forItemIdentifier( &self, @@ -335,6 +402,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSScrubberItemView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeItemWithIdentifier:owner:)] pub unsafe fn makeItemWithIdentifier_owner( &self, diff --git a/AppKit/NSScrubberItemView.rs b/AppKit/NSScrubberItemView.rs index cd0ad8d8e..a130b51a7 100644 --- a/AppKit/NSScrubberItemView.rs +++ b/AppKit/NSScrubberItemView.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScrubberArrangedView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScrubberArrangedView; #[cfg(feature = "AppKit_NSScrubberArrangedView")] @@ -44,19 +45,24 @@ unsafe impl NSUserInterfaceItemIdentification for NSScrubberArrangedView {} extern_methods!( #[cfg(feature = "AppKit_NSScrubberArrangedView")] unsafe impl NSScrubberArrangedView { + #[cfg(not(any(target_os = "ios")))] #[method(isSelected)] pub unsafe fn isSelected(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSelected:)] pub unsafe fn setSelected(&self, selected: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isHighlighted)] pub unsafe fn isHighlighted(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHighlighted:)] pub unsafe fn setHighlighted(&self, highlighted: bool); #[cfg(feature = "AppKit_NSScrubberLayoutAttributes")] + #[cfg(not(any(target_os = "ios")))] #[method(applyLayoutAttributes:)] pub unsafe fn applyLayoutAttributes(&self, layout_attributes: &NSScrubberLayoutAttributes); } @@ -65,6 +71,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScrubberSelectionView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScrubberSelectionView; #[cfg(feature = "AppKit_NSScrubberSelectionView")] @@ -106,6 +113,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScrubberItemView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScrubberItemView; #[cfg(feature = "AppKit_NSScrubberItemView")] @@ -147,6 +155,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScrubberTextItemView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScrubberTextItemView; #[cfg(feature = "AppKit_NSScrubberTextItemView")] @@ -184,14 +193,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSScrubberTextItemView")] unsafe impl NSScrubberTextItemView { #[cfg(feature = "AppKit_NSTextField")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textField)] pub unsafe fn textField(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); } @@ -200,6 +212,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScrubberImageItemView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScrubberImageItemView; #[cfg(feature = "AppKit_NSScrubberImageItemView")] @@ -237,20 +250,25 @@ extern_methods!( #[cfg(feature = "AppKit_NSScrubberImageItemView")] unsafe impl NSScrubberImageItemView { #[cfg(feature = "AppKit_NSImageView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageView)] pub unsafe fn imageView(&self) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: &NSImage); + #[cfg(not(any(target_os = "ios")))] #[method(imageAlignment)] pub unsafe fn imageAlignment(&self) -> NSImageAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(setImageAlignment:)] pub unsafe fn setImageAlignment(&self, image_alignment: NSImageAlignment); } @@ -260,6 +278,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSScrubberArrangedView")] unsafe impl NSScrubberArrangedView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } @@ -269,6 +288,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSScrubberSelectionView")] unsafe impl NSScrubberSelectionView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } @@ -278,6 +298,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSScrubberItemView")] unsafe impl NSScrubberItemView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } @@ -287,6 +308,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSScrubberTextItemView")] unsafe impl NSScrubberTextItemView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } @@ -296,6 +318,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSScrubberImageItemView")] unsafe impl NSScrubberImageItemView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSScrubberLayout.rs b/AppKit/NSScrubberLayout.rs index b7726d2df..4bd6d9155 100644 --- a/AppKit/NSScrubberLayout.rs +++ b/AppKit/NSScrubberLayout.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScrubberLayoutAttributes")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScrubberLayoutAttributes; #[cfg(feature = "AppKit_NSScrubberLayoutAttributes")] @@ -22,24 +23,31 @@ unsafe impl NSObjectProtocol for NSScrubberLayoutAttributes {} extern_methods!( #[cfg(feature = "AppKit_NSScrubberLayoutAttributes")] unsafe impl NSScrubberLayoutAttributes { + #[cfg(not(any(target_os = "ios")))] #[method(itemIndex)] pub unsafe fn itemIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setItemIndex:)] pub unsafe fn setItemIndex(&self, item_index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setFrame:)] pub unsafe fn setFrame(&self, frame: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(alpha)] pub unsafe fn alpha(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setAlpha:)] pub unsafe fn setAlpha(&self, alpha: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForItemAtIndex:)] pub unsafe fn layoutAttributesForItemAtIndex(index: NSInteger) -> Id; } @@ -48,6 +56,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScrubberLayout")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScrubberLayout; #[cfg(feature = "AppKit_NSScrubberLayout")] @@ -65,33 +74,42 @@ unsafe impl NSObjectProtocol for NSScrubberLayout {} extern_methods!( #[cfg(feature = "AppKit_NSScrubberLayout")] unsafe impl NSScrubberLayout { + #[cfg(not(any(target_os = "ios")))] #[method(layoutAttributesClass)] pub unsafe fn layoutAttributesClass() -> &'static Class; #[cfg(feature = "AppKit_NSScrubber")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other scrubber)] pub unsafe fn scrubber(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(visibleRect)] pub unsafe fn visibleRect(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(invalidateLayout)] pub unsafe fn invalidateLayout(&self); + #[cfg(not(any(target_os = "ios")))] #[method(prepareLayout)] pub unsafe fn prepareLayout(&self); + #[cfg(not(any(target_os = "ios")))] #[method(scrubberContentSize)] pub unsafe fn scrubberContentSize(&self) -> NSSize; #[cfg(feature = "AppKit_NSScrubberLayoutAttributes")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForItemAtIndex:)] pub unsafe fn layoutAttributesForItemAtIndex( &self, @@ -102,18 +120,22 @@ extern_methods!( feature = "AppKit_NSScrubberLayoutAttributes", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutAttributesForItemsInRect:)] pub unsafe fn layoutAttributesForItemsInRect( &self, rect: NSRect, ) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(shouldInvalidateLayoutForSelectionChange)] pub unsafe fn shouldInvalidateLayoutForSelectionChange(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(shouldInvalidateLayoutForHighlightChange)] pub unsafe fn shouldInvalidateLayoutForHighlightChange(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(shouldInvalidateLayoutForChangeFromVisibleRect:toVisibleRect:)] pub unsafe fn shouldInvalidateLayoutForChangeFromVisibleRect_toVisibleRect( &self, @@ -121,14 +143,17 @@ extern_methods!( to_visible_rect: NSRect, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(automaticallyMirrorsInRightToLeftLayout)] pub unsafe fn automaticallyMirrorsInRightToLeftLayout(&self) -> bool; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSScrubberFlowLayoutDelegate: NSScrubberDelegate { #[cfg(all(feature = "AppKit_NSScrubber", feature = "AppKit_NSScrubberFlowLayout"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(scrubber:layout:sizeForItemAtIndex:)] unsafe fn scrubber_layout_sizeForItemAtIndex( @@ -145,6 +170,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScrubberFlowLayout")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScrubberFlowLayout; #[cfg(feature = "AppKit_NSScrubberFlowLayout")] @@ -163,19 +189,24 @@ unsafe impl NSObjectProtocol for NSScrubberFlowLayout {} extern_methods!( #[cfg(feature = "AppKit_NSScrubberFlowLayout")] unsafe impl NSScrubberFlowLayout { + #[cfg(not(any(target_os = "ios")))] #[method(itemSpacing)] pub unsafe fn itemSpacing(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setItemSpacing:)] pub unsafe fn setItemSpacing(&self, item_spacing: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(itemSize)] pub unsafe fn itemSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setItemSize:)] pub unsafe fn setItemSize(&self, item_size: NSSize); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(invalidateLayoutForItemsAtIndexes:)] pub unsafe fn invalidateLayoutForItemsAtIndexes(&self, invalid_item_indexes: &NSIndexSet); } @@ -184,6 +215,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSScrubberProportionalLayout")] + #[cfg(not(any(target_os = "ios")))] pub struct NSScrubberProportionalLayout; #[cfg(feature = "AppKit_NSScrubberProportionalLayout")] @@ -202,12 +234,15 @@ unsafe impl NSObjectProtocol for NSScrubberProportionalLayout {} extern_methods!( #[cfg(feature = "AppKit_NSScrubberProportionalLayout")] unsafe impl NSScrubberProportionalLayout { + #[cfg(not(any(target_os = "ios")))] #[method(numberOfVisibleItems)] pub unsafe fn numberOfVisibleItems(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfVisibleItems:)] pub unsafe fn setNumberOfVisibleItems(&self, number_of_visible_items: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNumberOfVisibleItems:)] pub unsafe fn initWithNumberOfVisibleItems( this: Option>, @@ -215,6 +250,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; } diff --git a/AppKit/NSSearchField.rs b/AppKit/NSSearchField.rs index edbd23dce..33af12674 100644 --- a/AppKit/NSSearchField.rs +++ b/AppKit/NSSearchField.rs @@ -8,13 +8,16 @@ use crate::Foundation::*; pub type NSSearchFieldRecentsAutosaveName = NSString; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSSearchFieldDelegate: NSTextFieldDelegate { #[cfg(feature = "AppKit_NSSearchField")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(searchFieldDidStartSearching:)] unsafe fn searchFieldDidStartSearching(&self, sender: &NSSearchField); #[cfg(feature = "AppKit_NSSearchField")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(searchFieldDidEndSearching:)] unsafe fn searchFieldDidEndSearching(&self, sender: &NSSearchField); @@ -26,6 +29,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSearchField")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSearchField; #[cfg(feature = "AppKit_NSSearchField")] @@ -74,26 +78,33 @@ unsafe impl NSUserInterfaceValidations for NSSearchField {} extern_methods!( #[cfg(feature = "AppKit_NSSearchField")] unsafe impl NSSearchField { + #[cfg(not(any(target_os = "ios")))] #[method(searchTextBounds)] pub unsafe fn searchTextBounds(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(searchButtonBounds)] pub unsafe fn searchButtonBounds(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(cancelButtonBounds)] pub unsafe fn cancelButtonBounds(&self) -> NSRect; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other recentSearches)] pub unsafe fn recentSearches(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setRecentSearches:)] pub unsafe fn setRecentSearches(&self, recent_searches: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other recentsAutosaveName)] pub unsafe fn recentsAutosaveName(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setRecentsAutosaveName:)] pub unsafe fn setRecentsAutosaveName( &self, @@ -101,34 +112,44 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other searchMenuTemplate)] pub unsafe fn searchMenuTemplate(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setSearchMenuTemplate:)] pub unsafe fn setSearchMenuTemplate(&self, search_menu_template: Option<&NSMenu>); + #[cfg(not(any(target_os = "ios")))] #[method(sendsWholeSearchString)] pub unsafe fn sendsWholeSearchString(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSendsWholeSearchString:)] pub unsafe fn setSendsWholeSearchString(&self, sends_whole_search_string: bool); + #[cfg(not(any(target_os = "ios")))] #[method(maximumRecents)] pub unsafe fn maximumRecents(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setMaximumRecents:)] pub unsafe fn setMaximumRecents(&self, maximum_recents: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(sendsSearchStringImmediately)] pub unsafe fn sendsSearchStringImmediately(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSendsSearchStringImmediately:)] pub unsafe fn setSendsSearchStringImmediately(&self, sends_search_string_immediately: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -142,22 +163,27 @@ extern_methods!( #[cfg(feature = "AppKit_NSSearchField")] unsafe impl NSSearchField { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(rectForSearchTextWhenCentered:)] pub unsafe fn rectForSearchTextWhenCentered(&self, is_centered: bool) -> NSRect; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(rectForSearchButtonWhenCentered:)] pub unsafe fn rectForSearchButtonWhenCentered(&self, is_centered: bool) -> NSRect; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(rectForCancelButtonWhenCentered:)] pub unsafe fn rectForCancelButtonWhenCentered(&self, is_centered: bool) -> NSRect; #[deprecated = "The placeholder centering UI design is no longer available. Setting this property is no-op."] + #[cfg(not(any(target_os = "ios")))] #[method(centersPlaceholder)] pub unsafe fn centersPlaceholder(&self) -> bool; #[deprecated = "The placeholder centering UI design is no longer available. Setting this property is no-op."] + #[cfg(not(any(target_os = "ios")))] #[method(setCentersPlaceholder:)] pub unsafe fn setCentersPlaceholder(&self, centers_placeholder: bool); } @@ -170,20 +196,24 @@ extern_methods!( #[cfg(feature = "AppKit_NSSearchField")] unsafe impl NSSearchField { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelWithString:)] pub unsafe fn labelWithString(string_value: &NSString) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other wrappingLabelWithString:)] pub unsafe fn wrappingLabelWithString(string_value: &NSString) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelWithAttributedString:)] pub unsafe fn labelWithAttributedString( attributed_string_value: &NSAttributedString, ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textFieldWithString:)] pub unsafe fn textFieldWithString(string_value: &NSString) -> Id; } @@ -193,6 +223,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSSearchField")] unsafe impl NSSearchField { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSSearchFieldCell.rs b/AppKit/NSSearchFieldCell.rs index e8f8a4e26..bc4552ca7 100644 --- a/AppKit/NSSearchFieldCell.rs +++ b/AppKit/NSSearchFieldCell.rs @@ -16,6 +16,7 @@ extern_static!(NSSearchFieldNoRecentsMenuItemTag: NSInteger = 1003); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSearchFieldCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSearchFieldCell; #[cfg(feature = "AppKit_NSSearchFieldCell")] @@ -44,14 +45,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSSearchFieldCell")] unsafe impl NSSearchFieldCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, @@ -59,76 +63,97 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSButtonCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other searchButtonCell)] pub unsafe fn searchButtonCell(&self) -> Option>; #[cfg(feature = "AppKit_NSButtonCell")] + #[cfg(not(any(target_os = "ios")))] #[method(setSearchButtonCell:)] pub unsafe fn setSearchButtonCell(&self, search_button_cell: Option<&NSButtonCell>); #[cfg(feature = "AppKit_NSButtonCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cancelButtonCell)] pub unsafe fn cancelButtonCell(&self) -> Option>; #[cfg(feature = "AppKit_NSButtonCell")] + #[cfg(not(any(target_os = "ios")))] #[method(setCancelButtonCell:)] pub unsafe fn setCancelButtonCell(&self, cancel_button_cell: Option<&NSButtonCell>); + #[cfg(not(any(target_os = "ios")))] #[method(resetSearchButtonCell)] pub unsafe fn resetSearchButtonCell(&self); + #[cfg(not(any(target_os = "ios")))] #[method(resetCancelButtonCell)] pub unsafe fn resetCancelButtonCell(&self); + #[cfg(not(any(target_os = "ios")))] #[method(searchTextRectForBounds:)] pub unsafe fn searchTextRectForBounds(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(searchButtonRectForBounds:)] pub unsafe fn searchButtonRectForBounds(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(cancelButtonRectForBounds:)] pub unsafe fn cancelButtonRectForBounds(&self, rect: NSRect) -> NSRect; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other searchMenuTemplate)] pub unsafe fn searchMenuTemplate(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setSearchMenuTemplate:)] pub unsafe fn setSearchMenuTemplate(&self, search_menu_template: Option<&NSMenu>); + #[cfg(not(any(target_os = "ios")))] #[method(sendsWholeSearchString)] pub unsafe fn sendsWholeSearchString(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSendsWholeSearchString:)] pub unsafe fn setSendsWholeSearchString(&self, sends_whole_search_string: bool); + #[cfg(not(any(target_os = "ios")))] #[method(maximumRecents)] pub unsafe fn maximumRecents(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setMaximumRecents:)] pub unsafe fn setMaximumRecents(&self, maximum_recents: NSInteger); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other recentSearches)] pub unsafe fn recentSearches(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setRecentSearches:)] pub unsafe fn setRecentSearches(&self, recent_searches: Option<&NSArray>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other recentsAutosaveName)] pub unsafe fn recentsAutosaveName(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setRecentsAutosaveName:)] pub unsafe fn setRecentsAutosaveName( &self, recents_autosave_name: Option<&NSSearchFieldRecentsAutosaveName>, ); + #[cfg(not(any(target_os = "ios")))] #[method(sendsSearchStringImmediately)] pub unsafe fn sendsSearchStringImmediately(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSendsSearchStringImmediately:)] pub unsafe fn setSendsSearchStringImmediately(&self, sends_search_string_immediately: bool); } diff --git a/AppKit/NSSearchToolbarItem.rs b/AppKit/NSSearchToolbarItem.rs index 977e77c86..adadbbc14 100644 --- a/AppKit/NSSearchToolbarItem.rs +++ b/AppKit/NSSearchToolbarItem.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSearchToolbarItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSearchToolbarItem; #[cfg(feature = "AppKit_NSSearchToolbarItem")] @@ -24,42 +25,52 @@ extern_methods!( #[cfg(feature = "AppKit_NSSearchToolbarItem")] unsafe impl NSSearchToolbarItem { #[cfg(feature = "AppKit_NSSearchField")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other searchField)] pub unsafe fn searchField(&self) -> Id; #[cfg(feature = "AppKit_NSSearchField")] + #[cfg(not(any(target_os = "ios")))] #[method(setSearchField:)] pub unsafe fn setSearchField(&self, search_field: &NSSearchField); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(resignsFirstResponderWithCancel)] pub unsafe fn resignsFirstResponderWithCancel(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setResignsFirstResponderWithCancel:)] pub unsafe fn setResignsFirstResponderWithCancel( &self, resigns_first_responder_with_cancel: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(preferredWidthForSearchField)] pub unsafe fn preferredWidthForSearchField(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setPreferredWidthForSearchField:)] pub unsafe fn setPreferredWidthForSearchField( &self, preferred_width_for_search_field: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(beginSearchInteraction)] pub unsafe fn beginSearchInteraction(&self); + #[cfg(not(any(target_os = "ios")))] #[method(endSearchInteraction)] pub unsafe fn endSearchInteraction(&self); } diff --git a/AppKit/NSSecureTextField.rs b/AppKit/NSSecureTextField.rs index 6ee962ce0..98068b752 100644 --- a/AppKit/NSSecureTextField.rs +++ b/AppKit/NSSecureTextField.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSecureTextField")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSecureTextField; #[cfg(feature = "AppKit_NSSecureTextField")] @@ -61,6 +62,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSecureTextFieldCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSecureTextFieldCell; #[cfg(feature = "AppKit_NSSecureTextFieldCell")] @@ -88,9 +90,11 @@ unsafe impl NSUserInterfaceItemIdentification for NSSecureTextFieldCell {} extern_methods!( #[cfg(feature = "AppKit_NSSecureTextFieldCell")] unsafe impl NSSecureTextFieldCell { + #[cfg(not(any(target_os = "ios")))] #[method(echosBullets)] pub unsafe fn echosBullets(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEchosBullets:)] pub unsafe fn setEchosBullets(&self, echos_bullets: bool); } @@ -103,20 +107,24 @@ extern_methods!( #[cfg(feature = "AppKit_NSSecureTextField")] unsafe impl NSSecureTextField { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelWithString:)] pub unsafe fn labelWithString(string_value: &NSString) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other wrappingLabelWithString:)] pub unsafe fn wrappingLabelWithString(string_value: &NSString) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelWithAttributedString:)] pub unsafe fn labelWithAttributedString( attributed_string_value: &NSAttributedString, ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textFieldWithString:)] pub unsafe fn textFieldWithString(string_value: &NSString) -> Id; } @@ -126,6 +134,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSSecureTextField")] unsafe impl NSSecureTextField { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } @@ -136,10 +145,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSSecureTextFieldCell")] unsafe impl NSSecureTextFieldCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSSegmentedCell.rs b/AppKit/NSSegmentedCell.rs index 739ef096f..2aa59991a 100644 --- a/AppKit/NSSegmentedCell.rs +++ b/AppKit/NSSegmentedCell.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSegmentedCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSegmentedCell; #[cfg(feature = "AppKit_NSSegmentedCell")] @@ -35,47 +36,61 @@ unsafe impl NSUserInterfaceItemIdentification for NSSegmentedCell {} extern_methods!( #[cfg(feature = "AppKit_NSSegmentedCell")] unsafe impl NSSegmentedCell { + #[cfg(not(any(target_os = "ios")))] #[method(segmentCount)] pub unsafe fn segmentCount(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setSegmentCount:)] pub unsafe fn setSegmentCount(&self, segment_count: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(selectedSegment)] pub unsafe fn selectedSegment(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedSegment:)] pub unsafe fn setSelectedSegment(&self, selected_segment: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(selectSegmentWithTag:)] pub unsafe fn selectSegmentWithTag(&self, tag: NSInteger) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(makeNextSegmentKey)] pub unsafe fn makeNextSegmentKey(&self); + #[cfg(not(any(target_os = "ios")))] #[method(makePreviousSegmentKey)] pub unsafe fn makePreviousSegmentKey(&self); + #[cfg(not(any(target_os = "ios")))] #[method(trackingMode)] pub unsafe fn trackingMode(&self) -> NSSegmentSwitchTracking; + #[cfg(not(any(target_os = "ios")))] #[method(setTrackingMode:)] pub unsafe fn setTrackingMode(&self, tracking_mode: NSSegmentSwitchTracking); + #[cfg(not(any(target_os = "ios")))] #[method(setWidth:forSegment:)] pub unsafe fn setWidth_forSegment(&self, width: CGFloat, segment: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(widthForSegment:)] pub unsafe fn widthForSegment(&self, segment: NSInteger) -> CGFloat; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:forSegment:)] pub unsafe fn setImage_forSegment(&self, image: Option<&NSImage>, segment: NSInteger); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageForSegment:)] pub unsafe fn imageForSegment(&self, segment: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setImageScaling:forSegment:)] pub unsafe fn setImageScaling_forSegment( &self, @@ -83,58 +98,74 @@ extern_methods!( segment: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(imageScalingForSegment:)] pub unsafe fn imageScalingForSegment(&self, segment: NSInteger) -> NSImageScaling; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setLabel:forSegment:)] pub unsafe fn setLabel_forSegment(&self, label: &NSString, segment: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelForSegment:)] pub unsafe fn labelForSegment(&self, segment: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setSelected:forSegment:)] pub unsafe fn setSelected_forSegment(&self, selected: bool, segment: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(isSelectedForSegment:)] pub unsafe fn isSelectedForSegment(&self, segment: NSInteger) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEnabled:forSegment:)] pub unsafe fn setEnabled_forSegment(&self, enabled: bool, segment: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(isEnabledForSegment:)] pub unsafe fn isEnabledForSegment(&self, segment: NSInteger) -> bool; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenu:forSegment:)] pub unsafe fn setMenu_forSegment(&self, menu: Option<&NSMenu>, segment: NSInteger); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuForSegment:)] pub unsafe fn menuForSegment(&self, segment: NSInteger) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setToolTip:forSegment:)] pub unsafe fn setToolTip_forSegment(&self, tool_tip: Option<&NSString>, segment: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolTipForSegment:)] pub unsafe fn toolTipForSegment(&self, segment: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setTag:forSegment:)] pub unsafe fn setTag_forSegment(&self, tag: NSInteger, segment: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(tagForSegment:)] pub unsafe fn tagForSegment(&self, segment: NSInteger) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(segmentStyle)] pub unsafe fn segmentStyle(&self) -> NSSegmentStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setSegmentStyle:)] pub unsafe fn setSegmentStyle(&self, segment_style: NSSegmentStyle); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawSegment:inFrame:withView:)] pub unsafe fn drawSegment_inFrame_withView( &self, @@ -149,6 +180,7 @@ extern_methods!( /// NSSegmentBackgroundStyle #[cfg(feature = "AppKit_NSSegmentedCell")] unsafe impl NSSegmentedCell { + #[cfg(not(any(target_os = "ios")))] #[method(interiorBackgroundStyleForSegment:)] pub unsafe fn interiorBackgroundStyleForSegment( &self, @@ -162,10 +194,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSSegmentedCell")] unsafe impl NSSegmentedCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSSegmentedControl.rs b/AppKit/NSSegmentedControl.rs index 951e70201..fed9f2cca 100644 --- a/AppKit/NSSegmentedControl.rs +++ b/AppKit/NSSegmentedControl.rs @@ -7,34 +7,53 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSegmentSwitchTracking { + #[cfg(not(any(target_os = "ios")))] NSSegmentSwitchTrackingSelectOne = 0, + #[cfg(not(any(target_os = "ios")))] NSSegmentSwitchTrackingSelectAny = 1, + #[cfg(not(any(target_os = "ios")))] NSSegmentSwitchTrackingMomentary = 2, + #[cfg(not(any(target_os = "ios")))] NSSegmentSwitchTrackingMomentaryAccelerator = 3, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSegmentStyle { + #[cfg(not(any(target_os = "ios")))] NSSegmentStyleAutomatic = 0, + #[cfg(not(any(target_os = "ios")))] NSSegmentStyleRounded = 1, + #[cfg(not(any(target_os = "ios")))] NSSegmentStyleRoundRect = 3, + #[cfg(not(any(target_os = "ios")))] NSSegmentStyleTexturedSquare = 4, + #[cfg(not(any(target_os = "ios")))] NSSegmentStyleSmallSquare = 6, + #[cfg(not(any(target_os = "ios")))] NSSegmentStyleSeparated = 8, + #[cfg(not(any(target_os = "ios")))] NSSegmentStyleTexturedRounded = 2, + #[cfg(not(any(target_os = "ios")))] NSSegmentStyleCapsule = 5, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSegmentDistribution { + #[cfg(not(any(target_os = "ios")))] NSSegmentDistributionFit = 0, + #[cfg(not(any(target_os = "ios")))] NSSegmentDistributionFill = 1, + #[cfg(not(any(target_os = "ios")))] NSSegmentDistributionFillEqually = 2, + #[cfg(not(any(target_os = "ios")))] NSSegmentDistributionFillProportionally = 3, } ); @@ -42,6 +61,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSegmentedControl")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSegmentedControl; #[cfg(feature = "AppKit_NSSegmentedControl")] @@ -81,35 +101,45 @@ unsafe impl NSUserInterfaceItemIdentification for NSSegmentedControl {} extern_methods!( #[cfg(feature = "AppKit_NSSegmentedControl")] unsafe impl NSSegmentedControl { + #[cfg(not(any(target_os = "ios")))] #[method(segmentCount)] pub unsafe fn segmentCount(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setSegmentCount:)] pub unsafe fn setSegmentCount(&self, segment_count: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(selectedSegment)] pub unsafe fn selectedSegment(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedSegment:)] pub unsafe fn setSelectedSegment(&self, selected_segment: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(selectSegmentWithTag:)] pub unsafe fn selectSegmentWithTag(&self, tag: NSInteger) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setWidth:forSegment:)] pub unsafe fn setWidth_forSegment(&self, width: CGFloat, segment: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(widthForSegment:)] pub unsafe fn widthForSegment(&self, segment: NSInteger) -> CGFloat; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:forSegment:)] pub unsafe fn setImage_forSegment(&self, image: Option<&NSImage>, segment: NSInteger); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageForSegment:)] pub unsafe fn imageForSegment(&self, segment: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setImageScaling:forSegment:)] pub unsafe fn setImageScaling_forSegment( &self, @@ -117,51 +147,65 @@ extern_methods!( segment: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(imageScalingForSegment:)] pub unsafe fn imageScalingForSegment(&self, segment: NSInteger) -> NSImageScaling; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setLabel:forSegment:)] pub unsafe fn setLabel_forSegment(&self, label: &NSString, segment: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelForSegment:)] pub unsafe fn labelForSegment(&self, segment: NSInteger) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenu:forSegment:)] pub unsafe fn setMenu_forSegment(&self, menu: Option<&NSMenu>, segment: NSInteger); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuForSegment:)] pub unsafe fn menuForSegment(&self, segment: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setSelected:forSegment:)] pub unsafe fn setSelected_forSegment(&self, selected: bool, segment: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(isSelectedForSegment:)] pub unsafe fn isSelectedForSegment(&self, segment: NSInteger) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEnabled:forSegment:)] pub unsafe fn setEnabled_forSegment(&self, enabled: bool, segment: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(isEnabledForSegment:)] pub unsafe fn isEnabledForSegment(&self, segment: NSInteger) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setToolTip:forSegment:)] pub unsafe fn setToolTip_forSegment(&self, tool_tip: Option<&NSString>, segment: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolTipForSegment:)] pub unsafe fn toolTipForSegment(&self, segment: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setTag:forSegment:)] pub unsafe fn setTag_forSegment(&self, tag: NSInteger, segment: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(tagForSegment:)] pub unsafe fn tagForSegment(&self, segment: NSInteger) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsMenuIndicator:forSegment:)] pub unsafe fn setShowsMenuIndicator_forSegment( &self, @@ -169,44 +213,56 @@ extern_methods!( segment: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(showsMenuIndicatorForSegment:)] pub unsafe fn showsMenuIndicatorForSegment(&self, segment: NSInteger) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(segmentStyle)] pub unsafe fn segmentStyle(&self) -> NSSegmentStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setSegmentStyle:)] pub unsafe fn setSegmentStyle(&self, segment_style: NSSegmentStyle); + #[cfg(not(any(target_os = "ios")))] #[method(isSpringLoaded)] pub unsafe fn isSpringLoaded(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSpringLoaded:)] pub unsafe fn setSpringLoaded(&self, spring_loaded: bool); + #[cfg(not(any(target_os = "ios")))] #[method(trackingMode)] pub unsafe fn trackingMode(&self) -> NSSegmentSwitchTracking; + #[cfg(not(any(target_os = "ios")))] #[method(setTrackingMode:)] pub unsafe fn setTrackingMode(&self, tracking_mode: NSSegmentSwitchTracking); + #[cfg(not(any(target_os = "ios")))] #[method(doubleValueForSelectedSegment)] pub unsafe fn doubleValueForSelectedSegment(&self) -> c_double; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedSegmentBezelColor)] pub unsafe fn selectedSegmentBezelColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedSegmentBezelColor:)] pub unsafe fn setSelectedSegmentBezelColor( &self, selected_segment_bezel_color: Option<&NSColor>, ); + #[cfg(not(any(target_os = "ios")))] #[method(indexOfSelectedItem)] pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setAlignment:forSegment:)] pub unsafe fn setAlignment_forSegment( &self, @@ -214,12 +270,15 @@ extern_methods!( segment: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(alignmentForSegment:)] pub unsafe fn alignmentForSegment(&self, segment: NSInteger) -> NSTextAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(segmentDistribution)] pub unsafe fn segmentDistribution(&self) -> NSSegmentDistribution; + #[cfg(not(any(target_os = "ios")))] #[method(setSegmentDistribution:)] pub unsafe fn setSegmentDistribution(&self, segment_distribution: NSSegmentDistribution); @@ -227,6 +286,7 @@ extern_methods!( feature = "AppKit_NSUserInterfaceCompressionOptions", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(compressWithPrioritizedCompressionOptions:)] pub unsafe fn compressWithPrioritizedCompressionOptions( &self, @@ -237,6 +297,7 @@ extern_methods!( feature = "AppKit_NSUserInterfaceCompressionOptions", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(minimumSizeWithPrioritizedCompressionOptions:)] pub unsafe fn minimumSizeWithPrioritizedCompressionOptions( &self, @@ -244,6 +305,7 @@ extern_methods!( ) -> NSSize; #[cfg(feature = "AppKit_NSUserInterfaceCompressionOptions")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other activeCompressionOptions)] pub unsafe fn activeCompressionOptions(&self) -> Id; } @@ -254,6 +316,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSSegmentedControl")] unsafe impl NSSegmentedControl { #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other segmentedControlWithLabels:trackingMode:target:action:)] pub unsafe fn segmentedControlWithLabels_trackingMode_target_action( labels: &NSArray, @@ -263,6 +326,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "AppKit_NSImage", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other segmentedControlWithImages:trackingMode:target:action:)] pub unsafe fn segmentedControlWithImages_trackingMode_target_action( images: &NSArray, @@ -277,6 +341,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSSegmentedControl")] unsafe impl NSSegmentedControl { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSSharingService.rs b/AppKit/NSSharingService.rs index bb82282c5..503d3a548 100644 --- a/AppKit/NSSharingService.rs +++ b/AppKit/NSSharingService.rs @@ -52,6 +52,7 @@ extern_static!(NSSharingServiceNameCloudSharing: &'static NSSharingServiceName); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSharingService")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSharingService; #[cfg(feature = "AppKit_NSSharingService")] @@ -66,9 +67,11 @@ unsafe impl NSObjectProtocol for NSSharingService {} extern_methods!( #[cfg(feature = "AppKit_NSSharingService")] unsafe impl NSSharingService { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -76,68 +79,84 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuItemTitle)] pub unsafe fn menuItemTitle(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenuItemTitle:)] pub unsafe fn setMenuItemTitle(&self, menu_item_title: &NSString); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other recipients)] pub unsafe fn recipients(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setRecipients:)] pub unsafe fn setRecipients(&self, recipients: Option<&NSArray>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other subject)] pub unsafe fn subject(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setSubject:)] pub unsafe fn setSubject(&self, subject: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other messageBody)] pub unsafe fn messageBody(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other permanentLink)] pub unsafe fn permanentLink(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accountName)] pub unsafe fn accountName(&self) -> Option>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attachmentFileURLs)] pub unsafe fn attachmentFileURLs(&self) -> Option>>; #[cfg(feature = "Foundation_NSArray")] #[deprecated = "Use -[NSSharingServicePicker standardShareMenuItem] instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharingServicesForItems:)] pub unsafe fn sharingServicesForItems(items: &NSArray) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharingServiceNamed:)] pub unsafe fn sharingServiceNamed( service_name: &NSSharingServiceName, ) -> Option>; #[cfg(all(feature = "AppKit_NSImage", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithTitle:image:alternateImage:handler:)] pub unsafe fn initWithTitle_image_alternateImage_handler( this: Option>, @@ -147,14 +166,17 @@ extern_methods!( block: &Block<(), ()>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(canPerformWithItems:)] pub unsafe fn canPerformWithItems(&self, items: Option<&NSArray>) -> bool; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(performWithItems:)] pub unsafe fn performWithItems(&self, items: &NSArray); } @@ -162,16 +184,22 @@ extern_methods!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSharingContentScope { + #[cfg(not(any(target_os = "ios")))] NSSharingContentScopeItem = 0, + #[cfg(not(any(target_os = "ios")))] NSSharingContentScopePartial = 1, + #[cfg(not(any(target_os = "ios")))] NSSharingContentScopeFull = 2, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSSharingServiceDelegate: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSSharingService", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(sharingService:willShareItems:)] unsafe fn sharingService_willShareItems( @@ -185,6 +213,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(sharingService:didFailToShareItems:error:)] unsafe fn sharingService_didFailToShareItems_error( @@ -195,6 +224,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSSharingService", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(sharingService:didShareItems:)] unsafe fn sharingService_didShareItems( @@ -204,6 +234,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSSharingService")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(sharingService:sourceFrameOnScreenForShareItem:)] unsafe fn sharingService_sourceFrameOnScreenForShareItem( @@ -213,6 +244,7 @@ extern_protocol!( ) -> NSRect; #[cfg(all(feature = "AppKit_NSImage", feature = "AppKit_NSSharingService"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other sharingService:transitionImageForShareItem:contentRect:)] unsafe fn sharingService_transitionImageForShareItem_contentRect( @@ -227,6 +259,7 @@ extern_protocol!( feature = "AppKit_NSWindow", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other sharingService:sourceWindowForShareItems:sharingContentScope:)] unsafe fn sharingService_sourceWindowForShareItems_sharingContentScope( @@ -237,6 +270,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSSharingService", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other anchoringViewForSharingService:showRelativeToRect:preferredEdge:)] unsafe fn anchoringViewForSharingService_showRelativeToRect_preferredEdge( @@ -252,22 +286,30 @@ extern_protocol!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSCloudKitSharingServiceOptions { + #[cfg(not(any(target_os = "ios")))] NSCloudKitSharingServiceStandard = 0, + #[cfg(not(any(target_os = "ios")))] NSCloudKitSharingServiceAllowPublic = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSCloudKitSharingServiceAllowPrivate = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSCloudKitSharingServiceAllowReadOnly = 1 << 4, + #[cfg(not(any(target_os = "ios")))] NSCloudKitSharingServiceAllowReadWrite = 1 << 5, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSCloudSharingServiceDelegate: NSSharingServiceDelegate { #[cfg(all( feature = "AppKit_NSSharingService", feature = "Foundation_NSArray", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(sharingService:didCompleteForItems:error:)] unsafe fn sharingService_didCompleteForItems_error( @@ -281,6 +323,7 @@ extern_protocol!( feature = "AppKit_NSSharingService", feature = "Foundation_NSItemProvider" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(optionsForSharingService:shareProvider:)] unsafe fn optionsForSharingService_shareProvider( @@ -302,6 +345,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSharingServicePicker")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSharingServicePicker; #[cfg(feature = "AppKit_NSSharingServicePicker")] @@ -316,11 +360,13 @@ unsafe impl NSObjectProtocol for NSSharingServicePicker {} extern_methods!( #[cfg(feature = "AppKit_NSSharingServicePicker")] unsafe impl NSSharingServicePicker { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -328,13 +374,16 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithItems:)] pub unsafe fn initWithItems(this: Option>, items: &NSArray) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(showRelativeToRect:ofView:preferredEdge:)] pub unsafe fn showRelativeToRect_ofView_preferredEdge( &self, @@ -343,22 +392,26 @@ extern_methods!( preferred_edge: NSRectEdge, ); + #[cfg(not(any(target_os = "ios")))] #[method(close)] pub unsafe fn close(&self); #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other standardShareMenuItem)] pub unsafe fn standardShareMenuItem(&self) -> Id; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSSharingServicePickerDelegate: NSObjectProtocol { #[cfg(all( feature = "AppKit_NSSharingService", feature = "AppKit_NSSharingServicePicker", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other sharingServicePicker:sharingServicesForItems:proposedSharingServices:)] unsafe fn sharingServicePicker_sharingServicesForItems_proposedSharingServices( @@ -372,6 +425,7 @@ extern_protocol!( feature = "AppKit_NSSharingService", feature = "AppKit_NSSharingServicePicker" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other sharingServicePicker:delegateForSharingService:)] unsafe fn sharingServicePicker_delegateForSharingService( @@ -384,6 +438,7 @@ extern_protocol!( feature = "AppKit_NSSharingService", feature = "AppKit_NSSharingServicePicker" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(sharingServicePicker:didChooseSharingService:)] unsafe fn sharingServicePicker_didChooseSharingService( diff --git a/AppKit/NSSharingServicePickerTouchBarItem.rs b/AppKit/NSSharingServicePickerTouchBarItem.rs index f634d60c0..ec88b8117 100644 --- a/AppKit/NSSharingServicePickerTouchBarItem.rs +++ b/AppKit/NSSharingServicePickerTouchBarItem.rs @@ -26,42 +26,51 @@ unsafe impl NSObjectProtocol for NSSharingServicePickerTouchBarItem {} extern_methods!( #[cfg(feature = "AppKit_NSSharingServicePickerTouchBarItem")] unsafe impl NSSharingServicePickerTouchBarItem { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonTitle)] pub unsafe fn buttonTitle(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setButtonTitle:)] pub unsafe fn setButtonTitle(&self, button_title: &NSString); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonImage)] pub unsafe fn buttonImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setButtonImage:)] pub unsafe fn setButtonImage(&self, button_image: Option<&NSImage>); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSSharingServicePickerTouchBarItemDelegate: NSSharingServicePickerDelegate { @@ -69,6 +78,7 @@ extern_protocol!( feature = "AppKit_NSSharingServicePickerTouchBarItem", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemsForSharingServicePickerTouchBarItem:)] unsafe fn itemsForSharingServicePickerTouchBarItem( &self, diff --git a/AppKit/NSSlider.rs b/AppKit/NSSlider.rs index 9bc0bddb7..bcf162a7a 100644 --- a/AppKit/NSSlider.rs +++ b/AppKit/NSSlider.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSlider")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSlider; #[cfg(feature = "AppKit_NSSlider")] @@ -47,45 +48,58 @@ unsafe impl NSUserInterfaceItemIdentification for NSSlider {} extern_methods!( #[cfg(feature = "AppKit_NSSlider")] unsafe impl NSSlider { + #[cfg(not(any(target_os = "ios")))] #[method(sliderType)] pub unsafe fn sliderType(&self) -> NSSliderType; + #[cfg(not(any(target_os = "ios")))] #[method(setSliderType:)] pub unsafe fn setSliderType(&self, slider_type: NSSliderType); + #[cfg(not(any(target_os = "ios")))] #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMinValue:)] pub unsafe fn setMinValue(&self, min_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, max_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(altIncrementValue)] pub unsafe fn altIncrementValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setAltIncrementValue:)] pub unsafe fn setAltIncrementValue(&self, alt_increment_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(knobThickness)] pub unsafe fn knobThickness(&self) -> CGFloat; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(acceptsFirstMouse:)] pub unsafe fn acceptsFirstMouse(&self, event: Option<&NSEvent>) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setVertical:)] pub unsafe fn setVertical(&self, vertical: bool); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other trackFillColor)] pub unsafe fn trackFillColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setTrackFillColor:)] pub unsafe fn setTrackFillColor(&self, track_fill_color: Option<&NSColor>); } @@ -101,33 +115,43 @@ extern_methods!( /// NSTickMarkSupport #[cfg(feature = "AppKit_NSSlider")] unsafe impl NSSlider { + #[cfg(not(any(target_os = "ios")))] #[method(numberOfTickMarks)] pub unsafe fn numberOfTickMarks(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfTickMarks:)] pub unsafe fn setNumberOfTickMarks(&self, number_of_tick_marks: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(tickMarkPosition)] pub unsafe fn tickMarkPosition(&self) -> NSTickMarkPosition; + #[cfg(not(any(target_os = "ios")))] #[method(setTickMarkPosition:)] pub unsafe fn setTickMarkPosition(&self, tick_mark_position: NSTickMarkPosition); + #[cfg(not(any(target_os = "ios")))] #[method(allowsTickMarkValuesOnly)] pub unsafe fn allowsTickMarkValuesOnly(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsTickMarkValuesOnly:)] pub unsafe fn setAllowsTickMarkValuesOnly(&self, allows_tick_mark_values_only: bool); + #[cfg(not(any(target_os = "ios")))] #[method(tickMarkValueAtIndex:)] pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(rectOfTickMarkAtIndex:)] pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfTickMarkAtPoint:)] pub unsafe fn indexOfTickMarkAtPoint(&self, point: NSPoint) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(closestTickMarkValueToValue:)] pub unsafe fn closestTickMarkValueToValue(&self, value: c_double) -> c_double; } @@ -137,12 +161,14 @@ extern_methods!( /// NSSliderConvenience #[cfg(feature = "AppKit_NSSlider")] unsafe impl NSSlider { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sliderWithTarget:action:)] pub unsafe fn sliderWithTarget_action( target: Option<&Object>, action: Option, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sliderWithValue:minValue:maxValue:target:action:)] pub unsafe fn sliderWithValue_minValue_maxValue_target_action( value: c_double, @@ -160,54 +186,65 @@ extern_methods!( unsafe impl NSSlider { #[cfg(feature = "AppKit_NSCell")] #[deprecated = "-setTitleCell: had no effect since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleCell:)] pub unsafe fn setTitleCell(&self, cell: Option<&NSCell>); #[deprecated = "-titleCell has returned nil since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleCell)] pub unsafe fn titleCell(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] #[deprecated = "-setTitleColor: had no effect since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleColor:)] pub unsafe fn setTitleColor(&self, new_color: Option<&NSColor>); #[cfg(feature = "AppKit_NSColor")] #[deprecated = "-titleColor has returned nil since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleColor)] pub unsafe fn titleColor(&self) -> Option>; #[cfg(feature = "AppKit_NSFont")] #[deprecated = "-setTitleFont: had no effect since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleFont:)] pub unsafe fn setTitleFont(&self, font_obj: Option<&NSFont>); #[cfg(feature = "AppKit_NSFont")] #[deprecated = "-titleFont has returned nil since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleFont)] pub unsafe fn titleFont(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated = "-title has returned nil since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated = "-setTitle: had no effect since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, string: Option<&NSString>); #[deprecated = "-knobThickness has returned 0 since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method(setKnobThickness:)] pub unsafe fn setKnobThickness(&self, thickness: CGFloat); #[cfg(feature = "AppKit_NSImage")] #[deprecated = "-setImage: had no effect since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, background_image: Option<&NSImage>); #[cfg(feature = "AppKit_NSImage")] #[deprecated = "-image has returned nil since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; } @@ -217,6 +254,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSSlider")] unsafe impl NSSlider { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSSliderCell.rs b/AppKit/NSSliderCell.rs index 4de78c3fb..a141e9044 100644 --- a/AppKit/NSSliderCell.rs +++ b/AppKit/NSSliderCell.rs @@ -7,18 +7,26 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTickMarkPosition { + #[cfg(not(any(target_os = "ios")))] NSTickMarkPositionBelow = 0, + #[cfg(not(any(target_os = "ios")))] NSTickMarkPositionAbove = 1, + #[cfg(not(any(target_os = "ios")))] NSTickMarkPositionLeading = NSTickMarkPositionAbove, + #[cfg(not(any(target_os = "ios")))] NSTickMarkPositionTrailing = NSTickMarkPositionBelow, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSliderType { + #[cfg(not(any(target_os = "ios")))] NSSliderTypeLinear = 0, + #[cfg(not(any(target_os = "ios")))] NSSliderTypeCircular = 1, } ); @@ -26,6 +34,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSliderCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSliderCell; #[cfg(feature = "AppKit_NSSliderCell")] @@ -53,54 +62,71 @@ unsafe impl NSUserInterfaceItemIdentification for NSSliderCell {} extern_methods!( #[cfg(feature = "AppKit_NSSliderCell")] unsafe impl NSSliderCell { + #[cfg(not(any(target_os = "ios")))] #[method(prefersTrackingUntilMouseUp)] pub unsafe fn prefersTrackingUntilMouseUp() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMinValue:)] pub unsafe fn setMinValue(&self, min_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, max_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(altIncrementValue)] pub unsafe fn altIncrementValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setAltIncrementValue:)] pub unsafe fn setAltIncrementValue(&self, alt_increment_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(sliderType)] pub unsafe fn sliderType(&self) -> NSSliderType; + #[cfg(not(any(target_os = "ios")))] #[method(setSliderType:)] pub unsafe fn setSliderType(&self, slider_type: NSSliderType); + #[cfg(not(any(target_os = "ios")))] #[method(setVertical:)] pub unsafe fn setVertical(&self, vertical: bool); + #[cfg(not(any(target_os = "ios")))] #[method(trackRect)] pub unsafe fn trackRect(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(knobThickness)] pub unsafe fn knobThickness(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(knobRectFlipped:)] pub unsafe fn knobRectFlipped(&self, flipped: bool) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(barRectFlipped:)] pub unsafe fn barRectFlipped(&self, flipped: bool) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(drawKnob:)] pub unsafe fn drawKnob_(&self, knob_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(drawKnob)] pub unsafe fn drawKnob(&self); + #[cfg(not(any(target_os = "ios")))] #[method(drawBarInside:flipped:)] pub unsafe fn drawBarInside_flipped(&self, rect: NSRect, flipped: bool); } @@ -116,36 +142,47 @@ extern_methods!( /// NSTickMarkSupport #[cfg(feature = "AppKit_NSSliderCell")] unsafe impl NSSliderCell { + #[cfg(not(any(target_os = "ios")))] #[method(numberOfTickMarks)] pub unsafe fn numberOfTickMarks(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setNumberOfTickMarks:)] pub unsafe fn setNumberOfTickMarks(&self, number_of_tick_marks: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(tickMarkPosition)] pub unsafe fn tickMarkPosition(&self) -> NSTickMarkPosition; + #[cfg(not(any(target_os = "ios")))] #[method(setTickMarkPosition:)] pub unsafe fn setTickMarkPosition(&self, tick_mark_position: NSTickMarkPosition); + #[cfg(not(any(target_os = "ios")))] #[method(allowsTickMarkValuesOnly)] pub unsafe fn allowsTickMarkValuesOnly(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsTickMarkValuesOnly:)] pub unsafe fn setAllowsTickMarkValuesOnly(&self, allows_tick_mark_values_only: bool); + #[cfg(not(any(target_os = "ios")))] #[method(tickMarkValueAtIndex:)] pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(rectOfTickMarkAtIndex:)] pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfTickMarkAtPoint:)] pub unsafe fn indexOfTickMarkAtPoint(&self, point: NSPoint) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(closestTickMarkValueToValue:)] pub unsafe fn closestTickMarkValueToValue(&self, value: c_double) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(drawTickMarks)] pub unsafe fn drawTickMarks(&self); } @@ -157,54 +194,65 @@ extern_methods!( unsafe impl NSSliderCell { #[cfg(feature = "AppKit_NSCell")] #[deprecated = "-setTitleCell: had no effect since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleCell:)] pub unsafe fn setTitleCell(&self, cell: Option<&NSCell>); #[deprecated = "-titleCell has returned nil since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleCell)] pub unsafe fn titleCell(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] #[deprecated = "-setTitleColor: had no effect since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleColor:)] pub unsafe fn setTitleColor(&self, new_color: Option<&NSColor>); #[cfg(feature = "AppKit_NSColor")] #[deprecated = "-titleColor has returned nil since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleColor)] pub unsafe fn titleColor(&self) -> Option>; #[cfg(feature = "AppKit_NSFont")] #[deprecated = "-setTitleFont: had no effect since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleFont:)] pub unsafe fn setTitleFont(&self, font_obj: Option<&NSFont>); #[cfg(feature = "AppKit_NSFont")] #[deprecated = "-titleFont has returned nil since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titleFont)] pub unsafe fn titleFont(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated = "-title has returned nil since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated = "-setTitle: had no effect since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, string: Option<&NSString>); #[deprecated = "-knobThickness has returned 0 since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method(setKnobThickness:)] pub unsafe fn setKnobThickness(&self, thickness: CGFloat); #[cfg(feature = "AppKit_NSImage")] #[deprecated = "-setImage: had no effect since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, background_image: Option<&NSImage>); #[cfg(feature = "AppKit_NSImage")] #[deprecated = "-image has returned nil since 10.0"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; } @@ -227,10 +275,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSSliderCell")] unsafe impl NSSliderCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSSliderTouchBarItem.rs b/AppKit/NSSliderTouchBarItem.rs index 7c623204e..abc4d3add 100644 --- a/AppKit/NSSliderTouchBarItem.rs +++ b/AppKit/NSSliderTouchBarItem.rs @@ -35,14 +35,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSSliderTouchBarItem")] unsafe impl NSSliderTouchBarItem { #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Id; #[cfg(feature = "AppKit_NSSlider")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other slider)] pub unsafe fn slider(&self) -> Id; #[cfg(feature = "AppKit_NSSlider")] + #[cfg(not(any(target_os = "ios")))] #[method(setSlider:)] pub unsafe fn setSlider(&self, slider: &NSSlider); diff --git a/AppKit/NSSound.rs b/AppKit/NSSound.rs index ad9296d48..f20f0855c 100644 --- a/AppKit/NSSound.rs +++ b/AppKit/NSSound.rs @@ -14,6 +14,7 @@ pub type NSSoundPlaybackDeviceIdentifier = NSString; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSound")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSound; #[cfg(feature = "AppKit_NSSound")] @@ -40,10 +41,12 @@ unsafe impl NSSecureCoding for NSSound {} extern_methods!( #[cfg(feature = "AppKit_NSSound")] unsafe impl NSSound { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other soundNamed:)] pub unsafe fn soundNamed(name: &NSSoundName) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:byReference:)] pub unsafe fn initWithContentsOfURL_byReference( this: Option>, @@ -52,6 +55,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfFile:byReference:)] pub unsafe fn initWithContentsOfFile_byReference( this: Option>, @@ -60,27 +64,33 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, data: &NSData, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setName:)] pub unsafe fn setName(&self, string: Option<&NSSoundName>) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method(canInitWithPasteboard:)] pub unsafe fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other soundUnfilteredTypes)] pub unsafe fn soundUnfilteredTypes() -> Id>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithPasteboard:)] pub unsafe fn initWithPasteboard( this: Option>, @@ -88,56 +98,73 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method(writeToPasteboard:)] pub unsafe fn writeToPasteboard(&self, pasteboard: &NSPasteboard); + #[cfg(not(any(target_os = "ios")))] #[method(play)] pub unsafe fn play(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(pause)] pub unsafe fn pause(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(resume)] pub unsafe fn resume(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(stop)] pub unsafe fn stop(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isPlaying)] pub unsafe fn isPlaying(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[method(duration)] pub unsafe fn duration(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(volume)] pub unsafe fn volume(&self) -> c_float; + #[cfg(not(any(target_os = "ios")))] #[method(setVolume:)] pub unsafe fn setVolume(&self, volume: c_float); + #[cfg(not(any(target_os = "ios")))] #[method(currentTime)] pub unsafe fn currentTime(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(setCurrentTime:)] pub unsafe fn setCurrentTime(&self, current_time: NSTimeInterval); + #[cfg(not(any(target_os = "ios")))] #[method(loops)] pub unsafe fn loops(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setLoops:)] pub unsafe fn setLoops(&self, loops: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other playbackDeviceIdentifier)] pub unsafe fn playbackDeviceIdentifier( &self, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setPlaybackDeviceIdentifier:)] pub unsafe fn setPlaybackDeviceIdentifier( &self, @@ -146,11 +173,13 @@ extern_methods!( #[cfg(feature = "Foundation_NSArray")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setChannelMapping:)] pub unsafe fn setChannelMapping(&self, channel_mapping: Option<&NSArray>); #[cfg(feature = "Foundation_NSArray")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other channelMapping)] pub unsafe fn channelMapping(&self) -> Option>; } @@ -162,19 +191,23 @@ extern_methods!( unsafe impl NSSound { #[cfg(feature = "Foundation_NSArray")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other soundUnfilteredFileTypes)] pub unsafe fn soundUnfilteredFileTypes() -> Option>; #[cfg(feature = "Foundation_NSArray")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other soundUnfilteredPasteboardTypes)] pub unsafe fn soundUnfilteredPasteboardTypes() -> Option>; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSSoundDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSSound")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(sound:didFinishPlaying:)] unsafe fn sound_didFinishPlaying(&self, sound: &NSSound, flag: bool); @@ -188,6 +221,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSBundle")] unsafe impl NSBundle { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pathForSoundResource:)] pub unsafe fn pathForSoundResource(&self, name: &NSSoundName) -> Option>; } diff --git a/AppKit/NSSpeechRecognizer.rs b/AppKit/NSSpeechRecognizer.rs index 71ed8bafa..8679c8f4c 100644 --- a/AppKit/NSSpeechRecognizer.rs +++ b/AppKit/NSSpeechRecognizer.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSpeechRecognizer")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSpeechRecognizer; #[cfg(feature = "AppKit_NSSpeechRecognizer")] @@ -22,19 +23,24 @@ unsafe impl NSObjectProtocol for NSSpeechRecognizer {} extern_methods!( #[cfg(feature = "AppKit_NSSpeechRecognizer")] unsafe impl NSSpeechRecognizer { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(startListening)] pub unsafe fn startListening(&self); + #[cfg(not(any(target_os = "ios")))] #[method(stopListening)] pub unsafe fn stopListening(&self); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -42,38 +48,48 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other commands)] pub unsafe fn commands(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setCommands:)] pub unsafe fn setCommands(&self, commands: Option<&NSArray>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other displayedCommandsTitle)] pub unsafe fn displayedCommandsTitle(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setDisplayedCommandsTitle:)] pub unsafe fn setDisplayedCommandsTitle(&self, displayed_commands_title: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method(listensInForegroundOnly)] pub unsafe fn listensInForegroundOnly(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setListensInForegroundOnly:)] pub unsafe fn setListensInForegroundOnly(&self, listens_in_foreground_only: bool); + #[cfg(not(any(target_os = "ios")))] #[method(blocksOtherRecognizers)] pub unsafe fn blocksOtherRecognizers(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setBlocksOtherRecognizers:)] pub unsafe fn setBlocksOtherRecognizers(&self, blocks_other_recognizers: bool); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSSpeechRecognizerDelegate: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSSpeechRecognizer", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(speechRecognizer:didRecognizeCommand:)] unsafe fn speechRecognizer_didRecognizeCommand( diff --git a/AppKit/NSSpeechSynthesizer.rs b/AppKit/NSSpeechSynthesizer.rs index 309963ca4..de4a5c9c1 100644 --- a/AppKit/NSSpeechSynthesizer.rs +++ b/AppKit/NSSpeechSynthesizer.rs @@ -97,9 +97,13 @@ extern_static!(NSVoiceLanguage: &'static NSVoiceAttributeKey); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSpeechBoundary { + #[cfg(not(any(target_os = "ios")))] NSSpeechImmediateBoundary = 0, + #[cfg(not(any(target_os = "ios")))] NSSpeechWordBoundary = 1, + #[cfg(not(any(target_os = "ios")))] NSSpeechSentenceBoundary = 2, } ); @@ -107,6 +111,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSpeechSynthesizer")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSpeechSynthesizer; #[cfg(feature = "AppKit_NSSpeechSynthesizer")] @@ -121,6 +126,7 @@ unsafe impl NSObjectProtocol for NSSpeechSynthesizer {} extern_methods!( #[cfg(feature = "AppKit_NSSpeechSynthesizer")] unsafe impl NSSpeechSynthesizer { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithVoice:)] pub unsafe fn initWithVoice( this: Option>, @@ -128,64 +134,82 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(startSpeakingString:)] pub unsafe fn startSpeakingString(&self, string: &NSString) -> bool; #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method(startSpeakingString:toURL:)] pub unsafe fn startSpeakingString_toURL(&self, string: &NSString, url: &NSURL) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isSpeaking)] pub unsafe fn isSpeaking(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(stopSpeaking)] pub unsafe fn stopSpeaking(&self); + #[cfg(not(any(target_os = "ios")))] #[method(stopSpeakingAtBoundary:)] pub unsafe fn stopSpeakingAtBoundary(&self, boundary: NSSpeechBoundary); + #[cfg(not(any(target_os = "ios")))] #[method(pauseSpeakingAtBoundary:)] pub unsafe fn pauseSpeakingAtBoundary(&self, boundary: NSSpeechBoundary); + #[cfg(not(any(target_os = "ios")))] #[method(continueSpeaking)] pub unsafe fn continueSpeaking(&self); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other voice)] pub unsafe fn voice(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setVoice:)] pub unsafe fn setVoice(&self, voice: Option<&NSSpeechSynthesizerVoiceName>) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(rate)] pub unsafe fn rate(&self) -> c_float; + #[cfg(not(any(target_os = "ios")))] #[method(setRate:)] pub unsafe fn setRate(&self, rate: c_float); + #[cfg(not(any(target_os = "ios")))] #[method(volume)] pub unsafe fn volume(&self) -> c_float; + #[cfg(not(any(target_os = "ios")))] #[method(setVolume:)] pub unsafe fn setVolume(&self, volume: c_float); + #[cfg(not(any(target_os = "ios")))] #[method(usesFeedbackWindow)] pub unsafe fn usesFeedbackWindow(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesFeedbackWindow:)] pub unsafe fn setUsesFeedbackWindow(&self, uses_feedback_window: bool); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(addSpeechDictionary:)] pub unsafe fn addSpeechDictionary( &self, @@ -193,10 +217,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other phonemesFromText:)] pub unsafe fn phonemesFromText(&self, text: &NSString) -> Id; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other objectForProperty:error:_)] pub unsafe fn objectForProperty_error( &self, @@ -204,6 +230,7 @@ extern_methods!( ) -> Result, Id>; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(setObject:forProperty:error:_)] pub unsafe fn setObject_forProperty_error( &self, @@ -211,17 +238,21 @@ extern_methods!( property: &NSSpeechPropertyKey, ) -> Result<(), Id>; + #[cfg(not(any(target_os = "ios")))] #[method(isAnyApplicationSpeaking)] pub unsafe fn isAnyApplicationSpeaking() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultVoice)] pub unsafe fn defaultVoice() -> Id; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other availableVoices)] pub unsafe fn availableVoices() -> Id>; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributesForVoice:)] pub unsafe fn attributesForVoice( voice: &NSSpeechSynthesizerVoiceName, @@ -230,8 +261,10 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSSpeechSynthesizerDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSSpeechSynthesizer")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(speechSynthesizer:didFinishSpeaking:)] unsafe fn speechSynthesizer_didFinishSpeaking( @@ -244,6 +277,7 @@ extern_protocol!( feature = "AppKit_NSSpeechSynthesizer", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(speechSynthesizer:willSpeakWord:ofString:)] unsafe fn speechSynthesizer_willSpeakWord_ofString( @@ -254,6 +288,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSSpeechSynthesizer")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(speechSynthesizer:willSpeakPhoneme:)] unsafe fn speechSynthesizer_willSpeakPhoneme( @@ -266,6 +301,7 @@ extern_protocol!( feature = "AppKit_NSSpeechSynthesizer", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(speechSynthesizer:didEncounterErrorAtIndex:ofString:message:)] unsafe fn speechSynthesizer_didEncounterErrorAtIndex_ofString_message( @@ -280,6 +316,7 @@ extern_protocol!( feature = "AppKit_NSSpeechSynthesizer", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(speechSynthesizer:didEncounterSyncMessage:)] unsafe fn speechSynthesizer_didEncounterSyncMessage( diff --git a/AppKit/NSSpellChecker.rs b/AppKit/NSSpellChecker.rs index aa2b8b4c4..a75c18137 100644 --- a/AppKit/NSSpellChecker.rs +++ b/AppKit/NSSpellChecker.rs @@ -31,21 +31,32 @@ extern_static!(NSTextCheckingSelectedRangeKey: &'static NSTextCheckingOptionKey) ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSCorrectionResponse { + #[cfg(not(any(target_os = "ios")))] NSCorrectionResponseNone = 0, + #[cfg(not(any(target_os = "ios")))] NSCorrectionResponseAccepted = 1, + #[cfg(not(any(target_os = "ios")))] NSCorrectionResponseRejected = 2, + #[cfg(not(any(target_os = "ios")))] NSCorrectionResponseIgnored = 3, + #[cfg(not(any(target_os = "ios")))] NSCorrectionResponseEdited = 4, + #[cfg(not(any(target_os = "ios")))] NSCorrectionResponseReverted = 5, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSCorrectionIndicatorType { + #[cfg(not(any(target_os = "ios")))] NSCorrectionIndicatorTypeDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSCorrectionIndicatorTypeReversion = 1, + #[cfg(not(any(target_os = "ios")))] NSCorrectionIndicatorTypeGuesses = 2, } ); @@ -53,6 +64,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSpellChecker")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSpellChecker; #[cfg(feature = "AppKit_NSSpellChecker")] @@ -67,16 +79,20 @@ unsafe impl NSObjectProtocol for NSSpellChecker {} extern_methods!( #[cfg(feature = "AppKit_NSSpellChecker")] unsafe impl NSSpellChecker { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedSpellChecker)] pub unsafe fn sharedSpellChecker() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(sharedSpellCheckerExists)] pub unsafe fn sharedSpellCheckerExists() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(uniqueSpellDocumentTag)] pub unsafe fn uniqueSpellDocumentTag() -> NSInteger; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(checkSpellingOfString:startingAt:language:wrap:inSpellDocumentWithTag:wordCount:)] pub unsafe fn checkSpellingOfString_startingAt_language_wrap_inSpellDocumentWithTag_wordCount( &self, @@ -89,6 +105,7 @@ extern_methods!( ) -> NSRange; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(checkSpellingOfString:startingAt:)] pub unsafe fn checkSpellingOfString_startingAt( &self, @@ -97,6 +114,7 @@ extern_methods!( ) -> NSRange; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(countWordsInString:language:)] pub unsafe fn countWordsInString_language( &self, @@ -109,6 +127,7 @@ extern_methods!( feature = "Foundation_NSDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method(checkGrammarOfString:startingAt:language:wrap:inSpellDocumentWithTag:details:)] pub unsafe fn checkGrammarOfString_startingAt_language_wrap_inSpellDocumentWithTag_details( &self, @@ -127,6 +146,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSTextCheckingResult" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other checkString:range:types:options:inSpellDocumentWithTag:orthography:wordCount:)] pub unsafe fn checkString_range_types_options_inSpellDocumentWithTag_orthography_wordCount( &self, @@ -146,6 +166,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSTextCheckingResult" ))] + #[cfg(not(any(target_os = "ios")))] #[method(requestCheckingOfString:range:types:options:inSpellDocumentWithTag:completionHandler:)] pub unsafe fn requestCheckingOfString_range_types_options_inSpellDocumentWithTag_completionHandler( &self, @@ -173,6 +194,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSTextCheckingResult" ))] + #[cfg(not(any(target_os = "ios")))] #[method(requestCandidatesForSelectedRange:inString:types:options:inSpellDocumentWithTag:completionHandler:)] pub unsafe fn requestCandidatesForSelectedRange_inString_types_options_inSpellDocumentWithTag_completionHandler( &self, @@ -193,6 +215,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSTextCheckingResult" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuForResult:string:options:atLocation:inView:)] pub unsafe fn menuForResult_string_options_atLocation_inView( &self, @@ -204,6 +227,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other userQuotesArrayForLanguage:)] pub unsafe fn userQuotesArrayForLanguage( &self, @@ -211,14 +235,17 @@ extern_methods!( ) -> Id>; #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other userReplacementsDictionary)] pub unsafe fn userReplacementsDictionary(&self) -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(updateSpellingPanelWithMisspelledWord:)] pub unsafe fn updateSpellingPanelWithMisspelledWord(&self, word: &NSString); #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(updateSpellingPanelWithGrammarString:detail:)] pub unsafe fn updateSpellingPanelWithGrammarString_detail( &self, @@ -227,38 +254,46 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSPanel")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other spellingPanel)] pub unsafe fn spellingPanel(&self) -> Id; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessory_view: Option<&NSView>); #[cfg(feature = "AppKit_NSPanel")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other substitutionsPanel)] pub unsafe fn substitutionsPanel(&self) -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other substitutionsPanelAccessoryViewController)] pub unsafe fn substitutionsPanelAccessoryViewController( &self, ) -> Option>; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(setSubstitutionsPanelAccessoryViewController:)] pub unsafe fn setSubstitutionsPanelAccessoryViewController( &self, substitutions_panel_accessory_view_controller: Option<&NSViewController>, ); + #[cfg(not(any(target_os = "ios")))] #[method(updatePanels)] pub unsafe fn updatePanels(&self); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(ignoreWord:inSpellDocumentWithTag:)] pub unsafe fn ignoreWord_inSpellDocumentWithTag( &self, @@ -267,6 +302,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other ignoredWordsInSpellDocumentWithTag:)] pub unsafe fn ignoredWordsInSpellDocumentWithTag( &self, @@ -274,6 +310,7 @@ extern_methods!( ) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setIgnoredWords:inSpellDocumentWithTag:)] pub unsafe fn setIgnoredWords_inSpellDocumentWithTag( &self, @@ -282,6 +319,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other guessesForWordRange:inString:language:inSpellDocumentWithTag:)] pub unsafe fn guessesForWordRange_inString_language_inSpellDocumentWithTag( &self, @@ -292,6 +330,7 @@ extern_methods!( ) -> Option>>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other correctionForWordRange:inString:language:inSpellDocumentWithTag:)] pub unsafe fn correctionForWordRange_inString_language_inSpellDocumentWithTag( &self, @@ -302,6 +341,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other completionsForPartialWordRange:inString:language:inSpellDocumentWithTag:)] pub unsafe fn completionsForPartialWordRange_inString_language_inSpellDocumentWithTag( &self, @@ -312,6 +352,7 @@ extern_methods!( ) -> Option>>; #[cfg(all(feature = "Foundation_NSOrthography", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other languageForWordRange:inString:orthography:)] pub unsafe fn languageForWordRange_inString_orthography( &self, @@ -320,10 +361,12 @@ extern_methods!( orthography: Option<&NSOrthography>, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(closeSpellDocumentWithTag:)] pub unsafe fn closeSpellDocumentWithTag(&self, tag: NSInteger); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(recordResponse:toCorrection:forWord:language:inSpellDocumentWithTag:)] pub unsafe fn recordResponse_toCorrection_forWord_language_inSpellDocumentWithTag( &self, @@ -339,6 +382,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method(showCorrectionIndicatorOfType:primaryString:alternativeStrings:forStringInRect:view:completionHandler:)] pub unsafe fn showCorrectionIndicatorOfType_primaryString_alternativeStrings_forStringInRect_view_completionHandler( &self, @@ -351,10 +395,12 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(dismissCorrectionIndicatorForView:)] pub unsafe fn dismissCorrectionIndicatorForView(&self, view: &NSView); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(preventsAutocorrectionBeforeString:language:)] pub unsafe fn preventsAutocorrectionBeforeString_language( &self, @@ -363,6 +409,7 @@ extern_methods!( ) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(deletesAutospaceBetweenString:andString:language:)] pub unsafe fn deletesAutospaceBetweenString_andString_language( &self, @@ -372,16 +419,20 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other availableLanguages)] pub unsafe fn availableLanguages(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other userPreferredLanguages)] pub unsafe fn userPreferredLanguages(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(automaticallyIdentifiesLanguages)] pub unsafe fn automaticallyIdentifiesLanguages(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticallyIdentifiesLanguages:)] pub unsafe fn setAutomaticallyIdentifiesLanguages( &self, @@ -389,47 +440,60 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setWordFieldStringValue:)] pub unsafe fn setWordFieldStringValue(&self, string: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(learnWord:)] pub unsafe fn learnWord(&self, word: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(hasLearnedWord:)] pub unsafe fn hasLearnedWord(&self, word: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(unlearnWord:)] pub unsafe fn unlearnWord(&self, word: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticTextReplacementEnabled)] pub unsafe fn isAutomaticTextReplacementEnabled() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticSpellingCorrectionEnabled)] pub unsafe fn isAutomaticSpellingCorrectionEnabled() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticQuoteSubstitutionEnabled)] pub unsafe fn isAutomaticQuoteSubstitutionEnabled() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticDashSubstitutionEnabled)] pub unsafe fn isAutomaticDashSubstitutionEnabled() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticCapitalizationEnabled)] pub unsafe fn isAutomaticCapitalizationEnabled() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticPeriodSubstitutionEnabled)] pub unsafe fn isAutomaticPeriodSubstitutionEnabled() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticTextCompletionEnabled)] pub unsafe fn isAutomaticTextCompletionEnabled() -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other language)] pub unsafe fn language(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setLanguage:)] pub unsafe fn setLanguage(&self, language: &NSString) -> bool; } @@ -469,11 +533,13 @@ extern_methods!( unsafe impl NSSpellChecker { #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated = "Use -guessesForWordRange:inString:language:inSpellDocumentWithTag instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other guessesForWord:)] pub unsafe fn guessesForWord(&self, word: Option<&NSString>) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(forgetWord:)] pub unsafe fn forgetWord(&self, word: Option<&NSString>); } diff --git a/AppKit/NSSpellProtocol.rs b/AppKit/NSSpellProtocol.rs index 4d02c8043..d42beec62 100644 --- a/AppKit/NSSpellProtocol.rs +++ b/AppKit/NSSpellProtocol.rs @@ -6,7 +6,9 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSChangeSpelling { + #[cfg(not(any(target_os = "ios")))] #[method(changeSpelling:)] unsafe fn changeSpelling(&self, sender: Option<&Object>); } @@ -15,7 +17,9 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSIgnoreMisspelledWords { + #[cfg(not(any(target_os = "ios")))] #[method(ignoreSpelling:)] unsafe fn ignoreSpelling(&self, sender: Option<&Object>); } diff --git a/AppKit/NSSplitView.rs b/AppKit/NSSplitView.rs index 73ca59252..1fafc1891 100644 --- a/AppKit/NSSplitView.rs +++ b/AppKit/NSSplitView.rs @@ -9,9 +9,13 @@ pub type NSSplitViewAutosaveName = NSString; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSplitViewDividerStyle { + #[cfg(not(any(target_os = "ios")))] NSSplitViewDividerStyleThick = 1, + #[cfg(not(any(target_os = "ios")))] NSSplitViewDividerStyleThin = 2, + #[cfg(not(any(target_os = "ios")))] NSSplitViewDividerStylePaneSplitter = 3, } ); @@ -19,6 +23,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSplitView; #[cfg(feature = "AppKit_NSSplitView")] @@ -55,61 +60,77 @@ unsafe impl NSUserInterfaceItemIdentification for NSSplitView {} extern_methods!( #[cfg(feature = "AppKit_NSSplitView")] unsafe impl NSSplitView { + #[cfg(not(any(target_os = "ios")))] #[method(isVertical)] pub unsafe fn isVertical(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setVertical:)] pub unsafe fn setVertical(&self, vertical: bool); + #[cfg(not(any(target_os = "ios")))] #[method(dividerStyle)] pub unsafe fn dividerStyle(&self) -> NSSplitViewDividerStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setDividerStyle:)] pub unsafe fn setDividerStyle(&self, divider_style: NSSplitViewDividerStyle); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other autosaveName)] pub unsafe fn autosaveName(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAutosaveName:)] pub unsafe fn setAutosaveName(&self, autosave_name: Option<&NSSplitViewAutosaveName>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(drawDividerInRect:)] pub unsafe fn drawDividerInRect(&self, rect: NSRect); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dividerColor)] pub unsafe fn dividerColor(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(dividerThickness)] pub unsafe fn dividerThickness(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(adjustSubviews)] pub unsafe fn adjustSubviews(&self); + #[cfg(not(any(target_os = "ios")))] #[method(isSubviewCollapsed:)] pub unsafe fn isSubviewCollapsed(&self, subview: &NSView) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(minPossiblePositionOfDividerAtIndex:)] pub unsafe fn minPossiblePositionOfDividerAtIndex( &self, divider_index: NSInteger, ) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(maxPossiblePositionOfDividerAtIndex:)] pub unsafe fn maxPossiblePositionOfDividerAtIndex( &self, divider_index: NSInteger, ) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setPosition:ofDividerAtIndex:)] pub unsafe fn setPosition_ofDividerAtIndex( &self, @@ -117,12 +138,14 @@ extern_methods!( divider_index: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(holdingPriorityForSubviewAtIndex:)] pub unsafe fn holdingPriorityForSubviewAtIndex( &self, subview_index: NSInteger, ) -> NSLayoutPriority; + #[cfg(not(any(target_os = "ios")))] #[method(setHoldingPriority:forSubviewAtIndex:)] pub unsafe fn setHoldingPriority_forSubviewAtIndex( &self, @@ -136,33 +159,41 @@ extern_methods!( /// NSSplitViewArrangedSubviews #[cfg(feature = "AppKit_NSSplitView")] unsafe impl NSSplitView { + #[cfg(not(any(target_os = "ios")))] #[method(arrangesAllSubviews)] pub unsafe fn arrangesAllSubviews(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setArrangesAllSubviews:)] pub unsafe fn setArrangesAllSubviews(&self, arranges_all_subviews: bool); #[cfg(all(feature = "AppKit_NSView", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other arrangedSubviews)] pub unsafe fn arrangedSubviews(&self) -> Id>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(addArrangedSubview:)] pub unsafe fn addArrangedSubview(&self, view: &NSView); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(insertArrangedSubview:atIndex:)] pub unsafe fn insertArrangedSubview_atIndex(&self, view: &NSView, index: NSInteger); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(removeArrangedSubview:)] pub unsafe fn removeArrangedSubview(&self, view: &NSView); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSSplitViewDelegate: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSSplitView", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(splitView:canCollapseSubview:)] unsafe fn splitView_canCollapseSubview( @@ -173,6 +204,7 @@ extern_protocol!( #[cfg(all(feature = "AppKit_NSSplitView", feature = "AppKit_NSView"))] #[deprecated = "NSSplitView no longer supports collapsing sections via double-click. This delegate method is never called."] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(splitView:shouldCollapseSubview:forDoubleClickOnDividerAtIndex:)] unsafe fn splitView_shouldCollapseSubview_forDoubleClickOnDividerAtIndex( @@ -183,6 +215,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(splitView:constrainMinCoordinate:ofSubviewAt:)] unsafe fn splitView_constrainMinCoordinate_ofSubviewAt( @@ -193,6 +226,7 @@ extern_protocol!( ) -> CGFloat; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(splitView:constrainMaxCoordinate:ofSubviewAt:)] unsafe fn splitView_constrainMaxCoordinate_ofSubviewAt( @@ -203,6 +237,7 @@ extern_protocol!( ) -> CGFloat; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(splitView:constrainSplitPosition:ofSubviewAt:)] unsafe fn splitView_constrainSplitPosition_ofSubviewAt( @@ -213,6 +248,7 @@ extern_protocol!( ) -> CGFloat; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(splitView:resizeSubviewsWithOldSize:)] unsafe fn splitView_resizeSubviewsWithOldSize( @@ -222,6 +258,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSSplitView", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(splitView:shouldAdjustSizeOfSubview:)] unsafe fn splitView_shouldAdjustSizeOfSubview( @@ -231,6 +268,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(splitView:shouldHideDividerAtIndex:)] unsafe fn splitView_shouldHideDividerAtIndex( @@ -240,6 +278,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(splitView:effectiveRect:forDrawnRect:ofDividerAtIndex:)] unsafe fn splitView_effectiveRect_forDrawnRect_ofDividerAtIndex( @@ -251,6 +290,7 @@ extern_protocol!( ) -> NSRect; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(splitView:additionalEffectiveRectOfDividerAtIndex:)] unsafe fn splitView_additionalEffectiveRectOfDividerAtIndex( @@ -260,11 +300,13 @@ extern_protocol!( ) -> NSRect; #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(splitViewWillResizeSubviews:)] unsafe fn splitViewWillResizeSubviews(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(splitViewDidResizeSubviews:)] unsafe fn splitViewDidResizeSubviews(&self, notification: &NSNotification); @@ -282,10 +324,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSSplitView")] unsafe impl NSSplitView { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setIsPaneSplitter:)] pub unsafe fn setIsPaneSplitter(&self, flag: bool); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(isPaneSplitter)] pub unsafe fn isPaneSplitter(&self) -> bool; } @@ -295,6 +339,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSSplitView")] unsafe impl NSSplitView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSSplitViewController.rs b/AppKit/NSSplitViewController.rs index 84481ec4c..bcc5a486b 100644 --- a/AppKit/NSSplitViewController.rs +++ b/AppKit/NSSplitViewController.rs @@ -10,6 +10,7 @@ extern_static!(NSSplitViewControllerAutomaticDimension: CGFloat); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSplitViewController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSplitViewController; #[cfg(feature = "AppKit_NSSplitViewController")] @@ -44,26 +45,32 @@ extern_methods!( #[cfg(feature = "AppKit_NSSplitViewController")] unsafe impl NSSplitViewController { #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other splitView)] pub unsafe fn splitView(&self) -> Id; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[method(setSplitView:)] pub unsafe fn setSplitView(&self, split_view: &NSSplitView); #[cfg(all(feature = "AppKit_NSSplitViewItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other splitViewItems)] pub unsafe fn splitViewItems(&self) -> Id>; #[cfg(all(feature = "AppKit_NSSplitViewItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setSplitViewItems:)] pub unsafe fn setSplitViewItems(&self, split_view_items: &NSArray); #[cfg(feature = "AppKit_NSSplitViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method(addSplitViewItem:)] pub unsafe fn addSplitViewItem(&self, split_view_item: &NSSplitViewItem); #[cfg(feature = "AppKit_NSSplitViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method(insertSplitViewItem:atIndex:)] pub unsafe fn insertSplitViewItem_atIndex( &self, @@ -72,35 +79,42 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSSplitViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method(removeSplitViewItem:)] pub unsafe fn removeSplitViewItem(&self, split_view_item: &NSSplitViewItem); #[cfg(feature = "AppKit_NSSplitViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other splitViewItemForViewController:)] pub unsafe fn splitViewItemForViewController( &self, view_controller: &NSViewController, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(minimumThicknessForInlineSidebars)] pub unsafe fn minimumThicknessForInlineSidebars(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMinimumThicknessForInlineSidebars:)] pub unsafe fn setMinimumThicknessForInlineSidebars( &self, minimum_thickness_for_inline_sidebars: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(validateUserInterfaceItem:)] pub unsafe fn validateUserInterfaceItem( &self, item: &ProtocolObject, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(viewDidLoad)] pub unsafe fn viewDidLoad(&self); #[cfg(all(feature = "AppKit_NSSplitView", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(splitView:canCollapseSubview:)] pub unsafe fn splitView_canCollapseSubview( &self, @@ -110,6 +124,7 @@ extern_methods!( #[cfg(all(feature = "AppKit_NSSplitView", feature = "AppKit_NSView"))] #[deprecated = "NSSplitView no longer supports collapsing sections via double-click. This delegate method is never called, and NSSplitViewController's implementation always returns NO."] + #[cfg(not(any(target_os = "ios")))] #[method(splitView:shouldCollapseSubview:forDoubleClickOnDividerAtIndex:)] pub unsafe fn splitView_shouldCollapseSubview_forDoubleClickOnDividerAtIndex( &self, @@ -119,6 +134,7 @@ extern_methods!( ) -> bool; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[method(splitView:shouldHideDividerAtIndex:)] pub unsafe fn splitView_shouldHideDividerAtIndex( &self, @@ -127,6 +143,7 @@ extern_methods!( ) -> bool; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[method(splitView:effectiveRect:forDrawnRect:ofDividerAtIndex:)] pub unsafe fn splitView_effectiveRect_forDrawnRect_ofDividerAtIndex( &self, @@ -137,6 +154,7 @@ extern_methods!( ) -> NSRect; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[method(splitView:additionalEffectiveRectOfDividerAtIndex:)] pub unsafe fn splitView_additionalEffectiveRectOfDividerAtIndex( &self, @@ -150,6 +168,7 @@ extern_methods!( /// NSSplitViewControllerToggleSidebarAction #[cfg(feature = "AppKit_NSSplitViewController")] unsafe impl NSSplitViewController { + #[cfg(not(any(target_os = "ios")))] #[method(toggleSidebar:)] pub unsafe fn toggleSidebar(&self, sender: Option<&Object>); } @@ -160,6 +179,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSSplitViewController")] unsafe impl NSSplitViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/AppKit/NSSplitViewItem.rs b/AppKit/NSSplitViewItem.rs index f46e127c8..1aaf41422 100644 --- a/AppKit/NSSplitViewItem.rs +++ b/AppKit/NSSplitViewItem.rs @@ -7,19 +7,28 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSplitViewItemBehavior { + #[cfg(not(any(target_os = "ios")))] NSSplitViewItemBehaviorDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSSplitViewItemBehaviorSidebar = 1, + #[cfg(not(any(target_os = "ios")))] NSSplitViewItemBehaviorContentList = 2, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSplitViewItemCollapseBehavior { + #[cfg(not(any(target_os = "ios")))] NSSplitViewItemCollapseBehaviorDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSSplitViewItemCollapseBehaviorPreferResizingSplitViewWithFixedSiblings = 1, + #[cfg(not(any(target_os = "ios")))] NSSplitViewItemCollapseBehaviorPreferResizingSiblingsWithFixedSplitView = 2, + #[cfg(not(any(target_os = "ios")))] NSSplitViewItemCollapseBehaviorUseConstraints = 3, } ); @@ -29,6 +38,7 @@ extern_static!(NSSplitViewItemUnspecifiedDimension: CGFloat); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSplitViewItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSplitViewItem; #[cfg(feature = "AppKit_NSSplitViewItem")] @@ -50,97 +60,125 @@ extern_methods!( #[cfg(feature = "AppKit_NSSplitViewItem")] unsafe impl NSSplitViewItem { #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other splitViewItemWithViewController:)] pub unsafe fn splitViewItemWithViewController( view_controller: &NSViewController, ) -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sidebarWithViewController:)] pub unsafe fn sidebarWithViewController(view_controller: &NSViewController) -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentListWithViewController:)] pub unsafe fn contentListWithViewController(view_controller: &NSViewController) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(behavior)] pub unsafe fn behavior(&self) -> NSSplitViewItemBehavior; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other viewController)] pub unsafe fn viewController(&self) -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(setViewController:)] pub unsafe fn setViewController(&self, view_controller: &NSViewController); + #[cfg(not(any(target_os = "ios")))] #[method(isCollapsed)] pub unsafe fn isCollapsed(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCollapsed:)] pub unsafe fn setCollapsed(&self, collapsed: bool); + #[cfg(not(any(target_os = "ios")))] #[method(canCollapse)] pub unsafe fn canCollapse(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanCollapse:)] pub unsafe fn setCanCollapse(&self, can_collapse: bool); + #[cfg(not(any(target_os = "ios")))] #[method(collapseBehavior)] pub unsafe fn collapseBehavior(&self) -> NSSplitViewItemCollapseBehavior; + #[cfg(not(any(target_os = "ios")))] #[method(setCollapseBehavior:)] pub unsafe fn setCollapseBehavior( &self, collapse_behavior: NSSplitViewItemCollapseBehavior, ); + #[cfg(not(any(target_os = "ios")))] #[method(minimumThickness)] pub unsafe fn minimumThickness(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMinimumThickness:)] pub unsafe fn setMinimumThickness(&self, minimum_thickness: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(maximumThickness)] pub unsafe fn maximumThickness(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMaximumThickness:)] pub unsafe fn setMaximumThickness(&self, maximum_thickness: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(preferredThicknessFraction)] pub unsafe fn preferredThicknessFraction(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setPreferredThicknessFraction:)] pub unsafe fn setPreferredThicknessFraction(&self, preferred_thickness_fraction: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(holdingPriority)] pub unsafe fn holdingPriority(&self) -> NSLayoutPriority; + #[cfg(not(any(target_os = "ios")))] #[method(setHoldingPriority:)] pub unsafe fn setHoldingPriority(&self, holding_priority: NSLayoutPriority); + #[cfg(not(any(target_os = "ios")))] #[method(automaticMaximumThickness)] pub unsafe fn automaticMaximumThickness(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticMaximumThickness:)] pub unsafe fn setAutomaticMaximumThickness(&self, automatic_maximum_thickness: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(isSpringLoaded)] pub unsafe fn isSpringLoaded(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSpringLoaded:)] pub unsafe fn setSpringLoaded(&self, spring_loaded: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsFullHeightLayout)] pub unsafe fn allowsFullHeightLayout(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsFullHeightLayout:)] pub unsafe fn setAllowsFullHeightLayout(&self, allows_full_height_layout: bool); + #[cfg(not(any(target_os = "ios")))] #[method(titlebarSeparatorStyle)] pub unsafe fn titlebarSeparatorStyle(&self) -> NSTitlebarSeparatorStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setTitlebarSeparatorStyle:)] pub unsafe fn setTitlebarSeparatorStyle( &self, diff --git a/AppKit/NSStackView.rs b/AppKit/NSStackView.rs index ee4803e39..242c95957 100644 --- a/AppKit/NSStackView.rs +++ b/AppKit/NSStackView.rs @@ -7,23 +7,36 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSStackViewGravity { + #[cfg(not(any(target_os = "ios")))] NSStackViewGravityTop = 1, + #[cfg(not(any(target_os = "ios")))] NSStackViewGravityLeading = 1, + #[cfg(not(any(target_os = "ios")))] NSStackViewGravityCenter = 2, + #[cfg(not(any(target_os = "ios")))] NSStackViewGravityBottom = 3, + #[cfg(not(any(target_os = "ios")))] NSStackViewGravityTrailing = 3, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSStackViewDistribution { + #[cfg(not(any(target_os = "ios")))] NSStackViewDistributionGravityAreas = -1, + #[cfg(not(any(target_os = "ios")))] NSStackViewDistributionFill = 0, + #[cfg(not(any(target_os = "ios")))] NSStackViewDistributionFillEqually = 1, + #[cfg(not(any(target_os = "ios")))] NSStackViewDistributionFillProportionally = 2, + #[cfg(not(any(target_os = "ios")))] NSStackViewDistributionEqualSpacing = 3, + #[cfg(not(any(target_os = "ios")))] NSStackViewDistributionEqualCentering = 4, } ); @@ -43,6 +56,7 @@ extern_static!(NSStackViewVisibilityPriorityNotVisible: NSStackViewVisibilityPri extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSStackView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSStackView; #[cfg(feature = "AppKit_NSStackView")] @@ -80,77 +94,100 @@ extern_methods!( #[cfg(feature = "AppKit_NSStackView")] unsafe impl NSStackView { #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other stackViewWithViews:)] pub unsafe fn stackViewWithViews(views: &NSArray) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(orientation)] pub unsafe fn orientation(&self) -> NSUserInterfaceLayoutOrientation; + #[cfg(not(any(target_os = "ios")))] #[method(setOrientation:)] pub unsafe fn setOrientation(&self, orientation: NSUserInterfaceLayoutOrientation); + #[cfg(not(any(target_os = "ios")))] #[method(alignment)] pub unsafe fn alignment(&self) -> NSLayoutAttribute; + #[cfg(not(any(target_os = "ios")))] #[method(setAlignment:)] pub unsafe fn setAlignment(&self, alignment: NSLayoutAttribute); + #[cfg(not(any(target_os = "ios")))] #[method(edgeInsets)] pub unsafe fn edgeInsets(&self) -> NSEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(setEdgeInsets:)] pub unsafe fn setEdgeInsets(&self, edge_insets: NSEdgeInsets); + #[cfg(not(any(target_os = "ios")))] #[method(distribution)] pub unsafe fn distribution(&self) -> NSStackViewDistribution; + #[cfg(not(any(target_os = "ios")))] #[method(setDistribution:)] pub unsafe fn setDistribution(&self, distribution: NSStackViewDistribution); + #[cfg(not(any(target_os = "ios")))] #[method(spacing)] pub unsafe fn spacing(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setSpacing:)] pub unsafe fn setSpacing(&self, spacing: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(setCustomSpacing:afterView:)] pub unsafe fn setCustomSpacing_afterView(&self, spacing: CGFloat, view: &NSView); + #[cfg(not(any(target_os = "ios")))] #[method(customSpacingAfterView:)] pub unsafe fn customSpacingAfterView(&self, view: &NSView) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(detachesHiddenViews)] pub unsafe fn detachesHiddenViews(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDetachesHiddenViews:)] pub unsafe fn setDetachesHiddenViews(&self, detaches_hidden_views: bool); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other arrangedSubviews)] pub unsafe fn arrangedSubviews(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(addArrangedSubview:)] pub unsafe fn addArrangedSubview(&self, view: &NSView); + #[cfg(not(any(target_os = "ios")))] #[method(insertArrangedSubview:atIndex:)] pub unsafe fn insertArrangedSubview_atIndex(&self, view: &NSView, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(removeArrangedSubview:)] pub unsafe fn removeArrangedSubview(&self, view: &NSView); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other detachedViews)] pub unsafe fn detachedViews(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(setVisibilityPriority:forView:)] pub unsafe fn setVisibilityPriority_forView( &self, @@ -158,18 +195,21 @@ extern_methods!( view: &NSView, ); + #[cfg(not(any(target_os = "ios")))] #[method(visibilityPriorityForView:)] pub unsafe fn visibilityPriorityForView( &self, view: &NSView, ) -> NSStackViewVisibilityPriority; + #[cfg(not(any(target_os = "ios")))] #[method(clippingResistancePriorityForOrientation:)] pub unsafe fn clippingResistancePriorityForOrientation( &self, orientation: NSLayoutConstraintOrientation, ) -> NSLayoutPriority; + #[cfg(not(any(target_os = "ios")))] #[method(setClippingResistancePriority:forOrientation:)] pub unsafe fn setClippingResistancePriority_forOrientation( &self, @@ -177,12 +217,14 @@ extern_methods!( orientation: NSLayoutConstraintOrientation, ); + #[cfg(not(any(target_os = "ios")))] #[method(huggingPriorityForOrientation:)] pub unsafe fn huggingPriorityForOrientation( &self, orientation: NSLayoutConstraintOrientation, ) -> NSLayoutPriority; + #[cfg(not(any(target_os = "ios")))] #[method(setHuggingPriority:forOrientation:)] pub unsafe fn setHuggingPriority_forOrientation( &self, @@ -193,12 +235,14 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSStackViewDelegate: NSObjectProtocol { #[cfg(all( feature = "AppKit_NSStackView", feature = "AppKit_NSView", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(stackView:willDetachViews:)] unsafe fn stackView_willDetachViews( @@ -212,6 +256,7 @@ extern_protocol!( feature = "AppKit_NSView", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(stackView:didReattachViews:)] unsafe fn stackView_didReattachViews( @@ -229,10 +274,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSStackView")] unsafe impl NSStackView { #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(addView:inGravity:)] pub unsafe fn addView_inGravity(&self, view: &NSView, gravity: NSStackViewGravity); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(insertView:atIndex:inGravity:)] pub unsafe fn insertView_atIndex_inGravity( &self, @@ -242,14 +289,17 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(removeView:)] pub unsafe fn removeView(&self, view: &NSView); #[cfg(all(feature = "AppKit_NSView", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other viewsInGravity:)] pub unsafe fn viewsInGravity(&self, gravity: NSStackViewGravity) -> Id>; #[cfg(all(feature = "AppKit_NSView", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setViews:inGravity:)] pub unsafe fn setViews_inGravity( &self, @@ -258,6 +308,7 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSView", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other views)] pub unsafe fn views(&self) -> Id>; } @@ -268,10 +319,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSStackView")] unsafe impl NSStackView { #[deprecated = "Set -distribution to NSStackViewDistributionEqualSpacing instead."] + #[cfg(not(any(target_os = "ios")))] #[method(hasEqualSpacing)] pub unsafe fn hasEqualSpacing(&self) -> bool; #[deprecated = "Set -distribution to NSStackViewDistributionEqualSpacing instead."] + #[cfg(not(any(target_os = "ios")))] #[method(setHasEqualSpacing:)] pub unsafe fn setHasEqualSpacing(&self, has_equal_spacing: bool); } @@ -281,6 +334,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSStackView")] unsafe impl NSStackView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSStatusBar.rs b/AppKit/NSStatusBar.rs index d8809ec61..8697a6810 100644 --- a/AppKit/NSStatusBar.rs +++ b/AppKit/NSStatusBar.rs @@ -12,6 +12,7 @@ extern_static!(NSSquareStatusItemLength: CGFloat = -2.0); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSStatusBar")] + #[cfg(not(any(target_os = "ios")))] pub struct NSStatusBar; #[cfg(feature = "AppKit_NSStatusBar")] @@ -26,20 +27,25 @@ unsafe impl NSObjectProtocol for NSStatusBar {} extern_methods!( #[cfg(feature = "AppKit_NSStatusBar")] unsafe impl NSStatusBar { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other systemStatusBar)] pub unsafe fn systemStatusBar() -> Id; #[cfg(feature = "AppKit_NSStatusItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other statusItemWithLength:)] pub unsafe fn statusItemWithLength(&self, length: CGFloat) -> Id; #[cfg(feature = "AppKit_NSStatusItem")] + #[cfg(not(any(target_os = "ios")))] #[method(removeStatusItem:)] pub unsafe fn removeStatusItem(&self, item: &NSStatusItem); + #[cfg(not(any(target_os = "ios")))] #[method(isVertical)] pub unsafe fn isVertical(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(thickness)] pub unsafe fn thickness(&self) -> CGFloat; } diff --git a/AppKit/NSStatusBarButton.rs b/AppKit/NSStatusBarButton.rs index b25bedd0f..c01393369 100644 --- a/AppKit/NSStatusBarButton.rs +++ b/AppKit/NSStatusBarButton.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSStatusBarButton")] + #[cfg(not(any(target_os = "ios")))] pub struct NSStatusBarButton; #[cfg(feature = "AppKit_NSStatusBarButton")] @@ -53,9 +54,11 @@ unsafe impl NSUserInterfaceValidations for NSStatusBarButton {} extern_methods!( #[cfg(feature = "AppKit_NSStatusBarButton")] unsafe impl NSStatusBarButton { + #[cfg(not(any(target_os = "ios")))] #[method(appearsDisabled)] pub unsafe fn appearsDisabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAppearsDisabled:)] pub unsafe fn setAppearsDisabled(&self, appears_disabled: bool); } @@ -66,6 +69,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSStatusBarButton")] unsafe impl NSStatusBarButton { #[cfg(all(feature = "AppKit_NSImage", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonWithTitle:image:target:action:)] pub unsafe fn buttonWithTitle_image_target_action( title: &NSString, @@ -75,6 +79,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonWithTitle:target:action:)] pub unsafe fn buttonWithTitle_target_action( title: &NSString, @@ -83,6 +88,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other buttonWithImage:target:action:)] pub unsafe fn buttonWithImage_target_action( image: &NSImage, @@ -91,6 +97,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other checkboxWithTitle:target:action:)] pub unsafe fn checkboxWithTitle_target_action( title: &NSString, @@ -99,6 +106,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other radioButtonWithTitle:target:action:)] pub unsafe fn radioButtonWithTitle_target_action( title: &NSString, @@ -112,6 +120,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSStatusBarButton")] unsafe impl NSStatusBarButton { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSStatusItem.rs b/AppKit/NSStatusItem.rs index 0e7019cc6..0f38b5a5f 100644 --- a/AppKit/NSStatusItem.rs +++ b/AppKit/NSStatusItem.rs @@ -9,8 +9,11 @@ pub type NSStatusItemAutosaveName = NSString; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSStatusItemBehavior { + #[cfg(not(any(target_os = "ios")))] NSStatusItemBehaviorRemovalAllowed = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSStatusItemBehaviorTerminationOnRemoval = 1 << 2, } ); @@ -18,6 +21,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSStatusItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSStatusItem; #[cfg(feature = "AppKit_NSStatusItem")] @@ -33,42 +37,54 @@ extern_methods!( #[cfg(feature = "AppKit_NSStatusItem")] unsafe impl NSStatusItem { #[cfg(feature = "AppKit_NSStatusBar")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other statusBar)] pub unsafe fn statusBar(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(length)] pub unsafe fn length(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setLength:)] pub unsafe fn setLength(&self, length: CGFloat); #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); #[cfg(feature = "AppKit_NSStatusBarButton")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other button)] pub unsafe fn button(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(behavior)] pub unsafe fn behavior(&self) -> NSStatusItemBehavior; + #[cfg(not(any(target_os = "ios")))] #[method(setBehavior:)] pub unsafe fn setBehavior(&self, behavior: NSStatusItemBehavior); + #[cfg(not(any(target_os = "ios")))] #[method(isVisible)] pub unsafe fn isVisible(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setVisible:)] pub unsafe fn setVisible(&self, visible: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other autosaveName)] pub unsafe fn autosaveName(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setAutosaveName:)] pub unsafe fn setAutosaveName(&self, autosave_name: Option<&NSStatusItemAutosaveName>); } @@ -79,110 +95,134 @@ extern_methods!( #[cfg(feature = "AppKit_NSStatusItem")] unsafe impl NSStatusItem { #[deprecated = "Use the receiver's button.action instead"] + #[cfg(not(any(target_os = "ios")))] #[method(action)] pub unsafe fn action(&self) -> Option; #[deprecated = "Use the receiver's button.action instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); #[deprecated = "Use the receiver's button.doubleAction instead"] + #[cfg(not(any(target_os = "ios")))] #[method(doubleAction)] pub unsafe fn doubleAction(&self) -> Option; #[deprecated = "Use the receiver's button.doubleAction instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, double_action: Option); #[deprecated = "Use the receiver's button.target instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[deprecated = "Use the receiver's button.target instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use the receiver's button.title instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use the receiver's button.title instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); #[cfg(feature = "Foundation_NSAttributedString")] #[deprecated = "Use the receiver's button.attributedTitle instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Option>; #[cfg(feature = "Foundation_NSAttributedString")] #[deprecated = "Use the receiver's button.attributedTitle instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributed_title: Option<&NSAttributedString>); #[cfg(feature = "AppKit_NSImage")] #[deprecated = "Use the receiver's button.image instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] #[deprecated = "Use the receiver's button.image instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); #[cfg(feature = "AppKit_NSImage")] #[deprecated = "Use the receiver's button.alternateImage instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] #[deprecated = "Use the receiver's button.alternateImage instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setAlternateImage:)] pub unsafe fn setAlternateImage(&self, alternate_image: Option<&NSImage>); #[deprecated = "Use the receiver's button.enabled instead"] + #[cfg(not(any(target_os = "ios")))] #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; #[deprecated = "Use the receiver's button.enabled instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); #[deprecated = "Use the receiver's button.cell.highlightsBy instead"] + #[cfg(not(any(target_os = "ios")))] #[method(highlightMode)] pub unsafe fn highlightMode(&self) -> bool; #[deprecated = "Use the receiver's button.cell.highlightsBy instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setHighlightMode:)] pub unsafe fn setHighlightMode(&self, highlight_mode: bool); #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use the receiver's button.toolTip instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolTip)] pub unsafe fn toolTip(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use the receiver's button.toolTip instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setToolTip:)] pub unsafe fn setToolTip(&self, tool_tip: Option<&NSString>); #[deprecated = "Use the receiver's button's -sendActionOn: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(sendActionOn:)] pub unsafe fn sendActionOn(&self, mask: NSEventMask) -> NSInteger; #[cfg(feature = "AppKit_NSView")] #[deprecated = "Use the standard button property instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] #[deprecated = "Use the standard button property instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); #[deprecated = "Use the standard button instead which handles highlight drawing, making this method obsolete"] + #[cfg(not(any(target_os = "ios")))] #[method(drawStatusBarBackgroundInRect:withHighlight:)] pub unsafe fn drawStatusBarBackgroundInRect_withHighlight( &self, @@ -192,6 +232,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSMenu")] #[deprecated = "Use the menu property instead"] + #[cfg(not(any(target_os = "ios")))] #[method(popUpStatusItemMenu:)] pub unsafe fn popUpStatusItemMenu(&self, menu: &NSMenu); } diff --git a/AppKit/NSStepper.rs b/AppKit/NSStepper.rs index 85ab08022..0d9a811be 100644 --- a/AppKit/NSStepper.rs +++ b/AppKit/NSStepper.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSStepper")] + #[cfg(not(any(target_os = "ios")))] pub struct NSStepper; #[cfg(feature = "AppKit_NSStepper")] @@ -47,33 +48,43 @@ unsafe impl NSUserInterfaceItemIdentification for NSStepper {} extern_methods!( #[cfg(feature = "AppKit_NSStepper")] unsafe impl NSStepper { + #[cfg(not(any(target_os = "ios")))] #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMinValue:)] pub unsafe fn setMinValue(&self, min_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, max_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(increment)] pub unsafe fn increment(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setIncrement:)] pub unsafe fn setIncrement(&self, increment: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(valueWraps)] pub unsafe fn valueWraps(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setValueWraps:)] pub unsafe fn setValueWraps(&self, value_wraps: bool); + #[cfg(not(any(target_os = "ios")))] #[method(autorepeat)] pub unsafe fn autorepeat(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutorepeat:)] pub unsafe fn setAutorepeat(&self, autorepeat: bool); } @@ -83,6 +94,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSStepper")] unsafe impl NSStepper { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSStepperCell.rs b/AppKit/NSStepperCell.rs index 3ea04f867..79110366f 100644 --- a/AppKit/NSStepperCell.rs +++ b/AppKit/NSStepperCell.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSStepperCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSStepperCell; #[cfg(feature = "AppKit_NSStepperCell")] @@ -35,33 +36,43 @@ unsafe impl NSUserInterfaceItemIdentification for NSStepperCell {} extern_methods!( #[cfg(feature = "AppKit_NSStepperCell")] unsafe impl NSStepperCell { + #[cfg(not(any(target_os = "ios")))] #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMinValue:)] pub unsafe fn setMinValue(&self, min_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, max_value: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(increment)] pub unsafe fn increment(&self) -> c_double; + #[cfg(not(any(target_os = "ios")))] #[method(setIncrement:)] pub unsafe fn setIncrement(&self, increment: c_double); + #[cfg(not(any(target_os = "ios")))] #[method(valueWraps)] pub unsafe fn valueWraps(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setValueWraps:)] pub unsafe fn setValueWraps(&self, value_wraps: bool); + #[cfg(not(any(target_os = "ios")))] #[method(autorepeat)] pub unsafe fn autorepeat(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutorepeat:)] pub unsafe fn setAutorepeat(&self, autorepeat: bool); } @@ -72,10 +83,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSStepperCell")] unsafe impl NSStepperCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSStoryboard.rs b/AppKit/NSStoryboard.rs index 6b21e430d..09fd75739 100644 --- a/AppKit/NSStoryboard.rs +++ b/AppKit/NSStoryboard.rs @@ -14,6 +14,7 @@ pub type NSStoryboardControllerCreator = *mut Block<(NonNull,), *mut Ob extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSStoryboard")] + #[cfg(not(any(target_os = "ios")))] pub struct NSStoryboard; #[cfg(feature = "AppKit_NSStoryboard")] @@ -28,31 +29,37 @@ unsafe impl NSObjectProtocol for NSStoryboard {} extern_methods!( #[cfg(feature = "AppKit_NSStoryboard")] unsafe impl NSStoryboard { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mainStoryboard)] pub unsafe fn mainStoryboard() -> Option>; #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other storyboardWithName:bundle:)] pub unsafe fn storyboardWithName_bundle( name: &NSStoryboardName, storyboard_bundle_or_nil: Option<&NSBundle>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other instantiateInitialController)] pub unsafe fn instantiateInitialController(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other instantiateInitialControllerWithCreator:)] pub unsafe fn instantiateInitialControllerWithCreator( &self, block: NSStoryboardControllerCreator, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other instantiateControllerWithIdentifier:)] pub unsafe fn instantiateControllerWithIdentifier( &self, identifier: &NSStoryboardSceneIdentifier, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other instantiateControllerWithIdentifier:creator:)] pub unsafe fn instantiateControllerWithIdentifier_creator( &self, diff --git a/AppKit/NSStoryboardSegue.rs b/AppKit/NSStoryboardSegue.rs index 437af7d08..b97254a5e 100644 --- a/AppKit/NSStoryboardSegue.rs +++ b/AppKit/NSStoryboardSegue.rs @@ -10,6 +10,7 @@ pub type NSStoryboardSegueIdentifier = NSString; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSStoryboardSegue")] + #[cfg(not(any(target_os = "ios")))] pub struct NSStoryboardSegue; #[cfg(feature = "AppKit_NSStoryboardSegue")] @@ -24,6 +25,7 @@ unsafe impl NSObjectProtocol for NSStoryboardSegue {} extern_methods!( #[cfg(feature = "AppKit_NSStoryboardSegue")] unsafe impl NSStoryboardSegue { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other segueWithIdentifier:source:destination:performHandler:)] pub unsafe fn segueWithIdentifier_source_destination_performHandler( identifier: &NSStoryboardSegueIdentifier, @@ -32,6 +34,7 @@ extern_methods!( perform_handler: &Block<(), ()>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithIdentifier:source:destination:)] pub unsafe fn initWithIdentifier_source_destination( this: Option>, @@ -40,27 +43,34 @@ extern_methods!( destination_controller: &Object, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sourceController)] pub unsafe fn sourceController(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other destinationController)] pub unsafe fn destinationController(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(perform)] pub unsafe fn perform(&self); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSSeguePerforming: NSObjectProtocol { #[cfg(feature = "AppKit_NSStoryboardSegue")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(prepareForSegue:sender:)] unsafe fn prepareForSegue_sender(&self, segue: &NSStoryboardSegue, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(performSegueWithIdentifier:sender:)] unsafe fn performSegueWithIdentifier_sender( @@ -69,6 +79,7 @@ extern_protocol!( sender: Option<&Object>, ); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(shouldPerformSegueWithIdentifier:sender:)] unsafe fn shouldPerformSegueWithIdentifier_sender( diff --git a/AppKit/NSSwitch.rs b/AppKit/NSSwitch.rs index 7b0a54acd..49fbd1506 100644 --- a/AppKit/NSSwitch.rs +++ b/AppKit/NSSwitch.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSSwitch")] + #[cfg(not(any(target_os = "ios")))] pub struct NSSwitch; #[cfg(feature = "AppKit_NSSwitch")] @@ -50,9 +51,11 @@ unsafe impl NSUserInterfaceItemIdentification for NSSwitch {} extern_methods!( #[cfg(feature = "AppKit_NSSwitch")] unsafe impl NSSwitch { + #[cfg(not(any(target_os = "ios")))] #[method(state)] pub unsafe fn state(&self) -> NSControlStateValue; + #[cfg(not(any(target_os = "ios")))] #[method(setState:)] pub unsafe fn setState(&self, state: NSControlStateValue); } @@ -62,6 +65,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSSwitch")] unsafe impl NSSwitch { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSTabView.rs b/AppKit/NSTabView.rs index 9589baae9..c7fb53b63 100644 --- a/AppKit/NSTabView.rs +++ b/AppKit/NSTabView.rs @@ -9,33 +9,51 @@ extern_static!(NSAppKitVersionNumberWithDirectionalTabs: NSAppKitVersion = 631.0 ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTabViewType { + #[cfg(not(any(target_os = "ios")))] NSTopTabsBezelBorder = 0, + #[cfg(not(any(target_os = "ios")))] NSLeftTabsBezelBorder = 1, + #[cfg(not(any(target_os = "ios")))] NSBottomTabsBezelBorder = 2, + #[cfg(not(any(target_os = "ios")))] NSRightTabsBezelBorder = 3, + #[cfg(not(any(target_os = "ios")))] NSNoTabsBezelBorder = 4, + #[cfg(not(any(target_os = "ios")))] NSNoTabsLineBorder = 5, + #[cfg(not(any(target_os = "ios")))] NSNoTabsNoBorder = 6, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTabPosition { + #[cfg(not(any(target_os = "ios")))] NSTabPositionNone = 0, + #[cfg(not(any(target_os = "ios")))] NSTabPositionTop = 1, + #[cfg(not(any(target_os = "ios")))] NSTabPositionLeft = 2, + #[cfg(not(any(target_os = "ios")))] NSTabPositionBottom = 3, + #[cfg(not(any(target_os = "ios")))] NSTabPositionRight = 4, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTabViewBorderType { + #[cfg(not(any(target_os = "ios")))] NSTabViewBorderTypeNone = 0, + #[cfg(not(any(target_os = "ios")))] NSTabViewBorderTypeLine = 1, + #[cfg(not(any(target_os = "ios")))] NSTabViewBorderTypeBezel = 2, } ); @@ -43,6 +61,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTabView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTabView; #[cfg(feature = "AppKit_NSTabView")] @@ -80,94 +99,122 @@ extern_methods!( #[cfg(feature = "AppKit_NSTabView")] unsafe impl NSTabView { #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method(selectTabViewItem:)] pub unsafe fn selectTabViewItem(&self, tab_view_item: Option<&NSTabViewItem>); + #[cfg(not(any(target_os = "ios")))] #[method(selectTabViewItemAtIndex:)] pub unsafe fn selectTabViewItemAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(selectTabViewItemWithIdentifier:)] pub unsafe fn selectTabViewItemWithIdentifier(&self, identifier: &Object); + #[cfg(not(any(target_os = "ios")))] #[method(takeSelectedTabViewItemFromSender:)] pub unsafe fn takeSelectedTabViewItemFromSender(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(selectFirstTabViewItem:)] pub unsafe fn selectFirstTabViewItem(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(selectLastTabViewItem:)] pub unsafe fn selectLastTabViewItem(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(selectNextTabViewItem:)] pub unsafe fn selectNextTabViewItem(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(selectPreviousTabViewItem:)] pub unsafe fn selectPreviousTabViewItem(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedTabViewItem)] pub unsafe fn selectedTabViewItem(&self) -> Option>; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other font)] pub unsafe fn font(&self) -> Id; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(setFont:)] pub unsafe fn setFont(&self, font: &NSFont); + #[cfg(not(any(target_os = "ios")))] #[method(tabViewType)] pub unsafe fn tabViewType(&self) -> NSTabViewType; + #[cfg(not(any(target_os = "ios")))] #[method(setTabViewType:)] pub unsafe fn setTabViewType(&self, tab_view_type: NSTabViewType); + #[cfg(not(any(target_os = "ios")))] #[method(tabPosition)] pub unsafe fn tabPosition(&self) -> NSTabPosition; + #[cfg(not(any(target_os = "ios")))] #[method(setTabPosition:)] pub unsafe fn setTabPosition(&self, tab_position: NSTabPosition); + #[cfg(not(any(target_os = "ios")))] #[method(tabViewBorderType)] pub unsafe fn tabViewBorderType(&self) -> NSTabViewBorderType; + #[cfg(not(any(target_os = "ios")))] #[method(setTabViewBorderType:)] pub unsafe fn setTabViewBorderType(&self, tab_view_border_type: NSTabViewBorderType); #[cfg(all(feature = "AppKit_NSTabViewItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tabViewItems)] pub unsafe fn tabViewItems(&self) -> Id>; #[cfg(all(feature = "AppKit_NSTabViewItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setTabViewItems:)] pub unsafe fn setTabViewItems(&self, tab_view_items: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(allowsTruncatedLabels)] pub unsafe fn allowsTruncatedLabels(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsTruncatedLabels:)] pub unsafe fn setAllowsTruncatedLabels(&self, allows_truncated_labels: bool); + #[cfg(not(any(target_os = "ios")))] #[method(minimumSize)] pub unsafe fn minimumSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, draws_background: bool); + #[cfg(not(any(target_os = "ios")))] #[method(controlSize)] pub unsafe fn controlSize(&self) -> NSControlSize; + #[cfg(not(any(target_os = "ios")))] #[method(setControlSize:)] pub unsafe fn setControlSize(&self, control_size: NSControlSize); #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method(addTabViewItem:)] pub unsafe fn addTabViewItem(&self, tab_view_item: &NSTabViewItem); #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method(insertTabViewItem:atIndex:)] pub unsafe fn insertTabViewItem_atIndex( &self, @@ -176,49 +223,62 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method(removeTabViewItem:)] pub unsafe fn removeTabViewItem(&self, tab_view_item: &NSTabViewItem); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tabViewItemAtPoint:)] pub unsafe fn tabViewItemAtPoint(&self, point: NSPoint) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(contentRect)] pub unsafe fn contentRect(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfTabViewItems)] pub unsafe fn numberOfTabViewItems(&self) -> NSInteger; #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method(indexOfTabViewItem:)] pub unsafe fn indexOfTabViewItem(&self, tab_view_item: &NSTabViewItem) -> NSInteger; #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tabViewItemAtIndex:)] pub unsafe fn tabViewItemAtIndex(&self, index: NSInteger) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(indexOfTabViewItemWithIdentifier:)] pub unsafe fn indexOfTabViewItemWithIdentifier(&self, identifier: &Object) -> NSInteger; #[deprecated = "The controlTint property is not respected on 10.14 and later."] + #[cfg(not(any(target_os = "ios")))] #[method(controlTint)] pub unsafe fn controlTint(&self) -> NSControlTint; #[deprecated = "The controlTint property is not respected on 10.14 and later."] + #[cfg(not(any(target_os = "ios")))] #[method(setControlTint:)] pub unsafe fn setControlTint(&self, control_tint: NSControlTint); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTabViewDelegate: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSTabView", feature = "AppKit_NSTabViewItem"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tabView:shouldSelectTabViewItem:)] unsafe fn tabView_shouldSelectTabViewItem( @@ -228,6 +288,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSTabView", feature = "AppKit_NSTabViewItem"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tabView:willSelectTabViewItem:)] unsafe fn tabView_willSelectTabViewItem( @@ -237,6 +298,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSTabView", feature = "AppKit_NSTabViewItem"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tabView:didSelectTabViewItem:)] unsafe fn tabView_didSelectTabViewItem( @@ -246,6 +308,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSTabView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tabViewDidChangeNumberOfTabViewItems:)] unsafe fn tabViewDidChangeNumberOfTabViewItems(&self, tab_view: &NSTabView); @@ -258,6 +321,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSTabView")] unsafe impl NSTabView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSTabViewController.rs b/AppKit/NSTabViewController.rs index f43f9e3af..416381ee2 100644 --- a/AppKit/NSTabViewController.rs +++ b/AppKit/NSTabViewController.rs @@ -7,10 +7,15 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTabViewControllerTabStyle { + #[cfg(not(any(target_os = "ios")))] NSTabViewControllerTabStyleSegmentedControlOnTop = 0, + #[cfg(not(any(target_os = "ios")))] NSTabViewControllerTabStyleSegmentedControlOnBottom = 1, + #[cfg(not(any(target_os = "ios")))] NSTabViewControllerTabStyleToolbar = 2, + #[cfg(not(any(target_os = "ios")))] NSTabViewControllerTabStyleUnspecified = -1, } ); @@ -18,6 +23,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTabViewController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTabViewController; #[cfg(feature = "AppKit_NSTabViewController")] @@ -51,32 +57,40 @@ unsafe impl NSUserInterfaceItemIdentification for NSTabViewController {} extern_methods!( #[cfg(feature = "AppKit_NSTabViewController")] unsafe impl NSTabViewController { + #[cfg(not(any(target_os = "ios")))] #[method(tabStyle)] pub unsafe fn tabStyle(&self) -> NSTabViewControllerTabStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setTabStyle:)] pub unsafe fn setTabStyle(&self, tab_style: NSTabViewControllerTabStyle); #[cfg(feature = "AppKit_NSTabView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tabView)] pub unsafe fn tabView(&self) -> Id; #[cfg(feature = "AppKit_NSTabView")] + #[cfg(not(any(target_os = "ios")))] #[method(setTabView:)] pub unsafe fn setTabView(&self, tab_view: &NSTabView); + #[cfg(not(any(target_os = "ios")))] #[method(transitionOptions)] pub unsafe fn transitionOptions(&self) -> NSViewControllerTransitionOptions; + #[cfg(not(any(target_os = "ios")))] #[method(setTransitionOptions:)] pub unsafe fn setTransitionOptions( &self, transition_options: NSViewControllerTransitionOptions, ); + #[cfg(not(any(target_os = "ios")))] #[method(canPropagateSelectedChildViewControllerTitle)] pub unsafe fn canPropagateSelectedChildViewControllerTitle(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanPropagateSelectedChildViewControllerTitle:)] pub unsafe fn setCanPropagateSelectedChildViewControllerTitle( &self, @@ -84,24 +98,30 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSTabViewItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tabViewItems)] pub unsafe fn tabViewItems(&self) -> Id>; #[cfg(all(feature = "AppKit_NSTabViewItem", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setTabViewItems:)] pub unsafe fn setTabViewItems(&self, tab_view_items: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(selectedTabViewItemIndex)] pub unsafe fn selectedTabViewItemIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedTabViewItemIndex:)] pub unsafe fn setSelectedTabViewItemIndex(&self, selected_tab_view_item_index: NSInteger); #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method(addTabViewItem:)] pub unsafe fn addTabViewItem(&self, tab_view_item: &NSTabViewItem); #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method(insertTabViewItem:atIndex:)] pub unsafe fn insertTabViewItem_atIndex( &self, @@ -110,20 +130,24 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method(removeTabViewItem:)] pub unsafe fn removeTabViewItem(&self, tab_view_item: &NSTabViewItem); #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tabViewItemForViewController:)] pub unsafe fn tabViewItemForViewController( &self, view_controller: &NSViewController, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(viewDidLoad)] pub unsafe fn viewDidLoad(&self); #[cfg(all(feature = "AppKit_NSTabView", feature = "AppKit_NSTabViewItem"))] + #[cfg(not(any(target_os = "ios")))] #[method(tabView:willSelectTabViewItem:)] pub unsafe fn tabView_willSelectTabViewItem( &self, @@ -132,6 +156,7 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSTabView", feature = "AppKit_NSTabViewItem"))] + #[cfg(not(any(target_os = "ios")))] #[method(tabView:didSelectTabViewItem:)] pub unsafe fn tabView_didSelectTabViewItem( &self, @@ -140,6 +165,7 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSTabView", feature = "AppKit_NSTabViewItem"))] + #[cfg(not(any(target_os = "ios")))] #[method(tabView:shouldSelectTabViewItem:)] pub unsafe fn tabView_shouldSelectTabViewItem( &self, @@ -148,6 +174,7 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "AppKit_NSToolbar", feature = "AppKit_NSToolbarItem"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:)] pub unsafe fn toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar( &self, @@ -157,6 +184,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "AppKit_NSToolbar", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolbarDefaultItemIdentifiers:)] pub unsafe fn toolbarDefaultItemIdentifiers( &self, @@ -164,6 +192,7 @@ extern_methods!( ) -> Id>; #[cfg(all(feature = "AppKit_NSToolbar", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolbarAllowedItemIdentifiers:)] pub unsafe fn toolbarAllowedItemIdentifiers( &self, @@ -171,6 +200,7 @@ extern_methods!( ) -> Id>; #[cfg(all(feature = "AppKit_NSToolbar", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolbarSelectableItemIdentifiers:)] pub unsafe fn toolbarSelectableItemIdentifiers( &self, @@ -184,6 +214,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSTabViewController")] unsafe impl NSTabViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/AppKit/NSTabViewItem.rs b/AppKit/NSTabViewItem.rs index e6017f9d1..e41f00429 100644 --- a/AppKit/NSTabViewItem.rs +++ b/AppKit/NSTabViewItem.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTabState { + #[cfg(not(any(target_os = "ios")))] NSSelectedTab = 0, + #[cfg(not(any(target_os = "ios")))] NSBackgroundTab = 1, + #[cfg(not(any(target_os = "ios")))] NSPressedTab = 2, } ); @@ -17,6 +21,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTabViewItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTabViewItem; #[cfg(feature = "AppKit_NSTabViewItem")] @@ -35,88 +40,110 @@ extern_methods!( #[cfg(feature = "AppKit_NSTabViewItem")] unsafe impl NSTabViewItem { #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tabViewItemWithViewController:)] pub unsafe fn tabViewItemWithViewController(view_controller: &NSViewController) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithIdentifier:)] pub unsafe fn initWithIdentifier( this: Option>, identifier: Option<&Object>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: Option<&Object>); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other color)] pub unsafe fn color(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setColor:)] pub unsafe fn setColor(&self, color: &NSColor); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other label)] pub unsafe fn label(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setLabel:)] pub unsafe fn setLabel(&self, label: &NSString); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other viewController)] pub unsafe fn viewController(&self) -> Option>; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(setViewController:)] pub unsafe fn setViewController(&self, view_controller: Option<&NSViewController>); + #[cfg(not(any(target_os = "ios")))] #[method(tabState)] pub unsafe fn tabState(&self) -> NSTabState; #[cfg(feature = "AppKit_NSTabView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tabView)] pub unsafe fn tabView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other initialFirstResponder)] pub unsafe fn initialFirstResponder(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setInitialFirstResponder:)] pub unsafe fn setInitialFirstResponder(&self, initial_first_responder: Option<&NSView>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolTip)] pub unsafe fn toolTip(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setToolTip:)] pub unsafe fn setToolTip(&self, tool_tip: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method(drawLabel:inRect:)] pub unsafe fn drawLabel_inRect(&self, should_truncate_label: bool, label_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(sizeOfLabel:)] pub unsafe fn sizeOfLabel(&self, compute_min: bool) -> NSSize; } diff --git a/AppKit/NSTableCellView.rs b/AppKit/NSTableCellView.rs index e28aa0b9b..1fda9b047 100644 --- a/AppKit/NSTableCellView.rs +++ b/AppKit/NSTableCellView.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTableCellView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTableCellView; #[cfg(feature = "AppKit_NSTableCellView")] @@ -44,37 +45,47 @@ unsafe impl NSUserInterfaceItemIdentification for NSTableCellView {} extern_methods!( #[cfg(feature = "AppKit_NSTableCellView")] unsafe impl NSTableCellView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other objectValue)] pub unsafe fn objectValue(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, object_value: Option<&Object>); #[cfg(feature = "AppKit_NSTextField")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textField)] pub unsafe fn textField(&self) -> Option>; #[cfg(feature = "AppKit_NSTextField")] + #[cfg(not(any(target_os = "ios")))] #[method(setTextField:)] pub unsafe fn setTextField(&self, text_field: Option<&NSTextField>); #[cfg(feature = "AppKit_NSImageView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other imageView)] pub unsafe fn imageView(&self) -> Option>; #[cfg(feature = "AppKit_NSImageView")] + #[cfg(not(any(target_os = "ios")))] #[method(setImageView:)] pub unsafe fn setImageView(&self, image_view: Option<&NSImageView>); + #[cfg(not(any(target_os = "ios")))] #[method(backgroundStyle)] pub unsafe fn backgroundStyle(&self) -> NSBackgroundStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundStyle:)] pub unsafe fn setBackgroundStyle(&self, background_style: NSBackgroundStyle); + #[cfg(not(any(target_os = "ios")))] #[method(rowSizeStyle)] pub unsafe fn rowSizeStyle(&self) -> NSTableViewRowSizeStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setRowSizeStyle:)] pub unsafe fn setRowSizeStyle(&self, row_size_style: NSTableViewRowSizeStyle); @@ -82,6 +93,7 @@ extern_methods!( feature = "AppKit_NSDraggingImageComponent", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other draggingImageComponents)] pub unsafe fn draggingImageComponents(&self) -> Id>; } @@ -91,6 +103,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSTableCellView")] unsafe impl NSTableCellView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSTableColumn.rs b/AppKit/NSTableColumn.rs index 6ebd96586..79c75fca4 100644 --- a/AppKit/NSTableColumn.rs +++ b/AppKit/NSTableColumn.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTableColumnResizingOptions { + #[cfg(not(any(target_os = "ios")))] NSTableColumnNoResizing = 0, + #[cfg(not(any(target_os = "ios")))] NSTableColumnAutoresizingMask = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSTableColumnUserResizingMask = 1 << 1, } ); @@ -17,6 +21,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTableColumn")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTableColumn; #[cfg(feature = "AppKit_NSTableColumn")] @@ -37,6 +42,7 @@ unsafe impl NSUserInterfaceItemIdentification for NSTableColumn {} extern_methods!( #[cfg(feature = "AppKit_NSTableColumn")] unsafe impl NSTableColumn { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithIdentifier:)] pub unsafe fn initWithIdentifier( this: Option>, @@ -44,94 +50,120 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: &NSUserInterfaceItemIdentifier); #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tableView)] pub unsafe fn tableView(&self) -> Option>; #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[method(setTableView:)] pub unsafe fn setTableView(&self, table_view: Option<&NSTableView>); + #[cfg(not(any(target_os = "ios")))] #[method(width)] pub unsafe fn width(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setWidth:)] pub unsafe fn setWidth(&self, width: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(minWidth)] pub unsafe fn minWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMinWidth:)] pub unsafe fn setMinWidth(&self, min_width: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(maxWidth)] pub unsafe fn maxWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxWidth:)] pub unsafe fn setMaxWidth(&self, max_width: CGFloat); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); #[cfg(feature = "AppKit_NSTableHeaderCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other headerCell)] pub unsafe fn headerCell(&self) -> Id; #[cfg(feature = "AppKit_NSTableHeaderCell")] + #[cfg(not(any(target_os = "ios")))] #[method(setHeaderCell:)] pub unsafe fn setHeaderCell(&self, header_cell: &NSTableHeaderCell); + #[cfg(not(any(target_os = "ios")))] #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); #[cfg(feature = "Foundation_NSSortDescriptor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sortDescriptorPrototype)] pub unsafe fn sortDescriptorPrototype(&self) -> Option>; #[cfg(feature = "Foundation_NSSortDescriptor")] + #[cfg(not(any(target_os = "ios")))] #[method(setSortDescriptorPrototype:)] pub unsafe fn setSortDescriptorPrototype( &self, sort_descriptor_prototype: Option<&NSSortDescriptor>, ); + #[cfg(not(any(target_os = "ios")))] #[method(resizingMask)] pub unsafe fn resizingMask(&self) -> NSTableColumnResizingOptions; + #[cfg(not(any(target_os = "ios")))] #[method(setResizingMask:)] pub unsafe fn setResizingMask(&self, resizing_mask: NSTableColumnResizingOptions); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other headerToolTip)] pub unsafe fn headerToolTip(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setHeaderToolTip:)] pub unsafe fn setHeaderToolTip(&self, header_tool_tip: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); } @@ -142,19 +174,24 @@ extern_methods!( #[cfg(feature = "AppKit_NSTableColumn")] unsafe impl NSTableColumn { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setResizable:)] pub unsafe fn setResizable(&self, flag: bool); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(isResizable)] pub unsafe fn isResizable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataCell)] pub unsafe fn dataCell(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setDataCell:)] pub unsafe fn setDataCell(&self, data_cell: &Object); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataCellForRow:)] pub unsafe fn dataCellForRow(&self, row: NSInteger) -> Id; } diff --git a/AppKit/NSTableHeaderCell.rs b/AppKit/NSTableHeaderCell.rs index de3d29175..2a7d21fa2 100644 --- a/AppKit/NSTableHeaderCell.rs +++ b/AppKit/NSTableHeaderCell.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTableHeaderCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTableHeaderCell; #[cfg(feature = "AppKit_NSTableHeaderCell")] @@ -36,6 +37,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSTableHeaderCell")] unsafe impl NSTableHeaderCell { #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawSortIndicatorWithFrame:inView:ascending:priority:)] pub unsafe fn drawSortIndicatorWithFrame_inView_ascending_priority( &self, @@ -45,6 +47,7 @@ extern_methods!( priority: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(sortIndicatorRectForBounds:)] pub unsafe fn sortIndicatorRectForBounds(&self, rect: NSRect) -> NSRect; } @@ -55,10 +58,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSTableHeaderCell")] unsafe impl NSTableHeaderCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSTableHeaderView.rs b/AppKit/NSTableHeaderView.rs index 7631c1475..fa68913ba 100644 --- a/AppKit/NSTableHeaderView.rs +++ b/AppKit/NSTableHeaderView.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTableHeaderView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTableHeaderView; #[cfg(feature = "AppKit_NSTableHeaderView")] @@ -48,25 +49,32 @@ extern_methods!( #[cfg(feature = "AppKit_NSTableHeaderView")] unsafe impl NSTableHeaderView { #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tableView)] pub unsafe fn tableView(&self) -> Option>; #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[method(setTableView:)] pub unsafe fn setTableView(&self, table_view: Option<&NSTableView>); + #[cfg(not(any(target_os = "ios")))] #[method(draggedColumn)] pub unsafe fn draggedColumn(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(draggedDistance)] pub unsafe fn draggedDistance(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(resizedColumn)] pub unsafe fn resizedColumn(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(headerRectOfColumn:)] pub unsafe fn headerRectOfColumn(&self, column: NSInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(columnAtPoint:)] pub unsafe fn columnAtPoint(&self, point: NSPoint) -> NSInteger; } @@ -76,6 +84,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSTableHeaderView")] unsafe impl NSTableHeaderView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSTableRowView.rs b/AppKit/NSTableRowView.rs index 2a239b9f9..28353704c 100644 --- a/AppKit/NSTableRowView.rs +++ b/AppKit/NSTableRowView.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTableRowView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTableRowView; #[cfg(feature = "AppKit_NSTableRowView")] @@ -50,103 +51,132 @@ unsafe impl NSUserInterfaceItemIdentification for NSTableRowView {} extern_methods!( #[cfg(feature = "AppKit_NSTableRowView")] unsafe impl NSTableRowView { + #[cfg(not(any(target_os = "ios")))] #[method(selectionHighlightStyle)] pub unsafe fn selectionHighlightStyle(&self) -> NSTableViewSelectionHighlightStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionHighlightStyle:)] pub unsafe fn setSelectionHighlightStyle( &self, selection_highlight_style: NSTableViewSelectionHighlightStyle, ); + #[cfg(not(any(target_os = "ios")))] #[method(isEmphasized)] pub unsafe fn isEmphasized(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEmphasized:)] pub unsafe fn setEmphasized(&self, emphasized: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isGroupRowStyle)] pub unsafe fn isGroupRowStyle(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setGroupRowStyle:)] pub unsafe fn setGroupRowStyle(&self, group_row_style: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isSelected)] pub unsafe fn isSelected(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSelected:)] pub unsafe fn setSelected(&self, selected: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isPreviousRowSelected)] pub unsafe fn isPreviousRowSelected(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPreviousRowSelected:)] pub unsafe fn setPreviousRowSelected(&self, previous_row_selected: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isNextRowSelected)] pub unsafe fn isNextRowSelected(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setNextRowSelected:)] pub unsafe fn setNextRowSelected(&self, next_row_selected: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isFloating)] pub unsafe fn isFloating(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setFloating:)] pub unsafe fn setFloating(&self, floating: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isTargetForDropOperation)] pub unsafe fn isTargetForDropOperation(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setTargetForDropOperation:)] pub unsafe fn setTargetForDropOperation(&self, target_for_drop_operation: bool); + #[cfg(not(any(target_os = "ios")))] #[method(draggingDestinationFeedbackStyle)] pub unsafe fn draggingDestinationFeedbackStyle( &self, ) -> NSTableViewDraggingDestinationFeedbackStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setDraggingDestinationFeedbackStyle:)] pub unsafe fn setDraggingDestinationFeedbackStyle( &self, dragging_destination_feedback_style: NSTableViewDraggingDestinationFeedbackStyle, ); + #[cfg(not(any(target_os = "ios")))] #[method(indentationForDropOperation)] pub unsafe fn indentationForDropOperation(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setIndentationForDropOperation:)] pub unsafe fn setIndentationForDropOperation( &self, indentation_for_drop_operation: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(interiorBackgroundStyle)] pub unsafe fn interiorBackgroundStyle(&self) -> NSBackgroundStyle; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: &NSColor); + #[cfg(not(any(target_os = "ios")))] #[method(drawBackgroundInRect:)] pub unsafe fn drawBackgroundInRect(&self, dirty_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(drawSelectionInRect:)] pub unsafe fn drawSelectionInRect(&self, dirty_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(drawSeparatorInRect:)] pub unsafe fn drawSeparatorInRect(&self, dirty_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(drawDraggingDestinationFeedbackInRect:)] pub unsafe fn drawDraggingDestinationFeedbackInRect(&self, dirty_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other viewAtColumn:)] pub unsafe fn viewAtColumn(&self, column: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfColumns)] pub unsafe fn numberOfColumns(&self) -> NSInteger; } @@ -156,6 +186,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSTableRowView")] unsafe impl NSTableRowView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSTableView.rs b/AppKit/NSTableView.rs index 445274763..dfe85a323 100644 --- a/AppKit/NSTableView.rs +++ b/AppKit/NSTableView.rs @@ -7,80 +7,119 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTableViewDropOperation { + #[cfg(not(any(target_os = "ios")))] NSTableViewDropOn = 0, + #[cfg(not(any(target_os = "ios")))] NSTableViewDropAbove = 1, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTableViewColumnAutoresizingStyle { + #[cfg(not(any(target_os = "ios")))] NSTableViewNoColumnAutoresizing = 0, + #[cfg(not(any(target_os = "ios")))] NSTableViewUniformColumnAutoresizingStyle = 1, + #[cfg(not(any(target_os = "ios")))] NSTableViewSequentialColumnAutoresizingStyle = 2, + #[cfg(not(any(target_os = "ios")))] NSTableViewReverseSequentialColumnAutoresizingStyle = 3, + #[cfg(not(any(target_os = "ios")))] NSTableViewLastColumnOnlyAutoresizingStyle = 4, + #[cfg(not(any(target_os = "ios")))] NSTableViewFirstColumnOnlyAutoresizingStyle = 5, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTableViewGridLineStyle { + #[cfg(not(any(target_os = "ios")))] NSTableViewGridNone = 0, + #[cfg(not(any(target_os = "ios")))] NSTableViewSolidVerticalGridLineMask = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSTableViewSolidHorizontalGridLineMask = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSTableViewDashedHorizontalGridLineMask = 1 << 3, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTableViewRowSizeStyle { + #[cfg(not(any(target_os = "ios")))] NSTableViewRowSizeStyleDefault = -1, + #[cfg(not(any(target_os = "ios")))] NSTableViewRowSizeStyleCustom = 0, + #[cfg(not(any(target_os = "ios")))] NSTableViewRowSizeStyleSmall = 1, + #[cfg(not(any(target_os = "ios")))] NSTableViewRowSizeStyleMedium = 2, + #[cfg(not(any(target_os = "ios")))] NSTableViewRowSizeStyleLarge = 3, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTableViewStyle { + #[cfg(not(any(target_os = "ios")))] NSTableViewStyleAutomatic = 0, + #[cfg(not(any(target_os = "ios")))] NSTableViewStyleFullWidth = 1, + #[cfg(not(any(target_os = "ios")))] NSTableViewStyleInset = 2, + #[cfg(not(any(target_os = "ios")))] NSTableViewStyleSourceList = 3, + #[cfg(not(any(target_os = "ios")))] NSTableViewStylePlain = 4, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTableViewSelectionHighlightStyle { + #[cfg(not(any(target_os = "ios")))] NSTableViewSelectionHighlightStyleNone = -1, + #[cfg(not(any(target_os = "ios")))] NSTableViewSelectionHighlightStyleRegular = 0, #[deprecated = "Set the NSTableView.style property to NSTableViewStyleSourceList instead."] + #[cfg(not(any(target_os = "ios")))] NSTableViewSelectionHighlightStyleSourceList = 1, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTableViewDraggingDestinationFeedbackStyle { + #[cfg(not(any(target_os = "ios")))] NSTableViewDraggingDestinationFeedbackStyleNone = -1, + #[cfg(not(any(target_os = "ios")))] NSTableViewDraggingDestinationFeedbackStyleRegular = 0, + #[cfg(not(any(target_os = "ios")))] NSTableViewDraggingDestinationFeedbackStyleSourceList = 1, + #[cfg(not(any(target_os = "ios")))] NSTableViewDraggingDestinationFeedbackStyleGap = 2, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTableRowActionEdge { + #[cfg(not(any(target_os = "ios")))] NSTableRowActionEdgeLeading = 0, + #[cfg(not(any(target_os = "ios")))] NSTableRowActionEdgeTrailing = 1, } ); @@ -89,13 +128,21 @@ pub type NSTableViewAutosaveName = NSString; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTableViewAnimationOptions { + #[cfg(not(any(target_os = "ios")))] NSTableViewAnimationEffectNone = 0x0, + #[cfg(not(any(target_os = "ios")))] NSTableViewAnimationEffectFade = 0x1, + #[cfg(not(any(target_os = "ios")))] NSTableViewAnimationEffectGap = 0x2, + #[cfg(not(any(target_os = "ios")))] NSTableViewAnimationSlideUp = 0x10, + #[cfg(not(any(target_os = "ios")))] NSTableViewAnimationSlideDown = 0x20, + #[cfg(not(any(target_os = "ios")))] NSTableViewAnimationSlideLeft = 0x30, + #[cfg(not(any(target_os = "ios")))] NSTableViewAnimationSlideRight = 0x40, } ); @@ -103,6 +150,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTableView; #[cfg(feature = "AppKit_NSTableView")] @@ -157,28 +205,34 @@ unsafe impl NSUserInterfaceValidations for NSTableView {} extern_methods!( #[cfg(feature = "AppKit_NSTableView")] unsafe impl NSTableView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataSource)] pub unsafe fn dataSource(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDataSource:)] pub unsafe fn setDataSource( &self, data_source: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -186,55 +240,71 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSTableHeaderView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other headerView)] pub unsafe fn headerView(&self) -> Option>; #[cfg(feature = "AppKit_NSTableHeaderView")] + #[cfg(not(any(target_os = "ios")))] #[method(setHeaderView:)] pub unsafe fn setHeaderView(&self, header_view: Option<&NSTableHeaderView>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cornerView)] pub unsafe fn cornerView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setCornerView:)] pub unsafe fn setCornerView(&self, corner_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(allowsColumnReordering)] pub unsafe fn allowsColumnReordering(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsColumnReordering:)] pub unsafe fn setAllowsColumnReordering(&self, allows_column_reordering: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsColumnResizing)] pub unsafe fn allowsColumnResizing(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsColumnResizing:)] pub unsafe fn setAllowsColumnResizing(&self, allows_column_resizing: bool); + #[cfg(not(any(target_os = "ios")))] #[method(columnAutoresizingStyle)] pub unsafe fn columnAutoresizingStyle(&self) -> NSTableViewColumnAutoresizingStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setColumnAutoresizingStyle:)] pub unsafe fn setColumnAutoresizingStyle( &self, column_autoresizing_style: NSTableViewColumnAutoresizingStyle, ); + #[cfg(not(any(target_os = "ios")))] #[method(gridStyleMask)] pub unsafe fn gridStyleMask(&self) -> NSTableViewGridLineStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setGridStyleMask:)] pub unsafe fn setGridStyleMask(&self, grid_style_mask: NSTableViewGridLineStyle); + #[cfg(not(any(target_os = "ios")))] #[method(intercellSpacing)] pub unsafe fn intercellSpacing(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setIntercellSpacing:)] pub unsafe fn setIntercellSpacing(&self, intercell_spacing: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(usesAlternatingRowBackgroundColors)] pub unsafe fn usesAlternatingRowBackgroundColors(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesAlternatingRowBackgroundColors:)] pub unsafe fn setUsesAlternatingRowBackgroundColors( &self, @@ -242,61 +312,78 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: &NSColor); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other gridColor)] pub unsafe fn gridColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setGridColor:)] pub unsafe fn setGridColor(&self, grid_color: &NSColor); + #[cfg(not(any(target_os = "ios")))] #[method(rowSizeStyle)] pub unsafe fn rowSizeStyle(&self) -> NSTableViewRowSizeStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setRowSizeStyle:)] pub unsafe fn setRowSizeStyle(&self, row_size_style: NSTableViewRowSizeStyle); + #[cfg(not(any(target_os = "ios")))] #[method(effectiveRowSizeStyle)] pub unsafe fn effectiveRowSizeStyle(&self) -> NSTableViewRowSizeStyle; + #[cfg(not(any(target_os = "ios")))] #[method(rowHeight)] pub unsafe fn rowHeight(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setRowHeight:)] pub unsafe fn setRowHeight(&self, row_height: CGFloat); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(noteHeightOfRowsWithIndexesChanged:)] pub unsafe fn noteHeightOfRowsWithIndexesChanged(&self, index_set: &NSIndexSet); #[cfg(all(feature = "AppKit_NSTableColumn", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tableColumns)] pub unsafe fn tableColumns(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfColumns)] pub unsafe fn numberOfColumns(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfRows)] pub unsafe fn numberOfRows(&self) -> NSInteger; #[cfg(feature = "AppKit_NSTableColumn")] + #[cfg(not(any(target_os = "ios")))] #[method(addTableColumn:)] pub unsafe fn addTableColumn(&self, table_column: &NSTableColumn); #[cfg(feature = "AppKit_NSTableColumn")] + #[cfg(not(any(target_os = "ios")))] #[method(removeTableColumn:)] pub unsafe fn removeTableColumn(&self, table_column: &NSTableColumn); + #[cfg(not(any(target_os = "ios")))] #[method(moveColumn:toColumn:)] pub unsafe fn moveColumn_toColumn(&self, old_index: NSInteger, new_index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(columnWithIdentifier:)] pub unsafe fn columnWithIdentifier( &self, @@ -304,34 +391,43 @@ extern_methods!( ) -> NSInteger; #[cfg(feature = "AppKit_NSTableColumn")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tableColumnWithIdentifier:)] pub unsafe fn tableColumnWithIdentifier( &self, identifier: &NSUserInterfaceItemIdentifier, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(tile)] pub unsafe fn tile(&self); + #[cfg(not(any(target_os = "ios")))] #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); + #[cfg(not(any(target_os = "ios")))] #[method(sizeLastColumnToFit)] pub unsafe fn sizeLastColumnToFit(&self); + #[cfg(not(any(target_os = "ios")))] #[method(scrollRowToVisible:)] pub unsafe fn scrollRowToVisible(&self, row: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(scrollColumnToVisible:)] pub unsafe fn scrollColumnToVisible(&self, column: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(reloadData)] pub unsafe fn reloadData(&self); + #[cfg(not(any(target_os = "ios")))] #[method(noteNumberOfRowsChanged)] pub unsafe fn noteNumberOfRowsChanged(&self); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(reloadDataForRowIndexes:columnIndexes:)] pub unsafe fn reloadDataForRowIndexes_columnIndexes( &self, @@ -339,21 +435,27 @@ extern_methods!( column_indexes: &NSIndexSet, ); + #[cfg(not(any(target_os = "ios")))] #[method(editedColumn)] pub unsafe fn editedColumn(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(editedRow)] pub unsafe fn editedRow(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(clickedColumn)] pub unsafe fn clickedColumn(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(clickedRow)] pub unsafe fn clickedRow(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(doubleAction)] pub unsafe fn doubleAction(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, double_action: Option); @@ -361,6 +463,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSSortDescriptor" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id>; @@ -368,10 +471,12 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSSortDescriptor" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setSortDescriptors:)] pub unsafe fn setSortDescriptors(&self, sort_descriptors: &NSArray); #[cfg(all(feature = "AppKit_NSImage", feature = "AppKit_NSTableColumn"))] + #[cfg(not(any(target_os = "ios")))] #[method(setIndicatorImage:inTableColumn:)] pub unsafe fn setIndicatorImage_inTableColumn( &self, @@ -380,6 +485,7 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSImage", feature = "AppKit_NSTableColumn"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indicatorImageInTableColumn:)] pub unsafe fn indicatorImageInTableColumn( &self, @@ -387,23 +493,28 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSTableColumn")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other highlightedTableColumn)] pub unsafe fn highlightedTableColumn(&self) -> Option>; #[cfg(feature = "AppKit_NSTableColumn")] + #[cfg(not(any(target_os = "ios")))] #[method(setHighlightedTableColumn:)] pub unsafe fn setHighlightedTableColumn( &self, highlighted_table_column: Option<&NSTableColumn>, ); + #[cfg(not(any(target_os = "ios")))] #[method(verticalMotionCanBeginDrag)] pub unsafe fn verticalMotionCanBeginDrag(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setVerticalMotionCanBeginDrag:)] pub unsafe fn setVerticalMotionCanBeginDrag(&self, vertical_motion_can_begin_drag: bool); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(canDragRowsWithIndexes:atPoint:)] pub unsafe fn canDragRowsWithIndexes_atPoint( &self, @@ -418,6 +529,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSIndexSet" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dragImageForRowsWithIndexes:tableColumns:event:offset:)] pub unsafe fn dragImageForRowsWithIndexes_tableColumns_event_offset( &self, @@ -427,6 +539,7 @@ extern_methods!( drag_image_offset: NSPointPointer, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setDraggingSourceOperationMask:forLocal:)] pub unsafe fn setDraggingSourceOperationMask_forLocal( &self, @@ -434,6 +547,7 @@ extern_methods!( is_local: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(setDropRow:dropOperation:)] pub unsafe fn setDropRow_dropOperation( &self, @@ -441,31 +555,40 @@ extern_methods!( drop_operation: NSTableViewDropOperation, ); + #[cfg(not(any(target_os = "ios")))] #[method(allowsMultipleSelection)] pub unsafe fn allowsMultipleSelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsMultipleSelection:)] pub unsafe fn setAllowsMultipleSelection(&self, allows_multiple_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsEmptySelection)] pub unsafe fn allowsEmptySelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsEmptySelection:)] pub unsafe fn setAllowsEmptySelection(&self, allows_empty_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsColumnSelection)] pub unsafe fn allowsColumnSelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsColumnSelection:)] pub unsafe fn setAllowsColumnSelection(&self, allows_column_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(selectAll:)] pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(deselectAll:)] pub unsafe fn deselectAll(&self, sender: Option<&Object>); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(selectColumnIndexes:byExtendingSelection:)] pub unsafe fn selectColumnIndexes_byExtendingSelection( &self, @@ -474,6 +597,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(selectRowIndexes:byExtendingSelection:)] pub unsafe fn selectRowIndexes_byExtendingSelection( &self, @@ -482,107 +606,138 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedColumnIndexes)] pub unsafe fn selectedColumnIndexes(&self) -> Id; #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedRowIndexes)] pub unsafe fn selectedRowIndexes(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(deselectColumn:)] pub unsafe fn deselectColumn(&self, column: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(deselectRow:)] pub unsafe fn deselectRow(&self, row: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(selectedColumn)] pub unsafe fn selectedColumn(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(selectedRow)] pub unsafe fn selectedRow(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(isColumnSelected:)] pub unsafe fn isColumnSelected(&self, column: NSInteger) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isRowSelected:)] pub unsafe fn isRowSelected(&self, row: NSInteger) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfSelectedColumns)] pub unsafe fn numberOfSelectedColumns(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(numberOfSelectedRows)] pub unsafe fn numberOfSelectedRows(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(allowsTypeSelect)] pub unsafe fn allowsTypeSelect(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsTypeSelect:)] pub unsafe fn setAllowsTypeSelect(&self, allows_type_select: bool); + #[cfg(not(any(target_os = "ios")))] #[method(style)] pub unsafe fn style(&self) -> NSTableViewStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setStyle:)] pub unsafe fn setStyle(&self, style: NSTableViewStyle); + #[cfg(not(any(target_os = "ios")))] #[method(effectiveStyle)] pub unsafe fn effectiveStyle(&self) -> NSTableViewStyle; + #[cfg(not(any(target_os = "ios")))] #[method(selectionHighlightStyle)] pub unsafe fn selectionHighlightStyle(&self) -> NSTableViewSelectionHighlightStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionHighlightStyle:)] pub unsafe fn setSelectionHighlightStyle( &self, selection_highlight_style: NSTableViewSelectionHighlightStyle, ); + #[cfg(not(any(target_os = "ios")))] #[method(draggingDestinationFeedbackStyle)] pub unsafe fn draggingDestinationFeedbackStyle( &self, ) -> NSTableViewDraggingDestinationFeedbackStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setDraggingDestinationFeedbackStyle:)] pub unsafe fn setDraggingDestinationFeedbackStyle( &self, dragging_destination_feedback_style: NSTableViewDraggingDestinationFeedbackStyle, ); + #[cfg(not(any(target_os = "ios")))] #[method(rectOfColumn:)] pub unsafe fn rectOfColumn(&self, column: NSInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(rectOfRow:)] pub unsafe fn rectOfRow(&self, row: NSInteger) -> NSRect; #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other columnIndexesInRect:)] pub unsafe fn columnIndexesInRect(&self, rect: NSRect) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(rowsInRect:)] pub unsafe fn rowsInRect(&self, rect: NSRect) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(columnAtPoint:)] pub unsafe fn columnAtPoint(&self, point: NSPoint) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(rowAtPoint:)] pub unsafe fn rowAtPoint(&self, point: NSPoint) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(frameOfCellAtColumn:row:)] pub unsafe fn frameOfCellAtColumn_row(&self, column: NSInteger, row: NSInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other autosaveName)] pub unsafe fn autosaveName(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAutosaveName:)] pub unsafe fn setAutosaveName(&self, autosave_name: Option<&NSTableViewAutosaveName>); + #[cfg(not(any(target_os = "ios")))] #[method(autosaveTableColumns)] pub unsafe fn autosaveTableColumns(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutosaveTableColumns:)] pub unsafe fn setAutosaveTableColumns(&self, autosave_table_columns: bool); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(editColumn:row:withEvent:select:)] pub unsafe fn editColumn_row_withEvent_select( &self, @@ -592,18 +747,23 @@ extern_methods!( select: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(drawRow:clipRect:)] pub unsafe fn drawRow_clipRect(&self, row: NSInteger, clip_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(highlightSelectionInClipRect:)] pub unsafe fn highlightSelectionInClipRect(&self, clip_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(drawGridInClipRect:)] pub unsafe fn drawGridInClipRect(&self, clip_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(drawBackgroundInClipRect:)] pub unsafe fn drawBackgroundInClipRect(&self, clip_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other viewAtColumn:row:makeIfNecessary:)] pub unsafe fn viewAtColumn_row_makeIfNecessary( &self, @@ -613,6 +773,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSTableRowView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other rowViewAtRow:makeIfNecessary:)] pub unsafe fn rowViewAtRow_makeIfNecessary( &self, @@ -620,12 +781,15 @@ extern_methods!( make_if_necessary: bool, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(rowForView:)] pub unsafe fn rowForView(&self, view: &NSView) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(columnForView:)] pub unsafe fn columnForView(&self, view: &NSView) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other makeViewWithIdentifier:owner:)] pub unsafe fn makeViewWithIdentifier_owner( &self, @@ -634,31 +798,39 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSTableRowView")] + #[cfg(not(any(target_os = "ios")))] #[method(enumerateAvailableRowViewsUsingBlock:)] pub unsafe fn enumerateAvailableRowViewsUsingBlock( &self, handler: &Block<(NonNull, NSInteger), ()>, ); + #[cfg(not(any(target_os = "ios")))] #[method(floatsGroupRows)] pub unsafe fn floatsGroupRows(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setFloatsGroupRows:)] pub unsafe fn setFloatsGroupRows(&self, floats_group_rows: bool); + #[cfg(not(any(target_os = "ios")))] #[method(rowActionsVisible)] pub unsafe fn rowActionsVisible(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setRowActionsVisible:)] pub unsafe fn setRowActionsVisible(&self, row_actions_visible: bool); + #[cfg(not(any(target_os = "ios")))] #[method(beginUpdates)] pub unsafe fn beginUpdates(&self); + #[cfg(not(any(target_os = "ios")))] #[method(endUpdates)] pub unsafe fn endUpdates(&self); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(insertRowsAtIndexes:withAnimation:)] pub unsafe fn insertRowsAtIndexes_withAnimation( &self, @@ -667,6 +839,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(removeRowsAtIndexes:withAnimation:)] pub unsafe fn removeRowsAtIndexes_withAnimation( &self, @@ -674,10 +847,12 @@ extern_methods!( animation_options: NSTableViewAnimationOptions, ); + #[cfg(not(any(target_os = "ios")))] #[method(moveRowAtIndex:toIndex:)] pub unsafe fn moveRowAtIndex_toIndex(&self, old_index: NSInteger, new_index: NSInteger); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(hideRowsAtIndexes:withAnimation:)] pub unsafe fn hideRowsAtIndexes_withAnimation( &self, @@ -686,6 +861,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method(unhideRowsAtIndexes:withAnimation:)] pub unsafe fn unhideRowsAtIndexes_withAnimation( &self, @@ -694,10 +870,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSIndexSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other hiddenRowIndexes)] pub unsafe fn hiddenRowIndexes(&self) -> Id; #[cfg(feature = "AppKit_NSNib")] + #[cfg(not(any(target_os = "ios")))] #[method(registerNib:forIdentifier:)] pub unsafe fn registerNib_forIdentifier( &self, @@ -706,49 +884,60 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSNib", feature = "Foundation_NSDictionary"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other registeredNibsByIdentifier)] pub unsafe fn registeredNibsByIdentifier( &self, ) -> Option>>; #[cfg(feature = "AppKit_NSTableRowView")] + #[cfg(not(any(target_os = "ios")))] #[method(didAddRowView:forRow:)] pub unsafe fn didAddRowView_forRow(&self, row_view: &NSTableRowView, row: NSInteger); #[cfg(feature = "AppKit_NSTableRowView")] + #[cfg(not(any(target_os = "ios")))] #[method(didRemoveRowView:forRow:)] pub unsafe fn didRemoveRowView_forRow(&self, row_view: &NSTableRowView, row: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(usesStaticContents)] pub unsafe fn usesStaticContents(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesStaticContents:)] pub unsafe fn setUsesStaticContents(&self, uses_static_contents: bool); + #[cfg(not(any(target_os = "ios")))] #[method(userInterfaceLayoutDirection)] pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setUserInterfaceLayoutDirection:)] pub unsafe fn setUserInterfaceLayoutDirection( &self, user_interface_layout_direction: NSUserInterfaceLayoutDirection, ); + #[cfg(not(any(target_os = "ios")))] #[method(usesAutomaticRowHeights)] pub unsafe fn usesAutomaticRowHeights(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesAutomaticRowHeights:)] pub unsafe fn setUsesAutomaticRowHeights(&self, uses_automatic_row_heights: bool); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTableViewDelegate: NSControlTextEditingDelegate { #[cfg(all( feature = "AppKit_NSTableColumn", feature = "AppKit_NSTableView", feature = "AppKit_NSView" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tableView:viewForTableColumn:row:)] unsafe fn tableView_viewForTableColumn_row( @@ -759,6 +948,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSTableRowView", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tableView:rowViewForRow:)] unsafe fn tableView_rowViewForRow( @@ -768,6 +958,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSTableRowView", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:didAddRowView:forRow:)] unsafe fn tableView_didAddRowView_forRow( @@ -778,6 +969,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSTableRowView", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:didRemoveRowView:forRow:)] unsafe fn tableView_didRemoveRowView_forRow( @@ -788,6 +980,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSTableColumn", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:willDisplayCell:forTableColumn:row:)] unsafe fn tableView_willDisplayCell_forTableColumn_row( @@ -799,6 +992,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSTableColumn", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:shouldEditTableColumn:row:)] unsafe fn tableView_shouldEditTableColumn_row( @@ -814,6 +1008,7 @@ extern_protocol!( feature = "AppKit_NSTableView", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tableView:toolTipForCell:rect:tableColumn:row:mouseLocation:)] unsafe fn tableView_toolTipForCell_rect_tableColumn_row_mouseLocation( @@ -827,6 +1022,7 @@ extern_protocol!( ) -> Id; #[cfg(all(feature = "AppKit_NSTableColumn", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:shouldShowCellExpansionForTableColumn:row:)] unsafe fn tableView_shouldShowCellExpansionForTableColumn_row( @@ -841,6 +1037,7 @@ extern_protocol!( feature = "AppKit_NSTableColumn", feature = "AppKit_NSTableView" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:shouldTrackCell:forTableColumn:row:)] unsafe fn tableView_shouldTrackCell_forTableColumn_row( @@ -856,6 +1053,7 @@ extern_protocol!( feature = "AppKit_NSTableColumn", feature = "AppKit_NSTableView" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tableView:dataCellForTableColumn:row:)] unsafe fn tableView_dataCellForTableColumn_row( @@ -866,11 +1064,13 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(selectionShouldChangeInTableView:)] unsafe fn selectionShouldChangeInTableView(&self, table_view: &NSTableView) -> bool; #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:shouldSelectRow:)] unsafe fn tableView_shouldSelectRow( @@ -880,6 +1080,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSTableView", feature = "Foundation_NSIndexSet"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tableView:selectionIndexesForProposedSelection:)] unsafe fn tableView_selectionIndexesForProposedSelection( @@ -889,6 +1090,7 @@ extern_protocol!( ) -> Id; #[cfg(all(feature = "AppKit_NSTableColumn", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:shouldSelectTableColumn:)] unsafe fn tableView_shouldSelectTableColumn( @@ -898,6 +1100,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSTableColumn", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:mouseDownInHeaderOfTableColumn:)] unsafe fn tableView_mouseDownInHeaderOfTableColumn( @@ -907,6 +1110,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSTableColumn", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:didClickTableColumn:)] unsafe fn tableView_didClickTableColumn( @@ -916,6 +1120,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSTableColumn", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:didDragTableColumn:)] unsafe fn tableView_didDragTableColumn( @@ -925,6 +1130,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:heightOfRow:)] unsafe fn tableView_heightOfRow(&self, table_view: &NSTableView, row: NSInteger) @@ -935,6 +1141,7 @@ extern_protocol!( feature = "AppKit_NSTableView", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tableView:typeSelectStringForTableColumn:row:)] unsafe fn tableView_typeSelectStringForTableColumn_row( @@ -945,6 +1152,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSTableView", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:nextTypeSelectMatchFromRow:toRow:forString:)] unsafe fn tableView_nextTypeSelectMatchFromRow_toRow_forString( @@ -960,6 +1168,7 @@ extern_protocol!( feature = "AppKit_NSTableView", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:shouldTypeSelectForEvent:withCurrentSearchString:)] unsafe fn tableView_shouldTypeSelectForEvent_withCurrentSearchString( @@ -970,11 +1179,13 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:isGroupRow:)] unsafe fn tableView_isGroupRow(&self, table_view: &NSTableView, row: NSInteger) -> bool; #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:sizeToFitWidthOfColumn:)] unsafe fn tableView_sizeToFitWidthOfColumn( @@ -984,6 +1195,7 @@ extern_protocol!( ) -> CGFloat; #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:shouldReorderColumn:toColumn:)] unsafe fn tableView_shouldReorderColumn_toColumn( @@ -998,6 +1210,7 @@ extern_protocol!( feature = "AppKit_NSTableViewRowAction", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tableView:rowActionsForRow:edge:)] unsafe fn tableView_rowActionsForRow_edge( @@ -1008,21 +1221,25 @@ extern_protocol!( ) -> Id>; #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableViewSelectionDidChange:)] unsafe fn tableViewSelectionDidChange(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableViewColumnDidMove:)] unsafe fn tableViewColumnDidMove(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableViewColumnDidResize:)] unsafe fn tableViewColumnDidResize(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableViewSelectionIsChanging:)] unsafe fn tableViewSelectionIsChanging(&self, notification: &NSNotification); @@ -1042,13 +1259,16 @@ extern_static!(NSTableViewSelectionIsChangingNotification: &'static NSNotificati extern_static!(NSTableViewRowViewKey: &'static NSUserInterfaceItemIdentifier); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTableViewDataSource: NSObjectProtocol { #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(numberOfRowsInTableView:)] unsafe fn numberOfRowsInTableView(&self, table_view: &NSTableView) -> NSInteger; #[cfg(all(feature = "AppKit_NSTableColumn", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tableView:objectValueForTableColumn:row:)] unsafe fn tableView_objectValueForTableColumn_row( @@ -1059,6 +1279,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSTableColumn", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:setObjectValue:forTableColumn:row:)] unsafe fn tableView_setObjectValue_forTableColumn_row( @@ -1074,6 +1295,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSSortDescriptor" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:sortDescriptorsDidChange:)] unsafe fn tableView_sortDescriptorsDidChange( @@ -1083,6 +1305,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tableView:pasteboardWriterForRow:)] unsafe fn tableView_pasteboardWriterForRow( @@ -1096,6 +1319,7 @@ extern_protocol!( feature = "AppKit_NSTableView", feature = "Foundation_NSIndexSet" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:draggingSession:willBeginAtPoint:forRowIndexes:)] unsafe fn tableView_draggingSession_willBeginAtPoint_forRowIndexes( @@ -1107,6 +1331,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSDraggingSession", feature = "AppKit_NSTableView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:draggingSession:endedAtPoint:operation:)] unsafe fn tableView_draggingSession_endedAtPoint_operation( @@ -1118,6 +1343,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:updateDraggingItemsForDrag:)] unsafe fn tableView_updateDraggingItemsForDrag( @@ -1132,6 +1358,7 @@ extern_protocol!( feature = "Foundation_NSIndexSet" ))] #[deprecated = "Use -tableView:pasteboardWriterForRow: instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:writeRowsWithIndexes:toPasteboard:)] unsafe fn tableView_writeRowsWithIndexes_toPasteboard( @@ -1142,6 +1369,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:validateDrop:proposedRow:proposedDropOperation:)] unsafe fn tableView_validateDrop_proposedRow_proposedDropOperation( @@ -1153,6 +1381,7 @@ extern_protocol!( ) -> NSDragOperation; #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tableView:acceptDrop:row:dropOperation:)] unsafe fn tableView_acceptDrop_row_dropOperation( @@ -1171,6 +1400,7 @@ extern_protocol!( feature = "Foundation_NSURL" ))] #[deprecated = "Use NSFilePromiseReceiver objects instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:)] unsafe fn tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes( @@ -1189,28 +1419,34 @@ extern_methods!( #[cfg(feature = "AppKit_NSTableView")] unsafe impl NSTableView { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsGrid:)] pub unsafe fn setDrawsGrid(&self, flag: bool); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(drawsGrid)] pub unsafe fn drawsGrid(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(selectColumn:byExtendingSelection:)] pub unsafe fn selectColumn_byExtendingSelection(&self, column: NSInteger, extend: bool); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(selectRow:byExtendingSelection:)] pub unsafe fn selectRow_byExtendingSelection(&self, row: NSInteger, extend: bool); #[cfg(feature = "Foundation_NSEnumerator")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedColumnEnumerator)] pub unsafe fn selectedColumnEnumerator(&self) -> Id; #[cfg(feature = "Foundation_NSEnumerator")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedRowEnumerator)] pub unsafe fn selectedRowEnumerator(&self) -> Id; @@ -1220,6 +1456,7 @@ extern_methods!( feature = "Foundation_NSArray" ))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dragImageForRows:event:dragImageOffset:)] pub unsafe fn dragImageForRows_event_dragImageOffset( &self, @@ -1229,19 +1466,23 @@ extern_methods!( ) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setAutoresizesAllColumnsToFit:)] pub unsafe fn setAutoresizesAllColumnsToFit(&self, flag: bool); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(autoresizesAllColumnsToFit)] pub unsafe fn autoresizesAllColumnsToFit(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(columnsInRect:)] pub unsafe fn columnsInRect(&self, rect: NSRect) -> NSRange; #[cfg(feature = "AppKit_NSCell")] #[deprecated = "Use View Based TableView and -viewAtColumn:row:"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other preparedCellAtColumn:row:)] pub unsafe fn preparedCellAtColumn_row( &self, @@ -1251,31 +1492,37 @@ extern_methods!( #[cfg(feature = "AppKit_NSText")] #[deprecated = "Use a View Based TableView with an NSTextField"] + #[cfg(not(any(target_os = "ios")))] #[method(textShouldBeginEditing:)] pub unsafe fn textShouldBeginEditing(&self, text_object: &NSText) -> bool; #[cfg(feature = "AppKit_NSText")] #[deprecated = "Use a View Based TableView with an NSTextField"] + #[cfg(not(any(target_os = "ios")))] #[method(textShouldEndEditing:)] pub unsafe fn textShouldEndEditing(&self, text_object: &NSText) -> bool; #[cfg(feature = "Foundation_NSNotification")] #[deprecated = "Use a View Based TableView with an NSTextField"] + #[cfg(not(any(target_os = "ios")))] #[method(textDidBeginEditing:)] pub unsafe fn textDidBeginEditing(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] #[deprecated = "Use a View Based TableView with an NSTextField"] + #[cfg(not(any(target_os = "ios")))] #[method(textDidEndEditing:)] pub unsafe fn textDidEndEditing(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] #[deprecated = "Use a View Based TableView with an NSTextField"] + #[cfg(not(any(target_os = "ios")))] #[method(textDidChange:)] pub unsafe fn textDidChange(&self, notification: &NSNotification); #[cfg(feature = "AppKit_NSCell")] #[deprecated = "Use a View Based TableView; observe the window’s firstResponder for focus change notifications"] + #[cfg(not(any(target_os = "ios")))] #[method(shouldFocusCell:atColumn:row:)] pub unsafe fn shouldFocusCell_atColumn_row( &self, @@ -1285,14 +1532,17 @@ extern_methods!( ) -> bool; #[deprecated = "Use a View Based TableView and observe the window.firstResponder"] + #[cfg(not(any(target_os = "ios")))] #[method(focusedColumn)] pub unsafe fn focusedColumn(&self) -> NSInteger; #[deprecated = "Use a View Based TableView; make a particular view the first responder with [window makeFirstResponder:view] to focus it."] + #[cfg(not(any(target_os = "ios")))] #[method(setFocusedColumn:)] pub unsafe fn setFocusedColumn(&self, focused_column: NSInteger); #[deprecated = "Use a View Based TableView; directly interact with a particular view as required and call -performClick: on it, if necessary"] + #[cfg(not(any(target_os = "ios")))] #[method(performClickOnCellAtColumn:row:)] pub unsafe fn performClickOnCellAtColumn_row(&self, column: NSInteger, row: NSInteger); } diff --git a/AppKit/NSTableViewDiffableDataSource.rs b/AppKit/NSTableViewDiffableDataSource.rs index e97b9a3b9..809b82043 100644 --- a/AppKit/NSTableViewDiffableDataSource.rs +++ b/AppKit/NSTableViewDiffableDataSource.rs @@ -24,6 +24,7 @@ pub type NSTableViewDiffableDataSourceSectionHeaderViewProvider = __inner_extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTableViewDiffableDataSource")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTableViewDiffableDataSource< SectionIdentifierType: Message = Object, ItemIdentifierType: Message = Object, @@ -101,6 +102,7 @@ extern_methods!( > { #[cfg(feature = "AppKit_NSTableView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithTableView:cellProvider:)] pub unsafe fn initWithTableView_cellProvider( this: Option>, @@ -108,19 +110,23 @@ extern_methods!( cell_provider: NSTableViewDiffableDataSourceCellProvider, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[cfg(feature = "AppKit_NSDiffableDataSourceSnapshot")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other snapshot)] pub unsafe fn snapshot( &self, ) -> Id>; #[cfg(feature = "AppKit_NSDiffableDataSourceSnapshot")] + #[cfg(not(any(target_os = "ios")))] #[method(applySnapshot:animatingDifferences:)] pub unsafe fn applySnapshot_animatingDifferences( &self, @@ -129,6 +135,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSDiffableDataSourceSnapshot")] + #[cfg(not(any(target_os = "ios")))] #[method(applySnapshot:animatingDifferences:completion:)] pub unsafe fn applySnapshot_animatingDifferences_completion( &self, @@ -137,50 +144,60 @@ extern_methods!( completion: Option<&Block<(), ()>>, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other itemIdentifierForRow:)] pub unsafe fn itemIdentifierForRow( &self, row: NSInteger, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(rowForItemIdentifier:)] pub unsafe fn rowForItemIdentifier(&self, identifier: &ItemIdentifierType) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sectionIdentifierForRow:)] pub unsafe fn sectionIdentifierForRow( &self, row: NSInteger, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(rowForSectionIdentifier:)] pub unsafe fn rowForSectionIdentifier( &self, identifier: &SectionIdentifierType, ) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(rowViewProvider)] pub unsafe fn rowViewProvider(&self) -> NSTableViewDiffableDataSourceRowProvider; + #[cfg(not(any(target_os = "ios")))] #[method(setRowViewProvider:)] pub unsafe fn setRowViewProvider( &self, row_view_provider: NSTableViewDiffableDataSourceRowProvider, ); + #[cfg(not(any(target_os = "ios")))] #[method(sectionHeaderViewProvider)] pub unsafe fn sectionHeaderViewProvider( &self, ) -> NSTableViewDiffableDataSourceSectionHeaderViewProvider; + #[cfg(not(any(target_os = "ios")))] #[method(setSectionHeaderViewProvider:)] pub unsafe fn setSectionHeaderViewProvider( &self, section_header_view_provider: NSTableViewDiffableDataSourceSectionHeaderViewProvider, ); + #[cfg(not(any(target_os = "ios")))] #[method(defaultRowAnimation)] pub unsafe fn defaultRowAnimation(&self) -> NSTableViewAnimationOptions; + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultRowAnimation:)] pub unsafe fn setDefaultRowAnimation( &self, diff --git a/AppKit/NSTableViewRowAction.rs b/AppKit/NSTableViewRowAction.rs index cb7bca87a..dc99a2263 100644 --- a/AppKit/NSTableViewRowAction.rs +++ b/AppKit/NSTableViewRowAction.rs @@ -7,8 +7,11 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTableViewRowActionStyle { + #[cfg(not(any(target_os = "ios")))] NSTableViewRowActionStyleRegular = 0, + #[cfg(not(any(target_os = "ios")))] NSTableViewRowActionStyleDestructive = 1, } ); @@ -16,6 +19,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTableViewRowAction")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTableViewRowAction; #[cfg(feature = "AppKit_NSTableViewRowAction")] @@ -31,6 +35,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSTableViewRowAction")] unsafe impl NSTableViewRowAction { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other rowActionWithStyle:title:handler:)] pub unsafe fn rowActionWithStyle_title_handler( style: NSTableViewRowActionStyle, @@ -38,30 +43,37 @@ extern_methods!( handler: &Block<(NonNull, NSInteger), ()>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(style)] pub unsafe fn style(&self) -> NSTableViewRowActionStyle; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); } diff --git a/AppKit/NSText.rs b/AppKit/NSText.rs index 828b39fd3..bb9007751 100644 --- a/AppKit/NSText.rs +++ b/AppKit/NSText.rs @@ -17,6 +17,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSText")] + #[cfg(not(any(target_os = "ios")))] pub struct NSText; #[cfg(feature = "AppKit_NSText")] @@ -59,10 +60,12 @@ unsafe impl NSUserInterfaceItemIdentification for NSText {} extern_methods!( #[cfg(feature = "AppKit_NSText")] unsafe impl NSText { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, @@ -70,229 +73,299 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other string)] pub unsafe fn string(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setString:)] pub unsafe fn setString(&self, string: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(replaceCharactersInRange:withString:)] pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, string: &NSString); #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method(replaceCharactersInRange:withRTF:)] pub unsafe fn replaceCharactersInRange_withRTF(&self, range: NSRange, rtf_data: &NSData); #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method(replaceCharactersInRange:withRTFD:)] pub unsafe fn replaceCharactersInRange_withRTFD(&self, range: NSRange, rtfd_data: &NSData); #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other RTFFromRange:)] pub unsafe fn RTFFromRange(&self, range: NSRange) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other RTFDFromRange:)] pub unsafe fn RTFDFromRange(&self, range: NSRange) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(writeRTFDToFile:atomically:)] pub unsafe fn writeRTFDToFile_atomically(&self, path: &NSString, flag: bool) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(readRTFDFromFile:)] pub unsafe fn readRTFDFromFile(&self, path: &NSString) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isSelectable)] pub unsafe fn isSelectable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectable:)] pub unsafe fn setSelectable(&self, selectable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isRichText)] pub unsafe fn isRichText(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setRichText:)] pub unsafe fn setRichText(&self, rich_text: bool); + #[cfg(not(any(target_os = "ios")))] #[method(importsGraphics)] pub unsafe fn importsGraphics(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setImportsGraphics:)] pub unsafe fn setImportsGraphics(&self, imports_graphics: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isFieldEditor)] pub unsafe fn isFieldEditor(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setFieldEditor:)] pub unsafe fn setFieldEditor(&self, field_editor: bool); + #[cfg(not(any(target_os = "ios")))] #[method(usesFontPanel)] pub unsafe fn usesFontPanel(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesFontPanel:)] pub unsafe fn setUsesFontPanel(&self, uses_font_panel: bool); + #[cfg(not(any(target_os = "ios")))] #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, draws_background: bool); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method(isRulerVisible)] pub unsafe fn isRulerVisible(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(selectedRange)] pub unsafe fn selectedRange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedRange:)] pub unsafe fn setSelectedRange(&self, selected_range: NSRange); + #[cfg(not(any(target_os = "ios")))] #[method(scrollRangeToVisible:)] pub unsafe fn scrollRangeToVisible(&self, range: NSRange); #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other font)] pub unsafe fn font(&self) -> Option>; #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(setFont:)] pub unsafe fn setFont(&self, font: Option<&NSFont>); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textColor)] pub unsafe fn textColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setTextColor:)] pub unsafe fn setTextColor(&self, text_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method(alignment)] pub unsafe fn alignment(&self) -> NSTextAlignment; + #[cfg(not(any(target_os = "ios")))] #[method(setAlignment:)] pub unsafe fn setAlignment(&self, alignment: NSTextAlignment); + #[cfg(not(any(target_os = "ios")))] #[method(baseWritingDirection)] pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setBaseWritingDirection:)] pub unsafe fn setBaseWritingDirection(&self, base_writing_direction: NSWritingDirection); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setTextColor:range:)] pub unsafe fn setTextColor_range(&self, color: Option<&NSColor>, range: NSRange); #[cfg(feature = "AppKit_NSFont")] + #[cfg(not(any(target_os = "ios")))] #[method(setFont:range:)] pub unsafe fn setFont_range(&self, font: &NSFont, range: NSRange); + #[cfg(not(any(target_os = "ios")))] #[method(maxSize)] pub unsafe fn maxSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxSize:)] pub unsafe fn setMaxSize(&self, max_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(minSize)] pub unsafe fn minSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setMinSize:)] pub unsafe fn setMinSize(&self, min_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(isHorizontallyResizable)] pub unsafe fn isHorizontallyResizable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHorizontallyResizable:)] pub unsafe fn setHorizontallyResizable(&self, horizontally_resizable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isVerticallyResizable)] pub unsafe fn isVerticallyResizable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setVerticallyResizable:)] pub unsafe fn setVerticallyResizable(&self, vertically_resizable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); + #[cfg(not(any(target_os = "ios")))] #[method(copy:)] pub unsafe fn copy(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(copyFont:)] pub unsafe fn copyFont(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(copyRuler:)] pub unsafe fn copyRuler(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(cut:)] pub unsafe fn cut(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(delete:)] pub unsafe fn delete(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(paste:)] pub unsafe fn paste(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(pasteFont:)] pub unsafe fn pasteFont(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(pasteRuler:)] pub unsafe fn pasteRuler(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(selectAll:)] pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(changeFont:)] pub unsafe fn changeFont(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(alignLeft:)] pub unsafe fn alignLeft(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(alignRight:)] pub unsafe fn alignRight(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(alignCenter:)] pub unsafe fn alignCenter(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(subscript:)] pub unsafe fn subscript(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(superscript:)] pub unsafe fn superscript(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(underline:)] pub unsafe fn underline(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(unscript:)] pub unsafe fn unscript(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(showGuessPanel:)] pub unsafe fn showGuessPanel(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(checkSpelling:)] pub unsafe fn checkSpelling(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(toggleRuler:)] pub unsafe fn toggleRuler(&self, sender: Option<&Object>); } diff --git a/AppKit/NSTextAttachment.rs b/AppKit/NSTextAttachment.rs index fc08c05fb..e5daa45c9 100644 --- a/AppKit/NSTextAttachment.rs +++ b/AppKit/NSTextAttachment.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_enum!( #[underlying(c_uint)] pub enum __anonymous__ { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSAttachmentCharacter = 0xFFFC, } ); @@ -15,6 +16,7 @@ extern_enum!( extern_protocol!( pub unsafe trait NSTextAttachmentContainer: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSImage", feature = "AppKit_NSTextContainer"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other imageForBounds:textContainer:characterIndex:)] unsafe fn imageForBounds_textContainer_characterIndex( &self, @@ -24,6 +26,7 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSTextContainer")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(attachmentBoundsForTextContainer:proposedLineFragment:glyphPosition:characterIndex:)] unsafe fn attachmentBoundsForTextContainer_proposedLineFragment_glyphPosition_characterIndex( &self, @@ -44,6 +47,7 @@ extern_protocol!( feature = "AppKit_NSTextContainer", feature = "Foundation_NSDictionary" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other imageForBounds:attributes:location:textContainer:)] unsafe fn imageForBounds_attributes_location_textContainer( &self, @@ -57,6 +61,7 @@ extern_protocol!( feature = "AppKit_NSTextContainer", feature = "Foundation_NSDictionary" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(attachmentBoundsForAttributes:location:textContainer:proposedLineFragment:position:)] unsafe fn attachmentBoundsForAttributes_location_textContainer_proposedLineFragment_position( &self, @@ -72,6 +77,7 @@ extern_protocol!( feature = "AppKit_NSTextContainer", feature = "AppKit_NSView" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other viewProviderForParentView:location:textContainer:)] unsafe fn viewProviderForParentView_location_textContainer( &self, @@ -87,6 +93,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextAttachment")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextAttachment; #[cfg(feature = "AppKit_NSTextAttachment")] @@ -114,6 +121,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSTextAttachment")] unsafe impl NSTextAttachment { #[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithData:ofType:)] pub unsafe fn initWithData_ofType( this: Option>, @@ -129,32 +137,40 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other contents)] pub unsafe fn contents(&self) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setContents:)] pub unsafe fn setContents(&self, contents: Option<&NSData>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other fileType)] pub unsafe fn fileType(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setFileType:)] pub unsafe fn setFileType(&self, file_type: Option<&NSString>); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(bounds)] pub unsafe fn bounds(&self) -> CGRect; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setBounds:)] pub unsafe fn setBounds(&self, bounds: CGRect); @@ -166,42 +182,51 @@ extern_methods!( #[method(setFileWrapper:)] pub unsafe fn setFileWrapper(&self, file_wrapper: Option<&NSFileWrapper>); + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other attachmentCell)] pub unsafe fn attachmentCell( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setAttachmentCell:)] pub unsafe fn setAttachmentCell( &self, attachment_cell: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(lineLayoutPadding)] pub unsafe fn lineLayoutPadding(&self) -> CGFloat; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setLineLayoutPadding:)] pub unsafe fn setLineLayoutPadding(&self, line_layout_padding: CGFloat); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(textAttachmentViewProviderClassForFileType:)] pub unsafe fn textAttachmentViewProviderClassForFileType( file_type: &NSString, ) -> Option<&'static Class>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(registerTextAttachmentViewProviderClass:forFileType:)] pub unsafe fn registerTextAttachmentViewProviderClass_forFileType( text_attachment_view_provider_class: &Class, file_type: &NSString, ); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(allowsTextAttachmentView)] pub unsafe fn allowsTextAttachmentView(&self) -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setAllowsTextAttachmentView:)] pub unsafe fn setAllowsTextAttachmentView(&self, allows_text_attachment_view: bool); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(usesTextAttachmentView)] pub unsafe fn usesTextAttachmentView(&self) -> bool; } @@ -212,6 +237,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSAttributedString")] unsafe impl NSAttributedString { #[cfg(feature = "AppKit_NSTextAttachment")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other attributedStringWithAttachment:)] pub unsafe fn attributedStringWithAttachment( attachment: &NSTextAttachment, @@ -222,6 +248,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextAttachmentViewProvider")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextAttachmentViewProvider; #[cfg(feature = "AppKit_NSTextAttachmentViewProvider")] diff --git a/AppKit/NSTextAttachmentCell.rs b/AppKit/NSTextAttachmentCell.rs index e56e1efe2..196bb4539 100644 --- a/AppKit/NSTextAttachmentCell.rs +++ b/AppKit/NSTextAttachmentCell.rs @@ -6,15 +6,19 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTextAttachmentCellProtocol: NSObjectProtocol { #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawWithFrame:inView:)] unsafe fn drawWithFrame_inView(&self, cell_frame: NSRect, control_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(wantsToTrackMouse)] unsafe fn wantsToTrackMouse(&self) -> bool; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(highlight:withFrame:inView:)] unsafe fn highlight_withFrame_inView( &self, @@ -24,6 +28,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(trackMouse:inRect:ofView:untilMouseUp:)] unsafe fn trackMouse_inRect_ofView_untilMouseUp( &self, @@ -33,21 +38,26 @@ extern_protocol!( flag: bool, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(cellSize)] unsafe fn cellSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(cellBaselineOffset)] unsafe fn cellBaselineOffset(&self) -> NSPoint; #[cfg(feature = "AppKit_NSTextAttachment")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attachment)] unsafe fn attachment(&self) -> Option>; #[cfg(feature = "AppKit_NSTextAttachment")] + #[cfg(not(any(target_os = "ios")))] #[method(setAttachment:)] unsafe fn setAttachment(&self, attachment: Option<&NSTextAttachment>); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(drawWithFrame:inView:characterIndex:)] unsafe fn drawWithFrame_inView_characterIndex( &self, @@ -57,6 +67,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSLayoutManager", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(drawWithFrame:inView:characterIndex:layoutManager:)] unsafe fn drawWithFrame_inView_characterIndex_layoutManager( &self, @@ -67,6 +78,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(wantsToTrackMouseForEvent:inRect:ofView:atCharacterIndex:)] unsafe fn wantsToTrackMouseForEvent_inRect_ofView_atCharacterIndex( &self, @@ -77,6 +89,7 @@ extern_protocol!( ) -> bool; #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSView"))] + #[cfg(not(any(target_os = "ios")))] #[method(trackMouse:inRect:ofView:atCharacterIndex:untilMouseUp:)] unsafe fn trackMouse_inRect_ofView_atCharacterIndex_untilMouseUp( &self, @@ -88,6 +101,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSTextContainer")] + #[cfg(not(any(target_os = "ios")))] #[method(cellFrameForTextContainer:proposedLineFragment:glyphPosition:characterIndex:)] unsafe fn cellFrameForTextContainer_proposedLineFragment_glyphPosition_characterIndex( &self, @@ -104,6 +118,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextAttachmentCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTextAttachmentCell; #[cfg(feature = "AppKit_NSTextAttachmentCell")] @@ -141,10 +156,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSTextAttachmentCell")] unsafe impl NSTextAttachmentCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSTextCheckingClient.rs b/AppKit/NSTextCheckingClient.rs index 2da072fd1..a251fdff3 100644 --- a/AppKit/NSTextCheckingClient.rs +++ b/AppKit/NSTextCheckingClient.rs @@ -7,91 +7,116 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTextInputTraitType { + #[cfg(not(any(target_os = "ios")))] NSTextInputTraitTypeDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSTextInputTraitTypeNo = 1, + #[cfg(not(any(target_os = "ios")))] NSTextInputTraitTypeYes = 2, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTextInputTraits { + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(autocorrectionType)] unsafe fn autocorrectionType(&self) -> NSTextInputTraitType; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setAutocorrectionType:)] unsafe fn setAutocorrectionType(&self, autocorrection_type: NSTextInputTraitType); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(spellCheckingType)] unsafe fn spellCheckingType(&self) -> NSTextInputTraitType; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setSpellCheckingType:)] unsafe fn setSpellCheckingType(&self, spell_checking_type: NSTextInputTraitType); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(grammarCheckingType)] unsafe fn grammarCheckingType(&self) -> NSTextInputTraitType; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setGrammarCheckingType:)] unsafe fn setGrammarCheckingType(&self, grammar_checking_type: NSTextInputTraitType); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(smartQuotesType)] unsafe fn smartQuotesType(&self) -> NSTextInputTraitType; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setSmartQuotesType:)] unsafe fn setSmartQuotesType(&self, smart_quotes_type: NSTextInputTraitType); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(smartDashesType)] unsafe fn smartDashesType(&self) -> NSTextInputTraitType; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setSmartDashesType:)] unsafe fn setSmartDashesType(&self, smart_dashes_type: NSTextInputTraitType); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(smartInsertDeleteType)] unsafe fn smartInsertDeleteType(&self) -> NSTextInputTraitType; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setSmartInsertDeleteType:)] unsafe fn setSmartInsertDeleteType(&self, smart_insert_delete_type: NSTextInputTraitType); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textReplacementType)] unsafe fn textReplacementType(&self) -> NSTextInputTraitType; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setTextReplacementType:)] unsafe fn setTextReplacementType(&self, text_replacement_type: NSTextInputTraitType); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(dataDetectionType)] unsafe fn dataDetectionType(&self) -> NSTextInputTraitType; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setDataDetectionType:)] unsafe fn setDataDetectionType(&self, data_detection_type: NSTextInputTraitType); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(linkDetectionType)] unsafe fn linkDetectionType(&self) -> NSTextInputTraitType; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setLinkDetectionType:)] unsafe fn setLinkDetectionType(&self, link_detection_type: NSTextInputTraitType); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textCompletionType)] unsafe fn textCompletionType(&self) -> NSTextInputTraitType; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setTextCompletionType:)] unsafe fn setTextCompletionType(&self, text_completion_type: NSTextInputTraitType); @@ -101,8 +126,10 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTextCheckingClient: NSTextInputClient + NSTextInputTraits { #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other annotatedSubstringForProposedRange:actualRange:)] unsafe fn annotatedSubstringForProposedRange_actualRange( &self, @@ -111,6 +138,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setAnnotations:range:)] unsafe fn setAnnotations_range( &self, @@ -119,6 +147,7 @@ extern_protocol!( ); #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(addAnnotations:range:)] unsafe fn addAnnotations_range( &self, @@ -126,6 +155,7 @@ extern_protocol!( range: NSRange, ); + #[cfg(not(any(target_os = "ios")))] #[method(removeAnnotation:range:)] unsafe fn removeAnnotation_range( &self, @@ -134,6 +164,7 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(replaceCharactersInRange:withAnnotatedString:)] unsafe fn replaceCharactersInRange_withAnnotatedString( &self, @@ -141,10 +172,12 @@ extern_protocol!( annotated_string: &NSAttributedString, ); + #[cfg(not(any(target_os = "ios")))] #[method(selectAndShowRange:)] unsafe fn selectAndShowRange(&self, range: NSRange); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other viewForRange:firstRect:actualRange:)] unsafe fn viewForRange_firstRect_actualRange( &self, @@ -154,6 +187,7 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSCandidateListTouchBarItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other candidateListTouchBarItem)] unsafe fn candidateListTouchBarItem(&self) -> Option>; } diff --git a/AppKit/NSTextCheckingController.rs b/AppKit/NSTextCheckingController.rs index d7edf57e5..a30e8173d 100644 --- a/AppKit/NSTextCheckingController.rs +++ b/AppKit/NSTextCheckingController.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextCheckingController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTextCheckingController; #[cfg(feature = "AppKit_NSTextCheckingController")] @@ -22,34 +23,43 @@ unsafe impl NSObjectProtocol for NSTextCheckingController {} extern_methods!( #[cfg(feature = "AppKit_NSTextCheckingController")] unsafe impl NSTextCheckingController { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithClient:)] pub unsafe fn initWithClient( this: Option>, client: &ProtocolObject, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other client)] pub unsafe fn client(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(invalidate)] pub unsafe fn invalidate(&self); + #[cfg(not(any(target_os = "ios")))] #[method(didChangeTextInRange:)] pub unsafe fn didChangeTextInRange(&self, range: NSRange); + #[cfg(not(any(target_os = "ios")))] #[method(insertedTextInRange:)] pub unsafe fn insertedTextInRange(&self, range: NSRange); + #[cfg(not(any(target_os = "ios")))] #[method(didChangeSelectedRange)] pub unsafe fn didChangeSelectedRange(&self); + #[cfg(not(any(target_os = "ios")))] #[method(considerTextCheckingForRange:)] pub unsafe fn considerTextCheckingForRange(&self, range: NSRange); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(checkTextInRange:types:options:)] pub unsafe fn checkTextInRange_types_options( &self, @@ -58,35 +68,45 @@ extern_methods!( options: &NSDictionary, ); + #[cfg(not(any(target_os = "ios")))] #[method(checkTextInSelection:)] pub unsafe fn checkTextInSelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(checkTextInDocument:)] pub unsafe fn checkTextInDocument(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontSubstitutionsPanel:)] pub unsafe fn orderFrontSubstitutionsPanel(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(checkSpelling:)] pub unsafe fn checkSpelling(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(showGuessPanel:)] pub unsafe fn showGuessPanel(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(changeSpelling:)] pub unsafe fn changeSpelling(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(ignoreSpelling:)] pub unsafe fn ignoreSpelling(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(updateCandidates)] pub unsafe fn updateCandidates(&self); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other validAnnotations)] pub unsafe fn validAnnotations(&self) -> Id>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuAtIndex:clickedOnSelection:effectiveRange:)] pub unsafe fn menuAtIndex_clickedOnSelection_effectiveRange( &self, @@ -95,9 +115,11 @@ extern_methods!( effective_range: NSRangePointer, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(spellCheckerDocumentTag)] pub unsafe fn spellCheckerDocumentTag(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setSpellCheckerDocumentTag:)] pub unsafe fn setSpellCheckerDocumentTag(&self, spell_checker_document_tag: NSInteger); } diff --git a/AppKit/NSTextContainer.rs b/AppKit/NSTextContainer.rs index 7a2c70942..09de80459 100644 --- a/AppKit/NSTextContainer.rs +++ b/AppKit/NSTextContainer.rs @@ -51,6 +51,7 @@ extern_methods!( pub unsafe fn replaceLayoutManager(&self, new_layout_manager: &NSLayoutManager); #[cfg(feature = "AppKit_NSTextLayoutManager")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; diff --git a/AppKit/NSTextContent.rs b/AppKit/NSTextContent.rs index cda67bcda..27a48af47 100644 --- a/AppKit/NSTextContent.rs +++ b/AppKit/NSTextContent.rs @@ -16,10 +16,13 @@ extern_static!(NSTextContentTypePassword: &'static NSTextContentType); extern_static!(NSTextContentTypeOneTimeCode: &'static NSTextContentType); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTextContent { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentType)] unsafe fn contentType(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setContentType:)] unsafe fn setContentType(&self, content_type: Option<&NSTextContentType>); } diff --git a/AppKit/NSTextContentManager.rs b/AppKit/NSTextContentManager.rs index 1d0cc01ba..0f93320e0 100644 --- a/AppKit/NSTextContentManager.rs +++ b/AppKit/NSTextContentManager.rs @@ -7,13 +7,17 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSTextContentManagerEnumerationOptions { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextContentManagerEnumerationOptionsNone = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextContentManagerEnumerationOptionsReverse = 1 << 0, } ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSTextElementProvider: NSObjectProtocol { #[cfg(feature = "AppKit_NSTextRange")] #[method_id(@__retain_semantics Other documentRange)] @@ -79,6 +83,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextContentManager")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextContentManager; #[cfg(feature = "AppKit_NSTextContentManager")] @@ -199,6 +204,7 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSTextContentManagerDelegate: NSObjectProtocol { #[cfg(all( feature = "AppKit_NSTextContentManager", @@ -230,6 +236,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSTextContentStorageDelegate: NSTextContentManagerDelegate { #[cfg(all( feature = "AppKit_NSTextContentStorage", @@ -250,6 +257,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextContentStorage")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextContentStorage; #[cfg(feature = "AppKit_NSTextContentStorage")] diff --git a/AppKit/NSTextElement.rs b/AppKit/NSTextElement.rs index 8a6dd6d9c..4b7a8b72d 100644 --- a/AppKit/NSTextElement.rs +++ b/AppKit/NSTextElement.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextElement")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextElement; #[cfg(feature = "AppKit_NSTextElement")] @@ -49,12 +50,15 @@ extern_methods!( pub unsafe fn setElementRange(&self, element_range: Option<&NSTextRange>); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other childElements)] pub unsafe fn childElements(&self) -> Id>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other parentElement)] pub unsafe fn parentElement(&self) -> Option>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isRepresentedElement)] pub unsafe fn isRepresentedElement(&self) -> bool; } @@ -63,6 +67,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextParagraph")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextParagraph; #[cfg(feature = "AppKit_NSTextParagraph")] diff --git a/AppKit/NSTextField.rs b/AppKit/NSTextField.rs index 16e9ba75e..1a75a7b32 100644 --- a/AppKit/NSTextField.rs +++ b/AppKit/NSTextField.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextField")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTextField; #[cfg(feature = "AppKit_NSTextField")] @@ -57,18 +58,22 @@ extern_methods!( #[cfg(feature = "AppKit_NSTextField")] unsafe impl NSTextField { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholder_string: Option<&NSString>); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPlaceholderAttributedString:)] pub unsafe fn setPlaceholderAttributedString( &self, @@ -76,57 +81,74 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, draws_background: bool); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textColor)] pub unsafe fn textColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setTextColor:)] pub unsafe fn setTextColor(&self, text_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method(isBordered)] pub unsafe fn isBordered(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setBordered:)] pub unsafe fn setBordered(&self, bordered: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isBezeled)] pub unsafe fn isBezeled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setBezeled:)] pub unsafe fn setBezeled(&self, bezeled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isSelectable)] pub unsafe fn isSelectable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectable:)] pub unsafe fn setSelectable(&self, selectable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(selectText:)] pub unsafe fn selectText(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -134,58 +156,74 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSText")] + #[cfg(not(any(target_os = "ios")))] #[method(textShouldBeginEditing:)] pub unsafe fn textShouldBeginEditing(&self, text_object: &NSText) -> bool; #[cfg(feature = "AppKit_NSText")] + #[cfg(not(any(target_os = "ios")))] #[method(textShouldEndEditing:)] pub unsafe fn textShouldEndEditing(&self, text_object: &NSText) -> bool; #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[method(textDidBeginEditing:)] pub unsafe fn textDidBeginEditing(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[method(textDidEndEditing:)] pub unsafe fn textDidEndEditing(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[method(textDidChange:)] pub unsafe fn textDidChange(&self, notification: &NSNotification); + #[cfg(not(any(target_os = "ios")))] #[method(acceptsFirstResponder)] pub unsafe fn acceptsFirstResponder(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(bezelStyle)] pub unsafe fn bezelStyle(&self) -> NSTextFieldBezelStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setBezelStyle:)] pub unsafe fn setBezelStyle(&self, bezel_style: NSTextFieldBezelStyle); + #[cfg(not(any(target_os = "ios")))] #[method(preferredMaxLayoutWidth)] pub unsafe fn preferredMaxLayoutWidth(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setPreferredMaxLayoutWidth:)] pub unsafe fn setPreferredMaxLayoutWidth(&self, preferred_max_layout_width: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(maximumNumberOfLines)] pub unsafe fn maximumNumberOfLines(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setMaximumNumberOfLines:)] pub unsafe fn setMaximumNumberOfLines(&self, maximum_number_of_lines: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(allowsDefaultTighteningForTruncation)] pub unsafe fn allowsDefaultTighteningForTruncation(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsDefaultTighteningForTruncation:)] pub unsafe fn setAllowsDefaultTighteningForTruncation( &self, allows_default_tightening_for_truncation: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(lineBreakStrategy)] pub unsafe fn lineBreakStrategy(&self) -> NSLineBreakStrategy; + #[cfg(not(any(target_os = "ios")))] #[method(setLineBreakStrategy:)] pub unsafe fn setLineBreakStrategy(&self, line_break_strategy: NSLineBreakStrategy); } @@ -195,18 +233,22 @@ extern_methods!( /// NSTouchBar #[cfg(feature = "AppKit_NSTextField")] unsafe impl NSTextField { + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticTextCompletionEnabled)] pub unsafe fn isAutomaticTextCompletionEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticTextCompletionEnabled:)] pub unsafe fn setAutomaticTextCompletionEnabled( &self, automatic_text_completion_enabled: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(allowsCharacterPickerTouchBarItem)] pub unsafe fn allowsCharacterPickerTouchBarItem(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsCharacterPickerTouchBarItem:)] pub unsafe fn setAllowsCharacterPickerTouchBarItem( &self, @@ -220,20 +262,24 @@ extern_methods!( #[cfg(feature = "AppKit_NSTextField")] unsafe impl NSTextField { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelWithString:)] pub unsafe fn labelWithString(string_value: &NSString) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other wrappingLabelWithString:)] pub unsafe fn wrappingLabelWithString(string_value: &NSString) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelWithAttributedString:)] pub unsafe fn labelWithAttributedString( attributed_string_value: &NSAttributedString, ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textFieldWithString:)] pub unsafe fn textFieldWithString(string_value: &NSString) -> Id; } @@ -243,27 +289,33 @@ extern_methods!( /// NSTextFieldAttributedStringMethods #[cfg(feature = "AppKit_NSTextField")] unsafe impl NSTextField { + #[cfg(not(any(target_os = "ios")))] #[method(allowsEditingTextAttributes)] pub unsafe fn allowsEditingTextAttributes(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsEditingTextAttributes:)] pub unsafe fn setAllowsEditingTextAttributes(&self, allows_editing_text_attributes: bool); + #[cfg(not(any(target_os = "ios")))] #[method(importsGraphics)] pub unsafe fn importsGraphics(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setImportsGraphics:)] pub unsafe fn setImportsGraphics(&self, imports_graphics: bool); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTextFieldDelegate: NSControlTextEditingDelegate { #[cfg(all( feature = "AppKit_NSTextField", feature = "AppKit_NSTextView", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textField:textView:candidatesForSelectedRange:)] unsafe fn textField_textView_candidatesForSelectedRange( @@ -279,6 +331,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSTextCheckingResult" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textField:textView:candidates:forSelectedRange:)] unsafe fn textField_textView_candidates_forSelectedRange( @@ -290,6 +343,7 @@ extern_protocol!( ) -> Id>; #[cfg(all(feature = "AppKit_NSTextField", feature = "AppKit_NSTextView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textField:textView:shouldSelectCandidateAtIndex:)] unsafe fn textField_textView_shouldSelectCandidateAtIndex( @@ -309,6 +363,7 @@ extern_methods!( unsafe impl NSTextField { #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, string_with_ampersand: Option<&NSString>); } @@ -318,6 +373,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSTextField")] unsafe impl NSTextField { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSTextFieldCell.rs b/AppKit/NSTextFieldCell.rs index aee5c9ece..3f353c0cb 100644 --- a/AppKit/NSTextFieldCell.rs +++ b/AppKit/NSTextFieldCell.rs @@ -7,8 +7,11 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTextFieldBezelStyle { + #[cfg(not(any(target_os = "ios")))] NSTextFieldSquareBezel = 0, + #[cfg(not(any(target_os = "ios")))] NSTextFieldRoundedBezel = 1, } ); @@ -16,6 +19,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextFieldCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTextFieldCell; #[cfg(feature = "AppKit_NSTextFieldCell")] @@ -44,14 +48,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSTextFieldCell")] unsafe impl NSTextFieldCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, @@ -59,64 +66,80 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, draws_background: bool); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textColor)] pub unsafe fn textColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setTextColor:)] pub unsafe fn setTextColor(&self, text_color: Option<&NSColor>); #[cfg(feature = "AppKit_NSText")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other setUpFieldEditorAttributes:)] pub unsafe fn setUpFieldEditorAttributes(&self, text_obj: &NSText) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(bezelStyle)] pub unsafe fn bezelStyle(&self) -> NSTextFieldBezelStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setBezelStyle:)] pub unsafe fn setBezelStyle(&self, bezel_style: NSTextFieldBezelStyle); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholder_string: Option<&NSString>); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setPlaceholderAttributedString:)] pub unsafe fn setPlaceholderAttributedString( &self, placeholder_attributed_string: Option<&NSAttributedString>, ); + #[cfg(not(any(target_os = "ios")))] #[method(setWantsNotificationForMarkedText:)] pub unsafe fn setWantsNotificationForMarkedText(&self, flag: bool); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other allowedInputSourceLocales)] pub unsafe fn allowedInputSourceLocales(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setAllowedInputSourceLocales:)] pub unsafe fn setAllowedInputSourceLocales( &self, diff --git a/AppKit/NSTextFinder.rs b/AppKit/NSTextFinder.rs index 1a36aacb6..3f419c953 100644 --- a/AppKit/NSTextFinder.rs +++ b/AppKit/NSTextFinder.rs @@ -7,19 +7,33 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTextFinderAction { + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionShowFindInterface = 1, + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionNextMatch = 2, + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionPreviousMatch = 3, + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionReplaceAll = 4, + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionReplace = 5, + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionReplaceAndFind = 6, + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionSetSearchString = 7, + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionReplaceAllInSelection = 8, + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionSelectAll = 9, + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionSelectAllInSelection = 10, + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionHideFindInterface = 11, + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionShowReplaceInterface = 12, + #[cfg(not(any(target_os = "ios")))] NSTextFinderActionHideReplaceInterface = 13, } ); @@ -34,10 +48,15 @@ extern_static!(NSTextFinderMatchingTypeKey: &'static NSPasteboardTypeTextFinderO ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTextFinderMatchingType { + #[cfg(not(any(target_os = "ios")))] NSTextFinderMatchingTypeContains = 0, + #[cfg(not(any(target_os = "ios")))] NSTextFinderMatchingTypeStartsWith = 1, + #[cfg(not(any(target_os = "ios")))] NSTextFinderMatchingTypeFullWord = 2, + #[cfg(not(any(target_os = "ios")))] NSTextFinderMatchingTypeEndsWith = 3, } ); @@ -45,6 +64,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextFinder")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTextFinder; #[cfg(feature = "AppKit_NSTextFinder")] @@ -62,54 +82,69 @@ unsafe impl NSObjectProtocol for NSTextFinder {} extern_methods!( #[cfg(feature = "AppKit_NSTextFinder")] unsafe impl NSTextFinder { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other client)] pub unsafe fn client(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setClient:)] pub unsafe fn setClient(&self, client: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[method(performAction:)] pub unsafe fn performAction(&self, op: NSTextFinderAction); + #[cfg(not(any(target_os = "ios")))] #[method(validateAction:)] pub unsafe fn validateAction(&self, op: NSTextFinderAction) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other findBarContainer)] pub unsafe fn findBarContainer( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setFindBarContainer:)] pub unsafe fn setFindBarContainer( &self, find_bar_container: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(cancelFindIndicator)] pub unsafe fn cancelFindIndicator(&self); + #[cfg(not(any(target_os = "ios")))] #[method(findIndicatorNeedsUpdate)] pub unsafe fn findIndicatorNeedsUpdate(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setFindIndicatorNeedsUpdate:)] pub unsafe fn setFindIndicatorNeedsUpdate(&self, find_indicator_needs_update: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isIncrementalSearchingEnabled)] pub unsafe fn isIncrementalSearchingEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setIncrementalSearchingEnabled:)] pub unsafe fn setIncrementalSearchingEnabled(&self, incremental_searching_enabled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(incrementalSearchingShouldDimContentView)] pub unsafe fn incrementalSearchingShouldDimContentView(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setIncrementalSearchingShouldDimContentView:)] pub unsafe fn setIncrementalSearchingShouldDimContentView( &self, @@ -117,37 +152,46 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other incrementalMatchRanges)] pub unsafe fn incrementalMatchRanges(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(drawIncrementalMatchHighlightInRect:)] pub unsafe fn drawIncrementalMatchHighlightInRect(rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(noteClientStringWillChange)] pub unsafe fn noteClientStringWillChange(&self); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTextFinderClient: NSObjectProtocol { + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(isSelectable)] unsafe fn isSelectable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(allowsMultipleSelection)] unsafe fn allowsMultipleSelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(isEditable)] unsafe fn isEditable(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other string)] unsafe fn string(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other stringAtIndex:effectiveRange:endsWithSearchBoundary:)] unsafe fn stringAtIndex_effectiveRange_endsWithSearchBoundary( @@ -157,24 +201,29 @@ extern_protocol!( out_flag: NonNull, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(stringLength)] unsafe fn stringLength(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(firstSelectedRange)] unsafe fn firstSelectedRange(&self) -> NSRange; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other selectedRanges)] unsafe fn selectedRanges(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(setSelectedRanges:)] unsafe fn setSelectedRanges(&self, selected_ranges: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(scrollRangeToVisible:)] unsafe fn scrollRangeToVisible(&self, range: NSRange); @@ -184,6 +233,7 @@ extern_protocol!( feature = "Foundation_NSString", feature = "Foundation_NSValue" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(shouldReplaceCharactersInRanges:withStrings:)] unsafe fn shouldReplaceCharactersInRanges_withStrings( @@ -193,15 +243,18 @@ extern_protocol!( ) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(replaceCharactersInRange:withString:)] unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, string: &NSString); + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(didReplaceCharacters)] unsafe fn didReplaceCharacters(&self); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other contentViewAtIndex:effectiveCharacterRange:)] unsafe fn contentViewAtIndex_effectiveCharacterRange( @@ -211,16 +264,19 @@ extern_protocol!( ) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other rectsForCharacterRange:)] unsafe fn rectsForCharacterRange(&self, range: NSRange) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other visibleCharacterRanges)] unsafe fn visibleCharacterRanges(&self) -> Id>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(drawCharactersInRange:forContentView:)] unsafe fn drawCharactersInRange_forContentView(&self, range: NSRange, view: &NSView); @@ -230,25 +286,32 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTextFinderBarContainer: NSObjectProtocol { #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other findBarView)] unsafe fn findBarView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setFindBarView:)] unsafe fn setFindBarView(&self, find_bar_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(isFindBarVisible)] unsafe fn isFindBarVisible(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setFindBarVisible:)] unsafe fn setFindBarVisible(&self, find_bar_visible: bool); + #[cfg(not(any(target_os = "ios")))] #[method(findBarViewDidChangeHeight)] unsafe fn findBarViewDidChangeHeight(&self); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other contentView)] unsafe fn contentView(&self) -> Option>; diff --git a/AppKit/NSTextInputClient.rs b/AppKit/NSTextInputClient.rs index 7d5712e71..7701660ae 100644 --- a/AppKit/NSTextInputClient.rs +++ b/AppKit/NSTextInputClient.rs @@ -6,13 +6,17 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTextInputClient { + #[cfg(not(any(target_os = "ios")))] #[method(insertText:replacementRange:)] unsafe fn insertText_replacementRange(&self, string: &Object, replacement_range: NSRange); + #[cfg(not(any(target_os = "ios")))] #[method(doCommandBySelector:)] unsafe fn doCommandBySelector(&self, selector: Sel); + #[cfg(not(any(target_os = "ios")))] #[method(setMarkedText:selectedRange:replacementRange:)] unsafe fn setMarkedText_selectedRange_replacementRange( &self, @@ -21,19 +25,24 @@ extern_protocol!( replacement_range: NSRange, ); + #[cfg(not(any(target_os = "ios")))] #[method(unmarkText)] unsafe fn unmarkText(&self); + #[cfg(not(any(target_os = "ios")))] #[method(selectedRange)] unsafe fn selectedRange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(markedRange)] unsafe fn markedRange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(hasMarkedText)] unsafe fn hasMarkedText(&self) -> bool; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedSubstringForProposedRange:actualRange:)] unsafe fn attributedSubstringForProposedRange_actualRange( &self, @@ -42,9 +51,11 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other validAttributesForMarkedText)] unsafe fn validAttributesForMarkedText(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(firstRectForCharacterRange:actualRange:)] unsafe fn firstRectForCharacterRange_actualRange( &self, @@ -52,26 +63,32 @@ extern_protocol!( actual_range: NSRangePointer, ) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(characterIndexForPoint:)] unsafe fn characterIndexForPoint(&self, point: NSPoint) -> NSUInteger; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other attributedString)] unsafe fn attributedString(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(fractionOfDistanceThroughGlyphForPoint:)] unsafe fn fractionOfDistanceThroughGlyphForPoint(&self, point: NSPoint) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(baselineDeltaForCharacterAtIndex:)] unsafe fn baselineDeltaForCharacterAtIndex(&self, an_index: NSUInteger) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowLevel)] unsafe fn windowLevel(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(drawsVerticallyForCharacterAtIndex:)] unsafe fn drawsVerticallyForCharacterAtIndex(&self, char_index: NSUInteger) -> bool; diff --git a/AppKit/NSTextInputContext.rs b/AppKit/NSTextInputContext.rs index 2eb1a4ada..4a2d9e4ac 100644 --- a/AppKit/NSTextInputContext.rs +++ b/AppKit/NSTextInputContext.rs @@ -10,6 +10,7 @@ pub type NSTextInputSourceIdentifier = NSString; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextInputContext")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTextInputContext; #[cfg(feature = "AppKit_NSTextInputContext")] @@ -24,64 +25,80 @@ unsafe impl NSObjectProtocol for NSTextInputContext {} extern_methods!( #[cfg(feature = "AppKit_NSTextInputContext")] unsafe impl NSTextInputContext { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentInputContext)] pub unsafe fn currentInputContext() -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithClient:)] pub unsafe fn initWithClient( this: Option>, client: &ProtocolObject, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other client)] pub unsafe fn client(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(acceptsGlyphInfo)] pub unsafe fn acceptsGlyphInfo(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAcceptsGlyphInfo:)] pub unsafe fn setAcceptsGlyphInfo(&self, accepts_glyph_info: bool); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other allowedInputSourceLocales)] pub unsafe fn allowedInputSourceLocales(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setAllowedInputSourceLocales:)] pub unsafe fn setAllowedInputSourceLocales( &self, allowed_input_source_locales: Option<&NSArray>, ); + #[cfg(not(any(target_os = "ios")))] #[method(activate)] pub unsafe fn activate(&self); + #[cfg(not(any(target_os = "ios")))] #[method(deactivate)] pub unsafe fn deactivate(&self); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(handleEvent:)] pub unsafe fn handleEvent(&self, event: &NSEvent) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(discardMarkedText)] pub unsafe fn discardMarkedText(&self); + #[cfg(not(any(target_os = "ios")))] #[method(invalidateCharacterCoordinates)] pub unsafe fn invalidateCharacterCoordinates(&self); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other keyboardInputSources)] pub unsafe fn keyboardInputSources( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedKeyboardInputSource)] pub unsafe fn selectedKeyboardInputSource(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedKeyboardInputSource:)] pub unsafe fn setSelectedKeyboardInputSource( &self, @@ -89,6 +106,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedNameForInputSource:)] pub unsafe fn localizedNameForInputSource( input_source_identifier: &NSTextInputSourceIdentifier, diff --git a/AppKit/NSTextLayoutFragment.rs b/AppKit/NSTextLayoutFragment.rs index d73381586..0282ae71d 100644 --- a/AppKit/NSTextLayoutFragment.rs +++ b/AppKit/NSTextLayoutFragment.rs @@ -7,21 +7,32 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSTextLayoutFragmentEnumerationOptions { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutFragmentEnumerationOptionsNone = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutFragmentEnumerationOptionsReverse = 1 << 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutFragmentEnumerationOptionsEstimatesSize = 1 << 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutFragmentEnumerationOptionsEnsuresLayout = 1 << 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutFragmentEnumerationOptionsEnsuresExtraLineFragment = 1 << 3, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSTextLayoutFragmentState { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutFragmentStateNone = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutFragmentStateEstimatedUsageBounds = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutFragmentStateCalculatedUsageBounds = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutFragmentStateLayoutAvailable = 3, } ); @@ -29,6 +40,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextLayoutFragment")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextLayoutFragment; #[cfg(feature = "AppKit_NSTextLayoutFragment")] diff --git a/AppKit/NSTextLayoutManager.rs b/AppKit/NSTextLayoutManager.rs index 303452687..682c97bdf 100644 --- a/AppKit/NSTextLayoutManager.rs +++ b/AppKit/NSTextLayoutManager.rs @@ -7,21 +7,32 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSTextLayoutManagerSegmentType { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutManagerSegmentTypeStandard = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutManagerSegmentTypeSelection = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutManagerSegmentTypeHighlight = 2, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSTextLayoutManagerSegmentOptions { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutManagerSegmentOptionsNone = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutManagerSegmentOptionsRangeNotRequired = 1 << 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutManagerSegmentOptionsMiddleFragmentsExcluded = 1 << 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutManagerSegmentOptionsHeadSegmentExtended = 1 << 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutManagerSegmentOptionsTailSegmentExtended = 1 << 3, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextLayoutManagerSegmentOptionsUpstreamAffinity = 1 << 4, } ); @@ -29,6 +40,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextLayoutManager")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextLayoutManager; #[cfg(feature = "AppKit_NSTextLayoutManager")] @@ -286,6 +298,7 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSTextLayoutManagerDelegate: NSObjectProtocol { #[cfg(all( feature = "AppKit_NSTextElement", diff --git a/AppKit/NSTextLineFragment.rs b/AppKit/NSTextLineFragment.rs index a77710e7c..97782fb13 100644 --- a/AppKit/NSTextLineFragment.rs +++ b/AppKit/NSTextLineFragment.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextLineFragment")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextLineFragment; #[cfg(feature = "AppKit_NSTextLineFragment")] diff --git a/AppKit/NSTextList.rs b/AppKit/NSTextList.rs index a9fd3739d..8a7677a2a 100644 --- a/AppKit/NSTextList.rs +++ b/AppKit/NSTextList.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] pub enum NSTextListOptions { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextListPrependEnclosingMarker = 1 << 0, } ); @@ -53,6 +54,7 @@ extern_static!(NSTextListMarkerDecimal: &'static NSTextListMarkerFormat); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextList")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextList; #[cfg(feature = "AppKit_NSTextList")] @@ -73,6 +75,7 @@ unsafe impl NSSecureCoding for NSTextList {} extern_methods!( #[cfg(feature = "AppKit_NSTextList")] unsafe impl NSTextList { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithMarkerFormat:options:startingItemNumber:)] pub unsafe fn initWithMarkerFormat_options_startingItemNumber( this: Option>, @@ -107,6 +110,7 @@ extern_methods!( #[method(setStartingItemNumber:)] pub unsafe fn setStartingItemNumber(&self, starting_item_number: NSInteger); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isOrdered)] pub unsafe fn isOrdered(&self) -> bool; diff --git a/AppKit/NSTextListElement.rs b/AppKit/NSTextListElement.rs index c493ce63f..0b4460191 100644 --- a/AppKit/NSTextListElement.rs +++ b/AppKit/NSTextListElement.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextListElement")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextListElement; #[cfg(feature = "AppKit_NSTextListElement")] diff --git a/AppKit/NSTextRange.rs b/AppKit/NSTextRange.rs index 788d6a75a..16a41c871 100644 --- a/AppKit/NSTextRange.rs +++ b/AppKit/NSTextRange.rs @@ -6,7 +6,9 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSTextLocation: NSObjectProtocol { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(compare:)] unsafe fn compare( &self, @@ -20,6 +22,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextRange")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextRange; #[cfg(feature = "AppKit_NSTextRange")] diff --git a/AppKit/NSTextSelection.rs b/AppKit/NSTextSelection.rs index cf0784676..41eb1ea26 100644 --- a/AppKit/NSTextSelection.rs +++ b/AppKit/NSTextSelection.rs @@ -7,19 +7,28 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSTextSelectionGranularity { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionGranularityCharacter = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionGranularityWord = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionGranularityParagraph = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionGranularityLine = 3, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionGranularitySentence = 4, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSTextSelectionAffinity { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionAffinityUpstream = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionAffinityDownstream = 1, } ); @@ -27,6 +36,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextSelection")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextSelection; #[cfg(feature = "AppKit_NSTextSelection")] diff --git a/AppKit/NSTextSelectionNavigation.rs b/AppKit/NSTextSelectionNavigation.rs index 3995dcaf3..116e40cc4 100644 --- a/AppKit/NSTextSelectionNavigation.rs +++ b/AppKit/NSTextSelectionNavigation.rs @@ -7,50 +7,75 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSTextSelectionNavigationDirection { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDirectionForward = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDirectionBackward = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDirectionRight = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDirectionLeft = 3, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDirectionUp = 4, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDirectionDown = 5, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSTextSelectionNavigationDestination { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDestinationCharacter = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDestinationWord = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDestinationLine = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDestinationSentence = 3, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDestinationParagraph = 4, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDestinationContainer = 5, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationDestinationDocument = 6, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSTextSelectionNavigationModifier { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationModifierExtend = 1 << 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationModifierVisual = 1 << 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationModifierMultiple = 1 << 2, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSTextSelectionNavigationWritingDirection { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationWritingDirectionLeftToRight = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationWritingDirectionRightToLeft = 1, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSTextSelectionNavigationLayoutOrientation { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationLayoutOrientationHorizontal = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTextSelectionNavigationLayoutOrientationVertical = 1, } ); @@ -58,6 +83,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextSelectionNavigation")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextSelectionNavigation; #[cfg(feature = "AppKit_NSTextSelectionNavigation")] @@ -172,6 +198,7 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSTextSelectionDataSource: NSObjectProtocol { #[cfg(feature = "AppKit_NSTextRange")] #[method_id(@__retain_semantics Other documentRange)] diff --git a/AppKit/NSTextStorage.rs b/AppKit/NSTextStorage.rs index 970672a73..3db5179e4 100644 --- a/AppKit/NSTextStorage.rs +++ b/AppKit/NSTextStorage.rs @@ -87,11 +87,13 @@ extern_methods!( #[method(ensureAttributesAreFixedInRange:)] pub unsafe fn ensureAttributesAreFixedInRange(&self, range: NSRange); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other textStorageObserver)] pub unsafe fn textStorageObserver( &self, ) -> Option>>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setTextStorageObserver:)] pub unsafe fn setTextStorageObserver( &self, @@ -133,6 +135,7 @@ extern_static!(NSTextStorageWillProcessEditingNotification: &'static NSNotificat extern_static!(NSTextStorageDidProcessEditingNotification: &'static NSNotificationName); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSTextStorageObserving: NSObjectProtocol { #[cfg(feature = "AppKit_NSTextStorage")] #[method_id(@__retain_semantics Other textStorage)] diff --git a/AppKit/NSTextView.rs b/AppKit/NSTextView.rs index a9274207f..3f5dc2f94 100644 --- a/AppKit/NSTextView.rs +++ b/AppKit/NSTextView.rs @@ -7,17 +7,24 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSelectionGranularity { + #[cfg(not(any(target_os = "ios")))] NSSelectByCharacter = 0, + #[cfg(not(any(target_os = "ios")))] NSSelectByWord = 1, + #[cfg(not(any(target_os = "ios")))] NSSelectByParagraph = 2, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSelectionAffinity { + #[cfg(not(any(target_os = "ios")))] NSSelectionAffinityUpstream = 0, + #[cfg(not(any(target_os = "ios")))] NSSelectionAffinityDownstream = 1, } ); @@ -27,6 +34,7 @@ extern_static!(NSAllRomanInputSourcesLocaleIdentifier: &'static NSString); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTextView; #[cfg(feature = "AppKit_NSTextView")] @@ -103,6 +111,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSTextView")] unsafe impl NSTextView { #[cfg(feature = "AppKit_NSTextContainer")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:textContainer:)] pub unsafe fn initWithFrame_textContainer( this: Option>, @@ -111,74 +120,93 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initUsingTextLayoutManager:)] pub unsafe fn initUsingTextLayoutManager( this: Option>, using_text_layout_manager: bool, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textViewUsingTextLayoutManager:)] pub unsafe fn textViewUsingTextLayoutManager(using_text_layout_manager: bool) -> Id; #[cfg(feature = "AppKit_NSTextContainer")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textContainer)] pub unsafe fn textContainer(&self) -> Option>; #[cfg(feature = "AppKit_NSTextContainer")] + #[cfg(not(any(target_os = "ios")))] #[method(setTextContainer:)] pub unsafe fn setTextContainer(&self, text_container: Option<&NSTextContainer>); #[cfg(feature = "AppKit_NSTextContainer")] + #[cfg(not(any(target_os = "ios")))] #[method(replaceTextContainer:)] pub unsafe fn replaceTextContainer(&self, new_container: &NSTextContainer); + #[cfg(not(any(target_os = "ios")))] #[method(textContainerInset)] pub unsafe fn textContainerInset(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setTextContainerInset:)] pub unsafe fn setTextContainerInset(&self, text_container_inset: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(textContainerOrigin)] pub unsafe fn textContainerOrigin(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(invalidateTextContainerOrigin)] pub unsafe fn invalidateTextContainerOrigin(&self); #[cfg(feature = "AppKit_NSLayoutManager")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutManager)] pub unsafe fn layoutManager(&self) -> Option>; #[cfg(feature = "AppKit_NSTextStorage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textStorage)] pub unsafe fn textStorage(&self) -> Option>; #[cfg(feature = "AppKit_NSTextLayoutManager")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; #[cfg(feature = "AppKit_NSTextContentStorage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textContentStorage)] pub unsafe fn textContentStorage(&self) -> Option>; #[deprecated = "Use -insertText:replacementRange: from NSTextInputClient instead. Since the method is designed to be used solely by the input system, the message should never be sent to a text view from applications. Any content modifications should be via either NSTextStorage or NSText methods."] + #[cfg(not(any(target_os = "ios")))] #[method(insertText:)] pub unsafe fn insertText(&self, insert_string: &Object); + #[cfg(not(any(target_os = "ios")))] #[method(setConstrainedFrameSize:)] pub unsafe fn setConstrainedFrameSize(&self, desired_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(setAlignment:range:)] pub unsafe fn setAlignment_range(&self, alignment: NSTextAlignment, range: NSRange); + #[cfg(not(any(target_os = "ios")))] #[method(setBaseWritingDirection:range:)] pub unsafe fn setBaseWritingDirection_range( &self, @@ -186,80 +214,104 @@ extern_methods!( range: NSRange, ); + #[cfg(not(any(target_os = "ios")))] #[method(turnOffKerning:)] pub unsafe fn turnOffKerning(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(tightenKerning:)] pub unsafe fn tightenKerning(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(loosenKerning:)] pub unsafe fn loosenKerning(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(useStandardKerning:)] pub unsafe fn useStandardKerning(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(turnOffLigatures:)] pub unsafe fn turnOffLigatures(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(useStandardLigatures:)] pub unsafe fn useStandardLigatures(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(useAllLigatures:)] pub unsafe fn useAllLigatures(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(raiseBaseline:)] pub unsafe fn raiseBaseline(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(lowerBaseline:)] pub unsafe fn lowerBaseline(&self, sender: Option<&Object>); #[deprecated = "Use the traditional shaped characters encoded in the Unicode standard. Access the characters via the character palette."] + #[cfg(not(any(target_os = "ios")))] #[method(toggleTraditionalCharacterShape:)] pub unsafe fn toggleTraditionalCharacterShape(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(outline:)] pub unsafe fn outline(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(performFindPanelAction:)] pub unsafe fn performFindPanelAction(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(alignJustified:)] pub unsafe fn alignJustified(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(changeColor:)] pub unsafe fn changeColor(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(changeAttributes:)] pub unsafe fn changeAttributes(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(changeDocumentBackgroundColor:)] pub unsafe fn changeDocumentBackgroundColor(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontSpacingPanel:)] pub unsafe fn orderFrontSpacingPanel(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontLinkPanel:)] pub unsafe fn orderFrontLinkPanel(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontListPanel:)] pub unsafe fn orderFrontListPanel(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontTablePanel:)] pub unsafe fn orderFrontTablePanel(&self, sender: Option<&Object>); #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:didMoveMarker:)] pub unsafe fn rulerView_didMoveMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:didRemoveMarker:)] pub unsafe fn rulerView_didRemoveMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:didAddMarker:)] pub unsafe fn rulerView_didAddMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:shouldMoveMarker:)] pub unsafe fn rulerView_shouldMoveMarker( &self, @@ -268,6 +320,7 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:shouldAddMarker:)] pub unsafe fn rulerView_shouldAddMarker( &self, @@ -276,6 +329,7 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:willMoveMarker:toLocation:)] pub unsafe fn rulerView_willMoveMarker_toLocation( &self, @@ -285,6 +339,7 @@ extern_methods!( ) -> CGFloat; #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:shouldRemoveMarker:)] pub unsafe fn rulerView_shouldRemoveMarker( &self, @@ -293,6 +348,7 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "AppKit_NSRulerMarker", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:willAddMarker:atLocation:)] pub unsafe fn rulerView_willAddMarker_atLocation( &self, @@ -302,16 +358,20 @@ extern_methods!( ) -> CGFloat; #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSRulerView"))] + #[cfg(not(any(target_os = "ios")))] #[method(rulerView:handleMouseDown:)] pub unsafe fn rulerView_handleMouseDown(&self, ruler: &NSRulerView, event: &NSEvent); + #[cfg(not(any(target_os = "ios")))] #[method(setNeedsDisplayInRect:avoidAdditionalLayout:)] pub unsafe fn setNeedsDisplayInRect_avoidAdditionalLayout(&self, rect: NSRect, flag: bool); + #[cfg(not(any(target_os = "ios")))] #[method(shouldDrawInsertionPoint)] pub unsafe fn shouldDrawInsertionPoint(&self) -> bool; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(drawInsertionPointInRect:color:turnedOn:)] pub unsafe fn drawInsertionPointInRect_color_turnedOn( &self, @@ -320,18 +380,23 @@ extern_methods!( flag: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(drawViewBackgroundInRect:)] pub unsafe fn drawViewBackgroundInRect(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(updateRuler)] pub unsafe fn updateRuler(&self); + #[cfg(not(any(target_os = "ios")))] #[method(updateFontPanel)] pub unsafe fn updateFontPanel(&self); + #[cfg(not(any(target_os = "ios")))] #[method(updateDragTypeRegistration)] pub unsafe fn updateDragTypeRegistration(&self); + #[cfg(not(any(target_os = "ios")))] #[method(selectionRangeForProposedRange:granularity:)] pub unsafe fn selectionRangeForProposedRange_granularity( &self, @@ -339,28 +404,36 @@ extern_methods!( granularity: NSSelectionGranularity, ) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(clickedOnLink:atIndex:)] pub unsafe fn clickedOnLink_atIndex(&self, link: &Object, char_index: NSUInteger); + #[cfg(not(any(target_os = "ios")))] #[method(startSpeaking:)] pub unsafe fn startSpeaking(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(stopSpeaking:)] pub unsafe fn stopSpeaking(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(setLayoutOrientation:)] pub unsafe fn setLayoutOrientation(&self, orientation: NSTextLayoutOrientation); + #[cfg(not(any(target_os = "ios")))] #[method(changeLayoutOrientation:)] pub unsafe fn changeLayoutOrientation(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(characterIndexForInsertionAtPoint:)] pub unsafe fn characterIndexForInsertionAtPoint(&self, point: NSPoint) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(stronglyReferencesTextStorage)] pub unsafe fn stronglyReferencesTextStorage() -> bool; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(performValidatedReplacementInRange:withAttributedString:)] pub unsafe fn performValidatedReplacementInRange_withAttributedString( &self, @@ -368,9 +441,11 @@ extern_methods!( attributed_string: &NSAttributedString, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(usesAdaptiveColorMappingForDarkAppearance)] pub unsafe fn usesAdaptiveColorMappingForDarkAppearance(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesAdaptiveColorMappingForDarkAppearance:)] pub unsafe fn setUsesAdaptiveColorMappingForDarkAppearance( &self, @@ -383,13 +458,16 @@ extern_methods!( /// NSCompletion #[cfg(feature = "AppKit_NSTextView")] unsafe impl NSTextView { + #[cfg(not(any(target_os = "ios")))] #[method(complete:)] pub unsafe fn complete(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(rangeForUserCompletion)] pub unsafe fn rangeForUserCompletion(&self) -> NSRange; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other completionsForPartialWordRange:indexOfSelectedItem:)] pub unsafe fn completionsForPartialWordRange_indexOfSelectedItem( &self, @@ -398,6 +476,7 @@ extern_methods!( ) -> Option>>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(insertCompletion:forPartialWordRange:movement:isFinal:)] pub unsafe fn insertCompletion_forPartialWordRange_movement_isFinal( &self, @@ -414,10 +493,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSTextView")] unsafe impl NSTextView { #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other writablePasteboardTypes)] pub unsafe fn writablePasteboardTypes(&self) -> Id>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method(writeSelectionToPasteboard:type:)] pub unsafe fn writeSelectionToPasteboard_type( &self, @@ -426,6 +507,7 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "AppKit_NSPasteboard", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(writeSelectionToPasteboard:types:)] pub unsafe fn writeSelectionToPasteboard_types( &self, @@ -434,10 +516,12 @@ extern_methods!( ) -> bool; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other readablePasteboardTypes)] pub unsafe fn readablePasteboardTypes(&self) -> Id>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other preferredPasteboardTypeFromArray:restrictedToTypesFromArray:)] pub unsafe fn preferredPasteboardTypeFromArray_restrictedToTypesFromArray( &self, @@ -446,6 +530,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method(readSelectionFromPasteboard:type:)] pub unsafe fn readSelectionFromPasteboard_type( &self, @@ -454,12 +539,15 @@ extern_methods!( ) -> bool; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method(readSelectionFromPasteboard:)] pub unsafe fn readSelectionFromPasteboard(&self, pboard: &NSPasteboard) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(registerForServices)] pub unsafe fn registerForServices(); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other validRequestorForSendType:returnType:)] pub unsafe fn validRequestorForSendType_returnType( &self, @@ -467,9 +555,11 @@ extern_methods!( return_type: Option<&NSPasteboardType>, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(pasteAsPlainText:)] pub unsafe fn pasteAsPlainText(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(pasteAsRichText:)] pub unsafe fn pasteAsRichText(&self, sender: Option<&Object>); } @@ -480,6 +570,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSTextView")] unsafe impl NSTextView { #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(dragSelectionWithEvent:offset:slideBack:)] pub unsafe fn dragSelectionWithEvent_offset_slideBack( &self, @@ -489,6 +580,7 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSImage"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dragImageForSelectionWithEvent:origin:)] pub unsafe fn dragImageForSelectionWithEvent_origin( &self, @@ -497,9 +589,11 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other acceptableDragTypes)] pub unsafe fn acceptableDragTypes(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(dragOperationForDraggingInfo:type:)] pub unsafe fn dragOperationForDraggingInfo_type( &self, @@ -507,6 +601,7 @@ extern_methods!( r#type: &NSPasteboardType, ) -> NSDragOperation; + #[cfg(not(any(target_os = "ios")))] #[method(cleanUpAfterDragOperation)] pub unsafe fn cleanUpAfterDragOperation(&self); } @@ -517,14 +612,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSTextView")] unsafe impl NSTextView { #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedRanges)] pub unsafe fn selectedRanges(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedRanges:)] pub unsafe fn setSelectedRanges(&self, selected_ranges: &NSArray); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedRanges:affinity:stillSelecting:)] pub unsafe fn setSelectedRanges_affinity_stillSelecting( &self, @@ -533,6 +631,7 @@ extern_methods!( still_selecting_flag: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedRange:affinity:stillSelecting:)] pub unsafe fn setSelectedRange_affinity_stillSelecting( &self, @@ -541,22 +640,27 @@ extern_methods!( still_selecting_flag: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(selectionAffinity)] pub unsafe fn selectionAffinity(&self) -> NSSelectionAffinity; + #[cfg(not(any(target_os = "ios")))] #[method(selectionGranularity)] pub unsafe fn selectionGranularity(&self) -> NSSelectionGranularity; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionGranularity:)] pub unsafe fn setSelectionGranularity(&self, selection_granularity: NSSelectionGranularity); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedTextAttributes)] pub unsafe fn selectedTextAttributes( &self, ) -> Id>; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedTextAttributes:)] pub unsafe fn setSelectedTextAttributes( &self, @@ -564,23 +668,28 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other insertionPointColor)] pub unsafe fn insertionPointColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setInsertionPointColor:)] pub unsafe fn setInsertionPointColor(&self, insertion_point_color: &NSColor); + #[cfg(not(any(target_os = "ios")))] #[method(updateInsertionPointStateAndRestartTimer:)] pub unsafe fn updateInsertionPointStateAndRestartTimer(&self, restart_flag: bool); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other markedTextAttributes)] pub unsafe fn markedTextAttributes( &self, ) -> Option>>; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(setMarkedTextAttributes:)] pub unsafe fn setMarkedTextAttributes( &self, @@ -588,74 +697,94 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other linkTextAttributes)] pub unsafe fn linkTextAttributes( &self, ) -> Option>>; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(setLinkTextAttributes:)] pub unsafe fn setLinkTextAttributes( &self, link_text_attributes: Option<&NSDictionary>, ); + #[cfg(not(any(target_os = "ios")))] #[method(displaysLinkToolTips)] pub unsafe fn displaysLinkToolTips(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDisplaysLinkToolTips:)] pub unsafe fn setDisplaysLinkToolTips(&self, displays_link_tool_tips: bool); + #[cfg(not(any(target_os = "ios")))] #[method(acceptsGlyphInfo)] pub unsafe fn acceptsGlyphInfo(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAcceptsGlyphInfo:)] pub unsafe fn setAcceptsGlyphInfo(&self, accepts_glyph_info: bool); + #[cfg(not(any(target_os = "ios")))] #[method(usesRuler)] pub unsafe fn usesRuler(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesRuler:)] pub unsafe fn setUsesRuler(&self, uses_ruler: bool); + #[cfg(not(any(target_os = "ios")))] #[method(usesInspectorBar)] pub unsafe fn usesInspectorBar(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesInspectorBar:)] pub unsafe fn setUsesInspectorBar(&self, uses_inspector_bar: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isContinuousSpellCheckingEnabled)] pub unsafe fn isContinuousSpellCheckingEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setContinuousSpellCheckingEnabled:)] pub unsafe fn setContinuousSpellCheckingEnabled( &self, continuous_spell_checking_enabled: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(toggleContinuousSpellChecking:)] pub unsafe fn toggleContinuousSpellChecking(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(spellCheckerDocumentTag)] pub unsafe fn spellCheckerDocumentTag(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(isGrammarCheckingEnabled)] pub unsafe fn isGrammarCheckingEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setGrammarCheckingEnabled:)] pub unsafe fn setGrammarCheckingEnabled(&self, grammar_checking_enabled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(toggleGrammarChecking:)] pub unsafe fn toggleGrammarChecking(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(setSpellingState:range:)] pub unsafe fn setSpellingState_range(&self, value: NSInteger, char_range: NSRange); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other typingAttributes)] pub unsafe fn typingAttributes(&self) -> Id>; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(setTypingAttributes:)] pub unsafe fn setTypingAttributes( &self, @@ -667,6 +796,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSValue" ))] + #[cfg(not(any(target_os = "ios")))] #[method(shouldChangeTextInRanges:replacementStrings:)] pub unsafe fn shouldChangeTextInRanges_replacementStrings( &self, @@ -675,18 +805,22 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other rangesForUserTextChange)] pub unsafe fn rangesForUserTextChange(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other rangesForUserCharacterAttributeChange)] pub unsafe fn rangesForUserCharacterAttributeChange(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other rangesForUserParagraphAttributeChange)] pub unsafe fn rangesForUserParagraphAttributeChange(&self) -> Option>>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(shouldChangeTextInRange:replacementString:)] pub unsafe fn shouldChangeTextInRange_replacementString( &self, @@ -694,21 +828,27 @@ extern_methods!( replacement_string: Option<&NSString>, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(didChangeText)] pub unsafe fn didChangeText(&self); + #[cfg(not(any(target_os = "ios")))] #[method(rangeForUserTextChange)] pub unsafe fn rangeForUserTextChange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(rangeForUserCharacterAttributeChange)] pub unsafe fn rangeForUserCharacterAttributeChange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(rangeForUserParagraphAttributeChange)] pub unsafe fn rangeForUserParagraphAttributeChange(&self) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(allowsDocumentBackgroundColorChange)] pub unsafe fn allowsDocumentBackgroundColorChange(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsDocumentBackgroundColorChange:)] pub unsafe fn setAllowsDocumentBackgroundColorChange( &self, @@ -716,116 +856,150 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSParagraphStyle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultParagraphStyle)] pub unsafe fn defaultParagraphStyle(&self) -> Option>; #[cfg(feature = "AppKit_NSParagraphStyle")] + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultParagraphStyle:)] pub unsafe fn setDefaultParagraphStyle( &self, default_paragraph_style: Option<&NSParagraphStyle>, ); + #[cfg(not(any(target_os = "ios")))] #[method(allowsUndo)] pub unsafe fn allowsUndo(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsUndo:)] pub unsafe fn setAllowsUndo(&self, allows_undo: bool); + #[cfg(not(any(target_os = "ios")))] #[method(breakUndoCoalescing)] pub unsafe fn breakUndoCoalescing(&self); + #[cfg(not(any(target_os = "ios")))] #[method(isCoalescingUndo)] pub unsafe fn isCoalescingUndo(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(allowsImageEditing)] pub unsafe fn allowsImageEditing(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsImageEditing:)] pub unsafe fn setAllowsImageEditing(&self, allows_image_editing: bool); + #[cfg(not(any(target_os = "ios")))] #[method(showFindIndicatorForRange:)] pub unsafe fn showFindIndicatorForRange(&self, char_range: NSRange); + #[cfg(not(any(target_os = "ios")))] #[method(usesRolloverButtonForSelection)] pub unsafe fn usesRolloverButtonForSelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesRolloverButtonForSelection:)] pub unsafe fn setUsesRolloverButtonForSelection( &self, uses_rollover_button_for_selection: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isSelectable)] pub unsafe fn isSelectable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectable:)] pub unsafe fn setSelectable(&self, selectable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isRichText)] pub unsafe fn isRichText(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setRichText:)] pub unsafe fn setRichText(&self, rich_text: bool); + #[cfg(not(any(target_os = "ios")))] #[method(importsGraphics)] pub unsafe fn importsGraphics(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setImportsGraphics:)] pub unsafe fn setImportsGraphics(&self, imports_graphics: bool); + #[cfg(not(any(target_os = "ios")))] #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, draws_background: bool); #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: &NSColor); + #[cfg(not(any(target_os = "ios")))] #[method(isFieldEditor)] pub unsafe fn isFieldEditor(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setFieldEditor:)] pub unsafe fn setFieldEditor(&self, field_editor: bool); + #[cfg(not(any(target_os = "ios")))] #[method(usesFontPanel)] pub unsafe fn usesFontPanel(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesFontPanel:)] pub unsafe fn setUsesFontPanel(&self, uses_font_panel: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isRulerVisible)] pub unsafe fn isRulerVisible(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setRulerVisible:)] pub unsafe fn setRulerVisible(&self, ruler_visible: bool); + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedRange:)] pub unsafe fn setSelectedRange(&self, char_range: NSRange); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other allowedInputSourceLocales)] pub unsafe fn allowedInputSourceLocales(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setAllowedInputSourceLocales:)] pub unsafe fn setAllowedInputSourceLocales( &self, @@ -838,22 +1012,27 @@ extern_methods!( /// NSTextChecking #[cfg(feature = "AppKit_NSTextView")] unsafe impl NSTextView { + #[cfg(not(any(target_os = "ios")))] #[method(smartInsertDeleteEnabled)] pub unsafe fn smartInsertDeleteEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSmartInsertDeleteEnabled:)] pub unsafe fn setSmartInsertDeleteEnabled(&self, smart_insert_delete_enabled: bool); + #[cfg(not(any(target_os = "ios")))] #[method(smartDeleteRangeForProposedRange:)] pub unsafe fn smartDeleteRangeForProposedRange( &self, proposed_char_range: NSRange, ) -> NSRange; + #[cfg(not(any(target_os = "ios")))] #[method(toggleSmartInsertDelete:)] pub unsafe fn toggleSmartInsertDelete(&self, sender: Option<&Object>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(smartInsertForString:replacingRange:beforeString:afterString:)] pub unsafe fn smartInsertForString_replacingRange_beforeString_afterString( &self, @@ -864,6 +1043,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other smartInsertBeforeStringForString:replacingRange:)] pub unsafe fn smartInsertBeforeStringForString_replacingRange( &self, @@ -872,6 +1052,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other smartInsertAfterStringForString:replacingRange:)] pub unsafe fn smartInsertAfterStringForString_replacingRange( &self, @@ -879,81 +1060,101 @@ extern_methods!( char_range_to_replace: NSRange, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticQuoteSubstitutionEnabled)] pub unsafe fn isAutomaticQuoteSubstitutionEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticQuoteSubstitutionEnabled:)] pub unsafe fn setAutomaticQuoteSubstitutionEnabled( &self, automatic_quote_substitution_enabled: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(toggleAutomaticQuoteSubstitution:)] pub unsafe fn toggleAutomaticQuoteSubstitution(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticLinkDetectionEnabled)] pub unsafe fn isAutomaticLinkDetectionEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticLinkDetectionEnabled:)] pub unsafe fn setAutomaticLinkDetectionEnabled( &self, automatic_link_detection_enabled: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(toggleAutomaticLinkDetection:)] pub unsafe fn toggleAutomaticLinkDetection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticDataDetectionEnabled)] pub unsafe fn isAutomaticDataDetectionEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticDataDetectionEnabled:)] pub unsafe fn setAutomaticDataDetectionEnabled( &self, automatic_data_detection_enabled: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(toggleAutomaticDataDetection:)] pub unsafe fn toggleAutomaticDataDetection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticDashSubstitutionEnabled)] pub unsafe fn isAutomaticDashSubstitutionEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticDashSubstitutionEnabled:)] pub unsafe fn setAutomaticDashSubstitutionEnabled( &self, automatic_dash_substitution_enabled: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(toggleAutomaticDashSubstitution:)] pub unsafe fn toggleAutomaticDashSubstitution(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticTextReplacementEnabled)] pub unsafe fn isAutomaticTextReplacementEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticTextReplacementEnabled:)] pub unsafe fn setAutomaticTextReplacementEnabled( &self, automatic_text_replacement_enabled: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(toggleAutomaticTextReplacement:)] pub unsafe fn toggleAutomaticTextReplacement(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticSpellingCorrectionEnabled)] pub unsafe fn isAutomaticSpellingCorrectionEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticSpellingCorrectionEnabled:)] pub unsafe fn setAutomaticSpellingCorrectionEnabled( &self, automatic_spelling_correction_enabled: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(toggleAutomaticSpellingCorrection:)] pub unsafe fn toggleAutomaticSpellingCorrection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(enabledTextCheckingTypes)] pub unsafe fn enabledTextCheckingTypes(&self) -> NSTextCheckingTypes; + #[cfg(not(any(target_os = "ios")))] #[method(setEnabledTextCheckingTypes:)] pub unsafe fn setEnabledTextCheckingTypes( &self, @@ -961,6 +1162,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(checkTextInRange:types:options:)] pub unsafe fn checkTextInRange_types_options( &self, @@ -975,6 +1177,7 @@ extern_methods!( feature = "Foundation_NSOrthography", feature = "Foundation_NSTextCheckingResult" ))] + #[cfg(not(any(target_os = "ios")))] #[method(handleTextCheckingResults:forRange:types:options:orthography:wordCount:)] pub unsafe fn handleTextCheckingResults_forRange_types_options_orthography_wordCount( &self, @@ -986,30 +1189,39 @@ extern_methods!( word_count: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontSubstitutionsPanel:)] pub unsafe fn orderFrontSubstitutionsPanel(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(checkTextInSelection:)] pub unsafe fn checkTextInSelection(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(checkTextInDocument:)] pub unsafe fn checkTextInDocument(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(usesFindPanel)] pub unsafe fn usesFindPanel(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesFindPanel:)] pub unsafe fn setUsesFindPanel(&self, uses_find_panel: bool); + #[cfg(not(any(target_os = "ios")))] #[method(usesFindBar)] pub unsafe fn usesFindBar(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesFindBar:)] pub unsafe fn setUsesFindBar(&self, uses_find_bar: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isIncrementalSearchingEnabled)] pub unsafe fn isIncrementalSearchingEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setIncrementalSearchingEnabled:)] pub unsafe fn setIncrementalSearchingEnabled(&self, incremental_searching_enabled: bool); } @@ -1019,9 +1231,11 @@ extern_methods!( /// NSQuickLookPreview #[cfg(feature = "AppKit_NSTextView")] unsafe impl NSTextView { + #[cfg(not(any(target_os = "ios")))] #[method(toggleQuickLookPreviewPanel:)] pub unsafe fn toggleQuickLookPreviewPanel(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(updateQuickLookPreviewPanel)] pub unsafe fn updateQuickLookPreviewPanel(&self); } @@ -1031,6 +1245,7 @@ extern_methods!( /// NSTextView_SharingService #[cfg(feature = "AppKit_NSTextView")] unsafe impl NSTextView { + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontSharingServicePicker:)] pub unsafe fn orderFrontSharingServicePicker(&self, sender: Option<&Object>); } @@ -1040,37 +1255,46 @@ extern_methods!( /// NSTextView_TouchBar #[cfg(feature = "AppKit_NSTextView")] unsafe impl NSTextView { + #[cfg(not(any(target_os = "ios")))] #[method(isAutomaticTextCompletionEnabled)] pub unsafe fn isAutomaticTextCompletionEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticTextCompletionEnabled:)] pub unsafe fn setAutomaticTextCompletionEnabled( &self, automatic_text_completion_enabled: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(toggleAutomaticTextCompletion:)] pub unsafe fn toggleAutomaticTextCompletion(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(allowsCharacterPickerTouchBarItem)] pub unsafe fn allowsCharacterPickerTouchBarItem(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsCharacterPickerTouchBarItem:)] pub unsafe fn setAllowsCharacterPickerTouchBarItem( &self, allows_character_picker_touch_bar_item: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(updateTouchBarItemIdentifiers)] pub unsafe fn updateTouchBarItemIdentifiers(&self); + #[cfg(not(any(target_os = "ios")))] #[method(updateTextTouchBarItems)] pub unsafe fn updateTextTouchBarItems(&self); + #[cfg(not(any(target_os = "ios")))] #[method(updateCandidates)] pub unsafe fn updateCandidates(&self); #[cfg(feature = "AppKit_NSCandidateListTouchBarItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other candidateListTouchBarItem)] pub unsafe fn candidateListTouchBarItem(&self) -> Option>; } @@ -1087,17 +1311,21 @@ extern_methods!( #[cfg(feature = "AppKit_NSTextView")] unsafe impl NSTextView { #[cfg(feature = "AppKit_NSScrollView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other scrollableTextView)] pub unsafe fn scrollableTextView() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fieldEditor)] pub unsafe fn fieldEditor() -> Id; #[cfg(feature = "AppKit_NSScrollView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other scrollableDocumentContentTextView)] pub unsafe fn scrollableDocumentContentTextView() -> Id; #[cfg(feature = "AppKit_NSScrollView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other scrollablePlainDocumentContentTextView)] pub unsafe fn scrollablePlainDocumentContentTextView() -> Id; } @@ -1108,14 +1336,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSTextView")] unsafe impl NSTextView { #[deprecated = "Use NSResponder's makeBaseWritingDirectionNatural:, makeBaseWritingDirectionLeftToRight:, and makeBaseWritingDirectionRightToLeft: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(toggleBaseWritingDirection:)] pub unsafe fn toggleBaseWritingDirection(&self, sender: Option<&Object>); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTextViewDelegate: NSTextDelegate { #[cfg(feature = "AppKit_NSTextView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:clickedOnLink:atIndex:)] unsafe fn textView_clickedOnLink_atIndex( @@ -1126,6 +1357,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSTextView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:clickedOnCell:inRect:atIndex:)] unsafe fn textView_clickedOnCell_inRect_atIndex( @@ -1137,6 +1369,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSTextView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:doubleClickedOnCell:inRect:atIndex:)] unsafe fn textView_doubleClickedOnCell_inRect_atIndex( @@ -1148,6 +1381,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSTextView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:draggedCell:inRect:event:atIndex:)] unsafe fn textView_draggedCell_inRect_event_atIndex( @@ -1160,6 +1394,7 @@ extern_protocol!( ); #[cfg(all(feature = "AppKit_NSTextView", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:writablePasteboardTypesForCell:atIndex:)] unsafe fn textView_writablePasteboardTypesForCell_atIndex( @@ -1170,6 +1405,7 @@ extern_protocol!( ) -> Id>; #[cfg(all(feature = "AppKit_NSPasteboard", feature = "AppKit_NSTextView"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:writeCell:atIndex:toPasteboard:type:)] unsafe fn textView_writeCell_atIndex_toPasteboard_type( @@ -1182,6 +1418,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSTextView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:willChangeSelectionFromCharacterRange:toCharacterRange:)] unsafe fn textView_willChangeSelectionFromCharacterRange_toCharacterRange( @@ -1196,6 +1433,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSValue" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:willChangeSelectionFromCharacterRanges:toCharacterRanges:)] unsafe fn textView_willChangeSelectionFromCharacterRanges_toCharacterRanges( @@ -1211,6 +1449,7 @@ extern_protocol!( feature = "Foundation_NSString", feature = "Foundation_NSValue" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:shouldChangeTextInRanges:replacementStrings:)] unsafe fn textView_shouldChangeTextInRanges_replacementStrings( @@ -1225,6 +1464,7 @@ extern_protocol!( feature = "Foundation_NSDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:shouldChangeTypingAttributes:toAttributes:)] unsafe fn textView_shouldChangeTypingAttributes_toAttributes( @@ -1235,16 +1475,19 @@ extern_protocol!( ) -> Id>; #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textViewDidChangeSelection:)] unsafe fn textViewDidChangeSelection(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textViewDidChangeTypingAttributes:)] unsafe fn textViewDidChangeTypingAttributes(&self, notification: &NSNotification); #[cfg(all(feature = "AppKit_NSTextView", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:willDisplayToolTip:forCharacterAtIndex:)] unsafe fn textView_willDisplayToolTip_forCharacterAtIndex( @@ -1259,6 +1502,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:completions:forPartialWordRange:indexOfSelectedItem:)] unsafe fn textView_completions_forPartialWordRange_indexOfSelectedItem( @@ -1270,6 +1514,7 @@ extern_protocol!( ) -> Id>; #[cfg(all(feature = "AppKit_NSTextView", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:shouldChangeTextInRange:replacementString:)] unsafe fn textView_shouldChangeTextInRange_replacementString( @@ -1280,6 +1525,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSTextView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:doCommandBySelector:)] unsafe fn textView_doCommandBySelector( @@ -1289,6 +1535,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSTextView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:shouldSetSpellingState:range:)] unsafe fn textView_shouldSetSpellingState_range( @@ -1303,6 +1550,7 @@ extern_protocol!( feature = "AppKit_NSMenu", feature = "AppKit_NSTextView" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:menu:forEvent:atIndex:)] unsafe fn textView_menu_forEvent_atIndex( @@ -1314,6 +1562,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSTextView", feature = "Foundation_NSDictionary"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:willCheckTextInRange:options:types:)] unsafe fn textView_willCheckTextInRange_options_types( @@ -1331,6 +1580,7 @@ extern_protocol!( feature = "Foundation_NSOrthography", feature = "Foundation_NSTextCheckingResult" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:didCheckTextInRange:types:options:results:orthography:wordCount:)] unsafe fn textView_didCheckTextInRange_types_options_results_orthography_wordCount( @@ -1349,6 +1599,7 @@ extern_protocol!( feature = "AppKit_NSTextView", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:URLForContentsOfTextAttachment:atIndex:)] unsafe fn textView_URLForContentsOfTextAttachment_atIndex( @@ -1363,6 +1614,7 @@ extern_protocol!( feature = "AppKit_NSTextView", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:willShowSharingServicePicker:forItems:)] unsafe fn textView_willShowSharingServicePicker_forItems( @@ -1373,11 +1625,13 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSTextView", feature = "Foundation_NSUndoManager"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other undoManagerForTextView:)] unsafe fn undoManagerForTextView(&self, view: &NSTextView) -> Option>; #[cfg(all(feature = "AppKit_NSTextView", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:shouldUpdateTouchBarItemIdentifiers:)] unsafe fn textView_shouldUpdateTouchBarItemIdentifiers( @@ -1387,6 +1641,7 @@ extern_protocol!( ) -> Id>; #[cfg(all(feature = "AppKit_NSTextView", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:candidatesForSelectedRange:)] unsafe fn textView_candidatesForSelectedRange( @@ -1400,6 +1655,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "Foundation_NSTextCheckingResult" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other textView:candidates:forSelectedRange:)] unsafe fn textView_candidates_forSelectedRange( @@ -1410,6 +1666,7 @@ extern_protocol!( ) -> Id>; #[cfg(feature = "AppKit_NSTextView")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:shouldSelectCandidateAtIndex:)] unsafe fn textView_shouldSelectCandidateAtIndex( @@ -1420,6 +1677,7 @@ extern_protocol!( #[cfg(feature = "AppKit_NSTextView")] #[deprecated = "Use -textView:clickedOnLink:atIndex: instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:clickedOnLink:)] unsafe fn textView_clickedOnLink( @@ -1430,6 +1688,7 @@ extern_protocol!( #[cfg(feature = "AppKit_NSTextView")] #[deprecated = "Use -textView:clickedOnCell:inRect:atIndex: instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:clickedOnCell:inRect:)] unsafe fn textView_clickedOnCell_inRect( @@ -1441,6 +1700,7 @@ extern_protocol!( #[cfg(feature = "AppKit_NSTextView")] #[deprecated = "Use -textView:doubleClickedOnCell:inRect:atIndex: instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:doubleClickedOnCell:inRect:)] unsafe fn textView_doubleClickedOnCell_inRect( @@ -1452,6 +1712,7 @@ extern_protocol!( #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSTextView"))] #[deprecated = "Use -textView:draggedCell:inRect:event:atIndex: instead"] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(textView:draggedCell:inRect:event:)] unsafe fn textView_draggedCell_inRect_event( @@ -1490,16 +1751,27 @@ extern_static!(NSTextViewDidSwitchToNSLayoutManagerNotification: &'static NSNoti ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSFindPanelAction { + #[cfg(not(any(target_os = "ios")))] NSFindPanelActionShowFindPanel = 1, + #[cfg(not(any(target_os = "ios")))] NSFindPanelActionNext = 2, + #[cfg(not(any(target_os = "ios")))] NSFindPanelActionPrevious = 3, + #[cfg(not(any(target_os = "ios")))] NSFindPanelActionReplaceAll = 4, + #[cfg(not(any(target_os = "ios")))] NSFindPanelActionReplace = 5, + #[cfg(not(any(target_os = "ios")))] NSFindPanelActionReplaceAndFind = 6, + #[cfg(not(any(target_os = "ios")))] NSFindPanelActionSetFindString = 7, + #[cfg(not(any(target_os = "ios")))] NSFindPanelActionReplaceAllInSelection = 8, + #[cfg(not(any(target_os = "ios")))] NSFindPanelActionSelectAll = 9, + #[cfg(not(any(target_os = "ios")))] NSFindPanelActionSelectAllInSelection = 10, } ); @@ -1516,10 +1788,15 @@ extern_static!(NSFindPanelSubstringMatch: &'static NSPasteboardTypeFindPanelSear ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSFindPanelSubstringMatchType { + #[cfg(not(any(target_os = "ios")))] NSFindPanelSubstringMatchTypeContains = 0, + #[cfg(not(any(target_os = "ios")))] NSFindPanelSubstringMatchTypeStartsWith = 1, + #[cfg(not(any(target_os = "ios")))] NSFindPanelSubstringMatchTypeFullWord = 2, + #[cfg(not(any(target_os = "ios")))] NSFindPanelSubstringMatchTypeEndsWith = 3, } ); diff --git a/AppKit/NSTextViewportLayoutController.rs b/AppKit/NSTextViewportLayoutController.rs index d1159a418..28bbe7e3c 100644 --- a/AppKit/NSTextViewportLayoutController.rs +++ b/AppKit/NSTextViewportLayoutController.rs @@ -6,6 +6,7 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSTextViewportLayoutControllerDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSTextViewportLayoutController")] #[method(viewportBoundsForTextViewportLayoutController:)] @@ -48,6 +49,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTextViewportLayoutController")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSTextViewportLayoutController; #[cfg(feature = "AppKit_NSTextViewportLayoutController")] diff --git a/AppKit/NSTintConfiguration.rs b/AppKit/NSTintConfiguration.rs index 329f2720a..a4b04fabf 100644 --- a/AppKit/NSTintConfiguration.rs +++ b/AppKit/NSTintConfiguration.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTintConfiguration")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTintConfiguration; #[cfg(feature = "AppKit_NSTintConfiguration")] @@ -28,28 +29,35 @@ unsafe impl NSSecureCoding for NSTintConfiguration {} extern_methods!( #[cfg(feature = "AppKit_NSTintConfiguration")] unsafe impl NSTintConfiguration { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultTintConfiguration)] pub unsafe fn defaultTintConfiguration() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other monochromeTintConfiguration)] pub unsafe fn monochromeTintConfiguration() -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tintConfigurationWithPreferredColor:)] pub unsafe fn tintConfigurationWithPreferredColor(color: &NSColor) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tintConfigurationWithFixedColor:)] pub unsafe fn tintConfigurationWithFixedColor(color: &NSColor) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other baseTintColor)] pub unsafe fn baseTintColor(&self) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other equivalentContentTintColor)] pub unsafe fn equivalentContentTintColor(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(adaptsToUserAccentColor)] pub unsafe fn adaptsToUserAccentColor(&self) -> bool; } diff --git a/AppKit/NSTitlebarAccessoryViewController.rs b/AppKit/NSTitlebarAccessoryViewController.rs index b03e0cbe8..ceab1038c 100644 --- a/AppKit/NSTitlebarAccessoryViewController.rs +++ b/AppKit/NSTitlebarAccessoryViewController.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTitlebarAccessoryViewController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTitlebarAccessoryViewController; #[cfg(feature = "AppKit_NSTitlebarAccessoryViewController")] @@ -41,36 +42,47 @@ unsafe impl NSUserInterfaceItemIdentification for NSTitlebarAccessoryViewControl extern_methods!( #[cfg(feature = "AppKit_NSTitlebarAccessoryViewController")] unsafe impl NSTitlebarAccessoryViewController { + #[cfg(not(any(target_os = "ios")))] #[method(layoutAttribute)] pub unsafe fn layoutAttribute(&self) -> NSLayoutAttribute; + #[cfg(not(any(target_os = "ios")))] #[method(setLayoutAttribute:)] pub unsafe fn setLayoutAttribute(&self, layout_attribute: NSLayoutAttribute); + #[cfg(not(any(target_os = "ios")))] #[method(fullScreenMinHeight)] pub unsafe fn fullScreenMinHeight(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setFullScreenMinHeight:)] pub unsafe fn setFullScreenMinHeight(&self, full_screen_min_height: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); + #[cfg(not(any(target_os = "ios")))] #[method(automaticallyAdjustsSize)] pub unsafe fn automaticallyAdjustsSize(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutomaticallyAdjustsSize:)] pub unsafe fn setAutomaticallyAdjustsSize(&self, automatically_adjusts_size: bool); + #[cfg(not(any(target_os = "ios")))] #[method(viewWillAppear)] pub unsafe fn viewWillAppear(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewDidAppear)] pub unsafe fn viewDidAppear(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewDidDisappear)] pub unsafe fn viewDidDisappear(&self); } @@ -81,6 +93,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSTitlebarAccessoryViewController")] unsafe impl NSTitlebarAccessoryViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/AppKit/NSTokenField.rs b/AppKit/NSTokenField.rs index 5e99c1d79..30656ab20 100644 --- a/AppKit/NSTokenField.rs +++ b/AppKit/NSTokenField.rs @@ -6,12 +6,14 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTokenFieldDelegate: NSTextFieldDelegate { #[cfg(all( feature = "AppKit_NSTokenField", feature = "Foundation_NSArray", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenField:completionsForSubstring:indexOfToken:indexOfSelectedItem:)] unsafe fn tokenField_completionsForSubstring_indexOfToken_indexOfSelectedItem( @@ -23,6 +25,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSTokenField", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenField:shouldAddObjects:atIndex:)] unsafe fn tokenField_shouldAddObjects_atIndex( @@ -33,6 +36,7 @@ extern_protocol!( ) -> Id; #[cfg(all(feature = "AppKit_NSTokenField", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenField:displayStringForRepresentedObject:)] unsafe fn tokenField_displayStringForRepresentedObject( @@ -42,6 +46,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSTokenField", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenField:editingStringForRepresentedObject:)] unsafe fn tokenField_editingStringForRepresentedObject( @@ -51,6 +56,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSTokenField", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenField:representedObjectForEditingString:)] unsafe fn tokenField_representedObjectForEditingString( @@ -64,6 +70,7 @@ extern_protocol!( feature = "AppKit_NSTokenField", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tokenField:writeRepresentedObjects:toPasteboard:)] unsafe fn tokenField_writeRepresentedObjects_toPasteboard( @@ -78,6 +85,7 @@ extern_protocol!( feature = "AppKit_NSTokenField", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenField:readFromPasteboard:)] unsafe fn tokenField_readFromPasteboard( @@ -87,6 +95,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSMenu", feature = "AppKit_NSTokenField"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenField:menuForRepresentedObject:)] unsafe fn tokenField_menuForRepresentedObject( @@ -96,6 +105,7 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSTokenField")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tokenField:hasMenuForRepresentedObject:)] unsafe fn tokenField_hasMenuForRepresentedObject( @@ -105,6 +115,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSTokenField")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tokenField:styleForRepresentedObject:)] unsafe fn tokenField_styleForRepresentedObject( @@ -120,6 +131,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTokenField")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTokenField; #[cfg(feature = "AppKit_NSTokenField")] @@ -168,35 +180,44 @@ unsafe impl NSUserInterfaceValidations for NSTokenField {} extern_methods!( #[cfg(feature = "AppKit_NSTokenField")] unsafe impl NSTokenField { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(tokenStyle)] pub unsafe fn tokenStyle(&self) -> NSTokenStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setTokenStyle:)] pub unsafe fn setTokenStyle(&self, token_style: NSTokenStyle); + #[cfg(not(any(target_os = "ios")))] #[method(completionDelay)] pub unsafe fn completionDelay(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(setCompletionDelay:)] pub unsafe fn setCompletionDelay(&self, completion_delay: NSTimeInterval); + #[cfg(not(any(target_os = "ios")))] #[method(defaultCompletionDelay)] pub unsafe fn defaultCompletionDelay() -> NSTimeInterval; #[cfg(feature = "Foundation_NSCharacterSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tokenizingCharacterSet)] pub unsafe fn tokenizingCharacterSet(&self) -> Id; #[cfg(feature = "Foundation_NSCharacterSet")] + #[cfg(not(any(target_os = "ios")))] #[method(setTokenizingCharacterSet:)] pub unsafe fn setTokenizingCharacterSet( &self, @@ -204,6 +225,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSCharacterSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultTokenizingCharacterSet)] pub unsafe fn defaultTokenizingCharacterSet() -> Id; } @@ -216,20 +238,24 @@ extern_methods!( #[cfg(feature = "AppKit_NSTokenField")] unsafe impl NSTokenField { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelWithString:)] pub unsafe fn labelWithString(string_value: &NSString) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other wrappingLabelWithString:)] pub unsafe fn wrappingLabelWithString(string_value: &NSString) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other labelWithAttributedString:)] pub unsafe fn labelWithAttributedString( attributed_string_value: &NSAttributedString, ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textFieldWithString:)] pub unsafe fn textFieldWithString(string_value: &NSString) -> Id; } @@ -239,6 +265,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "AppKit_NSTokenField")] unsafe impl NSTokenField { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSTokenFieldCell.rs b/AppKit/NSTokenFieldCell.rs index 7de2d541e..c0f3648c1 100644 --- a/AppKit/NSTokenFieldCell.rs +++ b/AppKit/NSTokenFieldCell.rs @@ -7,11 +7,17 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTokenStyle { + #[cfg(not(any(target_os = "ios")))] NSTokenStyleDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSTokenStyleNone = 1, + #[cfg(not(any(target_os = "ios")))] NSTokenStyleRounded = 2, + #[cfg(not(any(target_os = "ios")))] NSTokenStyleSquared = 3, + #[cfg(not(any(target_os = "ios")))] NSTokenStylePlainSquared = 4, } ); @@ -19,6 +25,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTokenFieldCell")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTokenFieldCell; #[cfg(feature = "AppKit_NSTokenFieldCell")] @@ -46,26 +53,33 @@ unsafe impl NSUserInterfaceItemIdentification for NSTokenFieldCell {} extern_methods!( #[cfg(feature = "AppKit_NSTokenFieldCell")] unsafe impl NSTokenFieldCell { + #[cfg(not(any(target_os = "ios")))] #[method(tokenStyle)] pub unsafe fn tokenStyle(&self) -> NSTokenStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setTokenStyle:)] pub unsafe fn setTokenStyle(&self, token_style: NSTokenStyle); + #[cfg(not(any(target_os = "ios")))] #[method(completionDelay)] pub unsafe fn completionDelay(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(setCompletionDelay:)] pub unsafe fn setCompletionDelay(&self, completion_delay: NSTimeInterval); + #[cfg(not(any(target_os = "ios")))] #[method(defaultCompletionDelay)] pub unsafe fn defaultCompletionDelay() -> NSTimeInterval; #[cfg(feature = "Foundation_NSCharacterSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tokenizingCharacterSet)] pub unsafe fn tokenizingCharacterSet(&self) -> Id; #[cfg(feature = "Foundation_NSCharacterSet")] + #[cfg(not(any(target_os = "ios")))] #[method(setTokenizingCharacterSet:)] pub unsafe fn setTokenizingCharacterSet( &self, @@ -73,12 +87,15 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSCharacterSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultTokenizingCharacterSet)] pub unsafe fn defaultTokenizingCharacterSet() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -88,12 +105,14 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSTokenFieldCellDelegate: NSObjectProtocol { #[cfg(all( feature = "AppKit_NSTokenFieldCell", feature = "Foundation_NSArray", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenFieldCell:completionsForSubstring:indexOfToken:indexOfSelectedItem:)] unsafe fn tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem( @@ -105,6 +124,7 @@ extern_protocol!( ) -> Id; #[cfg(all(feature = "AppKit_NSTokenFieldCell", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenFieldCell:shouldAddObjects:atIndex:)] unsafe fn tokenFieldCell_shouldAddObjects_atIndex( @@ -115,6 +135,7 @@ extern_protocol!( ) -> Id; #[cfg(all(feature = "AppKit_NSTokenFieldCell", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenFieldCell:displayStringForRepresentedObject:)] unsafe fn tokenFieldCell_displayStringForRepresentedObject( @@ -124,6 +145,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSTokenFieldCell", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenFieldCell:editingStringForRepresentedObject:)] unsafe fn tokenFieldCell_editingStringForRepresentedObject( @@ -133,6 +155,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSTokenFieldCell", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenFieldCell:representedObjectForEditingString:)] unsafe fn tokenFieldCell_representedObjectForEditingString( @@ -146,6 +169,7 @@ extern_protocol!( feature = "AppKit_NSTokenFieldCell", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tokenFieldCell:writeRepresentedObjects:toPasteboard:)] unsafe fn tokenFieldCell_writeRepresentedObjects_toPasteboard( @@ -160,6 +184,7 @@ extern_protocol!( feature = "AppKit_NSTokenFieldCell", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenFieldCell:readFromPasteboard:)] unsafe fn tokenFieldCell_readFromPasteboard( @@ -169,6 +194,7 @@ extern_protocol!( ) -> Option>; #[cfg(all(feature = "AppKit_NSMenu", feature = "AppKit_NSTokenFieldCell"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other tokenFieldCell:menuForRepresentedObject:)] unsafe fn tokenFieldCell_menuForRepresentedObject( @@ -178,6 +204,7 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSTokenFieldCell")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tokenFieldCell:hasMenuForRepresentedObject:)] unsafe fn tokenFieldCell_hasMenuForRepresentedObject( @@ -187,6 +214,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSTokenFieldCell")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(tokenFieldCell:styleForRepresentedObject:)] unsafe fn tokenFieldCell_styleForRepresentedObject( @@ -210,10 +238,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSTokenFieldCell")] unsafe impl NSTokenFieldCell { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell(this: Option>, string: &NSString) -> Id; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, diff --git a/AppKit/NSToolbar.rs b/AppKit/NSToolbar.rs index 0f170106f..341b2a80e 100644 --- a/AppKit/NSToolbar.rs +++ b/AppKit/NSToolbar.rs @@ -110,10 +110,12 @@ extern_methods!( ); #[deprecated = "NSToolbarSizeMode is no longer recommended and will be ignored in the future"] + #[cfg(not(any(target_os = "ios")))] #[method(sizeMode)] pub unsafe fn sizeMode(&self) -> NSToolbarSizeMode; #[deprecated = "NSToolbarSizeMode is no longer recommended and will be ignored in the future"] + #[cfg(not(any(target_os = "ios")))] #[method(setSizeMode:)] pub unsafe fn setSizeMode(&self, size_mode: NSToolbarSizeMode); @@ -169,6 +171,7 @@ extern_methods!( pub unsafe fn setAutosavesConfiguration(&self, autosaves_configuration: bool); #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setConfigurationFromDictionary:)] pub unsafe fn setConfigurationFromDictionary( &self, @@ -176,15 +179,19 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationDictionary)] pub unsafe fn configurationDictionary(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(validateVisibleItems)] pub unsafe fn validateVisibleItems(&self); + #[cfg(not(any(target_os = "ios")))] #[method(allowsExtensionItems)] pub unsafe fn allowsExtensionItems(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsExtensionItems:)] pub unsafe fn setAllowsExtensionItems(&self, allows_extension_items: bool); } @@ -268,11 +275,13 @@ extern_methods!( unsafe impl NSToolbar { #[cfg(feature = "AppKit_NSView")] #[deprecated = "Use NSTitlebarAccessoryViewController with NSWindow instead"] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fullScreenAccessoryView)] pub unsafe fn fullScreenAccessoryView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] #[deprecated = "Use NSTitlebarAccessoryViewController with NSWindow instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setFullScreenAccessoryView:)] pub unsafe fn setFullScreenAccessoryView( &self, @@ -280,10 +289,12 @@ extern_methods!( ); #[deprecated = "Use NSTitlebarAccessoryViewController and its fullScreenMinHeight property with NSWindow instead."] + #[cfg(not(any(target_os = "ios")))] #[method(fullScreenAccessoryViewMinHeight)] pub unsafe fn fullScreenAccessoryViewMinHeight(&self) -> CGFloat; #[deprecated = "Use NSTitlebarAccessoryViewController and its fullScreenMinHeight property with NSWindow instead."] + #[cfg(not(any(target_os = "ios")))] #[method(setFullScreenAccessoryViewMinHeight:)] pub unsafe fn setFullScreenAccessoryViewMinHeight( &self, @@ -291,10 +302,12 @@ extern_methods!( ); #[deprecated = "Use NSTitlebarAccessoryViewController with NSWindow instead. The max height of a titlebar accessory is implied by its view's height."] + #[cfg(not(any(target_os = "ios")))] #[method(fullScreenAccessoryViewMaxHeight)] pub unsafe fn fullScreenAccessoryViewMaxHeight(&self) -> CGFloat; #[deprecated = "Use NSTitlebarAccessoryViewController with NSWindow instead. The max height of a titlebar accessory is implied by its view's height."] + #[cfg(not(any(target_os = "ios")))] #[method(setFullScreenAccessoryViewMaxHeight:)] pub unsafe fn setFullScreenAccessoryViewMaxHeight( &self, diff --git a/AppKit/NSToolbarItem.rs b/AppKit/NSToolbarItem.rs index 872d6d893..4c4c4fdfc 100644 --- a/AppKit/NSToolbarItem.rs +++ b/AppKit/NSToolbarItem.rs @@ -80,10 +80,12 @@ extern_methods!( pub unsafe fn setToolTip(&self, tool_tip: Option<&NSString>); #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuFormRepresentation)] pub unsafe fn menuFormRepresentation(&self) -> Option>; #[cfg(feature = "AppKit_NSMenuItem")] + #[cfg(not(any(target_os = "ios")))] #[method(setMenuFormRepresentation:)] pub unsafe fn setMenuFormRepresentation( &self, @@ -143,10 +145,12 @@ extern_methods!( pub unsafe fn setNavigational(&self, navigational: bool); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); @@ -154,18 +158,22 @@ extern_methods!( pub unsafe fn isVisible(&self) -> bool; #[deprecated = "This property is no longer recommended. Instead, let the system automatically measure the size of the view using constraints."] + #[cfg(not(any(target_os = "ios")))] #[method(minSize)] pub unsafe fn minSize(&self) -> NSSize; #[deprecated = "This property is no longer recommended. Instead, let the system automatically measure the size of the view using constraints."] + #[cfg(not(any(target_os = "ios")))] #[method(setMinSize:)] pub unsafe fn setMinSize(&self, min_size: NSSize); #[deprecated = "This property is no longer recommended. Instead, let the system automatically measure the size of the view using constraints."] + #[cfg(not(any(target_os = "ios")))] #[method(maxSize)] pub unsafe fn maxSize(&self) -> NSSize; #[deprecated = "This property is no longer recommended. Instead, let the system automatically measure the size of the view using constraints."] + #[cfg(not(any(target_os = "ios")))] #[method(setMaxSize:)] pub unsafe fn setMaxSize(&self, max_size: NSSize); @@ -187,6 +195,7 @@ extern_methods!( #[method(setAutovalidates:)] pub unsafe fn setAutovalidates(&self, autovalidates: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsDuplicatesInToolbar)] pub unsafe fn allowsDuplicatesInToolbar(&self) -> bool; } diff --git a/AppKit/NSTouch.rs b/AppKit/NSTouch.rs index ffae0749e..dc093ac21 100644 --- a/AppKit/NSTouch.rs +++ b/AppKit/NSTouch.rs @@ -7,34 +7,49 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTouchPhase { + #[cfg(not(any(target_os = "ios")))] NSTouchPhaseBegan = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSTouchPhaseMoved = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSTouchPhaseStationary = 1 << 2, + #[cfg(not(any(target_os = "ios")))] NSTouchPhaseEnded = 1 << 3, + #[cfg(not(any(target_os = "ios")))] NSTouchPhaseCancelled = 1 << 4, + #[cfg(not(any(target_os = "ios")))] NSTouchPhaseTouching = NSTouchPhaseBegan | NSTouchPhaseMoved | NSTouchPhaseStationary, + #[cfg(not(any(target_os = "ios")))] NSTouchPhaseAny = NSUIntegerMax as _, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTouchType { + #[cfg(not(any(target_os = "ios")))] NSTouchTypeDirect = 0, + #[cfg(not(any(target_os = "ios")))] NSTouchTypeIndirect = 1, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTouchTypeMask { + #[cfg(not(any(target_os = "ios")))] NSTouchTypeMaskDirect = 1 << NSTouchTypeDirect, + #[cfg(not(any(target_os = "ios")))] NSTouchTypeMaskIndirect = 1 << NSTouchTypeIndirect, } ); inline_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn NSTouchTypeMaskFromType(r#type: NSTouchType) -> NSTouchTypeMask { todo!() } @@ -43,6 +58,7 @@ inline_fn!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTouch")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTouch; #[cfg(feature = "AppKit_NSTouch")] @@ -57,21 +73,27 @@ unsafe impl NSObjectProtocol for NSTouch {} extern_methods!( #[cfg(feature = "AppKit_NSTouch")] unsafe impl NSTouch { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other identity)] pub unsafe fn identity(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(phase)] pub unsafe fn phase(&self) -> NSTouchPhase; + #[cfg(not(any(target_os = "ios")))] #[method(normalizedPosition)] pub unsafe fn normalizedPosition(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(isResting)] pub unsafe fn isResting(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other device)] pub unsafe fn device(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(deviceSize)] pub unsafe fn deviceSize(&self) -> NSSize; } @@ -81,14 +103,17 @@ extern_methods!( /// NSTouchBar #[cfg(feature = "AppKit_NSTouch")] unsafe impl NSTouch { + #[cfg(not(any(target_os = "ios")))] #[method(type)] pub unsafe fn r#type(&self) -> NSTouchType; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(locationInView:)] pub unsafe fn locationInView(&self, view: Option<&NSView>) -> NSPoint; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(previousLocationInView:)] pub unsafe fn previousLocationInView(&self, view: Option<&NSView>) -> NSPoint; } diff --git a/AppKit/NSTouchBarItem.rs b/AppKit/NSTouchBarItem.rs index bf2231f9a..7c3c4cbef 100644 --- a/AppKit/NSTouchBarItem.rs +++ b/AppKit/NSTouchBarItem.rs @@ -52,6 +52,7 @@ extern_methods!( coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; @@ -65,10 +66,12 @@ extern_methods!( pub unsafe fn setVisibilityPriority(&self, visibility_priority: NSTouchBarItemPriority); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other viewController)] pub unsafe fn viewController(&self) -> Option>; diff --git a/AppKit/NSTrackingArea.rs b/AppKit/NSTrackingArea.rs index e155a76b1..7300588c9 100644 --- a/AppKit/NSTrackingArea.rs +++ b/AppKit/NSTrackingArea.rs @@ -7,16 +7,27 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTrackingAreaOptions { + #[cfg(not(any(target_os = "ios")))] NSTrackingMouseEnteredAndExited = 0x01, + #[cfg(not(any(target_os = "ios")))] NSTrackingMouseMoved = 0x02, + #[cfg(not(any(target_os = "ios")))] NSTrackingCursorUpdate = 0x04, + #[cfg(not(any(target_os = "ios")))] NSTrackingActiveWhenFirstResponder = 0x10, + #[cfg(not(any(target_os = "ios")))] NSTrackingActiveInKeyWindow = 0x20, + #[cfg(not(any(target_os = "ios")))] NSTrackingActiveInActiveApp = 0x40, + #[cfg(not(any(target_os = "ios")))] NSTrackingActiveAlways = 0x80, + #[cfg(not(any(target_os = "ios")))] NSTrackingAssumeInside = 0x100, + #[cfg(not(any(target_os = "ios")))] NSTrackingInVisibleRect = 0x200, + #[cfg(not(any(target_os = "ios")))] NSTrackingEnabledDuringMouseDrag = 0x400, } ); @@ -24,6 +35,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTrackingArea")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTrackingArea; #[cfg(feature = "AppKit_NSTrackingArea")] @@ -42,6 +54,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSTrackingArea")] unsafe impl NSTrackingArea { #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithRect:options:owner:userInfo:)] pub unsafe fn initWithRect_options_owner_userInfo( this: Option>, @@ -51,16 +64,20 @@ extern_methods!( user_info: Option<&NSDictionary>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(rect)] pub unsafe fn rect(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(options)] pub unsafe fn options(&self) -> NSTrackingAreaOptions; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other owner)] pub unsafe fn owner(&self) -> Option>; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option>>; } diff --git a/AppKit/NSTrackingSeparatorToolbarItem.rs b/AppKit/NSTrackingSeparatorToolbarItem.rs index 37e9b09c2..fe9b9c2aa 100644 --- a/AppKit/NSTrackingSeparatorToolbarItem.rs +++ b/AppKit/NSTrackingSeparatorToolbarItem.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTrackingSeparatorToolbarItem")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTrackingSeparatorToolbarItem; #[cfg(feature = "AppKit_NSTrackingSeparatorToolbarItem")] @@ -24,6 +25,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSTrackingSeparatorToolbarItem")] unsafe impl NSTrackingSeparatorToolbarItem { #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other trackingSeparatorToolbarItemWithIdentifier:splitView:dividerIndex:)] pub unsafe fn trackingSeparatorToolbarItemWithIdentifier_splitView_dividerIndex( identifier: &NSToolbarItemIdentifier, @@ -32,16 +34,20 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other splitView)] pub unsafe fn splitView(&self) -> Id; #[cfg(feature = "AppKit_NSSplitView")] + #[cfg(not(any(target_os = "ios")))] #[method(setSplitView:)] pub unsafe fn setSplitView(&self, split_view: &NSSplitView); + #[cfg(not(any(target_os = "ios")))] #[method(dividerIndex)] pub unsafe fn dividerIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setDividerIndex:)] pub unsafe fn setDividerIndex(&self, divider_index: NSInteger); } diff --git a/AppKit/NSTreeController.rs b/AppKit/NSTreeController.rs index aa028eb3e..8bf407038 100644 --- a/AppKit/NSTreeController.rs +++ b/AppKit/NSTreeController.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTreeController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTreeController; #[cfg(feature = "AppKit_NSTreeController")] @@ -32,34 +33,42 @@ unsafe impl NSObjectProtocol for NSTreeController {} extern_methods!( #[cfg(feature = "AppKit_NSTreeController")] unsafe impl NSTreeController { + #[cfg(not(any(target_os = "ios")))] #[method(rearrangeObjects)] pub unsafe fn rearrangeObjects(&self); #[cfg(feature = "AppKit_NSTreeNode")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other arrangedObjects)] pub unsafe fn arrangedObjects(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other childrenKeyPath)] pub unsafe fn childrenKeyPath(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setChildrenKeyPath:)] pub unsafe fn setChildrenKeyPath(&self, children_key_path: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other countKeyPath)] pub unsafe fn countKeyPath(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setCountKeyPath:)] pub unsafe fn setCountKeyPath(&self, count_key_path: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other leafKeyPath)] pub unsafe fn leafKeyPath(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setLeafKeyPath:)] pub unsafe fn setLeafKeyPath(&self, leaf_key_path: Option<&NSString>); @@ -67,6 +76,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSSortDescriptor" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id>; @@ -74,40 +84,52 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSSortDescriptor" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setSortDescriptors:)] pub unsafe fn setSortDescriptors(&self, sort_descriptors: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other content)] pub unsafe fn content(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setContent:)] pub unsafe fn setContent(&self, content: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(add:)] pub unsafe fn add(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(remove:)] pub unsafe fn remove(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(addChild:)] pub unsafe fn addChild(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(insert:)] pub unsafe fn insert(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(insertChild:)] pub unsafe fn insertChild(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(canInsert)] pub unsafe fn canInsert(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(canInsertChild)] pub unsafe fn canInsertChild(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(canAddChild)] pub unsafe fn canAddChild(&self) -> bool; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method(insertObject:atArrangedObjectIndexPath:)] pub unsafe fn insertObject_atArrangedObjectIndexPath( &self, @@ -116,6 +138,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method(insertObjects:atArrangedObjectIndexPaths:)] pub unsafe fn insertObjects_atArrangedObjectIndexPaths( &self, @@ -124,37 +147,47 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method(removeObjectAtArrangedObjectIndexPath:)] pub unsafe fn removeObjectAtArrangedObjectIndexPath(&self, index_path: &NSIndexPath); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method(removeObjectsAtArrangedObjectIndexPaths:)] pub unsafe fn removeObjectsAtArrangedObjectIndexPaths( &self, index_paths: &NSArray, ); + #[cfg(not(any(target_os = "ios")))] #[method(avoidsEmptySelection)] pub unsafe fn avoidsEmptySelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAvoidsEmptySelection:)] pub unsafe fn setAvoidsEmptySelection(&self, avoids_empty_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(preservesSelection)] pub unsafe fn preservesSelection(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPreservesSelection:)] pub unsafe fn setPreservesSelection(&self, preserves_selection: bool); + #[cfg(not(any(target_os = "ios")))] #[method(selectsInsertedObjects)] pub unsafe fn selectsInsertedObjects(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setSelectsInsertedObjects:)] pub unsafe fn setSelectsInsertedObjects(&self, selects_inserted_objects: bool); + #[cfg(not(any(target_os = "ios")))] #[method(alwaysUsesMultipleValuesMarker)] pub unsafe fn alwaysUsesMultipleValuesMarker(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAlwaysUsesMultipleValuesMarker:)] pub unsafe fn setAlwaysUsesMultipleValuesMarker( &self, @@ -162,38 +195,47 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedObjects)] pub unsafe fn selectedObjects(&self) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionIndexPaths:)] pub unsafe fn setSelectionIndexPaths(&self, index_paths: &NSArray) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectionIndexPaths)] pub unsafe fn selectionIndexPaths(&self) -> Id>; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectionIndexPath:)] pub unsafe fn setSelectionIndexPath(&self, index_path: Option<&NSIndexPath>) -> bool; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectionIndexPath)] pub unsafe fn selectionIndexPath(&self) -> Option>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method(addSelectionIndexPaths:)] pub unsafe fn addSelectionIndexPaths(&self, index_paths: &NSArray) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method(removeSelectionIndexPaths:)] pub unsafe fn removeSelectionIndexPaths(&self, index_paths: &NSArray) -> bool; #[cfg(all(feature = "AppKit_NSTreeNode", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedNodes)] pub unsafe fn selectedNodes(&self) -> Id>; #[cfg(all(feature = "AppKit_NSTreeNode", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method(moveNode:toIndexPath:)] pub unsafe fn moveNode_toIndexPath(&self, node: &NSTreeNode, index_path: &NSIndexPath); @@ -202,6 +244,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath" ))] + #[cfg(not(any(target_os = "ios")))] #[method(moveNodes:toIndexPath:)] pub unsafe fn moveNodes_toIndexPath( &self, @@ -210,14 +253,17 @@ extern_methods!( ); #[cfg(all(feature = "AppKit_NSTreeNode", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other childrenKeyPathForNode:)] pub unsafe fn childrenKeyPathForNode(&self, node: &NSTreeNode) -> Option>; #[cfg(all(feature = "AppKit_NSTreeNode", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other countKeyPathForNode:)] pub unsafe fn countKeyPathForNode(&self, node: &NSTreeNode) -> Option>; #[cfg(all(feature = "AppKit_NSTreeNode", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other leafKeyPathForNode:)] pub unsafe fn leafKeyPathForNode(&self, node: &NSTreeNode) -> Option>; } @@ -227,6 +273,7 @@ extern_methods!( /// Methods declared on superclass `NSObjectController` #[cfg(feature = "AppKit_NSTreeController")] unsafe impl NSTreeController { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContent:)] pub unsafe fn initWithContent( this: Option>, diff --git a/AppKit/NSTreeNode.rs b/AppKit/NSTreeNode.rs index d3a3ab0d3..8f6b5b14f 100644 --- a/AppKit/NSTreeNode.rs +++ b/AppKit/NSTreeNode.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSTreeNode")] + #[cfg(not(any(target_os = "ios")))] pub struct NSTreeNode; #[cfg(feature = "AppKit_NSTreeNode")] @@ -22,40 +23,49 @@ unsafe impl NSObjectProtocol for NSTreeNode {} extern_methods!( #[cfg(feature = "AppKit_NSTreeNode")] unsafe impl NSTreeNode { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other treeNodeWithRepresentedObject:)] pub unsafe fn treeNodeWithRepresentedObject(model_object: Option<&Object>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithRepresentedObject:)] pub unsafe fn initWithRepresentedObject( this: Option>, model_object: Option<&Object>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other representedObject)] pub unsafe fn representedObject(&self) -> Option>; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other indexPath)] pub unsafe fn indexPath(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(isLeaf)] pub unsafe fn isLeaf(&self) -> bool; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other childNodes)] pub unsafe fn childNodes(&self) -> Option>>; #[cfg(feature = "Foundation_NSMutableArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mutableChildNodes)] pub unsafe fn mutableChildNodes(&self) -> Id, Owned>; #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other descendantNodeAtIndexPath:)] pub unsafe fn descendantNodeAtIndexPath( &self, index_path: &NSIndexPath, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other parentNode)] pub unsafe fn parentNode(&self) -> Option>; @@ -63,6 +73,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSSortDescriptor" ))] + #[cfg(not(any(target_os = "ios")))] #[method(sortWithSortDescriptors:recursively:)] pub unsafe fn sortWithSortDescriptors_recursively( &self, diff --git a/AppKit/NSUserActivity.rs b/AppKit/NSUserActivity.rs index 35b8bebd8..446b312a9 100644 --- a/AppKit/NSUserActivity.rs +++ b/AppKit/NSUserActivity.rs @@ -6,8 +6,10 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSUserActivityRestoring: NSObjectProtocol { #[cfg(feature = "Foundation_NSUserActivity")] + #[cfg(not(any(target_os = "ios")))] #[method(restoreUserActivityState:)] unsafe fn restoreUserActivityState(&self, user_activity: &NSUserActivity); } @@ -20,14 +22,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSResponder")] unsafe impl NSResponder { #[cfg(feature = "Foundation_NSUserActivity")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other userActivity)] pub unsafe fn userActivity(&self) -> Option>; #[cfg(feature = "Foundation_NSUserActivity")] + #[cfg(not(any(target_os = "ios")))] #[method(setUserActivity:)] pub unsafe fn setUserActivity(&self, user_activity: Option<&NSUserActivity>); #[cfg(feature = "Foundation_NSUserActivity")] + #[cfg(not(any(target_os = "ios")))] #[method(updateUserActivityState:)] pub unsafe fn updateUserActivityState(&self, user_activity: &NSUserActivity); } @@ -41,14 +46,17 @@ extern_methods!( #[cfg(feature = "AppKit_NSDocument")] unsafe impl NSDocument { #[cfg(feature = "Foundation_NSUserActivity")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other userActivity)] pub unsafe fn userActivity(&self) -> Option>; #[cfg(feature = "Foundation_NSUserActivity")] + #[cfg(not(any(target_os = "ios")))] #[method(setUserActivity:)] pub unsafe fn setUserActivity(&self, user_activity: Option<&NSUserActivity>); #[cfg(feature = "Foundation_NSUserActivity")] + #[cfg(not(any(target_os = "ios")))] #[method(updateUserActivityState:)] pub unsafe fn updateUserActivityState(&self, activity: &NSUserActivity); } diff --git a/AppKit/NSUserDefaultsController.rs b/AppKit/NSUserDefaultsController.rs index a8538ceee..7664c8a4a 100644 --- a/AppKit/NSUserDefaultsController.rs +++ b/AppKit/NSUserDefaultsController.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSUserDefaultsController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSUserDefaultsController; #[cfg(feature = "AppKit_NSUserDefaultsController")] @@ -32,6 +33,7 @@ unsafe impl NSObjectProtocol for NSUserDefaultsController {} extern_methods!( #[cfg(feature = "AppKit_NSUserDefaultsController")] unsafe impl NSUserDefaultsController { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedUserDefaultsController)] pub unsafe fn sharedUserDefaultsController() -> Id; @@ -40,6 +42,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSUserDefaults" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithDefaults:initialValues:)] pub unsafe fn initWithDefaults_initialValues( this: Option>, @@ -48,6 +51,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, @@ -55,38 +59,48 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSUserDefaults")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaults)] pub unsafe fn defaults(&self) -> Id; #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other initialValues)] pub unsafe fn initialValues(&self) -> Option>>; #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setInitialValues:)] pub unsafe fn setInitialValues( &self, initial_values: Option<&NSDictionary>, ); + #[cfg(not(any(target_os = "ios")))] #[method(appliesImmediately)] pub unsafe fn appliesImmediately(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAppliesImmediately:)] pub unsafe fn setAppliesImmediately(&self, applies_immediately: bool); + #[cfg(not(any(target_os = "ios")))] #[method(hasUnappliedChanges)] pub unsafe fn hasUnappliedChanges(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other values)] pub unsafe fn values(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(revert:)] pub unsafe fn revert(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(save:)] pub unsafe fn save(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(revertToInitialValues:)] pub unsafe fn revertToInitialValues(&self, sender: Option<&Object>); } diff --git a/AppKit/NSUserInterfaceCompression.rs b/AppKit/NSUserInterfaceCompression.rs index 412b88179..c0e045680 100644 --- a/AppKit/NSUserInterfaceCompression.rs +++ b/AppKit/NSUserInterfaceCompression.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSUserInterfaceCompressionOptions")] + #[cfg(not(any(target_os = "ios")))] pub struct NSUserInterfaceCompressionOptions; #[cfg(feature = "AppKit_NSUserInterfaceCompressionOptions")] @@ -25,14 +26,17 @@ unsafe impl NSObjectProtocol for NSUserInterfaceCompressionOptions {} extern_methods!( #[cfg(feature = "AppKit_NSUserInterfaceCompressionOptions")] unsafe impl NSUserInterfaceCompressionOptions { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithIdentifier:)] pub unsafe fn initWithIdentifier( this: Option>, @@ -40,57 +44,70 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSSet")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCompressionOptions:)] pub unsafe fn initWithCompressionOptions( this: Option>, options: &NSSet, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(containsOptions:)] pub unsafe fn containsOptions(&self, options: &NSUserInterfaceCompressionOptions) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(intersectsOptions:)] pub unsafe fn intersectsOptions(&self, options: &NSUserInterfaceCompressionOptions) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isEmpty)] pub unsafe fn isEmpty(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other optionsByAddingOptions:)] pub unsafe fn optionsByAddingOptions( &self, options: &NSUserInterfaceCompressionOptions, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other optionsByRemovingOptions:)] pub unsafe fn optionsByRemovingOptions( &self, options: &NSUserInterfaceCompressionOptions, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other hideImagesOption)] pub unsafe fn hideImagesOption() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other hideTextOption)] pub unsafe fn hideTextOption() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other reduceMetricsOption)] pub unsafe fn reduceMetricsOption() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other breakEqualWidthsOption)] pub unsafe fn breakEqualWidthsOption() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other standardOptions)] pub unsafe fn standardOptions() -> Id; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSUserInterfaceCompression { #[cfg(all( feature = "AppKit_NSUserInterfaceCompressionOptions", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(compressWithPrioritizedCompressionOptions:)] unsafe fn compressWithPrioritizedCompressionOptions( &self, @@ -101,6 +118,7 @@ extern_protocol!( feature = "AppKit_NSUserInterfaceCompressionOptions", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(minimumSizeWithPrioritizedCompressionOptions:)] unsafe fn minimumSizeWithPrioritizedCompressionOptions( &self, @@ -108,6 +126,7 @@ extern_protocol!( ) -> NSSize; #[cfg(feature = "AppKit_NSUserInterfaceCompressionOptions")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other activeCompressionOptions)] unsafe fn activeCompressionOptions(&self) -> Id; } diff --git a/AppKit/NSUserInterfaceItemIdentification.rs b/AppKit/NSUserInterfaceItemIdentification.rs index 6fc696e7e..ca9ae3307 100644 --- a/AppKit/NSUserInterfaceItemIdentification.rs +++ b/AppKit/NSUserInterfaceItemIdentification.rs @@ -10,10 +10,13 @@ typed_extensible_enum!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSUserInterfaceItemIdentification { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other identifier)] unsafe fn identifier(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setIdentifier:)] unsafe fn setIdentifier(&self, identifier: Option<&NSUserInterfaceItemIdentifier>); } diff --git a/AppKit/NSUserInterfaceItemSearching.rs b/AppKit/NSUserInterfaceItemSearching.rs index b1fcda767..6743d9560 100644 --- a/AppKit/NSUserInterfaceItemSearching.rs +++ b/AppKit/NSUserInterfaceItemSearching.rs @@ -6,8 +6,10 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSUserInterfaceItemSearching: NSObjectProtocol { #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(searchForItemsWithSearchString:resultLimit:matchedItemHandler:)] unsafe fn searchForItemsWithSearchString_resultLimit_matchedItemHandler( &self, @@ -17,14 +19,17 @@ extern_protocol!( ); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedTitlesForItem:)] unsafe fn localizedTitlesForItem(&self, item: &Object) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(performActionForItem:)] unsafe fn performActionForItem(&self, item: &Object); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(showAllHelpTopicsForSearchString:)] unsafe fn showAllHelpTopicsForSearchString(&self, search_string: &NSString); @@ -37,12 +42,14 @@ extern_methods!( /// NSUserInterfaceItemSearching #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method(registerUserInterfaceItemSearchHandler:)] pub unsafe fn registerUserInterfaceItemSearchHandler( &self, handler: &ProtocolObject, ); + #[cfg(not(any(target_os = "ios")))] #[method(unregisterUserInterfaceItemSearchHandler:)] pub unsafe fn unregisterUserInterfaceItemSearchHandler( &self, @@ -50,6 +57,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(searchString:inUserInterfaceItemString:searchRange:foundRange:)] pub unsafe fn searchString_inUserInterfaceItemString_searchRange_foundRange( &self, diff --git a/AppKit/NSUserInterfaceLayout.rs b/AppKit/NSUserInterfaceLayout.rs index dbbef7ed3..a9d197966 100644 --- a/AppKit/NSUserInterfaceLayout.rs +++ b/AppKit/NSUserInterfaceLayout.rs @@ -7,16 +7,22 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSUserInterfaceLayoutDirection { + #[cfg(not(any(target_os = "ios")))] NSUserInterfaceLayoutDirectionLeftToRight = 0, + #[cfg(not(any(target_os = "ios")))] NSUserInterfaceLayoutDirectionRightToLeft = 1, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSUserInterfaceLayoutOrientation { + #[cfg(not(any(target_os = "ios")))] NSUserInterfaceLayoutOrientationHorizontal = 0, + #[cfg(not(any(target_os = "ios")))] NSUserInterfaceLayoutOrientationVertical = 1, } ); diff --git a/AppKit/NSUserInterfaceValidation.rs b/AppKit/NSUserInterfaceValidation.rs index d95b02843..38fde8cb3 100644 --- a/AppKit/NSUserInterfaceValidation.rs +++ b/AppKit/NSUserInterfaceValidation.rs @@ -6,10 +6,13 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSValidatedUserInterfaceItem { + #[cfg(not(any(target_os = "ios")))] #[method(action)] unsafe fn action(&self) -> Option; + #[cfg(not(any(target_os = "ios")))] #[method(tag)] unsafe fn tag(&self) -> NSInteger; } @@ -18,7 +21,9 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSUserInterfaceValidations { + #[cfg(not(any(target_os = "ios")))] #[method(validateUserInterfaceItem:)] unsafe fn validateUserInterfaceItem( &self, diff --git a/AppKit/NSView.rs b/AppKit/NSView.rs index 21a2f92ea..9656dcab0 100644 --- a/AppKit/NSView.rs +++ b/AppKit/NSView.rs @@ -7,52 +7,84 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSAutoresizingMaskOptions { + #[cfg(not(any(target_os = "ios")))] NSViewNotSizable = 0, + #[cfg(not(any(target_os = "ios")))] NSViewMinXMargin = 1, + #[cfg(not(any(target_os = "ios")))] NSViewWidthSizable = 2, + #[cfg(not(any(target_os = "ios")))] NSViewMaxXMargin = 4, + #[cfg(not(any(target_os = "ios")))] NSViewMinYMargin = 8, + #[cfg(not(any(target_os = "ios")))] NSViewHeightSizable = 16, + #[cfg(not(any(target_os = "ios")))] NSViewMaxYMargin = 32, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSBorderType { + #[cfg(not(any(target_os = "ios")))] NSNoBorder = 0, + #[cfg(not(any(target_os = "ios")))] NSLineBorder = 1, + #[cfg(not(any(target_os = "ios")))] NSBezelBorder = 2, + #[cfg(not(any(target_os = "ios")))] NSGrooveBorder = 3, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSViewLayerContentsRedrawPolicy { + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsRedrawNever = 0, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsRedrawOnSetNeedsDisplay = 1, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsRedrawDuringViewResize = 2, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsRedrawBeforeViewResize = 3, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsRedrawCrossfade = 4, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSViewLayerContentsPlacement { + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsPlacementScaleAxesIndependently = 0, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsPlacementScaleProportionallyToFit = 1, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsPlacementScaleProportionallyToFill = 2, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsPlacementCenter = 3, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsPlacementTop = 4, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsPlacementTopRight = 5, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsPlacementRight = 6, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsPlacementBottomRight = 7, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsPlacementBottom = 8, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsPlacementBottomLeft = 9, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsPlacementLeft = 10, + #[cfg(not(any(target_os = "ios")))] NSViewLayerContentsPlacementTopLeft = 11, } ); @@ -64,6 +96,7 @@ pub type NSToolTipTag = NSInteger; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSView; #[cfg(feature = "AppKit_NSView")] @@ -100,10 +133,12 @@ unsafe impl NSUserInterfaceItemIdentification for NSView {} extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, @@ -111,38 +146,49 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other window)] pub unsafe fn window(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other superview)] pub unsafe fn superview(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other subviews)] pub unsafe fn subviews(&self) -> Id>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setSubviews:)] pub unsafe fn setSubviews(&self, subviews: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(isDescendantOf:)] pub unsafe fn isDescendantOf(&self, view: &NSView) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other ancestorSharedWithView:)] pub unsafe fn ancestorSharedWithView(&self, view: &NSView) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other opaqueAncestor)] pub unsafe fn opaqueAncestor(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isHiddenOrHasHiddenAncestor)] pub unsafe fn isHiddenOrHasHiddenAncestor(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(getRectsBeingDrawn:count:)] pub unsafe fn getRectsBeingDrawn_count( &self, @@ -150,21 +196,27 @@ extern_methods!( count: *mut NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(needsToDrawRect:)] pub unsafe fn needsToDrawRect(&self, rect: NSRect) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(wantsDefaultClipping)] pub unsafe fn wantsDefaultClipping(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(viewDidHide)] pub unsafe fn viewDidHide(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewDidUnhide)] pub unsafe fn viewDidUnhide(&self); + #[cfg(not(any(target_os = "ios")))] #[method(addSubview:)] pub unsafe fn addSubview(&self, view: &NSView); + #[cfg(not(any(target_os = "ios")))] #[method(addSubview:positioned:relativeTo:)] pub unsafe fn addSubview_positioned_relativeTo( &self, @@ -173,6 +225,7 @@ extern_methods!( other_view: Option<&NSView>, ); + #[cfg(not(any(target_os = "ios")))] #[method(sortSubviewsUsingFunction:context:)] pub unsafe fn sortSubviewsUsingFunction_context( &self, @@ -185,126 +238,166 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(viewWillMoveToWindow:)] pub unsafe fn viewWillMoveToWindow(&self, new_window: Option<&NSWindow>); + #[cfg(not(any(target_os = "ios")))] #[method(viewDidMoveToWindow)] pub unsafe fn viewDidMoveToWindow(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewWillMoveToSuperview:)] pub unsafe fn viewWillMoveToSuperview(&self, new_superview: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(viewDidMoveToSuperview)] pub unsafe fn viewDidMoveToSuperview(&self); + #[cfg(not(any(target_os = "ios")))] #[method(didAddSubview:)] pub unsafe fn didAddSubview(&self, subview: &NSView); + #[cfg(not(any(target_os = "ios")))] #[method(willRemoveSubview:)] pub unsafe fn willRemoveSubview(&self, subview: &NSView); + #[cfg(not(any(target_os = "ios")))] #[method(removeFromSuperview)] pub unsafe fn removeFromSuperview(&self); + #[cfg(not(any(target_os = "ios")))] #[method(replaceSubview:with:)] pub unsafe fn replaceSubview_with(&self, old_view: &NSView, new_view: &NSView); + #[cfg(not(any(target_os = "ios")))] #[method(removeFromSuperviewWithoutNeedingDisplay)] pub unsafe fn removeFromSuperviewWithoutNeedingDisplay(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewDidChangeBackingProperties)] pub unsafe fn viewDidChangeBackingProperties(&self); + #[cfg(not(any(target_os = "ios")))] #[method(postsFrameChangedNotifications)] pub unsafe fn postsFrameChangedNotifications(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPostsFrameChangedNotifications:)] pub unsafe fn setPostsFrameChangedNotifications( &self, posts_frame_changed_notifications: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(resizeSubviewsWithOldSize:)] pub unsafe fn resizeSubviewsWithOldSize(&self, old_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(resizeWithOldSuperviewSize:)] pub unsafe fn resizeWithOldSuperviewSize(&self, old_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(autoresizesSubviews)] pub unsafe fn autoresizesSubviews(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutoresizesSubviews:)] pub unsafe fn setAutoresizesSubviews(&self, autoresizes_subviews: bool); + #[cfg(not(any(target_os = "ios")))] #[method(autoresizingMask)] pub unsafe fn autoresizingMask(&self) -> NSAutoresizingMaskOptions; + #[cfg(not(any(target_os = "ios")))] #[method(setAutoresizingMask:)] pub unsafe fn setAutoresizingMask(&self, autoresizing_mask: NSAutoresizingMaskOptions); + #[cfg(not(any(target_os = "ios")))] #[method(setFrameOrigin:)] pub unsafe fn setFrameOrigin(&self, new_origin: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(setFrameSize:)] pub unsafe fn setFrameSize(&self, new_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setFrame:)] pub unsafe fn setFrame(&self, frame: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(frameRotation)] pub unsafe fn frameRotation(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setFrameRotation:)] pub unsafe fn setFrameRotation(&self, frame_rotation: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(frameCenterRotation)] pub unsafe fn frameCenterRotation(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setFrameCenterRotation:)] pub unsafe fn setFrameCenterRotation(&self, frame_center_rotation: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(setBoundsOrigin:)] pub unsafe fn setBoundsOrigin(&self, new_origin: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(setBoundsSize:)] pub unsafe fn setBoundsSize(&self, new_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(boundsRotation)] pub unsafe fn boundsRotation(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setBoundsRotation:)] pub unsafe fn setBoundsRotation(&self, bounds_rotation: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(translateOriginToPoint:)] pub unsafe fn translateOriginToPoint(&self, translation: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(scaleUnitSquareToSize:)] pub unsafe fn scaleUnitSquareToSize(&self, new_unit_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(rotateByAngle:)] pub unsafe fn rotateByAngle(&self, angle: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(bounds)] pub unsafe fn bounds(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setBounds:)] pub unsafe fn setBounds(&self, bounds: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(isFlipped)] pub unsafe fn isFlipped(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isRotatedFromBase)] pub unsafe fn isRotatedFromBase(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isRotatedOrScaledFromBase)] pub unsafe fn isRotatedOrScaledFromBase(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(convertPoint:fromView:)] pub unsafe fn convertPoint_fromView( &self, @@ -312,21 +405,27 @@ extern_methods!( view: Option<&NSView>, ) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(convertPoint:toView:)] pub unsafe fn convertPoint_toView(&self, point: NSPoint, view: Option<&NSView>) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(convertSize:fromView:)] pub unsafe fn convertSize_fromView(&self, size: NSSize, view: Option<&NSView>) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(convertSize:toView:)] pub unsafe fn convertSize_toView(&self, size: NSSize, view: Option<&NSView>) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(convertRect:fromView:)] pub unsafe fn convertRect_fromView(&self, rect: NSRect, view: Option<&NSView>) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(convertRect:toView:)] pub unsafe fn convertRect_toView(&self, rect: NSRect, view: Option<&NSView>) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(backingAlignedRect:options:)] pub unsafe fn backingAlignedRect_options( &self, @@ -334,112 +433,146 @@ extern_methods!( options: NSAlignmentOptions, ) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(centerScanRect:)] pub unsafe fn centerScanRect(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(convertPointToBacking:)] pub unsafe fn convertPointToBacking(&self, point: NSPoint) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(convertPointFromBacking:)] pub unsafe fn convertPointFromBacking(&self, point: NSPoint) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(convertSizeToBacking:)] pub unsafe fn convertSizeToBacking(&self, size: NSSize) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(convertSizeFromBacking:)] pub unsafe fn convertSizeFromBacking(&self, size: NSSize) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(convertRectToBacking:)] pub unsafe fn convertRectToBacking(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(convertRectFromBacking:)] pub unsafe fn convertRectFromBacking(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(convertPointToLayer:)] pub unsafe fn convertPointToLayer(&self, point: NSPoint) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(convertPointFromLayer:)] pub unsafe fn convertPointFromLayer(&self, point: NSPoint) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(convertSizeToLayer:)] pub unsafe fn convertSizeToLayer(&self, size: NSSize) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(convertSizeFromLayer:)] pub unsafe fn convertSizeFromLayer(&self, size: NSSize) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(convertRectToLayer:)] pub unsafe fn convertRectToLayer(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(convertRectFromLayer:)] pub unsafe fn convertRectFromLayer(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(canDrawConcurrently)] pub unsafe fn canDrawConcurrently(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanDrawConcurrently:)] pub unsafe fn setCanDrawConcurrently(&self, can_draw_concurrently: bool); #[deprecated = "If a view needs display, -drawRect: or -updateLayer will be called automatically when the view is able to draw. To check whether a view is in a window, call -window. To check whether a view is hidden, call -isHiddenOrHasHiddenAncestor."] + #[cfg(not(any(target_os = "ios")))] #[method(canDraw)] pub unsafe fn canDraw(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setNeedsDisplayInRect:)] pub unsafe fn setNeedsDisplayInRect(&self, invalid_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(needsDisplay)] pub unsafe fn needsDisplay(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setNeedsDisplay:)] pub unsafe fn setNeedsDisplay(&self, needs_display: bool); #[deprecated = "To draw, subclass NSView and implement -drawRect:; AppKit's automatic deferred display mechanism will call -drawRect: as necessary to display the view."] + #[cfg(not(any(target_os = "ios")))] #[method(lockFocus)] pub unsafe fn lockFocus(&self); #[deprecated = "To draw, subclass NSView and implement -drawRect:; AppKit's automatic deferred display mechanism will call -drawRect: as necessary to display the view."] + #[cfg(not(any(target_os = "ios")))] #[method(unlockFocus)] pub unsafe fn unlockFocus(&self); #[deprecated = "To draw, subclass NSView and implement -drawRect:; AppKit's automatic deferred display mechanism will call -drawRect: as necessary to display the view."] + #[cfg(not(any(target_os = "ios")))] #[method(lockFocusIfCanDraw)] pub unsafe fn lockFocusIfCanDraw(&self) -> bool; #[cfg(feature = "AppKit_NSGraphicsContext")] #[deprecated = "Use -[NSView displayRectIgnoringOpacity:inContext:] to draw a view subtree into a graphics context."] + #[cfg(not(any(target_os = "ios")))] #[method(lockFocusIfCanDrawInContext:)] pub unsafe fn lockFocusIfCanDrawInContext(&self, context: &NSGraphicsContext) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other focusView)] pub unsafe fn focusView() -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(visibleRect)] pub unsafe fn visibleRect(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(display)] pub unsafe fn display(&self); + #[cfg(not(any(target_os = "ios")))] #[method(displayIfNeeded)] pub unsafe fn displayIfNeeded(&self); + #[cfg(not(any(target_os = "ios")))] #[method(displayIfNeededIgnoringOpacity)] pub unsafe fn displayIfNeededIgnoringOpacity(&self); + #[cfg(not(any(target_os = "ios")))] #[method(displayRect:)] pub unsafe fn displayRect(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(displayIfNeededInRect:)] pub unsafe fn displayIfNeededInRect(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(displayRectIgnoringOpacity:)] pub unsafe fn displayRectIgnoringOpacity(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(displayIfNeededInRectIgnoringOpacity:)] pub unsafe fn displayIfNeededInRectIgnoringOpacity(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(drawRect:)] pub unsafe fn drawRect(&self, dirty_rect: NSRect); #[cfg(feature = "AppKit_NSGraphicsContext")] + #[cfg(not(any(target_os = "ios")))] #[method(displayRectIgnoringOpacity:inContext:)] pub unsafe fn displayRectIgnoringOpacity_inContext( &self, @@ -448,6 +581,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSBitmapImageRep")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bitmapImageRepForCachingDisplayInRect:)] pub unsafe fn bitmapImageRepForCachingDisplayInRect( &self, @@ -455,6 +589,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSBitmapImageRep")] + #[cfg(not(any(target_os = "ios")))] #[method(cacheDisplayInRect:toBitmapImageRep:)] pub unsafe fn cacheDisplayInRect_toBitmapImageRep( &self, @@ -462,26 +597,33 @@ extern_methods!( bitmap_image_rep: &NSBitmapImageRep, ); + #[cfg(not(any(target_os = "ios")))] #[method(viewWillDraw)] pub unsafe fn viewWillDraw(&self); + #[cfg(not(any(target_os = "ios")))] #[method(scrollPoint:)] pub unsafe fn scrollPoint(&self, point: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(scrollRectToVisible:)] pub unsafe fn scrollRectToVisible(&self, rect: NSRect) -> bool; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(autoscroll:)] pub unsafe fn autoscroll(&self, event: &NSEvent) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(adjustScroll:)] pub unsafe fn adjustScroll(&self, new_visible: NSRect) -> NSRect; #[deprecated = "Use NSScrollView to achieve scrolling views."] + #[cfg(not(any(target_os = "ios")))] #[method(scrollRect:by:)] pub unsafe fn scrollRect_by(&self, rect: NSRect, delta: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(translateRectsNeedingDisplayInRect:by:)] pub unsafe fn translateRectsNeedingDisplayInRect_by( &self, @@ -489,121 +631,156 @@ extern_methods!( delta: NSSize, ); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other hitTest:)] pub unsafe fn hitTest(&self, point: NSPoint) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(mouse:inRect:)] pub unsafe fn mouse_inRect(&self, point: NSPoint, rect: NSRect) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other viewWithTag:)] pub unsafe fn viewWithTag(&self, tag: NSInteger) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(performKeyEquivalent:)] pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(acceptsFirstMouse:)] pub unsafe fn acceptsFirstMouse(&self, event: Option<&NSEvent>) -> bool; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(shouldDelayWindowOrderingForEvent:)] pub unsafe fn shouldDelayWindowOrderingForEvent(&self, event: &NSEvent) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(needsPanelToBecomeKey)] pub unsafe fn needsPanelToBecomeKey(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(mouseDownCanMoveWindow)] pub unsafe fn mouseDownCanMoveWindow(&self) -> bool; #[deprecated = "Use allowedTouchTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method(acceptsTouchEvents)] pub unsafe fn acceptsTouchEvents(&self) -> bool; #[deprecated = "Use allowedTouchTypes instead"] + #[cfg(not(any(target_os = "ios")))] #[method(setAcceptsTouchEvents:)] pub unsafe fn setAcceptsTouchEvents(&self, accepts_touch_events: bool); + #[cfg(not(any(target_os = "ios")))] #[method(wantsRestingTouches)] pub unsafe fn wantsRestingTouches(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setWantsRestingTouches:)] pub unsafe fn setWantsRestingTouches(&self, wants_resting_touches: bool); + #[cfg(not(any(target_os = "ios")))] #[method(layerContentsRedrawPolicy)] pub unsafe fn layerContentsRedrawPolicy(&self) -> NSViewLayerContentsRedrawPolicy; + #[cfg(not(any(target_os = "ios")))] #[method(setLayerContentsRedrawPolicy:)] pub unsafe fn setLayerContentsRedrawPolicy( &self, layer_contents_redraw_policy: NSViewLayerContentsRedrawPolicy, ); + #[cfg(not(any(target_os = "ios")))] #[method(layerContentsPlacement)] pub unsafe fn layerContentsPlacement(&self) -> NSViewLayerContentsPlacement; + #[cfg(not(any(target_os = "ios")))] #[method(setLayerContentsPlacement:)] pub unsafe fn setLayerContentsPlacement( &self, layer_contents_placement: NSViewLayerContentsPlacement, ); + #[cfg(not(any(target_os = "ios")))] #[method(wantsLayer)] pub unsafe fn wantsLayer(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setWantsLayer:)] pub unsafe fn setWantsLayer(&self, wants_layer: bool); + #[cfg(not(any(target_os = "ios")))] #[method(wantsUpdateLayer)] pub unsafe fn wantsUpdateLayer(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(updateLayer)] pub unsafe fn updateLayer(&self); + #[cfg(not(any(target_os = "ios")))] #[method(canDrawSubviewsIntoLayer)] pub unsafe fn canDrawSubviewsIntoLayer(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanDrawSubviewsIntoLayer:)] pub unsafe fn setCanDrawSubviewsIntoLayer(&self, can_draw_subviews_into_layer: bool); + #[cfg(not(any(target_os = "ios")))] #[method(layoutSubtreeIfNeeded)] pub unsafe fn layoutSubtreeIfNeeded(&self); + #[cfg(not(any(target_os = "ios")))] #[method(layout)] pub unsafe fn layout(&self); + #[cfg(not(any(target_os = "ios")))] #[method(needsLayout)] pub unsafe fn needsLayout(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setNeedsLayout:)] pub unsafe fn setNeedsLayout(&self, needs_layout: bool); + #[cfg(not(any(target_os = "ios")))] #[method(alphaValue)] pub unsafe fn alphaValue(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setAlphaValue:)] pub unsafe fn setAlphaValue(&self, alpha_value: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(layerUsesCoreImageFilters)] pub unsafe fn layerUsesCoreImageFilters(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setLayerUsesCoreImageFilters:)] pub unsafe fn setLayerUsesCoreImageFilters(&self, layer_uses_core_image_filters: bool); #[cfg(feature = "AppKit_NSShadow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other shadow)] pub unsafe fn shadow(&self) -> Option>; #[cfg(feature = "AppKit_NSShadow")] + #[cfg(not(any(target_os = "ios")))] #[method(setShadow:)] pub unsafe fn setShadow(&self, shadow: Option<&NSShadow>); + #[cfg(not(any(target_os = "ios")))] #[method(postsBoundsChangedNotifications)] pub unsafe fn postsBoundsChangedNotifications(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPostsBoundsChangedNotifications:)] pub unsafe fn setPostsBoundsChangedNotifications( &self, @@ -611,33 +788,41 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSScrollView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other enclosingScrollView)] pub unsafe fn enclosingScrollView(&self) -> Option>; #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSMenu"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuForEvent:)] pub unsafe fn menuForEvent(&self, event: &NSEvent) -> Option>; #[cfg(feature = "AppKit_NSMenu")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultMenu)] pub unsafe fn defaultMenu() -> Option>; #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSMenu"))] + #[cfg(not(any(target_os = "ios")))] #[method(willOpenMenu:withEvent:)] pub unsafe fn willOpenMenu_withEvent(&self, menu: &NSMenu, event: &NSEvent); #[cfg(all(feature = "AppKit_NSEvent", feature = "AppKit_NSMenu"))] + #[cfg(not(any(target_os = "ios")))] #[method(didCloseMenu:withEvent:)] pub unsafe fn didCloseMenu_withEvent(&self, menu: &NSMenu, event: Option<&NSEvent>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolTip)] pub unsafe fn toolTip(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setToolTip:)] pub unsafe fn setToolTip(&self, tool_tip: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method(addToolTipRect:owner:userData:)] pub unsafe fn addToolTipRect_owner_userData( &self, @@ -646,31 +831,40 @@ extern_methods!( data: *mut c_void, ) -> NSToolTipTag; + #[cfg(not(any(target_os = "ios")))] #[method(removeToolTip:)] pub unsafe fn removeToolTip(&self, tag: NSToolTipTag); + #[cfg(not(any(target_os = "ios")))] #[method(removeAllToolTips)] pub unsafe fn removeAllToolTips(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewWillStartLiveResize)] pub unsafe fn viewWillStartLiveResize(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewDidEndLiveResize)] pub unsafe fn viewDidEndLiveResize(&self); + #[cfg(not(any(target_os = "ios")))] #[method(inLiveResize)] pub unsafe fn inLiveResize(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(preservesContentDuringLiveResize)] pub unsafe fn preservesContentDuringLiveResize(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(rectPreservedDuringLiveResize)] pub unsafe fn rectPreservedDuringLiveResize(&self) -> NSRect; #[cfg(feature = "AppKit_NSTextInputContext")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other inputContext)] pub unsafe fn inputContext(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(rectForSmartMagnificationAtPoint:inRect:)] pub unsafe fn rectForSmartMagnificationAtPoint_inRect( &self, @@ -678,41 +872,52 @@ extern_methods!( visible_rect: NSRect, ) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(userInterfaceLayoutDirection)] pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[cfg(not(any(target_os = "ios")))] #[method(setUserInterfaceLayoutDirection:)] pub unsafe fn setUserInterfaceLayoutDirection( &self, user_interface_layout_direction: NSUserInterfaceLayoutDirection, ); + #[cfg(not(any(target_os = "ios")))] #[method(prepareForReuse)] pub unsafe fn prepareForReuse(&self); + #[cfg(not(any(target_os = "ios")))] #[method(isCompatibleWithResponsiveScrolling)] pub unsafe fn isCompatibleWithResponsiveScrolling() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(prepareContentInRect:)] pub unsafe fn prepareContentInRect(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(preparedContentRect)] pub unsafe fn preparedContentRect(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setPreparedContentRect:)] pub unsafe fn setPreparedContentRect(&self, prepared_content_rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(allowsVibrancy)] pub unsafe fn allowsVibrancy(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(viewDidChangeEffectiveAppearance)] pub unsafe fn viewDidChangeEffectiveAppearance(&self); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSViewToolTipOwner: NSObjectProtocol { #[cfg(all(feature = "AppKit_NSView", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view:stringForToolTip:point:userData:)] unsafe fn view_stringForToolTip_point_userData( &self, @@ -730,42 +935,55 @@ extern_methods!( /// NSKeyboardUI #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other nextKeyView)] pub unsafe fn nextKeyView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setNextKeyView:)] pub unsafe fn setNextKeyView(&self, next_key_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other previousKeyView)] pub unsafe fn previousKeyView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other nextValidKeyView)] pub unsafe fn nextValidKeyView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other previousValidKeyView)] pub unsafe fn previousValidKeyView(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(canBecomeKeyView)] pub unsafe fn canBecomeKeyView(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setKeyboardFocusRingNeedsDisplayInRect:)] pub unsafe fn setKeyboardFocusRingNeedsDisplayInRect(&self, rect: NSRect); + #[cfg(not(any(target_os = "ios")))] #[method(focusRingType)] pub unsafe fn focusRingType(&self) -> NSFocusRingType; + #[cfg(not(any(target_os = "ios")))] #[method(setFocusRingType:)] pub unsafe fn setFocusRingType(&self, focus_ring_type: NSFocusRingType); + #[cfg(not(any(target_os = "ios")))] #[method(defaultFocusRingType)] pub unsafe fn defaultFocusRingType() -> NSFocusRingType; + #[cfg(not(any(target_os = "ios")))] #[method(drawFocusRingMask)] pub unsafe fn drawFocusRingMask(&self); + #[cfg(not(any(target_os = "ios")))] #[method(focusRingMaskBounds)] pub unsafe fn focusRingMaskBounds(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(noteFocusRingMaskChanged)] pub unsafe fn noteFocusRingMaskChanged(&self); } @@ -776,6 +994,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method(writeEPSInsideRect:toPasteboard:)] pub unsafe fn writeEPSInsideRect_toPasteboard( &self, @@ -784,10 +1003,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataWithEPSInsideRect:)] pub unsafe fn dataWithEPSInsideRect(&self, rect: NSRect) -> Id; #[cfg(feature = "AppKit_NSPasteboard")] + #[cfg(not(any(target_os = "ios")))] #[method(writePDFInsideRect:toPasteboard:)] pub unsafe fn writePDFInsideRect_toPasteboard( &self, @@ -796,21 +1017,27 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataWithPDFInsideRect:)] pub unsafe fn dataWithPDFInsideRect(&self, rect: NSRect) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(print:)] pub unsafe fn print(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(knowsPageRange:)] pub unsafe fn knowsPageRange(&self, range: NSRangePointer) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(heightAdjustLimit)] pub unsafe fn heightAdjustLimit(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(widthAdjustLimit)] pub unsafe fn widthAdjustLimit(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(adjustPageWidthNew:left:right:limit:)] pub unsafe fn adjustPageWidthNew_left_right_limit( &self, @@ -820,6 +1047,7 @@ extern_methods!( right_limit: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(adjustPageHeightNew:top:bottom:limit:)] pub unsafe fn adjustPageHeightNew_top_bottom_limit( &self, @@ -829,40 +1057,51 @@ extern_methods!( bottom_limit: CGFloat, ); + #[cfg(not(any(target_os = "ios")))] #[method(rectForPage:)] pub unsafe fn rectForPage(&self, page: NSInteger) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(locationOfPrintRect:)] pub unsafe fn locationOfPrintRect(&self, rect: NSRect) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(drawPageBorderWithSize:)] pub unsafe fn drawPageBorderWithSize(&self, border_size: NSSize); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pageHeader)] pub unsafe fn pageHeader(&self) -> Id; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other pageFooter)] pub unsafe fn pageFooter(&self) -> Id; #[deprecated = "This is never invoked and the NSView implementation does nothing"] + #[cfg(not(any(target_os = "ios")))] #[method(drawSheetBorderWithSize:)] pub unsafe fn drawSheetBorderWithSize(&self, border_size: NSSize); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other printJobTitle)] pub unsafe fn printJobTitle(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(beginDocument)] pub unsafe fn beginDocument(&self); + #[cfg(not(any(target_os = "ios")))] #[method(endDocument)] pub unsafe fn endDocument(&self); + #[cfg(not(any(target_os = "ios")))] #[method(beginPageInRect:atPlacement:)] pub unsafe fn beginPageInRect_atPlacement(&self, rect: NSRect, location: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(endPage)] pub unsafe fn endPage(&self); } @@ -878,6 +1117,7 @@ extern_methods!( feature = "AppKit_NSEvent", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other beginDraggingSessionWithItems:event:source:)] pub unsafe fn beginDraggingSessionWithItems_event_source( &self, @@ -887,13 +1127,16 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other registeredDraggedTypes)] pub unsafe fn registeredDraggedTypes(&self) -> Id>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(registerForDraggedTypes:)] pub unsafe fn registerForDraggedTypes(&self, new_types: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(unregisterDraggedTypes)] pub unsafe fn unregisterDraggedTypes(&self); } @@ -918,6 +1161,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(all(feature = "AppKit_NSScreen", feature = "Foundation_NSDictionary"))] + #[cfg(not(any(target_os = "ios")))] #[method(enterFullScreenMode:withOptions:)] pub unsafe fn enterFullScreenMode_withOptions( &self, @@ -926,12 +1170,14 @@ extern_methods!( ) -> bool; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method(exitFullScreenModeWithOptions:)] pub unsafe fn exitFullScreenModeWithOptions( &self, options: Option<&NSDictionary>, ); + #[cfg(not(any(target_os = "ios")))] #[method(isInFullScreenMode)] pub unsafe fn isInFullScreenMode(&self) -> bool; } @@ -958,6 +1204,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(showDefinitionForAttributedString:atPoint:)] pub unsafe fn showDefinitionForAttributedString_atPoint( &self, @@ -969,6 +1216,7 @@ extern_methods!( feature = "Foundation_NSAttributedString", feature = "Foundation_NSDictionary" ))] + #[cfg(not(any(target_os = "ios")))] #[method(showDefinitionForAttributedString:range:options:baselineOriginProvider:)] pub unsafe fn showDefinitionForAttributedString_range_options_baselineOriginProvider( &self, @@ -984,6 +1232,7 @@ extern_methods!( /// NSFindIndicator #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { + #[cfg(not(any(target_os = "ios")))] #[method(isDrawingFindIndicator)] pub unsafe fn isDrawingFindIndicator(&self) -> bool; } @@ -994,10 +1243,12 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(all(feature = "AppKit_NSGestureRecognizer", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other gestureRecognizers)] pub unsafe fn gestureRecognizers(&self) -> Id>; #[cfg(all(feature = "AppKit_NSGestureRecognizer", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method(setGestureRecognizers:)] pub unsafe fn setGestureRecognizers( &self, @@ -1005,10 +1256,12 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] #[method(addGestureRecognizer:)] pub unsafe fn addGestureRecognizer(&self, gesture_recognizer: &NSGestureRecognizer); #[cfg(feature = "AppKit_NSGestureRecognizer")] + #[cfg(not(any(target_os = "ios")))] #[method(removeGestureRecognizer:)] pub unsafe fn removeGestureRecognizer(&self, gesture_recognizer: &NSGestureRecognizer); } @@ -1018,9 +1271,11 @@ extern_methods!( /// NSTouchBar #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { + #[cfg(not(any(target_os = "ios")))] #[method(allowedTouchTypes)] pub unsafe fn allowedTouchTypes(&self) -> NSTouchTypeMask; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowedTouchTypes:)] pub unsafe fn setAllowedTouchTypes(&self, allowed_touch_types: NSTouchTypeMask); } @@ -1030,23 +1285,29 @@ extern_methods!( /// NSSafeAreas #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { + #[cfg(not(any(target_os = "ios")))] #[method(safeAreaInsets)] pub unsafe fn safeAreaInsets(&self) -> NSEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(additionalSafeAreaInsets)] pub unsafe fn additionalSafeAreaInsets(&self) -> NSEdgeInsets; + #[cfg(not(any(target_os = "ios")))] #[method(setAdditionalSafeAreaInsets:)] pub unsafe fn setAdditionalSafeAreaInsets(&self, additional_safe_area_insets: NSEdgeInsets); #[cfg(feature = "AppKit_NSLayoutGuide")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other safeAreaLayoutGuide)] pub unsafe fn safeAreaLayoutGuide(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(safeAreaRect)] pub unsafe fn safeAreaRect(&self) -> NSRect; #[cfg(feature = "AppKit_NSLayoutGuide")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other layoutMarginsGuide)] pub unsafe fn layoutMarginsGuide(&self) -> Id; } @@ -1057,34 +1318,43 @@ extern_methods!( #[cfg(feature = "AppKit_NSView")] unsafe impl NSView { #[cfg(feature = "AppKit_NSTrackingArea")] + #[cfg(not(any(target_os = "ios")))] #[method(addTrackingArea:)] pub unsafe fn addTrackingArea(&self, tracking_area: &NSTrackingArea); #[cfg(feature = "AppKit_NSTrackingArea")] + #[cfg(not(any(target_os = "ios")))] #[method(removeTrackingArea:)] pub unsafe fn removeTrackingArea(&self, tracking_area: &NSTrackingArea); #[cfg(all(feature = "AppKit_NSTrackingArea", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other trackingAreas)] pub unsafe fn trackingAreas(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(updateTrackingAreas)] pub unsafe fn updateTrackingAreas(&self); #[cfg(feature = "AppKit_NSCursor")] + #[cfg(not(any(target_os = "ios")))] #[method(addCursorRect:cursor:)] pub unsafe fn addCursorRect_cursor(&self, rect: NSRect, object: &NSCursor); #[cfg(feature = "AppKit_NSCursor")] + #[cfg(not(any(target_os = "ios")))] #[method(removeCursorRect:cursor:)] pub unsafe fn removeCursorRect_cursor(&self, rect: NSRect, object: &NSCursor); + #[cfg(not(any(target_os = "ios")))] #[method(discardCursorRects)] pub unsafe fn discardCursorRects(&self); + #[cfg(not(any(target_os = "ios")))] #[method(resetCursorRects)] pub unsafe fn resetCursorRects(&self); + #[cfg(not(any(target_os = "ios")))] #[method(addTrackingRect:owner:userData:assumeInside:)] pub unsafe fn addTrackingRect_owner_userData_assumeInside( &self, @@ -1094,6 +1364,7 @@ extern_methods!( flag: bool, ) -> NSTrackingRectTag; + #[cfg(not(any(target_os = "ios")))] #[method(removeTrackingRect:)] pub unsafe fn removeTrackingRect(&self, tag: NSTrackingRectTag); } @@ -1109,6 +1380,7 @@ extern_methods!( feature = "AppKit_NSPasteboard" ))] #[deprecated = "Use -beginDraggingSessionWithItems:event:source: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(dragImage:at:offset:event:pasteboard:source:slideBack:)] pub unsafe fn dragImage_at_offset_event_pasteboard_source_slideBack( &self, @@ -1123,6 +1395,7 @@ extern_methods!( #[cfg(all(feature = "AppKit_NSEvent", feature = "Foundation_NSString"))] #[deprecated = "Use -beginDraggingSessionWithItems:event:source: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(dragFile:fromRect:slideBack:event:)] pub unsafe fn dragFile_fromRect_slideBack_event( &self, @@ -1138,6 +1411,7 @@ extern_methods!( feature = "Foundation_NSString" ))] #[deprecated = "Use -beginDraggingSessionWithItems:event:source: with an NSFilePromiseProvider instead"] + #[cfg(not(any(target_os = "ios")))] #[method(dragPromisedFilesOfTypes:fromRect:source:slideBack:event:)] pub unsafe fn dragPromisedFilesOfTypes_fromRect_source_slideBack_event( &self, @@ -1149,51 +1423,63 @@ extern_methods!( ) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(convertPointToBase:)] pub unsafe fn convertPointToBase(&self, point: NSPoint) -> NSPoint; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(convertPointFromBase:)] pub unsafe fn convertPointFromBase(&self, point: NSPoint) -> NSPoint; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(convertSizeToBase:)] pub unsafe fn convertSizeToBase(&self, size: NSSize) -> NSSize; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(convertSizeFromBase:)] pub unsafe fn convertSizeFromBase(&self, size: NSSize) -> NSSize; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(convertRectToBase:)] pub unsafe fn convertRectToBase(&self, rect: NSRect) -> NSRect; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(convertRectFromBase:)] pub unsafe fn convertRectFromBase(&self, rect: NSRect) -> NSRect; #[cfg(feature = "Foundation_NSString")] #[deprecated = "This has always returned NO and had no effect on macOS"] + #[cfg(not(any(target_os = "ios")))] #[method(performMnemonic:)] pub unsafe fn performMnemonic(&self, string: &NSString) -> bool; #[deprecated = "This method no longer does anything"] + #[cfg(not(any(target_os = "ios")))] #[method(shouldDrawColor)] pub unsafe fn shouldDrawColor(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(gState)] pub unsafe fn gState(&self) -> NSInteger; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(allocateGState)] pub unsafe fn allocateGState(&self); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setUpGState)] pub unsafe fn setUpGState(&self); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(renewGState)] pub unsafe fn renewGState(&self); } diff --git a/AppKit/NSViewController.rs b/AppKit/NSViewController.rs index f12b1fcf0..d5e222a9a 100644 --- a/AppKit/NSViewController.rs +++ b/AppKit/NSViewController.rs @@ -7,15 +7,25 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSViewControllerTransitionOptions { + #[cfg(not(any(target_os = "ios")))] NSViewControllerTransitionNone = 0x0, + #[cfg(not(any(target_os = "ios")))] NSViewControllerTransitionCrossfade = 0x1, + #[cfg(not(any(target_os = "ios")))] NSViewControllerTransitionSlideUp = 0x10, + #[cfg(not(any(target_os = "ios")))] NSViewControllerTransitionSlideDown = 0x20, + #[cfg(not(any(target_os = "ios")))] NSViewControllerTransitionSlideLeft = 0x40, + #[cfg(not(any(target_os = "ios")))] NSViewControllerTransitionSlideRight = 0x80, + #[cfg(not(any(target_os = "ios")))] NSViewControllerTransitionSlideForward = 0x140, + #[cfg(not(any(target_os = "ios")))] NSViewControllerTransitionSlideBackward = 0x180, + #[cfg(not(any(target_os = "ios")))] NSViewControllerTransitionAllowUserInteraction = 0x1000, } ); @@ -23,6 +33,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSViewController; #[cfg(feature = "AppKit_NSViewController")] @@ -51,6 +62,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSViewController")] unsafe impl NSViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, @@ -59,44 +71,55 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other nibName)] pub unsafe fn nibName(&self) -> Option>; #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other nibBundle)] pub unsafe fn nibBundle(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other representedObject)] pub unsafe fn representedObject(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setRepresentedObject:)] pub unsafe fn setRepresentedObject(&self, represented_object: Option<&Object>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Id; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setView:)] pub unsafe fn setView(&self, view: &NSView); + #[cfg(not(any(target_os = "ios")))] #[method(loadView)] pub unsafe fn loadView(&self); + #[cfg(not(any(target_os = "ios")))] #[method(commitEditingWithDelegate:didCommitSelector:contextInfo:)] pub unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( &self, @@ -105,42 +128,55 @@ extern_methods!( context_info: *mut c_void, ); + #[cfg(not(any(target_os = "ios")))] #[method(commitEditing)] pub unsafe fn commitEditing(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(discardEditing)] pub unsafe fn discardEditing(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewDidLoad)] pub unsafe fn viewDidLoad(&self); + #[cfg(not(any(target_os = "ios")))] #[method(isViewLoaded)] pub unsafe fn isViewLoaded(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(viewWillAppear)] pub unsafe fn viewWillAppear(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewDidAppear)] pub unsafe fn viewDidAppear(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewWillDisappear)] pub unsafe fn viewWillDisappear(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewDidDisappear)] pub unsafe fn viewDidDisappear(&self); + #[cfg(not(any(target_os = "ios")))] #[method(preferredContentSize)] pub unsafe fn preferredContentSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setPreferredContentSize:)] pub unsafe fn setPreferredContentSize(&self, preferred_content_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(updateViewConstraints)] pub unsafe fn updateViewConstraints(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewWillLayout)] pub unsafe fn viewWillLayout(&self); + #[cfg(not(any(target_os = "ios")))] #[method(viewDidLayout)] pub unsafe fn viewDidLayout(&self); } @@ -150,6 +186,7 @@ extern_methods!( /// NSViewControllerPresentation #[cfg(feature = "AppKit_NSViewController")] unsafe impl NSViewController { + #[cfg(not(any(target_os = "ios")))] #[method(presentViewController:animator:)] pub unsafe fn presentViewController_animator( &self, @@ -157,16 +194,20 @@ extern_methods!( animator: &ProtocolObject, ); + #[cfg(not(any(target_os = "ios")))] #[method(dismissViewController:)] pub unsafe fn dismissViewController(&self, view_controller: &NSViewController); + #[cfg(not(any(target_os = "ios")))] #[method(dismissController:)] pub unsafe fn dismissController(&self, sender: Option<&Object>); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other presentedViewControllers)] pub unsafe fn presentedViewControllers(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other presentingViewController)] pub unsafe fn presentingViewController(&self) -> Option>; } @@ -176,13 +217,16 @@ extern_methods!( /// NSViewControllerPresentationAndTransitionStyles #[cfg(feature = "AppKit_NSViewController")] unsafe impl NSViewController { + #[cfg(not(any(target_os = "ios")))] #[method(presentViewControllerAsSheet:)] pub unsafe fn presentViewControllerAsSheet(&self, view_controller: &NSViewController); + #[cfg(not(any(target_os = "ios")))] #[method(presentViewControllerAsModalWindow:)] pub unsafe fn presentViewControllerAsModalWindow(&self, view_controller: &NSViewController); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(presentViewController:asPopoverRelativeToRect:ofView:preferredEdge:behavior:)] pub unsafe fn presentViewController_asPopoverRelativeToRect_ofView_preferredEdge_behavior( &self, @@ -193,6 +237,7 @@ extern_methods!( behavior: NSPopoverBehavior, ); + #[cfg(not(any(target_os = "ios")))] #[method(transitionFromViewController:toViewController:options:completionHandler:)] pub unsafe fn transitionFromViewController_toViewController_options_completionHandler( &self, @@ -208,26 +253,32 @@ extern_methods!( /// NSViewControllerContainer #[cfg(feature = "AppKit_NSViewController")] unsafe impl NSViewController { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other parentViewController)] pub unsafe fn parentViewController(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other childViewControllers)] pub unsafe fn childViewControllers(&self) -> Id>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(setChildViewControllers:)] pub unsafe fn setChildViewControllers( &self, child_view_controllers: &NSArray, ); + #[cfg(not(any(target_os = "ios")))] #[method(addChildViewController:)] pub unsafe fn addChildViewController(&self, child_view_controller: &NSViewController); + #[cfg(not(any(target_os = "ios")))] #[method(removeFromParentViewController)] pub unsafe fn removeFromParentViewController(&self); + #[cfg(not(any(target_os = "ios")))] #[method(insertChildViewController:atIndex:)] pub unsafe fn insertChildViewController_atIndex( &self, @@ -235,23 +286,28 @@ extern_methods!( index: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(removeChildViewControllerAtIndex:)] pub unsafe fn removeChildViewControllerAtIndex(&self, index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(preferredContentSizeDidChangeForViewController:)] pub unsafe fn preferredContentSizeDidChangeForViewController( &self, view_controller: &NSViewController, ); + #[cfg(not(any(target_os = "ios")))] #[method(viewWillTransitionToSize:)] pub unsafe fn viewWillTransitionToSize(&self, new_size: NSSize); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSViewControllerPresentationAnimator: NSObjectProtocol { #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(animatePresentationOfViewController:fromViewController:)] unsafe fn animatePresentationOfViewController_fromViewController( &self, @@ -260,6 +316,7 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(animateDismissalOfViewController:fromViewController:)] unsafe fn animateDismissalOfViewController_fromViewController( &self, @@ -276,6 +333,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSViewController")] unsafe impl NSViewController { #[cfg(feature = "AppKit_NSStoryboard")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other storyboard)] pub unsafe fn storyboard(&self) -> Option>; } @@ -286,26 +344,33 @@ extern_methods!( #[cfg(feature = "AppKit_NSViewController")] unsafe impl NSViewController { #[cfg(feature = "Foundation_NSExtensionContext")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other extensionContext)] pub unsafe fn extensionContext(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sourceItemView)] pub unsafe fn sourceItemView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setSourceItemView:)] pub unsafe fn setSourceItemView(&self, source_item_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(preferredScreenOrigin)] pub unsafe fn preferredScreenOrigin(&self) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(setPreferredScreenOrigin:)] pub unsafe fn setPreferredScreenOrigin(&self, preferred_screen_origin: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(preferredMinimumSize)] pub unsafe fn preferredMinimumSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(preferredMaximumSize)] pub unsafe fn preferredMaximumSize(&self) -> NSSize; } diff --git a/AppKit/NSVisualEffectView.rs b/AppKit/NSVisualEffectView.rs index d64f6cb78..ed1506cdb 100644 --- a/AppKit/NSVisualEffectView.rs +++ b/AppKit/NSVisualEffectView.rs @@ -7,47 +7,74 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSVisualEffectMaterial { + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialTitlebar = 3, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialSelection = 4, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialMenu = 5, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialPopover = 6, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialSidebar = 7, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialHeaderView = 10, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialSheet = 11, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialWindowBackground = 12, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialHUDWindow = 13, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialFullScreenUI = 15, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialToolTip = 17, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialContentBackground = 18, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialUnderWindowBackground = 21, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialUnderPageBackground = 22, #[deprecated = "Use a specific semantic material instead."] + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialAppearanceBased = 0, #[deprecated = "Use a semantic material instead. To force the appearance of a view hierarchy, set the `appearance` property to an appropriate NSAppearance value."] + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialLight = 1, #[deprecated = "Use a semantic material instead. To force the appearance of a view hierarchy, set the `appearance` property to an appropriate NSAppearance value."] + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialDark = 2, #[deprecated = "Use a semantic material instead. To force the appearance of a view hierarchy, set the `appearance` property to an appropriate NSAppearance value."] + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialMediumLight = 8, #[deprecated = "Use a semantic material instead. To force the appearance of a view hierarchy, set the `appearance` property to an appropriate NSAppearance value."] + #[cfg(not(any(target_os = "ios")))] NSVisualEffectMaterialUltraDark = 9, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSVisualEffectBlendingMode { + #[cfg(not(any(target_os = "ios")))] NSVisualEffectBlendingModeBehindWindow = 0, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectBlendingModeWithinWindow = 1, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSVisualEffectState { + #[cfg(not(any(target_os = "ios")))] NSVisualEffectStateFollowsWindowActiveState = 0, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectStateActive = 1, + #[cfg(not(any(target_os = "ios")))] NSVisualEffectStateInactive = 2, } ); @@ -55,6 +82,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSVisualEffectView")] + #[cfg(not(any(target_os = "ios")))] pub struct NSVisualEffectView; #[cfg(feature = "AppKit_NSVisualEffectView")] @@ -91,45 +119,58 @@ unsafe impl NSUserInterfaceItemIdentification for NSVisualEffectView {} extern_methods!( #[cfg(feature = "AppKit_NSVisualEffectView")] unsafe impl NSVisualEffectView { + #[cfg(not(any(target_os = "ios")))] #[method(material)] pub unsafe fn material(&self) -> NSVisualEffectMaterial; + #[cfg(not(any(target_os = "ios")))] #[method(setMaterial:)] pub unsafe fn setMaterial(&self, material: NSVisualEffectMaterial); + #[cfg(not(any(target_os = "ios")))] #[method(interiorBackgroundStyle)] pub unsafe fn interiorBackgroundStyle(&self) -> NSBackgroundStyle; + #[cfg(not(any(target_os = "ios")))] #[method(blendingMode)] pub unsafe fn blendingMode(&self) -> NSVisualEffectBlendingMode; + #[cfg(not(any(target_os = "ios")))] #[method(setBlendingMode:)] pub unsafe fn setBlendingMode(&self, blending_mode: NSVisualEffectBlendingMode); + #[cfg(not(any(target_os = "ios")))] #[method(state)] pub unsafe fn state(&self) -> NSVisualEffectState; + #[cfg(not(any(target_os = "ios")))] #[method(setState:)] pub unsafe fn setState(&self, state: NSVisualEffectState); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other maskImage)] pub unsafe fn maskImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setMaskImage:)] pub unsafe fn setMaskImage(&self, mask_image: Option<&NSImage>); + #[cfg(not(any(target_os = "ios")))] #[method(isEmphasized)] pub unsafe fn isEmphasized(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEmphasized:)] pub unsafe fn setEmphasized(&self, emphasized: bool); + #[cfg(not(any(target_os = "ios")))] #[method(viewDidMoveToWindow)] pub unsafe fn viewDidMoveToWindow(&self); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(viewWillMoveToWindow:)] pub unsafe fn viewWillMoveToWindow(&self, new_window: Option<&NSWindow>); } @@ -139,6 +180,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "AppKit_NSVisualEffectView")] unsafe impl NSVisualEffectView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/AppKit/NSWindow.rs b/AppKit/NSWindow.rs index 801be632c..2263aa842 100644 --- a/AppKit/NSWindow.rs +++ b/AppKit/NSWindow.rs @@ -11,20 +11,34 @@ extern_static!(NSAppKitVersionNumberWithDeferredWindowDisplaySupport: NSAppKitVe ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowStyleMask { + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskBorderless = 0, + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskTitled = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskClosable = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskMiniaturizable = 1 << 2, + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskResizable = 1 << 3, #[deprecated = "Textured window style should no longer be used"] + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskTexturedBackground = 1 << 8, + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskUnifiedTitleAndToolbar = 1 << 12, + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskFullScreen = 1 << 14, + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskFullSizeContentView = 1 << 15, + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskUtilityWindow = 1 << 4, + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskDocModalWindow = 1 << 6, + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskNonactivatingPanel = 1 << 7, + #[cfg(not(any(target_os = "ios")))] NSWindowStyleMaskHUDWindow = 1 << 13, } ); @@ -35,65 +49,100 @@ extern_static!(NSModalResponseCancel: NSModalResponse = 0); extern_enum!( #[underlying(c_uint)] + #[cfg(not(any(target_os = "ios")))] pub enum __anonymous__ { + #[cfg(not(any(target_os = "ios")))] NSDisplayWindowRunLoopOrdering = 600000, + #[cfg(not(any(target_os = "ios")))] NSResetCursorRectsRunLoopOrdering = 700000, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowSharingType { + #[cfg(not(any(target_os = "ios")))] NSWindowSharingNone = 0, + #[cfg(not(any(target_os = "ios")))] NSWindowSharingReadOnly = 1, + #[cfg(not(any(target_os = "ios")))] NSWindowSharingReadWrite = 2, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowCollectionBehavior { + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorCanJoinAllSpaces = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorMoveToActiveSpace = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorManaged = 1 << 2, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorTransient = 1 << 3, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorStationary = 1 << 4, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorParticipatesInCycle = 1 << 5, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorIgnoresCycle = 1 << 6, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorFullScreenNone = 1 << 9, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorFullScreenAllowsTiling = 1 << 11, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorFullScreenDisallowsTiling = 1 << 12, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorPrimary = 1 << 16, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorAuxiliary = 1 << 17, + #[cfg(not(any(target_os = "ios")))] NSWindowCollectionBehaviorCanJoinAllApplications = 1 << 18, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowAnimationBehavior { + #[cfg(not(any(target_os = "ios")))] NSWindowAnimationBehaviorDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSWindowAnimationBehaviorNone = 2, + #[cfg(not(any(target_os = "ios")))] NSWindowAnimationBehaviorDocumentWindow = 3, + #[cfg(not(any(target_os = "ios")))] NSWindowAnimationBehaviorUtilityWindow = 4, + #[cfg(not(any(target_os = "ios")))] NSWindowAnimationBehaviorAlertPanel = 5, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowNumberListOptions { + #[cfg(not(any(target_os = "ios")))] NSWindowNumberListAllApplications = 1 << 0, + #[cfg(not(any(target_os = "ios")))] NSWindowNumberListAllSpaces = 1 << 4, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowOcclusionState { + #[cfg(not(any(target_os = "ios")))] NSWindowOcclusionStateVisible = 1 << 1, } ); @@ -104,68 +153,101 @@ typed_extensible_enum!( ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSSelectionDirection { + #[cfg(not(any(target_os = "ios")))] NSDirectSelection = 0, + #[cfg(not(any(target_os = "ios")))] NSSelectingNext = 1, + #[cfg(not(any(target_os = "ios")))] NSSelectingPrevious = 2, } ); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowButton { + #[cfg(not(any(target_os = "ios")))] NSWindowCloseButton = 0, + #[cfg(not(any(target_os = "ios")))] NSWindowMiniaturizeButton = 1, + #[cfg(not(any(target_os = "ios")))] NSWindowZoomButton = 2, + #[cfg(not(any(target_os = "ios")))] NSWindowToolbarButton = 3, + #[cfg(not(any(target_os = "ios")))] NSWindowDocumentIconButton = 4, + #[cfg(not(any(target_os = "ios")))] NSWindowDocumentVersionsButton = 6, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowTitleVisibility { + #[cfg(not(any(target_os = "ios")))] NSWindowTitleVisible = 0, + #[cfg(not(any(target_os = "ios")))] NSWindowTitleHidden = 1, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowToolbarStyle { + #[cfg(not(any(target_os = "ios")))] NSWindowToolbarStyleAutomatic = 0, + #[cfg(not(any(target_os = "ios")))] NSWindowToolbarStyleExpanded = 1, + #[cfg(not(any(target_os = "ios")))] NSWindowToolbarStylePreference = 2, + #[cfg(not(any(target_os = "ios")))] NSWindowToolbarStyleUnified = 3, + #[cfg(not(any(target_os = "ios")))] NSWindowToolbarStyleUnifiedCompact = 4, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowUserTabbingPreference { + #[cfg(not(any(target_os = "ios")))] NSWindowUserTabbingPreferenceManual = 0, + #[cfg(not(any(target_os = "ios")))] NSWindowUserTabbingPreferenceAlways = 1, + #[cfg(not(any(target_os = "ios")))] NSWindowUserTabbingPreferenceInFullScreen = 2, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowTabbingMode { + #[cfg(not(any(target_os = "ios")))] NSWindowTabbingModeAutomatic = 0, + #[cfg(not(any(target_os = "ios")))] NSWindowTabbingModePreferred = 1, + #[cfg(not(any(target_os = "ios")))] NSWindowTabbingModeDisallowed = 2, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSTitlebarSeparatorStyle { + #[cfg(not(any(target_os = "ios")))] NSTitlebarSeparatorStyleAutomatic = 0, + #[cfg(not(any(target_os = "ios")))] NSTitlebarSeparatorStyleNone = 1, + #[cfg(not(any(target_os = "ios")))] NSTitlebarSeparatorStyleLine = 2, + #[cfg(not(any(target_os = "ios")))] NSTitlebarSeparatorStyleShadow = 3, } ); @@ -179,6 +261,7 @@ pub type NSWindowTabbingIdentifier = NSString; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] pub struct NSWindow; #[cfg(feature = "AppKit_NSWindow")] @@ -218,12 +301,14 @@ unsafe impl NSUserInterfaceValidations for NSWindow {} extern_methods!( #[cfg(feature = "AppKit_NSWindow")] unsafe impl NSWindow { + #[cfg(not(any(target_os = "ios")))] #[method(frameRectForContentRect:styleMask:)] pub unsafe fn frameRectForContentRect_styleMask( c_rect: NSRect, style: NSWindowStyleMask, ) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(contentRectForFrameRect:styleMask:)] pub unsafe fn contentRectForFrameRect_styleMask( f_rect: NSRect, @@ -231,21 +316,26 @@ extern_methods!( ) -> NSRect; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(minFrameWidthWithTitle:styleMask:)] pub unsafe fn minFrameWidthWithTitle_styleMask( title: &NSString, style: NSWindowStyleMask, ) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(defaultDepthLimit)] pub unsafe fn defaultDepthLimit() -> NSWindowDepth; + #[cfg(not(any(target_os = "ios")))] #[method(frameRectForContentRect:)] pub unsafe fn frameRectForContentRect(&self, content_rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(contentRectForFrameRect:)] pub unsafe fn contentRectForFrameRect(&self, frame_rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:)] pub unsafe fn initWithContentRect_styleMask_backing_defer( this: Option>, @@ -256,6 +346,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSScreen")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:screen:)] pub unsafe fn initWithContentRect_styleMask_backing_defer_screen( this: Option>, @@ -267,46 +358,59 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other subtitle)] pub unsafe fn subtitle(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setSubtitle:)] pub unsafe fn setSubtitle(&self, subtitle: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(titleVisibility)] pub unsafe fn titleVisibility(&self) -> NSWindowTitleVisibility; + #[cfg(not(any(target_os = "ios")))] #[method(setTitleVisibility:)] pub unsafe fn setTitleVisibility(&self, title_visibility: NSWindowTitleVisibility); + #[cfg(not(any(target_os = "ios")))] #[method(titlebarAppearsTransparent)] pub unsafe fn titlebarAppearsTransparent(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setTitlebarAppearsTransparent:)] pub unsafe fn setTitlebarAppearsTransparent(&self, titlebar_appears_transparent: bool); + #[cfg(not(any(target_os = "ios")))] #[method(toolbarStyle)] pub unsafe fn toolbarStyle(&self) -> NSWindowToolbarStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setToolbarStyle:)] pub unsafe fn setToolbarStyle(&self, toolbar_style: NSWindowToolbarStyle); + #[cfg(not(any(target_os = "ios")))] #[method(contentLayoutRect)] pub unsafe fn contentLayoutRect(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentLayoutGuide)] pub unsafe fn contentLayoutGuide(&self) -> Option>; @@ -314,6 +418,7 @@ extern_methods!( feature = "AppKit_NSTitlebarAccessoryViewController", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other titlebarAccessoryViewControllers)] pub unsafe fn titlebarAccessoryViewControllers( &self, @@ -323,6 +428,7 @@ extern_methods!( feature = "AppKit_NSTitlebarAccessoryViewController", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setTitlebarAccessoryViewControllers:)] pub unsafe fn setTitlebarAccessoryViewControllers( &self, @@ -330,6 +436,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSTitlebarAccessoryViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(addTitlebarAccessoryViewController:)] pub unsafe fn addTitlebarAccessoryViewController( &self, @@ -337,6 +444,7 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSTitlebarAccessoryViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(insertTitlebarAccessoryViewController:atIndex:)] pub unsafe fn insertTitlebarAccessoryViewController_atIndex( &self, @@ -344,59 +452,75 @@ extern_methods!( index: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(removeTitlebarAccessoryViewControllerAtIndex:)] pub unsafe fn removeTitlebarAccessoryViewControllerAtIndex(&self, index: NSInteger); #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other representedURL)] pub unsafe fn representedURL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method(setRepresentedURL:)] pub unsafe fn setRepresentedURL(&self, represented_url: Option<&NSURL>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other representedFilename)] pub unsafe fn representedFilename(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setRepresentedFilename:)] pub unsafe fn setRepresentedFilename(&self, represented_filename: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitleWithRepresentedFilename:)] pub unsafe fn setTitleWithRepresentedFilename(&self, filename: &NSString); + #[cfg(not(any(target_os = "ios")))] #[method(isExcludedFromWindowsMenu)] pub unsafe fn isExcludedFromWindowsMenu(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setExcludedFromWindowsMenu:)] pub unsafe fn setExcludedFromWindowsMenu(&self, excluded_from_windows_menu: bool); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentView)] pub unsafe fn contentView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setContentView:)] pub unsafe fn setContentView(&self, content_view: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject>); + #[cfg(not(any(target_os = "ios")))] #[method(windowNumber)] pub unsafe fn windowNumber(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(styleMask)] pub unsafe fn styleMask(&self) -> NSWindowStyleMask; + #[cfg(not(any(target_os = "ios")))] #[method(setStyleMask:)] pub unsafe fn setStyleMask(&self, style_mask: NSWindowStyleMask); #[cfg(feature = "AppKit_NSText")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fieldEditor:forObject:)] pub unsafe fn fieldEditor_forObject( &self, @@ -404,10 +528,12 @@ extern_methods!( object: Option<&Object>, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(endEditingFor:)] pub unsafe fn endEditingFor(&self, object: Option<&Object>); #[cfg(feature = "AppKit_NSScreen")] + #[cfg(not(any(target_os = "ios")))] #[method(constrainFrameRect:toScreen:)] pub unsafe fn constrainFrameRect_toScreen( &self, @@ -415,27 +541,35 @@ extern_methods!( screen: Option<&NSScreen>, ) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(setFrame:display:)] pub unsafe fn setFrame_display(&self, frame_rect: NSRect, flag: bool); + #[cfg(not(any(target_os = "ios")))] #[method(setContentSize:)] pub unsafe fn setContentSize(&self, size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(setFrameOrigin:)] pub unsafe fn setFrameOrigin(&self, point: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(setFrameTopLeftPoint:)] pub unsafe fn setFrameTopLeftPoint(&self, point: NSPoint); + #[cfg(not(any(target_os = "ios")))] #[method(cascadeTopLeftFromPoint:)] pub unsafe fn cascadeTopLeftFromPoint(&self, top_left_point: NSPoint) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(animationResizeTime:)] pub unsafe fn animationResizeTime(&self, new_frame: NSRect) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios")))] #[method(setFrame:display:animate:)] pub unsafe fn setFrame_display_animate( &self, @@ -444,93 +578,122 @@ extern_methods!( animate_flag: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(inLiveResize)] pub unsafe fn inLiveResize(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(resizeIncrements)] pub unsafe fn resizeIncrements(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setResizeIncrements:)] pub unsafe fn setResizeIncrements(&self, resize_increments: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(aspectRatio)] pub unsafe fn aspectRatio(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setAspectRatio:)] pub unsafe fn setAspectRatio(&self, aspect_ratio: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(contentResizeIncrements)] pub unsafe fn contentResizeIncrements(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setContentResizeIncrements:)] pub unsafe fn setContentResizeIncrements(&self, content_resize_increments: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(contentAspectRatio)] pub unsafe fn contentAspectRatio(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setContentAspectRatio:)] pub unsafe fn setContentAspectRatio(&self, content_aspect_ratio: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(viewsNeedDisplay)] pub unsafe fn viewsNeedDisplay(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setViewsNeedDisplay:)] pub unsafe fn setViewsNeedDisplay(&self, views_need_display: bool); + #[cfg(not(any(target_os = "ios")))] #[method(displayIfNeeded)] pub unsafe fn displayIfNeeded(&self); + #[cfg(not(any(target_os = "ios")))] #[method(display)] pub unsafe fn display(&self); + #[cfg(not(any(target_os = "ios")))] #[method(preservesContentDuringLiveResize)] pub unsafe fn preservesContentDuringLiveResize(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPreservesContentDuringLiveResize:)] pub unsafe fn setPreservesContentDuringLiveResize( &self, preserves_content_during_live_resize: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(update)] pub unsafe fn update(&self); + #[cfg(not(any(target_os = "ios")))] #[method(makeFirstResponder:)] pub unsafe fn makeFirstResponder(&self, responder: Option<&NSResponder>) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other firstResponder)] pub unsafe fn firstResponder(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(resizeFlags)] pub unsafe fn resizeFlags(&self) -> NSEventModifierFlags; + #[cfg(not(any(target_os = "ios")))] #[method(close)] pub unsafe fn close(&self); + #[cfg(not(any(target_os = "ios")))] #[method(isReleasedWhenClosed)] pub unsafe fn isReleasedWhenClosed(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setReleasedWhenClosed:)] pub unsafe fn setReleasedWhenClosed(&self, released_when_closed: bool); + #[cfg(not(any(target_os = "ios")))] #[method(miniaturize:)] pub unsafe fn miniaturize(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(deminiaturize:)] pub unsafe fn deminiaturize(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(isZoomed)] pub unsafe fn isZoomed(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(zoom:)] pub unsafe fn zoom(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(isMiniaturized)] pub unsafe fn isMiniaturized(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(tryToPerform:with:)] pub unsafe fn tryToPerform_with(&self, action: Sel, object: Option<&Object>) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other validRequestorForSendType:returnType:)] pub unsafe fn validRequestorForSendType_returnType( &self, @@ -539,13 +702,16 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[cfg(feature = "AppKit_NSColor")] + #[cfg(not(any(target_os = "ios")))] #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>); + #[cfg(not(any(target_os = "ios")))] #[method(setContentBorderThickness:forEdge:)] pub unsafe fn setContentBorderThickness_forEdge( &self, @@ -553,9 +719,11 @@ extern_methods!( edge: NSRectEdge, ); + #[cfg(not(any(target_os = "ios")))] #[method(contentBorderThicknessForEdge:)] pub unsafe fn contentBorderThicknessForEdge(&self, edge: NSRectEdge) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setAutorecalculatesContentBorderThickness:forEdge:)] pub unsafe fn setAutorecalculatesContentBorderThickness_forEdge( &self, @@ -563,51 +731,66 @@ extern_methods!( edge: NSRectEdge, ); + #[cfg(not(any(target_os = "ios")))] #[method(autorecalculatesContentBorderThicknessForEdge:)] pub unsafe fn autorecalculatesContentBorderThicknessForEdge( &self, edge: NSRectEdge, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isMovable)] pub unsafe fn isMovable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setMovable:)] pub unsafe fn setMovable(&self, movable: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isMovableByWindowBackground)] pub unsafe fn isMovableByWindowBackground(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setMovableByWindowBackground:)] pub unsafe fn setMovableByWindowBackground(&self, movable_by_window_background: bool); + #[cfg(not(any(target_os = "ios")))] #[method(hidesOnDeactivate)] pub unsafe fn hidesOnDeactivate(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHidesOnDeactivate:)] pub unsafe fn setHidesOnDeactivate(&self, hides_on_deactivate: bool); + #[cfg(not(any(target_os = "ios")))] #[method(canHide)] pub unsafe fn canHide(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanHide:)] pub unsafe fn setCanHide(&self, can_hide: bool); + #[cfg(not(any(target_os = "ios")))] #[method(center)] pub unsafe fn center(&self); + #[cfg(not(any(target_os = "ios")))] #[method(makeKeyAndOrderFront:)] pub unsafe fn makeKeyAndOrderFront(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(orderFront:)] pub unsafe fn orderFront(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(orderBack:)] pub unsafe fn orderBack(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(orderOut:)] pub unsafe fn orderOut(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(orderWindow:relativeTo:)] pub unsafe fn orderWindow_relativeTo( &self, @@ -615,104 +798,135 @@ extern_methods!( other_win: NSInteger, ); + #[cfg(not(any(target_os = "ios")))] #[method(orderFrontRegardless)] pub unsafe fn orderFrontRegardless(&self); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other miniwindowImage)] pub unsafe fn miniwindowImage(&self) -> Option>; #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setMiniwindowImage:)] pub unsafe fn setMiniwindowImage(&self, miniwindow_image: Option<&NSImage>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other miniwindowTitle)] pub unsafe fn miniwindowTitle(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setMiniwindowTitle:)] pub unsafe fn setMiniwindowTitle(&self, miniwindow_title: Option<&NSString>); #[cfg(feature = "AppKit_NSDockTile")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dockTile)] pub unsafe fn dockTile(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(isDocumentEdited)] pub unsafe fn isDocumentEdited(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDocumentEdited:)] pub unsafe fn setDocumentEdited(&self, document_edited: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isVisible)] pub unsafe fn isVisible(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isKeyWindow)] pub unsafe fn isKeyWindow(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isMainWindow)] pub unsafe fn isMainWindow(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(canBecomeKeyWindow)] pub unsafe fn canBecomeKeyWindow(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(canBecomeMainWindow)] pub unsafe fn canBecomeMainWindow(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(makeKeyWindow)] pub unsafe fn makeKeyWindow(&self); + #[cfg(not(any(target_os = "ios")))] #[method(makeMainWindow)] pub unsafe fn makeMainWindow(&self); + #[cfg(not(any(target_os = "ios")))] #[method(becomeKeyWindow)] pub unsafe fn becomeKeyWindow(&self); + #[cfg(not(any(target_os = "ios")))] #[method(resignKeyWindow)] pub unsafe fn resignKeyWindow(&self); + #[cfg(not(any(target_os = "ios")))] #[method(becomeMainWindow)] pub unsafe fn becomeMainWindow(&self); + #[cfg(not(any(target_os = "ios")))] #[method(resignMainWindow)] pub unsafe fn resignMainWindow(&self); + #[cfg(not(any(target_os = "ios")))] #[method(worksWhenModal)] pub unsafe fn worksWhenModal(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(preventsApplicationTerminationWhenModal)] pub unsafe fn preventsApplicationTerminationWhenModal(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPreventsApplicationTerminationWhenModal:)] pub unsafe fn setPreventsApplicationTerminationWhenModal( &self, prevents_application_termination_when_modal: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(convertRectToScreen:)] pub unsafe fn convertRectToScreen(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(convertRectFromScreen:)] pub unsafe fn convertRectFromScreen(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(convertPointToScreen:)] pub unsafe fn convertPointToScreen(&self, point: NSPoint) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(convertPointFromScreen:)] pub unsafe fn convertPointFromScreen(&self, point: NSPoint) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(convertRectToBacking:)] pub unsafe fn convertRectToBacking(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(convertRectFromBacking:)] pub unsafe fn convertRectFromBacking(&self, rect: NSRect) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(convertPointToBacking:)] pub unsafe fn convertPointToBacking(&self, point: NSPoint) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(convertPointFromBacking:)] pub unsafe fn convertPointFromBacking(&self, point: NSPoint) -> NSPoint; + #[cfg(not(any(target_os = "ios")))] #[method(backingAlignedRect:options:)] pub unsafe fn backingAlignedRect_options( &self, @@ -720,151 +934,196 @@ extern_methods!( options: NSAlignmentOptions, ) -> NSRect; + #[cfg(not(any(target_os = "ios")))] #[method(backingScaleFactor)] pub unsafe fn backingScaleFactor(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(performClose:)] pub unsafe fn performClose(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(performMiniaturize:)] pub unsafe fn performMiniaturize(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(performZoom:)] pub unsafe fn performZoom(&self, sender: Option<&Object>); #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataWithEPSInsideRect:)] pub unsafe fn dataWithEPSInsideRect(&self, rect: NSRect) -> Id; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other dataWithPDFInsideRect:)] pub unsafe fn dataWithPDFInsideRect(&self, rect: NSRect) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(print:)] pub unsafe fn print(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(allowsToolTipsWhenApplicationIsInactive)] pub unsafe fn allowsToolTipsWhenApplicationIsInactive(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsToolTipsWhenApplicationIsInactive:)] pub unsafe fn setAllowsToolTipsWhenApplicationIsInactive( &self, allows_tool_tips_when_application_is_inactive: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(backingType)] pub unsafe fn backingType(&self) -> NSBackingStoreType; + #[cfg(not(any(target_os = "ios")))] #[method(setBackingType:)] pub unsafe fn setBackingType(&self, backing_type: NSBackingStoreType); + #[cfg(not(any(target_os = "ios")))] #[method(level)] pub unsafe fn level(&self) -> NSWindowLevel; + #[cfg(not(any(target_os = "ios")))] #[method(setLevel:)] pub unsafe fn setLevel(&self, level: NSWindowLevel); + #[cfg(not(any(target_os = "ios")))] #[method(depthLimit)] pub unsafe fn depthLimit(&self) -> NSWindowDepth; + #[cfg(not(any(target_os = "ios")))] #[method(setDepthLimit:)] pub unsafe fn setDepthLimit(&self, depth_limit: NSWindowDepth); + #[cfg(not(any(target_os = "ios")))] #[method(setDynamicDepthLimit:)] pub unsafe fn setDynamicDepthLimit(&self, flag: bool); + #[cfg(not(any(target_os = "ios")))] #[method(hasDynamicDepthLimit)] pub unsafe fn hasDynamicDepthLimit(&self) -> bool; #[cfg(feature = "AppKit_NSScreen")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other screen)] pub unsafe fn screen(&self) -> Option>; #[cfg(feature = "AppKit_NSScreen")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other deepestScreen)] pub unsafe fn deepestScreen(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(hasShadow)] pub unsafe fn hasShadow(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHasShadow:)] pub unsafe fn setHasShadow(&self, has_shadow: bool); + #[cfg(not(any(target_os = "ios")))] #[method(invalidateShadow)] pub unsafe fn invalidateShadow(&self); + #[cfg(not(any(target_os = "ios")))] #[method(alphaValue)] pub unsafe fn alphaValue(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setAlphaValue:)] pub unsafe fn setAlphaValue(&self, alpha_value: CGFloat); + #[cfg(not(any(target_os = "ios")))] #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setOpaque:)] pub unsafe fn setOpaque(&self, opaque: bool); + #[cfg(not(any(target_os = "ios")))] #[method(sharingType)] pub unsafe fn sharingType(&self) -> NSWindowSharingType; + #[cfg(not(any(target_os = "ios")))] #[method(setSharingType:)] pub unsafe fn setSharingType(&self, sharing_type: NSWindowSharingType); + #[cfg(not(any(target_os = "ios")))] #[method(allowsConcurrentViewDrawing)] pub unsafe fn allowsConcurrentViewDrawing(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsConcurrentViewDrawing:)] pub unsafe fn setAllowsConcurrentViewDrawing(&self, allows_concurrent_view_drawing: bool); + #[cfg(not(any(target_os = "ios")))] #[method(displaysWhenScreenProfileChanges)] pub unsafe fn displaysWhenScreenProfileChanges(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setDisplaysWhenScreenProfileChanges:)] pub unsafe fn setDisplaysWhenScreenProfileChanges( &self, displays_when_screen_profile_changes: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(disableScreenUpdatesUntilFlush)] pub unsafe fn disableScreenUpdatesUntilFlush(&self); + #[cfg(not(any(target_os = "ios")))] #[method(canBecomeVisibleWithoutLogin)] pub unsafe fn canBecomeVisibleWithoutLogin(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCanBecomeVisibleWithoutLogin:)] pub unsafe fn setCanBecomeVisibleWithoutLogin( &self, can_become_visible_without_login: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(collectionBehavior)] pub unsafe fn collectionBehavior(&self) -> NSWindowCollectionBehavior; + #[cfg(not(any(target_os = "ios")))] #[method(setCollectionBehavior:)] pub unsafe fn setCollectionBehavior(&self, collection_behavior: NSWindowCollectionBehavior); + #[cfg(not(any(target_os = "ios")))] #[method(animationBehavior)] pub unsafe fn animationBehavior(&self) -> NSWindowAnimationBehavior; + #[cfg(not(any(target_os = "ios")))] #[method(setAnimationBehavior:)] pub unsafe fn setAnimationBehavior(&self, animation_behavior: NSWindowAnimationBehavior); + #[cfg(not(any(target_os = "ios")))] #[method(isOnActiveSpace)] pub unsafe fn isOnActiveSpace(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(toggleFullScreen:)] pub unsafe fn toggleFullScreen(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other stringWithSavedFrame)] pub unsafe fn stringWithSavedFrame(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setFrameFromString:)] pub unsafe fn setFrameFromString(&self, string: &NSWindowPersistableFrameDescriptor); + #[cfg(not(any(target_os = "ios")))] #[method(saveFrameUsingName:)] pub unsafe fn saveFrameUsingName(&self, name: &NSWindowFrameAutosaveName); + #[cfg(not(any(target_os = "ios")))] #[method(setFrameUsingName:force:)] pub unsafe fn setFrameUsingName_force( &self, @@ -872,66 +1131,86 @@ extern_methods!( force: bool, ) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setFrameUsingName:)] pub unsafe fn setFrameUsingName(&self, name: &NSWindowFrameAutosaveName) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setFrameAutosaveName:)] pub unsafe fn setFrameAutosaveName(&self, name: &NSWindowFrameAutosaveName) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other frameAutosaveName)] pub unsafe fn frameAutosaveName(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(removeFrameUsingName:)] pub unsafe fn removeFrameUsingName(name: &NSWindowFrameAutosaveName); + #[cfg(not(any(target_os = "ios")))] #[method(minSize)] pub unsafe fn minSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setMinSize:)] pub unsafe fn setMinSize(&self, min_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(maxSize)] pub unsafe fn maxSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxSize:)] pub unsafe fn setMaxSize(&self, max_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(contentMinSize)] pub unsafe fn contentMinSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setContentMinSize:)] pub unsafe fn setContentMinSize(&self, content_min_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(contentMaxSize)] pub unsafe fn contentMaxSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setContentMaxSize:)] pub unsafe fn setContentMaxSize(&self, content_max_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(minFullScreenContentSize)] pub unsafe fn minFullScreenContentSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setMinFullScreenContentSize:)] pub unsafe fn setMinFullScreenContentSize(&self, min_full_screen_content_size: NSSize); + #[cfg(not(any(target_os = "ios")))] #[method(maxFullScreenContentSize)] pub unsafe fn maxFullScreenContentSize(&self) -> NSSize; + #[cfg(not(any(target_os = "ios")))] #[method(setMaxFullScreenContentSize:)] pub unsafe fn setMaxFullScreenContentSize(&self, max_full_screen_content_size: NSSize); #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other deviceDescription)] pub unsafe fn deviceDescription(&self) -> Id>; #[cfg(feature = "AppKit_NSWindowController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowController)] pub unsafe fn windowController(&self) -> Option>; #[cfg(feature = "AppKit_NSWindowController")] + #[cfg(not(any(target_os = "ios")))] #[method(setWindowController:)] pub unsafe fn setWindowController(&self, window_controller: Option<&NSWindowController>); + #[cfg(not(any(target_os = "ios")))] #[method(beginSheet:completionHandler:)] pub unsafe fn beginSheet_completionHandler( &self, @@ -939,6 +1218,7 @@ extern_methods!( handler: Option<&Block<(NSModalResponse,), ()>>, ); + #[cfg(not(any(target_os = "ios")))] #[method(beginCriticalSheet:completionHandler:)] pub unsafe fn beginCriticalSheet_completionHandler( &self, @@ -946,9 +1226,11 @@ extern_methods!( handler: Option<&Block<(NSModalResponse,), ()>>, ); + #[cfg(not(any(target_os = "ios")))] #[method(endSheet:)] pub unsafe fn endSheet(&self, sheet_window: &NSWindow); + #[cfg(not(any(target_os = "ios")))] #[method(endSheet:returnCode:)] pub unsafe fn endSheet_returnCode( &self, @@ -957,19 +1239,24 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sheets)] pub unsafe fn sheets(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attachedSheet)] pub unsafe fn attachedSheet(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(isSheet)] pub unsafe fn isSheet(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sheetParent)] pub unsafe fn sheetParent(&self) -> Option>; #[cfg(feature = "AppKit_NSButton")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other standardWindowButton:forStyleMask:)] pub unsafe fn standardWindowButton_forStyleMask( b: NSWindowButton, @@ -977,9 +1264,11 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSButton")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other standardWindowButton:)] pub unsafe fn standardWindowButton(&self, b: NSWindowButton) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(addChildWindow:ordered:)] pub unsafe fn addChildWindow_ordered( &self, @@ -987,54 +1276,68 @@ extern_methods!( place: NSWindowOrderingMode, ); + #[cfg(not(any(target_os = "ios")))] #[method(removeChildWindow:)] pub unsafe fn removeChildWindow(&self, child_win: &NSWindow); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other childWindows)] pub unsafe fn childWindows(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other parentWindow)] pub unsafe fn parentWindow(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setParentWindow:)] pub unsafe fn setParentWindow(&self, parent_window: Option<&NSWindow>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other appearanceSource)] pub unsafe fn appearanceSource(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setAppearanceSource:)] pub unsafe fn setAppearanceSource(&self, appearance_source: Option<&NSObject>); #[cfg(feature = "AppKit_NSColorSpace")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other colorSpace)] pub unsafe fn colorSpace(&self) -> Option>; #[cfg(feature = "AppKit_NSColorSpace")] + #[cfg(not(any(target_os = "ios")))] #[method(setColorSpace:)] pub unsafe fn setColorSpace(&self, color_space: Option<&NSColorSpace>); + #[cfg(not(any(target_os = "ios")))] #[method(canRepresentDisplayGamut:)] pub unsafe fn canRepresentDisplayGamut(&self, display_gamut: NSDisplayGamut) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowNumbersWithOptions:)] pub unsafe fn windowNumbersWithOptions( options: NSWindowNumberListOptions, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(windowNumberAtPoint:belowWindowWithWindowNumber:)] pub unsafe fn windowNumberAtPoint_belowWindowWithWindowNumber( point: NSPoint, window_number: NSInteger, ) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(occlusionState)] pub unsafe fn occlusionState(&self) -> NSWindowOcclusionState; + #[cfg(not(any(target_os = "ios")))] #[method(titlebarSeparatorStyle)] pub unsafe fn titlebarSeparatorStyle(&self) -> NSTitlebarSeparatorStyle; + #[cfg(not(any(target_os = "ios")))] #[method(setTitlebarSeparatorStyle:)] pub unsafe fn setTitlebarSeparatorStyle( &self, @@ -1042,10 +1345,12 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentViewController)] pub unsafe fn contentViewController(&self) -> Option>; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(setContentViewController:)] pub unsafe fn setContentViewController( &self, @@ -1053,128 +1358,165 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowWithContentViewController:)] pub unsafe fn windowWithContentViewController( content_view_controller: &NSViewController, ) -> Id; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(performWindowDragWithEvent:)] pub unsafe fn performWindowDragWithEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other initialFirstResponder)] pub unsafe fn initialFirstResponder(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setInitialFirstResponder:)] pub unsafe fn setInitialFirstResponder(&self, initial_first_responder: Option<&NSView>); + #[cfg(not(any(target_os = "ios")))] #[method(selectNextKeyView:)] pub unsafe fn selectNextKeyView(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(selectPreviousKeyView:)] pub unsafe fn selectPreviousKeyView(&self, sender: Option<&Object>); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(selectKeyViewFollowingView:)] pub unsafe fn selectKeyViewFollowingView(&self, view: &NSView); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(selectKeyViewPrecedingView:)] pub unsafe fn selectKeyViewPrecedingView(&self, view: &NSView); + #[cfg(not(any(target_os = "ios")))] #[method(keyViewSelectionDirection)] pub unsafe fn keyViewSelectionDirection(&self) -> NSSelectionDirection; #[cfg(feature = "AppKit_NSButtonCell")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultButtonCell)] pub unsafe fn defaultButtonCell(&self) -> Option>; #[cfg(feature = "AppKit_NSButtonCell")] + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultButtonCell:)] pub unsafe fn setDefaultButtonCell(&self, default_button_cell: Option<&NSButtonCell>); + #[cfg(not(any(target_os = "ios")))] #[method(disableKeyEquivalentForDefaultButtonCell)] pub unsafe fn disableKeyEquivalentForDefaultButtonCell(&self); + #[cfg(not(any(target_os = "ios")))] #[method(enableKeyEquivalentForDefaultButtonCell)] pub unsafe fn enableKeyEquivalentForDefaultButtonCell(&self); + #[cfg(not(any(target_os = "ios")))] #[method(autorecalculatesKeyViewLoop)] pub unsafe fn autorecalculatesKeyViewLoop(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAutorecalculatesKeyViewLoop:)] pub unsafe fn setAutorecalculatesKeyViewLoop(&self, autorecalculates_key_view_loop: bool); + #[cfg(not(any(target_os = "ios")))] #[method(recalculateKeyViewLoop)] pub unsafe fn recalculateKeyViewLoop(&self); #[cfg(feature = "AppKit_NSToolbar")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolbar)] pub unsafe fn toolbar(&self) -> Option>; #[cfg(feature = "AppKit_NSToolbar")] + #[cfg(not(any(target_os = "ios")))] #[method(setToolbar:)] pub unsafe fn setToolbar(&self, toolbar: Option<&NSToolbar>); + #[cfg(not(any(target_os = "ios")))] #[method(toggleToolbarShown:)] pub unsafe fn toggleToolbarShown(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(runToolbarCustomizationPalette:)] pub unsafe fn runToolbarCustomizationPalette(&self, sender: Option<&Object>); #[deprecated = "This property has no effect"] + #[cfg(not(any(target_os = "ios")))] #[method(showsToolbarButton)] pub unsafe fn showsToolbarButton(&self) -> bool; #[deprecated = "This property has no effect"] + #[cfg(not(any(target_os = "ios")))] #[method(setShowsToolbarButton:)] pub unsafe fn setShowsToolbarButton(&self, shows_toolbar_button: bool); + #[cfg(not(any(target_os = "ios")))] #[method(allowsAutomaticWindowTabbing)] pub unsafe fn allowsAutomaticWindowTabbing() -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsAutomaticWindowTabbing:)] pub unsafe fn setAllowsAutomaticWindowTabbing(allows_automatic_window_tabbing: bool); + #[cfg(not(any(target_os = "ios")))] #[method(userTabbingPreference)] pub unsafe fn userTabbingPreference() -> NSWindowUserTabbingPreference; + #[cfg(not(any(target_os = "ios")))] #[method(tabbingMode)] pub unsafe fn tabbingMode(&self) -> NSWindowTabbingMode; + #[cfg(not(any(target_os = "ios")))] #[method(setTabbingMode:)] pub unsafe fn setTabbingMode(&self, tabbing_mode: NSWindowTabbingMode); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tabbingIdentifier)] pub unsafe fn tabbingIdentifier(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setTabbingIdentifier:)] pub unsafe fn setTabbingIdentifier(&self, tabbing_identifier: &NSWindowTabbingIdentifier); + #[cfg(not(any(target_os = "ios")))] #[method(selectNextTab:)] pub unsafe fn selectNextTab(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(selectPreviousTab:)] pub unsafe fn selectPreviousTab(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(moveTabToNewWindow:)] pub unsafe fn moveTabToNewWindow(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(mergeAllWindows:)] pub unsafe fn mergeAllWindows(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(toggleTabBar:)] pub unsafe fn toggleTabBar(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(toggleTabOverview:)] pub unsafe fn toggleTabOverview(&self, sender: Option<&Object>); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tabbedWindows)] pub unsafe fn tabbedWindows(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(addTabbedWindow:ordered:)] pub unsafe fn addTabbedWindow_ordered( &self, @@ -1183,13 +1525,16 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSWindowTab")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tab)] pub unsafe fn tab(&self) -> Id; #[cfg(feature = "AppKit_NSWindowTabGroup")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other tabGroup)] pub unsafe fn tabGroup(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(windowTitlebarLayoutDirection)] pub unsafe fn windowTitlebarLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; } @@ -1200,6 +1545,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSWindow")] unsafe impl NSWindow { #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(trackEventsMatchingMask:timeout:mode:handler:)] pub unsafe fn trackEventsMatchingMask_timeout_mode_handler( &self, @@ -1210,10 +1556,12 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other nextEventMatchingMask:)] pub unsafe fn nextEventMatchingMask(&self, mask: NSEventMask) -> Option>; #[cfg(all(feature = "AppKit_NSEvent", feature = "Foundation_NSDate"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other nextEventMatchingMask:untilDate:inMode:dequeue:)] pub unsafe fn nextEventMatchingMask_untilDate_inMode_dequeue( &self, @@ -1224,6 +1572,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(discardEventsMatchingMask:beforeEvent:)] pub unsafe fn discardEventsMatchingMask_beforeEvent( &self, @@ -1232,29 +1581,37 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(postEvent:atStart:)] pub unsafe fn postEvent_atStart(&self, event: &NSEvent, flag: bool); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method(sendEvent:)] pub unsafe fn sendEvent(&self, event: &NSEvent); #[cfg(feature = "AppKit_NSEvent")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other currentEvent)] pub unsafe fn currentEvent(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(acceptsMouseMovedEvents)] pub unsafe fn acceptsMouseMovedEvents(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAcceptsMouseMovedEvents:)] pub unsafe fn setAcceptsMouseMovedEvents(&self, accepts_mouse_moved_events: bool); + #[cfg(not(any(target_os = "ios")))] #[method(ignoresMouseEvents)] pub unsafe fn ignoresMouseEvents(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setIgnoresMouseEvents:)] pub unsafe fn setIgnoresMouseEvents(&self, ignores_mouse_events: bool); + #[cfg(not(any(target_os = "ios")))] #[method(mouseLocationOutsideOfEventStream)] pub unsafe fn mouseLocationOutsideOfEventStream(&self) -> NSPoint; } @@ -1264,22 +1621,28 @@ extern_methods!( /// NSCursorRect #[cfg(feature = "AppKit_NSWindow")] unsafe impl NSWindow { + #[cfg(not(any(target_os = "ios")))] #[method(disableCursorRects)] pub unsafe fn disableCursorRects(&self); + #[cfg(not(any(target_os = "ios")))] #[method(enableCursorRects)] pub unsafe fn enableCursorRects(&self); + #[cfg(not(any(target_os = "ios")))] #[method(discardCursorRects)] pub unsafe fn discardCursorRects(&self); + #[cfg(not(any(target_os = "ios")))] #[method(areCursorRectsEnabled)] pub unsafe fn areCursorRectsEnabled(&self) -> bool; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(invalidateCursorRectsForView:)] pub unsafe fn invalidateCursorRectsForView(&self, view: &NSView); + #[cfg(not(any(target_os = "ios")))] #[method(resetCursorRects)] pub unsafe fn resetCursorRects(&self); } @@ -1294,6 +1657,7 @@ extern_methods!( feature = "AppKit_NSImage", feature = "AppKit_NSPasteboard" ))] + #[cfg(not(any(target_os = "ios")))] #[method(dragImage:at:offset:event:pasteboard:source:slideBack:)] pub unsafe fn dragImage_at_offset_event_pasteboard_source_slideBack( &self, @@ -1307,9 +1671,11 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method(registerForDraggedTypes:)] pub unsafe fn registerForDraggedTypes(&self, new_types: &NSArray); + #[cfg(not(any(target_os = "ios")))] #[method(unregisterDraggedTypes)] pub unsafe fn unregisterDraggedTypes(&self); } @@ -1319,25 +1685,30 @@ extern_methods!( /// NSCarbonExtensions #[cfg(feature = "AppKit_NSWindow")] unsafe impl NSWindow { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithWindowRef:)] pub unsafe fn initWithWindowRef( this: Option>, window_ref: NonNull, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(windowRef)] pub unsafe fn windowRef(&self) -> NonNull; } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSWindowDelegate: NSObjectProtocol { #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowShouldClose:)] unsafe fn windowShouldClose(&self, sender: &NSWindow) -> bool; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other windowWillReturnFieldEditor:toObject:)] unsafe fn windowWillReturnFieldEditor_toObject( @@ -1347,11 +1718,13 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowWillResize:toSize:)] unsafe fn windowWillResize_toSize(&self, sender: &NSWindow, frame_size: NSSize) -> NSSize; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowWillUseStandardFrame:defaultFrame:)] unsafe fn windowWillUseStandardFrame_defaultFrame( @@ -1361,11 +1734,13 @@ extern_protocol!( ) -> NSRect; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowShouldZoom:toFrame:)] unsafe fn windowShouldZoom_toFrame(&self, window: &NSWindow, new_frame: NSRect) -> bool; #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSUndoManager"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other windowWillReturnUndoManager:)] unsafe fn windowWillReturnUndoManager( @@ -1374,6 +1749,7 @@ extern_protocol!( ) -> Option>; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(window:willPositionSheet:usingRect:)] unsafe fn window_willPositionSheet_usingRect( @@ -1384,6 +1760,7 @@ extern_protocol!( ) -> NSRect; #[cfg(all(feature = "AppKit_NSMenu", feature = "AppKit_NSWindow"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(window:shouldPopUpDocumentPathMenu:)] unsafe fn window_shouldPopUpDocumentPathMenu( @@ -1397,6 +1774,7 @@ extern_protocol!( feature = "AppKit_NSPasteboard", feature = "AppKit_NSWindow" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(window:shouldDragDocumentWithEvent:from:withPasteboard:)] unsafe fn window_shouldDragDocumentWithEvent_from_withPasteboard( @@ -1408,6 +1786,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(window:willUseFullScreenContentSize:)] unsafe fn window_willUseFullScreenContentSize( @@ -1417,6 +1796,7 @@ extern_protocol!( ) -> NSSize; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(window:willUseFullScreenPresentationOptions:)] unsafe fn window_willUseFullScreenPresentationOptions( @@ -1426,6 +1806,7 @@ extern_protocol!( ) -> NSApplicationPresentationOptions; #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other customWindowsToEnterFullScreenForWindow:)] unsafe fn customWindowsToEnterFullScreenForWindow( @@ -1434,6 +1815,7 @@ extern_protocol!( ) -> Option>>; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(window:startCustomAnimationToEnterFullScreenWithDuration:)] unsafe fn window_startCustomAnimationToEnterFullScreenWithDuration( @@ -1443,11 +1825,13 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidFailToEnterFullScreen:)] unsafe fn windowDidFailToEnterFullScreen(&self, window: &NSWindow); #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other customWindowsToExitFullScreenForWindow:)] unsafe fn customWindowsToExitFullScreenForWindow( @@ -1456,6 +1840,7 @@ extern_protocol!( ) -> Option>>; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(window:startCustomAnimationToExitFullScreenWithDuration:)] unsafe fn window_startCustomAnimationToExitFullScreenWithDuration( @@ -1469,6 +1854,7 @@ extern_protocol!( feature = "AppKit_NSWindow", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method_id(@__retain_semantics Other customWindowsToEnterFullScreenForWindow:onScreen:)] unsafe fn customWindowsToEnterFullScreenForWindow_onScreen( @@ -1478,6 +1864,7 @@ extern_protocol!( ) -> Option>>; #[cfg(all(feature = "AppKit_NSScreen", feature = "AppKit_NSWindow"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(window:startCustomAnimationToEnterFullScreenOnScreen:withDuration:)] unsafe fn window_startCustomAnimationToEnterFullScreenOnScreen_withDuration( @@ -1488,11 +1875,13 @@ extern_protocol!( ); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidFailToExitFullScreen:)] unsafe fn windowDidFailToExitFullScreen(&self, window: &NSWindow); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(window:willResizeForVersionBrowserWithMaxPreferredSize:maxAllowedSize:)] unsafe fn window_willResizeForVersionBrowserWithMaxPreferredSize_maxAllowedSize( @@ -1503,156 +1892,187 @@ extern_protocol!( ) -> NSSize; #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSCoder"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(window:willEncodeRestorableState:)] unsafe fn window_willEncodeRestorableState(&self, window: &NSWindow, state: &NSCoder); #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSCoder"))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(window:didDecodeRestorableState:)] unsafe fn window_didDecodeRestorableState(&self, window: &NSWindow, state: &NSCoder); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidResize:)] unsafe fn windowDidResize(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidExpose:)] unsafe fn windowDidExpose(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowWillMove:)] unsafe fn windowWillMove(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidMove:)] unsafe fn windowDidMove(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidBecomeKey:)] unsafe fn windowDidBecomeKey(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidResignKey:)] unsafe fn windowDidResignKey(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidBecomeMain:)] unsafe fn windowDidBecomeMain(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidResignMain:)] unsafe fn windowDidResignMain(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowWillClose:)] unsafe fn windowWillClose(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowWillMiniaturize:)] unsafe fn windowWillMiniaturize(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidMiniaturize:)] unsafe fn windowDidMiniaturize(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidDeminiaturize:)] unsafe fn windowDidDeminiaturize(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidUpdate:)] unsafe fn windowDidUpdate(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidChangeScreen:)] unsafe fn windowDidChangeScreen(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidChangeScreenProfile:)] unsafe fn windowDidChangeScreenProfile(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidChangeBackingProperties:)] unsafe fn windowDidChangeBackingProperties(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowWillBeginSheet:)] unsafe fn windowWillBeginSheet(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidEndSheet:)] unsafe fn windowDidEndSheet(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowWillStartLiveResize:)] unsafe fn windowWillStartLiveResize(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidEndLiveResize:)] unsafe fn windowDidEndLiveResize(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowWillEnterFullScreen:)] unsafe fn windowWillEnterFullScreen(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidEnterFullScreen:)] unsafe fn windowDidEnterFullScreen(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowWillExitFullScreen:)] unsafe fn windowWillExitFullScreen(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidExitFullScreen:)] unsafe fn windowDidExitFullScreen(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowWillEnterVersionBrowser:)] unsafe fn windowWillEnterVersionBrowser(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidEnterVersionBrowser:)] unsafe fn windowDidEnterVersionBrowser(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowWillExitVersionBrowser:)] unsafe fn windowWillExitVersionBrowser(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidExitVersionBrowser:)] unsafe fn windowDidExitVersionBrowser(&self, notification: &NSNotification); #[cfg(feature = "Foundation_NSNotification")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(windowDidChangeOcclusionState:)] unsafe fn windowDidChangeOcclusionState(&self, notification: &NSNotification); @@ -1726,9 +2146,13 @@ extern_static!(NSWindowDidChangeOcclusionStateNotification: &'static NSNotificat ns_enum!( #[underlying(NSUInteger)] #[deprecated] + #[cfg(not(any(target_os = "ios")))] pub enum NSWindowBackingLocation { + #[cfg(not(any(target_os = "ios")))] NSWindowBackingLocationDefault = 0, + #[cfg(not(any(target_os = "ios")))] NSWindowBackingLocationVideoMemory = 1, + #[cfg(not(any(target_os = "ios")))] NSWindowBackingLocationMainMemory = 2, } ); @@ -1738,92 +2162,114 @@ extern_methods!( #[cfg(feature = "AppKit_NSWindow")] unsafe impl NSWindow { #[deprecated = "This method shouldn’t be used as it doesn’t work in all drawing situations; instead, a subview should be used that implements the desired drawing behavior"] + #[cfg(not(any(target_os = "ios")))] #[method(cacheImageInRect:)] pub unsafe fn cacheImageInRect(&self, rect: NSRect); #[deprecated = "This method shouldn’t be used as it doesn’t work in all drawing situations; instead, a subview should be used that implements the desired drawing behavior"] + #[cfg(not(any(target_os = "ios")))] #[method(restoreCachedImage)] pub unsafe fn restoreCachedImage(&self); #[deprecated = "This method shouldn’t be used as it doesn’t work in all drawing situations; instead, a subview should be used that implements the desired drawing behavior"] + #[cfg(not(any(target_os = "ios")))] #[method(discardCachedImage)] pub unsafe fn discardCachedImage(&self); #[cfg(feature = "AppKit_NSMenu")] #[deprecated = "This method does not do anything and should not be called."] + #[cfg(not(any(target_os = "ios")))] #[method(menuChanged:)] pub unsafe fn menuChanged(menu: &NSMenu); #[deprecated = "This method is unused and should not be called."] + #[cfg(not(any(target_os = "ios")))] #[method(gState)] pub unsafe fn gState(&self) -> NSInteger; #[deprecated = "Use -convertRectToScreen: or -convertPointToScreen: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(convertBaseToScreen:)] pub unsafe fn convertBaseToScreen(&self, point: NSPoint) -> NSPoint; #[deprecated = "Use -convertRectFromScreen or -convertPointFromScreen: instead"] + #[cfg(not(any(target_os = "ios")))] #[method(convertScreenToBase:)] pub unsafe fn convertScreenToBase(&self, point: NSPoint) -> NSPoint; #[deprecated = "Use -convertRectToBacking: and -backingScaleFactor instead"] + #[cfg(not(any(target_os = "ios")))] #[method(userSpaceScaleFactor)] pub unsafe fn userSpaceScaleFactor(&self) -> CGFloat; #[deprecated = "This method does not do anything and should not be called."] + #[cfg(not(any(target_os = "ios")))] #[method(useOptimizedDrawing:)] pub unsafe fn useOptimizedDrawing(&self, flag: bool); #[deprecated = "This method does not do anything and should not be called."] + #[cfg(not(any(target_os = "ios")))] #[method(canStoreColor)] pub unsafe fn canStoreColor(&self) -> bool; #[deprecated = "Use +[NSAnimationContext runAnimationGroup:completionHandler:] to perform atomic updates across runloop invocations."] + #[cfg(not(any(target_os = "ios")))] #[method(disableFlushWindow)] pub unsafe fn disableFlushWindow(&self); #[deprecated = "Use +[NSAnimationContext runAnimationGroup:completionHandler:] to perform atomic updates across runloop invocations."] + #[cfg(not(any(target_os = "ios")))] #[method(enableFlushWindow)] pub unsafe fn enableFlushWindow(&self); #[deprecated = "Use +[NSAnimationContext runAnimationGroup:completionHandler:] to perform atomic updates across runloop invocations."] + #[cfg(not(any(target_os = "ios")))] #[method(isFlushWindowDisabled)] pub unsafe fn isFlushWindowDisabled(&self) -> bool; #[deprecated = "Allow AppKit's automatic deferred display mechanism to take care of flushing any graphics contexts as needed."] + #[cfg(not(any(target_os = "ios")))] #[method(flushWindow)] pub unsafe fn flushWindow(&self); #[deprecated = "Allow AppKit's automatic deferred display mechanism to take care of flushing any graphics contexts as needed."] + #[cfg(not(any(target_os = "ios")))] #[method(flushWindowIfNeeded)] pub unsafe fn flushWindowIfNeeded(&self); #[deprecated = "Use +[NSAnimationContext runAnimationGroup:completionHandler:] to temporarily prevent AppKit's automatic deferred display mechanism from drawing."] + #[cfg(not(any(target_os = "ios")))] #[method(isAutodisplay)] pub unsafe fn isAutodisplay(&self) -> bool; #[deprecated = "Use +[NSAnimationContext runAnimationGroup:completionHandler:] to temporarily prevent AppKit's automatic deferred display mechanism from drawing."] + #[cfg(not(any(target_os = "ios")))] #[method(setAutodisplay:)] pub unsafe fn setAutodisplay(&self, autodisplay: bool); #[cfg(feature = "AppKit_NSGraphicsContext")] #[deprecated = "Add instances of NSView to display content in a window."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other graphicsContext)] pub unsafe fn graphicsContext(&self) -> Option>; #[deprecated = "This property does not do anything and should not be used"] + #[cfg(not(any(target_os = "ios")))] #[method(isOneShot)] pub unsafe fn isOneShot(&self) -> bool; #[deprecated = "This property does not do anything and should not be used"] + #[cfg(not(any(target_os = "ios")))] #[method(setOneShot:)] pub unsafe fn setOneShot(&self, one_shot: bool); #[deprecated = "This property does not do anything and should not be used"] + #[cfg(not(any(target_os = "ios")))] #[method(preferredBackingLocation)] pub unsafe fn preferredBackingLocation(&self) -> NSWindowBackingLocation; #[deprecated = "This property does not do anything and should not be used"] + #[cfg(not(any(target_os = "ios")))] #[method(setPreferredBackingLocation:)] pub unsafe fn setPreferredBackingLocation( &self, @@ -1831,12 +2277,15 @@ extern_methods!( ); #[deprecated = "This property does not do anything and should not be used"] + #[cfg(not(any(target_os = "ios")))] #[method(backingLocation)] pub unsafe fn backingLocation(&self) -> NSWindowBackingLocation; + #[cfg(not(any(target_os = "ios")))] #[method(showsResizeIndicator)] pub unsafe fn showsResizeIndicator(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShowsResizeIndicator:)] pub unsafe fn setShowsResizeIndicator(&self, shows_resize_indicator: bool); } diff --git a/AppKit/NSWindowController.rs b/AppKit/NSWindowController.rs index ced98053a..d5c15d048 100644 --- a/AppKit/NSWindowController.rs +++ b/AppKit/NSWindowController.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSWindowController")] + #[cfg(not(any(target_os = "ios")))] pub struct NSWindowController; #[cfg(feature = "AppKit_NSWindowController")] @@ -30,6 +31,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSWindowController")] unsafe impl NSWindowController { #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithWindow:)] pub unsafe fn initWithWindow( this: Option>, @@ -37,18 +39,21 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithWindowNibName:)] pub unsafe fn initWithWindowNibName( this: Option>, window_nib_name: &NSNibName, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithWindowNibName:owner:)] pub unsafe fn initWithWindowNibName_owner( this: Option>, @@ -57,6 +62,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithWindowNibPath:owner:)] pub unsafe fn initWithWindowNibPath_owner( this: Option>, @@ -64,50 +70,64 @@ extern_methods!( owner: &Object, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowNibName)] pub unsafe fn windowNibName(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowNibPath)] pub unsafe fn windowNibPath(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other owner)] pub unsafe fn owner(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowFrameAutosaveName)] pub unsafe fn windowFrameAutosaveName(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(setWindowFrameAutosaveName:)] pub unsafe fn setWindowFrameAutosaveName( &self, window_frame_autosave_name: &NSWindowFrameAutosaveName, ); + #[cfg(not(any(target_os = "ios")))] #[method(shouldCascadeWindows)] pub unsafe fn shouldCascadeWindows(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShouldCascadeWindows:)] pub unsafe fn setShouldCascadeWindows(&self, should_cascade_windows: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other document)] pub unsafe fn document(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setDocument:)] pub unsafe fn setDocument(&self, document: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(setDocumentEdited:)] pub unsafe fn setDocumentEdited(&self, dirty_flag: bool); + #[cfg(not(any(target_os = "ios")))] #[method(shouldCloseDocument)] pub unsafe fn shouldCloseDocument(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setShouldCloseDocument:)] pub unsafe fn setShouldCloseDocument(&self, should_close_document: bool); + #[cfg(not(any(target_os = "ios")))] #[method(synchronizeWindowTitleWithDocumentName)] pub unsafe fn synchronizeWindowTitleWithDocumentName(&self); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windowTitleForDocumentDisplayName:)] pub unsafe fn windowTitleForDocumentDisplayName( &self, @@ -115,10 +135,12 @@ extern_methods!( ) -> Id; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other contentViewController)] pub unsafe fn contentViewController(&self) -> Option>; #[cfg(feature = "AppKit_NSViewController")] + #[cfg(not(any(target_os = "ios")))] #[method(setContentViewController:)] pub unsafe fn setContentViewController( &self, @@ -126,28 +148,36 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other window)] pub unsafe fn window(&self) -> Option>; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(setWindow:)] pub unsafe fn setWindow(&self, window: Option<&NSWindow>); + #[cfg(not(any(target_os = "ios")))] #[method(isWindowLoaded)] pub unsafe fn isWindowLoaded(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(windowWillLoad)] pub unsafe fn windowWillLoad(&self); + #[cfg(not(any(target_os = "ios")))] #[method(windowDidLoad)] pub unsafe fn windowDidLoad(&self); + #[cfg(not(any(target_os = "ios")))] #[method(loadWindow)] pub unsafe fn loadWindow(&self); + #[cfg(not(any(target_os = "ios")))] #[method(close)] pub unsafe fn close(&self); + #[cfg(not(any(target_os = "ios")))] #[method(showWindow:)] pub unsafe fn showWindow(&self, sender: Option<&Object>); } @@ -158,6 +188,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSWindowController")] unsafe impl NSWindowController { #[cfg(feature = "AppKit_NSStoryboard")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other storyboard)] pub unsafe fn storyboard(&self) -> Option>; } @@ -167,6 +198,7 @@ extern_methods!( /// NSWindowControllerDismissing #[cfg(feature = "AppKit_NSWindowController")] unsafe impl NSWindowController { + #[cfg(not(any(target_os = "ios")))] #[method(dismissController:)] pub unsafe fn dismissController(&self, sender: Option<&Object>); } diff --git a/AppKit/NSWindowRestoration.rs b/AppKit/NSWindowRestoration.rs index 529ce6c30..5e6f1b9e3 100644 --- a/AppKit/NSWindowRestoration.rs +++ b/AppKit/NSWindowRestoration.rs @@ -6,12 +6,14 @@ use crate::CoreData::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait NSWindowRestoration: NSObjectProtocol { #[cfg(all( feature = "AppKit_NSWindow", feature = "Foundation_NSCoder", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "ios")))] #[method(restoreWindowWithIdentifier:state:completionHandler:)] unsafe fn restoreWindowWithIdentifier_state_completionHandler( identifier: &NSUserInterfaceItemIdentifier, @@ -41,6 +43,7 @@ extern_methods!( feature = "Foundation_NSCoder", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "ios")))] #[method(restoreWindowWithIdentifier:state:completionHandler:)] pub unsafe fn restoreWindowWithIdentifier_state_completionHandler( &self, @@ -57,21 +60,27 @@ extern_methods!( /// NSUserInterfaceRestoration #[cfg(feature = "AppKit_NSWindow")] unsafe impl NSWindow { + #[cfg(not(any(target_os = "ios")))] #[method(isRestorable)] pub unsafe fn isRestorable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setRestorable:)] pub unsafe fn setRestorable(&self, restorable: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other restorationClass)] pub unsafe fn restorationClass(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setRestorationClass:)] pub unsafe fn setRestorationClass(&self, restoration_class: Option<&TodoClass>); + #[cfg(not(any(target_os = "ios")))] #[method(disableSnapshotRestoration)] pub unsafe fn disableSnapshotRestoration(&self); + #[cfg(not(any(target_os = "ios")))] #[method(enableSnapshotRestoration)] pub unsafe fn enableSnapshotRestoration(&self); } @@ -82,6 +91,7 @@ extern_methods!( #[cfg(feature = "AppKit_NSResponder")] unsafe impl NSResponder { #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method(encodeRestorableStateWithCoder:)] pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder); @@ -89,6 +99,7 @@ extern_methods!( feature = "Foundation_NSCoder", feature = "Foundation_NSOperationQueue" ))] + #[cfg(not(any(target_os = "ios")))] #[method(encodeRestorableStateWithCoder:backgroundQueue:)] pub unsafe fn encodeRestorableStateWithCoder_backgroundQueue( &self, @@ -97,17 +108,21 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method(restoreStateWithCoder:)] pub unsafe fn restoreStateWithCoder(&self, coder: &NSCoder); + #[cfg(not(any(target_os = "ios")))] #[method(invalidateRestorableState)] pub unsafe fn invalidateRestorableState(&self); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other restorableStateKeyPaths)] pub unsafe fn restorableStateKeyPaths() -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other allowedClassesForRestorableStateKeyPath:)] pub unsafe fn allowedClassesForRestorableStateKeyPath( key_path: &NSString, @@ -119,9 +134,11 @@ extern_methods!( /// NSRestorableStateExtension #[cfg(feature = "AppKit_NSApplication")] unsafe impl NSApplication { + #[cfg(not(any(target_os = "ios")))] #[method(extendStateRestoration)] pub unsafe fn extendStateRestoration(&self); + #[cfg(not(any(target_os = "ios")))] #[method(completeStateRestoration)] pub unsafe fn completeStateRestoration(&self); } @@ -136,6 +153,7 @@ extern_methods!( feature = "Foundation_NSCoder", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "ios")))] #[method(restoreDocumentWindowWithIdentifier:state:completionHandler:)] pub unsafe fn restoreDocumentWindowWithIdentifier_state_completionHandler( &self, @@ -145,6 +163,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method(encodeRestorableStateWithCoder:)] pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder); @@ -152,6 +171,7 @@ extern_methods!( feature = "Foundation_NSCoder", feature = "Foundation_NSOperationQueue" ))] + #[cfg(not(any(target_os = "ios")))] #[method(encodeRestorableStateWithCoder:backgroundQueue:)] pub unsafe fn encodeRestorableStateWithCoder_backgroundQueue( &self, @@ -160,17 +180,21 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSCoder")] + #[cfg(not(any(target_os = "ios")))] #[method(restoreStateWithCoder:)] pub unsafe fn restoreStateWithCoder(&self, coder: &NSCoder); + #[cfg(not(any(target_os = "ios")))] #[method(invalidateRestorableState)] pub unsafe fn invalidateRestorableState(&self); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other restorableStateKeyPaths)] pub unsafe fn restorableStateKeyPaths() -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other allowedClassesForRestorableStateKeyPath:)] pub unsafe fn allowedClassesForRestorableStateKeyPath( key_path: &NSString, diff --git a/AppKit/NSWindowScripting.rs b/AppKit/NSWindowScripting.rs index 44a0f5d2e..3a711ded6 100644 --- a/AppKit/NSWindowScripting.rs +++ b/AppKit/NSWindowScripting.rs @@ -9,43 +9,56 @@ extern_methods!( /// NSScripting #[cfg(feature = "AppKit_NSWindow")] unsafe impl NSWindow { + #[cfg(not(any(target_os = "ios")))] #[method(hasCloseBox)] pub unsafe fn hasCloseBox(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(hasTitleBar)] pub unsafe fn hasTitleBar(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isFloatingPanel)] pub unsafe fn isFloatingPanel(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isMiniaturizable)] pub unsafe fn isMiniaturizable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isModalPanel)] pub unsafe fn isModalPanel(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isResizable)] pub unsafe fn isResizable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isZoomable)] pub unsafe fn isZoomable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(orderedIndex)] pub unsafe fn orderedIndex(&self) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setOrderedIndex:)] pub unsafe fn setOrderedIndex(&self, ordered_index: NSInteger); + #[cfg(not(any(target_os = "ios")))] #[method(setIsMiniaturized:)] pub unsafe fn setIsMiniaturized(&self, flag: bool); + #[cfg(not(any(target_os = "ios")))] #[method(setIsVisible:)] pub unsafe fn setIsVisible(&self, flag: bool); + #[cfg(not(any(target_os = "ios")))] #[method(setIsZoomed:)] pub unsafe fn setIsZoomed(&self, flag: bool); #[cfg(feature = "Foundation_NSCloseCommand")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other handleCloseScriptCommand:)] pub unsafe fn handleCloseScriptCommand( &self, @@ -53,6 +66,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSScriptCommand")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other handlePrintScriptCommand:)] pub unsafe fn handlePrintScriptCommand( &self, @@ -60,6 +74,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSScriptCommand")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other handleSaveScriptCommand:)] pub unsafe fn handleSaveScriptCommand( &self, diff --git a/AppKit/NSWindowTab.rs b/AppKit/NSWindowTab.rs index 164c18f15..fad82fb53 100644 --- a/AppKit/NSWindowTab.rs +++ b/AppKit/NSWindowTab.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSWindowTab")] + #[cfg(not(any(target_os = "ios")))] pub struct NSWindowTab; #[cfg(feature = "AppKit_NSWindowTab")] @@ -23,34 +24,42 @@ extern_methods!( #[cfg(feature = "AppKit_NSWindowTab")] unsafe impl NSWindowTab { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Option>; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributed_title: Option<&NSAttributedString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other toolTip)] pub unsafe fn toolTip(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setToolTip:)] pub unsafe fn setToolTip(&self, tool_tip: Option<&NSString>); #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessory_view: Option<&NSView>); } diff --git a/AppKit/NSWindowTabGroup.rs b/AppKit/NSWindowTabGroup.rs index c0ddf5b20..87839e19c 100644 --- a/AppKit/NSWindowTabGroup.rs +++ b/AppKit/NSWindowTabGroup.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSWindowTabGroup")] + #[cfg(not(any(target_os = "ios")))] pub struct NSWindowTabGroup; #[cfg(feature = "AppKit_NSWindowTabGroup")] @@ -22,39 +23,49 @@ unsafe impl NSObjectProtocol for NSWindowTabGroup {} extern_methods!( #[cfg(feature = "AppKit_NSWindowTabGroup")] unsafe impl NSWindowTabGroup { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Id; #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other windows)] pub unsafe fn windows(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method(isOverviewVisible)] pub unsafe fn isOverviewVisible(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setOverviewVisible:)] pub unsafe fn setOverviewVisible(&self, overview_visible: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isTabBarVisible)] pub unsafe fn isTabBarVisible(&self) -> bool; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedWindow)] pub unsafe fn selectedWindow(&self) -> Option>; #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedWindow:)] pub unsafe fn setSelectedWindow(&self, selected_window: Option<&NSWindow>); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(addWindow:)] pub unsafe fn addWindow(&self, window: &NSWindow); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(insertWindow:atIndex:)] pub unsafe fn insertWindow_atIndex(&self, window: &NSWindow, index: NSInteger); #[cfg(feature = "AppKit_NSWindow")] + #[cfg(not(any(target_os = "ios")))] #[method(removeWindow:)] pub unsafe fn removeWindow(&self, window: &NSWindow); } diff --git a/AppKit/NSWorkspace.rs b/AppKit/NSWorkspace.rs index 9c236e217..aa74544b0 100644 --- a/AppKit/NSWorkspace.rs +++ b/AppKit/NSWorkspace.rs @@ -7,8 +7,11 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWorkspaceIconCreationOptions { + #[cfg(not(any(target_os = "ios")))] NSExcludeQuickDrawElementsIconCreationOption = 1 << 1, + #[cfg(not(any(target_os = "ios")))] NSExclude10_4ElementsIconCreationOption = 1 << 2, } ); @@ -16,6 +19,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSWorkspace")] + #[cfg(not(any(target_os = "ios")))] pub struct NSWorkspace; #[cfg(feature = "AppKit_NSWorkspace")] @@ -30,14 +34,17 @@ unsafe impl NSObjectProtocol for NSWorkspace {} extern_methods!( #[cfg(feature = "AppKit_NSWorkspace")] unsafe impl NSWorkspace { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedWorkspace)] pub unsafe fn sharedWorkspace() -> Id; #[cfg(feature = "Foundation_NSNotificationCenter")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other notificationCenter)] pub unsafe fn notificationCenter(&self) -> Id; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method(openURL:)] pub unsafe fn openURL(&self, url: &NSURL) -> bool; @@ -47,6 +54,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(openURL:configuration:completionHandler:)] pub unsafe fn openURL_configuration_completionHandler( &self, @@ -62,6 +70,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(openURLs:withApplicationAtURL:configuration:completionHandler:)] pub unsafe fn openURLs_withApplicationAtURL_configuration_completionHandler( &self, @@ -77,6 +86,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(openApplicationAtURL:configuration:completionHandler:)] pub unsafe fn openApplicationAtURL_configuration_completionHandler( &self, @@ -86,6 +96,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(selectFile:inFileViewerRootedAtPath:)] pub unsafe fn selectFile_inFileViewerRootedAtPath( &self, @@ -94,22 +105,27 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method(activateFileViewerSelectingURLs:)] pub unsafe fn activateFileViewerSelectingURLs(&self, file_ur_ls: &NSArray); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(showSearchResultsForQueryString:)] pub unsafe fn showSearchResultsForQueryString(&self, query_string: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(noteFileSystemChanged:)] pub unsafe fn noteFileSystemChanged_(&self, path: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(isFilePackageAtPath:)] pub unsafe fn isFilePackageAtPath(&self, full_path: &NSString) -> bool; #[cfg(all(feature = "AppKit_NSImage", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other iconForFile:)] pub unsafe fn iconForFile(&self, full_path: &NSString) -> Id; @@ -118,10 +134,12 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other iconForFiles:)] pub unsafe fn iconForFiles(&self, full_paths: &NSArray) -> Option>; #[cfg(all(feature = "AppKit_NSImage", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setIcon:forFile:options:)] pub unsafe fn setIcon_forFile_options( &self, @@ -131,10 +149,12 @@ extern_methods!( ) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileLabels)] pub unsafe fn fileLabels(&self) -> Id>; #[cfg(all(feature = "AppKit_NSColor", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileLabelColors)] pub unsafe fn fileLabelColors(&self) -> Id>; @@ -144,6 +164,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(recycleURLs:completionHandler:)] pub unsafe fn recycleURLs_completionHandler( &self, @@ -157,6 +178,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(duplicateURLs:completionHandler:)] pub unsafe fn duplicateURLs_completionHandler( &self, @@ -165,6 +187,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:)] pub unsafe fn getFileSystemInfoForPath_isRemovable_isWritable_isUnmountable_description_type( &self, @@ -177,23 +200,28 @@ extern_methods!( ) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(unmountAndEjectDeviceAtPath:)] pub unsafe fn unmountAndEjectDeviceAtPath(&self, path: &NSString) -> bool; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method(unmountAndEjectDeviceAtURL:error:_)] pub unsafe fn unmountAndEjectDeviceAtURL_error( &self, url: &NSURL, ) -> Result<(), Id>; + #[cfg(not(any(target_os = "ios")))] #[method(extendPowerOffBy:)] pub unsafe fn extendPowerOffBy(&self, requested: NSInteger) -> NSInteger; + #[cfg(not(any(target_os = "ios")))] #[method(hideOtherApplications)] pub unsafe fn hideOtherApplications(&self); #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URLForApplicationWithBundleIdentifier:)] pub unsafe fn URLForApplicationWithBundleIdentifier( &self, @@ -205,6 +233,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URLsForApplicationsWithBundleIdentifier:)] pub unsafe fn URLsForApplicationsWithBundleIdentifier( &self, @@ -212,14 +241,17 @@ extern_methods!( ) -> Id>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URLForApplicationToOpenURL:)] pub unsafe fn URLForApplicationToOpenURL(&self, url: &NSURL) -> Option>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other URLsForApplicationsToOpenURL:)] pub unsafe fn URLsForApplicationsToOpenURL(&self, url: &NSURL) -> Id>; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultApplicationAtURL:toOpenContentTypeOfFileAtURL:completionHandler:)] pub unsafe fn setDefaultApplicationAtURL_toOpenContentTypeOfFileAtURL_completionHandler( &self, @@ -233,6 +265,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultApplicationAtURL:toOpenURLsWithScheme:completionHandler:)] pub unsafe fn setDefaultApplicationAtURL_toOpenURLsWithScheme_completionHandler( &self, @@ -242,6 +275,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultApplicationAtURL:toOpenFileAtURL:completionHandler:)] pub unsafe fn setDefaultApplicationAtURL_toOpenFileAtURL_completionHandler( &self, @@ -251,10 +285,12 @@ extern_methods!( ); #[cfg(feature = "AppKit_NSRunningApplication")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other frontmostApplication)] pub unsafe fn frontmostApplication(&self) -> Option>; #[cfg(feature = "AppKit_NSRunningApplication")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other menuBarOwningApplication)] pub unsafe fn menuBarOwningApplication(&self) -> Option>; } @@ -263,6 +299,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSWorkspaceOpenConfiguration")] + #[cfg(not(any(target_os = "ios")))] pub struct NSWorkspaceOpenConfiguration; #[cfg(feature = "AppKit_NSWorkspaceOpenConfiguration")] @@ -277,57 +314,74 @@ unsafe impl NSObjectProtocol for NSWorkspaceOpenConfiguration {} extern_methods!( #[cfg(feature = "AppKit_NSWorkspaceOpenConfiguration")] unsafe impl NSWorkspaceOpenConfiguration { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configuration)] pub unsafe fn configuration() -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(promptsUserIfNeeded)] pub unsafe fn promptsUserIfNeeded(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setPromptsUserIfNeeded:)] pub unsafe fn setPromptsUserIfNeeded(&self, prompts_user_if_needed: bool); + #[cfg(not(any(target_os = "ios")))] #[method(addsToRecentItems)] pub unsafe fn addsToRecentItems(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAddsToRecentItems:)] pub unsafe fn setAddsToRecentItems(&self, adds_to_recent_items: bool); + #[cfg(not(any(target_os = "ios")))] #[method(activates)] pub unsafe fn activates(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setActivates:)] pub unsafe fn setActivates(&self, activates: bool); + #[cfg(not(any(target_os = "ios")))] #[method(hides)] pub unsafe fn hides(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHides:)] pub unsafe fn setHides(&self, hides: bool); + #[cfg(not(any(target_os = "ios")))] #[method(hidesOthers)] pub unsafe fn hidesOthers(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setHidesOthers:)] pub unsafe fn setHidesOthers(&self, hides_others: bool); + #[cfg(not(any(target_os = "ios")))] #[method(isForPrinting)] pub unsafe fn isForPrinting(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setForPrinting:)] pub unsafe fn setForPrinting(&self, for_printing: bool); + #[cfg(not(any(target_os = "ios")))] #[method(createsNewApplicationInstance)] pub unsafe fn createsNewApplicationInstance(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setCreatesNewApplicationInstance:)] pub unsafe fn setCreatesNewApplicationInstance( &self, creates_new_application_instance: bool, ); + #[cfg(not(any(target_os = "ios")))] #[method(allowsRunningApplicationSubstitution)] pub unsafe fn allowsRunningApplicationSubstitution(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsRunningApplicationSubstitution:)] pub unsafe fn setAllowsRunningApplicationSubstitution( &self, @@ -335,32 +389,40 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other arguments)] pub unsafe fn arguments(&self) -> Id>; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setArguments:)] pub unsafe fn setArguments(&self, arguments: &NSArray); #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other environment)] pub unsafe fn environment(&self) -> Id>; #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(setEnvironment:)] pub unsafe fn setEnvironment(&self, environment: &NSDictionary); #[cfg(feature = "Foundation_NSAppleEventDescriptor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other appleEvent)] pub unsafe fn appleEvent(&self) -> Option>; #[cfg(feature = "Foundation_NSAppleEventDescriptor")] + #[cfg(not(any(target_os = "ios")))] #[method(setAppleEvent:)] pub unsafe fn setAppleEvent(&self, apple_event: Option<&NSAppleEventDescriptor>); + #[cfg(not(any(target_os = "ios")))] #[method(requiresUniversalLinks)] pub unsafe fn requiresUniversalLinks(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setRequiresUniversalLinks:)] pub unsafe fn setRequiresUniversalLinks(&self, requires_universal_links: bool); } @@ -386,6 +448,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setDesktopImageURL:forScreen:options:error:_)] pub unsafe fn setDesktopImageURL_forScreen_options_error( &self, @@ -395,10 +458,12 @@ extern_methods!( ) -> Result<(), Id>; #[cfg(all(feature = "AppKit_NSScreen", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other desktopImageURLForScreen:)] pub unsafe fn desktopImageURLForScreen(&self, screen: &NSScreen) -> Option>; #[cfg(all(feature = "AppKit_NSScreen", feature = "Foundation_NSDictionary"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other desktopImageOptionsForScreen:)] pub unsafe fn desktopImageOptionsForScreen( &self, @@ -409,9 +474,13 @@ extern_methods!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWorkspaceAuthorizationType { + #[cfg(not(any(target_os = "ios")))] NSWorkspaceAuthorizationTypeCreateSymbolicLink = 0, + #[cfg(not(any(target_os = "ios")))] NSWorkspaceAuthorizationTypeSetAttributes = 1, + #[cfg(not(any(target_os = "ios")))] NSWorkspaceAuthorizationTypeReplaceFile = 2, } ); @@ -419,6 +488,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AppKit_NSWorkspaceAuthorization")] + #[cfg(not(any(target_os = "ios")))] pub struct NSWorkspaceAuthorization; #[cfg(feature = "AppKit_NSWorkspaceAuthorization")] @@ -443,6 +513,7 @@ extern_methods!( feature = "AppKit_NSWorkspaceAuthorization", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "ios")))] #[method(requestAuthorizationOfType:completionHandler:)] pub unsafe fn requestAuthorizationOfType_completionHandler( &self, @@ -457,6 +528,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSFileManager")] unsafe impl NSFileManager { #[cfg(feature = "AppKit_NSWorkspaceAuthorization")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileManagerWithAuthorization:)] pub unsafe fn fileManagerWithAuthorization( authorization: &NSWorkspaceAuthorization, @@ -520,30 +592,43 @@ typed_enum!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum NSWorkspaceLaunchOptions { #[deprecated = "Use -[NSWorkspaceOpenConfiguration setForPrinting:YES] instead."] + #[cfg(not(any(target_os = "ios")))] NSWorkspaceLaunchAndPrint = 0x00000002, #[deprecated = "Use -[NSWorkspaceOpenConfiguration setPromptsUserIfNeeded:YES] instead."] + #[cfg(not(any(target_os = "ios")))] NSWorkspaceLaunchWithErrorPresentation = 0x00000040, #[deprecated = "This option does nothing."] + #[cfg(not(any(target_os = "ios")))] NSWorkspaceLaunchInhibitingBackgroundOnly = 0x00000080, #[deprecated = "Use -[NSWorkspaceOpenConfiguration setAddsToRecentItems:YES] instead."] + #[cfg(not(any(target_os = "ios")))] NSWorkspaceLaunchWithoutAddingToRecents = 0x00000100, #[deprecated = "Use -[NSWorkspaceOpenConfiguration setActivates:NO] instead."] + #[cfg(not(any(target_os = "ios")))] NSWorkspaceLaunchWithoutActivation = 0x00000200, #[deprecated = "When using NSWorkspaceOpenConfiguration, all launches are asynchronous."] + #[cfg(not(any(target_os = "ios")))] NSWorkspaceLaunchAsync = 0x00010000, #[deprecated = "Use -[NSWorkspaceOpenConfiguration setCreatesNewApplicationInstance:YES] instead."] + #[cfg(not(any(target_os = "ios")))] NSWorkspaceLaunchNewInstance = 0x00080000, #[deprecated = "Use -[NSWorkspaceOpenConfiguration setHides:YES] instead."] + #[cfg(not(any(target_os = "ios")))] NSWorkspaceLaunchAndHide = 0x00100000, #[deprecated = "Use -[NSWorkspaceOpenConfiguration setHidesOthers:YES] instead."] + #[cfg(not(any(target_os = "ios")))] NSWorkspaceLaunchAndHideOthers = 0x00200000, #[deprecated = "Use NSWorkspaceOpenConfiguration instead."] + #[cfg(not(any(target_os = "ios")))] NSWorkspaceLaunchDefault = NSWorkspaceLaunchAsync, #[deprecated = "The Classic environment is no longer supported."] + #[cfg(not(any(target_os = "ios")))] NSWorkspaceLaunchAllowingClassicStartup = 0x00020000, #[deprecated = "The Classic environment is no longer supported."] + #[cfg(not(any(target_os = "ios")))] NSWorkspaceLaunchPreferringClassic = 0x00040000, } ); @@ -572,11 +657,13 @@ extern_methods!( unsafe impl NSWorkspace { #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -[NSWorkspace openURL:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method(openFile:)] pub unsafe fn openFile(&self, full_path: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -[NSWorkspace openURLs:withApplicationAtURL:configuration:completionHandler:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method(openFile:withApplication:)] pub unsafe fn openFile_withApplication( &self, @@ -586,6 +673,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -[NSWorkspace openURLs:withApplicationAtURL:configuration:completionHandler:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method(openFile:withApplication:andDeactivate:)] pub unsafe fn openFile_withApplication_andDeactivate( &self, @@ -596,6 +684,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -[NSWorkspace openApplicationAtURL:configuration:completionHandler:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method(launchApplication:)] pub unsafe fn launchApplication(&self, app_name: &NSString) -> bool; @@ -606,6 +695,7 @@ extern_methods!( feature = "Foundation_NSURL" ))] #[deprecated = "Use -[NSWorkspace openApplicationAtURL:configuration:completionHandler:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other launchApplicationAtURL:options:configuration:error:_)] pub unsafe fn launchApplicationAtURL_options_configuration_error( &self, @@ -621,6 +711,7 @@ extern_methods!( feature = "Foundation_NSURL" ))] #[deprecated = "Use -[NSWorkspace openURL:configuration:completionHandler:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other openURL:options:configuration:error:_)] pub unsafe fn openURL_options_configuration_error( &self, @@ -637,6 +728,7 @@ extern_methods!( feature = "Foundation_NSURL" ))] #[deprecated = "Use -[NSWorkspace openURLs:withApplicationAtURL:configuration:completionHandler:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other openURLs:withApplicationAtURL:options:configuration:error:_)] pub unsafe fn openURLs_withApplicationAtURL_options_configuration_error( &self, @@ -648,6 +740,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -[NSWorkspace openApplicationAtURL:configuration:completionHandler:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method(launchApplication:showIcon:autolaunch:)] pub unsafe fn launchApplication_showIcon_autolaunch( &self, @@ -658,11 +751,13 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -[NSWorkspace URLForApplicationWithBundleIdentifier:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fullPathForApplication:)] pub unsafe fn fullPathForApplication(&self, app_name: &NSString) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -[NSWorkspace URLForApplicationWithBundleIdentifier:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other absolutePathForAppBundleWithIdentifier:)] pub unsafe fn absolutePathForAppBundleWithIdentifier( &self, @@ -675,6 +770,7 @@ extern_methods!( feature = "Foundation_NSString" ))] #[deprecated = "Use -[NSWorkspace openApplicationAtURL:configuration:completionHandler:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method(launchAppWithBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifier:)] pub unsafe fn launchAppWithBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifier( &self, @@ -692,6 +788,7 @@ extern_methods!( feature = "Foundation_NSURL" ))] #[deprecated = "Use -[NSWorkspace openURLs:withApplicationAtURL:configuration:completionHandler:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method(openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:)] pub unsafe fn openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers( &self, @@ -704,19 +801,23 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(openTempFile:)] pub unsafe fn openTempFile(&self, full_path: &NSString) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(findApplications)] pub unsafe fn findApplications(&self); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(noteUserDefaultsChanged)] pub unsafe fn noteUserDefaultsChanged(&self); #[cfg(feature = "AppKit_NSImage")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(slideImage:from:to:)] pub unsafe fn slideImage_from_to( &self, @@ -726,43 +827,52 @@ extern_methods!( ); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(checkForRemovableMedia)] pub unsafe fn checkForRemovableMedia(&self); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(noteFileSystemChanged)] pub unsafe fn noteFileSystemChanged(&self); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(fileSystemChanged)] pub unsafe fn fileSystemChanged(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(userDefaultsChanged)] pub unsafe fn userDefaultsChanged(&self) -> bool; #[cfg(feature = "Foundation_NSArray")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mountNewRemovableMedia)] pub unsafe fn mountNewRemovableMedia(&self) -> Option>; #[cfg(feature = "Foundation_NSDictionary")] #[deprecated = "Use -[NSWorkspace frontmostApplication] instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other activeApplication)] pub unsafe fn activeApplication(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] #[deprecated = "Use -[NSFileManager mountedVolumeURLsIncludingResourceValuesForKeys:options:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mountedLocalVolumePaths)] pub unsafe fn mountedLocalVolumePaths(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] #[deprecated = "Use -[NSFileManager mountedVolumeURLsIncludingResourceValuesForKeys:options:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mountedRemovableMedia)] pub unsafe fn mountedRemovableMedia(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] #[deprecated = "Use -[NSWorkspace runningApplications] instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other launchedApplications)] pub unsafe fn launchedApplications(&self) -> Option>; @@ -772,6 +882,7 @@ extern_methods!( feature = "Foundation_NSString" ))] #[deprecated = "Use -[NSWorkspace openURL:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method(openFile:fromImage:at:inView:)] pub unsafe fn openFile_fromImage_at_inView( &self, @@ -783,6 +894,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(performFileOperation:source:destination:files:tag:)] pub unsafe fn performFileOperation_source_destination_files_tag( &self, @@ -795,6 +907,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -[NSWorkspace URLForApplicationToOpenURL:] to get the URL of an application that will open a given item, or -[NSURL getResourceValue:forKey:error:] with NSURLContentTypeKey to get the type of the given item."] + #[cfg(not(any(target_os = "ios")))] #[method(getInfoForFile:application:type:)] pub unsafe fn getInfoForFile_application_type( &self, @@ -805,11 +918,13 @@ extern_methods!( #[cfg(all(feature = "AppKit_NSImage", feature = "Foundation_NSString"))] #[deprecated = "Use -[NSWorkspace iconForContentType:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other iconForFileType:)] pub unsafe fn iconForFileType(&self, file_type: &NSString) -> Id; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSString"))] #[deprecated = "Use -[NSURL getResourceValue:forKey:error:] with NSURLContentTypeKey instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other typeOfFile:error:_)] pub unsafe fn typeOfFile_error( &self, @@ -818,6 +933,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use UTType.localizedDescription instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localizedDescriptionForType:)] pub unsafe fn localizedDescriptionForType( &self, @@ -826,6 +942,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use UTType.preferredFilenameExtension instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other preferredFilenameExtensionForType:)] pub unsafe fn preferredFilenameExtensionForType( &self, @@ -834,6 +951,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use +[UTType typesWithTag:tagClass:conformingToType:] to get a list of candidate types, then check if the input type conforms to any of them."] + #[cfg(not(any(target_os = "ios")))] #[method(filenameExtension:isValidForType:)] pub unsafe fn filenameExtension_isValidForType( &self, @@ -843,6 +961,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -[UTType conformsToType:] instead."] + #[cfg(not(any(target_os = "ios")))] #[method(type:conformsToType:)] pub unsafe fn type_conformsToType( &self, diff --git a/AppKit/mod.rs b/AppKit/mod.rs index 1aca4bb35..ba293dd0f 100644 --- a/AppKit/mod.rs +++ b/AppKit/mod.rs @@ -1130,15 +1130,6 @@ pub use self::__NSApplication::NSAppKitVersionNumber11_1; pub use self::__NSApplication::NSAppKitVersionNumber11_2; pub use self::__NSApplication::NSAppKitVersionNumber11_3; pub use self::__NSApplication::NSAppKitVersionNumber11_4; -pub use self::__NSApplication::NSAppKitVersionNumber11_5; -pub use self::__NSApplication::NSAppKitVersionNumber12_0; -pub use self::__NSApplication::NSAppKitVersionNumber12_1; -pub use self::__NSApplication::NSAppKitVersionNumber12_2; -pub use self::__NSApplication::NSAppKitVersionNumber12_3; -pub use self::__NSApplication::NSAppKitVersionNumber12_4; -pub use self::__NSApplication::NSAppKitVersionNumber12_5; -pub use self::__NSApplication::NSAppKitVersionNumber13_0; -pub use self::__NSApplication::NSAppKitVersionNumber13_1; #[cfg(feature = "AppKit_NSApplication")] pub use self::__NSApplication::NSApplication; pub use self::__NSApplication::NSApplicationDelegate; diff --git a/AuthenticationServices/ASAccountAuthenticationModificationController.rs b/AuthenticationServices/ASAccountAuthenticationModificationController.rs index cbf5dbb1e..22086ab40 100644 --- a/AuthenticationServices/ASAccountAuthenticationModificationController.rs +++ b/AuthenticationServices/ASAccountAuthenticationModificationController.rs @@ -5,6 +5,7 @@ use crate::AuthenticationServices::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe trait ASAccountAuthenticationModificationControllerDelegate: NSObjectProtocol { @@ -41,6 +42,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe trait ASAccountAuthenticationModificationControllerPresentationContextProviding: NSObjectProtocol { @@ -61,6 +63,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAccountAuthenticationModificationController")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ASAccountAuthenticationModificationController; #[cfg(feature = "AuthenticationServices_ASAccountAuthenticationModificationController")] diff --git a/AuthenticationServices/ASAccountAuthenticationModificationExtensionContext.rs b/AuthenticationServices/ASAccountAuthenticationModificationExtensionContext.rs index 5ca9e3330..34e7c1d0c 100644 --- a/AuthenticationServices/ASAccountAuthenticationModificationExtensionContext.rs +++ b/AuthenticationServices/ASAccountAuthenticationModificationExtensionContext.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAccountAuthenticationModificationExtensionContext")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ASAccountAuthenticationModificationExtensionContext; #[cfg(feature = "AuthenticationServices_ASAccountAuthenticationModificationExtensionContext")] diff --git a/AuthenticationServices/ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest.rs b/AuthenticationServices/ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest.rs index b16c38c32..bd1b93630 100644 --- a/AuthenticationServices/ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest.rs +++ b/AuthenticationServices/ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest.rs @@ -9,6 +9,7 @@ extern_class!( #[cfg( feature = "AuthenticationServices_ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest" )] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest; #[cfg( diff --git a/AuthenticationServices/ASAccountAuthenticationModificationRequest.rs b/AuthenticationServices/ASAccountAuthenticationModificationRequest.rs index 652471708..c42cf22d9 100644 --- a/AuthenticationServices/ASAccountAuthenticationModificationRequest.rs +++ b/AuthenticationServices/ASAccountAuthenticationModificationRequest.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAccountAuthenticationModificationRequest")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ASAccountAuthenticationModificationRequest; #[cfg(feature = "AuthenticationServices_ASAccountAuthenticationModificationRequest")] diff --git a/AuthenticationServices/ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest.rs b/AuthenticationServices/ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest.rs index c0c5cf1a8..6e2da3793 100644 --- a/AuthenticationServices/ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest.rs +++ b/AuthenticationServices/ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest.rs @@ -9,6 +9,7 @@ extern_class!( #[cfg( feature = "AuthenticationServices_ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest" )] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest; #[cfg( diff --git a/AuthenticationServices/ASAuthorizationAppleIDButton.rs b/AuthenticationServices/ASAuthorizationAppleIDButton.rs index 61fdae8aa..92a0e2f8d 100644 --- a/AuthenticationServices/ASAuthorizationAppleIDButton.rs +++ b/AuthenticationServices/ASAuthorizationAppleIDButton.rs @@ -6,19 +6,28 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum ASAuthorizationAppleIDButtonType { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASAuthorizationAppleIDButtonTypeSignIn = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASAuthorizationAppleIDButtonTypeContinue = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASAuthorizationAppleIDButtonTypeSignUp = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASAuthorizationAppleIDButtonTypeDefault = ASAuthorizationAppleIDButtonTypeSignIn, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum ASAuthorizationAppleIDButtonStyle { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASAuthorizationAppleIDButtonStyleWhite = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASAuthorizationAppleIDButtonStyleWhiteOutline = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASAuthorizationAppleIDButtonStyleBlack = 2, } ); diff --git a/AuthenticationServices/ASAuthorizationController.rs b/AuthenticationServices/ASAuthorizationController.rs index f710c350c..f53017f20 100644 --- a/AuthenticationServices/ASAuthorizationController.rs +++ b/AuthenticationServices/ASAuthorizationController.rs @@ -31,6 +31,12 @@ extern_protocol!( ); #[cfg(feature = "AuthenticationServices_ASAuthorizationController")] + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[optional] #[method(authorizationController:didCompleteWithCustomMethod:)] unsafe fn authorizationController_didCompleteWithCustomMethod( @@ -44,6 +50,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait ASAuthorizationControllerPresentationContextProviding: NSObjectProtocol { @@ -60,7 +67,9 @@ extern_protocol!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum ASAuthorizationControllerRequestOptions { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASAuthorizationControllerRequestOptionPreferImmediatelyAvailableCredentials = 1 << 0, } ); @@ -100,11 +109,13 @@ extern_methods!( delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other presentationContextProvider)] pub unsafe fn presentationContextProvider( &self, ) -> Option>>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setPresentationContextProvider:)] pub unsafe fn setPresentationContextProvider( &self, @@ -114,11 +125,23 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics Other customAuthorizationMethods)] pub unsafe fn customAuthorizationMethods(&self) -> Id>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method(setCustomAuthorizationMethods:)] pub unsafe fn setCustomAuthorizationMethods( &self, @@ -138,15 +161,18 @@ extern_methods!( #[method(performRequests)] pub unsafe fn performRequests(&self); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(performAutoFillAssistedRequests)] pub unsafe fn performAutoFillAssistedRequests(&self); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(performRequestsWithOptions:)] pub unsafe fn performRequestsWithOptions( &self, options: ASAuthorizationControllerRequestOptions, ); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(cancel)] pub unsafe fn cancel(&self); diff --git a/AuthenticationServices/ASAuthorizationError.rs b/AuthenticationServices/ASAuthorizationError.rs index 9666b3d24..8cc868e83 100644 --- a/AuthenticationServices/ASAuthorizationError.rs +++ b/AuthenticationServices/ASAuthorizationError.rs @@ -14,6 +14,7 @@ ns_error_enum!( ASAuthorizationErrorInvalidResponse = 1002, ASAuthorizationErrorNotHandled = 1003, ASAuthorizationErrorFailed = 1004, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASAuthorizationErrorNotInteractive = 1005, } ); diff --git a/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertion.rs b/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertion.rs index 82c5a918d..17e80fa61 100644 --- a/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertion.rs +++ b/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertion.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialAssertion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationPlatformPublicKeyCredentialAssertion; #[cfg(feature = "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialAssertion")] diff --git a/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertionRequest.rs b/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertionRequest.rs index 43d9599ab..09719bcae 100644 --- a/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertionRequest.rs +++ b/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertionRequest.rs @@ -9,6 +9,7 @@ extern_class!( #[cfg( feature = "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialAssertionRequest" )] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationPlatformPublicKeyCredentialAssertionRequest; #[cfg( diff --git a/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialDescriptor.rs b/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialDescriptor.rs index 96d7d0e13..7f6aa4ec9 100644 --- a/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialDescriptor.rs +++ b/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialDescriptor.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialDescriptor")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationPlatformPublicKeyCredentialDescriptor; #[cfg(feature = "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialDescriptor")] diff --git a/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialProvider.rs b/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialProvider.rs index 5ea885090..9346b36a3 100644 --- a/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialProvider.rs +++ b/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialProvider.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialProvider")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationPlatformPublicKeyCredentialProvider; #[cfg(feature = "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialProvider")] diff --git a/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistration.rs b/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistration.rs index db9205873..d8fd6cb0c 100644 --- a/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistration.rs +++ b/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistration.rs @@ -9,6 +9,7 @@ extern_class!( #[cfg( feature = "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialRegistration" )] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationPlatformPublicKeyCredentialRegistration; #[cfg( diff --git a/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.rs b/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.rs index bfa8c5263..ac4710102 100644 --- a/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.rs +++ b/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.rs @@ -9,6 +9,7 @@ extern_class!( #[cfg( feature = "AuthenticationServices_ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest" )] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest; #[cfg( diff --git a/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationRequest.rs b/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationRequest.rs index 435d7e882..fc4673fa1 100644 --- a/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationRequest.rs +++ b/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationRequest.rs @@ -19,6 +19,7 @@ extern_static!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait ASAuthorizationProviderExtensionAuthorizationRequestHandler: NSObjectProtocol { @@ -48,6 +49,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationRequest")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationProviderExtensionAuthorizationRequest; #[cfg(feature = "AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationRequest")] @@ -92,6 +94,7 @@ extern_methods!( #[cfg( feature = "AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationResult" )] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(completeWithAuthorizationResult:)] pub unsafe fn completeWithAuthorizationResult( &self, @@ -142,21 +145,26 @@ extern_methods!( #[method_id(@__retain_semantics Other authorizationOptions)] pub unsafe fn authorizationOptions(&self) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isCallerManaged)] pub unsafe fn isCallerManaged(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other callerTeamIdentifier)] pub unsafe fn callerTeamIdentifier(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other localizedCallerDisplayName)] pub unsafe fn localizedCallerDisplayName(&self) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isUserInterfaceEnabled)] pub unsafe fn isUserInterfaceEnabled(&self) -> bool; #[cfg(feature = "AuthenticationServices_ASAuthorizationProviderExtensionLoginManager")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other loginManager)] pub unsafe fn loginManager( &self, diff --git a/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationResult.rs b/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationResult.rs index e7930b6b9..db9120cab 100644 --- a/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationResult.rs +++ b/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationResult.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationResult")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationProviderExtensionAuthorizationResult; #[cfg(feature = "AuthenticationServices_ASAuthorizationProviderExtensionAuthorizationResult")] diff --git a/AuthenticationServices/ASAuthorizationProviderExtensionLoginConfiguration.rs b/AuthenticationServices/ASAuthorizationProviderExtensionLoginConfiguration.rs index e0c891181..2404c35d1 100644 --- a/AuthenticationServices/ASAuthorizationProviderExtensionLoginConfiguration.rs +++ b/AuthenticationServices/ASAuthorizationProviderExtensionLoginConfiguration.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationProviderExtensionKerberosMapping")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationProviderExtensionKerberosMapping; #[cfg(feature = "AuthenticationServices_ASAuthorizationProviderExtensionKerberosMapping")] @@ -85,6 +86,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationProviderExtensionLoginConfiguration")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationProviderExtensionLoginConfiguration; #[cfg(feature = "AuthenticationServices_ASAuthorizationProviderExtensionLoginConfiguration")] diff --git a/AuthenticationServices/ASAuthorizationProviderExtensionLoginManager.rs b/AuthenticationServices/ASAuthorizationProviderExtensionLoginManager.rs index 006faf99c..aa4b79bcd 100644 --- a/AuthenticationServices/ASAuthorizationProviderExtensionLoginManager.rs +++ b/AuthenticationServices/ASAuthorizationProviderExtensionLoginManager.rs @@ -6,9 +6,13 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum ASAuthorizationProviderExtensionKeyType { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] ASAuthorizationProviderExtensionKeyTypeUserDeviceSigning = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] ASAuthorizationProviderExtensionKeyTypeUserDeviceEncryption = 2, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] ASAuthorizationProviderExtensionKeyTypeUserSecureEnclaveKey = 3, } ); @@ -16,6 +20,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationProviderExtensionLoginManager")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationProviderExtensionLoginManager; #[cfg(feature = "AuthenticationServices_ASAuthorizationProviderExtensionLoginManager")] diff --git a/AuthenticationServices/ASAuthorizationProviderExtensionRegistrationHandler.rs b/AuthenticationServices/ASAuthorizationProviderExtensionRegistrationHandler.rs index 6ae38d62e..bb2b8cae4 100644 --- a/AuthenticationServices/ASAuthorizationProviderExtensionRegistrationHandler.rs +++ b/AuthenticationServices/ASAuthorizationProviderExtensionRegistrationHandler.rs @@ -6,8 +6,11 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum ASAuthorizationProviderExtensionAuthenticationMethod { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] ASAuthorizationProviderExtensionAuthenticationMethodPassword = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] ASAuthorizationProviderExtensionAuthenticationMethodUserSecureEnclaveKey = 2, } ); @@ -23,15 +26,21 @@ ns_options!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum ASAuthorizationProviderExtensionRegistrationResult { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] ASAuthorizationProviderExtensionRegistrationResultSuccess = 0, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] ASAuthorizationProviderExtensionRegistrationResultFailed = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] ASAuthorizationProviderExtensionRegistrationResultUserInterfaceRequired = 2, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] ASAuthorizationProviderExtensionRegistrationResultFailedNoRetry = 3, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait ASAuthorizationProviderExtensionRegistrationHandler: NSObjectProtocol { diff --git a/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertion.rs b/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertion.rs index b89a390ee..cf24dc7a4 100644 --- a/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertion.rs +++ b/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertion.rs @@ -5,6 +5,7 @@ use crate::AuthenticationServices::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait ASAuthorizationPublicKeyCredentialAssertion: ASPublicKeyCredential { diff --git a/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertionRequest.rs b/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertionRequest.rs index 93972b223..a006bfcf3 100644 --- a/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertionRequest.rs +++ b/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertionRequest.rs @@ -5,6 +5,7 @@ use crate::AuthenticationServices::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait ASAuthorizationPublicKeyCredentialAssertionRequest: NSObjectProtocol + NSSecureCoding { diff --git a/AuthenticationServices/ASAuthorizationPublicKeyCredentialDescriptor.rs b/AuthenticationServices/ASAuthorizationPublicKeyCredentialDescriptor.rs index 838eb3284..189ffed7d 100644 --- a/AuthenticationServices/ASAuthorizationPublicKeyCredentialDescriptor.rs +++ b/AuthenticationServices/ASAuthorizationPublicKeyCredentialDescriptor.rs @@ -5,6 +5,7 @@ use crate::AuthenticationServices::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait ASAuthorizationPublicKeyCredentialDescriptor: NSObjectProtocol + NSSecureCoding { diff --git a/AuthenticationServices/ASAuthorizationPublicKeyCredentialParameters.rs b/AuthenticationServices/ASAuthorizationPublicKeyCredentialParameters.rs index c58a3a31b..9733b0b82 100644 --- a/AuthenticationServices/ASAuthorizationPublicKeyCredentialParameters.rs +++ b/AuthenticationServices/ASAuthorizationPublicKeyCredentialParameters.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationPublicKeyCredentialParameters")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationPublicKeyCredentialParameters; #[cfg(feature = "AuthenticationServices_ASAuthorizationPublicKeyCredentialParameters")] diff --git a/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistration.rs b/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistration.rs index 071d04cf1..13ee4c694 100644 --- a/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistration.rs +++ b/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistration.rs @@ -5,6 +5,7 @@ use crate::AuthenticationServices::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait ASAuthorizationPublicKeyCredentialRegistration: ASPublicKeyCredential { diff --git a/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistrationRequest.rs b/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistrationRequest.rs index 5e3122728..650c697b8 100644 --- a/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistrationRequest.rs +++ b/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistrationRequest.rs @@ -5,6 +5,7 @@ use crate::AuthenticationServices::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait ASAuthorizationPublicKeyCredentialRegistrationRequest: NSObjectProtocol + NSSecureCoding { diff --git a/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertion.rs b/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertion.rs index ab5b21720..b03f257af 100644 --- a/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertion.rs +++ b/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertion.rs @@ -9,6 +9,7 @@ extern_class!( #[cfg( feature = "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialAssertion" )] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationSecurityKeyPublicKeyCredentialAssertion; #[cfg( diff --git a/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest.rs b/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest.rs index 6ffc56770..f3c141867 100644 --- a/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest.rs +++ b/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest.rs @@ -9,6 +9,7 @@ extern_class!( #[cfg( feature = "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest" )] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest; #[cfg( diff --git a/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor.rs b/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor.rs index f47bd09f2..7920bd592 100644 --- a/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor.rs +++ b/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor.rs @@ -25,6 +25,7 @@ extern_static!( extern_fn!( #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe fn ASAuthorizationAllSupportedPublicKeyCredentialDescriptorTransports( ) -> NonNull>; ); @@ -34,6 +35,7 @@ extern_class!( #[cfg( feature = "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor" )] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor; #[cfg( diff --git a/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialProvider.rs b/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialProvider.rs index 1d5634cc4..6cd68adfd 100644 --- a/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialProvider.rs +++ b/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialProvider.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialProvider")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationSecurityKeyPublicKeyCredentialProvider; #[cfg(feature = "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialProvider")] diff --git a/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistration.rs b/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistration.rs index 5fada8180..ef0111288 100644 --- a/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistration.rs +++ b/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistration.rs @@ -9,6 +9,7 @@ extern_class!( #[cfg( feature = "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialRegistration" )] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationSecurityKeyPublicKeyCredentialRegistration; #[cfg( diff --git a/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest.rs b/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest.rs index 62f790071..72871d3e5 100644 --- a/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest.rs +++ b/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest.rs @@ -9,6 +9,7 @@ extern_class!( #[cfg( feature = "AuthenticationServices_ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest" )] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest; #[cfg( diff --git a/AuthenticationServices/ASAuthorizationSingleSignOnCredential.rs b/AuthenticationServices/ASAuthorizationSingleSignOnCredential.rs index 738b5b755..f51a0a3e3 100644 --- a/AuthenticationServices/ASAuthorizationSingleSignOnCredential.rs +++ b/AuthenticationServices/ASAuthorizationSingleSignOnCredential.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationSingleSignOnCredential")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationSingleSignOnCredential; #[cfg(feature = "AuthenticationServices_ASAuthorizationSingleSignOnCredential")] @@ -51,6 +52,7 @@ extern_methods!( pub unsafe fn authenticatedResponse(&self) -> Option>; #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other privateKeys)] pub unsafe fn privateKeys(&self) -> Id; diff --git a/AuthenticationServices/ASAuthorizationSingleSignOnProvider.rs b/AuthenticationServices/ASAuthorizationSingleSignOnProvider.rs index 57891ce98..73a5126d8 100644 --- a/AuthenticationServices/ASAuthorizationSingleSignOnProvider.rs +++ b/AuthenticationServices/ASAuthorizationSingleSignOnProvider.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationSingleSignOnProvider")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationSingleSignOnProvider; #[cfg(feature = "AuthenticationServices_ASAuthorizationSingleSignOnProvider")] diff --git a/AuthenticationServices/ASAuthorizationSingleSignOnRequest.rs b/AuthenticationServices/ASAuthorizationSingleSignOnRequest.rs index 05874e7d1..326309b98 100644 --- a/AuthenticationServices/ASAuthorizationSingleSignOnRequest.rs +++ b/AuthenticationServices/ASAuthorizationSingleSignOnRequest.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASAuthorizationSingleSignOnRequest")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASAuthorizationSingleSignOnRequest; #[cfg(feature = "AuthenticationServices_ASAuthorizationSingleSignOnRequest")] @@ -39,9 +40,11 @@ extern_methods!( authorization_options: &NSArray, ); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isUserInterfaceEnabled)] pub unsafe fn isUserInterfaceEnabled(&self) -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setUserInterfaceEnabled:)] pub unsafe fn setUserInterfaceEnabled(&self, user_interface_enabled: bool); } diff --git a/AuthenticationServices/ASCredentialIdentityStore.rs b/AuthenticationServices/ASCredentialIdentityStore.rs index a78a6b9ac..c5ade1644 100644 --- a/AuthenticationServices/ASCredentialIdentityStore.rs +++ b/AuthenticationServices/ASCredentialIdentityStore.rs @@ -8,9 +8,13 @@ extern_static!(ASCredentialIdentityStoreErrorDomain: &'static NSErrorDomain); ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum ASCredentialIdentityStoreErrorCode { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASCredentialIdentityStoreErrorCodeInternalError = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASCredentialIdentityStoreErrorCodeStoreDisabled = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASCredentialIdentityStoreErrorCodeStoreBusy = 2, } ); @@ -18,6 +22,7 @@ ns_error_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASCredentialIdentityStore")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASCredentialIdentityStore; #[cfg(feature = "AuthenticationServices_ASCredentialIdentityStore")] diff --git a/AuthenticationServices/ASCredentialIdentityStoreState.rs b/AuthenticationServices/ASCredentialIdentityStoreState.rs index 329619077..991a8431d 100644 --- a/AuthenticationServices/ASCredentialIdentityStoreState.rs +++ b/AuthenticationServices/ASCredentialIdentityStoreState.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASCredentialIdentityStoreState")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASCredentialIdentityStoreState; #[cfg(feature = "AuthenticationServices_ASCredentialIdentityStoreState")] diff --git a/AuthenticationServices/ASCredentialProviderExtensionContext.rs b/AuthenticationServices/ASCredentialProviderExtensionContext.rs index 85f5ad140..959d5a27a 100644 --- a/AuthenticationServices/ASCredentialProviderExtensionContext.rs +++ b/AuthenticationServices/ASCredentialProviderExtensionContext.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASCredentialProviderExtensionContext")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASCredentialProviderExtensionContext; #[cfg(feature = "AuthenticationServices_ASCredentialProviderExtensionContext")] diff --git a/AuthenticationServices/ASCredentialServiceIdentifier.rs b/AuthenticationServices/ASCredentialServiceIdentifier.rs index ea6ebc627..8dee25f37 100644 --- a/AuthenticationServices/ASCredentialServiceIdentifier.rs +++ b/AuthenticationServices/ASCredentialServiceIdentifier.rs @@ -6,8 +6,11 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum ASCredentialServiceIdentifierType { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASCredentialServiceIdentifierTypeDomain = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASCredentialServiceIdentifierTypeURL = 1, } ); @@ -15,6 +18,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASCredentialServiceIdentifier")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASCredentialServiceIdentifier; #[cfg(feature = "AuthenticationServices_ASCredentialServiceIdentifier")] diff --git a/AuthenticationServices/ASExtensionErrors.rs b/AuthenticationServices/ASExtensionErrors.rs index 744f634c7..b30fa36c8 100644 --- a/AuthenticationServices/ASExtensionErrors.rs +++ b/AuthenticationServices/ASExtensionErrors.rs @@ -8,10 +8,15 @@ extern_static!(ASExtensionErrorDomain: Option<&'static NSErrorDomain>); ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum ASExtensionErrorCode { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASExtensionErrorCodeFailed = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASExtensionErrorCodeUserCanceled = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASExtensionErrorCodeUserInteractionRequired = 100, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASExtensionErrorCodeCredentialIdentityNotFound = 101, } ); diff --git a/AuthenticationServices/ASPasswordCredentialIdentity.rs b/AuthenticationServices/ASPasswordCredentialIdentity.rs index 765b42cd6..c4a519d38 100644 --- a/AuthenticationServices/ASPasswordCredentialIdentity.rs +++ b/AuthenticationServices/ASPasswordCredentialIdentity.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASPasswordCredentialIdentity")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct ASPasswordCredentialIdentity; #[cfg(feature = "AuthenticationServices_ASPasswordCredentialIdentity")] diff --git a/AuthenticationServices/ASPublicKeyCredential.rs b/AuthenticationServices/ASPublicKeyCredential.rs index c045b19e0..cb3cbbf80 100644 --- a/AuthenticationServices/ASPublicKeyCredential.rs +++ b/AuthenticationServices/ASPublicKeyCredential.rs @@ -5,6 +5,7 @@ use crate::AuthenticationServices::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait ASPublicKeyCredential: ASAuthorizationCredential { #[cfg(feature = "Foundation_NSData")] #[method_id(@__retain_semantics Other rawClientDataJSON)] diff --git a/AuthenticationServices/ASWebAuthenticationSession.rs b/AuthenticationServices/ASWebAuthenticationSession.rs index a28a352d7..ad38e5d96 100644 --- a/AuthenticationServices/ASWebAuthenticationSession.rs +++ b/AuthenticationServices/ASWebAuthenticationSession.rs @@ -10,7 +10,9 @@ ns_error_enum!( #[underlying(NSInteger)] pub enum ASWebAuthenticationSessionErrorCode { ASWebAuthenticationSessionErrorCodeCanceledLogin = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASWebAuthenticationSessionErrorCodePresentationContextNotProvided = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] ASWebAuthenticationSessionErrorCodePresentationContextInvalid = 3, } ); @@ -43,11 +45,13 @@ extern_methods!( completion_handler: ASWebAuthenticationSessionCompletionHandler, ) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other presentationContextProvider)] pub unsafe fn presentationContextProvider( &self, ) -> Option>>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setPresentationContextProvider:)] pub unsafe fn setPresentationContextProvider( &self, @@ -83,6 +87,7 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait ASWebAuthenticationPresentationContextProviding: NSObjectProtocol { diff --git a/AuthenticationServices/ASWebAuthenticationSessionRequest.rs b/AuthenticationServices/ASWebAuthenticationSessionRequest.rs index 2bdd13fc3..907a9dde9 100644 --- a/AuthenticationServices/ASWebAuthenticationSessionRequest.rs +++ b/AuthenticationServices/ASWebAuthenticationSessionRequest.rs @@ -5,6 +5,7 @@ use crate::AuthenticationServices::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait ASWebAuthenticationSessionRequestDelegate: NSObjectProtocol { #[cfg(all( feature = "AuthenticationServices_ASWebAuthenticationSessionRequest", @@ -37,6 +38,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASWebAuthenticationSessionRequest")] + #[cfg(not(any(target_os = "ios")))] pub struct ASWebAuthenticationSessionRequest; #[cfg(feature = "AuthenticationServices_ASWebAuthenticationSessionRequest")] diff --git a/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionHandling.rs b/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionHandling.rs index 3059553a1..81316cf12 100644 --- a/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionHandling.rs +++ b/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionHandling.rs @@ -5,6 +5,7 @@ use crate::AuthenticationServices::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait ASWebAuthenticationSessionWebBrowserSessionHandling { #[cfg(feature = "AuthenticationServices_ASWebAuthenticationSessionRequest")] #[method(beginHandlingWebAuthenticationSessionRequest:)] diff --git a/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionManager.rs b/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionManager.rs index a6ce0b2f7..7e9946f7b 100644 --- a/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionManager.rs +++ b/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionManager.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "AuthenticationServices_ASWebAuthenticationSessionWebBrowserSessionManager")] + #[cfg(not(any(target_os = "ios")))] pub struct ASWebAuthenticationSessionWebBrowserSessionManager; #[cfg(feature = "AuthenticationServices_ASWebAuthenticationSessionWebBrowserSessionManager")] diff --git a/AutomaticAssessmentConfiguration/AEAssessmentApplication.rs b/AutomaticAssessmentConfiguration/AEAssessmentApplication.rs index 4d309ee12..90e3eb3f8 100644 --- a/AutomaticAssessmentConfiguration/AEAssessmentApplication.rs +++ b/AutomaticAssessmentConfiguration/AEAssessmentApplication.rs @@ -22,20 +22,25 @@ extern_methods!( #[cfg(feature = "AutomaticAssessmentConfiguration_AEAssessmentApplication")] unsafe impl AEAssessmentApplication { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bundleIdentifier)] pub unsafe fn bundleIdentifier(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other teamIdentifier)] pub unsafe fn teamIdentifier(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(requiresSignatureValidation)] pub unsafe fn requiresSignatureValidation(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setRequiresSignatureValidation:)] pub unsafe fn setRequiresSignatureValidation(&self, requires_signature_validation: bool); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithBundleIdentifier:)] pub unsafe fn initWithBundleIdentifier( this: Option>, @@ -43,6 +48,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithBundleIdentifier:teamIdentifier:)] pub unsafe fn initWithBundleIdentifier_teamIdentifier( this: Option>, diff --git a/AutomaticAssessmentConfiguration/AEAssessmentConfiguration.rs b/AutomaticAssessmentConfiguration/AEAssessmentConfiguration.rs index 4acaaf00d..5cfdf627f 100644 --- a/AutomaticAssessmentConfiguration/AEAssessmentConfiguration.rs +++ b/AutomaticAssessmentConfiguration/AEAssessmentConfiguration.rs @@ -30,61 +30,80 @@ unsafe impl NSObjectProtocol for AEAssessmentConfiguration {} extern_methods!( #[cfg(feature = "AutomaticAssessmentConfiguration_AEAssessmentConfiguration")] unsafe impl AEAssessmentConfiguration { + #[cfg(not(any(target_os = "macos")))] #[method(autocorrectMode)] pub unsafe fn autocorrectMode(&self) -> AEAutocorrectMode; + #[cfg(not(any(target_os = "macos")))] #[method(setAutocorrectMode:)] pub unsafe fn setAutocorrectMode(&self, autocorrect_mode: AEAutocorrectMode); + #[cfg(not(any(target_os = "macos")))] #[method(allowsSpellCheck)] pub unsafe fn allowsSpellCheck(&self) -> bool; + #[cfg(not(any(target_os = "macos")))] #[method(setAllowsSpellCheck:)] pub unsafe fn setAllowsSpellCheck(&self, allows_spell_check: bool); + #[cfg(not(any(target_os = "macos")))] #[method(allowsPredictiveKeyboard)] pub unsafe fn allowsPredictiveKeyboard(&self) -> bool; + #[cfg(not(any(target_os = "macos")))] #[method(setAllowsPredictiveKeyboard:)] pub unsafe fn setAllowsPredictiveKeyboard(&self, allows_predictive_keyboard: bool); + #[cfg(not(any(target_os = "macos")))] #[method(allowsKeyboardShortcuts)] pub unsafe fn allowsKeyboardShortcuts(&self) -> bool; + #[cfg(not(any(target_os = "macos")))] #[method(setAllowsKeyboardShortcuts:)] pub unsafe fn setAllowsKeyboardShortcuts(&self, allows_keyboard_shortcuts: bool); + #[cfg(not(any(target_os = "macos")))] #[method(allowsActivityContinuation)] pub unsafe fn allowsActivityContinuation(&self) -> bool; + #[cfg(not(any(target_os = "macos")))] #[method(setAllowsActivityContinuation:)] pub unsafe fn setAllowsActivityContinuation(&self, allows_activity_continuation: bool); + #[cfg(not(any(target_os = "macos")))] #[method(allowsDictation)] pub unsafe fn allowsDictation(&self) -> bool; + #[cfg(not(any(target_os = "macos")))] #[method(setAllowsDictation:)] pub unsafe fn setAllowsDictation(&self, allows_dictation: bool); + #[cfg(not(any(target_os = "macos")))] #[method(allowsAccessibilitySpeech)] pub unsafe fn allowsAccessibilitySpeech(&self) -> bool; + #[cfg(not(any(target_os = "macos")))] #[method(setAllowsAccessibilitySpeech:)] pub unsafe fn setAllowsAccessibilitySpeech(&self, allows_accessibility_speech: bool); + #[cfg(not(any(target_os = "macos")))] #[method(allowsPasswordAutoFill)] pub unsafe fn allowsPasswordAutoFill(&self) -> bool; + #[cfg(not(any(target_os = "macos")))] #[method(setAllowsPasswordAutoFill:)] pub unsafe fn setAllowsPasswordAutoFill(&self, allows_password_auto_fill: bool); + #[cfg(not(any(target_os = "macos")))] #[method(allowsContinuousPathKeyboard)] pub unsafe fn allowsContinuousPathKeyboard(&self) -> bool; + #[cfg(not(any(target_os = "macos")))] #[method(setAllowsContinuousPathKeyboard:)] pub unsafe fn setAllowsContinuousPathKeyboard(&self, allows_continuous_path_keyboard: bool); #[cfg(feature = "AutomaticAssessmentConfiguration_AEAssessmentParticipantConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other mainParticipantConfiguration)] pub unsafe fn mainParticipantConfiguration( &self, @@ -95,6 +114,7 @@ extern_methods!( feature = "AutomaticAssessmentConfiguration_AEAssessmentParticipantConfiguration", feature = "Foundation_NSDictionary" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other configurationsByApplication)] pub unsafe fn configurationsByApplication( &self, @@ -104,6 +124,7 @@ extern_methods!( feature = "AutomaticAssessmentConfiguration_AEAssessmentApplication", feature = "AutomaticAssessmentConfiguration_AEAssessmentParticipantConfiguration" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setConfiguration:forApplication:)] pub unsafe fn setConfiguration_forApplication( &self, @@ -112,6 +133,7 @@ extern_methods!( ); #[cfg(feature = "AutomaticAssessmentConfiguration_AEAssessmentApplication")] + #[cfg(not(any(target_os = "ios")))] #[method(removeApplication:)] pub unsafe fn removeApplication(&self, application: &AEAssessmentApplication); } diff --git a/AutomaticAssessmentConfiguration/AEAssessmentParticipantConfiguration.rs b/AutomaticAssessmentConfiguration/AEAssessmentParticipantConfiguration.rs index 85a0c686f..3bad422c8 100644 --- a/AutomaticAssessmentConfiguration/AEAssessmentParticipantConfiguration.rs +++ b/AutomaticAssessmentConfiguration/AEAssessmentParticipantConfiguration.rs @@ -21,15 +21,19 @@ unsafe impl NSObjectProtocol for AEAssessmentParticipantConfiguration {} extern_methods!( #[cfg(feature = "AutomaticAssessmentConfiguration_AEAssessmentParticipantConfiguration")] unsafe impl AEAssessmentParticipantConfiguration { + #[cfg(not(any(target_os = "ios")))] #[method(allowsNetworkAccess)] pub unsafe fn allowsNetworkAccess(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setAllowsNetworkAccess:)] pub unsafe fn setAllowsNetworkAccess(&self, allows_network_access: bool); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } diff --git a/AutomaticAssessmentConfiguration/AEAssessmentSession.rs b/AutomaticAssessmentConfiguration/AEAssessmentSession.rs index 1dfa1d7b5..25481c6d1 100644 --- a/AutomaticAssessmentConfiguration/AEAssessmentSession.rs +++ b/AutomaticAssessmentConfiguration/AEAssessmentSession.rs @@ -59,6 +59,7 @@ extern_methods!( pub unsafe fn end(&self); #[cfg(feature = "AutomaticAssessmentConfiguration_AEAssessmentConfiguration")] + #[cfg(not(any(target_os = "ios")))] #[method(updateToConfiguration:)] pub unsafe fn updateToConfiguration(&self, configuration: &AEAssessmentConfiguration); } diff --git a/AutomaticAssessmentConfiguration/AEAssessmentSessionDelegate.rs b/AutomaticAssessmentConfiguration/AEAssessmentSessionDelegate.rs index 0f65f8d1b..97698374a 100644 --- a/AutomaticAssessmentConfiguration/AEAssessmentSessionDelegate.rs +++ b/AutomaticAssessmentConfiguration/AEAssessmentSessionDelegate.rs @@ -41,6 +41,7 @@ extern_protocol!( unsafe fn assessmentSessionDidEnd(&self, session: &AEAssessmentSession); #[cfg(feature = "AutomaticAssessmentConfiguration_AEAssessmentSession")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(assessmentSessionDidUpdate:)] unsafe fn assessmentSessionDidUpdate(&self, session: &AEAssessmentSession); @@ -50,6 +51,7 @@ extern_protocol!( feature = "AutomaticAssessmentConfiguration_AEAssessmentSession", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(assessmentSession:failedToUpdateToConfiguration:error:)] unsafe fn assessmentSession_failedToUpdateToConfiguration_error( diff --git a/Automator/AMAction.rs b/Automator/AMAction.rs index 46e49f95d..ce40f20f2 100644 --- a/Automator/AMAction.rs +++ b/Automator/AMAction.rs @@ -8,10 +8,15 @@ use crate::OSAKit::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum AMLogLevel { + #[cfg(not(any(target_os = "ios")))] AMLogLevelDebug = 0, + #[cfg(not(any(target_os = "ios")))] AMLogLevelInfo = 1, + #[cfg(not(any(target_os = "ios")))] AMLogLevelWarn = 2, + #[cfg(not(any(target_os = "ios")))] AMLogLevelError = 3, } ); @@ -19,6 +24,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Automator_AMAction")] + #[cfg(not(any(target_os = "ios")))] pub struct AMAction; #[cfg(feature = "Automator_AMAction")] @@ -34,6 +40,7 @@ extern_methods!( #[cfg(feature = "Automator_AMAction")] unsafe impl AMAction { #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithDefinition:fromArchive:)] pub unsafe fn initWithDefinition_fromArchive( this: Option>, @@ -42,6 +49,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:error:_)] pub unsafe fn initWithContentsOfURL_error( this: Option>, @@ -49,36 +57,45 @@ extern_methods!( ) -> Result, Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(ignoresInput)] pub unsafe fn ignoresInput(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedInputType)] pub unsafe fn selectedInputType(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedInputType:)] pub unsafe fn setSelectedInputType(&self, selected_input_type: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other selectedOutputType)] pub unsafe fn selectedOutputType(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setSelectedOutputType:)] pub unsafe fn setSelectedOutputType(&self, selected_output_type: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method(progressValue)] pub unsafe fn progressValue(&self) -> CGFloat; + #[cfg(not(any(target_os = "ios")))] #[method(setProgressValue:)] pub unsafe fn setProgressValue(&self, progress_value: CGFloat); #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other runWithInput:fromAction:error:)] pub unsafe fn runWithInput_fromAction_error( &self, @@ -88,20 +105,24 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other runWithInput:error:_)] pub unsafe fn runWithInput_error( &self, input: Option<&Object>, ) -> Result, Id>; + #[cfg(not(any(target_os = "ios")))] #[method(runAsynchronouslyWithInput:)] pub unsafe fn runAsynchronouslyWithInput(&self, input: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(willFinishRunning)] pub unsafe fn willFinishRunning(&self); #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(didFinishRunningWithError:)] pub unsafe fn didFinishRunningWithError( &self, @@ -109,18 +130,23 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios")))] #[method(finishRunningWithError:)] pub unsafe fn finishRunningWithError(&self, error: Option<&NSError>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other output)] pub unsafe fn output(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setOutput:)] pub unsafe fn setOutput(&self, output: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(stop)] pub unsafe fn stop(&self); + #[cfg(not(any(target_os = "ios")))] #[method(reset)] pub unsafe fn reset(&self); @@ -128,24 +154,31 @@ extern_methods!( feature = "Foundation_NSMutableDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method(writeToDictionary:)] pub unsafe fn writeToDictionary(&self, dictionary: &NSMutableDictionary); + #[cfg(not(any(target_os = "ios")))] #[method(opened)] pub unsafe fn opened(&self); + #[cfg(not(any(target_os = "ios")))] #[method(activated)] pub unsafe fn activated(&self); + #[cfg(not(any(target_os = "ios")))] #[method(closed)] pub unsafe fn closed(&self); + #[cfg(not(any(target_os = "ios")))] #[method(updateParameters)] pub unsafe fn updateParameters(&self); + #[cfg(not(any(target_os = "ios")))] #[method(parametersUpdated)] pub unsafe fn parametersUpdated(&self); + #[cfg(not(any(target_os = "ios")))] #[method(isStopped)] pub unsafe fn isStopped(&self) -> bool; } diff --git a/Automator/AMAppleScriptAction.rs b/Automator/AMAppleScriptAction.rs index 0c1495792..99d11f897 100644 --- a/Automator/AMAppleScriptAction.rs +++ b/Automator/AMAppleScriptAction.rs @@ -9,6 +9,7 @@ use crate::OSAKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Automator_AMAppleScriptAction")] + #[cfg(not(any(target_os = "ios")))] pub struct AMAppleScriptAction; #[cfg(feature = "Automator_AMAppleScriptAction")] @@ -31,10 +32,12 @@ extern_methods!( #[cfg(feature = "Automator_AMAppleScriptAction")] unsafe impl AMAppleScriptAction { #[cfg(feature = "OSAKit_OSAScript")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other script)] pub unsafe fn script(&self) -> Option>; #[cfg(feature = "OSAKit_OSAScript")] + #[cfg(not(any(target_os = "ios")))] #[method(setScript:)] pub unsafe fn setScript(&self, script: Option<&OSAScript>); } @@ -45,6 +48,7 @@ extern_methods!( #[cfg(feature = "Automator_AMAppleScriptAction")] unsafe impl AMAppleScriptAction { #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithDefinition:fromArchive:)] pub unsafe fn initWithDefinition_fromArchive( this: Option>, @@ -53,6 +57,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:error:_)] pub unsafe fn initWithContentsOfURL_error( this: Option>, diff --git a/Automator/AMBundleAction.rs b/Automator/AMBundleAction.rs index e9d53069a..4a8e5001d 100644 --- a/Automator/AMBundleAction.rs +++ b/Automator/AMBundleAction.rs @@ -9,6 +9,7 @@ use crate::OSAKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Automator_AMBundleAction")] + #[cfg(not(any(target_os = "ios")))] pub struct AMBundleAction; #[cfg(feature = "Automator_AMBundleAction")] @@ -30,17 +31,21 @@ unsafe impl NSSecureCoding for AMBundleAction {} extern_methods!( #[cfg(feature = "Automator_AMBundleAction")] unsafe impl AMBundleAction { + #[cfg(not(any(target_os = "ios")))] #[method(awakeFromBundle)] pub unsafe fn awakeFromBundle(&self); + #[cfg(not(any(target_os = "ios")))] #[method(hasView)] pub unsafe fn hasView(&self) -> bool; #[cfg(feature = "AppKit_NSView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other bundle)] pub unsafe fn bundle(&self) -> Id; @@ -48,6 +53,7 @@ extern_methods!( feature = "Foundation_NSMutableDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other parameters)] pub unsafe fn parameters(&self) -> Option, Owned>>; @@ -56,6 +62,7 @@ extern_methods!( feature = "Foundation_NSMutableDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method(setParameters:)] pub unsafe fn setParameters( &self, @@ -69,6 +76,7 @@ extern_methods!( #[cfg(feature = "Automator_AMBundleAction")] unsafe impl AMBundleAction { #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithDefinition:fromArchive:)] pub unsafe fn initWithDefinition_fromArchive( this: Option>, @@ -77,6 +85,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:error:_)] pub unsafe fn initWithContentsOfURL_error( this: Option>, diff --git a/Automator/AMShellScriptAction.rs b/Automator/AMShellScriptAction.rs index 2cddc5e73..efdb342fb 100644 --- a/Automator/AMShellScriptAction.rs +++ b/Automator/AMShellScriptAction.rs @@ -9,6 +9,7 @@ use crate::OSAKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Automator_AMShellScriptAction")] + #[cfg(not(any(target_os = "ios")))] pub struct AMShellScriptAction; #[cfg(feature = "Automator_AMShellScriptAction")] @@ -30,14 +31,17 @@ unsafe impl NSSecureCoding for AMShellScriptAction {} extern_methods!( #[cfg(feature = "Automator_AMShellScriptAction")] unsafe impl AMShellScriptAction { + #[cfg(not(any(target_os = "ios")))] #[method(remapLineEndings)] pub unsafe fn remapLineEndings(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other inputFieldSeparator)] pub unsafe fn inputFieldSeparator(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other outputFieldSeparator)] pub unsafe fn outputFieldSeparator(&self) -> Id; } @@ -48,6 +52,7 @@ extern_methods!( #[cfg(feature = "Automator_AMShellScriptAction")] unsafe impl AMShellScriptAction { #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithDefinition:fromArchive:)] pub unsafe fn initWithDefinition_fromArchive( this: Option>, @@ -56,6 +61,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:error:_)] pub unsafe fn initWithContentsOfURL_error( this: Option>, diff --git a/Automator/AMWorkflow.rs b/Automator/AMWorkflow.rs index b1f696f31..de4074749 100644 --- a/Automator/AMWorkflow.rs +++ b/Automator/AMWorkflow.rs @@ -9,6 +9,7 @@ use crate::OSAKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Automator_AMWorkflow")] + #[cfg(not(any(target_os = "ios")))] pub struct AMWorkflow; #[cfg(feature = "Automator_AMWorkflow")] @@ -24,16 +25,19 @@ extern_methods!( #[cfg(feature = "Automator_AMWorkflow")] unsafe impl AMWorkflow { #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other runWorkflowAtURL:withInput:error:_)] pub unsafe fn runWorkflowAtURL_withInput_error( file_url: &NSURL, input: Option<&Object>, ) -> Result, Id>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:error:_)] pub unsafe fn initWithContentsOfURL_error( this: Option>, @@ -41,10 +45,12 @@ extern_methods!( ) -> Result, Id>; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios")))] #[method(writeToURL:error:_)] pub unsafe fn writeToURL_error(&self, file_url: &NSURL) -> Result<(), Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setValue:forVariableWithName:)] pub unsafe fn setValue_forVariableWithName( &self, @@ -53,6 +59,7 @@ extern_methods!( ) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other valueForVariableWithName:)] pub unsafe fn valueForVariableWithName( &self, @@ -60,17 +67,21 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Automator_AMAction")] + #[cfg(not(any(target_os = "ios")))] #[method(addAction:)] pub unsafe fn addAction(&self, action: &AMAction); #[cfg(feature = "Automator_AMAction")] + #[cfg(not(any(target_os = "ios")))] #[method(removeAction:)] pub unsafe fn removeAction(&self, action: &AMAction); #[cfg(feature = "Automator_AMAction")] + #[cfg(not(any(target_os = "ios")))] #[method(insertAction:atIndex:)] pub unsafe fn insertAction_atIndex(&self, action: &AMAction, index: NSUInteger); + #[cfg(not(any(target_os = "ios")))] #[method(moveActionAtIndex:toIndex:)] pub unsafe fn moveActionAtIndex_toIndex( &self, @@ -79,19 +90,24 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fileURL)] pub unsafe fn fileURL(&self) -> Option>; #[cfg(all(feature = "Automator_AMAction", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other actions)] pub unsafe fn actions(&self) -> Id>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other input)] pub unsafe fn input(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setInput:)] pub unsafe fn setInput(&self, input: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other output)] pub unsafe fn output(&self) -> Option>; } diff --git a/Automator/AMWorkflowController.rs b/Automator/AMWorkflowController.rs index b8f0a80e2..cacd5e857 100644 --- a/Automator/AMWorkflowController.rs +++ b/Automator/AMWorkflowController.rs @@ -9,6 +9,7 @@ use crate::OSAKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Automator_AMWorkflowController")] + #[cfg(not(any(target_os = "ios")))] pub struct AMWorkflowController; #[cfg(feature = "Automator_AMWorkflowController")] @@ -34,76 +35,95 @@ extern_methods!( #[cfg(feature = "Automator_AMWorkflowController")] unsafe impl AMWorkflowController { #[cfg(feature = "Automator_AMWorkflow")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other workflow)] pub unsafe fn workflow(&self) -> Option>; #[cfg(feature = "Automator_AMWorkflow")] + #[cfg(not(any(target_os = "ios")))] #[method(setWorkflow:)] pub unsafe fn setWorkflow(&self, workflow: Option<&AMWorkflow>); #[cfg(feature = "Automator_AMWorkflowView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other workflowView)] pub unsafe fn workflowView(&self) -> Option>; #[cfg(feature = "Automator_AMWorkflowView")] + #[cfg(not(any(target_os = "ios")))] #[method(setWorkflowView:)] pub unsafe fn setWorkflowView(&self, workflow_view: Option<&AMWorkflowView>); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate( &self, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "ios")))] #[method(canRun)] pub unsafe fn canRun(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isRunning)] pub unsafe fn isRunning(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isPaused)] pub unsafe fn isPaused(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(run:)] pub unsafe fn run(&self, sender: &Object); + #[cfg(not(any(target_os = "ios")))] #[method(stop:)] pub unsafe fn stop(&self, sender: &Object); + #[cfg(not(any(target_os = "ios")))] #[method(pause:)] pub unsafe fn pause(&self, sender: &Object); + #[cfg(not(any(target_os = "ios")))] #[method(step:)] pub unsafe fn step(&self, sender: &Object); + #[cfg(not(any(target_os = "ios")))] #[method(reset:)] pub unsafe fn reset(&self, sender: &Object); } ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait AMWorkflowControllerDelegate: NSObjectProtocol { #[cfg(feature = "Automator_AMWorkflowController")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(workflowControllerWillRun:)] unsafe fn workflowControllerWillRun(&self, controller: &AMWorkflowController); #[cfg(feature = "Automator_AMWorkflowController")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(workflowControllerWillStop:)] unsafe fn workflowControllerWillStop(&self, controller: &AMWorkflowController); #[cfg(feature = "Automator_AMWorkflowController")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(workflowControllerDidRun:)] unsafe fn workflowControllerDidRun(&self, controller: &AMWorkflowController); #[cfg(feature = "Automator_AMWorkflowController")] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(workflowControllerDidStop:)] unsafe fn workflowControllerDidStop(&self, controller: &AMWorkflowController); @@ -112,6 +132,7 @@ extern_protocol!( feature = "Automator_AMAction", feature = "Automator_AMWorkflowController" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(workflowController:willRunAction:)] unsafe fn workflowController_willRunAction( @@ -124,6 +145,7 @@ extern_protocol!( feature = "Automator_AMAction", feature = "Automator_AMWorkflowController" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(workflowController:didRunAction:)] unsafe fn workflowController_didRunAction( @@ -136,6 +158,7 @@ extern_protocol!( feature = "Automator_AMWorkflowController", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "ios")))] #[optional] #[method(workflowController:didError:)] unsafe fn workflowController_didError( diff --git a/Automator/AMWorkflowView.rs b/Automator/AMWorkflowView.rs index 864315be1..3e3bd7db0 100644 --- a/Automator/AMWorkflowView.rs +++ b/Automator/AMWorkflowView.rs @@ -9,6 +9,7 @@ use crate::OSAKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Automator_AMWorkflowView")] + #[cfg(not(any(target_os = "ios")))] pub struct AMWorkflowView; #[cfg(feature = "Automator_AMWorkflowView")] @@ -45,17 +46,21 @@ unsafe impl NSUserInterfaceItemIdentification for AMWorkflowView {} extern_methods!( #[cfg(feature = "Automator_AMWorkflowView")] unsafe impl AMWorkflowView { + #[cfg(not(any(target_os = "ios")))] #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); #[cfg(feature = "Automator_AMWorkflowController")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other workflowController)] pub unsafe fn workflowController(&self) -> Option>; #[cfg(feature = "Automator_AMWorkflowController")] + #[cfg(not(any(target_os = "ios")))] #[method(setWorkflowController:)] pub unsafe fn setWorkflowController( &self, @@ -68,6 +73,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "Automator_AMWorkflowView")] unsafe impl AMWorkflowView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/Automator/AMWorkspace.rs b/Automator/AMWorkspace.rs index 591e5ef28..150d0937e 100644 --- a/Automator/AMWorkspace.rs +++ b/Automator/AMWorkspace.rs @@ -9,6 +9,7 @@ use crate::OSAKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Automator_AMWorkspace")] + #[cfg(not(any(target_os = "ios")))] pub struct AMWorkspace; #[cfg(feature = "Automator_AMWorkspace")] @@ -23,6 +24,7 @@ unsafe impl NSObjectProtocol for AMWorkspace {} extern_methods!( #[cfg(feature = "Automator_AMWorkspace")] unsafe impl AMWorkspace { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedWorkspace)] pub unsafe fn sharedWorkspace() -> Option>; } diff --git a/Automator/AutomatorErrors.rs b/Automator/AutomatorErrors.rs index 25f11ae2e..82ade1e06 100644 --- a/Automator/AutomatorErrors.rs +++ b/Automator/AutomatorErrors.rs @@ -8,40 +8,75 @@ use crate::OSAKit::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum AMErrorCode { + #[cfg(not(any(target_os = "ios")))] AMWorkflowNewerVersionError = -100, + #[cfg(not(any(target_os = "ios")))] AMWorkflowPropertyListInvalidError = -101, + #[cfg(not(any(target_os = "ios")))] AMWorkflowNewerActionVersionError = -111, + #[cfg(not(any(target_os = "ios")))] AMWorkflowOlderActionVersionError = -112, + #[cfg(not(any(target_os = "ios")))] AMWorkflowActionsNotLoadedError = -113, + #[cfg(not(any(target_os = "ios")))] AMWorkflowNoEnabledActionsError = -114, + #[cfg(not(any(target_os = "ios")))] AMUserCanceledError = -128, + #[cfg(not(any(target_os = "ios")))] AMNoSuchActionError = -200, + #[cfg(not(any(target_os = "ios")))] AMActionNotLoadableError = -201, + #[cfg(not(any(target_os = "ios")))] AMActionArchitectureMismatchError = -202, + #[cfg(not(any(target_os = "ios")))] AMActionRuntimeMismatchError = -203, + #[cfg(not(any(target_os = "ios")))] AMActionLoadError = -204, + #[cfg(not(any(target_os = "ios")))] AMActionLinkError = -205, + #[cfg(not(any(target_os = "ios")))] AMActionApplicationResourceError = -206, + #[cfg(not(any(target_os = "ios")))] AMActionApplicationVersionResourceError = -207, + #[cfg(not(any(target_os = "ios")))] AMActionFileResourceError = -208, + #[cfg(not(any(target_os = "ios")))] AMActionLicenseResourceError = -209, + #[cfg(not(any(target_os = "ios")))] AMActionRequiredActionResourceError = -210, + #[cfg(not(any(target_os = "ios")))] AMActionInitializationError = -211, + #[cfg(not(any(target_os = "ios")))] AMActionExecutionError = -212, + #[cfg(not(any(target_os = "ios")))] AMActionExceptionError = -213, + #[cfg(not(any(target_os = "ios")))] AMActionPropertyListInvalidError = -214, + #[cfg(not(any(target_os = "ios")))] AMActionInsufficientDataError = -215, + #[cfg(not(any(target_os = "ios")))] AMActionIsDeprecatedError = -216, + #[cfg(not(any(target_os = "ios")))] AMActionFailedGatekeeperError = -217, + #[cfg(not(any(target_os = "ios")))] AMActionSignatureCorruptError = -218, + #[cfg(not(any(target_os = "ios")))] AMActionQuarantineError = -219, + #[cfg(not(any(target_os = "ios")))] AMActionXProtectError = -220, + #[cfg(not(any(target_os = "ios")))] AMActionMalwareError = -221, + #[cfg(not(any(target_os = "ios")))] AMActionThirdPartyActionsNotAllowedError = -222, + #[cfg(not(any(target_os = "ios")))] AMActionXPCError = -223, + #[cfg(not(any(target_os = "ios")))] AMConversionNotPossibleError = -300, + #[cfg(not(any(target_os = "ios")))] AMConversionNoDataError = -301, + #[cfg(not(any(target_os = "ios")))] AMConversionFailedError = -302, } ); diff --git a/BackgroundAssets/BAAppExtensionInfo.rs b/BackgroundAssets/BAAppExtensionInfo.rs index d2f266c10..127b90638 100644 --- a/BackgroundAssets/BAAppExtensionInfo.rs +++ b/BackgroundAssets/BAAppExtensionInfo.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BackgroundAssets_BAAppExtensionInfo")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct BAAppExtensionInfo; #[cfg(feature = "BackgroundAssets_BAAppExtensionInfo")] diff --git a/BackgroundAssets/BADownload.rs b/BackgroundAssets/BADownload.rs index 929063615..e4bd6267e 100644 --- a/BackgroundAssets/BADownload.rs +++ b/BackgroundAssets/BADownload.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BackgroundAssets_BADownload")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct BADownload; #[cfg(feature = "BackgroundAssets_BADownload")] @@ -27,17 +28,21 @@ unsafe impl NSSecureCoding for BADownload {} extern_methods!( #[cfg(feature = "BackgroundAssets_BADownload")] unsafe impl BADownload { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(state)] pub unsafe fn state(&self) -> BADownloadState; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other uniqueIdentifier)] pub unsafe fn uniqueIdentifier(&self) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(priority)] pub unsafe fn priority(&self) -> BADownloaderPriority; diff --git a/BackgroundAssets/BADownloadManager.rs b/BackgroundAssets/BADownloadManager.rs index fbe355698..e71068cce 100644 --- a/BackgroundAssets/BADownloadManager.rs +++ b/BackgroundAssets/BADownloadManager.rs @@ -5,6 +5,7 @@ use crate::BackgroundAssets::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait BADownloadManagerDelegate: NSObjectProtocol { #[cfg(feature = "BackgroundAssets_BADownload")] #[optional] @@ -64,6 +65,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BackgroundAssets_BADownloadManager")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct BADownloadManager; #[cfg(feature = "BackgroundAssets_BADownloadManager")] @@ -84,12 +86,15 @@ extern_methods!( #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other sharedManager)] pub unsafe fn sharedManager() -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -101,6 +106,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(fetchCurrentDownloadsWithCompletionHandler:)] pub unsafe fn fetchCurrentDownloadsWithCompletionHandler( &self, @@ -111,6 +117,7 @@ extern_methods!( feature = "BackgroundAssets_BADownload", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(scheduleDownload:error:_)] pub unsafe fn scheduleDownload_error( &self, @@ -118,6 +125,7 @@ extern_methods!( ) -> Result<(), Id>; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(performWithExclusiveControl:)] pub unsafe fn performWithExclusiveControl( &self, @@ -125,6 +133,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSDate", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(performWithExclusiveControlBeforeDate:performHandler:)] pub unsafe fn performWithExclusiveControlBeforeDate_performHandler( &self, @@ -136,6 +145,7 @@ extern_methods!( feature = "BackgroundAssets_BADownload", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(startForegroundDownload:error:_)] pub unsafe fn startForegroundDownload_error( &self, @@ -146,6 +156,7 @@ extern_methods!( feature = "BackgroundAssets_BADownload", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(cancelDownload:error:_)] pub unsafe fn cancelDownload_error(&self, download: &BADownload) -> Result<(), Id>; diff --git a/BackgroundAssets/BADownloaderExtension.rs b/BackgroundAssets/BADownloaderExtension.rs index 2413fd82b..7d2d868db 100644 --- a/BackgroundAssets/BADownloaderExtension.rs +++ b/BackgroundAssets/BADownloaderExtension.rs @@ -5,6 +5,7 @@ use crate::BackgroundAssets::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait BADownloaderExtension: NSObjectProtocol { #[cfg(all( feature = "BackgroundAssets_BAAppExtensionInfo", diff --git a/BackgroundAssets/BAURLDownload.rs b/BackgroundAssets/BAURLDownload.rs index 898182a85..a58045315 100644 --- a/BackgroundAssets/BAURLDownload.rs +++ b/BackgroundAssets/BAURLDownload.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BackgroundAssets_BAURLDownload")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct BAURLDownload; #[cfg(feature = "BackgroundAssets_BAURLDownload")] @@ -35,6 +36,7 @@ extern_methods!( pub unsafe fn init(this: Option>) -> Id; #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURLRequest"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithIdentifier:request:applicationGroupIdentifier:)] pub unsafe fn initWithIdentifier_request_applicationGroupIdentifier( this: Option>, @@ -44,6 +46,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURLRequest"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithIdentifier:request:applicationGroupIdentifier:priority:)] pub unsafe fn initWithIdentifier_request_applicationGroupIdentifier_priority( this: Option>, diff --git a/BackgroundTasks/BGTask.rs b/BackgroundTasks/BGTask.rs index 667968e89..ec5b5889a 100644 --- a/BackgroundTasks/BGTask.rs +++ b/BackgroundTasks/BGTask.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BackgroundTasks_BGTask")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct BGTask; #[cfg(feature = "BackgroundTasks_BGTask")] @@ -45,6 +46,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BackgroundTasks_BGProcessingTask")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct BGProcessingTask; #[cfg(feature = "BackgroundTasks_BGProcessingTask")] @@ -65,6 +67,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BackgroundTasks_BGAppRefreshTask")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct BGAppRefreshTask; #[cfg(feature = "BackgroundTasks_BGAppRefreshTask")] diff --git a/BackgroundTasks/BGTaskRequest.rs b/BackgroundTasks/BGTaskRequest.rs index f4edd7664..ae8db0406 100644 --- a/BackgroundTasks/BGTaskRequest.rs +++ b/BackgroundTasks/BGTaskRequest.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BackgroundTasks_BGTaskRequest")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct BGTaskRequest; #[cfg(feature = "BackgroundTasks_BGTaskRequest")] @@ -44,6 +45,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BackgroundTasks_BGAppRefreshTaskRequest")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct BGAppRefreshTaskRequest; #[cfg(feature = "BackgroundTasks_BGAppRefreshTaskRequest")] @@ -71,6 +73,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BackgroundTasks_BGProcessingTaskRequest")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct BGProcessingTaskRequest; #[cfg(feature = "BackgroundTasks_BGProcessingTaskRequest")] diff --git a/BackgroundTasks/BGTaskScheduler.rs b/BackgroundTasks/BGTaskScheduler.rs index 29920a456..592272de0 100644 --- a/BackgroundTasks/BGTaskScheduler.rs +++ b/BackgroundTasks/BGTaskScheduler.rs @@ -8,9 +8,13 @@ extern_static!(BGTaskSchedulerErrorDomain: &'static NSErrorDomain); ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum BGTaskSchedulerErrorCode { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] BGTaskSchedulerErrorCodeUnavailable = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] BGTaskSchedulerErrorCodeTooManyPendingTaskRequests = 2, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] BGTaskSchedulerErrorCodeNotPermitted = 3, } ); @@ -18,6 +22,7 @@ ns_error_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BackgroundTasks_BGTaskScheduler")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct BGTaskScheduler; #[cfg(feature = "BackgroundTasks_BGTaskScheduler")] diff --git a/BusinessChat/BCChatAction.rs b/BusinessChat/BCChatAction.rs index daf8e31cc..b3e8f4cff 100644 --- a/BusinessChat/BCChatAction.rs +++ b/BusinessChat/BCChatAction.rs @@ -18,7 +18,6 @@ extern_static!(BCParameterNameBody: &'static BCParameterName); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BusinessChat_BCChatAction")] - #[deprecated] pub struct BCChatAction; #[cfg(feature = "BusinessChat_BCChatAction")] @@ -34,7 +33,6 @@ extern_methods!( #[cfg(feature = "BusinessChat_BCChatAction")] unsafe impl BCChatAction { #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] - #[deprecated] #[method(openTranscript:intentParameters:)] pub unsafe fn openTranscript_intentParameters( business_identifier: &NSString, diff --git a/BusinessChat/BCChatButton.rs b/BusinessChat/BCChatButton.rs index 40daa349c..41abac53e 100644 --- a/BusinessChat/BCChatButton.rs +++ b/BusinessChat/BCChatButton.rs @@ -7,11 +7,8 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] - #[deprecated] pub enum BCChatButtonStyle { - #[deprecated] BCChatButtonStyleLight = 0, - #[deprecated] BCChatButtonStyleDark = 1, } ); @@ -19,7 +16,6 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "BusinessChat_BCChatButton")] - #[deprecated] pub struct BCChatButton; #[cfg(feature = "BusinessChat_BCChatButton")] @@ -56,7 +52,6 @@ unsafe impl NSUserInterfaceItemIdentification for BCChatButton {} extern_methods!( #[cfg(feature = "BusinessChat_BCChatButton")] unsafe impl BCChatButton { - #[deprecated] #[method_id(@__retain_semantics Init initWithStyle:)] pub unsafe fn initWithStyle( this: Option>, @@ -64,7 +59,6 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSCoder")] - #[deprecated] #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, @@ -77,6 +71,7 @@ extern_methods!( /// Methods declared on superclass `NSControl` #[cfg(feature = "BusinessChat_BCChatButton")] unsafe impl BCChatButton { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/CallKit/CXAction.rs b/CallKit/CXAction.rs index d7448a131..81e4ce9e8 100644 --- a/CallKit/CXAction.rs +++ b/CallKit/CXAction.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXAction")] + #[cfg(not(any(target_os = "macos")))] pub struct CXAction; #[cfg(feature = "CallKit_CXAction")] diff --git a/CallKit/CXAnswerCallAction.rs b/CallKit/CXAnswerCallAction.rs index 4e2e52ecd..19b2ee933 100644 --- a/CallKit/CXAnswerCallAction.rs +++ b/CallKit/CXAnswerCallAction.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXAnswerCallAction")] + #[cfg(not(any(target_os = "macos")))] pub struct CXAnswerCallAction; #[cfg(feature = "CallKit_CXAnswerCallAction")] diff --git a/CallKit/CXCall.rs b/CallKit/CXCall.rs index 31164c94a..25f7b2dbb 100644 --- a/CallKit/CXCall.rs +++ b/CallKit/CXCall.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXCall")] + #[cfg(not(any(target_os = "macos")))] pub struct CXCall; #[cfg(feature = "CallKit_CXCall")] diff --git a/CallKit/CXCallAction.rs b/CallKit/CXCallAction.rs index 5cc3f09f1..18b7ce59f 100644 --- a/CallKit/CXCallAction.rs +++ b/CallKit/CXCallAction.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXCallAction")] + #[cfg(not(any(target_os = "macos")))] pub struct CXCallAction; #[cfg(feature = "CallKit_CXCallAction")] diff --git a/CallKit/CXCallController.rs b/CallKit/CXCallController.rs index c988f47f3..69a39222a 100644 --- a/CallKit/CXCallController.rs +++ b/CallKit/CXCallController.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXCallController")] + #[cfg(not(any(target_os = "macos")))] pub struct CXCallController; #[cfg(feature = "CallKit_CXCallController")] diff --git a/CallKit/CXCallDirectoryExtensionContext.rs b/CallKit/CXCallDirectoryExtensionContext.rs index e5e38afd0..0e5a0eeda 100644 --- a/CallKit/CXCallDirectoryExtensionContext.rs +++ b/CallKit/CXCallDirectoryExtensionContext.rs @@ -5,6 +5,7 @@ use crate::CallKit::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe trait CXCallDirectoryExtensionContextDelegate: NSObjectProtocol { #[cfg(all( feature = "CallKit_CXCallDirectoryExtensionContext", @@ -24,6 +25,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXCallDirectoryExtensionContext")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct CXCallDirectoryExtensionContext; #[cfg(feature = "CallKit_CXCallDirectoryExtensionContext")] @@ -50,6 +52,7 @@ extern_methods!( delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(isIncremental)] pub unsafe fn isIncremental(&self) -> bool; @@ -59,12 +62,14 @@ extern_methods!( phone_number: CXCallDirectoryPhoneNumber, ); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(removeBlockingEntryWithPhoneNumber:)] pub unsafe fn removeBlockingEntryWithPhoneNumber( &self, phone_number: CXCallDirectoryPhoneNumber, ); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(removeAllBlockingEntries)] pub unsafe fn removeAllBlockingEntries(&self); @@ -76,12 +81,14 @@ extern_methods!( label: &NSString, ); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(removeIdentificationEntryWithPhoneNumber:)] pub unsafe fn removeIdentificationEntryWithPhoneNumber( &self, phone_number: CXCallDirectoryPhoneNumber, ); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(removeAllIdentificationEntries)] pub unsafe fn removeAllIdentificationEntries(&self); diff --git a/CallKit/CXCallDirectoryManager.rs b/CallKit/CXCallDirectoryManager.rs index 57c6e783e..96a174ffd 100644 --- a/CallKit/CXCallDirectoryManager.rs +++ b/CallKit/CXCallDirectoryManager.rs @@ -6,9 +6,13 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum CXCallDirectoryEnabledStatus { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] CXCallDirectoryEnabledStatusUnknown = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] CXCallDirectoryEnabledStatusDisabled = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] CXCallDirectoryEnabledStatusEnabled = 2, } ); @@ -16,6 +20,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXCallDirectoryManager")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct CXCallDirectoryManager; #[cfg(feature = "CallKit_CXCallDirectoryManager")] @@ -50,6 +55,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(openSettingsWithCompletionHandler:)] pub unsafe fn openSettingsWithCompletionHandler( &self, diff --git a/CallKit/CXCallDirectoryProvider.rs b/CallKit/CXCallDirectoryProvider.rs index a3a545d91..9878fd69b 100644 --- a/CallKit/CXCallDirectoryProvider.rs +++ b/CallKit/CXCallDirectoryProvider.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXCallDirectoryProvider")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct CXCallDirectoryProvider; #[cfg(feature = "CallKit_CXCallDirectoryProvider")] diff --git a/CallKit/CXCallObserver.rs b/CallKit/CXCallObserver.rs index 92ae90ed9..07c5ed953 100644 --- a/CallKit/CXCallObserver.rs +++ b/CallKit/CXCallObserver.rs @@ -5,6 +5,7 @@ use crate::CallKit::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "macos")))] pub unsafe trait CXCallObserverDelegate: NSObjectProtocol { #[cfg(all(feature = "CallKit_CXCall", feature = "CallKit_CXCallObserver"))] #[method(callObserver:callChanged:)] @@ -17,6 +18,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXCallObserver")] + #[cfg(not(any(target_os = "macos")))] pub struct CXCallObserver; #[cfg(feature = "CallKit_CXCallObserver")] diff --git a/CallKit/CXCallUpdate.rs b/CallKit/CXCallUpdate.rs index 5af1e1080..61278f094 100644 --- a/CallKit/CXCallUpdate.rs +++ b/CallKit/CXCallUpdate.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXCallUpdate")] + #[cfg(not(any(target_os = "macos")))] pub struct CXCallUpdate; #[cfg(feature = "CallKit_CXCallUpdate")] diff --git a/CallKit/CXEndCallAction.rs b/CallKit/CXEndCallAction.rs index f6728f86f..bbf3b3aeb 100644 --- a/CallKit/CXEndCallAction.rs +++ b/CallKit/CXEndCallAction.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXEndCallAction")] + #[cfg(not(any(target_os = "macos")))] pub struct CXEndCallAction; #[cfg(feature = "CallKit_CXEndCallAction")] diff --git a/CallKit/CXError.rs b/CallKit/CXError.rs index 19205c644..fb91ce89d 100644 --- a/CallKit/CXError.rs +++ b/CallKit/CXError.rs @@ -16,48 +16,76 @@ extern_static!(CXErrorDomainNotificationServiceExtension: &'static NSErrorDomain ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos")))] pub enum CXErrorCode { + #[cfg(not(any(target_os = "macos")))] CXErrorCodeUnknownError = 0, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeUnentitled = 1, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeInvalidArgument = 2, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeMissingVoIPBackgroundMode = 3, } ); ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos")))] pub enum CXErrorCodeIncomingCallError { + #[cfg(not(any(target_os = "macos")))] CXErrorCodeIncomingCallErrorUnknown = 0, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeIncomingCallErrorUnentitled = 1, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeIncomingCallErrorCallUUIDAlreadyExists = 2, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeIncomingCallErrorFilteredByDoNotDisturb = 3, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeIncomingCallErrorFilteredByBlockList = 4, } ); ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos")))] pub enum CXErrorCodeRequestTransactionError { + #[cfg(not(any(target_os = "macos")))] CXErrorCodeRequestTransactionErrorUnknown = 0, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeRequestTransactionErrorUnentitled = 1, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeRequestTransactionErrorUnknownCallProvider = 2, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeRequestTransactionErrorEmptyTransaction = 3, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeRequestTransactionErrorUnknownCallUUID = 4, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeRequestTransactionErrorCallUUIDAlreadyExists = 5, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeRequestTransactionErrorInvalidAction = 6, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeRequestTransactionErrorMaximumCallGroupsReached = 7, } ); ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos")))] pub enum CXErrorCodeCallDirectoryManagerError { + #[cfg(not(any(target_os = "macos")))] CXErrorCodeCallDirectoryManagerErrorUnknown = 0, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeCallDirectoryManagerErrorNoExtensionFound = 1, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeCallDirectoryManagerErrorLoadingInterrupted = 2, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeCallDirectoryManagerErrorEntriesOutOfOrder = 3, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeCallDirectoryManagerErrorDuplicateEntries = 4, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeCallDirectoryManagerErrorMaximumEntriesExceeded = 5, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeCallDirectoryManagerErrorExtensionDisabled = 6, CXErrorCodeCallDirectoryManagerErrorCurrentlyLoading = 7, CXErrorCodeCallDirectoryManagerErrorUnexpectedIncrementalRemoval = 8, @@ -66,9 +94,13 @@ ns_error_enum!( ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos")))] pub enum CXErrorCodeNotificationServiceExtensionError { + #[cfg(not(any(target_os = "macos")))] CXErrorCodeNotificationServiceExtensionErrorUnknown = 0, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeNotificationServiceExtensionErrorInvalidClientProcess = 1, + #[cfg(not(any(target_os = "macos")))] CXErrorCodeNotificationServiceExtensionErrorMissingNotificationFilteringEntitlement = 2, } ); diff --git a/CallKit/CXHandle.rs b/CallKit/CXHandle.rs index f42b4df0d..c15a9973a 100644 --- a/CallKit/CXHandle.rs +++ b/CallKit/CXHandle.rs @@ -6,9 +6,13 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos")))] pub enum CXHandleType { + #[cfg(not(any(target_os = "macos")))] CXHandleTypeGeneric = 1, + #[cfg(not(any(target_os = "macos")))] CXHandleTypePhoneNumber = 2, + #[cfg(not(any(target_os = "macos")))] CXHandleTypeEmailAddress = 3, } ); @@ -16,6 +20,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXHandle")] + #[cfg(not(any(target_os = "macos")))] pub struct CXHandle; #[cfg(feature = "CallKit_CXHandle")] diff --git a/CallKit/CXPlayDTMFCallAction.rs b/CallKit/CXPlayDTMFCallAction.rs index 9234b90bb..1c70cc19a 100644 --- a/CallKit/CXPlayDTMFCallAction.rs +++ b/CallKit/CXPlayDTMFCallAction.rs @@ -6,9 +6,13 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos")))] pub enum CXPlayDTMFCallActionType { + #[cfg(not(any(target_os = "macos")))] CXPlayDTMFCallActionTypeSingleTone = 1, + #[cfg(not(any(target_os = "macos")))] CXPlayDTMFCallActionTypeSoftPause = 2, + #[cfg(not(any(target_os = "macos")))] CXPlayDTMFCallActionTypeHardPause = 3, } ); @@ -16,6 +20,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXPlayDTMFCallAction")] + #[cfg(not(any(target_os = "macos")))] pub struct CXPlayDTMFCallAction; #[cfg(feature = "CallKit_CXPlayDTMFCallAction")] diff --git a/CallKit/CXProvider.rs b/CallKit/CXProvider.rs index ac1d32cf5..2f466f98b 100644 --- a/CallKit/CXProvider.rs +++ b/CallKit/CXProvider.rs @@ -6,16 +6,23 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos")))] pub enum CXCallEndedReason { + #[cfg(not(any(target_os = "macos")))] CXCallEndedReasonFailed = 1, + #[cfg(not(any(target_os = "macos")))] CXCallEndedReasonRemoteEnded = 2, + #[cfg(not(any(target_os = "macos")))] CXCallEndedReasonUnanswered = 3, + #[cfg(not(any(target_os = "macos")))] CXCallEndedReasonAnsweredElsewhere = 4, + #[cfg(not(any(target_os = "macos")))] CXCallEndedReasonDeclinedElsewhere = 5, } ); extern_protocol!( + #[cfg(not(any(target_os = "macos")))] pub unsafe trait CXProviderDelegate: NSObjectProtocol { #[cfg(feature = "CallKit_CXProvider")] #[method(providerDidReset:)] @@ -144,6 +151,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXProvider")] + #[cfg(not(any(target_os = "macos")))] pub struct CXProvider; #[cfg(feature = "CallKit_CXProvider")] @@ -214,6 +222,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(reportNewIncomingVoIPPushPayload:completion:)] pub unsafe fn reportNewIncomingVoIPPushPayload_completion( dictionary_payload: &NSDictionary, diff --git a/CallKit/CXProviderConfiguration.rs b/CallKit/CXProviderConfiguration.rs index 485696352..a140e80ad 100644 --- a/CallKit/CXProviderConfiguration.rs +++ b/CallKit/CXProviderConfiguration.rs @@ -23,6 +23,7 @@ extern_methods!( unsafe impl CXProviderConfiguration { #[cfg(feature = "Foundation_NSString")] #[deprecated = "No longer supported"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other localizedName)] pub unsafe fn localizedName(&self) -> Option>; @@ -79,6 +80,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithLocalizedName:)] pub unsafe fn initWithLocalizedName( this: Option>, diff --git a/CallKit/CXSetGroupCallAction.rs b/CallKit/CXSetGroupCallAction.rs index 1c6026552..2299bb941 100644 --- a/CallKit/CXSetGroupCallAction.rs +++ b/CallKit/CXSetGroupCallAction.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXSetGroupCallAction")] + #[cfg(not(any(target_os = "macos")))] pub struct CXSetGroupCallAction; #[cfg(feature = "CallKit_CXSetGroupCallAction")] diff --git a/CallKit/CXSetHeldCallAction.rs b/CallKit/CXSetHeldCallAction.rs index 1724d1ef0..3034d535c 100644 --- a/CallKit/CXSetHeldCallAction.rs +++ b/CallKit/CXSetHeldCallAction.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXSetHeldCallAction")] + #[cfg(not(any(target_os = "macos")))] pub struct CXSetHeldCallAction; #[cfg(feature = "CallKit_CXSetHeldCallAction")] diff --git a/CallKit/CXSetMutedCallAction.rs b/CallKit/CXSetMutedCallAction.rs index 10f067937..aa8eb5f99 100644 --- a/CallKit/CXSetMutedCallAction.rs +++ b/CallKit/CXSetMutedCallAction.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXSetMutedCallAction")] + #[cfg(not(any(target_os = "macos")))] pub struct CXSetMutedCallAction; #[cfg(feature = "CallKit_CXSetMutedCallAction")] diff --git a/CallKit/CXStartCallAction.rs b/CallKit/CXStartCallAction.rs index d8aeffde9..f13235ab6 100644 --- a/CallKit/CXStartCallAction.rs +++ b/CallKit/CXStartCallAction.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXStartCallAction")] + #[cfg(not(any(target_os = "macos")))] pub struct CXStartCallAction; #[cfg(feature = "CallKit_CXStartCallAction")] diff --git a/CallKit/CXTransaction.rs b/CallKit/CXTransaction.rs index c4c1d7812..b7aa3633c 100644 --- a/CallKit/CXTransaction.rs +++ b/CallKit/CXTransaction.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CallKit_CXTransaction")] + #[cfg(not(any(target_os = "macos")))] pub struct CXTransaction; #[cfg(feature = "CallKit_CXTransaction")] diff --git a/ClassKit/CLSActivity.rs b/ClassKit/CLSActivity.rs index 4a7e3d6c5..06d7944be 100644 --- a/ClassKit/CLSActivity.rs +++ b/ClassKit/CLSActivity.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ClassKit_CLSActivity")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLSActivity; #[cfg(feature = "ClassKit_CLSActivity")] @@ -74,6 +75,7 @@ extern_methods!( #[method(stop)] pub unsafe fn stop(&self); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(removeAllActivityItems)] pub unsafe fn removeAllActivityItems(&self); } diff --git a/ClassKit/CLSActivityItem.rs b/ClassKit/CLSActivityItem.rs index cff864f71..547235000 100644 --- a/ClassKit/CLSActivityItem.rs +++ b/ClassKit/CLSActivityItem.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ClassKit_CLSActivityItem")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLSActivityItem; #[cfg(feature = "ClassKit_CLSActivityItem")] diff --git a/ClassKit/CLSBinaryItem.rs b/ClassKit/CLSBinaryItem.rs index dfa8a4640..07059e48f 100644 --- a/ClassKit/CLSBinaryItem.rs +++ b/ClassKit/CLSBinaryItem.rs @@ -6,10 +6,15 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum CLSBinaryValueType { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSBinaryValueTypeTrueFalse = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSBinaryValueTypePassFail = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSBinaryValueTypeYesNo = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSBinaryValueTypeCorrectIncorrect = 3, } ); @@ -17,6 +22,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ClassKit_CLSBinaryItem")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLSBinaryItem; #[cfg(feature = "ClassKit_CLSBinaryItem")] diff --git a/ClassKit/CLSContext.rs b/ClassKit/CLSContext.rs index e47f2198d..878c24197 100644 --- a/ClassKit/CLSContext.rs +++ b/ClassKit/CLSContext.rs @@ -6,24 +6,43 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum CLSContextType { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeNone = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeApp = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeChapter = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeSection = 3, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeLevel = 4, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypePage = 5, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeTask = 6, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeChallenge = 7, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeQuiz = 8, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeExercise = 9, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeLesson = 10, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeBook = 11, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeGame = 12, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeDocument = 13, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeAudio = 14, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeVideo = 15, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeCourse = 16, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSContextTypeCustom = 17, } ); @@ -51,6 +70,7 @@ extern_static!(CLSContextTopicHealthAndFitness: &'static CLSContextTopic); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ClassKit_CLSContext")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLSContext; #[cfg(feature = "ClassKit_CLSContext")] @@ -79,6 +99,7 @@ extern_methods!( pub unsafe fn init(this: Option>) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other identifierPath)] pub unsafe fn identifierPath(&self) -> Id>; @@ -87,10 +108,12 @@ extern_methods!( pub unsafe fn identifier(&self) -> Id; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other universalLinkURL)] pub unsafe fn universalLinkURL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setUniversalLinkURL:)] pub unsafe fn setUniversalLinkURL(&self, universal_link_url: Option<&NSURL>); @@ -98,10 +121,12 @@ extern_methods!( pub unsafe fn r#type(&self) -> CLSContextType; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other customTypeName)] pub unsafe fn customTypeName(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setCustomTypeName:)] pub unsafe fn setCustomTypeName(&self, custom_type_name: Option<&NSString>); @@ -125,21 +150,27 @@ extern_methods!( #[method(setTopic:)] pub unsafe fn setTopic(&self, topic: Option<&CLSContextTopic>); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isAssignable)] pub unsafe fn isAssignable(&self) -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setAssignable:)] pub unsafe fn setAssignable(&self, assignable: bool); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(suggestedAge)] pub unsafe fn suggestedAge(&self) -> NSRange; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setSuggestedAge:)] pub unsafe fn setSuggestedAge(&self, suggested_age: NSRange); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(suggestedCompletionTime)] pub unsafe fn suggestedCompletionTime(&self) -> NSRange; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setSuggestedCompletionTime:)] pub unsafe fn setSuggestedCompletionTime(&self, suggested_completion_time: NSRange); @@ -147,16 +178,19 @@ extern_methods!( feature = "ClassKit_CLSProgressReportingCapability", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other progressReportingCapabilities)] pub unsafe fn progressReportingCapabilities( &self, ) -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other summary)] pub unsafe fn summary(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setSummary:)] pub unsafe fn setSummary(&self, summary: Option<&NSString>); @@ -178,6 +212,7 @@ extern_methods!( #[method(resignActive)] pub unsafe fn resignActive(&self); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setType:)] pub unsafe fn setType(&self, r#type: CLSContextType); @@ -185,12 +220,14 @@ extern_methods!( feature = "ClassKit_CLSProgressReportingCapability", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(addProgressReportingCapabilities:)] pub unsafe fn addProgressReportingCapabilities( &self, capabilities: &NSSet, ); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(resetProgressReportingCapabilities)] pub unsafe fn resetProgressReportingCapabilities(&self); } @@ -222,12 +259,15 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other navigationChildContexts)] pub unsafe fn navigationChildContexts(&self) -> Id>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(addNavigationChildContext:)] pub unsafe fn addNavigationChildContext(&self, child: &CLSContext); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(removeNavigationChildContext:)] pub unsafe fn removeNavigationChildContext(&self, child: &CLSContext); } diff --git a/ClassKit/CLSContextProvider.rs b/ClassKit/CLSContextProvider.rs index 4e9c6b03e..6df149e64 100644 --- a/ClassKit/CLSContextProvider.rs +++ b/ClassKit/CLSContextProvider.rs @@ -5,6 +5,7 @@ use crate::ClassKit::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait CLSContextProvider { #[cfg(all(feature = "ClassKit_CLSContext", feature = "Foundation_NSError"))] #[method(updateDescendantsOfContext:completion:)] diff --git a/ClassKit/CLSDataStore.rs b/ClassKit/CLSDataStore.rs index 1f72d0f6b..b86714ff0 100644 --- a/ClassKit/CLSDataStore.rs +++ b/ClassKit/CLSDataStore.rs @@ -5,6 +5,7 @@ use crate::ClassKit::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait CLSDataStoreDelegate: NSObjectProtocol { #[cfg(all( feature = "ClassKit_CLSContext", @@ -26,6 +27,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ClassKit_CLSDataStore")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLSDataStore; #[cfg(feature = "ClassKit_CLSDataStore")] @@ -75,6 +77,7 @@ extern_methods!( pub unsafe fn saveWithCompletion(&self, completion: Option<&Block<(*mut NSError,), ()>>); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(completeAllAssignedActivitiesMatching:)] pub unsafe fn completeAllAssignedActivitiesMatching( &self, @@ -122,6 +125,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(fetchActivityForURL:completion:)] pub unsafe fn fetchActivityForURL_completion( &self, diff --git a/ClassKit/CLSDefines.rs b/ClassKit/CLSDefines.rs index dbcd5664b..45913b1d0 100644 --- a/ClassKit/CLSDefines.rs +++ b/ClassKit/CLSDefines.rs @@ -8,17 +8,29 @@ extern_static!(CLSErrorCodeDomain: Option<&'static NSString>); ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum CLSErrorCode { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSErrorCodeNone = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSErrorCodeClassKitUnavailable = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSErrorCodeInvalidArgument = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSErrorCodeInvalidModification = 3, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSErrorCodeAuthorizationDenied = 4, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSErrorCodeDatabaseInaccessible = 5, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSErrorCodeLimits = 6, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSErrorCodeInvalidCreate = 7, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSErrorCodeInvalidUpdate = 8, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSErrorCodePartialFailure = 9, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSErrorCodeInvalidAccountCredentials = 10, } ); diff --git a/ClassKit/CLSObject.rs b/ClassKit/CLSObject.rs index 37de2d113..3313cf791 100644 --- a/ClassKit/CLSObject.rs +++ b/ClassKit/CLSObject.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ClassKit_CLSObject")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLSObject; #[cfg(feature = "ClassKit_CLSObject")] diff --git a/ClassKit/CLSProgressReportingCapability.rs b/ClassKit/CLSProgressReportingCapability.rs index 11010d4b4..be8e6b19f 100644 --- a/ClassKit/CLSProgressReportingCapability.rs +++ b/ClassKit/CLSProgressReportingCapability.rs @@ -6,11 +6,17 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum CLSProgressReportingCapabilityKind { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSProgressReportingCapabilityKindDuration = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSProgressReportingCapabilityKindPercent = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSProgressReportingCapabilityKindBinary = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSProgressReportingCapabilityKindQuantity = 3, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLSProgressReportingCapabilityKindScore = 4, } ); @@ -18,6 +24,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ClassKit_CLSProgressReportingCapability")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLSProgressReportingCapability; #[cfg(feature = "ClassKit_CLSProgressReportingCapability")] diff --git a/ClassKit/CLSQuantityItem.rs b/ClassKit/CLSQuantityItem.rs index deca872bb..d012a96df 100644 --- a/ClassKit/CLSQuantityItem.rs +++ b/ClassKit/CLSQuantityItem.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ClassKit_CLSQuantityItem")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLSQuantityItem; #[cfg(feature = "ClassKit_CLSQuantityItem")] diff --git a/ClassKit/CLSScoreItem.rs b/ClassKit/CLSScoreItem.rs index 90c2b317a..48b44d015 100644 --- a/ClassKit/CLSScoreItem.rs +++ b/ClassKit/CLSScoreItem.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ClassKit_CLSScoreItem")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLSScoreItem; #[cfg(feature = "ClassKit_CLSScoreItem")] diff --git a/ClassKit/NSUserActivity_CLSDeepLinks.rs b/ClassKit/NSUserActivity_CLSDeepLinks.rs index 0a68b8e0e..22b822b3b 100644 --- a/ClassKit/NSUserActivity_CLSDeepLinks.rs +++ b/ClassKit/NSUserActivity_CLSDeepLinks.rs @@ -8,10 +8,12 @@ extern_methods!( /// CLSDeepLinks #[cfg(feature = "Foundation_NSUserActivity")] unsafe impl NSUserActivity { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isClassKitDeepLink)] pub unsafe fn isClassKitDeepLink(&self) -> bool; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other contextIdentifierPath)] pub unsafe fn contextIdentifierPath(&self) -> Option>>; } diff --git a/CloudKit/CKAllowedSharingOptions.rs b/CloudKit/CKAllowedSharingOptions.rs index 20a6ee304..f598d9d15 100644 --- a/CloudKit/CKAllowedSharingOptions.rs +++ b/CloudKit/CKAllowedSharingOptions.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum CKSharingParticipantAccessOption { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CKSharingParticipantAccessOptionAnyoneWithLink = 1 << 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CKSharingParticipantAccessOptionSpecifiedRecipientsOnly = 1 << 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CKSharingParticipantAccessOptionAny = CKSharingParticipantAccessOptionAnyoneWithLink | CKSharingParticipantAccessOptionSpecifiedRecipientsOnly, } @@ -17,9 +21,13 @@ ns_options!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum CKSharingParticipantPermissionOption { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CKSharingParticipantPermissionOptionReadOnly = 1 << 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CKSharingParticipantPermissionOptionReadWrite = 1 << 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CKSharingParticipantPermissionOptionAny = CKSharingParticipantPermissionOptionReadOnly | CKSharingParticipantPermissionOptionReadWrite, } @@ -28,6 +36,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CloudKit_CKAllowedSharingOptions")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CKAllowedSharingOptions; #[cfg(feature = "CloudKit_CKAllowedSharingOptions")] diff --git a/CloudKit/CKSystemSharingUIObserver.rs b/CloudKit/CKSystemSharingUIObserver.rs index 1e4a22541..703f2da15 100644 --- a/CloudKit/CKSystemSharingUIObserver.rs +++ b/CloudKit/CKSystemSharingUIObserver.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CloudKit_CKSystemSharingUIObserver")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CKSystemSharingUIObserver; #[cfg(feature = "CloudKit_CKSystemSharingUIObserver")] diff --git a/CloudKit/NSItemProvider_CKSharingSupport.rs b/CloudKit/NSItemProvider_CKSharingSupport.rs index 5abc7cdfd..8f15dff04 100644 --- a/CloudKit/NSItemProvider_CKSharingSupport.rs +++ b/CloudKit/NSItemProvider_CKSharingSupport.rs @@ -17,6 +17,7 @@ extern_methods!( feature = "CloudKit_CKAllowedSharingOptions", feature = "CloudKit_CKContainer" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(registerCKShareWithContainer:allowedSharingOptions:preparationHandler:)] pub unsafe fn registerCKShareWithContainer_allowedSharingOptions_preparationHandler( &self, @@ -30,6 +31,7 @@ extern_methods!( feature = "CloudKit_CKContainer", feature = "CloudKit_CKShare" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(registerCKShare:container:allowedSharingOptions:)] pub unsafe fn registerCKShare_container_allowedSharingOptions( &self, diff --git a/Contacts/CNContactStore.rs b/Contacts/CNContactStore.rs index 5a4870adc..15999b3ad 100644 --- a/Contacts/CNContactStore.rs +++ b/Contacts/CNContactStore.rs @@ -82,6 +82,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other unifiedMeContactWithKeysToFetch:error:_)] pub unsafe fn unifiedMeContactWithKeysToFetch_error( &self, @@ -152,6 +153,7 @@ extern_methods!( ) -> Result>, Id>; #[cfg(all(feature = "Contacts_CNSaveRequest", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(executeSaveRequest:error:_)] pub unsafe fn executeSaveRequest_error( &self, diff --git a/Contacts/CNSaveRequest.rs b/Contacts/CNSaveRequest.rs index 5fb2b3955..6e6ea8f35 100644 --- a/Contacts/CNSaveRequest.rs +++ b/Contacts/CNSaveRequest.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Contacts_CNSaveRequest")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CNSaveRequest; #[cfg(feature = "Contacts_CNSaveRequest")] @@ -54,10 +55,12 @@ extern_methods!( pub unsafe fn deleteGroup(&self, group: &CNMutableGroup); #[cfg(feature = "Contacts_CNGroup")] + #[cfg(not(any(target_os = "ios")))] #[method(addSubgroup:toGroup:)] pub unsafe fn addSubgroup_toGroup(&self, subgroup: &CNGroup, group: &CNGroup); #[cfg(feature = "Contacts_CNGroup")] + #[cfg(not(any(target_os = "ios")))] #[method(removeSubgroup:fromGroup:)] pub unsafe fn removeSubgroup_fromGroup(&self, subgroup: &CNGroup, group: &CNGroup); diff --git a/CoreData/NSCoreDataCoreSpotlightDelegate.rs b/CoreData/NSCoreDataCoreSpotlightDelegate.rs index c8b27ac40..443516dd0 100644 --- a/CoreData/NSCoreDataCoreSpotlightDelegate.rs +++ b/CoreData/NSCoreDataCoreSpotlightDelegate.rs @@ -11,6 +11,7 @@ extern_static!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CoreData_NSCoreDataCoreSpotlightDelegate")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSCoreDataCoreSpotlightDelegate; #[cfg(feature = "CoreData_NSCoreDataCoreSpotlightDelegate")] @@ -25,6 +26,7 @@ unsafe impl NSObjectProtocol for NSCoreDataCoreSpotlightDelegate {} extern_methods!( #[cfg(feature = "CoreData_NSCoreDataCoreSpotlightDelegate")] unsafe impl NSCoreDataCoreSpotlightDelegate { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isIndexingEnabled)] pub unsafe fn isIndexingEnabled(&self) -> bool; @@ -43,6 +45,7 @@ extern_methods!( feature = "CoreData_NSPersistentStoreCoordinator", feature = "CoreData_NSPersistentStoreDescription" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initForStoreWithDescription:coordinator:)] pub unsafe fn initForStoreWithDescription_coordinator( this: Option>, @@ -62,13 +65,16 @@ extern_methods!( model: &NSManagedObjectModel, ) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(startSpotlightIndexing)] pub unsafe fn startSpotlightIndexing(&self); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(stopSpotlightIndexing)] pub unsafe fn stopSpotlightIndexing(&self); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(deleteSpotlightIndexWithCompletionHandler:)] pub unsafe fn deleteSpotlightIndexWithCompletionHandler( &self, diff --git a/CoreData/NSPersistentStore.rs b/CoreData/NSPersistentStore.rs index 7b2a53399..0a4762a72 100644 --- a/CoreData/NSPersistentStore.rs +++ b/CoreData/NSPersistentStore.rs @@ -131,6 +131,7 @@ extern_methods!( ); #[cfg(feature = "CoreData_NSCoreDataCoreSpotlightDelegate")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other coreSpotlightExporter)] pub unsafe fn coreSpotlightExporter(&self) -> Id; } diff --git a/CoreData/NSPersistentStoreCoordinator.rs b/CoreData/NSPersistentStoreCoordinator.rs index 84df725f3..f51e547b4 100644 --- a/CoreData/NSPersistentStoreCoordinator.rs +++ b/CoreData/NSPersistentStoreCoordinator.rs @@ -273,6 +273,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSURL"))] #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other elementsDerivedFromExternalRecordURL:)] pub unsafe fn elementsDerivedFromExternalRecordURL(file_url: &NSURL) -> Id; @@ -284,6 +285,7 @@ extern_methods!( feature = "Foundation_NSURL" ))] #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other importStoreWithIdentifier:fromExternalRecordsDirectory:toURL:options:withType:error:_)] pub unsafe fn importStoreWithIdentifier_fromExternalRecordsDirectory_toURL_options_withType_error( &self, diff --git a/CoreLocation/CLBeaconIdentityConstraint.rs b/CoreLocation/CLBeaconIdentityConstraint.rs index f6dc9498b..9c52db8a9 100644 --- a/CoreLocation/CLBeaconIdentityConstraint.rs +++ b/CoreLocation/CLBeaconIdentityConstraint.rs @@ -12,6 +12,7 @@ pub type CLBeaconMinorValue = u16; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CoreLocation_CLBeaconIdentityConstraint")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLBeaconIdentityConstraint; #[cfg(feature = "CoreLocation_CLBeaconIdentityConstraint")] diff --git a/CoreLocation/CLBeaconRegion.rs b/CoreLocation/CLBeaconRegion.rs index 872019d45..872feb724 100644 --- a/CoreLocation/CLBeaconRegion.rs +++ b/CoreLocation/CLBeaconRegion.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CoreLocation_CLBeaconRegion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLBeaconRegion; #[cfg(feature = "CoreLocation_CLBeaconRegion")] @@ -30,6 +31,7 @@ extern_methods!( #[cfg(feature = "CoreLocation_CLBeaconRegion")] unsafe impl CLBeaconRegion { #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSUUID"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithUUID:identifier:)] pub unsafe fn initWithUUID_identifier( this: Option>, @@ -47,6 +49,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSUUID"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithUUID:major:identifier:)] pub unsafe fn initWithUUID_major_identifier( this: Option>, @@ -66,6 +69,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSUUID"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithUUID:major:minor:identifier:)] pub unsafe fn initWithUUID_major_minor_identifier( this: Option>, @@ -90,6 +94,7 @@ extern_methods!( feature = "CoreLocation_CLBeaconIdentityConstraint", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithBeaconIdentityConstraint:identifier:)] pub unsafe fn initWithBeaconIdentityConstraint_identifier( this: Option>, @@ -109,10 +114,12 @@ extern_methods!( ) -> Id, Owned>; #[cfg(feature = "CoreLocation_CLBeaconIdentityConstraint")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other beaconIdentityConstraint)] pub unsafe fn beaconIdentityConstraint(&self) -> Id; #[cfg(feature = "Foundation_NSUUID")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other UUID)] pub unsafe fn UUID(&self) -> Id; @@ -140,6 +147,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CoreLocation_CLBeacon")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLBeacon; #[cfg(feature = "CoreLocation_CLBeacon")] @@ -161,10 +169,12 @@ extern_methods!( #[cfg(feature = "CoreLocation_CLBeacon")] unsafe impl CLBeacon { #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other timestamp)] pub unsafe fn timestamp(&self) -> Id; #[cfg(feature = "Foundation_NSUUID")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other UUID)] pub unsafe fn UUID(&self) -> Id; diff --git a/CoreLocation/CLLocationManager.rs b/CoreLocation/CLLocationManager.rs index d176932f3..7622fbabc 100644 --- a/CoreLocation/CLLocationManager.rs +++ b/CoreLocation/CLLocationManager.rs @@ -25,8 +25,10 @@ ns_enum!( kCLAuthorizationStatusRestricted = 1, kCLAuthorizationStatusDenied = 2, kCLAuthorizationStatusAuthorizedAlways = 3, + #[cfg(not(any(target_os = "macos")))] kCLAuthorizationStatusAuthorizedWhenInUse = 4, #[deprecated = "Use kCLAuthorizationStatusAuthorizedAlways"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] kCLAuthorizationStatusAuthorized = kCLAuthorizationStatusAuthorizedAlways, } ); @@ -73,20 +75,25 @@ extern_methods!( #[method(headingAvailable)] pub unsafe fn headingAvailable_class() -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(significantLocationChangeMonitoringAvailable)] pub unsafe fn significantLocationChangeMonitoringAvailable() -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isMonitoringAvailableForClass:)] pub unsafe fn isMonitoringAvailableForClass(region_class: &Class) -> bool; #[deprecated] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(regionMonitoringAvailable)] pub unsafe fn regionMonitoringAvailable() -> bool; #[deprecated = "Use +isMonitoringAvailableForClass: and -authorizationStatus instead"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(regionMonitoringEnabled)] pub unsafe fn regionMonitoringEnabled() -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isRangingAvailable)] pub unsafe fn isRangingAvailable() -> bool; @@ -100,6 +107,7 @@ extern_methods!( #[method(accuracyAuthorization)] pub unsafe fn accuracyAuthorization(&self) -> CLAccuracyAuthorization; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isAuthorizedForWidgetUpdates)] pub unsafe fn isAuthorizedForWidgetUpdates(&self) -> bool; @@ -113,16 +121,19 @@ extern_methods!( ); #[deprecated] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(locationServicesEnabled)] pub unsafe fn locationServicesEnabled(&self) -> bool; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Set the purpose string in Info.plist using key NSLocationUsageDescription"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other purpose)] pub unsafe fn purpose(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Set the purpose string in Info.plist using key NSLocationUsageDescription"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setPurpose:)] pub unsafe fn setPurpose(&self, purpose: Option<&NSString>); @@ -144,9 +155,11 @@ extern_methods!( #[method(setDesiredAccuracy:)] pub unsafe fn setDesiredAccuracy(&self, desired_accuracy: CLLocationAccuracy); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(pausesLocationUpdatesAutomatically)] pub unsafe fn pausesLocationUpdatesAutomatically(&self) -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setPausesLocationUpdatesAutomatically:)] pub unsafe fn setPausesLocationUpdatesAutomatically( &self, @@ -162,9 +175,11 @@ extern_methods!( allows_background_location_updates: bool, ); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(showsBackgroundLocationIndicator)] pub unsafe fn showsBackgroundLocationIndicator(&self) -> bool; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(setShowsBackgroundLocationIndicator:)] pub unsafe fn setShowsBackgroundLocationIndicator( &self, @@ -176,6 +191,7 @@ extern_methods!( pub unsafe fn location(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(headingAvailable)] pub unsafe fn headingAvailable(&self) -> bool; @@ -195,15 +211,18 @@ extern_methods!( #[method_id(@__retain_semantics Other heading)] pub unsafe fn heading(&self) -> Option>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(maximumRegionMonitoringDistance)] pub unsafe fn maximumRegionMonitoringDistance(&self) -> CLLocationDistance; #[cfg(all(feature = "CoreLocation_CLRegion", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other monitoredRegions)] pub unsafe fn monitoredRegions(&self) -> Id>; #[cfg(all(feature = "CoreLocation_CLRegion", feature = "Foundation_NSSet"))] #[deprecated = "Use -rangedBeaconConstraints"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other rangedRegions)] pub unsafe fn rangedRegions(&self) -> Id>; @@ -211,6 +230,7 @@ extern_methods!( feature = "CoreLocation_CLBeaconIdentityConstraint", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other rangedBeaconConstraints)] pub unsafe fn rangedBeaconConstraints(&self) -> Id>; @@ -247,30 +267,36 @@ extern_methods!( #[method(startUpdatingHeading)] pub unsafe fn startUpdatingHeading(&self); + #[cfg(not(any(target_os = "macos")))] #[method(stopUpdatingHeading)] pub unsafe fn stopUpdatingHeading(&self); #[method(dismissHeadingCalibrationDisplay)] pub unsafe fn dismissHeadingCalibrationDisplay(&self); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(startMonitoringSignificantLocationChanges)] pub unsafe fn startMonitoringSignificantLocationChanges(&self); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(stopMonitoringSignificantLocationChanges)] pub unsafe fn stopMonitoringSignificantLocationChanges(&self); #[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(startMonitoringLocationPushesWithCompletion:)] pub unsafe fn startMonitoringLocationPushesWithCompletion( &self, completion: Option<&Block<(*mut NSData, *mut NSError), ()>>, ); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(stopMonitoringLocationPushes)] pub unsafe fn stopMonitoringLocationPushes(&self); #[cfg(feature = "CoreLocation_CLRegion")] #[deprecated] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(startMonitoringForRegion:desiredAccuracy:)] pub unsafe fn startMonitoringForRegion_desiredAccuracy( &self, @@ -279,28 +305,34 @@ extern_methods!( ); #[cfg(feature = "CoreLocation_CLRegion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(stopMonitoringForRegion:)] pub unsafe fn stopMonitoringForRegion(&self, region: &CLRegion); #[cfg(feature = "CoreLocation_CLRegion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(startMonitoringForRegion:)] pub unsafe fn startMonitoringForRegion(&self, region: &CLRegion); #[cfg(feature = "CoreLocation_CLRegion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(requestStateForRegion:)] pub unsafe fn requestStateForRegion(&self, region: &CLRegion); #[cfg(feature = "CoreLocation_CLBeaconRegion")] #[deprecated = "Use -startRangingBeaconsSatisfyingConstraint:"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(startRangingBeaconsInRegion:)] pub unsafe fn startRangingBeaconsInRegion(&self, region: &CLBeaconRegion); #[cfg(feature = "CoreLocation_CLBeaconRegion")] #[deprecated = "Use -stopRangingBeaconsSatisfyingConstraint:"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(stopRangingBeaconsInRegion:)] pub unsafe fn stopRangingBeaconsInRegion(&self, region: &CLBeaconRegion); #[cfg(feature = "CoreLocation_CLBeaconIdentityConstraint")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(startRangingBeaconsSatisfyingConstraint:)] pub unsafe fn startRangingBeaconsSatisfyingConstraint( &self, @@ -308,6 +340,7 @@ extern_methods!( ); #[cfg(feature = "CoreLocation_CLBeaconIdentityConstraint")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(stopRangingBeaconsSatisfyingConstraint:)] pub unsafe fn stopRangingBeaconsSatisfyingConstraint( &self, @@ -315,6 +348,7 @@ extern_methods!( ); #[deprecated = "You can remove calls to this method"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(allowDeferredLocationUpdatesUntilTraveled:timeout:)] pub unsafe fn allowDeferredLocationUpdatesUntilTraveled_timeout( &self, @@ -323,10 +357,12 @@ extern_methods!( ); #[deprecated = "You can remove calls to this method"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(disallowDeferredLocationUpdates)] pub unsafe fn disallowDeferredLocationUpdates(&self); #[deprecated = "You can remove calls to this method"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(deferredLocationUpdatesAvailable)] pub unsafe fn deferredLocationUpdatesAvailable() -> bool; @@ -336,6 +372,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios", target_os = "macos")))] #[method(requestHistoricalLocationsWithPurposeKey:sampleCount:completionHandler:)] pub unsafe fn requestHistoricalLocationsWithPurposeKey_sampleCount_completionHandler( &self, diff --git a/CoreLocation/CLLocationManagerDelegate.rs b/CoreLocation/CLLocationManagerDelegate.rs index 87fe65b73..ffb95a134 100644 --- a/CoreLocation/CLLocationManagerDelegate.rs +++ b/CoreLocation/CLLocationManagerDelegate.rs @@ -12,6 +12,7 @@ extern_protocol!( feature = "CoreLocation_CLLocationManager" ))] #[deprecated = "Implement -locationManager:didUpdateLocations: instead"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManager:didUpdateToLocation:fromLocation:)] unsafe fn locationManager_didUpdateToLocation_fromLocation( @@ -58,6 +59,7 @@ extern_protocol!( feature = "CoreLocation_CLLocationManager", feature = "CoreLocation_CLRegion" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManager:didDetermineState:forRegion:)] unsafe fn locationManager_didDetermineState_forRegion( @@ -74,6 +76,7 @@ extern_protocol!( feature = "Foundation_NSArray" ))] #[deprecated] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManager:didRangeBeacons:inRegion:)] unsafe fn locationManager_didRangeBeacons_inRegion( @@ -89,6 +92,7 @@ extern_protocol!( feature = "Foundation_NSError" ))] #[deprecated] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManager:rangingBeaconsDidFailForRegion:withError:)] unsafe fn locationManager_rangingBeaconsDidFailForRegion_withError( @@ -104,6 +108,7 @@ extern_protocol!( feature = "CoreLocation_CLLocationManager", feature = "Foundation_NSArray" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManager:didRangeBeacons:satisfyingConstraint:)] unsafe fn locationManager_didRangeBeacons_satisfyingConstraint( @@ -118,6 +123,7 @@ extern_protocol!( feature = "CoreLocation_CLLocationManager", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManager:didFailRangingBeaconsForConstraint:error:)] unsafe fn locationManager_didFailRangingBeaconsForConstraint_error( @@ -131,6 +137,7 @@ extern_protocol!( feature = "CoreLocation_CLLocationManager", feature = "CoreLocation_CLRegion" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManager:didEnterRegion:)] unsafe fn locationManager_didEnterRegion( @@ -143,6 +150,7 @@ extern_protocol!( feature = "CoreLocation_CLLocationManager", feature = "CoreLocation_CLRegion" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManager:didExitRegion:)] unsafe fn locationManager_didExitRegion( @@ -168,6 +176,7 @@ extern_protocol!( feature = "CoreLocation_CLRegion", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManager:monitoringDidFailForRegion:withError:)] unsafe fn locationManager_monitoringDidFailForRegion_withError( @@ -196,6 +205,7 @@ extern_protocol!( feature = "CoreLocation_CLLocationManager", feature = "CoreLocation_CLRegion" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManager:didStartMonitoringForRegion:)] unsafe fn locationManager_didStartMonitoringForRegion( @@ -205,11 +215,13 @@ extern_protocol!( ); #[cfg(feature = "CoreLocation_CLLocationManager")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManagerDidPauseLocationUpdates:)] unsafe fn locationManagerDidPauseLocationUpdates(&self, manager: &CLLocationManager); #[cfg(feature = "CoreLocation_CLLocationManager")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManagerDidResumeLocationUpdates:)] unsafe fn locationManagerDidResumeLocationUpdates(&self, manager: &CLLocationManager); @@ -218,6 +230,7 @@ extern_protocol!( feature = "CoreLocation_CLLocationManager", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManager:didFinishDeferredUpdatesWithError:)] unsafe fn locationManager_didFinishDeferredUpdatesWithError( @@ -230,6 +243,7 @@ extern_protocol!( feature = "CoreLocation_CLLocationManager", feature = "CoreLocation_CLVisit" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(locationManager:didVisit:)] unsafe fn locationManager_didVisit(&self, manager: &CLLocationManager, visit: &CLVisit); diff --git a/CoreLocation/CLLocationManager_CLVisitExtensions.rs b/CoreLocation/CLLocationManager_CLVisitExtensions.rs index e088fd468..70537e42f 100644 --- a/CoreLocation/CLLocationManager_CLVisitExtensions.rs +++ b/CoreLocation/CLLocationManager_CLVisitExtensions.rs @@ -9,9 +9,11 @@ extern_methods!( /// CLVisitExtensions #[cfg(feature = "CoreLocation_CLLocationManager")] unsafe impl CLLocationManager { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(startMonitoringVisits)] pub unsafe fn startMonitoringVisits(&self); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(stopMonitoringVisits)] pub unsafe fn stopMonitoringVisits(&self); } diff --git a/CoreLocation/CLLocationPushServiceError.rs b/CoreLocation/CLLocationPushServiceError.rs index 883892598..4288b2169 100644 --- a/CoreLocation/CLLocationPushServiceError.rs +++ b/CoreLocation/CLLocationPushServiceError.rs @@ -9,10 +9,15 @@ extern_static!(CLLocationPushServiceErrorDomain: Option<&'static NSErrorDomain>) ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum CLLocationPushServiceError { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] CLLocationPushServiceErrorUnknown = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] CLLocationPushServiceErrorMissingPushExtension = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] CLLocationPushServiceErrorMissingPushServerEnvironment = 2, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] CLLocationPushServiceErrorMissingEntitlement = 3, } ); diff --git a/CoreLocation/CLLocationPushServiceExtension.rs b/CoreLocation/CLLocationPushServiceExtension.rs index ebed00760..fe5007bc6 100644 --- a/CoreLocation/CLLocationPushServiceExtension.rs +++ b/CoreLocation/CLLocationPushServiceExtension.rs @@ -6,6 +6,7 @@ use crate::CoreLocation::*; use crate::Foundation::*; extern_protocol!( + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe trait CLLocationPushServiceExtension: NSObjectProtocol { #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] #[method(didReceiveLocationPushPayload:completion:)] diff --git a/CoreLocation/CLPlacemark.rs b/CoreLocation/CLPlacemark.rs index 992cd55f5..611c7eb7e 100644 --- a/CoreLocation/CLPlacemark.rs +++ b/CoreLocation/CLPlacemark.rs @@ -28,9 +28,21 @@ unsafe impl NSSecureCoding for CLPlacemark {} extern_methods!( #[cfg(feature = "CoreLocation_CLPlacemark")] unsafe impl CLPlacemark { + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; diff --git a/CoreLocation/CLRegion.rs b/CoreLocation/CLRegion.rs index 269f312ec..2d9e40f24 100644 --- a/CoreLocation/CLRegion.rs +++ b/CoreLocation/CLRegion.rs @@ -7,19 +7,28 @@ use crate::Foundation::*; ns_closed_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum CLRegionState { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLRegionStateUnknown = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLRegionStateInside = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLRegionStateOutside = 2, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum CLProximity { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLProximityUnknown = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLProximityImmediate = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLProximityNear = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] CLProximityFar = 3, } ); diff --git a/CoreLocation/CLVisit.rs b/CoreLocation/CLVisit.rs index 00edba5ab..c04f4b451 100644 --- a/CoreLocation/CLVisit.rs +++ b/CoreLocation/CLVisit.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CoreLocation_CLVisit")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct CLVisit; #[cfg(feature = "CoreLocation_CLVisit")] diff --git a/EventKit/EKCalendar.rs b/EventKit/EKCalendar.rs index 56ad9fad9..d7db384dd 100644 --- a/EventKit/EKCalendar.rs +++ b/EventKit/EKCalendar.rs @@ -26,6 +26,7 @@ extern_methods!( #[cfg(feature = "EventKit_EKCalendar")] unsafe impl EKCalendar { #[cfg(feature = "EventKit_EKEventStore")] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other calendarWithEventStore:)] pub unsafe fn calendarWithEventStore(event_store: &EKEventStore) -> Id; diff --git a/EventKit/EKCalendarItem.rs b/EventKit/EKCalendarItem.rs index 812a933ce..26f327d8a 100644 --- a/EventKit/EKCalendarItem.rs +++ b/EventKit/EKCalendarItem.rs @@ -26,6 +26,7 @@ extern_methods!( #[cfg(feature = "EventKit_EKCalendarItem")] unsafe impl EKCalendarItem { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other UUID)] pub unsafe fn UUID(&self) -> Id; diff --git a/EventKit/EKEvent.rs b/EventKit/EKEvent.rs index 8983c6040..ea5f44057 100644 --- a/EventKit/EKEvent.rs +++ b/EventKit/EKEvent.rs @@ -117,6 +117,7 @@ extern_methods!( #[method_id(@__retain_semantics Other birthdayContactIdentifier)] pub unsafe fn birthdayContactIdentifier(&self) -> Option>; + #[cfg(not(any(target_os = "macos")))] #[method(birthdayPersonID)] pub unsafe fn birthdayPersonID(&self) -> NSInteger; diff --git a/EventKit/EKEventStore.rs b/EventKit/EKEventStore.rs index fc268344c..d93d4baba 100644 --- a/EventKit/EKEventStore.rs +++ b/EventKit/EKEventStore.rs @@ -82,6 +82,7 @@ extern_methods!( pub unsafe fn sourceWithIdentifier(&self, identifier: &NSString) -> Option>; #[cfg(all(feature = "EventKit_EKCalendar", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other calendars)] pub unsafe fn calendars(&self) -> Id>; @@ -108,6 +109,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "EventKit_EKCalendar", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(saveCalendar:commit:error:_)] pub unsafe fn saveCalendar_commit_error( &self, @@ -116,6 +118,7 @@ extern_methods!( ) -> Result<(), Id>; #[cfg(all(feature = "EventKit_EKCalendar", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(removeCalendar:commit:error:_)] pub unsafe fn removeCalendar_commit_error( &self, @@ -142,6 +145,7 @@ extern_methods!( ) -> Id>; #[cfg(all(feature = "EventKit_EKEvent", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(saveEvent:span:error:_)] pub unsafe fn saveEvent_span_error( &self, @@ -150,6 +154,7 @@ extern_methods!( ) -> Result<(), Id>; #[cfg(all(feature = "EventKit_EKEvent", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(removeEvent:span:error:_)] pub unsafe fn removeEvent_span_error( &self, @@ -158,6 +163,7 @@ extern_methods!( ) -> Result<(), Id>; #[cfg(all(feature = "EventKit_EKEvent", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(saveEvent:span:commit:error:_)] pub unsafe fn saveEvent_span_commit_error( &self, @@ -167,6 +173,7 @@ extern_methods!( ) -> Result<(), Id>; #[cfg(all(feature = "EventKit_EKEvent", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(removeEvent:span:commit:error:_)] pub unsafe fn removeEvent_span_commit_error( &self, @@ -213,6 +220,7 @@ extern_methods!( ) -> Id; #[cfg(all(feature = "EventKit_EKReminder", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(saveReminder:commit:error:_)] pub unsafe fn saveReminder_commit_error( &self, @@ -221,6 +229,7 @@ extern_methods!( ) -> Result<(), Id>; #[cfg(all(feature = "EventKit_EKReminder", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(removeReminder:commit:error:_)] pub unsafe fn removeReminder_commit_error( &self, @@ -283,12 +292,14 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(commit:_)] pub unsafe fn commit(&self) -> Result<(), Id>; #[method(reset)] pub unsafe fn reset(&self); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(refreshSourcesIfNecessary)] pub unsafe fn refreshSourcesIfNecessary(&self); } diff --git a/EventKit/EKSource.rs b/EventKit/EKSource.rs index 8bdacd3df..59a928000 100644 --- a/EventKit/EKSource.rs +++ b/EventKit/EKSource.rs @@ -37,6 +37,7 @@ extern_methods!( pub unsafe fn title(&self) -> Id; #[cfg(all(feature = "EventKit_EKCalendar", feature = "Foundation_NSSet"))] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other calendars)] pub unsafe fn calendars(&self) -> Id>; diff --git a/ExtensionKit/EXAppExtensionBrowserViewController.rs b/ExtensionKit/EXAppExtensionBrowserViewController.rs index 9a5cf29d9..6ce9b1095 100644 --- a/ExtensionKit/EXAppExtensionBrowserViewController.rs +++ b/ExtensionKit/EXAppExtensionBrowserViewController.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ExtensionKit_EXAppExtensionBrowserViewController")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct EXAppExtensionBrowserViewController; #[cfg(feature = "ExtensionKit_EXAppExtensionBrowserViewController")] @@ -42,6 +43,7 @@ extern_methods!( #[cfg(feature = "ExtensionKit_EXAppExtensionBrowserViewController")] unsafe impl EXAppExtensionBrowserViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/ExtensionKit/EXHostViewController.rs b/ExtensionKit/EXHostViewController.rs index e82a95f13..aa84d5cb9 100644 --- a/ExtensionKit/EXHostViewController.rs +++ b/ExtensionKit/EXHostViewController.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ExtensionKit_EXHostViewController")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct EXHostViewController; #[cfg(feature = "ExtensionKit_EXHostViewController")] @@ -62,6 +63,7 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait EXHostViewControllerDelegate: NSObjectProtocol { #[cfg(feature = "ExtensionKit_EXHostViewController")] #[optional] @@ -89,6 +91,7 @@ extern_methods!( #[cfg(feature = "ExtensionKit_EXHostViewController")] unsafe impl EXHostViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/ExternalAccessory/EAAccessoryManager.rs b/ExternalAccessory/EAAccessoryManager.rs index 1fb98e52d..c74eda239 100644 --- a/ExternalAccessory/EAAccessoryManager.rs +++ b/ExternalAccessory/EAAccessoryManager.rs @@ -47,6 +47,7 @@ extern_methods!( pub unsafe fn sharedAccessoryManager() -> Id; #[cfg(feature = "Foundation_NSPredicate")] + #[cfg(not(any(target_os = "macos")))] #[method(showBluetoothAccessoryPickerWithNameFilter:completion:)] pub unsafe fn showBluetoothAccessoryPickerWithNameFilter_completion( &self, diff --git a/ExternalAccessory/EAWiFiUnconfiguredAccessory.rs b/ExternalAccessory/EAWiFiUnconfiguredAccessory.rs index 5da60bbc2..e81814575 100644 --- a/ExternalAccessory/EAWiFiUnconfiguredAccessory.rs +++ b/ExternalAccessory/EAWiFiUnconfiguredAccessory.rs @@ -16,6 +16,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ExternalAccessory_EAWiFiUnconfiguredAccessory")] + #[cfg(not(any(target_os = "macos")))] pub struct EAWiFiUnconfiguredAccessory; #[cfg(feature = "ExternalAccessory_EAWiFiUnconfiguredAccessory")] diff --git a/ExternalAccessory/EAWiFiUnconfiguredAccessoryBrowser.rs b/ExternalAccessory/EAWiFiUnconfiguredAccessoryBrowser.rs index cb2954449..528e41357 100644 --- a/ExternalAccessory/EAWiFiUnconfiguredAccessoryBrowser.rs +++ b/ExternalAccessory/EAWiFiUnconfiguredAccessoryBrowser.rs @@ -26,6 +26,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "ExternalAccessory_EAWiFiUnconfiguredAccessoryBrowser")] + #[cfg(not(any(target_os = "macos")))] pub struct EAWiFiUnconfiguredAccessoryBrowser; #[cfg(feature = "ExternalAccessory_EAWiFiUnconfiguredAccessoryBrowser")] @@ -59,12 +60,14 @@ extern_methods!( pub unsafe fn unconfiguredAccessories(&self) -> Id>; #[cfg(feature = "Foundation_NSPredicate")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(startSearchingForUnconfiguredAccessoriesMatchingPredicate:)] pub unsafe fn startSearchingForUnconfiguredAccessoriesMatchingPredicate( &self, predicate: Option<&NSPredicate>, ); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(stopSearchingForUnconfiguredAccessories)] pub unsafe fn stopSearchingForUnconfiguredAccessories(&self); @@ -72,6 +75,7 @@ extern_methods!( feature = "ExternalAccessory_EAWiFiUnconfiguredAccessory", feature = "ExternalAccessory_UIViewController" ))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(configureAccessory:withConfigurationUIOnViewController:)] pub unsafe fn configureAccessory_withConfigurationUIOnViewController( &self, @@ -84,6 +88,7 @@ extern_methods!( extern_protocol!( pub unsafe trait EAWiFiUnconfiguredAccessoryBrowserDelegate: NSObjectProtocol { #[cfg(feature = "ExternalAccessory_EAWiFiUnconfiguredAccessoryBrowser")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(accessoryBrowser:didUpdateState:)] unsafe fn accessoryBrowser_didUpdateState( &self, @@ -96,6 +101,7 @@ extern_protocol!( feature = "ExternalAccessory_EAWiFiUnconfiguredAccessoryBrowser", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(accessoryBrowser:didFindUnconfiguredAccessories:)] unsafe fn accessoryBrowser_didFindUnconfiguredAccessories( &self, @@ -108,6 +114,7 @@ extern_protocol!( feature = "ExternalAccessory_EAWiFiUnconfiguredAccessoryBrowser", feature = "Foundation_NSSet" ))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(accessoryBrowser:didRemoveUnconfiguredAccessories:)] unsafe fn accessoryBrowser_didRemoveUnconfiguredAccessories( &self, @@ -119,6 +126,7 @@ extern_protocol!( feature = "ExternalAccessory_EAWiFiUnconfiguredAccessory", feature = "ExternalAccessory_EAWiFiUnconfiguredAccessoryBrowser" ))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(accessoryBrowser:didFinishConfiguringAccessory:withStatus:)] unsafe fn accessoryBrowser_didFinishConfiguringAccessory_withStatus( &self, diff --git a/FileProvider/NSFileProviderDomain.rs b/FileProvider/NSFileProviderDomain.rs index c4bfb532d..1251a574a 100644 --- a/FileProvider/NSFileProviderDomain.rs +++ b/FileProvider/NSFileProviderDomain.rs @@ -13,6 +13,7 @@ typed_extensible_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "FileProvider_NSFileProviderDomainVersion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSFileProviderDomainVersion; #[cfg(feature = "FileProvider_NSFileProviderDomainVersion")] @@ -55,6 +56,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "FileProvider_NSFileProviderDomain")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSFileProviderDomain; #[cfg(feature = "FileProvider_NSFileProviderDomain")] @@ -70,6 +72,7 @@ extern_methods!( #[cfg(feature = "FileProvider_NSFileProviderDomain")] unsafe impl NSFileProviderDomain { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithIdentifier:displayName:pathRelativeToDocumentStorage:)] pub unsafe fn initWithIdentifier_displayName_pathRelativeToDocumentStorage( this: Option>, @@ -79,6 +82,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithIdentifier:displayName:)] pub unsafe fn initWithIdentifier_displayName( this: Option>, @@ -94,37 +98,48 @@ extern_methods!( pub unsafe fn displayName(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other pathRelativeToDocumentStorage)] pub unsafe fn pathRelativeToDocumentStorage(&self) -> Id; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(isDisconnected)] pub unsafe fn isDisconnected(&self) -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(userEnabled)] pub unsafe fn userEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isReplicated)] pub unsafe fn isReplicated(&self) -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(testingModes)] pub unsafe fn testingModes(&self) -> NSFileProviderDomainTestingModes; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setTestingModes:)] pub unsafe fn setTestingModes(&self, testing_modes: NSFileProviderDomainTestingModes); #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other backingStoreIdentity)] pub unsafe fn backingStoreIdentity(&self) -> Option>; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(supportsSyncingTrash)] pub unsafe fn supportsSyncingTrash(&self) -> bool; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setSupportsSyncingTrash:)] pub unsafe fn setSupportsSyncingTrash(&self, supports_syncing_trash: bool); } diff --git a/FileProvider/NSFileProviderEnumerating.rs b/FileProvider/NSFileProviderEnumerating.rs index f7a6bb99b..eb0502334 100644 --- a/FileProvider/NSFileProviderEnumerating.rs +++ b/FileProvider/NSFileProviderEnumerating.rs @@ -19,6 +19,7 @@ extern_static!(NSFileProviderInitialPageSortedByDate: &'static NSFileProviderPag extern_static!(NSFileProviderInitialPageSortedByName: &'static NSFileProviderPage); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderEnumerationObserver: NSObjectProtocol { #[cfg(feature = "Foundation_NSArray")] #[method(didEnumerateItems:)] @@ -34,6 +35,7 @@ extern_protocol!( #[method(finishEnumeratingWithError:)] unsafe fn finishEnumeratingWithError(&self, error: &NSError); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(suggestedPageSize)] unsafe fn suggestedPageSize(&self) -> NSInteger; @@ -43,6 +45,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderChangeObserver: NSObjectProtocol { #[cfg(feature = "Foundation_NSArray")] #[method(didUpdateItems:)] @@ -69,6 +72,7 @@ extern_protocol!( #[method(finishEnumeratingWithError:)] unsafe fn finishEnumeratingWithError(&self, error: &NSError); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(suggestedBatchSize)] unsafe fn suggestedBatchSize(&self) -> NSInteger; @@ -78,6 +82,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderEnumerator: NSObjectProtocol { #[method(invalidate)] unsafe fn invalidate(&self); diff --git a/FileProvider/NSFileProviderError.rs b/FileProvider/NSFileProviderError.rs index 1017e5ac2..db6a7abd5 100644 --- a/FileProvider/NSFileProviderError.rs +++ b/FileProvider/NSFileProviderError.rs @@ -16,26 +16,47 @@ extern_static!(NSFileProviderErrorNonExistentItemIdentifierKey: &'static NSError ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSFileProviderErrorCode { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorNotAuthenticated = -1000, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorFilenameCollision = -1001, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorSyncAnchorExpired = -1002, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorPageExpired = NSFileProviderErrorSyncAnchorExpired, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorInsufficientQuota = -1003, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorServerUnreachable = -1004, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorNoSuchItem = -1005, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorDeletionRejected = -1006, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorDirectoryNotEmpty = -1007, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorProviderNotFound = -2001, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorProviderTranslocated = -2002, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorOlderExtensionVersionRunning = -2003, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorNewerExtensionVersionFound = -2004, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorCannotSynchronize = -2005, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorNonEvictableChildren = -2006, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorUnsyncedEdits = -2007, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorNonEvictable = -2008, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorVersionNoLongerAvailable = -2009, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorExcludedFromSync = -2010, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderErrorDomainDisabled = -2011, } ); @@ -44,16 +65,19 @@ extern_methods!( /// NSFileProviderError #[cfg(feature = "Foundation_NSError")] unsafe impl NSError { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other fileProviderErrorForCollisionWithItem:)] pub unsafe fn fileProviderErrorForCollisionWithItem( existing_item: &NSFileProviderItem, ) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other fileProviderErrorForNonExistentItemWithIdentifier:)] pub unsafe fn fileProviderErrorForNonExistentItemWithIdentifier( item_identifier: &NSFileProviderItemIdentifier, ) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other fileProviderErrorForRejectedDeletionOfItem:)] pub unsafe fn fileProviderErrorForRejectedDeletionOfItem( updated_version: &NSFileProviderItem, diff --git a/FileProvider/NSFileProviderExtension.rs b/FileProvider/NSFileProviderExtension.rs index b5a54403b..4882f0dbb 100644 --- a/FileProvider/NSFileProviderExtension.rs +++ b/FileProvider/NSFileProviderExtension.rs @@ -9,6 +9,7 @@ use crate::UniformTypeIdentifiers::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "FileProvider_NSFileProviderExtension")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct NSFileProviderExtension; #[cfg(feature = "FileProvider_NSFileProviderExtension")] @@ -24,6 +25,7 @@ extern_methods!( #[cfg(feature = "FileProvider_NSFileProviderExtension")] unsafe impl NSFileProviderExtension { #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other itemForIdentifier:error:_)] pub unsafe fn itemForIdentifier_error( &self, @@ -80,6 +82,7 @@ extern_methods!( feature = "Foundation_NSURL" ))] #[deprecated = "Use the corresponding method on NSFileProviderManager instead"] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(writePlaceholderAtURL:withMetadata:error:_)] pub unsafe fn writePlaceholderAtURL_withMetadata_error( placeholder_url: &NSURL, @@ -88,16 +91,19 @@ extern_methods!( #[cfg(feature = "Foundation_NSURL")] #[deprecated] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other placeholderURLForURL:)] pub unsafe fn placeholderURLForURL(url: &NSURL) -> Id; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other providerIdentifier)] pub unsafe fn providerIdentifier(&self) -> Id; #[cfg(feature = "Foundation_NSURL")] #[deprecated] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other documentStorageURL)] pub unsafe fn documentStorageURL(&self) -> Id; } diff --git a/FileProvider/NSFileProviderItem.rs b/FileProvider/NSFileProviderItem.rs index 9812049a0..08cab8e70 100644 --- a/FileProvider/NSFileProviderItem.rs +++ b/FileProvider/NSFileProviderItem.rs @@ -21,6 +21,7 @@ extern_static!(NSFileProviderTrashContainerItemIdentifier: &'static NSFileProvid extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "FileProvider_NSFileProviderItemVersion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSFileProviderItemVersion; #[cfg(feature = "FileProvider_NSFileProviderItemVersion")] @@ -36,6 +37,7 @@ extern_methods!( #[cfg(feature = "FileProvider_NSFileProviderItemVersion")] unsafe impl NSFileProviderItemVersion { #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other beforeFirstSyncComponent)] pub unsafe fn beforeFirstSyncComponent() -> Id; @@ -70,6 +72,7 @@ ns_options!( NSFileProviderItemCapabilitiesAllowsDeleting = 1 << 5, #[deprecated = "use NSFileProviderContentPolicy instead"] NSFileProviderItemCapabilitiesAllowsEvicting = 1 << 6, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileProviderItemCapabilitiesAllowsExcludingFromSync = 1 << 7, NSFileProviderItemCapabilitiesAllowsAddingSubItems = NSFileProviderItemCapabilitiesAllowsWriting, @@ -87,17 +90,29 @@ ns_options!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSFileProviderItemFields { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderItemContents = 1 << 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderItemFilename = 1 << 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderItemParentItemIdentifier = 1 << 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderItemLastUsedDate = 1 << 3, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderItemTagData = 1 << 4, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderItemFavoriteRank = 1 << 5, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderItemCreationDate = 1 << 6, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderItemContentModificationDate = 1 << 7, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderItemFileSystemFlags = 1 << 8, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderItemExtendedAttributes = 1 << 9, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderItemTypeAndCreator = 1 << 10, } ); @@ -123,14 +138,19 @@ extern_struct!( ns_enum!( #[underlying(NSInteger)] pub enum NSFileProviderContentPolicy { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderContentPolicyInherited = 0, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileProviderContentPolicyDownloadLazily = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderContentPolicyDownloadLazilyAndEvictOnRemoteUpdate = 2, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileProviderContentPolicyDownloadEagerlyAndKeepDownloaded = 3, } ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderItemProtocol: NSObjectProtocol { #[method_id(@__retain_semantics Other itemIdentifier)] unsafe fn itemIdentifier(&self) -> Id; @@ -149,10 +169,12 @@ extern_protocol!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "macos")))] #[optional] #[method_id(@__retain_semantics Other typeIdentifier)] unsafe fn typeIdentifier(&self) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(typeAndCreator)] unsafe fn typeAndCreator(&self) -> NSFileProviderTypeAndCreator; @@ -161,6 +183,7 @@ extern_protocol!( #[method(capabilities)] unsafe fn capabilities(&self) -> NSFileProviderItemCapabilities; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(fileSystemFlags)] unsafe fn fileSystemFlags(&self) -> NSFileProviderFileSystemFlags; @@ -190,6 +213,7 @@ extern_protocol!( feature = "Foundation_NSDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method_id(@__retain_semantics Other extendedAttributes)] unsafe fn extendedAttributes(&self) -> Id>; @@ -205,10 +229,12 @@ extern_protocol!( unsafe fn tagData(&self) -> Option>; #[cfg(feature = "Foundation_NSNumber")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method_id(@__retain_semantics Other favoriteRank)] unsafe fn favoriteRank(&self) -> Option>; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(isTrashed)] unsafe fn isTrashed(&self) -> bool; @@ -262,16 +288,19 @@ extern_protocol!( unsafe fn mostRecentEditorNameComponents(&self) -> Option>; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method_id(@__retain_semantics Other versionIdentifier)] unsafe fn versionIdentifier(&self) -> Option>; #[cfg(feature = "FileProvider_NSFileProviderItemVersion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method_id(@__retain_semantics Other itemVersion)] unsafe fn itemVersion(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method_id(@__retain_semantics Other symlinkTargetPath)] unsafe fn symlinkTargetPath(&self) -> Option>; @@ -281,6 +310,7 @@ extern_protocol!( #[method_id(@__retain_semantics Other userInfo)] unsafe fn userInfo(&self) -> Option>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(contentPolicy)] unsafe fn contentPolicy(&self) -> NSFileProviderContentPolicy; diff --git a/FileProvider/NSFileProviderItemDecoration.rs b/FileProvider/NSFileProviderItemDecoration.rs index 7d5fb7170..c872a070d 100644 --- a/FileProvider/NSFileProviderItemDecoration.rs +++ b/FileProvider/NSFileProviderItemDecoration.rs @@ -11,6 +11,7 @@ typed_extensible_enum!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderItemDecorating: NSFileProviderItemProtocol { #[cfg(feature = "Foundation_NSArray")] #[method_id(@__retain_semantics Other decorations)] diff --git a/FileProvider/NSFileProviderManager.rs b/FileProvider/NSFileProviderManager.rs index b688ca204..e294934d8 100644 --- a/FileProvider/NSFileProviderManager.rs +++ b/FileProvider/NSFileProviderManager.rs @@ -8,9 +8,13 @@ use crate::UniformTypeIdentifiers::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSFileProviderDomainRemovalMode { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderDomainRemovalModeRemoveAll = 0, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileProviderDomainRemovalModePreserveDirtyUserData = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileProviderDomainRemovalModePreserveDownloadedUserData = 2, } ); @@ -18,6 +22,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "FileProvider_NSFileProviderManager")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSFileProviderManager; #[cfg(feature = "FileProvider_NSFileProviderManager")] @@ -35,6 +40,7 @@ extern_methods!( #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other defaultManager)] pub unsafe fn defaultManager() -> Id; @@ -51,6 +57,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(getUserVisibleURLForItemIdentifier:completionHandler:)] pub unsafe fn getUserVisibleURLForItemIdentifier_completionHandler( &self, @@ -59,6 +66,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(getIdentifierForUserVisibleFileAtURL:completionHandler:)] pub unsafe fn getIdentifierForUserVisibleFileAtURL_completionHandler( url: &NSURL, @@ -85,18 +93,22 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other providerIdentifier)] pub unsafe fn providerIdentifier(&self) -> Id; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other documentStorageURL)] pub unsafe fn documentStorageURL(&self) -> Id; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other temporaryDirectoryURLWithError:_)] pub unsafe fn temporaryDirectoryURLWithError(&self) -> Result, Id>; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(writePlaceholderAtURL:withMetadata:error:_)] pub unsafe fn writePlaceholderAtURL_withMetadata_error( placeholder_url: &NSURL, @@ -104,6 +116,7 @@ extern_methods!( ) -> Result<(), Id>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other placeholderURLForURL:)] pub unsafe fn placeholderURLForURL(url: &NSURL) -> Id; @@ -132,6 +145,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(removeDomain:mode:completionHandler:)] pub unsafe fn removeDomain_mode_completionHandler( domain: &NSFileProviderDomain, @@ -156,6 +170,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(signalErrorResolved:completionHandler:)] pub unsafe fn signalErrorResolved_completionHandler( &self, @@ -164,6 +179,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSProgress")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other globalProgressForKind:)] pub unsafe fn globalProgressForKind( &self, @@ -178,6 +194,7 @@ extern_methods!( /// MaterializedSet #[cfg(feature = "FileProvider_NSFileProviderManager")] unsafe impl NSFileProviderManager { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other enumeratorForMaterializedItems)] pub unsafe fn enumeratorForMaterializedItems( &self, @@ -188,6 +205,7 @@ extern_methods!( extern_static!(NSFileProviderPendingSetDidChange: &'static NSNotificationName); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderPendingSetEnumerator: NSFileProviderEnumerator { #[cfg(feature = "FileProvider_NSFileProviderDomainVersion")] #[method_id(@__retain_semantics Other domainVersion)] @@ -196,6 +214,7 @@ extern_protocol!( #[method(refreshInterval)] unsafe fn refreshInterval(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isMaximumSizeReached)] unsafe fn isMaximumSizeReached(&self) -> bool; } @@ -207,6 +226,7 @@ extern_methods!( /// PendingSet #[cfg(feature = "FileProvider_NSFileProviderManager")] unsafe impl NSFileProviderManager { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other enumeratorForPendingItems)] pub unsafe fn enumeratorForPendingItems( &self, @@ -223,6 +243,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(importDomain:fromDirectoryAtURL:completionHandler:)] pub unsafe fn importDomain_fromDirectoryAtURL_completionHandler( domain: &NSFileProviderDomain, @@ -231,6 +252,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(reimportItemsBelowItemWithIdentifier:completionHandler:)] pub unsafe fn reimportItemsBelowItemWithIdentifier_completionHandler( &self, @@ -239,6 +261,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(requestModificationOfFields:forItemWithIdentifier:options:completionHandler:)] pub unsafe fn requestModificationOfFields_forItemWithIdentifier_options_completionHandler( &self, @@ -255,6 +278,7 @@ extern_methods!( #[cfg(feature = "FileProvider_NSFileProviderManager")] unsafe impl NSFileProviderManager { #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(evictItemWithIdentifier:completionHandler:)] pub unsafe fn evictItemWithIdentifier_completionHandler( &self, @@ -269,6 +293,7 @@ extern_methods!( #[cfg(feature = "FileProvider_NSFileProviderManager")] unsafe impl NSFileProviderManager { #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(waitForChangesOnItemsBelowItemWithIdentifier:completionHandler:)] pub unsafe fn waitForChangesOnItemsBelowItemWithIdentifier_completionHandler( &self, @@ -283,6 +308,7 @@ extern_methods!( #[cfg(feature = "FileProvider_NSFileProviderManager")] unsafe impl NSFileProviderManager { #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(waitForStabilizationWithCompletionHandler:)] pub unsafe fn waitForStabilizationWithCompletionHandler( &self, @@ -293,7 +319,9 @@ extern_methods!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum NSFileProviderManagerDisconnectionOptions { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileProviderManagerDisconnectionOptionsTemporary = 1 << 0, } ); @@ -303,6 +331,7 @@ extern_methods!( #[cfg(feature = "FileProvider_NSFileProviderManager")] unsafe impl NSFileProviderManager { #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(disconnectWithReason:options:completionHandler:)] pub unsafe fn disconnectWithReason_options_completionHandler( &self, @@ -312,6 +341,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(reconnectWithCompletionHandler:)] pub unsafe fn reconnectWithCompletionHandler( &self, @@ -325,6 +355,7 @@ extern_methods!( #[cfg(feature = "FileProvider_NSFileProviderManager")] unsafe impl NSFileProviderManager { #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(requestDownloadForItemWithIdentifier:requestedRange:completionHandler:)] pub unsafe fn requestDownloadForItemWithIdentifier_requestedRange_completionHandler( &self, diff --git a/FileProvider/NSFileProviderModifyItemOptions.rs b/FileProvider/NSFileProviderModifyItemOptions.rs index 20d16ab43..2e2f21d67 100644 --- a/FileProvider/NSFileProviderModifyItemOptions.rs +++ b/FileProvider/NSFileProviderModifyItemOptions.rs @@ -8,7 +8,9 @@ use crate::UniformTypeIdentifiers::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSFileProviderModifyItemOptions { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderModifyItemMayAlreadyExist = 1 << 0, } ); diff --git a/FileProvider/NSFileProviderReplicatedExtension.rs b/FileProvider/NSFileProviderReplicatedExtension.rs index 1e9e99266..ce2d5751d 100644 --- a/FileProvider/NSFileProviderReplicatedExtension.rs +++ b/FileProvider/NSFileProviderReplicatedExtension.rs @@ -8,34 +8,44 @@ use crate::UniformTypeIdentifiers::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSFileProviderCreateItemOptions { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderCreateItemMayAlreadyExist = 1 << 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderCreateItemDeletionConflicted = 1 << 1, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSFileProviderDeleteItemOptions { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderDeleteItemRecursive = 1 << 0, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum NSFileProviderMaterializationFlags { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileProviderMaterializationFlagsKnownSparseRanges = 1 << 0, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum NSFileProviderFetchContentsOptions { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileProviderFetchContentsOptionsStrictVersioning = 1 << 0, } ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderEnumerating: NSObjectProtocol { #[cfg(all( feature = "FileProvider_NSFileProviderRequest", @@ -53,6 +63,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderReplicatedExtension: NSFileProviderEnumerating + NSObjectProtocol { @@ -174,6 +185,7 @@ extern_protocol!( completion_handler: &Block<(), ()>, ); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(pendingItemsDidChangeWithCompletionHandler:)] unsafe fn pendingItemsDidChangeWithCompletionHandler( @@ -186,6 +198,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderIncrementalContentFetching: NSObjectProtocol { #[cfg(all( feature = "FileProvider_NSFileProviderItemVersion", @@ -210,6 +223,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderServicing: NSObjectProtocol { #[cfg(all( feature = "Foundation_NSArray", @@ -234,6 +248,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderThumbnailing: NSObjectProtocol { #[cfg(all( feature = "Foundation_NSArray", @@ -262,6 +277,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderCustomAction: NSObjectProtocol { #[cfg(all( feature = "Foundation_NSArray", @@ -281,6 +297,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderUserInteractionSuppressing: NSObjectProtocol { #[cfg(feature = "Foundation_NSString")] #[method(setInteractionSuppressed:forIdentifier:)] @@ -302,6 +319,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderDomainState: NSObjectProtocol { #[cfg(feature = "FileProvider_NSFileProviderDomainVersion")] #[method_id(@__retain_semantics Other domainVersion)] @@ -316,6 +334,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderPartialContentFetching: NSObjectProtocol { #[cfg(all( feature = "FileProvider_NSFileProviderItemVersion", diff --git a/FileProvider/NSFileProviderRequest.rs b/FileProvider/NSFileProviderRequest.rs index 897f99f5e..04504768f 100644 --- a/FileProvider/NSFileProviderRequest.rs +++ b/FileProvider/NSFileProviderRequest.rs @@ -9,6 +9,7 @@ use crate::UniformTypeIdentifiers::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "FileProvider_NSFileProviderRequest")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSFileProviderRequest; #[cfg(feature = "FileProvider_NSFileProviderRequest")] @@ -30,10 +31,12 @@ extern_methods!( pub unsafe fn isFileViewerRequest(&self) -> bool; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other requestingExecutable)] pub unsafe fn requestingExecutable(&self) -> Option>; #[cfg(feature = "FileProvider_NSFileProviderDomainVersion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other domainVersion)] pub unsafe fn domainVersion(&self) -> Option>; } diff --git a/FileProvider/NSFileProviderService.rs b/FileProvider/NSFileProviderService.rs index bc3bd8af7..58a52ed55 100644 --- a/FileProvider/NSFileProviderService.rs +++ b/FileProvider/NSFileProviderService.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; use crate::UniformTypeIdentifiers::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderServiceSource { #[method_id(@__retain_semantics Other serviceName)] unsafe fn serviceName(&self) -> Id; @@ -20,6 +21,7 @@ extern_protocol!( &self, ) -> Result, Id>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(isRestricted)] unsafe fn isRestricted(&self) -> bool; @@ -33,6 +35,7 @@ extern_methods!( #[cfg(feature = "FileProvider_NSFileProviderExtension")] unsafe impl NSFileProviderExtension { #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other supportedServiceSourcesForItemIdentifier:error:_)] pub unsafe fn supportedServiceSourcesForItemIdentifier_error( &self, diff --git a/FileProvider/NSFileProviderTesting.rs b/FileProvider/NSFileProviderTesting.rs index 70346f77c..55999addb 100644 --- a/FileProvider/NSFileProviderTesting.rs +++ b/FileProvider/NSFileProviderTesting.rs @@ -8,19 +8,29 @@ use crate::UniformTypeIdentifiers::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSFileProviderTestingOperationType { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderTestingOperationTypeIngestion = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderTestingOperationTypeLookup = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderTestingOperationTypeCreation = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderTestingOperationTypeModification = 3, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderTestingOperationTypeDeletion = 4, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderTestingOperationTypeContentFetch = 5, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderTestingOperationTypeChildrenEnumeration = 6, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderTestingOperationTypeCollisionResolution = 7, } ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderTestingOperation: NSObjectProtocol { #[method(type)] unsafe fn r#type(&self) -> NSFileProviderTestingOperationType; @@ -72,6 +82,7 @@ extern_methods!( #[cfg(feature = "FileProvider_NSFileProviderManager")] unsafe impl NSFileProviderManager { #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other listAvailableTestingOperationsWithError:_)] pub unsafe fn listAvailableTestingOperationsWithError( &self, @@ -82,6 +93,7 @@ extern_methods!( feature = "Foundation_NSDictionary", feature = "Foundation_NSError" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other runTestingOperations:error:_)] pub unsafe fn runTestingOperations_error( &self, @@ -95,13 +107,17 @@ extern_methods!( ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum NSFileProviderTestingOperationSide { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderTestingOperationSideDisk = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSFileProviderTestingOperationSideFileProvider = 1, } ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderTestingIngestion: NSFileProviderTestingOperation { #[method(side)] unsafe fn side(&self) -> NSFileProviderTestingOperationSide; @@ -117,6 +133,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderTestingLookup: NSFileProviderTestingOperation { #[method(side)] unsafe fn side(&self) -> NSFileProviderTestingOperationSide; @@ -129,6 +146,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderTestingCreation: NSFileProviderTestingOperation { #[method(targetSide)] unsafe fn targetSide(&self) -> NSFileProviderTestingOperationSide; @@ -145,6 +163,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderTestingModification: NSFileProviderTestingOperation { @@ -173,6 +192,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderTestingDeletion: NSFileProviderTestingOperation { #[method(targetSide)] unsafe fn targetSide(&self) -> NSFileProviderTestingOperationSide; @@ -196,6 +216,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderTestingContentFetch: NSFileProviderTestingOperation { @@ -210,6 +231,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderTestingChildrenEnumeration: NSFileProviderTestingOperation { @@ -224,6 +246,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSFileProviderTestingCollisionResolution: NSFileProviderTestingOperation { diff --git a/FileProvider/NSFileProviderThumbnailing.rs b/FileProvider/NSFileProviderThumbnailing.rs index dfc53a521..569a6067f 100644 --- a/FileProvider/NSFileProviderThumbnailing.rs +++ b/FileProvider/NSFileProviderThumbnailing.rs @@ -16,6 +16,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSProgress" ))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other fetchThumbnailsForItemIdentifiers:requestedSize:perThumbnailCompletionHandler:completionHandler:)] pub unsafe fn fetchThumbnailsForItemIdentifiers_requestedSize_perThumbnailCompletionHandler_completionHandler( &self, diff --git a/FileProviderUI/FPUIActionExtensionViewController.rs b/FileProviderUI/FPUIActionExtensionViewController.rs index 5ded46c65..571b31ae5 100644 --- a/FileProviderUI/FPUIActionExtensionViewController.rs +++ b/FileProviderUI/FPUIActionExtensionViewController.rs @@ -59,6 +59,7 @@ extern_methods!( #[cfg(feature = "FileProviderUI_FPUIActionExtensionViewController")] unsafe impl FPUIActionExtensionViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/Foundation/FoundationErrors.rs b/Foundation/FoundationErrors.rs index 8cb4a2dba..dd45f8cd5 100644 --- a/Foundation/FoundationErrors.rs +++ b/Foundation/FoundationErrors.rs @@ -25,7 +25,9 @@ ns_error_enum!( NSFileWriteUnsupportedSchemeError = 518, NSFileWriteOutOfSpaceError = 640, NSFileWriteVolumeReadOnlyError = 642, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileManagerUnmountUnknownError = 768, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileManagerUnmountBusyError = 769, NSKeyValueValidationError = 1024, NSFormattingError = 2048, @@ -78,13 +80,21 @@ ns_error_enum!( NSBundleOnDemandResourceOutOfSpaceError = 4992, NSBundleOnDemandResourceExceededMaximumSizeError = 4993, NSBundleOnDemandResourceInvalidTagError = 4994, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSCloudSharingNetworkFailureError = 5120, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSCloudSharingQuotaExceededError = 5121, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSCloudSharingTooManyParticipantsError = 5122, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSCloudSharingConflictError = 5123, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSCloudSharingNoPermissionError = 5124, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSCloudSharingOtherError = 5375, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSCloudSharingErrorMinimum = 5120, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSCloudSharingErrorMaximum = 5375, NSCompressionFailedError = 5376, NSDecompressionFailedError = 5377, diff --git a/Foundation/NSAppleEventDescriptor.rs b/Foundation/NSAppleEventDescriptor.rs index cab7f46c5..cb1f6c43e 100644 --- a/Foundation/NSAppleEventDescriptor.rs +++ b/Foundation/NSAppleEventDescriptor.rs @@ -5,17 +5,29 @@ use crate::Foundation::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum NSAppleEventSendOptions { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSAppleEventSendNoReply = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSAppleEventSendQueueReply = 2, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSAppleEventSendWaitForReply = 3, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSAppleEventSendNeverInteract = 16, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSAppleEventSendCanInteract = 32, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSAppleEventSendAlwaysInteract = 48, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSAppleEventSendCanSwitchLayer = 64, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSAppleEventSendDontRecord = 4096, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSAppleEventSendDontExecute = 8192, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSAppleEventSendDontAnnotate = 65536, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSAppleEventSendDefaultOptions = 35, } ); @@ -55,6 +67,7 @@ extern_methods!( #[method_id(@__retain_semantics Other descriptorWithInt32:)] pub unsafe fn descriptorWithInt32(signed_int: i32) -> Id; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other descriptorWithDouble:)] pub unsafe fn descriptorWithDouble(double_value: c_double) -> Id; @@ -66,10 +79,12 @@ extern_methods!( pub unsafe fn descriptorWithString(string: &NSString) -> Id; #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other descriptorWithDate:)] pub unsafe fn descriptorWithDate(date: &NSDate) -> Id; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other descriptorWithFileURL:)] pub unsafe fn descriptorWithFileURL(file_url: &NSURL) -> Id; @@ -79,16 +94,19 @@ extern_methods!( #[method_id(@__retain_semantics Other recordDescriptor)] pub unsafe fn recordDescriptor() -> Id; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other currentProcessDescriptor)] pub unsafe fn currentProcessDescriptor() -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other descriptorWithBundleIdentifier:)] pub unsafe fn descriptorWithBundleIdentifier( bundle_identifier: &NSString, ) -> Id; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other descriptorWithApplicationURL:)] pub unsafe fn descriptorWithApplicationURL( application_url: &NSURL, @@ -113,6 +131,7 @@ extern_methods!( #[method(int32Value)] pub unsafe fn int32Value(&self) -> i32; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; @@ -124,13 +143,16 @@ extern_methods!( pub unsafe fn stringValue(&self) -> Option>; #[cfg(feature = "Foundation_NSDate")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other dateValue)] pub unsafe fn dateValue(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other fileURLValue)] pub unsafe fn fileURLValue(&self) -> Option>; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(isRecordDescriptor)] pub unsafe fn isRecordDescriptor(&self) -> bool; diff --git a/Foundation/NSBackgroundActivityScheduler.rs b/Foundation/NSBackgroundActivityScheduler.rs index 88830ba74..fba4333d3 100644 --- a/Foundation/NSBackgroundActivityScheduler.rs +++ b/Foundation/NSBackgroundActivityScheduler.rs @@ -5,8 +5,11 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum NSBackgroundActivityResult { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSBackgroundActivityResultFinished = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSBackgroundActivityResultDeferred = 2, } ); @@ -16,6 +19,7 @@ pub type NSBackgroundActivityCompletionHandler = *mut Block<(NSBackgroundActivit extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSBackgroundActivityScheduler")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct NSBackgroundActivityScheduler; #[cfg(feature = "Foundation_NSBackgroundActivityScheduler")] diff --git a/Foundation/NSBundle.rs b/Foundation/NSBundle.rs index 92af04bec..b7aad8b92 100644 --- a/Foundation/NSBundle.rs +++ b/Foundation/NSBundle.rs @@ -370,6 +370,7 @@ extern_static!(NSLoadedClasses: &'static NSString); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSBundleResourceRequest")] + #[cfg(not(any(target_os = "macos")))] pub struct NSBundleResourceRequest; #[cfg(feature = "Foundation_NSBundleResourceRequest")] @@ -387,6 +388,12 @@ unsafe impl NSProgressReporting for NSBundleResourceRequest {} extern_methods!( #[cfg(feature = "Foundation_NSBundleResourceRequest")] unsafe impl NSBundleResourceRequest { + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; @@ -450,6 +457,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSBundle")] unsafe impl NSBundle { #[cfg(all(feature = "Foundation_NSSet", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "macos")))] #[method(setPreservationPriority:forTags:)] pub unsafe fn setPreservationPriority_forTags( &self, @@ -458,6 +466,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos")))] #[method(preservationPriorityForTag:)] pub unsafe fn preservationPriorityForTag(&self, tag: &NSString) -> c_double; } diff --git a/Foundation/NSCalendar.rs b/Foundation/NSCalendar.rs index 61f081c3d..3a456c86b 100644 --- a/Foundation/NSCalendar.rs +++ b/Foundation/NSCalendar.rs @@ -141,6 +141,12 @@ extern_methods!( calendar_identifier_constant: &NSCalendarIdentifier, ) -> Option>; + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; diff --git a/Foundation/NSConnection.rs b/Foundation/NSConnection.rs index 8b5c3a2df..b5be2d9b6 100644 --- a/Foundation/NSConnection.rs +++ b/Foundation/NSConnection.rs @@ -34,6 +34,7 @@ extern_methods!( pub unsafe fn allConnections() -> Id>; #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other defaultConnection)] pub unsafe fn defaultConnection() -> Id; diff --git a/Foundation/NSDistributedLock.rs b/Foundation/NSDistributedLock.rs index ca21cddd3..671430aee 100644 --- a/Foundation/NSDistributedLock.rs +++ b/Foundation/NSDistributedLock.rs @@ -24,6 +24,12 @@ extern_methods!( #[method_id(@__retain_semantics Other lockWithPath:)] pub unsafe fn lockWithPath(path: &NSString) -> Option>; + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; diff --git a/Foundation/NSFileCoordinator.rs b/Foundation/NSFileCoordinator.rs index 5cb78088c..d4e858c85 100644 --- a/Foundation/NSFileCoordinator.rs +++ b/Foundation/NSFileCoordinator.rs @@ -185,6 +185,7 @@ extern_methods!( pub unsafe fn itemAtURL_didMoveToURL(&self, old_url: &NSURL, new_url: &NSURL); #[cfg(all(feature = "Foundation_NSSet", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(itemAtURL:didChangeUbiquityAttributes:)] pub unsafe fn itemAtURL_didChangeUbiquityAttributes( &self, diff --git a/Foundation/NSFileManager.rs b/Foundation/NSFileManager.rs index 350639a94..d92f110aa 100644 --- a/Foundation/NSFileManager.rs +++ b/Foundation/NSFileManager.rs @@ -57,8 +57,11 @@ ns_enum!( ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum NSFileManagerUnmountOptions { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileManagerUnmountAllPartitionsAndEjectDisk = 1 << 0, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSFileManagerUnmountWithoutUI = 1 << 1, } ); @@ -96,6 +99,7 @@ extern_methods!( ) -> Option>>; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(unmountVolumeAtURL:options:completionHandler:)] pub unsafe fn unmountVolumeAtURL_options_completionHandler( &self, @@ -325,6 +329,7 @@ extern_methods!( pub unsafe fn removeItemAtURL_error(&self, url: &NSURL) -> Result<(), Id>; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(trashItemAtURL:resultingItemURL:error:_)] pub unsafe fn trashItemAtURL_resultingItemURL_error( &self, @@ -609,6 +614,7 @@ extern_methods!( feature = "Foundation_NSFileProviderService", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(getFileProviderServicesForItemAtURL:completionHandler:)] pub unsafe fn getFileProviderServicesForItemAtURL_completionHandler( &self, @@ -636,6 +642,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSFileManager")] unsafe impl NSFileManager { #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other homeDirectoryForCurrentUser)] pub unsafe fn homeDirectoryForCurrentUser(&self) -> Id; @@ -644,6 +651,7 @@ extern_methods!( pub unsafe fn temporaryDirectory(&self) -> Id; #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other homeDirectoryForUser:)] pub unsafe fn homeDirectoryForUser(&self, user_name: &NSString) -> Option>; } @@ -916,6 +924,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSFileProviderService")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSFileProviderService; #[cfg(feature = "Foundation_NSFileProviderService")] diff --git a/Foundation/NSFilePresenter.rs b/Foundation/NSFilePresenter.rs index 6624f6d78..413c197e4 100644 --- a/Foundation/NSFilePresenter.rs +++ b/Foundation/NSFilePresenter.rs @@ -14,6 +14,7 @@ extern_protocol!( unsafe fn presentedItemOperationQueue(&self) -> Id; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[optional] #[method_id(@__retain_semantics Other primaryPresentedItemURL)] unsafe fn primaryPresentedItemURL(&self) -> Option>; @@ -52,6 +53,7 @@ extern_protocol!( unsafe fn presentedItemDidChange(&self); #[cfg(feature = "Foundation_NSSet")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(presentedItemDidChangeUbiquityAttributes:)] unsafe fn presentedItemDidChangeUbiquityAttributes( @@ -60,6 +62,7 @@ extern_protocol!( ); #[cfg(feature = "Foundation_NSSet")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method_id(@__retain_semantics Other observedPresentedItemUbiquityAttributes)] unsafe fn observedPresentedItemUbiquityAttributes(&self) -> Id>; diff --git a/Foundation/NSFileVersion.rs b/Foundation/NSFileVersion.rs index b745d591f..01e58cbd6 100644 --- a/Foundation/NSFileVersion.rs +++ b/Foundation/NSFileVersion.rs @@ -67,6 +67,7 @@ extern_methods!( ) -> Option>; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSURL"))] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other addVersionOfItemAtURL:withContentsOfURL:options:error:_)] pub unsafe fn addVersionOfItemAtURL_withContentsOfURL_options_error( url: &NSURL, @@ -75,6 +76,7 @@ extern_methods!( ) -> Result, Id>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other temporaryDirectoryURLForNewVersionOfItemAtURL:)] pub unsafe fn temporaryDirectoryURLForNewVersionOfItemAtURL(url: &NSURL) -> Id; @@ -91,6 +93,7 @@ extern_methods!( pub unsafe fn localizedNameOfSavingComputer(&self) -> Option>; #[cfg(feature = "Foundation_NSPersonNameComponents")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other originatorNameComponents)] pub unsafe fn originatorNameComponents(&self) -> Option>; @@ -110,9 +113,11 @@ extern_methods!( #[method(setResolved:)] pub unsafe fn setResolved(&self, resolved: bool); + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(isDiscardable)] pub unsafe fn isDiscardable(&self) -> bool; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setDiscardable:)] pub unsafe fn setDiscardable(&self, discardable: bool); diff --git a/Foundation/NSFileWrapper.rs b/Foundation/NSFileWrapper.rs index 2a93f37b1..4f71d8b27 100644 --- a/Foundation/NSFileWrapper.rs +++ b/Foundation/NSFileWrapper.rs @@ -182,6 +182,7 @@ extern_methods!( unsafe impl NSFileWrapper { #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -initWithURL:options:error: instead."] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithPath:)] pub unsafe fn initWithPath( this: Option>, @@ -190,6 +191,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -initSymbolicLinkWithDestinationURL: and -setPreferredFileName:, if necessary, instead."] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initSymbolicLinkWithDestination:)] pub unsafe fn initSymbolicLinkWithDestination( this: Option>, @@ -198,16 +200,19 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -matchesContentsOfURL: instead."] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(needsToBeUpdatedFromPath:)] pub unsafe fn needsToBeUpdatedFromPath(&self, path: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -readFromURL:options:error: instead."] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(updateFromPath:)] pub unsafe fn updateFromPath(&self, path: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -writeToURL:options:originalContentsURL:error: instead."] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(writeToFile:atomically:updateFilenames:)] pub unsafe fn writeToFile_atomically_updateFilenames( &self, @@ -218,11 +223,13 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Instantiate a new NSFileWrapper with -initWithURL:options:error:, send it -setPreferredFileName: if necessary, then use -addFileWrapper: instead."] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other addFileWithPath:)] pub unsafe fn addFileWithPath(&self, path: &NSString) -> Id; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Instantiate a new NSFileWrapper with -initWithSymbolicLinkDestinationURL:, send it -setPreferredFileName: if necessary, then use -addFileWrapper: instead."] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other addSymbolicLinkWithDestination:preferredFilename:)] pub unsafe fn addSymbolicLinkWithDestination_preferredFilename( &self, @@ -232,6 +239,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated = "Use -symbolicLinkDestinationURL instead."] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other symbolicLinkDestination)] pub unsafe fn symbolicLinkDestination(&self) -> Id; } diff --git a/Foundation/NSGarbageCollector.rs b/Foundation/NSGarbageCollector.rs index 7df68c73b..850ca0ee5 100644 --- a/Foundation/NSGarbageCollector.rs +++ b/Foundation/NSGarbageCollector.rs @@ -7,6 +7,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSGarbageCollector")] #[deprecated = "Building Garbage Collected apps is no longer supported."] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct NSGarbageCollector; #[cfg(feature = "Foundation_NSGarbageCollector")] @@ -25,6 +26,7 @@ extern_methods!( pub unsafe fn defaultCollector() -> Id; #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(isCollecting)] pub unsafe fn isCollecting(&self) -> bool; diff --git a/Foundation/NSHashTable.rs b/Foundation/NSHashTable.rs index aacad9f60..7d5ed80ad 100644 --- a/Foundation/NSHashTable.rs +++ b/Foundation/NSHashTable.rs @@ -86,6 +86,7 @@ extern_methods!( ) -> Id>; #[deprecated = "GC no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other hashTableWithWeakObjects)] pub unsafe fn hashTableWithWeakObjects() -> Id; diff --git a/Foundation/NSHost.rs b/Foundation/NSHost.rs index 73ca6f477..f3f917f74 100644 --- a/Foundation/NSHost.rs +++ b/Foundation/NSHost.rs @@ -7,6 +7,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSHost")] #[deprecated = "Use Network framework instead, see deprecation notice in "] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct NSHost; #[cfg(feature = "Foundation_NSHost")] @@ -52,18 +53,22 @@ extern_methods!( pub unsafe fn addresses(&self) -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other localizedName)] pub unsafe fn localizedName(&self) -> Option>; #[deprecated = "Caching no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setHostCacheEnabled:)] pub unsafe fn setHostCacheEnabled(flag: bool); #[deprecated = "Caching no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(isHostCacheEnabled)] pub unsafe fn isHostCacheEnabled() -> bool; #[deprecated = "Caching no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(flushHostCache)] pub unsafe fn flushHostCache(); } diff --git a/Foundation/NSItemProvider.rs b/Foundation/NSItemProvider.rs index c9119a4f7..bc1425a00 100644 --- a/Foundation/NSItemProvider.rs +++ b/Foundation/NSItemProvider.rs @@ -7,7 +7,9 @@ ns_enum!( #[underlying(NSInteger)] pub enum NSItemProviderRepresentationVisibility { NSItemProviderRepresentationVisibilityAll = 0, + #[cfg(not(any(target_os = "macos")))] NSItemProviderRepresentationVisibilityTeam = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSItemProviderRepresentationVisibilityGroup = 2, NSItemProviderRepresentationVisibilityOwnProcess = 3, } @@ -214,10 +216,12 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other suggestedName)] pub unsafe fn suggestedName(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setSuggestedName:)] pub unsafe fn setSuggestedName(&self, suggested_name: Option<&NSString>); diff --git a/Foundation/NSLocale.rs b/Foundation/NSLocale.rs index 55b5bd3b9..5608556f2 100644 --- a/Foundation/NSLocale.rs +++ b/Foundation/NSLocale.rs @@ -214,6 +214,12 @@ extern_methods!( #[method_id(@__retain_semantics Other localeWithLocaleIdentifier:)] pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id; + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; } diff --git a/Foundation/NSMapTable.rs b/Foundation/NSMapTable.rs index 58264caca..3fdf337bd 100644 --- a/Foundation/NSMapTable.rs +++ b/Foundation/NSMapTable.rs @@ -119,18 +119,22 @@ extern_methods!( ) -> Id>; #[deprecated = "GC no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other mapTableWithStrongToStrongObjects)] pub unsafe fn mapTableWithStrongToStrongObjects() -> Id; #[deprecated = "GC no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other mapTableWithWeakToStrongObjects)] pub unsafe fn mapTableWithWeakToStrongObjects() -> Id; #[deprecated = "GC no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other mapTableWithStrongToWeakObjects)] pub unsafe fn mapTableWithStrongToWeakObjects() -> Id; #[deprecated = "GC no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other mapTableWithWeakToWeakObjects)] pub unsafe fn mapTableWithWeakToWeakObjects() -> Id; diff --git a/Foundation/NSMeasurement.rs b/Foundation/NSMeasurement.rs index 55365e50a..0b50ae497 100644 --- a/Foundation/NSMeasurement.rs +++ b/Foundation/NSMeasurement.rs @@ -48,6 +48,12 @@ extern_methods!( #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; diff --git a/Foundation/NSMetadata.rs b/Foundation/NSMetadata.rs index f2dc90cce..699b00a26 100644 --- a/Foundation/NSMetadata.rs +++ b/Foundation/NSMetadata.rs @@ -256,6 +256,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSMetadataItem")] unsafe impl NSMetadataItem { #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithURL:)] pub unsafe fn initWithURL(this: Option>, url: &NSURL) -> Option>; diff --git a/Foundation/NSNetServices.rs b/Foundation/NSNetServices.rs index edaeb525f..862714548 100644 --- a/Foundation/NSNetServices.rs +++ b/Foundation/NSNetServices.rs @@ -18,6 +18,7 @@ ns_enum!( NSNetServicesCancelledError = -72005, NSNetServicesInvalidError = -72006, NSNetServicesTimeoutError = -72007, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSNetServicesMissingRequiredConfigurationError = -72008, } ); @@ -34,6 +35,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSNetService")] #[deprecated = "Use nw_connection_t or nw_listener_t in Network framework instead"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSNetService; #[cfg(feature = "Foundation_NSNetService")] @@ -177,6 +179,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSNetServiceBrowser")] #[deprecated = "Use nw_browser_t in Network framework instead"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct NSNetServiceBrowser; #[cfg(feature = "Foundation_NSNetServiceBrowser")] @@ -247,6 +250,7 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSNetServiceDelegate: NSObjectProtocol { #[cfg(feature = "Foundation_NSNetService")] #[optional] @@ -325,6 +329,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSNetServiceBrowserDelegate: NSObjectProtocol { #[cfg(feature = "Foundation_NSNetServiceBrowser")] #[optional] diff --git a/Foundation/NSOrderedCollectionChange.rs b/Foundation/NSOrderedCollectionChange.rs index aca963c80..8e9de2e16 100644 --- a/Foundation/NSOrderedCollectionChange.rs +++ b/Foundation/NSOrderedCollectionChange.rs @@ -68,6 +68,12 @@ extern_methods!( #[method(associatedIndex)] pub unsafe fn associatedIndex(&self) -> NSUInteger; + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; diff --git a/Foundation/NSPathUtilities.rs b/Foundation/NSPathUtilities.rs index 29deae194..c3128ca4d 100644 --- a/Foundation/NSPathUtilities.rs +++ b/Foundation/NSPathUtilities.rs @@ -148,10 +148,12 @@ ns_enum!( NSPrinterDescriptionDirectory = 20, NSSharedPublicDirectory = 21, NSPreferencePanesDirectory = 22, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSApplicationScriptsDirectory = 23, NSItemReplacementDirectory = 99, NSAllApplicationsDirectory = 100, NSAllLibrariesDirectory = 101, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] NSTrashDirectory = 102, } ); diff --git a/Foundation/NSPointerArray.rs b/Foundation/NSPointerArray.rs index 17573edfd..cf538bafd 100644 --- a/Foundation/NSPointerArray.rs +++ b/Foundation/NSPointerArray.rs @@ -92,10 +92,12 @@ extern_methods!( #[cfg(feature = "Foundation_NSPointerArray")] unsafe impl NSPointerArray { #[deprecated = "GC no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other pointerArrayWithStrongObjects)] pub unsafe fn pointerArrayWithStrongObjects() -> Id; #[deprecated = "GC no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other pointerArrayWithWeakObjects)] pub unsafe fn pointerArrayWithWeakObjects() -> Id; diff --git a/Foundation/NSPointerFunctions.rs b/Foundation/NSPointerFunctions.rs index e5a25e19a..37fcf6402 100644 --- a/Foundation/NSPointerFunctions.rs +++ b/Foundation/NSPointerFunctions.rs @@ -8,6 +8,7 @@ ns_options!( pub enum NSPointerFunctionsOptions { NSPointerFunctionsStrongMemory = 0 << 0, #[deprecated = "GC no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSPointerFunctionsZeroingWeakMemory = 1 << 0, NSPointerFunctionsOpaqueMemory = 2 << 0, NSPointerFunctionsMallocMemory = 3 << 0, diff --git a/Foundation/NSPredicate.rs b/Foundation/NSPredicate.rs index 8e3348e8c..bb0e831fd 100644 --- a/Foundation/NSPredicate.rs +++ b/Foundation/NSPredicate.rs @@ -34,6 +34,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other predicateFromMetadataQueryString:)] pub unsafe fn predicateFromMetadataQueryString( query_string: &NSString, diff --git a/Foundation/NSProcessInfo.rs b/Foundation/NSProcessInfo.rs index ffbbe8e2b..e0b7ccbad 100644 --- a/Foundation/NSProcessInfo.rs +++ b/Foundation/NSProcessInfo.rs @@ -114,23 +114,29 @@ extern_methods!( #[method(systemUptime)] pub unsafe fn systemUptime(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(disableSuddenTermination)] pub unsafe fn disableSuddenTermination(&self); + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(enableSuddenTermination)] pub unsafe fn enableSuddenTermination(&self); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(disableAutomaticTermination:)] pub unsafe fn disableAutomaticTermination(&self, reason: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(enableAutomaticTermination:)] pub unsafe fn enableAutomaticTermination(&self, reason: &NSString); + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(automaticTerminationSupportEnabled)] pub unsafe fn automaticTerminationSupportEnabled(&self) -> bool; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setAutomaticTerminationSupportEnabled:)] pub unsafe fn setAutomaticTerminationSupportEnabled( &self, @@ -182,6 +188,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos")))] #[method(performExpiringActivityWithReason:usingBlock:)] pub unsafe fn performExpiringActivityWithReason_usingBlock( &self, @@ -196,10 +203,12 @@ extern_methods!( #[cfg(feature = "Foundation_NSProcessInfo")] unsafe impl NSProcessInfo { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other userName)] pub unsafe fn userName(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other fullUserName)] pub unsafe fn fullUserName(&self) -> Id; } diff --git a/Foundation/NSProgress.rs b/Foundation/NSProgress.rs index e37e7b2f4..b476a13f2 100644 --- a/Foundation/NSProgress.rs +++ b/Foundation/NSProgress.rs @@ -228,22 +228,27 @@ extern_methods!( #[method(setFileCompletedCount:)] pub unsafe fn setFileCompletedCount(&self, file_completed_count: Option<&NSNumber>); + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(publish)] pub unsafe fn publish(&self); + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(unpublish)] pub unsafe fn unpublish(&self); #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other addSubscriberForFileURL:withPublishingHandler:)] pub unsafe fn addSubscriberForFileURL_withPublishingHandler( url: &NSURL, publishing_handler: NSProgressPublishingHandler, ) -> Id; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(removeSubscriber:)] pub unsafe fn removeSubscriber(subscriber: &Object); + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(isOld)] pub unsafe fn isOld(&self) -> bool; } diff --git a/Foundation/NSScriptClassDescription.rs b/Foundation/NSScriptClassDescription.rs index fbe105cec..88ce7f210 100644 --- a/Foundation/NSScriptClassDescription.rs +++ b/Foundation/NSScriptClassDescription.rs @@ -104,18 +104,22 @@ extern_methods!( ) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(hasPropertyForKey:)] pub unsafe fn hasPropertyForKey(&self, key: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(hasOrderedToManyRelationshipForKey:)] pub unsafe fn hasOrderedToManyRelationshipForKey(&self, key: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(hasReadablePropertyForKey:)] pub unsafe fn hasReadablePropertyForKey(&self, key: &NSString) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(hasWritablePropertyForKey:)] pub unsafe fn hasWritablePropertyForKey(&self, key: &NSString) -> bool; } @@ -127,6 +131,7 @@ extern_methods!( unsafe impl NSScriptClassDescription { #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(isReadOnlyKey:)] pub unsafe fn isReadOnlyKey(&self, key: &NSString) -> bool; } diff --git a/Foundation/NSScriptCommand.rs b/Foundation/NSScriptCommand.rs index 67bbb99ab..735af6bab 100644 --- a/Foundation/NSScriptCommand.rs +++ b/Foundation/NSScriptCommand.rs @@ -106,12 +106,14 @@ extern_methods!( pub unsafe fn setScriptErrorNumber(&self, script_error_number: NSInteger); #[cfg(feature = "Foundation_NSAppleEventDescriptor")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other scriptErrorOffendingObjectDescriptor)] pub unsafe fn scriptErrorOffendingObjectDescriptor( &self, ) -> Option>; #[cfg(feature = "Foundation_NSAppleEventDescriptor")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setScriptErrorOffendingObjectDescriptor:)] pub unsafe fn setScriptErrorOffendingObjectDescriptor( &self, @@ -119,12 +121,14 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSAppleEventDescriptor")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other scriptErrorExpectedTypeDescriptor)] pub unsafe fn scriptErrorExpectedTypeDescriptor( &self, ) -> Option>; #[cfg(feature = "Foundation_NSAppleEventDescriptor")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setScriptErrorExpectedTypeDescriptor:)] pub unsafe fn setScriptErrorExpectedTypeDescriptor( &self, diff --git a/Foundation/NSScriptCommandDescription.rs b/Foundation/NSScriptCommandDescription.rs index 2ac7f8b67..a909e35ce 100644 --- a/Foundation/NSScriptCommandDescription.rs +++ b/Foundation/NSScriptCommandDescription.rs @@ -23,6 +23,12 @@ unsafe impl NSObjectProtocol for NSScriptCommandDescription {} extern_methods!( #[cfg(feature = "Foundation_NSScriptCommandDescription")] unsafe impl NSScriptCommandDescription { + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; diff --git a/Foundation/NSScriptObjectSpecifiers.rs b/Foundation/NSScriptObjectSpecifiers.rs index 6ce2f9758..9dfb5301f 100644 --- a/Foundation/NSScriptObjectSpecifiers.rs +++ b/Foundation/NSScriptObjectSpecifiers.rs @@ -67,6 +67,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSScriptObjectSpecifier")] unsafe impl NSScriptObjectSpecifier { #[cfg(feature = "Foundation_NSAppleEventDescriptor")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other objectSpecifierWithDescriptor:)] pub unsafe fn objectSpecifierWithDescriptor( descriptor: &NSAppleEventDescriptor, @@ -181,6 +182,7 @@ extern_methods!( pub unsafe fn evaluationErrorSpecifier(&self) -> Option>; #[cfg(feature = "Foundation_NSAppleEventDescriptor")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other descriptor)] pub unsafe fn descriptor(&self) -> Option>; } @@ -327,10 +329,12 @@ extern_methods!( specifier: &NSScriptObjectSpecifier, ) -> Id; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(position)] pub unsafe fn position(&self) -> NSInsertionPosition; #[cfg(feature = "Foundation_NSScriptObjectSpecifier")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other objectSpecifier)] pub unsafe fn objectSpecifier(&self) -> Id; diff --git a/Foundation/NSScriptWhoseTests.rs b/Foundation/NSScriptWhoseTests.rs index 3480c5169..e43fc0fde 100644 --- a/Foundation/NSScriptWhoseTests.rs +++ b/Foundation/NSScriptWhoseTests.rs @@ -116,6 +116,12 @@ unsafe impl NSObjectProtocol for NSSpecifierTest {} extern_methods!( #[cfg(feature = "Foundation_NSSpecifierTest")] unsafe impl NSSpecifierTest { + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; diff --git a/Foundation/NSSet.rs b/Foundation/NSSet.rs index 3919f9814..ec3a7ff68 100644 --- a/Foundation/NSSet.rs +++ b/Foundation/NSSet.rs @@ -415,10 +415,12 @@ extern_methods!( NSMutableSet { #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other setWithCollectionViewIndexPath:)] pub unsafe fn setWithCollectionViewIndexPath(index_path: &NSIndexPath) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other setWithCollectionViewIndexPaths:)] pub unsafe fn setWithCollectionViewIndexPaths( index_paths: &NSArray, @@ -512,10 +514,12 @@ extern_methods!( NSCountedSet { #[cfg(feature = "Foundation_NSIndexPath")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other setWithCollectionViewIndexPath:)] pub unsafe fn setWithCollectionViewIndexPath(index_path: &NSIndexPath) -> Id; #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSIndexPath"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other setWithCollectionViewIndexPaths:)] pub unsafe fn setWithCollectionViewIndexPaths( index_paths: &NSArray, diff --git a/Foundation/NSSpellServer.rs b/Foundation/NSSpellServer.rs index 8d1ad4275..5921b3fdc 100644 --- a/Foundation/NSSpellServer.rs +++ b/Foundation/NSSpellServer.rs @@ -125,6 +125,7 @@ extern_protocol!( feature = "Foundation_NSSpellServer", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(spellServer:checkGrammarInString:language:details:)] unsafe fn spellServer_checkGrammarInString_language_details( @@ -143,6 +144,7 @@ extern_protocol!( feature = "Foundation_NSString", feature = "Foundation_NSTextCheckingResult" ))] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[optional] #[method_id(@__retain_semantics Other spellServer:checkString:offset:types:options:orthography:wordCount:)] unsafe fn spellServer_checkString_offset_types_options_orthography_wordCount( @@ -157,6 +159,7 @@ extern_protocol!( ) -> Option>>; #[cfg(all(feature = "Foundation_NSSpellServer", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(spellServer:recordResponse:toCorrection:forWord:language:)] unsafe fn spellServer_recordResponse_toCorrection_forWord_language( diff --git a/Foundation/NSStream.rs b/Foundation/NSStream.rs index 1f3705cdd..30d2d4536 100644 --- a/Foundation/NSStream.rs +++ b/Foundation/NSStream.rs @@ -192,6 +192,7 @@ extern_methods!( feature = "Foundation_NSString" ))] #[deprecated = "Use nw_connection_t in Network framework instead"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(getStreamsToHostWithName:port:inputStream:outputStream:)] pub unsafe fn getStreamsToHostWithName_port_inputStream_outputStream( hostname: &NSString, @@ -206,6 +207,7 @@ extern_methods!( feature = "Foundation_NSOutputStream" ))] #[deprecated = "Use nw_connection_t in Network framework instead"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(getStreamsToHost:port:inputStream:outputStream:)] pub unsafe fn getStreamsToHost_port_inputStream_outputStream( host: &NSHost, diff --git a/Foundation/NSTask.rs b/Foundation/NSTask.rs index a78a0b413..86985aa9b 100644 --- a/Foundation/NSTask.rs +++ b/Foundation/NSTask.rs @@ -5,8 +5,11 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum NSTaskTerminationReason { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSTaskTerminationReasonExit = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSTaskTerminationReasonUncaughtSignal = 2, } ); @@ -32,10 +35,12 @@ extern_methods!( pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other executableURL)] pub unsafe fn executableURL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setExecutableURL:)] pub unsafe fn setExecutableURL(&self, executable_url: Option<&NSURL>); @@ -56,10 +61,12 @@ extern_methods!( pub unsafe fn setEnvironment(&self, environment: Option<&NSDictionary>); #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other currentDirectoryURL)] pub unsafe fn currentDirectoryURL(&self) -> Option>; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setCurrentDirectoryURL:)] pub unsafe fn setCurrentDirectoryURL(&self, current_directory_url: Option<&NSURL>); @@ -82,6 +89,7 @@ extern_methods!( pub unsafe fn setStandardError(&self, standard_error: Option<&Object>); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(launchAndReturnError:_)] pub unsafe fn launchAndReturnError(&self) -> Result<(), Id>; @@ -106,12 +114,15 @@ extern_methods!( #[method(terminationStatus)] pub unsafe fn terminationStatus(&self) -> c_int; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(terminationReason)] pub unsafe fn terminationReason(&self) -> NSTaskTerminationReason; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(terminationHandler)] pub unsafe fn terminationHandler(&self) -> *mut Block<(NonNull,), ()>; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setTerminationHandler:)] pub unsafe fn setTerminationHandler( &self, @@ -136,6 +147,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other launchedTaskWithExecutableURL:arguments:error:terminationHandler:)] pub unsafe fn launchedTaskWithExecutableURL_arguments_error_terminationHandler( url: &NSURL, @@ -155,30 +167,36 @@ extern_methods!( unsafe impl NSTask { #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other launchPath)] pub unsafe fn launchPath(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setLaunchPath:)] pub unsafe fn setLaunchPath(&self, launch_path: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other currentDirectoryPath)] pub unsafe fn currentDirectoryPath(&self) -> Id; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setCurrentDirectoryPath:)] pub unsafe fn setCurrentDirectoryPath(&self, current_directory_path: &NSString); #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(launch)] pub unsafe fn launch(&self); #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other launchedTaskWithLaunchPath:arguments:)] pub unsafe fn launchedTaskWithLaunchPath_arguments( path: &NSString, diff --git a/Foundation/NSURL.rs b/Foundation/NSURL.rs index eb92e03d3..8fbc47ac0 100644 --- a/Foundation/NSURL.rs +++ b/Foundation/NSURL.rs @@ -335,7 +335,9 @@ ns_options!( NSURLBookmarkCreationPreferFileIDResolution = 1 << 8, NSURLBookmarkCreationMinimalBookmark = 1 << 9, NSURLBookmarkCreationSuitableForBookmarkFile = 1 << 10, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSURLBookmarkCreationWithSecurityScope = 1 << 11, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 1 << 12, NSURLBookmarkCreationWithoutImplicitSecurityScope = 1 << 29, } @@ -346,6 +348,7 @@ ns_options!( pub enum NSURLBookmarkResolutionOptions { NSURLBookmarkResolutionWithoutUI = 1 << 8, NSURLBookmarkResolutionWithoutMounting = 1 << 9, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSURLBookmarkResolutionWithSecurityScope = 1 << 10, NSURLBookmarkResolutionWithoutImplicitStartAccessing = 1 << 15, } diff --git a/Foundation/NSURLConnection.rs b/Foundation/NSURLConnection.rs index ada07d9e2..62cc3a18f 100644 --- a/Foundation/NSURLConnection.rs +++ b/Foundation/NSURLConnection.rs @@ -22,6 +22,7 @@ extern_methods!( unsafe impl NSURLConnection { #[cfg(feature = "Foundation_NSURLRequest")] #[deprecated = "Use NSURLSession (see NSURLSession.h)"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithRequest:delegate:startImmediately:)] pub unsafe fn initWithRequest_delegate_startImmediately( this: Option>, @@ -32,6 +33,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSURLRequest")] #[deprecated = "Use NSURLSession (see NSURLSession.h)"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithRequest:delegate:)] pub unsafe fn initWithRequest_delegate( this: Option>, @@ -41,6 +43,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSURLRequest")] #[deprecated = "Use NSURLSession (see NSURLSession.h)"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other connectionWithRequest:delegate:)] pub unsafe fn connectionWithRequest_delegate( request: &NSURLRequest, @@ -279,6 +282,7 @@ extern_methods!( feature = "Foundation_NSURLResponse" ))] #[deprecated = "Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other sendSynchronousRequest:returningResponse:error:_)] pub unsafe fn sendSynchronousRequest_returningResponse_error( request: &NSURLRequest, @@ -299,6 +303,7 @@ extern_methods!( feature = "Foundation_NSURLResponse" ))] #[deprecated = "Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(sendAsynchronousRequest:queue:completionHandler:)] pub unsafe fn sendAsynchronousRequest_queue_completionHandler( request: &NSURLRequest, diff --git a/Foundation/NSURLDownload.rs b/Foundation/NSURLDownload.rs index 09eaafc6b..a6a0e31af 100644 --- a/Foundation/NSURLDownload.rs +++ b/Foundation/NSURLDownload.rs @@ -6,6 +6,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSURLDownload")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct NSURLDownload; #[cfg(feature = "Foundation_NSURLDownload")] @@ -67,6 +68,7 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSURLDownloadDelegate: NSObjectProtocol { #[cfg(feature = "Foundation_NSURLDownload")] #[optional] diff --git a/Foundation/NSURLHandle.rs b/Foundation/NSURLHandle.rs index 4aa80da42..220207dea 100644 --- a/Foundation/NSURLHandle.rs +++ b/Foundation/NSURLHandle.rs @@ -37,9 +37,11 @@ ns_enum!( extern_protocol!( #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait NSURLHandleClient { #[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSURLHandle"))] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(URLHandle:resourceDataDidBecomeAvailable:)] unsafe fn URLHandle_resourceDataDidBecomeAvailable( &self, @@ -49,21 +51,25 @@ extern_protocol!( #[cfg(feature = "Foundation_NSURLHandle")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(URLHandleResourceDidBeginLoading:)] unsafe fn URLHandleResourceDidBeginLoading(&self, sender: Option<&NSURLHandle>); #[cfg(feature = "Foundation_NSURLHandle")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(URLHandleResourceDidFinishLoading:)] unsafe fn URLHandleResourceDidFinishLoading(&self, sender: Option<&NSURLHandle>); #[cfg(feature = "Foundation_NSURLHandle")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(URLHandleResourceDidCancelLoading:)] unsafe fn URLHandleResourceDidCancelLoading(&self, sender: Option<&NSURLHandle>); #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURLHandle"))] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(URLHandle:resourceDidFailLoadingWithReason:)] unsafe fn URLHandle_resourceDidFailLoadingWithReason( &self, @@ -93,79 +99,96 @@ extern_methods!( #[cfg(feature = "Foundation_NSURLHandle")] unsafe impl NSURLHandle { #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(registerURLHandleClass:)] pub unsafe fn registerURLHandleClass(an_url_handle_subclass: Option<&Class>); #[cfg(feature = "Foundation_NSURL")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(URLHandleClassForURL:)] pub unsafe fn URLHandleClassForURL(an_url: Option<&NSURL>) -> Option<&'static Class>; #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(status)] pub unsafe fn status(&self) -> NSURLHandleStatus; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other failureReason)] pub unsafe fn failureReason(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(addClient:)] pub unsafe fn addClient(&self, client: Option<&ProtocolObject>); #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(removeClient:)] pub unsafe fn removeClient(&self, client: Option<&ProtocolObject>); #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(loadInBackground)] pub unsafe fn loadInBackground(&self); #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(cancelLoadInBackground)] pub unsafe fn cancelLoadInBackground(&self); #[cfg(feature = "Foundation_NSData")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other resourceData)] pub unsafe fn resourceData(&self) -> Option>; #[cfg(feature = "Foundation_NSData")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other availableResourceData)] pub unsafe fn availableResourceData(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(expectedResourceDataSize)] pub unsafe fn expectedResourceDataSize(&self) -> c_longlong; #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(flushCachedData)] pub unsafe fn flushCachedData(&self); #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(backgroundLoadDidFailWithReason:)] pub unsafe fn backgroundLoadDidFailWithReason(&self, reason: Option<&NSString>); #[cfg(feature = "Foundation_NSData")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(didLoadBytes:loadComplete:)] pub unsafe fn didLoadBytes_loadComplete(&self, new_bytes: Option<&NSData>, yorn: bool); #[cfg(feature = "Foundation_NSURL")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(canInitWithURL:)] pub unsafe fn canInitWithURL(an_url: Option<&NSURL>) -> bool; #[cfg(feature = "Foundation_NSURL")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other cachedHandleForURL:)] pub unsafe fn cachedHandleForURL(an_url: Option<&NSURL>) -> Option>; #[cfg(feature = "Foundation_NSURL")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithURL:cached:)] pub unsafe fn initWithURL_cached( this: Option>, @@ -175,11 +198,13 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other propertyForKey:)] pub unsafe fn propertyForKey(&self, property_key: Option<&NSString>) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other propertyForKeyIfAvailable:)] pub unsafe fn propertyForKeyIfAvailable( &self, @@ -188,6 +213,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(writeProperty:forKey:)] pub unsafe fn writeProperty_forKey( &self, @@ -197,19 +223,23 @@ extern_methods!( #[cfg(feature = "Foundation_NSData")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(writeData:)] pub unsafe fn writeData(&self, data: Option<&NSData>) -> bool; #[cfg(feature = "Foundation_NSData")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other loadInForeground)] pub unsafe fn loadInForeground(&self) -> Option>; #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(beginLoadInBackground)] pub unsafe fn beginLoadInBackground(&self); #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(endLoadInBackground)] pub unsafe fn endLoadInBackground(&self); } diff --git a/Foundation/NSURLSession.rs b/Foundation/NSURLSession.rs index e0d76b694..157f5b60d 100644 --- a/Foundation/NSURLSession.rs +++ b/Foundation/NSURLSession.rs @@ -196,6 +196,7 @@ extern_methods!( feature = "Foundation_NSURLSessionStreamTask" ))] #[deprecated = "Use nw_connection_t in Network framework instead"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other streamTaskWithNetService:)] pub unsafe fn streamTaskWithNetService( &self, @@ -813,10 +814,15 @@ extern_methods!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum NSURLSessionMultipathServiceType { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] NSURLSessionMultipathServiceTypeNone = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] NSURLSessionMultipathServiceTypeHandover = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] NSURLSessionMultipathServiceTypeInteractive = 2, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] NSURLSessionMultipathServiceTypeAggregate = 3, } ); @@ -1042,9 +1048,11 @@ extern_methods!( #[method(setProtocolClasses:)] pub unsafe fn setProtocolClasses(&self, protocol_classes: Option<&NSArray>); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(multipathServiceType)] pub unsafe fn multipathServiceType(&self) -> NSURLSessionMultipathServiceType; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(setMultipathServiceType:)] pub unsafe fn setMultipathServiceType( &self, diff --git a/Foundation/NSUnit.rs b/Foundation/NSUnit.rs index 1b7820766..3fcf097a2 100644 --- a/Foundation/NSUnit.rs +++ b/Foundation/NSUnit.rs @@ -100,9 +100,21 @@ extern_methods!( #[method_id(@__retain_semantics Other symbol)] pub unsafe fn symbol(&self) -> Id; + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; diff --git a/Foundation/NSUserActivity.rs b/Foundation/NSUserActivity.rs index cea721c71..b9361c3c5 100644 --- a/Foundation/NSUserActivity.rs +++ b/Foundation/NSUserActivity.rs @@ -170,9 +170,11 @@ extern_methods!( #[method(setEligibleForPublicIndexing:)] pub unsafe fn setEligibleForPublicIndexing(&self, eligible_for_public_indexing: bool); + #[cfg(not(any(target_os = "macos")))] #[method(isEligibleForPrediction)] pub unsafe fn isEligibleForPrediction(&self) -> bool; + #[cfg(not(any(target_os = "macos")))] #[method(setEligibleForPrediction:)] pub unsafe fn setEligibleForPrediction(&self, eligible_for_prediction: bool); diff --git a/Foundation/NSUserNotification.rs b/Foundation/NSUserNotification.rs index e40925eeb..ddc1ec368 100644 --- a/Foundation/NSUserNotification.rs +++ b/Foundation/NSUserNotification.rs @@ -6,14 +6,20 @@ use crate::Foundation::*; ns_enum!( #[underlying(NSInteger)] #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum NSUserNotificationActivationType { #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSUserNotificationActivationTypeNone = 0, #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSUserNotificationActivationTypeContentsClicked = 1, #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSUserNotificationActivationTypeActionButtonClicked = 2, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSUserNotificationActivationTypeReplied = 3, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] NSUserNotificationActivationTypeAdditionalActionClicked = 4, } ); @@ -22,6 +28,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSUserNotification")] #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct NSUserNotification; #[cfg(feature = "Foundation_NSUserNotification")] @@ -142,28 +149,35 @@ extern_methods!( pub unsafe fn setOtherButtonTitle(&self, other_button_title: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>); + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(hasReplyButton)] pub unsafe fn hasReplyButton(&self) -> bool; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setHasReplyButton:)] pub unsafe fn setHasReplyButton(&self, has_reply_button: bool); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other responsePlaceholder)] pub unsafe fn responsePlaceholder(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setResponsePlaceholder:)] pub unsafe fn setResponsePlaceholder(&self, response_placeholder: Option<&NSString>); #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other response)] pub unsafe fn response(&self) -> Option>; @@ -171,6 +185,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSUserNotificationAction" ))] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other additionalActions)] pub unsafe fn additionalActions(&self) -> Option>>; @@ -178,6 +193,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "Foundation_NSUserNotificationAction" ))] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setAdditionalActions:)] pub unsafe fn setAdditionalActions( &self, @@ -185,6 +201,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSUserNotificationAction")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other additionalActivationAction)] pub unsafe fn additionalActivationAction(&self) -> Option>; } @@ -194,6 +211,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSUserNotificationAction")] #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct NSUserNotificationAction; #[cfg(feature = "Foundation_NSUserNotificationAction")] @@ -231,6 +249,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSUserNotificationCenter")] #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct NSUserNotificationCenter; #[cfg(feature = "Foundation_NSUserNotificationCenter")] @@ -311,6 +330,7 @@ extern_protocol!( feature = "Foundation_NSUserNotificationCenter" ))] #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(userNotificationCenter:didDeliverNotification:)] unsafe fn userNotificationCenter_didDeliverNotification( @@ -324,6 +344,7 @@ extern_protocol!( feature = "Foundation_NSUserNotificationCenter" ))] #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(userNotificationCenter:didActivateNotification:)] unsafe fn userNotificationCenter_didActivateNotification( @@ -337,6 +358,7 @@ extern_protocol!( feature = "Foundation_NSUserNotificationCenter" ))] #[deprecated = "All NSUserNotifications API should be replaced with UserNotifications.frameworks API"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(userNotificationCenter:shouldPresentNotification:)] unsafe fn userNotificationCenter_shouldPresentNotification( diff --git a/Foundation/NSUserScriptTask.rs b/Foundation/NSUserScriptTask.rs index ecc4c525b..e0d0cbd80 100644 --- a/Foundation/NSUserScriptTask.rs +++ b/Foundation/NSUserScriptTask.rs @@ -8,6 +8,7 @@ pub type NSUserScriptTaskCompletionHandler = *mut Block<(*mut NSError,), ()>; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSUserScriptTask")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct NSUserScriptTask; #[cfg(feature = "Foundation_NSUserScriptTask")] @@ -46,6 +47,7 @@ pub type NSUserUnixTaskCompletionHandler = *mut Block<(*mut NSError,), ()>; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSUserUnixTask")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct NSUserUnixTask; #[cfg(feature = "Foundation_NSUserUnixTask")] @@ -101,6 +103,7 @@ pub type NSUserAppleScriptTaskCompletionHandler = extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSUserAppleScriptTask")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct NSUserAppleScriptTask; #[cfg(feature = "Foundation_NSUserAppleScriptTask")] @@ -131,6 +134,7 @@ pub type NSUserAutomatorTaskCompletionHandler = *mut Block<(*mut Object, *mut NS extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "Foundation_NSUserAutomatorTask")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct NSUserAutomatorTask; #[cfg(feature = "Foundation_NSUserAutomatorTask")] diff --git a/Foundation/NSXMLDTD.rs b/Foundation/NSXMLDTD.rs index 9009dc384..6906df7d0 100644 --- a/Foundation/NSXMLDTD.rs +++ b/Foundation/NSXMLDTD.rs @@ -24,6 +24,12 @@ extern_methods!( #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any( + target_os = "ios", + target_os = "macos", + target_os = "tvos", + target_os = "watchos" + )))] #[method_id(@__retain_semantics Init initWithKind:options:)] pub unsafe fn initWithKind_options( this: Option>, diff --git a/Foundation/NSXPCConnection.rs b/Foundation/NSXPCConnection.rs index ea7c68f4e..905a55a84 100644 --- a/Foundation/NSXPCConnection.rs +++ b/Foundation/NSXPCConnection.rs @@ -55,6 +55,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSXPCConnection")] unsafe impl NSXPCConnection { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithServiceName:)] pub unsafe fn initWithServiceName( this: Option>, @@ -66,6 +67,7 @@ extern_methods!( pub unsafe fn serviceName(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithMachServiceName:options:)] pub unsafe fn initWithMachServiceName_options( this: Option>, @@ -157,6 +159,7 @@ extern_methods!( pub unsafe fn scheduleSendBarrierBlock(&self, block: &Block<(), ()>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setCodeSigningRequirement:)] pub unsafe fn setCodeSigningRequirement(&self, requirement: &NSString); } @@ -186,6 +189,7 @@ extern_methods!( pub unsafe fn anonymousListener() -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithMachServiceName:)] pub unsafe fn initWithMachServiceName( this: Option>, @@ -218,6 +222,7 @@ extern_methods!( pub unsafe fn invalidate(&self); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setConnectionCodeSigningRequirement:)] pub unsafe fn setConnectionCodeSigningRequirement(&self, requirement: &NSString); } diff --git a/GameController/GCEventViewController.rs b/GameController/GCEventViewController.rs index 89ad7ed0e..286933761 100644 --- a/GameController/GCEventViewController.rs +++ b/GameController/GCEventViewController.rs @@ -51,6 +51,7 @@ extern_methods!( #[cfg(feature = "GameController_GCEventViewController")] unsafe impl GCEventViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/GameController/GCGearShifterElement.rs b/GameController/GCGearShifterElement.rs index 05fd0448b..94e70172b 100644 --- a/GameController/GCGearShifterElement.rs +++ b/GameController/GCGearShifterElement.rs @@ -8,6 +8,7 @@ use crate::GameController::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameController_GCGearShifterElement")] + #[cfg(not(any(target_os = "ios")))] pub struct GCGearShifterElement; #[cfg(feature = "GameController_GCGearShifterElement")] diff --git a/GameController/GCRacingWheel.rs b/GameController/GCRacingWheel.rs index 0299b8474..6141f268f 100644 --- a/GameController/GCRacingWheel.rs +++ b/GameController/GCRacingWheel.rs @@ -12,6 +12,7 @@ extern_static!(GCRacingWheelDidDisconnectNotification: &'static NSString); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameController_GCRacingWheel")] + #[cfg(not(any(target_os = "ios")))] pub struct GCRacingWheel; #[cfg(feature = "GameController_GCRacingWheel")] diff --git a/GameController/GCRacingWheelInput.rs b/GameController/GCRacingWheelInput.rs index 716bc473b..c81ceb3e7 100644 --- a/GameController/GCRacingWheelInput.rs +++ b/GameController/GCRacingWheelInput.rs @@ -8,6 +8,7 @@ use crate::GameController::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameController_GCRacingWheelInputState")] + #[cfg(not(any(target_os = "ios")))] pub struct GCRacingWheelInputState; #[cfg(feature = "GameController_GCRacingWheelInputState")] @@ -47,6 +48,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameController_GCRacingWheelInput")] + #[cfg(not(any(target_os = "ios")))] pub struct GCRacingWheelInput; #[cfg(feature = "GameController_GCRacingWheelInput")] diff --git a/GameController/GCSteeringWheelElement.rs b/GameController/GCSteeringWheelElement.rs index 1b51014b6..06938808d 100644 --- a/GameController/GCSteeringWheelElement.rs +++ b/GameController/GCSteeringWheelElement.rs @@ -8,6 +8,7 @@ use crate::GameController::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameController_GCSteeringWheelElement")] + #[cfg(not(any(target_os = "ios")))] pub struct GCSteeringWheelElement; #[cfg(feature = "GameController_GCSteeringWheelElement")] diff --git a/GameKit/GKAccessPoint.rs b/GameKit/GKAccessPoint.rs index cfd13039d..640f0abb4 100644 --- a/GameKit/GKAccessPoint.rs +++ b/GameKit/GKAccessPoint.rs @@ -41,9 +41,11 @@ extern_methods!( #[method(setActive:)] pub unsafe fn setActive(&self, active: bool); + #[cfg(not(any(target_os = "ios", target_os = "macos")))] #[method(isFocused)] pub unsafe fn isFocused(&self) -> bool; + #[cfg(not(any(target_os = "ios", target_os = "macos")))] #[method(setFocused:)] pub unsafe fn setFocused(&self, focused: bool); diff --git a/GameKit/GKAchievement.rs b/GameKit/GKAchievement.rs index a1c81abfd..f8366781f 100644 --- a/GameKit/GKAchievement.rs +++ b/GameKit/GKAchievement.rs @@ -118,6 +118,7 @@ extern_methods!( #[cfg(feature = "GameKit_GKAchievement")] unsafe impl GKAchievement { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Init initWithIdentifier:forPlayer:)] pub unsafe fn initWithIdentifier_forPlayer( this: Option>, @@ -126,6 +127,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other playerID)] pub unsafe fn playerID(&self) -> Option>; } diff --git a/GameKit/GKAchievementViewController.rs b/GameKit/GKAchievementViewController.rs index f461e9234..d4a71c32d 100644 --- a/GameKit/GKAchievementViewController.rs +++ b/GameKit/GKAchievementViewController.rs @@ -70,6 +70,7 @@ extern_methods!( /// Methods declared on superclass `GKGameCenterViewController` #[cfg(feature = "GameKit_GKAchievementViewController")] unsafe impl GKAchievementViewController { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithState:)] pub unsafe fn initWithState( this: Option>, @@ -77,6 +78,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithLeaderboardID:playerScope:timeScope:)] pub unsafe fn initWithLeaderboardID_playerScope_timeScope( this: Option>, @@ -86,6 +88,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "GameKit_GKLeaderboard")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithLeaderboard:playerScope:)] pub unsafe fn initWithLeaderboard_playerScope( this: Option>, @@ -94,6 +97,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithAchievementID:)] pub unsafe fn initWithAchievementID( this: Option>, @@ -107,6 +111,7 @@ extern_methods!( #[cfg(feature = "GameKit_GKAchievementViewController")] unsafe impl GKAchievementViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/GameKit/GKChallenge.rs b/GameKit/GKChallenge.rs index 5d9fafae0..2b8319b09 100644 --- a/GameKit/GKChallenge.rs +++ b/GameKit/GKChallenge.rs @@ -18,6 +18,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameKit_GKChallenge")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct GKChallenge; #[cfg(feature = "GameKit_GKChallenge")] @@ -91,6 +92,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameKit_GKScoreChallenge")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct GKScoreChallenge; #[cfg(feature = "GameKit_GKScoreChallenge")] @@ -121,6 +123,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameKit_GKAchievementChallenge")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct GKAchievementChallenge; #[cfg(feature = "GameKit_GKAchievementChallenge")] diff --git a/GameKit/GKChallengeEventHandler.rs b/GameKit/GKChallengeEventHandler.rs index 9c657b83b..ffd4b319a 100644 --- a/GameKit/GKChallengeEventHandler.rs +++ b/GameKit/GKChallengeEventHandler.rs @@ -7,6 +7,7 @@ use crate::GameKit::*; extern_protocol!( #[deprecated = "You should instead implement the GKChallengeListener protocol and register a listener with GKLocalPlayer."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait GKChallengeEventHandlerDelegate: NSObjectProtocol { #[cfg(feature = "GameKit_GKChallenge")] #[optional] diff --git a/GameKit/GKChallengesViewController.rs b/GameKit/GKChallengesViewController.rs index 3399c6fe0..a53589557 100644 --- a/GameKit/GKChallengesViewController.rs +++ b/GameKit/GKChallengesViewController.rs @@ -70,6 +70,7 @@ extern_methods!( #[cfg(feature = "GameKit_GKChallengesViewController")] unsafe impl GKChallengesViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/GameKit/GKCloudPlayer.rs b/GameKit/GKCloudPlayer.rs index 486259089..323b29969 100644 --- a/GameKit/GKCloudPlayer.rs +++ b/GameKit/GKCloudPlayer.rs @@ -9,6 +9,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameKit_GKCloudPlayer")] #[deprecated = "GKGameSession is deprecated. Use GKPlayer for both real-time and turn-based matchmaking APIs."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct GKCloudPlayer; #[cfg(feature = "GameKit_GKCloudPlayer")] diff --git a/GameKit/GKEventListener.rs b/GameKit/GKEventListener.rs index f52ccefff..c3bfaf6a9 100644 --- a/GameKit/GKEventListener.rs +++ b/GameKit/GKEventListener.rs @@ -8,16 +8,19 @@ use crate::GameKit::*; extern_protocol!( pub unsafe trait GKChallengeListener: NSObjectProtocol { #[cfg(all(feature = "GameKit_GKChallenge", feature = "GameKit_GKPlayer"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(player:wantsToPlayChallenge:)] unsafe fn player_wantsToPlayChallenge(&self, player: &GKPlayer, challenge: &GKChallenge); #[cfg(all(feature = "GameKit_GKChallenge", feature = "GameKit_GKPlayer"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(player:didReceiveChallenge:)] unsafe fn player_didReceiveChallenge(&self, player: &GKPlayer, challenge: &GKChallenge); #[cfg(all(feature = "GameKit_GKChallenge", feature = "GameKit_GKPlayer"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(player:didCompleteChallenge:issuedByFriend:)] unsafe fn player_didCompleteChallenge_issuedByFriend( @@ -28,6 +31,7 @@ extern_protocol!( ); #[cfg(all(feature = "GameKit_GKChallenge", feature = "GameKit_GKPlayer"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(player:issuedChallengeWasCompleted:byFriend:)] unsafe fn player_issuedChallengeWasCompleted_byFriend( diff --git a/GameKit/GKFriendRequestComposeViewController.rs b/GameKit/GKFriendRequestComposeViewController.rs index 108c8b857..8c02ab930 100644 --- a/GameKit/GKFriendRequestComposeViewController.rs +++ b/GameKit/GKFriendRequestComposeViewController.rs @@ -101,6 +101,7 @@ extern_methods!( #[cfg(feature = "GameKit_GKFriendRequestComposeViewController")] unsafe impl GKFriendRequestComposeViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/GameKit/GKGameCenterViewController.rs b/GameKit/GKGameCenterViewController.rs index c5bd78766..f53cb8660 100644 --- a/GameKit/GKGameCenterViewController.rs +++ b/GameKit/GKGameCenterViewController.rs @@ -67,6 +67,7 @@ extern_methods!( game_center_delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithState:)] pub unsafe fn initWithState( this: Option>, @@ -74,6 +75,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithLeaderboardID:playerScope:timeScope:)] pub unsafe fn initWithLeaderboardID_playerScope_timeScope( this: Option>, @@ -83,6 +85,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "GameKit_GKLeaderboard")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithLeaderboard:playerScope:)] pub unsafe fn initWithLeaderboard_playerScope( this: Option>, @@ -91,6 +94,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithAchievementID:)] pub unsafe fn initWithAchievementID( this: Option>, @@ -162,6 +166,7 @@ extern_methods!( #[cfg(feature = "GameKit_GKGameCenterViewController")] unsafe impl GKGameCenterViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/GameKit/GKGameSession.rs b/GameKit/GKGameSession.rs index e52c00196..321f29cc3 100644 --- a/GameKit/GKGameSession.rs +++ b/GameKit/GKGameSession.rs @@ -25,6 +25,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameKit_GKGameSession")] #[deprecated = "For real-time matches, use GKMatchmakerViewController. For turn-based matches, use GKTurnBasedMatchmakerViewController."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct GKGameSession; #[cfg(feature = "GameKit_GKGameSession")] diff --git a/GameKit/GKGameSessionError.rs b/GameKit/GKGameSessionError.rs index 76d18c280..b299d0c7e 100644 --- a/GameKit/GKGameSessionError.rs +++ b/GameKit/GKGameSessionError.rs @@ -10,38 +10,55 @@ extern_static!(GKGameSessionErrorDomain: &'static NSString); ns_enum!( #[underlying(NSInteger)] #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum GKGameSessionErrorCode { #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorUnknown = 1, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorNotAuthenticated = 2, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorSessionConflict = 3, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorSessionNotShared = 4, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorConnectionCancelledByUser = 5, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorConnectionFailed = 6, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorSessionHasMaxConnectedPlayers = 7, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorSendDataNotConnected = 8, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorSendDataNoRecipients = 9, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorSendDataNotReachable = 10, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorSendRateLimitReached = 11, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorBadContainer = 12, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorCloudQuotaExceeded = 13, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorNetworkFailure = 14, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorCloudDriveDisabled = 15, #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] GKGameSessionErrorInvalidSession = 16, } ); diff --git a/GameKit/GKGameSessionEventListener.rs b/GameKit/GKGameSessionEventListener.rs index 9e1f13892..a318d54f0 100644 --- a/GameKit/GKGameSessionEventListener.rs +++ b/GameKit/GKGameSessionEventListener.rs @@ -7,6 +7,7 @@ use crate::GameKit::*; extern_protocol!( #[deprecated = "Use GKLocalPlayerListener for multiplayer event notifications."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait GKGameSessionEventListener: NSObjectProtocol { #[cfg(all(feature = "GameKit_GKCloudPlayer", feature = "GameKit_GKGameSession"))] #[optional] @@ -81,10 +82,12 @@ extern_methods!( #[cfg(feature = "GameKit_GKGameSession")] unsafe impl GKGameSession { #[deprecated = "Use GKLocalPlayer's registerListener: to register for GKLocalPlayerListener event notifications."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(addEventListener:)] pub unsafe fn addEventListener(listener: &NSObject); #[deprecated = "Use GKLocalPlayer's unregisterListener: or unregisterAllListeners to unregister from GKLocalPlayerListener event notifications."] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(removeEventListener:)] pub unsafe fn removeEventListener(listener: &NSObject); } diff --git a/GameKit/GKLeaderboardViewController.rs b/GameKit/GKLeaderboardViewController.rs index 3fbbad44e..8439139ef 100644 --- a/GameKit/GKLeaderboardViewController.rs +++ b/GameKit/GKLeaderboardViewController.rs @@ -89,6 +89,7 @@ extern_methods!( /// Methods declared on superclass `GKGameCenterViewController` #[cfg(feature = "GameKit_GKLeaderboardViewController")] unsafe impl GKLeaderboardViewController { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithState:)] pub unsafe fn initWithState( this: Option>, @@ -96,6 +97,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithLeaderboardID:playerScope:timeScope:)] pub unsafe fn initWithLeaderboardID_playerScope_timeScope( this: Option>, @@ -105,6 +107,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "GameKit_GKLeaderboard")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithLeaderboard:playerScope:)] pub unsafe fn initWithLeaderboard_playerScope( this: Option>, @@ -113,6 +116,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithAchievementID:)] pub unsafe fn initWithAchievementID( this: Option>, @@ -126,6 +130,7 @@ extern_methods!( #[cfg(feature = "GameKit_GKLeaderboardViewController")] unsafe impl GKLeaderboardViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/GameKit/GKLocalPlayer.rs b/GameKit/GKLocalPlayer.rs index e4e1a397c..5cc736787 100644 --- a/GameKit/GKLocalPlayer.rs +++ b/GameKit/GKLocalPlayer.rs @@ -23,6 +23,7 @@ unsafe impl NSObjectProtocol for GKLocalPlayer {} extern_methods!( #[cfg(feature = "GameKit_GKLocalPlayer")] unsafe impl GKLocalPlayer { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other local)] pub unsafe fn local() -> Id; @@ -35,9 +36,11 @@ extern_methods!( #[method(isUnderage)] pub unsafe fn isUnderage(&self) -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isMultiplayerGamingRestricted)] pub unsafe fn isMultiplayerGamingRestricted(&self) -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isPersonalizedCommunicationRestricted)] pub unsafe fn isPersonalizedCommunicationRestricted(&self) -> bool; @@ -258,10 +261,12 @@ extern_methods!( authenticate_handler: Option<&Block<(*mut NSViewController, *mut NSError), ()>>, ); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isPresentingFriendRequestViewController)] pub unsafe fn isPresentingFriendRequestViewController(&self) -> bool; #[cfg(all(feature = "AppKit_NSWindow", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(presentFriendRequestCreatorFromWindow:error:_)] pub unsafe fn presentFriendRequestCreatorFromWindow_error( &self, @@ -275,6 +280,7 @@ extern_methods!( #[cfg(feature = "GameKit_GKLocalPlayer")] unsafe impl GKLocalPlayer { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other anonymousGuestPlayerWithIdentifier:)] pub unsafe fn anonymousGuestPlayerWithIdentifier(guest_identifier: &NSString) -> Id; } diff --git a/GameKit/GKMatch.rs b/GameKit/GKMatch.rs index 1d8b300df..89e8d29f9 100644 --- a/GameKit/GKMatch.rs +++ b/GameKit/GKMatch.rs @@ -25,6 +25,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameKit_GKMatch")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct GKMatch; #[cfg(feature = "GameKit_GKMatch")] @@ -98,6 +99,7 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait GKMatchDelegate: NSObjectProtocol { #[cfg(all( feature = "Foundation_NSData", diff --git a/GameKit/GKMatchmaker.rs b/GameKit/GKMatchmaker.rs index 93f93ad6f..ed59a3b66 100644 --- a/GameKit/GKMatchmaker.rs +++ b/GameKit/GKMatchmaker.rs @@ -153,6 +153,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameKit_GKInvite")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct GKInvite; #[cfg(feature = "GameKit_GKInvite")] @@ -190,11 +191,13 @@ extern_methods!( extern_protocol!( pub unsafe trait GKInviteEventListener { #[cfg(all(feature = "GameKit_GKInvite", feature = "GameKit_GKPlayer"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(player:didAcceptInvite:)] unsafe fn player_didAcceptInvite(&self, player: &GKPlayer, invite: &GKInvite); #[cfg(all(feature = "Foundation_NSArray", feature = "GameKit_GKPlayer"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(player:didRequestMatchWithRecipients:)] unsafe fn player_didRequestMatchWithRecipients( @@ -208,6 +211,7 @@ extern_protocol!( feature = "Foundation_NSString", feature = "GameKit_GKPlayer" ))] + #[cfg(not(any(target_os = "macos")))] #[optional] #[method(player:didRequestMatchWithPlayers:)] unsafe fn player_didRequestMatchWithPlayers( @@ -223,6 +227,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameKit_GKMatchmaker")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct GKMatchmaker; #[cfg(feature = "GameKit_GKMatchmaker")] @@ -325,16 +330,6 @@ extern_methods!( #[method(stopBrowsingForNearbyPlayers)] pub unsafe fn stopBrowsingForNearbyPlayers(&self); - - #[cfg(feature = "GameKit_GKPlayer")] - #[method(startGroupActivityWithPlayerHandler:)] - pub unsafe fn startGroupActivityWithPlayerHandler( - &self, - handler: &Block<(NonNull,), ()>, - ); - - #[method(stopGroupActivity)] - pub unsafe fn stopGroupActivity(&self); } ); diff --git a/GameKit/GKMatchmakerViewController.rs b/GameKit/GKMatchmakerViewController.rs index 00fc4048c..607d77135 100644 --- a/GameKit/GKMatchmakerViewController.rs +++ b/GameKit/GKMatchmakerViewController.rs @@ -222,6 +222,7 @@ extern_methods!( #[cfg(feature = "GameKit_GKMatchmakerViewController")] unsafe impl GKMatchmakerViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/GameKit/GKPlayer.rs b/GameKit/GKPlayer.rs index 3818ac5ec..cd3d21e0c 100644 --- a/GameKit/GKPlayer.rs +++ b/GameKit/GKPlayer.rs @@ -25,14 +25,17 @@ unsafe impl NSObjectProtocol for GKPlayer {} extern_methods!( #[cfg(feature = "GameKit_GKPlayer")] unsafe impl GKPlayer { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(scopedIDsArePersistent)] pub unsafe fn scopedIDsArePersistent(&self) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other gamePlayerID)] pub unsafe fn gamePlayerID(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other teamPlayerID)] pub unsafe fn teamPlayerID(&self) -> Id; @@ -45,13 +48,16 @@ extern_methods!( pub unsafe fn alias(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other anonymousGuestPlayerWithIdentifier:)] pub unsafe fn anonymousGuestPlayerWithIdentifier(guest_identifier: &NSString) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other guestIdentifier)] pub unsafe fn guestIdentifier(&self) -> Option>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(isInvitable)] pub unsafe fn isInvitable(&self) -> bool; } diff --git a/GameKit/GKPublicConstants.rs b/GameKit/GKPublicConstants.rs index 21ff5cb12..f2bc6b337 100644 --- a/GameKit/GKPublicConstants.rs +++ b/GameKit/GKPublicConstants.rs @@ -52,23 +52,41 @@ extern_static!(GKVoiceChatServiceErrorDomain: Option<&'static NSString>); ns_enum!( #[underlying(c_int)] + #[cfg(not(any(target_os = "macos")))] pub enum GKVoiceChatServiceError { + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceInternalError = 32000, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceNoRemotePacketsError = 32001, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceUnableToConnectError = 32002, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceRemoteParticipantHangupError = 32003, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceInvalidCallIDError = 32004, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceAudioUnavailableError = 32005, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceUninitializedClientError = 32006, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceClientMissingRequiredMethodsError = 32007, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceRemoteParticipantBusyError = 32008, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceRemoteParticipantCancelledError = 32009, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceRemoteParticipantResponseInvalidError = 32010, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceRemoteParticipantDeclinedInviteError = 32011, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceMethodCurrentlyInvalidError = 32012, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceNetworkConfigurationError = 32013, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceUnsupportedRemoteVersionError = 32014, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceOutOfMemoryError = 32015, + #[cfg(not(any(target_os = "macos")))] GKVoiceChatServiceInvalidParameterError = 32016, } ); diff --git a/GameKit/GKPublicProtocols.rs b/GameKit/GKPublicProtocols.rs index 3c99e5142..010b39c31 100644 --- a/GameKit/GKPublicProtocols.rs +++ b/GameKit/GKPublicProtocols.rs @@ -51,6 +51,7 @@ extern_protocol!( ); extern_protocol!( + #[cfg(not(any(target_os = "macos")))] pub unsafe trait GKVoiceChatClient: NSObjectProtocol { #[cfg(all( feature = "Foundation_NSData", diff --git a/GameKit/GKSavedGame.rs b/GameKit/GKSavedGame.rs index 5ca69c972..0fff8ba85 100644 --- a/GameKit/GKSavedGame.rs +++ b/GameKit/GKSavedGame.rs @@ -8,6 +8,7 @@ use crate::GameKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameKit_GKSavedGame")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct GKSavedGame; #[cfg(feature = "GameKit_GKSavedGame")] diff --git a/GameKit/GKSavedGameListener.rs b/GameKit/GKSavedGameListener.rs index a9e251d9c..6b3e74aee 100644 --- a/GameKit/GKSavedGameListener.rs +++ b/GameKit/GKSavedGameListener.rs @@ -6,6 +6,7 @@ use crate::Foundation::*; use crate::GameKit::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait GKSavedGameListener: NSObjectProtocol { #[cfg(all(feature = "GameKit_GKPlayer", feature = "GameKit_GKSavedGame"))] #[optional] diff --git a/GameKit/GKScore.rs b/GameKit/GKScore.rs index f52f13a29..ccb2193b0 100644 --- a/GameKit/GKScore.rs +++ b/GameKit/GKScore.rs @@ -131,6 +131,7 @@ extern_methods!( #[cfg(feature = "GameKit_GKScore")] unsafe impl GKScore { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Init initWithLeaderboardIdentifier:forPlayer:)] pub unsafe fn initWithLeaderboardIdentifier_forPlayer( this: Option>, diff --git a/GameKit/GKSessionError.rs b/GameKit/GKSessionError.rs index c5804158d..223a6704f 100644 --- a/GameKit/GKSessionError.rs +++ b/GameKit/GKSessionError.rs @@ -9,22 +9,39 @@ extern_static!(GKSessionErrorDomain: &'static NSString); ns_enum!( #[underlying(c_int)] + #[cfg(not(any(target_os = "macos")))] pub enum GKSessionError { + #[cfg(not(any(target_os = "macos")))] GKSessionInvalidParameterError = 30500, + #[cfg(not(any(target_os = "macos")))] GKSessionPeerNotFoundError = 30501, + #[cfg(not(any(target_os = "macos")))] GKSessionDeclinedError = 30502, + #[cfg(not(any(target_os = "macos")))] GKSessionTimedOutError = 30503, + #[cfg(not(any(target_os = "macos")))] GKSessionCancelledError = 30504, + #[cfg(not(any(target_os = "macos")))] GKSessionConnectionFailedError = 30505, + #[cfg(not(any(target_os = "macos")))] GKSessionConnectionClosedError = 30506, + #[cfg(not(any(target_os = "macos")))] GKSessionDataTooBigError = 30507, + #[cfg(not(any(target_os = "macos")))] GKSessionNotConnectedError = 30508, + #[cfg(not(any(target_os = "macos")))] GKSessionCannotEnableError = 30509, + #[cfg(not(any(target_os = "macos")))] GKSessionInProgressError = 30510, + #[cfg(not(any(target_os = "macos")))] GKSessionConnectivityError = 30201, + #[cfg(not(any(target_os = "macos")))] GKSessionTransportError = 30202, + #[cfg(not(any(target_os = "macos")))] GKSessionInternalError = 30203, + #[cfg(not(any(target_os = "macos")))] GKSessionUnknownError = 30204, + #[cfg(not(any(target_os = "macos")))] GKSessionSystemError = 30205, } ); diff --git a/GameKit/GKTurnBasedMatch.rs b/GameKit/GKTurnBasedMatch.rs index 12b349a3e..35e37c941 100644 --- a/GameKit/GKTurnBasedMatch.rs +++ b/GameKit/GKTurnBasedMatch.rs @@ -98,6 +98,7 @@ extern_methods!( extern_protocol!( pub unsafe trait GKTurnBasedEventListener { #[cfg(all(feature = "Foundation_NSArray", feature = "GameKit_GKPlayer"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(player:didRequestMatchWithOtherPlayers:)] unsafe fn player_didRequestMatchWithOtherPlayers( @@ -176,6 +177,7 @@ extern_protocol!( feature = "Foundation_NSString", feature = "GameKit_GKPlayer" ))] + #[cfg(not(any(target_os = "macos")))] #[optional] #[method(player:didRequestMatchWithPlayers:)] unsafe fn player_didRequestMatchWithPlayers( diff --git a/GameKit/GKTurnBasedMatchmakerViewController.rs b/GameKit/GKTurnBasedMatchmakerViewController.rs index e9276cc0a..3b2b1ddbf 100644 --- a/GameKit/GKTurnBasedMatchmakerViewController.rs +++ b/GameKit/GKTurnBasedMatchmakerViewController.rs @@ -132,6 +132,7 @@ extern_methods!( #[cfg(feature = "GameKit_GKTurnBasedMatchmakerViewController")] unsafe impl GKTurnBasedMatchmakerViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/GameKit/GKVoiceChat.rs b/GameKit/GKVoiceChat.rs index 9bf0707ac..4fc9ccc90 100644 --- a/GameKit/GKVoiceChat.rs +++ b/GameKit/GKVoiceChat.rs @@ -19,6 +19,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameKit_GKVoiceChat")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct GKVoiceChat; #[cfg(feature = "GameKit_GKVoiceChat")] diff --git a/GameKit/GKVoiceChatService.rs b/GameKit/GKVoiceChatService.rs index fe83fbc46..d0c734b6a 100644 --- a/GameKit/GKVoiceChatService.rs +++ b/GameKit/GKVoiceChatService.rs @@ -8,6 +8,7 @@ use crate::GameKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "GameKit_GKVoiceChatService")] + #[cfg(not(any(target_os = "macos")))] pub struct GKVoiceChatService; #[cfg(feature = "GameKit_GKVoiceChatService")] @@ -28,9 +29,11 @@ extern_methods!( #[method(isVoIPAllowed)] pub unsafe fn isVoIPAllowed() -> bool; + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other client)] pub unsafe fn client(&self) -> Option>>; + #[cfg(not(any(target_os = "macos")))] #[method(setClient:)] pub unsafe fn setClient(&self, client: Option<&ProtocolObject>); diff --git a/HealthKit/HKCDADocumentSample.rs b/HealthKit/HKCDADocumentSample.rs index fbc5ba14b..0657ee474 100644 --- a/HealthKit/HKCDADocumentSample.rs +++ b/HealthKit/HKCDADocumentSample.rs @@ -9,6 +9,7 @@ use crate::UniformTypeIdentifiers::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "HealthKit_HKCDADocumentSample")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct HKCDADocumentSample; #[cfg(feature = "HealthKit_HKCDADocumentSample")] @@ -41,6 +42,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other CDADocumentSampleWithData:startDate:endDate:metadata:validationError:_)] pub unsafe fn CDADocumentSampleWithData_startDate_endDate_metadata_validationError( document_data: &NSData, @@ -54,6 +56,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "HealthKit_HKCDADocument")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct HKCDADocument; #[cfg(feature = "HealthKit_HKCDADocument")] diff --git a/HealthKit/HKClinicalRecord.rs b/HealthKit/HKClinicalRecord.rs index 5c90173ee..c21610ee1 100644 --- a/HealthKit/HKClinicalRecord.rs +++ b/HealthKit/HKClinicalRecord.rs @@ -13,6 +13,7 @@ extern_static!(HKPredicateKeyPathClinicalRecordFHIRResourceType: &'static NSStri extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "HealthKit_HKClinicalRecord")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct HKClinicalRecord; #[cfg(feature = "HealthKit_HKClinicalRecord")] diff --git a/HealthKit/HKContactsPrescription.rs b/HealthKit/HKContactsPrescription.rs index e42c70b88..a24f9e96c 100644 --- a/HealthKit/HKContactsPrescription.rs +++ b/HealthKit/HKContactsPrescription.rs @@ -65,7 +65,13 @@ extern_methods!( #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + } +); +extern_methods!( + /// Methods declared on superclass `HKVisionPrescription` + #[cfg(feature = "HealthKit_HKContactsPrescription")] + unsafe impl HKContactsPrescription { #[cfg(all( feature = "Foundation_NSDate", feature = "Foundation_NSDictionary", diff --git a/HealthKit/HKFHIRResource.rs b/HealthKit/HKFHIRResource.rs index bebea9395..3c52a9089 100644 --- a/HealthKit/HKFHIRResource.rs +++ b/HealthKit/HKFHIRResource.rs @@ -33,6 +33,7 @@ extern_static!(HKFHIRResourceTypeProcedure: &'static HKFHIRResourceType); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "HealthKit_HKFHIRResource")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct HKFHIRResource; #[cfg(feature = "HealthKit_HKFHIRResource")] @@ -54,6 +55,7 @@ extern_methods!( #[cfg(feature = "HealthKit_HKFHIRResource")] unsafe impl HKFHIRResource { #[cfg(feature = "HealthKit_HKFHIRVersion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other FHIRVersion)] pub unsafe fn FHIRVersion(&self) -> Id; diff --git a/HealthKit/HKFHIRVersion.rs b/HealthKit/HKFHIRVersion.rs index a66709f9b..a7155cdc4 100644 --- a/HealthKit/HKFHIRVersion.rs +++ b/HealthKit/HKFHIRVersion.rs @@ -9,6 +9,7 @@ use crate::UniformTypeIdentifiers::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "HealthKit_HKFHIRVersion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct HKFHIRVersion; #[cfg(feature = "HealthKit_HKFHIRVersion")] diff --git a/HealthKit/HKGlassesPrescription.rs b/HealthKit/HKGlassesPrescription.rs index 1f778ae2d..d65c18d96 100644 --- a/HealthKit/HKGlassesPrescription.rs +++ b/HealthKit/HKGlassesPrescription.rs @@ -60,7 +60,13 @@ extern_methods!( #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + } +); +extern_methods!( + /// Methods declared on superclass `HKVisionPrescription` + #[cfg(feature = "HealthKit_HKGlassesPrescription")] + unsafe impl HKGlassesPrescription { #[cfg(all( feature = "Foundation_NSDate", feature = "Foundation_NSDictionary", diff --git a/HealthKit/HKHealthStore.rs b/HealthKit/HKHealthStore.rs index 53e0fb0b3..09d22754a 100644 --- a/HealthKit/HKHealthStore.rs +++ b/HealthKit/HKHealthStore.rs @@ -26,6 +26,7 @@ extern_methods!( #[method(isHealthDataAvailable)] pub unsafe fn isHealthDataAvailable() -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(supportsHealthRecords)] pub unsafe fn supportsHealthRecords(&self) -> bool; @@ -78,6 +79,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(handleAuthorizationForExtensionWithCompletion:)] pub unsafe fn handleAuthorizationForExtensionWithCompletion( &self, @@ -243,21 +245,25 @@ extern_methods!( #[cfg(feature = "HealthKit_HKWorkoutSession")] #[deprecated = "Use HKWorkoutSession's start method"] + #[cfg(not(any(target_os = "ios", target_os = "macos")))] #[method(startWorkoutSession:)] pub unsafe fn startWorkoutSession(&self, workout_session: &HKWorkoutSession); #[cfg(feature = "HealthKit_HKWorkoutSession")] #[deprecated = "Use HKWorkoutSession's end method"] + #[cfg(not(any(target_os = "ios", target_os = "macos")))] #[method(endWorkoutSession:)] pub unsafe fn endWorkoutSession(&self, workout_session: &HKWorkoutSession); #[cfg(feature = "HealthKit_HKWorkoutSession")] #[deprecated = "Use HKWorkoutSession's pause method"] + #[cfg(not(any(target_os = "ios")))] #[method(pauseWorkoutSession:)] pub unsafe fn pauseWorkoutSession(&self, workout_session: &HKWorkoutSession); #[cfg(feature = "HealthKit_HKWorkoutSession")] #[deprecated = "Use HKWorkoutSession's resume method"] + #[cfg(not(any(target_os = "ios")))] #[method(resumeWorkoutSession:)] pub unsafe fn resumeWorkoutSession(&self, workout_session: &HKWorkoutSession); @@ -265,6 +271,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "HealthKit_HKWorkoutConfiguration" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(startWatchAppWithWorkoutConfiguration:completion:)] pub unsafe fn startWatchAppWithWorkoutConfiguration_completion( &self, @@ -273,6 +280,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSError", feature = "HealthKit_HKWorkoutSession"))] + #[cfg(not(any(target_os = "ios", target_os = "macos")))] #[method(recoverActiveWorkoutSessionWithCompletion:)] pub unsafe fn recoverActiveWorkoutSessionWithCompletion( &self, diff --git a/HealthKit/HKLiveWorkoutBuilder.rs b/HealthKit/HKLiveWorkoutBuilder.rs index b5d656d2f..40556764c 100644 --- a/HealthKit/HKLiveWorkoutBuilder.rs +++ b/HealthKit/HKLiveWorkoutBuilder.rs @@ -7,6 +7,7 @@ use crate::HealthKit::*; use crate::UniformTypeIdentifiers::*; extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait HKLiveWorkoutBuilderDelegate: NSObjectProtocol { #[cfg(all( feature = "Foundation_NSSet", @@ -55,6 +56,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "HealthKit_HKLiveWorkoutBuilder")] + #[cfg(not(any(target_os = "ios")))] pub struct HKLiveWorkoutBuilder; #[cfg(feature = "HealthKit_HKLiveWorkoutBuilder")] diff --git a/HealthKit/HKLiveWorkoutDataSource.rs b/HealthKit/HKLiveWorkoutDataSource.rs index e1442793d..02bdc23c5 100644 --- a/HealthKit/HKLiveWorkoutDataSource.rs +++ b/HealthKit/HKLiveWorkoutDataSource.rs @@ -9,6 +9,7 @@ use crate::UniformTypeIdentifiers::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "HealthKit_HKLiveWorkoutDataSource")] + #[cfg(not(any(target_os = "ios")))] pub struct HKLiveWorkoutDataSource; #[cfg(feature = "HealthKit_HKLiveWorkoutDataSource")] diff --git a/HealthKit/HKQuery.rs b/HealthKit/HKQuery.rs index 0cdbb2904..ec0eefa84 100644 --- a/HealthKit/HKQuery.rs +++ b/HealthKit/HKQuery.rs @@ -409,6 +409,7 @@ extern_methods!( #[cfg(feature = "HealthKit_HKQuery")] unsafe impl HKQuery { #[cfg(feature = "Foundation_NSPredicate")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other predicateForClinicalRecordsWithFHIRResourceType:)] pub unsafe fn predicateForClinicalRecordsWithFHIRResourceType( resource_type: &HKFHIRResourceType, @@ -419,6 +420,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "HealthKit_HKSource" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other predicateForClinicalRecordsFromSource:FHIRResourceType:identifier:)] pub unsafe fn predicateForClinicalRecordsFromSource_FHIRResourceType_identifier( source: &HKSource, diff --git a/HealthKit/HKVerifiableClinicalRecord.rs b/HealthKit/HKVerifiableClinicalRecord.rs index b7f1b0da6..c750ad459 100644 --- a/HealthKit/HKVerifiableClinicalRecord.rs +++ b/HealthKit/HKVerifiableClinicalRecord.rs @@ -47,6 +47,7 @@ extern_static!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "HealthKit_HKVerifiableClinicalRecord")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct HKVerifiableClinicalRecord; #[cfg(feature = "HealthKit_HKVerifiableClinicalRecord")] diff --git a/HealthKit/HKVerifiableClinicalRecordQuery.rs b/HealthKit/HKVerifiableClinicalRecordQuery.rs index 09bfe9ea3..871bb191d 100644 --- a/HealthKit/HKVerifiableClinicalRecordQuery.rs +++ b/HealthKit/HKVerifiableClinicalRecordQuery.rs @@ -9,6 +9,7 @@ use crate::UniformTypeIdentifiers::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "HealthKit_HKVerifiableClinicalRecordQuery")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct HKVerifiableClinicalRecordQuery; #[cfg(feature = "HealthKit_HKVerifiableClinicalRecordQuery")] diff --git a/HealthKit/HKVerifiableClinicalRecordSubject.rs b/HealthKit/HKVerifiableClinicalRecordSubject.rs index f0fe963dd..6de2cadbc 100644 --- a/HealthKit/HKVerifiableClinicalRecordSubject.rs +++ b/HealthKit/HKVerifiableClinicalRecordSubject.rs @@ -9,6 +9,7 @@ use crate::UniformTypeIdentifiers::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "HealthKit_HKVerifiableClinicalRecordSubject")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct HKVerifiableClinicalRecordSubject; #[cfg(feature = "HealthKit_HKVerifiableClinicalRecordSubject")] diff --git a/HealthKit/HKWorkoutSession.rs b/HealthKit/HKWorkoutSession.rs index c49e326bb..85527a307 100644 --- a/HealthKit/HKWorkoutSession.rs +++ b/HealthKit/HKWorkoutSession.rs @@ -8,9 +8,13 @@ use crate::UniformTypeIdentifiers::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum HKWorkoutSessionState { + #[cfg(not(any(target_os = "ios")))] HKWorkoutSessionStateNotStarted = 1, + #[cfg(not(any(target_os = "ios")))] HKWorkoutSessionStateRunning = 2, + #[cfg(not(any(target_os = "ios")))] HKWorkoutSessionStateEnded = 3, HKWorkoutSessionStatePaused = 4, HKWorkoutSessionStatePrepared = 5, @@ -21,6 +25,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "HealthKit_HKWorkoutSession")] + #[cfg(not(any(target_os = "ios")))] pub struct HKWorkoutSession; #[cfg(feature = "HealthKit_HKWorkoutSession")] @@ -156,6 +161,7 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "ios")))] pub unsafe trait HKWorkoutSessionDelegate: NSObjectProtocol { #[cfg(all(feature = "Foundation_NSDate", feature = "HealthKit_HKWorkoutSession"))] #[method(workoutSession:didChangeToState:fromState:date:)] diff --git a/IdentityLookup/ILCallClassificationRequest.rs b/IdentityLookup/ILCallClassificationRequest.rs index a9dd6c140..8cde49cbe 100644 --- a/IdentityLookup/ILCallClassificationRequest.rs +++ b/IdentityLookup/ILCallClassificationRequest.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILCallClassificationRequest")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILCallClassificationRequest; #[cfg(feature = "IdentityLookup_ILCallClassificationRequest")] diff --git a/IdentityLookup/ILCallCommunication.rs b/IdentityLookup/ILCallCommunication.rs index 2a5447bad..3e6f696a6 100644 --- a/IdentityLookup/ILCallCommunication.rs +++ b/IdentityLookup/ILCallCommunication.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILCallCommunication")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILCallCommunication; #[cfg(feature = "IdentityLookup_ILCallCommunication")] diff --git a/IdentityLookup/ILClassificationActions.rs b/IdentityLookup/ILClassificationActions.rs index c5264ef87..ba583946a 100644 --- a/IdentityLookup/ILClassificationActions.rs +++ b/IdentityLookup/ILClassificationActions.rs @@ -6,10 +6,15 @@ use crate::IdentityLookup::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum ILClassificationAction { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILClassificationActionNone = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILClassificationActionReportNotJunk = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILClassificationActionReportJunk = 2, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILClassificationActionReportJunkAndBlockSender = 3, } ); diff --git a/IdentityLookup/ILClassificationRequest.rs b/IdentityLookup/ILClassificationRequest.rs index 8f63e3bbb..f47958399 100644 --- a/IdentityLookup/ILClassificationRequest.rs +++ b/IdentityLookup/ILClassificationRequest.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILClassificationRequest")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILClassificationRequest; #[cfg(feature = "IdentityLookup_ILClassificationRequest")] diff --git a/IdentityLookup/ILClassificationResponse.rs b/IdentityLookup/ILClassificationResponse.rs index 6d7f31c73..6357d0ae7 100644 --- a/IdentityLookup/ILClassificationResponse.rs +++ b/IdentityLookup/ILClassificationResponse.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILClassificationResponse")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILClassificationResponse; #[cfg(feature = "IdentityLookup_ILClassificationResponse")] diff --git a/IdentityLookup/ILCommunication.rs b/IdentityLookup/ILCommunication.rs index 1ad8e74be..c910a9462 100644 --- a/IdentityLookup/ILCommunication.rs +++ b/IdentityLookup/ILCommunication.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILCommunication")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILCommunication; #[cfg(feature = "IdentityLookup_ILCommunication")] diff --git a/IdentityLookup/ILMessageClassificationRequest.rs b/IdentityLookup/ILMessageClassificationRequest.rs index be43c2229..588a57263 100644 --- a/IdentityLookup/ILMessageClassificationRequest.rs +++ b/IdentityLookup/ILMessageClassificationRequest.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILMessageClassificationRequest")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILMessageClassificationRequest; #[cfg(feature = "IdentityLookup_ILMessageClassificationRequest")] diff --git a/IdentityLookup/ILMessageCommunication.rs b/IdentityLookup/ILMessageCommunication.rs index 5f96a2525..e8d49761a 100644 --- a/IdentityLookup/ILMessageCommunication.rs +++ b/IdentityLookup/ILMessageCommunication.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILMessageCommunication")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILMessageCommunication; #[cfg(feature = "IdentityLookup_ILMessageCommunication")] diff --git a/IdentityLookup/ILMessageFilterAction.rs b/IdentityLookup/ILMessageFilterAction.rs index 88f9cd88f..c08dac228 100644 --- a/IdentityLookup/ILMessageFilterAction.rs +++ b/IdentityLookup/ILMessageFilterAction.rs @@ -6,32 +6,53 @@ use crate::IdentityLookup::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum ILMessageFilterAction { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterActionNone = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterActionAllow = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterActionJunk = 2, #[deprecated] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterActionFilter = ILMessageFilterActionJunk, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterActionPromotion = 3, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterActionTransaction = 4, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum ILMessageFilterSubAction { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionNone = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionTransactionalOthers = 10000, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionTransactionalFinance = 10001, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionTransactionalOrders = 10002, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionTransactionalReminders = 10003, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionTransactionalHealth = 10004, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionTransactionalWeather = 10005, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionTransactionalCarrier = 10006, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionTransactionalRewards = 10007, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionTransactionalPublicServices = 10008, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionPromotionalOthers = 20000, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionPromotionalOffers = 20001, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterSubActionPromotionalCoupons = 20002, } ); diff --git a/IdentityLookup/ILMessageFilterCapabilitiesQueryHandling.rs b/IdentityLookup/ILMessageFilterCapabilitiesQueryHandling.rs index f4ec8cc08..94cbf1f30 100644 --- a/IdentityLookup/ILMessageFilterCapabilitiesQueryHandling.rs +++ b/IdentityLookup/ILMessageFilterCapabilitiesQueryHandling.rs @@ -5,6 +5,7 @@ use crate::Foundation::*; use crate::IdentityLookup::*; extern_protocol!( + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe trait ILMessageFilterCapabilitiesQueryHandling: NSObjectProtocol { #[cfg(all( feature = "IdentityLookup_ILMessageFilterCapabilitiesQueryRequest", diff --git a/IdentityLookup/ILMessageFilterCapabilitiesQueryRequest.rs b/IdentityLookup/ILMessageFilterCapabilitiesQueryRequest.rs index eaac064f7..1d24d5b0f 100644 --- a/IdentityLookup/ILMessageFilterCapabilitiesQueryRequest.rs +++ b/IdentityLookup/ILMessageFilterCapabilitiesQueryRequest.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILMessageFilterCapabilitiesQueryRequest")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILMessageFilterCapabilitiesQueryRequest; #[cfg(feature = "IdentityLookup_ILMessageFilterCapabilitiesQueryRequest")] diff --git a/IdentityLookup/ILMessageFilterCapabilitiesQueryResponse.rs b/IdentityLookup/ILMessageFilterCapabilitiesQueryResponse.rs index 1ab27ccb7..ba106c2e1 100644 --- a/IdentityLookup/ILMessageFilterCapabilitiesQueryResponse.rs +++ b/IdentityLookup/ILMessageFilterCapabilitiesQueryResponse.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILMessageFilterCapabilitiesQueryResponse")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILMessageFilterCapabilitiesQueryResponse; #[cfg(feature = "IdentityLookup_ILMessageFilterCapabilitiesQueryResponse")] diff --git a/IdentityLookup/ILMessageFilterError.rs b/IdentityLookup/ILMessageFilterError.rs index 6c6fa94a4..92e3afeba 100644 --- a/IdentityLookup/ILMessageFilterError.rs +++ b/IdentityLookup/ILMessageFilterError.rs @@ -8,11 +8,17 @@ extern_static!(ILMessageFilterErrorDomain: &'static NSErrorDomain); ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum ILMessageFilterError { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterErrorSystem = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterErrorInvalidNetworkURL = 2, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterErrorNetworkURLUnauthorized = 3, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterErrorNetworkRequestFailed = 4, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] ILMessageFilterErrorRedundantNetworkDeferral = 5, } ); diff --git a/IdentityLookup/ILMessageFilterExtension.rs b/IdentityLookup/ILMessageFilterExtension.rs index 71ac50493..4db19866d 100644 --- a/IdentityLookup/ILMessageFilterExtension.rs +++ b/IdentityLookup/ILMessageFilterExtension.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILMessageFilterExtension")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILMessageFilterExtension; #[cfg(feature = "IdentityLookup_ILMessageFilterExtension")] diff --git a/IdentityLookup/ILMessageFilterExtensionContext.rs b/IdentityLookup/ILMessageFilterExtensionContext.rs index 480a31bac..715e228bc 100644 --- a/IdentityLookup/ILMessageFilterExtensionContext.rs +++ b/IdentityLookup/ILMessageFilterExtensionContext.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILMessageFilterExtensionContext")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILMessageFilterExtensionContext; #[cfg(feature = "IdentityLookup_ILMessageFilterExtensionContext")] diff --git a/IdentityLookup/ILMessageFilterQueryHandling.rs b/IdentityLookup/ILMessageFilterQueryHandling.rs index 9a27fedeb..8688f3fc1 100644 --- a/IdentityLookup/ILMessageFilterQueryHandling.rs +++ b/IdentityLookup/ILMessageFilterQueryHandling.rs @@ -5,6 +5,7 @@ use crate::Foundation::*; use crate::IdentityLookup::*; extern_protocol!( + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe trait ILMessageFilterQueryHandling: NSObjectProtocol { #[cfg(all( feature = "IdentityLookup_ILMessageFilterExtensionContext", diff --git a/IdentityLookup/ILMessageFilterQueryRequest.rs b/IdentityLookup/ILMessageFilterQueryRequest.rs index 67282b185..22ac1a48b 100644 --- a/IdentityLookup/ILMessageFilterQueryRequest.rs +++ b/IdentityLookup/ILMessageFilterQueryRequest.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILMessageFilterQueryRequest")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILMessageFilterQueryRequest; #[cfg(feature = "IdentityLookup_ILMessageFilterQueryRequest")] @@ -36,6 +37,7 @@ extern_methods!( pub unsafe fn messageBody(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other receiverISOCountryCode)] pub unsafe fn receiverISOCountryCode(&self) -> Option>; diff --git a/IdentityLookup/ILMessageFilterQueryResponse.rs b/IdentityLookup/ILMessageFilterQueryResponse.rs index 4af1b571b..549f39aed 100644 --- a/IdentityLookup/ILMessageFilterQueryResponse.rs +++ b/IdentityLookup/ILMessageFilterQueryResponse.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILMessageFilterQueryResponse")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILMessageFilterQueryResponse; #[cfg(feature = "IdentityLookup_ILMessageFilterQueryResponse")] @@ -33,9 +34,11 @@ extern_methods!( #[method(setAction:)] pub unsafe fn setAction(&self, action: ILMessageFilterAction); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(subAction)] pub unsafe fn subAction(&self) -> ILMessageFilterSubAction; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(setSubAction:)] pub unsafe fn setSubAction(&self, sub_action: ILMessageFilterSubAction); } diff --git a/IdentityLookup/ILNetworkResponse.rs b/IdentityLookup/ILNetworkResponse.rs index 9239eac94..85717997b 100644 --- a/IdentityLookup/ILNetworkResponse.rs +++ b/IdentityLookup/ILNetworkResponse.rs @@ -7,6 +7,7 @@ use crate::IdentityLookup::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "IdentityLookup_ILNetworkResponse")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct ILNetworkResponse; #[cfg(feature = "IdentityLookup_ILNetworkResponse")] diff --git a/LinkPresentation/LPLinkView.rs b/LinkPresentation/LPLinkView.rs index 103fe1840..da305ce98 100644 --- a/LinkPresentation/LPLinkView.rs +++ b/LinkPresentation/LPLinkView.rs @@ -77,6 +77,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "LinkPresentation_LPLinkView")] unsafe impl LPLinkView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/LocalAuthentication/LAContext.rs b/LocalAuthentication/LAContext.rs index 2d8a62402..4a359c754 100644 --- a/LocalAuthentication/LAContext.rs +++ b/LocalAuthentication/LAContext.rs @@ -7,10 +7,14 @@ use crate::LocalAuthentication::*; ns_enum!( #[underlying(NSInteger)] pub enum LAPolicy { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] LAPolicyDeviceOwnerAuthenticationWithBiometrics = 1, LAPolicyDeviceOwnerAuthentication = 2, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] LAPolicyDeviceOwnerAuthenticationWithWatch = 3, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] LAPolicyDeviceOwnerAuthenticationWithBiometricsOrWatch = 4, + #[cfg(not(any(target_os = "ios", target_os = "macos")))] LAPolicyDeviceOwnerAuthenticationWithWristDetection = 5, } ); @@ -31,10 +35,12 @@ ns_enum!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum LABiometryType { LABiometryTypeNone = 0, #[deprecated] LABiometryNone = LABiometryTypeNone, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] LABiometryTypeTouchID = 1, LABiometryTypeFaceID = 2, } @@ -85,38 +91,47 @@ extern_methods!( pub unsafe fn isCredentialSet(&self, r#type: LACredentialType) -> bool; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other localizedFallbackTitle)] pub unsafe fn localizedFallbackTitle(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setLocalizedFallbackTitle:)] pub unsafe fn setLocalizedFallbackTitle(&self, localized_fallback_title: Option<&NSString>); #[cfg(feature = "Foundation_NSNumber")] #[deprecated = "No longer supported"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other maxBiometryFailures)] pub unsafe fn maxBiometryFailures(&self) -> Option>; #[cfg(feature = "Foundation_NSNumber")] #[deprecated = "No longer supported"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setMaxBiometryFailures:)] pub unsafe fn setMaxBiometryFailures(&self, max_biometry_failures: Option<&NSNumber>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other localizedCancelTitle)] pub unsafe fn localizedCancelTitle(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setLocalizedCancelTitle:)] pub unsafe fn setLocalizedCancelTitle(&self, localized_cancel_title: Option<&NSString>); #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other evaluatedPolicyDomainState)] pub unsafe fn evaluatedPolicyDomainState(&self) -> Option>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(touchIDAuthenticationAllowableReuseDuration)] pub unsafe fn touchIDAuthenticationAllowableReuseDuration(&self) -> NSTimeInterval; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setTouchIDAuthenticationAllowableReuseDuration:)] pub unsafe fn setTouchIDAuthenticationAllowableReuseDuration( &self, @@ -124,10 +139,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other localizedReason)] pub unsafe fn localizedReason(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setLocalizedReason:)] pub unsafe fn setLocalizedReason(&self, localized_reason: &NSString); @@ -137,6 +154,7 @@ extern_methods!( #[method(setInteractionNotAllowed:)] pub unsafe fn setInteractionNotAllowed(&self, interaction_not_allowed: bool); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(biometryType)] pub unsafe fn biometryType(&self) -> LABiometryType; } diff --git a/LocalAuthentication/LAPersistedRight.rs b/LocalAuthentication/LAPersistedRight.rs index a5cd9481f..37b8c3e08 100644 --- a/LocalAuthentication/LAPersistedRight.rs +++ b/LocalAuthentication/LAPersistedRight.rs @@ -7,6 +7,7 @@ use crate::LocalAuthentication::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "LocalAuthentication_LAPersistedRight")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct LAPersistedRight; #[cfg(feature = "LocalAuthentication_LAPersistedRight")] diff --git a/LocalAuthentication/LAPrivateKey.rs b/LocalAuthentication/LAPrivateKey.rs index 0375be49d..ed612a720 100644 --- a/LocalAuthentication/LAPrivateKey.rs +++ b/LocalAuthentication/LAPrivateKey.rs @@ -7,6 +7,7 @@ use crate::LocalAuthentication::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "LocalAuthentication_LAPrivateKey")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct LAPrivateKey; #[cfg(feature = "LocalAuthentication_LAPrivateKey")] diff --git a/LocalAuthentication/LAPublicKey.rs b/LocalAuthentication/LAPublicKey.rs index cee9161b4..3ab7c95fc 100644 --- a/LocalAuthentication/LAPublicKey.rs +++ b/LocalAuthentication/LAPublicKey.rs @@ -7,6 +7,7 @@ use crate::LocalAuthentication::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "LocalAuthentication_LAPublicKey")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct LAPublicKey; #[cfg(feature = "LocalAuthentication_LAPublicKey")] diff --git a/LocalAuthentication/LARequirement.rs b/LocalAuthentication/LARequirement.rs index 66807250c..94acd573c 100644 --- a/LocalAuthentication/LARequirement.rs +++ b/LocalAuthentication/LARequirement.rs @@ -7,6 +7,7 @@ use crate::LocalAuthentication::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "LocalAuthentication_LAAuthenticationRequirement")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct LAAuthenticationRequirement; #[cfg(feature = "LocalAuthentication_LAAuthenticationRequirement")] @@ -41,6 +42,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "LocalAuthentication_LABiometryFallbackRequirement")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct LABiometryFallbackRequirement; #[cfg(feature = "LocalAuthentication_LABiometryFallbackRequirement")] diff --git a/LocalAuthentication/LARight.rs b/LocalAuthentication/LARight.rs index ff9c798a3..33a00fa30 100644 --- a/LocalAuthentication/LARight.rs +++ b/LocalAuthentication/LARight.rs @@ -6,10 +6,15 @@ use crate::LocalAuthentication::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum LARightState { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] LARightStateUnknown = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] LARightStateAuthorizing = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] LARightStateAuthorized = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] LARightStateNotAuthorized = 3, } ); @@ -17,6 +22,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "LocalAuthentication_LARight")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct LARight; #[cfg(feature = "LocalAuthentication_LARight")] diff --git a/LocalAuthentication/LARightStore.rs b/LocalAuthentication/LARightStore.rs index 75eebdbb6..171a960a5 100644 --- a/LocalAuthentication/LARightStore.rs +++ b/LocalAuthentication/LARightStore.rs @@ -7,6 +7,7 @@ use crate::LocalAuthentication::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "LocalAuthentication_LARightStore")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct LARightStore; #[cfg(feature = "LocalAuthentication_LARightStore")] diff --git a/LocalAuthentication/LASecret.rs b/LocalAuthentication/LASecret.rs index 6b806031a..7254d8783 100644 --- a/LocalAuthentication/LASecret.rs +++ b/LocalAuthentication/LASecret.rs @@ -7,6 +7,7 @@ use crate::LocalAuthentication::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "LocalAuthentication_LASecret")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct LASecret; #[cfg(feature = "LocalAuthentication_LASecret")] diff --git a/LocalAuthenticationEmbeddedUI/LAAuthenticationView.rs b/LocalAuthenticationEmbeddedUI/LAAuthenticationView.rs index 70aa13089..774727e9e 100644 --- a/LocalAuthenticationEmbeddedUI/LAAuthenticationView.rs +++ b/LocalAuthenticationEmbeddedUI/LAAuthenticationView.rs @@ -9,6 +9,7 @@ use crate::LocalAuthenticationEmbeddedUI::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "LocalAuthenticationEmbeddedUI_LAAuthenticationView")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct LAAuthenticationView; #[cfg(feature = "LocalAuthenticationEmbeddedUI_LAAuthenticationView")] @@ -53,6 +54,7 @@ extern_methods!( pub unsafe fn initWithCoder(this: Option>, coder: &NSCoder) -> Id; #[cfg(feature = "LocalAuthentication_LAContext")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithContext:)] pub unsafe fn initWithContext( this: Option>, @@ -60,6 +62,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "LocalAuthentication_LAContext")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithContext:controlSize:)] pub unsafe fn initWithContext_controlSize( this: Option>, @@ -68,9 +71,11 @@ extern_methods!( ) -> Id; #[cfg(feature = "LocalAuthentication_LAContext")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other context)] pub unsafe fn context(&self) -> Id; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(controlSize)] pub unsafe fn controlSize(&self) -> NSControlSize; } diff --git a/MailKit/MEAddressAnnotation.rs b/MailKit/MEAddressAnnotation.rs index c2ce33551..448771a6a 100644 --- a/MailKit/MEAddressAnnotation.rs +++ b/MailKit/MEAddressAnnotation.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEAddressAnnotation")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEAddressAnnotation; #[cfg(feature = "MailKit_MEAddressAnnotation")] diff --git a/MailKit/MEComposeContext.rs b/MailKit/MEComposeContext.rs index ade0add9e..e93af58c2 100644 --- a/MailKit/MEComposeContext.rs +++ b/MailKit/MEComposeContext.rs @@ -7,10 +7,15 @@ use crate::MailKit::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum MEComposeUserAction { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEComposeUserActionNewMessage = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEComposeUserActionReply = 2, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEComposeUserActionReplyAll = 3, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEComposeUserActionForward = 4, } ); @@ -18,6 +23,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEComposeContext")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEComposeContext; #[cfg(feature = "MailKit_MEComposeContext")] diff --git a/MailKit/MEComposeSession.rs b/MailKit/MEComposeSession.rs index 6aaac2ff5..1ce7e6e86 100644 --- a/MailKit/MEComposeSession.rs +++ b/MailKit/MEComposeSession.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEComposeSession")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEComposeSession; #[cfg(feature = "MailKit_MEComposeSession")] @@ -55,14 +56,19 @@ extern_static!(MEComposeSessionErrorDomain: &'static NSErrorDomain); ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum MEComposeSessionErrorCode { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEComposeSessionErrorCodeInvalidRecipients = 0, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEComposeSessionErrorCodeInvalidHeaders = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEComposeSessionErrorCodeInvalidBody = 2, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait MEComposeSessionHandler: NSObjectProtocol { #[cfg(feature = "MailKit_MEComposeSession")] #[method(mailComposeSessionDidBegin:)] diff --git a/MailKit/MEContentBlocker.rs b/MailKit/MEContentBlocker.rs index 44c40334b..f4df4e3b8 100644 --- a/MailKit/MEContentBlocker.rs +++ b/MailKit/MEContentBlocker.rs @@ -6,6 +6,7 @@ use crate::Foundation::*; use crate::MailKit::*; extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait MEContentBlocker: NSObjectProtocol { #[cfg(feature = "Foundation_NSData")] #[method_id(@__retain_semantics Other contentRulesJSON)] diff --git a/MailKit/MEDecodedMessage.rs b/MailKit/MEDecodedMessage.rs index 6ca4615ab..82ff4913f 100644 --- a/MailKit/MEDecodedMessage.rs +++ b/MailKit/MEDecodedMessage.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEDecodedMessage")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEDecodedMessage; #[cfg(feature = "MailKit_MEDecodedMessage")] diff --git a/MailKit/MEDecodedMessageBanner.rs b/MailKit/MEDecodedMessageBanner.rs index c570bc15c..e50dcf3a8 100644 --- a/MailKit/MEDecodedMessageBanner.rs +++ b/MailKit/MEDecodedMessageBanner.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEDecodedMessageBanner")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEDecodedMessageBanner; #[cfg(feature = "MailKit_MEDecodedMessageBanner")] diff --git a/MailKit/MEEmailAddress.rs b/MailKit/MEEmailAddress.rs index bbeb89557..021786b72 100644 --- a/MailKit/MEEmailAddress.rs +++ b/MailKit/MEEmailAddress.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEEmailAddress")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEEmailAddress; #[cfg(feature = "MailKit_MEEmailAddress")] diff --git a/MailKit/MEEncodedOutgoingMessage.rs b/MailKit/MEEncodedOutgoingMessage.rs index 5bcdeaf20..6970f5f3c 100644 --- a/MailKit/MEEncodedOutgoingMessage.rs +++ b/MailKit/MEEncodedOutgoingMessage.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEEncodedOutgoingMessage")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEEncodedOutgoingMessage; #[cfg(feature = "MailKit_MEEncodedOutgoingMessage")] diff --git a/MailKit/MEExtension.rs b/MailKit/MEExtension.rs index f72c6b75e..c61aae37b 100644 --- a/MailKit/MEExtension.rs +++ b/MailKit/MEExtension.rs @@ -6,6 +6,7 @@ use crate::Foundation::*; use crate::MailKit::*; extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait MEExtension: NSObjectProtocol { #[cfg(feature = "MailKit_MEComposeSession")] #[optional] diff --git a/MailKit/MEExtensionManager.rs b/MailKit/MEExtensionManager.rs index 4739520d9..26d847c6e 100644 --- a/MailKit/MEExtensionManager.rs +++ b/MailKit/MEExtensionManager.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEExtensionManager")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEExtensionManager; #[cfg(feature = "MailKit_MEExtensionManager")] diff --git a/MailKit/MEExtensionViewController.rs b/MailKit/MEExtensionViewController.rs index 0fa5fbff3..d78f60135 100644 --- a/MailKit/MEExtensionViewController.rs +++ b/MailKit/MEExtensionViewController.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEExtensionViewController")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEExtensionViewController; #[cfg(feature = "MailKit_MEExtensionViewController")] @@ -42,6 +43,7 @@ extern_methods!( #[cfg(feature = "MailKit_MEExtensionViewController")] unsafe impl MEExtensionViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/MailKit/MEMessage.rs b/MailKit/MEMessage.rs index 0e183520a..46eb245b2 100644 --- a/MailKit/MEMessage.rs +++ b/MailKit/MEMessage.rs @@ -7,18 +7,26 @@ use crate::MailKit::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum MEMessageState { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageStateReceived = 0, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageStateDraft = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageStateSending = 2, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum MEMessageEncryptionState { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageEncryptionStateUnknown = 0, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageEncryptionStateNotEncrypted = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageEncryptionStateEncrypted = 2, } ); @@ -26,6 +34,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEMessage")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEMessage; #[cfg(feature = "MailKit_MEMessage")] diff --git a/MailKit/MEMessageAction.rs b/MailKit/MEMessageAction.rs index 684bfb629..c560ce78c 100644 --- a/MailKit/MEMessageAction.rs +++ b/MailKit/MEMessageAction.rs @@ -7,29 +7,48 @@ use crate::MailKit::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum MEMessageActionMessageColor { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionMessageColorNone = 0, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionMessageColorGreen = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionMessageColorYellow = 2, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionMessageColorOrange = 3, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionMessageColorRed = 4, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionMessageColorPurple = 5, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionMessageColorBlue = 6, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionMessageColorGray = 7, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum MEMessageActionFlag { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionFlagNone = 0, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionFlagDefaultColor = 1, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionFlagRed = 2, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionFlagOrange = 3, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionFlagYellow = 4, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionFlagGreen = 5, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionFlagBlue = 6, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionFlagPurple = 7, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageActionFlagGray = 8, } ); @@ -37,6 +56,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEMessageAction")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEMessageAction; #[cfg(feature = "MailKit_MEMessageAction")] diff --git a/MailKit/MEMessageActionDecision.rs b/MailKit/MEMessageActionDecision.rs index 5fd294645..8aa90aaf5 100644 --- a/MailKit/MEMessageActionDecision.rs +++ b/MailKit/MEMessageActionDecision.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEMessageActionDecision")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEMessageActionDecision; #[cfg(feature = "MailKit_MEMessageActionDecision")] diff --git a/MailKit/MEMessageActionHandler.rs b/MailKit/MEMessageActionHandler.rs index fb79e5ba2..b65c01a3d 100644 --- a/MailKit/MEMessageActionHandler.rs +++ b/MailKit/MEMessageActionHandler.rs @@ -6,6 +6,7 @@ use crate::Foundation::*; use crate::MailKit::*; extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait MEMessageActionHandler: NSObjectProtocol { #[cfg(all( feature = "MailKit_MEMessage", diff --git a/MailKit/MEMessageDecoder.rs b/MailKit/MEMessageDecoder.rs index 6c63eb800..47b3bec5d 100644 --- a/MailKit/MEMessageDecoder.rs +++ b/MailKit/MEMessageDecoder.rs @@ -6,6 +6,7 @@ use crate::Foundation::*; use crate::MailKit::*; extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait MEMessageDecoder: NSObjectProtocol { #[cfg(all(feature = "Foundation_NSData", feature = "MailKit_MEDecodedMessage"))] #[method_id(@__retain_semantics Other decodedMessageForMessageData:)] diff --git a/MailKit/MEMessageEncoder.rs b/MailKit/MEMessageEncoder.rs index 77161ec3b..7d3ac91e7 100644 --- a/MailKit/MEMessageEncoder.rs +++ b/MailKit/MEMessageEncoder.rs @@ -6,6 +6,7 @@ use crate::Foundation::*; use crate::MailKit::*; extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait MEMessageEncoder: NSObjectProtocol { #[cfg(all( feature = "MailKit_MEComposeContext", diff --git a/MailKit/MEMessageEncodingResult.rs b/MailKit/MEMessageEncodingResult.rs index 056a40c39..40a4737d0 100644 --- a/MailKit/MEMessageEncodingResult.rs +++ b/MailKit/MEMessageEncodingResult.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEMessageEncodingResult")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEMessageEncodingResult; #[cfg(feature = "MailKit_MEMessageEncodingResult")] diff --git a/MailKit/MEMessageSecurityHandler.rs b/MailKit/MEMessageSecurityHandler.rs index 9eccf3d32..06741fde7 100644 --- a/MailKit/MEMessageSecurityHandler.rs +++ b/MailKit/MEMessageSecurityHandler.rs @@ -9,13 +9,17 @@ extern_static!(MEMessageSecurityErrorDomain: &'static NSErrorDomain); ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub enum MEMessageSecurityErrorCode { + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageSecurityEncodingError = 0, + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] MEMessageSecurityDecodingError = 1, } ); extern_protocol!( + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub unsafe trait MEMessageSecurityHandler: MEMessageDecoder + MEMessageEncoder { #[cfg(all( feature = "Foundation_NSArray", diff --git a/MailKit/MEMessageSecurityInformation.rs b/MailKit/MEMessageSecurityInformation.rs index 35cb1ab34..8adf3baaa 100644 --- a/MailKit/MEMessageSecurityInformation.rs +++ b/MailKit/MEMessageSecurityInformation.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEMessageSecurityInformation")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEMessageSecurityInformation; #[cfg(feature = "MailKit_MEMessageSecurityInformation")] diff --git a/MailKit/MEMessageSigner.rs b/MailKit/MEMessageSigner.rs index 73a6ef3e8..53a8ed820 100644 --- a/MailKit/MEMessageSigner.rs +++ b/MailKit/MEMessageSigner.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEMessageSigner")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEMessageSigner; #[cfg(feature = "MailKit_MEMessageSigner")] diff --git a/MailKit/MEOutgoingMessageEncodingStatus.rs b/MailKit/MEOutgoingMessageEncodingStatus.rs index b5a62e235..31c3d356c 100644 --- a/MailKit/MEOutgoingMessageEncodingStatus.rs +++ b/MailKit/MEOutgoingMessageEncodingStatus.rs @@ -8,6 +8,7 @@ use crate::MailKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MailKit_MEOutgoingMessageEncodingStatus")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MEOutgoingMessageEncodingStatus; #[cfg(feature = "MailKit_MEOutgoingMessageEncodingStatus")] diff --git a/MapKit/MKAnnotationView.rs b/MapKit/MKAnnotationView.rs index 0a656ab1e..8a6baca6e 100644 --- a/MapKit/MKAnnotationView.rs +++ b/MapKit/MKAnnotationView.rs @@ -11,11 +11,17 @@ extern_static!(MKAnnotationCalloutInfoDidChangeNotification: &'static NSString); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKAnnotationViewDragState { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKAnnotationViewDragStateNone = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKAnnotationViewDragStateStarting = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKAnnotationViewDragStateDragging = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKAnnotationViewDragStateCanceling = 3, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKAnnotationViewDragStateEnding = 4, } ); @@ -44,9 +50,13 @@ extern_static!(MKAnnotationViewZPriorityMin: MKAnnotationViewZPriority = 0); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKAnnotationViewCollisionMode { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKAnnotationViewCollisionModeRectangle = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKAnnotationViewCollisionModeCircle = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKAnnotationViewCollisionModeNone = 2, } ); @@ -141,15 +151,19 @@ extern_methods!( #[method(setCalloutOffset:)] pub unsafe fn setCalloutOffset(&self, callout_offset: CGPoint); + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(leftCalloutOffset)] pub unsafe fn leftCalloutOffset(&self) -> CGPoint; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setLeftCalloutOffset:)] pub unsafe fn setLeftCalloutOffset(&self, left_callout_offset: CGPoint); + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(rightCalloutOffset)] pub unsafe fn rightCalloutOffset(&self) -> CGPoint; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setRightCalloutOffset:)] pub unsafe fn setRightCalloutOffset(&self, right_callout_offset: CGPoint); @@ -243,15 +257,19 @@ extern_methods!( #[method(setDisplayPriority:)] pub unsafe fn setDisplayPriority(&self, display_priority: MKFeatureDisplayPriority); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(zPriority)] pub unsafe fn zPriority(&self) -> MKAnnotationViewZPriority; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setZPriority:)] pub unsafe fn setZPriority(&self, z_priority: MKAnnotationViewZPriority); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(selectedZPriority)] pub unsafe fn selectedZPriority(&self) -> MKAnnotationViewZPriority; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setSelectedZPriority:)] pub unsafe fn setSelectedZPriority(&self, selected_z_priority: MKAnnotationViewZPriority); @@ -267,6 +285,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "MapKit_MKAnnotationView")] unsafe impl MKAnnotationView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/MapKit/MKCircle.rs b/MapKit/MKCircle.rs index b5c3ee181..6ed52e412 100644 --- a/MapKit/MKCircle.rs +++ b/MapKit/MKCircle.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKCircle")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKCircle; #[cfg(feature = "MapKit_MKCircle")] diff --git a/MapKit/MKCircleRenderer.rs b/MapKit/MKCircleRenderer.rs index 5fcf27d35..86a67250c 100644 --- a/MapKit/MKCircleRenderer.rs +++ b/MapKit/MKCircleRenderer.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKCircleRenderer")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKCircleRenderer; #[cfg(feature = "MapKit_MKCircleRenderer")] @@ -33,15 +34,19 @@ extern_methods!( #[method_id(@__retain_semantics Other circle)] pub unsafe fn circle(&self) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(strokeStart)] pub unsafe fn strokeStart(&self) -> CGFloat; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setStrokeStart:)] pub unsafe fn setStrokeStart(&self, stroke_start: CGFloat); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(strokeEnd)] pub unsafe fn strokeEnd(&self) -> CGFloat; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setStrokeEnd:)] pub unsafe fn setStrokeEnd(&self, stroke_end: CGFloat); } diff --git a/MapKit/MKClusterAnnotation.rs b/MapKit/MKClusterAnnotation.rs index ebb820209..d7dfd7067 100644 --- a/MapKit/MKClusterAnnotation.rs +++ b/MapKit/MKClusterAnnotation.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKClusterAnnotation")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKClusterAnnotation; #[cfg(feature = "MapKit_MKClusterAnnotation")] diff --git a/MapKit/MKCompassButton.rs b/MapKit/MKCompassButton.rs index 69c3f3858..a2fd7d7c4 100644 --- a/MapKit/MKCompassButton.rs +++ b/MapKit/MKCompassButton.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKCompassButton")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKCompassButton; #[cfg(feature = "MapKit_MKCompassButton")] @@ -70,6 +71,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "MapKit_MKCompassButton")] unsafe impl MKCompassButton { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/MapKit/MKDirections.rs b/MapKit/MKDirections.rs index 8955cf733..9b4b7f5c5 100644 --- a/MapKit/MKDirections.rs +++ b/MapKit/MKDirections.rs @@ -14,6 +14,7 @@ pub type MKETAHandler = *mut Block<(*mut MKETAResponse, *mut NSError), ()>; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKDirections")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKDirections; #[cfg(feature = "MapKit_MKDirections")] diff --git a/MapKit/MKDirectionsRequest.rs b/MapKit/MKDirectionsRequest.rs index f7d302bca..2195fd773 100644 --- a/MapKit/MKDirectionsRequest.rs +++ b/MapKit/MKDirectionsRequest.rs @@ -18,6 +18,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKDirectionsRequest")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKDirectionsRequest; #[cfg(feature = "MapKit_MKDirectionsRequest")] @@ -82,15 +83,19 @@ extern_methods!( #[method(setArrivalDate:)] pub unsafe fn setArrivalDate(&self, arrival_date: Option<&NSDate>); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(tollPreference)] pub unsafe fn tollPreference(&self) -> MKDirectionsRoutePreference; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setTollPreference:)] pub unsafe fn setTollPreference(&self, toll_preference: MKDirectionsRoutePreference); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(highwayPreference)] pub unsafe fn highwayPreference(&self) -> MKDirectionsRoutePreference; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setHighwayPreference:)] pub unsafe fn setHighwayPreference(&self, highway_preference: MKDirectionsRoutePreference); } diff --git a/MapKit/MKDirectionsResponse.rs b/MapKit/MKDirectionsResponse.rs index b9e7f03d2..7ad210c85 100644 --- a/MapKit/MKDirectionsResponse.rs +++ b/MapKit/MKDirectionsResponse.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKDirectionsResponse")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKDirectionsResponse; #[cfg(feature = "MapKit_MKDirectionsResponse")] @@ -41,6 +42,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKRoute")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKRoute; #[cfg(feature = "MapKit_MKRoute")] @@ -80,9 +82,11 @@ extern_methods!( #[method_id(@__retain_semantics Other steps)] pub unsafe fn steps(&self) -> Id>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(hasTolls)] pub unsafe fn hasTolls(&self) -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(hasHighways)] pub unsafe fn hasHighways(&self) -> bool; } @@ -91,6 +95,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKRouteStep")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKRouteStep; #[cfg(feature = "MapKit_MKRouteStep")] @@ -128,6 +133,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKETAResponse")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKETAResponse; #[cfg(feature = "MapKit_MKETAResponse")] diff --git a/MapKit/MKDirectionsTypes.rs b/MapKit/MKDirectionsTypes.rs index 24a0ca7b2..887231ac1 100644 --- a/MapKit/MKDirectionsTypes.rs +++ b/MapKit/MKDirectionsTypes.rs @@ -9,10 +9,14 @@ use crate::MapKit::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKDirectionsTransportType { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKDirectionsTransportTypeAutomobile = 1 << 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKDirectionsTransportTypeWalking = 1 << 1, MKDirectionsTransportTypeTransit = 1 << 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKDirectionsTransportTypeAny = 0x0FFFFFFF, } ); diff --git a/MapKit/MKGeoJSONSerialization.rs b/MapKit/MKGeoJSONSerialization.rs index 9e9d977bd..6856f6987 100644 --- a/MapKit/MKGeoJSONSerialization.rs +++ b/MapKit/MKGeoJSONSerialization.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; use crate::MapKit::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait MKGeoJSONObject: NSObjectProtocol {} unsafe impl ProtocolType for dyn MKGeoJSONObject {} @@ -16,6 +17,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKGeoJSONDecoder")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKGeoJSONDecoder; #[cfg(feature = "MapKit_MKGeoJSONDecoder")] @@ -46,6 +48,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKGeoJSONFeature")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKGeoJSONFeature; #[cfg(feature = "MapKit_MKGeoJSONFeature")] diff --git a/MapKit/MKGeodesicPolyline.rs b/MapKit/MKGeodesicPolyline.rs index 07e89b8de..9b2e7578a 100644 --- a/MapKit/MKGeodesicPolyline.rs +++ b/MapKit/MKGeodesicPolyline.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKGeodesicPolyline")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKGeodesicPolyline; #[cfg(feature = "MapKit_MKGeodesicPolyline")] diff --git a/MapKit/MKGradientPolylineRenderer.rs b/MapKit/MKGradientPolylineRenderer.rs index 85c3ac221..87588edea 100644 --- a/MapKit/MKGradientPolylineRenderer.rs +++ b/MapKit/MKGradientPolylineRenderer.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKGradientPolylineRenderer")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKGradientPolylineRenderer; #[cfg(feature = "MapKit_MKGradientPolylineRenderer")] diff --git a/MapKit/MKHybridMapConfiguration.rs b/MapKit/MKHybridMapConfiguration.rs index ba37bc314..f72b69a3b 100644 --- a/MapKit/MKHybridMapConfiguration.rs +++ b/MapKit/MKHybridMapConfiguration.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKHybridMapConfiguration")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKHybridMapConfiguration; #[cfg(feature = "MapKit_MKHybridMapConfiguration")] diff --git a/MapKit/MKImageryMapConfiguration.rs b/MapKit/MKImageryMapConfiguration.rs index 1952473cb..21e78aa3e 100644 --- a/MapKit/MKImageryMapConfiguration.rs +++ b/MapKit/MKImageryMapConfiguration.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKImageryMapConfiguration")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKImageryMapConfiguration; #[cfg(feature = "MapKit_MKImageryMapConfiguration")] diff --git a/MapKit/MKLocalPointsOfInterestRequest.rs b/MapKit/MKLocalPointsOfInterestRequest.rs index 14f960a9f..5d44d43d0 100644 --- a/MapKit/MKLocalPointsOfInterestRequest.rs +++ b/MapKit/MKLocalPointsOfInterestRequest.rs @@ -12,6 +12,7 @@ extern_static!(MKPointsOfInterestRequestMaxRadius: CLLocationDistance); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKLocalPointsOfInterestRequest")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKLocalPointsOfInterestRequest; #[cfg(feature = "MapKit_MKLocalPointsOfInterestRequest")] diff --git a/MapKit/MKLocalSearch.rs b/MapKit/MKLocalSearch.rs index a13679153..be3e7fb04 100644 --- a/MapKit/MKLocalSearch.rs +++ b/MapKit/MKLocalSearch.rs @@ -13,6 +13,7 @@ pub type MKLocalSearchCompletionHandler = extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKLocalSearch")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKLocalSearch; #[cfg(feature = "MapKit_MKLocalSearch")] @@ -35,6 +36,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "MapKit_MKLocalPointsOfInterestRequest")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithPointsOfInterestRequest:)] pub unsafe fn initWithPointsOfInterestRequest( this: Option>, diff --git a/MapKit/MKLocalSearchCompleter.rs b/MapKit/MKLocalSearchCompleter.rs index dac7a5630..f8c98c303 100644 --- a/MapKit/MKLocalSearchCompleter.rs +++ b/MapKit/MKLocalSearchCompleter.rs @@ -10,19 +10,26 @@ use crate::MapKit::*; ns_enum!( #[underlying(NSInteger)] #[deprecated = "Use MKLocalSearchCompleterResultType"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKSearchCompletionFilterType { #[deprecated = "Use MKLocalSearchCompleterResultType"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKSearchCompletionFilterTypeLocationsAndQueries = 0, #[deprecated = "Use MKLocalSearchCompleterResultType"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKSearchCompletionFilterTypeLocationsOnly = 1, } ); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKLocalSearchCompleterResultType { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKLocalSearchCompleterResultTypeAddress = 1 << 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKLocalSearchCompleterResultTypePointOfInterest = 1 << 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKLocalSearchCompleterResultTypeQuery = 1 << 2, } ); @@ -30,6 +37,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKLocalSearchCompleter")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKLocalSearchCompleter; #[cfg(feature = "MapKit_MKLocalSearchCompleter")] @@ -59,24 +67,30 @@ extern_methods!( pub unsafe fn setRegion(&self, region: MKCoordinateRegion); #[deprecated = "Use resultTypes"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(filterType)] pub unsafe fn filterType(&self) -> MKSearchCompletionFilterType; #[deprecated = "Use resultTypes"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setFilterType:)] pub unsafe fn setFilterType(&self, filter_type: MKSearchCompletionFilterType); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(resultTypes)] pub unsafe fn resultTypes(&self) -> MKLocalSearchCompleterResultType; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setResultTypes:)] pub unsafe fn setResultTypes(&self, result_types: MKLocalSearchCompleterResultType); #[cfg(feature = "MapKit_MKPointOfInterestFilter")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other pointOfInterestFilter)] pub unsafe fn pointOfInterestFilter(&self) -> Option>; #[cfg(feature = "MapKit_MKPointOfInterestFilter")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setPointOfInterestFilter:)] pub unsafe fn setPointOfInterestFilter( &self, @@ -110,6 +124,7 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait MKLocalSearchCompleterDelegate: NSObjectProtocol { #[cfg(feature = "MapKit_MKLocalSearchCompleter")] #[optional] @@ -135,6 +150,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKLocalSearchCompletion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKLocalSearchCompletion; #[cfg(feature = "MapKit_MKLocalSearchCompletion")] @@ -171,6 +187,7 @@ extern_methods!( #[cfg(feature = "MapKit_MKLocalSearchRequest")] unsafe impl MKLocalSearchRequest { #[cfg(feature = "MapKit_MKLocalSearchCompletion")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithCompletion:)] pub unsafe fn initWithCompletion( this: Option>, diff --git a/MapKit/MKLocalSearchRequest.rs b/MapKit/MKLocalSearchRequest.rs index f43bea7eb..ace1b7119 100644 --- a/MapKit/MKLocalSearchRequest.rs +++ b/MapKit/MKLocalSearchRequest.rs @@ -9,8 +9,11 @@ use crate::MapKit::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKLocalSearchResultType { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKLocalSearchResultTypeAddress = 1 << 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKLocalSearchResultTypePointOfInterest = 1 << 1, } ); @@ -18,6 +21,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKLocalSearchRequest")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKLocalSearchRequest; #[cfg(feature = "MapKit_MKLocalSearchRequest")] @@ -36,6 +40,7 @@ extern_methods!( pub unsafe fn init(this: Option>) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithNaturalLanguageQuery:)] pub unsafe fn initWithNaturalLanguageQuery( this: Option>, @@ -43,6 +48,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithNaturalLanguageQuery:region:)] pub unsafe fn initWithNaturalLanguageQuery_region( this: Option>, @@ -64,17 +70,21 @@ extern_methods!( #[method(setRegion:)] pub unsafe fn setRegion(&self, region: MKCoordinateRegion); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(resultTypes)] pub unsafe fn resultTypes(&self) -> MKLocalSearchResultType; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setResultTypes:)] pub unsafe fn setResultTypes(&self, result_types: MKLocalSearchResultType); #[cfg(feature = "MapKit_MKPointOfInterestFilter")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other pointOfInterestFilter)] pub unsafe fn pointOfInterestFilter(&self) -> Option>; #[cfg(feature = "MapKit_MKPointOfInterestFilter")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setPointOfInterestFilter:)] pub unsafe fn setPointOfInterestFilter( &self, diff --git a/MapKit/MKLocalSearchResponse.rs b/MapKit/MKLocalSearchResponse.rs index 3fc570527..d6416cb45 100644 --- a/MapKit/MKLocalSearchResponse.rs +++ b/MapKit/MKLocalSearchResponse.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKLocalSearchResponse")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKLocalSearchResponse; #[cfg(feature = "MapKit_MKLocalSearchResponse")] diff --git a/MapKit/MKLookAroundScene.rs b/MapKit/MKLookAroundScene.rs index 5d97c3b31..5724a906f 100644 --- a/MapKit/MKLookAroundScene.rs +++ b/MapKit/MKLookAroundScene.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKLookAroundScene")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKLookAroundScene; #[cfg(feature = "MapKit_MKLookAroundScene")] diff --git a/MapKit/MKLookAroundSceneRequest.rs b/MapKit/MKLookAroundSceneRequest.rs index f3faeef53..02accd26c 100644 --- a/MapKit/MKLookAroundSceneRequest.rs +++ b/MapKit/MKLookAroundSceneRequest.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKLookAroundSceneRequest")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKLookAroundSceneRequest; #[cfg(feature = "MapKit_MKLookAroundSceneRequest")] diff --git a/MapKit/MKLookAroundSnapshot.rs b/MapKit/MKLookAroundSnapshot.rs index f136c78ac..0db001dd5 100644 --- a/MapKit/MKLookAroundSnapshot.rs +++ b/MapKit/MKLookAroundSnapshot.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKLookAroundSnapshot")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKLookAroundSnapshot; #[cfg(feature = "MapKit_MKLookAroundSnapshot")] diff --git a/MapKit/MKLookAroundSnapshotOptions.rs b/MapKit/MKLookAroundSnapshotOptions.rs index 6dc9ef409..435b6710f 100644 --- a/MapKit/MKLookAroundSnapshotOptions.rs +++ b/MapKit/MKLookAroundSnapshotOptions.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKLookAroundSnapshotOptions")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKLookAroundSnapshotOptions; #[cfg(feature = "MapKit_MKLookAroundSnapshotOptions")] diff --git a/MapKit/MKLookAroundSnapshotter.rs b/MapKit/MKLookAroundSnapshotter.rs index 1a0839581..4bf52555a 100644 --- a/MapKit/MKLookAroundSnapshotter.rs +++ b/MapKit/MKLookAroundSnapshotter.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKLookAroundSnapshotter")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKLookAroundSnapshotter; #[cfg(feature = "MapKit_MKLookAroundSnapshotter")] diff --git a/MapKit/MKLookAroundViewController.rs b/MapKit/MKLookAroundViewController.rs index 31d8893f4..6a5cb9de8 100644 --- a/MapKit/MKLookAroundViewController.rs +++ b/MapKit/MKLookAroundViewController.rs @@ -9,9 +9,13 @@ use crate::MapKit::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKLookAroundBadgePosition { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKLookAroundBadgePositionTopLeading = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKLookAroundBadgePositionTopTrailing = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKLookAroundBadgePositionBottomTrailing = 2, } ); @@ -19,6 +23,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKLookAroundViewController")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKLookAroundViewController; #[cfg(feature = "MapKit_MKLookAroundViewController")] @@ -122,6 +127,7 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait MKLookAroundViewControllerDelegate: NSObjectProtocol { #[cfg(feature = "MapKit_MKLookAroundViewController")] #[optional] diff --git a/MapKit/MKMapCamera.rs b/MapKit/MKMapCamera.rs index 93939c7f1..51b6c2ec5 100644 --- a/MapKit/MKMapCamera.rs +++ b/MapKit/MKMapCamera.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMapCamera")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMapCamera; #[cfg(feature = "MapKit_MKMapCamera")] @@ -36,9 +37,11 @@ extern_methods!( #[method(setCenterCoordinate:)] pub unsafe fn setCenterCoordinate(&self, center_coordinate: CLLocationCoordinate2D); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(centerCoordinateDistance)] pub unsafe fn centerCoordinateDistance(&self) -> CLLocationDistance; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setCenterCoordinateDistance:)] pub unsafe fn setCenterCoordinateDistance( &self, @@ -58,10 +61,12 @@ extern_methods!( pub unsafe fn setPitch(&self, pitch: CGFloat); #[deprecated = "Use centerCoordinateDistance"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(altitude)] pub unsafe fn altitude(&self) -> CLLocationDistance; #[deprecated = "Use centerCoordinateDistance"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setAltitude:)] pub unsafe fn setAltitude(&self, altitude: CLLocationDistance); @@ -84,6 +89,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "MapKit_MKMapItem")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other cameraLookingAtMapItem:forViewSize:allowPitch:)] pub unsafe fn cameraLookingAtMapItem_forViewSize_allowPitch( map_item: &MKMapItem, diff --git a/MapKit/MKMapCameraBoundary.rs b/MapKit/MKMapCameraBoundary.rs index 0047a09bf..884949d16 100644 --- a/MapKit/MKMapCameraBoundary.rs +++ b/MapKit/MKMapCameraBoundary.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMapCameraBoundary")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMapCameraBoundary; #[cfg(feature = "MapKit_MKMapCameraBoundary")] diff --git a/MapKit/MKMapCameraZoomRange.rs b/MapKit/MKMapCameraZoomRange.rs index c7471590c..dcc0e9384 100644 --- a/MapKit/MKMapCameraZoomRange.rs +++ b/MapKit/MKMapCameraZoomRange.rs @@ -12,6 +12,7 @@ extern_static!(MKMapCameraZoomDefault: CLLocationDistance); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMapCameraZoomRange")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMapCameraZoomRange; #[cfg(feature = "MapKit_MKMapCameraZoomRange")] diff --git a/MapKit/MKMapConfiguration.rs b/MapKit/MKMapConfiguration.rs index 3c82c27b4..95b3f120b 100644 --- a/MapKit/MKMapConfiguration.rs +++ b/MapKit/MKMapConfiguration.rs @@ -18,6 +18,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMapConfiguration")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMapConfiguration; #[cfg(feature = "MapKit_MKMapConfiguration")] diff --git a/MapKit/MKMapItem.rs b/MapKit/MKMapItem.rs index 2f4f17a2a..874fdf2c2 100644 --- a/MapKit/MKMapItem.rs +++ b/MapKit/MKMapItem.rs @@ -63,9 +63,11 @@ extern_methods!( #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, time_zone: Option<&NSTimeZone>); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other pointOfInterestCategory)] pub unsafe fn pointOfInterestCategory(&self) -> Option>; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setPointOfInterestCategory:)] pub unsafe fn setPointOfInterestCategory( &self, diff --git a/MapKit/MKMapSnapshot.rs b/MapKit/MKMapSnapshot.rs index df52ea415..ab41297b2 100644 --- a/MapKit/MKMapSnapshot.rs +++ b/MapKit/MKMapSnapshot.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMapSnapshot")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMapSnapshot; #[cfg(feature = "MapKit_MKMapSnapshot")] @@ -29,6 +30,7 @@ extern_methods!( pub unsafe fn image(&self) -> Id; #[cfg(feature = "AppKit_NSAppearance")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other appearance)] pub unsafe fn appearance(&self) -> Id; diff --git a/MapKit/MKMapSnapshotOptions.rs b/MapKit/MKMapSnapshotOptions.rs index 05f8e19cb..0a2b353aa 100644 --- a/MapKit/MKMapSnapshotOptions.rs +++ b/MapKit/MKMapSnapshotOptions.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMapSnapshotOptions")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMapSnapshotOptions; #[cfg(feature = "MapKit_MKMapSnapshotOptions")] @@ -51,10 +52,12 @@ extern_methods!( pub unsafe fn setMapType(&self, map_type: MKMapType); #[cfg(feature = "MapKit_MKPointOfInterestFilter")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other pointOfInterestFilter)] pub unsafe fn pointOfInterestFilter(&self) -> Option>; #[cfg(feature = "MapKit_MKPointOfInterestFilter")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setPointOfInterestFilter:)] pub unsafe fn setPointOfInterestFilter( &self, @@ -62,10 +65,12 @@ extern_methods!( ); #[deprecated = "Use pointOfInterestFilter"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(showsPointsOfInterest)] pub unsafe fn showsPointsOfInterest(&self) -> bool; #[deprecated = "Use pointOfInterestFilter"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setShowsPointsOfInterest:)] pub unsafe fn setShowsPointsOfInterest(&self, shows_points_of_interest: bool); @@ -82,10 +87,12 @@ extern_methods!( pub unsafe fn setSize(&self, size: NSSize); #[cfg(feature = "AppKit_NSAppearance")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other appearance)] pub unsafe fn appearance(&self) -> Option>; #[cfg(feature = "AppKit_NSAppearance")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setAppearance:)] pub unsafe fn setAppearance(&self, appearance: Option<&NSAppearance>); } diff --git a/MapKit/MKMapSnapshotter.rs b/MapKit/MKMapSnapshotter.rs index 0d3e1fced..ab48ea447 100644 --- a/MapKit/MKMapSnapshotter.rs +++ b/MapKit/MKMapSnapshotter.rs @@ -12,6 +12,7 @@ pub type MKMapSnapshotCompletionHandler = *mut Block<(*mut MKMapSnapshot, *mut N extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMapSnapshotter")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMapSnapshotter; #[cfg(feature = "MapKit_MKMapSnapshotter")] diff --git a/MapKit/MKMapView.rs b/MapKit/MKMapView.rs index 4fca5dc35..8a21d338a 100644 --- a/MapKit/MKMapView.rs +++ b/MapKit/MKMapView.rs @@ -9,9 +9,13 @@ use crate::MapKit::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKUserTrackingMode { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKUserTrackingModeNone = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKUserTrackingModeFollow = 1, + #[cfg(not(any(target_os = "macos")))] MKUserTrackingModeFollowWithHeading = 2, } ); @@ -74,10 +78,12 @@ extern_methods!( pub unsafe fn setMapType(&self, map_type: MKMapType); #[cfg(feature = "MapKit_MKMapConfiguration")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other preferredConfiguration)] pub unsafe fn preferredConfiguration(&self) -> Id; #[cfg(feature = "MapKit_MKMapConfiguration")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setPreferredConfiguration:)] pub unsafe fn setPreferredConfiguration( &self, @@ -149,14 +155,17 @@ extern_methods!( pub unsafe fn setCamera_animated(&self, camera: &MKMapCamera, animated: bool); #[cfg(feature = "MapKit_MKMapCameraZoomRange")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other cameraZoomRange)] pub unsafe fn cameraZoomRange(&self) -> Id; #[cfg(feature = "MapKit_MKMapCameraZoomRange")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setCameraZoomRange:)] pub unsafe fn setCameraZoomRange(&self, camera_zoom_range: Option<&MKMapCameraZoomRange>); #[cfg(feature = "MapKit_MKMapCameraZoomRange")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setCameraZoomRange:animated:)] pub unsafe fn setCameraZoomRange_animated( &self, @@ -165,14 +174,17 @@ extern_methods!( ); #[cfg(feature = "MapKit_MKMapCameraBoundary")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other cameraBoundary)] pub unsafe fn cameraBoundary(&self) -> Option>; #[cfg(feature = "MapKit_MKMapCameraBoundary")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setCameraBoundary:)] pub unsafe fn setCameraBoundary(&self, camera_boundary: Option<&MKMapCameraBoundary>); #[cfg(feature = "MapKit_MKMapCameraBoundary")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setCameraBoundary:animated:)] pub unsafe fn setCameraBoundary_animated( &self, @@ -232,15 +244,19 @@ extern_methods!( #[method(setPitchEnabled:)] pub unsafe fn setPitchEnabled(&self, pitch_enabled: bool); + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(showsPitchControl)] pub unsafe fn showsPitchControl(&self) -> bool; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setShowsPitchControl:)] pub unsafe fn setShowsPitchControl(&self, shows_pitch_control: bool); + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(showsZoomControls)] pub unsafe fn showsZoomControls(&self) -> bool; + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(setShowsZoomControls:)] pub unsafe fn setShowsZoomControls(&self, shows_zoom_controls: bool); @@ -258,11 +274,13 @@ extern_methods!( #[cfg(feature = "MapKit_MKPointOfInterestFilter")] #[deprecated] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other pointOfInterestFilter)] pub unsafe fn pointOfInterestFilter(&self) -> Option>; #[cfg(feature = "MapKit_MKPointOfInterestFilter")] #[deprecated] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setPointOfInterestFilter:)] pub unsafe fn setPointOfInterestFilter( &self, @@ -270,10 +288,12 @@ extern_methods!( ); #[deprecated = "Use pointOfInterestFilter"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(showsPointsOfInterest)] pub unsafe fn showsPointsOfInterest(&self) -> bool; #[deprecated = "Use pointOfInterestFilter"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setShowsPointsOfInterest:)] pub unsafe fn setShowsPointsOfInterest(&self, shows_points_of_interest: bool); @@ -303,12 +323,15 @@ extern_methods!( #[method_id(@__retain_semantics Other userLocation)] pub unsafe fn userLocation(&self) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(userTrackingMode)] pub unsafe fn userTrackingMode(&self) -> MKUserTrackingMode; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setUserTrackingMode:)] pub unsafe fn setUserTrackingMode(&self, user_tracking_mode: MKUserTrackingMode); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setUserTrackingMode:animated:)] pub unsafe fn setUserTrackingMode_animated(&self, mode: MKUserTrackingMode, animated: bool); @@ -416,8 +439,11 @@ extern_methods!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKOverlayLevel { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKOverlayLevelAboveRoads = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKOverlayLevelAboveLabels = 1, } ); @@ -519,6 +545,7 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait MKMapViewDelegate: NSObjectProtocol { #[cfg(feature = "MapKit_MKMapView")] #[optional] @@ -605,6 +632,7 @@ extern_protocol!( ); #[cfg(feature = "MapKit_MKMapView")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(mapView:didSelectAnnotation:)] unsafe fn mapView_didSelectAnnotation( @@ -614,6 +642,7 @@ extern_protocol!( ); #[cfg(feature = "MapKit_MKMapView")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(mapView:didDeselectAnnotation:)] unsafe fn mapView_didDeselectAnnotation( @@ -662,6 +691,7 @@ extern_protocol!( ); #[cfg(feature = "MapKit_MKMapView")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(mapView:didChangeUserTrackingMode:animated:)] unsafe fn mapView_didChangeUserTrackingMode_animated( @@ -698,6 +728,7 @@ extern_protocol!( feature = "MapKit_MKClusterAnnotation", feature = "MapKit_MKMapView" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method_id(@__retain_semantics Other mapView:clusterAnnotationForMemberAnnotations:)] unsafe fn mapView_clusterAnnotationForMemberAnnotations( @@ -714,6 +745,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "MapKit_MKMapView")] unsafe impl MKMapView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/MapKit/MKMarkerAnnotationView.rs b/MapKit/MKMarkerAnnotationView.rs index 3ae7ac5ec..ed505d960 100644 --- a/MapKit/MKMarkerAnnotationView.rs +++ b/MapKit/MKMarkerAnnotationView.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMarkerAnnotationView")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMarkerAnnotationView; #[cfg(feature = "MapKit_MKMarkerAnnotationView")] @@ -124,6 +125,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "MapKit_MKMarkerAnnotationView")] unsafe impl MKMarkerAnnotationView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/MapKit/MKMultiPoint.rs b/MapKit/MKMultiPoint.rs index 4b009d0fc..f915f90fb 100644 --- a/MapKit/MKMultiPoint.rs +++ b/MapKit/MKMultiPoint.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMultiPoint")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMultiPoint; #[cfg(feature = "MapKit_MKMultiPoint")] @@ -41,6 +42,7 @@ extern_methods!( range: NSRange, ); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(locationAtPointIndex:)] pub unsafe fn locationAtPointIndex(&self, index: NSUInteger) -> CGFloat; @@ -49,6 +51,7 @@ extern_methods!( feature = "Foundation_NSIndexSet", feature = "Foundation_NSNumber" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other locationsAtPointIndexes:)] pub unsafe fn locationsAtPointIndexes(&self, indexes: &NSIndexSet) -> Id>; diff --git a/MapKit/MKMultiPolygon.rs b/MapKit/MKMultiPolygon.rs index 65e22f02c..8b25f7e0b 100644 --- a/MapKit/MKMultiPolygon.rs +++ b/MapKit/MKMultiPolygon.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMultiPolygon")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMultiPolygon; #[cfg(feature = "MapKit_MKMultiPolygon")] diff --git a/MapKit/MKMultiPolygonRenderer.rs b/MapKit/MKMultiPolygonRenderer.rs index a13cd2141..f89fed2cc 100644 --- a/MapKit/MKMultiPolygonRenderer.rs +++ b/MapKit/MKMultiPolygonRenderer.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMultiPolygonRenderer")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMultiPolygonRenderer; #[cfg(feature = "MapKit_MKMultiPolygonRenderer")] diff --git a/MapKit/MKMultiPolyline.rs b/MapKit/MKMultiPolyline.rs index 887670944..20552d783 100644 --- a/MapKit/MKMultiPolyline.rs +++ b/MapKit/MKMultiPolyline.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMultiPolyline")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMultiPolyline; #[cfg(feature = "MapKit_MKMultiPolyline")] diff --git a/MapKit/MKMultiPolylineRenderer.rs b/MapKit/MKMultiPolylineRenderer.rs index 0c0e22735..11312bed9 100644 --- a/MapKit/MKMultiPolylineRenderer.rs +++ b/MapKit/MKMultiPolylineRenderer.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKMultiPolylineRenderer")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKMultiPolylineRenderer; #[cfg(feature = "MapKit_MKMultiPolylineRenderer")] diff --git a/MapKit/MKOverlay.rs b/MapKit/MKOverlay.rs index 65d2818af..2cc76ecee 100644 --- a/MapKit/MKOverlay.rs +++ b/MapKit/MKOverlay.rs @@ -8,6 +8,7 @@ use crate::Foundation::*; use crate::MapKit::*; extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait MKOverlay: MKAnnotation { #[method(coordinate)] unsafe fn coordinate(&self) -> CLLocationCoordinate2D; diff --git a/MapKit/MKOverlayPathRenderer.rs b/MapKit/MKOverlayPathRenderer.rs index 979d8a6f8..32e7b6b7f 100644 --- a/MapKit/MKOverlayPathRenderer.rs +++ b/MapKit/MKOverlayPathRenderer.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKOverlayPathRenderer")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKOverlayPathRenderer; #[cfg(feature = "MapKit_MKOverlayPathRenderer")] @@ -67,9 +68,11 @@ extern_methods!( #[method(setLineDashPattern:)] pub unsafe fn setLineDashPattern(&self, line_dash_pattern: Option<&NSArray>); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(shouldRasterize)] pub unsafe fn shouldRasterize(&self) -> bool; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setShouldRasterize:)] pub unsafe fn setShouldRasterize(&self, should_rasterize: bool); diff --git a/MapKit/MKOverlayRenderer.rs b/MapKit/MKOverlayRenderer.rs index c5418964a..e2b1f968b 100644 --- a/MapKit/MKOverlayRenderer.rs +++ b/MapKit/MKOverlayRenderer.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKOverlayRenderer")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKOverlayRenderer; #[cfg(feature = "MapKit_MKOverlayRenderer")] @@ -77,5 +78,6 @@ extern_methods!( ); extern_fn!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe fn MKRoadWidthAtZoomScale(zoom_scale: MKZoomScale) -> CGFloat; ); diff --git a/MapKit/MKPinAnnotationView.rs b/MapKit/MKPinAnnotationView.rs index 9b80ca368..95d571d28 100644 --- a/MapKit/MKPinAnnotationView.rs +++ b/MapKit/MKPinAnnotationView.rs @@ -10,12 +10,16 @@ use crate::MapKit::*; ns_enum!( #[underlying(NSUInteger)] #[deprecated = "Use MKPinAnnotationView's pinTintColor instead"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKPinAnnotationColor { #[deprecated = "Use MKPinAnnotationView's pinTintColor instead"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKPinAnnotationColorRed = 0, #[deprecated = "Use MKPinAnnotationView's pinTintColor instead"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKPinAnnotationColorGreen = 1, #[deprecated = "Use MKPinAnnotationView's pinTintColor instead"] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKPinAnnotationColorPurple = 2, } ); @@ -24,6 +28,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKPinAnnotationView")] #[deprecated] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKPinAnnotationView; #[cfg(feature = "MapKit_MKPinAnnotationView")] @@ -114,6 +119,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "MapKit_MKPinAnnotationView")] unsafe impl MKPinAnnotationView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/MapKit/MKPitchControl.rs b/MapKit/MKPitchControl.rs index ee8f9fb36..a60bed4e3 100644 --- a/MapKit/MKPitchControl.rs +++ b/MapKit/MKPitchControl.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKPitchControl")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MKPitchControl; #[cfg(feature = "MapKit_MKPitchControl")] @@ -64,6 +65,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "MapKit_MKPitchControl")] unsafe impl MKPitchControl { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/MapKit/MKPointAnnotation.rs b/MapKit/MKPointAnnotation.rs index 3257937df..7191ce3e3 100644 --- a/MapKit/MKPointAnnotation.rs +++ b/MapKit/MKPointAnnotation.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKPointAnnotation")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKPointAnnotation; #[cfg(feature = "MapKit_MKPointAnnotation")] @@ -31,6 +32,7 @@ extern_methods!( #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithCoordinate:)] pub unsafe fn initWithCoordinate( this: Option>, @@ -38,6 +40,7 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithCoordinate:title:subtitle:)] pub unsafe fn initWithCoordinate_title_subtitle( this: Option>, diff --git a/MapKit/MKPointOfInterestFilter.rs b/MapKit/MKPointOfInterestFilter.rs index 70f7c2a6c..8f38b6d7b 100644 --- a/MapKit/MKPointOfInterestFilter.rs +++ b/MapKit/MKPointOfInterestFilter.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKPointOfInterestFilter")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKPointOfInterestFilter; #[cfg(feature = "MapKit_MKPointOfInterestFilter")] diff --git a/MapKit/MKPolygon.rs b/MapKit/MKPolygon.rs index 7de54a8b5..9758cbc3b 100644 --- a/MapKit/MKPolygon.rs +++ b/MapKit/MKPolygon.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKPolygon")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKPolygon; #[cfg(feature = "MapKit_MKPolygon")] diff --git a/MapKit/MKPolygonRenderer.rs b/MapKit/MKPolygonRenderer.rs index 2b0c9ed56..7d77aa620 100644 --- a/MapKit/MKPolygonRenderer.rs +++ b/MapKit/MKPolygonRenderer.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKPolygonRenderer")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKPolygonRenderer; #[cfg(feature = "MapKit_MKPolygonRenderer")] @@ -36,15 +37,19 @@ extern_methods!( #[method_id(@__retain_semantics Other polygon)] pub unsafe fn polygon(&self) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(strokeStart)] pub unsafe fn strokeStart(&self) -> CGFloat; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setStrokeStart:)] pub unsafe fn setStrokeStart(&self, stroke_start: CGFloat); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(strokeEnd)] pub unsafe fn strokeEnd(&self) -> CGFloat; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setStrokeEnd:)] pub unsafe fn setStrokeEnd(&self, stroke_end: CGFloat); } diff --git a/MapKit/MKPolyline.rs b/MapKit/MKPolyline.rs index 784869b25..fb6ad3c75 100644 --- a/MapKit/MKPolyline.rs +++ b/MapKit/MKPolyline.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKPolyline")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKPolyline; #[cfg(feature = "MapKit_MKPolyline")] diff --git a/MapKit/MKPolylineRenderer.rs b/MapKit/MKPolylineRenderer.rs index 098ef61cc..f45ca944e 100644 --- a/MapKit/MKPolylineRenderer.rs +++ b/MapKit/MKPolylineRenderer.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKPolylineRenderer")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKPolylineRenderer; #[cfg(feature = "MapKit_MKPolylineRenderer")] @@ -36,15 +37,19 @@ extern_methods!( #[method_id(@__retain_semantics Other polyline)] pub unsafe fn polyline(&self) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(strokeStart)] pub unsafe fn strokeStart(&self) -> CGFloat; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setStrokeStart:)] pub unsafe fn setStrokeStart(&self, stroke_start: CGFloat); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(strokeEnd)] pub unsafe fn strokeEnd(&self) -> CGFloat; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setStrokeEnd:)] pub unsafe fn setStrokeEnd(&self, stroke_end: CGFloat); } diff --git a/MapKit/MKShape.rs b/MapKit/MKShape.rs index 7e65c981e..658133929 100644 --- a/MapKit/MKShape.rs +++ b/MapKit/MKShape.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKShape")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKShape; #[cfg(feature = "MapKit_MKShape")] diff --git a/MapKit/MKStandardMapConfiguration.rs b/MapKit/MKStandardMapConfiguration.rs index b666e8143..05d09ad97 100644 --- a/MapKit/MKStandardMapConfiguration.rs +++ b/MapKit/MKStandardMapConfiguration.rs @@ -18,6 +18,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKStandardMapConfiguration")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKStandardMapConfiguration; #[cfg(feature = "MapKit_MKStandardMapConfiguration")] diff --git a/MapKit/MKTileOverlay.rs b/MapKit/MKTileOverlay.rs index 35cda698c..b24b78578 100644 --- a/MapKit/MKTileOverlay.rs +++ b/MapKit/MKTileOverlay.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKTileOverlay")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKTileOverlay; #[cfg(feature = "MapKit_MKTileOverlay")] diff --git a/MapKit/MKTileOverlayRenderer.rs b/MapKit/MKTileOverlayRenderer.rs index 9ce1a16b0..3868dba36 100644 --- a/MapKit/MKTileOverlayRenderer.rs +++ b/MapKit/MKTileOverlayRenderer.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKTileOverlayRenderer")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKTileOverlayRenderer; #[cfg(feature = "MapKit_MKTileOverlayRenderer")] diff --git a/MapKit/MKTypes.rs b/MapKit/MKTypes.rs index ca2b8f43e..b61bc06de 100644 --- a/MapKit/MKTypes.rs +++ b/MapKit/MKTypes.rs @@ -9,9 +9,13 @@ use crate::MapKit::*; ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKMapType { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKMapTypeStandard = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKMapTypeSatellite = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKMapTypeHybrid = 2, MKMapTypeSatelliteFlyover = 3, MKMapTypeHybridFlyover = 4, @@ -23,21 +27,31 @@ extern_static!(MKErrorDomain: &'static NSString); ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKErrorCode { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKErrorUnknown = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKErrorServerFailure = 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKErrorLoadingThrottled = 3, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKErrorPlacemarkNotFound = 4, MKErrorDirectionsNotFound = 5, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKErrorDecodingFailed = 6, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum MKFeatureVisibility { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKFeatureVisibilityAdaptive = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKFeatureVisibilityHidden = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] MKFeatureVisibilityVisible = 2, } ); diff --git a/MapKit/MKUserLocation.rs b/MapKit/MKUserLocation.rs index 425b8f173..68a1d5930 100644 --- a/MapKit/MKUserLocation.rs +++ b/MapKit/MKUserLocation.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKUserLocation")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKUserLocation; #[cfg(feature = "MapKit_MKUserLocation")] diff --git a/MapKit/MKUserLocationView.rs b/MapKit/MKUserLocationView.rs index 3fd29a8db..4a9b4e44d 100644 --- a/MapKit/MKUserLocationView.rs +++ b/MapKit/MKUserLocationView.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKUserLocationView")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MKUserLocationView; #[cfg(feature = "MapKit_MKUserLocationView")] @@ -66,6 +67,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "MapKit_MKUserLocationView")] unsafe impl MKUserLocationView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/MapKit/MKZoomControl.rs b/MapKit/MKZoomControl.rs index d8b61f3a7..99754c077 100644 --- a/MapKit/MKZoomControl.rs +++ b/MapKit/MKZoomControl.rs @@ -10,6 +10,7 @@ use crate::MapKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MapKit_MKZoomControl")] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] pub struct MKZoomControl; #[cfg(feature = "MapKit_MKZoomControl")] @@ -64,6 +65,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "MapKit_MKZoomControl")] unsafe impl MKZoomControl { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/MediaPlayer/MPContentItem.rs b/MediaPlayer/MPContentItem.rs index 924c59332..ff675eca0 100644 --- a/MediaPlayer/MPContentItem.rs +++ b/MediaPlayer/MPContentItem.rs @@ -8,6 +8,7 @@ use crate::MediaPlayer::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPContentItem")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MPContentItem; #[cfg(feature = "MediaPlayer_MPContentItem")] diff --git a/MediaPlayer/MPMediaEntity.rs b/MediaPlayer/MPMediaEntity.rs index 240a57377..968b887ec 100644 --- a/MediaPlayer/MPMediaEntity.rs +++ b/MediaPlayer/MPMediaEntity.rs @@ -12,6 +12,7 @@ extern_static!(MPMediaEntityPropertyPersistentID: &'static NSString); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMediaEntity")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMediaEntity; #[cfg(feature = "MediaPlayer_MPMediaEntity")] @@ -37,6 +38,7 @@ extern_methods!( pub unsafe fn canFilterByProperty(property: &NSString) -> bool; #[cfg(all(feature = "Foundation_NSSet", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(enumerateValuesForProperties:usingBlock:)] pub unsafe fn enumerateValuesForProperties_usingBlock( &self, @@ -44,6 +46,7 @@ extern_methods!( block: &Block<(NonNull, NonNull, NonNull), ()>, ); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other objectForKeyedSubscript:)] pub unsafe fn objectForKeyedSubscript(&self, key: &Object) -> Option>; @@ -51,6 +54,7 @@ extern_methods!( #[method_id(@__retain_semantics Other valueForProperty:)] pub unsafe fn valueForProperty(&self, property: &NSString) -> Option>; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(persistentID)] pub unsafe fn persistentID(&self) -> MPMediaEntityPersistentID; } diff --git a/MediaPlayer/MPMediaItem.rs b/MediaPlayer/MPMediaItem.rs index 2a5468f8c..54f2d2729 100644 --- a/MediaPlayer/MPMediaItem.rs +++ b/MediaPlayer/MPMediaItem.rs @@ -105,6 +105,7 @@ extern_static!(MPMediaItemPropertyIsPreorder: &'static NSString); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMediaItem")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMediaItem; #[cfg(feature = "MediaPlayer_MPMediaItem")] diff --git a/MediaPlayer/MPMediaItemCollection.rs b/MediaPlayer/MPMediaItemCollection.rs index 6ac3b6e47..630634065 100644 --- a/MediaPlayer/MPMediaItemCollection.rs +++ b/MediaPlayer/MPMediaItemCollection.rs @@ -8,6 +8,7 @@ use crate::MediaPlayer::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMediaItemCollection")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMediaItemCollection; #[cfg(feature = "MediaPlayer_MPMediaItemCollection")] diff --git a/MediaPlayer/MPMediaLibrary.rs b/MediaPlayer/MPMediaLibrary.rs index dfd0c9209..8714ec383 100644 --- a/MediaPlayer/MPMediaLibrary.rs +++ b/MediaPlayer/MPMediaLibrary.rs @@ -7,10 +7,15 @@ use crate::MediaPlayer::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum MPMediaLibraryAuthorizationStatus { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaLibraryAuthorizationStatusNotDetermined = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaLibraryAuthorizationStatusDenied = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaLibraryAuthorizationStatusRestricted = 2, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaLibraryAuthorizationStatusAuthorized = 3, } ); @@ -18,6 +23,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMediaLibrary")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMediaLibrary; #[cfg(feature = "MediaPlayer_MPMediaLibrary")] diff --git a/MediaPlayer/MPMediaPlayback.rs b/MediaPlayer/MPMediaPlayback.rs index 32ee6df01..28ebf765b 100644 --- a/MediaPlayer/MPMediaPlayback.rs +++ b/MediaPlayer/MPMediaPlayback.rs @@ -6,6 +6,7 @@ use crate::Foundation::*; use crate::MediaPlayer::*; extern_protocol!( + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe trait MPMediaPlayback { #[method(prepareToPlay)] unsafe fn prepareToPlay(&self); diff --git a/MediaPlayer/MPMediaPlaylist.rs b/MediaPlayer/MPMediaPlaylist.rs index 17b9c943c..06df87f1c 100644 --- a/MediaPlayer/MPMediaPlaylist.rs +++ b/MediaPlayer/MPMediaPlaylist.rs @@ -7,10 +7,15 @@ use crate::MediaPlayer::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum MPMediaPlaylistAttribute { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaPlaylistAttributeNone = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaPlaylistAttributeOnTheGo = 1 << 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaPlaylistAttributeSmart = 1 << 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaPlaylistAttributeGenius = 1 << 2, } ); @@ -32,6 +37,7 @@ extern_static!(MPMediaPlaylistPropertyAuthorDisplayName: &'static NSString); extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMediaPlaylist")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMediaPlaylist; #[cfg(feature = "MediaPlayer_MPMediaPlaylist")] @@ -80,6 +86,7 @@ extern_methods!( pub unsafe fn authorDisplayName(&self) -> Option>; #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "macos")))] #[method(addItemWithProductID:completionHandler:)] pub unsafe fn addItemWithProductID_completionHandler( &self, @@ -92,6 +99,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "MediaPlayer_MPMediaItem" ))] + #[cfg(not(any(target_os = "macos")))] #[method(addMediaItems:completionHandler:)] pub unsafe fn addMediaItems_completionHandler( &self, @@ -104,6 +112,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMediaPlaylistCreationMetadata")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMediaPlaylistCreationMetadata; #[cfg(feature = "MediaPlayer_MPMediaPlaylistCreationMetadata")] diff --git a/MediaPlayer/MPMediaQuery.rs b/MediaPlayer/MPMediaQuery.rs index 7fbf25668..0c37a3f59 100644 --- a/MediaPlayer/MPMediaQuery.rs +++ b/MediaPlayer/MPMediaQuery.rs @@ -7,14 +7,23 @@ use crate::MediaPlayer::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum MPMediaGrouping { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaGroupingTitle = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaGroupingAlbum = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaGroupingArtist = 2, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaGroupingAlbumArtist = 3, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaGroupingComposer = 4, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaGroupingGenre = 5, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaGroupingPlaylist = 6, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaGroupingPodcastTitle = 7, } ); @@ -22,6 +31,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMediaQuery")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMediaQuery; #[cfg(feature = "MediaPlayer_MPMediaQuery")] @@ -131,6 +141,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMediaPredicate")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMediaPredicate; #[cfg(feature = "MediaPlayer_MPMediaPredicate")] @@ -155,8 +166,11 @@ extern_methods!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum MPMediaPredicateComparison { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaPredicateComparisonEqualTo = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMediaPredicateComparisonContains = 1, } ); @@ -164,6 +178,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMediaPropertyPredicate")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMediaPropertyPredicate; #[cfg(feature = "MediaPlayer_MPMediaPropertyPredicate")] @@ -217,12 +232,14 @@ extern_methods!( #[cfg(feature = "MediaPlayer_MPMediaItem")] unsafe impl MPMediaItem { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other persistentIDPropertyForGroupingType:)] pub unsafe fn persistentIDPropertyForGroupingType( grouping_type: MPMediaGrouping, ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other titlePropertyForGroupingType:)] pub unsafe fn titlePropertyForGroupingType(grouping_type: MPMediaGrouping) -> Id; } diff --git a/MediaPlayer/MPMediaQuerySection.rs b/MediaPlayer/MPMediaQuerySection.rs index 2839da3fe..6c6492cff 100644 --- a/MediaPlayer/MPMediaQuerySection.rs +++ b/MediaPlayer/MPMediaQuerySection.rs @@ -8,6 +8,7 @@ use crate::MediaPlayer::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMediaQuerySection")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMediaQuerySection; #[cfg(feature = "MediaPlayer_MPMediaQuerySection")] diff --git a/MediaPlayer/MPMusicPlayerApplicationController.rs b/MediaPlayer/MPMusicPlayerApplicationController.rs index 6fbdee5d6..8f1b4e2a8 100644 --- a/MediaPlayer/MPMusicPlayerApplicationController.rs +++ b/MediaPlayer/MPMusicPlayerApplicationController.rs @@ -8,6 +8,7 @@ use crate::MediaPlayer::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMusicPlayerControllerQueue")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMusicPlayerControllerQueue; #[cfg(feature = "MediaPlayer_MPMusicPlayerControllerQueue")] @@ -37,6 +38,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMusicPlayerControllerMutableQueue")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMusicPlayerControllerMutableQueue; #[cfg(feature = "MediaPlayer_MPMusicPlayerControllerMutableQueue")] @@ -72,6 +74,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMusicPlayerApplicationController")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMusicPlayerApplicationController; #[cfg(feature = "MediaPlayer_MPMusicPlayerApplicationController")] diff --git a/MediaPlayer/MPMusicPlayerController.rs b/MediaPlayer/MPMusicPlayerController.rs index 027aaa008..989270559 100644 --- a/MediaPlayer/MPMusicPlayerController.rs +++ b/MediaPlayer/MPMusicPlayerController.rs @@ -7,32 +7,49 @@ use crate::MediaPlayer::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum MPMusicPlaybackState { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicPlaybackStateStopped = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicPlaybackStatePlaying = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicPlaybackStatePaused = 2, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicPlaybackStateInterrupted = 3, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicPlaybackStateSeekingForward = 4, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicPlaybackStateSeekingBackward = 5, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum MPMusicRepeatMode { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicRepeatModeDefault = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicRepeatModeNone = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicRepeatModeOne = 2, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicRepeatModeAll = 3, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum MPMusicShuffleMode { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicShuffleModeDefault = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicShuffleModeOff = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicShuffleModeSongs = 2, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MPMusicShuffleModeAlbums = 3, } ); @@ -40,6 +57,7 @@ ns_enum!( extern_protocol!( pub unsafe trait MPSystemMusicPlayerController: NSObjectProtocol { #[cfg(feature = "MediaPlayer_MPMusicPlayerQueueDescriptor")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(openToPlayQueueDescriptor:)] unsafe fn openToPlayQueueDescriptor(&self, queue_descriptor: &MPMusicPlayerQueueDescriptor); } @@ -50,6 +68,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMusicPlayerController")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMusicPlayerController; #[cfg(feature = "MediaPlayer_MPMusicPlayerController")] diff --git a/MediaPlayer/MPMusicPlayerQueueDescriptor.rs b/MediaPlayer/MPMusicPlayerQueueDescriptor.rs index 9e5a17a27..fd8be47b2 100644 --- a/MediaPlayer/MPMusicPlayerQueueDescriptor.rs +++ b/MediaPlayer/MPMusicPlayerQueueDescriptor.rs @@ -8,6 +8,7 @@ use crate::MediaPlayer::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMusicPlayerQueueDescriptor")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMusicPlayerQueueDescriptor; #[cfg(feature = "MediaPlayer_MPMusicPlayerQueueDescriptor")] @@ -33,6 +34,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMusicPlayerMediaItemQueueDescriptor")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMusicPlayerMediaItemQueueDescriptor; #[cfg(feature = "MediaPlayer_MPMusicPlayerMediaItemQueueDescriptor")] @@ -95,6 +97,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMusicPlayerStoreQueueDescriptor")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMusicPlayerStoreQueueDescriptor; #[cfg(feature = "MediaPlayer_MPMusicPlayerStoreQueueDescriptor")] @@ -154,6 +157,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMusicPlayerPlayParameters")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMusicPlayerPlayParameters; #[cfg(feature = "MediaPlayer_MPMusicPlayerPlayParameters")] @@ -184,6 +188,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPMusicPlayerPlayParametersQueueDescriptor")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPMusicPlayerPlayParametersQueueDescriptor; #[cfg(feature = "MediaPlayer_MPMusicPlayerPlayParametersQueueDescriptor")] diff --git a/MediaPlayer/MPNowPlayingSession.rs b/MediaPlayer/MPNowPlayingSession.rs index 7bf421e0f..0234db53c 100644 --- a/MediaPlayer/MPNowPlayingSession.rs +++ b/MediaPlayer/MPNowPlayingSession.rs @@ -8,6 +8,7 @@ use crate::MediaPlayer::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPAdTimeRange")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPAdTimeRange; #[cfg(feature = "MediaPlayer_MPAdTimeRange")] @@ -22,9 +23,11 @@ unsafe impl NSObjectProtocol for MPAdTimeRange {} extern_methods!( #[cfg(feature = "MediaPlayer_MPAdTimeRange")] unsafe impl MPAdTimeRange { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; } @@ -33,6 +36,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPNowPlayingSession")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPNowPlayingSession; #[cfg(feature = "MediaPlayer_MPNowPlayingSession")] @@ -48,36 +52,44 @@ extern_methods!( #[cfg(feature = "MediaPlayer_MPNowPlayingSession")] unsafe impl MPNowPlayingSession { #[cfg(all(feature = "AVFoundation_AVPlayer", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init initWithPlayers:)] pub unsafe fn initWithPlayers( this: Option>, players: &NSArray, ) -> Id; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[cfg(all(feature = "AVFoundation_AVPlayer", feature = "Foundation_NSArray"))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other players)] pub unsafe fn players(&self) -> Id>; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate( &self, ) -> Option>>; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject>, ); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(automaticallyPublishesNowPlayingInfo)] pub unsafe fn automaticallyPublishesNowPlayingInfo(&self) -> bool; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(setAutomaticallyPublishesNowPlayingInfo:)] pub unsafe fn setAutomaticallyPublishesNowPlayingInfo( &self, @@ -85,19 +97,24 @@ extern_methods!( ); #[cfg(feature = "MediaPlayer_MPNowPlayingInfoCenter")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other nowPlayingInfoCenter)] pub unsafe fn nowPlayingInfoCenter(&self) -> Id; #[cfg(feature = "MediaPlayer_MPRemoteCommandCenter")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other remoteCommandCenter)] pub unsafe fn remoteCommandCenter(&self) -> Id; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(canBecomeActive)] pub unsafe fn canBecomeActive(&self) -> bool; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(isActive)] pub unsafe fn isActive(&self) -> bool; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(becomeActiveIfPossibleWithCompletion:)] pub unsafe fn becomeActiveIfPossibleWithCompletion( &self, @@ -105,18 +122,22 @@ extern_methods!( ); #[cfg(feature = "AVFoundation_AVPlayer")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(addPlayer:)] pub unsafe fn addPlayer(&self, player: &AVPlayer); #[cfg(feature = "AVFoundation_AVPlayer")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(removePlayer:)] pub unsafe fn removePlayer(&self, player: &AVPlayer); } ); extern_protocol!( + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe trait MPNowPlayingSessionDelegate: NSObjectProtocol { #[cfg(feature = "MediaPlayer_MPNowPlayingSession")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(nowPlayingSessionDidChangeActive:)] unsafe fn nowPlayingSessionDidChangeActive( @@ -125,6 +146,7 @@ extern_protocol!( ); #[cfg(feature = "MediaPlayer_MPNowPlayingSession")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(nowPlayingSessionDidChangeCanBecomeActive:)] unsafe fn nowPlayingSessionDidChangeCanBecomeActive( diff --git a/MediaPlayer/MPPlayableContentDataSource.rs b/MediaPlayer/MPPlayableContentDataSource.rs index 57dc9bd6f..93150ba84 100644 --- a/MediaPlayer/MPPlayableContentDataSource.rs +++ b/MediaPlayer/MPPlayableContentDataSource.rs @@ -7,6 +7,7 @@ use crate::MediaPlayer::*; extern_protocol!( #[deprecated = "Use CarPlay framework"] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe trait MPPlayableContentDataSource: NSObjectProtocol { #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSIndexPath"))] #[optional] @@ -31,6 +32,7 @@ extern_protocol!( feature = "MediaPlayer_MPContentItem" ))] #[deprecated = "Use CarPlay framework"] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(contentItemForIdentifier:completionHandler:)] unsafe fn contentItemForIdentifier_completionHandler( diff --git a/MediaPlayer/MPPlayableContentDelegate.rs b/MediaPlayer/MPPlayableContentDelegate.rs index 421c384b3..69ba1a2c6 100644 --- a/MediaPlayer/MPPlayableContentDelegate.rs +++ b/MediaPlayer/MPPlayableContentDelegate.rs @@ -7,6 +7,7 @@ use crate::MediaPlayer::*; extern_protocol!( #[deprecated = "Use CarPlay framework"] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe trait MPPlayableContentDelegate: NSObjectProtocol { #[cfg(all( feature = "Foundation_NSError", @@ -14,6 +15,7 @@ extern_protocol!( feature = "MediaPlayer_MPPlayableContentManager" ))] #[deprecated = "Use CarPlay framework"] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(playableContentManager:initiatePlaybackOfContentItemAtIndexPath:completionHandler:)] unsafe fn playableContentManager_initiatePlaybackOfContentItemAtIndexPath_completionHandler( @@ -28,6 +30,7 @@ extern_protocol!( feature = "MediaPlayer_MPPlayableContentManager" ))] #[deprecated = "Use Intents framework for initiating playback queues."] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(playableContentManager:initializePlaybackQueueWithCompletionHandler:)] unsafe fn playableContentManager_initializePlaybackQueueWithCompletionHandler( @@ -42,6 +45,7 @@ extern_protocol!( feature = "MediaPlayer_MPPlayableContentManager" ))] #[deprecated = "Use Intents framework for initiating playback queues."] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(playableContentManager:initializePlaybackQueueWithContentItems:completionHandler:)] unsafe fn playableContentManager_initializePlaybackQueueWithContentItems_completionHandler( @@ -56,6 +60,7 @@ extern_protocol!( feature = "MediaPlayer_MPPlayableContentManagerContext" ))] #[deprecated = "Use CarPlay framework"] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(playableContentManager:didUpdateContext:)] unsafe fn playableContentManager_didUpdateContext( diff --git a/MediaPlayer/MPPlayableContentManager.rs b/MediaPlayer/MPPlayableContentManager.rs index 8b30bed12..f98e0ff9e 100644 --- a/MediaPlayer/MPPlayableContentManager.rs +++ b/MediaPlayer/MPPlayableContentManager.rs @@ -9,6 +9,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPPlayableContentManager")] #[deprecated = "Use CarPlay framework"] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPPlayableContentManager; #[cfg(feature = "MediaPlayer_MPPlayableContentManager")] diff --git a/MediaPlayer/MPPlayableContentManagerContext.rs b/MediaPlayer/MPPlayableContentManagerContext.rs index b185e9ad9..fe1a0bfa6 100644 --- a/MediaPlayer/MPPlayableContentManagerContext.rs +++ b/MediaPlayer/MPPlayableContentManagerContext.rs @@ -9,6 +9,7 @@ extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MediaPlayer_MPPlayableContentManagerContext")] #[deprecated = "Use CarPlay framework"] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MPPlayableContentManagerContext; #[cfg(feature = "MediaPlayer_MPPlayableContentManagerContext")] diff --git a/MediaPlayer/MPVolumeSettings.rs b/MediaPlayer/MPVolumeSettings.rs index 2393c6de0..53f3420d0 100644 --- a/MediaPlayer/MPVolumeSettings.rs +++ b/MediaPlayer/MPVolumeSettings.rs @@ -7,15 +7,18 @@ use crate::MediaPlayer::*; extern_fn!( #[deprecated = "Use MPVolumeView to present volume controls."] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe fn MPVolumeSettingsAlertShow(); ); extern_fn!( #[deprecated = "Use MPVolumeView to present volume controls."] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe fn MPVolumeSettingsAlertHide(); ); extern_fn!( #[deprecated = "Use MPVolumeView to present volume controls."] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe fn MPVolumeSettingsAlertIsVisible() -> Bool; ); diff --git a/MediaPlayer/NSUserActivity_MediaPlayerAdditions.rs b/MediaPlayer/NSUserActivity_MediaPlayerAdditions.rs index 64e8ca9fa..e3232dcb6 100644 --- a/MediaPlayer/NSUserActivity_MediaPlayerAdditions.rs +++ b/MediaPlayer/NSUserActivity_MediaPlayerAdditions.rs @@ -10,10 +10,12 @@ extern_methods!( #[cfg(feature = "Foundation_NSUserActivity")] unsafe impl NSUserActivity { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other externalMediaContentIdentifier)] pub unsafe fn externalMediaContentIdentifier(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(setExternalMediaContentIdentifier:)] pub unsafe fn setExternalMediaContentIdentifier( &self, diff --git a/Metal/MTLBlitCommandEncoder.rs b/Metal/MTLBlitCommandEncoder.rs index 987898479..638544706 100644 --- a/Metal/MTLBlitCommandEncoder.rs +++ b/Metal/MTLBlitCommandEncoder.rs @@ -16,9 +16,11 @@ ns_options!( extern_protocol!( pub unsafe trait MTLBlitCommandEncoder: MTLCommandEncoder { + #[cfg(not(any(target_os = "ios")))] #[method(synchronizeResource:)] fn synchronizeResource(&self, resource: &ProtocolObject); + #[cfg(not(any(target_os = "ios")))] #[method(synchronizeTexture:slice:level:)] unsafe fn synchronizeTexture_slice_level( &self, diff --git a/Metal/MTLBuffer.rs b/Metal/MTLBuffer.rs index 3eaabc9cc..02ad29f6b 100644 --- a/Metal/MTLBuffer.rs +++ b/Metal/MTLBuffer.rs @@ -12,6 +12,7 @@ extern_protocol!( #[method(contents)] fn contents(&self) -> NonNull; + #[cfg(not(any(target_os = "ios")))] #[method(didModifyRange:)] fn didModifyRange(&self, range: NSRange); @@ -31,9 +32,11 @@ extern_protocol!( #[method(removeAllDebugMarkers)] fn removeAllDebugMarkers(&self); + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other remoteStorageBuffer)] fn remoteStorageBuffer(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New newRemoteBufferViewForDevice:)] fn newRemoteBufferViewForDevice( &self, diff --git a/Metal/MTLCaptureManager.rs b/Metal/MTLCaptureManager.rs index a6aca7442..87f70d6f0 100644 --- a/Metal/MTLCaptureManager.rs +++ b/Metal/MTLCaptureManager.rs @@ -82,6 +82,7 @@ extern_methods!( #[method_id(@__retain_semantics Other sharedCaptureManager)] pub unsafe fn sharedCaptureManager() -> Id; + #[cfg(not(any(target_os = "ios", target_os = "macos")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; diff --git a/Metal/MTLCommandBuffer.rs b/Metal/MTLCommandBuffer.rs index 2cc5279f3..28ab4cff7 100644 --- a/Metal/MTLCommandBuffer.rs +++ b/Metal/MTLCommandBuffer.rs @@ -32,6 +32,7 @@ ns_enum!( MTLCommandBufferErrorOutOfMemory = 8, MTLCommandBufferErrorInvalidResource = 9, MTLCommandBufferErrorMemoryless = 10, + #[cfg(not(any(target_os = "ios")))] MTLCommandBufferErrorDeviceRemoved = 11, MTLCommandBufferErrorStackOverflow = 12, } diff --git a/Metal/MTLCommandEncoder.rs b/Metal/MTLCommandEncoder.rs index 9cd28491f..5e76c1489 100644 --- a/Metal/MTLCommandEncoder.rs +++ b/Metal/MTLCommandEncoder.rs @@ -19,6 +19,7 @@ ns_options!( pub enum MTLBarrierScope { MTLBarrierScopeBuffers = 1 << 0, MTLBarrierScopeTextures = 1 << 1, + #[cfg(not(any(target_os = "ios")))] MTLBarrierScopeRenderTargets = 1 << 2, } ); diff --git a/Metal/MTLDevice.rs b/Metal/MTLDevice.rs index 45fc5938c..04e1da2cd 100644 --- a/Metal/MTLDevice.rs +++ b/Metal/MTLDevice.rs @@ -21,6 +21,7 @@ extern_fn!( extern_fn!( #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] pub unsafe fn MTLCopyAllDevices() -> NonNull>>; ); @@ -43,6 +44,7 @@ pub type MTLDeviceNotificationHandler = *mut Block< >; extern_fn!( + #[cfg(not(any(target_os = "ios")))] pub unsafe fn MTLRemoveDeviceObserver(observer: &NSObject); ); @@ -50,38 +52,71 @@ ns_enum!( #[underlying(NSUInteger)] #[deprecated = "Use MTLGPUFamily instead"] pub enum MTLFeatureSet { + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily1_v1 = 0, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily2_v1 = 1, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily1_v2 = 2, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily2_v2 = 3, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily3_v1 = 4, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily1_v3 = 5, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily2_v3 = 6, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily3_v2 = 7, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily1_v4 = 8, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily2_v4 = 9, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily3_v3 = 10, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily4_v1 = 11, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily1_v5 = 12, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily2_v5 = 13, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily3_v4 = 14, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily4_v2 = 15, + #[cfg(not(any(target_os = "macos")))] MTLFeatureSet_iOS_GPUFamily5_v1 = 16, + #[cfg(not(any(target_os = "ios")))] MTLFeatureSet_macOS_GPUFamily1_v1 = 10000, + #[cfg(not(any(target_os = "ios")))] MTLFeatureSet_OSX_GPUFamily1_v1 = MTLFeatureSet_macOS_GPUFamily1_v1, + #[cfg(not(any(target_os = "ios")))] MTLFeatureSet_macOS_GPUFamily1_v2 = 10001, + #[cfg(not(any(target_os = "ios")))] MTLFeatureSet_OSX_GPUFamily1_v2 = MTLFeatureSet_macOS_GPUFamily1_v2, + #[cfg(not(any(target_os = "ios")))] MTLFeatureSet_macOS_ReadWriteTextureTier2 = 10002, + #[cfg(not(any(target_os = "ios")))] MTLFeatureSet_OSX_ReadWriteTextureTier2 = MTLFeatureSet_macOS_ReadWriteTextureTier2, + #[cfg(not(any(target_os = "ios")))] MTLFeatureSet_macOS_GPUFamily1_v3 = 10003, + #[cfg(not(any(target_os = "ios")))] MTLFeatureSet_macOS_GPUFamily1_v4 = 10004, + #[cfg(not(any(target_os = "ios")))] MTLFeatureSet_macOS_GPUFamily2_v1 = 10005, + #[cfg(not(any(target_os = "ios", target_os = "macos")))] MTLFeatureSet_tvOS_GPUFamily1_v1 = 30000, + #[cfg(not(any(target_os = "ios", target_os = "macos")))] MTLFeatureSet_TVOS_GPUFamily1_v1 = MTLFeatureSet_tvOS_GPUFamily1_v1, + #[cfg(not(any(target_os = "ios", target_os = "macos")))] MTLFeatureSet_tvOS_GPUFamily1_v2 = 30001, + #[cfg(not(any(target_os = "ios", target_os = "macos")))] MTLFeatureSet_tvOS_GPUFamily1_v3 = 30002, + #[cfg(not(any(target_os = "ios", target_os = "macos")))] MTLFeatureSet_tvOS_GPUFamily2_v1 = 30003, + #[cfg(not(any(target_os = "ios", target_os = "macos")))] MTLFeatureSet_tvOS_GPUFamily1_v4 = 30004, + #[cfg(not(any(target_os = "ios", target_os = "macos")))] MTLFeatureSet_tvOS_GPUFamily2_v2 = 30005, } ); @@ -113,10 +148,15 @@ ns_enum!( ns_enum!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum MTLDeviceLocation { + #[cfg(not(any(target_os = "ios")))] MTLDeviceLocationBuiltIn = 0, + #[cfg(not(any(target_os = "ios")))] MTLDeviceLocationSlot = 1, + #[cfg(not(any(target_os = "ios")))] MTLDeviceLocationExternal = 2, + #[cfg(not(any(target_os = "ios")))] MTLDeviceLocationUnspecified = NSUIntegerMax as _, } ); @@ -302,30 +342,38 @@ extern_protocol!( #[method(maxThreadsPerThreadgroup)] fn maxThreadsPerThreadgroup(&self) -> MTLSize; + #[cfg(not(any(target_os = "ios")))] #[method(isLowPower)] fn isLowPower(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isHeadless)] fn isHeadless(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(isRemovable)] fn isRemovable(&self) -> bool; #[method(hasUnifiedMemory)] fn hasUnifiedMemory(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(recommendedMaxWorkingSetSize)] fn recommendedMaxWorkingSetSize(&self) -> u64; + #[cfg(not(any(target_os = "ios")))] #[method(location)] fn location(&self) -> MTLDeviceLocation; + #[cfg(not(any(target_os = "ios")))] #[method(locationNumber)] fn locationNumber(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(maxTransferRate)] fn maxTransferRate(&self) -> u64; + #[cfg(not(any(target_os = "ios")))] #[method(isDepth24Stencil8PixelFormatSupported)] fn isDepth24Stencil8PixelFormatSupported(&self) -> bool; @@ -347,6 +395,7 @@ extern_protocol!( #[method(supportsQueryTextureLOD)] fn supportsQueryTextureLOD(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(supportsBCTextureCompression)] fn supportsBCTextureCompression(&self) -> bool; @@ -674,12 +723,15 @@ extern_protocol!( shared_event_handle: &MTLSharedEventHandle, ) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method(peerGroupID)] unsafe fn peerGroupID(&self) -> u64; + #[cfg(not(any(target_os = "ios")))] #[method(peerIndex)] unsafe fn peerIndex(&self) -> u32; + #[cfg(not(any(target_os = "ios")))] #[method(peerCount)] unsafe fn peerCount(&self) -> u32; diff --git a/Metal/MTLLibrary.rs b/Metal/MTLLibrary.rs index 2c492a41a..580201bef 100644 --- a/Metal/MTLLibrary.rs +++ b/Metal/MTLLibrary.rs @@ -193,6 +193,7 @@ ns_enum!( #[underlying(NSUInteger)] pub enum MTLLanguageVersion { #[deprecated = "Use a newer language standard"] + #[cfg(not(any(target_os = "macos")))] MTLLanguageVersion1_0 = 1 << 16, MTLLanguageVersion1_1 = (1 << 16) + 1, MTLLanguageVersion1_2 = (1 << 16) + 2, diff --git a/Metal/MTLPixelFormat.rs b/Metal/MTLPixelFormat.rs index 7c94f83ad..59088341b 100644 --- a/Metal/MTLPixelFormat.rs +++ b/Metal/MTLPixelFormat.rs @@ -63,19 +63,33 @@ ns_enum!( MTLPixelFormatRGBA32Uint = 123, MTLPixelFormatRGBA32Sint = 124, MTLPixelFormatRGBA32Float = 125, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC1_RGBA = 130, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC1_RGBA_sRGB = 131, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC2_RGBA = 132, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC2_RGBA_sRGB = 133, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC3_RGBA = 134, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC3_RGBA_sRGB = 135, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC4_RUnorm = 140, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC4_RSnorm = 141, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC5_RGUnorm = 142, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC5_RGSnorm = 143, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC6H_RGBFloat = 150, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC6H_RGBUfloat = 151, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC7_RGBAUnorm = 152, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatBC7_RGBAUnorm_sRGB = 153, MTLPixelFormatPVRTC_RGB_2BPP = 160, MTLPixelFormatPVRTC_RGB_2BPP_sRGB = 161, @@ -142,9 +156,11 @@ ns_enum!( MTLPixelFormatDepth16Unorm = 250, MTLPixelFormatDepth32Float = 252, MTLPixelFormatStencil8 = 253, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatDepth24Unorm_Stencil8 = 255, MTLPixelFormatDepth32Float_Stencil8 = 260, MTLPixelFormatX32_Stencil8 = 261, + #[cfg(not(any(target_os = "ios")))] MTLPixelFormatX24_Stencil8 = 262, } ); diff --git a/Metal/MTLRasterizationRate.rs b/Metal/MTLRasterizationRate.rs index 35727fe71..fd40a0bd8 100644 --- a/Metal/MTLRasterizationRate.rs +++ b/Metal/MTLRasterizationRate.rs @@ -48,6 +48,7 @@ unsafe impl NSObjectProtocol for MTLRasterizationRateLayerDescriptor {} extern_methods!( #[cfg(feature = "Metal_MTLRasterizationRateLayerDescriptor")] unsafe impl MTLRasterizationRateLayerDescriptor { + #[cfg(not(any(target_os = "ios", target_os = "macos")))] #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; diff --git a/Metal/MTLRenderCommandEncoder.rs b/Metal/MTLRenderCommandEncoder.rs index dedbf84a5..daff1a792 100644 --- a/Metal/MTLRenderCommandEncoder.rs +++ b/Metal/MTLRenderCommandEncoder.rs @@ -729,6 +729,7 @@ extern_protocol!( ); #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(textureBarrier)] unsafe fn textureBarrier(&self); diff --git a/Metal/MTLResource.rs b/Metal/MTLResource.rs index d286020bf..c8359ec63 100644 --- a/Metal/MTLResource.rs +++ b/Metal/MTLResource.rs @@ -26,6 +26,7 @@ ns_enum!( #[underlying(NSUInteger)] pub enum MTLStorageMode { MTLStorageModeShared = 0, + #[cfg(not(any(target_os = "ios")))] MTLStorageModeManaged = 1, MTLStorageModePrivate = 2, MTLStorageModeMemoryless = 3, @@ -49,6 +50,7 @@ ns_options!( MTLResourceCPUCacheModeWriteCombined = MTLCPUCacheModeWriteCombined << MTLResourceCPUCacheModeShift, MTLResourceStorageModeShared = MTLStorageModeShared << MTLResourceStorageModeShift, + #[cfg(not(any(target_os = "ios")))] MTLResourceStorageModeManaged = MTLStorageModeManaged << MTLResourceStorageModeShift, MTLResourceStorageModePrivate = MTLStorageModePrivate << MTLResourceStorageModeShift, MTLResourceStorageModeMemoryless = MTLStorageModeMemoryless << MTLResourceStorageModeShift, diff --git a/Metal/MTLTexture.rs b/Metal/MTLTexture.rs index 82672ed0f..3bdd49344 100644 --- a/Metal/MTLTexture.rs +++ b/Metal/MTLTexture.rs @@ -382,9 +382,11 @@ extern_protocol!( #[method_id(@__retain_semantics New newSharedTextureHandle)] fn newSharedTextureHandle(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other remoteStorageTexture)] fn remoteStorageTexture(&self) -> Option>>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics New newRemoteTextureViewForDevice:)] unsafe fn newRemoteTextureViewForDevice( &self, diff --git a/MetalKit/MTKView.rs b/MetalKit/MTKView.rs index e815008c3..7edde1d0c 100644 --- a/MetalKit/MTKView.rs +++ b/MetalKit/MTKView.rs @@ -212,6 +212,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "MetalKit_MTKView")] unsafe impl MTKView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/MetricKit/MXAnimationMetric.rs b/MetricKit/MXAnimationMetric.rs index 082b1aeda..20961423d 100644 --- a/MetricKit/MXAnimationMetric.rs +++ b/MetricKit/MXAnimationMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXAnimationMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXAnimationMetric; #[cfg(feature = "MetricKit_MXAnimationMetric")] diff --git a/MetricKit/MXAppExitMetric.rs b/MetricKit/MXAppExitMetric.rs index bc85e8738..740cb8baa 100644 --- a/MetricKit/MXAppExitMetric.rs +++ b/MetricKit/MXAppExitMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXForegroundExitData")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXForegroundExitData; #[cfg(feature = "MetricKit_MXForegroundExitData")] @@ -50,6 +51,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXBackgroundExitData")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXBackgroundExitData; #[cfg(feature = "MetricKit_MXBackgroundExitData")] @@ -105,6 +107,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXAppExitMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXAppExitMetric; #[cfg(feature = "MetricKit_MXAppExitMetric")] diff --git a/MetricKit/MXAppLaunchDiagnostic.rs b/MetricKit/MXAppLaunchDiagnostic.rs index fb46cc6ce..b71e56fd6 100644 --- a/MetricKit/MXAppLaunchDiagnostic.rs +++ b/MetricKit/MXAppLaunchDiagnostic.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXAppLaunchDiagnostic")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXAppLaunchDiagnostic; #[cfg(feature = "MetricKit_MXAppLaunchDiagnostic")] diff --git a/MetricKit/MXAppLaunchMetric.rs b/MetricKit/MXAppLaunchMetric.rs index eac4781d5..6cb2e1474 100644 --- a/MetricKit/MXAppLaunchMetric.rs +++ b/MetricKit/MXAppLaunchMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXAppLaunchMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXAppLaunchMetric; #[cfg(feature = "MetricKit_MXAppLaunchMetric")] @@ -46,6 +47,7 @@ extern_methods!( feature = "Foundation_NSUnitDuration", feature = "MetricKit_MXHistogram" ))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other histogrammedOptimizedTimeToFirstDraw)] pub unsafe fn histogrammedOptimizedTimeToFirstDraw( &self, @@ -55,6 +57,7 @@ extern_methods!( feature = "Foundation_NSUnitDuration", feature = "MetricKit_MXHistogram" ))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other histogrammedExtendedLaunch)] pub unsafe fn histogrammedExtendedLaunch(&self) -> Id>; } diff --git a/MetricKit/MXAppResponsivenessMetric.rs b/MetricKit/MXAppResponsivenessMetric.rs index a44c910d6..757e80bdb 100644 --- a/MetricKit/MXAppResponsivenessMetric.rs +++ b/MetricKit/MXAppResponsivenessMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXAppResponsivenessMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXAppResponsivenessMetric; #[cfg(feature = "MetricKit_MXAppResponsivenessMetric")] diff --git a/MetricKit/MXAppRunTimeMetric.rs b/MetricKit/MXAppRunTimeMetric.rs index 168d41f96..c98ac531d 100644 --- a/MetricKit/MXAppRunTimeMetric.rs +++ b/MetricKit/MXAppRunTimeMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXAppRunTimeMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXAppRunTimeMetric; #[cfg(feature = "MetricKit_MXAppRunTimeMetric")] diff --git a/MetricKit/MXAverage.rs b/MetricKit/MXAverage.rs index f946539e1..f60dcfb7a 100644 --- a/MetricKit/MXAverage.rs +++ b/MetricKit/MXAverage.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; __inner_extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXAverage")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MXAverage { _inner0: PhantomData<*mut (UnitType, UnitTypeOwnership)>, notunwindsafe: PhantomData<&'static mut ()>, diff --git a/MetricKit/MXCPUExceptionDiagnostic.rs b/MetricKit/MXCPUExceptionDiagnostic.rs index e3e4ee1f9..7512c32ca 100644 --- a/MetricKit/MXCPUExceptionDiagnostic.rs +++ b/MetricKit/MXCPUExceptionDiagnostic.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXCPUExceptionDiagnostic")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MXCPUExceptionDiagnostic; #[cfg(feature = "MetricKit_MXCPUExceptionDiagnostic")] diff --git a/MetricKit/MXCPUMetric.rs b/MetricKit/MXCPUMetric.rs index 102789526..a811c75e3 100644 --- a/MetricKit/MXCPUMetric.rs +++ b/MetricKit/MXCPUMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXCPUMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXCPUMetric; #[cfg(feature = "MetricKit_MXCPUMetric")] @@ -36,6 +37,7 @@ extern_methods!( pub unsafe fn cumulativeCPUTime(&self) -> Id>; #[cfg(all(feature = "Foundation_NSMeasurement", feature = "Foundation_NSUnit"))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other cumulativeCPUInstructions)] pub unsafe fn cumulativeCPUInstructions(&self) -> Id>; } diff --git a/MetricKit/MXCallStackTree.rs b/MetricKit/MXCallStackTree.rs index 154d73e4d..897dc7a36 100644 --- a/MetricKit/MXCallStackTree.rs +++ b/MetricKit/MXCallStackTree.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXCallStackTree")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MXCallStackTree; #[cfg(feature = "MetricKit_MXCallStackTree")] diff --git a/MetricKit/MXCellularConditionMetric.rs b/MetricKit/MXCellularConditionMetric.rs index e6505ba5d..2029160d8 100644 --- a/MetricKit/MXCellularConditionMetric.rs +++ b/MetricKit/MXCellularConditionMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXCellularConditionMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXCellularConditionMetric; #[cfg(feature = "MetricKit_MXCellularConditionMetric")] diff --git a/MetricKit/MXCrashDiagnostic.rs b/MetricKit/MXCrashDiagnostic.rs index f3737645a..bfe929607 100644 --- a/MetricKit/MXCrashDiagnostic.rs +++ b/MetricKit/MXCrashDiagnostic.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXCrashDiagnostic")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MXCrashDiagnostic; #[cfg(feature = "MetricKit_MXCrashDiagnostic")] diff --git a/MetricKit/MXDiagnostic.rs b/MetricKit/MXDiagnostic.rs index 01c66abf5..9e5972dd3 100644 --- a/MetricKit/MXDiagnostic.rs +++ b/MetricKit/MXDiagnostic.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXDiagnostic")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MXDiagnostic; #[cfg(feature = "MetricKit_MXDiagnostic")] diff --git a/MetricKit/MXDiagnosticPayload.rs b/MetricKit/MXDiagnosticPayload.rs index 7615d6f68..fc95f7628 100644 --- a/MetricKit/MXDiagnosticPayload.rs +++ b/MetricKit/MXDiagnosticPayload.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXDiagnosticPayload")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MXDiagnosticPayload; #[cfg(feature = "MetricKit_MXDiagnosticPayload")] @@ -53,6 +54,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "MetricKit_MXAppLaunchDiagnostic" ))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other appLaunchDiagnostics)] pub unsafe fn appLaunchDiagnostics(&self) -> Option>>; diff --git a/MetricKit/MXDiskIOMetric.rs b/MetricKit/MXDiskIOMetric.rs index 1b6fe9c3c..c47ddf831 100644 --- a/MetricKit/MXDiskIOMetric.rs +++ b/MetricKit/MXDiskIOMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXDiskIOMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXDiskIOMetric; #[cfg(feature = "MetricKit_MXDiskIOMetric")] diff --git a/MetricKit/MXDiskWriteExceptionDiagnostic.rs b/MetricKit/MXDiskWriteExceptionDiagnostic.rs index 88d394c63..48731b8b2 100644 --- a/MetricKit/MXDiskWriteExceptionDiagnostic.rs +++ b/MetricKit/MXDiskWriteExceptionDiagnostic.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXDiskWriteExceptionDiagnostic")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MXDiskWriteExceptionDiagnostic; #[cfg(feature = "MetricKit_MXDiskWriteExceptionDiagnostic")] diff --git a/MetricKit/MXDisplayMetric.rs b/MetricKit/MXDisplayMetric.rs index 1c547c549..325a59db0 100644 --- a/MetricKit/MXDisplayMetric.rs +++ b/MetricKit/MXDisplayMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXDisplayMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXDisplayMetric; #[cfg(feature = "MetricKit_MXDisplayMetric")] diff --git a/MetricKit/MXError.rs b/MetricKit/MXError.rs index ba59a4a34..f3b5b74f8 100644 --- a/MetricKit/MXError.rs +++ b/MetricKit/MXError.rs @@ -8,12 +8,19 @@ extern_static!(MXErrorDomain: Option<&'static NSErrorDomain>); ns_error_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum MXErrorCode { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MXErrorLaunchTaskInvalidID = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MXErrorLaunchTaskMaxCount = 1, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MXErrorLaunchTaskPastDeadline = 2, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MXErrorLaunchTaskDuplicated = 3, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MXErrorLaunchTaskUnknown = 4, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] MXErrorLaunchTaskInternalFailure = 5, } ); diff --git a/MetricKit/MXGPUMetric.rs b/MetricKit/MXGPUMetric.rs index 4b0ede2cf..f1d763003 100644 --- a/MetricKit/MXGPUMetric.rs +++ b/MetricKit/MXGPUMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXGPUMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXGPUMetric; #[cfg(feature = "MetricKit_MXGPUMetric")] diff --git a/MetricKit/MXHangDiagnostic.rs b/MetricKit/MXHangDiagnostic.rs index 093cf8e49..3df6e503f 100644 --- a/MetricKit/MXHangDiagnostic.rs +++ b/MetricKit/MXHangDiagnostic.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXHangDiagnostic")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MXHangDiagnostic; #[cfg(feature = "MetricKit_MXHangDiagnostic")] diff --git a/MetricKit/MXHistogram.rs b/MetricKit/MXHistogram.rs index 875f4482a..e5ba282df 100644 --- a/MetricKit/MXHistogram.rs +++ b/MetricKit/MXHistogram.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; __inner_extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXHistogramBucket")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MXHistogramBucket { _inner0: PhantomData<*mut (UnitType, UnitTypeOwnership)>, notunwindsafe: PhantomData<&'static mut ()>, @@ -59,6 +60,7 @@ extern_methods!( __inner_extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXHistogram")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MXHistogram { _inner0: PhantomData<*mut (UnitType, UnitTypeOwnership)>, notunwindsafe: PhantomData<&'static mut ()>, diff --git a/MetricKit/MXLocationActivityMetric.rs b/MetricKit/MXLocationActivityMetric.rs index d413d1b79..fc6931c32 100644 --- a/MetricKit/MXLocationActivityMetric.rs +++ b/MetricKit/MXLocationActivityMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXLocationActivityMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXLocationActivityMetric; #[cfg(feature = "MetricKit_MXLocationActivityMetric")] diff --git a/MetricKit/MXMemoryMetric.rs b/MetricKit/MXMemoryMetric.rs index 2af665c26..15ed5d718 100644 --- a/MetricKit/MXMemoryMetric.rs +++ b/MetricKit/MXMemoryMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXMemoryMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXMemoryMetric; #[cfg(feature = "MetricKit_MXMemoryMetric")] diff --git a/MetricKit/MXMetaData.rs b/MetricKit/MXMetaData.rs index 253f3d182..4a92f276f 100644 --- a/MetricKit/MXMetaData.rs +++ b/MetricKit/MXMetaData.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXMetaData")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MXMetaData; #[cfg(feature = "MetricKit_MXMetaData")] @@ -44,6 +45,7 @@ extern_methods!( pub unsafe fn applicationBuildVersion(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other platformArchitecture)] pub unsafe fn platformArchitecture(&self) -> Id; @@ -53,10 +55,12 @@ extern_methods!( #[cfg(feature = "Foundation_NSDictionary")] #[deprecated] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other DictionaryRepresentation)] pub unsafe fn DictionaryRepresentation(&self) -> Id; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other dictionaryRepresentation)] pub unsafe fn dictionaryRepresentation(&self) -> Id; } diff --git a/MetricKit/MXMetric.rs b/MetricKit/MXMetric.rs index 97d046492..ada5c521f 100644 --- a/MetricKit/MXMetric.rs +++ b/MetricKit/MXMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXMetric; #[cfg(feature = "MetricKit_MXMetric")] @@ -33,10 +34,12 @@ extern_methods!( #[cfg(feature = "Foundation_NSDictionary")] #[deprecated] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other DictionaryRepresentation)] pub unsafe fn DictionaryRepresentation(&self) -> Id; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other dictionaryRepresentation)] pub unsafe fn dictionaryRepresentation(&self) -> Id; } diff --git a/MetricKit/MXMetricManager.rs b/MetricKit/MXMetricManager.rs index ac509a64a..0e4e3b138 100644 --- a/MetricKit/MXMetricManager.rs +++ b/MetricKit/MXMetricManager.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXMetricManager")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct MXMetricManager; #[cfg(feature = "MetricKit_MXMetricManager")] @@ -22,6 +23,7 @@ extern_methods!( #[cfg(feature = "MetricKit_MXMetricManager")] unsafe impl MXMetricManager { #[cfg(all(feature = "Foundation_NSArray", feature = "MetricKit_MXMetricPayload"))] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other pastPayloads)] pub unsafe fn pastPayloads(&self) -> Id>; @@ -29,6 +31,7 @@ extern_methods!( feature = "Foundation_NSArray", feature = "MetricKit_MXDiagnosticPayload" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other pastDiagnosticPayloads)] pub unsafe fn pastDiagnosticPayloads(&self) -> Id>; @@ -50,8 +53,10 @@ extern_methods!( ); extern_protocol!( + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub unsafe trait MXMetricManagerSubscriber: NSObjectProtocol { #[cfg(all(feature = "Foundation_NSArray", feature = "MetricKit_MXMetricPayload"))] + #[cfg(not(any(target_os = "macos")))] #[optional] #[method(didReceiveMetricPayloads:)] unsafe fn didReceiveMetricPayloads(&self, payloads: &NSArray); @@ -60,6 +65,7 @@ extern_protocol!( feature = "Foundation_NSArray", feature = "MetricKit_MXDiagnosticPayload" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(didReceiveDiagnosticPayloads:)] unsafe fn didReceiveDiagnosticPayloads(&self, payloads: &NSArray); diff --git a/MetricKit/MXMetricPayload.rs b/MetricKit/MXMetricPayload.rs index 286e45470..4b9c88e23 100644 --- a/MetricKit/MXMetricPayload.rs +++ b/MetricKit/MXMetricPayload.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXMetricPayload")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXMetricPayload; #[cfg(feature = "MetricKit_MXMetricPayload")] @@ -89,10 +90,12 @@ extern_methods!( pub unsafe fn displayMetrics(&self) -> Option>; #[cfg(feature = "MetricKit_MXAnimationMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other animationMetrics)] pub unsafe fn animationMetrics(&self) -> Option>; #[cfg(feature = "MetricKit_MXAppExitMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other applicationExitMetrics)] pub unsafe fn applicationExitMetrics(&self) -> Option>; @@ -110,10 +113,12 @@ extern_methods!( #[cfg(feature = "Foundation_NSDictionary")] #[deprecated] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other DictionaryRepresentation)] pub unsafe fn DictionaryRepresentation(&self) -> Id; #[cfg(feature = "Foundation_NSDictionary")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other dictionaryRepresentation)] pub unsafe fn dictionaryRepresentation(&self) -> Id; } diff --git a/MetricKit/MXNetworkTransferMetric.rs b/MetricKit/MXNetworkTransferMetric.rs index 7630f3575..93a128531 100644 --- a/MetricKit/MXNetworkTransferMetric.rs +++ b/MetricKit/MXNetworkTransferMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXNetworkTransferMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXNetworkTransferMetric; #[cfg(feature = "MetricKit_MXNetworkTransferMetric")] diff --git a/MetricKit/MXSignpostMetric.rs b/MetricKit/MXSignpostMetric.rs index 622dc40c2..999c2a6a5 100644 --- a/MetricKit/MXSignpostMetric.rs +++ b/MetricKit/MXSignpostMetric.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXSignpostIntervalData")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXSignpostIntervalData; #[cfg(feature = "MetricKit_MXSignpostIntervalData")] @@ -58,6 +59,7 @@ extern_methods!( ) -> Option>>; #[cfg(all(feature = "Foundation_NSMeasurement", feature = "Foundation_NSUnit"))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other cumulativeHitchTimeRatio)] pub unsafe fn cumulativeHitchTimeRatio(&self) -> Option>>; } @@ -66,6 +68,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXSignpostMetric")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXSignpostMetric; #[cfg(feature = "MetricKit_MXSignpostMetric")] diff --git a/MetricKit/MXSignpost_Private.rs b/MetricKit/MXSignpost_Private.rs index 51f6fe08b..ae8b1e773 100644 --- a/MetricKit/MXSignpost_Private.rs +++ b/MetricKit/MXSignpost_Private.rs @@ -5,5 +5,6 @@ use crate::Foundation::*; use crate::MetricKit::*; extern_fn!( + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe fn _MXSignpostMetricsSnapshot() -> NonNull; ); diff --git a/MetricKit/MXUnit.rs b/MetricKit/MXUnit.rs index d2aba6f7c..582516008 100644 --- a/MetricKit/MXUnit.rs +++ b/MetricKit/MXUnit.rs @@ -7,6 +7,7 @@ use crate::MetricKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXUnitSignalBars")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXUnitSignalBars; #[cfg(feature = "MetricKit_MXUnitSignalBars")] @@ -36,6 +37,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "MetricKit_MXUnitAveragePixelLuminance")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct MXUnitAveragePixelLuminance; #[cfg(feature = "MetricKit_MXUnitAveragePixelLuminance")] diff --git a/OSAKit/OSALanguage.rs b/OSAKit/OSALanguage.rs index 2dd6d5da2..19d4b3dec 100644 --- a/OSAKit/OSALanguage.rs +++ b/OSAKit/OSALanguage.rs @@ -7,14 +7,23 @@ use crate::OSAKit::*; ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum OSALanguageFeatures { + #[cfg(not(any(target_os = "ios")))] OSASupportsCompiling = 0x0002, + #[cfg(not(any(target_os = "ios")))] OSASupportsGetSource = 0x0004, + #[cfg(not(any(target_os = "ios")))] OSASupportsAECoercion = 0x0008, + #[cfg(not(any(target_os = "ios")))] OSASupportsAESending = 0x0010, + #[cfg(not(any(target_os = "ios")))] OSASupportsRecording = 0x0020, + #[cfg(not(any(target_os = "ios")))] OSASupportsConvenience = 0x0040, + #[cfg(not(any(target_os = "ios")))] OSASupportsDialects = 0x0080, + #[cfg(not(any(target_os = "ios")))] OSASupportsEventHandling = 0x0100, } ); @@ -22,6 +31,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "OSAKit_OSALanguage")] + #[cfg(not(any(target_os = "ios")))] pub struct OSALanguage; #[cfg(feature = "OSAKit_OSALanguage")] @@ -37,53 +47,67 @@ extern_methods!( #[cfg(feature = "OSAKit_OSALanguage")] unsafe impl OSALanguage { #[cfg(feature = "Foundation_NSArray")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other availableLanguages)] pub unsafe fn availableLanguages() -> Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other languageForName:)] pub unsafe fn languageForName(name: &NSString) -> Option>; #[cfg(feature = "Foundation_NSAppleEventDescriptor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other languageForScriptDataDescriptor:)] pub unsafe fn languageForScriptDataDescriptor( descriptor: &NSAppleEventDescriptor, ) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultLanguage)] pub unsafe fn defaultLanguage() -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultLanguage:)] pub unsafe fn setDefaultLanguage(default_language: &OSALanguage); #[cfg(feature = "OSAKit_OSALanguageInstance")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other sharedLanguageInstance)] pub unsafe fn sharedLanguageInstance(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other info)] pub unsafe fn info(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other version)] pub unsafe fn version(&self) -> Option>; + #[cfg(not(any(target_os = "ios")))] #[method(type)] pub unsafe fn r#type(&self) -> OSType; + #[cfg(not(any(target_os = "ios")))] #[method(subType)] pub unsafe fn subType(&self) -> OSType; + #[cfg(not(any(target_os = "ios")))] #[method(manufacturer)] pub unsafe fn manufacturer(&self) -> OSType; + #[cfg(not(any(target_os = "ios")))] #[method(features)] pub unsafe fn features(&self) -> OSALanguageFeatures; + #[cfg(not(any(target_os = "ios")))] #[method(isThreadSafe)] pub unsafe fn isThreadSafe(&self) -> bool; } diff --git a/OSAKit/OSALanguageInstance.rs b/OSAKit/OSALanguageInstance.rs index c00c60e7c..770cc9970 100644 --- a/OSAKit/OSALanguageInstance.rs +++ b/OSAKit/OSALanguageInstance.rs @@ -8,6 +8,7 @@ use crate::OSAKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "OSAKit_OSALanguageInstance")] + #[cfg(not(any(target_os = "ios")))] pub struct OSALanguageInstance; #[cfg(feature = "OSAKit_OSALanguageInstance")] @@ -23,10 +24,12 @@ extern_methods!( #[cfg(feature = "OSAKit_OSALanguageInstance")] unsafe impl OSALanguageInstance { #[cfg(feature = "OSAKit_OSALanguage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other languageInstanceWithLanguage:)] pub unsafe fn languageInstanceWithLanguage(language: &OSALanguage) -> Id; #[cfg(feature = "OSAKit_OSALanguage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithLanguage:)] pub unsafe fn initWithLanguage( this: Option>, @@ -34,14 +37,17 @@ extern_methods!( ) -> Id; #[cfg(feature = "OSAKit_OSALanguage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other language)] pub unsafe fn language(&self) -> Id; #[cfg(feature = "Foundation_NSAppleEventDescriptor")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other defaultTarget)] pub unsafe fn defaultTarget(&self) -> Option>; #[cfg(feature = "Foundation_NSAppleEventDescriptor")] + #[cfg(not(any(target_os = "ios")))] #[method(setDefaultTarget:)] pub unsafe fn setDefaultTarget(&self, default_target: Option<&NSAppleEventDescriptor>); @@ -49,6 +55,7 @@ extern_methods!( feature = "Foundation_NSAppleEventDescriptor", feature = "Foundation_NSAttributedString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other richTextFromDescriptor:)] pub unsafe fn richTextFromDescriptor( &self, diff --git a/OSAKit/OSAScript.rs b/OSAKit/OSAScript.rs index 4f48a2344..6b8b8217d 100644 --- a/OSAKit/OSAScript.rs +++ b/OSAKit/OSAScript.rs @@ -45,12 +45,19 @@ extern_static!(OSAStorageTextType: &'static NSString); ns_options!( #[underlying(NSUInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum OSAStorageOptions { + #[cfg(not(any(target_os = "ios")))] OSANull = 0x00000000, + #[cfg(not(any(target_os = "ios")))] OSAPreventGetSource = 0x00000001, + #[cfg(not(any(target_os = "ios")))] OSACompileIntoContext = 0x00000002, + #[cfg(not(any(target_os = "ios")))] OSADontSetScriptLocation = 0x01000000, + #[cfg(not(any(target_os = "ios")))] OSAStayOpenApplet = 0x10000000, + #[cfg(not(any(target_os = "ios")))] OSAShowStartupScreen = 0x20000000, } ); @@ -58,6 +65,7 @@ ns_options!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "OSAKit_OSAScript")] + #[cfg(not(any(target_os = "ios")))] pub struct OSAScript; #[cfg(feature = "OSAKit_OSAScript")] @@ -76,16 +84,19 @@ extern_methods!( feature = "Foundation_NSAppleEventDescriptor", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other scriptDataDescriptorWithContentsOfURL:)] pub unsafe fn scriptDataDescriptorWithContentsOfURL( url: &NSURL, ) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithSource:)] pub unsafe fn initWithSource(this: Option>, source: &NSString) -> Id; #[cfg(all(feature = "Foundation_NSString", feature = "OSAKit_OSALanguage"))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithSource:language:)] pub unsafe fn initWithSource_language( this: Option>, @@ -98,6 +109,7 @@ extern_methods!( feature = "Foundation_NSURL", feature = "OSAKit_OSALanguageInstance" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithSource:fromURL:languageInstance:usingStorageOptions:)] pub unsafe fn initWithSource_fromURL_languageInstance_usingStorageOptions( this: Option>, @@ -112,6 +124,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:error:)] pub unsafe fn initWithContentsOfURL_error( this: Option>, @@ -126,6 +139,7 @@ extern_methods!( feature = "OSAKit_OSALanguage" ))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:language:error:)] pub unsafe fn initWithContentsOfURL_language_error( this: Option>, @@ -139,6 +153,7 @@ extern_methods!( feature = "Foundation_NSURL", feature = "OSAKit_OSALanguageInstance" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithContentsOfURL:languageInstance:usingStorageOptions:error:_)] pub unsafe fn initWithContentsOfURL_languageInstance_usingStorageOptions_error( this: Option>, @@ -153,6 +168,7 @@ extern_methods!( feature = "Foundation_NSString" ))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCompiledData:error:)] pub unsafe fn initWithCompiledData_error( this: Option>, @@ -165,6 +181,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithCompiledData:fromURL:usingStorageOptions:error:_)] pub unsafe fn initWithCompiledData_fromURL_usingStorageOptions_error( this: Option>, @@ -179,6 +196,7 @@ extern_methods!( feature = "Foundation_NSURL", feature = "OSAKit_OSALanguageInstance" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithScriptDataDescriptor:fromURL:languageInstance:usingStorageOptions:error:_)] pub unsafe fn initWithScriptDataDescriptor_fromURL_languageInstance_usingStorageOptions_error( this: Option>, @@ -189,33 +207,41 @@ extern_methods!( ) -> Result, Id>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other source)] pub unsafe fn source(&self) -> Id; #[cfg(feature = "Foundation_NSURL")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other url)] pub unsafe fn url(&self) -> Option>; #[cfg(feature = "OSAKit_OSALanguage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other language)] pub unsafe fn language(&self) -> Id; #[cfg(feature = "OSAKit_OSALanguage")] + #[cfg(not(any(target_os = "ios")))] #[method(setLanguage:)] pub unsafe fn setLanguage(&self, language: &OSALanguage); #[cfg(feature = "OSAKit_OSALanguageInstance")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other languageInstance)] pub unsafe fn languageInstance(&self) -> Id; #[cfg(feature = "OSAKit_OSALanguageInstance")] + #[cfg(not(any(target_os = "ios")))] #[method(setLanguageInstance:)] pub unsafe fn setLanguageInstance(&self, language_instance: &OSALanguageInstance); + #[cfg(not(any(target_os = "ios")))] #[method(isCompiled)] pub unsafe fn isCompiled(&self) -> bool; #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))] + #[cfg(not(any(target_os = "ios")))] #[method(compileAndReturnError:)] pub unsafe fn compileAndReturnError( &self, @@ -227,6 +253,7 @@ extern_methods!( feature = "Foundation_NSDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other executeAndReturnError:)] pub unsafe fn executeAndReturnError( &self, @@ -238,6 +265,7 @@ extern_methods!( feature = "Foundation_NSDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other executeAppleEvent:error:)] pub unsafe fn executeAppleEvent_error( &self, @@ -251,6 +279,7 @@ extern_methods!( feature = "Foundation_NSDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other executeAndReturnDisplayValue:error:)] pub unsafe fn executeAndReturnDisplayValue_error( &self, @@ -264,6 +293,7 @@ extern_methods!( feature = "Foundation_NSDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other executeHandlerWithName:arguments:error:)] pub unsafe fn executeHandlerWithName_arguments_error( &self, @@ -273,6 +303,7 @@ extern_methods!( ) -> Option>; #[cfg(feature = "Foundation_NSAttributedString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other richTextSource)] pub unsafe fn richTextSource(&self) -> Option>; @@ -280,6 +311,7 @@ extern_methods!( feature = "Foundation_NSAppleEventDescriptor", feature = "Foundation_NSAttributedString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other richTextFromDescriptor:)] pub unsafe fn richTextFromDescriptor( &self, @@ -291,6 +323,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(writeToURL:ofType:error:)] pub unsafe fn writeToURL_ofType_error( &self, @@ -304,6 +337,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "Foundation_NSURL" ))] + #[cfg(not(any(target_os = "ios")))] #[method(writeToURL:ofType:usingStorageOptions:error:)] pub unsafe fn writeToURL_ofType_usingStorageOptions_error( &self, @@ -318,6 +352,7 @@ extern_methods!( feature = "Foundation_NSDictionary", feature = "Foundation_NSString" ))] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other compiledDataForType:usingStorageOptions:error:)] pub unsafe fn compiledDataForType_usingStorageOptions_error( &self, diff --git a/OSAKit/OSAScriptController.rs b/OSAKit/OSAScriptController.rs index f429c846b..8967c313b 100644 --- a/OSAKit/OSAScriptController.rs +++ b/OSAKit/OSAScriptController.rs @@ -7,9 +7,13 @@ use crate::OSAKit::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum OSAScriptState { + #[cfg(not(any(target_os = "ios")))] OSAScriptStopped = 0, + #[cfg(not(any(target_os = "ios")))] OSAScriptRunning = 1, + #[cfg(not(any(target_os = "ios")))] OSAScriptRecording = 2, } ); @@ -17,6 +21,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "OSAKit_OSAScriptController")] + #[cfg(not(any(target_os = "ios")))] pub struct OSAScriptController; #[cfg(feature = "OSAKit_OSAScriptController")] @@ -42,52 +47,66 @@ extern_methods!( #[cfg(feature = "OSAKit_OSAScriptController")] unsafe impl OSAScriptController { #[cfg(feature = "OSAKit_OSAScriptView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other scriptView)] pub unsafe fn scriptView(&self) -> Option>; #[cfg(feature = "OSAKit_OSAScriptView")] + #[cfg(not(any(target_os = "ios")))] #[method(setScriptView:)] pub unsafe fn setScriptView(&self, script_view: Option<&OSAScriptView>); #[cfg(feature = "AppKit_NSTextView")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other resultView)] pub unsafe fn resultView(&self) -> Option>; #[cfg(feature = "AppKit_NSTextView")] + #[cfg(not(any(target_os = "ios")))] #[method(setResultView:)] pub unsafe fn setResultView(&self, result_view: Option<&NSTextView>); #[cfg(feature = "OSAKit_OSAScript")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other script)] pub unsafe fn script(&self) -> Option>; #[cfg(feature = "OSAKit_OSAScript")] + #[cfg(not(any(target_os = "ios")))] #[method(setScript:)] pub unsafe fn setScript(&self, script: Option<&OSAScript>); #[cfg(feature = "OSAKit_OSALanguage")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other language)] pub unsafe fn language(&self) -> Option>; #[cfg(feature = "OSAKit_OSALanguage")] + #[cfg(not(any(target_os = "ios")))] #[method(setLanguage:)] pub unsafe fn setLanguage(&self, language: Option<&OSALanguage>); + #[cfg(not(any(target_os = "ios")))] #[method(scriptState)] pub unsafe fn scriptState(&self) -> OSAScriptState; + #[cfg(not(any(target_os = "ios")))] #[method(isCompiling)] pub unsafe fn isCompiling(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(compileScript:)] pub unsafe fn compileScript(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(recordScript:)] pub unsafe fn recordScript(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(runScript:)] pub unsafe fn runScript(&self, sender: Option<&Object>); + #[cfg(not(any(target_os = "ios")))] #[method(stopScript:)] pub unsafe fn stopScript(&self, sender: Option<&Object>); } diff --git a/OSAKit/OSAScriptView.rs b/OSAKit/OSAScriptView.rs index 1b96148f9..3da1729e4 100644 --- a/OSAKit/OSAScriptView.rs +++ b/OSAKit/OSAScriptView.rs @@ -8,6 +8,7 @@ use crate::OSAKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "OSAKit_OSAScriptView")] + #[cfg(not(any(target_os = "ios")))] pub struct OSAScriptView; #[cfg(feature = "OSAKit_OSAScriptView")] @@ -84,46 +85,60 @@ extern_methods!( #[cfg(feature = "OSAKit_OSAScriptView")] unsafe impl OSAScriptView { #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other source)] pub unsafe fn source(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setSource:)] pub unsafe fn setSource(&self, source: Option<&NSString>); + #[cfg(not(any(target_os = "ios")))] #[method(usesScriptAssistant)] pub unsafe fn usesScriptAssistant(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesScriptAssistant:)] pub unsafe fn setUsesScriptAssistant(&self, uses_script_assistant: bool); + #[cfg(not(any(target_os = "ios")))] #[method(usesTabs)] pub unsafe fn usesTabs(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setUsesTabs:)] pub unsafe fn setUsesTabs(&self, uses_tabs: bool); + #[cfg(not(any(target_os = "ios")))] #[method(tabWidth)] pub unsafe fn tabWidth(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setTabWidth:)] pub unsafe fn setTabWidth(&self, tab_width: NSUInteger); + #[cfg(not(any(target_os = "ios")))] #[method(wrapsLines)] pub unsafe fn wrapsLines(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setWrapsLines:)] pub unsafe fn setWrapsLines(&self, wraps_lines: bool); + #[cfg(not(any(target_os = "ios")))] #[method(indentsWrappedLines)] pub unsafe fn indentsWrappedLines(&self) -> bool; + #[cfg(not(any(target_os = "ios")))] #[method(setIndentsWrappedLines:)] pub unsafe fn setIndentsWrappedLines(&self, indents_wrapped_lines: bool); + #[cfg(not(any(target_os = "ios")))] #[method(indentWidth)] pub unsafe fn indentWidth(&self) -> NSUInteger; + #[cfg(not(any(target_os = "ios")))] #[method(setIndentWidth:)] pub unsafe fn setIndentWidth(&self, indent_width: NSUInteger); } @@ -134,6 +149,7 @@ extern_methods!( #[cfg(feature = "OSAKit_OSAScriptView")] unsafe impl OSAScriptView { #[cfg(feature = "AppKit_NSTextContainer")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:textContainer:)] pub unsafe fn initWithFrame_textContainer( this: Option>, @@ -141,15 +157,18 @@ extern_methods!( container: Option<&NSTextContainer>, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initUsingTextLayoutManager:)] pub unsafe fn initUsingTextLayoutManager( this: Option>, using_text_layout_manager: bool, ) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other textViewUsingTextLayoutManager:)] pub unsafe fn textViewUsingTextLayoutManager(using_text_layout_manager: bool) -> Id; } @@ -161,6 +180,7 @@ extern_methods!( /// NSTextView_Factory #[cfg(feature = "OSAKit_OSAScriptView")] unsafe impl OSAScriptView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other fieldEditor)] pub unsafe fn fieldEditor() -> Id; } diff --git a/Photos/PHAsset.rs b/Photos/PHAsset.rs index b8e09df87..40ff87db2 100644 --- a/Photos/PHAsset.rs +++ b/Photos/PHAsset.rs @@ -61,6 +61,7 @@ extern_methods!( pub unsafe fn isFavorite(&self) -> bool; #[deprecated = "No longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(isSyncFailureHidden)] pub unsafe fn isSyncFailureHidden(&self) -> bool; @@ -158,6 +159,7 @@ extern_methods!( feature = "PhotoKit_PHFetchResult" ))] #[deprecated = "Will be removed in a future release"] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other fetchAssetsWithALAssetURLs:options:)] pub unsafe fn fetchAssetsWithALAssetURLs_options( asset_ur_ls: &NSArray, diff --git a/Photos/PHCloudIdentifier.rs b/Photos/PHCloudIdentifier.rs index f8e239688..e51cc7bef 100644 --- a/Photos/PHCloudIdentifier.rs +++ b/Photos/PHCloudIdentifier.rs @@ -30,6 +30,7 @@ extern_methods!( #[cfg(feature = "PhotoKit_PHCloudIdentifier")] unsafe impl PHCloudIdentifier { #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other notFoundIdentifier)] pub unsafe fn notFoundIdentifier() -> Id; @@ -139,6 +140,7 @@ extern_methods!( feature = "PhotoKit_PHCloudIdentifier" ))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other localIdentifiersForCloudIdentifiers:)] pub unsafe fn localIdentifiersForCloudIdentifiers( &self, @@ -151,6 +153,7 @@ extern_methods!( feature = "PhotoKit_PHCloudIdentifier" ))] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other cloudIdentifiersForLocalIdentifiers:)] pub unsafe fn cloudIdentifiersForLocalIdentifiers( &self, diff --git a/Photos/PHCollection.rs b/Photos/PHCollection.rs index d40da85d0..6014ade8b 100644 --- a/Photos/PHCollection.rs +++ b/Photos/PHCollection.rs @@ -159,6 +159,7 @@ extern_methods!( feature = "PhotoKit_PHFetchResult" ))] #[deprecated = "Will be removed in a future release"] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other fetchMomentsInMomentList:options:)] pub unsafe fn fetchMomentsInMomentList_options( moment_list: &PHCollectionList, @@ -170,6 +171,7 @@ extern_methods!( feature = "PhotoKit_PHFetchResult" ))] #[deprecated = "Will be removed in a future release"] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other fetchMomentsWithOptions:)] pub unsafe fn fetchMomentsWithOptions( options: Option<&PHFetchOptions>, @@ -274,6 +276,7 @@ extern_methods!( feature = "PhotoKit_PHFetchResult" ))] #[deprecated = "Will be removed in a future release"] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other fetchMomentListsWithSubtype:containingMoment:options:)] pub unsafe fn fetchMomentListsWithSubtype_containingMoment_options( moment_list_subtype: PHCollectionListSubtype, @@ -286,6 +289,7 @@ extern_methods!( feature = "PhotoKit_PHFetchResult" ))] #[deprecated = "Will be removed in a future release"] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other fetchMomentListsWithSubtype:options:)] pub unsafe fn fetchMomentListsWithSubtype_options( moment_list_subtype: PHCollectionListSubtype, diff --git a/Photos/PHContentEditingInput.rs b/Photos/PHContentEditingInput.rs index 49bfb010c..02d8a4efc 100644 --- a/Photos/PHContentEditingInput.rs +++ b/Photos/PHContentEditingInput.rs @@ -61,6 +61,7 @@ extern_methods!( #[cfg(feature = "AVFoundation_AVAsset")] #[deprecated] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other avAsset)] pub unsafe fn avAsset(&self) -> Option>; diff --git a/Photos/PHLivePhotoEditingContext.rs b/Photos/PHLivePhotoEditingContext.rs index 4120704de..855b404a3 100644 --- a/Photos/PHLivePhotoEditingContext.rs +++ b/Photos/PHLivePhotoEditingContext.rs @@ -110,6 +110,7 @@ extern_static!(PHLivePhotoEditingErrorDomain: &'static NSString); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "ios")))] pub enum PHLivePhotoEditingErrorCode { #[deprecated] PHLivePhotoEditingErrorCodeUnknown = 0, diff --git a/Photos/PHProject.rs b/Photos/PHProject.rs index d94d9f4f3..559659caa 100644 --- a/Photos/PHProject.rs +++ b/Photos/PHProject.rs @@ -9,6 +9,7 @@ use crate::PhotoKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "PhotoKit_PHProject")] + #[cfg(not(any(target_os = "ios")))] pub struct PHProject; #[cfg(feature = "PhotoKit_PHProject")] @@ -25,9 +26,11 @@ extern_methods!( #[cfg(feature = "PhotoKit_PHProject")] unsafe impl PHProject { #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other projectExtensionData)] pub unsafe fn projectExtensionData(&self) -> Id; + #[cfg(not(any(target_os = "ios")))] #[method(hasProjectPreview)] pub unsafe fn hasProjectPreview(&self) -> bool; } diff --git a/Photos/PHProjectChangeRequest.rs b/Photos/PHProjectChangeRequest.rs index e7e0189f1..4bb5d1078 100644 --- a/Photos/PHProjectChangeRequest.rs +++ b/Photos/PHProjectChangeRequest.rs @@ -9,6 +9,7 @@ use crate::PhotoKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "PhotoKit_PHProjectChangeRequest")] + #[cfg(not(any(target_os = "ios")))] pub struct PHProjectChangeRequest; #[cfg(feature = "PhotoKit_PHProjectChangeRequest")] @@ -25,6 +26,7 @@ extern_methods!( #[cfg(feature = "PhotoKit_PHProjectChangeRequest")] unsafe impl PHProjectChangeRequest { #[cfg(feature = "PhotoKit_PHProject")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithProject:)] pub unsafe fn initWithProject( this: Option>, @@ -32,30 +34,37 @@ extern_methods!( ) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "ios")))] #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Other projectExtensionData)] pub unsafe fn projectExtensionData(&self) -> Id; #[cfg(feature = "Foundation_NSData")] + #[cfg(not(any(target_os = "ios")))] #[method(setProjectExtensionData:)] pub unsafe fn setProjectExtensionData(&self, project_extension_data: &NSData); #[cfg(feature = "PhotoKit_PHAsset")] #[deprecated] + #[cfg(not(any(target_os = "ios")))] #[method(setKeyAsset:)] pub unsafe fn setKeyAsset(&self, key_asset: Option<&PHAsset>); #[cfg(feature = "AppKit_NSImage")] + #[cfg(not(any(target_os = "ios")))] #[method(setProjectPreviewImage:)] pub unsafe fn setProjectPreviewImage(&self, preview_image: &NSImage); + #[cfg(not(any(target_os = "ios")))] #[method(removeAssets:)] pub unsafe fn removeAssets(&self, assets: &ProtocolObject); } diff --git a/Photos/PhotosTypes.rs b/Photos/PhotosTypes.rs index f56c99a7d..37fe7e7c8 100644 --- a/Photos/PhotosTypes.rs +++ b/Photos/PhotosTypes.rs @@ -19,6 +19,7 @@ ns_enum!( #[underlying(NSInteger)] pub enum PHCollectionListType { #[deprecated = "Will be removed in a future release"] + #[cfg(not(any(target_os = "macos")))] PHCollectionListTypeMomentList = 1, PHCollectionListTypeFolder = 2, PHCollectionListTypeSmartFolder = 3, @@ -29,8 +30,10 @@ ns_enum!( #[underlying(NSInteger)] pub enum PHCollectionListSubtype { #[deprecated = "Will be removed in a future release"] + #[cfg(not(any(target_os = "macos")))] PHCollectionListSubtypeMomentListCluster = 1, #[deprecated = "Will be removed in a future release"] + #[cfg(not(any(target_os = "macos")))] PHCollectionListSubtypeMomentListYear = 2, PHCollectionListSubtypeRegularFolder = 100, PHCollectionListSubtypeSmartFolderEvents = 200, @@ -58,6 +61,7 @@ ns_enum!( PHAssetCollectionTypeAlbum = 1, PHAssetCollectionTypeSmartAlbum = 2, #[deprecated = "Will be removed in a future release"] + #[cfg(not(any(target_os = "macos")))] PHAssetCollectionTypeMoment = 3, } ); diff --git a/QuartzCore/CADisplayLink.rs b/QuartzCore/CADisplayLink.rs index 94cc2407c..aa2e37c9a 100644 --- a/QuartzCore/CADisplayLink.rs +++ b/QuartzCore/CADisplayLink.rs @@ -7,6 +7,7 @@ use crate::Foundation::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "CoreAnimation_CADisplayLink")] + #[cfg(not(any(target_os = "macos")))] pub struct CADisplayLink; #[cfg(feature = "CoreAnimation_CADisplayLink")] diff --git a/StoreKit/SKAdImpression.rs b/StoreKit/SKAdImpression.rs index 2d7e0a176..be1afc4ef 100644 --- a/StoreKit/SKAdImpression.rs +++ b/StoreKit/SKAdImpression.rs @@ -8,6 +8,7 @@ use crate::StoreKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "StoreKit_SKAdImpression")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct SKAdImpression; #[cfg(feature = "StoreKit_SKAdImpression")] @@ -61,10 +62,12 @@ extern_methods!( pub unsafe fn setAdCampaignIdentifier(&self, ad_campaign_identifier: &NSNumber); #[cfg(feature = "Foundation_NSNumber")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other sourceIdentifier)] pub unsafe fn sourceIdentifier(&self) -> Id; #[cfg(feature = "Foundation_NSNumber")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(setSourceIdentifier:)] pub unsafe fn setSourceIdentifier(&self, source_identifier: &NSNumber); diff --git a/StoreKit/SKAdNetwork.rs b/StoreKit/SKAdNetwork.rs index 318e942e2..a926d11c4 100644 --- a/StoreKit/SKAdNetwork.rs +++ b/StoreKit/SKAdNetwork.rs @@ -18,6 +18,7 @@ extern_static!(SKAdNetworkCoarseConversionValueLow: &'static SKAdNetworkCoarseCo extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "StoreKit_SKAdNetwork")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct SKAdNetwork; #[cfg(feature = "StoreKit_SKAdNetwork")] @@ -33,6 +34,7 @@ extern_methods!( #[cfg(feature = "StoreKit_SKAdNetwork")] unsafe impl SKAdNetwork { #[cfg(all(feature = "Foundation_NSError", feature = "StoreKit_SKAdImpression"))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(startImpression:completionHandler:)] pub unsafe fn startImpression_completionHandler( impression: &SKAdImpression, @@ -40,6 +42,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSError", feature = "StoreKit_SKAdImpression"))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(endImpression:completionHandler:)] pub unsafe fn endImpression_completionHandler( impression: &SKAdImpression, @@ -47,14 +50,17 @@ extern_methods!( ); #[deprecated = "Use updatePostbackConversionValue:completionHandler: instead"] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(registerAppForAdNetworkAttribution)] pub unsafe fn registerAppForAdNetworkAttribution(); #[deprecated = "Use updatePostbackConversionValue:completionHandler: instead"] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(updateConversionValue:)] pub unsafe fn updateConversionValue(conversion_value: NSInteger); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(updatePostbackConversionValue:completionHandler:)] pub unsafe fn updatePostbackConversionValue_completionHandler( conversion_value: NSInteger, @@ -62,6 +68,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(updatePostbackConversionValue:coarseValue:completionHandler:)] pub unsafe fn updatePostbackConversionValue_coarseValue_completionHandler( fine_value: NSInteger, @@ -70,6 +77,7 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(updatePostbackConversionValue:coarseValue:lockWindow:completionHandler:)] pub unsafe fn updatePostbackConversionValue_coarseValue_lockWindow_completionHandler( fine_value: NSInteger, diff --git a/StoreKit/SKArcadeService.rs b/StoreKit/SKArcadeService.rs index b7307e990..3d437374d 100644 --- a/StoreKit/SKArcadeService.rs +++ b/StoreKit/SKArcadeService.rs @@ -8,6 +8,7 @@ use crate::StoreKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "StoreKit_SKArcadeService")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct SKArcadeService; #[cfg(feature = "StoreKit_SKArcadeService")] @@ -23,6 +24,7 @@ extern_methods!( #[cfg(feature = "StoreKit_SKArcadeService")] unsafe impl SKArcadeService { #[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(registerArcadeAppWithRandomFromLib:randomFromLibLength:resultHandler:)] pub unsafe fn registerArcadeAppWithRandomFromLib_randomFromLibLength_resultHandler( random_from_lib: &NSData, @@ -31,12 +33,14 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(arcadeSubscriptionStatusWithNonce:resultHandler:)] pub unsafe fn arcadeSubscriptionStatusWithNonce_resultHandler( nonce: u64, result_handler: &Block<(*mut NSData, u32, *mut NSData, u32, *mut NSError), ()>, ); + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(repairArcadeApp)] pub unsafe fn repairArcadeApp(); } diff --git a/StoreKit/SKCloudServiceController.rs b/StoreKit/SKCloudServiceController.rs index 1a66c4b85..a223ff821 100644 --- a/StoreKit/SKCloudServiceController.rs +++ b/StoreKit/SKCloudServiceController.rs @@ -81,6 +81,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSError", feature = "Foundation_NSString"))] #[deprecated] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(requestPersonalizationTokenForClientToken:withCompletionHandler:)] pub unsafe fn requestPersonalizationTokenForClientToken_withCompletionHandler( &self, diff --git a/StoreKit/SKCloudServiceSetupViewController.rs b/StoreKit/SKCloudServiceSetupViewController.rs index bc3b2e438..8279dd6c3 100644 --- a/StoreKit/SKCloudServiceSetupViewController.rs +++ b/StoreKit/SKCloudServiceSetupViewController.rs @@ -20,6 +20,7 @@ typed_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "StoreKit_SKCloudServiceSetupViewController")] + #[cfg(not(any(target_os = "macos")))] pub struct SKCloudServiceSetupViewController; #[cfg(feature = "StoreKit_SKCloudServiceSetupViewController")] @@ -47,11 +48,13 @@ unsafe impl NSUserInterfaceItemIdentification for SKCloudServiceSetupViewControl extern_methods!( #[cfg(feature = "StoreKit_SKCloudServiceSetupViewController")] unsafe impl SKCloudServiceSetupViewController { + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate( &self, ) -> Option>>; + #[cfg(not(any(target_os = "macos")))] #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -59,6 +62,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSError"))] + #[cfg(not(any(target_os = "macos")))] #[method(loadWithOptions:completionHandler:)] pub unsafe fn loadWithOptions_completionHandler( &self, @@ -71,6 +75,7 @@ extern_methods!( extern_protocol!( pub unsafe trait SKCloudServiceSetupViewControllerDelegate: NSObjectProtocol { #[cfg(feature = "StoreKit_SKCloudServiceSetupViewController")] + #[cfg(not(any(target_os = "macos")))] #[optional] #[method(cloudServiceSetupViewControllerDidDismiss:)] unsafe fn cloudServiceSetupViewControllerDidDismiss( @@ -119,6 +124,7 @@ extern_methods!( #[cfg(feature = "StoreKit_SKCloudServiceSetupViewController")] unsafe impl SKCloudServiceSetupViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/StoreKit/SKDownload.rs b/StoreKit/SKDownload.rs index 85bc0f45c..f950216cb 100644 --- a/StoreKit/SKDownload.rs +++ b/StoreKit/SKDownload.rs @@ -49,11 +49,13 @@ extern_methods!( pub unsafe fn state(&self) -> SKDownloadState; #[deprecated] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(downloadState)] pub unsafe fn downloadState(&self) -> SKDownloadState; #[cfg(feature = "Foundation_NSNumber")] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other contentLength)] pub unsafe fn contentLength(&self) -> Id; @@ -96,11 +98,13 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSString", feature = "Foundation_NSURL"))] #[deprecated = "Hosted content is no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other contentURLForProductID:)] pub unsafe fn contentURLForProductID(product_id: &NSString) -> Option>; #[cfg(feature = "Foundation_NSString")] #[deprecated = "Hosted content is no longer supported"] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(deleteContentForProductID:)] pub unsafe fn deleteContentForProductID(product_id: &NSString); } diff --git a/StoreKit/SKError.rs b/StoreKit/SKError.rs index 237dae543..ffb90de37 100644 --- a/StoreKit/SKError.rs +++ b/StoreKit/SKError.rs @@ -26,10 +26,13 @@ ns_enum!( SKErrorMissingOfferParams = 13, SKErrorInvalidOfferPrice = 14, SKErrorOverlayCancelled = 15, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] SKErrorOverlayInvalidConfiguration = 16, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] SKErrorOverlayTimeout = 17, SKErrorIneligibleForOffer = 18, SKErrorUnsupportedPlatform = 19, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] SKErrorOverlayPresentedInBackgroundScene = 20, } ); diff --git a/StoreKit/SKOverlay.rs b/StoreKit/SKOverlay.rs index f4ebad70d..b591f40cc 100644 --- a/StoreKit/SKOverlay.rs +++ b/StoreKit/SKOverlay.rs @@ -6,6 +6,7 @@ use crate::Foundation::*; use crate::StoreKit::*; extern_protocol!( + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub unsafe trait SKOverlayDelegate: NSObjectProtocol { #[cfg(all(feature = "Foundation_NSError", feature = "StoreKit_SKOverlay"))] #[optional] @@ -67,6 +68,7 @@ extern_protocol!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "StoreKit_SKOverlay")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct SKOverlay; #[cfg(feature = "StoreKit_SKOverlay")] diff --git a/StoreKit/SKOverlayConfiguration.rs b/StoreKit/SKOverlayConfiguration.rs index 0a082936e..a98d6e753 100644 --- a/StoreKit/SKOverlayConfiguration.rs +++ b/StoreKit/SKOverlayConfiguration.rs @@ -7,8 +7,11 @@ use crate::StoreKit::*; ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub enum SKOverlayPosition { + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] SKOverlayPositionBottom = 0, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] SKOverlayPositionBottomRaised = 1, } ); @@ -16,6 +19,7 @@ ns_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "StoreKit_SKOverlayConfiguration")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct SKOverlayConfiguration; #[cfg(feature = "StoreKit_SKOverlayConfiguration")] @@ -41,6 +45,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "StoreKit_SKOverlayAppConfiguration")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct SKOverlayAppConfiguration; #[cfg(feature = "StoreKit_SKOverlayAppConfiguration")] @@ -95,10 +100,12 @@ extern_methods!( pub unsafe fn setProviderToken(&self, provider_token: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other customProductPageIdentifier)] pub unsafe fn customProductPageIdentifier(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(setCustomProductPageIdentifier:)] pub unsafe fn setCustomProductPageIdentifier( &self, @@ -106,10 +113,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other latestReleaseID)] pub unsafe fn latestReleaseID(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(setLatestReleaseID:)] pub unsafe fn setLatestReleaseID(&self, latest_release_id: Option<&NSString>); @@ -134,6 +143,7 @@ extern_methods!( pub unsafe fn additionalValueForKey(&self, key: &NSString) -> Option>; #[cfg(feature = "StoreKit_SKAdImpression")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(setAdImpression:)] pub unsafe fn setAdImpression(&self, impression: &SKAdImpression); } @@ -142,6 +152,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "StoreKit_SKOverlayAppClipConfiguration")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct SKOverlayAppClipConfiguration; #[cfg(feature = "StoreKit_SKOverlayAppClipConfiguration")] @@ -186,10 +197,12 @@ extern_methods!( pub unsafe fn setProviderToken(&self, provider_token: Option<&NSString>); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other customProductPageIdentifier)] pub unsafe fn customProductPageIdentifier(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(setCustomProductPageIdentifier:)] pub unsafe fn setCustomProductPageIdentifier( &self, @@ -197,10 +210,12 @@ extern_methods!( ); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other latestReleaseID)] pub unsafe fn latestReleaseID(&self) -> Option>; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(setLatestReleaseID:)] pub unsafe fn setLatestReleaseID(&self, latest_release_id: Option<&NSString>); diff --git a/StoreKit/SKOverlayTransitionContext.rs b/StoreKit/SKOverlayTransitionContext.rs index 197cd57ad..d93d00631 100644 --- a/StoreKit/SKOverlayTransitionContext.rs +++ b/StoreKit/SKOverlayTransitionContext.rs @@ -8,6 +8,7 @@ use crate::StoreKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "StoreKit_SKOverlayTransitionContext")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] pub struct SKOverlayTransitionContext; #[cfg(feature = "StoreKit_SKOverlayTransitionContext")] diff --git a/StoreKit/SKPayment.rs b/StoreKit/SKPayment.rs index aa87217a1..6d81aba98 100644 --- a/StoreKit/SKPayment.rs +++ b/StoreKit/SKPayment.rs @@ -28,6 +28,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSString")] #[deprecated] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other paymentWithProductIdentifier:)] pub unsafe fn paymentWithProductIdentifier(identifier: &NSString) -> Id; diff --git a/StoreKit/SKPaymentQueue.rs b/StoreKit/SKPaymentQueue.rs index 1595ec3fa..ecee940a6 100644 --- a/StoreKit/SKPaymentQueue.rs +++ b/StoreKit/SKPaymentQueue.rs @@ -104,9 +104,11 @@ extern_methods!( #[method_id(@__retain_semantics Other transactions)] pub unsafe fn transactions(&self) -> Id>; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(showPriceConsentIfNeeded)] pub unsafe fn showPriceConsentIfNeeded(&self); + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(presentCodeRedemptionSheet)] pub unsafe fn presentCodeRedemptionSheet(&self); } @@ -129,6 +131,7 @@ extern_protocol!( ) -> bool; #[cfg(feature = "StoreKit_SKPaymentQueue")] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[optional] #[method(paymentQueueShouldShowPriceConsent:)] unsafe fn paymentQueueShouldShowPriceConsent(&self, payment_queue: &SKPaymentQueue) @@ -198,6 +201,7 @@ extern_protocol!( feature = "StoreKit_SKPaymentQueue", feature = "StoreKit_SKProduct" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(paymentQueue:shouldAddStorePayment:forProduct:)] unsafe fn paymentQueue_shouldAddStorePayment_forProduct( diff --git a/StoreKit/SKPaymentTransaction.rs b/StoreKit/SKPaymentTransaction.rs index 7f5d6f86e..b579ec1ba 100644 --- a/StoreKit/SKPaymentTransaction.rs +++ b/StoreKit/SKPaymentTransaction.rs @@ -59,6 +59,7 @@ extern_methods!( #[cfg(feature = "Foundation_NSData")] #[deprecated] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other transactionReceipt)] pub unsafe fn transactionReceipt(&self) -> Option>; diff --git a/StoreKit/SKProduct.rs b/StoreKit/SKProduct.rs index 8a2c1f12d..55004c479 100644 --- a/StoreKit/SKProduct.rs +++ b/StoreKit/SKProduct.rs @@ -81,6 +81,7 @@ extern_methods!( pub unsafe fn isDownloadable(&self) -> bool; #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method(downloadable)] pub unsafe fn downloadable(&self) -> bool; @@ -89,6 +90,7 @@ extern_methods!( #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))] #[deprecated] + #[cfg(not(any(target_os = "ios", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other contentLengths)] pub unsafe fn contentLengths(&self) -> Id>; diff --git a/StoreKit/SKProductStorePromotionController.rs b/StoreKit/SKProductStorePromotionController.rs index f24e0384f..2c83f8047 100644 --- a/StoreKit/SKProductStorePromotionController.rs +++ b/StoreKit/SKProductStorePromotionController.rs @@ -7,9 +7,13 @@ use crate::StoreKit::*; ns_closed_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum SKProductStorePromotionVisibility { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] SKProductStorePromotionVisibilityDefault = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] SKProductStorePromotionVisibilityShow = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] SKProductStorePromotionVisibilityHide = 2, } ); @@ -17,6 +21,7 @@ ns_closed_enum!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "StoreKit_SKProductStorePromotionController")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct SKProductStorePromotionController; #[cfg(feature = "StoreKit_SKProductStorePromotionController")] @@ -31,10 +36,12 @@ unsafe impl NSObjectProtocol for SKProductStorePromotionController {} extern_methods!( #[cfg(feature = "StoreKit_SKProductStorePromotionController")] unsafe impl SKProductStorePromotionController { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other defaultController)] pub unsafe fn defaultController() -> Id; #[cfg(all(feature = "Foundation_NSError", feature = "StoreKit_SKProduct"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(fetchStorePromotionVisibilityForProduct:completionHandler:)] pub unsafe fn fetchStorePromotionVisibilityForProduct_completionHandler( &self, @@ -45,6 +52,7 @@ extern_methods!( ); #[cfg(all(feature = "Foundation_NSError", feature = "StoreKit_SKProduct"))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(updateStorePromotionVisibility:forProduct:completionHandler:)] pub unsafe fn updateStorePromotionVisibility_forProduct_completionHandler( &self, @@ -58,6 +66,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "StoreKit_SKProduct" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(fetchStorePromotionOrderWithCompletionHandler:)] pub unsafe fn fetchStorePromotionOrderWithCompletionHandler( &self, @@ -69,6 +78,7 @@ extern_methods!( feature = "Foundation_NSError", feature = "StoreKit_SKProduct" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(updateStorePromotionOrder:completionHandler:)] pub unsafe fn updateStorePromotionOrder_completionHandler( &self, diff --git a/StoreKit/SKStoreProductViewController.rs b/StoreKit/SKStoreProductViewController.rs index c47ed4850..71abb2a40 100644 --- a/StoreKit/SKStoreProductViewController.rs +++ b/StoreKit/SKStoreProductViewController.rs @@ -64,6 +64,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "StoreKit_SKAdImpression" ))] + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(loadProductWithParameters:impression:completionBlock:)] pub unsafe fn loadProductWithParameters_impression_completionBlock( &self, @@ -107,6 +108,7 @@ extern_methods!( #[cfg(feature = "StoreKit_SKStoreProductViewController")] unsafe impl SKStoreProductViewController { #[cfg(feature = "Foundation_NSBundle")] + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, diff --git a/StoreKit/SKStoreReviewController.rs b/StoreKit/SKStoreReviewController.rs index fb835bc19..82a135cd8 100644 --- a/StoreKit/SKStoreReviewController.rs +++ b/StoreKit/SKStoreReviewController.rs @@ -8,6 +8,7 @@ use crate::StoreKit::*; extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "StoreKit_SKStoreReviewController")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub struct SKStoreReviewController; #[cfg(feature = "StoreKit_SKStoreReviewController")] @@ -23,6 +24,7 @@ extern_methods!( #[cfg(feature = "StoreKit_SKStoreReviewController")] unsafe impl SKStoreReviewController { #[deprecated] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(requestReview)] pub unsafe fn requestReview(); } diff --git a/UserNotifications/UNNotificationCategory.rs b/UserNotifications/UNNotificationCategory.rs index ad58e3b04..b5a808342 100644 --- a/UserNotifications/UNNotificationCategory.rs +++ b/UserNotifications/UNNotificationCategory.rs @@ -9,10 +9,14 @@ ns_options!( #[underlying(NSUInteger)] pub enum UNNotificationCategoryOptions { UNNotificationCategoryOptionCustomDismissAction = 1 << 0, + #[cfg(not(any(target_os = "macos")))] UNNotificationCategoryOptionAllowInCarPlay = 1 << 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] UNNotificationCategoryOptionHiddenPreviewsShowTitle = 1 << 2, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] UNNotificationCategoryOptionHiddenPreviewsShowSubtitle = 1 << 3, #[deprecated = "Announcement option is ignored"] + #[cfg(not(any(target_os = "macos")))] UNNotificationCategoryOptionAllowAnnouncement = 1 << 4, } ); @@ -61,10 +65,12 @@ extern_methods!( pub unsafe fn options(&self) -> UNNotificationCategoryOptions; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other hiddenPreviewsBodyPlaceholder)] pub unsafe fn hiddenPreviewsBodyPlaceholder(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other categorySummaryFormat)] pub unsafe fn categorySummaryFormat(&self) -> Id; @@ -86,6 +92,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "UserNotifications_UNNotificationAction" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:options:)] pub unsafe fn categoryWithIdentifier_actions_intentIdentifiers_hiddenPreviewsBodyPlaceholder_options( identifier: &NSString, @@ -100,6 +107,7 @@ extern_methods!( feature = "Foundation_NSString", feature = "UserNotifications_UNNotificationAction" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:categorySummaryFormat:options:)] pub unsafe fn categoryWithIdentifier_actions_intentIdentifiers_hiddenPreviewsBodyPlaceholder_categorySummaryFormat_options( identifier: &NSString, diff --git a/UserNotifications/UNNotificationContent.rs b/UserNotifications/UNNotificationContent.rs index c56cfcfc2..4fbcc733e 100644 --- a/UserNotifications/UNNotificationContent.rs +++ b/UserNotifications/UNNotificationContent.rs @@ -64,6 +64,7 @@ extern_methods!( pub unsafe fn categoryIdentifier(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other launchImageName)] pub unsafe fn launchImageName(&self) -> Id; @@ -182,10 +183,12 @@ extern_methods!( pub unsafe fn setCategoryIdentifier(&self, category_identifier: &NSString); #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos")))] #[method_id(@__retain_semantics Other launchImageName)] pub unsafe fn launchImageName(&self) -> Id; #[cfg(feature = "Foundation_NSString")] + #[cfg(not(any(target_os = "macos")))] #[method(setLaunchImageName:)] pub unsafe fn setLaunchImageName(&self, launch_image_name: &NSString); diff --git a/UserNotifications/UNNotificationSettings.rs b/UserNotifications/UNNotificationSettings.rs index 46f11c9a4..8f0d9fc95 100644 --- a/UserNotifications/UNNotificationSettings.rs +++ b/UserNotifications/UNNotificationSettings.rs @@ -12,15 +12,20 @@ ns_enum!( UNAuthorizationStatusDenied = 1, UNAuthorizationStatusAuthorized = 2, UNAuthorizationStatusProvisional = 3, + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] UNAuthorizationStatusEphemeral = 4, } ); ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum UNShowPreviewsSetting { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] UNShowPreviewsSettingAlways = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] UNShowPreviewsSettingWhenAuthenticated = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] UNShowPreviewsSettingNever = 2, } ); @@ -36,9 +41,13 @@ ns_enum!( ns_enum!( #[underlying(NSInteger)] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] pub enum UNAlertStyle { + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] UNAlertStyleNone = 0, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] UNAlertStyleBanner = 1, + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] UNAlertStyleAlert = 2, } ); @@ -72,6 +81,7 @@ extern_methods!( #[method(soundSetting)] pub unsafe fn soundSetting(&self) -> UNNotificationSetting; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(badgeSetting)] pub unsafe fn badgeSetting(&self) -> UNNotificationSetting; @@ -81,15 +91,19 @@ extern_methods!( #[method(notificationCenterSetting)] pub unsafe fn notificationCenterSetting(&self) -> UNNotificationSetting; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(lockScreenSetting)] pub unsafe fn lockScreenSetting(&self) -> UNNotificationSetting; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method(carPlaySetting)] pub unsafe fn carPlaySetting(&self) -> UNNotificationSetting; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(alertStyle)] pub unsafe fn alertStyle(&self) -> UNAlertStyle; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(showPreviewsSetting)] pub unsafe fn showPreviewsSetting(&self) -> UNShowPreviewsSetting; @@ -99,6 +113,7 @@ extern_methods!( #[method(providesAppNotificationSettings)] pub unsafe fn providesAppNotificationSettings(&self) -> bool; + #[cfg(not(any(target_os = "macos")))] #[method(announcementSetting)] pub unsafe fn announcementSetting(&self) -> UNNotificationSetting; diff --git a/UserNotifications/UNNotificationSound.rs b/UserNotifications/UNNotificationSound.rs index 1a2806fa0..97f08f07f 100644 --- a/UserNotifications/UNNotificationSound.rs +++ b/UserNotifications/UNNotificationSound.rs @@ -35,6 +35,7 @@ extern_methods!( #[method_id(@__retain_semantics Other defaultSound)] pub unsafe fn defaultSound() -> Id; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other defaultRingtoneSound)] pub unsafe fn defaultRingtoneSound() -> Id; @@ -44,15 +45,19 @@ extern_methods!( #[method_id(@__retain_semantics Other defaultCriticalSoundWithAudioVolume:)] pub unsafe fn defaultCriticalSoundWithAudioVolume(volume: c_float) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other soundNamed:)] pub unsafe fn soundNamed(name: &UNNotificationSoundName) -> Id; + #[cfg(not(any(target_os = "macos", target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other ringtoneSoundNamed:)] pub unsafe fn ringtoneSoundNamed(name: &UNNotificationSoundName) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other criticalSoundNamed:)] pub unsafe fn criticalSoundNamed(name: &UNNotificationSoundName) -> Id; + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method_id(@__retain_semantics Other criticalSoundNamed:withAudioVolume:)] pub unsafe fn criticalSoundNamed_withAudioVolume( name: &UNNotificationSoundName, diff --git a/UserNotifications/UNNotificationTrigger.rs b/UserNotifications/UNNotificationTrigger.rs index d29a31915..4a5402b01 100644 --- a/UserNotifications/UNNotificationTrigger.rs +++ b/UserNotifications/UNNotificationTrigger.rs @@ -145,6 +145,7 @@ extern_methods!( extern_class!( #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "UserNotifications_UNLocationNotificationTrigger")] + #[cfg(not(any(target_os = "macos")))] pub struct UNLocationNotificationTrigger; #[cfg(feature = "UserNotifications_UNLocationNotificationTrigger")] diff --git a/UserNotifications/UNUserNotificationCenter.rs b/UserNotifications/UNUserNotificationCenter.rs index 3b373bbfd..3654ff792 100644 --- a/UserNotifications/UNUserNotificationCenter.rs +++ b/UserNotifications/UNUserNotificationCenter.rs @@ -16,6 +16,7 @@ ns_options!( UNAuthorizationOptionProvidesAppNotificationSettings = 1 << 5, UNAuthorizationOptionProvisional = 1 << 6, #[deprecated = "Announcement authorization is always included"] + #[cfg(not(any(target_os = "macos")))] UNAuthorizationOptionAnnouncement = 1 << 7, #[deprecated = "Use time-sensitive entitlement"] UNAuthorizationOptionTimeSensitive = 1 << 8, @@ -145,6 +146,7 @@ extern_methods!( pub unsafe fn removeAllDeliveredNotifications(&self); #[cfg(feature = "Foundation_NSError")] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[method(setBadgeCount:withCompletionHandler:)] pub unsafe fn setBadgeCount_withCompletionHandler( &self, @@ -200,6 +202,7 @@ extern_protocol!( feature = "UserNotifications_UNNotification", feature = "UserNotifications_UNUserNotificationCenter" ))] + #[cfg(not(any(target_os = "tvos", target_os = "watchos")))] #[optional] #[method(userNotificationCenter:openSettingsForNotification:)] unsafe fn userNotificationCenter_openSettingsForNotification( diff --git a/WebKit/WKUIDelegate.rs b/WebKit/WKUIDelegate.rs index 5adc4705b..9556b5373 100644 --- a/WebKit/WKUIDelegate.rs +++ b/WebKit/WKUIDelegate.rs @@ -122,6 +122,7 @@ extern_protocol!( feature = "WebKit_WKSecurityOrigin", feature = "WebKit_WKWebView" ))] + #[cfg(not(any(target_os = "macos")))] #[optional] #[method(webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:)] unsafe fn webView_requestDeviceOrientationAndMotionPermissionForOrigin_initiatedByFrame_decisionHandler( diff --git a/WebKit/WKWebView.rs b/WebKit/WKWebView.rs index 76ccbf405..bc82bd551 100644 --- a/WebKit/WKWebView.rs +++ b/WebKit/WKWebView.rs @@ -592,6 +592,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "WebKit_WKWebView")] unsafe impl WKWebView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/WebKit/WebFrameView.rs b/WebKit/WebFrameView.rs index c56b8859f..9264502c8 100644 --- a/WebKit/WebFrameView.rs +++ b/WebKit/WebFrameView.rs @@ -80,6 +80,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "WebKit_WebFrameView")] unsafe impl WebFrameView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; } diff --git a/WebKit/WebView.rs b/WebKit/WebView.rs index 9443e0580..6aeeaeabe 100644 --- a/WebKit/WebView.rs +++ b/WebKit/WebView.rs @@ -676,6 +676,7 @@ extern_methods!( /// Methods declared on superclass `NSView` #[cfg(feature = "WebKit_WebView")] unsafe impl WebView { + #[cfg(not(any(target_os = "ios")))] #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame(this: Option>, frame_rect: NSRect) -> Id; }