use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
use objc2_quartz_core::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITableViewStyle(pub NSInteger);
impl UITableViewStyle {
#[doc(alias = "UITableViewStylePlain")]
pub const Plain: Self = Self(0);
#[doc(alias = "UITableViewStyleGrouped")]
pub const Grouped: Self = Self(1);
#[doc(alias = "UITableViewStyleInsetGrouped")]
pub const InsetGrouped: Self = Self(2);
}
unsafe impl Encode for UITableViewStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UITableViewStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITableViewScrollPosition(pub NSInteger);
impl UITableViewScrollPosition {
#[doc(alias = "UITableViewScrollPositionNone")]
pub const None: Self = Self(0);
#[doc(alias = "UITableViewScrollPositionTop")]
pub const Top: Self = Self(1);
#[doc(alias = "UITableViewScrollPositionMiddle")]
pub const Middle: Self = Self(2);
#[doc(alias = "UITableViewScrollPositionBottom")]
pub const Bottom: Self = Self(3);
}
unsafe impl Encode for UITableViewScrollPosition {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UITableViewScrollPosition {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITableViewRowAnimation(pub NSInteger);
impl UITableViewRowAnimation {
#[doc(alias = "UITableViewRowAnimationFade")]
pub const Fade: Self = Self(0);
#[doc(alias = "UITableViewRowAnimationRight")]
pub const Right: Self = Self(1);
#[doc(alias = "UITableViewRowAnimationLeft")]
pub const Left: Self = Self(2);
#[doc(alias = "UITableViewRowAnimationTop")]
pub const Top: Self = Self(3);
#[doc(alias = "UITableViewRowAnimationBottom")]
pub const Bottom: Self = Self(4);
#[doc(alias = "UITableViewRowAnimationNone")]
pub const None: Self = Self(5);
#[doc(alias = "UITableViewRowAnimationMiddle")]
pub const Middle: Self = Self(6);
#[doc(alias = "UITableViewRowAnimationAutomatic")]
pub const Automatic: Self = Self(100);
}
unsafe impl Encode for UITableViewRowAnimation {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UITableViewRowAnimation {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static UITableViewIndexSearch: &'static NSString;
}
extern "C" {
pub static UITableViewAutomaticDimension: CGFloat;
}
#[deprecated = "Use UIContextualAction and related APIs instead."]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITableViewRowActionStyle(pub NSInteger);
impl UITableViewRowActionStyle {
#[deprecated = "Use UIContextualAction and related APIs instead."]
#[doc(alias = "UITableViewRowActionStyleDefault")]
pub const Default: Self = Self(0);
#[deprecated = "Use UIContextualAction and related APIs instead."]
#[doc(alias = "UITableViewRowActionStyleDestructive")]
pub const Destructive: Self = Self(UITableViewRowActionStyle::Default.0);
#[deprecated = "Use UIContextualAction and related APIs instead."]
#[doc(alias = "UITableViewRowActionStyleNormal")]
pub const Normal: Self = Self(1);
}
unsafe impl Encode for UITableViewRowActionStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UITableViewRowActionStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[deprecated = "Use UIContextualAction and related APIs instead."]
pub struct UITableViewRowAction;
unsafe impl ClassType for UITableViewRowAction {
type Super = NSObject;
type Mutability = MainThreadOnly;
}
);
unsafe impl NSCopying for UITableViewRowAction {}
unsafe impl NSObjectProtocol for UITableViewRowAction {}
extern_methods!(
unsafe impl UITableViewRowAction {
#[cfg(feature = "block2")]
#[deprecated = "Use UIContextualAction and related APIs instead."]
#[method_id(@__retain_semantics Other rowActionWithStyle:title:handler:)]
pub unsafe fn rowActionWithStyle_title_handler(
style: UITableViewRowActionStyle,
title: Option<&NSString>,
handler: &block2::Block<dyn Fn(NonNull<UITableViewRowAction>, NonNull<NSIndexPath>)>,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[deprecated = "Use UIContextualAction and related APIs instead."]
#[method(style)]
pub unsafe fn style(&self) -> UITableViewRowActionStyle;
#[deprecated = "Use UIContextualAction and related APIs instead."]
#[method_id(@__retain_semantics Other title)]
pub unsafe fn title(&self) -> Option<Retained<NSString>>;
#[deprecated = "Use UIContextualAction and related APIs instead."]
#[method(setTitle:)]
pub unsafe fn setTitle(&self, title: Option<&NSString>);
#[cfg(feature = "UIColor")]
#[deprecated = "Use UIContextualAction and related APIs instead."]
#[method_id(@__retain_semantics Other backgroundColor)]
pub unsafe fn backgroundColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[deprecated = "Use UIContextualAction and related APIs instead."]
#[method(setBackgroundColor:)]
pub unsafe fn setBackgroundColor(&self, background_color: Option<&UIColor>);
#[cfg(feature = "UIVisualEffect")]
#[deprecated = "Use UIContextualAction and related APIs instead."]
#[method_id(@__retain_semantics Other backgroundEffect)]
pub unsafe fn backgroundEffect(&self) -> Option<Retained<UIVisualEffect>>;
#[cfg(feature = "UIVisualEffect")]
#[deprecated = "Use UIContextualAction and related APIs instead."]
#[method(setBackgroundEffect:)]
pub unsafe fn setBackgroundEffect(&self, background_effect: Option<&UIVisualEffect>);
}
);
extern_methods!(
unsafe impl UITableViewRowAction {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "UIFocus")]
pub struct UITableViewFocusUpdateContext;
#[cfg(feature = "UIFocus")]
unsafe impl ClassType for UITableViewFocusUpdateContext {
#[inherits(NSObject)]
type Super = UIFocusUpdateContext;
type Mutability = MainThreadOnly;
}
);
#[cfg(feature = "UIFocus")]
unsafe impl NSObjectProtocol for UITableViewFocusUpdateContext {}
extern_methods!(
#[cfg(feature = "UIFocus")]
unsafe impl UITableViewFocusUpdateContext {
#[method_id(@__retain_semantics Other previouslyFocusedIndexPath)]
pub unsafe fn previouslyFocusedIndexPath(&self) -> Option<Retained<NSIndexPath>>;
#[method_id(@__retain_semantics Other nextFocusedIndexPath)]
pub unsafe fn nextFocusedIndexPath(&self) -> Option<Retained<NSIndexPath>>;
}
);
extern_methods!(
#[cfg(feature = "UIFocus")]
unsafe impl UITableViewFocusUpdateContext {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
}
);
extern_protocol!(
#[cfg(feature = "UIScrollView")]
pub unsafe trait UITableViewDelegate:
NSObjectProtocol + UIScrollViewDelegate + IsMainThreadOnly
{
#[cfg(all(
feature = "UIResponder",
feature = "UITableViewCell",
feature = "UIView"
))]
#[optional]
#[method(tableView:willDisplayCell:forRowAtIndexPath:)]
unsafe fn tableView_willDisplayCell_forRowAtIndexPath(
&self,
table_view: &UITableView,
cell: &UITableViewCell,
index_path: &NSIndexPath,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:willDisplayHeaderView:forSection:)]
unsafe fn tableView_willDisplayHeaderView_forSection(
&self,
table_view: &UITableView,
view: &UIView,
section: NSInteger,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:willDisplayFooterView:forSection:)]
unsafe fn tableView_willDisplayFooterView_forSection(
&self,
table_view: &UITableView,
view: &UIView,
section: NSInteger,
);
#[cfg(all(
feature = "UIResponder",
feature = "UITableViewCell",
feature = "UIView"
))]
#[optional]
#[method(tableView:didEndDisplayingCell:forRowAtIndexPath:)]
unsafe fn tableView_didEndDisplayingCell_forRowAtIndexPath(
&self,
table_view: &UITableView,
cell: &UITableViewCell,
index_path: &NSIndexPath,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:didEndDisplayingHeaderView:forSection:)]
unsafe fn tableView_didEndDisplayingHeaderView_forSection(
&self,
table_view: &UITableView,
view: &UIView,
section: NSInteger,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:didEndDisplayingFooterView:forSection:)]
unsafe fn tableView_didEndDisplayingFooterView_forSection(
&self,
table_view: &UITableView,
view: &UIView,
section: NSInteger,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:heightForRowAtIndexPath:)]
unsafe fn tableView_heightForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> CGFloat;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:heightForHeaderInSection:)]
unsafe fn tableView_heightForHeaderInSection(
&self,
table_view: &UITableView,
section: NSInteger,
) -> CGFloat;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:heightForFooterInSection:)]
unsafe fn tableView_heightForFooterInSection(
&self,
table_view: &UITableView,
section: NSInteger,
) -> CGFloat;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:estimatedHeightForRowAtIndexPath:)]
unsafe fn tableView_estimatedHeightForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> CGFloat;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:estimatedHeightForHeaderInSection:)]
unsafe fn tableView_estimatedHeightForHeaderInSection(
&self,
table_view: &UITableView,
section: NSInteger,
) -> CGFloat;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:estimatedHeightForFooterInSection:)]
unsafe fn tableView_estimatedHeightForFooterInSection(
&self,
table_view: &UITableView,
section: NSInteger,
) -> CGFloat;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method_id(@__retain_semantics Other tableView:viewForHeaderInSection:)]
unsafe fn tableView_viewForHeaderInSection(
&self,
table_view: &UITableView,
section: NSInteger,
) -> Option<Retained<UIView>>;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method_id(@__retain_semantics Other tableView:viewForFooterInSection:)]
unsafe fn tableView_viewForFooterInSection(
&self,
table_view: &UITableView,
section: NSInteger,
) -> Option<Retained<UIView>>;
#[cfg(all(
feature = "UIResponder",
feature = "UITableViewCell",
feature = "UIView"
))]
#[deprecated]
#[optional]
#[method(tableView:accessoryTypeForRowWithIndexPath:)]
unsafe fn tableView_accessoryTypeForRowWithIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> UITableViewCellAccessoryType;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:accessoryButtonTappedForRowWithIndexPath:)]
unsafe fn tableView_accessoryButtonTappedForRowWithIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:shouldHighlightRowAtIndexPath:)]
unsafe fn tableView_shouldHighlightRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> bool;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:didHighlightRowAtIndexPath:)]
unsafe fn tableView_didHighlightRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:didUnhighlightRowAtIndexPath:)]
unsafe fn tableView_didUnhighlightRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method_id(@__retain_semantics Other tableView:willSelectRowAtIndexPath:)]
unsafe fn tableView_willSelectRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> Option<Retained<NSIndexPath>>;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method_id(@__retain_semantics Other tableView:willDeselectRowAtIndexPath:)]
unsafe fn tableView_willDeselectRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> Option<Retained<NSIndexPath>>;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:didSelectRowAtIndexPath:)]
unsafe fn tableView_didSelectRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:didDeselectRowAtIndexPath:)]
unsafe fn tableView_didDeselectRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:canPerformPrimaryActionForRowAtIndexPath:)]
unsafe fn tableView_canPerformPrimaryActionForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> bool;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:performPrimaryActionForRowAtIndexPath:)]
unsafe fn tableView_performPrimaryActionForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
);
#[cfg(all(
feature = "UIResponder",
feature = "UITableViewCell",
feature = "UIView"
))]
#[optional]
#[method(tableView:editingStyleForRowAtIndexPath:)]
unsafe fn tableView_editingStyleForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> UITableViewCellEditingStyle;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method_id(@__retain_semantics Other tableView:titleForDeleteConfirmationButtonForRowAtIndexPath:)]
unsafe fn tableView_titleForDeleteConfirmationButtonForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> Option<Retained<NSString>>;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[deprecated]
#[optional]
#[method_id(@__retain_semantics Other tableView:editActionsForRowAtIndexPath:)]
unsafe fn tableView_editActionsForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> Option<Retained<NSArray<UITableViewRowAction>>>;
#[cfg(all(
feature = "UIResponder",
feature = "UISwipeActionsConfiguration",
feature = "UIView"
))]
#[optional]
#[method_id(@__retain_semantics Other tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:)]
unsafe fn tableView_leadingSwipeActionsConfigurationForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> Option<Retained<UISwipeActionsConfiguration>>;
#[cfg(all(
feature = "UIResponder",
feature = "UISwipeActionsConfiguration",
feature = "UIView"
))]
#[optional]
#[method_id(@__retain_semantics Other tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:)]
unsafe fn tableView_trailingSwipeActionsConfigurationForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> Option<Retained<UISwipeActionsConfiguration>>;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:shouldIndentWhileEditingRowAtIndexPath:)]
unsafe fn tableView_shouldIndentWhileEditingRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> bool;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:willBeginEditingRowAtIndexPath:)]
unsafe fn tableView_willBeginEditingRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:didEndEditingRowAtIndexPath:)]
unsafe fn tableView_didEndEditingRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: Option<&NSIndexPath>,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method_id(@__retain_semantics Other tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath:)]
unsafe fn tableView_targetIndexPathForMoveFromRowAtIndexPath_toProposedIndexPath(
&self,
table_view: &UITableView,
source_index_path: &NSIndexPath,
proposed_destination_index_path: &NSIndexPath,
) -> Retained<NSIndexPath>;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:indentationLevelForRowAtIndexPath:)]
unsafe fn tableView_indentationLevelForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> NSInteger;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[deprecated]
#[optional]
#[method(tableView:shouldShowMenuForRowAtIndexPath:)]
unsafe fn tableView_shouldShowMenuForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> bool;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[deprecated]
#[optional]
#[method(tableView:canPerformAction:forRowAtIndexPath:withSender:)]
unsafe fn tableView_canPerformAction_forRowAtIndexPath_withSender(
&self,
table_view: &UITableView,
action: Sel,
index_path: &NSIndexPath,
sender: Option<&AnyObject>,
) -> bool;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[deprecated]
#[optional]
#[method(tableView:performAction:forRowAtIndexPath:withSender:)]
unsafe fn tableView_performAction_forRowAtIndexPath_withSender(
&self,
table_view: &UITableView,
action: Sel,
index_path: &NSIndexPath,
sender: Option<&AnyObject>,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:canFocusRowAtIndexPath:)]
unsafe fn tableView_canFocusRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> bool;
#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:shouldUpdateFocusInContext:)]
unsafe fn tableView_shouldUpdateFocusInContext(
&self,
table_view: &UITableView,
context: &UITableViewFocusUpdateContext,
) -> bool;
#[cfg(all(
feature = "UIFocus",
feature = "UIFocusAnimationCoordinator",
feature = "UIResponder",
feature = "UIView"
))]
#[optional]
#[method(tableView:didUpdateFocusInContext:withAnimationCoordinator:)]
unsafe fn tableView_didUpdateFocusInContext_withAnimationCoordinator(
&self,
table_view: &UITableView,
context: &UITableViewFocusUpdateContext,
coordinator: &UIFocusAnimationCoordinator,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method_id(@__retain_semantics Other indexPathForPreferredFocusedViewInTableView:)]
unsafe fn indexPathForPreferredFocusedViewInTableView(
&self,
table_view: &UITableView,
) -> Option<Retained<NSIndexPath>>;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:selectionFollowsFocusForRowAtIndexPath:)]
unsafe fn tableView_selectionFollowsFocusForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> bool;
#[cfg(all(
feature = "UIResponder",
feature = "UISpringLoadedInteraction",
feature = "UIView"
))]
#[optional]
#[method(tableView:shouldSpringLoadRowAtIndexPath:withContext:)]
unsafe fn tableView_shouldSpringLoadRowAtIndexPath_withContext(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
context: &ProtocolObject<dyn UISpringLoadedInteractionContext>,
) -> bool;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:shouldBeginMultipleSelectionInteractionAtIndexPath:)]
unsafe fn tableView_shouldBeginMultipleSelectionInteractionAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> bool;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableView:didBeginMultipleSelectionInteractionAtIndexPath:)]
unsafe fn tableView_didBeginMultipleSelectionInteractionAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[optional]
#[method(tableViewDidEndMultipleSelectionInteraction:)]
unsafe fn tableViewDidEndMultipleSelectionInteraction(&self, table_view: &UITableView);
#[cfg(all(
feature = "UIContextMenuConfiguration",
feature = "UIResponder",
feature = "UIView"
))]
#[optional]
#[method_id(@__retain_semantics Other tableView:contextMenuConfigurationForRowAtIndexPath:point:)]
unsafe fn tableView_contextMenuConfigurationForRowAtIndexPath_point(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
point: CGPoint,
) -> Option<Retained<UIContextMenuConfiguration>>;
#[cfg(all(
feature = "UIContextMenuConfiguration",
feature = "UIResponder",
feature = "UITargetedPreview",
feature = "UIView"
))]
#[optional]
#[method_id(@__retain_semantics Other tableView:previewForHighlightingContextMenuWithConfiguration:)]
unsafe fn tableView_previewForHighlightingContextMenuWithConfiguration(
&self,
table_view: &UITableView,
configuration: &UIContextMenuConfiguration,
) -> Option<Retained<UITargetedPreview>>;
#[cfg(all(
feature = "UIContextMenuConfiguration",
feature = "UIResponder",
feature = "UITargetedPreview",
feature = "UIView"
))]
#[optional]
#[method_id(@__retain_semantics Other tableView:previewForDismissingContextMenuWithConfiguration:)]
unsafe fn tableView_previewForDismissingContextMenuWithConfiguration(
&self,
table_view: &UITableView,
configuration: &UIContextMenuConfiguration,
) -> Option<Retained<UITargetedPreview>>;
#[cfg(all(
feature = "UIContextMenuConfiguration",
feature = "UIContextMenuInteraction",
feature = "UIResponder",
feature = "UIView"
))]
#[optional]
#[method(tableView:willPerformPreviewActionForMenuWithConfiguration:animator:)]
unsafe fn tableView_willPerformPreviewActionForMenuWithConfiguration_animator(
&self,
table_view: &UITableView,
configuration: &UIContextMenuConfiguration,
animator: &ProtocolObject<dyn UIContextMenuInteractionCommitAnimating>,
);
#[cfg(all(
feature = "UIContextMenuConfiguration",
feature = "UIContextMenuInteraction",
feature = "UIResponder",
feature = "UIView"
))]
#[optional]
#[method(tableView:willDisplayContextMenuWithConfiguration:animator:)]
unsafe fn tableView_willDisplayContextMenuWithConfiguration_animator(
&self,
table_view: &UITableView,
configuration: &UIContextMenuConfiguration,
animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>,
);
#[cfg(all(
feature = "UIContextMenuConfiguration",
feature = "UIContextMenuInteraction",
feature = "UIResponder",
feature = "UIView"
))]
#[optional]
#[method(tableView:willEndContextMenuInteractionWithConfiguration:animator:)]
unsafe fn tableView_willEndContextMenuInteractionWithConfiguration_animator(
&self,
table_view: &UITableView,
configuration: &UIContextMenuConfiguration,
animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>,
);
}
#[cfg(feature = "UIScrollView")]
unsafe impl ProtocolType for dyn UITableViewDelegate {}
);
extern "C" {
pub static UITableViewSelectionDidChangeNotification: &'static NSNotificationName;
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITableViewSeparatorInsetReference(pub NSInteger);
impl UITableViewSeparatorInsetReference {
pub const UITableViewSeparatorInsetFromCellEdges: Self = Self(0);
pub const UITableViewSeparatorInsetFromAutomaticInsets: Self = Self(1);
}
unsafe impl Encode for UITableViewSeparatorInsetReference {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UITableViewSeparatorInsetReference {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITableViewSelfSizingInvalidation(pub NSInteger);
impl UITableViewSelfSizingInvalidation {
#[doc(alias = "UITableViewSelfSizingInvalidationDisabled")]
pub const Disabled: Self = Self(0);
#[doc(alias = "UITableViewSelfSizingInvalidationEnabled")]
pub const Enabled: Self = Self(1);
#[doc(alias = "UITableViewSelfSizingInvalidationEnabledIncludingConstraints")]
pub const EnabledIncludingConstraints: Self = Self(2);
}
unsafe impl Encode for UITableViewSelfSizingInvalidation {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UITableViewSelfSizingInvalidation {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
pub struct UITableView;
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
unsafe impl ClassType for UITableView {
#[inherits(UIView, UIResponder, NSObject)]
type Super = UIScrollView;
type Mutability = MainThreadOnly;
}
);
#[cfg(all(
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView",
feature = "objc2-quartz-core"
))]
#[cfg(not(target_os = "watchos"))]
unsafe impl CALayerDelegate for UITableView {}
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
unsafe impl NSCoding for UITableView {}
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
unsafe impl NSObjectProtocol for UITableView {}
#[cfg(all(
feature = "UIAppearance",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
unsafe impl UIAppearance for UITableView {}
#[cfg(all(
feature = "UIAppearance",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
unsafe impl UIAppearanceContainer for UITableView {}
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
unsafe impl UICoordinateSpace for UITableView {}
#[cfg(all(
feature = "UIDataSourceTranslating",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
unsafe impl UIDataSourceTranslating for UITableView {}
#[cfg(all(
feature = "UIDynamicBehavior",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
unsafe impl UIDynamicItem for UITableView {}
#[cfg(all(
feature = "UIFocus",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
unsafe impl UIFocusEnvironment for UITableView {}
#[cfg(all(
feature = "UIFocus",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
unsafe impl UIFocusItem for UITableView {}
#[cfg(all(
feature = "UIFocus",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
unsafe impl UIFocusItemContainer for UITableView {}
#[cfg(all(
feature = "UIFocus",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
unsafe impl UIFocusItemScrollableContainer for UITableView {}
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
unsafe impl UIResponderStandardEditActions for UITableView {}
#[cfg(all(
feature = "UIResponder",
feature = "UIScrollView",
feature = "UITraitCollection",
feature = "UIView"
))]
unsafe impl UITraitEnvironment for UITableView {}
extern_methods!(
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
unsafe impl UITableView {
#[method_id(@__retain_semantics Init initWithFrame:style:)]
pub unsafe fn initWithFrame_style(
this: Allocated<Self>,
frame: CGRect,
style: UITableViewStyle,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithCoder:)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
#[method(style)]
pub unsafe fn style(&self) -> UITableViewStyle;
#[method_id(@__retain_semantics Other dataSource)]
pub unsafe fn dataSource(
&self,
) -> Option<Retained<ProtocolObject<dyn UITableViewDataSource>>>;
#[method(setDataSource:)]
pub unsafe fn setDataSource(
&self,
data_source: Option<&ProtocolObject<dyn UITableViewDataSource>>,
);
#[method_id(@__retain_semantics Other delegate)]
pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn UITableViewDelegate>>>;
#[method(setDelegate:)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn UITableViewDelegate>>,
);
#[method_id(@__retain_semantics Other prefetchDataSource)]
pub unsafe fn prefetchDataSource(
&self,
) -> Option<Retained<ProtocolObject<dyn UITableViewDataSourcePrefetching>>>;
#[method(setPrefetchDataSource:)]
pub unsafe fn setPrefetchDataSource(
&self,
prefetch_data_source: Option<&ProtocolObject<dyn UITableViewDataSourcePrefetching>>,
);
#[method(isPrefetchingEnabled)]
pub unsafe fn isPrefetchingEnabled(&self) -> bool;
#[method(setPrefetchingEnabled:)]
pub unsafe fn setPrefetchingEnabled(&self, prefetching_enabled: bool);
#[method_id(@__retain_semantics Other dragDelegate)]
pub unsafe fn dragDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn UITableViewDragDelegate>>>;
#[method(setDragDelegate:)]
pub unsafe fn setDragDelegate(
&self,
drag_delegate: Option<&ProtocolObject<dyn UITableViewDragDelegate>>,
);
#[method_id(@__retain_semantics Other dropDelegate)]
pub unsafe fn dropDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn UITableViewDropDelegate>>>;
#[method(setDropDelegate:)]
pub unsafe fn setDropDelegate(
&self,
drop_delegate: Option<&ProtocolObject<dyn UITableViewDropDelegate>>,
);
#[method(rowHeight)]
pub unsafe fn rowHeight(&self) -> CGFloat;
#[method(setRowHeight:)]
pub unsafe fn setRowHeight(&self, row_height: CGFloat);
#[method(sectionHeaderHeight)]
pub unsafe fn sectionHeaderHeight(&self) -> CGFloat;
#[method(setSectionHeaderHeight:)]
pub unsafe fn setSectionHeaderHeight(&self, section_header_height: CGFloat);
#[method(sectionFooterHeight)]
pub unsafe fn sectionFooterHeight(&self) -> CGFloat;
#[method(setSectionFooterHeight:)]
pub unsafe fn setSectionFooterHeight(&self, section_footer_height: CGFloat);
#[method(estimatedRowHeight)]
pub unsafe fn estimatedRowHeight(&self) -> CGFloat;
#[method(setEstimatedRowHeight:)]
pub unsafe fn setEstimatedRowHeight(&self, estimated_row_height: CGFloat);
#[method(estimatedSectionHeaderHeight)]
pub unsafe fn estimatedSectionHeaderHeight(&self) -> CGFloat;
#[method(setEstimatedSectionHeaderHeight:)]
pub unsafe fn setEstimatedSectionHeaderHeight(
&self,
estimated_section_header_height: CGFloat,
);
#[method(estimatedSectionFooterHeight)]
pub unsafe fn estimatedSectionFooterHeight(&self) -> CGFloat;
#[method(setEstimatedSectionFooterHeight:)]
pub unsafe fn setEstimatedSectionFooterHeight(
&self,
estimated_section_footer_height: CGFloat,
);
#[method(fillerRowHeight)]
pub unsafe fn fillerRowHeight(&self) -> CGFloat;
#[method(setFillerRowHeight:)]
pub unsafe fn setFillerRowHeight(&self, filler_row_height: CGFloat);
#[method(sectionHeaderTopPadding)]
pub unsafe fn sectionHeaderTopPadding(&self) -> CGFloat;
#[method(setSectionHeaderTopPadding:)]
pub unsafe fn setSectionHeaderTopPadding(&self, section_header_top_padding: CGFloat);
#[cfg(feature = "UIGeometry")]
#[method(separatorInset)]
pub unsafe fn separatorInset(&self) -> UIEdgeInsets;
#[cfg(feature = "UIGeometry")]
#[method(setSeparatorInset:)]
pub unsafe fn setSeparatorInset(&self, separator_inset: UIEdgeInsets);
#[method(separatorInsetReference)]
pub unsafe fn separatorInsetReference(&self) -> UITableViewSeparatorInsetReference;
#[method(setSeparatorInsetReference:)]
pub unsafe fn setSeparatorInsetReference(
&self,
separator_inset_reference: UITableViewSeparatorInsetReference,
);
#[method(selfSizingInvalidation)]
pub unsafe fn selfSizingInvalidation(&self) -> UITableViewSelfSizingInvalidation;
#[method(setSelfSizingInvalidation:)]
pub unsafe fn setSelfSizingInvalidation(
&self,
self_sizing_invalidation: UITableViewSelfSizingInvalidation,
);
#[method_id(@__retain_semantics Other backgroundView)]
pub unsafe fn backgroundView(&self) -> Option<Retained<UIView>>;
#[method(setBackgroundView:)]
pub unsafe fn setBackgroundView(&self, background_view: Option<&UIView>);
#[cfg(feature = "UIContextMenuInteraction")]
#[method_id(@__retain_semantics Other contextMenuInteraction)]
pub unsafe fn contextMenuInteraction(&self) -> Option<Retained<UIContextMenuInteraction>>;
#[method(numberOfSections)]
pub unsafe fn numberOfSections(&self) -> NSInteger;
#[method(numberOfRowsInSection:)]
pub unsafe fn numberOfRowsInSection(&self, section: NSInteger) -> NSInteger;
#[method(rectForSection:)]
pub unsafe fn rectForSection(&self, section: NSInteger) -> CGRect;
#[method(rectForHeaderInSection:)]
pub unsafe fn rectForHeaderInSection(&self, section: NSInteger) -> CGRect;
#[method(rectForFooterInSection:)]
pub unsafe fn rectForFooterInSection(&self, section: NSInteger) -> CGRect;
#[method(rectForRowAtIndexPath:)]
pub unsafe fn rectForRowAtIndexPath(&self, index_path: &NSIndexPath) -> CGRect;
#[method_id(@__retain_semantics Other indexPathForRowAtPoint:)]
pub unsafe fn indexPathForRowAtPoint(
&self,
point: CGPoint,
) -> Option<Retained<NSIndexPath>>;
#[cfg(feature = "UITableViewCell")]
#[method_id(@__retain_semantics Other indexPathForCell:)]
pub unsafe fn indexPathForCell(
&self,
cell: &UITableViewCell,
) -> Option<Retained<NSIndexPath>>;
#[method_id(@__retain_semantics Other indexPathsForRowsInRect:)]
pub unsafe fn indexPathsForRowsInRect(
&self,
rect: CGRect,
) -> Option<Retained<NSArray<NSIndexPath>>>;
#[cfg(feature = "UITableViewCell")]
#[method_id(@__retain_semantics Other cellForRowAtIndexPath:)]
pub unsafe fn cellForRowAtIndexPath(
&self,
index_path: &NSIndexPath,
) -> Option<Retained<UITableViewCell>>;
#[cfg(feature = "UITableViewCell")]
#[method_id(@__retain_semantics Other visibleCells)]
pub unsafe fn visibleCells(&self) -> Retained<NSArray<UITableViewCell>>;
#[method_id(@__retain_semantics Other indexPathsForVisibleRows)]
pub unsafe fn indexPathsForVisibleRows(&self) -> Option<Retained<NSArray<NSIndexPath>>>;
#[cfg(feature = "UITableViewHeaderFooterView")]
#[method_id(@__retain_semantics Other headerViewForSection:)]
pub unsafe fn headerViewForSection(
&self,
section: NSInteger,
) -> Option<Retained<UITableViewHeaderFooterView>>;
#[cfg(feature = "UITableViewHeaderFooterView")]
#[method_id(@__retain_semantics Other footerViewForSection:)]
pub unsafe fn footerViewForSection(
&self,
section: NSInteger,
) -> Option<Retained<UITableViewHeaderFooterView>>;
#[method(scrollToRowAtIndexPath:atScrollPosition:animated:)]
pub unsafe fn scrollToRowAtIndexPath_atScrollPosition_animated(
&self,
index_path: &NSIndexPath,
scroll_position: UITableViewScrollPosition,
animated: bool,
);
#[method(scrollToNearestSelectedRowAtScrollPosition:animated:)]
pub unsafe fn scrollToNearestSelectedRowAtScrollPosition_animated(
&self,
scroll_position: UITableViewScrollPosition,
animated: bool,
);
#[cfg(feature = "block2")]
#[method(performBatchUpdates:completion:)]
pub unsafe fn performBatchUpdates_completion(
&self,
updates: Option<&block2::Block<dyn Fn() + '_>>,
completion: Option<&block2::Block<dyn Fn(Bool)>>,
);
#[method(beginUpdates)]
pub unsafe fn beginUpdates(&self);
#[method(endUpdates)]
pub unsafe fn endUpdates(&self);
#[method(insertSections:withRowAnimation:)]
pub unsafe fn insertSections_withRowAnimation(
&self,
sections: &NSIndexSet,
animation: UITableViewRowAnimation,
);
#[method(deleteSections:withRowAnimation:)]
pub unsafe fn deleteSections_withRowAnimation(
&self,
sections: &NSIndexSet,
animation: UITableViewRowAnimation,
);
#[method(moveSection:toSection:)]
pub unsafe fn moveSection_toSection(&self, section: NSInteger, new_section: NSInteger);
#[method(reloadSections:withRowAnimation:)]
pub unsafe fn reloadSections_withRowAnimation(
&self,
sections: &NSIndexSet,
animation: UITableViewRowAnimation,
);
#[method(insertRowsAtIndexPaths:withRowAnimation:)]
pub unsafe fn insertRowsAtIndexPaths_withRowAnimation(
&self,
index_paths: &NSArray<NSIndexPath>,
animation: UITableViewRowAnimation,
);
#[method(deleteRowsAtIndexPaths:withRowAnimation:)]
pub unsafe fn deleteRowsAtIndexPaths_withRowAnimation(
&self,
index_paths: &NSArray<NSIndexPath>,
animation: UITableViewRowAnimation,
);
#[method(moveRowAtIndexPath:toIndexPath:)]
pub unsafe fn moveRowAtIndexPath_toIndexPath(
&self,
index_path: &NSIndexPath,
new_index_path: &NSIndexPath,
);
#[method(reloadRowsAtIndexPaths:withRowAnimation:)]
pub unsafe fn reloadRowsAtIndexPaths_withRowAnimation(
&self,
index_paths: &NSArray<NSIndexPath>,
animation: UITableViewRowAnimation,
);
#[method(reconfigureRowsAtIndexPaths:)]
pub unsafe fn reconfigureRowsAtIndexPaths(&self, index_paths: &NSArray<NSIndexPath>);
#[method(hasUncommittedUpdates)]
pub unsafe fn hasUncommittedUpdates(&self) -> bool;
#[method(reloadData)]
pub unsafe fn reloadData(&self);
#[method(reloadSectionIndexTitles)]
pub unsafe fn reloadSectionIndexTitles(&self);
#[method(isEditing)]
pub unsafe fn isEditing(&self) -> bool;
#[method(setEditing:)]
pub unsafe fn setEditing(&self, editing: bool);
#[method(setEditing:animated:)]
pub unsafe fn setEditing_animated(&self, editing: bool, animated: bool);
#[method(allowsSelection)]
pub unsafe fn allowsSelection(&self) -> bool;
#[method(setAllowsSelection:)]
pub unsafe fn setAllowsSelection(&self, allows_selection: bool);
#[method(allowsSelectionDuringEditing)]
pub unsafe fn allowsSelectionDuringEditing(&self) -> bool;
#[method(setAllowsSelectionDuringEditing:)]
pub unsafe fn setAllowsSelectionDuringEditing(&self, allows_selection_during_editing: bool);
#[method(allowsMultipleSelection)]
pub unsafe fn allowsMultipleSelection(&self) -> bool;
#[method(setAllowsMultipleSelection:)]
pub unsafe fn setAllowsMultipleSelection(&self, allows_multiple_selection: bool);
#[method(allowsMultipleSelectionDuringEditing)]
pub unsafe fn allowsMultipleSelectionDuringEditing(&self) -> bool;
#[method(setAllowsMultipleSelectionDuringEditing:)]
pub unsafe fn setAllowsMultipleSelectionDuringEditing(
&self,
allows_multiple_selection_during_editing: bool,
);
#[method_id(@__retain_semantics Other indexPathForSelectedRow)]
pub unsafe fn indexPathForSelectedRow(&self) -> Option<Retained<NSIndexPath>>;
#[method_id(@__retain_semantics Other indexPathsForSelectedRows)]
pub unsafe fn indexPathsForSelectedRows(&self) -> Option<Retained<NSArray<NSIndexPath>>>;
#[method(selectRowAtIndexPath:animated:scrollPosition:)]
pub unsafe fn selectRowAtIndexPath_animated_scrollPosition(
&self,
index_path: Option<&NSIndexPath>,
animated: bool,
scroll_position: UITableViewScrollPosition,
);
#[method(deselectRowAtIndexPath:animated:)]
pub unsafe fn deselectRowAtIndexPath_animated(
&self,
index_path: &NSIndexPath,
animated: bool,
);
#[method(sectionIndexMinimumDisplayRowCount)]
pub unsafe fn sectionIndexMinimumDisplayRowCount(&self) -> NSInteger;
#[method(setSectionIndexMinimumDisplayRowCount:)]
pub unsafe fn setSectionIndexMinimumDisplayRowCount(
&self,
section_index_minimum_display_row_count: NSInteger,
);
#[cfg(feature = "UIColor")]
#[method_id(@__retain_semantics Other sectionIndexColor)]
pub unsafe fn sectionIndexColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[method(setSectionIndexColor:)]
pub unsafe fn setSectionIndexColor(&self, section_index_color: Option<&UIColor>);
#[cfg(feature = "UIColor")]
#[method_id(@__retain_semantics Other sectionIndexBackgroundColor)]
pub unsafe fn sectionIndexBackgroundColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[method(setSectionIndexBackgroundColor:)]
pub unsafe fn setSectionIndexBackgroundColor(
&self,
section_index_background_color: Option<&UIColor>,
);
#[cfg(feature = "UIColor")]
#[method_id(@__retain_semantics Other sectionIndexTrackingBackgroundColor)]
pub unsafe fn sectionIndexTrackingBackgroundColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[method(setSectionIndexTrackingBackgroundColor:)]
pub unsafe fn setSectionIndexTrackingBackgroundColor(
&self,
section_index_tracking_background_color: Option<&UIColor>,
);
#[cfg(feature = "UITableViewCell")]
#[method(separatorStyle)]
pub unsafe fn separatorStyle(&self) -> UITableViewCellSeparatorStyle;
#[cfg(feature = "UITableViewCell")]
#[method(setSeparatorStyle:)]
pub unsafe fn setSeparatorStyle(&self, separator_style: UITableViewCellSeparatorStyle);
#[cfg(feature = "UIColor")]
#[method_id(@__retain_semantics Other separatorColor)]
pub unsafe fn separatorColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[method(setSeparatorColor:)]
pub unsafe fn setSeparatorColor(&self, separator_color: Option<&UIColor>);
#[cfg(feature = "UIVisualEffect")]
#[method_id(@__retain_semantics Other separatorEffect)]
pub unsafe fn separatorEffect(&self) -> Option<Retained<UIVisualEffect>>;
#[cfg(feature = "UIVisualEffect")]
#[method(setSeparatorEffect:)]
pub unsafe fn setSeparatorEffect(&self, separator_effect: Option<&UIVisualEffect>);
#[method(cellLayoutMarginsFollowReadableWidth)]
pub unsafe fn cellLayoutMarginsFollowReadableWidth(&self) -> bool;
#[method(setCellLayoutMarginsFollowReadableWidth:)]
pub unsafe fn setCellLayoutMarginsFollowReadableWidth(
&self,
cell_layout_margins_follow_readable_width: bool,
);
#[method(insetsContentViewsToSafeArea)]
pub unsafe fn insetsContentViewsToSafeArea(&self) -> bool;
#[method(setInsetsContentViewsToSafeArea:)]
pub unsafe fn setInsetsContentViewsToSafeArea(
&self,
insets_content_views_to_safe_area: bool,
);
#[method_id(@__retain_semantics Other tableHeaderView)]
pub unsafe fn tableHeaderView(&self) -> Option<Retained<UIView>>;
#[method(setTableHeaderView:)]
pub unsafe fn setTableHeaderView(&self, table_header_view: Option<&UIView>);
#[method_id(@__retain_semantics Other tableFooterView)]
pub unsafe fn tableFooterView(&self) -> Option<Retained<UIView>>;
#[method(setTableFooterView:)]
pub unsafe fn setTableFooterView(&self, table_footer_view: Option<&UIView>);
#[cfg(feature = "UITableViewCell")]
#[method_id(@__retain_semantics Other dequeueReusableCellWithIdentifier:)]
pub unsafe fn dequeueReusableCellWithIdentifier(
&self,
identifier: &NSString,
) -> Option<Retained<UITableViewCell>>;
#[cfg(feature = "UITableViewCell")]
#[method_id(@__retain_semantics Other dequeueReusableCellWithIdentifier:forIndexPath:)]
pub unsafe fn dequeueReusableCellWithIdentifier_forIndexPath(
&self,
identifier: &NSString,
index_path: &NSIndexPath,
) -> Retained<UITableViewCell>;
#[cfg(feature = "UITableViewHeaderFooterView")]
#[method_id(@__retain_semantics Other dequeueReusableHeaderFooterViewWithIdentifier:)]
pub unsafe fn dequeueReusableHeaderFooterViewWithIdentifier(
&self,
identifier: &NSString,
) -> Option<Retained<UITableViewHeaderFooterView>>;
#[cfg(feature = "UINib")]
#[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
#[method(registerNib:forCellReuseIdentifier:)]
pub unsafe fn registerNib_forCellReuseIdentifier(
&self,
nib: Option<&UINib>,
identifier: &NSString,
);
#[method(registerClass:forCellReuseIdentifier:)]
pub unsafe fn registerClass_forCellReuseIdentifier(
&self,
cell_class: Option<&AnyClass>,
identifier: &NSString,
);
#[cfg(feature = "UINib")]
#[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
#[method(registerNib:forHeaderFooterViewReuseIdentifier:)]
pub unsafe fn registerNib_forHeaderFooterViewReuseIdentifier(
&self,
nib: Option<&UINib>,
identifier: &NSString,
);
#[method(registerClass:forHeaderFooterViewReuseIdentifier:)]
pub unsafe fn registerClass_forHeaderFooterViewReuseIdentifier(
&self,
a_class: Option<&AnyClass>,
identifier: &NSString,
);
#[method(remembersLastFocusedIndexPath)]
pub unsafe fn remembersLastFocusedIndexPath(&self) -> bool;
#[method(setRemembersLastFocusedIndexPath:)]
pub unsafe fn setRemembersLastFocusedIndexPath(
&self,
remembers_last_focused_index_path: bool,
);
#[method(selectionFollowsFocus)]
pub unsafe fn selectionFollowsFocus(&self) -> bool;
#[method(setSelectionFollowsFocus:)]
pub unsafe fn setSelectionFollowsFocus(&self, selection_follows_focus: bool);
#[method(allowsFocus)]
pub unsafe fn allowsFocus(&self) -> bool;
#[method(setAllowsFocus:)]
pub unsafe fn setAllowsFocus(&self, allows_focus: bool);
#[method(allowsFocusDuringEditing)]
pub unsafe fn allowsFocusDuringEditing(&self) -> bool;
#[method(setAllowsFocusDuringEditing:)]
pub unsafe fn setAllowsFocusDuringEditing(&self, allows_focus_during_editing: bool);
#[method(dragInteractionEnabled)]
pub unsafe fn dragInteractionEnabled(&self) -> bool;
#[method(setDragInteractionEnabled:)]
pub unsafe fn setDragInteractionEnabled(&self, drag_interaction_enabled: bool);
#[method(hasActiveDrag)]
pub unsafe fn hasActiveDrag(&self) -> bool;
#[method(hasActiveDrop)]
pub unsafe fn hasActiveDrop(&self) -> bool;
}
);
extern_methods!(
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
unsafe impl UITableView {
#[method_id(@__retain_semantics Init initWithFrame:)]
pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
}
);
extern_methods!(
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
unsafe impl UITableView {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
}
);
extern_methods!(
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
unsafe impl UITableView {}
);
#[cfg(all(
feature = "UIResponder",
feature = "UIScrollView",
feature = "UISpringLoadedInteractionSupporting",
feature = "UIView"
))]
unsafe impl UISpringLoadedInteractionSupporting for UITableView {}
extern_protocol!(
pub unsafe trait UITableViewDataSource: NSObjectProtocol + IsMainThreadOnly {
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
#[method(tableView:numberOfRowsInSection:)]
unsafe fn tableView_numberOfRowsInSection(
&self,
table_view: &UITableView,
section: NSInteger,
) -> NSInteger;
#[cfg(all(
feature = "UIResponder",
feature = "UIScrollView",
feature = "UITableViewCell",
feature = "UIView"
))]
#[method_id(@__retain_semantics Other tableView:cellForRowAtIndexPath:)]
unsafe fn tableView_cellForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> Retained<UITableViewCell>;
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
#[optional]
#[method(numberOfSectionsInTableView:)]
unsafe fn numberOfSectionsInTableView(&self, table_view: &UITableView) -> NSInteger;
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
#[optional]
#[method_id(@__retain_semantics Other tableView:titleForHeaderInSection:)]
unsafe fn tableView_titleForHeaderInSection(
&self,
table_view: &UITableView,
section: NSInteger,
) -> Option<Retained<NSString>>;
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
#[optional]
#[method_id(@__retain_semantics Other tableView:titleForFooterInSection:)]
unsafe fn tableView_titleForFooterInSection(
&self,
table_view: &UITableView,
section: NSInteger,
) -> Option<Retained<NSString>>;
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
#[optional]
#[method(tableView:canEditRowAtIndexPath:)]
unsafe fn tableView_canEditRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> bool;
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
#[optional]
#[method(tableView:canMoveRowAtIndexPath:)]
unsafe fn tableView_canMoveRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> bool;
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
#[optional]
#[method_id(@__retain_semantics Other sectionIndexTitlesForTableView:)]
unsafe fn sectionIndexTitlesForTableView(
&self,
table_view: &UITableView,
) -> Option<Retained<NSArray<NSString>>>;
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
#[optional]
#[method(tableView:sectionForSectionIndexTitle:atIndex:)]
unsafe fn tableView_sectionForSectionIndexTitle_atIndex(
&self,
table_view: &UITableView,
title: &NSString,
index: NSInteger,
) -> NSInteger;
#[cfg(all(
feature = "UIResponder",
feature = "UIScrollView",
feature = "UITableViewCell",
feature = "UIView"
))]
#[optional]
#[method(tableView:commitEditingStyle:forRowAtIndexPath:)]
unsafe fn tableView_commitEditingStyle_forRowAtIndexPath(
&self,
table_view: &UITableView,
editing_style: UITableViewCellEditingStyle,
index_path: &NSIndexPath,
);
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
#[optional]
#[method(tableView:moveRowAtIndexPath:toIndexPath:)]
unsafe fn tableView_moveRowAtIndexPath_toIndexPath(
&self,
table_view: &UITableView,
source_index_path: &NSIndexPath,
destination_index_path: &NSIndexPath,
);
}
unsafe impl ProtocolType for dyn UITableViewDataSource {}
);
extern_protocol!(
pub unsafe trait UITableViewDataSourcePrefetching:
NSObjectProtocol + IsMainThreadOnly
{
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
#[method(tableView:prefetchRowsAtIndexPaths:)]
unsafe fn tableView_prefetchRowsAtIndexPaths(
&self,
table_view: &UITableView,
index_paths: &NSArray<NSIndexPath>,
);
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
#[optional]
#[method(tableView:cancelPrefetchingForRowsAtIndexPaths:)]
unsafe fn tableView_cancelPrefetchingForRowsAtIndexPaths(
&self,
table_view: &UITableView,
index_paths: &NSArray<NSIndexPath>,
);
}
unsafe impl ProtocolType for dyn UITableViewDataSourcePrefetching {}
);
extern_protocol!(
pub unsafe trait UITableViewDragDelegate: NSObjectProtocol + IsMainThreadOnly {
#[cfg(all(
feature = "UIDragItem",
feature = "UIDragSession",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[method_id(@__retain_semantics Other tableView:itemsForBeginningDragSession:atIndexPath:)]
unsafe fn tableView_itemsForBeginningDragSession_atIndexPath(
&self,
table_view: &UITableView,
session: &ProtocolObject<dyn UIDragSession>,
index_path: &NSIndexPath,
) -> Retained<NSArray<UIDragItem>>;
#[cfg(all(
feature = "UIDragItem",
feature = "UIDragSession",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[optional]
#[method_id(@__retain_semantics Other tableView:itemsForAddingToDragSession:atIndexPath:point:)]
unsafe fn tableView_itemsForAddingToDragSession_atIndexPath_point(
&self,
table_view: &UITableView,
session: &ProtocolObject<dyn UIDragSession>,
index_path: &NSIndexPath,
point: CGPoint,
) -> Retained<NSArray<UIDragItem>>;
#[cfg(all(
feature = "UIDragPreviewParameters",
feature = "UIPreviewParameters",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[optional]
#[method_id(@__retain_semantics Other tableView:dragPreviewParametersForRowAtIndexPath:)]
unsafe fn tableView_dragPreviewParametersForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> Option<Retained<UIDragPreviewParameters>>;
#[cfg(all(
feature = "UIDragSession",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[optional]
#[method(tableView:dragSessionWillBegin:)]
unsafe fn tableView_dragSessionWillBegin(
&self,
table_view: &UITableView,
session: &ProtocolObject<dyn UIDragSession>,
);
#[cfg(all(
feature = "UIDragSession",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[optional]
#[method(tableView:dragSessionDidEnd:)]
unsafe fn tableView_dragSessionDidEnd(
&self,
table_view: &UITableView,
session: &ProtocolObject<dyn UIDragSession>,
);
#[cfg(all(
feature = "UIDragSession",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[optional]
#[method(tableView:dragSessionAllowsMoveOperation:)]
unsafe fn tableView_dragSessionAllowsMoveOperation(
&self,
table_view: &UITableView,
session: &ProtocolObject<dyn UIDragSession>,
) -> bool;
#[cfg(all(
feature = "UIDragSession",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[optional]
#[method(tableView:dragSessionIsRestrictedToDraggingApplication:)]
unsafe fn tableView_dragSessionIsRestrictedToDraggingApplication(
&self,
table_view: &UITableView,
session: &ProtocolObject<dyn UIDragSession>,
) -> bool;
}
unsafe impl ProtocolType for dyn UITableViewDragDelegate {}
);
extern_protocol!(
pub unsafe trait UITableViewDropDelegate: NSObjectProtocol + IsMainThreadOnly {
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
#[method(tableView:performDropWithCoordinator:)]
unsafe fn tableView_performDropWithCoordinator(
&self,
table_view: &UITableView,
coordinator: &ProtocolObject<dyn UITableViewDropCoordinator>,
);
#[cfg(all(
feature = "UIDragSession",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[optional]
#[method(tableView:canHandleDropSession:)]
unsafe fn tableView_canHandleDropSession(
&self,
table_view: &UITableView,
session: &ProtocolObject<dyn UIDropSession>,
) -> bool;
#[cfg(all(
feature = "UIDragSession",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[optional]
#[method(tableView:dropSessionDidEnter:)]
unsafe fn tableView_dropSessionDidEnter(
&self,
table_view: &UITableView,
session: &ProtocolObject<dyn UIDropSession>,
);
#[cfg(all(
feature = "UIDragSession",
feature = "UIDropInteraction",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[optional]
#[method_id(@__retain_semantics Other tableView:dropSessionDidUpdate:withDestinationIndexPath:)]
unsafe fn tableView_dropSessionDidUpdate_withDestinationIndexPath(
&self,
table_view: &UITableView,
session: &ProtocolObject<dyn UIDropSession>,
destination_index_path: Option<&NSIndexPath>,
) -> Retained<UITableViewDropProposal>;
#[cfg(all(
feature = "UIDragSession",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[optional]
#[method(tableView:dropSessionDidExit:)]
unsafe fn tableView_dropSessionDidExit(
&self,
table_view: &UITableView,
session: &ProtocolObject<dyn UIDropSession>,
);
#[cfg(all(
feature = "UIDragSession",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[optional]
#[method(tableView:dropSessionDidEnd:)]
unsafe fn tableView_dropSessionDidEnd(
&self,
table_view: &UITableView,
session: &ProtocolObject<dyn UIDropSession>,
);
#[cfg(all(
feature = "UIDragPreviewParameters",
feature = "UIPreviewParameters",
feature = "UIResponder",
feature = "UIScrollView",
feature = "UIView"
))]
#[optional]
#[method_id(@__retain_semantics Other tableView:dropPreviewParametersForRowAtIndexPath:)]
unsafe fn tableView_dropPreviewParametersForRowAtIndexPath(
&self,
table_view: &UITableView,
index_path: &NSIndexPath,
) -> Option<Retained<UIDragPreviewParameters>>;
}
unsafe impl ProtocolType for dyn UITableViewDropDelegate {}
);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITableViewDropIntent(pub NSInteger);
impl UITableViewDropIntent {
#[doc(alias = "UITableViewDropIntentUnspecified")]
pub const Unspecified: Self = Self(0);
#[doc(alias = "UITableViewDropIntentInsertAtDestinationIndexPath")]
pub const InsertAtDestinationIndexPath: Self = Self(1);
#[doc(alias = "UITableViewDropIntentInsertIntoDestinationIndexPath")]
pub const InsertIntoDestinationIndexPath: Self = Self(2);
#[doc(alias = "UITableViewDropIntentAutomatic")]
pub const Automatic: Self = Self(3);
}
unsafe impl Encode for UITableViewDropIntent {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UITableViewDropIntent {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "UIDropInteraction")]
pub struct UITableViewDropProposal;
#[cfg(feature = "UIDropInteraction")]
unsafe impl ClassType for UITableViewDropProposal {
#[inherits(NSObject)]
type Super = UIDropProposal;
type Mutability = MainThreadOnly;
}
);
#[cfg(feature = "UIDropInteraction")]
unsafe impl NSCopying for UITableViewDropProposal {}
#[cfg(feature = "UIDropInteraction")]
unsafe impl NSObjectProtocol for UITableViewDropProposal {}
extern_methods!(
#[cfg(feature = "UIDropInteraction")]
unsafe impl UITableViewDropProposal {
#[method_id(@__retain_semantics Init initWithDropOperation:intent:)]
pub unsafe fn initWithDropOperation_intent(
this: Allocated<Self>,
operation: UIDropOperation,
intent: UITableViewDropIntent,
) -> Retained<Self>;
#[method(intent)]
pub unsafe fn intent(&self) -> UITableViewDropIntent;
}
);
extern_methods!(
#[cfg(feature = "UIDropInteraction")]
unsafe impl UITableViewDropProposal {
#[method_id(@__retain_semantics Init initWithDropOperation:)]
pub unsafe fn initWithDropOperation(
this: Allocated<Self>,
operation: UIDropOperation,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
}
);
extern_protocol!(
pub unsafe trait UITableViewDropCoordinator:
NSObjectProtocol + IsMainThreadOnly
{
#[method_id(@__retain_semantics Other items)]
unsafe fn items(&self) -> Retained<NSArray<ProtocolObject<dyn UITableViewDropItem>>>;
#[method_id(@__retain_semantics Other destinationIndexPath)]
unsafe fn destinationIndexPath(&self) -> Option<Retained<NSIndexPath>>;
#[cfg(feature = "UIDropInteraction")]
#[method_id(@__retain_semantics Other proposal)]
unsafe fn proposal(&self) -> Retained<UITableViewDropProposal>;
#[cfg(feature = "UIDragSession")]
#[method_id(@__retain_semantics Other session)]
unsafe fn session(&self) -> Retained<ProtocolObject<dyn UIDropSession>>;
#[cfg(all(feature = "UIDragInteraction", feature = "UIDragItem"))]
#[method_id(@__retain_semantics Other dropItem:toPlaceholder:)]
unsafe fn dropItem_toPlaceholder(
&self,
drag_item: &UIDragItem,
placeholder: &UITableViewDropPlaceholder,
) -> Retained<ProtocolObject<dyn UITableViewDropPlaceholderContext>>;
#[cfg(all(feature = "UIDragInteraction", feature = "UIDragItem"))]
#[method_id(@__retain_semantics Other dropItem:toRowAtIndexPath:)]
unsafe fn dropItem_toRowAtIndexPath(
&self,
drag_item: &UIDragItem,
index_path: &NSIndexPath,
) -> Retained<ProtocolObject<dyn UIDragAnimating>>;
#[cfg(all(feature = "UIDragInteraction", feature = "UIDragItem"))]
#[method_id(@__retain_semantics Other dropItem:intoRowAtIndexPath:rect:)]
unsafe fn dropItem_intoRowAtIndexPath_rect(
&self,
drag_item: &UIDragItem,
index_path: &NSIndexPath,
rect: CGRect,
) -> Retained<ProtocolObject<dyn UIDragAnimating>>;
#[cfg(all(
feature = "UIDragInteraction",
feature = "UIDragItem",
feature = "UITargetedDragPreview",
feature = "UITargetedPreview"
))]
#[method_id(@__retain_semantics Other dropItem:toTarget:)]
unsafe fn dropItem_toTarget(
&self,
drag_item: &UIDragItem,
target: &UIDragPreviewTarget,
) -> Retained<ProtocolObject<dyn UIDragAnimating>>;
}
unsafe impl ProtocolType for dyn UITableViewDropCoordinator {}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UITableViewPlaceholder;
unsafe impl ClassType for UITableViewPlaceholder {
type Super = NSObject;
type Mutability = MainThreadOnly;
}
);
unsafe impl NSObjectProtocol for UITableViewPlaceholder {}
extern_methods!(
unsafe impl UITableViewPlaceholder {
#[method_id(@__retain_semantics Init initWithInsertionIndexPath:reuseIdentifier:rowHeight:)]
pub unsafe fn initWithInsertionIndexPath_reuseIdentifier_rowHeight(
this: Allocated<Self>,
insertion_index_path: &NSIndexPath,
reuse_identifier: &NSString,
row_height: CGFloat,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
#[cfg(all(
feature = "UIResponder",
feature = "UITableViewCell",
feature = "UIView",
feature = "block2"
))]
#[method(cellUpdateHandler)]
pub unsafe fn cellUpdateHandler(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<UITableViewCell>)>;
#[cfg(all(
feature = "UIResponder",
feature = "UITableViewCell",
feature = "UIView",
feature = "block2"
))]
#[method(setCellUpdateHandler:)]
pub unsafe fn setCellUpdateHandler(
&self,
cell_update_handler: Option<&block2::Block<dyn Fn(NonNull<UITableViewCell>)>>,
);
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UITableViewDropPlaceholder;
unsafe impl ClassType for UITableViewDropPlaceholder {
#[inherits(NSObject)]
type Super = UITableViewPlaceholder;
type Mutability = MainThreadOnly;
}
);
unsafe impl NSObjectProtocol for UITableViewDropPlaceholder {}
extern_methods!(
unsafe impl UITableViewDropPlaceholder {
#[cfg(all(
feature = "UIDragPreviewParameters",
feature = "UIPreviewParameters",
feature = "UIResponder",
feature = "UITableViewCell",
feature = "UIView",
feature = "block2"
))]
#[method(previewParametersProvider)]
pub unsafe fn previewParametersProvider(
&self,
) -> *mut block2::Block<dyn Fn(NonNull<UITableViewCell>) -> *mut UIDragPreviewParameters>;
#[cfg(all(
feature = "UIDragPreviewParameters",
feature = "UIPreviewParameters",
feature = "UIResponder",
feature = "UITableViewCell",
feature = "UIView",
feature = "block2"
))]
#[method(setPreviewParametersProvider:)]
pub unsafe fn setPreviewParametersProvider(
&self,
preview_parameters_provider: Option<
&block2::Block<dyn Fn(NonNull<UITableViewCell>) -> *mut UIDragPreviewParameters>,
>,
);
}
);
extern_methods!(
unsafe impl UITableViewDropPlaceholder {
#[method_id(@__retain_semantics Init initWithInsertionIndexPath:reuseIdentifier:rowHeight:)]
pub unsafe fn initWithInsertionIndexPath_reuseIdentifier_rowHeight(
this: Allocated<Self>,
insertion_index_path: &NSIndexPath,
reuse_identifier: &NSString,
row_height: CGFloat,
) -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
}
);
extern_protocol!(
pub unsafe trait UITableViewDropItem: NSObjectProtocol + IsMainThreadOnly {
#[cfg(feature = "UIDragItem")]
#[method_id(@__retain_semantics Other dragItem)]
unsafe fn dragItem(&self) -> Retained<UIDragItem>;
#[method_id(@__retain_semantics Other sourceIndexPath)]
unsafe fn sourceIndexPath(&self) -> Option<Retained<NSIndexPath>>;
#[method(previewSize)]
unsafe fn previewSize(&self) -> CGSize;
}
unsafe impl ProtocolType for dyn UITableViewDropItem {}
);
extern_protocol!(
#[cfg(feature = "UIDragInteraction")]
pub unsafe trait UITableViewDropPlaceholderContext:
UIDragAnimating + IsMainThreadOnly
{
#[cfg(feature = "UIDragItem")]
#[method_id(@__retain_semantics Other dragItem)]
unsafe fn dragItem(&self) -> Retained<UIDragItem>;
#[cfg(feature = "block2")]
#[method(commitInsertionWithDataSourceUpdates:)]
unsafe fn commitInsertionWithDataSourceUpdates(
&self,
data_source_updates: &block2::Block<dyn Fn(NonNull<NSIndexPath>) + '_>,
) -> bool;
#[method(deletePlaceholder)]
unsafe fn deletePlaceholder(&self) -> bool;
}
#[cfg(feature = "UIDragInteraction")]
unsafe impl ProtocolType for dyn UITableViewDropPlaceholderContext {}
);