objc2_core_audio_kit/generated/
CABTLEMIDIWindowController.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 nearby Bluetooth-based MIDI peripherals. The user can select one of those peripherals and pair it with their mac. Additionally, the user can advertise the mac as a Bluetooth-based MIDI peripheral.
14    ///
15    ///
16    /// To use this class, create an instance of the CABTLEMIDIWindowController, initialize it, and call showWindow: to display the UI.
17    ///
18    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreaudiokit/cabtlemidiwindowcontroller?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 CABTLEMIDIWindowController;
24);
25
26#[cfg(feature = "objc2-app-kit")]
27#[cfg(target_os = "macos")]
28extern_conformance!(
29    unsafe impl NSCoding for CABTLEMIDIWindowController {}
30);
31
32#[cfg(feature = "objc2-app-kit")]
33#[cfg(target_os = "macos")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for CABTLEMIDIWindowController {}
36);
37
38#[cfg(feature = "objc2-app-kit")]
39#[cfg(target_os = "macos")]
40extern_conformance!(
41    unsafe impl NSSeguePerforming for CABTLEMIDIWindowController {}
42);
43
44#[cfg(feature = "objc2-app-kit")]
45#[cfg(target_os = "macos")]
46impl CABTLEMIDIWindowController {
47    extern_methods!();
48}
49
50/// Methods declared on superclass `NSWindowController`.
51#[cfg(feature = "objc2-app-kit")]
52#[cfg(target_os = "macos")]
53impl CABTLEMIDIWindowController {
54    extern_methods!(
55        #[unsafe(method(initWithWindow:))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn initWithWindow(
58            this: Allocated<Self>,
59            window: Option<&NSWindow>,
60        ) -> Retained<Self>;
61
62        /// # Safety
63        ///
64        /// `coder` possibly has further requirements.
65        #[unsafe(method(initWithCoder:))]
66        #[unsafe(method_family = init)]
67        pub unsafe fn initWithCoder(
68            this: Allocated<Self>,
69            coder: &NSCoder,
70        ) -> Option<Retained<Self>>;
71
72        #[unsafe(method(initWithWindowNibName:))]
73        #[unsafe(method_family = init)]
74        pub unsafe fn initWithWindowNibName(
75            this: Allocated<Self>,
76            window_nib_name: &NSNibName,
77        ) -> Retained<Self>;
78
79        /// # Safety
80        ///
81        /// `owner` should be of the correct type.
82        #[unsafe(method(initWithWindowNibName:owner:))]
83        #[unsafe(method_family = init)]
84        pub unsafe fn initWithWindowNibName_owner(
85            this: Allocated<Self>,
86            window_nib_name: &NSNibName,
87            owner: &AnyObject,
88        ) -> Retained<Self>;
89
90        /// # Safety
91        ///
92        /// `owner` should be of the correct type.
93        #[unsafe(method(initWithWindowNibPath:owner:))]
94        #[unsafe(method_family = init)]
95        pub unsafe fn initWithWindowNibPath_owner(
96            this: Allocated<Self>,
97            window_nib_path: &NSString,
98            owner: &AnyObject,
99        ) -> Retained<Self>;
100    );
101}
102
103/// Methods declared on superclass `NSResponder`.
104#[cfg(feature = "objc2-app-kit")]
105#[cfg(target_os = "macos")]
106impl CABTLEMIDIWindowController {
107    extern_methods!(
108        #[unsafe(method(init))]
109        #[unsafe(method_family = init)]
110        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
111    );
112}
113
114/// Methods declared on superclass `NSObject`.
115#[cfg(feature = "objc2-app-kit")]
116#[cfg(target_os = "macos")]
117impl CABTLEMIDIWindowController {
118    extern_methods!(
119        #[unsafe(method(new))]
120        #[unsafe(method_family = new)]
121        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
122    );
123}