Skip to main content

MetalLayer

Struct MetalLayer 

Source
pub struct MetalLayer(/* private fields */);

Implementations§

Source§

impl MetalLayer

Source

pub fn retained(&self) -> R<Self>

Source§

impl MetalLayer

Source

pub fn cls() -> &'static Class<Self>

Source

pub fn cls_ptr() -> *const c_void

Source

pub fn alloc() -> A<Self>

Source

pub fn new() -> R<MetalLayer>

shortcut to Self::alloc().init()

Source§

impl MetalLayer

Source

pub fn device(&self) -> Option<&Device>

Source

pub fn preferred_device(&self) -> Option<&Device>

Source

pub fn set_device(&mut self, val: Option<&Device>)

Source

pub fn next_drawable_ar(&self) -> Option<Rar<AnyMetalDrawable>>

Source

pub fn next_drawable(&self) -> Option<R<AnyMetalDrawable>>

Source

pub fn pixel_format(&self) -> PixelFormat

This property controls the pixel format of the mtl::Texture objects.

Source

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

Source

pub fn framebuffer_only(&self) -> bool

Source

pub fn set_framebuffer_only(&self, val: bool)

Source

pub fn drawable_size(&self) -> Size

Source

pub fn set_drawable_size(&mut self, val: Size)

Source

pub fn maximum_drawable_count(&self) -> usize

The number of Metal drawables in the resource pool managed by Core Animation.

Source

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.

Source

pub fn presents_with_transaction(&self) -> bool

Source

pub fn set_presents_with_transaction(&mut self, val: bool)

Source

pub fn colorspace(&self) -> Option<&ColorSpace>

Source

pub fn set_colorspace(&mut self, val: Option<&ColorSpace>)

Source

pub fn wants_extended_dynamic_range_content(&self) -> bool

Source

pub fn sel_wants_extended_dynamic_range_content() -> &'static Sel

@selector(wantsExtendedDynamicRangeContent) but dynamic use this function to check if object responds to selector

Source

pub fn set_wants_extended_dynamic_range_content(&mut self, val: bool)

Source

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

Source

pub fn edr_metadata_ar(&self) -> Option<Rar<EdrMetadata>>

Source

pub fn sel_edr_metadata() -> &'static Sel

@selector(EDRMetadata) but dynamic use this function to check if object responds to selector

Source

pub fn edr_metadata(&self) -> Option<R<EdrMetadata>>

Source

pub fn set_edr_metadata(&mut self, val: Option<&EdrMetadata>)

Source

pub fn sel_set_edr_metadata() -> &'static Sel

@selector(setEDRMetadata:) but dynamic use this function to check if object responds to selector

Source

pub fn display_sync_enabled(&self) -> bool

Source

pub fn sel_display_sync_enabled() -> &'static Sel

@selector(displaySyncEnabled) but dynamic use this function to check if object responds to selector

Source

pub fn set_display_sync_enabled(&mut self, val: bool)

Source

pub fn sel_set_display_sync_enabled() -> &'static Sel

@selector(setDisplaySyncEnabled:) but dynamic use this function to check if object responds to selector

Source

pub fn allows_next_drawable_timeout(&self) -> bool

Source

pub fn sel_allows_next_drawable_timeout() -> &'static Sel

@selector(allowsNextDrawableTimeout) but dynamic use this function to check if object responds to selector

Source

pub fn set_allows_next_drawable_timeout(&mut self, val: bool)

Source

pub fn sel_set_allows_next_drawable_timeout() -> &'static Sel

@selector(setAllowsNextDrawableTimeout:) but dynamic use this function to check if object responds to selector

Source

pub fn developer_hud_props_ar(&self) -> Option<Rar<Dictionary<String, Id>>>

Source

pub fn sel_developer_hud_props() -> &'static Sel

@selector(developerHUDProperties) but dynamic use this function to check if object responds to selector

Source

pub fn developer_hud_props(&self) -> Option<R<Dictionary<String, Id>>>

