Exemple #1
0
 /// <summary>
 /// <para> Asynchronous call to check if an executable file has been signed using the public key set on the signing tab</para>
 /// <para> of the partner site, for example to refuse to load modified executable files.</para>
 /// <para> The result is returned in CheckFileSignature_t.</para>
 /// <para>   k_ECheckFileSignatureNoSignaturesFoundForThisApp - This app has not been configured on the signing tab of the partner site to enable this function.</para>
 /// <para>   k_ECheckFileSignatureNoSignaturesFoundForThisFile - This file is not listed on the signing tab for the partner site.</para>
 /// <para>   k_ECheckFileSignatureFileNotFound - The file does not exist on disk.</para>
 /// <para>   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.</para>
 /// <para>   k_ECheckFileSignatureValidSignature - The file is signed and the signature is valid.</para>
 /// </summary>
 public static SteamAPICall_t CheckFileSignature(string szFileName)
 {
     InteropHelp.TestIfAvailableClient();
     using (var szFileName2 = new InteropHelp.UTF8StringHandle(szFileName)) {
         return((SteamAPICall_t)NativeMethods.ISteamUtils_CheckFileSignature(CSteamAPIContext.GetSteamUtils(), szFileName2));
     }
 }
Exemple #2
0
 public static bool ShowGamepadTextInput(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText)
 {
     InteropHelp.TestIfAvailableClient();
     using InteropHelp.UTF8StringHandle pchDescription2  = new InteropHelp.UTF8StringHandle(pchDescription);
     using InteropHelp.UTF8StringHandle pchExistingText2 = new InteropHelp.UTF8StringHandle(pchExistingText);
     return(NativeMethods.ISteamUtils_ShowGamepadTextInput(CSteamAPIContext.GetSteamUtils(), eInputMode, eLineInputMode, pchDescription2, unCharMax, pchExistingText2));
 }
Exemple #3
0
        public static bool GetEnteredGamepadTextInput(out string pchText, uint cchText)
        {
            InteropHelp.TestIfAvailableClient();
            IntPtr pchText2 = Marshal.AllocHGlobal((int)cchText);
            bool   ret      = NativeMethods.ISteamUtils_GetEnteredGamepadTextInput(CSteamAPIContext.GetSteamUtils(), pchText2, cchText);

            pchText = ret ? InteropHelp.PtrToStringUTF8(pchText2) : null;
            Marshal.FreeHGlobal(pchText2);
            return(ret);
        }
Exemple #4
0
        public static bool GetEnteredGamepadTextInput(out string pchText, uint cchText)
        {
            InteropHelp.TestIfAvailableClient();
            IntPtr intPtr = Marshal.AllocHGlobal((int)cchText);
            bool   flag   = NativeMethods.ISteamUtils_GetEnteredGamepadTextInput(CSteamAPIContext.GetSteamUtils(), intPtr, cchText);

            pchText = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null);
            Marshal.FreeHGlobal(intPtr);
            return(flag);
        }
Exemple #5
0
        /// <summary>
        /// <para> Filters the provided input message and places the filtered result into pchOutFilteredText, using legally required filtering and additional filtering based on the context and user settings</para>
        /// <para>   eContext is the type of content in the input string</para>
        /// <para>   sourceSteamID is the Steam ID that is the source of the input string (e.g. the player with the name, or who said the chat text)</para>
        /// <para>   pchInputText is the input string that should be filtered, which can be ASCII or UTF-8</para>
        /// <para>   pchOutFilteredText is where the output will be placed, even if no filtering is performed</para>
        /// <para>   nByteSizeOutFilteredText is the size (in bytes) of pchOutFilteredText, should be at least strlen(pchInputText)+1</para>
        /// <para> Returns the number of characters (not bytes) filtered</para>
        /// </summary>
        public static int FilterText(ETextFilteringContext eContext, CSteamID sourceSteamID, string pchInputMessage, out string pchOutFilteredText, uint nByteSizeOutFilteredText)
        {
            InteropHelp.TestIfAvailableClient();
            IntPtr pchOutFilteredText2 = Marshal.AllocHGlobal((int)nByteSizeOutFilteredText);

            using (var pchInputMessage2 = new InteropHelp.UTF8StringHandle(pchInputMessage)) {
                int ret = NativeMethods.ISteamUtils_FilterText(CSteamAPIContext.GetSteamUtils(), eContext, sourceSteamID, pchInputMessage2, pchOutFilteredText2, nByteSizeOutFilteredText);
                pchOutFilteredText = ret != -1 ? InteropHelp.PtrToStringUTF8(pchOutFilteredText2) : null;
                Marshal.FreeHGlobal(pchOutFilteredText2);
                return(ret);
            }
        }
