objc2_ui_kit/generated/
UISwipeActionsConfiguration.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiswipeactionsconfiguration?language=objc)
12    #[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        /// Setter for [`performsFirstActionWithFullSwipe`][Self::performsFirstActionWithFullSwipe].
42        #[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
51/// Methods declared on superclass `NSObject`.
52impl 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}