use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-ui-kit")]
use objc2_ui_kit::*;
use crate::*;
extern_class!(
#[unsafe(super(CPBarButton, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CPBarButton")]
pub struct CPMessageComposeBarButton;
);
#[cfg(feature = "CPBarButton")]
extern_conformance!(
unsafe impl NSCoding for CPMessageComposeBarButton {}
);
#[cfg(feature = "CPBarButton")]
extern_conformance!(
unsafe impl NSObjectProtocol for CPMessageComposeBarButton {}
);
#[cfg(feature = "CPBarButton")]
extern_conformance!(
unsafe impl NSSecureCoding for CPMessageComposeBarButton {}
);
#[cfg(feature = "CPBarButton")]
impl CPMessageComposeBarButton {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[cfg(feature = "objc2-ui-kit")]
#[unsafe(method(initWithImage:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithImage(this: Allocated<Self>, image: &UIImage) -> Retained<Self>;
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub unsafe fn title(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setTitle:))]
#[unsafe(method_family = none)]
pub unsafe fn setTitle(&self, title: Option<&NSString>);
#[cfg(all(feature = "block2", feature = "objc2-ui-kit"))]
#[unsafe(method(initWithImage:handler:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithImage_handler(
this: Allocated<Self>,
image: &UIImage,
handler: CPBarButtonHandler,
) -> Retained<Self>;
#[cfg(feature = "block2")]
#[unsafe(method(initWithTitle:handler:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithTitle_handler(
this: Allocated<Self>,
title: &NSString,
handler: CPBarButtonHandler,
) -> Retained<Self>;
);
}
#[cfg(feature = "CPBarButton")]
impl CPMessageComposeBarButton {
extern_methods!(
#[cfg(feature = "block2")]
#[deprecated]
#[unsafe(method(initWithType:handler:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithType_handler(
this: Allocated<Self>,
r#type: CPBarButtonType,
handler: CPBarButtonHandler,
) -> Retained<Self>;
);
}