objc2-class-kit 0.3.2

Bindings to the ClassKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// CLSActivityItem is used to gather information about the activity generated by a user.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/classkit/clsactivityitem?language=objc)
    #[unsafe(super(CLSObject, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CLSObject")]
    pub struct CLSActivityItem;
);

#[cfg(feature = "CLSObject")]
extern_conformance!(
    unsafe impl NSCoding for CLSActivityItem {}
);

#[cfg(feature = "CLSObject")]
extern_conformance!(
    unsafe impl NSObjectProtocol for CLSActivityItem {}
);

#[cfg(feature = "CLSObject")]
extern_conformance!(
    unsafe impl NSSecureCoding for CLSActivityItem {}
);

#[cfg(feature = "CLSObject")]
impl CLSActivityItem {
    extern_methods!(
        /// Title of what this ActivityItem represents.
        ///
        /// This will be the title associated with the activity item in the generated progress report.
        #[unsafe(method(title))]
        #[unsafe(method_family = none)]
        pub unsafe fn title(&self) -> Retained<NSString>;

        /// Setter for [`title`][Self::title].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setTitle:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTitle(&self, title: &NSString);

        /// An identifier that is unique within its owning activity
        ///
        /// The identifier can be used to look up existing activityItems in a given activity.
        #[unsafe(method(identifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn identifier(&self) -> Retained<NSString>;

        #[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>;
    );
}