//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;

use crate::*;

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

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

impl CARemoteLayerServer {
    extern_methods!(
        #[unsafe(method(sharedServer))]
        #[unsafe(method_family = none)]
        pub fn sharedServer() -> Retained<CARemoteLayerServer>;

        #[cfg(feature = "libc")]
        #[unsafe(method(serverPort))]
        #[unsafe(method_family = none)]
        pub fn serverPort(&self) -> libc::mach_port_t;
    );
}

/// Methods declared on superclass `NSObject`.
impl CARemoteLayerServer {
    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 CARemoteLayerServer {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}

/// CARemoteLayerServer.
#[cfg(feature = "CALayer")]
impl CALayer {
    extern_methods!(
        #[unsafe(method(layerWithRemoteClientId:))]
        #[unsafe(method_family = none)]
        pub fn layerWithRemoteClientId(client_id: u32) -> Retained<CALayer>;
    );
}
