1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
use objc2_app_kit::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// Configuration for a display attached to a Mac graphics device.
///
/// This display can be shown in a VZVirtualMachineView.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzmacgraphicsdisplayconfiguration?language=objc)
#[unsafe(super(VZGraphicsDisplayConfiguration, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "VZGraphicsDisplayConfiguration")]
pub struct VZMacGraphicsDisplayConfiguration;
);
#[cfg(feature = "VZGraphicsDisplayConfiguration")]
extern_conformance!(
unsafe impl NSCopying for VZMacGraphicsDisplayConfiguration {}
);
#[cfg(feature = "VZGraphicsDisplayConfiguration")]
unsafe impl CopyingHelper for VZMacGraphicsDisplayConfiguration {
type Result = Self;
}
#[cfg(feature = "VZGraphicsDisplayConfiguration")]
extern_conformance!(
unsafe impl NSObjectProtocol for VZMacGraphicsDisplayConfiguration {}
);
#[cfg(feature = "VZGraphicsDisplayConfiguration")]
impl VZMacGraphicsDisplayConfiguration {
extern_methods!(
/// Create a display configuration with the specified pixel dimensions and pixel density.
///
/// Parameter `widthInPixels`: The width of the display, in pixels.
///
/// Parameter `heightInPixels`: The height of the display, in pixels.
///
/// Parameter `pixelsPerInch`: The pixel density as a number of pixels per inch.
#[unsafe(method(initWithWidthInPixels:heightInPixels:pixelsPerInch:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithWidthInPixels_heightInPixels_pixelsPerInch(
this: Allocated<Self>,
width_in_pixels: NSInteger,
height_in_pixels: NSInteger,
pixels_per_inch: NSInteger,
) -> Retained<Self>;
#[cfg(feature = "objc2-app-kit")]
/// Create a display configuration suitable for showing on the specified screen.
///
/// Parameter `screen`: The screen on which you intend to present the VZVirtualMachineView for the display.
///
/// Parameter `sizeInPoints`: The intended logical size of the display.
///
/// The pixel dimensions and pixel density will be initialized based on the specified screen and
/// size. Note: an instance of macOS running in the virtual machine may not necessarily provide
/// a display mode with a backing scale factor matching the specified screen.
#[unsafe(method(initForScreen:sizeInPoints:))]
#[unsafe(method_family = init)]
pub unsafe fn initForScreen_sizeInPoints(
this: Allocated<Self>,
screen: &NSScreen,
size_in_points: NSSize,
) -> Retained<Self>;
/// The width of the display, in pixels.
#[unsafe(method(widthInPixels))]
#[unsafe(method_family = none)]
pub unsafe fn widthInPixels(&self) -> NSInteger;
/// Setter for [`widthInPixels`][Self::widthInPixels].
#[unsafe(method(setWidthInPixels:))]
#[unsafe(method_family = none)]
pub unsafe fn setWidthInPixels(&self, width_in_pixels: NSInteger);
/// The height of the display, in pixels.
#[unsafe(method(heightInPixels))]
#[unsafe(method_family = none)]
pub unsafe fn heightInPixels(&self) -> NSInteger;
/// Setter for [`heightInPixels`][Self::heightInPixels].
#[unsafe(method(setHeightInPixels:))]
#[unsafe(method_family = none)]
pub unsafe fn setHeightInPixels(&self, height_in_pixels: NSInteger);
/// The pixel density as a number of pixels per inch.
#[unsafe(method(pixelsPerInch))]
#[unsafe(method_family = none)]
pub unsafe fn pixelsPerInch(&self) -> NSInteger;
/// Setter for [`pixelsPerInch`][Self::pixelsPerInch].
#[unsafe(method(setPixelsPerInch:))]
#[unsafe(method_family = none)]
pub unsafe fn setPixelsPerInch(&self, pixels_per_inch: NSInteger);
);
}
/// Methods declared on superclass `VZGraphicsDisplayConfiguration`.
#[cfg(feature = "VZGraphicsDisplayConfiguration")]
impl VZMacGraphicsDisplayConfiguration {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}