C# 클래스 Steamworks.SteamGameServerUtils

파일 보기 프로젝트 열기: rlabrecque/Steamworks.NET

공개 메소드들

메소드 설명
BOverlayNeedsPresent ( ) : bool

Normally this call is unneeded if your game has a constantly running frame loop that calls the

D3D Present API, or OGL SwapBuffers API every frame.

However, if you have a game that only refreshes the screen on an event driven basis then that can break

the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also

need to Present() to the screen any time an even needing a notification happens or when the overlay is

brought up over the game by a user. You can use this API to ask the overlay if it currently need a present

in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you

refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.

CheckFileSignature ( string szFileName ) : SteamAPICall_t

Asynchronous call to check if an executable file has been signed using the public key set on the signing tab

of the partner site, for example to refuse to load modified executable files.

The result is returned in CheckFileSignature_t.

k_ECheckFileSignatureNoSignaturesFoundForThisApp - This app has not been configured on the signing tab of the partner site to enable this function.

k_ECheckFileSignatureNoSignaturesFoundForThisFile - This file is not listed on the signing tab for the partner site.

k_ECheckFileSignatureFileNotFound - The file does not exist on disk.

k_ECheckFileSignatureInvalidSignature - The file exists, and the signing tab has been set for this file, but the file is either not signed or the signature does not match.

k_ECheckFileSignatureValidSignature - The file is signed and the signature is valid.

GetAPICallFailureReason ( SteamAPICall_t hSteamAPICall ) : ESteamAPICallFailure
GetAPICallResult ( SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, bool &pbFailed ) : bool
GetAppID ( ) : AppId_t

returns the appID of the current process

GetCSERIPPort ( uint &unIP, ushort &usPort ) : bool

returns the IP of the reporting server for valve - currently only used in Source engine games

GetConnectedUniverse ( ) : EUniverse

the universe this client is connecting to

GetCurrentBatteryPower ( ) : byte

return the amount of battery power left in the current system in % [0..100], 255 for being on AC power

GetEnteredGamepadTextInput ( string &pchText, uint cchText ) : bool
GetEnteredGamepadTextLength ( ) : uint

Returns previously entered text & length

GetIPCCallCount ( ) : uint

returns the number of IPC calls made since the last time this function was called

Used for perf debugging so you can understand how many IPC calls your game makes per frame

Every IPC call is at minimum a thread context switch if not a process one so you want to rate

control how often you do them.

GetIPCountry ( ) : string

returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database)

e.g "US" or "UK".

GetImageRGBA ( int iImage, byte pubDest, int nDestBufferSize ) : bool

returns true if the image exists, and the buffer was successfully filled out

results are returned in RGBA format

the destination buffer size should be 4 * height * width * sizeof(char)

GetImageSize ( int iImage, uint &pnWidth, uint &pnHeight ) : bool

returns true if the image exists, and valid sizes were filled out

GetSecondsSinceAppActive ( ) : uint

return the number of seconds since the user

GetSecondsSinceComputerActive ( ) : uint
GetServerRealTime ( ) : uint

Steam server time. Number of seconds since January 1, 1970, GMT (i.e unix time)

GetSteamUILanguage ( ) : string

returns the language the steam client is running in, you probably want ISteamApps::GetCurrentGameLanguage instead, this is for very special usage cases

IsAPICallCompleted ( SteamAPICall_t hSteamAPICall, bool &pbFailed ) : bool

API asynchronous call results

can be used directly, but more commonly used via the callback dispatch API (see steam_api.h)

IsOverlayEnabled ( ) : bool

Returns true if the overlay is running & the user can access it. The overlay process could take a few seconds to

start & hook the game process, so this function will initially return false while the overlay is loading.

IsSteamInBigPictureMode ( ) : bool

returns true if Steam & the Steam Overlay are running in Big Picture mode

Games much be launched through the Steam client to enable the Big Picture overlay. During development,

a game can be added as a non-steam game to the developers library to test this feature

IsSteamRunningInVR ( ) : bool

returns true if Steam itself is running in VR mode

SetOverlayNotificationInset ( int nHorizontalInset, int nVerticalInset ) : void

Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition.

