#[repr(C)]pub struct IOSurfaceRef { /* private fields */ }
Available on crate feature
IOSurfaceRef
only.Expand description
Implementations§
Source§impl IOSurfaceRef
impl IOSurfaceRef
pub unsafe fn new(properties: &CFDictionary) -> Option<CFRetained<IOSurfaceRef>>
Available on crate feature
objc2-core-foundation
only.pub fn lookup(csid: IOSurfaceID) -> Option<CFRetained<IOSurfaceRef>>
Available on crate features
IOSurfaceTypes
and objc2-core-foundation
only.pub fn id(self: &IOSurfaceRef) -> IOSurfaceID
Available on crate feature
IOSurfaceTypes
only.pub unsafe fn lock( self: &IOSurfaceRef, options: IOSurfaceLockOptions, seed: *mut u32, ) -> kern_return_t
Available on crate features
IOSurfaceTypes
and libc
only.pub unsafe fn unlock( self: &IOSurfaceRef, options: IOSurfaceLockOptions, seed: *mut u32, ) -> kern_return_t
Available on crate features
IOSurfaceTypes
and libc
only.pub fn alloc_size(self: &IOSurfaceRef) -> usize
pub fn width(self: &IOSurfaceRef) -> usize
pub fn height(self: &IOSurfaceRef) -> usize
pub fn bytes_per_element(self: &IOSurfaceRef) -> usize
pub fn bytes_per_row(self: &IOSurfaceRef) -> usize
pub fn base_address(self: &IOSurfaceRef) -> NonNull<c_void>
pub fn element_width(self: &IOSurfaceRef) -> usize
pub fn element_height(self: &IOSurfaceRef) -> usize
pub fn pixel_format(self: &IOSurfaceRef) -> u32
pub fn seed(self: &IOSurfaceRef) -> u32
pub fn plane_count(self: &IOSurfaceRef) -> usize
pub fn width_of_plane(self: &IOSurfaceRef, plane_index: usize) -> usize
pub fn height_of_plane(self: &IOSurfaceRef, plane_index: usize) -> usize
pub fn bytes_per_element_of_plane( self: &IOSurfaceRef, plane_index: usize, ) -> usize
pub fn bytes_per_row_of_plane(self: &IOSurfaceRef, plane_index: usize) -> usize
pub fn base_address_of_plane( self: &IOSurfaceRef, plane_index: usize, ) -> NonNull<c_void>
pub fn element_width_of_plane(self: &IOSurfaceRef, plane_index: usize) -> usize
pub fn element_height_of_plane(self: &IOSurfaceRef, plane_index: usize) -> usize
pub fn number_of_components_of_plane( self: &IOSurfaceRef, plane_index: usize, ) -> usize
pub fn name_of_component_of_plane( self: &IOSurfaceRef, plane_index: usize, component_index: usize, ) -> IOSurfaceComponentName
pub fn type_of_component_of_plane( self: &IOSurfaceRef, plane_index: usize, component_index: usize, ) -> IOSurfaceComponentType
pub fn range_of_component_of_plane( self: &IOSurfaceRef, plane_index: usize, component_index: usize, ) -> IOSurfaceComponentRange
pub fn bit_depth_of_component_of_plane( self: &IOSurfaceRef, plane_index: usize, component_index: usize, ) -> usize
pub fn bit_offset_of_component_of_plane( self: &IOSurfaceRef, plane_index: usize, component_index: usize, ) -> usize
pub fn subsampling(self: &IOSurfaceRef) -> IOSurfaceSubsampling
Source§impl IOSurfaceRef
impl IOSurfaceRef
pub unsafe fn set_value(self: &IOSurfaceRef, key: &CFString, value: &CFType)
Available on crate feature
objc2-core-foundation
only.pub fn value(self: &IOSurfaceRef, key: &CFString) -> Option<CFRetained<CFType>>
Available on crate feature
objc2-core-foundation
only.pub fn remove_value(self: &IOSurfaceRef, key: &CFString)
Available on crate feature
objc2-core-foundation
only.pub unsafe fn set_values(self: &IOSurfaceRef, keys_and_values: &CFDictionary)
Available on crate feature
objc2-core-foundation
only.pub fn all_values(self: &IOSurfaceRef) -> Option<CFRetained<CFDictionary>>
Available on crate feature
objc2-core-foundation
only.pub fn remove_all_values(self: &IOSurfaceRef)
pub fn create_mach_port(self: &IOSurfaceRef) -> mach_port_t
Available on crate feature
libc
only.pub fn lookup_from_mach_port( port: mach_port_t, ) -> Option<CFRetained<IOSurfaceRef>>
Available on crate features
libc
and objc2-core-foundation
only.pub fn property_maximum(property: &CFString) -> usize
Available on crate feature
objc2-core-foundation
only.pub fn property_alignment(property: &CFString) -> usize
Available on crate feature
objc2-core-foundation
only.pub fn align_property(property: &CFString, value: usize) -> usize
Available on crate feature
objc2-core-foundation
only.pub fn increment_use_count(self: &IOSurfaceRef)
pub fn decrement_use_count(self: &IOSurfaceRef)
pub fn use_count(self: &IOSurfaceRef) -> i32
pub fn is_in_use(self: &IOSurfaceRef) -> bool
pub fn allows_pixel_size_casting(self: &IOSurfaceRef) -> bool
pub unsafe fn set_purgeable( self: &IOSurfaceRef, new_state: u32, old_state: *mut u32, ) -> kern_return_t
Available on crate feature
libc
only.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 CFNumber
s, small CFString
s 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 IOSurfaceRef
impl AsRef<AnyObject> for IOSurfaceRef
Source§impl AsRef<CFType> for IOSurfaceRef
impl AsRef<CFType> for IOSurfaceRef
Source§impl AsRef<IOSurfaceRef> for IOSurfaceRef
impl AsRef<IOSurfaceRef> for IOSurfaceRef
Source§impl Borrow<AnyObject> for IOSurfaceRef
impl Borrow<AnyObject> for IOSurfaceRef
Source§impl Borrow<CFType> for IOSurfaceRef
impl Borrow<CFType> for IOSurfaceRef
Source§impl ConcreteType for IOSurfaceRef
Available on crate feature objc2-core-foundation
only.
impl ConcreteType for IOSurfaceRef
Available on crate feature
objc2-core-foundation
only.Source§impl Debug for IOSurfaceRef
impl Debug for IOSurfaceRef
Source§impl Deref for IOSurfaceRef
impl Deref for IOSurfaceRef
Source§impl Hash for IOSurfaceRef
impl Hash for IOSurfaceRef
Source§impl Message for IOSurfaceRef
impl Message for IOSurfaceRef
Source§impl PartialEq for IOSurfaceRef
impl PartialEq for IOSurfaceRef
Source§impl RefEncode for IOSurfaceRef
impl RefEncode for IOSurfaceRef
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
Source§impl Type for IOSurfaceRef
impl Type for IOSurfaceRef
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Increment the reference count of the receiver. Read more
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
👎Deprecated: this is redundant
Helper for easier transition from the
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,
👎Deprecated: use CFRetained::retain
Helper for easier transition from the
core-foundation
crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
👎Deprecated: this is redundant (CF types deref to CFType)
Helper for easier transition from the
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,
👎Deprecated: use CFRetained::from_raw
Helper for easier transition from the
core-foundation
crate. Read moreimpl Eq for IOSurfaceRef
Auto Trait Implementations§
impl !Freeze for IOSurfaceRef
impl !RefUnwindSafe for IOSurfaceRef
impl !Send for IOSurfaceRef
impl !Sync for IOSurfaceRef
impl !Unpin for IOSurfaceRef
impl !UnwindSafe for IOSurfaceRef
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