Skip to content

Commit 818606b

Browse files
committed
App and Environment: update UserInterfaceIdiom
Add some documentation comments for the enumeration and rename a few of them to be more descriptive: - pad: tablet - mac: desktop Add a new `headset` case for devices such as the HoloLens.
1 parent a3172a2 commit 818606b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Sources/SwiftWin32/App and Environment/TraitCollection.swift

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,35 @@ public enum UserInterfaceActiveAppearance: Int {
5151
case inactive
5252
}
5353

54+
/// Constants that indicate the interface type for the device or an object that
55+
/// has a trait environment, such as a view and view controller.
5456
public enum UserInterfaceIdiom: Int {
57+
/// An unspecified idiom.
5558
case unspecified
59+
60+
/// An interface designed for a phone.
5661
case phone
62+
63+
@available(*, deprecated, message: "Use UserInterfaceIdiom.tablet")
5764
case pad
65+
66+
/// An interface designed for a TV.
5867
case tv
68+
69+
/// An interface designed for a car display.
5970
case car
71+
72+
@available(*, deprecated, message: "Use UserInterfaceIdiom.desktop")
6073
case mac
74+
75+
/// An interface designed for a tablet.
76+
case tablet
77+
78+
/// An interface designed for a desktop or laptop.
79+
case desktop
80+
81+
/// An interface designed for a AR/VR device.
82+
case headset
6183
}
6284

6385
public enum UserInterfaceLevel: Int {

0 commit comments

Comments
 (0)