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::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CPListImageRowItemCondensedElementShape(pub NSInteger);
impl CPListImageRowItemCondensedElementShape {
#[doc(alias = "CPListImageRowItemCondensedElementShapeCircular")]
pub const Circular: Self = Self(0);
#[doc(alias = "CPListImageRowItemCondensedElementShapeRoundedRectangle")]
pub const RoundedRectangle: Self = Self(1);
}
unsafe impl Encode for CPListImageRowItemCondensedElementShape {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CPListImageRowItemCondensedElementShape {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(CPListImageRowItemElement, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CPListImageRowItemElement")]
pub struct CPListImageRowItemCondensedElement;
);
#[cfg(feature = "CPListImageRowItemElement")]
extern_conformance!(
unsafe impl NSObjectProtocol for CPListImageRowItemCondensedElement {}
);
#[cfg(feature = "CPListImageRowItemElement")]
impl CPListImageRowItemCondensedElement {
extern_methods!(
#[cfg(feature = "objc2-ui-kit")]
#[unsafe(method(initWithImage:imageShape:title:subtitle:accessorySymbolName:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithImage_imageShape_title_subtitle_accessorySymbolName(
this: Allocated<Self>,
image: &UIImage,
image_shape: CPListImageRowItemCondensedElementShape,
title: &NSString,
subtitle: Option<&NSString>,
accessory_symbol_name: Option<&NSString>,
) -> Retained<Self>;
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub unsafe fn title(&self) -> Retained<NSString>;
#[unsafe(method(setTitle:))]
#[unsafe(method_family = none)]
pub unsafe fn setTitle(&self, title: &NSString);
#[unsafe(method(subtitle))]
#[unsafe(method_family = none)]
pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setSubtitle:))]
#[unsafe(method_family = none)]
pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>);
#[unsafe(method(accessorySymbolName))]
#[unsafe(method_family = none)]
pub unsafe fn accessorySymbolName(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setAccessorySymbolName:))]
#[unsafe(method_family = none)]
pub unsafe fn setAccessorySymbolName(&self, accessory_symbol_name: Option<&NSString>);
#[unsafe(method(imageShape))]
#[unsafe(method_family = none)]
pub unsafe fn imageShape(&self) -> CPListImageRowItemCondensedElementShape;
);
}
#[cfg(feature = "CPListImageRowItemElement")]
impl CPListImageRowItemCondensedElement {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "CPListImageRowItemElement")]
impl CPListImageRowItemCondensedElement {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}