use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSTextElement")]
pub struct NSTextListElement;
#[cfg(feature = "NSTextElement")]
unsafe impl ClassType for NSTextListElement {
#[inherits(NSTextElement, NSObject)]
type Super = NSTextParagraph;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "NSTextElement")]
unsafe impl NSObjectProtocol for NSTextListElement {}
extern_methods!(
#[cfg(feature = "NSTextElement")]
unsafe impl NSTextListElement {
#[cfg(feature = "NSTextList")]
#[method_id(@__retain_semantics Init initWithParentElement:textList:contents:markerAttributes:childElements:)]
pub unsafe fn initWithParentElement_textList_contents_markerAttributes_childElements(
this: Allocated<Self>,
parent: Option<&NSTextListElement>,
text_list: &NSTextList,
contents: Option<&NSAttributedString>,
marker_attributes: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>,
children: Option<&NSArray<NSTextListElement>>,
) -> Id<Self>;
#[method_id(@__retain_semantics Init initWithAttributedString:)]
pub unsafe fn initWithAttributedString(
this: Allocated<Self>,
attributed_string: Option<&NSAttributedString>,
) -> Id<Self>;
#[cfg(feature = "NSTextList")]
#[method_id(@__retain_semantics Other textListElementWithContents:markerAttributes:textList:childElements:)]
pub unsafe fn textListElementWithContents_markerAttributes_textList_childElements(
contents: &NSAttributedString,
marker_attributes: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>,
text_list: &NSTextList,
children: Option<&NSArray<NSTextListElement>>,
) -> Id<Self>;
#[cfg(feature = "NSTextList")]
#[method_id(@__retain_semantics Other textListElementWithChildElements:textList:nestingLevel:)]
pub unsafe fn textListElementWithChildElements_textList_nestingLevel(
children: &NSArray<NSTextListElement>,
text_list: &NSTextList,
nesting_level: NSInteger,
) -> Option<Id<Self>>;
#[cfg(feature = "NSTextList")]
#[method_id(@__retain_semantics Other textList)]
pub unsafe fn textList(&self) -> Id<NSTextList>;
#[method_id(@__retain_semantics Other contents)]
pub unsafe fn contents(&self) -> Option<Id<NSAttributedString>>;
#[method_id(@__retain_semantics Other markerAttributes)]
pub unsafe fn markerAttributes(
&self,
) -> Option<Id<NSDictionary<NSAttributedStringKey, AnyObject>>>;
#[method_id(@__retain_semantics Other attributedString)]
pub unsafe fn attributedString(&self) -> Id<NSAttributedString>;
#[method_id(@__retain_semantics Other childElements)]
pub unsafe fn childElements(&self) -> Id<NSArray<NSTextListElement>>;
#[method_id(@__retain_semantics Other parentElement)]
pub unsafe fn parentElement(&self) -> Option<Id<NSTextListElement>>;
}
);
extern_methods!(
#[cfg(feature = "NSTextElement")]
unsafe impl NSTextListElement {
#[cfg(feature = "NSTextContentManager")]
#[method_id(@__retain_semantics Init initWithTextContentManager:)]
pub unsafe fn initWithTextContentManager(
this: Allocated<Self>,
text_content_manager: Option<&NSTextContentManager>,
) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "NSTextElement")]
unsafe impl NSTextListElement {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);