SteamUtils

Swift
public struct SteamUtils: Sendable

Steamworks ISteamUtils

Access via utils through a SteamAPI or SteamGameServerAPI instance.


Topics

func overlayNeedsPresent() -> Bool

Steamworks ISteamUtils::BOverlayNeedsPresent()

Declaration
Swift
public func overlayNeedsPresent() -> Bool

func checkFileSignature(fileName: String, completion: (CheckFileSignature?) -> Void)

Steamworks ISteamUtils::CheckFileSignature(), callback

Declaration
Swift
public func checkFileSignature(
    fileName: String, completion: @escaping (CheckFileSignature?) -> Void)

func checkFileSignature(fileName: String) async -> CheckFileSignature?

Steamworks ISteamUtils::CheckFileSignature(), async

Declaration
Swift
public func checkFileSignature(fileName: String) async -> CheckFileSignature?

func dismissFloatingGamepadTextInput() -> Bool

Steamworks ISteamUtils::DismissFloatingGamepadTextInput()

Declaration
Swift
public func dismissFloatingGamepadTextInput() -> Bool

func filterText(context: TextFilteringContext, steamID: SteamID, inputMessage: String, byteSizeOutFilteredText: Int) -> (rc: Int, filteredText: String)

Steamworks ISteamUtils::FilterText()

Declaration
Swift
public func filterText(
    context: TextFilteringContext, steamID: SteamID, inputMessage: String,
    byteSizeOutFilteredText: Int
) -> (rc: Int, filteredText: String)

func getAPICallFailureReason(steamAPICall: SteamAPICall) -> SteamAPICallFailure

Steamworks ISteamUtils::GetAPICallFailureReason()

Declaration
Swift
public func getAPICallFailureReason(steamAPICall: SteamAPICall)
    -> SteamAPICallFailure

func getAPICallResult(steamAPICall: SteamAPICall, callback: UnsafeMutableRawPointer, callbackSize: Int, callbackExpectedIndex: Int) -> (rc: Bool, failed: Bool)

Steamworks ISteamUtils::GetAPICallResult()

Declaration
Swift
public func getAPICallResult(
    steamAPICall: SteamAPICall, callback: UnsafeMutableRawPointer,
    callbackSize: Int, callbackExpectedIndex: Int
) -> (rc: Bool, failed: Bool)

func getAppID() -> AppID

Steamworks ISteamUtils::GetAppID()

Declaration
Swift
public func getAppID() -> AppID

func getConnectedUniverse() -> Universe

Steamworks ISteamUtils::GetConnectedUniverse()

Declaration
Swift
public func getConnectedUniverse() -> Universe

func getCurrentBatteryPower() -> UInt8

Steamworks ISteamUtils::GetCurrentBatteryPower()

Declaration
Swift
public func getCurrentBatteryPower() -> UInt8

func getEnteredGamepadTextInput(textSize: Int) -> (rc: Bool, text: String)

Steamworks ISteamUtils::GetEnteredGamepadTextInput()

Declaration
Swift
public func getEnteredGamepadTextInput(textSize: Int) -> (
    rc: Bool, text: String
)

func getEnteredGamepadTextLength() -> Int

Steamworks ISteamUtils::GetEnteredGamepadTextLength()

Declaration
Swift
public func getEnteredGamepadTextLength() -> Int

func getIPCCallCount() -> Int

Steamworks ISteamUtils::GetIPCCallCount()

Declaration
Swift
public func getIPCCallCount() -> Int

func getIPCountry() -> String

Steamworks ISteamUtils::GetIPCountry()

Declaration
Swift
public func getIPCountry() -> String

func getIPv6ConnectivityState(protocol: SteamIPv6ConnectivityProtocol) -> SteamIPv6ConnectivityState

Steamworks ISteamUtils::GetIPv6ConnectivityState()

Declaration
Swift
public func getIPv6ConnectivityState(protocol: SteamIPv6ConnectivityProtocol)
    -> SteamIPv6ConnectivityState

func getImageRGBA(imageIndex: Int, destBufferSize: Int) -> (rc: Bool, dest: [UInt8])

Steamworks ISteamUtils::GetImageRGBA()

Declaration
Swift
public func getImageRGBA(imageIndex: Int, destBufferSize: Int) -> (
    rc: Bool, dest: [UInt8]
)

func getImageSize(imageIndex: Int) -> (rc: Bool, width: Int, height: Int)

Steamworks ISteamUtils::GetImageSize()

Declaration
Swift
public func getImageSize(imageIndex: Int) -> (rc: Bool, width: Int, height: Int)

func getSecondsSinceAppActive() -> Int

Steamworks ISteamUtils::GetSecondsSinceAppActive()

Declaration
Swift
public func getSecondsSinceAppActive() -> Int

func getSecondsSinceComputerActive() -> Int

Steamworks ISteamUtils::GetSecondsSinceComputerActive()

Declaration
Swift
public func getSecondsSinceComputerActive() -> Int

func getServerRealTime() -> RTime32

Steamworks ISteamUtils::GetServerRealTime()

Declaration
Swift
public func getServerRealTime() -> RTime32

func getSteamUILanguage() -> String

