objc2_class_kit/generated/
CLSActivityItem.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// CLSActivityItem is used to gather information about the activity generated by a user.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/classkit/clsactivityitem?language=objc)
14    #[unsafe(super(CLSObject, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "CLSObject")]
17    pub struct CLSActivityItem;
18);
19
20#[cfg(feature = "CLSObject")]
21extern_conformance!(
22    unsafe impl NSCoding for CLSActivityItem {}
23);
24
25#[cfg(feature = "CLSObject")]
26extern_conformance!(
27    unsafe impl NSObjectProtocol for CLSActivityItem {}
28);
29
30#[cfg(feature = "CLSObject")]
31extern_conformance!(
32    unsafe impl NSSecureCoding for CLSActivityItem {}
33);
34
35#[cfg(feature = "CLSObject")]
36impl CLSActivityItem {
37    extern_methods!(
38        /// Title of what this ActivityItem represents.
39        ///
40        /// This will be the title associated with the activity item in the generated progress report.
41        #[unsafe(method(title))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn title(&self) -> Retained<NSString>;
44
45        /// Setter for [`title`][Self::title].
46        ///
47        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
48        #[unsafe(method(setTitle:))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn setTitle(&self, title: &NSString);
51
52        /// An identifier that is unique within its owning activity
53        ///
54        /// The identifier can be used to look up existing activityItems in a given activity.
55        #[unsafe(method(identifier))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn identifier(&self) -> Retained<NSString>;
58
59        #[unsafe(method(new))]
60        #[unsafe(method_family = new)]
61        pub unsafe fn new() -> Retained<Self>;
62
63        #[unsafe(method(init))]
64        #[unsafe(method_family = init)]
65        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66    );
67}