pub struct MetalLayer(/* private fields */);Implementations§
Source§impl MetalLayer
impl MetalLayer
Source§impl MetalLayer
impl MetalLayer
pub fn device(&self) -> Option<&Device>
pub fn preferred_device(&self) -> Option<&Device>
pub fn set_device(&mut self, val: Option<&Device>)
pub fn next_drawable_ar(&self) -> Option<Rar<AnyMetalDrawable>>
pub fn next_drawable(&self) -> Option<R<AnyMetalDrawable>>
Sourcepub fn pixel_format(&self) -> PixelFormat
pub fn pixel_format(&self) -> PixelFormat
This property controls the pixel format of the mtl::Texture objects.
Sourcepub fn set_pixel_format(&mut self, val: PixelFormat)
pub fn set_pixel_format(&mut self, val: PixelFormat)
The default value is MTLPixelFormatBGRA8Unorm.
You must use one of the following formats: MTLPixelFormatBGRA8Unorm MTLPixelFormatBGRA8Unorm_sRGB MTLPixelFormatRGBA16Float MTLPixelFormatRGB10A2Unorm (macOS only) MTLPixelFormatBGR10A2Unorm (macOS only) MTLPixelFormatBGRA10_XR MTLPixelFormatBGRA10_XR_sRGB MTLPixelFormatBGR10_XR MTLPixelFormatBGR10_XR_sRGB
pub fn framebuffer_only(&self) -> bool
pub fn set_framebuffer_only(&self, val: bool)
pub fn drawable_size(&self) -> Size
pub fn set_drawable_size(&mut self, val: Size)
Sourcepub fn maximum_drawable_count(&self) -> usize
pub fn maximum_drawable_count(&self) -> usize
The number of Metal drawables in the resource pool managed by Core Animation.
Sourcepub fn set_maximum_drawable_count(&self, val: usize)
pub fn set_maximum_drawable_count(&self, val: usize)
The number of Metal drawables in the resource pool managed by Core Animation.
You can set this value to 2 or 3 only; if you pass a different value, Core Animation ignores the value and throws an exception.
The default value is 3.
pub fn presents_with_transaction(&self) -> bool
pub fn set_presents_with_transaction(&mut self, val: bool)
pub fn colorspace(&self) -> Option<&ColorSpace>
pub fn set_colorspace(&mut self, val: Option<&ColorSpace>)
pub fn wants_extended_dynamic_range_content(&self) -> bool
Sourcepub fn sel_wants_extended_dynamic_range_content() -> &'static Sel
pub fn sel_wants_extended_dynamic_range_content() -> &'static Sel
@selector(wantsExtendedDynamicRangeContent) but dynamic
use this function to check if object responds to selector
pub fn set_wants_extended_dynamic_range_content(&mut self, val: bool)
Sourcepub fn sel_set_wants_extended_dynamic_range_content() -> &'static Sel
pub fn sel_set_wants_extended_dynamic_range_content() -> &'static Sel
@selector(setWantsExtendedDynamicRangeContent:) but dynamic
use this function to check if object responds to selector
pub fn edr_metadata_ar(&self) -> Option<Rar<EdrMetadata>>
Sourcepub fn sel_edr_metadata() -> &'static Sel
pub fn sel_edr_metadata() -> &'static Sel
@selector(EDRMetadata) but dynamic
use this function to check if object responds to selector
pub fn edr_metadata(&self) -> Option<R<EdrMetadata>>
pub fn set_edr_metadata(&mut self, val: Option<&EdrMetadata>)
Sourcepub fn sel_set_edr_metadata() -> &'static Sel
pub fn sel_set_edr_metadata() -> &'static Sel
@selector(setEDRMetadata:) but dynamic
use this function to check if object responds to selector
pub fn display_sync_enabled(&self) -> bool
Sourcepub fn sel_display_sync_enabled() -> &'static Sel
pub fn sel_display_sync_enabled() -> &'static Sel
@selector(displaySyncEnabled) but dynamic
use this function to check if object responds to selector
pub fn set_display_sync_enabled(&mut self, val: bool)
Sourcepub fn sel_set_display_sync_enabled() -> &'static Sel
pub fn sel_set_display_sync_enabled() -> &'static Sel
@selector(setDisplaySyncEnabled:) but dynamic
use this function to check if object responds to selector
pub fn allows_next_drawable_timeout(&self) -> bool
Sourcepub fn sel_allows_next_drawable_timeout() -> &'static Sel
pub fn sel_allows_next_drawable_timeout() -> &'static Sel
@selector(allowsNextDrawableTimeout) but dynamic
use this function to check if object responds to selector
pub fn set_allows_next_drawable_timeout(&mut self, val: bool)
Sourcepub fn sel_set_allows_next_drawable_timeout() -> &'static Sel
pub fn sel_set_allows_next_drawable_timeout() -> &'static Sel
@selector(setAllowsNextDrawableTimeout:) but dynamic
use this function to check if object responds to selector
pub fn developer_hud_props_ar(&self) -> Option<Rar<Dictionary<String, Id>>>
Sourcepub fn sel_developer_hud_props() -> &'static Sel
pub fn sel_developer_hud_props() -> &'static Sel
@selector(developerHUDProperties) but dynamic
use this function to check if object responds to selector
pub fn developer_hud_props(&self) -> Option<R<Dictionary<String, Id>>>
pub fn set_developer_hud_props(&mut self, val: Option<&Dictionary<String, Id>>)
Sourcepub fn sel_set_developer_hud_props() -> &'static Sel
pub fn sel_set_developer_hud_props() -> &'static Sel
@selector(setDeveloperHUDProperties:) but dynamic
use this function to check if object responds to selector
Sourcepub fn sel_residency_set() -> &'static Sel
pub fn sel_residency_set() -> &'static Sel
@selector(residencySet) but dynamic
use this function to check if object responds to selector
pub unsafe fn residency_set_ar(&self) -> Rar<ResidencySet>
Sourcepub unsafe fn residency_set(&self) -> R<ResidencySet>
pub unsafe fn residency_set(&self) -> R<ResidencySet>
Check availability with selector Self::sel_residency_set()
Methods from Deref<Target = Layer>§
pub fn retained(&self) -> R<Self>
pub fn bounds(&self) -> Rect
pub fn set_bounds(&mut self, val: Rect)
pub fn pos(&self) -> Point
pub fn set_pos(&mut self, val: Point)
pub fn z_pos(&self) -> Float
pub fn set_z_pos(&mut self, val: Float)
pub fn anchor_point(&self) -> Point
pub fn set_anchor_point(&mut self, val: Point)
pub fn transform(&self) -> Transform3d
pub fn set_transform(&mut self, val: Transform3d)
Sourcepub fn affine_transform(&self) -> AffineTransform
pub fn affine_transform(&self) -> AffineTransform
Convenience methods for accessing the `transform’ property as an affine transform.
pub fn set_affine_transform(&self, val: AffineTransform)
pub fn frame(&self) -> Rect
pub fn set_frame(&mut self, val: Rect)
pub fn add_sublayer(&mut self, layer: &Self)
pub fn insert_sublayer_at(&mut self, layer: &Self, index: u32)
pub fn name_ar(&self) -> Option<Rar<String>>
pub fn name(&self) -> Option<R<String>>
pub fn set_name(&mut self, val: Option<&String>)
pub fn delegate_ar(&self) -> Option<Rar<AnyLayerDelegate>>
pub fn delegate(&self) -> Option<R<AnyLayerDelegate>>
pub fn set_delegate<D: LayerDelegate>(&mut self, val: Option<&D>)
pub fn needs_layout(&self) -> bool
pub fn set_needs_layout(&mut self)
pub fn layout_if_needed(&mut self)
pub fn layout_sublayers(&self)
pub fn resize_sublayers_with_old_size(&self, size: Size)
pub fn resize_with_old_superlayer_size(&self, size: Size)
pub fn remove_all_animations(&mut self)
pub fn remove_animation_for_key(&mut self, key: &String)
pub fn animation_keys_ar(&self) -> Option<Rar<Array<String>>>
pub fn animation_keys(&self) -> Option<R<Array<String>>>
pub fn contents_ar(&self) -> Option<Rar<Id>>
pub fn contents(&self) -> Option<R<Id>>
pub fn set_ns_contents(&mut self, contents: Option<&Id>)
pub fn set_cf_contents(&mut self, contents: Option<&Type>)
pub fn contents_rect(&self) -> Rect
pub fn set_contents_rect(&mut self, val: Rect)
pub fn contents_gravity_ar(&self) -> Rar<ContentsGravity>
pub fn contents_gravity(&self) -> R<ContentsGravity>
pub fn set_contents_gravity(&mut self, val: &ContentsGravity)
pub fn contents_scale(&self) -> Float
pub fn set_contents_scale(&mut self, val: Float)
pub fn contents_center(&self) -> Rect
pub fn set_contents_center(&mut self, val: Rect)
pub fn contents_format_ar(&self) -> Rar<ContentsFormat>
pub fn contents_format(&self) -> R<ContentsFormat>
pub fn set_contents_format(&mut self, val: &ContentsFormat)
pub fn tone_map_mode_ar(&self) -> Rar<ToneMapMode>
pub fn tone_map_mode(&self) -> R<ToneMapMode>
pub fn set_tone_map_mode(&mut self, val: &ToneMapMode)
pub fn wants_extended_dynamic_range_content(&self) -> bool
pub fn set_wants_extended_dynamic_range_content(&mut self, val: bool)
Methods from Deref<Target = Id>§
pub unsafe fn value_for_key_throws_ar(&self, key: &String) -> Option<Rar<Self>>
pub unsafe fn value_for_key_throws(&self, key: &String) -> Option<R<Self>>
pub fn value_for_key<'ear>( &self, key: &String, ) -> ExResult<'ear, Option<R<Self>>>
pub unsafe fn set_value_for_key_throws( &mut self, val: Option<&Self>, key: &String, )
pub fn set_value_for_key<'ear>( &mut self, val: Option<&Self>, key: &String, ) -> ExResult<'ear>
pub unsafe fn value_for_key_path_throws_ar( &self, key_path: &String, ) -> Option<Rar<Self>>
pub unsafe fn value_for_key_path_throws( &self, key_path: &String, ) -> Option<R<Self>>
pub fn value_for_key_path<'ear>( &self, key_path: &String, ) -> ExResult<'ear, Option<R<Self>>>
pub unsafe fn set_value_for_key_path_throws( &mut self, val: Option<&Self>, key_path: &String, )
pub fn set_value_for_key_path<'ear>( &mut self, val: Option<&Self>, key_path: &String, ) -> ExResult<'ear>
pub fn as_type_ref(&self) -> &Type
pub fn as_id_ref(&self) -> &Self
pub fn is_equal(&self, other: &Self) -> bool
pub fn hash(&self) -> UInteger
pub fn as_ptr(&self) -> *const Self
Trait Implementations§
Source§impl AsRef<Id> for MetalLayer
impl AsRef<Id> for MetalLayer
Source§impl Debug for MetalLayer
impl Debug for MetalLayer
Source§impl Deref for MetalLayer
impl Deref for MetalLayer
Source§impl DerefMut for MetalLayer
impl DerefMut for MetalLayer
Source§impl Obj for MetalLayer
impl Obj for MetalLayer
unsafe fn retain(id: &Self) -> R<Self>
unsafe fn release(id: &mut Self)
fn desc_ar(&self) -> Rar<String>
fn desc(&self) -> R<String>
fn debug_desc_ar(&self) -> Rar<String>
fn debug_desc(&self) -> R<String>
fn responds_to_sel(&self, sel: &Sel) -> bool
fn class(&self) -> &Class<Self>
fn is_kind_of_class<T: Obj>(&self, cls: &Class<T>) -> bool
fn try_cast<T: Obj>(&self, cls: &Class<T>) -> Option<&T>
fn try_cast_mut<T: Obj>(&mut self, cls: &Class<T>) -> Option<&mut T>
fn is_member_of_class<T: Obj>(&self, cls: &Class<T>) -> bool
fn is_tagged_ptr(&self) -> bool
fn as_id_ref(&self) -> &Id
Source§impl PartialEq for MetalLayer
impl PartialEq for MetalLayer
Source§fn eq(&self, other: &MetalLayer) -> bool
fn eq(&self, other: &MetalLayer) -> bool
self and other values to be equal, and is used by ==.