use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(WKInterfaceObject, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "WKInterfaceObject")]
pub struct WKInterfacePicker;
);
#[cfg(feature = "WKInterfaceObject")]
extern_conformance!(
unsafe impl NSObjectProtocol for WKInterfacePicker {}
);
#[cfg(feature = "WKInterfaceObject")]
impl WKInterfacePicker {
extern_methods!(
#[unsafe(method(focus))]
#[unsafe(method_family = none)]
pub unsafe fn focus(&self);
#[unsafe(method(resignFocus))]
#[unsafe(method_family = none)]
pub unsafe fn resignFocus(&self);
#[unsafe(method(setSelectedItemIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn setSelectedItemIndex(&self, item_index: NSInteger);
#[unsafe(method(setItems:))]
#[unsafe(method_family = none)]
pub unsafe fn setItems(&self, items: Option<&NSArray<WKPickerItem>>);
#[cfg(feature = "WKInterfaceImage")]
#[unsafe(method(setCoordinatedAnimations:))]
#[unsafe(method_family = none)]
pub unsafe fn setCoordinatedAnimations(
&self,
coordinated_animations: Option<&NSArray<WKInterfaceObject>>,
);
#[unsafe(method(setEnabled:))]
#[unsafe(method_family = none)]
pub unsafe fn setEnabled(&self, enabled: bool);
);
}
#[cfg(feature = "WKInterfaceObject")]
impl WKInterfacePicker {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "WKInterfaceObject")]
impl WKInterfacePicker {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct WKPickerItem;
);
extern_conformance!(
unsafe impl NSCoding for WKPickerItem {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for WKPickerItem {}
);
extern_conformance!(
unsafe impl NSSecureCoding for WKPickerItem {}
);
impl WKPickerItem {
extern_methods!(
#[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>);
#[unsafe(method(caption))]
#[unsafe(method_family = none)]
pub unsafe fn caption(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setCaption:))]
#[unsafe(method_family = none)]
pub unsafe fn setCaption(&self, caption: Option<&NSString>);
#[cfg(feature = "WKImage")]
#[unsafe(method(accessoryImage))]
#[unsafe(method_family = none)]
pub unsafe fn accessoryImage(&self) -> Option<Retained<WKImage>>;
#[cfg(feature = "WKImage")]
#[unsafe(method(setAccessoryImage:))]
#[unsafe(method_family = none)]
pub unsafe fn setAccessoryImage(&self, accessory_image: Option<&WKImage>);
#[cfg(feature = "WKImage")]
#[unsafe(method(contentImage))]
#[unsafe(method_family = none)]
pub unsafe fn contentImage(&self) -> Option<Retained<WKImage>>;
#[cfg(feature = "WKImage")]
#[unsafe(method(setContentImage:))]
#[unsafe(method_family = none)]
pub unsafe fn setContentImage(&self, content_image: Option<&WKImage>);
);
}
impl WKPickerItem {
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>;
);
}