Expand description
§Bindings to the CompositorServices framework
See Apple’s docs and the general docs on framework crates for more information.
Structs§
- CP_
OBJECT_ cp_ layer_ renderer layer_renderer - An opaque type that provides the Metal types and timing information you need to draw your content.
- CP_
OBJECT_ cp_ layer_ renderer_ capabilities layer_renderer_capabilities - A type that stores the supported configurations for a layer.
- CP_
OBJECT_ cp_ layer_ renderer_ configuration layer_renderer_configuration - An opaque type that stores the settings to apply to a Compositor layer renderer.
- CP_
OBJECT_ cp_ layer_ renderer_ properties layer_renderer_properties - An opaque type that describes the organization of the layer’s textures and the relationships between those textures and the views you use for drawing.
- cp_
axis_ direction_ convention cp_types - Axis direction convention for defining the X/Y/Z directions.
- cp_
drawable drawable - Apple’s documentation
- cp_
drawable_ array drawable - Apple’s documentation
- cp_
drawable_ render_ context drawable_render_context - Apple’s documentation
- cp_
drawable_ state drawable - The state of ownership for the drawable.
- cp_
drawable_ target drawable - The target where the drawable will be displayed/used.
- cp_
frame frame - Apple’s documentation
- cp_
frame_ timing frame_timing - Apple’s documentation
- cp_
hover_ effect tracking_area - Apple’s documentation
- cp_
layer_ renderer_ configuration_ error_ code cp_errorandobjc2-core-foundation - Errors that can occur during layer configuration.
- cp_
layer_ renderer_ layout layer_renderer_layout - Constants that specify the organization of the textures you use for drawing.
- cp_
layer_ renderer_ state layer_renderer - The potential states of the layer renderer, which tell you how to proceed with drawing operations.
- cp_
supported_ color_ formats_ options layer_renderer_capabilities - The options to provide when calling
cp_layer_renderer_capabilities_supported_color_formatsandcp_layer_renderer_capabilities_supported_color_formats_count - cp_
supported_ layouts_ options layer_renderer_capabilities - The options to provide when calling
cp_layer_renderer_capabilities_supported_layoutandcp_layer_renderer_capabilities_supported_layouts_count - cp_
texture_ topology layer_renderer_properties - Apple’s documentation
- cp_time
cp_types - A Mach absolute time clock value.
- cp_
tracking_ area tracking_area - Apple’s documentation
- cp_view
view - Apple’s documentation
- cp_
view_ texture_ map view - Apple’s documentation
Statics§
- cp_
layer_ ⚠renderer_ configuration_ error_ domain cp_errorandobjc2-core-foundation - The domain for errors that occur during layer renderer configuration.
- cp_
tracking_ area_ identifier_ invalid tracking_area - Identifier reserved as invalid.
- cp_
tracking_ area_ render_ value_ invalid tracking_area - Value to be used in the tracking area texture, to indicate that there is no tracking area at a given pixel.
Functions§
- cp_
drawable_ ⚠add_ mtl4_ render_ context Deprecated drawableanddrawable_render_context - cp_
drawable_ ⚠add_ render_ context Deprecated drawableanddrawable_render_contextandobjc2-metal - cp_
drawable_ ⚠add_ tracking_ area Deprecated drawableandtracking_area - cp_
drawable_ ⚠array_ get_ count Deprecated drawable - cp_
drawable_ ⚠array_ get_ drawable Deprecated drawable - cp_
drawable_ ⚠encode_ present Deprecated drawableandobjc2-metal - cp_
drawable_ ⚠get_ color_ texture Deprecated drawableandobjc2-metal - cp_
drawable_ ⚠get_ depth_ texture Deprecated drawableandobjc2-metal - cp_
drawable_ ⚠get_ flipped_ rasterization_ rate_ map Deprecated drawableandobjc2-metal - cp_
drawable_ ⚠get_ frame_ timing Deprecated drawableandframe_timing - cp_
drawable_ ⚠get_ presentation_ frame_ index Deprecated cp_typesanddrawable - cp_
drawable_ ⚠get_ rasterization_ rate_ map Deprecated drawableandobjc2-metal - cp_
drawable_ ⚠get_ rasterization_ rate_ map_ count Deprecated drawable - cp_
drawable_ ⚠get_ state Deprecated drawable - cp_
drawable_ ⚠get_ target Deprecated drawable - cp_
drawable_ ⚠get_ texture_ count Deprecated drawable - cp_
drawable_ ⚠get_ tracking_ areas_ texture Deprecated drawableandobjc2-metal - cp_
drawable_ ⚠get_ tracking_ areas_ texture_ count Deprecated drawable - cp_
drawable_ ⚠get_ view Deprecated drawableandview - cp_
drawable_ ⚠get_ view_ count Deprecated drawable - cp_
drawable_ ⚠is_ content_ capture_ protected Deprecated drawable - cp_
drawable_ ⚠mtl4_ encode_ present Deprecated drawable - cp_
drawable_ ⚠render_ context_ draw_ mask_ on_ stencil_ attachment Deprecated drawable_render_contextandobjc2-metal - cp_
drawable_ ⚠render_ context_ end_ encoding Deprecated drawable_render_contextandobjc2-metal - cp_
drawable_ ⚠render_ context_ mtl4_ draw_ mask_ on_ stencil_ attachment Deprecated drawable_render_contextandobjc2-metal - cp_
drawable_ ⚠render_ context_ mtl4_ end_ encoding Deprecated drawable_render_contextandobjc2-metal - cp_
frame_ ⚠end_ submission Deprecated frame - cp_
frame_ ⚠end_ update Deprecated frame - cp_
frame_ ⚠get_ drawable_ target_ view_ count Deprecated drawableandframe - cp_
frame_ ⚠get_ frame_ index Deprecated cp_typesandframe - cp_
frame_ ⚠predict_ timing Deprecated frameandframe_timing - cp_
frame_ ⚠query_ drawable Deprecated drawableandframe - cp_
frame_ ⚠query_ drawables Deprecated drawableandframe - cp_
frame_ ⚠start_ submission Deprecated frame - cp_
frame_ ⚠start_ update Deprecated frame - cp_
frame_ ⚠timing_ get_ optimal_ input_ time Deprecated cp_typesandframe_timing - cp_
frame_ ⚠timing_ get_ presentation_ time Deprecated cp_typesandframe_timing - cp_
frame_ ⚠timing_ get_ rendering_ deadline Deprecated cp_typesandframe_timing - cp_
frame_ ⚠timing_ get_ trackable_ anchor_ time Deprecated cp_typesandframe_timing - cp_
layer_ ⚠renderer_ capabilities_ drawable_ render_ context_ supported_ stencil_ format layer_renderer_capabilitiesandobjc2-metal - Returns the stencil format at the specified index in the layer capabilities.
- cp_
layer_ ⚠renderer_ capabilities_ drawable_ render_ context_ supported_ stencil_ formats_ count layer_renderer_capabilities - Returns the number of stencil formats the specified layer supports.
- cp_
layer_ ⚠renderer_ capabilities_ get_ default_ render_ quality cp_typesandlayer_renderer_capabilities - Returns default render quality for drawing on this platform.
- cp_
layer_ ⚠renderer_ capabilities_ supported_ color_ format layer_renderer_capabilitiesandobjc2-metal - Returns the color format at the specified index in the layer capabilities.
- cp_
layer_ ⚠renderer_ capabilities_ supported_ color_ format_ with_ options layer_renderer_capabilitiesandobjc2-metal - Returns the color format at the specified index in the layer capabilities.
- cp_
layer_ ⚠renderer_ capabilities_ supported_ color_ formats_ count layer_renderer_capabilities - Returns the number of color formats the specified layer supports.
- cp_
layer_ ⚠renderer_ capabilities_ supported_ color_ formats_ count_ with_ options layer_renderer_capabilities - Returns the number of color formats the specified layer supports.
- cp_
layer_ ⚠renderer_ capabilities_ supported_ depth_ format layer_renderer_capabilitiesandobjc2-metal - Returns the depth format at the specified index in the layer capabilities.
- cp_
layer_ ⚠renderer_ capabilities_ supported_ depth_ formats_ count layer_renderer_capabilities - Returns the number of depth formats the specified layer supports.
- cp_
layer_ ⚠renderer_ capabilities_ supported_ layout layer_renderer_capabilitiesandlayer_renderer_layout - Returns the layout at the specified index in the layer capabilities.
- cp_
layer_ ⚠renderer_ capabilities_ supported_ layouts_ count layer_renderer_capabilities - Returns the number of layouts the specified layer supports.
- cp_
layer_ ⚠renderer_ capabilities_ supported_ minimum_ near_ plane_ distance layer_renderer_capabilities - Returns the minimum distance in meters to the near projection plane that the layer supports.
- cp_
layer_ ⚠renderer_ capabilities_ supported_ tracking_ areas_ format layer_renderer_capabilitiesandobjc2-metal - Returns the tracking areas format at the specified index in the layer capabilities.
- cp_
layer_ ⚠renderer_ capabilities_ supported_ tracking_ areas_ formats_ count layer_renderer_capabilities - Returns the number of tracking areas formats the specified layer supports.
- cp_
layer_ ⚠renderer_ capabilities_ supports_ foveation layer_renderer_capabilities - Returns a Boolean value that indicates whether the layer supports variable rasterization rates.
- cp_
layer_ ⚠renderer_ configuration_ get_ color_ format layer_renderer_configurationandobjc2-metal - Returns the pixel format to use for the layer’s color textures.
- cp_
layer_ ⚠renderer_ configuration_ get_ color_ usage layer_renderer_configurationandobjc2-metal - Returns the texture usage value to apply to the layer’s color textures.
- cp_
layer_ ⚠renderer_ configuration_ get_ depth_ format layer_renderer_configurationandobjc2-metal - Returns the pixel format to apply to the layer’s depth textures.
- cp_
layer_ ⚠renderer_ configuration_ get_ depth_ usage layer_renderer_configurationandobjc2-metal - Returns the texture usage value to apply to the layer’s depth textures.
- cp_
layer_ ⚠renderer_ configuration_ get_ drawable_ render_ context_ raster_ sample_ count layer_renderer_configuration - Returns the raster sample count to use in drawable’s render context.
- cp_
layer_ ⚠renderer_ configuration_ get_ drawable_ render_ context_ stencil_ format layer_renderer_configurationandobjc2-metal - Returns the pixel format to use for the stencil texture in drawable’s render context.
- cp_
layer_ ⚠renderer_ configuration_ get_ foveation_ enabled layer_renderer_configuration - Returns a Boolean value that indicates whether the layer supports variable rasterization rates.
- cp_
layer_ ⚠renderer_ configuration_ get_ generate_ flipped_ rasterization_ rate_ maps layer_renderer_configuration - Returns a Boolean value that indicates whether the layer provides flipped variable rasterization rate maps in addition to the regular maps.
- cp_
layer_ ⚠renderer_ configuration_ get_ layout layer_renderer_configurationandlayer_renderer_layout - Returns the texture configuration for the drawable views in the layer.
- cp_
layer_ ⚠renderer_ configuration_ get_ max_ render_ quality cp_typesandlayer_renderer_configuration - Get max render quality the layer can use when drawing to the drawables.
- cp_
layer_ ⚠renderer_ configuration_ get_ supports_ mtl4 layer_renderer_configuration - Get whether the layer can use Metal4 when drawing to the drawables.
- cp_
layer_ ⚠renderer_ configuration_ get_ tracking_ areas_ format layer_renderer_configurationandobjc2-metal - Returns the pixel format to apply to the layer’s tracking areas textures.
- cp_
layer_ ⚠renderer_ configuration_ get_ tracking_ areas_ usage layer_renderer_configurationandobjc2-metal - Returns the texture usage value to apply to the layer’s tracking areas textures.
- cp_
layer_ ⚠renderer_ configuration_ set_ color_ format layer_renderer_configurationandobjc2-metal - Sets the pixel format for the layer’s color textures to the specified value.
- cp_
layer_ ⚠renderer_ configuration_ set_ color_ usage layer_renderer_configurationandobjc2-metal - Sets the texture usage for the layer’s color textures to the specified value.
- cp_
layer_ ⚠renderer_ configuration_ set_ depth_ format layer_renderer_configurationandobjc2-metal - Sets the pixel format for the layer’s depth textures to the specified value.
- cp_
layer_ ⚠renderer_ configuration_ set_ depth_ usage layer_renderer_configurationandobjc2-metal - Sets the texture usage for the layer’s depth textures to the specified value.
- cp_
layer_ ⚠renderer_ configuration_ set_ drawable_ render_ context_ raster_ sample_ count layer_renderer_configuration - Sets the raster sample count for the drawable’s render context to the specified value.
- cp_
layer_ ⚠renderer_ configuration_ set_ drawable_ render_ context_ stencil_ format layer_renderer_configurationandobjc2-metal - Sets the pixel format for the drawable’s render context stencil textures to the specified value.
- cp_
layer_ ⚠renderer_ configuration_ set_ foveation_ enabled layer_renderer_configuration - Changes the setting that indicates whether the layer supports variable rasterization rates.
- cp_
layer_ ⚠renderer_ configuration_ set_ generate_ flipped_ rasterization_ rate_ maps layer_renderer_configuration - Changes the setting that indicates whether the layer provides flipped variable rasterization rate maps in addition to the regular maps.
- cp_
layer_ ⚠renderer_ configuration_ set_ layout layer_renderer_configurationandlayer_renderer_layout - Changes the layout configuration for the drawable views in the layer.
- cp_
layer_ ⚠renderer_ configuration_ set_ max_ render_ quality cp_typesandlayer_renderer_configuration - Set max render quality the layer can use when drawing to the drawables.
- cp_
layer_ ⚠renderer_ configuration_ set_ supports_ mtl4 layer_renderer_configuration - Set whether the layer can use Metal4 when drawing to the drawables.
- cp_
layer_ ⚠renderer_ configuration_ set_ tracking_ areas_ format layer_renderer_configurationandobjc2-metal - Sets the pixel format for the layer’s tracking areas textures to the specified value.
- cp_
layer_ ⚠renderer_ configuration_ set_ tracking_ areas_ usage layer_renderer_configurationandobjc2-metal - Sets the texture usage for the layer’s tracking areas textures to the specified value.
- cp_
layer_ ⚠renderer_ get_ configuration layer_rendererandlayer_renderer_configuration - Returns the configuration details you used to create the specified layer.
- cp_
layer_ ⚠renderer_ get_ device layer_rendererandobjc2-metal - Returns the GPU interface that the layer uses for drawing operations.
- cp_
layer_ ⚠renderer_ get_ minimum_ frame_ repeat_ count layer_renderer - Return how many times a frame is repeated on display. This is typically used to build dynamic frame pacing.
- cp_
layer_ ⚠renderer_ get_ mtl4_ command_ queue layer_rendererandobjc2-metal - Returns the command queue that the layer uses for drawing operations.
- cp_
layer_ ⚠renderer_ get_ properties layer_rendererandlayer_renderer_properties - Returns the configured properties of the specified layer renderer.
- cp_
layer_ ⚠renderer_ get_ render_ quality cp_typesandlayer_renderer - Get the render quality to be used by the drawables.
- cp_
layer_ ⚠renderer_ get_ state layer_renderer - Returns the layer’s current state, which indicates whether the layer is visible and ready for you to draw content.
- cp_
layer_ ⚠renderer_ properties_ create_ using_ configuration layer_renderer_configurationandlayer_renderer_propertiesandobjc2-core-foundation - Creates a new opaque type to store layer-related properties.
- cp_
layer_ ⚠renderer_ properties_ get_ texture_ topology layer_renderer_properties - Retrieves the texture topology at the specified index in the layer’s properties.
- cp_
layer_ ⚠renderer_ properties_ get_ texture_ topology_ count layer_renderer_properties - Returns the number of texture topologies available for you to inspect.
- cp_
layer_ ⚠renderer_ properties_ get_ tracking_ areas_ max_ value layer_renderer_propertiesandtracking_area - Returns the max render value for tracking areas’ render values.
- cp_
layer_ ⚠renderer_ properties_ get_ view_ count layer_renderer_properties - Returns the number of views that will need to be rendered.
- cp_
layer_ ⚠renderer_ query_ next_ frame frameandlayer_renderer - Returns the next frame to use for drawing.
- cp_
layer_ ⚠renderer_ set_ minimum_ frame_ repeat_ count layer_renderer - Set the frame repeat count. This is typically used to build dynamic frame pacing.
- cp_
layer_ ⚠renderer_ set_ render_ quality cp_typesandlayer_renderer - Set the render quality to be used by the drawables.
- cp_
layer_ ⚠renderer_ wait_ until_ running layer_renderer - Stops further execution of your code until the layer renderer leaves the paused state.
- cp_
release ⚠cp_base - Decrement the reference count of the specified object.
- cp_
retain ⚠cp_base - Increments the reference count of the specified object.
- cp_
texture_ ⚠topology_ get_ array_ length Deprecated layer_renderer_properties - cp_
texture_ ⚠topology_ get_ texture_ type Deprecated layer_renderer_propertiesandobjc2-metal - cp_
time_ ⚠to_ cf_ time_ interval Deprecated cp_typesandobjc2-core-foundation - cp_
time_ ⚠wait_ until Deprecated cp_types - cp_
tracking_ ⚠area_ add_ automatic_ hover_ effect Deprecated tracking_area - cp_
tracking_ ⚠area_ get_ identifier Deprecated tracking_area - cp_
tracking_ ⚠area_ get_ render_ value Deprecated tracking_area - cp_
view_ ⚠get_ view_ texture_ map Deprecated view - cp_
view_ ⚠texture_ map_ get_ slice_ index Deprecated view - cp_
view_ ⚠texture_ map_ get_ texture_ index Deprecated view - cp_
view_ ⚠texture_ map_ get_ viewport Deprecated objc2-metalandview
Type Aliases§
- cp_
compositor_ frame_ index_ t cp_types - The sequential index for a frame in the compositor’s timeline.
- cp_
drawable_ array_ t drawable - An opaque type that contains the drawable types and other information you need to set up your render pipeline.
- cp_
drawable_ render_ context_ t drawable_render_context - An object that can render any effects associated with a drawable This is required for applications that want to render using the Progressive Immersion Style
- cp_
drawable_ t drawable - An opaque type that contains the textures and other information you need to set up your render pipeline.
- cp_
frame_ t frame - An opaque type that provides access to the timing information and data types you need to render a single frame of content.
- cp_
frame_ timing_ t frame_timing - An opaque type that stores information about a frame’s encoding, rendering, and presentation deadlines.
- cp_
hover_ effect_ t tracking_area - An opaque type that describes a hover effect of the tracking area.
- cp_
layer_ frame_ index_ t cp_types - A frame index in the layer’s timeline.
- cp_
layer_ renderer_ capabilities_ t layer_renderer_capabilities - A type that stores the supported configurations for a layer.
- cp_
layer_ renderer_ configuration_ t layer_renderer_configuration - An opaque type that stores the settings to apply to a Compositor layer renderer.
- cp_
layer_ renderer_ properties_ t layer_renderer_properties - An opaque type that describes the organization of the layer’s textures and the relationships between those textures and the views you use for drawing.
- cp_
layer_ renderer_ t layer_renderer - An opaque type that provides the Metal types and timing information you need to draw your content.
- cp_
render_ quality_ t cp_types - Render quality controls the quality which drawing happens at.
- cp_
texture_ topology_ t layer_renderer_properties - An opaque type that specifies the configuration of one of the layer’s drawable textures.
- cp_
time_ t cp_types - A Mach absolute time clock value.
- cp_
tracking_ area_ identifier tracking_area - An identifier for the tracking area.
- cp_
tracking_ area_ render_ value tracking_area - A value used when rendering a tracking area.
- cp_
tracking_ area_ t tracking_area - An opaque type that describes a region of a view that interacts with the gaze/cursor.
- cp_
view_ t view - An opaque type that manages the information for how to render content into the current frame.
- cp_
view_ texture_ map_ t view - An opaque type that describes the relationship between a view and the underlying texture.