use core::cell::UnsafeCell;
use core::ffi::*;
use core::marker::{PhantomData, PhantomPinned};
use objc2::__framework_prelude::*;
use crate::*;
#[repr(C)]
#[derive(Debug)]
pub struct cp_frame {
inner: [u8; 0],
_p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
}
unsafe impl RefEncode for cp_frame {
const ENCODING_REF: Encoding = Encoding::Pointer(&Encoding::Struct("cp_frame", &[]));
}
pub type cp_frame_t = *mut cp_frame;
impl cp_frame {
#[doc(alias = "cp_frame_get_frame_index")]
#[cfg(feature = "cp_types")]
#[inline]
pub unsafe fn frame_index(frame: cp_frame_t) -> cp_layer_frame_index_t {
extern "C-unwind" {
fn cp_frame_get_frame_index(frame: cp_frame_t) -> cp_layer_frame_index_t;
}
unsafe { cp_frame_get_frame_index(frame) }
}
#[doc(alias = "cp_frame_predict_timing")]
#[cfg(feature = "frame_timing")]
#[inline]
pub unsafe fn predict_timing(frame: cp_frame_t) -> cp_frame_timing_t {
extern "C-unwind" {
fn cp_frame_predict_timing(frame: cp_frame_t) -> cp_frame_timing_t;
}
unsafe { cp_frame_predict_timing(frame) }
}
#[doc(alias = "cp_frame_query_drawable")]
#[cfg(feature = "drawable")]
#[deprecated = "Use cp_frame_query_drawables instead"]
#[inline]
pub unsafe fn query_drawable(frame: cp_frame_t) -> cp_drawable_t {
extern "C-unwind" {
fn cp_frame_query_drawable(frame: cp_frame_t) -> cp_drawable_t;
}
unsafe { cp_frame_query_drawable(frame) }
}
#[doc(alias = "cp_frame_query_drawables")]
#[cfg(feature = "drawable")]
#[inline]
pub unsafe fn query_drawables(frame: cp_frame_t) -> cp_drawable_array_t {
extern "C-unwind" {
fn cp_frame_query_drawables(frame: cp_frame_t) -> cp_drawable_array_t;
}
unsafe { cp_frame_query_drawables(frame) }
}
#[doc(alias = "cp_frame_start_update")]
#[inline]
pub unsafe fn start_update(frame: cp_frame_t) {
extern "C-unwind" {
fn cp_frame_start_update(frame: cp_frame_t);
}
unsafe { cp_frame_start_update(frame) }
}
#[doc(alias = "cp_frame_end_update")]
#[inline]
pub unsafe fn end_update(frame: cp_frame_t) {
extern "C-unwind" {
fn cp_frame_end_update(frame: cp_frame_t);
}
unsafe { cp_frame_end_update(frame) }
}
#[doc(alias = "cp_frame_start_submission")]
#[inline]
pub unsafe fn start_submission(frame: cp_frame_t) {
extern "C-unwind" {
fn cp_frame_start_submission(frame: cp_frame_t);
}
unsafe { cp_frame_start_submission(frame) }
}
#[doc(alias = "cp_frame_end_submission")]
#[inline]
pub unsafe fn end_submission(frame: cp_frame_t) {
extern "C-unwind" {
fn cp_frame_end_submission(frame: cp_frame_t);
}
unsafe { cp_frame_end_submission(frame) }
}
#[doc(alias = "cp_frame_get_drawable_target_view_count")]
#[cfg(feature = "drawable")]
#[inline]
pub unsafe fn drawable_target_view_count(
frame: cp_frame_t,
drawable_target: cp_drawable_target,
) -> usize {
extern "C-unwind" {
fn cp_frame_get_drawable_target_view_count(
frame: cp_frame_t,
drawable_target: cp_drawable_target,
) -> usize;
}
unsafe { cp_frame_get_drawable_target_view_count(frame, drawable_target) }
}
}
extern "C-unwind" {
#[cfg(feature = "cp_types")]
#[deprecated = "renamed to `cp_frame::frame_index`"]
pub fn cp_frame_get_frame_index(frame: cp_frame_t) -> cp_layer_frame_index_t;
}
extern "C-unwind" {
#[cfg(feature = "frame_timing")]
#[deprecated = "renamed to `cp_frame::predict_timing`"]
pub fn cp_frame_predict_timing(frame: cp_frame_t) -> cp_frame_timing_t;
}
extern "C-unwind" {
#[cfg(feature = "drawable")]
#[deprecated = "renamed to `cp_frame::query_drawable`"]
pub fn cp_frame_query_drawable(frame: cp_frame_t) -> cp_drawable_t;
}
extern "C-unwind" {
#[cfg(feature = "drawable")]
#[deprecated = "renamed to `cp_frame::query_drawables`"]
pub fn cp_frame_query_drawables(frame: cp_frame_t) -> cp_drawable_array_t;
}
extern "C-unwind" {
#[deprecated = "renamed to `cp_frame::start_update`"]
pub fn cp_frame_start_update(frame: cp_frame_t);
}
extern "C-unwind" {
#[deprecated = "renamed to `cp_frame::end_update`"]
pub fn cp_frame_end_update(frame: cp_frame_t);
}
extern "C-unwind" {
#[deprecated = "renamed to `cp_frame::start_submission`"]
pub fn cp_frame_start_submission(frame: cp_frame_t);
}
extern "C-unwind" {
#[deprecated = "renamed to `cp_frame::end_submission`"]
pub fn cp_frame_end_submission(frame: cp_frame_t);
}
extern "C-unwind" {
#[cfg(feature = "drawable")]
#[deprecated = "renamed to `cp_frame::drawable_target_view_count`"]
pub fn cp_frame_get_drawable_target_view_count(
frame: cp_frame_t,
drawable_target: cp_drawable_target,
) -> usize;
}