objc2_av_routing/generated/
AVCustomRoutingActionItem.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#[cfg(feature = "objc2-uniform-type-identifiers")]
8use objc2_uniform_type_identifiers::*;
9
10use crate::*;
11
12extern_class!(
13    /// An object that represents a custom action item to display in a device route
14    /// picker.
15    ///
16    /// Use this class to specify supplemental action items to display in the list
17    /// of discovered routes. Tapping a custom item dismisses the picker and calls
18    /// the
19    /// ``AVCustomRoutingControllerDelegate/customRoutingController:didSelectItem:``
20    /// method of ``AVCustomRoutingControllerDelegate``.
21    ///
22    /// See also [Apple's documentation](https://developer.apple.com/documentation/avrouting/avcustomroutingactionitem?language=objc)
23    #[unsafe(super(NSObject))]
24    #[derive(Debug, PartialEq, Eq, Hash)]
25    pub struct AVCustomRoutingActionItem;
26);
27
28unsafe impl NSObjectProtocol for AVCustomRoutingActionItem {}
29
30impl AVCustomRoutingActionItem {
31    extern_methods!(
32        #[cfg(feature = "objc2-uniform-type-identifiers")]
33        /// A type with an identifier that matches a value in the app’s configuration.
34        ///
35        /// Provide a `UTType` symbol name and description in your app’s `Info.plist`
36        /// file.
37        #[unsafe(method(type))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn r#type(&self) -> Retained<UTType>;
40
41        #[cfg(feature = "objc2-uniform-type-identifiers")]
42        /// Setter for [`type`][Self::type].
43        #[unsafe(method(setType:))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn setType(&self, r#type: &UTType);
46
47        /// A string to use to override the title of the item’s type.
48        ///
49        /// Use this value to dynamically override the title of the custom item.
50        #[unsafe(method(overrideTitle))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn overrideTitle(&self) -> Option<Retained<NSString>>;
53
54        /// Setter for [`overrideTitle`][Self::overrideTitle].
55        #[unsafe(method(setOverrideTitle:))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn setOverrideTitle(&self, override_title: Option<&NSString>);
58    );
59}
60
61/// Methods declared on superclass `NSObject`.
62impl AVCustomRoutingActionItem {
63    extern_methods!(
64        #[unsafe(method(init))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67
68        #[unsafe(method(new))]
69        #[unsafe(method_family = new)]
70        pub unsafe fn new() -> Retained<Self>;
71    );
72}