SetOverlayNotificationPosition ( ENotificationPosition eNotificationPosition ) : void

Sets the position where the overlay instance for the currently calling game should show notifications.

This position is per-game and if this function is called from outside of a game context it will do nothing.

SetWarningMessageHook ( SteamAPIWarningMessageHook_t pFunction ) : void

API warning handling

'int' is the severity; 0 for msg, 1 for warning

'const char *' is the text of the message

callbacks will occur directly after the API function is called that generated the warning or message

ShowGamepadTextInput ( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText ) : bool

Activates the Big Picture text input dialog which only supports gamepad input

StartVRDashboard ( ) : void

ask SteamUI to create and render its OpenVR dashboard

메소드 상세

BOverlayNeedsPresent() 공개 정적인 메소드

Normally this call is unneeded if your game has a constantly running frame loop that calls the

D3D Present API, or OGL SwapBuffers API every frame.

However, if you have a game that only refreshes the screen on an event driven basis then that can break

the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also

need to Present() to the screen any time an even needing a notification happens or when the overlay is

brought up over the game by a user. You can use this API to ask the overlay if it currently need a present

in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you

refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.

public static BOverlayNeedsPresent ( ) : bool
리턴 bool

CheckFileSignature() 공개 정적인 메소드

Asynchronous call to check if an executable file has been signed using the public key set on the signing tab

of the partner site, for example to refuse to load modified executable files.

The result is returned in CheckFileSignature_t.

k_ECheckFileSignatureNoSignaturesFoundForThisApp - This app has not been configured on the signing tab of the partner site to enable this function.

k_ECheckFileSignatureNoSignaturesFoundForThisFile - This file is not listed on the signing tab for the partner site.

k_ECheckFileSignatureFileNotFound - The file does not exist on disk.

k_ECheckFileSignatureInvalidSignature - The file exists, and the signing tab has been set for this file, but the file is either not signed or the signature does not match.

k_ECheckFileSignatureValidSignature - The file is signed and the signature is valid.

public static CheckFileSignature ( string szFileName ) : SteamAPICall_t
szFileName string
리턴 SteamAPICall_t

GetAPICallFailureReason() 공개 정적인 메소드

public static GetAPICallFailureReason ( SteamAPICall_t hSteamAPICall ) : ESteamAPICallFailure
hSteamAPICall SteamAPICall_t
리턴 ESteamAPICallFailure

GetAPICallResult() 공개 정적인 메소드

public static GetAPICallResult ( SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, bool &pbFailed ) : bool
hSteamAPICall SteamAPICall_t
pCallback System.IntPtr
cubCallback int
iCallbackExpected int
pbFailed bool
리턴 bool

GetAppID() 공개 정적인 메소드

returns the appID of the current process

public static GetAppID ( ) : AppId_t
리턴 AppId_t

GetCSERIPPort() 공개 정적인 메소드

returns the IP of the reporting server for valve - currently only used in Source engine games

public static GetCSERIPPort ( uint &unIP, ushort &usPort ) : bool
unIP uint
usPort ushort
리턴 bool

GetConnectedUniverse() 공개 정적인 메소드

the universe this client is connecting to

public static GetConnectedUniverse ( ) : EUniverse
리턴 EUniverse

GetCurrentBatteryPower() 공개 정적인 메소드

return the amount of battery power left in the current system in % [0..100], 255 for being on AC power

public static GetCurrentBatteryPower ( ) : byte
리턴 byte

GetEnteredGamepadTextInput() 공개 정적인 메소드

public static GetEnteredGamepadTextInput ( string &pchText, uint cchText ) : bool
pchText string
cchText uint
리턴 bool

GetEnteredGamepadTextLength() 공개 정적인 메소드

Returns previously entered text & length

public static GetEnteredGamepadTextLength ( ) : uint
리턴 uint

GetIPCCallCount() 공개 정적인 메소드

returns the number of IPC calls made since the last time this function was called

Used for perf debugging so you can understand how many IPC calls your game makes per frame

Every IPC call is at minimum a thread context switch if not a process one so you want to rate

control how often you do them.

public static GetIPCCallCount ( ) : uint
리턴 uint