Source

pub fn set_developer_hud_props(&mut self, val: Option<&Dictionary<String, Id>>)

Source

pub fn sel_set_developer_hud_props() -> &'static Sel

@selector(setDeveloperHUDProperties:) but dynamic use this function to check if object responds to selector

Source

pub fn sel_residency_set() -> &'static Sel

@selector(residencySet) but dynamic use this function to check if object responds to selector

Source

pub unsafe fn residency_set_ar(&self) -> Rar<ResidencySet>

Source

pub unsafe fn residency_set(&self) -> R<ResidencySet>

Check availability with selector Self::sel_residency_set()

Methods from Deref<Target = Layer>§

Source

pub fn retained(&self) -> R<Self>

Source

pub fn bounds(&self) -> Rect

Source

pub fn set_bounds(&mut self, val: Rect)

Source

pub fn pos(&self) -> Point

Source

pub fn set_pos(&mut self, val: Point)

Source

pub fn z_pos(&self) -> Float

Source

pub fn set_z_pos(&mut self, val: Float)

Source

pub fn anchor_point(&self) -> Point

Source

pub fn set_anchor_point(&mut self, val: Point)

Source

pub fn transform(&self) -> Transform3d

Source

pub fn set_transform(&mut self, val: Transform3d)

Source

pub fn affine_transform(&self) -> AffineTransform

