objc2_quartz_core/generated/
CARemoteLayerClient.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/caremotelayerclient?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct CARemoteLayerClient;
14);
15
16unsafe impl NSObjectProtocol for CARemoteLayerClient {}
17
18impl CARemoteLayerClient {
19    extern_methods!(
20        #[cfg(feature = "libc")]
21        #[unsafe(method(initWithServerPort:))]
22        #[unsafe(method_family = init)]
23        pub unsafe fn initWithServerPort(
24            this: Allocated<Self>,
25            port: libc::mach_port_t,
26        ) -> Retained<Self>;
27
28        #[unsafe(method(invalidate))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn invalidate(&self);
31
32        #[unsafe(method(clientId))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn clientId(&self) -> u32;
35
36        #[cfg(feature = "CALayer")]
37        #[unsafe(method(layer))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn layer(&self) -> Option<Retained<CALayer>>;
40
41        #[cfg(feature = "CALayer")]
42        /// Setter for [`layer`][Self::layer].
43        #[unsafe(method(setLayer:))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn setLayer(&self, layer: Option<&CALayer>);
46    );
47}
48
49/// Methods declared on superclass `NSObject`.
50impl CARemoteLayerClient {
51    extern_methods!(
52        #[unsafe(method(init))]
53        #[unsafe(method_family = init)]
54        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
55
56        #[unsafe(method(new))]
57        #[unsafe(method_family = new)]
58        pub unsafe fn new() -> Retained<Self>;
59    );
60}