# This file is generated by objective.metadata
#
# Last update: Sun May 24 11:45:16 2026
#
# flake8: noqa

import objc, sys
from typing import NewType

if sys.maxsize > 2**32:

    def sel32or64(a, b):
        return b

else:

    def sel32or64(a, b):
        return a


if objc.arch == "arm64":

    def selAorI(a, b):
        return a

else:

    def selAorI(a, b):
        return b


misc = {}
misc.update(
    {
        "cp_time_t": objc.createStructType(
            "CompositorServices.cp_time_t", b"{cp_time=Q}", ["cp_mach_abs_time"]
        )
    }
)
constants = """$cp_layer_renderer_configuration_error_domain$"""
enums = """$cp_axis_direction_convention_right_down_back@2$cp_axis_direction_convention_right_down_forward@3$cp_axis_direction_convention_right_up_back@0$cp_axis_direction_convention_right_up_forward@1$cp_drawable_state_available@0$cp_drawable_state_presenting@2$cp_drawable_state_rendering@1$cp_drawable_target_built_in@0$cp_drawable_target_capture@1$cp_layer_renderer_configuration_error_code_layout_not_supported@-6$cp_layer_renderer_configuration_error_code_missing_configuration@-20$cp_layer_renderer_configuration_error_code_not_enough_frames_requested@-10$cp_layer_renderer_configuration_error_code_temporal_anti_aliasing_not_supported@-17$cp_layer_renderer_configuration_error_code_too_many_frames_requested@-11$cp_layer_renderer_configuration_error_code_unsupported_color_format@-4$cp_layer_renderer_configuration_error_code_unsupported_color_usage@-5$cp_layer_renderer_configuration_error_code_unsupported_depth_format@-7$cp_layer_renderer_configuration_error_code_unsupported_depth_usage@-8$cp_layer_renderer_configuration_error_code_unsupported_drawable_render_context_stencil_format@-23$cp_layer_renderer_configuration_error_code_unsupported_forward_depth_range@-101$cp_layer_renderer_configuration_error_code_unsupported_near_plane_distance@-104$cp_layer_renderer_configuration_error_code_unsupported_render_quality@-18$cp_layer_renderer_configuration_error_code_unsupported_tracking_areas_format@-21$cp_layer_renderer_configuration_error_code_unsupported_tracking_areas_usage@-22$cp_layer_renderer_configuration_error_code_variable_rasterization_rate_is_not_supported@-16$cp_layer_renderer_layout_dedicated@0$cp_layer_renderer_layout_layered@2$cp_layer_renderer_layout_shared@1$cp_layer_renderer_state_invalidated@3$cp_layer_renderer_state_paused@1$cp_layer_renderer_state_running@2$cp_supported_color_formats_options_none@0$cp_supported_color_formats_options_progressive_immersion_enabled@1$cp_supported_layouts_options_foveation_enabled@1$cp_supported_layouts_options_none@0$cp_supported_layouts_options_progressive_immersion_enabled@2$cp_tracking_area_identifier_invalid@0$cp_tracking_area_render_value_invalid@0$"""
misc.update(
    {
        "cp_layer_renderer_state": NewType("cp_layer_renderer_state", int),
        "cp_supported_layouts_options": NewType("cp_supported_layouts_options", int),
        "cp_drawable_state": NewType("cp_drawable_state", int),
        "cp_axis_direction_convention": NewType("cp_axis_direction_convention", int),
        "cp_layer_renderer_layout": NewType("cp_layer_renderer_layout", int),
        "cp_layer_renderer_configuration_error_code": NewType(
            "cp_layer_renderer_configuration_error_code", int
        ),
        "cp_supported_color_formats_options": NewType(
            "cp_supported_color_formats_options", int
        ),
        "cp_drawable_target": NewType("cp_drawable_target", int),
    }
)
misc.update({})
misc.update({})
functions = {
    "cp_drawable_render_context_end_encoding": (b"v^{cp_drawable_render_context=}@",),
    "cp_layer_renderer_get_mtl4_command_queue": (b"@@",),
    "cp_tracking_area_get_identifier": (b"Q^{cp_tracking_area=}",),
    "cp_drawable_get_frame_timing": (b"^{cp_frame_timing=}^{cp_drawable=}",),
    "cp_layer_renderer_get_render_quality": (b"f@",),
    "cp_layer_renderer_capabilities_supported_depth_formats_count": (b"Q@",),
    "cp_layer_renderer_get_configuration": (b"@@",),
    "cp_drawable_get_view": (b"^{cp_view=}^{cp_drawable=}Q",),
    "cp_drawable_render_context_mtl4_draw_mask_on_stencil_attachment": (
        b"v^{cp_drawable_render_context=}@C",
    ),
    "cp_drawable_render_context_draw_mask_on_stencil_attachment": (
        b"v^{cp_drawable_render_context=}@C",
    ),
    "cp_layer_renderer_capabilities_supported_layout": (b"I@IQ",),
    "cp_view_texture_map_get_viewport": (
        b"{MTLViewport=dddddd}^{cp_view_texture_map=}",
    ),
    "cp_layer_renderer_configuration_get_generate_flipped_rasterization_rate_maps": (
        b"B@",
    ),
    "cp_drawable_add_mtl4_render_context": (
        b"^{cp_drawable_render_context=}^{cp_drawable=}",
    ),
    "cp_layer_renderer_get_device": (b"@@",),
    "cp_drawable_encode_present": (b"v^{cp_drawable=}@",),
    "cp_frame_query_drawables": (b"^{cp_drawable_array=}^{cp_frame=}",),
    "cp_layer_renderer_capabilities_supported_depth_format": (b"Q@Q",),
    "cp_frame_start_update": (b"v^{cp_frame=}",),
    "cp_view_texture_map_get_texture_index": (b"Q^{cp_view_texture_map=}",),
    "cp_drawable_get_rasterization_rate_map_count": (b"Q^{cp_drawable=}",),
    "cp_drawable_get_presentation_frame_index": (b"Q^{cp_drawable=}",),
    "cp_layer_renderer_configuration_get_color_usage": (b"Q@",),
    "cp_texture_topology_get_array_length": (b"Q^{cp_texture_topology=}",),
    "cp_layer_renderer_configuration_get_depth_usage": (b"Q@",),
    "cp_layer_renderer_get_properties": (b"@@",),
    "cp_layer_renderer_configuration_set_tracking_areas_usage": (b"v@Q",),
    "cp_drawable_is_content_capture_protected": (b"B^{cp_drawable=}",),
    "cp_drawable_mtl4_encode_present": (b"v^{cp_drawable=}",),
    "cp_layer_renderer_configuration_get_color_format": (b"Q@",),
    "cp_frame_timing_get_trackable_anchor_time": (b"{cp_time=Q}^{cp_frame_timing=}",),
    "cp_layer_renderer_configuration_set_depth_format": (b"v@Q",),
    "cp_drawable_get_state": (b"I^{cp_drawable=}",),
    "cp_frame_predict_timing": (b"^{cp_frame_timing=}^{cp_frame=}",),
    "cp_layer_renderer_capabilities_supported_tracking_areas_formats_count": (b"Q@",),
    "cp_frame_start_submission": (b"v^{cp_frame=}",),
    "cp_layer_renderer_capabilities_supported_color_formats_count": (b"Q@",),
    "cp_layer_renderer_configuration_get_tracking_areas_format": (b"Q@",),
    "cp_layer_renderer_configuration_get_drawable_render_context_raster_sample_count": (
        b"i@",
    ),
    "cp_texture_topology_get_texture_type": (b"Q^{cp_texture_topology=}",),
    "cp_drawable_render_context_mtl4_end_encoding": (
        b"v^{cp_drawable_render_context=}@",
    ),
    "cp_layer_renderer_get_minimum_frame_repeat_count": (b"i@",),
    "cp_view_texture_map_get_slice_index": (b"Q^{cp_view_texture_map=}",),
    "cp_tracking_area_add_automatic_hover_effect": (
        b"^{cp_hover_effect=}^{cp_tracking_area=}",
    ),
    "cp_time_wait_until": (b"v{cp_time=Q}",),
    "cp_layer_renderer_configuration_set_tracking_areas_format": (b"v@Q",),
    "cp_frame_end_submission": (b"v^{cp_frame=}",),
    "cp_tracking_area_get_render_value": (b"S^{cp_tracking_area=}",),
    "cp_drawable_get_tracking_areas_texture_count": (b"Q^{cp_drawable=}",),
    "cp_layer_renderer_configuration_set_drawable_render_context_stencil_format": (
        b"v@Q",
    ),
    "cp_layer_renderer_configuration_set_color_usage": (b"v@Q",),
    "cp_layer_renderer_configuration_get_layout": (b"I@",),
    "cp_drawable_get_view_count": (b"Q^{cp_drawable=}",),
    "cp_layer_renderer_properties_get_texture_topology": (
        b"^{cp_texture_topology=}@Q",
    ),
    "cp_layer_renderer_configuration_set_drawable_render_context_raster_sample_count": (
        b"v@i",
    ),
    "cp_drawable_get_flipped_rasterization_rate_map": (b"@^{cp_drawable=}Q",),
    "cp_layer_renderer_properties_get_tracking_areas_max_value": (b"S@",),
    "cp_layer_renderer_capabilities_supported_color_format_with_options": (b"Q@IQ",),
    "cp_layer_renderer_set_minimum_frame_repeat_count": (b"v@i",),
    "cp_drawable_get_texture_count": (b"Q^{cp_drawable=}",),
    "cp_drawable_add_render_context": (
        b"^{cp_drawable_render_context=}^{cp_drawable=}@",
    ),
    "cp_view_get_view_texture_map": (b"^{cp_view_texture_map=}^{cp_view=}",),
    "cp_layer_renderer_get_state": (b"I@",),
    "cp_layer_renderer_set_render_quality": (b"v@f",),
    "cp_layer_renderer_capabilities_supported_layouts_count": (b"Q@I",),
    "cp_layer_renderer_configuration_set_depth_usage": (b"v@Q",),
    "cp_layer_renderer_properties_get_texture_topology_count": (b"Q@",),
    "cp_layer_renderer_configuration_set_generate_flipped_rasterization_rate_maps": (
        b"v@B",
    ),
    "cp_layer_renderer_capabilities_supported_tracking_areas_format": (b"Q@Q",),
    "cp_layer_renderer_query_next_frame": (b"^{cp_frame=}@",),
    "cp_drawable_get_target": (b"I^{cp_drawable=}",),
    "cp_layer_renderer_capabilities_drawable_render_context_supported_stencil_format": (
        b"Q@Q",
    ),
    "cp_layer_renderer_wait_until_running": (b"v@",),
    "cp_layer_renderer_configuration_set_color_format": (b"v@Q",),
    "cp_layer_renderer_configuration_set_max_render_quality": (b"v@f",),
    "cp_drawable_add_tracking_area": (b"^{cp_tracking_area=}^{cp_drawable=}Q",),
    "cp_drawable_get_device_anchor": (b"@^{cp_drawable=}",),
    "cp_layer_renderer_configuration_get_depth_format": (b"Q@",),
    "cp_layer_renderer_capabilities_drawable_render_context_supported_stencil_formats_count": (
        b"Q@",
    ),
    "cp_layer_renderer_configuration_get_foveation_enabled": (b"B@",),
    "cp_layer_renderer_configuration_get_max_render_quality": (b"f@",),
    "cp_drawable_get_color_texture": (b"@^{cp_drawable=}Q",),
    "cp_drawable_array_get_drawable": (b"^{cp_drawable=}^{cp_drawable_array=}Q",),
    "cp_layer_renderer_configuration_get_drawable_render_context_stencil_format": (
        b"Q@",
    ),
    "cp_frame_timing_get_presentation_time": (b"{cp_time=Q}^{cp_frame_timing=}",),
    "cp_frame_timing_get_optimal_input_time": (b"{cp_time=Q}^{cp_frame_timing=}",),
    "cp_frame_get_drawable_target_view_count": (b"Q^{cp_frame=}I",),
    "cp_layer_renderer_capabilities_supported_minimum_near_plane_distance": (b"f@",),
    "cp_layer_renderer_properties_create_using_configuration": (
        b"@@^^{__CFError=}",
        "",
        {
            "retval": {"already_retained": True},
            "arguments": {
                1: {
                    "null_accepted": True,
                    "already_cfretained": True,
                    "type_modifier": "o",
                }
            },
        },
    ),
    "cp_frame_get_frame_index": (b"Q^{cp_frame=}",),
    "cp_view_get_tangents": (b"<4f>^{cp_view=}",),
    "cp_layer_renderer_capabilities_supported_color_format": (b"Q@Q",),
    "cp_frame_end_update": (b"v^{cp_frame=}",),
    "cp_layer_renderer_configuration_get_tracking_areas_usage": (b"Q@",),
    "cp_layer_renderer_configuration_get_supports_mtl4": (b"B@",),
    "cp_layer_renderer_configuration_set_supports_mtl4": (b"v@B",),
    "cp_layer_renderer_configuration_set_layout": (b"v@I",),
    "cp_layer_renderer_capabilities_get_default_render_quality": (b"f@",),
    "cp_layer_renderer_capabilities_supported_color_formats_count_with_options": (
        b"Q@I",
    ),
    "cp_layer_renderer_configuration_set_foveation_enabled": (b"v@B",),
    "cp_drawable_get_tracking_areas_texture": (b"@^{cp_drawable=}Q",),
    "cp_drawable_set_device_anchor": (b"v^{cp_drawable=}@",),
    "cp_layer_renderer_capabilities_supports_foveation": (b"B@",),
    "cp_drawable_array_get_count": (b"Q^{cp_drawable_array=}",),
    "cp_drawable_get_rasterization_rate_map": (b"@^{cp_drawable=}Q",),
    "cp_drawable_get_depth_texture": (b"@^{cp_drawable=}Q",),
    "cp_time_to_cf_time_interval": (b"d{cp_time=Q}",),
    "cp_frame_query_drawable": (b"^{cp_drawable=}^{cp_frame=}",),
    "cp_frame_timing_get_rendering_deadline": (b"{cp_time=Q}^{cp_frame_timing=}",),
    "cp_layer_renderer_properties_get_view_count": (b"Q@",),
}
aliases = {
    "CP_NULLABLE_STRUCT_REF": "_Nullable",
    "CP_NONNULL_EXTERN_C_BEGIN": "CF_ASSUME_NONNULL_BEGIN",
    "CP_NONNULL_EXTERN_C_END": "CF_ASSUME_NONNULL_END",
    "cp_layer_renderer_properties_t": "CP_OBJECT_cp_layer_renderer_properties",
    "cp_layer_renderer_t": "CP_OBJECT_cp_layer_renderer",
}
misc.update(
    {
        "cp_layer_renderer_configuration_t": objc.createOpaquePointerType(
            "cp_layer_renderer_configuration_t", b"^{cp_layer_renderer_configuration=}"
        ),
        "cp_layer_renderer_capabilities_t": objc.createOpaquePointerType(
            "cp_layer_renderer_capabilities_t", b"^{cp_layer_renderer_capabilities=}"
        ),
        "cp_drawable_array_t": objc.createOpaquePointerType(
            "cp_drawable_array_t", b"^{cp_drawable_array=}"
        ),
        "cp_frame_t": objc.createOpaquePointerType("cp_frame_t", b"^{cp_frame=}"),
        "cp_view_texture_map_t": objc.createOpaquePointerType(
            "cp_view_texture_map_t", b"^{cp_view_texture_map=}"
        ),
        "cp_view_t": objc.createOpaquePointerType("cp_view_t", b"^{cp_view=}"),
        "cp_frame_timing_t": objc.createOpaquePointerType(
            "cp_frame_timing_t", b"^{cp_frame_timing=}"
        ),
        "cp_drawable_t": objc.createOpaquePointerType(
            "cp_drawable_t", b"^{cp_drawable=}"
        ),
        "cp_texture_topology_t": objc.createOpaquePointerType(
            "cp_texture_topology_t", b"^{cp_texture_topology=}"
        ),
        "cp_drawable_render_context_t": objc.createOpaquePointerType(
            "cp_drawable_render_context_t", b"^{cp_drawable_render_context=}"
        ),
        "cp_tracking_area_t": objc.createOpaquePointerType(
            "cp_tracking_area_t", b"^{cp_tracking_area=}"
        ),
        "cp_hover_effect_t": objc.createOpaquePointerType(
            "cp_hover_effect_t", b"^{cp_hover_effect=}"
        ),
    }
)

objc.registerNewKeywordsFromSelector("CP_OBJECT_cp_layer_renderer", b"init")
objc.registerNewKeywordsFromSelector(
    "CP_OBJECT_cp_layer_renderer_capabilities", b"init"
)
objc.registerNewKeywordsFromSelector(
    "CP_OBJECT_cp_layer_renderer_configuration", b"init"
)
objc.registerNewKeywordsFromSelector("CP_OBJECT_cp_layer_renderer_properties", b"init")
expressions = {}

# END OF FILE
