use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CLSBinaryValueType(pub NSInteger);
impl CLSBinaryValueType {
#[doc(alias = "CLSBinaryValueTypeTrueFalse")]
pub const TrueFalse: Self = Self(0);
#[doc(alias = "CLSBinaryValueTypePassFail")]
pub const PassFail: Self = Self(1);
#[doc(alias = "CLSBinaryValueTypeYesNo")]
pub const YesNo: Self = Self(2);
#[doc(alias = "CLSBinaryValueTypeCorrectIncorrect")]
pub const CorrectIncorrect: Self = Self(3);
}
unsafe impl Encode for CLSBinaryValueType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CLSBinaryValueType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(CLSActivityItem, CLSObject, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "CLSActivityItem", feature = "CLSObject"))]
pub struct CLSBinaryItem;
);
#[cfg(all(feature = "CLSActivityItem", feature = "CLSObject"))]
extern_conformance!(
unsafe impl NSCoding for CLSBinaryItem {}
);
#[cfg(all(feature = "CLSActivityItem", feature = "CLSObject"))]
extern_conformance!(
unsafe impl NSObjectProtocol for CLSBinaryItem {}
);
#[cfg(all(feature = "CLSActivityItem", feature = "CLSObject"))]
extern_conformance!(
unsafe impl NSSecureCoding for CLSBinaryItem {}
);
#[cfg(all(feature = "CLSActivityItem", feature = "CLSObject"))]
impl CLSBinaryItem {
extern_methods!(
#[unsafe(method(value))]
#[unsafe(method_family = none)]
pub unsafe fn value(&self) -> bool;
#[unsafe(method(setValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setValue(&self, value: bool);
#[unsafe(method(valueType))]
#[unsafe(method_family = none)]
pub unsafe fn valueType(&self) -> CLSBinaryValueType;
#[unsafe(method(initWithIdentifier:title:type:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithIdentifier_title_type(
this: Allocated<Self>,
identifier: &NSString,
title: &NSString,
value_type: CLSBinaryValueType,
) -> Retained<Self>;
);
}
#[cfg(all(feature = "CLSActivityItem", feature = "CLSObject"))]
impl CLSBinaryItem {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}