Exemple #6
0
        public static int FilterText(out string pchOutFilteredText, uint nByteSizeOutFilteredText, string pchInputMessage, bool bLegalOnly)
        {
            InteropHelp.TestIfAvailableClient();
            IntPtr intPtr = Marshal.AllocHGlobal((int)nByteSizeOutFilteredText);

            using InteropHelp.UTF8StringHandle pchInputMessage2 = new InteropHelp.UTF8StringHandle(pchInputMessage);
            int num = NativeMethods.ISteamUtils_FilterText(CSteamAPIContext.GetSteamUtils(), intPtr, nByteSizeOutFilteredText, pchInputMessage2, bLegalOnly);

            pchOutFilteredText = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null);
            Marshal.FreeHGlobal(intPtr);
            return(num);
        }
Exemple #7
0
 /// <summary>
 /// <para> Returns true if the HMD content will be streamed via Steam Remote Play</para>
 /// </summary>
 public static bool IsVRHeadsetStreamingEnabled()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_IsVRHeadsetStreamingEnabled(CSteamAPIContext.GetSteamUtils()));
 }
Exemple #8
0
 /// <summary>
 /// <para> ask SteamUI to create and render its OpenVR dashboard</para>
 /// </summary>
 public static void StartVRDashboard()
 {
     InteropHelp.TestIfAvailableClient();
     NativeMethods.ISteamUtils_StartVRDashboard(CSteamAPIContext.GetSteamUtils());
 }
Exemple #9
0
 /// <summary>
 /// <para> returns the IP of the reporting server for valve - currently only used in Source engine games</para>
 /// </summary>
 public static bool GetCSERIPPort(out uint unIP, out ushort usPort)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetCSERIPPort(CSteamAPIContext.GetSteamUtils(), out unIP, out usPort));
 }
Exemple #10
0
 /// <summary>
 /// <para> returns true if the image exists, and valid sizes were filled out</para>
 /// </summary>
 public static bool GetImageSize(int iImage, out uint pnWidth, out uint pnHeight)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetImageSize(CSteamAPIContext.GetSteamUtils(), iImage, out pnWidth, out pnHeight));
 }
Exemple #11
0
 public static ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetAPICallFailureReason(CSteamAPIContext.GetSteamUtils(), hSteamAPICall));
 }
Exemple #12
0
 /// <summary>
 /// <para> Initializes text filtering.</para>
 /// <para>   unFilterOptions are reserved for future use and should be set to 0</para>
 /// <para> Returns false if filtering is unavailable for the language the user is currently running in.</para>
 /// </summary>
 public static bool InitFilterText(uint unFilterOptions = 0)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_InitFilterText(CSteamAPIContext.GetSteamUtils(), unFilterOptions));
 }
Exemple #13
0
 /// <summary>
 /// <para> Returns previously entered text &amp; length</para>
 /// </summary>
 public static uint GetEnteredGamepadTextLength()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetEnteredGamepadTextLength(CSteamAPIContext.GetSteamUtils()));
 }
Exemple #14
0
 /// <summary>
 /// <para> Normally this call is unneeded if your game has a constantly running frame loop that calls the</para>
 /// <para> D3D Present API, or OGL SwapBuffers API every frame.</para>
 /// <para> However, if you have a game that only refreshes the screen on an event driven basis then that can break</para>
 /// <para> the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also</para>
 /// <para> need to Present() to the screen any time an even needing a notification happens or when the overlay is</para>
 /// <para> brought up over the game by a user.  You can use this API to ask the overlay if it currently need a present</para>
 /// <para> in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you</para>
 /// <para> refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.</para>
 /// </summary>
 public static bool BOverlayNeedsPresent()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_BOverlayNeedsPresent(CSteamAPIContext.GetSteamUtils()));
 }
Exemple #15
0
 /// <summary>
 /// <para> API warning handling</para>
 /// <para> 'int' is the severity; 0 for msg, 1 for warning</para>
 /// <para> 'const char *' is the text of the message</para>
 /// <para> callbacks will occur directly after the API function is called that generated the warning or message</para>
 /// </summary>
 public static void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction)
 {
     InteropHelp.TestIfAvailableClient();
     NativeMethods.ISteamUtils_SetWarningMessageHook(CSteamAPIContext.GetSteamUtils(), pFunction);
 }
Exemple #16
0
 /// <summary>
 /// <para> returns the number of IPC calls made since the last time this function was called</para>
 /// <para> Used for perf debugging so you can understand how many IPC calls your game makes per frame</para>
 /// <para> Every IPC call is at minimum a thread context switch if not a process one so you want to rate</para>
 /// <para> control how often you do them.</para>
 /// </summary>
 public static uint GetIPCCallCount()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetIPCCallCount(CSteamAPIContext.GetSteamUtils()));
 }
Exemple #17
0
 public static bool GetAPICallResult(SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, out bool pbFailed)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetAPICallResult(CSteamAPIContext.GetSteamUtils(), hSteamAPICall, pCallback, cubCallback, iCallbackExpected, out pbFailed));
 }
