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::*;
extern "C" {
pub static CPGridTemplateMaximumItems: NSUInteger;
}
extern_class!(
#[unsafe(super(CPTemplate, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CPTemplate")]
pub struct CPGridTemplate;
);
#[cfg(all(feature = "CPBarButtonProviding", feature = "CPTemplate"))]
extern_conformance!(
unsafe impl CPBarButtonProviding for CPGridTemplate {}
);
#[cfg(feature = "CPTemplate")]
extern_conformance!(
unsafe impl NSCoding for CPGridTemplate {}
);
#[cfg(feature = "CPTemplate")]
extern_conformance!(
unsafe impl NSObjectProtocol for CPGridTemplate {}
);
#[cfg(feature = "CPTemplate")]
extern_conformance!(
unsafe impl NSSecureCoding for CPGridTemplate {}
);
#[cfg(feature = "CPTemplate")]
impl CPGridTemplate {
extern_methods!(
#[cfg(feature = "CPGridButton")]
#[unsafe(method(initWithTitle:gridButtons:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithTitle_gridButtons(
this: Allocated<Self>,
title: Option<&NSString>,
grid_buttons: &NSArray<CPGridButton>,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(maximumGridButtonImageSize))]
#[unsafe(method_family = none)]
pub unsafe fn maximumGridButtonImageSize(mtm: MainThreadMarker) -> CGSize;
#[cfg(feature = "CPGridButton")]
#[unsafe(method(gridButtons))]
#[unsafe(method_family = none)]
pub unsafe fn gridButtons(&self) -> Retained<NSArray<CPGridButton>>;
#[cfg(feature = "CPGridButton")]
#[unsafe(method(updateGridButtons:))]
#[unsafe(method_family = none)]
pub unsafe fn updateGridButtons(&self, grid_buttons: &NSArray<CPGridButton>);
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub unsafe fn title(&self) -> Retained<NSString>;
#[unsafe(method(updateTitle:))]
#[unsafe(method_family = none)]
pub unsafe fn updateTitle(&self, title: &NSString);
);
}