objc2_intents/generated/
INRelevantShortcutStore.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    /// Where relevant shortcuts are provided to Siri.
12    ///
13    /// See also: INRelevantShortcut
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/inrelevantshortcutstore?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct INRelevantShortcutStore;
19);
20
21extern_conformance!(
22    unsafe impl NSObjectProtocol for INRelevantShortcutStore {}
23);
24
25impl INRelevantShortcutStore {
26    extern_methods!(
27        #[unsafe(method(defaultStore))]
28        #[unsafe(method_family = none)]
29        pub unsafe fn defaultStore() -> Retained<INRelevantShortcutStore>;
30
31        #[cfg(all(feature = "INRelevantShortcut", feature = "block2"))]
32        /// Provide a new set of relevant shortcuts that should be suggested by Siri.
33        ///
34        /// Note: Setting new relevant shortcuts will replace all relevant shortcuts that were previously provided.
35        #[unsafe(method(setRelevantShortcuts:completionHandler:))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn setRelevantShortcuts_completionHandler(
38            &self,
39            shortcuts: &NSArray<INRelevantShortcut>,
40            completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
41        );
42
43        /// Note: Use the
44        /// `defaultStore`singleton.
45        #[unsafe(method(init))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
48    );
49}
50
51/// Methods declared on superclass `NSObject`.
52impl INRelevantShortcutStore {
53    extern_methods!(
54        #[unsafe(method(new))]
55        #[unsafe(method_family = new)]
56        pub unsafe fn new() -> Retained<Self>;
57    );
58}