use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UITextFormattingViewControllerFormattingStyle;
);
extern_conformance!(
unsafe impl NSCoding for UITextFormattingViewControllerFormattingStyle {}
);
extern_conformance!(
unsafe impl NSCopying for UITextFormattingViewControllerFormattingStyle {}
);
unsafe impl CopyingHelper for UITextFormattingViewControllerFormattingStyle {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UITextFormattingViewControllerFormattingStyle {}
);
extern_conformance!(
unsafe impl NSSecureCoding for UITextFormattingViewControllerFormattingStyle {}
);
impl UITextFormattingViewControllerFormattingStyle {
extern_methods!(
#[unsafe(method(styleKey))]
#[unsafe(method_family = none)]
pub fn styleKey(&self) -> Retained<NSString>;
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub fn title(&self) -> Retained<NSString>;
#[unsafe(method(attributes))]
#[unsafe(method_family = none)]
pub fn attributes(&self) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
#[unsafe(method(initWithStyleKey:title:attributes:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithStyleKey_title_attributes(
this: Allocated<Self>,
style_key: &NSString,
string: &NSString,
attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
) -> Retained<Self>;
);
}
impl UITextFormattingViewControllerFormattingStyle {
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() -> Retained<Self>;
);
}
impl DefaultRetained for UITextFormattingViewControllerFormattingStyle {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}