icrate/generated/ClassKit/
CLSQuantityItem.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use crate::common::*;
4use crate::ClassKit::*;
5use crate::Foundation::*;
6
7extern_class!(
8    #[derive(Debug, PartialEq, Eq, Hash)]
9    #[cfg(feature = "ClassKit_CLSQuantityItem")]
10    pub struct CLSQuantityItem;
11
12    #[cfg(feature = "ClassKit_CLSQuantityItem")]
13    unsafe impl ClassType for CLSQuantityItem {
14        #[inherits(CLSObject, NSObject)]
15        type Super = CLSActivityItem;
16        type Mutability = InteriorMutable;
17    }
18);
19
20#[cfg(feature = "ClassKit_CLSQuantityItem")]
21unsafe impl NSCoding for CLSQuantityItem {}
22
23#[cfg(feature = "ClassKit_CLSQuantityItem")]
24unsafe impl NSObjectProtocol for CLSQuantityItem {}
25
26#[cfg(feature = "ClassKit_CLSQuantityItem")]
27unsafe impl NSSecureCoding for CLSQuantityItem {}
28
29extern_methods!(
30    #[cfg(feature = "ClassKit_CLSQuantityItem")]
31    unsafe impl CLSQuantityItem {
32        #[method(quantity)]
33        pub unsafe fn quantity(&self) -> c_double;
34
35        #[method(setQuantity:)]
36        pub unsafe fn setQuantity(&self, quantity: c_double);
37
38        #[cfg(feature = "Foundation_NSString")]
39        #[method_id(@__retain_semantics Init initWithIdentifier:title:)]
40        pub unsafe fn initWithIdentifier_title(
41            this: Allocated<Self>,
42            identifier: &NSString,
43            title: &NSString,
44        ) -> Id<Self>;
45    }
46);
47
48extern_methods!(
49    /// Methods declared on superclass `CLSActivityItem`
50    #[cfg(feature = "ClassKit_CLSQuantityItem")]
51    unsafe impl CLSQuantityItem {
52        #[method_id(@__retain_semantics New new)]
53        pub unsafe fn new() -> Id<Self>;
54
55        #[method_id(@__retain_semantics Init init)]
56        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
57    }
58);