use core::ffi::*;
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 UITextFormattingViewControllerConfiguration;
);
extern_conformance!(
unsafe impl NSCoding for UITextFormattingViewControllerConfiguration {}
);
extern_conformance!(
unsafe impl NSCopying for UITextFormattingViewControllerConfiguration {}
);
unsafe impl CopyingHelper for UITextFormattingViewControllerConfiguration {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UITextFormattingViewControllerConfiguration {}
);
extern_conformance!(
unsafe impl NSSecureCoding for UITextFormattingViewControllerConfiguration {}
);
impl UITextFormattingViewControllerConfiguration {
extern_methods!(
#[cfg(feature = "UITextFormattingViewControllerComponent")]
#[unsafe(method(groups))]
#[unsafe(method_family = none)]
pub fn groups(&self) -> Retained<NSArray<UITextFormattingViewControllerComponentGroup>>;
#[cfg(feature = "UITextFormattingViewControllerFormattingStyle")]
#[unsafe(method(formattingStyles))]
#[unsafe(method_family = none)]
pub fn formattingStyles(
&self,
) -> Option<Retained<NSArray<UITextFormattingViewControllerFormattingStyle>>>;
#[cfg(feature = "UITextFormattingViewControllerFormattingStyle")]
#[unsafe(method(setFormattingStyles:))]
#[unsafe(method_family = none)]
pub fn setFormattingStyles(
&self,
formatting_styles: Option<&NSArray<UITextFormattingViewControllerFormattingStyle>>,
);
#[cfg(feature = "UIFontPickerViewControllerConfiguration")]
#[unsafe(method(fontPickerConfiguration))]
#[unsafe(method_family = none)]
pub fn fontPickerConfiguration(
&self,
mtm: MainThreadMarker,
) -> Option<Retained<UIFontPickerViewControllerConfiguration>>;
#[cfg(feature = "UIFontPickerViewControllerConfiguration")]
#[unsafe(method(setFontPickerConfiguration:))]
#[unsafe(method_family = none)]
pub fn setFontPickerConfiguration(
&self,
font_picker_configuration: Option<&UIFontPickerViewControllerConfiguration>,
);
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "UITextFormattingViewControllerComponent")]
#[unsafe(method(initWithGroups:))]
#[unsafe(method_family = init)]
pub fn initWithGroups(
this: Allocated<Self>,
groups: &NSArray<UITextFormattingViewControllerComponentGroup>,
) -> Retained<Self>;
);
}
impl UITextFormattingViewControllerConfiguration {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for UITextFormattingViewControllerConfiguration {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}