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