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
19unsafe impl NSCoding for UIRegion {}
20
21unsafe impl NSCopying for UIRegion {}
22
23unsafe impl CopyingHelper for UIRegion {
24 type Result = Self;
25}
26
27unsafe impl NSObjectProtocol for UIRegion {}
28
29impl UIRegion {
30 extern_methods!(
31 #[unsafe(method(infiniteRegion))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn infiniteRegion(mtm: MainThreadMarker) -> Retained<UIRegion>;
35
36 #[cfg(feature = "objc2-core-foundation")]
37 #[unsafe(method(initWithRadius:))]
39 #[unsafe(method_family = init)]
40 pub unsafe fn initWithRadius(this: Allocated<Self>, radius: CGFloat) -> Retained<Self>;
41
42 #[cfg(feature = "objc2-core-foundation")]
43 #[unsafe(method(initWithSize:))]
45 #[unsafe(method_family = init)]
46 pub unsafe fn initWithSize(this: Allocated<Self>, size: CGSize) -> Retained<Self>;
47
48 #[unsafe(method(inverseRegion))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn inverseRegion(&self) -> Retained<Self>;
54
55 #[unsafe(method(regionByUnionWithRegion:))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn regionByUnionWithRegion(&self, region: &UIRegion) -> Retained<Self>;
59
60 #[unsafe(method(regionByDifferenceFromRegion:))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn regionByDifferenceFromRegion(&self, region: &UIRegion) -> Retained<Self>;
64
65 #[unsafe(method(regionByIntersectionWithRegion:))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn regionByIntersectionWithRegion(&self, region: &UIRegion) -> Retained<Self>;
69
70 #[cfg(feature = "objc2-core-foundation")]
71 #[unsafe(method(containsPoint:))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn containsPoint(&self, point: CGPoint) -> bool;
75 );
76}
77
78impl UIRegion {
80 extern_methods!(
81 #[unsafe(method(init))]
82 #[unsafe(method_family = init)]
83 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
84
85 #[unsafe(method(new))]
86 #[unsafe(method_family = new)]
87 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
88 );
89}