objc2-quartz-core 0.3.2

Bindings to the QuartzCore/CoreAnimation framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/caremotelayerclient?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CARemoteLayerClient;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for CARemoteLayerClient {}
);

impl CARemoteLayerClient {
    extern_methods!(
        #[cfg(feature = "libc")]
        #[unsafe(method(initWithServerPort:))]
        #[unsafe(method_family = init)]
        pub fn initWithServerPort(this: Allocated<Self>, port: libc::mach_port_t)
            -> Retained<Self>;

        #[unsafe(method(invalidate))]
        #[unsafe(method_family = none)]
        pub fn invalidate(&self);

        #[unsafe(method(clientId))]
        #[unsafe(method_family = none)]
        pub fn clientId(&self) -> u32;

        #[cfg(feature = "CALayer")]
        #[unsafe(method(layer))]
        #[unsafe(method_family = none)]
        pub fn layer(&self) -> Option<Retained<CALayer>>;

        #[cfg(feature = "CALayer")]
        /// Setter for [`layer`][Self::layer].
        #[unsafe(method(setLayer:))]
        #[unsafe(method_family = none)]
        pub fn setLayer(&self, layer: Option<&CALayer>);
    );
}

/// Methods declared on superclass `NSObject`.
impl CARemoteLayerClient {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new() -> Retained<Self>;
    );
}

impl DefaultRetained for CARemoteLayerClient {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}