Steamworks ISteamUtils::GetSteamUILanguage()

Declaration
Swift
public func getSteamUILanguage() -> String

func initFilterText(filterOptions: Int) -> Bool

Steamworks ISteamUtils::InitFilterText()

Declaration
Swift
public func initFilterText(filterOptions: Int = 0) -> Bool

func isAPICallCompleted(steamAPICall: SteamAPICall) -> (rc: Bool, failed: Bool)

Steamworks ISteamUtils::IsAPICallCompleted()

Declaration
Swift
public func isAPICallCompleted(steamAPICall: SteamAPICall) -> (
    rc: Bool, failed: Bool
)

func isOverlayEnabled() -> Bool

Steamworks ISteamUtils::IsOverlayEnabled()

Declaration
Swift
public func isOverlayEnabled() -> Bool

func isSteamChinaLauncher() -> Bool

Steamworks ISteamUtils::IsSteamChinaLauncher()

Declaration
Swift
public func isSteamChinaLauncher() -> Bool

func isSteamInBigPictureMode() -> Bool

Steamworks ISteamUtils::IsSteamInBigPictureMode()

Declaration
Swift
public func isSteamInBigPictureMode() -> Bool

func isSteamRunningInVR() -> Bool

Steamworks ISteamUtils::IsSteamRunningInVR()

Declaration
Swift
public func isSteamRunningInVR() -> Bool

func isSteamRunningOnSteamDeck() -> Bool

Steamworks ISteamUtils::IsSteamRunningOnSteamDeck()

Declaration
Swift
public func isSteamRunningOnSteamDeck() -> Bool

func isVRHeadsetStreamingEnabled() -> Bool

Steamworks ISteamUtils::IsVRHeadsetStreamingEnabled()

Declaration
Swift
public func isVRHeadsetStreamingEnabled() -> Bool

func setGameLauncherMode(launcherMode: Bool)

Steamworks ISteamUtils::SetGameLauncherMode()

Declaration
Swift
public func setGameLauncherMode(launcherMode: Bool)

func setOverlayNotificationInset(horizontalInset: Int, verticalInset: Int)

Steamworks ISteamUtils::SetOverlayNotificationInset()

Declaration
Swift
public func setOverlayNotificationInset(
    horizontalInset: Int, verticalInset: Int)

func setOverlayNotificationPosition(notificationPosition: NotificationPosition)

Steamworks ISteamUtils::SetOverlayNotificationPosition()

Declaration
Swift
public func setOverlayNotificationPosition(
    notificationPosition: NotificationPosition)

func setVRHeadsetStreamingEnabled(enabled: Bool)

Steamworks ISteamUtils::SetVRHeadsetStreamingEnabled()

Declaration
Swift
public func setVRHeadsetStreamingEnabled(enabled: Bool)

func setWarningMessageHook(function: SteamAPIWarningMessageHook)

Steamworks ISteamUtils::SetWarningMessageHook()

Declaration
Swift
public func setWarningMessageHook(function: SteamAPIWarningMessageHook)

func showFloatingGamepadTextInput(keyboardMode: FloatingGamepadTextInputMode, textFieldXPosition: Int, textFieldYPosition: Int, textFieldWidth: Int, textFieldHeight: Int) -> Bool

Steamworks ISteamUtils::ShowFloatingGamepadTextInput()

Declaration
Swift
public func showFloatingGamepadTextInput(
    keyboardMode: FloatingGamepadTextInputMode, textFieldXPosition: Int,
    textFieldYPosition: Int, textFieldWidth: Int, textFieldHeight: Int
) -> Bool

func showGamepadTextInput(inputMode: GamepadTextInputMode, lineInputMode: GamepadTextInputLineMode, description: String, charMax: Int, existingText: String) -> Bool

Steamworks ISteamUtils::ShowGamepadTextInput()

Declaration
Swift
public func showGamepadTextInput(
    inputMode: GamepadTextInputMode, lineInputMode: GamepadTextInputLineMode,
    description: String, charMax: Int, existingText: String
) -> Bool

func startVRDashboard()

Steamworks ISteamUtils::StartVRDashboard()

Declaration
Swift
public func startVRDashboard()

func getEnteredGamepadTextInput() -> (rc: Bool, text: String)

Steamworks ISteamUtils::GetEnteredGamepadTextInput()

Declaration
Swift
public func getEnteredGamepadTextInput() -> (rc: Bool, text: String)

func filterText(context: TextFilteringContext, steamID: SteamID, inputMessage: String) -> (rc: Int, filteredText: String)

Note

Provided by module SteamworksHelpers.

Steamworks ISteamUtils::FilterText()

Declaration
Swift
public func filterText(
    context: TextFilteringContext, steamID: SteamID, inputMessage: String
) -> (rc: Int, filteredText: String)

func getImageRGBA(imageIndex: Int) -> (rc: Bool, width: Int, height: Int, dest: [UInt8])

Note

Provided by module SteamworksHelpers.

Steamworks ISteamUtils::GetImageRGBA()

Declaration
Swift
public func getImageRGBA(imageIndex: Int) -> (
    rc: Bool, width: Int, height: Int, dest: [UInt8]
)