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
21unsafe impl NSCoding for AXBrailleMap {}
22
23unsafe impl NSCopying for AXBrailleMap {}
24
25unsafe impl CopyingHelper for AXBrailleMap {
26    type Result = Self;
27}
28
29unsafe impl NSObjectProtocol for AXBrailleMap {}
30
31unsafe impl NSSecureCoding for AXBrailleMap {}
32
33impl AXBrailleMap {
34    extern_methods!(
35        #[cfg(feature = "objc2-core-foundation")]
36        #[unsafe(method(dimensions))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn dimensions(&self) -> CGSize;
39
40        #[cfg(feature = "objc2-core-foundation")]
41        #[unsafe(method(setHeight:atPoint:))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn setHeight_atPoint(&self, status: c_float, point: CGPoint);
44
45        #[cfg(feature = "objc2-core-foundation")]
46        #[unsafe(method(heightAtPoint:))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn heightAtPoint(&self, point: CGPoint) -> c_float;
49
50        #[cfg(feature = "objc2-core-graphics")]
51        #[unsafe(method(presentImage:))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn presentImage(&self, image: &CGImage);
54
55        #[unsafe(method(init))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58
59        #[unsafe(method(new))]
60        #[unsafe(method_family = new)]
61        pub unsafe fn new() -> Retained<Self>;
62    );
63}
64
65extern_protocol!(
66    /// [Apple's documentation](https://developer.apple.com/documentation/accessibility/axbraillemaprenderer?language=objc)
67    pub unsafe trait AXBrailleMapRenderer: NSObjectProtocol {
68        #[cfg(feature = "objc2-core-foundation")]
69        #[optional]
70        #[unsafe(method(accessibilityBrailleMapRenderRegion))]
71        #[unsafe(method_family = none)]
72        unsafe fn accessibilityBrailleMapRenderRegion(&self) -> CGRect;
73
74        #[cfg(feature = "objc2-core-foundation")]
75        /// Setter for [`accessibilityBrailleMapRenderRegion`][Self::accessibilityBrailleMapRenderRegion].
76        #[optional]
77        #[unsafe(method(setAccessibilityBrailleMapRenderRegion:))]
78        #[unsafe(method_family = none)]
79        unsafe fn setAccessibilityBrailleMapRenderRegion(
80            &self,
81            accessibility_braille_map_render_region: CGRect,
82        );
83
84        #[cfg(feature = "block2")]
85        #[optional]
86        #[unsafe(method(accessibilityBrailleMapRenderer))]
87        #[unsafe(method_family = none)]
88        unsafe fn accessibilityBrailleMapRenderer(
89            &self,
90        ) -> NonNull<block2::Block<dyn Fn(NonNull<AXBrailleMap>)>>;
91
92        #[cfg(feature = "block2")]
93        /// Setter for [`accessibilityBrailleMapRenderer`][Self::accessibilityBrailleMapRenderer].
94        #[optional]
95        #[unsafe(method(setAccessibilityBrailleMapRenderer:))]
96        #[unsafe(method_family = none)]
97        unsafe fn setAccessibilityBrailleMapRenderer(
98            &self,
99            accessibility_braille_map_renderer: &block2::Block<dyn Fn(NonNull<AXBrailleMap>)>,
100        );
101    }
102);