Convenience methods for accessing the `transform’ property as an affine transform.

Source

pub fn set_affine_transform(&self, val: AffineTransform)

Source

pub fn frame(&self) -> Rect

Source

pub fn set_frame(&mut self, val: Rect)

Source

pub fn is_hidden(&self) -> bool

Source

pub fn set_hidden(&mut self, val: bool)

Source

pub fn add_sublayer(&mut self, layer: &Self)

Source

pub fn insert_sublayer_at(&mut self, layer: &Self, index: u32)

Source

pub fn name_ar(&self) -> Option<Rar<String>>

Source

pub fn name(&self) -> Option<R<String>>

Source

pub fn set_name(&mut self, val: Option<&String>)

Source

pub fn delegate_ar(&self) -> Option<Rar<AnyLayerDelegate>>

Source

pub fn delegate(&self) -> Option<R<AnyLayerDelegate>>

Source

pub fn set_delegate<D: LayerDelegate>(&mut self, val: Option<&D>)

Source

pub fn needs_layout(&self) -> bool

Source

pub fn set_needs_layout(&mut self)

Source

pub fn layout_if_needed(&mut self)

Source

pub fn layout_sublayers(&self)

Source

pub fn resize_sublayers_with_old_size(&self, size: Size)

Source

pub fn resize_with_old_superlayer_size(&self, size: Size)

Source

pub fn remove_all_animations(&mut self)

Source

pub fn remove_animation_for_key(&mut self, key: &String)

Source

pub fn animation_keys_ar(&self) -> Option<Rar<Array<String>>>

Source

pub fn animation_keys(&self) -> Option<R<Array<String>>>

Source

pub fn contents_ar(&self) -> Option<Rar<Id>>

Source

pub fn contents(&self) -> Option<R<Id>>

Source

pub fn set_ns_contents(&mut self, contents: Option<&Id>)

Source

pub fn set_cf_contents(&mut self, contents: Option<&Type>)

Source

pub fn contents_rect(&self) -> Rect

Source

pub fn set_contents_rect(&mut self, val: Rect)

Source

pub fn contents_gravity_ar(&self) -> Rar<ContentsGravity>

Source

pub fn contents_gravity(&self) -> R<ContentsGravity>

Source

pub fn set_contents_gravity(&mut self, val: &ContentsGravity)

Source

pub fn contents_scale(&self) -> Float

Source

pub fn set_contents_scale(&mut self, val: Float)

Source

pub fn contents_center(&self) -> Rect

Source

pub fn set_contents_center(&mut self, val: Rect)

Source

pub fn contents_format_ar(&self) -> Rar<ContentsFormat>

Source

pub fn contents_format(&self) -> R<ContentsFormat>

Source

pub fn set_contents_format(&mut self, val: &ContentsFormat)

Source

pub fn tone_map_mode_ar(&self) -> Rar<ToneMapMode>

Source

pub fn tone_map_mode(&self) -> R<ToneMapMode>

Source

pub fn set_tone_map_mode(&mut self, val: &ToneMapMode)

Source

pub fn wants_extended_dynamic_range_content(&self) -> bool

Source

pub fn set_wants_extended_dynamic_range_content(&mut self, val: bool)

Methods from Deref<Target = Id>§

Source

pub unsafe fn value_for_key_throws_ar(&self, key: &String) -> Option<Rar<Self>>

Source

pub unsafe fn value_for_key_throws(&self, key: &String) -> Option<R<Self>>

Source

pub fn value_for_key<'ear>( &self, key: &String, ) -> ExResult<'ear, Option<R<Self>>>

Source

pub unsafe fn set_value_for_key_throws( &mut self, val: Option<&Self>, key: &String, )

Source

pub fn set_value_for_key<'ear>( &mut self, val: Option<&Self>, key: &String, ) -> ExResult<'ear>

Source

pub unsafe fn value_for_key_path_throws_ar( &self, key_path: &String, ) -> Option<Rar<Self>>

Source

pub unsafe fn value_for_key_path_throws( &self, key_path: &String, ) -> Option<R<Self>>

Source

pub fn value_for_key_path<'ear>( &self, key_path: &String, ) -> ExResult<'ear, Option<R<Self>>>

Source

pub unsafe fn set_value_for_key_path_throws( &mut self, val: Option<&Self>, key_path: &String, )

Source

pub fn set_value_for_key_path<'ear>( &mut self, val: Option<&Self>, key_path: &String, ) -> ExResult<'ear>

Source

pub fn as_type_ref(&self) -> &Type

Source

pub fn as_id_ref(&self) -> &Self

Source

pub fn is_equal(&self, other: &Self) -> bool

Source

pub fn hash(&self) -> UInteger

Source

pub fn as_ptr(&self) -> *const Self

Trait Implementations§

Source§

impl AsRef<Id> for MetalLayer

Source§

fn as_ref(&self) -> &Id

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for MetalLayer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for MetalLayer

Source§

type Target = Layer

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for MetalLayer

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Obj for MetalLayer

Source§

unsafe fn retain(id: &Self) -> R<Self>

Source§

unsafe fn release(id: &mut Self)

Source§

fn desc_ar(&self) -> Rar<String>

Source§

fn desc(&self) -> R<String>

Source§

fn debug_desc_ar(&self) -> Rar<String>

Source§

fn debug_desc(&self) -> R<String>

Source§

fn responds_to_sel(&self, sel: &Sel) -> bool

Source§

fn class(&self) -> &Class<Self>

Source§

fn is_kind_of_class<T: Obj>(&self, cls: &Class<T>) -> bool

Source§

fn try_cast<T: Obj>(&self, cls: &Class<T>) -> Option<&T>

Source§

fn try_cast_mut<T: Obj>(&mut self, cls: &Class<T>) -> Option<&mut T>

Source§

fn is_member_of_class<T: Obj>(&self, cls: &Class<T>) -> bool

Source§

fn is_tagged_ptr(&self) -> bool

Source§

fn as_id_ref(&self) -> &Id

Source§

impl PartialEq for MetalLayer

Source§

fn eq(&self, other: &MetalLayer) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Retained<MetalLayer>> for MetalLayer

Source§

fn eq(&self, other: &R<MetalLayer>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for MetalLayer

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Release for T
where T: Obj,

Source§

unsafe fn release(&mut self)

Source§

impl<T> Retain for T
where T: Obj,

Source§

fn retained(&self) -> Retained<T>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.