objc2_ui_kit/generated/
UIRegion.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12 #[unsafe(super(NSObject))]
14 #[thread_kind = MainThreadOnly]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct UIRegion;
17);
18
19extern_conformance!(
20 unsafe impl NSCoding for UIRegion {}
21);
22
23extern_conformance!(
24 unsafe impl NSCopying for UIRegion {}
25);
26
27unsafe impl CopyingHelper for UIRegion {
28 type Result = Self;
29}
30
31extern_conformance!(
32 unsafe impl NSObjectProtocol for UIRegion {}
33);
34
35impl UIRegion {
36 extern_methods!(
37 #[unsafe(method(infiniteRegion))]
39 #[unsafe(method_family = none)]
40 pub fn infiniteRegion(mtm: MainThreadMarker) -> Retained<UIRegion>;
41
42 #[cfg(feature = "objc2-core-foundation")]
43 #[unsafe(method(initWithRadius:))]
45 #[unsafe(method_family = init)]
46 pub fn initWithRadius(this: Allocated<Self>, radius: CGFloat) -> Retained<Self>;
47
48 #[cfg(feature = "objc2-core-foundation")]
49 #[unsafe(method(initWithSize:))]
51 #[unsafe(method_family = init)]
52 pub fn initWithSize(this: Allocated<Self>, size: CGSize) -> Retained<Self>;
53
54 #[unsafe(method(inverseRegion))]
58 #[unsafe(method_family = none)]
59 pub fn inverseRegion(&self) -> Retained<Self>;
60
61 #[unsafe(method(regionByUnionWithRegion:))]
63 #[unsafe(method_family = none)]
64 pub fn regionByUnionWithRegion(&self, region: &UIRegion) -> Retained<Self>;
65
66 #[unsafe(method(regionByDifferenceFromRegion:))]
68 #[unsafe(method_family = none)]
69 pub fn regionByDifferenceFromRegion(&self, region: &UIRegion) -> Retained<Self>;
70
71 #[unsafe(method(regionByIntersectionWithRegion:))]
73 #[unsafe(method_family = none)]
74 pub fn regionByIntersectionWithRegion(&self, region: &UIRegion) -> Retained<Self>;
75
76 #[cfg(feature = "objc2-core-foundation")]
77 #[unsafe(method(containsPoint:))]
79 #[unsafe(method_family = none)]
80 pub fn containsPoint(&self, point: CGPoint) -> bool;
81 );
82}
83
84impl UIRegion {
86 extern_methods!(
87 #[unsafe(method(init))]
88 #[unsafe(method_family = init)]
89 pub fn init(this: Allocated<Self>) -> Retained<Self>;
90
91 #[unsafe(method(new))]
92 #[unsafe(method_family = new)]
93 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
94 );
95}