objc2_virtualization/generated/
VZVirtualMachineView.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::*;
6#[cfg(feature = "objc2-app-kit")]
7use objc2_app_kit::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// A view that allows user interaction with a virtual machine.
14    ///
15    /// The VZVirtualMachineView shows the contents of the virtual machine framebuffer. If the virtual machine configuration includes a keyboard and a pointing device,
16    /// the view forwards keyboard and mouse events to the virtual machine via those devices.
17    ///
18    /// See also: VZVirtualMachine
19    ///
20    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzvirtualmachineview?language=objc)
21    #[unsafe(super(NSView, NSResponder, NSObject))]
22    #[derive(Debug, PartialEq, Eq, Hash)]
23    #[cfg(feature = "objc2-app-kit")]
24    pub struct VZVirtualMachineView;
25);
26
27#[cfg(feature = "objc2-app-kit")]
28extern_conformance!(
29    unsafe impl NSAccessibility for VZVirtualMachineView {}
30);
31
32#[cfg(feature = "objc2-app-kit")]
33extern_conformance!(
34    unsafe impl NSAccessibilityElementProtocol for VZVirtualMachineView {}
35);
36
37#[cfg(feature = "objc2-app-kit")]
38extern_conformance!(
39    unsafe impl NSAnimatablePropertyContainer for VZVirtualMachineView {}
40);
41
42#[cfg(feature = "objc2-app-kit")]
43extern_conformance!(
44    unsafe impl NSAppearanceCustomization for VZVirtualMachineView {}
45);
46
47#[cfg(feature = "objc2-app-kit")]
48extern_conformance!(
49    unsafe impl NSCoding for VZVirtualMachineView {}
50);
51
52#[cfg(feature = "objc2-app-kit")]
53extern_conformance!(
54    unsafe impl NSDraggingDestination for VZVirtualMachineView {}
55);
56
57#[cfg(feature = "objc2-app-kit")]
58extern_conformance!(
59    unsafe impl NSObjectProtocol for VZVirtualMachineView {}
60);
61
62#[cfg(feature = "objc2-app-kit")]
63extern_conformance!(
64    unsafe impl NSUserInterfaceItemIdentification for VZVirtualMachineView {}
65);
66
67#[cfg(feature = "objc2-app-kit")]
68impl VZVirtualMachineView {
69    extern_methods!(
70        #[cfg(feature = "VZVirtualMachine")]
71        /// The virtual machine to display in the view.
72        #[unsafe(method(virtualMachine))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn virtualMachine(&self) -> Option<Retained<VZVirtualMachine>>;
75
76        #[cfg(feature = "VZVirtualMachine")]
77        /// Setter for [`virtualMachine`][Self::virtualMachine].
78        #[unsafe(method(setVirtualMachine:))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn setVirtualMachine(&self, virtual_machine: Option<&VZVirtualMachine>);
81
82        /// Whether certain system hot keys should be sent to the guest instead of the host. Defaults to NO.
83        #[unsafe(method(capturesSystemKeys))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn capturesSystemKeys(&self) -> bool;
86
87        /// Setter for [`capturesSystemKeys`][Self::capturesSystemKeys].
88        #[unsafe(method(setCapturesSystemKeys:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn setCapturesSystemKeys(&self, captures_system_keys: bool);
91
92        /// Automatically reconfigures the graphics display associated with this view with respect to view changes. Defaults to NO.
93        ///
94        /// Automatically resize or reconfigure this graphics display when the view properties update.
95        /// For example, resizing the display when the view has a live resize operation. When enabled,
96        /// the graphics display will automatically be reconfigured to match the host display environment.
97        ///
98        /// This property can only be set on a single VZVirtualMachineView targeting a particular VZGraphicsDisplay
99        /// at a time. If multiple VZVirtualMachineViews targeting the same VZGraphicsDisplay enable this property,
100        /// only one view will respect the property, and the other view will have had the property disabled.
101        #[unsafe(method(automaticallyReconfiguresDisplay))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn automaticallyReconfiguresDisplay(&self) -> bool;
104
105        /// Setter for [`automaticallyReconfiguresDisplay`][Self::automaticallyReconfiguresDisplay].
106        #[unsafe(method(setAutomaticallyReconfiguresDisplay:))]
107        #[unsafe(method_family = none)]
108        pub unsafe fn setAutomaticallyReconfiguresDisplay(
109            &self,
110            automatically_reconfigures_display: bool,
111        );
112    );
113}
114
115/// Methods declared on superclass `NSView`.
116#[cfg(feature = "objc2-app-kit")]
117impl VZVirtualMachineView {
118    extern_methods!(
119        #[unsafe(method(initWithFrame:))]
120        #[unsafe(method_family = init)]
121        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
122
123        #[unsafe(method(initWithCoder:))]
124        #[unsafe(method_family = init)]
125        pub unsafe fn initWithCoder(
126            this: Allocated<Self>,
127            coder: &NSCoder,
128        ) -> Option<Retained<Self>>;
129    );
130}
131
132/// Methods declared on superclass `NSResponder`.
133#[cfg(feature = "objc2-app-kit")]
134impl VZVirtualMachineView {
135    extern_methods!(
136        #[unsafe(method(init))]
137        #[unsafe(method_family = init)]
138        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
139    );
140}
141
142/// Methods declared on superclass `NSObject`.
143#[cfg(feature = "objc2-app-kit")]
144impl VZVirtualMachineView {
145    extern_methods!(
146        #[unsafe(method(new))]
147        #[unsafe(method_family = new)]
148        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
149    );
150}