objc2-core-graphics 0.3.2

Bindings to the CoreGraphics framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-metal")]
#[cfg(not(target_os = "watchos"))]
use objc2_metal::*;

use crate::*;

#[cfg(all(
    feature = "CGDirectDisplay",
    feature = "objc2",
    feature = "objc2-metal"
))]
#[cfg(not(target_os = "watchos"))]
#[inline]
pub extern "C-unwind" fn CGDirectDisplayCopyCurrentMetalDevice(
    display: CGDirectDisplayID,
) -> Option<Retained<ProtocolObject<dyn MTLDevice>>> {
    extern "C-unwind" {
        fn CGDirectDisplayCopyCurrentMetalDevice(
            display: CGDirectDisplayID,
        ) -> *mut ProtocolObject<dyn MTLDevice>;
    }
    let ret = unsafe { CGDirectDisplayCopyCurrentMetalDevice(display) };
    unsafe { Retained::from_raw(ret) }
}