objc2_virtualization/generated/
VZGraphicsDevice.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// Class representing a graphics device in a virtual machine.
11    ///
12    /// VZGraphicsDevice should not be instantiated directly.
13    ///
14    /// Graphics devices are first configured on the VZVirtualMachineConfiguration through a subclass of VZGraphicsDeviceConfiguration.
15    /// When a VZVirtualMachine is created from the configuration, the graphics devices are available through the VZVirtualMachine.graphicsDevices property.
16    ///
17    /// The real type of VZGraphicsDevice corresponds to the type used by the configuration.
18    /// For example, a VZVirtioGraphicsDeviceConfiguration leads to a device of type VZVirtioGraphicsDevice.
19    /// And a VZMacGraphicsDeviceConfiguration leads to a device of type VZMacGraphicsDevice.
20    ///
21    /// See: VZGraphicsDeviceConfiguration
22    ///
23    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzgraphicsdevice?language=objc)
24    #[unsafe(super(NSObject))]
25    #[derive(Debug, PartialEq, Eq, Hash)]
26    pub struct VZGraphicsDevice;
27);
28
29unsafe impl NSObjectProtocol for VZGraphicsDevice {}
30
31impl VZGraphicsDevice {
32    extern_methods!(
33        #[unsafe(method(new))]
34        #[unsafe(method_family = new)]
35        pub unsafe fn new() -> Retained<Self>;
36
37        #[unsafe(method(init))]
38        #[unsafe(method_family = init)]
39        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
40
41        #[cfg(feature = "VZGraphicsDisplay")]
42        /// Return the list of graphics displays configured for this graphics device.
43        ///
44        /// Graphics displays are configured on the graphics device configuration.
45        ///
46        /// See: VZMacGraphicsDisplayConfiguration
47        ///
48        /// See: VZVirtioGraphicsScanoutConfiguration
49        #[unsafe(method(displays))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn displays(&self) -> Retained<NSArray<VZGraphicsDisplay>>;
52    );
53}