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
18unsafe impl NSObjectProtocol for UISwipeActionsConfiguration {}
19
20impl UISwipeActionsConfiguration {
21    extern_methods!(
22        #[cfg(feature = "UIContextualAction")]
23        #[unsafe(method(configurationWithActions:))]
24        #[unsafe(method_family = none)]
25        pub unsafe fn configurationWithActions(
26            actions: &NSArray<UIContextualAction>,
27            mtm: MainThreadMarker,
28        ) -> Retained<Self>;
29
30        #[cfg(feature = "UIContextualAction")]
31        #[unsafe(method(actions))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn actions(&self) -> Retained<NSArray<UIContextualAction>>;
34
35        #[unsafe(method(performsFirstActionWithFullSwipe))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn performsFirstActionWithFullSwipe(&self) -> bool;
38
39        /// Setter for [`performsFirstActionWithFullSwipe`][Self::performsFirstActionWithFullSwipe].
40        #[unsafe(method(setPerformsFirstActionWithFullSwipe:))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn setPerformsFirstActionWithFullSwipe(
43            &self,
44            performs_first_action_with_full_swipe: bool,
45        );
46    );
47}
48
49/// Methods declared on superclass `NSObject`.
50impl UISwipeActionsConfiguration {
51    extern_methods!(
52        #[unsafe(method(init))]
53        #[unsafe(method_family = init)]
54        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
55
56        #[unsafe(method(new))]
57        #[unsafe(method_family = new)]
58        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
59    );
60}