New
12extension
GCControllerHomeButtonSettingsManager
NewiOSmacOSextension GCControllerHomeButtonSettingsManager
Declaration
extension GCControllerHomeButtonSettingsManager {
/// Get the current controller Home button action.
///
public func readControllerHomeButtonAction() throws -> GCControllerHomeButtonSettingsManager.Action
}
extension
NotificationCenter.MessageIdentifier
NewvisionOSextension NotificationCenter.MessageIdentifier where Self == NotificationCenter.BaseMessageIdentifier<GCSpatialAccessory.DidConnectMessage>
Declaration
extension NotificationCenter.MessageIdentifier where Self == NotificationCenter.BaseMessageIdentifier<GCSpatialAccessory.DidConnectMessage> {
/// The identifier of the message that posts after a spatial accessory
/// connects to the device.
public static var didConnect: NotificationCenter.BaseMessageIdentifier<GCSpatialAccessory.DidConnectMessage> { get }
}
extension
NotificationCenter.MessageIdentifier
NewvisionOSextension NotificationCenter.MessageIdentifier where Self == NotificationCenter.BaseMessageIdentifier<GCSpatialAccessory.DidDisconnectMessage>
Declaration
extension NotificationCenter.MessageIdentifier where Self == NotificationCenter.BaseMessageIdentifier<GCSpatialAccessory.DidDisconnectMessage> {
/// The identifier of the message that posts after a spatial accessory
/// disconnects from the device.
public static var didDisconnect: NotificationCenter.BaseMessageIdentifier<GCSpatialAccessory.DidDisconnectMessage> { get }
}
enum
GCControllerHomeButtonSettingsManager.Action
NewiOSmacOSpublic enum Action : Int, @unchecked Sendable
Declaration
public enum Action : Int, @unchecked Sendable {
/** The controller home button action could not be accessed. */
case unavailable = 0
/** The controller home button action opens the current application. */
case openCurrentApplication = 1
/** The controller home button action performs some other action. */
case other = 9223372036854775807
}
enum
GCControllerHomeButtonSettingsManager.Activity
NewiOSmacOSpublic enum Activity : Int, @unchecked Sendable
Declaration
public enum Activity : Int, @unchecked Sendable {
/** Customize the action that occurs in response to long press of the
* Home button. */
case customizeAction = 1
/** Disable the system Home button actions while this app has focus. */
case customizeOverrides = 2
}
case
GCControllerHomeButtonSettingsManager.Action.disabled
NewmacOScase disabled = -1
func
GCDevicePhysicalInput.inputState
NewvisionOSfunc inputState(forSpatialAccessoryAnchorTimestamp timestamp: TimeInterval) -> (any GCDevicePhysicalInputState)?
var
GCDeviceType.spatialAccessory
NewvisionOSopen class var spatialAccessory: GCDeviceType { get }
struct
GCSpatialAccessory.DidConnectMessage
NewvisionOSpublic struct DidConnectMessage : NotificationCenter.MainActorMessage
A message that posts after a spatial accessory connects to the device.
Use the .didConnect identifier with NotificationCenter to listen for this message.
let observation = NotificationCenter.default.addObserver(of: GCSpatialAccessory.self, for: .didConnect) { message in
let accessory = message.spatialAccessory
}
Connections of spatial accessories will be reflected in the spatialAccessories array of the GCSpatialAccessory class when the message posts.
Declaration
public struct DidConnectMessage : NotificationCenter.MainActorMessage {
/// A type which you can optionally post and observe along with this `MainActorMessage`.
public typealias Subject = GCSpatialAccessory
/// A optional name corresponding to this type, used to interoperate with notification posters and observers.
public static var name: Notification.Name { get }
/// The spatial accessory object that connected to the device.
public var spatialAccessory: GCSpatialAccessory
public init(spatialAccessory: GCSpatialAccessory)
/// Converts a posted notification into this main actor message type for any observers.
///
/// To implement this method in your own `MainActorMessage` conformance, retrieve values from the ``Notification``'s ``Notification/userInfo`` and set them as properties on the message.
/// - Parameter notification: The posted ``Notification``.
/// - Returns: The converted `MainActorMessage` or `nil` if conversion is not possible.
@MainActor public static func makeMessage(_ notification: Notification) -> GCSpatialAccessory.DidConnectMessage?
}
struct
GCSpatialAccessory.DidDisconnectMessage
NewvisionOSpublic struct DidDisconnectMessage : NotificationCenter.MainActorMessage
A message that posts after a spatial accessory disconnects from the device.
Use the .didDisconnect identifier with NotificationCenter to listen for this message.
let observation = NotificationCenter.default.addObserver(of: GCSpatialAccessory.self, for: .didDisconnect) { message in
let spatialAccessory = message.spatialAccessory
}
Declaration
public struct DidDisconnectMessage : NotificationCenter.MainActorMessage {
/// A type which you can optionally post and observe along with this `MainActorMessage`.
public typealias Subject = GCSpatialAccessory
/// A optional name corresponding to this type, used to interoperate with notification posters and observers.
public static var name: Notification.Name { get }
/// The spatial object that disconnected from the device.
public var spatialAccessory: GCSpatialAccessory
public init(spatialAccessory: GCSpatialAccessory)
/// Converts a posted notification into this main actor message type for any observers.
///
/// To implement this method in your own `MainActorMessage` conformance, retrieve values from the ``Notification``'s ``Notification/userInfo`` and set them as properties on the message.
/// - Parameter notification: The posted ``Notification``.
/// - Returns: The converted `MainActorMessage` or `nil` if conversion is not possible.
@MainActor public static func makeMessage(_ notification: Notification) -> GCSpatialAccessory.DidDisconnectMessage?
}
let
NSNotification.Name.GCSpatialAccessoryDidConnect
NewvisionOSpublic static let GCSpatialAccessoryDidConnect: NSNotification.Name
let
NSNotification.Name.GCSpatialAccessoryDidDisconnect
NewvisionOSpublic static let GCSpatialAccessoryDidDisconnect: NSNotification.Name
No APIs match your filter.