pub struct Pasteboard { /* private fields */ }HIServices and Pasteboard only.Expand description
Implementations§
Source§impl Pasteboard
impl Pasteboard
Sourcepub unsafe fn create(
in_name: Option<&CFString>,
out_pasteboard: NonNull<*mut Pasteboard>,
) -> u32
pub unsafe fn create( in_name: Option<&CFString>, out_pasteboard: NonNull<*mut Pasteboard>, ) -> u32
§Safety
out_pasteboard must be a valid pointer.
pub unsafe fn synchronize(&self) -> PasteboardSyncFlags
pub unsafe fn clear(&self) -> u32
Sourcepub unsafe fn copy_name(&self, out_name: NonNull<*const CFString>) -> u32
pub unsafe fn copy_name(&self, out_name: NonNull<*const CFString>) -> u32
§Safety
out_name must be a valid pointer.
Sourcepub unsafe fn item_count(&self, out_item_count: NonNull<c_ulong>) -> u32
pub unsafe fn item_count(&self, out_item_count: NonNull<c_ulong>) -> u32
§Safety
out_item_count must be a valid pointer.
Sourcepub unsafe fn item_identifier(
&self,
in_index: CFIndex,
out_item: NonNull<PasteboardItemID>,
) -> u32
pub unsafe fn item_identifier( &self, in_index: CFIndex, out_item: NonNull<PasteboardItemID>, ) -> u32
§Safety
out_item must be a valid pointer.
Sourcepub unsafe fn copy_item_flavors(
&self,
in_item: PasteboardItemID,
out_flavor_types: NonNull<*const CFArray>,
) -> u32
pub unsafe fn copy_item_flavors( &self, in_item: PasteboardItemID, out_flavor_types: NonNull<*const CFArray>, ) -> u32
§Safety
in_itemmust be a valid pointer.out_flavor_typesmust be a valid pointer.
Sourcepub unsafe fn item_flavor_flags(
&self,
in_item: PasteboardItemID,
in_flavor_type: &CFString,
out_flags: NonNull<PasteboardFlavorFlags>,
) -> u32
pub unsafe fn item_flavor_flags( &self, in_item: PasteboardItemID, in_flavor_type: &CFString, out_flags: NonNull<PasteboardFlavorFlags>, ) -> u32
§Safety
in_itemmust be a valid pointer.out_flagsmust be a valid pointer.
Sourcepub unsafe fn copy_item_flavor_data(
&self,
in_item: PasteboardItemID,
in_flavor_type: &CFString,
out_data: NonNull<*const CFData>,
) -> u32
pub unsafe fn copy_item_flavor_data( &self, in_item: PasteboardItemID, in_flavor_type: &CFString, out_data: NonNull<*const CFData>, ) -> u32
§Safety
in_itemmust be a valid pointer.out_datamust be a valid pointer.
Sourcepub unsafe fn put_item_flavor(
&self,
in_item: PasteboardItemID,
in_flavor_type: &CFString,
in_data: Option<&CFData>,
in_flags: PasteboardFlavorFlags,
) -> u32
pub unsafe fn put_item_flavor( &self, in_item: PasteboardItemID, in_flavor_type: &CFString, in_data: Option<&CFData>, in_flags: PasteboardFlavorFlags, ) -> u32
§Safety
in_item must be a valid pointer.
Sourcepub unsafe fn copy_paste_location(
&self,
out_paste_location: NonNull<*const CFURL>,
) -> u32
pub unsafe fn copy_paste_location( &self, out_paste_location: NonNull<*const CFURL>, ) -> u32
§Safety
out_paste_location must be a valid pointer.
pub unsafe fn set_paste_location(&self, in_paste_location: &CFURL) -> u32
Source§impl Pasteboard
impl Pasteboard
Sourcepub unsafe fn set_promise_keeper(
&self,
in_promise_keeper: PasteboardPromiseKeeperProcPtr,
in_context: *mut c_void,
) -> u32
pub unsafe fn set_promise_keeper( &self, in_promise_keeper: PasteboardPromiseKeeperProcPtr, in_context: *mut c_void, ) -> u32
§Safety
in_promise_keepermust be implemented correctly.in_contextmust be a valid pointer or null.
pub unsafe fn resolve_promises(&self) -> u32
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 Pasteboard
impl AsRef<AnyObject> for Pasteboard
Source§impl AsRef<CFType> for Pasteboard
impl AsRef<CFType> for Pasteboard
Source§impl AsRef<Pasteboard> for Pasteboard
impl AsRef<Pasteboard> for Pasteboard
Source§impl Borrow<AnyObject> for Pasteboard
impl Borrow<AnyObject> for Pasteboard
Source§impl Borrow<CFType> for Pasteboard
impl Borrow<CFType> for Pasteboard
Source§impl ConcreteType for Pasteboard
impl ConcreteType for Pasteboard
Source§impl Debug for Pasteboard
impl Debug for Pasteboard
Source§impl Deref for Pasteboard
impl Deref for Pasteboard
Source§impl Hash for Pasteboard
impl Hash for Pasteboard
Source§impl Message for Pasteboard
impl Message for Pasteboard
Source§impl PartialEq for Pasteboard
impl PartialEq for Pasteboard
Source§impl RefEncode for Pasteboard
impl RefEncode for Pasteboard
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for Pasteboard
impl Type for Pasteboard
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
this is redundant
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,
use CFRetained::retain
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
this is redundant (CF types deref to 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,
use CFRetained::from_raw
core-foundation crate. Read more