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#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct UICellAccessoryDisplayedState(pub NSInteger);
17impl UICellAccessoryDisplayedState {
18 #[doc(alias = "UICellAccessoryDisplayedAlways")]
20 pub const Always: Self = Self(0);
21 #[doc(alias = "UICellAccessoryDisplayedWhenEditing")]
23 pub const WhenEditing: Self = Self(1);
24 #[doc(alias = "UICellAccessoryDisplayedWhenNotEditing")]
26 pub const WhenNotEditing: Self = Self(2);
27}
28
29unsafe impl Encode for UICellAccessoryDisplayedState {
30 const ENCODING: Encoding = NSInteger::ENCODING;
31}
32
33unsafe impl RefEncode for UICellAccessoryDisplayedState {
34 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
35}
36
37extern "C" {
38 #[cfg(feature = "objc2-core-foundation")]
43 pub static UICellAccessoryStandardDimension: CGFloat;
44}
45
46extern_class!(
47 #[unsafe(super(NSObject))]
51 #[thread_kind = MainThreadOnly]
52 #[derive(Debug, PartialEq, Eq, Hash)]
53 pub struct UICellAccessory;
54);
55
56unsafe impl NSCoding for UICellAccessory {}
57
58unsafe impl NSCopying for UICellAccessory {}
59
60unsafe impl CopyingHelper for UICellAccessory {
61 type Result = Self;
62}
63
64unsafe impl NSObjectProtocol for UICellAccessory {}
65
66unsafe impl NSSecureCoding for UICellAccessory {}
67
68impl UICellAccessory {
69 extern_methods!(
70 #[unsafe(method(displayedState))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn displayedState(&self) -> UICellAccessoryDisplayedState;
74
75 #[unsafe(method(setDisplayedState:))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn setDisplayedState(&self, displayed_state: UICellAccessoryDisplayedState);
79
80 #[unsafe(method(isHidden))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn isHidden(&self) -> bool;
85
86 #[unsafe(method(setHidden:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn setHidden(&self, hidden: bool);
90
91 #[cfg(feature = "objc2-core-foundation")]
92 #[unsafe(method(reservedLayoutWidth))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn reservedLayoutWidth(&self) -> CGFloat;
99
100 #[cfg(feature = "objc2-core-foundation")]
101 #[unsafe(method(setReservedLayoutWidth:))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn setReservedLayoutWidth(&self, reserved_layout_width: CGFloat);
105
106 #[cfg(feature = "UIColor")]
107 #[unsafe(method(tintColor))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn tintColor(&self) -> Option<Retained<UIColor>>;
111
112 #[cfg(feature = "UIColor")]
113 #[unsafe(method(setTintColor:))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn setTintColor(&self, tint_color: Option<&UIColor>);
117
118 #[unsafe(method(initWithCoder:))]
119 #[unsafe(method_family = init)]
120 pub unsafe fn initWithCoder(
121 this: Allocated<Self>,
122 coder: &NSCoder,
123 ) -> Option<Retained<Self>>;
124
125 #[unsafe(method(init))]
126 #[unsafe(method_family = init)]
127 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
128 );
129}
130
131impl UICellAccessory {
133 extern_methods!(
134 #[unsafe(method(new))]
135 #[unsafe(method_family = new)]
136 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
137 );
138}
139
140extern_class!(
141 #[unsafe(super(UICellAccessory, NSObject))]
145 #[thread_kind = MainThreadOnly]
146 #[derive(Debug, PartialEq, Eq, Hash)]
147 pub struct UICellAccessoryDisclosureIndicator;
148);
149
150unsafe impl NSCoding for UICellAccessoryDisclosureIndicator {}
151
152unsafe impl NSCopying for UICellAccessoryDisclosureIndicator {}
153
154unsafe impl CopyingHelper for UICellAccessoryDisclosureIndicator {
155 type Result = Self;
156}
157
158unsafe impl NSObjectProtocol for UICellAccessoryDisclosureIndicator {}
159
160unsafe impl NSSecureCoding for UICellAccessoryDisclosureIndicator {}
161
162impl UICellAccessoryDisclosureIndicator {
163 extern_methods!();
164}
165
166impl UICellAccessoryDisclosureIndicator {
168 extern_methods!(
169 #[unsafe(method(initWithCoder:))]
170 #[unsafe(method_family = init)]
171 pub unsafe fn initWithCoder(
172 this: Allocated<Self>,
173 coder: &NSCoder,
174 ) -> Option<Retained<Self>>;
175
176 #[unsafe(method(init))]
177 #[unsafe(method_family = init)]
178 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
179 );
180}
181
182impl UICellAccessoryDisclosureIndicator {
184 extern_methods!(
185 #[unsafe(method(new))]
186 #[unsafe(method_family = new)]
187 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
188 );
189}
190
191extern_class!(
192 #[unsafe(super(UICellAccessory, NSObject))]
196 #[thread_kind = MainThreadOnly]
197 #[derive(Debug, PartialEq, Eq, Hash)]
198 pub struct UICellAccessoryDetail;
199);
200
201unsafe impl NSCoding for UICellAccessoryDetail {}
202
203unsafe impl NSCopying for UICellAccessoryDetail {}
204
205unsafe impl CopyingHelper for UICellAccessoryDetail {
206 type Result = Self;
207}
208
209unsafe impl NSObjectProtocol for UICellAccessoryDetail {}
210
211unsafe impl NSSecureCoding for UICellAccessoryDetail {}
212
213impl UICellAccessoryDetail {
214 extern_methods!(
215 #[cfg(feature = "block2")]
216 #[unsafe(method(actionHandler))]
218 #[unsafe(method_family = none)]
219 pub unsafe fn actionHandler(&self) -> *mut block2::Block<dyn Fn()>;
220
221 #[cfg(feature = "block2")]
222 #[unsafe(method(setActionHandler:))]
224 #[unsafe(method_family = none)]
225 pub unsafe fn setActionHandler(&self, action_handler: Option<&block2::Block<dyn Fn()>>);
226 );
227}
228
229impl UICellAccessoryDetail {
231 extern_methods!(
232 #[unsafe(method(initWithCoder:))]
233 #[unsafe(method_family = init)]
234 pub unsafe fn initWithCoder(
235 this: Allocated<Self>,
236 coder: &NSCoder,
237 ) -> Option<Retained<Self>>;
238
239 #[unsafe(method(init))]
240 #[unsafe(method_family = init)]
241 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
242 );
243}
244
245impl UICellAccessoryDetail {
247 extern_methods!(
248 #[unsafe(method(new))]
249 #[unsafe(method_family = new)]
250 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
251 );
252}
253
254extern_class!(
255 #[unsafe(super(UICellAccessory, NSObject))]
259 #[thread_kind = MainThreadOnly]
260 #[derive(Debug, PartialEq, Eq, Hash)]
261 pub struct UICellAccessoryCheckmark;
262);
263
264unsafe impl NSCoding for UICellAccessoryCheckmark {}
265
266unsafe impl NSCopying for UICellAccessoryCheckmark {}
267
268unsafe impl CopyingHelper for UICellAccessoryCheckmark {
269 type Result = Self;
270}
271
272unsafe impl NSObjectProtocol for UICellAccessoryCheckmark {}
273
274unsafe impl NSSecureCoding for UICellAccessoryCheckmark {}
275
276impl UICellAccessoryCheckmark {
277 extern_methods!();
278}
279
280impl UICellAccessoryCheckmark {
282 extern_methods!(
283 #[unsafe(method(initWithCoder:))]
284 #[unsafe(method_family = init)]
285 pub unsafe fn initWithCoder(
286 this: Allocated<Self>,
287 coder: &NSCoder,
288 ) -> Option<Retained<Self>>;
289
290 #[unsafe(method(init))]
291 #[unsafe(method_family = init)]
292 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
293 );
294}
295
296impl UICellAccessoryCheckmark {
298 extern_methods!(
299 #[unsafe(method(new))]
300 #[unsafe(method_family = new)]
301 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
302 );
303}
304
305extern_class!(
306 #[unsafe(super(UICellAccessory, NSObject))]
310 #[thread_kind = MainThreadOnly]
311 #[derive(Debug, PartialEq, Eq, Hash)]
312 pub struct UICellAccessoryDelete;
313);
314
315unsafe impl NSCoding for UICellAccessoryDelete {}
316
317unsafe impl NSCopying for UICellAccessoryDelete {}
318
319unsafe impl CopyingHelper for UICellAccessoryDelete {
320 type Result = Self;
321}
322
323unsafe impl NSObjectProtocol for UICellAccessoryDelete {}
324
325unsafe impl NSSecureCoding for UICellAccessoryDelete {}
326
327impl UICellAccessoryDelete {
328 extern_methods!(
329 #[cfg(feature = "UIColor")]
330 #[unsafe(method(backgroundColor))]
332 #[unsafe(method_family = none)]
333 pub unsafe fn backgroundColor(&self) -> Option<Retained<UIColor>>;
334
335 #[cfg(feature = "UIColor")]
336 #[unsafe(method(setBackgroundColor:))]
338 #[unsafe(method_family = none)]
339 pub unsafe fn setBackgroundColor(&self, background_color: Option<&UIColor>);
340
341 #[cfg(feature = "block2")]
342 #[unsafe(method(actionHandler))]
344 #[unsafe(method_family = none)]
345 pub unsafe fn actionHandler(&self) -> *mut block2::Block<dyn Fn()>;
346
347 #[cfg(feature = "block2")]
348 #[unsafe(method(setActionHandler:))]
350 #[unsafe(method_family = none)]
351 pub unsafe fn setActionHandler(&self, action_handler: Option<&block2::Block<dyn Fn()>>);
352 );
353}
354
355impl UICellAccessoryDelete {
357 extern_methods!(
358 #[unsafe(method(initWithCoder:))]
359 #[unsafe(method_family = init)]
360 pub unsafe fn initWithCoder(
361 this: Allocated<Self>,
362 coder: &NSCoder,
363 ) -> Option<Retained<Self>>;
364
365 #[unsafe(method(init))]
366 #[unsafe(method_family = init)]
367 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
368 );
369}
370
371impl UICellAccessoryDelete {
373 extern_methods!(
374 #[unsafe(method(new))]
375 #[unsafe(method_family = new)]
376 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
377 );
378}
379
380extern_class!(
381 #[unsafe(super(UICellAccessory, NSObject))]
385 #[thread_kind = MainThreadOnly]
386 #[derive(Debug, PartialEq, Eq, Hash)]
387 pub struct UICellAccessoryInsert;
388);
389
390unsafe impl NSCoding for UICellAccessoryInsert {}
391
392unsafe impl NSCopying for UICellAccessoryInsert {}
393
394unsafe impl CopyingHelper for UICellAccessoryInsert {
395 type Result = Self;
396}
397
398unsafe impl NSObjectProtocol for UICellAccessoryInsert {}
399
400unsafe impl NSSecureCoding for UICellAccessoryInsert {}
401
402impl UICellAccessoryInsert {
403 extern_methods!(
404 #[cfg(feature = "UIColor")]
405 #[unsafe(method(backgroundColor))]
407 #[unsafe(method_family = none)]
408 pub unsafe fn backgroundColor(&self) -> Option<Retained<UIColor>>;
409
410 #[cfg(feature = "UIColor")]
411 #[unsafe(method(setBackgroundColor:))]
413 #[unsafe(method_family = none)]
414 pub unsafe fn setBackgroundColor(&self, background_color: Option<&UIColor>);
415
416 #[cfg(feature = "block2")]
417 #[unsafe(method(actionHandler))]
419 #[unsafe(method_family = none)]
420 pub unsafe fn actionHandler(&self) -> *mut block2::Block<dyn Fn()>;
421
422 #[cfg(feature = "block2")]
423 #[unsafe(method(setActionHandler:))]
425 #[unsafe(method_family = none)]
426 pub unsafe fn setActionHandler(&self, action_handler: Option<&block2::Block<dyn Fn()>>);
427 );
428}
429
430impl UICellAccessoryInsert {
432 extern_methods!(
433 #[unsafe(method(initWithCoder:))]
434 #[unsafe(method_family = init)]
435 pub unsafe fn initWithCoder(
436 this: Allocated<Self>,
437 coder: &NSCoder,
438 ) -> Option<Retained<Self>>;
439
440 #[unsafe(method(init))]
441 #[unsafe(method_family = init)]
442 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
443 );
444}
445
446impl UICellAccessoryInsert {
448 extern_methods!(
449 #[unsafe(method(new))]
450 #[unsafe(method_family = new)]
451 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
452 );
453}
454
455extern_class!(
456 #[unsafe(super(UICellAccessory, NSObject))]
461 #[thread_kind = MainThreadOnly]
462 #[derive(Debug, PartialEq, Eq, Hash)]
463 pub struct UICellAccessoryReorder;
464);
465
466unsafe impl NSCoding for UICellAccessoryReorder {}
467
468unsafe impl NSCopying for UICellAccessoryReorder {}
469
470unsafe impl CopyingHelper for UICellAccessoryReorder {
471 type Result = Self;
472}
473
474unsafe impl NSObjectProtocol for UICellAccessoryReorder {}
475
476unsafe impl NSSecureCoding for UICellAccessoryReorder {}
477
478impl UICellAccessoryReorder {
479 extern_methods!(
480 #[unsafe(method(showsVerticalSeparator))]
482 #[unsafe(method_family = none)]
483 pub unsafe fn showsVerticalSeparator(&self) -> bool;
484
485 #[unsafe(method(setShowsVerticalSeparator:))]
487 #[unsafe(method_family = none)]
488 pub unsafe fn setShowsVerticalSeparator(&self, shows_vertical_separator: bool);
489 );
490}
491
492impl UICellAccessoryReorder {
494 extern_methods!(
495 #[unsafe(method(initWithCoder:))]
496 #[unsafe(method_family = init)]
497 pub unsafe fn initWithCoder(
498 this: Allocated<Self>,
499 coder: &NSCoder,
500 ) -> Option<Retained<Self>>;
501
502 #[unsafe(method(init))]
503 #[unsafe(method_family = init)]
504 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
505 );
506}
507
508impl UICellAccessoryReorder {
510 extern_methods!(
511 #[unsafe(method(new))]
512 #[unsafe(method_family = new)]
513 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
514 );
515}
516
517extern_class!(
518 #[unsafe(super(UICellAccessory, NSObject))]
523 #[thread_kind = MainThreadOnly]
524 #[derive(Debug, PartialEq, Eq, Hash)]
525 pub struct UICellAccessoryMultiselect;
526);
527
528unsafe impl NSCoding for UICellAccessoryMultiselect {}
529
530unsafe impl NSCopying for UICellAccessoryMultiselect {}
531
532unsafe impl CopyingHelper for UICellAccessoryMultiselect {
533 type Result = Self;
534}
535
536unsafe impl NSObjectProtocol for UICellAccessoryMultiselect {}
537
538unsafe impl NSSecureCoding for UICellAccessoryMultiselect {}
539
540impl UICellAccessoryMultiselect {
541 extern_methods!(
542 #[cfg(feature = "UIColor")]
543 #[unsafe(method(backgroundColor))]
545 #[unsafe(method_family = none)]
546 pub unsafe fn backgroundColor(&self) -> Option<Retained<UIColor>>;
547
548 #[cfg(feature = "UIColor")]
549 #[unsafe(method(setBackgroundColor:))]
551 #[unsafe(method_family = none)]
552 pub unsafe fn setBackgroundColor(&self, background_color: Option<&UIColor>);
553 );
554}
555
556impl UICellAccessoryMultiselect {
558 extern_methods!(
559 #[unsafe(method(initWithCoder:))]
560 #[unsafe(method_family = init)]
561 pub unsafe fn initWithCoder(
562 this: Allocated<Self>,
563 coder: &NSCoder,
564 ) -> Option<Retained<Self>>;
565
566 #[unsafe(method(init))]
567 #[unsafe(method_family = init)]
568 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
569 );
570}
571
572impl UICellAccessoryMultiselect {
574 extern_methods!(
575 #[unsafe(method(new))]
576 #[unsafe(method_family = new)]
577 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
578 );
579}
580
581#[repr(transparent)]
584#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
585pub struct UICellAccessoryOutlineDisclosureStyle(pub NSInteger);
586impl UICellAccessoryOutlineDisclosureStyle {
587 #[doc(alias = "UICellAccessoryOutlineDisclosureStyleAutomatic")]
589 pub const Automatic: Self = Self(0);
590 #[doc(alias = "UICellAccessoryOutlineDisclosureStyleHeader")]
593 pub const Header: Self = Self(1);
594 #[doc(alias = "UICellAccessoryOutlineDisclosureStyleCell")]
597 pub const Cell: Self = Self(2);
598}
599
600unsafe impl Encode for UICellAccessoryOutlineDisclosureStyle {
601 const ENCODING: Encoding = NSInteger::ENCODING;
602}
603
604unsafe impl RefEncode for UICellAccessoryOutlineDisclosureStyle {
605 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
606}
607
608extern_class!(
609 #[unsafe(super(UICellAccessory, NSObject))]
613 #[thread_kind = MainThreadOnly]
614 #[derive(Debug, PartialEq, Eq, Hash)]
615 pub struct UICellAccessoryOutlineDisclosure;
616);
617
618unsafe impl NSCoding for UICellAccessoryOutlineDisclosure {}
619
620unsafe impl NSCopying for UICellAccessoryOutlineDisclosure {}
621
622unsafe impl CopyingHelper for UICellAccessoryOutlineDisclosure {
623 type Result = Self;
624}
625
626unsafe impl NSObjectProtocol for UICellAccessoryOutlineDisclosure {}
627
628unsafe impl NSSecureCoding for UICellAccessoryOutlineDisclosure {}
629
630impl UICellAccessoryOutlineDisclosure {
631 extern_methods!(
632 #[unsafe(method(style))]
634 #[unsafe(method_family = none)]
635 pub unsafe fn style(&self) -> UICellAccessoryOutlineDisclosureStyle;
636
637 #[unsafe(method(setStyle:))]
639 #[unsafe(method_family = none)]
640 pub unsafe fn setStyle(&self, style: UICellAccessoryOutlineDisclosureStyle);
641
642 #[cfg(feature = "block2")]
643 #[unsafe(method(actionHandler))]
646 #[unsafe(method_family = none)]
647 pub unsafe fn actionHandler(&self) -> *mut block2::Block<dyn Fn()>;
648
649 #[cfg(feature = "block2")]
650 #[unsafe(method(setActionHandler:))]
652 #[unsafe(method_family = none)]
653 pub unsafe fn setActionHandler(&self, action_handler: Option<&block2::Block<dyn Fn()>>);
654 );
655}
656
657impl UICellAccessoryOutlineDisclosure {
659 extern_methods!(
660 #[unsafe(method(initWithCoder:))]
661 #[unsafe(method_family = init)]
662 pub unsafe fn initWithCoder(
663 this: Allocated<Self>,
664 coder: &NSCoder,
665 ) -> Option<Retained<Self>>;
666
667 #[unsafe(method(init))]
668 #[unsafe(method_family = init)]
669 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
670 );
671}
672
673impl UICellAccessoryOutlineDisclosure {
675 extern_methods!(
676 #[unsafe(method(new))]
677 #[unsafe(method_family = new)]
678 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
679 );
680}
681
682extern_class!(
683 #[unsafe(super(UICellAccessory, NSObject))]
687 #[thread_kind = MainThreadOnly]
688 #[derive(Debug, PartialEq, Eq, Hash)]
689 pub struct UICellAccessoryPopUpMenu;
690);
691
692unsafe impl NSCoding for UICellAccessoryPopUpMenu {}
693
694unsafe impl NSCopying for UICellAccessoryPopUpMenu {}
695
696unsafe impl CopyingHelper for UICellAccessoryPopUpMenu {
697 type Result = Self;
698}
699
700unsafe impl NSObjectProtocol for UICellAccessoryPopUpMenu {}
701
702unsafe impl NSSecureCoding for UICellAccessoryPopUpMenu {}
703
704impl UICellAccessoryPopUpMenu {
705 extern_methods!(
706 #[cfg(all(feature = "UIMenu", feature = "UIMenuElement"))]
707 #[unsafe(method(initWithMenu:))]
709 #[unsafe(method_family = init)]
710 pub unsafe fn initWithMenu(this: Allocated<Self>, menu: &UIMenu) -> Retained<Self>;
711
712 #[cfg(all(feature = "UIMenu", feature = "UIMenuElement"))]
713 #[unsafe(method(menu))]
714 #[unsafe(method_family = none)]
715 pub unsafe fn menu(&self) -> Retained<UIMenu>;
716
717 #[cfg(all(feature = "UIMenu", feature = "UIMenuElement", feature = "block2"))]
718 #[unsafe(method(selectedElementDidChangeHandler))]
720 #[unsafe(method_family = none)]
721 pub unsafe fn selectedElementDidChangeHandler(
722 &self,
723 ) -> *mut block2::Block<dyn Fn(NonNull<UIMenu>)>;
724
725 #[cfg(all(feature = "UIMenu", feature = "UIMenuElement", feature = "block2"))]
726 #[unsafe(method(setSelectedElementDidChangeHandler:))]
728 #[unsafe(method_family = none)]
729 pub unsafe fn setSelectedElementDidChangeHandler(
730 &self,
731 selected_element_did_change_handler: Option<&block2::Block<dyn Fn(NonNull<UIMenu>)>>,
732 );
733
734 #[unsafe(method(initWithCoder:))]
735 #[unsafe(method_family = init)]
736 pub unsafe fn initWithCoder(
737 this: Allocated<Self>,
738 coder: &NSCoder,
739 ) -> Option<Retained<Self>>;
740
741 #[unsafe(method(init))]
742 #[unsafe(method_family = init)]
743 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
744
745 #[unsafe(method(new))]
746 #[unsafe(method_family = new)]
747 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
748 );
749}
750
751extern_class!(
752 #[unsafe(super(UICellAccessory, NSObject))]
756 #[thread_kind = MainThreadOnly]
757 #[derive(Debug, PartialEq, Eq, Hash)]
758 pub struct UICellAccessoryLabel;
759);
760
761unsafe impl NSCoding for UICellAccessoryLabel {}
762
763unsafe impl NSCopying for UICellAccessoryLabel {}
764
765unsafe impl CopyingHelper for UICellAccessoryLabel {
766 type Result = Self;
767}
768
769unsafe impl NSObjectProtocol for UICellAccessoryLabel {}
770
771unsafe impl NSSecureCoding for UICellAccessoryLabel {}
772
773impl UICellAccessoryLabel {
774 extern_methods!(
775 #[unsafe(method(initWithText:))]
777 #[unsafe(method_family = init)]
778 pub unsafe fn initWithText(this: Allocated<Self>, text: &NSString) -> Retained<Self>;
779
780 #[unsafe(method(text))]
781 #[unsafe(method_family = none)]
782 pub unsafe fn text(&self) -> Retained<NSString>;
783
784 #[cfg(feature = "UIFont")]
785 #[unsafe(method(font))]
787 #[unsafe(method_family = none)]
788 pub unsafe fn font(&self) -> Retained<UIFont>;
789
790 #[cfg(feature = "UIFont")]
791 #[unsafe(method(setFont:))]
793 #[unsafe(method_family = none)]
794 pub unsafe fn setFont(&self, font: &UIFont);
795
796 #[unsafe(method(adjustsFontForContentSizeCategory))]
798 #[unsafe(method_family = none)]
799 pub unsafe fn adjustsFontForContentSizeCategory(&self) -> bool;
800
801 #[unsafe(method(setAdjustsFontForContentSizeCategory:))]
803 #[unsafe(method_family = none)]
804 pub unsafe fn setAdjustsFontForContentSizeCategory(
805 &self,
806 adjusts_font_for_content_size_category: bool,
807 );
808
809 #[unsafe(method(initWithCoder:))]
810 #[unsafe(method_family = init)]
811 pub unsafe fn initWithCoder(
812 this: Allocated<Self>,
813 coder: &NSCoder,
814 ) -> Option<Retained<Self>>;
815
816 #[unsafe(method(init))]
817 #[unsafe(method_family = init)]
818 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
819
820 #[unsafe(method(new))]
821 #[unsafe(method_family = new)]
822 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
823 );
824}
825
826#[repr(transparent)]
829#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
830pub struct UICellAccessoryPlacement(pub NSInteger);
831impl UICellAccessoryPlacement {
832 #[doc(alias = "UICellAccessoryPlacementLeading")]
834 pub const Leading: Self = Self(0);
835 #[doc(alias = "UICellAccessoryPlacementTrailing")]
837 pub const Trailing: Self = Self(1);
838}
839
840unsafe impl Encode for UICellAccessoryPlacement {
841 const ENCODING: Encoding = NSInteger::ENCODING;
842}
843
844unsafe impl RefEncode for UICellAccessoryPlacement {
845 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
846}
847
848#[cfg(feature = "block2")]
852pub type UICellAccessoryPosition =
853 *mut block2::Block<dyn Fn(NonNull<NSArray<UICellAccessory>>) -> NSUInteger>;
854
855extern "C-unwind" {
856 #[cfg(feature = "block2")]
858 pub fn UICellAccessoryPositionBeforeAccessoryOfClass(
859 accessory_class: &AnyClass,
860 ) -> UICellAccessoryPosition;
861}
862
863extern "C-unwind" {
864 #[cfg(feature = "block2")]
866 pub fn UICellAccessoryPositionAfterAccessoryOfClass(
867 accessory_class: &AnyClass,
868 ) -> UICellAccessoryPosition;
869}
870
871extern_class!(
872 #[unsafe(super(UICellAccessory, NSObject))]
876 #[thread_kind = MainThreadOnly]
877 #[derive(Debug, PartialEq, Eq, Hash)]
878 pub struct UICellAccessoryCustomView;
879);
880
881unsafe impl NSCoding for UICellAccessoryCustomView {}
882
883unsafe impl NSCopying for UICellAccessoryCustomView {}
884
885unsafe impl CopyingHelper for UICellAccessoryCustomView {
886 type Result = Self;
887}
888
889unsafe impl NSObjectProtocol for UICellAccessoryCustomView {}
890
891unsafe impl NSSecureCoding for UICellAccessoryCustomView {}
892
893impl UICellAccessoryCustomView {
894 extern_methods!(
895 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
896 #[unsafe(method(initWithCustomView:placement:))]
899 #[unsafe(method_family = init)]
900 pub unsafe fn initWithCustomView_placement(
901 this: Allocated<Self>,
902 custom_view: &UIView,
903 placement: UICellAccessoryPlacement,
904 ) -> Retained<Self>;
905
906 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
907 #[unsafe(method(customView))]
908 #[unsafe(method_family = none)]
909 pub unsafe fn customView(&self) -> Retained<UIView>;
910
911 #[unsafe(method(placement))]
912 #[unsafe(method_family = none)]
913 pub unsafe fn placement(&self) -> UICellAccessoryPlacement;
914
915 #[unsafe(method(maintainsFixedSize))]
917 #[unsafe(method_family = none)]
918 pub unsafe fn maintainsFixedSize(&self) -> bool;
919
920 #[unsafe(method(setMaintainsFixedSize:))]
922 #[unsafe(method_family = none)]
923 pub unsafe fn setMaintainsFixedSize(&self, maintains_fixed_size: bool);
924
925 #[cfg(feature = "block2")]
926 #[unsafe(method(position))]
929 #[unsafe(method_family = none)]
930 pub unsafe fn position(&self) -> UICellAccessoryPosition;
931
932 #[cfg(feature = "block2")]
933 #[unsafe(method(setPosition:))]
935 #[unsafe(method_family = none)]
936 pub unsafe fn setPosition(&self, position: UICellAccessoryPosition);
937
938 #[unsafe(method(initWithCoder:))]
939 #[unsafe(method_family = init)]
940 pub unsafe fn initWithCoder(
941 this: Allocated<Self>,
942 coder: &NSCoder,
943 ) -> Option<Retained<Self>>;
944
945 #[unsafe(method(init))]
946 #[unsafe(method_family = init)]
947 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
948
949 #[unsafe(method(new))]
950 #[unsafe(method_family = new)]
951 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
952 );
953}