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 INObjectSection<ObjectType: ?Sized = AnyObject>;
);
impl<ObjectType: ?Sized + Message> INObjectSection<ObjectType> {
#[inline]
pub unsafe fn cast_unchecked<NewObjectType: ?Sized + Message>(
&self,
) -> &INObjectSection<NewObjectType> {
unsafe { &*((self as *const Self).cast()) }
}
}
extern_conformance!(
unsafe impl<ObjectType: ?Sized + NSCoding> NSCoding for INObjectSection<ObjectType> {}
);
extern_conformance!(
unsafe impl<ObjectType: ?Sized> NSCopying for INObjectSection<ObjectType> {}
);
unsafe impl<ObjectType: ?Sized + Message> CopyingHelper for INObjectSection<ObjectType> {
type Result = Self;
}
extern_conformance!(
unsafe impl<ObjectType: ?Sized> NSObjectProtocol for INObjectSection<ObjectType> {}
);
extern_conformance!(
unsafe impl<ObjectType: ?Sized + NSSecureCoding> NSSecureCoding for INObjectSection<ObjectType> {}
);
impl<ObjectType: Message> INObjectSection<ObjectType> {
extern_methods!(
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub unsafe fn title(&self) -> Option<Retained<NSString>>;
#[unsafe(method(items))]
#[unsafe(method_family = none)]
pub unsafe fn items(&self) -> Retained<NSArray<ObjectType>>;
#[unsafe(method(initWithTitle:items:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithTitle_items(
this: Allocated<Self>,
title: Option<&NSString>,
items: &NSArray<ObjectType>,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl<ObjectType: Message> INObjectSection<ObjectType> {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}