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
16extern_conformance!(
17    unsafe impl NSObjectProtocol for CARemoteLayerClient {}
18);
19
20impl CARemoteLayerClient {
21    extern_methods!(
22        #[cfg(feature = "libc")]
23        #[unsafe(method(initWithServerPort:))]
24        #[unsafe(method_family = init)]
25        pub unsafe fn initWithServerPort(
26            this: Allocated<Self>,
27            port: libc::mach_port_t,
28        ) -> Retained<Self>;
29
30        #[unsafe(method(invalidate))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn invalidate(&self);
33
34        #[unsafe(method(clientId))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn clientId(&self) -> u32;
37
38        #[cfg(feature = "CALayer")]
39        #[unsafe(method(layer))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn layer(&self) -> Option<Retained<CALayer>>;
42
43        #[cfg(feature = "CALayer")]
44        /// Setter for [`layer`][Self::layer].
45        #[unsafe(method(setLayer:))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn setLayer(&self, layer: Option<&CALayer>);
48    );
49}
50
51/// Methods declared on superclass `NSObject`.
52impl CARemoteLayerClient {
53    extern_methods!(
54        #[unsafe(method(init))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
57
58        #[unsafe(method(new))]
59        #[unsafe(method_family = new)]
60        pub unsafe fn new() -> Retained<Self>;
61    );
62}