use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIListContentTextAlignment(pub NSInteger);
impl UIListContentTextAlignment {
#[doc(alias = "UIListContentTextAlignmentNatural")]
pub const Natural: Self = Self(0);
#[doc(alias = "UIListContentTextAlignmentCenter")]
pub const Center: Self = Self(1);
#[doc(alias = "UIListContentTextAlignmentJustified")]
pub const Justified: Self = Self(2);
}
unsafe impl Encode for UIListContentTextAlignment {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UIListContentTextAlignment {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIListContentTextTransform(pub NSInteger);
impl UIListContentTextTransform {
#[doc(alias = "UIListContentTextTransformNone")]
pub const None: Self = Self(0);
#[doc(alias = "UIListContentTextTransformUppercase")]
pub const Uppercase: Self = Self(1);
#[doc(alias = "UIListContentTextTransformLowercase")]
pub const Lowercase: Self = Self(2);
#[doc(alias = "UIListContentTextTransformCapitalized")]
pub const Capitalized: Self = Self(3);
}
unsafe impl Encode for UIListContentTextTransform {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UIListContentTextTransform {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIListContentTextProperties;
);
extern_conformance!(
unsafe impl NSCoding for UIListContentTextProperties {}
);
extern_conformance!(
unsafe impl NSCopying for UIListContentTextProperties {}
);
unsafe impl CopyingHelper for UIListContentTextProperties {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UIListContentTextProperties {}
);
extern_conformance!(
unsafe impl NSSecureCoding for UIListContentTextProperties {}
);
impl UIListContentTextProperties {
extern_methods!(
#[cfg(feature = "UIFont")]
#[unsafe(method(font))]
#[unsafe(method_family = none)]
pub fn font(&self) -> Retained<UIFont>;
#[cfg(feature = "UIFont")]
#[unsafe(method(setFont:))]
#[unsafe(method_family = none)]
pub fn setFont(&self, font: &UIFont);
#[cfg(feature = "UIColor")]
#[unsafe(method(color))]
#[unsafe(method_family = none)]
pub fn color(&self) -> Retained<UIColor>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setColor:))]
#[unsafe(method_family = none)]
pub fn setColor(&self, color: &UIColor);
#[cfg(all(
feature = "UIColor",
feature = "UIConfigurationColorTransformer",
feature = "block2"
))]
#[unsafe(method(colorTransformer))]
#[unsafe(method_family = none)]
pub unsafe fn colorTransformer(&self) -> UIConfigurationColorTransformer;
#[cfg(all(
feature = "UIColor",
feature = "UIConfigurationColorTransformer",
feature = "block2"
))]
#[unsafe(method(setColorTransformer:))]
#[unsafe(method_family = none)]
pub unsafe fn setColorTransformer(
&self,
color_transformer: UIConfigurationColorTransformer,
);
#[cfg(feature = "UIColor")]
#[unsafe(method(resolvedColor))]
#[unsafe(method_family = none)]
pub fn resolvedColor(&self) -> Retained<UIColor>;
#[unsafe(method(alignment))]
#[unsafe(method_family = none)]
pub fn alignment(&self) -> UIListContentTextAlignment;
#[unsafe(method(setAlignment:))]
#[unsafe(method_family = none)]
pub fn setAlignment(&self, alignment: UIListContentTextAlignment);
#[cfg(feature = "NSParagraphStyle")]
#[unsafe(method(lineBreakMode))]
#[unsafe(method_family = none)]
pub fn lineBreakMode(&self) -> NSLineBreakMode;
#[cfg(feature = "NSParagraphStyle")]
#[unsafe(method(setLineBreakMode:))]
#[unsafe(method_family = none)]
pub fn setLineBreakMode(&self, line_break_mode: NSLineBreakMode);
#[unsafe(method(numberOfLines))]
#[unsafe(method_family = none)]
pub fn numberOfLines(&self) -> NSInteger;
#[unsafe(method(setNumberOfLines:))]
#[unsafe(method_family = none)]
pub fn setNumberOfLines(&self, number_of_lines: NSInteger);
#[unsafe(method(adjustsFontSizeToFitWidth))]
#[unsafe(method_family = none)]
pub fn adjustsFontSizeToFitWidth(&self) -> bool;
#[unsafe(method(setAdjustsFontSizeToFitWidth:))]
#[unsafe(method_family = none)]
pub fn setAdjustsFontSizeToFitWidth(&self, adjusts_font_size_to_fit_width: bool);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(minimumScaleFactor))]
#[unsafe(method_family = none)]
pub fn minimumScaleFactor(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setMinimumScaleFactor:))]
#[unsafe(method_family = none)]
pub fn setMinimumScaleFactor(&self, minimum_scale_factor: CGFloat);
#[unsafe(method(allowsDefaultTighteningForTruncation))]
#[unsafe(method_family = none)]
pub fn allowsDefaultTighteningForTruncation(&self) -> bool;
#[unsafe(method(setAllowsDefaultTighteningForTruncation:))]
#[unsafe(method_family = none)]
pub fn setAllowsDefaultTighteningForTruncation(
&self,
allows_default_tightening_for_truncation: bool,
);
#[unsafe(method(adjustsFontForContentSizeCategory))]
#[unsafe(method_family = none)]
pub fn adjustsFontForContentSizeCategory(&self) -> bool;
#[unsafe(method(setAdjustsFontForContentSizeCategory:))]
#[unsafe(method_family = none)]
pub fn setAdjustsFontForContentSizeCategory(
&self,
adjusts_font_for_content_size_category: bool,
);
#[unsafe(method(showsExpansionTextWhenTruncated))]
#[unsafe(method_family = none)]
pub fn showsExpansionTextWhenTruncated(&self) -> bool;
#[unsafe(method(setShowsExpansionTextWhenTruncated:))]
#[unsafe(method_family = none)]
pub fn setShowsExpansionTextWhenTruncated(&self, shows_expansion_text_when_truncated: bool);
#[unsafe(method(transform))]
#[unsafe(method_family = none)]
pub fn transform(&self) -> UIListContentTextTransform;
#[unsafe(method(setTransform:))]
#[unsafe(method_family = none)]
pub fn setTransform(&self, transform: UIListContentTextTransform);
);
}
impl UIListContentTextProperties {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}