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 UIRectCorner(pub NSUInteger);
113bitflags::bitflags! {
114 impl UIRectCorner: NSUInteger {
115 #[doc(alias = "UIRectCornerTopLeft")]
116 const TopLeft = 1<<0;
117 #[doc(alias = "UIRectCornerTopRight")]
118 const TopRight = 1<<1;
119 #[doc(alias = "UIRectCornerBottomLeft")]
120 const BottomLeft = 1<<2;
121 #[doc(alias = "UIRectCornerBottomRight")]
122 const BottomRight = 1<<3;
123 #[doc(alias = "UIRectCornerAllCorners")]
124 const AllCorners = !0;
125 }
126}
127
128unsafe impl Encode for UIRectCorner {
129 const ENCODING: Encoding = NSUInteger::ENCODING;
130}
131
132unsafe impl RefEncode for UIRectCorner {
133 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
134}
135
136#[repr(transparent)]
139#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
140pub struct NSDirectionalRectEdge(pub NSUInteger);
141bitflags::bitflags! {
142 impl NSDirectionalRectEdge: NSUInteger {
143 #[doc(alias = "NSDirectionalRectEdgeNone")]
144 const None = 0;
145 #[doc(alias = "NSDirectionalRectEdgeTop")]
146 const Top = 1<<0;
147 #[doc(alias = "NSDirectionalRectEdgeLeading")]
148 const Leading = 1<<1;
149 #[doc(alias = "NSDirectionalRectEdgeBottom")]
150 const Bottom = 1<<2;
151 #[doc(alias = "NSDirectionalRectEdgeTrailing")]
152 const Trailing = 1<<3;
153 #[doc(alias = "NSDirectionalRectEdgeAll")]
154 const All = NSDirectionalRectEdge::Top.0|NSDirectionalRectEdge::Leading.0|NSDirectionalRectEdge::Bottom.0|NSDirectionalRectEdge::Trailing.0;
155 }
156}
157
158unsafe impl Encode for NSDirectionalRectEdge {
159 const ENCODING: Encoding = NSUInteger::ENCODING;
160}
161
162unsafe impl RefEncode for NSDirectionalRectEdge {
163 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
164}
165
166#[deprecated]
169#[repr(transparent)]
170#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
171pub struct UIDirectionalRectEdge(pub NSUInteger);
172bitflags::bitflags! {
173 impl UIDirectionalRectEdge: NSUInteger {
174 #[doc(alias = "UIDirectionalRectEdgeNone")]
175#[deprecated]
176 const None = 0;
177 #[doc(alias = "UIDirectionalRectEdgeTop")]
178#[deprecated]
179 const Top = 1<<0;
180 #[doc(alias = "UIDirectionalRectEdgeLeading")]
181#[deprecated]
182 const Leading = 1<<1;
183 #[doc(alias = "UIDirectionalRectEdgeBottom")]
184#[deprecated]
185 const Bottom = 1<<2;
186 #[doc(alias = "UIDirectionalRectEdgeTrailing")]
187#[deprecated]
188 const Trailing = 1<<3;
189 #[doc(alias = "UIDirectionalRectEdgeAll")]
190#[deprecated]
191 const All = UIDirectionalRectEdge::Top.0|UIDirectionalRectEdge::Leading.0|UIDirectionalRectEdge::Bottom.0|UIDirectionalRectEdge::Trailing.0;
192 }
193}
194
195unsafe impl Encode for UIDirectionalRectEdge {
196 const ENCODING: Encoding = NSUInteger::ENCODING;
197}
198
199unsafe impl RefEncode for UIDirectionalRectEdge {
200 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
201}
202
203#[repr(transparent)]
206#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
207pub struct NSRectAlignment(pub NSInteger);
208impl NSRectAlignment {
209 #[doc(alias = "NSRectAlignmentNone")]
210 pub const None: Self = Self(0);
211 #[doc(alias = "NSRectAlignmentTop")]
212 pub const Top: Self = Self(1);
213 #[doc(alias = "NSRectAlignmentTopLeading")]
214 pub const TopLeading: Self = Self(2);
215 #[doc(alias = "NSRectAlignmentLeading")]
216 pub const Leading: Self = Self(3);
217 #[doc(alias = "NSRectAlignmentBottomLeading")]
218 pub const BottomLeading: Self = Self(4);
219 #[doc(alias = "NSRectAlignmentBottom")]
220 pub const Bottom: Self = Self(5);
221 #[doc(alias = "NSRectAlignmentBottomTrailing")]
222 pub const BottomTrailing: Self = Self(6);
223 #[doc(alias = "NSRectAlignmentTrailing")]
224 pub const Trailing: Self = Self(7);
225 #[doc(alias = "NSRectAlignmentTopTrailing")]
226 pub const TopTrailing: Self = Self(8);
227}
228
229unsafe impl Encode for NSRectAlignment {
230 const ENCODING: Encoding = NSInteger::ENCODING;
231}
232
233unsafe impl RefEncode for NSRectAlignment {
234 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
235}
236
237#[cfg(feature = "objc2-core-foundation")]
238impl UIEdgeInsets {
239 }
241
242#[cfg(feature = "objc2-core-foundation")]
243impl NSDirectionalEdgeInsets {
244 }
246
247#[cfg(feature = "objc2-core-foundation")]
248impl UIEdgeInsets {
249 }
251
252#[cfg(feature = "objc2-core-foundation")]
253impl UIOffset {
254 }
256
257#[cfg(feature = "objc2-core-foundation")]
258impl UIEdgeInsets {
259 }
261
262#[cfg(feature = "objc2-core-foundation")]
263impl NSDirectionalEdgeInsets {
264 }
266
267#[cfg(feature = "objc2-core-foundation")]
268impl UIOffset {
269 }
271
272extern "C" {
273 #[cfg(feature = "objc2-core-foundation")]
275 pub static UIEdgeInsetsZero: UIEdgeInsets;
276}
277
278extern "C" {
279 #[cfg(feature = "objc2-core-foundation")]
281 pub static NSDirectionalEdgeInsetsZero: NSDirectionalEdgeInsets;
282}
283
284extern "C" {
285 #[cfg(feature = "objc2-core-foundation")]
287 pub static UIOffsetZero: UIOffset;
288}
289
290#[cfg(feature = "objc2-core-foundation")]
291#[inline]
292pub extern "C-unwind" fn NSStringFromCGPoint(point: CGPoint) -> Retained<NSString> {
293 extern "C-unwind" {
294 fn NSStringFromCGPoint(point: CGPoint) -> *mut NSString;
295 }
296 let ret = unsafe { NSStringFromCGPoint(point) };
297 unsafe { Retained::retain_autoreleased(ret) }
298 .expect("function was marked as returning non-null, but actually returned NULL")
299}
300
301#[cfg(feature = "objc2-core-foundation")]
302#[inline]
303pub extern "C-unwind" fn NSStringFromCGVector(vector: CGVector) -> Retained<NSString> {
304 extern "C-unwind" {
305 fn NSStringFromCGVector(vector: CGVector) -> *mut NSString;
306 }
307 let ret = unsafe { NSStringFromCGVector(vector) };
308 unsafe { Retained::retain_autoreleased(ret) }
309 .expect("function was marked as returning non-null, but actually returned NULL")
310}
311
312#[cfg(feature = "objc2-core-foundation")]
313#[inline]
314pub extern "C-unwind" fn NSStringFromCGSize(size: CGSize) -> Retained<NSString> {
315 extern "C-unwind" {
316 fn NSStringFromCGSize(size: CGSize) -> *mut NSString;
317 }
318 let ret = unsafe { NSStringFromCGSize(size) };
319 unsafe { Retained::retain_autoreleased(ret) }
320 .expect("function was marked as returning non-null, but actually returned NULL")
321}
322
323#[cfg(feature = "objc2-core-foundation")]
324#[inline]
325pub extern "C-unwind" fn NSStringFromCGRect(rect: CGRect) -> Retained<NSString> {
326 extern "C-unwind" {
327 fn NSStringFromCGRect(rect: CGRect) -> *mut NSString;
328 }
329 let ret = unsafe { NSStringFromCGRect(rect) };
330 unsafe { Retained::retain_autoreleased(ret) }
331 .expect("function was marked as returning non-null, but actually returned NULL")
332}
333
334#[cfg(feature = "objc2-core-foundation")]
335#[inline]
336pub extern "C-unwind" fn NSStringFromCGAffineTransform(
337 transform: CGAffineTransform,
338) -> Retained<NSString> {
339 extern "C-unwind" {
340 fn NSStringFromCGAffineTransform(transform: CGAffineTransform) -> *mut NSString;
341 }
342 let ret = unsafe { NSStringFromCGAffineTransform(transform) };
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 extern "C-unwind" fn NSStringFromUIEdgeInsets(insets: UIEdgeInsets) -> Retained<NSString> {
350 extern "C-unwind" {
351 fn NSStringFromUIEdgeInsets(insets: UIEdgeInsets) -> *mut NSString;
352 }
353 let ret = unsafe { NSStringFromUIEdgeInsets(insets) };
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 extern "C-unwind" fn NSStringFromDirectionalEdgeInsets(
361 insets: NSDirectionalEdgeInsets,
362) -> Retained<NSString> {
363 extern "C-unwind" {
364 fn NSStringFromDirectionalEdgeInsets(insets: NSDirectionalEdgeInsets) -> *mut NSString;
365 }
366 let ret = unsafe { NSStringFromDirectionalEdgeInsets(insets) };
367 unsafe { Retained::retain_autoreleased(ret) }
368 .expect("function was marked as returning non-null, but actually returned NULL")
369}
370
371#[cfg(feature = "objc2-core-foundation")]
372#[inline]
373pub extern "C-unwind" fn NSStringFromUIOffset(offset: UIOffset) -> Retained<NSString> {
374 extern "C-unwind" {
375 fn NSStringFromUIOffset(offset: UIOffset) -> *mut NSString;
376 }
377 let ret = unsafe { NSStringFromUIOffset(offset) };
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 extern "C-unwind" fn CGPointFromString(string: &NSString) -> CGPoint {
385 extern "C-unwind" {
386 fn CGPointFromString(string: &NSString) -> CGPoint;
387 }
388 unsafe { CGPointFromString(string) }
389}
390
391#[cfg(feature = "objc2-core-foundation")]
392#[inline]
393pub extern "C-unwind" fn CGVectorFromString(string: &NSString) -> CGVector {
394 extern "C-unwind" {
395 fn CGVectorFromString(string: &NSString) -> CGVector;
396 }
397 unsafe { CGVectorFromString(string) }
398}
399
400#[cfg(feature = "objc2-core-foundation")]
401#[inline]
402pub extern "C-unwind" fn CGSizeFromString(string: &NSString) -> CGSize {
403 extern "C-unwind" {
404 fn CGSizeFromString(string: &NSString) -> CGSize;
405 }
406 unsafe { CGSizeFromString(string) }
407}
408
409#[cfg(feature = "objc2-core-foundation")]
410#[inline]
411pub extern "C-unwind" fn CGRectFromString(string: &NSString) -> CGRect {
412 extern "C-unwind" {
413 fn CGRectFromString(string: &NSString) -> CGRect;
414 }
415 unsafe { CGRectFromString(string) }
416}
417
418#[cfg(feature = "objc2-core-foundation")]
419#[inline]
420pub extern "C-unwind" fn CGAffineTransformFromString(string: &NSString) -> CGAffineTransform {
421 extern "C-unwind" {
422 fn CGAffineTransformFromString(string: &NSString) -> CGAffineTransform;
423 }
424 unsafe { CGAffineTransformFromString(string) }
425}
426
427#[cfg(feature = "objc2-core-foundation")]
428impl UIEdgeInsets {
429 #[doc(alias = "UIEdgeInsetsFromString")]
430 #[cfg(feature = "objc2-core-foundation")]
431 #[inline]
432 pub fn from_string(string: &NSString) -> UIEdgeInsets {
433 extern "C-unwind" {
434 fn UIEdgeInsetsFromString(string: &NSString) -> UIEdgeInsets;
435 }
436 unsafe { UIEdgeInsetsFromString(string) }
437 }
438}
439
440#[cfg(feature = "objc2-core-foundation")]
441impl NSDirectionalEdgeInsets {
442 #[doc(alias = "NSDirectionalEdgeInsetsFromString")]
443 #[cfg(feature = "objc2-core-foundation")]
444 #[inline]
445 pub fn from_string(string: &NSString) -> NSDirectionalEdgeInsets {
446 extern "C-unwind" {
447 fn NSDirectionalEdgeInsetsFromString(string: &NSString) -> NSDirectionalEdgeInsets;
448 }
449 unsafe { NSDirectionalEdgeInsetsFromString(string) }
450 }
451}
452
453#[cfg(feature = "objc2-core-foundation")]
454impl UIOffset {
455 #[doc(alias = "UIOffsetFromString")]
456 #[cfg(feature = "objc2-core-foundation")]
457 #[inline]
458 pub fn from_string(string: &NSString) -> UIOffset {
459 extern "C-unwind" {
460 fn UIOffsetFromString(string: &NSString) -> UIOffset;
461 }
462 unsafe { UIOffsetFromString(string) }
463 }
464}
465
466mod private_NSValueUIGeometryExtensions {
467 pub trait Sealed {}
468}
469
470pub unsafe trait NSValueUIGeometryExtensions:
472 ClassType + Sized + private_NSValueUIGeometryExtensions::Sealed
473{
474 extern_methods!(
475 #[cfg(feature = "objc2-core-foundation")]
476 #[unsafe(method(valueWithCGPoint:))]
477 #[unsafe(method_family = none)]
478 unsafe fn valueWithCGPoint(point: CGPoint) -> Retained<NSValue>;
479
480 #[cfg(feature = "objc2-core-foundation")]
481 #[unsafe(method(valueWithCGVector:))]
482 #[unsafe(method_family = none)]
483 unsafe fn valueWithCGVector(vector: CGVector) -> Retained<NSValue>;
484
485 #[cfg(feature = "objc2-core-foundation")]
486 #[unsafe(method(valueWithCGSize:))]
487 #[unsafe(method_family = none)]
488 unsafe fn valueWithCGSize(size: CGSize) -> Retained<NSValue>;
489
490 #[cfg(feature = "objc2-core-foundation")]
491 #[unsafe(method(valueWithCGRect:))]
492 #[unsafe(method_family = none)]
493 unsafe fn valueWithCGRect(rect: CGRect) -> Retained<NSValue>;
494
495 #[cfg(feature = "objc2-core-foundation")]
496 #[unsafe(method(valueWithCGAffineTransform:))]
497 #[unsafe(method_family = none)]
498 unsafe fn valueWithCGAffineTransform(transform: CGAffineTransform) -> Retained<NSValue>;
499
500 #[cfg(feature = "objc2-core-foundation")]
501 #[unsafe(method(valueWithUIEdgeInsets:))]
502 #[unsafe(method_family = none)]
503 unsafe fn valueWithUIEdgeInsets(insets: UIEdgeInsets) -> Retained<NSValue>;
504
505 #[cfg(feature = "objc2-core-foundation")]
506 #[unsafe(method(valueWithDirectionalEdgeInsets:))]
507 #[unsafe(method_family = none)]
508 unsafe fn valueWithDirectionalEdgeInsets(
509 insets: NSDirectionalEdgeInsets,
510 ) -> Retained<NSValue>;
511
512 #[cfg(feature = "objc2-core-foundation")]
513 #[unsafe(method(valueWithUIOffset:))]
514 #[unsafe(method_family = none)]
515 unsafe fn valueWithUIOffset(insets: UIOffset) -> Retained<NSValue>;
516
517 #[cfg(feature = "objc2-core-foundation")]
518 #[unsafe(method(CGPointValue))]
519 #[unsafe(method_family = none)]
520 unsafe fn CGPointValue(&self) -> CGPoint;
521
522 #[cfg(feature = "objc2-core-foundation")]
523 #[unsafe(method(CGVectorValue))]
524 #[unsafe(method_family = none)]
525 unsafe fn CGVectorValue(&self) -> CGVector;
526
527 #[cfg(feature = "objc2-core-foundation")]
528 #[unsafe(method(CGSizeValue))]
529 #[unsafe(method_family = none)]
530 unsafe fn CGSizeValue(&self) -> CGSize;
531
532 #[cfg(feature = "objc2-core-foundation")]
533 #[unsafe(method(CGRectValue))]
534 #[unsafe(method_family = none)]
535 unsafe fn CGRectValue(&self) -> CGRect;
536
537 #[cfg(feature = "objc2-core-foundation")]
538 #[unsafe(method(CGAffineTransformValue))]
539 #[unsafe(method_family = none)]
540 unsafe fn CGAffineTransformValue(&self) -> CGAffineTransform;
541
542 #[cfg(feature = "objc2-core-foundation")]
543 #[unsafe(method(UIEdgeInsetsValue))]
544 #[unsafe(method_family = none)]
545 unsafe fn UIEdgeInsetsValue(&self) -> UIEdgeInsets;
546
547 #[cfg(feature = "objc2-core-foundation")]
548 #[unsafe(method(directionalEdgeInsetsValue))]
549 #[unsafe(method_family = none)]
550 unsafe fn directionalEdgeInsetsValue(&self) -> NSDirectionalEdgeInsets;
551
552 #[cfg(feature = "objc2-core-foundation")]
553 #[unsafe(method(UIOffsetValue))]
554 #[unsafe(method_family = none)]
555 unsafe fn UIOffsetValue(&self) -> UIOffset;
556 );
557}
558
559impl private_NSValueUIGeometryExtensions::Sealed for NSValue {}
560unsafe impl NSValueUIGeometryExtensions for NSValue {}
561
562mod private_NSCoderUIGeometryKeyedCoding {
563 pub trait Sealed {}
564}
565
566#[doc(alias = "UIGeometryKeyedCoding")]
568pub unsafe trait NSCoderUIGeometryKeyedCoding:
569 ClassType + Sized + private_NSCoderUIGeometryKeyedCoding::Sealed
570{
571 extern_methods!(
572 #[cfg(feature = "objc2-core-foundation")]
573 #[unsafe(method(encodeCGPoint:forKey:))]
574 #[unsafe(method_family = none)]
575 fn encodeCGPoint_forKey(&self, point: CGPoint, key: &NSString);
576
577 #[cfg(feature = "objc2-core-foundation")]
578 #[unsafe(method(encodeCGVector:forKey:))]
579 #[unsafe(method_family = none)]
580 fn encodeCGVector_forKey(&self, vector: CGVector, key: &NSString);
581
582 #[cfg(feature = "objc2-core-foundation")]
583 #[unsafe(method(encodeCGSize:forKey:))]
584 #[unsafe(method_family = none)]
585 fn encodeCGSize_forKey(&self, size: CGSize, key: &NSString);
586
587 #[cfg(feature = "objc2-core-foundation")]
588 #[unsafe(method(encodeCGRect:forKey:))]
589 #[unsafe(method_family = none)]
590 fn encodeCGRect_forKey(&self, rect: CGRect, key: &NSString);
591
592 #[cfg(feature = "objc2-core-foundation")]
593 #[unsafe(method(encodeCGAffineTransform:forKey:))]
594 #[unsafe(method_family = none)]
595 fn encodeCGAffineTransform_forKey(&self, transform: CGAffineTransform, key: &NSString);
596
597 #[cfg(feature = "objc2-core-foundation")]
598 #[unsafe(method(encodeUIEdgeInsets:forKey:))]
599 #[unsafe(method_family = none)]
600 fn encodeUIEdgeInsets_forKey(&self, insets: UIEdgeInsets, key: &NSString);
601
602 #[cfg(feature = "objc2-core-foundation")]
603 #[unsafe(method(encodeDirectionalEdgeInsets:forKey:))]
604 #[unsafe(method_family = none)]
605 fn encodeDirectionalEdgeInsets_forKey(
606 &self,
607 insets: NSDirectionalEdgeInsets,
608 key: &NSString,
609 );
610
611 #[cfg(feature = "objc2-core-foundation")]
612 #[unsafe(method(encodeUIOffset:forKey:))]
613 #[unsafe(method_family = none)]
614 fn encodeUIOffset_forKey(&self, offset: UIOffset, key: &NSString);
615
616 #[cfg(feature = "objc2-core-foundation")]
617 #[unsafe(method(decodeCGPointForKey:))]
618 #[unsafe(method_family = none)]
619 fn decodeCGPointForKey(&self, key: &NSString) -> CGPoint;
620
621 #[cfg(feature = "objc2-core-foundation")]
622 #[unsafe(method(decodeCGVectorForKey:))]
623 #[unsafe(method_family = none)]
624 fn decodeCGVectorForKey(&self, key: &NSString) -> CGVector;
625
626 #[cfg(feature = "objc2-core-foundation")]
627 #[unsafe(method(decodeCGSizeForKey:))]
628 #[unsafe(method_family = none)]
629 fn decodeCGSizeForKey(&self, key: &NSString) -> CGSize;
630
631 #[cfg(feature = "objc2-core-foundation")]
632 #[unsafe(method(decodeCGRectForKey:))]
633 #[unsafe(method_family = none)]
634 fn decodeCGRectForKey(&self, key: &NSString) -> CGRect;
635
636 #[cfg(feature = "objc2-core-foundation")]
637 #[unsafe(method(decodeCGAffineTransformForKey:))]
638 #[unsafe(method_family = none)]
639 fn decodeCGAffineTransformForKey(&self, key: &NSString) -> CGAffineTransform;
640
641 #[cfg(feature = "objc2-core-foundation")]
642 #[unsafe(method(decodeUIEdgeInsetsForKey:))]
643 #[unsafe(method_family = none)]
644 fn decodeUIEdgeInsetsForKey(&self, key: &NSString) -> UIEdgeInsets;
645
646 #[cfg(feature = "objc2-core-foundation")]
647 #[unsafe(method(decodeDirectionalEdgeInsetsForKey:))]
648 #[unsafe(method_family = none)]
649 fn decodeDirectionalEdgeInsetsForKey(&self, key: &NSString) -> NSDirectionalEdgeInsets;
650
651 #[cfg(feature = "objc2-core-foundation")]
652 #[unsafe(method(decodeUIOffsetForKey:))]
653 #[unsafe(method_family = none)]
654 fn decodeUIOffsetForKey(&self, key: &NSString) -> UIOffset;
655 );
656}
657
658impl private_NSCoderUIGeometryKeyedCoding::Sealed for NSCoder {}
659unsafe impl NSCoderUIGeometryKeyedCoding for NSCoder {}
660
661#[cfg(feature = "objc2-core-foundation")]
662#[deprecated = "renamed to `UIEdgeInsets::from_string`"]
663#[inline]
664pub extern "C-unwind" fn UIEdgeInsetsFromString(string: &NSString) -> UIEdgeInsets {
665 extern "C-unwind" {
666 fn UIEdgeInsetsFromString(string: &NSString) -> UIEdgeInsets;
667 }
668 unsafe { UIEdgeInsetsFromString(string) }
669}
670
671#[cfg(feature = "objc2-core-foundation")]
672#[deprecated = "renamed to `NSDirectionalEdgeInsets::from_string`"]
673#[inline]
674pub extern "C-unwind" fn NSDirectionalEdgeInsetsFromString(
675 string: &NSString,
676) -> NSDirectionalEdgeInsets {
677 extern "C-unwind" {
678 fn NSDirectionalEdgeInsetsFromString(string: &NSString) -> NSDirectionalEdgeInsets;
679 }
680 unsafe { NSDirectionalEdgeInsetsFromString(string) }
681}
682
683#[cfg(feature = "objc2-core-foundation")]
684#[deprecated = "renamed to `UIOffset::from_string`"]
685#[inline]
686pub extern "C-unwind" fn UIOffsetFromString(string: &NSString) -> UIOffset {
687 extern "C-unwind" {
688 fn UIOffsetFromString(string: &NSString) -> UIOffset;
689 }
690 unsafe { UIOffsetFromString(string) }
691}