objc2_accessibility/generated/
AXBrailleMap.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#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-graphics")]
9use objc2_core_graphics::*;
10use objc2_foundation::*;
11
12use crate::*;
13
14extern_class!(
15    /// [Apple's documentation](https://developer.apple.com/documentation/accessibility/axbraillemap?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct AXBrailleMap;
19);
20
21extern_conformance!(
22    unsafe impl NSCoding for AXBrailleMap {}
23);
24
25extern_conformance!(
26    unsafe impl NSCopying for AXBrailleMap {}
27);
28
29unsafe impl CopyingHelper for AXBrailleMap {
30    type Result = Self;
31}
32
33extern_conformance!(
34    unsafe impl NSObjectProtocol for AXBrailleMap {}
35);
36
37extern_conformance!(
38    unsafe impl NSSecureCoding for AXBrailleMap {}
39);
40
41impl AXBrailleMap {
42    extern_methods!(
43        #[cfg(feature = "objc2-core-foundation")]
44        #[unsafe(method(dimensions))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn dimensions(&self) -> CGSize;
47
48        #[cfg(feature = "objc2-core-foundation")]
49        #[unsafe(method(setHeight:atPoint:))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn setHeight_atPoint(&self, status: c_float, point: CGPoint);
52
53        #[cfg(feature = "objc2-core-foundation")]
54        #[unsafe(method(heightAtPoint:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn heightAtPoint(&self, point: CGPoint) -> c_float;
57
58        #[cfg(feature = "objc2-core-graphics")]
59        #[unsafe(method(presentImage:))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn presentImage(&self, image: &CGImage);
62
63        #[unsafe(method(init))]
64        #[unsafe(method_family = init)]
65        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67        #[unsafe(method(new))]
68        #[unsafe(method_family = new)]
69        pub unsafe fn new() -> Retained<Self>;
70    );
71}
72
73extern_protocol!(
74    /// [Apple's documentation](https://developer.apple.com/documentation/accessibility/axbraillemaprenderer?language=objc)
75    pub unsafe trait AXBrailleMapRenderer: NSObjectProtocol {
76        #[cfg(feature = "objc2-core-foundation")]
77        #[optional]
78        #[unsafe(method(accessibilityBrailleMapRenderRegion))]
79        #[unsafe(method_family = none)]
80        unsafe fn accessibilityBrailleMapRenderRegion(&self) -> CGRect;
81
82        #[cfg(feature = "objc2-core-foundation")]
83        /// Setter for [`accessibilityBrailleMapRenderRegion`][Self::accessibilityBrailleMapRenderRegion].
84        #[optional]
85        #[unsafe(method(setAccessibilityBrailleMapRenderRegion:))]
86        #[unsafe(method_family = none)]
87        unsafe fn setAccessibilityBrailleMapRenderRegion(
88            &self,
89            accessibility_braille_map_render_region: CGRect,
90        );
91
92        #[cfg(feature = "block2")]
93        /// # Safety
94        ///
95        /// The returned block's argument must be a valid pointer.
96        #[optional]
97        #[unsafe(method(accessibilityBrailleMapRenderer))]
98        #[unsafe(method_family = none)]
99        unsafe fn accessibilityBrailleMapRenderer(
100            &self,
101        ) -> NonNull<block2::DynBlock<dyn Fn(NonNull<AXBrailleMap>)>>;
102
103        #[cfg(feature = "block2")]
104        /// Setter for [`accessibilityBrailleMapRenderer`][Self::accessibilityBrailleMapRenderer].
105        ///
106        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
107        #[optional]
108        #[unsafe(method(setAccessibilityBrailleMapRenderer:))]
109        #[unsafe(method_family = none)]
110        unsafe fn setAccessibilityBrailleMapRenderer(
111            &self,
112            accessibility_braille_map_renderer: &block2::DynBlock<dyn Fn(NonNull<AXBrailleMap>)>,
113        );
114    }
115);