Skip to content

Commit

Permalink
Update to Xcode 15.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Nov 23, 2023
1 parent 58c473a commit 19561a8
Show file tree
Hide file tree
Showing 289 changed files with 11,068 additions and 867 deletions.
13 changes: 13 additions & 0 deletions Accessibility/AXCustomContent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ extern_methods!(
}
);

pub type AXCustomContentReturnBlock = *mut Block<(), *mut NSArray<AXCustomContent>>;

extern_protocol!(
pub unsafe trait AXCustomContentProvider: NSObjectProtocol {
#[cfg(all(
Expand All @@ -98,6 +100,17 @@ extern_protocol!(
&self,
accessibility_custom_content: Option<&NSArray<AXCustomContent>>,
);

#[optional]
#[method(accessibilityCustomContentBlock)]
unsafe fn accessibilityCustomContentBlock(&self) -> AXCustomContentReturnBlock;

#[optional]
#[method(setAccessibilityCustomContentBlock:)]
unsafe fn setAccessibilityCustomContentBlock(
&self,
accessibility_custom_content_block: AXCustomContentReturnBlock,
);
}

unsafe impl ProtocolType for dyn AXCustomContentProvider {}
Expand Down
17 changes: 17 additions & 0 deletions Accessibility/AXSettings.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::Accessibility::*;
use crate::Foundation::*;

extern_fn!(
pub unsafe fn AXPrefersHorizontalTextLayout() -> Bool;
);

extern_static!(AXPrefersHorizontalTextLayoutDidChangeNotification: &'static NSNotificationName);

extern_fn!(
pub unsafe fn AXAnimatedImagesEnabled() -> Bool;
);

extern_static!(AXAnimatedImagesEnabledDidChangeNotification: &'static NSNotificationName);
7 changes: 7 additions & 0 deletions Accessibility/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ mod __AXCustomContent;
mod __AXFoundation;
#[path = "AXHearingUtilities.rs"]
mod __AXHearingUtilities;
#[path = "AXSettings.rs"]
mod __AXSettings;

#[cfg(feature = "Accessibility_AXCategoricalDataAxisDescriptor")]
pub use self::__AXAudiograph::AXCategoricalDataAxisDescriptor;
Expand Down Expand Up @@ -50,6 +52,7 @@ pub use self::__AXBrailleMap::AXBrailleMapRenderer;
pub use self::__AXCustomContent::AXCustomContent;
pub use self::__AXCustomContent::AXCustomContentImportance;
pub use self::__AXCustomContent::AXCustomContentProvider;
pub use self::__AXCustomContent::AXCustomContentReturnBlock;
pub use self::__AXCustomContent::{
AXCustomContentImportanceDefault, AXCustomContentImportanceHigh,
};
Expand All @@ -63,3 +66,7 @@ pub use self::__AXHearingUtilities::AXSupportsBidirectionalAXMFiHearingDeviceStr
pub use self::__AXHearingUtilities::{
AXHearingDeviceEarBoth, AXHearingDeviceEarLeft, AXHearingDeviceEarNone, AXHearingDeviceEarRight,
};
pub use self::__AXSettings::AXAnimatedImagesEnabled;
pub use self::__AXSettings::AXAnimatedImagesEnabledDidChangeNotification;
pub use self::__AXSettings::AXPrefersHorizontalTextLayout;
pub use self::__AXSettings::AXPrefersHorizontalTextLayoutDidChangeNotification;
3 changes: 0 additions & 3 deletions AdSupport/ASIdentifierManager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ extern_methods!(
#[deprecated = "This has been replaced by functionality in AppTrackingTransparency's ATTrackingManager class."]
#[method(isAdvertisingTrackingEnabled)]
pub unsafe fn isAdvertisingTrackingEnabled(&self) -> bool;

#[method(clearAdvertisingIdentifier)]
pub unsafe fn clearAdvertisingIdentifier(&self);
}
);

Expand Down
30 changes: 30 additions & 0 deletions AppKit/NSAccessibilityProtocols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,36 @@ extern_protocol!(
accessibility_custom_rotors: &NSArray<NSAccessibilityCustomRotor>,
);

#[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
#[method_id(@__retain_semantics Other accessibilityUserInputLabels)]
unsafe fn accessibilityUserInputLabels(&self) -> Option<Id<NSArray<NSString>>>;

#[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
#[method(setAccessibilityUserInputLabels:)]
unsafe fn setAccessibilityUserInputLabels(
&self,
accessibility_user_input_labels: Option<&NSArray<NSString>>,
);

#[cfg(all(
feature = "Foundation_NSArray",
feature = "Foundation_NSAttributedString"
))]
#[method_id(@__retain_semantics Other accessibilityAttributedUserInputLabels)]
unsafe fn accessibilityAttributedUserInputLabels(
&self,
) -> Option<Id<NSArray<NSAttributedString>>>;

