objc2_core_audio_kit/generated/
CANetworkBrowserWindowController.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-app-kit")]
6#[cfg(target_os = "macos")]
7use objc2_app_kit::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// A window controller object that can present a window that displays available network audio devices (including AVB). The user can connect to one or more of those devices to use exclusively with his mac.
14    ///
15    ///
16    /// To use this class, create an instance of the CANetworkBrowserWindowController, initialize it, and call showWindow: to display the UI.
17    ///
18    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreaudiokit/canetworkbrowserwindowcontroller?language=objc)
19    #[unsafe(super(NSWindowController, NSResponder, NSObject))]
20    #[derive(Debug, PartialEq, Eq, Hash)]
21    #[cfg(feature = "objc2-app-kit")]
22    #[cfg(target_os = "macos")]
23    pub struct CANetworkBrowserWindowController;
24);
25
26#[cfg(feature = "objc2-app-kit")]
27#[cfg(target_os = "macos")]
28extern_conformance!(
29    unsafe impl NSCoding for CANetworkBrowserWindowController {}
30);
31
32#[cfg(feature = "objc2-app-kit")]
33#[cfg(target_os = "macos")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for CANetworkBrowserWindowController {}
36);
37
38#[cfg(feature = "objc2-app-kit")]
39#[cfg(target_os = "macos")]
40extern_conformance!(
41    unsafe impl NSSeguePerforming for CANetworkBrowserWindowController {}
42);
43
44#[cfg(feature = "objc2-app-kit")]
45#[cfg(target_os = "macos")]
46impl CANetworkBrowserWindowController {
47    extern_methods!(
48        /// Provides a check for determining if the current machine hardware supports AVB.
49        ///
50        /// Returns: True if AVB is supported.
51        #[unsafe(method(isAVBSupported))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn isAVBSupported(mtm: MainThreadMarker) -> bool;
54
55        /// Designated initializer
56        ///
57        /// Returns: initialized instance of CANetworkBrowerWindowController
58        #[unsafe(method(init))]
59        #[unsafe(method_family = init)]
60        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
61    );
62}
63
64/// Methods declared on superclass `NSWindowController`.
65#[cfg(feature = "objc2-app-kit")]
66#[cfg(target_os = "macos")]
67impl CANetworkBrowserWindowController {
68    extern_methods!(
69        #[unsafe(method(initWithWindow:))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn initWithWindow(
72            this: Allocated<Self>,
73            window: Option<&NSWindow>,
74        ) -> Retained<Self>;
75
76        /// # Safety
77        ///
78        /// `coder` possibly has further requirements.
79        #[unsafe(method(initWithCoder:))]
80        #[unsafe(method_family = init)]
81        pub unsafe fn initWithCoder(
82            this: Allocated<Self>,
83            coder: &NSCoder,
84        ) -> Option<Retained<Self>>;
85
86        #[unsafe(method(initWithWindowNibName:))]
87        #[unsafe(method_family = init)]
88        pub unsafe fn initWithWindowNibName(
89            this: Allocated<Self>,
90            window_nib_name: &NSNibName,
91        ) -> Retained<Self>;
92
93        /// # Safety
94        ///
95        /// `owner` should be of the correct type.
96        #[unsafe(method(initWithWindowNibName:owner:))]
97        #[unsafe(method_family = init)]
98        pub unsafe fn initWithWindowNibName_owner(
99            this: Allocated<Self>,
100            window_nib_name: &NSNibName,
101            owner: &AnyObject,
102        ) -> Retained<Self>;
103
104        /// # Safety
105        ///
106        /// `owner` should be of the correct type.
107        #[unsafe(method(initWithWindowNibPath:owner:))]
108        #[unsafe(method_family = init)]
109        pub unsafe fn initWithWindowNibPath_owner(
110            this: Allocated<Self>,
111            window_nib_path: &NSString,
112            owner: &AnyObject,
113        ) -> Retained<Self>;
114    );
115}
116
117/// Methods declared on superclass `NSObject`.
118#[cfg(feature = "objc2-app-kit")]
119#[cfg(target_os = "macos")]
120impl CANetworkBrowserWindowController {
121    extern_methods!(
122        #[unsafe(method(new))]
123        #[unsafe(method_family = new)]
124        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
125    );
126}