objc2_browser_engine_kit/generated/
BEAccessibilityRemoteElement.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
8use crate::*;
9
10extern_class!(
11    /// BEAccessibilityRemoteHostElement connects the accessibility hierarchy of two separate processes. The remote host and remote elements share the same identifier to facilitate this connection. To use this, return this remote element from an object in your view hierarchy via its `accessibilityElements` method.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/browserenginekit/beaccessibilityremotehostelement?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct BEAccessibilityRemoteHostElement;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for BEAccessibilityRemoteHostElement {}
21);
22
23impl BEAccessibilityRemoteHostElement {
24    extern_methods!(
25        #[unsafe(method(init))]
26        #[unsafe(method_family = init)]
27        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
28
29        #[cfg(feature = "libc")]
30        /// Initializes a remote element in the hosting process.
31        ///
32        /// Parameter `identifier`: Unique identifier to connect this remote element to the remote element it hosts. This should be unique per pair of remote elements.
33        ///
34        /// Parameter `remotePid`: The PID of the hosted remote element's process.
35        #[unsafe(method(initWithIdentifier:remotePid:))]
36        #[unsafe(method_family = init)]
37        pub unsafe fn initWithIdentifier_remotePid(
38            this: Allocated<Self>,
39            identifier: &NSString,
40            remote_pid: libc::pid_t,
41        ) -> Retained<Self>;
42
43        /// The accessibility ancestor of this element.
44        ///
45        /// This may be used by accessibility technologies to traverse from the remote element to the elements above it in the hierarchy.
46        #[unsafe(method(accessibilityContainer))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn accessibilityContainer(&self) -> Option<Retained<AnyObject>>;
49
50        /// Setter for [`accessibilityContainer`][Self::accessibilityContainer].
51        ///
52        /// This is a [weak property][objc2::topics::weak_property].
53        ///
54        /// # Safety
55        ///
56        /// `accessibility_container` should be of the correct type.
57        #[unsafe(method(setAccessibilityContainer:))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn setAccessibilityContainer(&self, accessibility_container: Option<&AnyObject>);
60    );
61}
62
63/// Methods declared on superclass `NSObject`.
64impl BEAccessibilityRemoteHostElement {
65    extern_methods!(
66        #[unsafe(method(new))]
67        #[unsafe(method_family = new)]
68        pub unsafe fn new() -> Retained<Self>;
69    );
70}
71
72extern_class!(
73    /// BEAccessibilityRemoteElement represents the destination of a BEAccessibilityRemoteHostElement in a different process. The elements it contains are defined by the `accessibilityElements` API. `BEAccessibilityRemoteElement` does not need to be returned in any element array.
74    ///
75    /// See also [Apple's documentation](https://developer.apple.com/documentation/browserenginekit/beaccessibilityremoteelement?language=objc)
76    #[unsafe(super(NSObject))]
77    #[derive(Debug, PartialEq, Eq, Hash)]
78    pub struct BEAccessibilityRemoteElement;
79);
80
81extern_conformance!(
82    unsafe impl NSObjectProtocol for BEAccessibilityRemoteElement {}
83);
84
85impl BEAccessibilityRemoteElement {
86    extern_methods!(
87        #[unsafe(method(init))]
88        #[unsafe(method_family = init)]
89        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
90
91        #[cfg(feature = "libc")]
92        /// Initializes and registers a remote element. This element doesn't need to be returned anywhere.
93        ///
94        /// Parameter `identifier`: Unique identifier to connect this remote element to the hosting remote element. This should be unique per pair of remote elements.
95        ///
96        /// Parameter `hostPid`: The PID of the host's remote element process.
97        #[unsafe(method(initWithIdentifier:hostPid:))]
98        #[unsafe(method_family = init)]
99        pub unsafe fn initWithIdentifier_hostPid(
100            this: Allocated<Self>,
101            identifier: &NSString,
102            host_pid: libc::pid_t,
103        ) -> Retained<Self>;
104    );
105}
106
107/// Methods declared on superclass `NSObject`.
108impl BEAccessibilityRemoteElement {
109    extern_methods!(
110        #[unsafe(method(new))]
111        #[unsafe(method_family = new)]
112        pub unsafe fn new() -> Retained<Self>;
113    );
114}