#[repr(C)]pub struct CTRunDelegate { /* private fields */ }CTRunDelegate only.Expand description
Implementations§
Source§impl CTRunDelegate
impl CTRunDelegate
Sourcepub unsafe fn new(
callbacks: NonNull<CTRunDelegateCallbacks>,
ref_con: *mut c_void,
) -> Option<CFRetained<CTRunDelegate>>
pub unsafe fn new( callbacks: NonNull<CTRunDelegateCallbacks>, ref_con: *mut c_void, ) -> Option<CFRetained<CTRunDelegate>>
Creates an immutable instance of a run delegate.
This function creates an immutable instance of a run delegate that can be used for reserving space in a line or for eliding the glyphs for a range of text altogether.
Parameter callbacks: The callbacks for this run delegate.
Returns: If run delegate creation was successful, this function will return a valid reference to an immutable CTRunDelegate object. Otherwise, this function will return NULL.
Sourcepub unsafe fn ref_con(self: &CTRunDelegate) -> NonNull<c_void>
pub unsafe fn ref_con(self: &CTRunDelegate) -> NonNull<c_void>
Returns a run delegate’s refCon value.
This function returns the refCon value that a run delegate was created with.
Parameter runDelegate: The run delegate to be queried.
Returns: The refCon value of the supplied run delegate.
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Attempt to downcast the type to that of type T.
This is the reference-variant. Use CFRetained::downcast if you
want to convert a retained type. See also ConcreteType for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumbers, small CFStrings etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for CTRunDelegate
impl AsRef<AnyObject> for CTRunDelegate
Source§impl AsRef<CFType> for CTRunDelegate
impl AsRef<CFType> for CTRunDelegate
Source§impl AsRef<CTRunDelegate> for CTRunDelegate
impl AsRef<CTRunDelegate> for CTRunDelegate
Source§impl Borrow<AnyObject> for CTRunDelegate
impl Borrow<AnyObject> for CTRunDelegate
Source§impl Borrow<CFType> for CTRunDelegate
impl Borrow<CFType> for CTRunDelegate
Source§impl ConcreteType for CTRunDelegate
impl ConcreteType for CTRunDelegate
Source§impl Debug for CTRunDelegate
impl Debug for CTRunDelegate
Source§impl Deref for CTRunDelegate
impl Deref for CTRunDelegate
Source§impl Hash for CTRunDelegate
impl Hash for CTRunDelegate
Source§impl Message for CTRunDelegate
impl Message for CTRunDelegate
Source§impl PartialEq for CTRunDelegate
impl PartialEq for CTRunDelegate
Source§impl RefEncode for CTRunDelegate
impl RefEncode for CTRunDelegate
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for CTRunDelegate
impl Type for CTRunDelegate
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
core-foundation crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
core-foundation crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read more