Exemple #18
0
 /// <summary>
 /// <para> Set whether the HMD content will be streamed via Steam Remote Play</para>
 /// <para> If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be allowed.</para>
 /// <para> If this is set to false, then the application window will be streamed instead, and remote input will be allowed.</para>
 /// <para> The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game.</para>
 /// <para> (this is useful for games that have asymmetric multiplayer gameplay)</para>
 /// </summary>
 public static void SetVRHeadsetStreamingEnabled(bool bEnabled)
 {
     InteropHelp.TestIfAvailableClient();
     NativeMethods.ISteamUtils_SetVRHeadsetStreamingEnabled(CSteamAPIContext.GetSteamUtils(), bEnabled);
 }
Exemple #19
0
 /// <summary>
 /// <para> Returns whether this steam client is a Steam China specific client, vs the global client.</para>
 /// </summary>
 public static bool IsSteamChinaLauncher()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_IsSteamChinaLauncher(CSteamAPIContext.GetSteamUtils()));
 }
Exemple #20
0
 /// <summary>
 /// <para> Return what we believe your current ipv6 connectivity to "the internet" is on the specified protocol.</para>
 /// <para> This does NOT tell you if the Steam client is currently connected to Steam via ipv6.</para>
 /// </summary>
 public static ESteamIPv6ConnectivityState GetIPv6ConnectivityState(ESteamIPv6ConnectivityProtocol eProtocol)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetIPv6ConnectivityState(CSteamAPIContext.GetSteamUtils(), eProtocol));
 }
Exemple #21
0
 /// <summary>
 /// <para> Steam server time.  Number of seconds since January 1, 1970, GMT (i.e unix time)</para>
 /// </summary>
 public static uint GetServerRealTime()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetServerRealTime(CSteamAPIContext.GetSteamUtils()));
 }
Exemple #22
0
 /// <summary>
 /// <para> API asynchronous call results</para>
 /// <para> can be used directly, but more commonly used via the callback dispatch API (see steam_api.h)</para>
 /// </summary>
 public static bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, out bool pbFailed)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_IsAPICallCompleted(CSteamAPIContext.GetSteamUtils(), hSteamAPICall, out pbFailed));
 }
Exemple #23
0
 /// <summary>
 /// <para> the universe this client is connecting to</para>
 /// </summary>
 public static EUniverse GetConnectedUniverse()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetConnectedUniverse(CSteamAPIContext.GetSteamUtils()));
 }
Exemple #24
0
 /// <summary>
 /// <para> returns true if Steam itself is running in VR mode</para>
 /// </summary>
 public static bool IsSteamRunningInVR()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_IsSteamRunningInVR(CSteamAPIContext.GetSteamUtils()));
 }
Exemple #25
0
 /// <summary>
 /// <para> 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)</para>
 /// <para> e.g "US" or "UK".</para>
 /// </summary>
 public static string GetIPCountry()
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUtils_GetIPCountry(CSteamAPIContext.GetSteamUtils())));
 }
Exemple #26
0
 /// <summary>
 /// <para> Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition.</para>
 /// </summary>
 public static void SetOverlayNotificationInset(int nHorizontalInset, int nVerticalInset)
 {
     InteropHelp.TestIfAvailableClient();
     NativeMethods.ISteamUtils_SetOverlayNotificationInset(CSteamAPIContext.GetSteamUtils(), nHorizontalInset, nVerticalInset);
 }
Exemple #27
0
 /// <summary>
 /// <para> returns true if the image exists, and the buffer was successfully filled out</para>
 /// <para> results are returned in RGBA format</para>
 /// <para> the destination buffer size should be 4 * height * width * sizeof(char)</para>
 /// </summary>
 public static bool GetImageRGBA(int iImage, byte[] pubDest, int nDestBufferSize)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetImageRGBA(CSteamAPIContext.GetSteamUtils(), iImage, pubDest, nDestBufferSize));
 }
Exemple #28
0
 public static uint GetSecondsSinceComputerActive()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetSecondsSinceComputerActive(CSteamAPIContext.GetSteamUtils()));
 }
Exemple #29
0
 /// <summary>
 /// <para> return the amount of battery power left in the current system in % [0..100], 255 for being on AC power</para>
 /// </summary>
 public static byte GetCurrentBatteryPower()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetCurrentBatteryPower(CSteamAPIContext.GetSteamUtils()));
 }
Exemple #30
0
 /// <summary>
 /// <para> returns true if Steam &amp; the Steam Overlay are running in Big Picture mode</para>
 /// <para> Games much be launched through the Steam client to enable the Big Picture overlay. During development,</para>
 /// <para> a game can be added as a non-steam game to the developers library to test this feature</para>
 /// </summary>
 public static bool IsSteamInBigPictureMode()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_IsSteamInBigPictureMode(CSteamAPIContext.GetSteamUtils()));
 }