### quickLookPreviewItems Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/trait.NSStandardKeyBindingResponding.html This method is used to get the preview items for quick look. ```rust unsafe fn quickLookPreviewItems(&self, sender: Option<&AnyObject>) where Self: Sized + Message, ``` -------------------------------- ### Getting Content Type of a URL Pasteboard Item Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPasteboardItem.html Example of iterating over pasteboard items and getting the content type if the item is a URL. ```objective-c NSArray *items = NSPasteboard.generalPasteboard.pasteboardItems; __block NSUInteger idx = 0; for (NSPasteboardItem *item in items) { NSUInteger itemIndex = idx++; [item detectMetadataForTypes:[NSSet setWithArray: @[NSPasteboardMetadataTypeContentType]] completionHandler:^(NSDictionary *metadata, NSError *error) { if (error) { NSLog("Item %lu - Error: %@", itemIndex, error); return; } UTType *contentType = (UTType*)metadata[NSPasteboardMetadataTypeContentType]; if (contentType) { NSLog("Item %lu - Content type is: %@", itemIndex, contentType.identifier); } else { NSLog("Item %lu - Couldn't get content type", itemIndex); } }]; } ``` -------------------------------- ### showHelp Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSApplication.html Shows the help system. ```rust pub unsafe fn showHelp(&self, sender: Option<&AnyObject>) ``` -------------------------------- ### Try From Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSDocumentController.html Performs the conversion. ```rust fn try_from(value: U) -> Result>::Error> ``` -------------------------------- ### Get item associated with anchor example Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSLayoutAnchor.html Retrieves the object associated with the layout anchor. ```rust pub fn item(&self) -> Option> ``` -------------------------------- ### Try Into Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSDocumentController.html Performs the conversion. ```rust fn try_into(self) -> Result>::Error> ``` -------------------------------- ### Get constraints affecting layout example Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSLayoutAnchor.html Retrieves all layout constraints that affect the layout of this anchor. ```rust pub fn constraintsAffectingLayout( &self, ) -> Retained> ``` -------------------------------- ### initWithContentRect_styleMask_backing_defer_screen Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPanel.html Initializes a new NSPanel with content rect, style mask, backing store type, defer flag, and screen. ```rust pub fn initWithContentRect_styleMask_backing_defer_screen( this: Allocated, content_rect: NSRect, style: NSWindowStyleMask, backing_store_type: NSBackingStoreType, flag: bool, screen: Option<&NSScreen>, ) -> Retained ``` -------------------------------- ### layoutGuideForLayoutRegion Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSScrollView.html Gets the layout guide for a layout region. Available on `NSViewLayoutRegion` and `NSLayoutGuide` crate features only. ```rust pub fn layoutGuideForLayoutRegion( &self, layout_region: &NSViewLayoutRegion, ) -> Retained ``` -------------------------------- ### Getting the sheet parent window Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSWindow.html Returns the window that the sheet is directly attached to. This is based on the logical attachment of the sheet, not visual attachment. This relationship exists starting when the sheet is begun, and ending once it is ordered out. Returns nil if the window is not a sheet or has no sheet parent. ```swift pub fn sheetParent(&self) -> Option> ``` -------------------------------- ### prepareContent Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSArrayController.html Prepares the controller's content. ```rust pub fn prepareContent(&self) ``` -------------------------------- ### Getting window numbers with options Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSWindow.html `+windowNumbersWithOptions:` returns an autoreleased array of `NSNumbers`containing windowNumbers for all visible windows satisfying options. If no options are specified, only visible windows belonging to the calling application and on the active space are included. If options include `NSWindowNumberListAllApplications,`visible windows belonging to all applications are included. If options include `NSWindowNumberListAllSpaces,`visible windows on all spaces are included. Windows on the active space are returned in z-order. Examples: To get an array of windowNumbers visible on the current space and belonging to the calling application: `windowNumbers = [NSWindow windowNumbersWithOptions:0];` To get an array of windowNumbers visible on any space and belonging to any application: `windowNumbers = [NSWindow windowNumbersWithOptions:NSWindowNumberListAllApplications|NSWindowNumberListAllSpaces];` To get an array of windowNumbers visible on any space and belonging to the calling application: `windowNumbers = [NSWindow windowNumbersWithOptions:NSWindowNumberListAllSpaces];` ```swift pub fn windowNumbersWithOptions( options: NSWindowNumberListOptions, mtm: MainThreadMarker, ) -> Option>> ``` -------------------------------- ### initWithTitle_action_keyEquivalent Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSMenuItem.html Initializes a new NSMenuItem with a title, action, and key equivalent. ```rust pub unsafe fn initWithTitle_action_keyEquivalent( this: Allocated, string: &NSString, selector: Option, char_code: &NSString, ) -> Retained ``` -------------------------------- ### performWindowDragWithEvent Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPanel.html Call to start a drag (moving the window) in the Window Server process. In general, this can be done after a mouseDown event has come in and been examined by an application or view. The view may determine it wants to allow that portion of the window to start a window drag, and can hand off the work to the Window Server process by calling this method. This allows the window to participate in space switching, and other system features. Pass the original mouseDown event to the method. The method will return right away, and a mouseUp may not get sent. ```rust pub fn performWindowDragWithEvent(&self, event: &NSEvent) ``` -------------------------------- ### mergeAllWindows Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPanel.html Merges all windows into one. ```rust pub fn mergeAllWindows(&self, sender: Option<&AnyObject>) ``` -------------------------------- ### NSTrackingArea::new example Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSTrackingArea.html Example of creating a new NSTrackingArea instance. ```rust use objc2::runtime::NSObject; let obj = NSObject::new(); assert_eq!(obj.class(), NSObject::class()); ``` -------------------------------- ### initWithContentRect_styleMask_backing_defer Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPanel.html Initializes a new NSPanel with content rect, style mask, backing store type, and defer flag. ```rust pub fn initWithContentRect_styleMask_backing_defer( this: Allocated, content_rect: NSRect, style: NSWindowStyleMask, backing_store_type: NSBackingStoreType, flag: bool, ) -> Retained ``` -------------------------------- ### ActivateAllWindows Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSApplicationActivationOptions.html By default, activation brings only the main and key windows forward. If you specify `activateAllWindows`, all of the application’s windows are brought forward. ```rust pub const ActivateAllWindows: Self ``` -------------------------------- ### Get bits value Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSVerticalDirections.html Get the underlying bits value. ```rust impl Flags for NSVerticalDirections { fn bits(&self) -> NSUInteger { } } ``` -------------------------------- ### initWithContent Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSArrayController.html Initializes the controller with the specified content. ```rust pub unsafe fn initWithContent( this: Allocated, content: Option<&AnyObject>, ) -> Retained ``` -------------------------------- ### Layout Margins Guide Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSScrubberSelectionView.html Returns the layout guide for the layout margins of the view. ```rust pub fn layoutMarginsGuide(&self) -> Retained ``` -------------------------------- ### postEvent_atStart Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSFontPanel.html Source ```rust pub fn postEvent_atStart(&self, event: &NSEvent, flag: bool) Available on **crate feature`NSEvent`** only. ``` -------------------------------- ### Set Location for Start of Glyph Range Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSLayoutManager.html Sets the location for the start of a glyph range. ```rust pub fn setLocation_forStartOfGlyphRange( &self, location: NSPoint, glyph_range: NSRange, ) ``` -------------------------------- ### Safe Area Layout Guide Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSScrubberSelectionView.html Returns the layout guide for the safe area of the view. ```rust pub fn safeAreaLayoutGuide(&self) -> Retained ``` -------------------------------- ### NSSpeechPhonemeInfoHiliteStart Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/static.NSSpeechPhonemeInfoHiliteStart.html Static NSSpeechPhonemeInfoHiliteStart Copy item path ```rust pub unsafe static NSSpeechPhonemeInfoHiliteStart: &'static NSSpeechPhonemeInfoKey ``` -------------------------------- ### initWithSnapshotImage:presentationFrame: Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSTextPreview.html Creates a text preview using the specified image. ```rust pub unsafe fn initWithSnapshotImage_presentationFrame( this: Allocated, snapshot_image: &CGImage, presentation_frame: NSRect, ) -> Retained ``` -------------------------------- ### Set or get selection of individual subitems Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSToolbarItemGroup.html Get and set selection of individual subitems of the group item. ```rust pub fn setSelected_atIndex(&self, selected: bool, index: NSInteger) ``` -------------------------------- ### Example of checking the class of an NSObject Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSActionCell.html This example demonstrates how to dynamically find the class of an object using the `class()` method. ```Rust use objc2::ClassType; use objc2::runtime::NSObject; let obj = NSObject::new(); assert_eq!(obj.class(), NSObject::class()); ``` -------------------------------- ### activateContextHelpMode Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSApplication.html Activates context help mode. ```rust pub unsafe fn activateContextHelpMode(&self, sender: Option<&AnyObject>) ``` -------------------------------- ### NSTextList init with marker format, options, and starting item number Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSTextList.html Initializes an NSTextList with a marker format, options, and a starting item number. ```rust pub fn initWithMarkerFormat_options_startingItemNumber( this: Allocated, marker_format: &NSTextListMarkerFormat, options: NSTextListOptions, starting_item_number: NSInteger, ) -> Retained ``` -------------------------------- ### initWithIdentifier_source_destination Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSStoryboardSegue.html Initializes a new NSStoryboardSegue. ```rust pub unsafe fn initWithIdentifier_source_destination( this: Allocated, identifier: &NSStoryboardSegueIdentifier, source_controller: &AnyObject, destination_controller: &AnyObject, ) -> Retained ``` -------------------------------- ### orderedWindows Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSApplication.html Returns an array of the application's ordered windows. ```rust pub fn orderedWindows(&self) -> Retained> ``` -------------------------------- ### color Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSColorPickerTouchBarItem.html Gets the current color. ```rust pub fn color(&self) -> Retained ``` -------------------------------- ### delegate Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSTextView.html Gets the delegate of NSTextView. ```rust pub unsafe fn delegate( &self, ) -> Option>> ``` -------------------------------- ### initWithNibData_bundle Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSNib.html Initializes a new NSNib instance with nib data and a bundle. ```Rust pub fn initWithNibData_bundle( this: Allocated, nib_data: &NSData, bundle: Option<&NSBundle>, ) -> Retained ``` -------------------------------- ### identifier Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSTabViewItem.html Gets the identifier for the NSTabViewItem. ```rust pub fn identifier(&self) -> Option> ``` -------------------------------- ### initWithSnapshotImage:presentationFrame:candidateRects: Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSTextPreview.html Creates a text preview using the specified image and rectangles that indicate the portions of text to highlight. ```rust pub unsafe fn initWithSnapshotImage_presentationFrame_candidateRects( this: Allocated, snapshot_image: &CGImage, presentation_frame: NSRect, candidate_rects: &NSArray, ) -> Retained ``` -------------------------------- ### NSImageNameTouchBarRecordStartTemplate Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/static.NSImageNameTouchBarRecordStartTemplate.html Static NSImageNameTouchBarRecordStartTemplate ```rust pub unsafe static NSImageNameTouchBarRecordStartTemplate: &'static NSImageName ``` -------------------------------- ### subtitle Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPanel.html Gets the subtitle of the panel. ```rust pub fn subtitle(&self) -> Retained ``` -------------------------------- ### attributedString Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSATSTypesetter.html Gets the attributed string. ```rust pub unsafe fn attributedString(&self) -> Option> ``` -------------------------------- ### orderFrontStandardAboutPanelWithOptions Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSApplication.html Source ```rust pub unsafe fn orderFrontStandardAboutPanelWithOptions( &self, options_dictionary: &NSDictionary, ) ``` -------------------------------- ### NSLeftMouseUpMask Summary Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/static.NSLeftMouseUpMask.html Summary of the static NSLeftMouseUpMask. ```rust pub static NSLeftMouseUpMask: NSEventMask ``` -------------------------------- ### hyphenationFactor Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSATSTypesetter.html Gets the hyphenation factor. ```rust pub fn hyphenationFactor(&self) -> c_float ``` -------------------------------- ### selectPreviousKeyView Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPanel.html Selects the previous key view. ```rust pub fn selectPreviousKeyView(&self, sender: Option<&AnyObject>) ``` -------------------------------- ### typesetterBehavior Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSATSTypesetter.html Gets the typesetter behavior. ```rust pub fn typesetterBehavior(&self) -> NSTypesetterBehavior ``` -------------------------------- ### startSpeaking Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSTextView.html Starts speech output. ```rust pub unsafe fn startSpeaking(&self, sender: Option<&AnyObject>) ``` -------------------------------- ### contextMenuKeyDown Method Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSBrowser.html Handles a key event that should present a context menu at the user focus. This method is generally not meant to be overridden, but provides guidance on how to do so if custom behavior is required. ```rust pub fn contextMenuKeyDown(&self, event: &NSEvent) Available on **crate feature`NSEvent`** only. Handle a key event that should present a context menu at the user focus. Most applications should not override this method. Instead, you should customize the context menu displayed from a keyboard event by implementing `menuForEvent:` and `selectionAnchorRect`, or `showContextMenuForSelection:`, rather than this method. You should only override this method when you do not want the system-provided default behavior for the context menu hotkey, either for a specific key combination, or for the hotkey in general. For example, if your application already provides a different behavior for control-Return (the default context menu hotkey definition), and you want to preserve that behavior, you should override this method to handle that specific key combination, and then return without calling `super`. Note that the user may customize the hotkey to a different key combination, so in this example, if any other key combination is passed to your method, you would call `super`. An implementation of this method should call `[super contextMenuKeyDown:event]` to pass the request up the responder chain. If the message reaches the application object, NSApplication’s implementation of this method will send `showContextMenuForSelection:` to the responder chain. If you do not call `super`, then no further handling of the key event will be performed. Note: In some cases, `showContextMenuForSelection:` will be called without a prior call to `contextMenuKeyDown:`. This occurs when a view receives an Accessibility ShowMenu action, or when the user has created a Cocoa Text key binding to map a different key combination to the `showContextMenuForSelection:` action. Parameter `event`: The key down event that matches the system-wide context menu hotkey combination. See also: `showContextMenuForSelection:` ``` -------------------------------- ### Examples Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSScrubber.html Try to cast to an array of strings. ```rust use objc2_foundation::{NSArray, NSObject, NSString}; let arr = NSArray::from_retained_slice(&[NSObject::new()]); // This is invalid and doesn't type check. let arr = arr.downcast_ref::>(); ``` -------------------------------- ### postEvent_atStart Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSOpenPanel.html Posts an event to the event stream, optionally at the beginning. ```rust pub fn postEvent_atStart(&self, event: &NSEvent, flag: bool) Available on **crate feature`NSEvent`** only. Source ``` -------------------------------- ### Getting the occlusion state Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSWindow.html Source ```swift pub fn occlusionState(&self) -> NSWindowOcclusionState ``` -------------------------------- ### NSDeviceBitsPerSample Summary Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/static.NSDeviceBitsPerSample.html Summary of the static NSDeviceBitsPerSample. ```rust pub unsafe static NSDeviceBitsPerSample: &'static NSDeviceDescriptionKey ``` -------------------------------- ### selectNextKeyView Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPanel.html Selects the next key view. ```rust pub fn selectNextKeyView(&self, sender: Option<&AnyObject>) ``` -------------------------------- ### Getting child windows Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSWindow.html Source ```swift pub fn childWindows(&self) -> Option>> ``` -------------------------------- ### string Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSTextView.html Gets the string content of NSTextView. ```rust pub fn string(&self) -> Retained ``` -------------------------------- ### NSCompositeXOR Summary Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/static.NSCompositeXOR.html Static NSCompositeXOR Copy item path. ```rust pub static NSCompositeXOR: NSCompositingOperation ``` -------------------------------- ### tabState Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSTabViewItem.html Gets the tab state of the NSTabViewItem. ```rust pub fn tabState(&self) -> NSTabState ``` -------------------------------- ### selectKeyViewPrecedingView Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPanel.html Selects the key view preceding the specified view. ```rust pub fn selectKeyViewPrecedingView(&self, view: &NSView) ``` -------------------------------- ### titleVisibility Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPanel.html Gets the title visibility of the panel. ```rust pub fn titleVisibility(&self) -> NSWindowTitleVisibility ``` -------------------------------- ### ok Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSSavePanel.html Handles the OK action for the panel. ```rust pub unsafe fn ok(&self, sender: Option<&AnyObject>) ``` -------------------------------- ### numberOfOptions Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPickerTouchBarItem.html Gets the number of options. ```rust pub fn numberOfOptions(&self) -> NSInteger ``` -------------------------------- ### initWithContentRect_styleMask_backing_defer_screen Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSFontPanel.html Initializes a new NSFontPanel with specified parameters and an optional screen. ```rust pub unsafe fn initWithContentRect_styleMask_backing_defer_screen( this: Allocated, content_rect: NSRect, style: NSWindowStyleMask, backing_store_type: NSBackingStoreType, flag: bool, screen: Option<&NSScreen>, ) -> Retained ``` -------------------------------- ### selectionMode Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPickerTouchBarItem.html Gets the selection mode. ```rust pub fn selectionMode(&self) -> NSPickerTouchBarItemSelectionMode ``` -------------------------------- ### selectedIndex Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSPickerTouchBarItem.html Gets the selected index. ```rust pub fn selectedIndex(&self) -> NSInteger ``` -------------------------------- ### NSFontPboard Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/static.NSFontPboard.html Static NSFontPboard Copy item path ```rust pub unsafe static NSFontPboard: &'static NSPasteboardName ``` -------------------------------- ### initWithContentsOfURL Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSNib.html Initializes a new NSNib instance from contents of a URL. Deprecated. ```Rust pub unsafe fn initWithContentsOfURL( this: Allocated, nib_file_url: Option<&NSURL>, ) -> Option> ``` -------------------------------- ### subtitle Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSMenuItem.html Gets the subtitle of the menu item. ```rust pub fn subtitle(&self) -> Option> ``` -------------------------------- ### parentItem Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSMenuItem.html Gets the parent menu item. ```rust pub unsafe fn parentItem(&self) -> Option> ``` -------------------------------- ### Initialization Methods Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/type.NSAboutPanelOptionKey.html Various methods for initializing an NSString instance from different data types and encodings. ```rust pub unsafe fn initWithCharacters_length( this: Allocated, characters: NonNull, length: usize, ) -> Retained ``` ```rust pub unsafe fn initWithUTF8String( this: Allocated, null_terminated_c_string: NonNull, ) -> Option> ``` ```rust pub fn initWithString( this: Allocated, a_string: &NSString, ) -> Retained ``` ```rust pub fn initWithData_encoding( this: Allocated, data: &NSData, encoding: usize, ) -> Option> ``` ```rust pub unsafe fn initWithBytes_length_encoding( this: Allocated, bytes: NonNull, len: usize, encoding: usize, ) -> Option> ``` ```rust pub unsafe fn initWithBytesNoCopy_length_encoding_freeWhenDone( this: Allocated, bytes: NonNull, len: usize, encoding: usize, free_buffer: bool, ) -> Option> ``` ```rust pub unsafe fn initWithCString_encoding( this: Allocated, null_terminated_c_string: NonNull, encoding: usize, ) -> Option> ``` ```rust pub fn initWithContentsOfURL_encoding_error( this: Allocated, url: &NSURL, enc: usize, ) -> Result, Retained> ``` ```rust pub fn initWithContentsOfFile_encoding_error( this: Allocated, path: &NSString, enc: usize, ) -> Result, Retained> ``` ```rust pub unsafe fn initWithContentsOfURL_usedEncoding_error( this: Allocated, url: &NSURL, enc: *mut usize, ) -> Result, Retained> ``` ```rust pub unsafe fn initWithContentsOfFile_usedEncoding_error( this: Allocated, path: &NSString, enc: *mut usize, ) -> Result, Retained> ``` -------------------------------- ### orderFrontStandardAboutPanel Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSApplication.html Source ```rust pub fn orderFrontStandardAboutPanel(&self, sender: Option<&AnyObject>) ``` -------------------------------- ### submenu Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSMenuItem.html Gets the submenu of this menu item. ```rust pub fn submenu(&self) -> Option> ``` -------------------------------- ### name Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSImage.html Gets the name of the NSImage. ```rust pub fn name(&self) -> Option> ``` -------------------------------- ### NSMiterLineJoinStyle Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/static.NSMiterLineJoinStyle.html Static NSMiterLineJoinStyle ```rust pub static NSMiterLineJoinStyle: NSLineJoinStyle ``` -------------------------------- ### NSMenuItemBadge::initWithString Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSMenuItemBadge.html Initializes the badge with the provided custom string. ```rust pub fn initWithString( this: Allocated, string: &NSString, ) -> Retained ``` -------------------------------- ### allowedColorSpaces Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSColorPickerTouchBarItem.html Gets the allowed color spaces for the picker. ```rust pub fn allowedColorSpaces(&self) -> Option>> ``` -------------------------------- ### currentTextContainer Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSATSTypesetter.html Gets the current text container. ```rust pub unsafe fn currentTextContainer(&self) -> Option> ``` -------------------------------- ### NSLeftMouseDown Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/static.NSLeftMouseDown.html Static NSLeftMouseDown Copy item path ```rust pub static NSLeftMouseDown: NSEventType ``` -------------------------------- ### NSOptionsKey Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/static.NSOptionsKey.html Static NSOptionsKey Copy item path ```rust pub unsafe static NSOptionsKey: &'static NSBindingInfoKey ``` -------------------------------- ### paragraphGlyphRange Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSATSTypesetter.html Gets the paragraph glyph range. ```rust pub fn paragraphGlyphRange(&self) -> NSRange ``` -------------------------------- ### newWindowForTab Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSBackgroundExtensionView.html Creates a new window for a tab. This method is unsafe and requires `sender` to be of the correct type. ```rust pub unsafe fn newWindowForTab(&self, sender: Option<&AnyObject>) ``` -------------------------------- ### lineFragmentPadding Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSATSTypesetter.html Gets the line fragment padding. ```rust pub fn lineFragmentPadding(&self) -> CGFloat ``` -------------------------------- ### NSVisualEffectView blendingMode method Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSVisualEffectView.html Gets the blending mode for the NSVisualEffectView. ```rust pub fn blendingMode(&self) -> NSVisualEffectBlendingMode ``` -------------------------------- ### NSWebPreferencesDocumentOption Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/static.NSWebPreferencesDocumentOption.html Static NSWebPreferencesDocumentOption Copy item path ```rust pub unsafe static NSWebPreferencesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey ``` -------------------------------- ### NSVisualEffectView interiorBackgroundStyle method Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSVisualEffectView.html Gets the NSBackgroundStyle that matches the material. ```rust pub fn interiorBackgroundStyle(&self) -> NSBackgroundStyle ``` -------------------------------- ### String Creation Methods Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/type.NSAboutPanelOptionKey.html Static methods for creating NSString instances. ```rust pub fn string() -> Retained ``` ```rust pub fn stringWithString(string: &NSString) -> Retained ``` ```rust pub unsafe fn stringWithCharacters_length( characters: NonNull, length: usize, ) -> Retained ``` ```rust pub unsafe fn stringWithUTF8String( null_terminated_c_string: NonNull, ) -> Option> ``` ```rust pub unsafe fn stringWithCString_encoding( c_string: NonNull, enc: usize, ) -> Option> ``` ```rust pub fn stringWithContentsOfURL_encoding_error( url: &NSURL, enc: usize, ) -> Result, Retained> ``` ```rust pub fn stringWithContentsOfFile_encoding_error( path: &NSString, enc: usize, ) -> Result, Retained> ``` ```rust pub unsafe fn stringWithContentsOfURL_usedEncoding_error( url: &NSURL, enc: *mut usize, ) -> Result, Retained> ``` ```rust pub unsafe fn stringWithContentsOfFile_usedEncoding_error( path: &NSString, enc: *mut usize, ) -> Result, Retained> ``` -------------------------------- ### beginModalSessionForWindow_relativeToWindow Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSApplication.html Starts a modal session for the given window. Deprecated: Use -[NSWindow beginSheet:completionHandler:] instead. ```rust pub unsafe fn beginModalSessionForWindow_relativeToWindow( &self, window: Option<&NSWindow>, doc_window: Option<&NSWindow>, ) -> NSModalSession ``` -------------------------------- ### NSVisualEffectView material method Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSVisualEffectView.html Gets the material shown by the NSVisualEffectView. ```rust pub fn material(&self) -> NSVisualEffectMaterial ``` -------------------------------- ### runPageLayout Source: https://docs.rs/objc2-app-kit/latest/objc2_app_kit/struct.NSApplication.html Runs the page layout panel. ```rust pub unsafe fn runPageLayout(&self, sender: Option<&AnyObject>) ```