objc2_virtualization/generated/
VZMacGraphicsDisplay.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
6use crate::*;
7
8extern_class!(
9    /// Class representing a virtual Mac graphics display.
10    ///
11    /// The VZMacGraphicsDisplay is the runtime counterpart of VZMacGraphicsDisplayConfiguration.
12    ///
13    /// When a graphics device is configured with class VZMacGraphicsDisplayConfiguration,
14    /// the VZGraphicsDevice's displays are in the same order as their configuration objects and they have the type VZMacGraphicsDisplay.
15    ///
16    /// For example, if when setting up a virtual Mac, `VZMacGraphicsDeviceConfiguration.displays[0]` is a `VZMacGraphicsDisplayConfiguration`,
17    /// then after creating a virtual machine from the configuration, the `VZVirtualMachine.graphicsDevices` is a `VZMacGraphicsDevice`.
18    /// The `VZMacGraphicsDevice.displays[0]` is a `VZMacGraphicsDisplay` corresponding to the `VZMacGraphicsDeviceConfiguration` in the configuration.
19    ///
20    ///
21    /// See: VZMacGraphicsDisplayConfiguration
22    ///
23    /// See: VZGraphicsDevice
24    ///
25    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzmacgraphicsdisplay?language=objc)
26    #[unsafe(super(VZGraphicsDisplay, NSObject))]
27    #[derive(Debug, PartialEq, Eq, Hash)]
28    #[cfg(feature = "VZGraphicsDisplay")]
29    pub struct VZMacGraphicsDisplay;
30);
31
32#[cfg(feature = "VZGraphicsDisplay")]
33unsafe impl NSObjectProtocol for VZMacGraphicsDisplay {}
34
35#[cfg(feature = "VZGraphicsDisplay")]
36impl VZMacGraphicsDisplay {
37    extern_methods!(
38        /// The pixel density as a number of pixels per inch.
39        #[unsafe(method(pixelsPerInch))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn pixelsPerInch(&self) -> NSInteger;
42    );
43}
44
45/// Methods declared on superclass `VZGraphicsDisplay`.
46#[cfg(feature = "VZGraphicsDisplay")]
47impl VZMacGraphicsDisplay {
48    extern_methods!(
49        #[unsafe(method(new))]
50        #[unsafe(method_family = new)]
51        pub unsafe fn new() -> Retained<Self>;
52
53        #[unsafe(method(init))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
56    );
57}