GetIPCountry() 공개 정적인 메소드

returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database)

e.g "US" or "UK".

public static GetIPCountry ( ) : string
리턴 string

GetImageRGBA() 공개 정적인 메소드

returns true if the image exists, and the buffer was successfully filled out

results are returned in RGBA format

the destination buffer size should be 4 * height * width * sizeof(char)

public static GetImageRGBA ( int iImage, byte pubDest, int nDestBufferSize ) : bool
iImage int
pubDest byte
nDestBufferSize int
리턴 bool

GetImageSize() 공개 정적인 메소드

returns true if the image exists, and valid sizes were filled out

public static GetImageSize ( int iImage, uint &pnWidth, uint &pnHeight ) : bool
iImage int
pnWidth uint
pnHeight uint
리턴 bool

GetSecondsSinceAppActive() 공개 정적인 메소드

return the number of seconds since the user

public static GetSecondsSinceAppActive ( ) : uint
리턴 uint

GetSecondsSinceComputerActive() 공개 정적인 메소드

public static GetSecondsSinceComputerActive ( ) : uint
리턴 uint

GetServerRealTime() 공개 정적인 메소드

Steam server time. Number of seconds since January 1, 1970, GMT (i.e unix time)

public static GetServerRealTime ( ) : uint
리턴 uint

GetSteamUILanguage() 공개 정적인 메소드

returns the language the steam client is running in, you probably want ISteamApps::GetCurrentGameLanguage instead, this is for very special usage cases

public static GetSteamUILanguage ( ) : string
리턴 string

IsAPICallCompleted() 공개 정적인 메소드

API asynchronous call results

can be used directly, but more commonly used via the callback dispatch API (see steam_api.h)

public static IsAPICallCompleted ( SteamAPICall_t hSteamAPICall, bool &pbFailed ) : bool
hSteamAPICall SteamAPICall_t
pbFailed bool
리턴 bool

IsOverlayEnabled() 공개 정적인 메소드

Returns true if the overlay is running & the user can access it. The overlay process could take a few seconds to

start & hook the game process, so this function will initially return false while the overlay is loading.

public static IsOverlayEnabled ( ) : bool
리턴 bool

IsSteamInBigPictureMode() 공개 정적인 메소드

returns true if Steam & the Steam Overlay are running in Big Picture mode

Games much be launched through the Steam client to enable the Big Picture overlay. During development,

a game can be added as a non-steam game to the developers library to test this feature

public static IsSteamInBigPictureMode ( ) : bool
리턴 bool

IsSteamRunningInVR() 공개 정적인 메소드

returns true if Steam itself is running in VR mode

public static IsSteamRunningInVR ( ) : bool
리턴 bool

SetOverlayNotificationInset() 공개 정적인 메소드

Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition.

public static SetOverlayNotificationInset ( int nHorizontalInset, int nVerticalInset ) : void
nHorizontalInset int
nVerticalInset int
리턴 void

SetOverlayNotificationPosition() 공개 정적인 메소드

Sets the position where the overlay instance for the currently calling game should show notifications.

This position is per-game and if this function is called from outside of a game context it will do nothing.

public static SetOverlayNotificationPosition ( ENotificationPosition eNotificationPosition ) : void
eNotificationPosition ENotificationPosition
리턴 void

SetWarningMessageHook() 공개 정적인 메소드

API warning handling

'int' is the severity; 0 for msg, 1 for warning

'const char *' is the text of the message

callbacks will occur directly after the API function is called that generated the warning or message

public static SetWarningMessageHook ( SteamAPIWarningMessageHook_t pFunction ) : void
pFunction SteamAPIWarningMessageHook_t
리턴 void

ShowGamepadTextInput() 공개 정적인 메소드

Activates the Big Picture text input dialog which only supports gamepad input

public static ShowGamepadTextInput ( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText ) : bool
eInputMode EGamepadTextInputMode
eLineInputMode EGamepadTextInputLineMode
pchDescription string
unCharMax uint
pchExistingText string
리턴 bool

StartVRDashboard() 공개 정적인 메소드

ask SteamUI to create and render its OpenVR dashboard

public static StartVRDashboard ( ) : void
리턴 void