objc2_intents/generated/
INParameter.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
10#[cfg(feature = "INInteraction")]
11impl INInteraction {
12    extern_methods!(
13        #[unsafe(method(parameterValueForParameter:))]
14        #[unsafe(method_family = none)]
15        pub unsafe fn parameterValueForParameter(
16            &self,
17            parameter: &INParameter,
18        ) -> Option<Retained<AnyObject>>;
19    );
20}
21
22extern_class!(
23    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inparameter?language=objc)
24    #[unsafe(super(NSObject))]
25    #[derive(Debug, PartialEq, Eq, Hash)]
26    pub struct INParameter;
27);
28
29extern_conformance!(
30    unsafe impl NSCoding for INParameter {}
31);
32
33extern_conformance!(
34    unsafe impl NSCopying for INParameter {}
35);
36
37unsafe impl CopyingHelper for INParameter {
38    type Result = Self;
39}
40
41extern_conformance!(
42    unsafe impl NSObjectProtocol for INParameter {}
43);
44
45extern_conformance!(
46    unsafe impl NSSecureCoding for INParameter {}
47);
48
49impl INParameter {
50    extern_methods!(
51        /// # Safety
52        ///
53        /// `a_class` probably has further requirements.
54        #[unsafe(method(parameterForClass:keyPath:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn parameterForClass_keyPath(
57            a_class: &AnyClass,
58            key_path: &NSString,
59        ) -> Retained<Self>;
60
61        #[unsafe(method(parameterClass))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn parameterClass(&self) -> &'static AnyClass;
64
65        #[unsafe(method(parameterKeyPath))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn parameterKeyPath(&self) -> Retained<NSString>;
68
69        #[unsafe(method(isEqualToParameter:))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn isEqualToParameter(&self, parameter: &INParameter) -> bool;
72
73        #[unsafe(method(setIndex:forSubKeyPath:))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn setIndex_forSubKeyPath(&self, index: NSUInteger, sub_key_path: &NSString);
76
77        #[unsafe(method(indexForSubKeyPath:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn indexForSubKeyPath(&self, sub_key_path: &NSString) -> NSUInteger;
80    );
81}
82
83/// Methods declared on superclass `NSObject`.
84impl INParameter {
85    extern_methods!(
86        #[unsafe(method(init))]
87        #[unsafe(method_family = init)]
88        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
89
90        #[unsafe(method(new))]
91        #[unsafe(method_family = new)]
92        pub unsafe fn new() -> Retained<Self>;
93    );
94}