objc2_ui_kit/generated/
UISwipeActionsConfiguration.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 pub struct UISwipeActionsConfiguration;
16);
17
18extern_conformance!(
19 unsafe impl NSObjectProtocol for UISwipeActionsConfiguration {}
20);
21
22impl UISwipeActionsConfiguration {
23 extern_methods!(
24 #[cfg(feature = "UIContextualAction")]
25 #[unsafe(method(configurationWithActions:))]
26 #[unsafe(method_family = none)]
27 pub unsafe fn configurationWithActions(
28 actions: &NSArray<UIContextualAction>,
29 mtm: MainThreadMarker,
30 ) -> Retained<Self>;
31
32 #[cfg(feature = "UIContextualAction")]
33 #[unsafe(method(actions))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn actions(&self) -> Retained<NSArray<UIContextualAction>>;
36
37 #[unsafe(method(performsFirstActionWithFullSwipe))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn performsFirstActionWithFullSwipe(&self) -> bool;
40
41 #[unsafe(method(setPerformsFirstActionWithFullSwipe:))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn setPerformsFirstActionWithFullSwipe(
45 &self,
46 performs_first_action_with_full_swipe: bool,
47 );
48 );
49}
50
51impl UISwipeActionsConfiguration {
53 extern_methods!(
54 #[unsafe(method(init))]
55 #[unsafe(method_family = init)]
56 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
57
58 #[unsafe(method(new))]
59 #[unsafe(method_family = new)]
60 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
61 );
62}