1use 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#[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#[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#[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#[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#[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#[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#[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#[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 #[doc(alias = "UIDirectionalRectEdgeNone")]
231#[deprecated]
232 const None = 0;
233 #[doc(alias = "UIDirectionalRectEdgeTop")]
234#[deprecated]
235 const Top = 1<<0;
236 #[doc(alias = "UIDirectionalRectEdgeLeading")]
237#[deprecated]
238 const Leading = 1<<1;
239 #[doc(alias = "UIDirectionalRectEdgeBottom")]
240#[deprecated]
241 const Bottom = 1<<2;
242 #[doc(alias = "UIDirectionalRectEdgeTrailing")]
243#[deprecated]
244 const Trailing = 1<<3;
245 #[doc(alias = "UIDirectionalRectEdgeAll")]
246#[deprecated]
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#[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#[cfg(feature = "objc2-core-foundation")]
294impl UIEdgeInsets {
295 }
297
298#[cfg(feature = "objc2-core-foundation")]
299impl NSDirectionalEdgeInsets {
300 }
302
303#[cfg(feature = "objc2-core-foundation")]
304impl UIEdgeInsets {
305 }
307
308#[cfg(feature = "objc2-core-foundation")]
309impl UIOffset {
310 }
312
313#[cfg(feature = "objc2-core-foundation")]
314impl UIEdgeInsets {
315 }
317
318#[cfg(feature = "objc2-core-foundation")]
319impl NSDirectionalEdgeInsets {
320 }
322
323#[cfg(feature = "objc2-core-foundation")]
324impl UIOffset {
325 }
327
328extern "C" {
329 #[cfg(feature = "objc2-core-foundation")]
331 pub static UIEdgeInsetsZero: UIEdgeInsets;
332}
333
334extern "C" {
335 #[cfg(feature = "objc2-core-foundation")]
337 pub static NSDirectionalEdgeInsetsZero: NSDirectionalEdgeInsets;
338}
339
340extern "C" {
341 #[cfg(feature = "objc2-core-foundation")]
343 pub static UIOffsetZero: UIOffset;
344}
345
346#[cfg(feature = "objc2-core-foundation")]
347#[inline]
348pub unsafe extern "C-unwind" fn NSStringFromCGPoint(point: CGPoint) -> Retained<NSString> {
349 extern "C-unwind" {
350 fn NSStringFromCGPoint(point: CGPoint) -> *mut NSString;
351 }
352 let ret = unsafe { NSStringFromCGPoint(point) };
353 unsafe { Retained::retain_autoreleased(ret) }
354 .expect("function was marked as returning non-null, but actually returned NULL")
355}
356
357#[cfg(feature = "objc2-core-foundation")]
358#[inline]
359pub unsafe extern "C-unwind" fn NSStringFromCGVector(vector: CGVector) -> Retained<NSString> {
360 extern "C-unwind" {
361 fn NSStringFromCGVector(vector: CGVector) -> *mut NSString;
362 }
363 let ret = unsafe { NSStringFromCGVector(vector) };
364 unsafe { Retained::retain_autoreleased(ret) }
365 .expect("function was marked as returning non-null, but actually returned NULL")
366}
367
368#[cfg(feature = "objc2-core-foundation")]
369#[inline]
370pub unsafe extern "C-unwind" fn NSStringFromCGSize(size: CGSize) -> Retained<NSString> {
371 extern "C-unwind" {
372 fn NSStringFromCGSize(size: CGSize) -> *mut NSString;
373 }
374 let ret = unsafe { NSStringFromCGSize(size) };
375 unsafe { Retained::retain_autoreleased(ret) }
376 .expect("function was marked as returning non-null, but actually returned NULL")
377}
378
379#[cfg(feature = "objc2-core-foundation")]
380#[inline]
381pub unsafe extern "C-unwind" fn NSStringFromCGRect(rect: CGRect) -> Retained<NSString> {
382 extern "C-unwind" {
383 fn NSStringFromCGRect(rect: CGRect) -> *mut NSString;
384 }
385 let ret = unsafe { NSStringFromCGRect(rect) };
386 unsafe { Retained::retain_autoreleased(ret) }
387 .expect("function was marked as returning non-null, but actually returned NULL")
388}
389
390#[cfg(feature = "objc2-core-foundation")]
391#[inline]
392pub unsafe extern "C-unwind" fn NSStringFromCGAffineTransform(
393 transform: CGAffineTransform,
394) -> Retained<NSString> {
395 extern "C-unwind" {
396 fn NSStringFromCGAffineTransform(transform: CGAffineTransform) -> *mut NSString;
397 }
398 let ret = unsafe { NSStringFromCGAffineTransform(transform) };
399 unsafe { Retained::retain_autoreleased(ret) }
400 .expect("function was marked as returning non-null, but actually returned NULL")
401}
402
403#[cfg(feature = "objc2-core-foundation")]
404#[inline]
405pub unsafe extern "C-unwind" fn NSStringFromUIEdgeInsets(
406 insets: UIEdgeInsets,
407) -> Retained<NSString> {
408 extern "C-unwind" {
409 fn NSStringFromUIEdgeInsets(insets: UIEdgeInsets) -> *mut NSString;
410 }
411 let ret = unsafe { NSStringFromUIEdgeInsets(insets) };
412 unsafe { Retained::retain_autoreleased(ret) }
413 .expect("function was marked as returning non-null, but actually returned NULL")
414}
415
416#[cfg(feature = "objc2-core-foundation")]
417#[inline]
418pub unsafe extern "C-unwind" fn NSStringFromDirectionalEdgeInsets(
419 insets: NSDirectionalEdgeInsets,
420) -> Retained<NSString> {
421 extern "C-unwind" {
422 fn NSStringFromDirectionalEdgeInsets(insets: NSDirectionalEdgeInsets) -> *mut NSString;
423 }
424 let ret = unsafe { NSStringFromDirectionalEdgeInsets(insets) };
425 unsafe { Retained::retain_autoreleased(ret) }
426 .expect("function was marked as returning non-null, but actually returned NULL")
427}
428
429#[cfg(feature = "objc2-core-foundation")]
430#[inline]
431pub unsafe extern "C-unwind" fn NSStringFromUIOffset(offset: UIOffset) -> Retained<NSString> {
432 extern "C-unwind" {
433 fn NSStringFromUIOffset(offset: UIOffset) -> *mut NSString;
434 }
435 let ret = unsafe { NSStringFromUIOffset(offset) };
436 unsafe { Retained::retain_autoreleased(ret) }
437 .expect("function was marked as returning non-null, but actually returned NULL")
438}
439
440extern "C-unwind" {
441 #[cfg(feature = "objc2-core-foundation")]
442 pub fn CGPointFromString(string: &NSString) -> CGPoint;
443}
444
445extern "C-unwind" {
446 #[cfg(feature = "objc2-core-foundation")]
447 pub fn CGVectorFromString(string: &NSString) -> CGVector;
448}
449
450extern "C-unwind" {
451 #[cfg(feature = "objc2-core-foundation")]
452 pub fn CGSizeFromString(string: &NSString) -> CGSize;
453}
454
455extern "C-unwind" {
456 #[cfg(feature = "objc2-core-foundation")]
457 pub fn CGRectFromString(string: &NSString) -> CGRect;
458}
459
460extern "C-unwind" {
461 #[cfg(feature = "objc2-core-foundation")]
462 pub fn CGAffineTransformFromString(string: &NSString) -> CGAffineTransform;
463}
464
465#[cfg(feature = "objc2-core-foundation")]
466impl UIEdgeInsets {
467 #[doc(alias = "UIEdgeInsetsFromString")]
468 #[cfg(feature = "objc2-core-foundation")]
469 #[inline]
470 pub unsafe fn from_string(string: &NSString) -> UIEdgeInsets {
471 extern "C-unwind" {
472 fn UIEdgeInsetsFromString(string: &NSString) -> UIEdgeInsets;
473 }
474 unsafe { UIEdgeInsetsFromString(string) }
475 }
476}
477
478#[cfg(feature = "objc2-core-foundation")]
479impl NSDirectionalEdgeInsets {
480 #[doc(alias = "NSDirectionalEdgeInsetsFromString")]
481 #[cfg(feature = "objc2-core-foundation")]
482 #[inline]
483 pub unsafe fn from_string(string: &NSString) -> NSDirectionalEdgeInsets {
484 extern "C-unwind" {
485 fn NSDirectionalEdgeInsetsFromString(string: &NSString) -> NSDirectionalEdgeInsets;
486 }
487 unsafe { NSDirectionalEdgeInsetsFromString(string) }
488 }
489}
490
491#[cfg(feature = "objc2-core-foundation")]
492impl UIOffset {
493 #[doc(alias = "UIOffsetFromString")]
494 #[cfg(feature = "objc2-core-foundation")]
495 #[inline]
496 pub unsafe fn from_string(string: &NSString) -> UIOffset {
497 extern "C-unwind" {
498 fn UIOffsetFromString(string: &NSString) -> UIOffset;
499 }
500 unsafe { UIOffsetFromString(string) }
501 }
502}
503
504mod private_NSValueUIGeometryExtensions {
505 pub trait Sealed {}
506}
507
508pub unsafe trait NSValueUIGeometryExtensions:
510 ClassType + Sized + private_NSValueUIGeometryExtensions::Sealed
511{
512 extern_methods!(
513 #[cfg(feature = "objc2-core-foundation")]
514 #[unsafe(method(valueWithCGPoint:))]
515 #[unsafe(method_family = none)]
516 unsafe fn valueWithCGPoint(point: CGPoint) -> Retained<NSValue>;
517
518 #[cfg(feature = "objc2-core-foundation")]
519 #[unsafe(method(valueWithCGVector:))]
520 #[unsafe(method_family = none)]
521 unsafe fn valueWithCGVector(vector: CGVector) -> Retained<NSValue>;
522
523 #[cfg(feature = "objc2-core-foundation")]
524 #[unsafe(method(valueWithCGSize:))]
525 #[unsafe(method_family = none)]
526 unsafe fn valueWithCGSize(size: CGSize) -> Retained<NSValue>;
527
528 #[cfg(feature = "objc2-core-foundation")]
529 #[unsafe(method(valueWithCGRect:))]
530 #[unsafe(method_family = none)]
531 unsafe fn valueWithCGRect(rect: CGRect) -> Retained<NSValue>;
532
533 #[cfg(feature = "objc2-core-foundation")]
534 #[unsafe(method(valueWithCGAffineTransform:))]
535 #[unsafe(method_family = none)]
536 unsafe fn valueWithCGAffineTransform(transform: CGAffineTransform) -> Retained<NSValue>;
537
538 #[cfg(feature = "objc2-core-foundation")]
539 #[unsafe(method(valueWithUIEdgeInsets:))]
540 #[unsafe(method_family = none)]
541 unsafe fn valueWithUIEdgeInsets(insets: UIEdgeInsets) -> Retained<NSValue>;
542
543 #[cfg(feature = "objc2-core-foundation")]
544 #[unsafe(method(valueWithDirectionalEdgeInsets:))]
545 #[unsafe(method_family = none)]
546 unsafe fn valueWithDirectionalEdgeInsets(
547 insets: NSDirectionalEdgeInsets,
548 ) -> Retained<NSValue>;
549
550 #[cfg(feature = "objc2-core-foundation")]
551 #[unsafe(method(valueWithUIOffset:))]
552 #[unsafe(method_family = none)]
553 unsafe fn valueWithUIOffset(insets: UIOffset) -> Retained<NSValue>;
554
555 #[cfg(feature = "objc2-core-foundation")]
556 #[unsafe(method(CGPointValue))]
557 #[unsafe(method_family = none)]
558 unsafe fn CGPointValue(&self) -> CGPoint;
559
560 #[cfg(feature = "objc2-core-foundation")]
561 #[unsafe(method(CGVectorValue))]
562 #[unsafe(method_family = none)]
563 unsafe fn CGVectorValue(&self) -> CGVector;
564
565 #[cfg(feature = "objc2-core-foundation")]
566 #[unsafe(method(CGSizeValue))]
567 #[unsafe(method_family = none)]
568 unsafe fn CGSizeValue(&self) -> CGSize;
569
570 #[cfg(feature = "objc2-core-foundation")]
571 #[unsafe(method(CGRectValue))]
572 #[unsafe(method_family = none)]
573 unsafe fn CGRectValue(&self) -> CGRect;
574
575 #[cfg(feature = "objc2-core-foundation")]
576 #[unsafe(method(CGAffineTransformValue))]
577 #[unsafe(method_family = none)]
578 unsafe fn CGAffineTransformValue(&self) -> CGAffineTransform;
579
580 #[cfg(feature = "objc2-core-foundation")]
581 #[unsafe(method(UIEdgeInsetsValue))]
582 #[unsafe(method_family = none)]
583 unsafe fn UIEdgeInsetsValue(&self) -> UIEdgeInsets;
584
585 #[cfg(feature = "objc2-core-foundation")]
586 #[unsafe(method(directionalEdgeInsetsValue))]
587 #[unsafe(method_family = none)]
588 unsafe fn directionalEdgeInsetsValue(&self) -> NSDirectionalEdgeInsets;
589
590 #[cfg(feature = "objc2-core-foundation")]
591 #[unsafe(method(UIOffsetValue))]
592 #[unsafe(method_family = none)]
593 unsafe fn UIOffsetValue(&self) -> UIOffset;
594 );
595}
596
597impl private_NSValueUIGeometryExtensions::Sealed for NSValue {}
598unsafe impl NSValueUIGeometryExtensions for NSValue {}
599
600mod private_NSCoderUIGeometryKeyedCoding {
601 pub trait Sealed {}
602}
603
604#[doc(alias = "UIGeometryKeyedCoding")]
606pub unsafe trait NSCoderUIGeometryKeyedCoding:
607 ClassType + Sized + private_NSCoderUIGeometryKeyedCoding::Sealed
608{
609 extern_methods!(
610 #[cfg(feature = "objc2-core-foundation")]
611 #[unsafe(method(encodeCGPoint:forKey:))]
612 #[unsafe(method_family = none)]
613 unsafe fn encodeCGPoint_forKey(&self, point: CGPoint, key: &NSString);
614
615 #[cfg(feature = "objc2-core-foundation")]
616 #[unsafe(method(encodeCGVector:forKey:))]
617 #[unsafe(method_family = none)]
618 unsafe fn encodeCGVector_forKey(&self, vector: CGVector, key: &NSString);
619
620 #[cfg(feature = "objc2-core-foundation")]
621 #[unsafe(method(encodeCGSize:forKey:))]
622 #[unsafe(method_family = none)]
623 unsafe fn encodeCGSize_forKey(&self, size: CGSize, key: &NSString);
624
625 #[cfg(feature = "objc2-core-foundation")]
626 #[unsafe(method(encodeCGRect:forKey:))]
627 #[unsafe(method_family = none)]
628 unsafe fn encodeCGRect_forKey(&self, rect: CGRect, key: &NSString);
629
630 #[cfg(feature = "objc2-core-foundation")]
631 #[unsafe(method(encodeCGAffineTransform:forKey:))]
632 #[unsafe(method_family = none)]
633 unsafe fn encodeCGAffineTransform_forKey(
634 &self,
635 transform: CGAffineTransform,
636 key: &NSString,
637 );
638
639 #[cfg(feature = "objc2-core-foundation")]
640 #[unsafe(method(encodeUIEdgeInsets:forKey:))]
641 #[unsafe(method_family = none)]
642 unsafe fn encodeUIEdgeInsets_forKey(&self, insets: UIEdgeInsets, key: &NSString);
643
644 #[cfg(feature = "objc2-core-foundation")]
645 #[unsafe(method(encodeDirectionalEdgeInsets:forKey:))]
646 #[unsafe(method_family = none)]
647 unsafe fn encodeDirectionalEdgeInsets_forKey(
648 &self,
649 insets: NSDirectionalEdgeInsets,
650 key: &NSString,
651 );
652
653 #[cfg(feature = "objc2-core-foundation")]
654 #[unsafe(method(encodeUIOffset:forKey:))]
655 #[unsafe(method_family = none)]
656 unsafe fn encodeUIOffset_forKey(&self, offset: UIOffset, key: &NSString);
657
658 #[cfg(feature = "objc2-core-foundation")]
659 #[unsafe(method(decodeCGPointForKey:))]
660 #[unsafe(method_family = none)]
661 unsafe fn decodeCGPointForKey(&self, key: &NSString) -> CGPoint;
662
663 #[cfg(feature = "objc2-core-foundation")]
664 #[unsafe(method(decodeCGVectorForKey:))]
665 #[unsafe(method_family = none)]
666 unsafe fn decodeCGVectorForKey(&self, key: &NSString) -> CGVector;
667
668 #[cfg(feature = "objc2-core-foundation")]
669 #[unsafe(method(decodeCGSizeForKey:))]
670 #[unsafe(method_family = none)]
671 unsafe fn decodeCGSizeForKey(&self, key: &NSString) -> CGSize;
672
673 #[cfg(feature = "objc2-core-foundation")]
674 #[unsafe(method(decodeCGRectForKey:))]
675 #[unsafe(method_family = none)]
676 unsafe fn decodeCGRectForKey(&self, key: &NSString) -> CGRect;
677
678 #[cfg(feature = "objc2-core-foundation")]
679 #[unsafe(method(decodeCGAffineTransformForKey:))]
680 #[unsafe(method_family = none)]
681 unsafe fn decodeCGAffineTransformForKey(&self, key: &NSString) -> CGAffineTransform;
682
683 #[cfg(feature = "objc2-core-foundation")]
684 #[unsafe(method(decodeUIEdgeInsetsForKey:))]
685 #[unsafe(method_family = none)]
686 unsafe fn decodeUIEdgeInsetsForKey(&self, key: &NSString) -> UIEdgeInsets;
687
688 #[cfg(feature = "objc2-core-foundation")]
689 #[unsafe(method(decodeDirectionalEdgeInsetsForKey:))]
690 #[unsafe(method_family = none)]
691 unsafe fn decodeDirectionalEdgeInsetsForKey(
692 &self,
693 key: &NSString,
694 ) -> NSDirectionalEdgeInsets;
695
696 #[cfg(feature = "objc2-core-foundation")]
697 #[unsafe(method(decodeUIOffsetForKey:))]
698 #[unsafe(method_family = none)]
699 unsafe fn decodeUIOffsetForKey(&self, key: &NSString) -> UIOffset;
700 );
701}
702
703impl private_NSCoderUIGeometryKeyedCoding::Sealed for NSCoder {}
704unsafe impl NSCoderUIGeometryKeyedCoding for NSCoder {}
705
706extern "C-unwind" {
707 #[cfg(feature = "objc2-core-foundation")]
708 #[deprecated = "renamed to `UIEdgeInsets::from_string`"]
709 pub fn UIEdgeInsetsFromString(string: &NSString) -> UIEdgeInsets;
710}
711
712extern "C-unwind" {
713 #[cfg(feature = "objc2-core-foundation")]
714 #[deprecated = "renamed to `NSDirectionalEdgeInsets::from_string`"]
715 pub fn NSDirectionalEdgeInsetsFromString(string: &NSString) -> NSDirectionalEdgeInsets;
716}
717
718extern "C-unwind" {
719 #[cfg(feature = "objc2-core-foundation")]
720 #[deprecated = "renamed to `UIOffset::from_string`"]
721 pub fn UIOffsetFromString(string: &NSString) -> UIOffset;
722}