objc2_ui_kit/generated/
UIToolbarAppearance.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(UIBarAppearance, NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(feature = "UIBarAppearance")]
16 pub struct UIToolbarAppearance;
17);
18
19#[cfg(feature = "UIBarAppearance")]
20extern_conformance!(
21 unsafe impl NSCoding for UIToolbarAppearance {}
22);
23
24#[cfg(feature = "UIBarAppearance")]
25extern_conformance!(
26 unsafe impl NSCopying for UIToolbarAppearance {}
27);
28
29#[cfg(feature = "UIBarAppearance")]
30unsafe impl CopyingHelper for UIToolbarAppearance {
31 type Result = Self;
32}
33
34#[cfg(feature = "UIBarAppearance")]
35extern_conformance!(
36 unsafe impl NSObjectProtocol for UIToolbarAppearance {}
37);
38
39#[cfg(feature = "UIBarAppearance")]
40extern_conformance!(
41 unsafe impl NSSecureCoding for UIToolbarAppearance {}
42);
43
44#[cfg(feature = "UIBarAppearance")]
45impl UIToolbarAppearance {
46 extern_methods!(
47 #[cfg(feature = "UIBarButtonItemAppearance")]
48 #[unsafe(method(buttonAppearance))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn buttonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
52
53 #[cfg(feature = "UIBarButtonItemAppearance")]
54 #[unsafe(method(setButtonAppearance:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn setButtonAppearance(&self, button_appearance: &UIBarButtonItemAppearance);
58
59 #[cfg(feature = "UIBarButtonItemAppearance")]
60 #[unsafe(method(doneButtonAppearance))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn doneButtonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
64
65 #[cfg(feature = "UIBarButtonItemAppearance")]
66 #[unsafe(method(setDoneButtonAppearance:))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn setDoneButtonAppearance(
70 &self,
71 done_button_appearance: &UIBarButtonItemAppearance,
72 );
73 );
74}
75
76#[cfg(feature = "UIBarAppearance")]
78impl UIToolbarAppearance {
79 extern_methods!(
80 #[unsafe(method(init))]
82 #[unsafe(method_family = init)]
83 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
84
85 #[cfg(feature = "UIDevice")]
86 #[unsafe(method(initWithIdiom:))]
88 #[unsafe(method_family = init)]
89 pub unsafe fn initWithIdiom(
90 this: Allocated<Self>,
91 idiom: UIUserInterfaceIdiom,
92 ) -> Retained<Self>;
93
94 #[unsafe(method(initWithBarAppearance:))]
96 #[unsafe(method_family = init)]
97 pub unsafe fn initWithBarAppearance(
98 this: Allocated<Self>,
99 bar_appearance: &UIBarAppearance,
100 ) -> Retained<Self>;
101
102 #[unsafe(method(initWithCoder:))]
103 #[unsafe(method_family = init)]
104 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
105 );
106}
107
108#[cfg(feature = "UIBarAppearance")]
110impl UIToolbarAppearance {
111 extern_methods!(
112 #[unsafe(method(new))]
113 #[unsafe(method_family = new)]
114 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
115 );
116}