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#[cfg(feature = "objc2-quartz-core")]
10#[cfg(not(target_os = "watchos"))]
11use objc2_quartz_core::*;
12
13use crate::*;
14
15#[repr(transparent)]
18#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
19pub struct UITableViewStyle(pub NSInteger);
20impl UITableViewStyle {
21 #[doc(alias = "UITableViewStylePlain")]
22 pub const Plain: Self = Self(0);
23 #[doc(alias = "UITableViewStyleGrouped")]
24 pub const Grouped: Self = Self(1);
25 #[doc(alias = "UITableViewStyleInsetGrouped")]
26 pub const InsetGrouped: Self = Self(2);
27}
28
29unsafe impl Encode for UITableViewStyle {
30 const ENCODING: Encoding = NSInteger::ENCODING;
31}
32
33unsafe impl RefEncode for UITableViewStyle {
34 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
35}
36
37#[repr(transparent)]
40#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
41pub struct UITableViewScrollPosition(pub NSInteger);
42impl UITableViewScrollPosition {
43 #[doc(alias = "UITableViewScrollPositionNone")]
44 pub const None: Self = Self(0);
45 #[doc(alias = "UITableViewScrollPositionTop")]
46 pub const Top: Self = Self(1);
47 #[doc(alias = "UITableViewScrollPositionMiddle")]
48 pub const Middle: Self = Self(2);
49 #[doc(alias = "UITableViewScrollPositionBottom")]
50 pub const Bottom: Self = Self(3);
51}
52
53unsafe impl Encode for UITableViewScrollPosition {
54 const ENCODING: Encoding = NSInteger::ENCODING;
55}
56
57unsafe impl RefEncode for UITableViewScrollPosition {
58 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
59}
60
61#[repr(transparent)]
64#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
65pub struct UITableViewRowAnimation(pub NSInteger);
66impl UITableViewRowAnimation {
67 #[doc(alias = "UITableViewRowAnimationFade")]
68 pub const Fade: Self = Self(0);
69 #[doc(alias = "UITableViewRowAnimationRight")]
70 pub const Right: Self = Self(1);
71 #[doc(alias = "UITableViewRowAnimationLeft")]
72 pub const Left: Self = Self(2);
73 #[doc(alias = "UITableViewRowAnimationTop")]
74 pub const Top: Self = Self(3);
75 #[doc(alias = "UITableViewRowAnimationBottom")]
76 pub const Bottom: Self = Self(4);
77 #[doc(alias = "UITableViewRowAnimationNone")]
78 pub const None: Self = Self(5);
79 #[doc(alias = "UITableViewRowAnimationMiddle")]
80 pub const Middle: Self = Self(6);
81 #[doc(alias = "UITableViewRowAnimationAutomatic")]
82 pub const Automatic: Self = Self(100);
83}
84
85unsafe impl Encode for UITableViewRowAnimation {
86 const ENCODING: Encoding = NSInteger::ENCODING;
87}
88
89unsafe impl RefEncode for UITableViewRowAnimation {
90 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
91}
92
93#[repr(transparent)]
98#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
99pub struct UITableViewContentHuggingElements(pub NSInteger);
100bitflags::bitflags! {
101 impl UITableViewContentHuggingElements: NSInteger {
102#[doc(alias = "UITableViewContentHuggingElementsNone")]
104 const None = 0;
105#[doc(alias = "UITableViewContentHuggingElementsSectionHeaders")]
107 const SectionHeaders = 1<<0;
108 }
109}
110
111unsafe impl Encode for UITableViewContentHuggingElements {
112 const ENCODING: Encoding = NSInteger::ENCODING;
113}
114
115unsafe impl RefEncode for UITableViewContentHuggingElements {
116 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
117}
118
119extern "C" {
120 pub static UITableViewIndexSearch: &'static NSString;
122}
123
124extern "C" {
125 #[cfg(feature = "objc2-core-foundation")]
127 pub static UITableViewAutomaticDimension: CGFloat;
128}
129
130#[deprecated = "Use UIContextualAction and related APIs instead."]
133#[repr(transparent)]
134#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
135pub struct UITableViewRowActionStyle(pub NSInteger);
136impl UITableViewRowActionStyle {
137 #[doc(alias = "UITableViewRowActionStyleDefault")]
138 #[deprecated = "Use UIContextualAction and related APIs instead."]
139 pub const Default: Self = Self(0);
140 #[doc(alias = "UITableViewRowActionStyleDestructive")]
141 #[deprecated = "Use UIContextualAction and related APIs instead."]
142 pub const Destructive: Self = Self(UITableViewRowActionStyle::Default.0);
143 #[doc(alias = "UITableViewRowActionStyleNormal")]
144 #[deprecated = "Use UIContextualAction and related APIs instead."]
145 pub const Normal: Self = Self(1);
146}
147
148unsafe impl Encode for UITableViewRowActionStyle {
149 const ENCODING: Encoding = NSInteger::ENCODING;
150}
151
152unsafe impl RefEncode for UITableViewRowActionStyle {
153 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
154}
155
156extern_class!(
157 #[unsafe(super(NSObject))]
159 #[thread_kind = MainThreadOnly]
160 #[derive(Debug, PartialEq, Eq, Hash)]
161 #[deprecated = "Use UIContextualAction and related APIs instead."]
162 pub struct UITableViewRowAction;
163);
164
165extern_conformance!(
166 unsafe impl NSCopying for UITableViewRowAction {}
167);
168
169unsafe impl CopyingHelper for UITableViewRowAction {
170 type Result = Self;
171}
172
173extern_conformance!(
174 unsafe impl NSObjectProtocol for UITableViewRowAction {}
175);
176
177impl UITableViewRowAction {
178 extern_methods!(
179 #[cfg(feature = "block2")]
180 #[deprecated = "Use UIContextualAction and related APIs instead."]
181 #[unsafe(method(rowActionWithStyle:title:handler:))]
182 #[unsafe(method_family = none)]
183 pub unsafe fn rowActionWithStyle_title_handler(
184 style: UITableViewRowActionStyle,
185 title: Option<&NSString>,
186 handler: &block2::DynBlock<dyn Fn(NonNull<UITableViewRowAction>, NonNull<NSIndexPath>)>,
187 mtm: MainThreadMarker,
188 ) -> Retained<Self>;
189
190 #[deprecated = "Use UIContextualAction and related APIs instead."]
191 #[unsafe(method(style))]
192 #[unsafe(method_family = none)]
193 pub unsafe fn style(&self) -> UITableViewRowActionStyle;
194
195 #[deprecated = "Use UIContextualAction and related APIs instead."]
196 #[unsafe(method(title))]
197 #[unsafe(method_family = none)]
198 pub unsafe fn title(&self) -> Option<Retained<NSString>>;
199
200 #[deprecated = "Use UIContextualAction and related APIs instead."]
202 #[unsafe(method(setTitle:))]
203 #[unsafe(method_family = none)]
204 pub unsafe fn setTitle(&self, title: Option<&NSString>);
205
206 #[cfg(feature = "UIColor")]
207 #[deprecated = "Use UIContextualAction and related APIs instead."]
208 #[unsafe(method(backgroundColor))]
209 #[unsafe(method_family = none)]
210 pub unsafe fn backgroundColor(&self) -> Option<Retained<UIColor>>;
211
212 #[cfg(feature = "UIColor")]
213 #[deprecated = "Use UIContextualAction and related APIs instead."]
215 #[unsafe(method(setBackgroundColor:))]
216 #[unsafe(method_family = none)]
217 pub unsafe fn setBackgroundColor(&self, background_color: Option<&UIColor>);
218
219 #[cfg(feature = "UIVisualEffect")]
220 #[deprecated = "Use UIContextualAction and related APIs instead."]
221 #[unsafe(method(backgroundEffect))]
222 #[unsafe(method_family = none)]
223 pub unsafe fn backgroundEffect(&self) -> Option<Retained<UIVisualEffect>>;
224
225 #[cfg(feature = "UIVisualEffect")]
226 #[deprecated = "Use UIContextualAction and related APIs instead."]
228 #[unsafe(method(setBackgroundEffect:))]
229 #[unsafe(method_family = none)]
230 pub unsafe fn setBackgroundEffect(&self, background_effect: Option<&UIVisualEffect>);
231 );
232}
233
234impl UITableViewRowAction {
236 extern_methods!(
237 #[unsafe(method(init))]
238 #[unsafe(method_family = init)]
239 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
240
241 #[unsafe(method(new))]
242 #[unsafe(method_family = new)]
243 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
244 );
245}
246
247extern_class!(
248 #[unsafe(super(UIFocusUpdateContext, NSObject))]
250 #[thread_kind = MainThreadOnly]
251 #[derive(Debug, PartialEq, Eq, Hash)]
252 #[cfg(feature = "UIFocus")]
253 pub struct UITableViewFocusUpdateContext;
254);
255
256#[cfg(feature = "UIFocus")]
257extern_conformance!(
258 unsafe impl NSObjectProtocol for UITableViewFocusUpdateContext {}
259);
260
261#[cfg(feature = "UIFocus")]
262impl UITableViewFocusUpdateContext {
263 extern_methods!(
264 #[unsafe(method(previouslyFocusedIndexPath))]
265 #[unsafe(method_family = none)]
266 pub unsafe fn previouslyFocusedIndexPath(&self) -> Option<Retained<NSIndexPath>>;
267
268 #[unsafe(method(nextFocusedIndexPath))]
269 #[unsafe(method_family = none)]
270 pub unsafe fn nextFocusedIndexPath(&self) -> Option<Retained<NSIndexPath>>;
271 );
272}
273
274#[cfg(feature = "UIFocus")]
276impl UITableViewFocusUpdateContext {
277 extern_methods!(
278 #[unsafe(method(init))]
279 #[unsafe(method_family = init)]
280 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
281
282 #[unsafe(method(new))]
283 #[unsafe(method_family = new)]
284 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
285 );
286}
287
288extern_protocol!(
289 #[cfg(feature = "UIScrollView")]
291 pub unsafe trait UITableViewDelegate:
292 NSObjectProtocol + UIScrollViewDelegate + MainThreadOnly
293 {
294 #[cfg(all(
295 feature = "UIResponder",
296 feature = "UITableViewCell",
297 feature = "UIView"
298 ))]
299 #[optional]
300 #[unsafe(method(tableView:willDisplayCell:forRowAtIndexPath:))]
301 #[unsafe(method_family = none)]
302 unsafe fn tableView_willDisplayCell_forRowAtIndexPath(
303 &self,
304 table_view: &UITableView,
305 cell: &UITableViewCell,
306 index_path: &NSIndexPath,
307 );
308
309 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
310 #[optional]
311 #[unsafe(method(tableView:willDisplayHeaderView:forSection:))]
312 #[unsafe(method_family = none)]
313 unsafe fn tableView_willDisplayHeaderView_forSection(
314 &self,
315 table_view: &UITableView,
316 view: &UIView,
317 section: NSInteger,
318 );
319
320 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
321 #[optional]
322 #[unsafe(method(tableView:willDisplayFooterView:forSection:))]
323 #[unsafe(method_family = none)]
324 unsafe fn tableView_willDisplayFooterView_forSection(
325 &self,
326 table_view: &UITableView,
327 view: &UIView,
328 section: NSInteger,
329 );
330
331 #[cfg(all(
332 feature = "UIResponder",
333 feature = "UITableViewCell",
334 feature = "UIView"
335 ))]
336 #[optional]
337 #[unsafe(method(tableView:didEndDisplayingCell:forRowAtIndexPath:))]
338 #[unsafe(method_family = none)]
339 unsafe fn tableView_didEndDisplayingCell_forRowAtIndexPath(
340 &self,
341 table_view: &UITableView,
342 cell: &UITableViewCell,
343 index_path: &NSIndexPath,
344 );
345
346 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
347 #[optional]
348 #[unsafe(method(tableView:didEndDisplayingHeaderView:forSection:))]
349 #[unsafe(method_family = none)]
350 unsafe fn tableView_didEndDisplayingHeaderView_forSection(
351 &self,
352 table_view: &UITableView,
353 view: &UIView,
354 section: NSInteger,
355 );
356
357 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
358 #[optional]
359 #[unsafe(method(tableView:didEndDisplayingFooterView:forSection:))]
360 #[unsafe(method_family = none)]
361 unsafe fn tableView_didEndDisplayingFooterView_forSection(
362 &self,
363 table_view: &UITableView,
364 view: &UIView,
365 section: NSInteger,
366 );
367
368 #[cfg(all(
369 feature = "UIResponder",
370 feature = "UIView",
371 feature = "objc2-core-foundation"
372 ))]
373 #[optional]
374 #[unsafe(method(tableView:heightForRowAtIndexPath:))]
375 #[unsafe(method_family = none)]
376 unsafe fn tableView_heightForRowAtIndexPath(
377 &self,
378 table_view: &UITableView,
379 index_path: &NSIndexPath,
380 ) -> CGFloat;
381
382 #[cfg(all(
383 feature = "UIResponder",
384 feature = "UIView",
385 feature = "objc2-core-foundation"
386 ))]
387 #[optional]
388 #[unsafe(method(tableView:heightForHeaderInSection:))]
389 #[unsafe(method_family = none)]
390 unsafe fn tableView_heightForHeaderInSection(
391 &self,
392 table_view: &UITableView,
393 section: NSInteger,
394 ) -> CGFloat;
395
396 #[cfg(all(
397 feature = "UIResponder",
398 feature = "UIView",
399 feature = "objc2-core-foundation"
400 ))]
401 #[optional]
402 #[unsafe(method(tableView:heightForFooterInSection:))]
403 #[unsafe(method_family = none)]
404 unsafe fn tableView_heightForFooterInSection(
405 &self,
406 table_view: &UITableView,
407 section: NSInteger,
408 ) -> CGFloat;
409
410 #[cfg(all(
411 feature = "UIResponder",
412 feature = "UIView",
413 feature = "objc2-core-foundation"
414 ))]
415 #[optional]
416 #[unsafe(method(tableView:estimatedHeightForRowAtIndexPath:))]
417 #[unsafe(method_family = none)]
418 unsafe fn tableView_estimatedHeightForRowAtIndexPath(
419 &self,
420 table_view: &UITableView,
421 index_path: &NSIndexPath,
422 ) -> CGFloat;
423
424 #[cfg(all(
425 feature = "UIResponder",
426 feature = "UIView",
427 feature = "objc2-core-foundation"
428 ))]
429 #[optional]
430 #[unsafe(method(tableView:estimatedHeightForHeaderInSection:))]
431 #[unsafe(method_family = none)]
432 unsafe fn tableView_estimatedHeightForHeaderInSection(
433 &self,
434 table_view: &UITableView,
435 section: NSInteger,
436 ) -> CGFloat;
437
438 #[cfg(all(
439 feature = "UIResponder",
440 feature = "UIView",
441 feature = "objc2-core-foundation"
442 ))]
443 #[optional]
444 #[unsafe(method(tableView:estimatedHeightForFooterInSection:))]
445 #[unsafe(method_family = none)]
446 unsafe fn tableView_estimatedHeightForFooterInSection(
447 &self,
448 table_view: &UITableView,
449 section: NSInteger,
450 ) -> CGFloat;
451
452 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
453 #[optional]
454 #[unsafe(method(tableView:viewForHeaderInSection:))]
455 #[unsafe(method_family = none)]
456 unsafe fn tableView_viewForHeaderInSection(
457 &self,
458 table_view: &UITableView,
459 section: NSInteger,
460 ) -> Option<Retained<UIView>>;
461
462 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
463 #[optional]
464 #[unsafe(method(tableView:viewForFooterInSection:))]
465 #[unsafe(method_family = none)]
466 unsafe fn tableView_viewForFooterInSection(
467 &self,
468 table_view: &UITableView,
469 section: NSInteger,
470 ) -> Option<Retained<UIView>>;
471
472 #[cfg(all(
473 feature = "UIResponder",
474 feature = "UITableViewCell",
475 feature = "UIView"
476 ))]
477 #[deprecated]
478 #[optional]
479 #[unsafe(method(tableView:accessoryTypeForRowWithIndexPath:))]
480 #[unsafe(method_family = none)]
481 unsafe fn tableView_accessoryTypeForRowWithIndexPath(
482 &self,
483 table_view: &UITableView,
484 index_path: &NSIndexPath,
485 ) -> UITableViewCellAccessoryType;
486
487 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
488 #[optional]
489 #[unsafe(method(tableView:accessoryButtonTappedForRowWithIndexPath:))]
490 #[unsafe(method_family = none)]
491 unsafe fn tableView_accessoryButtonTappedForRowWithIndexPath(
492 &self,
493 table_view: &UITableView,
494 index_path: &NSIndexPath,
495 );
496
497 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
498 #[optional]
499 #[unsafe(method(tableView:shouldHighlightRowAtIndexPath:))]
500 #[unsafe(method_family = none)]
501 unsafe fn tableView_shouldHighlightRowAtIndexPath(
502 &self,
503 table_view: &UITableView,
504 index_path: &NSIndexPath,
505 ) -> bool;
506
507 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
508 #[optional]
509 #[unsafe(method(tableView:didHighlightRowAtIndexPath:))]
510 #[unsafe(method_family = none)]
511 unsafe fn tableView_didHighlightRowAtIndexPath(
512 &self,
513 table_view: &UITableView,
514 index_path: &NSIndexPath,
515 );
516
517 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
518 #[optional]
519 #[unsafe(method(tableView:didUnhighlightRowAtIndexPath:))]
520 #[unsafe(method_family = none)]
521 unsafe fn tableView_didUnhighlightRowAtIndexPath(
522 &self,
523 table_view: &UITableView,
524 index_path: &NSIndexPath,
525 );
526
527 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
528 #[optional]
529 #[unsafe(method(tableView:willSelectRowAtIndexPath:))]
530 #[unsafe(method_family = none)]
531 unsafe fn tableView_willSelectRowAtIndexPath(
532 &self,
533 table_view: &UITableView,
534 index_path: &NSIndexPath,
535 ) -> Option<Retained<NSIndexPath>>;
536
537 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
538 #[optional]
539 #[unsafe(method(tableView:willDeselectRowAtIndexPath:))]
540 #[unsafe(method_family = none)]
541 unsafe fn tableView_willDeselectRowAtIndexPath(
542 &self,
543 table_view: &UITableView,
544 index_path: &NSIndexPath,
545 ) -> Option<Retained<NSIndexPath>>;
546
547 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
548 #[optional]
549 #[unsafe(method(tableView:didSelectRowAtIndexPath:))]
550 #[unsafe(method_family = none)]
551 unsafe fn tableView_didSelectRowAtIndexPath(
552 &self,
553 table_view: &UITableView,
554 index_path: &NSIndexPath,
555 );
556
557 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
558 #[optional]
559 #[unsafe(method(tableView:didDeselectRowAtIndexPath:))]
560 #[unsafe(method_family = none)]
561 unsafe fn tableView_didDeselectRowAtIndexPath(
562 &self,
563 table_view: &UITableView,
564 index_path: &NSIndexPath,
565 );
566
567 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
568 #[optional]
581 #[unsafe(method(tableView:canPerformPrimaryActionForRowAtIndexPath:))]
582 #[unsafe(method_family = none)]
583 unsafe fn tableView_canPerformPrimaryActionForRowAtIndexPath(
584 &self,
585 table_view: &UITableView,
586 index_path: &NSIndexPath,
587 ) -> bool;
588
589 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
590 #[optional]
609 #[unsafe(method(tableView:performPrimaryActionForRowAtIndexPath:))]
610 #[unsafe(method_family = none)]
611 unsafe fn tableView_performPrimaryActionForRowAtIndexPath(
612 &self,
613 table_view: &UITableView,
614 index_path: &NSIndexPath,
615 );
616
617 #[cfg(all(
618 feature = "UIResponder",
619 feature = "UITableViewCell",
620 feature = "UIView"
621 ))]
622 #[optional]
623 #[unsafe(method(tableView:editingStyleForRowAtIndexPath:))]
624 #[unsafe(method_family = none)]
625 unsafe fn tableView_editingStyleForRowAtIndexPath(
626 &self,
627 table_view: &UITableView,
628 index_path: &NSIndexPath,
629 ) -> UITableViewCellEditingStyle;
630
631 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
632 #[optional]
633 #[unsafe(method(tableView:titleForDeleteConfirmationButtonForRowAtIndexPath:))]
634 #[unsafe(method_family = none)]
635 unsafe fn tableView_titleForDeleteConfirmationButtonForRowAtIndexPath(
636 &self,
637 table_view: &UITableView,
638 index_path: &NSIndexPath,
639 ) -> Option<Retained<NSString>>;
640
641 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
642 #[deprecated]
643 #[optional]
644 #[unsafe(method(tableView:editActionsForRowAtIndexPath:))]
645 #[unsafe(method_family = none)]
646 unsafe fn tableView_editActionsForRowAtIndexPath(
647 &self,
648 table_view: &UITableView,
649 index_path: &NSIndexPath,
650 ) -> Option<Retained<NSArray<UITableViewRowAction>>>;
651
652 #[cfg(all(
653 feature = "UIResponder",
654 feature = "UISwipeActionsConfiguration",
655 feature = "UIView"
656 ))]
657 #[optional]
658 #[unsafe(method(tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:))]
659 #[unsafe(method_family = none)]
660 unsafe fn tableView_leadingSwipeActionsConfigurationForRowAtIndexPath(
661 &self,
662 table_view: &UITableView,
663 index_path: &NSIndexPath,
664 ) -> Option<Retained<UISwipeActionsConfiguration>>;
665
666 #[cfg(all(
667 feature = "UIResponder",
668 feature = "UISwipeActionsConfiguration",
669 feature = "UIView"
670 ))]
671 #[optional]
672 #[unsafe(method(tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:))]
673 #[unsafe(method_family = none)]
674 unsafe fn tableView_trailingSwipeActionsConfigurationForRowAtIndexPath(
675 &self,
676 table_view: &UITableView,
677 index_path: &NSIndexPath,
678 ) -> Option<Retained<UISwipeActionsConfiguration>>;
679
680 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
681 #[optional]
682 #[unsafe(method(tableView:shouldIndentWhileEditingRowAtIndexPath:))]
683 #[unsafe(method_family = none)]
684 unsafe fn tableView_shouldIndentWhileEditingRowAtIndexPath(
685 &self,
686 table_view: &UITableView,
687 index_path: &NSIndexPath,
688 ) -> bool;
689
690 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
691 #[optional]
692 #[unsafe(method(tableView:willBeginEditingRowAtIndexPath:))]
693 #[unsafe(method_family = none)]
694 unsafe fn tableView_willBeginEditingRowAtIndexPath(
695 &self,
696 table_view: &UITableView,
697 index_path: &NSIndexPath,
698 );
699
700 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
701 #[optional]
702 #[unsafe(method(tableView:didEndEditingRowAtIndexPath:))]
703 #[unsafe(method_family = none)]
704 unsafe fn tableView_didEndEditingRowAtIndexPath(
705 &self,
706 table_view: &UITableView,
707 index_path: Option<&NSIndexPath>,
708 );
709
710 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
711 #[optional]
712 #[unsafe(method(tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath:))]
713 #[unsafe(method_family = none)]
714 unsafe fn tableView_targetIndexPathForMoveFromRowAtIndexPath_toProposedIndexPath(
715 &self,
716 table_view: &UITableView,
717 source_index_path: &NSIndexPath,
718 proposed_destination_index_path: &NSIndexPath,
719 ) -> Retained<NSIndexPath>;
720
721 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
722 #[optional]
723 #[unsafe(method(tableView:indentationLevelForRowAtIndexPath:))]
724 #[unsafe(method_family = none)]
725 unsafe fn tableView_indentationLevelForRowAtIndexPath(
726 &self,
727 table_view: &UITableView,
728 index_path: &NSIndexPath,
729 ) -> NSInteger;
730
731 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
732 #[deprecated]
733 #[optional]
734 #[unsafe(method(tableView:shouldShowMenuForRowAtIndexPath:))]
735 #[unsafe(method_family = none)]
736 unsafe fn tableView_shouldShowMenuForRowAtIndexPath(
737 &self,
738 table_view: &UITableView,
739 index_path: &NSIndexPath,
740 ) -> bool;
741
742 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
743 #[deprecated]
744 #[optional]
745 #[unsafe(method(tableView:canPerformAction:forRowAtIndexPath:withSender:))]
746 #[unsafe(method_family = none)]
747 unsafe fn tableView_canPerformAction_forRowAtIndexPath_withSender(
748 &self,
749 table_view: &UITableView,
750 action: Sel,
751 index_path: &NSIndexPath,
752 sender: Option<&AnyObject>,
753 ) -> bool;
754
755 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
756 #[deprecated]
757 #[optional]
758 #[unsafe(method(tableView:performAction:forRowAtIndexPath:withSender:))]
759 #[unsafe(method_family = none)]
760 unsafe fn tableView_performAction_forRowAtIndexPath_withSender(
761 &self,
762 table_view: &UITableView,
763 action: Sel,
764 index_path: &NSIndexPath,
765 sender: Option<&AnyObject>,
766 );
767
768 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
769 #[optional]
770 #[unsafe(method(tableView:canFocusRowAtIndexPath:))]
771 #[unsafe(method_family = none)]
772 unsafe fn tableView_canFocusRowAtIndexPath(
773 &self,
774 table_view: &UITableView,
775 index_path: &NSIndexPath,
776 ) -> bool;
777
778 #[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
779 #[optional]
780 #[unsafe(method(tableView:shouldUpdateFocusInContext:))]
781 #[unsafe(method_family = none)]
782 unsafe fn tableView_shouldUpdateFocusInContext(
783 &self,
784 table_view: &UITableView,
785 context: &UITableViewFocusUpdateContext,
786 ) -> bool;
787
788 #[cfg(all(
789 feature = "UIFocus",
790 feature = "UIFocusAnimationCoordinator",
791 feature = "UIResponder",
792 feature = "UIView"
793 ))]
794 #[optional]
795 #[unsafe(method(tableView:didUpdateFocusInContext:withAnimationCoordinator:))]
796 #[unsafe(method_family = none)]
797 unsafe fn tableView_didUpdateFocusInContext_withAnimationCoordinator(
798 &self,
799 table_view: &UITableView,
800 context: &UITableViewFocusUpdateContext,
801 coordinator: &UIFocusAnimationCoordinator,
802 );
803
804 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
805 #[optional]
806 #[unsafe(method(indexPathForPreferredFocusedViewInTableView:))]
807 #[unsafe(method_family = none)]
808 unsafe fn indexPathForPreferredFocusedViewInTableView(
809 &self,
810 table_view: &UITableView,
811 ) -> Option<Retained<NSIndexPath>>;
812
813 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
814 #[optional]
817 #[unsafe(method(tableView:selectionFollowsFocusForRowAtIndexPath:))]
818 #[unsafe(method_family = none)]
819 unsafe fn tableView_selectionFollowsFocusForRowAtIndexPath(
820 &self,
821 table_view: &UITableView,
822 index_path: &NSIndexPath,
823 ) -> bool;
824
825 #[cfg(all(
826 feature = "UIResponder",
827 feature = "UISpringLoadedInteraction",
828 feature = "UIView"
829 ))]
830 #[optional]
831 #[unsafe(method(tableView:shouldSpringLoadRowAtIndexPath:withContext:))]
832 #[unsafe(method_family = none)]
833 unsafe fn tableView_shouldSpringLoadRowAtIndexPath_withContext(
834 &self,
835 table_view: &UITableView,
836 index_path: &NSIndexPath,
837 context: &ProtocolObject<dyn UISpringLoadedInteractionContext>,
838 ) -> bool;
839
840 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
841 #[optional]
842 #[unsafe(method(tableView:shouldBeginMultipleSelectionInteractionAtIndexPath:))]
843 #[unsafe(method_family = none)]
844 unsafe fn tableView_shouldBeginMultipleSelectionInteractionAtIndexPath(
845 &self,
846 table_view: &UITableView,
847 index_path: &NSIndexPath,
848 ) -> bool;
849
850 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
851 #[optional]
852 #[unsafe(method(tableView:didBeginMultipleSelectionInteractionAtIndexPath:))]
853 #[unsafe(method_family = none)]
854 unsafe fn tableView_didBeginMultipleSelectionInteractionAtIndexPath(
855 &self,
856 table_view: &UITableView,
857 index_path: &NSIndexPath,
858 );
859
860 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
861 #[optional]
862 #[unsafe(method(tableViewDidEndMultipleSelectionInteraction:))]
863 #[unsafe(method_family = none)]
864 unsafe fn tableViewDidEndMultipleSelectionInteraction(&self, table_view: &UITableView);
865
866 #[cfg(all(
867 feature = "UIContextMenuConfiguration",
868 feature = "UIResponder",
869 feature = "UIView",
870 feature = "objc2-core-foundation"
871 ))]
872 #[optional]
887 #[unsafe(method(tableView:contextMenuConfigurationForRowAtIndexPath:point:))]
888 #[unsafe(method_family = none)]
889 unsafe fn tableView_contextMenuConfigurationForRowAtIndexPath_point(
890 &self,
891 table_view: &UITableView,
892 index_path: &NSIndexPath,
893 point: CGPoint,
894 ) -> Option<Retained<UIContextMenuConfiguration>>;
895
896 #[cfg(all(
897 feature = "UIContextMenuConfiguration",
898 feature = "UIResponder",
899 feature = "UITargetedPreview",
900 feature = "UIView"
901 ))]
902 #[optional]
909 #[unsafe(method(tableView:previewForHighlightingContextMenuWithConfiguration:))]
910 #[unsafe(method_family = none)]
911 unsafe fn tableView_previewForHighlightingContextMenuWithConfiguration(
912 &self,
913 table_view: &UITableView,
914 configuration: &UIContextMenuConfiguration,
915 ) -> Option<Retained<UITargetedPreview>>;
916
917 #[cfg(all(
918 feature = "UIContextMenuConfiguration",
919 feature = "UIResponder",
920 feature = "UITargetedPreview",
921 feature = "UIView"
922 ))]
923 #[optional]
931 #[unsafe(method(tableView:previewForDismissingContextMenuWithConfiguration:))]
932 #[unsafe(method_family = none)]
933 unsafe fn tableView_previewForDismissingContextMenuWithConfiguration(
934 &self,
935 table_view: &UITableView,
936 configuration: &UIContextMenuConfiguration,
937 ) -> Option<Retained<UITargetedPreview>>;
938
939 #[cfg(all(
940 feature = "UIContextMenuConfiguration",
941 feature = "UIContextMenuInteraction",
942 feature = "UIResponder",
943 feature = "UIView"
944 ))]
945 #[optional]
954 #[unsafe(method(tableView:willPerformPreviewActionForMenuWithConfiguration:animator:))]
955 #[unsafe(method_family = none)]
956 unsafe fn tableView_willPerformPreviewActionForMenuWithConfiguration_animator(
957 &self,
958 table_view: &UITableView,
959 configuration: &UIContextMenuConfiguration,
960 animator: &ProtocolObject<dyn UIContextMenuInteractionCommitAnimating>,
961 );
962
963 #[cfg(all(
964 feature = "UIContextMenuConfiguration",
965 feature = "UIContextMenuInteraction",
966 feature = "UIResponder",
967 feature = "UIView"
968 ))]
969 #[optional]
978 #[unsafe(method(tableView:willDisplayContextMenuWithConfiguration:animator:))]
979 #[unsafe(method_family = none)]
980 unsafe fn tableView_willDisplayContextMenuWithConfiguration_animator(
981 &self,
982 table_view: &UITableView,
983 configuration: &UIContextMenuConfiguration,
984 animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>,
985 );
986
987 #[cfg(all(
988 feature = "UIContextMenuConfiguration",
989 feature = "UIContextMenuInteraction",
990 feature = "UIResponder",
991 feature = "UIView"
992 ))]
993 #[optional]
1002 #[unsafe(method(tableView:willEndContextMenuInteractionWithConfiguration:animator:))]
1003 #[unsafe(method_family = none)]
1004 unsafe fn tableView_willEndContextMenuInteractionWithConfiguration_animator(
1005 &self,
1006 table_view: &UITableView,
1007 configuration: &UIContextMenuConfiguration,
1008 animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>,
1009 );
1010 }
1011);
1012
1013extern "C" {
1014 pub static UITableViewSelectionDidChangeNotification: &'static NSNotificationName;
1016}
1017
1018#[repr(transparent)]
1021#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1022pub struct UITableViewSeparatorInsetReference(pub NSInteger);
1023impl UITableViewSeparatorInsetReference {
1024 #[doc(alias = "UITableViewSeparatorInsetFromCellEdges")]
1025 pub const FromCellEdges: Self = Self(0);
1026 #[doc(alias = "UITableViewSeparatorInsetFromAutomaticInsets")]
1027 pub const FromAutomaticInsets: Self = Self(1);
1028}
1029
1030unsafe impl Encode for UITableViewSeparatorInsetReference {
1031 const ENCODING: Encoding = NSInteger::ENCODING;
1032}
1033
1034unsafe impl RefEncode for UITableViewSeparatorInsetReference {
1035 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1036}
1037
1038#[repr(transparent)]
1041#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1042pub struct UITableViewSelfSizingInvalidation(pub NSInteger);
1043impl UITableViewSelfSizingInvalidation {
1044 #[doc(alias = "UITableViewSelfSizingInvalidationDisabled")]
1046 pub const Disabled: Self = Self(0);
1047 #[doc(alias = "UITableViewSelfSizingInvalidationEnabled")]
1049 pub const Enabled: Self = Self(1);
1050 #[doc(alias = "UITableViewSelfSizingInvalidationEnabledIncludingConstraints")]
1053 pub const EnabledIncludingConstraints: Self = Self(2);
1054}
1055
1056unsafe impl Encode for UITableViewSelfSizingInvalidation {
1057 const ENCODING: Encoding = NSInteger::ENCODING;
1058}
1059
1060unsafe impl RefEncode for UITableViewSelfSizingInvalidation {
1061 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1062}
1063
1064extern_class!(
1065 #[unsafe(super(UIScrollView, UIView, UIResponder, NSObject))]
1067 #[thread_kind = MainThreadOnly]
1068 #[derive(Debug, PartialEq, Eq, Hash)]
1069 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
1070 pub struct UITableView;
1071);
1072
1073#[cfg(all(
1074 feature = "UIResponder",
1075 feature = "UIScrollView",
1076 feature = "UIView",
1077 feature = "objc2-quartz-core"
1078))]
1079#[cfg(not(target_os = "watchos"))]
1080extern_conformance!(
1081 unsafe impl CALayerDelegate for UITableView {}
1082);
1083
1084#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
1085extern_conformance!(
1086 unsafe impl NSCoding for UITableView {}
1087);
1088
1089#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
1090extern_conformance!(
1091 unsafe impl NSObjectProtocol for UITableView {}
1092);
1093
1094#[cfg(all(
1095 feature = "UIAppearance",
1096 feature = "UIResponder",
1097 feature = "UIScrollView",
1098 feature = "UIView"
1099))]
1100extern_conformance!(
1101 unsafe impl UIAppearance for UITableView {}
1102);
1103
1104#[cfg(all(
1105 feature = "UIAppearance",
1106 feature = "UIResponder",
1107 feature = "UIScrollView",
1108 feature = "UIView"
1109))]
1110extern_conformance!(
1111 unsafe impl UIAppearanceContainer for UITableView {}
1112);
1113
1114#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
1115extern_conformance!(
1116 unsafe impl UICoordinateSpace for UITableView {}
1117);
1118
1119#[cfg(all(
1120 feature = "UIDataSourceTranslating",
1121 feature = "UIResponder",
1122 feature = "UIScrollView",
1123 feature = "UIView"
1124))]
1125extern_conformance!(
1126 unsafe impl UIDataSourceTranslating for UITableView {}
1127);
1128
1129#[cfg(all(
1130 feature = "UIDynamicBehavior",
1131 feature = "UIResponder",
1132 feature = "UIScrollView",
1133 feature = "UIView"
1134))]
1135extern_conformance!(
1136 unsafe impl UIDynamicItem for UITableView {}
1137);
1138
1139#[cfg(all(
1140 feature = "UIFocus",
1141 feature = "UIResponder",
1142 feature = "UIScrollView",
1143 feature = "UIView"
1144))]
1145extern_conformance!(
1146 unsafe impl UIFocusEnvironment for UITableView {}
1147);
1148
1149#[cfg(all(
1150 feature = "UIFocus",
1151 feature = "UIResponder",
1152 feature = "UIScrollView",
1153 feature = "UIView"
1154))]
1155extern_conformance!(
1156 unsafe impl UIFocusItem for UITableView {}
1157);
1158
1159#[cfg(all(
1160 feature = "UIFocus",
1161 feature = "UIResponder",
1162 feature = "UIScrollView",
1163 feature = "UIView"
1164))]
1165extern_conformance!(
1166 unsafe impl UIFocusItemContainer for UITableView {}
1167);
1168
1169#[cfg(all(
1170 feature = "UIFocus",
1171 feature = "UIResponder",
1172 feature = "UIScrollView",
1173 feature = "UIView"
1174))]
1175extern_conformance!(
1176 unsafe impl UIFocusItemScrollableContainer for UITableView {}
1177);
1178
1179#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
1180extern_conformance!(
1181 unsafe impl UIResponderStandardEditActions for UITableView {}
1182);
1183
1184#[cfg(all(
1185 feature = "UIResponder",
1186 feature = "UIScrollView",
1187 feature = "UITraitCollection",
1188 feature = "UIView"
1189))]
1190extern_conformance!(
1191 unsafe impl UITraitEnvironment for UITableView {}
1192);
1193
1194#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
1195impl UITableView {
1196 extern_methods!(
1197 #[cfg(feature = "objc2-core-foundation")]
1198 #[unsafe(method(initWithFrame:style:))]
1199 #[unsafe(method_family = init)]
1200 pub unsafe fn initWithFrame_style(
1201 this: Allocated<Self>,
1202 frame: CGRect,
1203 style: UITableViewStyle,
1204 ) -> Retained<Self>;
1205
1206 #[unsafe(method(initWithCoder:))]
1207 #[unsafe(method_family = init)]
1208 pub unsafe fn initWithCoder(
1209 this: Allocated<Self>,
1210 coder: &NSCoder,
1211 ) -> Option<Retained<Self>>;
1212
1213 #[unsafe(method(style))]
1214 #[unsafe(method_family = none)]
1215 pub unsafe fn style(&self) -> UITableViewStyle;
1216
1217 #[unsafe(method(dataSource))]
1218 #[unsafe(method_family = none)]
1219 pub unsafe fn dataSource(
1220 &self,
1221 ) -> Option<Retained<ProtocolObject<dyn UITableViewDataSource>>>;
1222
1223 #[unsafe(method(setDataSource:))]
1226 #[unsafe(method_family = none)]
1227 pub unsafe fn setDataSource(
1228 &self,
1229 data_source: Option<&ProtocolObject<dyn UITableViewDataSource>>,
1230 );
1231
1232 #[unsafe(method(delegate))]
1233 #[unsafe(method_family = none)]
1234 pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn UITableViewDelegate>>>;
1235
1236 #[unsafe(method(setDelegate:))]
1239 #[unsafe(method_family = none)]
1240 pub unsafe fn setDelegate(
1241 &self,
1242 delegate: Option<&ProtocolObject<dyn UITableViewDelegate>>,
1243 );
1244
1245 #[unsafe(method(prefetchDataSource))]
1246 #[unsafe(method_family = none)]
1247 pub unsafe fn prefetchDataSource(
1248 &self,
1249 ) -> Option<Retained<ProtocolObject<dyn UITableViewDataSourcePrefetching>>>;
1250
1251 #[unsafe(method(setPrefetchDataSource:))]
1254 #[unsafe(method_family = none)]
1255 pub unsafe fn setPrefetchDataSource(
1256 &self,
1257 prefetch_data_source: Option<&ProtocolObject<dyn UITableViewDataSourcePrefetching>>,
1258 );
1259
1260 #[unsafe(method(isPrefetchingEnabled))]
1261 #[unsafe(method_family = none)]
1262 pub unsafe fn isPrefetchingEnabled(&self) -> bool;
1263
1264 #[unsafe(method(setPrefetchingEnabled:))]
1266 #[unsafe(method_family = none)]
1267 pub unsafe fn setPrefetchingEnabled(&self, prefetching_enabled: bool);
1268
1269 #[unsafe(method(dragDelegate))]
1270 #[unsafe(method_family = none)]
1271 pub unsafe fn dragDelegate(
1272 &self,
1273 ) -> Option<Retained<ProtocolObject<dyn UITableViewDragDelegate>>>;
1274
1275 #[unsafe(method(setDragDelegate:))]
1278 #[unsafe(method_family = none)]
1279 pub unsafe fn setDragDelegate(
1280 &self,
1281 drag_delegate: Option<&ProtocolObject<dyn UITableViewDragDelegate>>,
1282 );
1283
1284 #[unsafe(method(dropDelegate))]
1285 #[unsafe(method_family = none)]
1286 pub unsafe fn dropDelegate(
1287 &self,
1288 ) -> Option<Retained<ProtocolObject<dyn UITableViewDropDelegate>>>;
1289
1290 #[unsafe(method(setDropDelegate:))]
1293 #[unsafe(method_family = none)]
1294 pub unsafe fn setDropDelegate(
1295 &self,
1296 drop_delegate: Option<&ProtocolObject<dyn UITableViewDropDelegate>>,
1297 );
1298
1299 #[cfg(feature = "objc2-core-foundation")]
1300 #[unsafe(method(rowHeight))]
1301 #[unsafe(method_family = none)]
1302 pub unsafe fn rowHeight(&self) -> CGFloat;
1303
1304 #[cfg(feature = "objc2-core-foundation")]
1305 #[unsafe(method(setRowHeight:))]
1307 #[unsafe(method_family = none)]
1308 pub unsafe fn setRowHeight(&self, row_height: CGFloat);
1309
1310 #[cfg(feature = "objc2-core-foundation")]
1311 #[unsafe(method(sectionHeaderHeight))]
1312 #[unsafe(method_family = none)]
1313 pub unsafe fn sectionHeaderHeight(&self) -> CGFloat;
1314
1315 #[cfg(feature = "objc2-core-foundation")]
1316 #[unsafe(method(setSectionHeaderHeight:))]
1318 #[unsafe(method_family = none)]
1319 pub unsafe fn setSectionHeaderHeight(&self, section_header_height: CGFloat);
1320
1321 #[cfg(feature = "objc2-core-foundation")]
1322 #[unsafe(method(sectionFooterHeight))]
1323 #[unsafe(method_family = none)]
1324 pub unsafe fn sectionFooterHeight(&self) -> CGFloat;
1325
1326 #[cfg(feature = "objc2-core-foundation")]
1327 #[unsafe(method(setSectionFooterHeight:))]
1329 #[unsafe(method_family = none)]
1330 pub unsafe fn setSectionFooterHeight(&self, section_footer_height: CGFloat);
1331
1332 #[cfg(feature = "objc2-core-foundation")]
1333 #[unsafe(method(estimatedRowHeight))]
1334 #[unsafe(method_family = none)]
1335 pub unsafe fn estimatedRowHeight(&self) -> CGFloat;
1336
1337 #[cfg(feature = "objc2-core-foundation")]
1338 #[unsafe(method(setEstimatedRowHeight:))]
1340 #[unsafe(method_family = none)]
1341 pub unsafe fn setEstimatedRowHeight(&self, estimated_row_height: CGFloat);
1342
1343 #[cfg(feature = "objc2-core-foundation")]
1344 #[unsafe(method(estimatedSectionHeaderHeight))]
1345 #[unsafe(method_family = none)]
1346 pub unsafe fn estimatedSectionHeaderHeight(&self) -> CGFloat;
1347
1348 #[cfg(feature = "objc2-core-foundation")]
1349 #[unsafe(method(setEstimatedSectionHeaderHeight:))]
1351 #[unsafe(method_family = none)]
1352 pub unsafe fn setEstimatedSectionHeaderHeight(
1353 &self,
1354 estimated_section_header_height: CGFloat,
1355 );
1356
1357 #[cfg(feature = "objc2-core-foundation")]
1358 #[unsafe(method(estimatedSectionFooterHeight))]
1359 #[unsafe(method_family = none)]
1360 pub unsafe fn estimatedSectionFooterHeight(&self) -> CGFloat;
1361
1362 #[cfg(feature = "objc2-core-foundation")]
1363 #[unsafe(method(setEstimatedSectionFooterHeight:))]
1365 #[unsafe(method_family = none)]
1366 pub unsafe fn setEstimatedSectionFooterHeight(
1367 &self,
1368 estimated_section_footer_height: CGFloat,
1369 );
1370
1371 #[cfg(feature = "objc2-core-foundation")]
1372 #[unsafe(method(fillerRowHeight))]
1375 #[unsafe(method_family = none)]
1376 pub unsafe fn fillerRowHeight(&self) -> CGFloat;
1377
1378 #[cfg(feature = "objc2-core-foundation")]
1379 #[unsafe(method(setFillerRowHeight:))]
1381 #[unsafe(method_family = none)]
1382 pub unsafe fn setFillerRowHeight(&self, filler_row_height: CGFloat);
1383
1384 #[cfg(feature = "objc2-core-foundation")]
1385 #[unsafe(method(sectionHeaderTopPadding))]
1387 #[unsafe(method_family = none)]
1388 pub unsafe fn sectionHeaderTopPadding(&self) -> CGFloat;
1389
1390 #[cfg(feature = "objc2-core-foundation")]
1391 #[unsafe(method(setSectionHeaderTopPadding:))]
1393 #[unsafe(method_family = none)]
1394 pub unsafe fn setSectionHeaderTopPadding(&self, section_header_top_padding: CGFloat);
1395
1396 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
1397 #[unsafe(method(separatorInset))]
1398 #[unsafe(method_family = none)]
1399 pub unsafe fn separatorInset(&self) -> UIEdgeInsets;
1400
1401 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
1402 #[unsafe(method(setSeparatorInset:))]
1404 #[unsafe(method_family = none)]
1405 pub unsafe fn setSeparatorInset(&self, separator_inset: UIEdgeInsets);
1406
1407 #[unsafe(method(separatorInsetReference))]
1408 #[unsafe(method_family = none)]
1409 pub unsafe fn separatorInsetReference(&self) -> UITableViewSeparatorInsetReference;
1410
1411 #[unsafe(method(setSeparatorInsetReference:))]
1413 #[unsafe(method_family = none)]
1414 pub unsafe fn setSeparatorInsetReference(
1415 &self,
1416 separator_inset_reference: UITableViewSeparatorInsetReference,
1417 );
1418
1419 #[unsafe(method(selfSizingInvalidation))]
1420 #[unsafe(method_family = none)]
1421 pub unsafe fn selfSizingInvalidation(&self) -> UITableViewSelfSizingInvalidation;
1422
1423 #[unsafe(method(setSelfSizingInvalidation:))]
1425 #[unsafe(method_family = none)]
1426 pub unsafe fn setSelfSizingInvalidation(
1427 &self,
1428 self_sizing_invalidation: UITableViewSelfSizingInvalidation,
1429 );
1430
1431 #[unsafe(method(backgroundView))]
1432 #[unsafe(method_family = none)]
1433 pub unsafe fn backgroundView(&self) -> Option<Retained<UIView>>;
1434
1435 #[unsafe(method(setBackgroundView:))]
1437 #[unsafe(method_family = none)]
1438 pub unsafe fn setBackgroundView(&self, background_view: Option<&UIView>);
1439
1440 #[cfg(feature = "UIContextMenuInteraction")]
1441 #[unsafe(method(contextMenuInteraction))]
1442 #[unsafe(method_family = none)]
1443 pub unsafe fn contextMenuInteraction(&self) -> Option<Retained<UIContextMenuInteraction>>;
1444
1445 #[unsafe(method(numberOfSections))]
1446 #[unsafe(method_family = none)]
1447 pub unsafe fn numberOfSections(&self) -> NSInteger;
1448
1449 #[unsafe(method(numberOfRowsInSection:))]
1450 #[unsafe(method_family = none)]
1451 pub unsafe fn numberOfRowsInSection(&self, section: NSInteger) -> NSInteger;
1452
1453 #[cfg(feature = "objc2-core-foundation")]
1454 #[unsafe(method(rectForSection:))]
1455 #[unsafe(method_family = none)]
1456 pub unsafe fn rectForSection(&self, section: NSInteger) -> CGRect;
1457
1458 #[cfg(feature = "objc2-core-foundation")]
1459 #[unsafe(method(rectForHeaderInSection:))]
1460 #[unsafe(method_family = none)]
1461 pub unsafe fn rectForHeaderInSection(&self, section: NSInteger) -> CGRect;
1462
1463 #[cfg(feature = "objc2-core-foundation")]
1464 #[unsafe(method(rectForFooterInSection:))]
1465 #[unsafe(method_family = none)]
1466 pub unsafe fn rectForFooterInSection(&self, section: NSInteger) -> CGRect;
1467
1468 #[cfg(feature = "objc2-core-foundation")]
1469 #[unsafe(method(rectForRowAtIndexPath:))]
1470 #[unsafe(method_family = none)]
1471 pub unsafe fn rectForRowAtIndexPath(&self, index_path: &NSIndexPath) -> CGRect;
1472
1473 #[cfg(feature = "objc2-core-foundation")]
1474 #[unsafe(method(indexPathForRowAtPoint:))]
1475 #[unsafe(method_family = none)]
1476 pub unsafe fn indexPathForRowAtPoint(
1477 &self,
1478 point: CGPoint,
1479 ) -> Option<Retained<NSIndexPath>>;
1480
1481 #[cfg(feature = "UITableViewCell")]
1482 #[unsafe(method(indexPathForCell:))]
1483 #[unsafe(method_family = none)]
1484 pub unsafe fn indexPathForCell(
1485 &self,
1486 cell: &UITableViewCell,
1487 ) -> Option<Retained<NSIndexPath>>;
1488
1489 #[cfg(feature = "objc2-core-foundation")]
1490 #[unsafe(method(indexPathsForRowsInRect:))]
1491 #[unsafe(method_family = none)]
1492 pub unsafe fn indexPathsForRowsInRect(
1493 &self,
1494 rect: CGRect,
1495 ) -> Option<Retained<NSArray<NSIndexPath>>>;
1496
1497 #[cfg(feature = "UITableViewCell")]
1498 #[unsafe(method(cellForRowAtIndexPath:))]
1499 #[unsafe(method_family = none)]
1500 pub unsafe fn cellForRowAtIndexPath(
1501 &self,
1502 index_path: &NSIndexPath,
1503 ) -> Option<Retained<UITableViewCell>>;
1504
1505 #[cfg(feature = "UITableViewCell")]
1506 #[unsafe(method(visibleCells))]
1507 #[unsafe(method_family = none)]
1508 pub unsafe fn visibleCells(&self) -> Retained<NSArray<UITableViewCell>>;
1509
1510 #[unsafe(method(indexPathsForVisibleRows))]
1511 #[unsafe(method_family = none)]
1512 pub unsafe fn indexPathsForVisibleRows(&self) -> Option<Retained<NSArray<NSIndexPath>>>;
1513
1514 #[cfg(feature = "UITableViewHeaderFooterView")]
1515 #[unsafe(method(headerViewForSection:))]
1516 #[unsafe(method_family = none)]
1517 pub unsafe fn headerViewForSection(
1518 &self,
1519 section: NSInteger,
1520 ) -> Option<Retained<UITableViewHeaderFooterView>>;
1521
1522 #[cfg(feature = "UITableViewHeaderFooterView")]
1523 #[unsafe(method(footerViewForSection:))]
1524 #[unsafe(method_family = none)]
1525 pub unsafe fn footerViewForSection(
1526 &self,
1527 section: NSInteger,
1528 ) -> Option<Retained<UITableViewHeaderFooterView>>;
1529
1530 #[unsafe(method(scrollToRowAtIndexPath:atScrollPosition:animated:))]
1531 #[unsafe(method_family = none)]
1532 pub unsafe fn scrollToRowAtIndexPath_atScrollPosition_animated(
1533 &self,
1534 index_path: &NSIndexPath,
1535 scroll_position: UITableViewScrollPosition,
1536 animated: bool,
1537 );
1538
1539 #[unsafe(method(scrollToNearestSelectedRowAtScrollPosition:animated:))]
1540 #[unsafe(method_family = none)]
1541 pub unsafe fn scrollToNearestSelectedRowAtScrollPosition_animated(
1542 &self,
1543 scroll_position: UITableViewScrollPosition,
1544 animated: bool,
1545 );
1546
1547 #[cfg(feature = "block2")]
1548 #[unsafe(method(performBatchUpdates:completion:))]
1549 #[unsafe(method_family = none)]
1550 pub unsafe fn performBatchUpdates_completion(
1551 &self,
1552 updates: Option<&block2::DynBlock<dyn Fn() + '_>>,
1553 completion: Option<&block2::DynBlock<dyn Fn(Bool)>>,
1554 );
1555
1556 #[unsafe(method(beginUpdates))]
1557 #[unsafe(method_family = none)]
1558 pub unsafe fn beginUpdates(&self);
1559
1560 #[unsafe(method(endUpdates))]
1561 #[unsafe(method_family = none)]
1562 pub unsafe fn endUpdates(&self);
1563
1564 #[unsafe(method(insertSections:withRowAnimation:))]
1565 #[unsafe(method_family = none)]
1566 pub unsafe fn insertSections_withRowAnimation(
1567 &self,
1568 sections: &NSIndexSet,
1569 animation: UITableViewRowAnimation,
1570 );
1571
1572 #[unsafe(method(deleteSections:withRowAnimation:))]
1573 #[unsafe(method_family = none)]
1574 pub unsafe fn deleteSections_withRowAnimation(
1575 &self,
1576 sections: &NSIndexSet,
1577 animation: UITableViewRowAnimation,
1578 );
1579
1580 #[unsafe(method(moveSection:toSection:))]
1581 #[unsafe(method_family = none)]
1582 pub unsafe fn moveSection_toSection(&self, section: NSInteger, new_section: NSInteger);
1583
1584 #[unsafe(method(reloadSections:withRowAnimation:))]
1585 #[unsafe(method_family = none)]
1586 pub unsafe fn reloadSections_withRowAnimation(
1587 &self,
1588 sections: &NSIndexSet,
1589 animation: UITableViewRowAnimation,
1590 );
1591
1592 #[unsafe(method(insertRowsAtIndexPaths:withRowAnimation:))]
1593 #[unsafe(method_family = none)]
1594 pub unsafe fn insertRowsAtIndexPaths_withRowAnimation(
1595 &self,
1596 index_paths: &NSArray<NSIndexPath>,
1597 animation: UITableViewRowAnimation,
1598 );
1599
1600 #[unsafe(method(deleteRowsAtIndexPaths:withRowAnimation:))]
1601 #[unsafe(method_family = none)]
1602 pub unsafe fn deleteRowsAtIndexPaths_withRowAnimation(
1603 &self,
1604 index_paths: &NSArray<NSIndexPath>,
1605 animation: UITableViewRowAnimation,
1606 );
1607
1608 #[unsafe(method(moveRowAtIndexPath:toIndexPath:))]
1609 #[unsafe(method_family = none)]
1610 pub unsafe fn moveRowAtIndexPath_toIndexPath(
1611 &self,
1612 index_path: &NSIndexPath,
1613 new_index_path: &NSIndexPath,
1614 );
1615
1616 #[unsafe(method(reloadRowsAtIndexPaths:withRowAnimation:))]
1617 #[unsafe(method_family = none)]
1618 pub unsafe fn reloadRowsAtIndexPaths_withRowAnimation(
1619 &self,
1620 index_paths: &NSArray<NSIndexPath>,
1621 animation: UITableViewRowAnimation,
1622 );
1623
1624 #[unsafe(method(reconfigureRowsAtIndexPaths:))]
1625 #[unsafe(method_family = none)]
1626 pub unsafe fn reconfigureRowsAtIndexPaths(&self, index_paths: &NSArray<NSIndexPath>);
1627
1628 #[unsafe(method(hasUncommittedUpdates))]
1629 #[unsafe(method_family = none)]
1630 pub unsafe fn hasUncommittedUpdates(&self) -> bool;
1631
1632 #[unsafe(method(reloadData))]
1633 #[unsafe(method_family = none)]
1634 pub unsafe fn reloadData(&self);
1635
1636 #[unsafe(method(reloadSectionIndexTitles))]
1637 #[unsafe(method_family = none)]
1638 pub unsafe fn reloadSectionIndexTitles(&self);
1639
1640 #[unsafe(method(isEditing))]
1641 #[unsafe(method_family = none)]
1642 pub unsafe fn isEditing(&self) -> bool;
1643
1644 #[unsafe(method(setEditing:))]
1646 #[unsafe(method_family = none)]
1647 pub unsafe fn setEditing(&self, editing: bool);
1648
1649 #[unsafe(method(setEditing:animated:))]
1650 #[unsafe(method_family = none)]
1651 pub unsafe fn setEditing_animated(&self, editing: bool, animated: bool);
1652
1653 #[unsafe(method(allowsSelection))]
1654 #[unsafe(method_family = none)]
1655 pub unsafe fn allowsSelection(&self) -> bool;
1656
1657 #[unsafe(method(setAllowsSelection:))]
1659 #[unsafe(method_family = none)]
1660 pub unsafe fn setAllowsSelection(&self, allows_selection: bool);
1661
1662 #[unsafe(method(allowsSelectionDuringEditing))]
1663 #[unsafe(method_family = none)]
1664 pub unsafe fn allowsSelectionDuringEditing(&self) -> bool;
1665
1666 #[unsafe(method(setAllowsSelectionDuringEditing:))]
1668 #[unsafe(method_family = none)]
1669 pub unsafe fn setAllowsSelectionDuringEditing(&self, allows_selection_during_editing: bool);
1670
1671 #[unsafe(method(allowsMultipleSelection))]
1672 #[unsafe(method_family = none)]
1673 pub unsafe fn allowsMultipleSelection(&self) -> bool;
1674
1675 #[unsafe(method(setAllowsMultipleSelection:))]
1677 #[unsafe(method_family = none)]
1678 pub unsafe fn setAllowsMultipleSelection(&self, allows_multiple_selection: bool);
1679
1680 #[unsafe(method(allowsMultipleSelectionDuringEditing))]
1681 #[unsafe(method_family = none)]
1682 pub unsafe fn allowsMultipleSelectionDuringEditing(&self) -> bool;
1683
1684 #[unsafe(method(setAllowsMultipleSelectionDuringEditing:))]
1686 #[unsafe(method_family = none)]
1687 pub unsafe fn setAllowsMultipleSelectionDuringEditing(
1688 &self,
1689 allows_multiple_selection_during_editing: bool,
1690 );
1691
1692 #[unsafe(method(indexPathForSelectedRow))]
1693 #[unsafe(method_family = none)]
1694 pub unsafe fn indexPathForSelectedRow(&self) -> Option<Retained<NSIndexPath>>;
1695
1696 #[unsafe(method(indexPathsForSelectedRows))]
1697 #[unsafe(method_family = none)]
1698 pub unsafe fn indexPathsForSelectedRows(&self) -> Option<Retained<NSArray<NSIndexPath>>>;
1699
1700 #[unsafe(method(selectRowAtIndexPath:animated:scrollPosition:))]
1701 #[unsafe(method_family = none)]
1702 pub unsafe fn selectRowAtIndexPath_animated_scrollPosition(
1703 &self,
1704 index_path: Option<&NSIndexPath>,
1705 animated: bool,
1706 scroll_position: UITableViewScrollPosition,
1707 );
1708
1709 #[unsafe(method(deselectRowAtIndexPath:animated:))]
1710 #[unsafe(method_family = none)]
1711 pub unsafe fn deselectRowAtIndexPath_animated(
1712 &self,
1713 index_path: &NSIndexPath,
1714 animated: bool,
1715 );
1716
1717 #[unsafe(method(sectionIndexMinimumDisplayRowCount))]
1718 #[unsafe(method_family = none)]
1719 pub unsafe fn sectionIndexMinimumDisplayRowCount(&self) -> NSInteger;
1720
1721 #[unsafe(method(setSectionIndexMinimumDisplayRowCount:))]
1723 #[unsafe(method_family = none)]
1724 pub unsafe fn setSectionIndexMinimumDisplayRowCount(
1725 &self,
1726 section_index_minimum_display_row_count: NSInteger,
1727 );
1728
1729 #[cfg(feature = "UIColor")]
1730 #[unsafe(method(sectionIndexColor))]
1731 #[unsafe(method_family = none)]
1732 pub unsafe fn sectionIndexColor(&self) -> Option<Retained<UIColor>>;
1733
1734 #[cfg(feature = "UIColor")]
1735 #[unsafe(method(setSectionIndexColor:))]
1737 #[unsafe(method_family = none)]
1738 pub unsafe fn setSectionIndexColor(&self, section_index_color: Option<&UIColor>);
1739
1740 #[cfg(feature = "UIColor")]
1741 #[unsafe(method(sectionIndexBackgroundColor))]
1742 #[unsafe(method_family = none)]
1743 pub unsafe fn sectionIndexBackgroundColor(&self) -> Option<Retained<UIColor>>;
1744
1745 #[cfg(feature = "UIColor")]
1746 #[unsafe(method(setSectionIndexBackgroundColor:))]
1748 #[unsafe(method_family = none)]
1749 pub unsafe fn setSectionIndexBackgroundColor(
1750 &self,
1751 section_index_background_color: Option<&UIColor>,
1752 );
1753
1754 #[cfg(feature = "UIColor")]
1755 #[unsafe(method(sectionIndexTrackingBackgroundColor))]
1756 #[unsafe(method_family = none)]
1757 pub unsafe fn sectionIndexTrackingBackgroundColor(&self) -> Option<Retained<UIColor>>;
1758
1759 #[cfg(feature = "UIColor")]
1760 #[unsafe(method(setSectionIndexTrackingBackgroundColor:))]
1762 #[unsafe(method_family = none)]
1763 pub unsafe fn setSectionIndexTrackingBackgroundColor(
1764 &self,
1765 section_index_tracking_background_color: Option<&UIColor>,
1766 );
1767
1768 #[cfg(feature = "UITableViewCell")]
1769 #[unsafe(method(separatorStyle))]
1770 #[unsafe(method_family = none)]
1771 pub unsafe fn separatorStyle(&self) -> UITableViewCellSeparatorStyle;
1772
1773 #[cfg(feature = "UITableViewCell")]
1774 #[unsafe(method(setSeparatorStyle:))]
1776 #[unsafe(method_family = none)]
1777 pub unsafe fn setSeparatorStyle(&self, separator_style: UITableViewCellSeparatorStyle);
1778
1779 #[cfg(feature = "UIColor")]
1780 #[unsafe(method(separatorColor))]
1781 #[unsafe(method_family = none)]
1782 pub unsafe fn separatorColor(&self) -> Option<Retained<UIColor>>;
1783
1784 #[cfg(feature = "UIColor")]
1785 #[unsafe(method(setSeparatorColor:))]
1787 #[unsafe(method_family = none)]
1788 pub unsafe fn setSeparatorColor(&self, separator_color: Option<&UIColor>);
1789
1790 #[cfg(feature = "UIVisualEffect")]
1791 #[unsafe(method(separatorEffect))]
1792 #[unsafe(method_family = none)]
1793 pub unsafe fn separatorEffect(&self) -> Option<Retained<UIVisualEffect>>;
1794
1795 #[cfg(feature = "UIVisualEffect")]
1796 #[unsafe(method(setSeparatorEffect:))]
1798 #[unsafe(method_family = none)]
1799 pub unsafe fn setSeparatorEffect(&self, separator_effect: Option<&UIVisualEffect>);
1800
1801 #[unsafe(method(cellLayoutMarginsFollowReadableWidth))]
1802 #[unsafe(method_family = none)]
1803 pub unsafe fn cellLayoutMarginsFollowReadableWidth(&self) -> bool;
1804
1805 #[unsafe(method(setCellLayoutMarginsFollowReadableWidth:))]
1807 #[unsafe(method_family = none)]
1808 pub unsafe fn setCellLayoutMarginsFollowReadableWidth(
1809 &self,
1810 cell_layout_margins_follow_readable_width: bool,
1811 );
1812
1813 #[unsafe(method(insetsContentViewsToSafeArea))]
1814 #[unsafe(method_family = none)]
1815 pub unsafe fn insetsContentViewsToSafeArea(&self) -> bool;
1816
1817 #[unsafe(method(setInsetsContentViewsToSafeArea:))]
1819 #[unsafe(method_family = none)]
1820 pub unsafe fn setInsetsContentViewsToSafeArea(
1821 &self,
1822 insets_content_views_to_safe_area: bool,
1823 );
1824
1825 #[unsafe(method(tableHeaderView))]
1826 #[unsafe(method_family = none)]
1827 pub unsafe fn tableHeaderView(&self) -> Option<Retained<UIView>>;
1828
1829 #[unsafe(method(setTableHeaderView:))]
1831 #[unsafe(method_family = none)]
1832 pub unsafe fn setTableHeaderView(&self, table_header_view: Option<&UIView>);
1833
1834 #[unsafe(method(tableFooterView))]
1835 #[unsafe(method_family = none)]
1836 pub unsafe fn tableFooterView(&self) -> Option<Retained<UIView>>;
1837
1838 #[unsafe(method(setTableFooterView:))]
1840 #[unsafe(method_family = none)]
1841 pub unsafe fn setTableFooterView(&self, table_footer_view: Option<&UIView>);
1842
1843 #[cfg(feature = "UITableViewCell")]
1844 #[unsafe(method(dequeueReusableCellWithIdentifier:))]
1845 #[unsafe(method_family = none)]
1846 pub unsafe fn dequeueReusableCellWithIdentifier(
1847 &self,
1848 identifier: &NSString,
1849 ) -> Option<Retained<UITableViewCell>>;
1850
1851 #[cfg(feature = "UITableViewCell")]
1852 #[unsafe(method(dequeueReusableCellWithIdentifier:forIndexPath:))]
1853 #[unsafe(method_family = none)]
1854 pub unsafe fn dequeueReusableCellWithIdentifier_forIndexPath(
1855 &self,
1856 identifier: &NSString,
1857 index_path: &NSIndexPath,
1858 ) -> Retained<UITableViewCell>;
1859
1860 #[cfg(feature = "UITableViewHeaderFooterView")]
1861 #[unsafe(method(dequeueReusableHeaderFooterViewWithIdentifier:))]
1862 #[unsafe(method_family = none)]
1863 pub unsafe fn dequeueReusableHeaderFooterViewWithIdentifier(
1864 &self,
1865 identifier: &NSString,
1866 ) -> Option<Retained<UITableViewHeaderFooterView>>;
1867
1868 #[cfg(feature = "UINib")]
1869 #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
1870 #[unsafe(method(registerNib:forCellReuseIdentifier:))]
1871 #[unsafe(method_family = none)]
1872 pub unsafe fn registerNib_forCellReuseIdentifier(
1873 &self,
1874 nib: Option<&UINib>,
1875 identifier: &NSString,
1876 );
1877
1878 #[unsafe(method(registerClass:forCellReuseIdentifier:))]
1879 #[unsafe(method_family = none)]
1880 pub unsafe fn registerClass_forCellReuseIdentifier(
1881 &self,
1882 cell_class: Option<&AnyClass>,
1883 identifier: &NSString,
1884 );
1885
1886 #[cfg(feature = "UINib")]
1887 #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
1888 #[unsafe(method(registerNib:forHeaderFooterViewReuseIdentifier:))]
1889 #[unsafe(method_family = none)]
1890 pub unsafe fn registerNib_forHeaderFooterViewReuseIdentifier(
1891 &self,
1892 nib: Option<&UINib>,
1893 identifier: &NSString,
1894 );
1895
1896 #[unsafe(method(registerClass:forHeaderFooterViewReuseIdentifier:))]
1897 #[unsafe(method_family = none)]
1898 pub unsafe fn registerClass_forHeaderFooterViewReuseIdentifier(
1899 &self,
1900 a_class: Option<&AnyClass>,
1901 identifier: &NSString,
1902 );
1903
1904 #[unsafe(method(remembersLastFocusedIndexPath))]
1905 #[unsafe(method_family = none)]
1906 pub unsafe fn remembersLastFocusedIndexPath(&self) -> bool;
1907
1908 #[unsafe(method(setRemembersLastFocusedIndexPath:))]
1910 #[unsafe(method_family = none)]
1911 pub unsafe fn setRemembersLastFocusedIndexPath(
1912 &self,
1913 remembers_last_focused_index_path: bool,
1914 );
1915
1916 #[unsafe(method(selectionFollowsFocus))]
1919 #[unsafe(method_family = none)]
1920 pub unsafe fn selectionFollowsFocus(&self) -> bool;
1921
1922 #[unsafe(method(setSelectionFollowsFocus:))]
1924 #[unsafe(method_family = none)]
1925 pub unsafe fn setSelectionFollowsFocus(&self, selection_follows_focus: bool);
1926
1927 #[unsafe(method(allowsFocus))]
1931 #[unsafe(method_family = none)]
1932 pub unsafe fn allowsFocus(&self) -> bool;
1933
1934 #[unsafe(method(setAllowsFocus:))]
1936 #[unsafe(method_family = none)]
1937 pub unsafe fn setAllowsFocus(&self, allows_focus: bool);
1938
1939 #[unsafe(method(allowsFocusDuringEditing))]
1943 #[unsafe(method_family = none)]
1944 pub unsafe fn allowsFocusDuringEditing(&self) -> bool;
1945
1946 #[unsafe(method(setAllowsFocusDuringEditing:))]
1948 #[unsafe(method_family = none)]
1949 pub unsafe fn setAllowsFocusDuringEditing(&self, allows_focus_during_editing: bool);
1950
1951 #[unsafe(method(dragInteractionEnabled))]
1952 #[unsafe(method_family = none)]
1953 pub unsafe fn dragInteractionEnabled(&self) -> bool;
1954
1955 #[unsafe(method(setDragInteractionEnabled:))]
1957 #[unsafe(method_family = none)]
1958 pub unsafe fn setDragInteractionEnabled(&self, drag_interaction_enabled: bool);
1959
1960 #[unsafe(method(hasActiveDrag))]
1961 #[unsafe(method_family = none)]
1962 pub unsafe fn hasActiveDrag(&self) -> bool;
1963
1964 #[unsafe(method(hasActiveDrop))]
1965 #[unsafe(method_family = none)]
1966 pub unsafe fn hasActiveDrop(&self) -> bool;
1967
1968 #[unsafe(method(contentHuggingElements))]
1973 #[unsafe(method_family = none)]
1974 pub unsafe fn contentHuggingElements(&self) -> UITableViewContentHuggingElements;
1975
1976 #[unsafe(method(setContentHuggingElements:))]
1978 #[unsafe(method_family = none)]
1979 pub unsafe fn setContentHuggingElements(
1980 &self,
1981 content_hugging_elements: UITableViewContentHuggingElements,
1982 );
1983 );
1984}
1985
1986#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
1988impl UITableView {
1989 extern_methods!(
1990 #[cfg(feature = "objc2-core-foundation")]
1991 #[unsafe(method(initWithFrame:))]
1992 #[unsafe(method_family = init)]
1993 pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
1994 );
1995}
1996
1997#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
1999impl UITableView {
2000 extern_methods!(
2001 #[unsafe(method(init))]
2002 #[unsafe(method_family = init)]
2003 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2004
2005 #[unsafe(method(new))]
2006 #[unsafe(method_family = new)]
2007 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
2008 );
2009}
2010
2011#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2013impl UITableView {
2014 extern_methods!();
2015}
2016
2017#[cfg(all(
2018 feature = "UIResponder",
2019 feature = "UIScrollView",
2020 feature = "UISpringLoadedInteractionSupporting",
2021 feature = "UIView"
2022))]
2023extern_conformance!(
2024 unsafe impl UISpringLoadedInteractionSupporting for UITableView {}
2025);
2026
2027extern_protocol!(
2028 pub unsafe trait UITableViewDataSource: NSObjectProtocol + MainThreadOnly {
2030 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2031 #[unsafe(method(tableView:numberOfRowsInSection:))]
2032 #[unsafe(method_family = none)]
2033 unsafe fn tableView_numberOfRowsInSection(
2034 &self,
2035 table_view: &UITableView,
2036 section: NSInteger,
2037 ) -> NSInteger;
2038
2039 #[cfg(all(
2040 feature = "UIResponder",
2041 feature = "UIScrollView",
2042 feature = "UITableViewCell",
2043 feature = "UIView"
2044 ))]
2045 #[unsafe(method(tableView:cellForRowAtIndexPath:))]
2046 #[unsafe(method_family = none)]
2047 unsafe fn tableView_cellForRowAtIndexPath(
2048 &self,
2049 table_view: &UITableView,
2050 index_path: &NSIndexPath,
2051 ) -> Retained<UITableViewCell>;
2052
2053 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2054 #[optional]
2055 #[unsafe(method(numberOfSectionsInTableView:))]
2056 #[unsafe(method_family = none)]
2057 unsafe fn numberOfSectionsInTableView(&self, table_view: &UITableView) -> NSInteger;
2058
2059 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2060 #[optional]
2061 #[unsafe(method(tableView:titleForHeaderInSection:))]
2062 #[unsafe(method_family = none)]
2063 unsafe fn tableView_titleForHeaderInSection(
2064 &self,
2065 table_view: &UITableView,
2066 section: NSInteger,
2067 ) -> Option<Retained<NSString>>;
2068
2069 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2070 #[optional]
2071 #[unsafe(method(tableView:titleForFooterInSection:))]
2072 #[unsafe(method_family = none)]
2073 unsafe fn tableView_titleForFooterInSection(
2074 &self,
2075 table_view: &UITableView,
2076 section: NSInteger,
2077 ) -> Option<Retained<NSString>>;
2078
2079 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2080 #[optional]
2081 #[unsafe(method(tableView:canEditRowAtIndexPath:))]
2082 #[unsafe(method_family = none)]
2083 unsafe fn tableView_canEditRowAtIndexPath(
2084 &self,
2085 table_view: &UITableView,
2086 index_path: &NSIndexPath,
2087 ) -> bool;
2088
2089 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2090 #[optional]
2091 #[unsafe(method(tableView:canMoveRowAtIndexPath:))]
2092 #[unsafe(method_family = none)]
2093 unsafe fn tableView_canMoveRowAtIndexPath(
2094 &self,
2095 table_view: &UITableView,
2096 index_path: &NSIndexPath,
2097 ) -> bool;
2098
2099 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2100 #[optional]
2101 #[unsafe(method(sectionIndexTitlesForTableView:))]
2102 #[unsafe(method_family = none)]
2103 unsafe fn sectionIndexTitlesForTableView(
2104 &self,
2105 table_view: &UITableView,
2106 ) -> Option<Retained<NSArray<NSString>>>;
2107
2108 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2109 #[optional]
2110 #[unsafe(method(tableView:sectionForSectionIndexTitle:atIndex:))]
2111 #[unsafe(method_family = none)]
2112 unsafe fn tableView_sectionForSectionIndexTitle_atIndex(
2113 &self,
2114 table_view: &UITableView,
2115 title: &NSString,
2116 index: NSInteger,
2117 ) -> NSInteger;
2118
2119 #[cfg(all(
2120 feature = "UIResponder",
2121 feature = "UIScrollView",
2122 feature = "UITableViewCell",
2123 feature = "UIView"
2124 ))]
2125 #[optional]
2126 #[unsafe(method(tableView:commitEditingStyle:forRowAtIndexPath:))]
2127 #[unsafe(method_family = none)]
2128 unsafe fn tableView_commitEditingStyle_forRowAtIndexPath(
2129 &self,
2130 table_view: &UITableView,
2131 editing_style: UITableViewCellEditingStyle,
2132 index_path: &NSIndexPath,
2133 );
2134
2135 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2136 #[optional]
2137 #[unsafe(method(tableView:moveRowAtIndexPath:toIndexPath:))]
2138 #[unsafe(method_family = none)]
2139 unsafe fn tableView_moveRowAtIndexPath_toIndexPath(
2140 &self,
2141 table_view: &UITableView,
2142 source_index_path: &NSIndexPath,
2143 destination_index_path: &NSIndexPath,
2144 );
2145 }
2146);
2147
2148extern_protocol!(
2149 pub unsafe trait UITableViewDataSourcePrefetching:
2151 NSObjectProtocol + MainThreadOnly
2152 {
2153 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2154 #[unsafe(method(tableView:prefetchRowsAtIndexPaths:))]
2155 #[unsafe(method_family = none)]
2156 unsafe fn tableView_prefetchRowsAtIndexPaths(
2157 &self,
2158 table_view: &UITableView,
2159 index_paths: &NSArray<NSIndexPath>,
2160 );
2161
2162 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2163 #[optional]
2164 #[unsafe(method(tableView:cancelPrefetchingForRowsAtIndexPaths:))]
2165 #[unsafe(method_family = none)]
2166 unsafe fn tableView_cancelPrefetchingForRowsAtIndexPaths(
2167 &self,
2168 table_view: &UITableView,
2169 index_paths: &NSArray<NSIndexPath>,
2170 );
2171 }
2172);
2173
2174extern_protocol!(
2175 pub unsafe trait UITableViewDragDelegate: NSObjectProtocol + MainThreadOnly {
2177 #[cfg(all(
2178 feature = "UIDragItem",
2179 feature = "UIDragSession",
2180 feature = "UIResponder",
2181 feature = "UIScrollView",
2182 feature = "UIView"
2183 ))]
2184 #[unsafe(method(tableView:itemsForBeginningDragSession:atIndexPath:))]
2185 #[unsafe(method_family = none)]
2186 unsafe fn tableView_itemsForBeginningDragSession_atIndexPath(
2187 &self,
2188 table_view: &UITableView,
2189 session: &ProtocolObject<dyn UIDragSession>,
2190 index_path: &NSIndexPath,
2191 ) -> Retained<NSArray<UIDragItem>>;
2192
2193 #[cfg(all(
2194 feature = "UIDragItem",
2195 feature = "UIDragSession",
2196 feature = "UIResponder",
2197 feature = "UIScrollView",
2198 feature = "UIView",
2199 feature = "objc2-core-foundation"
2200 ))]
2201 #[optional]
2202 #[unsafe(method(tableView:itemsForAddingToDragSession:atIndexPath:point:))]
2203 #[unsafe(method_family = none)]
2204 unsafe fn tableView_itemsForAddingToDragSession_atIndexPath_point(
2205 &self,
2206 table_view: &UITableView,
2207 session: &ProtocolObject<dyn UIDragSession>,
2208 index_path: &NSIndexPath,
2209 point: CGPoint,
2210 ) -> Retained<NSArray<UIDragItem>>;
2211
2212 #[cfg(all(
2213 feature = "UIDragPreviewParameters",
2214 feature = "UIPreviewParameters",
2215 feature = "UIResponder",
2216 feature = "UIScrollView",
2217 feature = "UIView"
2218 ))]
2219 #[optional]
2220 #[unsafe(method(tableView:dragPreviewParametersForRowAtIndexPath:))]
2221 #[unsafe(method_family = none)]
2222 unsafe fn tableView_dragPreviewParametersForRowAtIndexPath(
2223 &self,
2224 table_view: &UITableView,
2225 index_path: &NSIndexPath,
2226 ) -> Option<Retained<UIDragPreviewParameters>>;
2227
2228 #[cfg(all(
2229 feature = "UIDragSession",
2230 feature = "UIResponder",
2231 feature = "UIScrollView",
2232 feature = "UIView"
2233 ))]
2234 #[optional]
2235 #[unsafe(method(tableView:dragSessionWillBegin:))]
2236 #[unsafe(method_family = none)]
2237 unsafe fn tableView_dragSessionWillBegin(
2238 &self,
2239 table_view: &UITableView,
2240 session: &ProtocolObject<dyn UIDragSession>,
2241 );
2242
2243 #[cfg(all(
2244 feature = "UIDragSession",
2245 feature = "UIResponder",
2246 feature = "UIScrollView",
2247 feature = "UIView"
2248 ))]
2249 #[optional]
2250 #[unsafe(method(tableView:dragSessionDidEnd:))]
2251 #[unsafe(method_family = none)]
2252 unsafe fn tableView_dragSessionDidEnd(
2253 &self,
2254 table_view: &UITableView,
2255 session: &ProtocolObject<dyn UIDragSession>,
2256 );
2257
2258 #[cfg(all(
2259 feature = "UIDragSession",
2260 feature = "UIResponder",
2261 feature = "UIScrollView",
2262 feature = "UIView"
2263 ))]
2264 #[optional]
2265 #[unsafe(method(tableView:dragSessionAllowsMoveOperation:))]
2266 #[unsafe(method_family = none)]
2267 unsafe fn tableView_dragSessionAllowsMoveOperation(
2268 &self,
2269 table_view: &UITableView,
2270 session: &ProtocolObject<dyn UIDragSession>,
2271 ) -> bool;
2272
2273 #[cfg(all(
2274 feature = "UIDragSession",
2275 feature = "UIResponder",
2276 feature = "UIScrollView",
2277 feature = "UIView"
2278 ))]
2279 #[optional]
2280 #[unsafe(method(tableView:dragSessionIsRestrictedToDraggingApplication:))]
2281 #[unsafe(method_family = none)]
2282 unsafe fn tableView_dragSessionIsRestrictedToDraggingApplication(
2283 &self,
2284 table_view: &UITableView,
2285 session: &ProtocolObject<dyn UIDragSession>,
2286 ) -> bool;
2287 }
2288);
2289
2290extern_protocol!(
2291 pub unsafe trait UITableViewDropDelegate: NSObjectProtocol + MainThreadOnly {
2293 #[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
2294 #[unsafe(method(tableView:performDropWithCoordinator:))]
2295 #[unsafe(method_family = none)]
2296 unsafe fn tableView_performDropWithCoordinator(
2297 &self,
2298 table_view: &UITableView,
2299 coordinator: &ProtocolObject<dyn UITableViewDropCoordinator>,
2300 );
2301
2302 #[cfg(all(
2303 feature = "UIDragSession",
2304 feature = "UIResponder",
2305 feature = "UIScrollView",
2306 feature = "UIView"
2307 ))]
2308 #[optional]
2309 #[unsafe(method(tableView:canHandleDropSession:))]
2310 #[unsafe(method_family = none)]
2311 unsafe fn tableView_canHandleDropSession(
2312 &self,
2313 table_view: &UITableView,
2314 session: &ProtocolObject<dyn UIDropSession>,
2315 ) -> bool;
2316
2317 #[cfg(all(
2318 feature = "UIDragSession",
2319 feature = "UIResponder",
2320 feature = "UIScrollView",
2321 feature = "UIView"
2322 ))]
2323 #[optional]
2324 #[unsafe(method(tableView:dropSessionDidEnter:))]
2325 #[unsafe(method_family = none)]
2326 unsafe fn tableView_dropSessionDidEnter(
2327 &self,
2328 table_view: &UITableView,
2329 session: &ProtocolObject<dyn UIDropSession>,
2330 );
2331
2332 #[cfg(all(
2333 feature = "UIDragSession",
2334 feature = "UIDropInteraction",
2335 feature = "UIResponder",
2336 feature = "UIScrollView",
2337 feature = "UIView"
2338 ))]
2339 #[optional]
2340 #[unsafe(method(tableView:dropSessionDidUpdate:withDestinationIndexPath:))]
2341 #[unsafe(method_family = none)]
2342 unsafe fn tableView_dropSessionDidUpdate_withDestinationIndexPath(
2343 &self,
2344 table_view: &UITableView,
2345 session: &ProtocolObject<dyn UIDropSession>,
2346 destination_index_path: Option<&NSIndexPath>,
2347 ) -> Retained<UITableViewDropProposal>;
2348
2349 #[cfg(all(
2350 feature = "UIDragSession",
2351 feature = "UIResponder",
2352 feature = "UIScrollView",
2353 feature = "UIView"
2354 ))]
2355 #[optional]
2356 #[unsafe(method(tableView:dropSessionDidExit:))]
2357 #[unsafe(method_family = none)]
2358 unsafe fn tableView_dropSessionDidExit(
2359 &self,
2360 table_view: &UITableView,
2361 session: &ProtocolObject<dyn UIDropSession>,
2362 );
2363
2364 #[cfg(all(
2365 feature = "UIDragSession",
2366 feature = "UIResponder",
2367 feature = "UIScrollView",
2368 feature = "UIView"
2369 ))]
2370 #[optional]
2371 #[unsafe(method(tableView:dropSessionDidEnd:))]
2372 #[unsafe(method_family = none)]
2373 unsafe fn tableView_dropSessionDidEnd(
2374 &self,
2375 table_view: &UITableView,
2376 session: &ProtocolObject<dyn UIDropSession>,
2377 );
2378
2379 #[cfg(all(
2380 feature = "UIDragPreviewParameters",
2381 feature = "UIPreviewParameters",
2382 feature = "UIResponder",
2383 feature = "UIScrollView",
2384 feature = "UIView"
2385 ))]
2386 #[optional]
2387 #[unsafe(method(tableView:dropPreviewParametersForRowAtIndexPath:))]
2388 #[unsafe(method_family = none)]
2389 unsafe fn tableView_dropPreviewParametersForRowAtIndexPath(
2390 &self,
2391 table_view: &UITableView,
2392 index_path: &NSIndexPath,
2393 ) -> Option<Retained<UIDragPreviewParameters>>;
2394 }
2395);
2396
2397#[repr(transparent)]
2400#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2401pub struct UITableViewDropIntent(pub NSInteger);
2402impl UITableViewDropIntent {
2403 #[doc(alias = "UITableViewDropIntentUnspecified")]
2404 pub const Unspecified: Self = Self(0);
2405 #[doc(alias = "UITableViewDropIntentInsertAtDestinationIndexPath")]
2406 pub const InsertAtDestinationIndexPath: Self = Self(1);
2407 #[doc(alias = "UITableViewDropIntentInsertIntoDestinationIndexPath")]
2408 pub const InsertIntoDestinationIndexPath: Self = Self(2);
2409 #[doc(alias = "UITableViewDropIntentAutomatic")]
2410 pub const Automatic: Self = Self(3);
2411}
2412
2413unsafe impl Encode for UITableViewDropIntent {
2414 const ENCODING: Encoding = NSInteger::ENCODING;
2415}
2416
2417unsafe impl RefEncode for UITableViewDropIntent {
2418 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2419}
2420
2421extern_class!(
2422 #[unsafe(super(UIDropProposal, NSObject))]
2424 #[thread_kind = MainThreadOnly]
2425 #[derive(Debug, PartialEq, Eq, Hash)]
2426 #[cfg(feature = "UIDropInteraction")]
2427 pub struct UITableViewDropProposal;
2428);
2429
2430#[cfg(feature = "UIDropInteraction")]
2431extern_conformance!(
2432 unsafe impl NSCopying for UITableViewDropProposal {}
2433);
2434
2435#[cfg(feature = "UIDropInteraction")]
2436unsafe impl CopyingHelper for UITableViewDropProposal {
2437 type Result = Self;
2438}
2439
2440#[cfg(feature = "UIDropInteraction")]
2441extern_conformance!(
2442 unsafe impl NSObjectProtocol for UITableViewDropProposal {}
2443);
2444
2445#[cfg(feature = "UIDropInteraction")]
2446impl UITableViewDropProposal {
2447 extern_methods!(
2448 #[unsafe(method(initWithDropOperation:intent:))]
2449 #[unsafe(method_family = init)]
2450 pub unsafe fn initWithDropOperation_intent(
2451 this: Allocated<Self>,
2452 operation: UIDropOperation,
2453 intent: UITableViewDropIntent,
2454 ) -> Retained<Self>;
2455
2456 #[unsafe(method(intent))]
2457 #[unsafe(method_family = none)]
2458 pub unsafe fn intent(&self) -> UITableViewDropIntent;
2459 );
2460}
2461
2462#[cfg(feature = "UIDropInteraction")]
2464impl UITableViewDropProposal {
2465 extern_methods!(
2466 #[unsafe(method(initWithDropOperation:))]
2467 #[unsafe(method_family = init)]
2468 pub unsafe fn initWithDropOperation(
2469 this: Allocated<Self>,
2470 operation: UIDropOperation,
2471 ) -> Retained<Self>;
2472
2473 #[unsafe(method(init))]
2474 #[unsafe(method_family = init)]
2475 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2476
2477 #[unsafe(method(new))]
2478 #[unsafe(method_family = new)]
2479 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
2480 );
2481}
2482
2483extern_protocol!(
2484 pub unsafe trait UITableViewDropCoordinator: NSObjectProtocol + MainThreadOnly {
2486 #[unsafe(method(items))]
2487 #[unsafe(method_family = none)]
2488 unsafe fn items(&self) -> Retained<NSArray<ProtocolObject<dyn UITableViewDropItem>>>;
2489
2490 #[unsafe(method(destinationIndexPath))]
2491 #[unsafe(method_family = none)]
2492 unsafe fn destinationIndexPath(&self) -> Option<Retained<NSIndexPath>>;
2493
2494 #[cfg(feature = "UIDropInteraction")]
2495 #[unsafe(method(proposal))]
2496 #[unsafe(method_family = none)]
2497 unsafe fn proposal(&self) -> Retained<UITableViewDropProposal>;
2498
2499 #[cfg(feature = "UIDragSession")]
2500 #[unsafe(method(session))]
2501 #[unsafe(method_family = none)]
2502 unsafe fn session(&self) -> Retained<ProtocolObject<dyn UIDropSession>>;
2503
2504 #[cfg(all(feature = "UIDragInteraction", feature = "UIDragItem"))]
2505 #[unsafe(method(dropItem:toPlaceholder:))]
2506 #[unsafe(method_family = none)]
2507 unsafe fn dropItem_toPlaceholder(
2508 &self,
2509 drag_item: &UIDragItem,
2510 placeholder: &UITableViewDropPlaceholder,
2511 ) -> Retained<ProtocolObject<dyn UITableViewDropPlaceholderContext>>;
2512
2513 #[cfg(all(feature = "UIDragInteraction", feature = "UIDragItem"))]
2514 #[unsafe(method(dropItem:toRowAtIndexPath:))]
2515 #[unsafe(method_family = none)]
2516 unsafe fn dropItem_toRowAtIndexPath(
2517 &self,
2518 drag_item: &UIDragItem,
2519 index_path: &NSIndexPath,
2520 ) -> Retained<ProtocolObject<dyn UIDragAnimating>>;
2521
2522 #[cfg(all(
2523 feature = "UIDragInteraction",
2524 feature = "UIDragItem",
2525 feature = "objc2-core-foundation"
2526 ))]
2527 #[unsafe(method(dropItem:intoRowAtIndexPath:rect:))]
2528 #[unsafe(method_family = none)]
2529 unsafe fn dropItem_intoRowAtIndexPath_rect(
2530 &self,
2531 drag_item: &UIDragItem,
2532 index_path: &NSIndexPath,
2533 rect: CGRect,
2534 ) -> Retained<ProtocolObject<dyn UIDragAnimating>>;
2535
2536 #[cfg(all(
2537 feature = "UIDragInteraction",
2538 feature = "UIDragItem",
2539 feature = "UITargetedDragPreview",
2540 feature = "UITargetedPreview"
2541 ))]
2542 #[unsafe(method(dropItem:toTarget:))]
2543 #[unsafe(method_family = none)]
2544 unsafe fn dropItem_toTarget(
2545 &self,
2546 drag_item: &UIDragItem,
2547 target: &UIDragPreviewTarget,
2548 ) -> Retained<ProtocolObject<dyn UIDragAnimating>>;
2549 }
2550);
2551
2552extern_class!(
2553 #[unsafe(super(NSObject))]
2555 #[thread_kind = MainThreadOnly]
2556 #[derive(Debug, PartialEq, Eq, Hash)]
2557 pub struct UITableViewPlaceholder;
2558);
2559
2560extern_conformance!(
2561 unsafe impl NSObjectProtocol for UITableViewPlaceholder {}
2562);
2563
2564impl UITableViewPlaceholder {
2565 extern_methods!(
2566 #[cfg(feature = "objc2-core-foundation")]
2567 #[unsafe(method(initWithInsertionIndexPath:reuseIdentifier:rowHeight:))]
2568 #[unsafe(method_family = init)]
2569 pub unsafe fn initWithInsertionIndexPath_reuseIdentifier_rowHeight(
2570 this: Allocated<Self>,
2571 insertion_index_path: &NSIndexPath,
2572 reuse_identifier: &NSString,
2573 row_height: CGFloat,
2574 ) -> Retained<Self>;
2575
2576 #[unsafe(method(init))]
2577 #[unsafe(method_family = init)]
2578 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2579
2580 #[unsafe(method(new))]
2581 #[unsafe(method_family = new)]
2582 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
2583
2584 #[cfg(all(
2585 feature = "UIResponder",
2586 feature = "UITableViewCell",
2587 feature = "UIView",
2588 feature = "block2"
2589 ))]
2590 #[unsafe(method(cellUpdateHandler))]
2591 #[unsafe(method_family = none)]
2592 pub unsafe fn cellUpdateHandler(
2593 &self,
2594 ) -> *mut block2::DynBlock<dyn Fn(NonNull<UITableViewCell>)>;
2595
2596 #[cfg(all(
2597 feature = "UIResponder",
2598 feature = "UITableViewCell",
2599 feature = "UIView",
2600 feature = "block2"
2601 ))]
2602 #[unsafe(method(setCellUpdateHandler:))]
2604 #[unsafe(method_family = none)]
2605 pub unsafe fn setCellUpdateHandler(
2606 &self,
2607 cell_update_handler: Option<&block2::DynBlock<dyn Fn(NonNull<UITableViewCell>)>>,
2608 );
2609 );
2610}
2611
2612extern_class!(
2613 #[unsafe(super(UITableViewPlaceholder, NSObject))]
2615 #[thread_kind = MainThreadOnly]
2616 #[derive(Debug, PartialEq, Eq, Hash)]
2617 pub struct UITableViewDropPlaceholder;
2618);
2619
2620extern_conformance!(
2621 unsafe impl NSObjectProtocol for UITableViewDropPlaceholder {}
2622);
2623
2624impl UITableViewDropPlaceholder {
2625 extern_methods!(
2626 #[cfg(all(
2627 feature = "UIDragPreviewParameters",
2628 feature = "UIPreviewParameters",
2629 feature = "UIResponder",
2630 feature = "UITableViewCell",
2631 feature = "UIView",
2632 feature = "block2"
2633 ))]
2634 #[unsafe(method(previewParametersProvider))]
2635 #[unsafe(method_family = none)]
2636 pub unsafe fn previewParametersProvider(
2637 &self,
2638 ) -> *mut block2::DynBlock<dyn Fn(NonNull<UITableViewCell>) -> *mut UIDragPreviewParameters>;
2639
2640 #[cfg(all(
2641 feature = "UIDragPreviewParameters",
2642 feature = "UIPreviewParameters",
2643 feature = "UIResponder",
2644 feature = "UITableViewCell",
2645 feature = "UIView",
2646 feature = "block2"
2647 ))]
2648 #[unsafe(method(setPreviewParametersProvider:))]
2650 #[unsafe(method_family = none)]
2651 pub unsafe fn setPreviewParametersProvider(
2652 &self,
2653 preview_parameters_provider: Option<
2654 &block2::DynBlock<dyn Fn(NonNull<UITableViewCell>) -> *mut UIDragPreviewParameters>,
2655 >,
2656 );
2657 );
2658}
2659
2660impl UITableViewDropPlaceholder {
2662 extern_methods!(
2663 #[cfg(feature = "objc2-core-foundation")]
2664 #[unsafe(method(initWithInsertionIndexPath:reuseIdentifier:rowHeight:))]
2665 #[unsafe(method_family = init)]
2666 pub unsafe fn initWithInsertionIndexPath_reuseIdentifier_rowHeight(
2667 this: Allocated<Self>,
2668 insertion_index_path: &NSIndexPath,
2669 reuse_identifier: &NSString,
2670 row_height: CGFloat,
2671 ) -> Retained<Self>;
2672
2673 #[unsafe(method(init))]
2674 #[unsafe(method_family = init)]
2675 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2676
2677 #[unsafe(method(new))]
2678 #[unsafe(method_family = new)]
2679 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
2680 );
2681}
2682
2683extern_protocol!(
2684 pub unsafe trait UITableViewDropItem: NSObjectProtocol + MainThreadOnly {
2686 #[cfg(feature = "UIDragItem")]
2687 #[unsafe(method(dragItem))]
2688 #[unsafe(method_family = none)]
2689 unsafe fn dragItem(&self) -> Retained<UIDragItem>;
2690
2691 #[unsafe(method(sourceIndexPath))]
2692 #[unsafe(method_family = none)]
2693 unsafe fn sourceIndexPath(&self) -> Option<Retained<NSIndexPath>>;
2694
2695 #[cfg(feature = "objc2-core-foundation")]
2696 #[unsafe(method(previewSize))]
2697 #[unsafe(method_family = none)]
2698 unsafe fn previewSize(&self) -> CGSize;
2699 }
2700);
2701
2702extern_protocol!(
2703 #[cfg(feature = "UIDragInteraction")]
2705 pub unsafe trait UITableViewDropPlaceholderContext:
2706 UIDragAnimating + MainThreadOnly
2707 {
2708 #[cfg(feature = "UIDragItem")]
2709 #[unsafe(method(dragItem))]
2710 #[unsafe(method_family = none)]
2711 unsafe fn dragItem(&self) -> Retained<UIDragItem>;
2712
2713 #[cfg(feature = "block2")]
2714 #[unsafe(method(commitInsertionWithDataSourceUpdates:))]
2715 #[unsafe(method_family = none)]
2716 unsafe fn commitInsertionWithDataSourceUpdates(
2717 &self,
2718 data_source_updates: &block2::DynBlock<dyn Fn(NonNull<NSIndexPath>) + '_>,
2719 ) -> bool;
2720
2721 #[unsafe(method(deletePlaceholder))]
2722 #[unsafe(method_family = none)]
2723 unsafe fn deletePlaceholder(&self) -> bool;
2724 }
2725);