#[repr(C)]pub struct NSCandidateListTouchBarItem<CandidateType: ?Sized = AnyObject> { /* private fields */ }
Available on crate features
NSCandidateListTouchBarItem
and NSTouchBarItem
only.Implementations§
source§impl<CandidateType: Message> NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: Message> NSCandidateListTouchBarItem<CandidateType>
pub unsafe fn client(&self) -> Option<Id<NSView>>
Available on crate features
NSResponder
and NSTextInputClient
and NSView
only.pub unsafe fn setClient(&self, client: Option<&NSView>)
Available on crate features
NSResponder
and NSTextInputClient
and NSView
only.pub unsafe fn delegate( &self ) -> Option<Id<ProtocolObject<dyn NSCandidateListTouchBarItemDelegate>>>
pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn NSCandidateListTouchBarItemDelegate>> )
pub unsafe fn isCollapsed(&self) -> bool
pub unsafe fn setCollapsed(&self, collapsed: bool)
pub unsafe fn allowsCollapsing(&self) -> bool
pub unsafe fn setAllowsCollapsing(&self, allows_collapsing: bool)
pub unsafe fn isCandidateListVisible(&self) -> bool
pub unsafe fn updateWithInsertionPointVisibility(&self, is_visible: bool)
pub unsafe fn allowsTextInputContextCandidates(&self) -> bool
pub unsafe fn setAllowsTextInputContextCandidates( &self, allows_text_input_context_candidates: bool )
pub unsafe fn attributedStringForCandidate( &self ) -> *mut Block<dyn Fn(NonNull<CandidateType>, NSInteger) -> NonNull<NSAttributedString>>
Available on crate feature
block2
only.pub unsafe fn setAttributedStringForCandidate( &self, attributed_string_for_candidate: Option<&Block<dyn Fn(NonNull<CandidateType>, NSInteger) -> NonNull<NSAttributedString>>> )
Available on crate feature
block2
only.pub unsafe fn candidates(&self) -> Id<NSArray<CandidateType>>
pub unsafe fn setCandidates_forSelectedRange_inString( &self, candidates: &NSArray<CandidateType>, selected_range: NSRange, original_string: Option<&NSString> )
pub unsafe fn customizationLabel(&self) -> Id<NSString>
pub unsafe fn setCustomizationLabel( &self, customization_label: Option<&NSString> )
source§impl<CandidateType: Message> NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: Message> NSCandidateListTouchBarItem<CandidateType>
Methods declared on superclass NSTouchBarItem
pub unsafe fn initWithIdentifier( this: Allocated<Self>, identifier: &NSTouchBarItemIdentifier ) -> Id<Self>
pub unsafe fn initWithCoder( this: Allocated<Self>, coder: &NSCoder ) -> Option<Id<Self>>
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>
source§impl<CandidateType: Message> NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: Message> NSCandidateListTouchBarItem<CandidateType>
Methods declared on superclass NSObject
pub unsafe fn new(mtm: MainThreadMarker) -> Id<Self>
Methods from Deref<Target = NSTouchBarItem>§
pub unsafe fn identifier(&self) -> Id<NSTouchBarItemIdentifier>
pub unsafe fn visibilityPriority(&self) -> NSTouchBarItemPriority
pub unsafe fn setVisibilityPriority( &self, visibility_priority: NSTouchBarItemPriority )
pub unsafe fn view(&self) -> Option<Id<NSView>>
Available on crate features
NSResponder
and NSView
only.pub unsafe fn viewController(&self) -> Option<Id<NSViewController>>
Available on crate features
NSResponder
and NSViewController
only.pub unsafe fn customizationLabel(&self) -> Id<NSString>
pub unsafe fn isVisible(&self) -> bool
Methods from Deref<Target = NSObject>§
sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
sourcepub fn class(&self) -> &'static AnyClass
Available on crate feature NSAccessibilityConstants
only.
pub fn class(&self) -> &'static AnyClass
NSAccessibilityConstants
only.Dynamically find the class of this object.
§Example
Check that an instance of NSObject
has the precise class NSObject
.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());
sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load
instead.Available on crate feature NSAccessibilityConstants
only.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.NSAccessibilityConstants
only.Use Ivar::load
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut
instead.Available on crate feature NSAccessibilityConstants
only.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut
instead.NSAccessibilityConstants
only.Use Ivar::load_mut
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
Trait Implementations§
source§impl<CandidateType: ?Sized + Message> AsMut<AnyObject> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> AsMut<AnyObject> for NSCandidateListTouchBarItem<CandidateType>
source§impl<CandidateType: ?Sized + Message> AsMut<NSCandidateListTouchBarItem<CandidateType>> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> AsMut<NSCandidateListTouchBarItem<CandidateType>> for NSCandidateListTouchBarItem<CandidateType>
source§impl<CandidateType: ?Sized + Message> AsMut<NSObject> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> AsMut<NSObject> for NSCandidateListTouchBarItem<CandidateType>
source§impl<CandidateType: ?Sized + Message> AsMut<NSTouchBarItem> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> AsMut<NSTouchBarItem> for NSCandidateListTouchBarItem<CandidateType>
source§fn as_mut(&mut self) -> &mut NSTouchBarItem
fn as_mut(&mut self) -> &mut NSTouchBarItem
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl<CandidateType: ?Sized + Message> AsRef<AnyObject> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> AsRef<AnyObject> for NSCandidateListTouchBarItem<CandidateType>
source§impl<CandidateType: ?Sized + Message> AsRef<NSCandidateListTouchBarItem<CandidateType>> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> AsRef<NSCandidateListTouchBarItem<CandidateType>> for NSCandidateListTouchBarItem<CandidateType>
source§impl<CandidateType: ?Sized + Message> AsRef<NSObject> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> AsRef<NSObject> for NSCandidateListTouchBarItem<CandidateType>
source§impl<CandidateType: ?Sized + Message> AsRef<NSTouchBarItem> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> AsRef<NSTouchBarItem> for NSCandidateListTouchBarItem<CandidateType>
source§fn as_ref(&self) -> &NSTouchBarItem
fn as_ref(&self) -> &NSTouchBarItem
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<CandidateType: ?Sized + Message> Borrow<AnyObject> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> Borrow<AnyObject> for NSCandidateListTouchBarItem<CandidateType>
source§impl<CandidateType: ?Sized + Message> Borrow<NSObject> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> Borrow<NSObject> for NSCandidateListTouchBarItem<CandidateType>
source§impl<CandidateType: ?Sized + Message> Borrow<NSTouchBarItem> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> Borrow<NSTouchBarItem> for NSCandidateListTouchBarItem<CandidateType>
source§fn borrow(&self) -> &NSTouchBarItem
fn borrow(&self) -> &NSTouchBarItem
Immutably borrows from an owned value. Read more
source§impl<CandidateType: ?Sized + Message> BorrowMut<AnyObject> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> BorrowMut<AnyObject> for NSCandidateListTouchBarItem<CandidateType>
source§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
Mutably borrows from an owned value. Read more
source§impl<CandidateType: ?Sized + Message> BorrowMut<NSObject> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> BorrowMut<NSObject> for NSCandidateListTouchBarItem<CandidateType>
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
source§impl<CandidateType: ?Sized + Message> BorrowMut<NSTouchBarItem> for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> BorrowMut<NSTouchBarItem> for NSCandidateListTouchBarItem<CandidateType>
source§fn borrow_mut(&mut self) -> &mut NSTouchBarItem
fn borrow_mut(&mut self) -> &mut NSTouchBarItem
Mutably borrows from an owned value. Read more
source§impl<CandidateType: ?Sized + Message> ClassType for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> ClassType for NSCandidateListTouchBarItem<CandidateType>
§type Super = NSTouchBarItem
type Super = NSTouchBarItem
The superclass of this class. Read more
§type Mutability = MainThreadOnly
type Mutability = MainThreadOnly
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSCandidateListTouchBarItem"
const NAME: &'static str = "NSCandidateListTouchBarItem"
The name of the Objective-C class that this type represents. Read more
source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
Get a reference to the Objective-C class that this type represents. Read more
source§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
Get a mutable reference to the superclass.
source§impl<CandidateType: ?Sized + Message> DerefMut for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> DerefMut for NSCandidateListTouchBarItem<CandidateType>
source§impl<CandidateType: PartialEq + ?Sized> PartialEq for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: PartialEq + ?Sized> PartialEq for NSCandidateListTouchBarItem<CandidateType>
source§fn eq(&self, other: &NSCandidateListTouchBarItem<CandidateType>) -> bool
fn eq(&self, other: &NSCandidateListTouchBarItem<CandidateType>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<CandidateType: ?Sized + Message> RefEncode for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> RefEncode for NSCandidateListTouchBarItem<CandidateType>
source§const ENCODING_REF: Encoding = <NSTouchBarItem as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSTouchBarItem as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl<CandidateType: Eq + ?Sized> Eq for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + Message> Message for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized + NSCoding> NSCoding for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized> NSObjectProtocol for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType: ?Sized> StructuralPartialEq for NSCandidateListTouchBarItem<CandidateType>
Auto Trait Implementations§
impl<CandidateType = AnyObject> !Freeze for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType = AnyObject> !RefUnwindSafe for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType = AnyObject> !Send for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType = AnyObject> !Sync for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType = AnyObject> !Unpin for NSCandidateListTouchBarItem<CandidateType>
impl<CandidateType = AnyObject> !UnwindSafe for NSCandidateListTouchBarItem<CandidateType>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more