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_protocol!(
pub unsafe trait WKImageAnimatable: NSObjectProtocol {
#[unsafe(method(startAnimating))]
#[unsafe(method_family = none)]
unsafe fn startAnimating(&self);
#[unsafe(method(startAnimatingWithImagesInRange:duration:repeatCount:))]
#[unsafe(method_family = none)]
unsafe fn startAnimatingWithImagesInRange_duration_repeatCount(
&self,
image_range: NSRange,
duration: NSTimeInterval,
repeat_count: NSInteger,
);
#[unsafe(method(stopAnimating))]
#[unsafe(method_family = none)]
unsafe fn stopAnimating(&self);
}
);
extern_class!(
#[unsafe(super(WKInterfaceObject, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "WKInterfaceObject")]
pub struct WKInterfaceImage;
);
#[cfg(feature = "WKInterfaceObject")]
extern_conformance!(
unsafe impl NSObjectProtocol for WKInterfaceImage {}
);
#[cfg(feature = "WKInterfaceObject")]
extern_conformance!(
unsafe impl WKImageAnimatable for WKInterfaceImage {}
);
#[cfg(feature = "WKInterfaceObject")]
impl WKInterfaceImage {
extern_methods!(
#[cfg(feature = "objc2-ui-kit")]
#[unsafe(method(setImage:))]
#[unsafe(method_family = none)]
pub unsafe fn setImage(&self, image: Option<&UIImage>);
#[unsafe(method(setImageData:))]
#[unsafe(method_family = none)]
pub unsafe fn setImageData(&self, image_data: Option<&NSData>);
#[unsafe(method(setImageNamed:))]
#[unsafe(method_family = none)]
pub unsafe fn setImageNamed(&self, image_name: Option<&NSString>);
#[cfg(feature = "objc2-ui-kit")]
#[unsafe(method(setTintColor:))]
#[unsafe(method_family = none)]
pub unsafe fn setTintColor(&self, tint_color: Option<&UIColor>);
);
}
#[cfg(feature = "WKInterfaceObject")]
impl WKInterfaceImage {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "WKInterfaceObject")]
impl WKInterfaceImage {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}