io_surface.rs

 1#![allow(non_snake_case)]
 2
 3use core_foundation::{
 4    base::{CFTypeID, TCFType},
 5    declare_TCFType, impl_CFTypeDescription, impl_TCFType,
 6};
 7use std::ffi::c_void;
 8
 9#[repr(C)]
10pub struct __IOSurface(c_void);
11// The ref type must be a pointer to the underlying struct.
12pub type IOSurfaceRef = *const __IOSurface;
13
14declare_TCFType!(IOSurface, IOSurfaceRef);
15impl_TCFType!(IOSurface, IOSurfaceRef, IOSurfaceGetTypeID);
16impl_CFTypeDescription!(IOSurface);
17
18#[link(name = "IOSurface", kind = "framework")]
19extern "C" {
20    fn IOSurfaceGetTypeID() -> CFTypeID;
21}