objc2_car_play/generated/
CPMessageComposeBarButton.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-ui-kit")]
8use objc2_ui_kit::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(CPBarButton, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(feature = "CPBarButton")]
17 pub struct CPMessageComposeBarButton;
18);
19
20#[cfg(feature = "CPBarButton")]
21extern_conformance!(
22 unsafe impl NSCoding for CPMessageComposeBarButton {}
23);
24
25#[cfg(feature = "CPBarButton")]
26extern_conformance!(
27 unsafe impl NSObjectProtocol for CPMessageComposeBarButton {}
28);
29
30#[cfg(feature = "CPBarButton")]
31extern_conformance!(
32 unsafe impl NSSecureCoding for CPMessageComposeBarButton {}
33);
34
35#[cfg(feature = "CPBarButton")]
36impl CPMessageComposeBarButton {
37 extern_methods!(
38 #[unsafe(method(init))]
43 #[unsafe(method_family = init)]
44 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
45
46 #[unsafe(method(new))]
47 #[unsafe(method_family = new)]
48 pub unsafe fn new() -> Retained<Self>;
49
50 #[cfg(feature = "objc2-ui-kit")]
51 #[unsafe(method(initWithImage:))]
57 #[unsafe(method_family = init)]
58 pub unsafe fn initWithImage(this: Allocated<Self>, image: &UIImage) -> Retained<Self>;
59
60 #[unsafe(method(title))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn title(&self) -> Option<Retained<NSString>>;
63
64 #[unsafe(method(setTitle:))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn setTitle(&self, title: Option<&NSString>);
70
71 #[cfg(all(feature = "block2", feature = "objc2-ui-kit"))]
72 #[unsafe(method(initWithImage:handler:))]
76 #[unsafe(method_family = init)]
77 pub unsafe fn initWithImage_handler(
78 this: Allocated<Self>,
79 image: &UIImage,
80 handler: CPBarButtonHandler,
81 ) -> Retained<Self>;
82
83 #[cfg(feature = "block2")]
84 #[unsafe(method(initWithTitle:handler:))]
88 #[unsafe(method_family = init)]
89 pub unsafe fn initWithTitle_handler(
90 this: Allocated<Self>,
91 title: &NSString,
92 handler: CPBarButtonHandler,
93 ) -> Retained<Self>;
94 );
95}
96
97#[cfg(feature = "CPBarButton")]
99impl CPMessageComposeBarButton {
100 extern_methods!(
101 #[cfg(feature = "block2")]
102 #[deprecated]
106 #[unsafe(method(initWithType:handler:))]
107 #[unsafe(method_family = init)]
108 pub unsafe fn initWithType_handler(
109 this: Allocated<Self>,
110 r#type: CPBarButtonType,
111 handler: CPBarButtonHandler,
112 ) -> Retained<Self>;
113 );
114}