objc2_ui_kit/generated/
UIGeometry.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::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiedgeinsets?language=objc)
13#[cfg(feature = "objc2-core-foundation")]
14#[repr(C)]
15#[derive(Clone, Copy, Debug, PartialEq)]
16pub struct UIEdgeInsets {
17    pub top: CGFloat,
18    pub left: CGFloat,
19    pub bottom: CGFloat,
20    pub right: CGFloat,
21}
22
23#[cfg(feature = "objc2-core-foundation")]
24unsafe impl Encode for UIEdgeInsets {
25    const ENCODING: Encoding = Encoding::Struct(
26        "UIEdgeInsets",
27        &[
28            <CGFloat>::ENCODING,
29            <CGFloat>::ENCODING,
30            <CGFloat>::ENCODING,
31            <CGFloat>::ENCODING,
32        ],
33    );
34}
35
36#[cfg(feature = "objc2-core-foundation")]
37unsafe impl RefEncode for UIEdgeInsets {
38    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
39}
40
41#[cfg(feature = "objc2-core-foundation")]
42unsafe impl Send for UIEdgeInsets {}
43
44#[cfg(feature = "objc2-core-foundation")]
45unsafe impl Sync for UIEdgeInsets {}
46
47/// [Apple's documentation](https://developer.apple.com/documentation/uikit/nsdirectionaledgeinsets?language=objc)
48#[cfg(feature = "objc2-core-foundation")]
49#[repr(C)]
50#[derive(Clone, Copy, Debug, PartialEq)]
51pub struct NSDirectionalEdgeInsets {
52    pub top: CGFloat,
53    pub leading: CGFloat,
54    pub bottom: CGFloat,
55    pub trailing: CGFloat,
56}
57
58#[cfg(feature = "objc2-core-foundation")]
59unsafe impl Encode for NSDirectionalEdgeInsets {
60    const ENCODING: Encoding = Encoding::Struct(
61        "NSDirectionalEdgeInsets",
62        &[
63            <CGFloat>::ENCODING,
64            <CGFloat>::ENCODING,
65            <CGFloat>::ENCODING,
66            <CGFloat>::ENCODING,
67        ],
68    );
69}
70
71#[cfg(feature = "objc2-core-foundation")]
72unsafe impl RefEncode for NSDirectionalEdgeInsets {
73    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
74}
75
76#[cfg(feature = "objc2-core-foundation")]
77unsafe impl Send for NSDirectionalEdgeInsets {}
78
79#[cfg(feature = "objc2-core-foundation")]
80unsafe impl Sync for NSDirectionalEdgeInsets {}
81
82/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uioffset?language=objc)
83#[cfg(feature = "objc2-core-foundation")]
84#[repr(C)]
85#[derive(Clone, Copy, Debug, PartialEq)]
86pub struct UIOffset {
87    pub horizontal: CGFloat,
88    pub vertical: CGFloat,
89}
90
91#[cfg(feature = "objc2-core-foundation")]
92unsafe impl Encode for UIOffset {
93    const ENCODING: Encoding =
94        Encoding::Struct("UIOffset", &[<CGFloat>::ENCODING, <CGFloat>::ENCODING]);
95}
96
97#[cfg(feature = "objc2-core-foundation")]
98unsafe impl RefEncode for UIOffset {
99    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
100}
101
102#[cfg(feature = "objc2-core-foundation")]
103unsafe impl Send for UIOffset {}
104
105#[cfg(feature = "objc2-core-foundation")]
106unsafe impl Sync for UIOffset {}
107
108/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uirectedge?language=objc)
109// NS_OPTIONS
110#[repr(transparent)]
111#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
112pub struct UIRectEdge(pub NSUInteger);
113bitflags::bitflags! {
114    impl UIRectEdge: NSUInteger {
115        #[doc(alias = "UIRectEdgeNone")]
116        const None = 0;
117        #[doc(alias = "UIRectEdgeTop")]
118        const Top = 1<<0;
119        #[doc(alias = "UIRectEdgeLeft")]
120        const Left = 1<<1;
121        #[doc(alias = "UIRectEdgeBottom")]
122        const Bottom = 1<<2;
123        #[doc(alias = "UIRectEdgeRight")]
124        const Right = 1<<3;
125        #[doc(alias = "UIRectEdgeAll")]
126        const All = UIRectEdge::Top.0|UIRectEdge::Left.0|UIRectEdge::Bottom.0|UIRectEdge::Right.0;
127    }
128}
129
130unsafe impl Encode for UIRectEdge {
131    const ENCODING: Encoding = NSUInteger::ENCODING;
132}
133
134unsafe impl RefEncode for UIRectEdge {
135    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
136}
137
138/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uirectcorner?language=objc)
139// NS_OPTIONS
140#[repr(transparent)]
141#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
142pub struct UIRectCorner(pub NSUInteger);
143bitflags::bitflags! {
144    impl UIRectCorner: NSUInteger {
145        #[doc(alias = "UIRectCornerTopLeft")]
146        const TopLeft = 1<<0;
147        #[doc(alias = "UIRectCornerTopRight")]
148        const TopRight = 1<<1;
149        #[doc(alias = "UIRectCornerBottomLeft")]
150        const BottomLeft = 1<<2;
151        #[doc(alias = "UIRectCornerBottomRight")]
152        const BottomRight = 1<<3;
153        #[doc(alias = "UIRectCornerAllCorners")]
154        const AllCorners = !0;
155    }
156}
157
158unsafe impl Encode for UIRectCorner {
159    const ENCODING: Encoding = NSUInteger::ENCODING;
160}
161
162unsafe impl RefEncode for UIRectCorner {
163    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
164}
165
166/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiaxis?language=objc)
167// NS_OPTIONS
168#[repr(transparent)]
169#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
170pub struct UIAxis(pub NSUInteger);
171bitflags::bitflags! {
172    impl UIAxis: NSUInteger {
173        #[doc(alias = "UIAxisNeither")]
174        const Neither = 0;
175        #[doc(alias = "UIAxisHorizontal")]
176        const Horizontal = 1<<0;
177        #[doc(alias = "UIAxisVertical")]
178        const Vertical = 1<<1;
179        #[doc(alias = "UIAxisBoth")]
180        const Both = UIAxis::Horizontal.0|UIAxis::Vertical.0;
181    }
182}
183
184unsafe impl Encode for UIAxis {
185    const ENCODING: Encoding = NSUInteger::ENCODING;
186}
187
188unsafe impl RefEncode for UIAxis {
189    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
190}
191
192/// [Apple's documentation](https://developer.apple.com/documentation/uikit/nsdirectionalrectedge?language=objc)
193// NS_OPTIONS
194#[repr(transparent)]
195#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
196pub struct NSDirectionalRectEdge(pub NSUInteger);
197bitflags::bitflags! {
198    impl NSDirectionalRectEdge: NSUInteger {
199        #[doc(alias = "NSDirectionalRectEdgeNone")]
200        const None = 0;
201        #[doc(alias = "NSDirectionalRectEdgeTop")]
202        const Top = 1<<0;
203        #[doc(alias = "NSDirectionalRectEdgeLeading")]
204        const Leading = 1<<1;
205        #[doc(alias = "NSDirectionalRectEdgeBottom")]
206        const Bottom = 1<<2;
207        #[doc(alias = "NSDirectionalRectEdgeTrailing")]
208        const Trailing = 1<<3;
209        #[doc(alias = "NSDirectionalRectEdgeAll")]
210        const All = NSDirectionalRectEdge::Top.0|NSDirectionalRectEdge::Leading.0|NSDirectionalRectEdge::Bottom.0|NSDirectionalRectEdge::Trailing.0;
211    }
212}
213
214unsafe impl Encode for NSDirectionalRectEdge {
215    const ENCODING: Encoding = NSUInteger::ENCODING;
216}
217
218unsafe impl RefEncode for NSDirectionalRectEdge {
219    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
220}
221
222/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uidirectionalrectedge?language=objc)
223// NS_OPTIONS
224#[deprecated]
225#[repr(transparent)]
226#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
227pub struct UIDirectionalRectEdge(pub NSUInteger);
228bitflags::bitflags! {
229    impl UIDirectionalRectEdge: NSUInteger {
230#[deprecated]
231        #[doc(alias = "UIDirectionalRectEdgeNone")]
232        const None = 0;
233#[deprecated]
234        #[doc(alias = "UIDirectionalRectEdgeTop")]
235        const Top = 1<<0;
236#[deprecated]
237        #[doc(alias = "UIDirectionalRectEdgeLeading")]
238        const Leading = 1<<1;
239#[deprecated]
240        #[doc(alias = "UIDirectionalRectEdgeBottom")]
241        const Bottom = 1<<2;
242#[deprecated]
243        #[doc(alias = "UIDirectionalRectEdgeTrailing")]
244        const Trailing = 1<<3;
245#[deprecated]
246        #[doc(alias = "UIDirectionalRectEdgeAll")]
247        const All = UIDirectionalRectEdge::Top.0|UIDirectionalRectEdge::Leading.0|UIDirectionalRectEdge::Bottom.0|UIDirectionalRectEdge::Trailing.0;
248    }
249}
250
251unsafe impl Encode for UIDirectionalRectEdge {
252    const ENCODING: Encoding = NSUInteger::ENCODING;
253}
254
255unsafe impl RefEncode for UIDirectionalRectEdge {
256    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
257}
258
259/// [Apple's documentation](https://developer.apple.com/documentation/uikit/nsrectalignment?language=objc)
260// NS_ENUM
261#[repr(transparent)]
262#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
263pub struct NSRectAlignment(pub NSInteger);
264impl NSRectAlignment {
265    #[doc(alias = "NSRectAlignmentNone")]
266    pub const None: Self = Self(0);
267    #[doc(alias = "NSRectAlignmentTop")]
268    pub const Top: Self = Self(1);
269    #[doc(alias = "NSRectAlignmentTopLeading")]
270    pub const TopLeading: Self = Self(2);
271    #[doc(alias = "NSRectAlignmentLeading")]
272    pub const Leading: Self = Self(3);
273    #[doc(alias = "NSRectAlignmentBottomLeading")]
274    pub const BottomLeading: Self = Self(4);
275    #[doc(alias = "NSRectAlignmentBottom")]
276    pub const Bottom: Self = Self(5);
277    #[doc(alias = "NSRectAlignmentBottomTrailing")]
278    pub const BottomTrailing: Self = Self(6);
279    #[doc(alias = "NSRectAlignmentTrailing")]
280    pub const Trailing: Self = Self(7);
281    #[doc(alias = "NSRectAlignmentTopTrailing")]
282    pub const TopTrailing: Self = Self(8);
283}
284
285unsafe impl Encode for NSRectAlignment {
286    const ENCODING: Encoding = NSInteger::ENCODING;
287}
288
289unsafe impl RefEncode for NSRectAlignment {
290    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
291}
292
293// TODO: pub fn UIEdgeInsetsMake(top: CGFloat,left: CGFloat,bottom: CGFloat,right: CGFloat,) -> UIEdgeInsets;
294
295// TODO: pub fn NSDirectionalEdgeInsetsMake(top: CGFloat,leading: CGFloat,bottom: CGFloat,trailing: CGFloat,) -> NSDirectionalEdgeInsets;
296
297// TODO: pub fn UIEdgeInsetsInsetRect(rect: CGRect,insets: UIEdgeInsets,) -> CGRect;
298
299// TODO: pub fn UIOffsetMake(horizontal: CGFloat,vertical: CGFloat,) -> UIOffset;
300
301// TODO: pub fn UIEdgeInsetsEqualToEdgeInsets(insets1: UIEdgeInsets,insets2: UIEdgeInsets,) -> Bool;
302
303// TODO: pub fn NSDirectionalEdgeInsetsEqualToDirectionalEdgeInsets(insets1: NSDirectionalEdgeInsets,insets2: NSDirectionalEdgeInsets,) -> Bool;
304
305// TODO: pub fn UIOffsetEqualToOffset(offset1: UIOffset,offset2: UIOffset,) -> Bool;
306
307extern "C" {
308    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiedgeinsetszero?language=objc)
309    #[cfg(feature = "objc2-core-foundation")]
310    pub static UIEdgeInsetsZero: UIEdgeInsets;
311}
312
313extern "C" {
314    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/nsdirectionaledgeinsetszero?language=objc)
315    #[cfg(feature = "objc2-core-foundation")]
316    pub static NSDirectionalEdgeInsetsZero: NSDirectionalEdgeInsets;
317}
318
319extern "C" {
320    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uioffsetzero?language=objc)
321    #[cfg(feature = "objc2-core-foundation")]
322    pub static UIOffsetZero: UIOffset;
323}
324
325#[cfg(feature = "objc2-core-foundation")]
326#[inline]
327pub unsafe extern "C-unwind" fn NSStringFromCGPoint(point: CGPoint) -> Retained<NSString> {
328    extern "C-unwind" {
329        fn NSStringFromCGPoint(point: CGPoint) -> *mut NSString;
330    }
331    let ret = unsafe { NSStringFromCGPoint(point) };
332    unsafe { Retained::retain_autoreleased(ret) }
333        .expect("function was marked as returning non-null, but actually returned NULL")
334}
335
336#[cfg(feature = "objc2-core-foundation")]
337#[inline]
338pub unsafe extern "C-unwind" fn NSStringFromCGVector(vector: CGVector) -> Retained<NSString> {
339    extern "C-unwind" {
340        fn NSStringFromCGVector(vector: CGVector) -> *mut NSString;
341    }
342    let ret = unsafe { NSStringFromCGVector(vector) };
343    unsafe { Retained::retain_autoreleased(ret) }
344        .expect("function was marked as returning non-null, but actually returned NULL")
345}
346
347#[cfg(feature = "objc2-core-foundation")]
348#[inline]
349pub unsafe extern "C-unwind" fn NSStringFromCGSize(size: CGSize) -> Retained<NSString> {
350    extern "C-unwind" {
351        fn NSStringFromCGSize(size: CGSize) -> *mut NSString;
352    }
353    let ret = unsafe { NSStringFromCGSize(size) };
354    unsafe { Retained::retain_autoreleased(ret) }
355        .expect("function was marked as returning non-null, but actually returned NULL")
356}
357
358#[cfg(feature = "objc2-core-foundation")]
359#[inline]
360pub unsafe extern "C-unwind" fn NSStringFromCGRect(rect: CGRect) -> Retained<NSString> {
361    extern "C-unwind" {
362        fn NSStringFromCGRect(rect: CGRect) -> *mut NSString;
363    }
364    let ret = unsafe { NSStringFromCGRect(rect) };
365    unsafe { Retained::retain_autoreleased(ret) }
366        .expect("function was marked as returning non-null, but actually returned NULL")
367}
368
369#[cfg(feature = "objc2-core-foundation")]
370#[inline]
371pub unsafe extern "C-unwind" fn NSStringFromCGAffineTransform(
372    transform: CGAffineTransform,
373) -> Retained<NSString> {
374    extern "C-unwind" {
375        fn NSStringFromCGAffineTransform(transform: CGAffineTransform) -> *mut NSString;
376    }
377    let ret = unsafe { NSStringFromCGAffineTransform(transform) };
378    unsafe { Retained::retain_autoreleased(ret) }
379        .expect("function was marked as returning non-null, but actually returned NULL")
380}
381
382#[cfg(feature = "objc2-core-foundation")]
383#[inline]
384pub unsafe extern "C-unwind" fn NSStringFromUIEdgeInsets(
385    insets: UIEdgeInsets,
386) -> Retained<NSString> {
387    extern "C-unwind" {
388        fn NSStringFromUIEdgeInsets(insets: UIEdgeInsets) -> *mut NSString;
389    }
390    let ret = unsafe { NSStringFromUIEdgeInsets(insets) };
391    unsafe { Retained::retain_autoreleased(ret) }
392        .expect("function was marked as returning non-null, but actually returned NULL")
393}
394
395#[cfg(feature = "objc2-core-foundation")]
396#[inline]
397pub unsafe extern "C-unwind" fn NSStringFromDirectionalEdgeInsets(
398    insets: NSDirectionalEdgeInsets,
399) -> Retained<NSString> {
400    extern "C-unwind" {
401        fn NSStringFromDirectionalEdgeInsets(insets: NSDirectionalEdgeInsets) -> *mut NSString;
402    }
403    let ret = unsafe { NSStringFromDirectionalEdgeInsets(insets) };
404    unsafe { Retained::retain_autoreleased(ret) }
405        .expect("function was marked as returning non-null, but actually returned NULL")
406}
407
408#[cfg(feature = "objc2-core-foundation")]
409#[inline]
410pub unsafe extern "C-unwind" fn NSStringFromUIOffset(offset: UIOffset) -> Retained<NSString> {
411    extern "C-unwind" {
412        fn NSStringFromUIOffset(offset: UIOffset) -> *mut NSString;
413    }
414    let ret = unsafe { NSStringFromUIOffset(offset) };
415    unsafe { Retained::retain_autoreleased(ret) }
416        .expect("function was marked as returning non-null, but actually returned NULL")
417}
418
419extern "C-unwind" {
420    #[cfg(feature = "objc2-core-foundation")]
421    pub fn CGPointFromString(string: &NSString) -> CGPoint;
422}
423
424extern "C-unwind" {
425    #[cfg(feature = "objc2-core-foundation")]
426    pub fn CGVectorFromString(string: &NSString) -> CGVector;
427}
428
429extern "C-unwind" {
430    #[cfg(feature = "objc2-core-foundation")]
431    pub fn CGSizeFromString(string: &NSString) -> CGSize;
432}
433
434extern "C-unwind" {
435    #[cfg(feature = "objc2-core-foundation")]
436    pub fn CGRectFromString(string: &NSString) -> CGRect;
437}
438
439extern "C-unwind" {
440    #[cfg(feature = "objc2-core-foundation")]
441    pub fn CGAffineTransformFromString(string: &NSString) -> CGAffineTransform;
442}
443
444extern "C-unwind" {
445    #[cfg(feature = "objc2-core-foundation")]
446    pub fn UIEdgeInsetsFromString(string: &NSString) -> UIEdgeInsets;
447}
448
449extern "C-unwind" {
450    #[cfg(feature = "objc2-core-foundation")]
451    pub fn NSDirectionalEdgeInsetsFromString(string: &NSString) -> NSDirectionalEdgeInsets;
452}
453
454extern "C-unwind" {
455    #[cfg(feature = "objc2-core-foundation")]
456    pub fn UIOffsetFromString(string: &NSString) -> UIOffset;
457}
458
459mod private_NSValueUIGeometryExtensions {
460    pub trait Sealed {}
461}
462
463/// Category on [`NSValue`].
464pub unsafe trait NSValueUIGeometryExtensions:
465    ClassType + Sized + private_NSValueUIGeometryExtensions::Sealed
466{
467    extern_methods!(
468        #[cfg(feature = "objc2-core-foundation")]
469        #[unsafe(method(valueWithCGPoint:))]
470        #[unsafe(method_family = none)]
471        unsafe fn valueWithCGPoint(point: CGPoint) -> Retained<NSValue>;
472
473        #[cfg(feature = "objc2-core-foundation")]
474        #[unsafe(method(valueWithCGVector:))]
475        #[unsafe(method_family = none)]
476        unsafe fn valueWithCGVector(vector: CGVector) -> Retained<NSValue>;
477
478        #[cfg(feature = "objc2-core-foundation")]
479        #[unsafe(method(valueWithCGSize:))]
480        #[unsafe(method_family = none)]
481        unsafe fn valueWithCGSize(size: CGSize) -> Retained<NSValue>;
482
483        #[cfg(feature = "objc2-core-foundation")]
484        #[unsafe(method(valueWithCGRect:))]
485        #[unsafe(method_family = none)]
486        unsafe fn valueWithCGRect(rect: CGRect) -> Retained<NSValue>;
487
488        #[cfg(feature = "objc2-core-foundation")]
489        #[unsafe(method(valueWithCGAffineTransform:))]
490        #[unsafe(method_family = none)]
491        unsafe fn valueWithCGAffineTransform(transform: CGAffineTransform) -> Retained<NSValue>;
492
493        #[cfg(feature = "objc2-core-foundation")]
494        #[unsafe(method(valueWithUIEdgeInsets:))]
495        #[unsafe(method_family = none)]
496        unsafe fn valueWithUIEdgeInsets(insets: UIEdgeInsets) -> Retained<NSValue>;
497
498        #[cfg(feature = "objc2-core-foundation")]
499        #[unsafe(method(valueWithDirectionalEdgeInsets:))]
500        #[unsafe(method_family = none)]
501        unsafe fn valueWithDirectionalEdgeInsets(
502            insets: NSDirectionalEdgeInsets,
503        ) -> Retained<NSValue>;
504
505        #[cfg(feature = "objc2-core-foundation")]
506        #[unsafe(method(valueWithUIOffset:))]
507        #[unsafe(method_family = none)]
508        unsafe fn valueWithUIOffset(insets: UIOffset) -> Retained<NSValue>;
509
510        #[cfg(feature = "objc2-core-foundation")]
511        #[unsafe(method(CGPointValue))]
512        #[unsafe(method_family = none)]
513        unsafe fn CGPointValue(&self) -> CGPoint;
514
515        #[cfg(feature = "objc2-core-foundation")]
516        #[unsafe(method(CGVectorValue))]
517        #[unsafe(method_family = none)]
518        unsafe fn CGVectorValue(&self) -> CGVector;
519
520        #[cfg(feature = "objc2-core-foundation")]
521        #[unsafe(method(CGSizeValue))]
522        #[unsafe(method_family = none)]
523        unsafe fn CGSizeValue(&self) -> CGSize;
524
525        #[cfg(feature = "objc2-core-foundation")]
526        #[unsafe(method(CGRectValue))]
527        #[unsafe(method_family = none)]
528        unsafe fn CGRectValue(&self) -> CGRect;
529
530        #[cfg(feature = "objc2-core-foundation")]
531        #[unsafe(method(CGAffineTransformValue))]
532        #[unsafe(method_family = none)]
533        unsafe fn CGAffineTransformValue(&self) -> CGAffineTransform;
534
535        #[cfg(feature = "objc2-core-foundation")]
536        #[unsafe(method(UIEdgeInsetsValue))]
537        #[unsafe(method_family = none)]
538        unsafe fn UIEdgeInsetsValue(&self) -> UIEdgeInsets;
539
540        #[cfg(feature = "objc2-core-foundation")]
541        #[unsafe(method(directionalEdgeInsetsValue))]
542        #[unsafe(method_family = none)]
543        unsafe fn directionalEdgeInsetsValue(&self) -> NSDirectionalEdgeInsets;
544
545        #[cfg(feature = "objc2-core-foundation")]
546        #[unsafe(method(UIOffsetValue))]
547        #[unsafe(method_family = none)]
548        unsafe fn UIOffsetValue(&self) -> UIOffset;
549    );
550}
551
552impl private_NSValueUIGeometryExtensions::Sealed for NSValue {}
553unsafe impl NSValueUIGeometryExtensions for NSValue {}
554
555mod private_NSCoderUIGeometryKeyedCoding {
556    pub trait Sealed {}
557}
558
559/// Category "UIGeometryKeyedCoding" on [`NSCoder`].
560#[doc(alias = "UIGeometryKeyedCoding")]
561pub unsafe trait NSCoderUIGeometryKeyedCoding:
562    ClassType + Sized + private_NSCoderUIGeometryKeyedCoding::Sealed
563{
564    extern_methods!(
565        #[cfg(feature = "objc2-core-foundation")]
566        #[unsafe(method(encodeCGPoint:forKey:))]
567        #[unsafe(method_family = none)]
568        unsafe fn encodeCGPoint_forKey(&self, point: CGPoint, key: &NSString);
569
570        #[cfg(feature = "objc2-core-foundation")]
571        #[unsafe(method(encodeCGVector:forKey:))]
572        #[unsafe(method_family = none)]
573        unsafe fn encodeCGVector_forKey(&self, vector: CGVector, key: &NSString);
574
575        #[cfg(feature = "objc2-core-foundation")]
576        #[unsafe(method(encodeCGSize:forKey:))]
577        #[unsafe(method_family = none)]
578        unsafe fn encodeCGSize_forKey(&self, size: CGSize, key: &NSString);
579
580        #[cfg(feature = "objc2-core-foundation")]
581        #[unsafe(method(encodeCGRect:forKey:))]
582        #[unsafe(method_family = none)]
583        unsafe fn encodeCGRect_forKey(&self, rect: CGRect, key: &NSString);
584
585        #[cfg(feature = "objc2-core-foundation")]
586        #[unsafe(method(encodeCGAffineTransform:forKey:))]
587        #[unsafe(method_family = none)]
588        unsafe fn encodeCGAffineTransform_forKey(
589            &self,
590            transform: CGAffineTransform,
591            key: &NSString,
592        );
593
594        #[cfg(feature = "objc2-core-foundation")]
595        #[unsafe(method(encodeUIEdgeInsets:forKey:))]
596        #[unsafe(method_family = none)]
597        unsafe fn encodeUIEdgeInsets_forKey(&self, insets: UIEdgeInsets, key: &NSString);
598
599        #[cfg(feature = "objc2-core-foundation")]
600        #[unsafe(method(encodeDirectionalEdgeInsets:forKey:))]
601        #[unsafe(method_family = none)]
602        unsafe fn encodeDirectionalEdgeInsets_forKey(
603            &self,
604            insets: NSDirectionalEdgeInsets,
605            key: &NSString,
606        );
607
608        #[cfg(feature = "objc2-core-foundation")]
609        #[unsafe(method(encodeUIOffset:forKey:))]
610        #[unsafe(method_family = none)]
611        unsafe fn encodeUIOffset_forKey(&self, offset: UIOffset, key: &NSString);
612
613        #[cfg(feature = "objc2-core-foundation")]
614        #[unsafe(method(decodeCGPointForKey:))]
615        #[unsafe(method_family = none)]
616        unsafe fn decodeCGPointForKey(&self, key: &NSString) -> CGPoint;
617
618        #[cfg(feature = "objc2-core-foundation")]
619        #[unsafe(method(decodeCGVectorForKey:))]
620        #[unsafe(method_family = none)]
621        unsafe fn decodeCGVectorForKey(&self, key: &NSString) -> CGVector;
622
623        #[cfg(feature = "objc2-core-foundation")]
624        #[unsafe(method(decodeCGSizeForKey:))]
625        #[unsafe(method_family = none)]
626        unsafe fn decodeCGSizeForKey(&self, key: &NSString) -> CGSize;
627
628        #[cfg(feature = "objc2-core-foundation")]
629        #[unsafe(method(decodeCGRectForKey:))]
630        #[unsafe(method_family = none)]
631        unsafe fn decodeCGRectForKey(&self, key: &NSString) -> CGRect;
632
633        #[cfg(feature = "objc2-core-foundation")]
634        #[unsafe(method(decodeCGAffineTransformForKey:))]
635        #[unsafe(method_family = none)]
636        unsafe fn decodeCGAffineTransformForKey(&self, key: &NSString) -> CGAffineTransform;
637
638        #[cfg(feature = "objc2-core-foundation")]
639        #[unsafe(method(decodeUIEdgeInsetsForKey:))]
640        #[unsafe(method_family = none)]
641        unsafe fn decodeUIEdgeInsetsForKey(&self, key: &NSString) -> UIEdgeInsets;
642
643        #[cfg(feature = "objc2-core-foundation")]
644        #[unsafe(method(decodeDirectionalEdgeInsetsForKey:))]
645        #[unsafe(method_family = none)]
646        unsafe fn decodeDirectionalEdgeInsetsForKey(
647            &self,
648            key: &NSString,
649        ) -> NSDirectionalEdgeInsets;
650
651        #[cfg(feature = "objc2-core-foundation")]
652        #[unsafe(method(decodeUIOffsetForKey:))]
653        #[unsafe(method_family = none)]
654        unsafe fn decodeUIOffsetForKey(&self, key: &NSString) -> UIOffset;
655    );
656}
657
658impl private_NSCoderUIGeometryKeyedCoding::Sealed for NSCoder {}
659unsafe impl NSCoderUIGeometryKeyedCoding for NSCoder {}