objc2_ui_kit/generated/
UIContentUnavailableButtonProperties.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 UIContentUnavailableButtonProperties;
16);
17
18unsafe impl NSCoding for UIContentUnavailableButtonProperties {}
19
20unsafe impl NSCopying for UIContentUnavailableButtonProperties {}
21
22unsafe impl CopyingHelper for UIContentUnavailableButtonProperties {
23 type Result = Self;
24}
25
26unsafe impl NSObjectProtocol for UIContentUnavailableButtonProperties {}
27
28unsafe impl NSSecureCoding for UIContentUnavailableButtonProperties {}
29
30impl UIContentUnavailableButtonProperties {
31 extern_methods!(
32 #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
33 #[unsafe(method(primaryAction))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn primaryAction(&self) -> Option<Retained<UIAction>>;
37
38 #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
39 #[unsafe(method(setPrimaryAction:))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn setPrimaryAction(&self, primary_action: Option<&UIAction>);
43
44 #[cfg(all(feature = "UIMenu", feature = "UIMenuElement"))]
45 #[unsafe(method(menu))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn menu(&self) -> Option<Retained<UIMenu>>;
49
50 #[cfg(all(feature = "UIMenu", feature = "UIMenuElement"))]
51 #[unsafe(method(setMenu:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn setMenu(&self, menu: Option<&UIMenu>);
55
56 #[unsafe(method(isEnabled))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn isEnabled(&self) -> bool;
60
61 #[unsafe(method(setEnabled:))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn setEnabled(&self, enabled: bool);
65
66 #[cfg(feature = "UIButton")]
67 #[unsafe(method(role))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn role(&self) -> UIButtonRole;
71
72 #[cfg(feature = "UIButton")]
73 #[unsafe(method(setRole:))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn setRole(&self, role: UIButtonRole);
77 );
78}
79
80impl UIContentUnavailableButtonProperties {
82 extern_methods!(
83 #[unsafe(method(init))]
84 #[unsafe(method_family = init)]
85 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
86
87 #[unsafe(method(new))]
88 #[unsafe(method_family = new)]
89 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
90 );
91}