objc2_browser_engine_kit/generated/
BELayerHierarchy.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::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-quartz-core")]
8use objc2_quartz_core::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/browserenginekit/belayerhierarchy?language=objc)
14    #[unsafe(super(NSObject))]
15    #[thread_kind = MainThreadOnly]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct BELayerHierarchy;
18);
19
20extern_conformance!(
21    unsafe impl NSObjectProtocol for BELayerHierarchy {}
22);
23
24impl BELayerHierarchy {
25    extern_methods!(
26        #[unsafe(method(init))]
27        #[unsafe(method_family = init)]
28        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
29
30        #[unsafe(method(new))]
31        #[unsafe(method_family = new)]
32        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
33
34        /// may fail if a connection to the render server cannot be established
35        #[unsafe(method(layerHierarchyWithError:_))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn layerHierarchyWithError(
38            mtm: MainThreadMarker,
39        ) -> Result<Retained<BELayerHierarchy>, Retained<NSError>>;
40
41        #[cfg(feature = "BELayerHierarchyHandle")]
42        /// a reference to this `BELayerHierarchy` for use with `BELayerHierarchyHostingView`
43        #[unsafe(method(handle))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn handle(&self) -> Retained<BELayerHierarchyHandle>;
46
47        #[cfg(feature = "objc2-quartz-core")]
48        /// the root layer of this hierarchy
49        #[unsafe(method(layer))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn layer(&self) -> Option<Retained<CALayer>>;
52
53        #[cfg(feature = "objc2-quartz-core")]
54        /// Setter for [`layer`][Self::layer].
55        #[unsafe(method(setLayer:))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn setLayer(&self, layer: Option<&CALayer>);
58
59        /// invalidate must be called before this layer hierarchy is disposed of
60        #[unsafe(method(invalidate))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn invalidate(&self);
63    );
64}