#[cfg(all(
feature = "Foundation_NSArray",
feature = "Foundation_NSAttributedString"
))]
#[method(setAccessibilityAttributedUserInputLabels:)]
unsafe fn setAccessibilityAttributedUserInputLabels(
&self,
accessibility_attributed_user_input_labels: Option<&NSArray<NSAttributedString>>,
);

#[method_id(@__retain_semantics Other accessibilityApplicationFocusedUIElement)]
unsafe fn accessibilityApplicationFocusedUIElement(&self) -> Option<Id<AnyObject>>;

Expand Down
32 changes: 16 additions & 16 deletions AppKit/NSAlert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ extern_methods!(
#[method_id(@__retain_semantics Other buttons)]
pub unsafe fn buttons(&self) -> Id<NSArray<NSButton>>;

#[method(alertStyle)]
pub unsafe fn alertStyle(&self) -> NSAlertStyle;

#[method(setAlertStyle:)]
pub unsafe fn setAlertStyle(&self, alert_style: NSAlertStyle);

#[method(showsHelp)]
pub unsafe fn showsHelp(&self) -> bool;

Expand All @@ -86,28 +92,12 @@ extern_methods!(
#[method(setHelpAnchor:)]
pub unsafe fn setHelpAnchor(&self, help_anchor: Option<&NSHelpAnchorName>);

#[method(alertStyle)]
pub unsafe fn alertStyle(&self) -> NSAlertStyle;

#[method(setAlertStyle:)]
pub unsafe fn setAlertStyle(&self, alert_style: NSAlertStyle);

#[method_id(@__retain_semantics Other delegate)]
pub unsafe fn delegate(&self) -> Option<Id<ProtocolObject<dyn NSAlertDelegate>>>;

#[method(setDelegate:)]
pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn NSAlertDelegate>>);

#[method(showsSuppressionButton)]
pub unsafe fn showsSuppressionButton(&self) -> bool;

#[method(setShowsSuppressionButton:)]
pub unsafe fn setShowsSuppressionButton(&self, shows_suppression_button: bool);

#[cfg(feature = "AppKit_NSButton")]
#[method_id(@__retain_semantics Other suppressionButton)]
pub unsafe fn suppressionButton(&self) -> Option<Id<NSButton>>;

#[cfg(feature = "AppKit_NSView")]
#[method_id(@__retain_semantics Other accessoryView)]
pub unsafe fn accessoryView(&self) -> Option<Id<NSView>>;
Expand All @@ -122,6 +112,16 @@ extern_methods!(
#[method(runModal)]
pub unsafe fn runModal(&self) -> NSModalResponse;

#[method(showsSuppressionButton)]
pub unsafe fn showsSuppressionButton(&self) -> bool;

#[method(setShowsSuppressionButton:)]
pub unsafe fn setShowsSuppressionButton(&self, shows_suppression_button: bool);

#[cfg(feature = "AppKit_NSButton")]
#[method_id(@__retain_semantics Other suppressionButton)]
pub unsafe fn suppressionButton(&self) -> Option<Id<NSButton>>;

#[cfg(feature = "AppKit_NSWindow")]
#[method(beginSheetModalForWindow:completionHandler:)]
pub unsafe fn beginSheetModalForWindow_completionHandler(
Expand Down
17 changes: 16 additions & 1 deletion AppKit/NSApplication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,24 @@ extern_methods!(
#[method(deactivate)]
pub unsafe fn deactivate(&self);

#[deprecated = "This method will be deprecated in a future release. Use NSApp.activate instead."]
#[method(activateIgnoringOtherApps:)]
pub fn activateIgnoringOtherApps(&self, flag: bool);

#[method(activate)]
pub unsafe fn activate(&self);

#[cfg(feature = "AppKit_NSRunningApplication")]
#[method(yieldActivationToApplication:)]
pub unsafe fn yieldActivationToApplication(&self, application: &NSRunningApplication);

#[cfg(feature = "Foundation_NSString")]
#[method(yieldActivationToApplicationWithBundleIdentifier:)]
pub unsafe fn yieldActivationToApplicationWithBundleIdentifier(
&self,
bundle_identifier: &NSString,
);

#[method(hideOtherApplications:)]
pub fn hideOtherApplications(&self, sender: Option<&AnyObject>);

Expand Down Expand Up @@ -633,8 +648,8 @@ ns_enum!(
pub enum NSApplicationPrintReply {
NSPrintingCancelled = 0,
NSPrintingSuccess = 1,
NSPrintingFailure = 3,
NSPrintingReplyLater = 2,
NSPrintingFailure = 3,
}
);

Expand Down
14 changes: 8 additions & 6 deletions AppKit/NSAttributedString.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,8 @@ extern_static!(NSUnderlineColorAttributeName: &'static NSAttributedStringKey);

extern_static!(NSStrikethroughColorAttributeName: &'static NSAttributedStringKey);

extern_static!(NSObliquenessAttributeName: &'static NSAttributedStringKey);

extern_static!(NSExpansionAttributeName: &'static NSAttributedStringKey);

extern_static!(NSWritingDirectionAttributeName: &'static NSAttributedStringKey);

extern_static!(NSVerticalGlyphFormAttributeName: &'static NSAttributedStringKey);

extern_static!(NSCursorAttributeName: &'static NSAttributedStringKey);

extern_static!(NSToolTipAttributeName: &'static NSAttributedStringKey);
Expand Down Expand Up @@ -233,6 +227,8 @@ extern_static!(NSTextEncodingNameDocumentAttribute: &'static NSAttributedStringD

extern_static!(NSPrefixSpacesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);

extern_static!(NSDefaultFontExcludedDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);

extern_static!(NSTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);

extern_static!(NSSourceTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
Expand Down Expand Up @@ -618,6 +614,12 @@ extern_static!(NSCharacterShapeAttributeName: &'static NSAttributedStringKey);

extern_static!(NSUsesScreenFontsDocumentAttribute: &'static NSAttributedStringKey);

extern_static!(NSObliquenessAttributeName: &'static NSAttributedStringKey);

extern_static!(NSExpansionAttributeName: &'static NSAttributedStringKey);

extern_static!(NSVerticalGlyphFormAttributeName: &'static NSAttributedStringKey);

extern_enum!(
#[underlying(c_uint)]
pub enum __anonymous__ {
Expand Down
15 changes: 14 additions & 1 deletion AppKit/NSBezierPath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ ns_enum!(
pub enum NSBezierPathElement {
NSBezierPathElementMoveTo = 0,
NSBezierPathElementLineTo = 1,
NSBezierPathElementCurveTo = 2,
NSBezierPathElementCubicCurveTo = 2,
NSBezierPathElementClosePath = 3,
NSBezierPathElementQuadraticCurveTo = 4,
#[deprecated]
NSBezierPathElementCurveTo = NSBezierPathElementCubicCurveTo,
}
);

Expand Down Expand Up @@ -149,6 +152,9 @@ extern_methods!(
control_point2: NSPoint,
);

#[method(curveToPoint:controlPoint:)]
pub unsafe fn curveToPoint_controlPoint(&self, end_point: NSPoint, control_point: NSPoint);

#[method(closePath)]
pub unsafe fn closePath(&self);

Expand All @@ -169,6 +175,13 @@ extern_methods!(
control_point2: NSPoint,
);

#[method(relativeCurveToPoint:controlPoint:)]
pub unsafe fn relativeCurveToPoint_controlPoint(
&self,
end_point: NSPoint,
control_point: NSPoint,
);

#[method(lineWidth)]
pub unsafe fn lineWidth(&self) -> CGFloat;

Expand Down
32 changes: 16 additions & 16 deletions AppKit/NSButton.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,22 @@ extern_methods!(
shows_border_only_while_mouse_inside: bool,
);

#[cfg(feature = "AppKit_NSColor")]
#[method_id(@__retain_semantics Other bezelColor)]
pub unsafe fn bezelColor(&self) -> Option<Id<NSColor>>;

#[cfg(feature = "AppKit_NSColor")]
#[method(setBezelColor:)]
pub unsafe fn setBezelColor(&self, bezel_color: Option<&NSColor>);

#[cfg(feature = "AppKit_NSColor")]
#[method_id(@__retain_semantics Other contentTintColor)]
pub unsafe fn contentTintColor(&self) -> Option<Id<NSColor>>;

#[cfg(feature = "AppKit_NSColor")]
#[method(setContentTintColor:)]
pub unsafe fn setContentTintColor(&self, content_tint_color: Option<&NSColor>);

#[cfg(feature = "AppKit_NSImage")]
#[method_id(@__retain_semantics Other image)]
pub unsafe fn image(&self) -> Option<Id<NSImage>>;
Expand Down Expand Up @@ -246,22 +262,6 @@ extern_methods!(
symbol_configuration: Option<&NSImageSymbolConfiguration>,
);

#[cfg(feature = "AppKit_NSColor")]
#[method_id(@__retain_semantics Other bezelColor)]
pub unsafe fn bezelColor(&self) -> Option<Id<NSColor>>;

#[cfg(feature = "AppKit_NSColor")]
#[method(setBezelColor:)]
pub unsafe fn setBezelColor(&self, bezel_color: Option<&NSColor>);

#[cfg(feature = "AppKit_NSColor")]
#[method_id(@__retain_semantics Other contentTintColor)]
pub unsafe fn contentTintColor(&self) -> Option<Id<NSColor>>;

#[cfg(feature = "AppKit_NSColor")]
#[method(setContentTintColor:)]
pub unsafe fn setContentTintColor(&self, content_tint_color: Option<&NSColor>);

#[method(state)]
pub unsafe fn state(&self) -> NSControlStateValue;

Expand Down
Loading

0 comments on commit 19561a8

Please sign in to comment.