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
28extern_conformance!(
29    unsafe impl NSObjectProtocol for AVCustomRoutingActionItem {}
30);
31
32impl AVCustomRoutingActionItem {
33    extern_methods!(
34        #[cfg(feature = "objc2-uniform-type-identifiers")]
35        /// A type with an identifier that matches a value in the app’s configuration.
36        ///
37        /// Provide a `UTType` symbol name and description in your app’s `Info.plist`
38        /// file.
39        #[unsafe(method(type))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn r#type(&self) -> Retained<UTType>;
42
43        #[cfg(feature = "objc2-uniform-type-identifiers")]
44        /// Setter for [`type`][Self::type].
45        ///
46        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
47        #[unsafe(method(setType:))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn setType(&self, r#type: &UTType);
50
51        /// A string to use to override the title of the item’s type.
52        ///
53        /// Use this value to dynamically override the title of the custom item.
54        #[unsafe(method(overrideTitle))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn overrideTitle(&self) -> Option<Retained<NSString>>;
57
58        /// Setter for [`overrideTitle`][Self::overrideTitle].
59        ///
60        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
61        #[unsafe(method(setOverrideTitle:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn setOverrideTitle(&self, override_title: Option<&NSString>);
64    );
65}
66
67/// Methods declared on superclass `NSObject`.
68impl AVCustomRoutingActionItem {
69    extern_methods!(
70        #[unsafe(method(init))]
71        #[unsafe(method_family = init)]
72        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
73
74        #[unsafe(method(new))]
75        #[unsafe(method_family = new)]
76        pub unsafe fn new() -> Retained<Self>;
77    );
78}