diff --git a/Readme.txt b/Readme.txt index ef2f961..1a5c49a 100644 --- a/Readme.txt +++ b/Readme.txt @@ -1,6 +1,6 @@ ================================================================ -Copyright © 1996-2018, Valve Corporation, All rights reserved. +Copyright © 1996-2019, Valve Corporation, All rights reserved. ================================================================ @@ -8,6 +8,46 @@ Copyright Welcome to the Steamworks SDK. For documentation please see our partner website at: http://partner.steamgames.com +---------------------------------------------------------------- +v1.43 20th February 2019 +---------------------------------------------------------------- + +ISteamParties +* This API can be used to selectively advertise your multiplayer game session in a Steam chat room group. Tell Steam the number of player spots that are available for your party, and a join-game string, and it will show a beacon in the selected group and allow that many users to “follow” the beacon to your party. Adjust the number of open slots if other players join through alternate matchmaking methods. + +ISteamController +* This interface will be deprecated and replaced with ISteamInput. For ease in upgrading the SDK ISteamController currently has feature parity with ISteamInput, but future features may not be ported back. Please use ISteamInput for new projects. +* Added GetActionOriginFromXboxOrigin, GetStringForXboxOrigin and GetGlyphForXboxOrigin to allow Xinput games to easily query glyphs for devices coming in through Steam Input’s Xinput emulation, ex: “A button”->”Cross button” on a PS4 controller. This is a simple translation of the button and does not take user remapping into account – the full action based API is required for that. +* Added TranslateActionOrigin which allows Steam Input API games to which are using look up tables to translate action origins from an recognized device released after the game was last built into origins they recognize. +* Added count and max_possible fields to current enums to make using lookup tables easier + +ISteamInput +* This new interface replaces ISteamController to better reflect the fact this API supports not just the Steam Controller but every controller connected to Steam – including Xbox Controllers, Playstation Controllers and Nintendo Switch controllers. ISteamController currently has feature parity with the new features added in ISteamInput but new feature may not be ported back. Please use this interface instead of ISteamController for any new projects. +* Migrating to ISteamInput from ISteamController should mostly be a search-replace operation but any action origin look up tables will need to be adjusted as some of the enum orders have changed. +* Added GetActionOriginFromXboxOrigin, GetStringForXboxOrigin and GetGlyphForXboxOrigin to allow Xinput games to easily query glyphs for devices coming in through Steam Input’s Xinput emulation, ex: “A button”->”Cross button” on a PS4 controller. This is a simple translation of the button and does not take user remapping into account – the full action based API is required for that. +* Added TranslateActionOrigin which allows Steam Input API games to which are using look up tables to translate action origins from an recognized device released after the game was last built into origins they recognize. +* Added count and max_possible fields to current enums to make using lookup tables easier + +ISteamFriends +* ActivateGameOverlayToWebPage – Added a new parameter to control how the created web browser window is displayed within the Steam Overlay. The default mode will create a new browser tab next to all other overlay windows that the user already has open. The new modal mode will create a new browser window and activate the Steam Overlay, showing only that window. When the browser window is closed, the Steam Overlay is automatically closed as well. + +ISteamInventory +* GetItemsWithPrices and GetItemPrice - Added the ability to get the “base price” for a set of items, which you can use to markup in your own UI that items are “on sale” + +ISteamUGC +* SetAllowLegacyUpload - Call to force the use of Steam Cloud for back-end storage (instead of Steam Pipe), which is faster and more efficient for uploading and downloading small files (less than 100MB). +* CreateQueryAllUGCRequest - Added ability to page through query results using a “cursor” instead of a page number. This is more efficient and supports “deep paging” beyond page 1000. The old version of CreateQueryAllUGCRequest() that takes a page parameter is deprecated and cannot query beyond page 1000. Note that you will need to keep track of the “previous” cursor in order to go to a previous page. + +ISteamApps +* GetLaunchCommandLine - Get command line if game was launched via Steam URL, e.g. steam://run////. If you get NewUrlLaunchParameters_t callback while running, call again to get new command line +* BIsSubscribedFromFamilySharing - Check if subscribed app is temporarily borrowed via Steam Family Sharing + +Steam API +* Refactored headers to minimize the number of headers that need to be included to use a single ISteam interface. +* Renamed some macros with STEAM_ prefix to minimize conflicts in the global namespace + + + ---------------------------------------------------------------- v1.42 3rd January 2018 ---------------------------------------------------------------- diff --git a/SteamworksExample/GameEngine.h b/SteamworksExample/GameEngine.h index 8ef813b..a40807b 100644 --- a/SteamworksExample/GameEngine.h +++ b/SteamworksExample/GameEngine.h @@ -77,6 +77,7 @@ enum ECONTROLLERACTIONSET { eControllerActionSet_ShipControls, eControllerActionSet_MenuControls, + eControllerActionSet_Layer_Thrust, eControllerActionSet_NumSets }; @@ -164,13 +165,13 @@ public: virtual bool BGetFirstKeyDown( DWORD *pdwVK ) = 0; // Return true if there is an active Steam Controller - virtual bool BIsSteamControllerActive() = 0; + virtual bool BIsSteamInputDeviceActive() = 0; // Get the current state of a controller action virtual bool BIsControllerActionActive( ECONTROLLERDIGITALACTION dwAction ) = 0; // Find an active Steam controller - virtual void FindActiveSteamController() = 0; + virtual void FindActiveSteamInputDevice() = 0; // Get the current state of a controller analog action virtual void GetControllerAnalogAction( ECONTROLLERANALOGACTION dwAction, float *x, float *y ) = 0; @@ -178,6 +179,13 @@ public: // Set the current Steam Controller Action set virtual void SetSteamControllerActionSet( ECONTROLLERACTIONSET dwActionSet ) = 0; + // Set an Action Set Layer for Steam Input + virtual void ActivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSet ) = 0; + virtual void DeactivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSet ) = 0; + + // Returns whether a given action set layer is active + virtual bool BIsActionSetLayerActive( ECONTROLLERACTIONSET dwActionSetLayer ) = 0; + // These calls return a string describing which controller button the action is currently bound to virtual const char *GetTextStringForControllerOriginDigital( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERDIGITALACTION dwDigitalAction ) = 0; virtual const char *GetTextStringForControllerOriginAnalog( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERANALOGACTION dwDigitalAction ) = 0; diff --git a/SteamworksExample/Main.cpp b/SteamworksExample/Main.cpp index febdb03..68cabbe 100644 --- a/SteamworksExample/Main.cpp +++ b/SteamworksExample/Main.cpp @@ -79,31 +79,33 @@ extern "C" void __cdecl SteamAPIDebugTextHook( int nSeverity, const char *pchDeb //----------------------------------------------------------------------------- // Purpose: Extracts some feature from the command line //----------------------------------------------------------------------------- -void ParseCommandLine( const char *pchCmdLine, const char **ppchServerAddress, const char **ppchLobbyID ) +bool ParseCommandLine( const char *pchCmdLine, const char **ppchServerAddress, const char **ppchLobbyID ) { // Look for the +connect ipaddress:port parameter in the command line, // Steam will pass this when a user has used the Steam Server browser to find // a server for our game and is trying to join it. - const char *pchConnectParam = "+connect"; + const char *pchConnectParam = "+connect "; const char *pchConnect = strstr( pchCmdLine, pchConnectParam ); *ppchServerAddress = NULL; - if ( pchConnect && strlen( pchCmdLine ) > (pchConnect - pchCmdLine) + strlen( pchConnectParam ) + 1 ) + if ( pchConnect && strlen( pchCmdLine ) > (pchConnect - pchCmdLine) + strlen( pchConnectParam ) ) { - // Address should be right after the +connect, +1 on the end to skip the space - *ppchServerAddress = pchCmdLine + ( pchConnect - pchCmdLine ) + strlen( pchConnectParam ) + 1; + // Address should be right after the +connect + *ppchServerAddress = pchCmdLine + ( pchConnect - pchCmdLine ) + strlen( pchConnectParam ); } // look for +connect_lobby lobbyid paramter on the command line // Steam will pass this in if a user taken up an invite to a lobby - const char *pchConnectLobbyParam = "+connect_lobby"; - const char *pchConnectLobby = strstr( pchCmdLine, pchConnectParam ); + const char *pchConnectLobbyParam = "+connect_lobby "; + const char *pchConnectLobby = strstr( pchCmdLine, pchConnectLobbyParam ); *ppchLobbyID = NULL; - if ( pchConnectLobby && strlen( pchCmdLine ) > (pchConnectLobby - pchCmdLine) + strlen( pchConnectLobbyParam ) + 1 ) + if ( pchConnectLobby && strlen( pchCmdLine ) > (pchConnectLobby - pchCmdLine) + strlen( pchConnectLobbyParam ) ) { - // Address should be right after the +connect, +1 on the end to skip the space - *ppchLobbyID = pchCmdLine + ( pchConnectLobby - pchCmdLine ) + strlen( pchConnectLobbyParam ) + 1; + // lobby ID should be right after the +connect_lobby + *ppchLobbyID = pchCmdLine + ( pchConnectLobby - pchCmdLine ) + strlen( pchConnectLobbyParam ); } + return *ppchServerAddress || *ppchLobbyID; + } @@ -216,7 +218,10 @@ static int RealMain( const char *pchCmdLine, HINSTANCE hInstance, int nCmdShow ) // have native Steam controller implementations char rgchCWD[1024]; - _getcwd( rgchCWD, sizeof( rgchCWD ) ); + if ( !_getcwd( rgchCWD, sizeof( rgchCWD ) ) ) + { + strcpy( rgchCWD, "." ); + } char rgchFullPath[1024]; #if defined(_WIN32) @@ -230,7 +235,19 @@ static int RealMain( const char *pchCmdLine, HINSTANCE hInstance, int nCmdShow ) #endif const char *pchServerAddress, *pchLobbyID; - ParseCommandLine( pchCmdLine, &pchServerAddress, &pchLobbyID ); + if ( !ParseCommandLine( pchCmdLine, &pchServerAddress, &pchLobbyID ) ) + { + // no connect string on process command line. If app was launched via a Steam URL, the extra command line parameters in that URL + // get be retrieved with GetLaunchCommandLine. This way an attacker can't put malicious parameters in the process command line + // which might allow much more functionality then indented. + + char szCommandLine[1024] = {}; + + if ( SteamApps()->GetLaunchCommandLine( szCommandLine, sizeof( szCommandLine ) ) > 0 ) + { + ParseCommandLine( szCommandLine, &pchServerAddress, &pchLobbyID ); + } + } // do a DRM self check Steamworks_SelfCheck(); @@ -248,13 +265,13 @@ static int RealMain( const char *pchCmdLine, HINSTANCE hInstance, int nCmdShow ) #error Need CreateGameEngine() #endif - if ( !SteamController()->Init() ) + if ( !SteamInput()->Init() ) { - OutputDebugString( "SteamController()->Init failed.\n" ); - Alert( "Fatal Error", "SteamController()->Init failed.\n" ); + OutputDebugString( "SteamInput()->Init failed.\n" ); + Alert( "Fatal Error", "SteamInput()->Init failed.\n" ); return EXIT_FAILURE; } - + // This call will block and run until the game exits RunGameLoop( pGameEngine, pchServerAddress, pchLobbyID ); diff --git a/SteamworksExample/MainMenu.cpp b/SteamworksExample/MainMenu.cpp index dfc18fd..983347a 100644 --- a/SteamworksExample/MainMenu.cpp +++ b/SteamworksExample/MainMenu.cpp @@ -61,9 +61,10 @@ void CMainMenu::SetupMenu() { AddMenuItem( MenuItem_t( "HTML Page", k_EClientHTMLSurface ) ); } - AddMenuItem( MenuItem_t( "Exit Game", k_EClientGameExiting ) ); AddMenuItem( MenuItem_t( "In-game Store", k_EClientInGameStore ) ); + + AddMenuItem( MenuItem_t( "Exit Game", k_EClientGameExiting ) ); } diff --git a/SteamworksExample/Ship.cpp b/SteamworksExample/Ship.cpp index c1048f3..5c6c290 100644 --- a/SteamworksExample/Ship.cpp +++ b/SteamworksExample/Ship.cpp @@ -460,10 +460,12 @@ void CShip::RunFrame() m_SpaceWarClientUpdateData.SetReverseThrustersPressed( false ); m_SpaceWarClientUpdateData.SetForwardThrustersPressed( false ); + bool bForwardThrustActive = false; if ( m_pGameEngine->BIsKeyDown( m_dwVKForwardThrusters ) || m_pGameEngine->BIsControllerActionActive( eControllerDigitalAction_ForwardThrust ) ) { m_SpaceWarClientUpdateData.SetForwardThrustersPressed( true ); + bForwardThrustActive = true; //m_pGameEngine->SetControllerColor( 100, 255, 0, k_ESteamControllerLEDFlag_SetColor ); } @@ -474,7 +476,7 @@ void CShip::RunFrame() } - // The Steam Controller can also map an anlog axis to thrust and steer + // The Steam Controller can also map an analog axis to thrust and steer float fThrusterLevel, fUnused; m_pGameEngine->GetControllerAnalogAction( eControllerAnalogAction_AnalogControls, &fUnused, &fThrusterLevel ); @@ -482,7 +484,7 @@ void CShip::RunFrame() { m_SpaceWarClientUpdateData.SetForwardThrustersPressed( true ); m_SpaceWarClientUpdateData.SetThrustersLevel( fThrusterLevel ); - + bForwardThrustActive = true; } else if ( fThrusterLevel < 0.0f ) { @@ -490,6 +492,17 @@ void CShip::RunFrame() m_SpaceWarClientUpdateData.SetThrustersLevel( fThrusterLevel ); } + // We can activate action set layers based upon our state. + // This allows action bindings or settings to be changed on an existing action set for contextual usage + if ( bForwardThrustActive ) + { + m_pGameEngine->ActivateSteamControllerActionSetLayer( eControllerActionSet_Layer_Thrust ); + } + else if ( m_pGameEngine->BIsActionSetLayerActive( eControllerActionSet_Layer_Thrust ) ) + { + m_pGameEngine->DeactivateSteamControllerActionSetLayer( eControllerActionSet_Layer_Thrust ); + } + // Hardcoded keys to choose various outfits and weapon powerups which require inventory. Note that this is not // a "secure" multiplayer model - clients can lie about what they own. A more robust solution, if your items // matter enough to bother, would be to use SerializeResult / DeserializeResult to encode the fact that your diff --git a/SteamworksExample/SpaceWarClient.cpp b/SteamworksExample/SpaceWarClient.cpp index 6e1e28b..6aef7bc 100644 --- a/SteamworksExample/SpaceWarClient.cpp +++ b/SteamworksExample/SpaceWarClient.cpp @@ -36,6 +36,8 @@ CSpaceWarClient *g_pSpaceWarClient = NULL; CSpaceWarClient* SpaceWarClient() { return g_pSpaceWarClient; } +extern bool ParseCommandLine( const char *pchCmdLine, const char **ppchServerAddress, const char **ppchLobbyID ); + #if defined(WIN32) #define atoll _atoi64 #endif @@ -786,13 +788,35 @@ void CSpaceWarClient::OnGameJoinRequested( GameRichPresenceJoinRequested_t *pCal { // parse out the connect const char *pchServerAddress, *pchLobbyID; - extern void ParseCommandLine( const char *pchCmdLine, const char **ppchServerAddress, const char **ppchLobbyID ); - ParseCommandLine( pCallback->m_rgchConnect, &pchServerAddress, &pchLobbyID ); - - // exec - ExecCommandLineConnect( pchServerAddress, pchLobbyID ); + + if ( ParseCommandLine( pCallback->m_rgchConnect, &pchServerAddress, &pchLobbyID ) ) + { + // exec + ExecCommandLineConnect( pchServerAddress, pchLobbyID ); + } } + +//----------------------------------------------------------------------------- +// Purpose: a Steam URL to launch this app was executed while the game is already running, eg steam://run/480//+connect%20127.0.0.1 +// Anybody can build random Steam URLs and these extra parameters must be carefully parsed to avoid unintended side-effects +//----------------------------------------------------------------------------- +void CSpaceWarClient::OnNewUrlLaunchParameters( NewUrlLaunchParameters_t *pCallback ) +{ + const char *pchServerAddress, *pchLobbyID; + char szCommandLine[1024] = {}; + + if ( SteamApps()->GetLaunchCommandLine( szCommandLine, sizeof(szCommandLine) ) > 0 ) + { + if ( ParseCommandLine( szCommandLine, &pchServerAddress, &pchLobbyID ) ) + { + // exec + ExecCommandLineConnect( pchServerAddress, pchLobbyID ); + } + } +} + + //----------------------------------------------------------------------------- // Purpose: Finishes up entering a lobby of our own creation //----------------------------------------------------------------------------- @@ -944,21 +968,79 @@ void CSpaceWarClient::OnMenuSelection( ERemoteStorageSyncMenuCommand selection ) } +//----------------------------------------------------------------------------- +// Purpose: For a player in game, set the appropriate rich presence keys for display +// in the Steam friends list and return the value for steam_display +//----------------------------------------------------------------------------- +const char *CSpaceWarClient::SetInGameRichPresence() const +{ + const char *pchStatus; + + bool bWinning = false; + uint32 cWinners = 0; + uint32 uHighScore = m_rguPlayerScores[0]; + uint32 uMyScore = 0; + for ( uint32 i = 0; i < MAX_PLAYERS_PER_SERVER; ++i ) + { + if ( m_rguPlayerScores[i] > uHighScore ) + { + uHighScore = m_rguPlayerScores[i]; + cWinners = 0; + bWinning = false; + } + + if ( m_rguPlayerScores[i] == uHighScore ) + { + cWinners++; + bWinning = bWinning || (m_rgSteamIDPlayers[i] == m_SteamIDLocalUser); + } + + if ( m_rgSteamIDPlayers[i] == m_SteamIDLocalUser ) + { + uMyScore = m_rguPlayerScores[i]; + } + } + + if ( bWinning && cWinners > 1 ) + { + pchStatus = "Tied"; + } + else if ( bWinning ) + { + pchStatus = "Winning"; + } + else + { + pchStatus = "Losing"; + } + + char rgchBuffer[32]; + sprintf_safe( rgchBuffer, "%2u", uMyScore ); + SteamFriends()->SetRichPresence( "score", rgchBuffer ); + + return pchStatus; +} + + //----------------------------------------------------------------------------- // Purpose: does work on transitioning from one game state to another //----------------------------------------------------------------------------- void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew ) { + const char *pchSteamRichPresenceDisplay = "AtMainMenu"; + bool bDisplayScoreInRichPresence = false; if ( m_eGameState == k_EClientFindInternetServers ) { // If we are just opening the find servers screen, then start a refresh m_pServerBrowser->RefreshInternetServers(); SteamFriends()->SetRichPresence( "status", "Finding an internet game" ); + pchSteamRichPresenceDisplay = "WaitingForMatch"; } else if ( m_eGameState == k_EClientFindLANServers ) { m_pServerBrowser->RefreshLANServers(); SteamFriends()->SetRichPresence( "status", "Finding a LAN game" ); + pchSteamRichPresenceDisplay = "WaitingForMatch"; } else if ( m_eGameState == k_EClientCreatingLobby ) { @@ -971,11 +1053,17 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew ) m_SteamCallResultLobbyCreated.Set( hSteamAPICall, this, &CSpaceWarClient::OnLobbyCreated ); } SteamFriends()->SetRichPresence( "status", "Creating a lobby" ); + pchSteamRichPresenceDisplay = "WaitingForMatch"; + } + else if ( m_eGameState == k_EClientInLobby ) + { + pchSteamRichPresenceDisplay = "WaitingForMatch"; } else if ( m_eGameState == k_EClientFindLobby ) { m_pLobbyBrowser->Refresh(); SteamFriends()->SetRichPresence( "status", "Main menu: finding lobbies" ); + pchSteamRichPresenceDisplay = "WaitingForMatch"; } else if ( m_eGameState == k_EClientGameMenu ) { @@ -1003,6 +1091,9 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew ) // Check if the user is due for an item drop SpaceWarLocalInventory()->CheckForItemDrops(); + + pchSteamRichPresenceDisplay = SetInGameRichPresence(); + bDisplayScoreInRichPresence = true; } else if ( m_eGameState == k_EClientLeaderboards ) { @@ -1030,6 +1121,9 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew ) // start voice chat m_pVoiceChat->StartVoiceChat(); SteamFriends()->SetRichPresence( "status", "In match" ); + + pchSteamRichPresenceDisplay = SetInGameRichPresence(); + bDisplayScoreInRichPresence = true; } else if ( m_eGameState == k_EClientRemoteStorage ) { @@ -1049,6 +1143,26 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew ) m_pHTMLSurface->Show(); SteamFriends()->SetRichPresence("status", "Using the web"); } + + if ( pchSteamRichPresenceDisplay != NULL ) + { + SteamFriends()->SetRichPresence( "steam_display", bDisplayScoreInRichPresence ? "#StatusWithScore" : "#StatusWithoutScore" ); + SteamFriends()->SetRichPresence( "gamestatus", pchSteamRichPresenceDisplay ); + } + + // steam_player_group defines who the user is playing with. Set it to the steam ID + // of the server if we are connected, otherwise blank. + if ( m_steamIDGameServer.IsValid() ) + { + char rgchBuffer[32]; + sprintf_safe( rgchBuffer, "%llu", m_steamIDGameServer.ConvertToUint64() ); + SteamFriends()->SetRichPresence( "steam_player_group", rgchBuffer ); + } + else + { + SteamFriends()->SetRichPresence( "steam_player_group", "" ); + } + } //----------------------------------------------------------------------------- @@ -1357,6 +1471,10 @@ void CSpaceWarClient::RunFrame() { SpaceWarLocalInventory()->DoExchange(); } + else if ( m_pGameEngine->BIsKeyDown( 0x32 ) ) + { + SpaceWarLocalInventory()->ModifyItemProperties(); + } break; case k_EClientLeaderboards: m_pStarField->Render(); @@ -1485,7 +1603,10 @@ void CSpaceWarClient::RunFrame() m_bSentWebOpen = true; #ifndef _PS3 char szCurDir[MAX_PATH]; - _getcwd( szCurDir, sizeof(szCurDir) ); + if ( !_getcwd( szCurDir, sizeof(szCurDir) ) ) + { + strcpy( szCurDir, "." ); + } char szURL[MAX_PATH]; sprintf_safe( szURL, "file:///%s/test.html", szCurDir ); // load the test html page, it just has a steam://gamewebcallback link in it @@ -1740,8 +1861,8 @@ void CSpaceWarClient::DrawHUDText() } } - // Draw a Steam Controller tooltip - if ( m_pGameEngine->BIsSteamControllerActive( ) ) + // Draw a Steam Input tooltip + if ( m_pGameEngine->BIsSteamInputDeviceActive( ) ) { char rgchHint[128]; const char *rgchFireOrigin = m_pGameEngine->GetTextStringForControllerOriginDigital( eControllerActionSet_ShipControls, eControllerDigitalAction_FireLasers ); @@ -2164,9 +2285,8 @@ CWorkshopItem *CSpaceWarClient::LoadWorkshopItemFromFile( const char *pszFileNam { float xPos0, yPos0, xPos1, yPos1; DWORD dwColor; - fgets(szLine, sizeof(szLine), file); - - if (sscanf(szLine, "%f %f %f %f %x", &xPos0, &yPos0, &xPos1, &yPos1, &dwColor) >= 5) + if ( fgets(szLine, sizeof(szLine), file) && + sscanf(szLine, "%f %f %f %f %x", &xPos0, &yPos0, &xPos1, &yPos1, &dwColor) >= 5 ) { // Add a line to the entity pItem->AddLine(xPos0, yPos0, xPos1, yPos1, dwColor); @@ -2309,7 +2429,7 @@ void CSpaceWarClient::OnRequestPricesResult( SteamInventoryRequestPricesResult_t std::vector vecPrices; vecPrices.resize( unItems ); - if ( SteamInventory()->GetItemsWithPrices( vecItemDefs.data(), vecPrices.data(), unItems ) ) + if ( SteamInventory()->GetItemsWithPrices( vecItemDefs.data(), vecPrices.data(), NULL, unItems ) ) { m_vecPurchaseableItems.reserve( unItems ); for ( uint32 i = 0; i < unItems; ++i ) diff --git a/SteamworksExample/SpaceWarClient.h b/SteamworksExample/SpaceWarClient.h index 0c3e8f6..1922bb5 100644 --- a/SteamworksExample/SpaceWarClient.h +++ b/SteamworksExample/SpaceWarClient.h @@ -258,6 +258,10 @@ private: // load subscribed workshop items void LoadWorkshopItems(); + // Set appropriate rich presence keys for a player who is currently in-game and + // return the value that should go in steam_display + const char *SetInGameRichPresence() const; + // load a workshop item from file bool LoadWorkshopItem( PublishedFileId_t workshopItemID ); CWorkshopItem *LoadWorkshopItemFromFile( const char *pszFileName ); @@ -426,6 +430,7 @@ private: STEAM_CALLBACK( CSpaceWarClient, OnLobbyGameCreated, LobbyGameCreated_t ); STEAM_CALLBACK( CSpaceWarClient, OnGameJoinRequested, GameRichPresenceJoinRequested_t ); STEAM_CALLBACK( CSpaceWarClient, OnAvatarImageLoaded, AvatarImageLoaded_t ); + STEAM_CALLBACK( CSpaceWarClient, OnNewUrlLaunchParameters, NewUrlLaunchParameters_t ); // callbacks for Steam connection state STEAM_CALLBACK( CSpaceWarClient, OnSteamServersConnected, SteamServersConnected_t ); diff --git a/SteamworksExample/StatsAndAchievements.cpp b/SteamworksExample/StatsAndAchievements.cpp index 40beec1..d8b35b5 100644 --- a/SteamworksExample/StatsAndAchievements.cpp +++ b/SteamworksExample/StatsAndAchievements.cpp @@ -1,4 +1,4 @@ -//========= Copyright © 1996-2008, Valve LLC, All rights reserved. ============ +//========= Copyright � 1996-2008, Valve LLC, All rights reserved. ============ // // Purpose: Class for tracking stats and achievements // @@ -234,6 +234,8 @@ void CStatsAndAchievements::EvaluateAchievement( Achievement_t &achievement ) UnlockAchievement( achievement ); } break; + default: + break; } } diff --git a/SteamworksExample/richpresenceloc.vdf b/SteamworksExample/richpresenceloc.vdf new file mode 100644 index 0000000..ee1e66f --- /dev/null +++ b/SteamworksExample/richpresenceloc.vdf @@ -0,0 +1,27 @@ +"lang" +{ + "english" + { + "tokens" + { + "#StatusWithoutScore" "{#Status_%gamestatus%}" + "#StatusWithScore" "{#Status_%gamestatus%}: %score%" + "#Status_AtMainMenu" "At the main menu" + "#Status_WaitingForMatch" "Waiting for match" + "#Status_Winning" "Winning" + "#Status_Losing" "Losing" + "#Status_Tied" "Tied" + } + } + "french" + { + "tokens" + { + "#Status_AtMainMenu" "Au menu principal" + "#Status_WaitingForMatch" "En attente de match" + "#Status_Winning" "Gagnant" + "#Status_Losing" "Perdant" + "#Status_Tied" "Egalité" + } + } +} diff --git a/glmgr/cglmbuffer.h b/glmgr/cglmbuffer.h index 74edb7c..9c7d222 100644 --- a/glmgr/cglmbuffer.h +++ b/glmgr/cglmbuffer.h @@ -51,8 +51,8 @@ public: //protected: friend class GLMContext; // only GLMContext can make CGLMBuffer objects friend class GLMTester; - friend class IDirect3D9; - friend class IDirect3DDevice9; + friend struct IDirect3D9; + friend struct IDirect3DDevice9; CGLMBuffer ( GLMContext *ctx, EGLMBufferType type, uint size, uint options ); ~CGLMBuffer ( ); @@ -88,4 +88,4 @@ public: }; -#endif \ No newline at end of file +#endif diff --git a/glmgr/cglmfbo.h b/glmgr/cglmfbo.h index 152e2a7..15342fe 100644 --- a/glmgr/cglmfbo.h +++ b/glmgr/cglmfbo.h @@ -63,8 +63,8 @@ protected: friend class GLMTester; friend class CGLMTex; - friend class IDirect3D9; - friend class IDirect3DDevice9; + friend struct IDirect3D9; + friend struct IDirect3DDevice9; CGLMFBO( GLMContext *ctx ); ~CGLMFBO( ); @@ -88,4 +88,4 @@ protected: }; -#endif \ No newline at end of file +#endif diff --git a/glmgr/cglmprogram.cpp b/glmgr/cglmprogram.cpp index 55adccf..f980b13 100644 --- a/glmgr/cglmprogram.cpp +++ b/glmgr/cglmprogram.cpp @@ -247,7 +247,10 @@ void CGLMProgram::SetProgramText( char *text ) default: Assert(!"Mismatched section marker seen in SetProgramText (VP)"); break; } - break; + break; + + default: + break; } } } @@ -402,6 +405,9 @@ bool CGLMProgram::Compile( EGLMProgramLang lang ) result = glslDesc->m_valid; } break; + + default: + break; } return result; } @@ -668,6 +674,9 @@ bool CGLMProgram::CheckValidity( EGLMProgramLang lang ) return glslDesc->m_valid; } break; + + default: + break; } return false; diff --git a/glmgr/cglmprogram.h b/glmgr/cglmprogram.h index 85fb305..cadd220 100644 --- a/glmgr/cglmprogram.h +++ b/glmgr/cglmprogram.h @@ -95,8 +95,8 @@ public: friend class CGLMShaderPair; friend class GLMContext; // only GLMContext can make CGLMProgram objects friend class GLMTester; - friend class IDirect3D9; - friend class IDirect3DDevice9; + friend struct IDirect3D9; + friend struct IDirect3DDevice9; //=============================== @@ -288,4 +288,4 @@ protected: }; -#endif \ No newline at end of file +#endif diff --git a/glmgr/cglmquery.cpp b/glmgr/cglmquery.cpp index 0e1d66f..1262a9e 100644 --- a/glmgr/cglmquery.cpp +++ b/glmgr/cglmquery.cpp @@ -75,6 +75,7 @@ CGLMQuery::CGLMQuery( GLMContext *ctx, GLMQueryParams *params ) break; case EFence: + { //make a fence - no aux fence needed glGenFencesAPPLE(1, &m_name ); GLMPRINTF(("-A- CGLMQuery(fence) created name %d", m_name)); @@ -86,7 +87,11 @@ CGLMQuery::CGLMQuery( GLMContext *ctx, GLMQueryParams *params ) printf( "\nCGLMQuery::CGLMQuery (fence) saw %s error (%d) from glGenFencesAPPLE", decodedStr, errorcode ); m_name = 0; } + } break; + + default: + break; } } @@ -131,6 +136,9 @@ CGLMQuery::~CGLMQuery() } } break; + + default: + break; } m_name = 0; @@ -180,6 +188,7 @@ void CGLMQuery::Start( void ) // "start counting" break; case EFence: + { glSetFenceAPPLE( m_name ); GLenum errorcode = GetQueryError(); @@ -190,7 +199,11 @@ void CGLMQuery::Start( void ) // "start counting" } m_stopped = true; // caller should not call Stop on a fence, it self-stops + } break; + + default: + break; } m_started = true; @@ -227,8 +240,13 @@ void CGLMQuery::Stop( void ) // "stop counting" break; case EFence: + { // nop - you don't "end" a fence, you just test it and/or finish it out in Complete + } break; + + default: + break; } m_stopped = true; @@ -296,6 +314,9 @@ bool CGLMQuery::IsDone( void ) } } break; + + default: + break; } } @@ -385,6 +406,9 @@ void CGLMQuery::Complete( uint *result ) } } break; + + default: + break; } Assert( m_done ); diff --git a/glmgr/cglmquery.h b/glmgr/cglmquery.h index e958f60..67c1732 100644 --- a/glmgr/cglmquery.h +++ b/glmgr/cglmquery.h @@ -40,8 +40,8 @@ class CGLMQuery // leave everything public til it's running public: friend class GLMContext; // only GLMContext can make CGLMTex objects - friend class IDirect3DDevice9; - friend class IDirect3DQuery9; + friend struct IDirect3DDevice9; + friend struct IDirect3DQuery9; GLMContext *m_ctx; // link back to parent context GLMQueryParams m_params; // params created with @@ -81,4 +81,4 @@ public: }; -#endif \ No newline at end of file +#endif diff --git a/glmgr/cglmtex.cpp b/glmgr/cglmtex.cpp index 152cf7f..a86c7c5 100644 --- a/glmgr/cglmtex.cpp +++ b/glmgr/cglmtex.cpp @@ -1184,6 +1184,9 @@ void CGLMTex::WriteTexels( GLMTexLockDesc *desc, bool writeWholeSlice, bool noDa m_texClientStorage = false; } break; + + default: + break; } if (writeWholeSlice) diff --git a/glmgr/cglmtex.h b/glmgr/cglmtex.h index 13d7a0e..241434b 100644 --- a/glmgr/cglmtex.h +++ b/glmgr/cglmtex.h @@ -24,7 +24,7 @@ class CGLMTexLayoutTable; class CGLMTex; class CGLMFBO; -class IDirect3DSurface9; +struct IDirect3DSurface9; //=============================================================================== @@ -233,12 +233,12 @@ protected: friend class GLMTester; friend class CGLMFBO; - friend class IDirect3DDevice9; - friend class IDirect3DBaseTexture9; - friend class IDirect3DTexture9; - friend class IDirect3DSurface9; - friend class IDirect3DCubeTexture9; - friend class IDirect3DVolumeTexture9; + friend struct IDirect3DDevice9; + friend struct IDirect3DBaseTexture9; + friend struct IDirect3DTexture9; + friend struct IDirect3DSurface9; + friend struct IDirect3DCubeTexture9; + friend struct IDirect3DVolumeTexture9; CGLMTex( GLMContext *ctx, GLMTexLayout *layout, GLMTexSamplingParams *sampling, const char *debugLabel = NULL ); ~CGLMTex( ); @@ -288,4 +288,4 @@ protected: }; -#endif \ No newline at end of file +#endif diff --git a/glmgr/dx9asmtogl2.cpp b/glmgr/dx9asmtogl2.cpp index 95366e8..9f92936 100644 --- a/glmgr/dx9asmtogl2.cpp +++ b/glmgr/dx9asmtogl2.cpp @@ -3,7 +3,7 @@ //------------------------------------------------------------------------------ #include "dxabstract.h" -#include "DX9AsmToGL2.h" +#include "dx9asmtogl2.h" void Error( const char *fmt, ... ) diff --git a/glmgr/dxabstract.cpp b/glmgr/dxabstract.cpp index b197af7..e2d6fc2 100644 --- a/glmgr/dxabstract.cpp +++ b/glmgr/dxabstract.cpp @@ -1707,6 +1707,9 @@ HRESULT IDirect3DQuery9::Issue(DWORD dwIssueFlags) // http://msdn.microsoft.com/en-us/library/ee422167(VS.85).aspx m_query->Start(); // drop "set fence" into stream break; + + default: + break; } } return S_OK; @@ -1791,6 +1794,9 @@ HRESULT IDirect3DQuery9::GetData(void* pData,DWORD dwSize,DWORD dwGetDataFlags) } } break; + + default: + break; } } @@ -5292,6 +5298,9 @@ HRESULT IDirect3DDevice9::DrawPrimitive(D3DPRIMITIVETYPE PrimitiveType,UINT Star case D3DPT_TRIANGLESTRIP: m_ctx->DrawArrays( (GLenum)GL_TRIANGLE_STRIP, StartVertex, (GLsizei)PrimitiveCount+2 ); break; + + default: + break; } return S_OK; @@ -5351,6 +5360,9 @@ HRESULT IDirect3DDevice9::DrawIndexedPrimitive( D3DPRIMITIVETYPE Type,INT BaseVe // enabled... Debugger(); m_ctx->DrawRangeElements(GL_TRIANGLE_STRIP, (GLuint)MinVertexIndex, (GLuint)(MinVertexIndex + NumVertices), (GLsizei)(2+primCount), (GLenum)GL_UNSIGNED_SHORT, (const GLvoid *)(startIndex * sizeof(short)) ); break; + + default: + break; } return S_OK; diff --git a/glmgr/glmgr.cpp b/glmgr/glmgr.cpp index 7fef16f..408b305 100644 --- a/glmgr/glmgr.cpp +++ b/glmgr/glmgr.cpp @@ -296,7 +296,7 @@ GLMContext *GLMgr::GetCurrentContext( void ) if ( glm_context_link ) { - return (GLMContext*) glm_context_link; + return (GLMContext*)(uintptr_t)glm_context_link; } else { @@ -2382,17 +2382,23 @@ GLMContext::GLMContext( GLMDisplayParams *params ) // this is the old 10.5.x two-context path.... ugh success = NewNSGLContext( (unsigned long*)selAttribs, shareNsCtx, &m_nsctx, &m_ctx ); } - + + // If we're compiling for 64-bit with a 32-bit GLint we should only allow the conversion + // between 'this' and GLint if it can fit in the GLint, otherwise consider this to be failure + if ( sizeof(this) > sizeof(GLint) ) + success = ( (uintptr_t)this & 0xFFFFFFFF00000000 ) == 0; + if (success) { //write a cookie into the CGL context leading back to the GLM context object GLint glm_context_link = (GLint)((uintptr_t)this); CGLSetParameter( m_ctx, kCGLCPClientStorage, &glm_context_link ); - - // save off the pixel format attributes we used + + // save off the pixel format attributes we used memcpy(m_pixelFormatAttribs, selAttribs, selBytes ); } - else + + if ( !success ) { Debugger(); //FIXME #PMB# bad news, maybe exit to shell if this happens } @@ -3104,7 +3110,7 @@ void GLMContext::FlushDrawStates( bool shadersOn ) // shadersOn = true for draw glEnableVertexAttribArray( index ); // enable attribute, set pointer. GLMCheckError(); - glVertexAttribPointer( index, setdesc->m_datasize, setdesc->m_datatype, setdesc->m_normalized, setdesc->m_stride, ( const GLvoid *)setdesc->m_offset ); + glVertexAttribPointer( index, setdesc->m_datasize, setdesc->m_datatype, setdesc->m_normalized, setdesc->m_stride, (const GLvoid *)(uintptr_t)setdesc->m_offset ); GLMCheckError(); //GLMPRINTF(("--- GLMContext::SetVertexAttributes attr %d set to offset/stride %d/%d in buffer %d (normalized=%s)", index, setdesc->m_offset, setdesc->m_stride, setdesc->m_buffer->m_name, setdesc->m_normalized?"true":"false" )); } @@ -3402,7 +3408,7 @@ void GLMContext::FlushDrawStates( bool shadersOn ) // shadersOn = true for draw loopCurrentBuf = buf; } - glVertexAttribPointer( index, newDesc->m_datasize, newDesc->m_datatype, newDesc->m_normalized, newDesc->m_stride, ( const GLvoid *)newDesc->m_offset ); + glVertexAttribPointer( index, newDesc->m_datasize, newDesc->m_datatype, newDesc->m_normalized, newDesc->m_stride, (const GLvoid *)(uintptr_t)newDesc->m_offset ); GLMCheckError(); } @@ -3533,6 +3539,9 @@ void GLMContext::FlushDrawStates( bool shadersOn ) // shadersOn = true for draw } } break; + + default: + break; } } else @@ -4229,6 +4238,9 @@ void GLMContext::DebugDump( GLMDebugHookInfo *info, uint options, uint vertDumpM translabel = "post-skin3bone-viewproj"; } break; + + default: + break; } if(translabel) { diff --git a/glmgr/glmgr.h b/glmgr/glmgr.h index f748a13..ce6b18d 100644 --- a/glmgr/glmgr.h +++ b/glmgr/glmgr.h @@ -790,8 +790,8 @@ class GLMContext friend class CGLMBuffer; friend class GLMTester; // tester class needs access back into GLMContext - friend class IDirect3D9; - friend class IDirect3DDevice9; + friend struct IDirect3D9; + friend struct IDirect3DDevice9; // methods------------------------------------------ diff --git a/glmgr/glmgrbasics.cpp b/glmgr/glmgrbasics.cpp index 4b898ed..4b72470 100644 --- a/glmgr/glmgrbasics.cpp +++ b/glmgr/glmgrbasics.cpp @@ -3203,7 +3203,7 @@ void GLMPrintText( const char *str, EGLMDebugFlavor flavor, uint options ) while(mark < end) { // starting at mark, see if there is a newline between there and end - char *next = strchr( mark, '\n' ); + char *next = (char *)strchr( mark, '\n' ); const char *printfrom = mark; if (next) { diff --git a/glmgr/glmgrbasics.h b/glmgr/glmgrbasics.h index 92b6e65..56fc914 100644 --- a/glmgr/glmgrbasics.h +++ b/glmgr/glmgrbasics.h @@ -316,7 +316,7 @@ inline void GLMDebugger( void ) if (GLMDebugChannelMask() & (1<( &root ) ); } +#endif inline float FastRSqrtFast( float x ) { diff --git a/public/steam/isteamapplist.h b/public/steam/isteamapplist.h index d678909..45441bb 100644 --- a/public/steam/isteamapplist.h +++ b/public/steam/isteamapplist.h @@ -10,7 +10,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" #include "steamtypes.h" //----------------------------------------------------------------------------- @@ -25,7 +25,7 @@ public: virtual uint32 GetNumInstalledApps() = 0; virtual uint32 GetInstalledApps( AppId_t *pvecAppID, uint32 unMaxAppIDs ) = 0; - virtual int GetAppName( AppId_t nAppID, OUT_STRING() char *pchName, int cchNameMax ) = 0; // returns -1 if no name was found + virtual int GetAppName( AppId_t nAppID, STEAM_OUT_STRING() char *pchName, int cchNameMax ) = 0; // returns -1 if no name was found virtual int GetAppInstallDir( AppId_t nAppID, char *pchDirectory, int cchNameMax ) = 0; // returns -1 if no dir was found virtual int GetAppBuildId( AppId_t nAppID ) = 0; // return the buildid of this app, may change at any time based on backend updates to the game @@ -33,30 +33,34 @@ public: #define STEAMAPPLIST_INTERFACE_VERSION "STEAMAPPLIST_INTERFACE_VERSION001" +// Global interface accessor +inline ISteamAppList *SteamAppList(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamAppList *, SteamAppList, STEAMAPPLIST_INTERFACE_VERSION ); + // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) #pragma pack( push, 4 ) #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif //--------------------------------------------------------------------------------- // Purpose: Sent when a new app is installed //--------------------------------------------------------------------------------- -DEFINE_CALLBACK( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 ); - CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 ); + STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs +STEAM_CALLBACK_END(1) //--------------------------------------------------------------------------------- // Purpose: Sent when an app is uninstalled //--------------------------------------------------------------------------------- -DEFINE_CALLBACK( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 ); - CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 ); + STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs +STEAM_CALLBACK_END(1) #pragma pack( pop ) diff --git a/public/steam/isteamapps.h b/public/steam/isteamapps.h index 9a97b4a..550cb8f 100644 --- a/public/steam/isteamapps.h +++ b/public/steam/isteamapps.h @@ -10,6 +10,8 @@ #pragma once #endif +#include "steam_api_common.h" + const int k_cubAppProofOfPurchaseKeyMax = 240; // max supported length of a legacy cd key @@ -65,13 +67,16 @@ public: virtual uint32 GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ) = 0; virtual bool BIsAppInstalled( AppId_t appID ) = 0; // returns true if that app is installed (not necessarily owned) - virtual CSteamID GetAppOwner() = 0; // returns the SteamID of the original owner. If different from current user, it's borrowed + // returns the SteamID of the original owner. If this CSteamID is different from ISteamUser::GetSteamID(), + // the user has a temporary license borrowed via Family Sharing + virtual CSteamID GetAppOwner() = 0; - // Returns the associated launch param if the game is run via steam://run///?param1=value1;param2=value2;param3=value3 etc. + // Returns the associated launch param if the game is run via steam://run///?param1=value1¶m2=value2¶m3=value3 etc. // Parameter names starting with the character '@' are reserved for internal use and will always return and empty string. // Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game, // but it is advised that you not param names beginning with an underscore for your own features. - virtual const char *GetLaunchQueryParam( const char *pchKey ) = 0; + // Check for new launch parameters on callback NewUrlLaunchParameters_t + virtual const char *GetLaunchQueryParam( const char *pchKey ) = 0; // get download progress for optional DLC virtual bool GetDlcDownloadProgress( AppId_t nAppID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; @@ -85,19 +90,40 @@ public: // member is k_uAppIdInvalid (zero). virtual void RequestAllProofOfPurchaseKeys() = 0; - CALL_RESULT( FileDetailsResult_t ) + STEAM_CALL_RESULT( FileDetailsResult_t ) virtual SteamAPICall_t GetFileDetails( const char* pszFileName ) = 0; + + // Get command line if game was launched via Steam URL, e.g. steam://run////. + // This method of passing a connect string (used when joining via rich presence, accepting an + // invite, etc) is preferable to passing the connect string on the operating system command + // line, which is a security risk. In order for rich presence joins to go through this + // path and not be placed on the OS command line, you must set a value in your app's + // configuration on Steam. Ask Valve for help with this. + // + // If game was already running and launched again, the NewUrlLaunchParameters_t will be fired. + virtual int GetLaunchCommandLine( char *pszCommandLine, int cubCommandLine ) = 0; + + // Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID + virtual bool BIsSubscribedFromFamilySharing() = 0; }; #define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008" +// Global interface accessor +inline ISteamApps *SteamApps(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamApps *, SteamApps, STEAMAPPS_INTERFACE_VERSION ); + +// Global accessor for the gameserver client +inline ISteamApps *SteamGameServerApps(); +STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamApps *, SteamGameServerApps, STEAMAPPS_INTERFACE_VERSION ); + // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) #pragma pack( push, 4 ) #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif //----------------------------------------------------------------------------- // Purpose: posted after the user gains ownership of DLC & that DLC is installed @@ -134,12 +160,12 @@ struct RegisterActivationCodeResponse_t //--------------------------------------------------------------------------------- -// Purpose: posted after the user gains executes a steam url with query parameters -// such as steam://run///?param1=value1;param2=value2;param3=value3; etc +// Purpose: posted after the user gains executes a Steam URL with command line or query parameters +// such as steam://run///-commandline/?param1=value1¶m2=value2¶m3=value3 etc // while the game is already running. The new params can be queried -// with GetLaunchQueryParam. +// with GetLaunchQueryParam and GetLaunchCommandLine //--------------------------------------------------------------------------------- -struct NewLaunchQueryParameters_t +struct NewUrlLaunchParameters_t { enum { k_iCallback = k_iSteamAppsCallbacks + 14 }; }; diff --git a/public/steam/isteamclient.h b/public/steam/isteamclient.h index af8828d..72115b9 100644 --- a/public/steam/isteamclient.h +++ b/public/steam/isteamclient.h @@ -1,8 +1,9 @@ -//====== Copyright � 1996-2008, Valve Corporation, All rights reserved. ======= +//====== Copyright Valve Corporation, All rights reserved. ==================== // -// Purpose: Main interface for loading and accessing Steamworks API's from the -// Steam client. -// For most uses, this code is wrapped inside of SteamAPI_Init() +// Internal low-level access to Steamworks interfaces. +// +// Most users of the Steamworks SDK do not need to include this file. +// You should only include this if you are doing something special. //============================================================================= #ifndef ISTEAMCLIENT_H @@ -11,102 +12,7 @@ #pragma once #endif -#include "steamtypes.h" -#include "steamclientpublic.h" - -// Define compile time assert macros to let us validate the structure sizes. -#define VALVE_COMPILE_TIME_ASSERT( pred ) typedef char compile_time_assert_type[(pred) ? 1 : -1]; - -#ifndef REFERENCE -#define REFERENCE(arg) ((void)arg) -#endif - -#if ( defined(STEAM_API_EXPORTS) || defined(STEAM_API_NODLL) ) && !defined(API_GEN) -#define STEAM_PRIVATE_API( ... ) __VA_ARGS__ -#elif defined(STEAM_API_EXPORTS) && defined(API_GEN) -#define STEAM_PRIVATE_API( ... ) -#else -#define STEAM_PRIVATE_API( ... ) protected: __VA_ARGS__ public: -#endif - -#if defined(__linux__) || defined(__APPLE__) -// The 32-bit version of gcc has the alignment requirement for uint64 and double set to -// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. -// The 64-bit version of gcc has the alignment requirement for these types set to -// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. -// The 64-bit structure packing has to match the 32-bit structure packing for each platform. -#define VALVE_CALLBACK_PACK_SMALL -#else -#define VALVE_CALLBACK_PACK_LARGE -#endif - -#if defined( VALVE_CALLBACK_PACK_SMALL ) -#pragma pack( push, 4 ) -#elif defined( VALVE_CALLBACK_PACK_LARGE ) -#pragma pack( push, 8 ) -#else -#error ??? -#endif - -typedef struct ValvePackingSentinel_t -{ - uint32 m_u32; - uint64 m_u64; - uint16 m_u16; - double m_d; -} ValvePackingSentinel_t; - -#pragma pack( pop ) - - -#if defined(VALVE_CALLBACK_PACK_SMALL) -VALVE_COMPILE_TIME_ASSERT( sizeof(ValvePackingSentinel_t) == 24 ) -#elif defined(VALVE_CALLBACK_PACK_LARGE) -VALVE_COMPILE_TIME_ASSERT( sizeof(ValvePackingSentinel_t) == 32 ) -#else -#error ??? -#endif - - -// handle to a communication pipe to the Steam client -typedef int32 HSteamPipe; -// handle to single instance of a steam user -typedef int32 HSteamUser; -// function prototype -#if defined( POSIX ) -#define __cdecl -#endif -extern "C" typedef void (__cdecl *SteamAPIWarningMessageHook_t)(int, const char *); -extern "C" typedef uint32 ( *SteamAPI_CheckCallbackRegistered_t )( int iCallbackNum ); -#if defined( __SNC__ ) - #pragma diag_suppress=1700 // warning 1700: class "%s" has virtual functions but non-virtual destructor -#endif - -// interface predec -class ISteamUser; -class ISteamGameServer; -class ISteamFriends; -class ISteamUtils; -class ISteamMatchmaking; -class ISteamContentServer; -class ISteamMatchmakingServers; -class ISteamUserStats; -class ISteamApps; -class ISteamNetworking; -class ISteamRemoteStorage; -class ISteamScreenshots; -class ISteamMusic; -class ISteamMusicRemote; -class ISteamGameServerStats; -class ISteamPS3OverlayRender; -class ISteamHTTP; -class ISteamController; -class ISteamUGC; -class ISteamAppList; -class ISteamHTMLSurface; -class ISteamInventory; -class ISteamVideo; -class ISteamParentalSettings; +#include "steam_api_common.h" //----------------------------------------------------------------------------- // Purpose: Interface to creating a new steam instance, or to @@ -185,6 +91,9 @@ public: // user screenshots virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + // game search + virtual ISteamGameSearch *GetISteamGameSearch( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + // Deprecated. Applications should use SteamAPI_RunCallbacks() or SteamGameServer_RunCallbacks() instead. STEAM_PRIVATE_API( virtual void RunFrame() = 0; ) @@ -209,7 +118,7 @@ public: // Deprecated - the ISteamUnifiedMessages interface is no longer intended for public consumption. STEAM_PRIVATE_API( virtual void *DEPRECATED_GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0 ; ) - // Exposes the ISteamController interface + // Exposes the ISteamController interface - deprecated in favor of Steam Input virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; // Exposes the ISteamUGC interface @@ -240,287 +149,26 @@ public: // Parental controls virtual ISteamParentalSettings *GetISteamParentalSettings( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Exposes the Steam Input interface for controller support + virtual ISteamInput *GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + + // Steam Parties interface + virtual ISteamParties *GetISteamParties( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; + }; +#define STEAMCLIENT_INTERFACE_VERSION "SteamClient018" +#ifndef STEAM_API_EXPORTS -#define STEAMCLIENT_INTERFACE_VERSION "SteamClient017" +// Global ISteamClient interface accessor +inline ISteamClient *SteamClient(); +STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamClient *, SteamClient, SteamInternal_CreateInterface( STEAMCLIENT_INTERFACE_VERSION ) ); -//----------------------------------------------------------------------------- -// Purpose: Base values for callback identifiers, each callback must -// have a unique ID. -//----------------------------------------------------------------------------- -enum { k_iSteamUserCallbacks = 100 }; -enum { k_iSteamGameServerCallbacks = 200 }; -enum { k_iSteamFriendsCallbacks = 300 }; -enum { k_iSteamBillingCallbacks = 400 }; -enum { k_iSteamMatchmakingCallbacks = 500 }; -enum { k_iSteamContentServerCallbacks = 600 }; -enum { k_iSteamUtilsCallbacks = 700 }; -enum { k_iClientFriendsCallbacks = 800 }; -enum { k_iClientUserCallbacks = 900 }; -enum { k_iSteamAppsCallbacks = 1000 }; -enum { k_iSteamUserStatsCallbacks = 1100 }; -enum { k_iSteamNetworkingCallbacks = 1200 }; -enum { k_iClientRemoteStorageCallbacks = 1300 }; -enum { k_iClientDepotBuilderCallbacks = 1400 }; -enum { k_iSteamGameServerItemsCallbacks = 1500 }; -enum { k_iClientUtilsCallbacks = 1600 }; -enum { k_iSteamGameCoordinatorCallbacks = 1700 }; -enum { k_iSteamGameServerStatsCallbacks = 1800 }; -enum { k_iSteam2AsyncCallbacks = 1900 }; -enum { k_iSteamGameStatsCallbacks = 2000 }; -enum { k_iClientHTTPCallbacks = 2100 }; -enum { k_iClientScreenshotsCallbacks = 2200 }; -enum { k_iSteamScreenshotsCallbacks = 2300 }; -enum { k_iClientAudioCallbacks = 2400 }; -enum { k_iClientUnifiedMessagesCallbacks = 2500 }; -enum { k_iSteamStreamLauncherCallbacks = 2600 }; -enum { k_iClientControllerCallbacks = 2700 }; -enum { k_iSteamControllerCallbacks = 2800 }; -enum { k_iClientParentalSettingsCallbacks = 2900 }; -enum { k_iClientDeviceAuthCallbacks = 3000 }; -enum { k_iClientNetworkDeviceManagerCallbacks = 3100 }; -enum { k_iClientMusicCallbacks = 3200 }; -enum { k_iClientRemoteClientManagerCallbacks = 3300 }; -enum { k_iClientUGCCallbacks = 3400 }; -enum { k_iSteamStreamClientCallbacks = 3500 }; -enum { k_IClientProductBuilderCallbacks = 3600 }; -enum { k_iClientShortcutsCallbacks = 3700 }; -enum { k_iClientRemoteControlManagerCallbacks = 3800 }; -enum { k_iSteamAppListCallbacks = 3900 }; -enum { k_iSteamMusicCallbacks = 4000 }; -enum { k_iSteamMusicRemoteCallbacks = 4100 }; -enum { k_iClientVRCallbacks = 4200 }; -enum { k_iClientGameNotificationCallbacks = 4300 }; -enum { k_iSteamGameNotificationCallbacks = 4400 }; -enum { k_iSteamHTMLSurfaceCallbacks = 4500 }; -enum { k_iClientVideoCallbacks = 4600 }; -enum { k_iClientInventoryCallbacks = 4700 }; -enum { k_iClientBluetoothManagerCallbacks = 4800 }; -enum { k_iClientSharedConnectionCallbacks = 4900 }; -enum { k_ISteamParentalSettingsCallbacks = 5000 }; -enum { k_iClientShaderCallbacks = 5100 }; - -//----------------------------------------------------------------------------- -// The CALLBACK macros are for client side callback logging enabled with -// log_callback -// Do not change any of these. -//----------------------------------------------------------------------------- - -#ifdef STEAM_CALLBACK_INSPECTION_ENABLED - -#define DEFINE_CALLBACK( callbackname, callbackid ) \ -struct callbackname { \ - typedef callbackname SteamCallback_t; \ - enum { k_iCallback = callbackid }; \ - static callbackname *GetNullPointer() { return 0; } \ - static const char *GetCallbackName() { return #callbackname; } \ - static uint32 GetCallbackID() { return callbackname::k_iCallback; } - -#define CALLBACK_MEMBER( varidx, vartype, varname ) \ - public: vartype varname ; \ - static void GetMemberVar_##varidx( unsigned int &varOffset, unsigned int &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { \ - varOffset = (unsigned int)(size_t)&GetNullPointer()->varname; \ - varSize = sizeof( vartype ); \ - varCount = 1; \ - *pszName = #varname; *pszType = #vartype; } - -#define CALLBACK_ARRAY( varidx, vartype, varname, varcount ) \ - public: vartype varname [ varcount ]; \ - static void GetMemberVar_##varidx( unsigned int &varOffset, unsigned int &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { \ - varOffset = (unsigned int)(size_t)&GetNullPointer()->varname[0]; \ - varSize = sizeof( vartype ); \ - varCount = varcount; \ - *pszName = #varname; *pszType = #vartype; } - - -#define END_CALLBACK_INTERNAL_BEGIN( numvars ) \ - static uint32 GetNumMemberVariables() { return numvars; } \ - static bool GetMemberVariable( uint32 index, uint32 &varOffset, uint32 &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { \ - switch ( index ) { default : return false; - - -#define END_CALLBACK_INTERNAL_SWITCH( varidx ) case varidx : GetMemberVar_##varidx( varOffset, varSize, varCount, pszName, pszType ); return true; - -#define END_CALLBACK_INTERNAL_END() }; } }; - -#define END_DEFINE_CALLBACK_0() \ - static uint32 GetNumMemberVariables() { return 0; } \ - static bool GetMemberVariable( uint32 index, uint32 &varOffset, uint32 &varSize, uint32 &varCount, const char **pszName, const char **pszType ) { REFERENCE( pszType ); REFERENCE( pszName ); REFERENCE( varCount ); REFERENCE( varSize ); REFERENCE( varOffset ); REFERENCE( index ); return false; } \ - }; - -#else - -#define DEFINE_CALLBACK( callbackname, callbackid ) struct callbackname { typedef callbackname SteamCallback_t; enum { k_iCallback = callbackid }; -#define CALLBACK_MEMBER( varidx, vartype, varname ) public: vartype varname ; -#define CALLBACK_ARRAY( varidx, vartype, varname, varcount ) public: vartype varname [ varcount ]; -#define END_CALLBACK_INTERNAL_BEGIN( numvars ) -#define END_CALLBACK_INTERNAL_SWITCH( varidx ) -#define END_CALLBACK_INTERNAL_END() }; -#define END_DEFINE_CALLBACK_0() }; +// The internal ISteamClient used for the gameserver interface. +// (This is actually the same thing. You really shouldn't need to access any of this stuff directly.) +inline ISteamClient *SteamGameServerClient() { return SteamClient(); } #endif -#define END_DEFINE_CALLBACK_1() \ - END_CALLBACK_INTERNAL_BEGIN( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_END() - -#define END_DEFINE_CALLBACK_2() \ - END_CALLBACK_INTERNAL_BEGIN( 2 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_END() - -#define END_DEFINE_CALLBACK_3() \ - END_CALLBACK_INTERNAL_BEGIN( 3 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 2 ) \ - END_CALLBACK_INTERNAL_END() - -#define END_DEFINE_CALLBACK_4() \ - END_CALLBACK_INTERNAL_BEGIN( 4 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 2 ) \ - END_CALLBACK_INTERNAL_SWITCH( 3 ) \ - END_CALLBACK_INTERNAL_END() - -#define END_DEFINE_CALLBACK_5() \ - END_CALLBACK_INTERNAL_BEGIN( 4 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 2 ) \ - END_CALLBACK_INTERNAL_SWITCH( 3 ) \ - END_CALLBACK_INTERNAL_SWITCH( 4 ) \ - END_CALLBACK_INTERNAL_END() - - -#define END_DEFINE_CALLBACK_6() \ - END_CALLBACK_INTERNAL_BEGIN( 6 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 2 ) \ - END_CALLBACK_INTERNAL_SWITCH( 3 ) \ - END_CALLBACK_INTERNAL_SWITCH( 4 ) \ - END_CALLBACK_INTERNAL_SWITCH( 5 ) \ - END_CALLBACK_INTERNAL_END() - -#define END_DEFINE_CALLBACK_7() \ - END_CALLBACK_INTERNAL_BEGIN( 7 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 2 ) \ - END_CALLBACK_INTERNAL_SWITCH( 3 ) \ - END_CALLBACK_INTERNAL_SWITCH( 4 ) \ - END_CALLBACK_INTERNAL_SWITCH( 5 ) \ - END_CALLBACK_INTERNAL_SWITCH( 6 ) \ - END_CALLBACK_INTERNAL_END() - -#define END_DEFINE_CALLBACK_8() \ - END_CALLBACK_INTERNAL_BEGIN( 8 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 2 ) \ - END_CALLBACK_INTERNAL_SWITCH( 3 ) \ - END_CALLBACK_INTERNAL_SWITCH( 4 ) \ - END_CALLBACK_INTERNAL_SWITCH( 5 ) \ - END_CALLBACK_INTERNAL_SWITCH( 6 ) \ - END_CALLBACK_INTERNAL_SWITCH( 7 ) \ - END_CALLBACK_INTERNAL_END() - -#define END_DEFINE_CALLBACK_9() \ - END_CALLBACK_INTERNAL_BEGIN( 9 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 2 ) \ - END_CALLBACK_INTERNAL_SWITCH( 3 ) \ - END_CALLBACK_INTERNAL_SWITCH( 4 ) \ - END_CALLBACK_INTERNAL_SWITCH( 5 ) \ - END_CALLBACK_INTERNAL_SWITCH( 6 ) \ - END_CALLBACK_INTERNAL_SWITCH( 7 ) \ - END_CALLBACK_INTERNAL_SWITCH( 8 ) \ - END_CALLBACK_INTERNAL_END() - -#define END_DEFINE_CALLBACK_10() \ - END_CALLBACK_INTERNAL_BEGIN( 10 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 2 ) \ - END_CALLBACK_INTERNAL_SWITCH( 3 ) \ - END_CALLBACK_INTERNAL_SWITCH( 4 ) \ - END_CALLBACK_INTERNAL_SWITCH( 5 ) \ - END_CALLBACK_INTERNAL_SWITCH( 6 ) \ - END_CALLBACK_INTERNAL_SWITCH( 7 ) \ - END_CALLBACK_INTERNAL_SWITCH( 8 ) \ - END_CALLBACK_INTERNAL_SWITCH( 9 ) \ - END_CALLBACK_INTERNAL_END() - -#define END_DEFINE_CALLBACK_11() \ - END_CALLBACK_INTERNAL_BEGIN( 11 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 2 ) \ - END_CALLBACK_INTERNAL_SWITCH( 3 ) \ - END_CALLBACK_INTERNAL_SWITCH( 4 ) \ - END_CALLBACK_INTERNAL_SWITCH( 5 ) \ - END_CALLBACK_INTERNAL_SWITCH( 6 ) \ - END_CALLBACK_INTERNAL_SWITCH( 7 ) \ - END_CALLBACK_INTERNAL_SWITCH( 8 ) \ - END_CALLBACK_INTERNAL_SWITCH( 9 ) \ - END_CALLBACK_INTERNAL_SWITCH( 10 ) \ - END_CALLBACK_INTERNAL_END() - -#define END_DEFINE_CALLBACK_12() \ - END_CALLBACK_INTERNAL_BEGIN( 12 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 2 ) \ - END_CALLBACK_INTERNAL_SWITCH( 3 ) \ - END_CALLBACK_INTERNAL_SWITCH( 4 ) \ - END_CALLBACK_INTERNAL_SWITCH( 5 ) \ - END_CALLBACK_INTERNAL_SWITCH( 6 ) \ - END_CALLBACK_INTERNAL_SWITCH( 7 ) \ - END_CALLBACK_INTERNAL_SWITCH( 8 ) \ - END_CALLBACK_INTERNAL_SWITCH( 9 ) \ - END_CALLBACK_INTERNAL_SWITCH( 10 ) \ - END_CALLBACK_INTERNAL_SWITCH( 11 ) \ - END_CALLBACK_INTERNAL_END() - -#define END_DEFINE_CALLBACK_13() \ - END_CALLBACK_INTERNAL_BEGIN( 13 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 2 ) \ - END_CALLBACK_INTERNAL_SWITCH( 3 ) \ - END_CALLBACK_INTERNAL_SWITCH( 4 ) \ - END_CALLBACK_INTERNAL_SWITCH( 5 ) \ - END_CALLBACK_INTERNAL_SWITCH( 6 ) \ - END_CALLBACK_INTERNAL_SWITCH( 7 ) \ - END_CALLBACK_INTERNAL_SWITCH( 8 ) \ - END_CALLBACK_INTERNAL_SWITCH( 9 ) \ - END_CALLBACK_INTERNAL_SWITCH( 10 ) \ - END_CALLBACK_INTERNAL_SWITCH( 11 ) \ - END_CALLBACK_INTERNAL_SWITCH( 12 ) \ - END_CALLBACK_INTERNAL_END() - -#define END_DEFINE_CALLBACK_14() \ - END_CALLBACK_INTERNAL_BEGIN( 14 ) \ - END_CALLBACK_INTERNAL_SWITCH( 0 ) \ - END_CALLBACK_INTERNAL_SWITCH( 1 ) \ - END_CALLBACK_INTERNAL_SWITCH( 2 ) \ - END_CALLBACK_INTERNAL_SWITCH( 3 ) \ - END_CALLBACK_INTERNAL_SWITCH( 4 ) \ - END_CALLBACK_INTERNAL_SWITCH( 5 ) \ - END_CALLBACK_INTERNAL_SWITCH( 6 ) \ - END_CALLBACK_INTERNAL_SWITCH( 7 ) \ - END_CALLBACK_INTERNAL_SWITCH( 8 ) \ - END_CALLBACK_INTERNAL_SWITCH( 9 ) \ - END_CALLBACK_INTERNAL_SWITCH( 10 ) \ - END_CALLBACK_INTERNAL_SWITCH( 11 ) \ - END_CALLBACK_INTERNAL_SWITCH( 12 ) \ - END_CALLBACK_INTERNAL_SWITCH( 13 ) \ - END_CALLBACK_INTERNAL_END() - #endif // ISTEAMCLIENT_H diff --git a/public/steam/isteamcontroller.h b/public/steam/isteamcontroller.h index 6f31b75..1b1ed78 100644 --- a/public/steam/isteamcontroller.h +++ b/public/steam/isteamcontroller.h @@ -1,6 +1,12 @@ -//====== Copyright 1996-2013, Valve Corporation, All rights reserved. ======= +//====== Copyright 1996-2018, Valve Corporation, All rights reserved. ======= +// Note: The older ISteamController interface has been deprecated in favor of ISteamInput - this interface +// was updated in this SDK but will be removed from future SDK's. The Steam Client will retain +// compatibility with the older interfaces so your any existing integrations should be unaffected. // -// Purpose: interface to valve controller +// Purpose: Steam Input is a flexible input API that supports over three hundred devices including all +// common variants of Xbox, Playstation, Nintendo Switch Pro, and Steam Controllers. +// For more info including a getting started guide for developers +// please visit: https://partner.steamgames.com/doc/features/steam_controller // //============================================================================= @@ -10,7 +16,8 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" +#include "isteaminput.h" #define STEAM_CONTROLLER_MAX_COUNT 16 @@ -26,11 +33,13 @@ #define STEAM_CONTROLLER_MIN_ANALOG_ACTION_DATA -1.0f #define STEAM_CONTROLLER_MAX_ANALOG_ACTION_DATA 1.0f +#ifndef ISTEAMINPUT_H enum ESteamControllerPad { k_ESteamControllerPad_Left, k_ESteamControllerPad_Right }; +#endif enum EControllerSource { @@ -42,12 +51,15 @@ enum EControllerSource k_EControllerSource_Switch, k_EControllerSource_LeftTrigger, k_EControllerSource_RightTrigger, + k_EControllerSource_LeftBumper, + k_EControllerSource_RightBumper, k_EControllerSource_Gyro, k_EControllerSource_CenterTrackpad, // PS4 k_EControllerSource_RightJoystick, // Traditional Controllers k_EControllerSource_DPad, // Traditional Controllers - k_EControllerSource_Key, // Keyboards with scan codes - k_EControllerSource_Mouse, // Traditional mouse + k_EControllerSource_Key, // Keyboards with scan codes - Unused + k_EControllerSource_Mouse, // Traditional mouse - Unused + k_EControllerSource_LeftGyro, // Secondary Gyro - Switch - Unused k_EControllerSource_Count }; @@ -72,6 +84,10 @@ enum EControllerSourceMode k_EControllerSourceMode_Switches }; +// Note: Please do not use action origins as a way to identify controller types. There is no +// guarantee that they will be added in a contiguous manner - use GetInputTypeForHandle instead +// Versions of Steam that add new controller types in the future will extend this enum if you're +// using a lookup table please check the bounds of any origins returned by Steam. enum EControllerActionOrigin { // Steam Controller @@ -237,9 +253,9 @@ enum EControllerActionOrigin k_EControllerActionOrigin_SteamV2_Y, k_EControllerActionOrigin_SteamV2_LeftBumper, k_EControllerActionOrigin_SteamV2_RightBumper, - k_EControllerActionOrigin_SteamV2_LeftGrip, - k_EControllerActionOrigin_SteamV2_RightGrip, + k_EControllerActionOrigin_SteamV2_LeftGrip_Lower, k_EControllerActionOrigin_SteamV2_LeftGrip_Upper, + k_EControllerActionOrigin_SteamV2_RightGrip_Lower, k_EControllerActionOrigin_SteamV2_RightGrip_Upper, k_EControllerActionOrigin_SteamV2_LeftBumper_Pressure, k_EControllerActionOrigin_SteamV2_RightBumper_Pressure, @@ -280,13 +296,90 @@ enum EControllerActionOrigin k_EControllerActionOrigin_SteamV2_Gyro_Yaw, k_EControllerActionOrigin_SteamV2_Gyro_Roll, - k_EControllerActionOrigin_Count + // Switch - Pro or Joycons used as a single input device. + // This does not apply to a single joycon + k_EControllerActionOrigin_Switch_A, + k_EControllerActionOrigin_Switch_B, + k_EControllerActionOrigin_Switch_X, + k_EControllerActionOrigin_Switch_Y, + k_EControllerActionOrigin_Switch_LeftBumper, + k_EControllerActionOrigin_Switch_RightBumper, + k_EControllerActionOrigin_Switch_Plus, //Start + k_EControllerActionOrigin_Switch_Minus, //Back + k_EControllerActionOrigin_Switch_Capture, + k_EControllerActionOrigin_Switch_LeftTrigger_Pull, + k_EControllerActionOrigin_Switch_LeftTrigger_Click, + k_EControllerActionOrigin_Switch_RightTrigger_Pull, + k_EControllerActionOrigin_Switch_RightTrigger_Click, + k_EControllerActionOrigin_Switch_LeftStick_Move, + k_EControllerActionOrigin_Switch_LeftStick_Click, + k_EControllerActionOrigin_Switch_LeftStick_DPadNorth, + k_EControllerActionOrigin_Switch_LeftStick_DPadSouth, + k_EControllerActionOrigin_Switch_LeftStick_DPadWest, + k_EControllerActionOrigin_Switch_LeftStick_DPadEast, + k_EControllerActionOrigin_Switch_RightStick_Move, + k_EControllerActionOrigin_Switch_RightStick_Click, + k_EControllerActionOrigin_Switch_RightStick_DPadNorth, + k_EControllerActionOrigin_Switch_RightStick_DPadSouth, + k_EControllerActionOrigin_Switch_RightStick_DPadWest, + k_EControllerActionOrigin_Switch_RightStick_DPadEast, + k_EControllerActionOrigin_Switch_DPad_North, + k_EControllerActionOrigin_Switch_DPad_South, + k_EControllerActionOrigin_Switch_DPad_West, + k_EControllerActionOrigin_Switch_DPad_East, + k_EControllerActionOrigin_Switch_ProGyro_Move, // Primary Gyro in Pro Controller, or Right JoyCon + k_EControllerActionOrigin_Switch_ProGyro_Pitch, // Primary Gyro in Pro Controller, or Right JoyCon + k_EControllerActionOrigin_Switch_ProGyro_Yaw, // Primary Gyro in Pro Controller, or Right JoyCon + k_EControllerActionOrigin_Switch_ProGyro_Roll, // Primary Gyro in Pro Controller, or Right JoyCon + // Switch JoyCon Specific + k_EControllerActionOrigin_Switch_RightGyro_Move, // Right JoyCon Gyro generally should correspond to Pro's single gyro + k_EControllerActionOrigin_Switch_RightGyro_Pitch, // Right JoyCon Gyro generally should correspond to Pro's single gyro + k_EControllerActionOrigin_Switch_RightGyro_Yaw, // Right JoyCon Gyro generally should correspond to Pro's single gyro + k_EControllerActionOrigin_Switch_RightGyro_Roll, // Right JoyCon Gyro generally should correspond to Pro's single gyro + k_EControllerActionOrigin_Switch_LeftGyro_Move, + k_EControllerActionOrigin_Switch_LeftGyro_Pitch, + k_EControllerActionOrigin_Switch_LeftGyro_Yaw, + k_EControllerActionOrigin_Switch_LeftGyro_Roll, + k_EControllerActionOrigin_Switch_LeftGrip_Lower, // Left JoyCon SR Button + k_EControllerActionOrigin_Switch_LeftGrip_Upper, // Left JoyCon SL Button + k_EControllerActionOrigin_Switch_RightGrip_Lower, // Right JoyCon SL Button + k_EControllerActionOrigin_Switch_RightGrip_Upper, // Right JoyCon SR Button + + k_EControllerActionOrigin_Count, // If Steam has added support for new controllers origins will go here. + k_EControllerActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits. }; -enum ESteamControllerLEDFlag +#ifndef ISTEAMINPUT_H +enum EXboxOrigin { - k_ESteamControllerLEDFlag_SetColor, - k_ESteamControllerLEDFlag_RestoreUserDefault + k_EXboxOrigin_A, + k_EXboxOrigin_B, + k_EXboxOrigin_X, + k_EXboxOrigin_Y, + k_EXboxOrigin_LeftBumper, + k_EXboxOrigin_RightBumper, + k_EXboxOrigin_Menu, //Start + k_EXboxOrigin_View, //Back + k_EXboxOrigin_LeftTrigger_Pull, + k_EXboxOrigin_LeftTrigger_Click, + k_EXboxOrigin_RightTrigger_Pull, + k_EXboxOrigin_RightTrigger_Click, + k_EXboxOrigin_LeftStick_Move, + k_EXboxOrigin_LeftStick_Click, + k_EXboxOrigin_LeftStick_DPadNorth, + k_EXboxOrigin_LeftStick_DPadSouth, + k_EXboxOrigin_LeftStick_DPadWest, + k_EXboxOrigin_LeftStick_DPadEast, + k_EXboxOrigin_RightStick_Move, + k_EXboxOrigin_RightStick_Click, + k_EXboxOrigin_RightStick_DPadNorth, + k_EXboxOrigin_RightStick_DPadSouth, + k_EXboxOrigin_RightStick_DPadWest, + k_EXboxOrigin_RightStick_DPadEast, + k_EXboxOrigin_DPad_North, + k_EXboxOrigin_DPad_South, + k_EXboxOrigin_DPad_West, + k_EXboxOrigin_DPad_East, }; enum ESteamInputType @@ -295,8 +388,24 @@ enum ESteamInputType k_ESteamInputType_SteamController, k_ESteamInputType_XBox360Controller, k_ESteamInputType_XBoxOneController, - k_ESteamInputType_GenericXInput, + k_ESteamInputType_GenericGamepad, // DirectInput controllers k_ESteamInputType_PS4Controller, + k_ESteamInputType_AppleMFiController, // Unused + k_ESteamInputType_AndroidController, // Unused + k_ESteamInputType_SwitchJoyConPair, // Unused + k_ESteamInputType_SwitchJoyConSingle, // Unused + k_ESteamInputType_SwitchProController, + k_ESteamInputType_MobileTouch, // Steam Link App On-screen Virtual Controller + k_ESteamInputType_PS3Controller, // Currently uses PS4 Origins + k_ESteamInputType_Count, + k_ESteamInputType_MaximumPossibleValue = 255, +}; +#endif + +enum ESteamControllerLEDFlag +{ + k_ESteamControllerLEDFlag_SetColor, + k_ESteamControllerLEDFlag_RestoreUserDefault }; // ControllerHandle_t is used to refer to a specific controller. @@ -312,6 +421,11 @@ typedef uint64 ControllerAnalogActionHandle_t; #pragma pack( push, 1 ) +#ifdef ISTEAMINPUT_H +#define ControllerAnalogActionData_t InputAnalogActionData_t +#define ControllerDigitalActionData_t InputDigitalActionData_t +#define ControllerMotionData_t InputMotionData_t +#else struct ControllerAnalogActionData_t { // Type of data coming from this action, this will match what got specified in the action set @@ -351,12 +465,12 @@ struct ControllerMotionData_t float rotVelY; float rotVelZ; }; - +#endif #pragma pack( pop ) //----------------------------------------------------------------------------- -// Purpose: Native Steam controller support API +// Purpose: Steam Input API //----------------------------------------------------------------------------- class ISteamController { @@ -368,7 +482,8 @@ public: // Synchronize API state with the latest Steam Controller inputs available. This // is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest - // possible latency, you call this directly before reading controller state. + // possible latency, you call this directly before reading controller state. This must + // be called from somewhere before GetConnectedControllers will return any handles virtual void RunFrame() = 0; // Enumerate currently connected controllers @@ -376,11 +491,10 @@ public: // Returns the number of handles written to handlesOut virtual int GetConnectedControllers( ControllerHandle_t *handlesOut ) = 0; - // Invokes the Steam overlay and brings up the binding screen - // Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode - virtual bool ShowBindingPanel( ControllerHandle_t controllerHandle ) = 0; - + //----------------------------------------------------------------------------- // ACTION SETS + //----------------------------------------------------------------------------- + // Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls. virtual ControllerActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0; @@ -390,13 +504,16 @@ public: virtual void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle ) = 0; virtual ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle ) = 0; + // ACTION SET LAYERS virtual void ActivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0; virtual void DeactivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0; virtual void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle ) = 0; virtual int GetActiveActionSetLayers( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t *handlesOut ) = 0; - + //----------------------------------------------------------------------------- // ACTIONS + //----------------------------------------------------------------------------- + // Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls. virtual ControllerDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0; @@ -404,7 +521,8 @@ public: virtual ControllerDigitalActionData_t GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle ) = 0; // Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. - // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles + // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles. The EControllerActionOrigin enum will get extended as support for new controller controllers gets added to + // the Steam client and will exceed the values from this header, please check bounds if you are using a look up table. virtual int GetDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin *originsOut ) = 0; // Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls. @@ -414,11 +532,25 @@ public: virtual ControllerAnalogActionData_t GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle ) = 0; // Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. - // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles + // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles. The EControllerActionOrigin enum will get extended as support for new controller controllers gets added to + // the Steam client and will exceed the values from this header, please check bounds if you are using a look up table. virtual int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin *originsOut ) = 0; - - virtual void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ) = 0; + // Get a local path to art for on-screen glyph for a particular origin - this call is cheap + virtual const char *GetGlyphForActionOrigin( EControllerActionOrigin eOrigin ) = 0; + + // Returns a localized string (from Steam's language setting) for the specified origin - this call is serialized + virtual const char *GetStringForActionOrigin( EControllerActionOrigin eOrigin ) = 0; + + virtual void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ) = 0; + + // Returns raw motion data from the specified controller + virtual ControllerMotionData_t GetMotionData( ControllerHandle_t controllerHandle ) = 0; + + //----------------------------------------------------------------------------- + // OUTPUTS + //----------------------------------------------------------------------------- + // Trigger a haptic pulse on a controller virtual void TriggerHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0; @@ -426,36 +558,48 @@ public: // nFlags is currently unused and reserved for future use. virtual void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0; - // Tigger a vibration event on supported controllers. + // Trigger a vibration event on supported controllers. virtual void TriggerVibration( ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0; // Set the controller LED color on supported controllers. virtual void SetLEDColor( ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0; - // Returns the associated gamepad index for the specified controller, if emulating a gamepad - virtual int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle ) = 0; - - // Returns the associated controller handle for the specified emulated gamepad - virtual ControllerHandle_t GetControllerForGamepadIndex( int nIndex ) = 0; - - // Returns raw motion data from the specified controller - virtual ControllerMotionData_t GetMotionData( ControllerHandle_t controllerHandle ) = 0; - - // Attempt to display origins of given action in the controller HUD, for the currently active action set - // Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode - virtual bool ShowDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition ) = 0; - virtual bool ShowAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition ) = 0; + //----------------------------------------------------------------------------- + // Utility functions availible without using the rest of Steam Input API + //----------------------------------------------------------------------------- - // Returns a localized string (from Steam's language setting) for the specified origin - virtual const char *GetStringForActionOrigin( EControllerActionOrigin eOrigin ) = 0; - - // Get a local path to art for on-screen glyph for a particular origin - virtual const char *GetGlyphForActionOrigin( EControllerActionOrigin eOrigin ) = 0; + // Invokes the Steam overlay and brings up the binding screen if the user is using Big Picture Mode + // If the user is not in Big Picture Mode it will open up the binding in a new window + virtual bool ShowBindingPanel( ControllerHandle_t controllerHandle ) = 0; // Returns the input type for a particular handle virtual ESteamInputType GetInputTypeForHandle( ControllerHandle_t controllerHandle ) = 0; + + // Returns the associated controller handle for the specified emulated gamepad - can be used with the above 2 functions + // to identify controllers presented to your game over Xinput. Returns 0 if the Xinput index isn't associated with Steam Input + virtual ControllerHandle_t GetControllerForGamepadIndex( int nIndex ) = 0; + + // Returns the associated gamepad index for the specified controller, if emulating a gamepad or -1 if not associated with an Xinput index + virtual int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle ) = 0; + + // Returns a localized string (from Steam's language setting) for the specified Xbox controller origin. This function is cheap. + virtual const char *GetStringForXboxOrigin( EXboxOrigin eOrigin ) = 0; + + // Get a local path to art for on-screen glyph for a particular Xbox controller origin. This function is serialized. + virtual const char *GetGlyphForXboxOrigin( EXboxOrigin eOrigin ) = 0; + + // Get the equivalent ActionOrigin for a given Xbox controller origin this can be chained with GetGlyphForActionOrigin to provide future proof glyphs for + // non-Steam Input API action games. Note - this only translates the buttons directly and doesn't take into account any remapping a user has made in their configuration + virtual EControllerActionOrigin GetActionOriginFromXboxOrigin( ControllerHandle_t controllerHandle, EXboxOrigin eOrigin ) = 0; + + // Convert an origin to another controller type - for inputs not present on the other controller type this will return k_EControllerActionOrigin_None + virtual EControllerActionOrigin TranslateActionOrigin( ESteamInputType eDestinationInputType, EControllerActionOrigin eSourceOrigin ) = 0; }; -#define STEAMCONTROLLER_INTERFACE_VERSION "SteamController006" +#define STEAMCONTROLLER_INTERFACE_VERSION "SteamController007" + +// Global interface accessor +inline ISteamController *SteamController(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamController *, SteamController, STEAMCONTROLLER_INTERFACE_VERSION ); #endif // ISTEAMCONTROLLER_H diff --git a/public/steam/isteamfriends.h b/public/steam/isteamfriends.h index c1754c2..8a280c3 100644 --- a/public/steam/isteamfriends.h +++ b/public/steam/isteamfriends.h @@ -1,4 +1,4 @@ -//====== Copyright (C) 1996-2008, Valve Corporation, All rights reserved. ===== +//====== Copyright Valve Corporation, All rights reserved. ==================== // // Purpose: interface to both friends list data and general information about users // @@ -10,9 +10,7 @@ #pragma once #endif -#include "isteamclient.h" -#include "steamclientpublic.h" - +#include "steam_api_common.h" //----------------------------------------------------------------------------- // Purpose: set of relationships to other users @@ -59,6 +57,7 @@ enum EPersonaState k_EPersonaStateSnooze = 4, // auto-away for a long time k_EPersonaStateLookingToTrade = 5, // Online, trading k_EPersonaStateLookingToPlay = 6, // Online, wanting to play + k_EPersonaStateInvisible = 7, // Online, but appears offline to friends. This status is never published to clients. k_EPersonaStateMax, }; @@ -92,7 +91,7 @@ enum EFriendFlags #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif struct FriendGameInfo_t { @@ -143,7 +142,7 @@ struct FriendSessionStateInfo_t const uint32 k_cubChatMetadataMax = 8192; // size limits on Rich Presence data -enum { k_cchMaxRichPresenceKeys = 20 }; +enum { k_cchMaxRichPresenceKeys = 30 }; enum { k_cchMaxRichPresenceKeyLength = 64 }; enum { k_cchMaxRichPresenceValueLength = 256 }; @@ -155,6 +154,21 @@ enum EOverlayToStoreFlag k_EOverlayToStoreFlag_AddToCartAndShow = 2, }; + +//----------------------------------------------------------------------------- +// Purpose: Tells Steam where to place the browser window inside the overlay +//----------------------------------------------------------------------------- +enum EActivateGameOverlayToWebPageMode +{ + k_EActivateGameOverlayToWebPageMode_Default = 0, // Browser will open next to all other windows that the user has open in the overlay. + // The window will remain open, even if the user closes then re-opens the overlay. + + k_EActivateGameOverlayToWebPageMode_Modal = 1 // Browser will be opened in a special overlay configuration which hides all other windows + // that the user has open in the overlay. When the user closes the overlay, the browser window + // will also close. When the user closes the browser window, the overlay will automatically close. +}; + + //----------------------------------------------------------------------------- // Purpose: interface to accessing information about individual users, // that can be a friend, in a group, on a game server or in a lobby with the local user @@ -176,7 +190,7 @@ public: // // If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted // to change the name back, in addition to the SetPersonaNameResponse_t callback. - CALL_RESULT( SetPersonaNameResponse_t ) + STEAM_CALL_RESULT( SetPersonaNameResponse_t ) virtual SteamAPICall_t SetPersonaName( const char *pchPersonaName ) = 0; // gets the status of the current user @@ -207,13 +221,14 @@ public: virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0; // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details - virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, OUT_STRUCT() FriendGameInfo_t *pFriendGameInfo ) = 0; + virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, STEAM_OUT_STRUCT() FriendGameInfo_t *pFriendGameInfo ) = 0; // accesses old friends names - returns an empty string when their are no more items in the history virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0; // friends steam level virtual int GetFriendSteamLevel( CSteamID steamIDFriend ) = 0; // Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player. + // DEPRECATED: GetPersonaName follows the Steam nickname preferences, so apps shouldn't need to care about nicknames explicitly. virtual const char *GetPlayerNickname( CSteamID steamIDPlayer ) = 0; // friend grouping (tag) apis @@ -226,7 +241,7 @@ public: // returns the number of members in a given friends group virtual int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID ) = 0; // gets up to nMembersCount members of the given friends group, if fewer exist than requested those positions' SteamIDs will be invalid - virtual void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, OUT_ARRAY_CALL(nMembersCount, GetFriendsGroupMembersCount, friendsGroupID ) CSteamID *pOutSteamIDMembers, int nMembersCount ) = 0; + virtual void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, STEAM_OUT_ARRAY_CALL(nMembersCount, GetFriendsGroupMembersCount, friendsGroupID ) CSteamID *pOutSteamIDMembers, int nMembersCount ) = 0; // returns true if the specified user meets any of the criteria specified in iFriendFlags // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values @@ -240,7 +255,7 @@ public: // returns the most recent information we have about what's happening in a clan virtual bool GetClanActivityCounts( CSteamID steamIDClan, int *pnOnline, int *pnInGame, int *pnChatting ) = 0; // for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest - virtual SteamAPICall_t DownloadClanActivityCounts( ARRAY_COUNT(cClansToRequest) CSteamID *psteamIDClans, int cClansToRequest ) = 0; + virtual SteamAPICall_t DownloadClanActivityCounts( STEAM_ARRAY_COUNT(cClansToRequest) CSteamID *psteamIDClans, int cClansToRequest ) = 0; // iterators for getting users in a chat room, lobby, game server or clan // note that large clans that cannot be iterated by the local user @@ -256,7 +271,8 @@ public: virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0; // activates the game overlay, with an optional dialog to open - // valid options are "Friends", "Community", "Players", "Settings", "OfficialGameGroup", "Stats", "Achievements" + // valid options include "Friends", "Community", "Players", "Settings", "OfficialGameGroup", "Stats", "Achievements", + // "chatroomgroup/nnnn" virtual void ActivateGameOverlay( const char *pchDialog ) = 0; // activates game overlay to a specific place @@ -274,7 +290,7 @@ public: // activates game overlay web browser directly to the specified URL // full address with protocol type is required, e.g. http://www.steamgames.com/ - virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0; + virtual void ActivateGameOverlayToWebPage( const char *pchURL, EActivateGameOverlayToWebPageMode eMode = k_EActivateGameOverlayToWebPageMode_Default ) = 0; // activates game overlay to store page for app virtual void ActivateGameOverlayToStore( AppId_t nAppID, EOverlayToStoreFlag eFlag ) = 0; @@ -309,7 +325,7 @@ public: // you can only ask about clans that a user is a member of // note that this won't download avatars automatically; if you get an officer, // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar - CALL_RESULT( ClanOfficerListResponse_t ) + STEAM_CALL_RESULT( ClanOfficerListResponse_t ) virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0; // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed @@ -343,10 +359,10 @@ public: // Requests rich presence for a specific user. virtual void RequestFriendRichPresence( CSteamID steamIDFriend ) = 0; - // rich invite support - // if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game - // if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string - // invites can only be sent to friends + // Rich invite support. + // If the target accepts the invite, a GameRichPresenceJoinRequested_t callback is posted containing the connect string. + // (Or you can configure yout game so that it is passed on the command line instead. This is a deprecated path; ask us if you really need this.) + // Invites can only be sent to friends. virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; // recently-played-with friends iteration @@ -361,13 +377,13 @@ public: // this allows in-game access to group (clan) chats from in the game // the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay // use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat - CALL_RESULT( JoinClanChatRoomCompletionResult_t ) + STEAM_CALL_RESULT( JoinClanChatRoomCompletionResult_t ) virtual SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) = 0; virtual bool LeaveClanChatRoom( CSteamID steamIDClan ) = 0; virtual int GetClanChatMemberCount( CSteamID steamIDClan ) = 0; virtual CSteamID GetChatMemberByIndex( CSteamID steamIDClan, int iUser ) = 0; virtual bool SendClanChatMessage( CSteamID steamIDClanChat, const char *pchText ) = 0; - virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *peChatEntryType, OUT_STRUCT() CSteamID *psteamidChatter ) = 0; + virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *peChatEntryType, STEAM_OUT_STRUCT() CSteamID *psteamidChatter ) = 0; virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0; // interact with the Steam (game overlay / desktop) @@ -382,18 +398,30 @@ public: virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; // following apis - CALL_RESULT( FriendsGetFollowerCount_t ) + STEAM_CALL_RESULT( FriendsGetFollowerCount_t ) virtual SteamAPICall_t GetFollowerCount( CSteamID steamID ) = 0; - CALL_RESULT( FriendsIsFollowing_t ) + STEAM_CALL_RESULT( FriendsIsFollowing_t ) virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0; - CALL_RESULT( FriendsEnumerateFollowingList_t ) + STEAM_CALL_RESULT( FriendsEnumerateFollowingList_t ) virtual SteamAPICall_t EnumerateFollowingList( uint32 unStartIndex ) = 0; virtual bool IsClanPublic( CSteamID steamIDClan ) = 0; virtual bool IsClanOfficialGameGroup( CSteamID steamIDClan ) = 0; + + /// Return the number of chats (friends or chat rooms) with unread messages. + /// A "priority" message is one that would generate some sort of toast or + /// notification, and depends on user settings. + /// + /// You can register for UnreadChatMessagesChanged_t callbacks to know when this + /// has potentially changed. + virtual int GetNumChatsWithUnreadPriorityMessages() = 0; }; -#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends015" +#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends017" + +// Global interface accessor +inline ISteamFriends *SteamFriends(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamFriends *, SteamFriends, STEAMFRIENDS_INTERFACE_VERSION ); // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) @@ -401,7 +429,7 @@ public: #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif //----------------------------------------------------------------------------- @@ -431,9 +459,10 @@ enum EPersonaChange k_EPersonaChangeLeftSource = 0x0100, k_EPersonaChangeRelationshipChanged = 0x0200, k_EPersonaChangeNameFirstSet = 0x0400, - k_EPersonaChangeFacebookInfo = 0x0800, + k_EPersonaChangeBroadcast = 0x0800, k_EPersonaChangeNickname = 0x1000, k_EPersonaChangeSteamLevel = 0x2000, + k_EPersonaChangeRichPresence = 0x4000, }; @@ -633,6 +662,13 @@ struct SetPersonaNameResponse_t EResult m_result; // detailed result code }; +//----------------------------------------------------------------------------- +// Purpose: Invoked when the status of unread messages changes +//----------------------------------------------------------------------------- +struct UnreadChatMessagesChanged_t +{ + enum { k_iCallback = k_iSteamFriendsCallbacks + 48 }; +}; #pragma pack( pop ) diff --git a/public/steam/isteamgamecoordinator.h b/public/steam/isteamgamecoordinator.h index 5ab0637..89b740d 100644 --- a/public/steam/isteamgamecoordinator.h +++ b/public/steam/isteamgamecoordinator.h @@ -10,8 +10,7 @@ #pragma once #endif -#include "steamtypes.h" -#include "steamclientpublic.h" +#include "steam_api_common.h" // list of possible return values from the ISteamGameCoordinator API @@ -54,7 +53,7 @@ public: #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif // callback notification - A new message is available for reading from the message queue diff --git a/public/steam/isteamgameserver.h b/public/steam/isteamgameserver.h index e19f1dd..6a0aada 100644 --- a/public/steam/isteamgameserver.h +++ b/public/steam/isteamgameserver.h @@ -10,7 +10,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" #define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1) @@ -193,7 +193,7 @@ public: // these two functions s are deprecated, and will not return results // they will be removed in a future version of the SDK virtual void GetGameplayStats( ) = 0; - CALL_RESULT( GSReputation_t ) + STEAM_CALL_RESULT( GSReputation_t ) virtual SteamAPICall_t GetServerReputation() = 0; // Returns the public IP of the server according to Steam, useful when the server is @@ -241,17 +241,21 @@ public: virtual void ForceHeartbeat() = 0; // associate this game server with this clan for the purposes of computing player compat - CALL_RESULT( AssociateWithClanResult_t ) + STEAM_CALL_RESULT( AssociateWithClanResult_t ) virtual SteamAPICall_t AssociateWithClan( CSteamID steamIDClan ) = 0; // ask if any of the current players dont want to play with this new player - or vice versa - CALL_RESULT( ComputeNewPlayerCompatibilityResult_t ) + STEAM_CALL_RESULT( ComputeNewPlayerCompatibilityResult_t ) virtual SteamAPICall_t ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer ) = 0; }; #define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer012" +// Global accessor +inline ISteamGameServer *SteamGameServer(); +STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServer *, SteamGameServer, STEAMGAMESERVER_INTERFACE_VERSION ); + // game server flags const uint32 k_unServerFlagNone = 0x00; const uint32 k_unServerFlagActive = 0x01; // server has users playing @@ -271,7 +275,7 @@ const uint32 k_unServerFlagPrivate = 0x20; // server shouldn't list on master #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif diff --git a/public/steam/isteamgameserverstats.h b/public/steam/isteamgameserverstats.h index e7922c9..aacac4b 100644 --- a/public/steam/isteamgameserverstats.h +++ b/public/steam/isteamgameserverstats.h @@ -10,7 +10,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" //----------------------------------------------------------------------------- // Purpose: Functions for authenticating users via Steam to play on a game server @@ -23,7 +23,7 @@ public: // if the user has no stats, GSStatsReceived_t.m_eResult will be set to k_EResultFail // these stats will only be auto-updated for clients playing on the server. For other // users you'll need to call RequestUserStats() again to refresh any data - CALL_RESULT( GSStatsReceived_t ) + STEAM_CALL_RESULT( GSStatsReceived_t ) virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0; // requests stat information for a user, usable after a successful call to RequestUserStats() @@ -48,19 +48,23 @@ public: // uploaded has been rejected, either because they broke constraints // or were out of date. In this case the server sends back updated values. // The stats should be re-iterated to keep in sync. - CALL_RESULT( GSStatsStored_t ) + STEAM_CALL_RESULT( GSStatsStored_t ) virtual SteamAPICall_t StoreUserStats( CSteamID steamIDUser ) = 0; }; - #define STEAMGAMESERVERSTATS_INTERFACE_VERSION "SteamGameServerStats001" +// Global accessor +inline ISteamGameServerStats *SteamGameServerStats(); +STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServerStats *, SteamGameServerStats, STEAMGAMESERVERSTATS_INTERFACE_VERSION ); + + // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) #pragma pack( push, 4 ) #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif //----------------------------------------------------------------------------- diff --git a/public/steam/isteamhtmlsurface.h b/public/steam/isteamhtmlsurface.h index 117599c..086a842 100644 --- a/public/steam/isteamhtmlsurface.h +++ b/public/steam/isteamhtmlsurface.h @@ -10,7 +10,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" typedef uint32 HHTMLBrowser; const uint32 INVALID_HTMLBROWSER = 0; @@ -40,7 +40,7 @@ public: // not implement these callback handlers, the browser may appear to hang instead of // navigating to new pages or triggering javascript popups. // - CALL_RESULT( HTML_BrowserReady_t ) + STEAM_CALL_RESULT( HTML_BrowserReady_t ) virtual SteamAPICall_t CreateBrowser( const char *pchUserAgent, const char *pchUserCSS ) = 0; // Call this when you are done with a html surface, this lets us free the resources being used by it @@ -137,8 +137,9 @@ public: k_eHTMLKeyModifier_ShiftDown = 1 << 2, }; - // keyboard interactions, native keycode is the virtual key code value from your OS - virtual void KeyDown( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; + // keyboard interactions, native keycode is the virtual key code value from your OS, system key flags the key to not + // be sent as a typed character as well as a key down + virtual void KeyDown( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers, bool bIsSystemKey = false ) = 0; virtual void KeyUp( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; // cUnicodeChar is the unicode character point for this keypress (and potentially multiple chars per press) virtual void KeyChar( HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0; @@ -181,6 +182,9 @@ public: // Specifies the ratio between physical and logical pixels. virtual void SetDPIScalingFactor( HHTMLBrowser unBrowserHandle, float flDPIScaling ) = 0; + // Open HTML/JS developer tools + virtual void OpenDeveloperTools( HHTMLBrowser unBrowserHandle ) = 0; + // CALLBACKS // // These set of functions are used as responses to callback requests @@ -197,11 +201,15 @@ public: virtual void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult ) = 0; // You MUST call this in response to a HTML_FileOpenDialog_t callback - IGNOREATTR() + STEAM_IGNOREATTR() virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0; }; -#define STEAMHTMLSURFACE_INTERFACE_VERSION "STEAMHTMLSURFACE_INTERFACE_VERSION_004" +#define STEAMHTMLSURFACE_INTERFACE_VERSION "STEAMHTMLSURFACE_INTERFACE_VERSION_005" + +// Global interface accessor +inline ISteamHTMLSurface *SteamHTMLSurface(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamHTMLSurface *, SteamHTMLSurface, STEAMHTMLSURFACE_INTERFACE_VERSION ); // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) @@ -209,156 +217,156 @@ public: #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif //----------------------------------------------------------------------------- // Purpose: The browser is ready for use //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_BrowserReady_t, k_iSteamHTMLSurfaceCallbacks + 1 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this browser is now fully created and ready to navigate to pages -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN( HTML_BrowserReady_t, k_iSteamHTMLSurfaceCallbacks + 1 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this browser is now fully created and ready to navigate to pages +STEAM_CALLBACK_END(1) //----------------------------------------------------------------------------- // Purpose: the browser has a pending paint //----------------------------------------------------------------------------- -DEFINE_CALLBACK(HTML_NeedsPaint_t, k_iSteamHTMLSurfaceCallbacks + 2) -CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the browser that needs the paint -CALLBACK_MEMBER(1, const char *, pBGRA ) // a pointer to the B8G8R8A8 data for this surface, valid until SteamAPI_RunCallbacks is next called -CALLBACK_MEMBER(2, uint32, unWide) // the total width of the pBGRA texture -CALLBACK_MEMBER(3, uint32, unTall) // the total height of the pBGRA texture -CALLBACK_MEMBER(4, uint32, unUpdateX) // the offset in X for the damage rect for this update -CALLBACK_MEMBER(5, uint32, unUpdateY) // the offset in Y for the damage rect for this update -CALLBACK_MEMBER(6, uint32, unUpdateWide) // the width of the damage rect for this update -CALLBACK_MEMBER(7, uint32, unUpdateTall) // the height of the damage rect for this update -CALLBACK_MEMBER(8, uint32, unScrollX) // the page scroll the browser was at when this texture was rendered -CALLBACK_MEMBER(9, uint32, unScrollY) // the page scroll the browser was at when this texture was rendered -CALLBACK_MEMBER(10, float, flPageScale) // the page scale factor on this page when rendered -CALLBACK_MEMBER(11, uint32, unPageSerial) // incremented on each new page load, you can use this to reject draws while navigating to new pages -END_DEFINE_CALLBACK_12() +STEAM_CALLBACK_BEGIN(HTML_NeedsPaint_t, k_iSteamHTMLSurfaceCallbacks + 2) +STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the browser that needs the paint +STEAM_CALLBACK_MEMBER(1, const char *, pBGRA ) // a pointer to the B8G8R8A8 data for this surface, valid until SteamAPI_RunCallbacks is next called +STEAM_CALLBACK_MEMBER(2, uint32, unWide) // the total width of the pBGRA texture +STEAM_CALLBACK_MEMBER(3, uint32, unTall) // the total height of the pBGRA texture +STEAM_CALLBACK_MEMBER(4, uint32, unUpdateX) // the offset in X for the damage rect for this update +STEAM_CALLBACK_MEMBER(5, uint32, unUpdateY) // the offset in Y for the damage rect for this update +STEAM_CALLBACK_MEMBER(6, uint32, unUpdateWide) // the width of the damage rect for this update +STEAM_CALLBACK_MEMBER(7, uint32, unUpdateTall) // the height of the damage rect for this update +STEAM_CALLBACK_MEMBER(8, uint32, unScrollX) // the page scroll the browser was at when this texture was rendered +STEAM_CALLBACK_MEMBER(9, uint32, unScrollY) // the page scroll the browser was at when this texture was rendered +STEAM_CALLBACK_MEMBER(10, float, flPageScale) // the page scale factor on this page when rendered +STEAM_CALLBACK_MEMBER(11, uint32, unPageSerial) // incremented on each new page load, you can use this to reject draws while navigating to new pages +STEAM_CALLBACK_END(12) //----------------------------------------------------------------------------- // Purpose: The browser wanted to navigate to a new page // NOTE - you MUST call AllowStartRequest in response to this callback //----------------------------------------------------------------------------- -DEFINE_CALLBACK(HTML_StartRequest_t, k_iSteamHTMLSurfaceCallbacks + 3) -CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface navigating -CALLBACK_MEMBER(1, const char *, pchURL) // the url they wish to navigate to -CALLBACK_MEMBER(2, const char *, pchTarget) // the html link target type (i.e _blank, _self, _parent, _top ) -CALLBACK_MEMBER(3, const char *, pchPostData ) // any posted data for the request -CALLBACK_MEMBER(4, bool, bIsRedirect) // true if this was a http/html redirect from the last load request -END_DEFINE_CALLBACK_5() +STEAM_CALLBACK_BEGIN(HTML_StartRequest_t, k_iSteamHTMLSurfaceCallbacks + 3) +STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface navigating +STEAM_CALLBACK_MEMBER(1, const char *, pchURL) // the url they wish to navigate to +STEAM_CALLBACK_MEMBER(2, const char *, pchTarget) // the html link target type (i.e _blank, _self, _parent, _top ) +STEAM_CALLBACK_MEMBER(3, const char *, pchPostData ) // any posted data for the request +STEAM_CALLBACK_MEMBER(4, bool, bIsRedirect) // true if this was a http/html redirect from the last load request +STEAM_CALLBACK_END(5) //----------------------------------------------------------------------------- // Purpose: The browser has been requested to close due to user interaction (usually from a javascript window.close() call) //----------------------------------------------------------------------------- -DEFINE_CALLBACK(HTML_CloseBrowser_t, k_iSteamHTMLSurfaceCallbacks + 4) -CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN(HTML_CloseBrowser_t, k_iSteamHTMLSurfaceCallbacks + 4) +STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface +STEAM_CALLBACK_END(1) //----------------------------------------------------------------------------- // Purpose: the browser is navigating to a new url //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_URLChanged_t, k_iSteamHTMLSurfaceCallbacks + 5 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface navigating -CALLBACK_MEMBER( 1, const char *, pchURL ) // the url they wish to navigate to -CALLBACK_MEMBER( 2, const char *, pchPostData ) // any posted data for the request -CALLBACK_MEMBER( 3, bool, bIsRedirect ) // true if this was a http/html redirect from the last load request -CALLBACK_MEMBER( 4, const char *, pchPageTitle ) // the title of the page -CALLBACK_MEMBER( 5, bool, bNewNavigation ) // true if this was from a fresh tab and not a click on an existing page -END_DEFINE_CALLBACK_6() +STEAM_CALLBACK_BEGIN( HTML_URLChanged_t, k_iSteamHTMLSurfaceCallbacks + 5 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface navigating +STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) // the url they wish to navigate to +STEAM_CALLBACK_MEMBER( 2, const char *, pchPostData ) // any posted data for the request +STEAM_CALLBACK_MEMBER( 3, bool, bIsRedirect ) // true if this was a http/html redirect from the last load request +STEAM_CALLBACK_MEMBER( 4, const char *, pchPageTitle ) // the title of the page +STEAM_CALLBACK_MEMBER( 5, bool, bNewNavigation ) // true if this was from a fresh tab and not a click on an existing page +STEAM_CALLBACK_END(6) //----------------------------------------------------------------------------- // Purpose: A page is finished loading //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_FinishedRequest_t, k_iSteamHTMLSurfaceCallbacks + 6 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, const char *, pchURL ) // -CALLBACK_MEMBER( 2, const char *, pchPageTitle ) // -END_DEFINE_CALLBACK_3() +STEAM_CALLBACK_BEGIN( HTML_FinishedRequest_t, k_iSteamHTMLSurfaceCallbacks + 6 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) // +STEAM_CALLBACK_MEMBER( 2, const char *, pchPageTitle ) // +STEAM_CALLBACK_END(3) //----------------------------------------------------------------------------- // Purpose: a request to load this url in a new tab //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_OpenLinkInNewTab_t, k_iSteamHTMLSurfaceCallbacks + 7 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, const char *, pchURL ) // -END_DEFINE_CALLBACK_2() +STEAM_CALLBACK_BEGIN( HTML_OpenLinkInNewTab_t, k_iSteamHTMLSurfaceCallbacks + 7 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) // +STEAM_CALLBACK_END(2) //----------------------------------------------------------------------------- // Purpose: the page has a new title now //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_ChangedTitle_t, k_iSteamHTMLSurfaceCallbacks + 8 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, const char *, pchTitle ) // -END_DEFINE_CALLBACK_2() +STEAM_CALLBACK_BEGIN( HTML_ChangedTitle_t, k_iSteamHTMLSurfaceCallbacks + 8 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, const char *, pchTitle ) // +STEAM_CALLBACK_END(2) //----------------------------------------------------------------------------- // Purpose: results from a search //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_SearchResults_t, k_iSteamHTMLSurfaceCallbacks + 9 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, uint32, unResults ) // -CALLBACK_MEMBER( 2, uint32, unCurrentMatch ) // -END_DEFINE_CALLBACK_3() +STEAM_CALLBACK_BEGIN( HTML_SearchResults_t, k_iSteamHTMLSurfaceCallbacks + 9 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, uint32, unResults ) // +STEAM_CALLBACK_MEMBER( 2, uint32, unCurrentMatch ) // +STEAM_CALLBACK_END(3) //----------------------------------------------------------------------------- // Purpose: page history status changed on the ability to go backwards and forward //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_CanGoBackAndForward_t, k_iSteamHTMLSurfaceCallbacks + 10 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, bool, bCanGoBack ) // -CALLBACK_MEMBER( 2, bool, bCanGoForward ) // -END_DEFINE_CALLBACK_3() +STEAM_CALLBACK_BEGIN( HTML_CanGoBackAndForward_t, k_iSteamHTMLSurfaceCallbacks + 10 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, bool, bCanGoBack ) // +STEAM_CALLBACK_MEMBER( 2, bool, bCanGoForward ) // +STEAM_CALLBACK_END(3) //----------------------------------------------------------------------------- // Purpose: details on the visibility and size of the horizontal scrollbar //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_HorizontalScroll_t, k_iSteamHTMLSurfaceCallbacks + 11 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, uint32, unScrollMax ) // -CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) // -CALLBACK_MEMBER( 3, float, flPageScale ) // -CALLBACK_MEMBER( 4, bool , bVisible ) // -CALLBACK_MEMBER( 5, uint32, unPageSize ) // -END_DEFINE_CALLBACK_6() +STEAM_CALLBACK_BEGIN( HTML_HorizontalScroll_t, k_iSteamHTMLSurfaceCallbacks + 11 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, uint32, unScrollMax ) // +STEAM_CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) // +STEAM_CALLBACK_MEMBER( 3, float, flPageScale ) // +STEAM_CALLBACK_MEMBER( 4, bool , bVisible ) // +STEAM_CALLBACK_MEMBER( 5, uint32, unPageSize ) // +STEAM_CALLBACK_END(6) //----------------------------------------------------------------------------- // Purpose: details on the visibility and size of the vertical scrollbar //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_VerticalScroll_t, k_iSteamHTMLSurfaceCallbacks + 12 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, uint32, unScrollMax ) // -CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) // -CALLBACK_MEMBER( 3, float, flPageScale ) // -CALLBACK_MEMBER( 4, bool, bVisible ) // -CALLBACK_MEMBER( 5, uint32, unPageSize ) // -END_DEFINE_CALLBACK_6() +STEAM_CALLBACK_BEGIN( HTML_VerticalScroll_t, k_iSteamHTMLSurfaceCallbacks + 12 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, uint32, unScrollMax ) // +STEAM_CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) // +STEAM_CALLBACK_MEMBER( 3, float, flPageScale ) // +STEAM_CALLBACK_MEMBER( 4, bool, bVisible ) // +STEAM_CALLBACK_MEMBER( 5, uint32, unPageSize ) // +STEAM_CALLBACK_END(6) //----------------------------------------------------------------------------- // Purpose: response to GetLinkAtPosition call //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_LinkAtPosition_t, k_iSteamHTMLSurfaceCallbacks + 13 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, uint32, x ) // NOTE - Not currently set -CALLBACK_MEMBER( 2, uint32, y ) // NOTE - Not currently set -CALLBACK_MEMBER( 3, const char *, pchURL ) // -CALLBACK_MEMBER( 4, bool, bInput ) // -CALLBACK_MEMBER( 5, bool, bLiveLink ) // -END_DEFINE_CALLBACK_6() +STEAM_CALLBACK_BEGIN( HTML_LinkAtPosition_t, k_iSteamHTMLSurfaceCallbacks + 13 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, uint32, x ) // NOTE - Not currently set +STEAM_CALLBACK_MEMBER( 2, uint32, y ) // NOTE - Not currently set +STEAM_CALLBACK_MEMBER( 3, const char *, pchURL ) // +STEAM_CALLBACK_MEMBER( 4, bool, bInput ) // +STEAM_CALLBACK_MEMBER( 5, bool, bLiveLink ) // +STEAM_CALLBACK_END(6) @@ -366,98 +374,104 @@ END_DEFINE_CALLBACK_6() // Purpose: show a Javascript alert dialog, call JSDialogResponse // when the user dismisses this dialog (or right away to ignore it) //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_JSAlert_t, k_iSteamHTMLSurfaceCallbacks + 14 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, const char *, pchMessage ) // -END_DEFINE_CALLBACK_2() +STEAM_CALLBACK_BEGIN( HTML_JSAlert_t, k_iSteamHTMLSurfaceCallbacks + 14 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, const char *, pchMessage ) // +STEAM_CALLBACK_END(2) //----------------------------------------------------------------------------- // Purpose: show a Javascript confirmation dialog, call JSDialogResponse // when the user dismisses this dialog (or right away to ignore it) //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_JSConfirm_t, k_iSteamHTMLSurfaceCallbacks + 15 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, const char *, pchMessage ) // -END_DEFINE_CALLBACK_2() +STEAM_CALLBACK_BEGIN( HTML_JSConfirm_t, k_iSteamHTMLSurfaceCallbacks + 15 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, const char *, pchMessage ) // +STEAM_CALLBACK_END(2) //----------------------------------------------------------------------------- // Purpose: when received show a file open dialog // then call FileLoadDialogResponse with the file(s) the user selected. //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_FileOpenDialog_t, k_iSteamHTMLSurfaceCallbacks + 16 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, const char *, pchTitle ) // -CALLBACK_MEMBER( 2, const char *, pchInitialFile ) // -END_DEFINE_CALLBACK_3() +STEAM_CALLBACK_BEGIN( HTML_FileOpenDialog_t, k_iSteamHTMLSurfaceCallbacks + 16 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, const char *, pchTitle ) // +STEAM_CALLBACK_MEMBER( 2, const char *, pchInitialFile ) // +STEAM_CALLBACK_END(3) //----------------------------------------------------------------------------- -// Purpose: a new html window has been created +// Purpose: a new html window is being created. +// +// IMPORTANT NOTE: at this time, the API does not allow you to acknowledge or +// render the contents of this new window, so the new window is always destroyed +// immediately. The URL and other parameters of the new window are passed here +// to give your application the opportunity to call CreateBrowser and set up +// a new browser in response to the attempted popup, if you wish to do so. //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_NewWindow_t, k_iSteamHTMLSurfaceCallbacks + 21 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the current surface -CALLBACK_MEMBER( 1, const char *, pchURL ) // the page to load -CALLBACK_MEMBER( 2, uint32, unX ) // the x pos into the page to display the popup -CALLBACK_MEMBER( 3, uint32, unY ) // the y pos into the page to display the popup -CALLBACK_MEMBER( 4, uint32, unWide ) // the total width of the pBGRA texture -CALLBACK_MEMBER( 5, uint32, unTall ) // the total height of the pBGRA texture -CALLBACK_MEMBER( 6, HHTMLBrowser, unNewWindow_BrowserHandle ) // the handle of the new window surface -END_DEFINE_CALLBACK_7() +STEAM_CALLBACK_BEGIN( HTML_NewWindow_t, k_iSteamHTMLSurfaceCallbacks + 21 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the current surface +STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) // the page to load +STEAM_CALLBACK_MEMBER( 2, uint32, unX ) // the x pos into the page to display the popup +STEAM_CALLBACK_MEMBER( 3, uint32, unY ) // the y pos into the page to display the popup +STEAM_CALLBACK_MEMBER( 4, uint32, unWide ) // the total width of the pBGRA texture +STEAM_CALLBACK_MEMBER( 5, uint32, unTall ) // the total height of the pBGRA texture +STEAM_CALLBACK_MEMBER( 6, HHTMLBrowser, unNewWindow_BrowserHandle_IGNORE ) +STEAM_CALLBACK_END(7) //----------------------------------------------------------------------------- // Purpose: change the cursor to display //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_SetCursor_t, k_iSteamHTMLSurfaceCallbacks + 22 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, uint32, eMouseCursor ) // the EMouseCursor to display -END_DEFINE_CALLBACK_2() +STEAM_CALLBACK_BEGIN( HTML_SetCursor_t, k_iSteamHTMLSurfaceCallbacks + 22 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, uint32, eMouseCursor ) // the EMouseCursor to display +STEAM_CALLBACK_END(2) //----------------------------------------------------------------------------- // Purpose: informational message from the browser //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_StatusText_t, k_iSteamHTMLSurfaceCallbacks + 23 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display -END_DEFINE_CALLBACK_2() +STEAM_CALLBACK_BEGIN( HTML_StatusText_t, k_iSteamHTMLSurfaceCallbacks + 23 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display +STEAM_CALLBACK_END(2) //----------------------------------------------------------------------------- // Purpose: show a tooltip //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_ShowToolTip_t, k_iSteamHTMLSurfaceCallbacks + 24 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display -END_DEFINE_CALLBACK_2() +STEAM_CALLBACK_BEGIN( HTML_ShowToolTip_t, k_iSteamHTMLSurfaceCallbacks + 24 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display +STEAM_CALLBACK_END(2) //----------------------------------------------------------------------------- // Purpose: update the text of an existing tooltip //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_UpdateToolTip_t, k_iSteamHTMLSurfaceCallbacks + 25 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display -END_DEFINE_CALLBACK_2() +STEAM_CALLBACK_BEGIN( HTML_UpdateToolTip_t, k_iSteamHTMLSurfaceCallbacks + 25 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display +STEAM_CALLBACK_END(2) //----------------------------------------------------------------------------- // Purpose: hide the tooltip you are showing //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_HideToolTip_t, k_iSteamHTMLSurfaceCallbacks + 26 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN( HTML_HideToolTip_t, k_iSteamHTMLSurfaceCallbacks + 26 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface +STEAM_CALLBACK_END(1) //----------------------------------------------------------------------------- // Purpose: The browser has restarted due to an internal failure, use this new handle value //----------------------------------------------------------------------------- -DEFINE_CALLBACK( HTML_BrowserRestarted_t, k_iSteamHTMLSurfaceCallbacks + 27 ) -CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this is the new browser handle after the restart -CALLBACK_MEMBER( 1, HHTMLBrowser, unOldBrowserHandle ) // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls -END_DEFINE_CALLBACK_2() +STEAM_CALLBACK_BEGIN( HTML_BrowserRestarted_t, k_iSteamHTMLSurfaceCallbacks + 27 ) +STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this is the new browser handle after the restart +STEAM_CALLBACK_MEMBER( 1, HHTMLBrowser, unOldBrowserHandle ) // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls +STEAM_CALLBACK_END(2) #pragma pack( pop ) diff --git a/public/steam/isteamhttp.h b/public/steam/isteamhttp.h index 8fab537..26a02b3 100644 --- a/public/steam/isteamhttp.h +++ b/public/steam/isteamhttp.h @@ -10,7 +10,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" #include "steamhttpenums.h" // Handle to a HTTP Request handle @@ -128,7 +128,8 @@ public: // Set the extra user agent info for a request, this doesn't clobber the normal user agent, it just adds the extra info on the end virtual bool SetHTTPRequestUserAgentInfo( HTTPRequestHandle hRequest, const char *pchUserAgentInfo ) = 0; - // Set that https request should require verified SSL certificate via machines certificate trust store + // Disable or re-enable verification of SSL/TLS certificates. + // By default, certificates are checked for all HTTPS requests. virtual bool SetHTTPRequestRequiresVerifiedCertificate( HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate ) = 0; // Set an absolute timeout on the HTTP request, this is just a total time timeout different than the network activity timeout @@ -139,7 +140,15 @@ public: virtual bool GetHTTPRequestWasTimedOut( HTTPRequestHandle hRequest, bool *pbWasTimedOut ) = 0; }; -#define STEAMHTTP_INTERFACE_VERSION "STEAMHTTP_INTERFACE_VERSION002" +#define STEAMHTTP_INTERFACE_VERSION "STEAMHTTP_INTERFACE_VERSION003" + +// Global interface accessor +inline ISteamHTTP *SteamHTTP(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamHTTP *, SteamHTTP, STEAMHTTP_INTERFACE_VERSION ); + +// Global accessor for the gameserver client +inline ISteamHTTP *SteamGameServerHTTP(); +STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamHTTP *, SteamGameServerHTTP, STEAMHTTP_INTERFACE_VERSION ); // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) @@ -147,7 +156,7 @@ public: #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif struct HTTPRequestCompleted_t diff --git a/public/steam/isteaminput.h b/public/steam/isteaminput.h new file mode 100644 index 0000000..dfd3980 --- /dev/null +++ b/public/steam/isteaminput.h @@ -0,0 +1,619 @@ +//====== Copyright 1996-2018, Valve Corporation, All rights reserved. ======= +// +// Purpose: Steam Input is a flexible input API that supports over three hundred devices including all +// common variants of Xbox, Playstation, Nintendo Switch Pro, and Steam Controllers. +// For more info including a getting started guide for developers +// please visit: https://partner.steamgames.com/doc/features/steam_controller +// +//============================================================================= + +#ifndef ISTEAMINPUT_H +#define ISTEAMINPUT_H +#ifdef _WIN32 +#pragma once +#endif + +#include "steam_api_common.h" + +#define STEAM_INPUT_MAX_COUNT 16 + +#define STEAM_INPUT_MAX_ANALOG_ACTIONS 16 + +#define STEAM_INPUT_MAX_DIGITAL_ACTIONS 128 + +#define STEAM_INPUT_MAX_ORIGINS 8 + +// When sending an option to a specific controller handle, you can send to all devices via this command +#define STEAM_INPUT_HANDLE_ALL_CONTROLLERS UINT64_MAX + +#define STEAM_INPUT_MIN_ANALOG_ACTION_DATA -1.0f +#define STEAM_INPUT_MAX_ANALOG_ACTION_DATA 1.0f + +enum EInputSource +{ + k_EInputSource_None, + k_EInputSource_LeftTrackpad, + k_EInputSource_RightTrackpad, + k_EInputSource_Joystick, + k_EInputSource_ABXY, + k_EInputSource_Switch, + k_EInputSource_LeftTrigger, + k_EInputSource_RightTrigger, + k_EInputSource_LeftBumper, + k_EInputSource_RightBumper, + k_EInputSource_Gyro, + k_EInputSource_CenterTrackpad, // PS4 + k_EInputSource_RightJoystick, // Traditional Controllers + k_EInputSource_DPad, // Traditional Controllers + k_EInputSource_Key, // Keyboards with scan codes - Unused + k_EInputSource_Mouse, // Traditional mouse - Unused + k_EInputSource_LeftGyro, // Secondary Gyro - Switch - Unused + k_EInputSource_Count +}; + +enum EInputSourceMode +{ + k_EInputSourceMode_None, + k_EInputSourceMode_Dpad, + k_EInputSourceMode_Buttons, + k_EInputSourceMode_FourButtons, + k_EInputSourceMode_AbsoluteMouse, + k_EInputSourceMode_RelativeMouse, + k_EInputSourceMode_JoystickMove, + k_EInputSourceMode_JoystickMouse, + k_EInputSourceMode_JoystickCamera, + k_EInputSourceMode_ScrollWheel, + k_EInputSourceMode_Trigger, + k_EInputSourceMode_TouchMenu, + k_EInputSourceMode_MouseJoystick, + k_EInputSourceMode_MouseRegion, + k_EInputSourceMode_RadialMenu, + k_EInputSourceMode_SingleButton, + k_EInputSourceMode_Switches +}; + +// Note: Please do not use action origins as a way to identify controller types. There is no +// guarantee that they will be added in a contiguous manner - use GetInputTypeForHandle instead. +// Versions of Steam that add new controller types in the future will extend this enum so if you're +// using a lookup table please check the bounds of any origins returned by Steam. +enum EInputActionOrigin +{ + // Steam Controller + k_EInputActionOrigin_None, + k_EInputActionOrigin_SteamController_A, + k_EInputActionOrigin_SteamController_B, + k_EInputActionOrigin_SteamController_X, + k_EInputActionOrigin_SteamController_Y, + k_EInputActionOrigin_SteamController_LeftBumper, + k_EInputActionOrigin_SteamController_RightBumper, + k_EInputActionOrigin_SteamController_LeftGrip, + k_EInputActionOrigin_SteamController_RightGrip, + k_EInputActionOrigin_SteamController_Start, + k_EInputActionOrigin_SteamController_Back, + k_EInputActionOrigin_SteamController_LeftPad_Touch, + k_EInputActionOrigin_SteamController_LeftPad_Swipe, + k_EInputActionOrigin_SteamController_LeftPad_Click, + k_EInputActionOrigin_SteamController_LeftPad_DPadNorth, + k_EInputActionOrigin_SteamController_LeftPad_DPadSouth, + k_EInputActionOrigin_SteamController_LeftPad_DPadWest, + k_EInputActionOrigin_SteamController_LeftPad_DPadEast, + k_EInputActionOrigin_SteamController_RightPad_Touch, + k_EInputActionOrigin_SteamController_RightPad_Swipe, + k_EInputActionOrigin_SteamController_RightPad_Click, + k_EInputActionOrigin_SteamController_RightPad_DPadNorth, + k_EInputActionOrigin_SteamController_RightPad_DPadSouth, + k_EInputActionOrigin_SteamController_RightPad_DPadWest, + k_EInputActionOrigin_SteamController_RightPad_DPadEast, + k_EInputActionOrigin_SteamController_LeftTrigger_Pull, + k_EInputActionOrigin_SteamController_LeftTrigger_Click, + k_EInputActionOrigin_SteamController_RightTrigger_Pull, + k_EInputActionOrigin_SteamController_RightTrigger_Click, + k_EInputActionOrigin_SteamController_LeftStick_Move, + k_EInputActionOrigin_SteamController_LeftStick_Click, + k_EInputActionOrigin_SteamController_LeftStick_DPadNorth, + k_EInputActionOrigin_SteamController_LeftStick_DPadSouth, + k_EInputActionOrigin_SteamController_LeftStick_DPadWest, + k_EInputActionOrigin_SteamController_LeftStick_DPadEast, + k_EInputActionOrigin_SteamController_Gyro_Move, + k_EInputActionOrigin_SteamController_Gyro_Pitch, + k_EInputActionOrigin_SteamController_Gyro_Yaw, + k_EInputActionOrigin_SteamController_Gyro_Roll, + k_EInputActionOrigin_SteamController_Reserved0, + k_EInputActionOrigin_SteamController_Reserved1, + k_EInputActionOrigin_SteamController_Reserved2, + k_EInputActionOrigin_SteamController_Reserved3, + k_EInputActionOrigin_SteamController_Reserved4, + k_EInputActionOrigin_SteamController_Reserved5, + k_EInputActionOrigin_SteamController_Reserved6, + k_EInputActionOrigin_SteamController_Reserved7, + k_EInputActionOrigin_SteamController_Reserved8, + k_EInputActionOrigin_SteamController_Reserved9, + k_EInputActionOrigin_SteamController_Reserved10, + + // PS4 Dual Shock + k_EInputActionOrigin_PS4_X, + k_EInputActionOrigin_PS4_Circle, + k_EInputActionOrigin_PS4_Triangle, + k_EInputActionOrigin_PS4_Square, + k_EInputActionOrigin_PS4_LeftBumper, + k_EInputActionOrigin_PS4_RightBumper, + k_EInputActionOrigin_PS4_Options, //Start + k_EInputActionOrigin_PS4_Share, //Back + k_EInputActionOrigin_PS4_LeftPad_Touch, + k_EInputActionOrigin_PS4_LeftPad_Swipe, + k_EInputActionOrigin_PS4_LeftPad_Click, + k_EInputActionOrigin_PS4_LeftPad_DPadNorth, + k_EInputActionOrigin_PS4_LeftPad_DPadSouth, + k_EInputActionOrigin_PS4_LeftPad_DPadWest, + k_EInputActionOrigin_PS4_LeftPad_DPadEast, + k_EInputActionOrigin_PS4_RightPad_Touch, + k_EInputActionOrigin_PS4_RightPad_Swipe, + k_EInputActionOrigin_PS4_RightPad_Click, + k_EInputActionOrigin_PS4_RightPad_DPadNorth, + k_EInputActionOrigin_PS4_RightPad_DPadSouth, + k_EInputActionOrigin_PS4_RightPad_DPadWest, + k_EInputActionOrigin_PS4_RightPad_DPadEast, + k_EInputActionOrigin_PS4_CenterPad_Touch, + k_EInputActionOrigin_PS4_CenterPad_Swipe, + k_EInputActionOrigin_PS4_CenterPad_Click, + k_EInputActionOrigin_PS4_CenterPad_DPadNorth, + k_EInputActionOrigin_PS4_CenterPad_DPadSouth, + k_EInputActionOrigin_PS4_CenterPad_DPadWest, + k_EInputActionOrigin_PS4_CenterPad_DPadEast, + k_EInputActionOrigin_PS4_LeftTrigger_Pull, + k_EInputActionOrigin_PS4_LeftTrigger_Click, + k_EInputActionOrigin_PS4_RightTrigger_Pull, + k_EInputActionOrigin_PS4_RightTrigger_Click, + k_EInputActionOrigin_PS4_LeftStick_Move, + k_EInputActionOrigin_PS4_LeftStick_Click, + k_EInputActionOrigin_PS4_LeftStick_DPadNorth, + k_EInputActionOrigin_PS4_LeftStick_DPadSouth, + k_EInputActionOrigin_PS4_LeftStick_DPadWest, + k_EInputActionOrigin_PS4_LeftStick_DPadEast, + k_EInputActionOrigin_PS4_RightStick_Move, + k_EInputActionOrigin_PS4_RightStick_Click, + k_EInputActionOrigin_PS4_RightStick_DPadNorth, + k_EInputActionOrigin_PS4_RightStick_DPadSouth, + k_EInputActionOrigin_PS4_RightStick_DPadWest, + k_EInputActionOrigin_PS4_RightStick_DPadEast, + k_EInputActionOrigin_PS4_DPad_North, + k_EInputActionOrigin_PS4_DPad_South, + k_EInputActionOrigin_PS4_DPad_West, + k_EInputActionOrigin_PS4_DPad_East, + k_EInputActionOrigin_PS4_Gyro_Move, + k_EInputActionOrigin_PS4_Gyro_Pitch, + k_EInputActionOrigin_PS4_Gyro_Yaw, + k_EInputActionOrigin_PS4_Gyro_Roll, + k_EInputActionOrigin_PS4_Reserved0, + k_EInputActionOrigin_PS4_Reserved1, + k_EInputActionOrigin_PS4_Reserved2, + k_EInputActionOrigin_PS4_Reserved3, + k_EInputActionOrigin_PS4_Reserved4, + k_EInputActionOrigin_PS4_Reserved5, + k_EInputActionOrigin_PS4_Reserved6, + k_EInputActionOrigin_PS4_Reserved7, + k_EInputActionOrigin_PS4_Reserved8, + k_EInputActionOrigin_PS4_Reserved9, + k_EInputActionOrigin_PS4_Reserved10, + + // XBox One + k_EInputActionOrigin_XBoxOne_A, + k_EInputActionOrigin_XBoxOne_B, + k_EInputActionOrigin_XBoxOne_X, + k_EInputActionOrigin_XBoxOne_Y, + k_EInputActionOrigin_XBoxOne_LeftBumper, + k_EInputActionOrigin_XBoxOne_RightBumper, + k_EInputActionOrigin_XBoxOne_Menu, //Start + k_EInputActionOrigin_XBoxOne_View, //Back + k_EInputActionOrigin_XBoxOne_LeftTrigger_Pull, + k_EInputActionOrigin_XBoxOne_LeftTrigger_Click, + k_EInputActionOrigin_XBoxOne_RightTrigger_Pull, + k_EInputActionOrigin_XBoxOne_RightTrigger_Click, + k_EInputActionOrigin_XBoxOne_LeftStick_Move, + k_EInputActionOrigin_XBoxOne_LeftStick_Click, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadNorth, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadSouth, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadWest, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadEast, + k_EInputActionOrigin_XBoxOne_RightStick_Move, + k_EInputActionOrigin_XBoxOne_RightStick_Click, + k_EInputActionOrigin_XBoxOne_RightStick_DPadNorth, + k_EInputActionOrigin_XBoxOne_RightStick_DPadSouth, + k_EInputActionOrigin_XBoxOne_RightStick_DPadWest, + k_EInputActionOrigin_XBoxOne_RightStick_DPadEast, + k_EInputActionOrigin_XBoxOne_DPad_North, + k_EInputActionOrigin_XBoxOne_DPad_South, + k_EInputActionOrigin_XBoxOne_DPad_West, + k_EInputActionOrigin_XBoxOne_DPad_East, + k_EInputActionOrigin_XBoxOne_Reserved0, + k_EInputActionOrigin_XBoxOne_Reserved1, + k_EInputActionOrigin_XBoxOne_Reserved2, + k_EInputActionOrigin_XBoxOne_Reserved3, + k_EInputActionOrigin_XBoxOne_Reserved4, + k_EInputActionOrigin_XBoxOne_Reserved5, + k_EInputActionOrigin_XBoxOne_Reserved6, + k_EInputActionOrigin_XBoxOne_Reserved7, + k_EInputActionOrigin_XBoxOne_Reserved8, + k_EInputActionOrigin_XBoxOne_Reserved9, + k_EInputActionOrigin_XBoxOne_Reserved10, + + // XBox 360 + k_EInputActionOrigin_XBox360_A, + k_EInputActionOrigin_XBox360_B, + k_EInputActionOrigin_XBox360_X, + k_EInputActionOrigin_XBox360_Y, + k_EInputActionOrigin_XBox360_LeftBumper, + k_EInputActionOrigin_XBox360_RightBumper, + k_EInputActionOrigin_XBox360_Start, //Start + k_EInputActionOrigin_XBox360_Back, //Back + k_EInputActionOrigin_XBox360_LeftTrigger_Pull, + k_EInputActionOrigin_XBox360_LeftTrigger_Click, + k_EInputActionOrigin_XBox360_RightTrigger_Pull, + k_EInputActionOrigin_XBox360_RightTrigger_Click, + k_EInputActionOrigin_XBox360_LeftStick_Move, + k_EInputActionOrigin_XBox360_LeftStick_Click, + k_EInputActionOrigin_XBox360_LeftStick_DPadNorth, + k_EInputActionOrigin_XBox360_LeftStick_DPadSouth, + k_EInputActionOrigin_XBox360_LeftStick_DPadWest, + k_EInputActionOrigin_XBox360_LeftStick_DPadEast, + k_EInputActionOrigin_XBox360_RightStick_Move, + k_EInputActionOrigin_XBox360_RightStick_Click, + k_EInputActionOrigin_XBox360_RightStick_DPadNorth, + k_EInputActionOrigin_XBox360_RightStick_DPadSouth, + k_EInputActionOrigin_XBox360_RightStick_DPadWest, + k_EInputActionOrigin_XBox360_RightStick_DPadEast, + k_EInputActionOrigin_XBox360_DPad_North, + k_EInputActionOrigin_XBox360_DPad_South, + k_EInputActionOrigin_XBox360_DPad_West, + k_EInputActionOrigin_XBox360_DPad_East, + k_EInputActionOrigin_XBox360_Reserved0, + k_EInputActionOrigin_XBox360_Reserved1, + k_EInputActionOrigin_XBox360_Reserved2, + k_EInputActionOrigin_XBox360_Reserved3, + k_EInputActionOrigin_XBox360_Reserved4, + k_EInputActionOrigin_XBox360_Reserved5, + k_EInputActionOrigin_XBox360_Reserved6, + k_EInputActionOrigin_XBox360_Reserved7, + k_EInputActionOrigin_XBox360_Reserved8, + k_EInputActionOrigin_XBox360_Reserved9, + k_EInputActionOrigin_XBox360_Reserved10, + + + // Switch - Pro or Joycons used as a single input device. + // This does not apply to a single joycon + k_EInputActionOrigin_Switch_A, + k_EInputActionOrigin_Switch_B, + k_EInputActionOrigin_Switch_X, + k_EInputActionOrigin_Switch_Y, + k_EInputActionOrigin_Switch_LeftBumper, + k_EInputActionOrigin_Switch_RightBumper, + k_EInputActionOrigin_Switch_Plus, //Start + k_EInputActionOrigin_Switch_Minus, //Back + k_EInputActionOrigin_Switch_Capture, + k_EInputActionOrigin_Switch_LeftTrigger_Pull, + k_EInputActionOrigin_Switch_LeftTrigger_Click, + k_EInputActionOrigin_Switch_RightTrigger_Pull, + k_EInputActionOrigin_Switch_RightTrigger_Click, + k_EInputActionOrigin_Switch_LeftStick_Move, + k_EInputActionOrigin_Switch_LeftStick_Click, + k_EInputActionOrigin_Switch_LeftStick_DPadNorth, + k_EInputActionOrigin_Switch_LeftStick_DPadSouth, + k_EInputActionOrigin_Switch_LeftStick_DPadWest, + k_EInputActionOrigin_Switch_LeftStick_DPadEast, + k_EInputActionOrigin_Switch_RightStick_Move, + k_EInputActionOrigin_Switch_RightStick_Click, + k_EInputActionOrigin_Switch_RightStick_DPadNorth, + k_EInputActionOrigin_Switch_RightStick_DPadSouth, + k_EInputActionOrigin_Switch_RightStick_DPadWest, + k_EInputActionOrigin_Switch_RightStick_DPadEast, + k_EInputActionOrigin_Switch_DPad_North, + k_EInputActionOrigin_Switch_DPad_South, + k_EInputActionOrigin_Switch_DPad_West, + k_EInputActionOrigin_Switch_DPad_East, + k_EInputActionOrigin_Switch_ProGyro_Move, // Primary Gyro in Pro Controller, or Right JoyCon + k_EInputActionOrigin_Switch_ProGyro_Pitch, // Primary Gyro in Pro Controller, or Right JoyCon + k_EInputActionOrigin_Switch_ProGyro_Yaw, // Primary Gyro in Pro Controller, or Right JoyCon + k_EInputActionOrigin_Switch_ProGyro_Roll, // Primary Gyro in Pro Controller, or Right JoyCon + k_EInputActionOrigin_Switch_Reserved0, + k_EInputActionOrigin_Switch_Reserved1, + k_EInputActionOrigin_Switch_Reserved2, + k_EInputActionOrigin_Switch_Reserved3, + k_EInputActionOrigin_Switch_Reserved4, + k_EInputActionOrigin_Switch_Reserved5, + k_EInputActionOrigin_Switch_Reserved6, + k_EInputActionOrigin_Switch_Reserved7, + k_EInputActionOrigin_Switch_Reserved8, + k_EInputActionOrigin_Switch_Reserved9, + k_EInputActionOrigin_Switch_Reserved10, + + // Switch JoyCon Specific + k_EInputActionOrigin_Switch_RightGyro_Move, // Right JoyCon Gyro generally should correspond to Pro's single gyro + k_EInputActionOrigin_Switch_RightGyro_Pitch, // Right JoyCon Gyro generally should correspond to Pro's single gyro + k_EInputActionOrigin_Switch_RightGyro_Yaw, // Right JoyCon Gyro generally should correspond to Pro's single gyro + k_EInputActionOrigin_Switch_RightGyro_Roll, // Right JoyCon Gyro generally should correspond to Pro's single gyro + k_EInputActionOrigin_Switch_LeftGyro_Move, + k_EInputActionOrigin_Switch_LeftGyro_Pitch, + k_EInputActionOrigin_Switch_LeftGyro_Yaw, + k_EInputActionOrigin_Switch_LeftGyro_Roll, + k_EInputActionOrigin_Switch_LeftGrip_Lower, // Left JoyCon SR Button + k_EInputActionOrigin_Switch_LeftGrip_Upper, // Left JoyCon SL Button + k_EInputActionOrigin_Switch_RightGrip_Lower, // Right JoyCon SL Button + k_EInputActionOrigin_Switch_RightGrip_Upper, // Right JoyCon SR Button + k_EInputActionOrigin_Switch_Reserved11, + k_EInputActionOrigin_Switch_Reserved12, + k_EInputActionOrigin_Switch_Reserved13, + k_EInputActionOrigin_Switch_Reserved14, + k_EInputActionOrigin_Switch_Reserved15, + k_EInputActionOrigin_Switch_Reserved16, + k_EInputActionOrigin_Switch_Reserved17, + k_EInputActionOrigin_Switch_Reserved18, + k_EInputActionOrigin_Switch_Reserved19, + k_EInputActionOrigin_Switch_Reserved20, + + k_EInputActionOrigin_Count, // If Steam has added support for new controllers origins will go here. + k_EInputActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits. +}; + +enum EXboxOrigin +{ + k_EXboxOrigin_A, + k_EXboxOrigin_B, + k_EXboxOrigin_X, + k_EXboxOrigin_Y, + k_EXboxOrigin_LeftBumper, + k_EXboxOrigin_RightBumper, + k_EXboxOrigin_Menu, //Start + k_EXboxOrigin_View, //Back + k_EXboxOrigin_LeftTrigger_Pull, + k_EXboxOrigin_LeftTrigger_Click, + k_EXboxOrigin_RightTrigger_Pull, + k_EXboxOrigin_RightTrigger_Click, + k_EXboxOrigin_LeftStick_Move, + k_EXboxOrigin_LeftStick_Click, + k_EXboxOrigin_LeftStick_DPadNorth, + k_EXboxOrigin_LeftStick_DPadSouth, + k_EXboxOrigin_LeftStick_DPadWest, + k_EXboxOrigin_LeftStick_DPadEast, + k_EXboxOrigin_RightStick_Move, + k_EXboxOrigin_RightStick_Click, + k_EXboxOrigin_RightStick_DPadNorth, + k_EXboxOrigin_RightStick_DPadSouth, + k_EXboxOrigin_RightStick_DPadWest, + k_EXboxOrigin_RightStick_DPadEast, + k_EXboxOrigin_DPad_North, + k_EXboxOrigin_DPad_South, + k_EXboxOrigin_DPad_West, + k_EXboxOrigin_DPad_East, + k_EXboxOrigin_Count, +}; + +enum ESteamControllerPad +{ + k_ESteamControllerPad_Left, + k_ESteamControllerPad_Right +}; + +enum ESteamInputType +{ + k_ESteamInputType_Unknown, + k_ESteamInputType_SteamController, + k_ESteamInputType_XBox360Controller, + k_ESteamInputType_XBoxOneController, + k_ESteamInputType_GenericGamepad, // DirectInput controllers + k_ESteamInputType_PS4Controller, + k_ESteamInputType_AppleMFiController, // Unused + k_ESteamInputType_AndroidController, // Unused + k_ESteamInputType_SwitchJoyConPair, // Unused + k_ESteamInputType_SwitchJoyConSingle, // Unused + k_ESteamInputType_SwitchProController, + k_ESteamInputType_MobileTouch, // Steam Link App On-screen Virtual Controller + k_ESteamInputType_PS3Controller, // Currently uses PS4 Origins + k_ESteamInputType_Count, + k_ESteamInputType_MaximumPossibleValue = 255, +}; + +// These values are passed into SetLEDColor +enum ESteamInputLEDFlag +{ + k_ESteamInputLEDFlag_SetColor, + // Restore the LED color to the user's preference setting as set in the controller personalization menu. + // This also happens automatically on exit of your game. + k_ESteamInputLEDFlag_RestoreUserDefault +}; + +// InputHandle_t is used to refer to a specific controller. +// This handle will consistently identify a controller, even if it is disconnected and re-connected +typedef uint64 InputHandle_t; + + +// These handles are used to refer to a specific in-game action or action set +// All action handles should be queried during initialization for performance reasons +typedef uint64 InputActionSetHandle_t; +typedef uint64 InputDigitalActionHandle_t; +typedef uint64 InputAnalogActionHandle_t; + +#pragma pack( push, 1 ) + +struct InputAnalogActionData_t +{ + // Type of data coming from this action, this will match what got specified in the action set + EInputSourceMode eMode; + + // The current state of this action; will be delta updates for mouse actions + float x, y; + + // Whether or not this action is currently available to be bound in the active action set + bool bActive; +}; + +struct InputDigitalActionData_t +{ + // The current state of this action; will be true if currently pressed + bool bState; + + // Whether or not this action is currently available to be bound in the active action set + bool bActive; +}; + +struct InputMotionData_t +{ + // Sensor-fused absolute rotation; will drift in heading + float rotQuatX; + float rotQuatY; + float rotQuatZ; + float rotQuatW; + + // Positional acceleration + float posAccelX; + float posAccelY; + float posAccelZ; + + // Angular velocity + float rotVelX; + float rotVelY; + float rotVelZ; +}; + +#pragma pack( pop ) + + +//----------------------------------------------------------------------------- +// Purpose: Steam Input API +//----------------------------------------------------------------------------- +class ISteamInput +{ +public: + + // Init and Shutdown must be called when starting/ending use of this interface + virtual bool Init() = 0; + virtual bool Shutdown() = 0; + + // Synchronize API state with the latest Steam Controller inputs available. This + // is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest + // possible latency, you call this directly before reading controller state. This must + // be called from somewhere before GetConnectedControllers will return any handles + virtual void RunFrame() = 0; + + // Enumerate currently connected Steam Input enabled devices - developers can opt in controller by type (ex: Xbox/Playstation/etc) via + // the Steam Input settings in the Steamworks site or users can opt-in in their controller settings in Steam. + // handlesOut should point to a STEAM_INPUT_MAX_COUNT sized array of InputHandle_t handles + // Returns the number of handles written to handlesOut + virtual int GetConnectedControllers( InputHandle_t *handlesOut ) = 0; + + //----------------------------------------------------------------------------- + // ACTION SETS + //----------------------------------------------------------------------------- + + // Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls. + virtual InputActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0; + + // Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive') + // This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in + // your state loops, instead of trying to place it in all of your state transitions. + virtual void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle ) = 0; + virtual InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle ) = 0; + + // ACTION SET LAYERS + virtual void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) = 0; + virtual void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) = 0; + virtual void DeactivateAllActionSetLayers( InputHandle_t inputHandle ) = 0; + virtual int GetActiveActionSetLayers( InputHandle_t inputHandle, InputActionSetHandle_t *handlesOut ) = 0; + + //----------------------------------------------------------------------------- + // ACTIONS + //----------------------------------------------------------------------------- + + // Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls. + virtual InputDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of the supplied digital game action + virtual InputDigitalActionData_t GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle ) = 0; + + // Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_INPUT_MAX_ORIGINS sized array of EInputActionOrigin handles. The EInputActionOrigin enum will get extended as support for new controller controllers gets added to + // the Steam client and will exceed the values from this header, please check bounds if you are using a look up table. + virtual int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, EInputActionOrigin *originsOut ) = 0; + + // Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls. + virtual InputAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0; + + // Returns the current state of these supplied analog game action + virtual InputAnalogActionData_t GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle ) = 0; + + // Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. + // originsOut should point to a STEAM_INPUT_MAX_ORIGINS sized array of EInputActionOrigin handles. The EInputActionOrigin enum will get extended as support for new controller controllers gets added to + // the Steam client and will exceed the values from this header, please check bounds if you are using a look up table. + virtual int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, EInputActionOrigin *originsOut ) = 0; + + // Get a local path to art for on-screen glyph for a particular origin - this call is cheap + virtual const char *GetGlyphForActionOrigin( EInputActionOrigin eOrigin ) = 0; + + // Returns a localized string (from Steam's language setting) for the specified origin - this call is serialized + virtual const char *GetStringForActionOrigin( EInputActionOrigin eOrigin ) = 0; + + // Stop analog momentum for the action if it is a mouse action in trackball mode + virtual void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction ) = 0; + + // Returns raw motion data from the specified device + virtual InputMotionData_t GetMotionData( InputHandle_t inputHandle ) = 0; + + //----------------------------------------------------------------------------- + // OUTPUTS + //----------------------------------------------------------------------------- + + // Trigger a vibration event on supported controllers - Steam will translate these commands into haptic pulses for Steam Controllers + virtual void TriggerVibration( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0; + + // Set the controller LED color on supported controllers. nFlags is a bitmask of values from ESteamInputLEDFlag - 0 will default to setting a color. Steam will handle + // the behavior on exit of your program so you don't need to try restore the default as you are shutting down + virtual void SetLEDColor( InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0; + + // Trigger a haptic pulse on a Steam Controller - if you are approximating rumble you may want to use TriggerVibration instead. + // Good uses for Haptic pulses include chimes, noises, or directional gameplay feedback (taking damage, footstep locations, etc). + virtual void TriggerHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0; + + // Trigger a haptic pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times. If you are approximating rumble you may want to use TriggerVibration instead. + // nFlags is currently unused and reserved for future use. + virtual void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0; + + //----------------------------------------------------------------------------- + // Utility functions availible without using the rest of Steam Input API + //----------------------------------------------------------------------------- + + // Invokes the Steam overlay and brings up the binding screen if the user is using Big Picture Mode + // If the user is not in Big Picture Mode it will open up the binding in a new window + virtual bool ShowBindingPanel( InputHandle_t inputHandle ) = 0; + + // Returns the input type for a particular handle + virtual ESteamInputType GetInputTypeForHandle( InputHandle_t inputHandle ) = 0; + + // Returns the associated controller handle for the specified emulated gamepad - can be used with the above 2 functions + // to identify controllers presented to your game over Xinput. Returns 0 if the Xinput index isn't associated with Steam Input + virtual InputHandle_t GetControllerForGamepadIndex( int nIndex ) = 0; + + // Returns the associated gamepad index for the specified controller, if emulating a gamepad or -1 if not associated with an Xinput index + virtual int GetGamepadIndexForController( InputHandle_t ulinputHandle ) = 0; + + // Returns a localized string (from Steam's language setting) for the specified Xbox controller origin. This function is cheap. + virtual const char *GetStringForXboxOrigin( EXboxOrigin eOrigin ) = 0; + + // Get a local path to art for on-screen glyph for a particular Xbox controller origin. This function is serialized. + virtual const char *GetGlyphForXboxOrigin( EXboxOrigin eOrigin ) = 0; + + // Get the equivalent ActionOrigin for a given Xbox controller origin this can be chained with GetGlyphForActionOrigin to provide future proof glyphs for + // non-Steam Input API action games. Note - this only translates the buttons directly and doesn't take into account any remapping a user has made in their configuration + virtual EInputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, EXboxOrigin eOrigin ) = 0; + + // Convert an origin to another controller type - for inputs not present on the other controller type this will return k_EInputActionOrigin_None + // When a new input type is added you will be able to pass in k_ESteamInputType_Unknown amd the closest origin that your version of the SDK regonized will be returned + // ex: if a Playstation 5 controller was released this function would return Playstation 4 origins. + virtual EInputActionOrigin TranslateActionOrigin( ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin ) = 0; +}; + +#define STEAMINPUT_INTERFACE_VERSION "SteamInput001" + +// Global interface accessor +inline ISteamInput *SteamInput(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInput *, SteamInput, STEAMINPUT_INTERFACE_VERSION ); + +#endif // ISTEAMINPUT_H diff --git a/public/steam/isteaminventory.h b/public/steam/isteaminventory.h index 85090a2..1cd21b8 100644 --- a/public/steam/isteaminventory.h +++ b/public/steam/isteaminventory.h @@ -10,7 +10,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) @@ -18,7 +18,7 @@ #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif @@ -86,14 +86,14 @@ public: // k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later // k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits // k_EResultFail - ERROR: unknown / generic error - METHOD_DESC(Find out the status of an asynchronous inventory result handle.) + STEAM_METHOD_DESC(Find out the status of an asynchronous inventory result handle.) virtual EResult GetResultStatus( SteamInventoryResult_t resultHandle ) = 0; // Copies the contents of a result set into a flat array. The specific // contents of the result set depend on which query which was used. - METHOD_DESC(Copies the contents of a result set into a flat array. The specific contents of the result set depend on which query which was used.) + STEAM_METHOD_DESC(Copies the contents of a result set into a flat array. The specific contents of the result set depend on which query which was used.) virtual bool GetResultItems( SteamInventoryResult_t resultHandle, - OUT_ARRAY_COUNT( punOutItemsArraySize,Output array) SteamItemDetails_t *pOutItemsArray, + STEAM_OUT_ARRAY_COUNT( punOutItemsArraySize,Output array) SteamItemDetails_t *pOutItemsArray, uint32 *punOutItemsArraySize ) = 0; // In combination with GetResultItems, you can use GetResultItemProperty to retrieve @@ -111,21 +111,21 @@ public: virtual bool GetResultItemProperty( SteamInventoryResult_t resultHandle, uint32 unItemIndex, const char *pchPropertyName, - OUT_STRING_COUNT( punValueBufferSizeOut ) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0; + STEAM_OUT_STRING_COUNT( punValueBufferSizeOut ) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0; // Returns the server time at which the result was generated. Compare against // the value of IClientUtils::GetServerRealTime() to determine age. - METHOD_DESC(Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.) + STEAM_METHOD_DESC(Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.) virtual uint32 GetResultTimestamp( SteamInventoryResult_t resultHandle ) = 0; // Returns true if the result belongs to the target steam ID, false if the // result does not. This is important when using DeserializeResult, to verify // that a remote player is not pretending to have a different user's inventory. - METHOD_DESC(Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.) + STEAM_METHOD_DESC(Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.) virtual bool CheckResultSteamID( SteamInventoryResult_t resultHandle, CSteamID steamIDExpected ) = 0; // Destroys a result handle and frees all associated memory. - METHOD_DESC(Destroys a result handle and frees all associated memory.) + STEAM_METHOD_DESC(Destroys a result handle and frees all associated memory.) virtual void DestroyResult( SteamInventoryResult_t resultHandle ) = 0; @@ -139,7 +139,7 @@ public: // cached results if called too frequently. It is suggested that you call // this function only when you are about to display the user's full inventory, // or if you expect that the inventory may have changed. - METHOD_DESC(Captures the entire state of the current users Steam inventory.) + STEAM_METHOD_DESC(Captures the entire state of the current users Steam inventory.) virtual bool GetAllItems( SteamInventoryResult_t *pResultHandle ) = 0; @@ -150,8 +150,8 @@ public: // For example, you could call GetItemsByID with the IDs of the user's // currently equipped cosmetic items and serialize this to a buffer, and // then transmit this buffer to other players upon joining a game. - METHOD_DESC(Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.) - virtual bool GetItemsByID( SteamInventoryResult_t *pResultHandle, ARRAY_COUNT( unCountInstanceIDs ) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) = 0; + STEAM_METHOD_DESC(Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.) + virtual bool GetItemsByID( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT( unCountInstanceIDs ) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) = 0; // RESULT SERIALIZATION AND AUTHENTICATION @@ -169,7 +169,7 @@ public: // recommended to use "GetItemsByID" first to create a minimal result set. // Results have a built-in timestamp which will be considered "expired" after // an hour has elapsed. See DeserializeResult for expiration handling. - virtual bool SerializeResult( SteamInventoryResult_t resultHandle, OUT_BUFFER_COUNT(punOutBufferSize) void *pOutBuffer, uint32 *punOutBufferSize ) = 0; + virtual bool SerializeResult( SteamInventoryResult_t resultHandle, STEAM_OUT_BUFFER_COUNT(punOutBufferSize) void *pOutBuffer, uint32 *punOutBufferSize ) = 0; // Deserializes a result set and verifies the signature bytes. Returns false // if bRequireFullOnlineVerify is set but Steam is running in Offline mode. @@ -187,7 +187,7 @@ public: // ISteamUtils::GetServerRealTime() to determine how old the data is. You could // simply ignore the "expired" result code and continue as normal, or you // could challenge the player with expired data to send an updated result set. - virtual bool DeserializeResult( SteamInventoryResult_t *pOutResultHandle, BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false ) = 0; + virtual bool DeserializeResult( SteamInventoryResult_t *pOutResultHandle, STEAM_BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false ) = 0; // INVENTORY ASYNC MODIFICATION @@ -199,13 +199,13 @@ public: // for your game. // If punArrayQuantity is not NULL, it should be the same length as pArrayItems and should // describe the quantity of each item to generate. - virtual bool GenerateItems( SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0; + virtual bool GenerateItems( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0; // GrantPromoItems() checks the list of promotional items for which the user may be eligible // and grants the items (one time only). On success, the result set will include items which // were granted, if any. If no items were granted because the user isn't eligible for any // promotions, this is still considered a success. - METHOD_DESC(GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).) + STEAM_METHOD_DESC(GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).) virtual bool GrantPromoItems( SteamInventoryResult_t *pResultHandle ) = 0; // AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of @@ -213,12 +213,12 @@ public: // definition or set of item definitions. This can be useful if your game has custom UI for // showing a specific promo item to the user. virtual bool AddPromoItem( SteamInventoryResult_t *pResultHandle, SteamItemDef_t itemDef ) = 0; - virtual bool AddPromoItems( SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, uint32 unArrayLength ) = 0; + virtual bool AddPromoItems( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, uint32 unArrayLength ) = 0; // ConsumeItem() removes items from the inventory, permanently. They cannot be recovered. // Not for the faint of heart - if your game implements item removal at all, a high-friction // UI confirmation process is highly recommended. - METHOD_DESC(ConsumeItem() removes items from the inventory permanently.) + STEAM_METHOD_DESC(ConsumeItem() removes items from the inventory permanently.) virtual bool ConsumeItem( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity ) = 0; // ExchangeItems() is an atomic combination of item generation and consumption. @@ -230,8 +230,8 @@ public: // components do not match the recipe, or do not contain sufficient quantity, the // exchange will fail. virtual bool ExchangeItems( SteamInventoryResult_t *pResultHandle, - ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength, - ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength ) = 0; + STEAM_ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, STEAM_ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength, + STEAM_ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, STEAM_ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength ) = 0; // TransferItemQuantity() is intended for use with items which are "stackable" (can have @@ -245,7 +245,7 @@ public: // // Deprecated. Calling this method is not required for proper playtime accounting. - METHOD_DESC( Deprecated method. Playtime accounting is performed on the Steam servers. ) + STEAM_METHOD_DESC( Deprecated method. Playtime accounting is performed on the Steam servers. ) virtual void SendItemDropHeartbeat() = 0; // Playtime credit must be consumed and turned into item drops by your game. Only item @@ -257,14 +257,14 @@ public: // to directly control rarity. // See your Steamworks configuration to set playtime drop rates for individual itemdefs. // The client library will suppress too-frequent calls to this method. - METHOD_DESC(Playtime credit must be consumed and turned into item drops by your game.) + STEAM_METHOD_DESC(Playtime credit must be consumed and turned into item drops by your game.) virtual bool TriggerItemDrop( SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition ) = 0; // Deprecated. This method is not supported. virtual bool TradeItems( SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePartner, - ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength, - ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength ) = 0; + STEAM_ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, STEAM_ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength, + STEAM_ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, STEAM_ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength ) = 0; // ITEM DEFINITIONS @@ -281,7 +281,7 @@ public: // Every time new item definitions are available (eg, from the dynamic addition of new // item types while players are still in-game), a SteamInventoryDefinitionUpdate_t // callback will be fired. - METHOD_DESC(LoadItemDefinitions triggers the automatic load and refresh of item definitions.) + STEAM_METHOD_DESC(LoadItemDefinitions triggers the automatic load and refresh of item definitions.) virtual bool LoadItemDefinitions() = 0; // GetItemDefinitionIDs returns the set of all defined item definition IDs (which are @@ -290,8 +290,8 @@ public: // contain the total size necessary for a subsequent call. Otherwise, the call will // return false if and only if there is not enough space in the output array. virtual bool GetItemDefinitionIDs( - OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, - DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0; + STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, + STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0; // GetItemDefinitionProperty returns a string property from a given item definition. // Note that some properties (for example, "name") may be localized and will depend @@ -303,12 +303,12 @@ public: // to pchValueBuffer. If the results do not fit in the given buffer, partial // results may be copied. virtual bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPropertyName, - OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0; + STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0; // Request the list of "eligible" promo items that can be manually granted to the given // user. These are promo items of type "manual" that won't be granted automatically. // An example usage of this is an item that becomes available every week. - CALL_RESULT( SteamInventoryEligiblePromoItemDefIDs_t ) + STEAM_CALL_RESULT( SteamInventoryEligiblePromoItemDefIDs_t ) virtual SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs( CSteamID steamID ) = 0; // After handling a SteamInventoryEligiblePromoItemDefIDs_t call result, use this @@ -316,19 +316,19 @@ public: // manually granted via the AddPromoItems() call. virtual bool GetEligiblePromoItemDefinitionIDs( CSteamID steamID, - OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, - DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0; + STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, + STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0; // Starts the purchase process for the given item definitions. The callback SteamInventoryStartPurchaseResult_t // will be posted if Steam was able to initialize the transaction. // // Once the purchase has been authorized and completed by the user, the callback SteamInventoryResultReady_t // will be posted. - CALL_RESULT( SteamInventoryStartPurchaseResult_t ) - virtual SteamAPICall_t StartPurchase( ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0; + STEAM_CALL_RESULT( SteamInventoryStartPurchaseResult_t ) + virtual SteamAPICall_t StartPurchase( STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0; // Request current prices for all applicable item definitions - CALL_RESULT( SteamInventoryRequestPricesResult_t ) + STEAM_CALL_RESULT( SteamInventoryRequestPricesResult_t ) virtual SteamAPICall_t RequestPrices() = 0; // Returns the number of items with prices. Need to call RequestPrices() first. @@ -336,13 +336,14 @@ public: // Returns item definition ids and their prices in the user's local currency. // Need to call RequestPrices() first. - virtual bool GetItemsWithPrices( ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t *pArrayItemDefs, - ARRAY_COUNT(unArrayLength) OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pPrices, + virtual bool GetItemsWithPrices( STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t *pArrayItemDefs, + STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pCurrentPrices, + STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pBasePrices, uint32 unArrayLength ) = 0; // Retrieves the price for the item definition id // Returns false if there is no price stored for the item definition. - virtual bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pPrice ) = 0; + virtual bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pCurrentPrice, uint64 *pBasePrice ) = 0; // Create a request to update properties on items virtual SteamInventoryUpdateHandle_t StartUpdateProperties() = 0; @@ -358,8 +359,15 @@ public: }; -#define STEAMINVENTORY_INTERFACE_VERSION "STEAMINVENTORY_INTERFACE_V002" +#define STEAMINVENTORY_INTERFACE_VERSION "STEAMINVENTORY_INTERFACE_V003" +// Global interface accessor +inline ISteamInventory *SteamInventory(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInventory *, SteamInventory, STEAMINVENTORY_INTERFACE_VERSION ); + +// Global accessor for the gameserver client +inline ISteamInventory *SteamGameServerInventory(); +STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamInventory *, SteamGameServerInventory, STEAMINVENTORY_INTERFACE_VERSION ); // SteamInventoryResultReady_t callbacks are fired whenever asynchronous // results transition from "Pending" to "OK" or an error state. There will diff --git a/public/steam/isteammatchmaking.h b/public/steam/isteammatchmaking.h index 837d98b..d0c0cea 100644 --- a/public/steam/isteammatchmaking.h +++ b/public/steam/isteammatchmaking.h @@ -10,10 +10,8 @@ #pragma once #endif -#include "steamtypes.h" -#include "steamclientpublic.h" +#include "steam_api_common.h" #include "matchmakingtypes.h" -#include "isteamclient.h" #include "isteamfriends.h" // lobby type description @@ -103,7 +101,7 @@ public: } */ // - CALL_RESULT( LobbyMatchList_t ) + STEAM_CALL_RESULT( LobbyMatchList_t ) virtual SteamAPICall_t RequestLobbyList() = 0; // filters for lobbies // this needs to be called before RequestLobbyList() to take effect @@ -134,14 +132,14 @@ public: // this is an asynchronous request // results will be returned by LobbyCreated_t callback and call result; lobby is joined & ready to use at this point // a LobbyEnter_t callback will also be received (since the local user is joining their own lobby) - CALL_RESULT( LobbyCreated_t ) + STEAM_CALL_RESULT( LobbyCreated_t ) virtual SteamAPICall_t CreateLobby( ELobbyType eLobbyType, int cMaxMembers ) = 0; // Joins an existing lobby // this is an asynchronous request // results will be returned by LobbyEnter_t callback & call result, check m_EChatRoomEnterResponse to see if was successful // lobby metadata is available to use immediately on this call completing - CALL_RESULT( LobbyEnter_t ) + STEAM_CALL_RESULT( LobbyEnter_t ) virtual SteamAPICall_t JoinLobby( CSteamID steamIDLobby ) = 0; // Leave a lobby; this will take effect immediately on the client side @@ -204,7 +202,7 @@ public: // *pSteamIDUser is filled in with the CSteamID of the member // *pvData is filled in with the message itself // return value is the number of bytes written into the buffer - virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, OUT_STRUCT() CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; + virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, STEAM_OUT_STRUCT() CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0; // Refreshes metadata for a lobby you're not necessarily in right now // you never do this for lobbies you're a member of, only if your @@ -220,7 +218,7 @@ public: // either the IP/Port or the steamID of the game server has to be valid, depending on how you want the clients to be able to connect virtual void SetLobbyGameServer( CSteamID steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID steamIDGameServer ) = 0; // returns the details of a game server set in a lobby - returns false if there is no game server set, or that lobby doesn't exist - virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, OUT_STRUCT() CSteamID *psteamIDGameServer ) = 0; + virtual bool GetLobbyGameServer( CSteamID steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, STEAM_OUT_STRUCT() CSteamID *psteamIDGameServer ) = 0; // set the limit on the # of users who can join the lobby virtual bool SetLobbyMemberLimit( CSteamID steamIDLobby, int cMaxMembers ) = 0; @@ -256,10 +254,13 @@ public: // after completion, the local user will no longer be the owner virtual void CheckForPSNGameBootInvite( unsigned int iGameBootAttributes ) = 0; #endif - CALL_BACK( LobbyChatUpdate_t ) + STEAM_CALL_BACK( LobbyChatUpdate_t ) }; #define STEAMMATCHMAKING_INTERFACE_VERSION "SteamMatchMaking009" +// Global interface accessor +inline ISteamMatchmaking *SteamMatchmaking(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMatchmaking *, SteamMatchmaking, STEAMMATCHMAKING_INTERFACE_VERSION ); //----------------------------------------------------------------------------- // Callback interfaces for server list functions (see ISteamMatchmakingServers below) @@ -391,12 +392,12 @@ public: // Request a new list of servers of a particular type. These calls each correspond to one of the EMatchMakingType values. // Each call allocates a new asynchronous request object. // Request object must be released by calling ReleaseRequest( hServerListRequest ) - virtual HServerListRequest RequestInternetServerList( AppId_t iApp, ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestInternetServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; virtual HServerListRequest RequestLANServerList( AppId_t iApp, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; - virtual HServerListRequest RequestFriendsServerList( AppId_t iApp, ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; - virtual HServerListRequest RequestFavoritesServerList( AppId_t iApp, ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; - virtual HServerListRequest RequestHistoryServerList( AppId_t iApp, ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; - virtual HServerListRequest RequestSpectatorServerList( AppId_t iApp, ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestFriendsServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestFavoritesServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestHistoryServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; + virtual HServerListRequest RequestSpectatorServerList( AppId_t iApp, STEAM_ARRAY_COUNT(nFilters) MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0; // Releases the asynchronous request object and cancels any pending query on it if there's a pending query in progress. // RefreshComplete callback is not posted when request is released. @@ -522,6 +523,10 @@ public: }; #define STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION "SteamMatchMakingServers002" +// Global interface accessor +inline ISteamMatchmakingServers *SteamMatchmakingServers(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMatchmakingServers *, SteamMatchmakingServers, STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION ); + // game server flags const uint32 k_unFavoriteFlagNone = 0x00; const uint32 k_unFavoriteFlagFavorite = 0x01; // this game favorite entry is for the favorites list @@ -545,16 +550,181 @@ enum EChatMemberStateChange #define BChatMemberStateChangeRemoved( rgfChatMemberStateChangeFlags ) ( rgfChatMemberStateChangeFlags & ( k_EChatMemberStateChangeDisconnected | k_EChatMemberStateChangeLeft | k_EChatMemberStateChangeKicked | k_EChatMemberStateChangeBanned ) ) + //----------------------------------------------------------------------------- -// Callbacks for ISteamMatchmaking (which go through the regular Steam callback registration system) +// Purpose: Functions for match making services for clients to get to favorites +// and to operate on game lobbies. +//----------------------------------------------------------------------------- +class ISteamGameSearch +{ +public: + // ============================================================================================= + // Game Player APIs + + // a keyname and a list of comma separated values: one of which is must be found in order for the match to qualify + // fails if a search is currently in progress + virtual EGameSearchErrorCode_t AddGameSearchParams( const char *pchKeyToFind, const char *pchValuesToFind ) = 0; + + // all players in lobby enter the queue and await a SearchForGameNotificationCallback_t callback. fails if another search is currently in progress + // if not the owner of the lobby or search already in progress this call fails + // periodic callbacks will be sent as queue time estimates change + virtual EGameSearchErrorCode_t SearchForGameWithLobby( CSteamID steamIDLobby, int nPlayerMin, int nPlayerMax ) = 0; + + // user enter the queue and await a SearchForGameNotificationCallback_t callback. fails if another search is currently in progress + // periodic callbacks will be sent as queue time estimates change + virtual EGameSearchErrorCode_t SearchForGameSolo( int nPlayerMin, int nPlayerMax ) = 0; + + // after receiving SearchForGameResultCallback_t, accept or decline the game + // multiple SearchForGameResultCallback_t will follow as players accept game until the host starts or cancels the game + virtual EGameSearchErrorCode_t AcceptGame() = 0; + virtual EGameSearchErrorCode_t DeclineGame() = 0; + + // after receiving GameStartedByHostCallback_t get connection details to server + virtual EGameSearchErrorCode_t RetrieveConnectionDetails( CSteamID steamIDHost, char *pchConnectionDetails, int cubConnectionDetails ) = 0; + + // leaves queue if still waiting + virtual EGameSearchErrorCode_t EndGameSearch() = 0; + + // ============================================================================================= + // Game Host APIs + + // a keyname and a list of comma separated values: all the values you allow + virtual EGameSearchErrorCode_t SetGameHostParams( const char *pchKey, const char *pchValue ) = 0; + + // set connection details for players once game is found so they can connect to this server + virtual EGameSearchErrorCode_t SetConnectionDetails( const char *pchConnectionDetails, int cubConnectionDetails ) = 0; + + // mark server as available for more players with nPlayerMin,nPlayerMax desired + // accept no lobbies with playercount greater than nMaxTeamSize + // the set of lobbies returned must be partitionable into teams of no more than nMaxTeamSize + // RequestPlayersForGameNotificationCallback_t callback will be sent when the search has started + // multple RequestPlayersForGameResultCallback_t callbacks will follow when players are found + virtual EGameSearchErrorCode_t RequestPlayersForGame( int nPlayerMin, int nPlayerMax, int nMaxTeamSize ) = 0; + + // accept the player list and release connection details to players + // players will only be given connection details and host steamid when this is called + // ( allows host to accept after all players confirm, some confirm, or none confirm. decision is entirely up to the host ) + virtual EGameSearchErrorCode_t HostConfirmGameStart( uint64 ullUniqueGameID ) = 0; + + // cancel request and leave the pool of game hosts looking for players + // if a set of players has already been sent to host, all players will receive SearchForGameHostFailedToConfirm_t + virtual EGameSearchErrorCode_t CancelRequestPlayersForGame() = 0; + + // submit a result for one player. does not end the game. ullUniqueGameID continues to describe this game + virtual EGameSearchErrorCode_t SubmitPlayerResult( uint64 ullUniqueGameID, CSteamID steamIDPlayer, EPlayerResult_t EPlayerResult ) = 0; + + // ends the game. no further SubmitPlayerResults for ullUniqueGameID will be accepted + // any future requests will provide a new ullUniqueGameID + virtual EGameSearchErrorCode_t EndGame( uint64 ullUniqueGameID ) = 0; + +}; +#define STEAMGAMESEARCH_INTERFACE_VERSION "SteamMatchGameSearch001" + +// Global interface accessor +inline ISteamGameSearch *SteamGameSearch(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamGameSearch *, SteamGameSearch, STEAMGAMESEARCH_INTERFACE_VERSION ); + + +//----------------------------------------------------------------------------- +// Purpose: Functions for quickly creating a Party with friends or acquaintances, +// EG from chat rooms. +//----------------------------------------------------------------------------- +enum ESteamPartyBeaconLocationType +{ + k_ESteamPartyBeaconLocationType_Invalid = 0, + k_ESteamPartyBeaconLocationType_ChatGroup = 1, + + k_ESteamPartyBeaconLocationType_Max, +}; + + #if defined( VALVE_CALLBACK_PACK_SMALL ) #pragma pack( push, 4 ) #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif + +struct SteamPartyBeaconLocation_t +{ + ESteamPartyBeaconLocationType m_eType; + uint64 m_ulLocationID; +}; + +enum ESteamPartyBeaconLocationData +{ + k_ESteamPartyBeaconLocationDataInvalid = 0, + k_ESteamPartyBeaconLocationDataName = 1, + k_ESteamPartyBeaconLocationDataIconURLSmall = 2, + k_ESteamPartyBeaconLocationDataIconURLMedium = 3, + k_ESteamPartyBeaconLocationDataIconURLLarge = 4, +}; + +class ISteamParties +{ +public: + + // ============================================================================================= + // Party Client APIs + + // Enumerate any active beacons for parties you may wish to join + virtual uint32 GetNumActiveBeacons() = 0; + virtual PartyBeaconID_t GetBeaconByIndex( uint32 unIndex ) = 0; + virtual bool GetBeaconDetails( PartyBeaconID_t ulBeaconID, CSteamID *pSteamIDBeaconOwner, STEAM_OUT_STRUCT() SteamPartyBeaconLocation_t *pLocation, STEAM_OUT_STRING_COUNT(cchMetadata) char *pchMetadata, int cchMetadata ) = 0; + + // Join an open party. Steam will reserve one beacon slot for your SteamID, + // and return the necessary JoinGame string for you to use to connect + STEAM_CALL_RESULT( JoinPartyCallback_t ) + virtual SteamAPICall_t JoinParty( PartyBeaconID_t ulBeaconID ) = 0; + + // ============================================================================================= + // Party Host APIs + + // Get a list of possible beacon locations + virtual bool GetNumAvailableBeaconLocations( uint32 *puNumLocations ) = 0; + virtual bool GetAvailableBeaconLocations( SteamPartyBeaconLocation_t *pLocationList, uint32 uMaxNumLocations ) = 0; + + // Create a new party beacon and activate it in the selected location. + // unOpenSlots is the maximum number of users that Steam will send to you. + // When people begin responding to your beacon, Steam will send you + // PartyReservationCallback_t callbacks to let you know who is on the way. + STEAM_CALL_RESULT( CreateBeaconCallback_t ) + virtual SteamAPICall_t CreateBeacon( uint32 unOpenSlots, SteamPartyBeaconLocation_t *pBeaconLocation, const char *pchConnectString, const char *pchMetadata ) = 0; + + // Call this function when a user that had a reservation (see callback below) + // has successfully joined your party. + // Steam will manage the remaining open slots automatically. + virtual void OnReservationCompleted( PartyBeaconID_t ulBeacon, CSteamID steamIDUser ) = 0; + + // To cancel a reservation (due to timeout or user input), call this. + // Steam will open a new reservation slot. + // Note: The user may already be in-flight to your game, so it's possible they will still connect and try to join your party. + virtual void CancelReservation( PartyBeaconID_t ulBeacon, CSteamID steamIDUser ) = 0; + + // Change the number of open beacon reservation slots. + // Call this if, for example, someone without a reservation joins your party (eg a friend, or via your own matchmaking system). + STEAM_CALL_RESULT( ChangeNumOpenSlotsCallback_t ) + virtual SteamAPICall_t ChangeNumOpenSlots( PartyBeaconID_t ulBeacon, uint32 unOpenSlots ) = 0; + + // Turn off the beacon. + virtual bool DestroyBeacon( PartyBeaconID_t ulBeacon ) = 0; + + // Utils + virtual bool GetBeaconLocationData( SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, STEAM_OUT_STRING_COUNT(cchDataStringOut) char *pchDataStringOut, int cchDataStringOut ) = 0; + +}; +#define STEAMPARTIES_INTERFACE_VERSION "SteamParties002" + +// Global interface accessor +inline ISteamParties *SteamParties(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamParties *, SteamParties, STEAMPARTIES_INTERFACE_VERSION ); + + +//----------------------------------------------------------------------------- +// Callbacks for ISteamMatchmaking (which go through the regular Steam callback registration system) + //----------------------------------------------------------------------------- // Purpose: a server was added/removed from the favorites list, you should refresh now //----------------------------------------------------------------------------- @@ -745,6 +915,171 @@ struct FavoritesListAccountsUpdated_t EResult m_eResult; }; + + +//----------------------------------------------------------------------------- +// Callbacks for ISteamGameSearch (which go through the regular Steam callback registration system) + +struct SearchForGameProgressCallback_t +{ + enum { k_iCallback = k_iSteamGameSearchCallbacks + 1 }; + + uint64 m_ullSearchID; // all future callbacks referencing this search will include this Search ID + + EResult m_eResult; // if search has started this result will be k_EResultOK, any other value indicates search has failed to start or has terminated + CSteamID m_lobbyID; // lobby ID if lobby search, invalid steamID otherwise + CSteamID m_steamIDEndedSearch; // if search was terminated, steamID that terminated search + + int32 m_nSecondsRemainingEstimate; + int32 m_cPlayersSearching; +}; + +// notification to all players searching that a game has been found +struct SearchForGameResultCallback_t +{ + enum { k_iCallback = k_iSteamGameSearchCallbacks + 2 }; + + uint64 m_ullSearchID; + + EResult m_eResult; // if game/host was lost this will be an error value + + // if m_bGameFound is true the following are non-zero + int32 m_nCountPlayersInGame; + int32 m_nCountAcceptedGame; + // if m_steamIDHost is valid the host has started the game + CSteamID m_steamIDHost; + bool m_bFinalCallback; +}; + + +//----------------------------------------------------------------------------- +// ISteamGameSearch : Game Host API callbacks + +// callback from RequestPlayersForGame when the matchmaking service has started or ended search +// callback will also follow a call from CancelRequestPlayersForGame - m_bSearchInProgress will be false +struct RequestPlayersForGameProgressCallback_t +{ + enum { k_iCallback = k_iSteamGameSearchCallbacks + 11 }; + + EResult m_eResult; // m_ullSearchID will be non-zero if this is k_EResultOK + uint64 m_ullSearchID; // all future callbacks referencing this search will include this Search ID +}; + +// callback from RequestPlayersForGame +// one of these will be sent per player +// followed by additional callbacks when players accept or decline the game +struct RequestPlayersForGameResultCallback_t +{ + enum { k_iCallback = k_iSteamGameSearchCallbacks + 12 }; + + EResult m_eResult; // m_ullSearchID will be non-zero if this is k_EResultOK + uint64 m_ullSearchID; + + CSteamID m_SteamIDPlayerFound; // player steamID + CSteamID m_SteamIDLobby; // if the player is in a lobby, the lobby ID + enum PlayerAcceptState_t + { + k_EStateUnknown = 0, + k_EStatePlayerAccepted = 1, + k_EStatePlayerDeclined = 2, + }; + PlayerAcceptState_t m_ePlayerAcceptState; + int32 m_nPlayerIndex; + int32 m_nTotalPlayersFound; // expect this many callbacks at minimum + int32 m_nTotalPlayersAcceptedGame; + int32 m_nSuggestedTeamIndex; + uint64 m_ullUniqueGameID; +}; + + +struct RequestPlayersForGameFinalResultCallback_t +{ + enum { k_iCallback = k_iSteamGameSearchCallbacks + 13 }; + + EResult m_eResult; + uint64 m_ullSearchID; + uint64 m_ullUniqueGameID; +}; + + + +// this callback confirms that results were received by the matchmaking service for this player +struct SubmitPlayerResultResultCallback_t +{ + enum { k_iCallback = k_iSteamGameSearchCallbacks + 14 }; + + EResult m_eResult; + uint64 ullUniqueGameID; + CSteamID steamIDPlayer; +}; + + +// this callback confirms that the game is recorded as complete on the matchmaking service +// the next call to RequestPlayersForGame will generate a new unique game ID +struct EndGameResultCallback_t +{ + enum { k_iCallback = k_iSteamGameSearchCallbacks + 15 }; + + EResult m_eResult; + uint64 ullUniqueGameID; +}; + + +// Steam has responded to the user request to join a party via the given Beacon ID. +// If successful, the connect string contains game-specific instructions to connect +// to the game with that party. +struct JoinPartyCallback_t +{ + enum { k_iCallback = k_iSteamPartiesCallbacks + 1 }; + + EResult m_eResult; + PartyBeaconID_t m_ulBeaconID; + CSteamID m_SteamIDBeaconOwner; + char m_rgchConnectString[256]; +}; + +// Response to CreateBeacon request. If successful, the beacon ID is provided. +struct CreateBeaconCallback_t +{ + enum { k_iCallback = k_iSteamPartiesCallbacks + 2 }; + + EResult m_eResult; + PartyBeaconID_t m_ulBeaconID; +}; + +// Someone has used the beacon to join your party - they are in-flight now +// and we've reserved one of the open slots for them. +// You should confirm when they join your party by calling OnReservationCompleted(). +// Otherwise, Steam may timeout their reservation eventually. +struct ReservationNotificationCallback_t +{ + enum { k_iCallback = k_iSteamPartiesCallbacks + 3 }; + + PartyBeaconID_t m_ulBeaconID; + CSteamID m_steamIDJoiner; +}; + +// Response to ChangeNumOpenSlots call +struct ChangeNumOpenSlotsCallback_t +{ + enum { k_iCallback = k_iSteamPartiesCallbacks + 4 }; + + EResult m_eResult; +}; + +// The list of possible Party beacon locations has changed +struct AvailableBeaconLocationsUpdated_t +{ + enum { k_iCallback = k_iSteamPartiesCallbacks + 5 }; +}; + +// The list of active beacons may have changed +struct ActiveBeaconsUpdated_t +{ + enum { k_iCallback = k_iSteamPartiesCallbacks + 6 }; +}; + + #pragma pack( pop ) diff --git a/public/steam/isteammusic.h b/public/steam/isteammusic.h index 779a4c2..ffa49a0 100644 --- a/public/steam/isteammusic.h +++ b/public/steam/isteammusic.h @@ -6,7 +6,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" //----------------------------------------------------------------------------- // Purpose: @@ -44,22 +44,26 @@ public: #define STEAMMUSIC_INTERFACE_VERSION "STEAMMUSIC_INTERFACE_VERSION001" +// Global interface accessor +inline ISteamMusic *SteamMusic(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMusic *, SteamMusic, STEAMMUSIC_INTERFACE_VERSION ); + // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) #pragma pack( push, 4 ) #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif -DEFINE_CALLBACK( PlaybackStatusHasChanged_t, k_iSteamMusicCallbacks + 1 ) -END_DEFINE_CALLBACK_0() +STEAM_CALLBACK_BEGIN( PlaybackStatusHasChanged_t, k_iSteamMusicCallbacks + 1 ) +STEAM_CALLBACK_END(0) -DEFINE_CALLBACK( VolumeHasChanged_t, k_iSteamMusicCallbacks + 2 ) - CALLBACK_MEMBER( 0, float, m_flNewVolume ) -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN( VolumeHasChanged_t, k_iSteamMusicCallbacks + 2 ) + STEAM_CALLBACK_MEMBER( 0, float, m_flNewVolume ) +STEAM_CALLBACK_END(1) #pragma pack( pop ) diff --git a/public/steam/isteammusicremote.h b/public/steam/isteammusicremote.h index ea29a7d..a36f4f8 100644 --- a/public/steam/isteammusicremote.h +++ b/public/steam/isteammusicremote.h @@ -6,7 +6,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" #include "isteammusic.h" #define k_SteamMusicNameMaxLength 255 @@ -64,63 +64,67 @@ public: #define STEAMMUSICREMOTE_INTERFACE_VERSION "STEAMMUSICREMOTE_INTERFACE_VERSION001" +// Global interface accessor +inline ISteamMusicRemote *SteamMusicRemote(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMusicRemote *, SteamMusicRemote, STEAMMUSICREMOTE_INTERFACE_VERSION ); + // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) #pragma pack( push, 4 ) #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif -DEFINE_CALLBACK( MusicPlayerRemoteWillActivate_t, k_iSteamMusicRemoteCallbacks + 1) -END_DEFINE_CALLBACK_0() +STEAM_CALLBACK_BEGIN( MusicPlayerRemoteWillActivate_t, k_iSteamMusicRemoteCallbacks + 1) +STEAM_CALLBACK_END(0) -DEFINE_CALLBACK( MusicPlayerRemoteWillDeactivate_t, k_iSteamMusicRemoteCallbacks + 2 ) -END_DEFINE_CALLBACK_0() +STEAM_CALLBACK_BEGIN( MusicPlayerRemoteWillDeactivate_t, k_iSteamMusicRemoteCallbacks + 2 ) +STEAM_CALLBACK_END(0) -DEFINE_CALLBACK( MusicPlayerRemoteToFront_t, k_iSteamMusicRemoteCallbacks + 3 ) -END_DEFINE_CALLBACK_0() +STEAM_CALLBACK_BEGIN( MusicPlayerRemoteToFront_t, k_iSteamMusicRemoteCallbacks + 3 ) +STEAM_CALLBACK_END(0) -DEFINE_CALLBACK( MusicPlayerWillQuit_t, k_iSteamMusicRemoteCallbacks + 4 ) -END_DEFINE_CALLBACK_0() +STEAM_CALLBACK_BEGIN( MusicPlayerWillQuit_t, k_iSteamMusicRemoteCallbacks + 4 ) +STEAM_CALLBACK_END(0) -DEFINE_CALLBACK( MusicPlayerWantsPlay_t, k_iSteamMusicRemoteCallbacks + 5 ) -END_DEFINE_CALLBACK_0() +STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlay_t, k_iSteamMusicRemoteCallbacks + 5 ) +STEAM_CALLBACK_END(0) -DEFINE_CALLBACK( MusicPlayerWantsPause_t, k_iSteamMusicRemoteCallbacks + 6 ) -END_DEFINE_CALLBACK_0() +STEAM_CALLBACK_BEGIN( MusicPlayerWantsPause_t, k_iSteamMusicRemoteCallbacks + 6 ) +STEAM_CALLBACK_END(0) -DEFINE_CALLBACK( MusicPlayerWantsPlayPrevious_t, k_iSteamMusicRemoteCallbacks + 7 ) -END_DEFINE_CALLBACK_0() +STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlayPrevious_t, k_iSteamMusicRemoteCallbacks + 7 ) +STEAM_CALLBACK_END(0) -DEFINE_CALLBACK( MusicPlayerWantsPlayNext_t, k_iSteamMusicRemoteCallbacks + 8 ) -END_DEFINE_CALLBACK_0() +STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlayNext_t, k_iSteamMusicRemoteCallbacks + 8 ) +STEAM_CALLBACK_END(0) -DEFINE_CALLBACK( MusicPlayerWantsShuffled_t, k_iSteamMusicRemoteCallbacks + 9 ) - CALLBACK_MEMBER( 0, bool, m_bShuffled ) -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN( MusicPlayerWantsShuffled_t, k_iSteamMusicRemoteCallbacks + 9 ) + STEAM_CALLBACK_MEMBER( 0, bool, m_bShuffled ) +STEAM_CALLBACK_END(1) -DEFINE_CALLBACK( MusicPlayerWantsLooped_t, k_iSteamMusicRemoteCallbacks + 10 ) - CALLBACK_MEMBER(0, bool, m_bLooped ) -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN( MusicPlayerWantsLooped_t, k_iSteamMusicRemoteCallbacks + 10 ) + STEAM_CALLBACK_MEMBER(0, bool, m_bLooped ) +STEAM_CALLBACK_END(1) -DEFINE_CALLBACK( MusicPlayerWantsVolume_t, k_iSteamMusicCallbacks + 11 ) - CALLBACK_MEMBER(0, float, m_flNewVolume) -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN( MusicPlayerWantsVolume_t, k_iSteamMusicCallbacks + 11 ) + STEAM_CALLBACK_MEMBER(0, float, m_flNewVolume) +STEAM_CALLBACK_END(1) -DEFINE_CALLBACK( MusicPlayerSelectsQueueEntry_t, k_iSteamMusicCallbacks + 12 ) - CALLBACK_MEMBER(0, int, nID ) -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN( MusicPlayerSelectsQueueEntry_t, k_iSteamMusicCallbacks + 12 ) + STEAM_CALLBACK_MEMBER(0, int, nID ) +STEAM_CALLBACK_END(1) -DEFINE_CALLBACK( MusicPlayerSelectsPlaylistEntry_t, k_iSteamMusicCallbacks + 13 ) - CALLBACK_MEMBER(0, int, nID ) -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN( MusicPlayerSelectsPlaylistEntry_t, k_iSteamMusicCallbacks + 13 ) + STEAM_CALLBACK_MEMBER(0, int, nID ) +STEAM_CALLBACK_END(1) -DEFINE_CALLBACK( MusicPlayerWantsPlayingRepeatStatus_t, k_iSteamMusicRemoteCallbacks + 14 ) - CALLBACK_MEMBER(0, int, m_nPlayingRepeatStatus ) -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlayingRepeatStatus_t, k_iSteamMusicRemoteCallbacks + 14 ) + STEAM_CALLBACK_MEMBER(0, int, m_nPlayingRepeatStatus ) +STEAM_CALLBACK_END(1) #pragma pack( pop ) diff --git a/public/steam/isteamnetworking.h b/public/steam/isteamnetworking.h index 8f70819..b1bf5fa 100644 --- a/public/steam/isteamnetworking.h +++ b/public/steam/isteamnetworking.h @@ -10,9 +10,7 @@ #pragma once #endif -#include "steamtypes.h" -#include "steamclientpublic.h" - +#include "steam_api_common.h" // list of possible errors returned by SendP2PPacket() API // these will be posted in the P2PSessionConnectFail_t callback @@ -63,7 +61,7 @@ enum EP2PSend #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif struct P2PSessionState_t { @@ -127,8 +125,14 @@ class ISteamNetworking { public: //////////////////////////////////////////////////////////////////////////////////////////// - // Session-less connection functions - // automatically establishes NAT-traversing or Relay server connections + // + // UDP-style (connectionless) networking interface. These functions send messages using + // an API organized around the destination. Reliable and unreliable messages are supported. + // + // For a more TCP-style interface (meaning you have a connection handle), see the functions below. + // Both interface styles can send both reliable and unreliable messages. + // + // Automatically establishes NAT-traversing or Relay server connections // Sends a P2P packet to the specified user // UDP-like, unreliable and a max packet size of 1200 bytes @@ -181,11 +185,18 @@ public: //////////////////////////////////////////////////////////////////////////////////////////// - // LISTEN / CONNECT style interface functions // - // This is an older set of functions designed around the Berkeley TCP sockets model - // it's preferential that you use the above P2P functions, they're more robust - // and these older functions will be removed eventually + // LISTEN / CONNECT connection-oriented interface functions + // + // These functions are more like a client-server TCP API. One side is the "server" + // and "listens" for incoming connections, which then must be "accepted." The "client" + // initiates a connection by "connecting." Sending and receiving is done through a + // connection handle. + // + // For a more UDP-style interface, where you do not track connection handles but + // simply send messages to a SteamID, use the UDP-style functions above. + // + // Both methods can send both reliable and unreliable methods. // //////////////////////////////////////////////////////////////////////////////////////////// @@ -261,13 +272,21 @@ public: }; #define STEAMNETWORKING_INTERFACE_VERSION "SteamNetworking005" +// Global interface accessor +inline ISteamNetworking *SteamNetworking(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworking *, SteamNetworking, STEAMNETWORKING_INTERFACE_VERSION ); + +// Global accessor for the gameserver client +inline ISteamNetworking *SteamGameServerNetworking(); +STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworking *, SteamGameServerNetworking, STEAMNETWORKING_INTERFACE_VERSION ); + // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) #pragma pack( push, 4 ) #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif // callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API diff --git a/public/steam/isteamparentalsettings.h b/public/steam/isteamparentalsettings.h index 1b6ba9f..c965e32 100644 --- a/public/steam/isteamparentalsettings.h +++ b/public/steam/isteamparentalsettings.h @@ -10,6 +10,8 @@ #pragma once #endif +#include "steam_api_common.h" + // Feature types for parental settings enum EParentalFeature { @@ -44,6 +46,9 @@ public: #define STEAMPARENTALSETTINGS_INTERFACE_VERSION "STEAMPARENTALSETTINGS_INTERFACE_VERSION001" +// Global interface accessor +inline ISteamParentalSettings *SteamParentalSettings(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamParentalSettings *, SteamParentalSettings, STEAMPARENTALSETTINGS_INTERFACE_VERSION ); //----------------------------------------------------------------------------- // Purpose: Callback for querying UGC diff --git a/public/steam/isteamremotestorage.h b/public/steam/isteamremotestorage.h index 3ac2871..0fed2af 100644 --- a/public/steam/isteamremotestorage.h +++ b/public/steam/isteamremotestorage.h @@ -10,7 +10,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" //----------------------------------------------------------------------------- @@ -28,7 +28,7 @@ const uint32 k_unMaxCloudFileChunkSize = 100 * 1024 * 1024; #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif struct SteamParamStringArray_t { @@ -66,6 +66,7 @@ enum ERemoteStoragePlatform k_ERemoteStoragePlatformPS3 = (1 << 2), k_ERemoteStoragePlatformLinux = (1 << 3), k_ERemoteStoragePlatformReserved2 = (1 << 4), + k_ERemoteStoragePlatformAndroid = (1 << 5), k_ERemoteStoragePlatformAll = 0xffffffff }; @@ -171,16 +172,16 @@ class ISteamRemoteStorage virtual bool FileWrite( const char *pchFile, const void *pvData, int32 cubData ) = 0; virtual int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead ) = 0; - CALL_RESULT( RemoteStorageFileWriteAsyncComplete_t ) + STEAM_CALL_RESULT( RemoteStorageFileWriteAsyncComplete_t ) virtual SteamAPICall_t FileWriteAsync( const char *pchFile, const void *pvData, uint32 cubData ) = 0; - CALL_RESULT( RemoteStorageFileReadAsyncComplete_t ) + STEAM_CALL_RESULT( RemoteStorageFileReadAsyncComplete_t ) virtual SteamAPICall_t FileReadAsync( const char *pchFile, uint32 nOffset, uint32 cubToRead ) = 0; virtual bool FileReadAsyncComplete( SteamAPICall_t hReadCall, void *pvBuffer, uint32 cubToRead ) = 0; virtual bool FileForget( const char *pchFile ) = 0; virtual bool FileDelete( const char *pchFile ) = 0; - CALL_RESULT( RemoteStorageFileShareResult_t ) + STEAM_CALL_RESULT( RemoteStorageFileShareResult_t ) virtual SteamAPICall_t FileShare( const char *pchFile ) = 0; virtual bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform ) = 0; @@ -212,7 +213,7 @@ class ISteamRemoteStorage // Downloads a UGC file. A priority value of 0 will download the file immediately, // otherwise it will wait to download the file until all downloads with a lower priority // value are completed. Downloads with equal priority will occur simultaneously. - CALL_RESULT( RemoteStorageDownloadUGCResult_t ) + STEAM_CALL_RESULT( RemoteStorageDownloadUGCResult_t ) virtual SteamAPICall_t UGCDownload( UGCHandle_t hContent, uint32 unPriority ) = 0; // Gets the amount of data downloaded so far for a piece of content. pnBytesExpected can be 0 if function returns false @@ -220,7 +221,7 @@ class ISteamRemoteStorage virtual bool GetUGCDownloadProgress( UGCHandle_t hContent, int32 *pnBytesDownloaded, int32 *pnBytesExpected ) = 0; // Gets metadata for a file after it has been downloaded. This is the same metadata given in the RemoteStorageDownloadUGCResult_t call result - virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, OUT_STRING() char **ppchName, int32 *pnFileSizeInBytes, OUT_STRUCT() CSteamID *pSteamIDOwner ) = 0; + virtual bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, STEAM_OUT_STRING() char **ppchName, int32 *pnFileSizeInBytes, STEAM_OUT_STRUCT() CSteamID *pSteamIDOwner ) = 0; // After download, gets the content of the file. // Small files can be read all at once by calling this function with an offset of 0 and cubDataToRead equal to the size of the file. @@ -253,7 +254,7 @@ class ISteamRemoteStorage #endif // publishing UGC - CALL_RESULT( RemoteStoragePublishFileProgress_t ) + STEAM_CALL_RESULT( RemoteStoragePublishFileProgress_t ) virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0; virtual PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId ) = 0; virtual bool UpdatePublishedFileFile( PublishedFileUpdateHandle_t updateHandle, const char *pchFile ) = 0; @@ -262,49 +263,52 @@ class ISteamRemoteStorage virtual bool UpdatePublishedFileDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchDescription ) = 0; virtual bool UpdatePublishedFileVisibility( PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; virtual bool UpdatePublishedFileTags( PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t *pTags ) = 0; - CALL_RESULT( RemoteStorageUpdatePublishedFileResult_t ) + STEAM_CALL_RESULT( RemoteStorageUpdatePublishedFileResult_t ) virtual SteamAPICall_t CommitPublishedFileUpdate( PublishedFileUpdateHandle_t updateHandle ) = 0; // Gets published file details for the given publishedfileid. If unMaxSecondsOld is greater than 0, // cached data may be returned, depending on how long ago it was cached. A value of 0 will force a refresh. // A value of k_WorkshopForceLoadPublishedFileDetailsFromCache will use cached data if it exists, no matter how old it is. - CALL_RESULT( RemoteStorageGetPublishedFileDetailsResult_t ) + STEAM_CALL_RESULT( RemoteStorageGetPublishedFileDetailsResult_t ) virtual SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld ) = 0; - CALL_RESULT( RemoteStorageDeletePublishedFileResult_t ) + STEAM_CALL_RESULT( RemoteStorageDeletePublishedFileResult_t ) virtual SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; // enumerate the files that the current user published with this app - CALL_RESULT( RemoteStorageEnumerateUserPublishedFilesResult_t ) + STEAM_CALL_RESULT( RemoteStorageEnumerateUserPublishedFilesResult_t ) virtual SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex ) = 0; - CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t ) + STEAM_CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t ) virtual SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; - CALL_RESULT( RemoteStorageEnumerateUserSubscribedFilesResult_t ) + STEAM_CALL_RESULT( RemoteStorageEnumerateUserSubscribedFilesResult_t ) virtual SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex ) = 0; - CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t ) + STEAM_CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t ) virtual SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId ) = 0; virtual bool UpdatePublishedFileSetChangeDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchChangeDescription ) = 0; - CALL_RESULT( RemoteStorageGetPublishedItemVoteDetailsResult_t ) + STEAM_CALL_RESULT( RemoteStorageGetPublishedItemVoteDetailsResult_t ) virtual SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; - CALL_RESULT( RemoteStorageUpdateUserPublishedItemVoteResult_t ) + STEAM_CALL_RESULT( RemoteStorageUpdateUserPublishedItemVoteResult_t ) virtual SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp ) = 0; - CALL_RESULT( RemoteStorageGetPublishedItemVoteDetailsResult_t ) + STEAM_CALL_RESULT( RemoteStorageGetPublishedItemVoteDetailsResult_t ) virtual SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId ) = 0; - CALL_RESULT( RemoteStorageEnumerateUserPublishedFilesResult_t ) + STEAM_CALL_RESULT( RemoteStorageEnumerateUserPublishedFilesResult_t ) virtual SteamAPICall_t EnumerateUserSharedWorkshopFiles( CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t *pRequiredTags, SteamParamStringArray_t *pExcludedTags ) = 0; - CALL_RESULT( RemoteStoragePublishFileProgress_t ) + STEAM_CALL_RESULT( RemoteStoragePublishFileProgress_t ) virtual SteamAPICall_t PublishVideo( EWorkshopVideoProvider eVideoProvider, const char *pchVideoAccount, const char *pchVideoIdentifier, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags ) = 0; - CALL_RESULT( RemoteStorageSetUserPublishedFileActionResult_t ) + STEAM_CALL_RESULT( RemoteStorageSetUserPublishedFileActionResult_t ) virtual SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction ) = 0; - CALL_RESULT( RemoteStorageEnumeratePublishedFilesByUserActionResult_t ) + STEAM_CALL_RESULT( RemoteStorageEnumeratePublishedFilesByUserActionResult_t ) virtual SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 unStartIndex ) = 0; // this method enumerates the public view of workshop files - CALL_RESULT( RemoteStorageEnumerateWorkshopFilesResult_t ) + STEAM_CALL_RESULT( RemoteStorageEnumerateWorkshopFilesResult_t ) virtual SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags ) = 0; - CALL_RESULT( RemoteStorageDownloadUGCResult_t ) + STEAM_CALL_RESULT( RemoteStorageDownloadUGCResult_t ) virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority ) = 0; }; #define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION014" +// Global interface accessor +inline ISteamRemoteStorage *SteamRemoteStorage(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamRemoteStorage *, SteamRemoteStorage, STEAMREMOTESTORAGE_INTERFACE_VERSION ); // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) @@ -312,7 +316,7 @@ class ISteamRemoteStorage #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif //----------------------------------------------------------------------------- @@ -450,7 +454,7 @@ struct RemoteStorageEnumerateUserSubscribedFilesResult_t #elif defined(VALVE_CALLBACK_PACK_LARGE) VALVE_COMPILE_TIME_ASSERT( sizeof( RemoteStorageEnumerateUserSubscribedFilesResult_t ) == (1 + 1 + 1 + 50 + 100) * 4 + 4 ); #else -#warning You must first include isteamclient.h +#warning You must first include steam_api_common.h #endif //----------------------------------------------------------------------------- diff --git a/public/steam/isteamscreenshots.h b/public/steam/isteamscreenshots.h index 6095705..1824268 100644 --- a/public/steam/isteamscreenshots.h +++ b/public/steam/isteamscreenshots.h @@ -10,7 +10,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" const uint32 k_nScreenshotMaxTaggedUsers = 32; const uint32 k_nScreenshotMaxTaggedPublishedFiles = 32; @@ -81,13 +81,17 @@ public: #define STEAMSCREENSHOTS_INTERFACE_VERSION "STEAMSCREENSHOTS_INTERFACE_VERSION003" +// Global interface accessor +inline ISteamScreenshots *SteamScreenshots(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamScreenshots *, SteamScreenshots, STEAMSCREENSHOTS_INTERFACE_VERSION ); + // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) #pragma pack( push, 4 ) #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif //----------------------------------------------------------------------------- // Purpose: Screenshot successfully written or otherwise added to the library diff --git a/public/steam/isteamugc.h b/public/steam/isteamugc.h index 4a7d296..750706d 100644 --- a/public/steam/isteamugc.h +++ b/public/steam/isteamugc.h @@ -10,7 +10,8 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" +#include "isteamremotestorage.h" // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) @@ -18,7 +19,7 @@ #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif @@ -205,23 +206,26 @@ public: // Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1. virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ) = 0; + // Query for all matching UGC using the new deep paging interface. Creator app id or consumer app id must be valid and be set to the current running app. pchCursor should be set to NULL or "*" to get the first result set. + virtual UGCQueryHandle_t CreateQueryAllUGCRequest( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char *pchCursor = NULL ) = 0; + // Query for the details of the given published file ids (the RequestUGCDetails call is deprecated and replaced with this) virtual UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; // Send the query to Steam - CALL_RESULT( SteamUGCQueryCompleted_t ) + STEAM_CALL_RESULT( SteamUGCQueryCompleted_t ) virtual SteamAPICall_t SendQueryUGCRequest( UGCQueryHandle_t handle ) = 0; // Retrieve an individual result after receiving the callback for querying UGC virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; - virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, OUT_STRING_COUNT(cchURLSize) char *pchURL, uint32 cchURLSize ) = 0; - virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, OUT_STRING_COUNT(cchMetadatasize) char *pchMetadata, uint32 cchMetadatasize ) = 0; + virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURL, uint32 cchURLSize ) = 0; + virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, STEAM_OUT_STRING_COUNT(cchMetadatasize) char *pchMetadata, uint32 cchMetadatasize ) = 0; virtual bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; virtual bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint32 index, EItemStatistic eStatType, uint64 *pStatValue ) = 0; virtual uint32 GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint32 index ) = 0; - virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, OUT_STRING_COUNT(cchURLSize) char *pchURLOrVideoID, uint32 cchURLSize, OUT_STRING_COUNT(cchURLSize) char *pchOriginalFileName, uint32 cchOriginalFileNameSize, EItemPreviewType *pPreviewType ) = 0; + virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURLOrVideoID, uint32 cchURLSize, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchOriginalFileName, uint32 cchOriginalFileNameSize, EItemPreviewType *pPreviewType ) = 0; virtual uint32 GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint32 index ) = 0; - virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, OUT_STRING_COUNT(cchKeySize) char *pchKey, uint32 cchKeySize, OUT_STRING_COUNT(cchValueSize) char *pchValue, uint32 cchValueSize ) = 0; + virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, STEAM_OUT_STRING_COUNT(cchKeySize) char *pchKey, uint32 cchKeySize, STEAM_OUT_STRING_COUNT(cchValueSize) char *pchValue, uint32 cchValueSize ) = 0; // Release the request to free up memory, after retrieving results virtual bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) = 0; @@ -253,7 +257,7 @@ public: virtual SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID, uint32 unMaxAgeSeconds ) = 0; // Steam Workshop Creator API - CALL_RESULT( CreateItemResult_t ) + STEAM_CALL_RESULT( CreateItemResult_t ) virtual SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType ) = 0; // create new item for this app with no content attached yet virtual UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID ) = 0; // start an UGC item update. Set changed properties before commiting update with CommitItemUpdate() @@ -266,6 +270,7 @@ public: virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size + virtual bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, bool bAllowLegacyUpload ) = 0; // use legacy upload for a single small file. The parameter to SetItemContent() should either be a directory with one file or the full path to the file. The file must also be less than 10MB in size. virtual bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, const char *pchKey ) = 0; // remove any existing key-value tags with the specified key virtual bool AddItemKeyValueTag( UGCUpdateHandle_t handle, const char *pchKey, const char *pchValue ) = 0; // add new key-value tags for the item. Note that there can be multiple values for a tag. virtual bool AddItemPreviewFile( UGCUpdateHandle_t handle, const char *pszPreviewFile, EItemPreviewType type ) = 0; // add preview file for this item. pszPreviewFile points to local file, which must be under 1MB in size @@ -274,22 +279,22 @@ public: virtual bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint32 index, const char *pszVideoID ) = 0; // updates an existing preview video for this item virtual bool RemoveItemPreview( UGCUpdateHandle_t handle, uint32 index ) = 0; // remove a preview by index starting at 0 (previews are sorted) - CALL_RESULT( SubmitItemUpdateResult_t ) + STEAM_CALL_RESULT( SubmitItemUpdateResult_t ) virtual SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) = 0; // commit update process started with StartItemUpdate() virtual EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal ) = 0; // Steam Workshop Consumer API - CALL_RESULT( SetUserItemVoteResult_t ) + STEAM_CALL_RESULT( SetUserItemVoteResult_t ) virtual SteamAPICall_t SetUserItemVote( PublishedFileId_t nPublishedFileID, bool bVoteUp ) = 0; - CALL_RESULT( GetUserItemVoteResult_t ) + STEAM_CALL_RESULT( GetUserItemVoteResult_t ) virtual SteamAPICall_t GetUserItemVote( PublishedFileId_t nPublishedFileID ) = 0; - CALL_RESULT( UserFavoriteItemsListChanged_t ) + STEAM_CALL_RESULT( UserFavoriteItemsListChanged_t ) virtual SteamAPICall_t AddItemToFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; - CALL_RESULT( UserFavoriteItemsListChanged_t ) + STEAM_CALL_RESULT( UserFavoriteItemsListChanged_t ) virtual SteamAPICall_t RemoveItemFromFavorites( AppId_t nAppId, PublishedFileId_t nPublishedFileID ) = 0; - CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t ) + STEAM_CALL_RESULT( RemoteStorageSubscribePublishedFileResult_t ) virtual SteamAPICall_t SubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // subscribe to this item, will be installed ASAP - CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t ) + STEAM_CALL_RESULT( RemoteStorageUnsubscribePublishedFileResult_t ) virtual SteamAPICall_t UnsubscribeItem( PublishedFileId_t nPublishedFileID ) = 0; // unsubscribe from this item, will be uninstalled after game quits virtual uint32 GetNumSubscribedItems() = 0; // number of subscribed items virtual uint32 GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; // all subscribed item PublishFileIDs @@ -299,7 +304,7 @@ public: // get info about currently installed content on disc for items that have k_EItemStateInstalled set // if k_EItemStateLegacyItem is set, pchFolder contains the path to the legacy file itself (not a folder) - virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, OUT_STRING_COUNT( cchFolderSize ) char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0; + virtual bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID, uint64 *punSizeOnDisk, STEAM_OUT_STRING_COUNT( cchFolderSize ) char *pchFolder, uint32 cchFolderSize, uint32 *punTimeStamp ) = 0; // get info about pending update for items that have k_EItemStateNeedsUpdate set. punBytesTotal will be valid after download started once virtual bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0; @@ -317,35 +322,43 @@ public: virtual void SuspendDownloads( bool bSuspend ) = 0; // usage tracking - CALL_RESULT( StartPlaytimeTrackingResult_t ) + STEAM_CALL_RESULT( StartPlaytimeTrackingResult_t ) virtual SteamAPICall_t StartPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; - CALL_RESULT( StopPlaytimeTrackingResult_t ) + STEAM_CALL_RESULT( StopPlaytimeTrackingResult_t ) virtual SteamAPICall_t StopPlaytimeTracking( PublishedFileId_t *pvecPublishedFileID, uint32 unNumPublishedFileIDs ) = 0; - CALL_RESULT( StopPlaytimeTrackingResult_t ) + STEAM_CALL_RESULT( StopPlaytimeTrackingResult_t ) virtual SteamAPICall_t StopPlaytimeTrackingForAllItems() = 0; // parent-child relationship or dependency management - CALL_RESULT( AddUGCDependencyResult_t ) + STEAM_CALL_RESULT( AddUGCDependencyResult_t ) virtual SteamAPICall_t AddDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0; - CALL_RESULT( RemoveUGCDependencyResult_t ) + STEAM_CALL_RESULT( RemoveUGCDependencyResult_t ) virtual SteamAPICall_t RemoveDependency( PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID ) = 0; // add/remove app dependence/requirements (usually DLC) - CALL_RESULT( AddAppDependencyResult_t ) + STEAM_CALL_RESULT( AddAppDependencyResult_t ) virtual SteamAPICall_t AddAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0; - CALL_RESULT( RemoveAppDependencyResult_t ) + STEAM_CALL_RESULT( RemoveAppDependencyResult_t ) virtual SteamAPICall_t RemoveAppDependency( PublishedFileId_t nPublishedFileID, AppId_t nAppID ) = 0; // request app dependencies. note that whatever callback you register for GetAppDependenciesResult_t may be called multiple times // until all app dependencies have been returned - CALL_RESULT( GetAppDependenciesResult_t ) + STEAM_CALL_RESULT( GetAppDependenciesResult_t ) virtual SteamAPICall_t GetAppDependencies( PublishedFileId_t nPublishedFileID ) = 0; // delete the item without prompting the user - CALL_RESULT( DeleteItemResult_t ) + STEAM_CALL_RESULT( DeleteItemResult_t ) virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0; }; -#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION010" +#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION012" + +// Global interface accessor +inline ISteamUGC *SteamUGC(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamUGC *, SteamUGC, STEAMUGC_INTERFACE_VERSION ); + +// Global accessor for the gameserver client +inline ISteamUGC *SteamGameServerUGC(); +STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamUGC *, SteamGameServerUGC, STEAMUGC_INTERFACE_VERSION ); //----------------------------------------------------------------------------- // Purpose: Callback for querying UGC @@ -358,6 +371,7 @@ struct SteamUGCQueryCompleted_t uint32 m_unNumResultsReturned; uint32 m_unTotalMatchingResults; bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache + char m_rgchNextCursor[k_cchPublishedFileURLMax]; // If a paging cursor was used, then this will be the next cursor to get the next result set. }; diff --git a/public/steam/isteamuser.h b/public/steam/isteamuser.h index 0ea2bb8..7ed0fac 100644 --- a/public/steam/isteamuser.h +++ b/public/steam/isteamuser.h @@ -10,7 +10,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" // structure that contains client callback data // see callbacks documentation for more details @@ -19,7 +19,7 @@ #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif struct CallbackMsg_t { @@ -165,7 +165,7 @@ public: // Requests a ticket encrypted with an app specific shared key // pDataToInclude, cbDataToInclude will be encrypted into the ticket // ( This is asynchronous, you must wait for the ticket to be completed by the server ) - CALL_RESULT( EncryptedAppTicketResponse_t ) + STEAM_CALL_RESULT( EncryptedAppTicketResponse_t ) virtual SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToInclude ) = 0; // retrieve a finished ticket @@ -189,7 +189,7 @@ public: // or else immediately navigate to the result URL using a hidden browser window. // NOTE 2: The resulting authorization cookie has an expiration time of one day, // so it would be a good idea to request and visit a new auth URL every 12 hours. - CALL_RESULT( StoreAuthURLResponse_t ) + STEAM_CALL_RESULT( StoreAuthURLResponse_t ) virtual SteamAPICall_t RequestStoreAuthURL( const char *pchRedirectURL ) = 0; // gets whether the users phone number is verified @@ -204,10 +204,15 @@ public: // gets whether the users phone number is awaiting (re)verification virtual bool BIsPhoneRequiringVerification() = 0; + STEAM_CALL_RESULT( MarketEligibilityResponse_t ) + virtual SteamAPICall_t GetMarketEligibility() = 0; }; -#define STEAMUSER_INTERFACE_VERSION "SteamUser019" +#define STEAMUSER_INTERFACE_VERSION "SteamUser020" +// Global interface accessor +inline ISteamUser *SteamUser(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamUser *, SteamUser, STEAMUSER_INTERFACE_VERSION ); // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) @@ -215,7 +220,7 @@ public: #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif //----------------------------------------------------------------------------- @@ -363,6 +368,21 @@ struct StoreAuthURLResponse_t }; +//----------------------------------------------------------------------------- +// Purpose: sent in response to ISteamUser::GetMarketEligibility +//----------------------------------------------------------------------------- +struct MarketEligibilityResponse_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 66 }; + bool m_bAllowed; + EMarketNotAllowedReasonFlags m_eNotAllowedReason; + RTime32 m_rtAllowedAtTime; + + int m_cdaySteamGuardRequiredDays; // The number of days any user is required to have had Steam Guard before they can use the market + int m_cdayNewDeviceCooldown; // The number of days after initial device authorization a user must wait before using the market on that device +}; + + #pragma pack( pop ) diff --git a/public/steam/isteamuserstats.h b/public/steam/isteamuserstats.h index 29ae38b..d8daa04 100644 --- a/public/steam/isteamuserstats.h +++ b/public/steam/isteamuserstats.h @@ -10,7 +10,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" #include "isteamremotestorage.h" // size limit on stat or achievement name (UTF-8 encoded) @@ -67,7 +67,7 @@ enum ELeaderboardUploadScoreMethod #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif struct LeaderboardEntry_t @@ -89,7 +89,7 @@ class ISteamUserStats { public: // Ask the server to send down this user's data and achievements for this game - CALL_BACK( UserStatsReceived_t ) + STEAM_CALL_BACK( UserStatsReceived_t ) virtual bool RequestCurrentStats() = 0; // Data accessors @@ -149,7 +149,7 @@ public: // returns a UserStatsReceived_t received when completed // if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail // these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data - CALL_RESULT( UserStatsReceived_t ) + STEAM_CALL_RESULT( UserStatsReceived_t ) virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0; // requests stat information for a user, usable after a successful call to RequestUserStats() @@ -166,12 +166,12 @@ public: // asks the Steam back-end for a leaderboard by name, and will create it if it's not yet // This call is asynchronous, with the result returned in LeaderboardFindResult_t - CALL_RESULT(LeaderboardFindResult_t) + STEAM_CALL_RESULT(LeaderboardFindResult_t) virtual SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) = 0; // as above, but won't create the leaderboard if it's not found // This call is asynchronous, with the result returned in LeaderboardFindResult_t - CALL_RESULT( LeaderboardFindResult_t ) + STEAM_CALL_RESULT( LeaderboardFindResult_t ) virtual SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) = 0; // returns the name of a leaderboard @@ -194,15 +194,15 @@ public: // k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate // e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after // k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user - CALL_RESULT( LeaderboardScoresDownloaded_t ) + STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t ) virtual SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) = 0; // as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers // if a user doesn't have a leaderboard entry, they won't be included in the result // a max of 100 users can be downloaded at a time, with only one outstanding call at a time - METHOD_DESC(Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers) - CALL_RESULT( LeaderboardScoresDownloaded_t ) + STEAM_METHOD_DESC(Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers) + STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t ) virtual SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, - ARRAY_COUNT_D(cUsers, Array of users to retrieve) CSteamID *prgUsers, int cUsers ) = 0; + STEAM_ARRAY_COUNT_D(cUsers, Array of users to retrieve) CSteamID *prgUsers, int cUsers ) = 0; // Returns data about a single leaderboard entry // use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries @@ -224,24 +224,24 @@ public: // This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t // Details are extra game-defined information regarding how the user got that score // pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list - CALL_RESULT( LeaderboardScoreUploaded_t ) + STEAM_CALL_RESULT( LeaderboardScoreUploaded_t ) virtual SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32 *pScoreDetails, int cScoreDetailsCount ) = 0; // Attaches a piece of user generated content the user's entry on a leaderboard. // hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare(). // This call is asynchronous, with the result returned in LeaderboardUGCSet_t. - CALL_RESULT( LeaderboardUGCSet_t ) + STEAM_CALL_RESULT( LeaderboardUGCSet_t ) virtual SteamAPICall_t AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) = 0; // Retrieves the number of players currently playing your game (online + offline) // This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t - CALL_RESULT( NumberOfCurrentPlayers_t ) + STEAM_CALL_RESULT( NumberOfCurrentPlayers_t ) virtual SteamAPICall_t GetNumberOfCurrentPlayers() = 0; // Requests that Steam fetch data on the percentage of players who have received each achievement // for the game globally. // This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t. - CALL_RESULT( GlobalAchievementPercentagesReady_t ) + STEAM_CALL_RESULT( GlobalAchievementPercentagesReady_t ) virtual SteamAPICall_t RequestGlobalAchievementPercentages() = 0; // Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch @@ -261,7 +261,7 @@ public: // This call is asynchronous, with the results returned in GlobalStatsReceived_t. // nHistoryDays specifies how many days of day-by-day history to retrieve in addition // to the overall totals. The limit is 60. - CALL_RESULT( GlobalStatsReceived_t ) + STEAM_CALL_RESULT( GlobalStatsReceived_t ) virtual SteamAPICall_t RequestGlobalStats( int nHistoryDays ) = 0; // Gets the lifetime totals for an aggregated stat @@ -272,8 +272,8 @@ public: // So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago, // etc. cubData is the size in bytes of the pubData buffer. Returns the number of // elements actually set. - virtual int32 GetGlobalStatHistory( const char *pchStatName, ARRAY_COUNT(cubData) int64 *pData, uint32 cubData ) = 0; - virtual int32 GetGlobalStatHistory( const char *pchStatName, ARRAY_COUNT(cubData) double *pData, uint32 cubData ) = 0; + virtual int32 GetGlobalStatHistory( const char *pchStatName, STEAM_ARRAY_COUNT(cubData) int64 *pData, uint32 cubData ) = 0; + virtual int32 GetGlobalStatHistory( const char *pchStatName, STEAM_ARRAY_COUNT(cubData) double *pData, uint32 cubData ) = 0; #ifdef _PS3 // Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t @@ -298,13 +298,17 @@ public: #define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION011" +// Global interface accessor +inline ISteamUserStats *SteamUserStats(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamUserStats *, SteamUserStats, STEAMUSERSTATS_INTERFACE_VERSION ); + // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) #pragma pack( push, 4 ) #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif //----------------------------------------------------------------------------- diff --git a/public/steam/isteamutils.h b/public/steam/isteamutils.h index e331fa6..809682b 100644 --- a/public/steam/isteamutils.h +++ b/public/steam/isteamutils.h @@ -10,7 +10,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" // Steam API call failure results @@ -133,7 +133,7 @@ public: // 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. - CALL_RESULT( CheckFileSignature_t ) + STEAM_CALL_RESULT( CheckFileSignature_t ) virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0; // Activates the Big Picture text input dialog which only supports gamepad input @@ -173,6 +173,13 @@ public: #define STEAMUTILS_INTERFACE_VERSION "SteamUtils009" +// Global interface accessor +inline ISteamUtils *SteamUtils(); +STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamUtils *, SteamUtils, SteamInternal_FindOrCreateUserInterface( 0, STEAMUTILS_INTERFACE_VERSION ) ); + +// Global accessor for the gameserver client +inline ISteamUtils *SteamGameServerUtils(); +STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamUtils *, SteamGameServerUtils, SteamInternal_FindOrCreateGameServerInterface( 0, STEAMUTILS_INTERFACE_VERSION ) ); // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) @@ -180,7 +187,7 @@ public: #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif //----------------------------------------------------------------------------- diff --git a/public/steam/isteamvideo.h b/public/steam/isteamvideo.h index 32eeb59..efd7740 100644 --- a/public/steam/isteamvideo.h +++ b/public/steam/isteamvideo.h @@ -10,7 +10,7 @@ #pragma once #endif -#include "isteamclient.h" +#include "steam_api_common.h" // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) @@ -18,7 +18,7 @@ #elif defined( VALVE_CALLBACK_PACK_LARGE ) #pragma pack( push, 8 ) #else -#error isteamclient.h must be included +#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx #endif @@ -38,31 +38,35 @@ public: virtual bool IsBroadcasting( int *pnNumViewers ) = 0; // Get the OPF Details for 360 Video Playback - CALL_BACK( GetOPFSettingsResult_t ) + STEAM_CALL_BACK( GetOPFSettingsResult_t ) virtual void GetOPFSettings( AppId_t unVideoAppID ) = 0; virtual bool GetOPFStringForApp( AppId_t unVideoAppID, char *pchBuffer, int32 *pnBufferSize ) = 0; }; #define STEAMVIDEO_INTERFACE_VERSION "STEAMVIDEO_INTERFACE_V002" -DEFINE_CALLBACK( BroadcastUploadStart_t, k_iClientVideoCallbacks + 4 ) -END_DEFINE_CALLBACK_0() +// Global interface accessor +inline ISteamVideo *SteamVideo(); +STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamVideo *, SteamVideo, STEAMVIDEO_INTERFACE_VERSION ); -DEFINE_CALLBACK( BroadcastUploadStop_t, k_iClientVideoCallbacks + 5 ) - CALLBACK_MEMBER( 0, EBroadcastUploadResult, m_eResult ) -END_DEFINE_CALLBACK_1() +STEAM_CALLBACK_BEGIN( BroadcastUploadStart_t, k_iClientVideoCallbacks + 4 ) +STEAM_CALLBACK_END(0) -DEFINE_CALLBACK( GetVideoURLResult_t, k_iClientVideoCallbacks + 11 ) - CALLBACK_MEMBER( 0, EResult, m_eResult ) - CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID ) - CALLBACK_MEMBER( 2, char, m_rgchURL[256] ) -END_DEFINE_CALLBACK_3() +STEAM_CALLBACK_BEGIN( BroadcastUploadStop_t, k_iClientVideoCallbacks + 5 ) + STEAM_CALLBACK_MEMBER( 0, EBroadcastUploadResult, m_eResult ) +STEAM_CALLBACK_END(1) + +STEAM_CALLBACK_BEGIN( GetVideoURLResult_t, k_iClientVideoCallbacks + 11 ) + STEAM_CALLBACK_MEMBER( 0, EResult, m_eResult ) + STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID ) + STEAM_CALLBACK_MEMBER( 2, char, m_rgchURL[256] ) +STEAM_CALLBACK_END(3) -DEFINE_CALLBACK( GetOPFSettingsResult_t, k_iClientVideoCallbacks + 24 ) - CALLBACK_MEMBER( 0, EResult, m_eResult ) - CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID ) -END_DEFINE_CALLBACK_2() +STEAM_CALLBACK_BEGIN( GetOPFSettingsResult_t, k_iClientVideoCallbacks + 24 ) + STEAM_CALLBACK_MEMBER( 0, EResult, m_eResult ) + STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID ) +STEAM_CALLBACK_END(2) #pragma pack( pop ) diff --git a/public/steam/lib/linux32/libsdkencryptedappticket.so b/public/steam/lib/linux32/libsdkencryptedappticket.so index 774fcfc..dfa3bba 100644 Binary files a/public/steam/lib/linux32/libsdkencryptedappticket.so and b/public/steam/lib/linux32/libsdkencryptedappticket.so differ diff --git a/public/steam/lib/linux64/libsdkencryptedappticket.so b/public/steam/lib/linux64/libsdkencryptedappticket.so index a21eeed..96cdd1c 100644 Binary files a/public/steam/lib/linux64/libsdkencryptedappticket.so and b/public/steam/lib/linux64/libsdkencryptedappticket.so differ diff --git a/public/steam/lib/win32/sdkencryptedappticket.dll b/public/steam/lib/win32/sdkencryptedappticket.dll index f52b28c..40b2f67 100644 Binary files a/public/steam/lib/win32/sdkencryptedappticket.dll and b/public/steam/lib/win32/sdkencryptedappticket.dll differ diff --git a/public/steam/lib/win32/sdkencryptedappticket.lib b/public/steam/lib/win32/sdkencryptedappticket.lib index 4021b7f..b6360d4 100644 Binary files a/public/steam/lib/win32/sdkencryptedappticket.lib and b/public/steam/lib/win32/sdkencryptedappticket.lib differ diff --git a/public/steam/lib/win64/sdkencryptedappticket64.dll b/public/steam/lib/win64/sdkencryptedappticket64.dll index 404b56b..4854c25 100644 Binary files a/public/steam/lib/win64/sdkencryptedappticket64.dll and b/public/steam/lib/win64/sdkencryptedappticket64.dll differ diff --git a/public/steam/lib/win64/sdkencryptedappticket64.lib b/public/steam/lib/win64/sdkencryptedappticket64.lib index b593f03..5c3b34c 100644 Binary files a/public/steam/lib/win64/sdkencryptedappticket64.lib and b/public/steam/lib/win64/sdkencryptedappticket64.lib differ diff --git a/public/steam/steam_api.h b/public/steam/steam_api.h index 010a548..cb7e5dc 100644 --- a/public/steam/steam_api.h +++ b/public/steam/steam_api.h @@ -1,6 +1,13 @@ -//====== Copyright 1996-2008, Valve Corporation, All rights reserved. ======= +//====== Copyright Valve Corporation, All rights reserved. ==================== // -// Purpose: +// This header includes *all* of the interfaces and callback structures +// in the Steamworks SDK, and some high level functions to control the SDK +// (init, shutdown, etc) that you probably only need in one or two files. +// +// To save your compile times, we recommend that you not include this file +// in header files. Instead, include the specific headers for the interfaces +// and callback structures you need. The one file you might consider including +// in your precompiled header (e.g. stdafx.h) is steam_api_common.h // //============================================================================= @@ -10,6 +17,10 @@ #pragma once #endif +// Basic stuff +#include "steam_api_common.h" + +// All of the interfaces #include "isteamclient.h" #include "isteamuser.h" #include "isteamfriends.h" @@ -30,31 +41,9 @@ #include "isteaminventory.h" #include "isteamvideo.h" #include "isteamparentalsettings.h" +#include "isteaminput.h" -// Steam API export macro -#if defined( _WIN32 ) && !defined( _X360 ) - #if defined( STEAM_API_EXPORTS ) - #define S_API extern "C" __declspec( dllexport ) - #elif defined( STEAM_API_NODLL ) - #define S_API extern "C" - #else - #define S_API extern "C" __declspec( dllimport ) - #endif // STEAM_API_EXPORTS -#elif defined( GNUC ) - #if defined( STEAM_API_EXPORTS ) - #define S_API extern "C" __attribute__ ((visibility("default"))) - #else - #define S_API extern "C" - #endif // STEAM_API_EXPORTS -#else // !WIN32 - #if defined( STEAM_API_EXPORTS ) - #define S_API extern "C" - #else - #define S_API extern "C" - #endif // STEAM_API_EXPORTS -#endif - //----------------------------------------------------------------------------------------------------------------------------------------------------------// // Steam API setup & shutdown // @@ -93,263 +82,6 @@ S_API void S_CALLTYPE SteamAPI_ReleaseCurrentThreadMemory(); S_API void S_CALLTYPE SteamAPI_WriteMiniDump( uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID ); S_API void S_CALLTYPE SteamAPI_SetMiniDumpComment( const char *pchMsg ); - -//----------------------------------------------------------------------------------------------------------------------------------------------------------// -// Global accessors for Steamworks C++ APIs. See individual isteam*.h files for details. -// You should not cache the results of these accessors or pass the result pointers across -// modules! Different modules may be compiled against different SDK header versions, and -// the interface pointers could therefore be different across modules. Every line of code -// which calls into a Steamworks API should retrieve the interface from a global accessor. -//----------------------------------------------------------------------------------------------------------------------------------------------------------// -#if !defined( STEAM_API_EXPORTS ) -inline ISteamClient *SteamClient(); -inline ISteamUser *SteamUser(); -inline ISteamFriends *SteamFriends(); -inline ISteamUtils *SteamUtils(); -inline ISteamMatchmaking *SteamMatchmaking(); -inline ISteamUserStats *SteamUserStats(); -inline ISteamApps *SteamApps(); -inline ISteamNetworking *SteamNetworking(); -inline ISteamMatchmakingServers *SteamMatchmakingServers(); -inline ISteamRemoteStorage *SteamRemoteStorage(); -inline ISteamScreenshots *SteamScreenshots(); -inline ISteamHTTP *SteamHTTP(); -inline ISteamController *SteamController(); -inline ISteamUGC *SteamUGC(); -inline ISteamAppList *SteamAppList(); -inline ISteamMusic *SteamMusic(); -inline ISteamMusicRemote *SteamMusicRemote(); -inline ISteamHTMLSurface *SteamHTMLSurface(); -inline ISteamInventory *SteamInventory(); -inline ISteamVideo *SteamVideo(); -inline ISteamParentalSettings *SteamParentalSettings(); -#endif // VERSION_SAFE_STEAM_API_INTERFACES - - -// CSteamAPIContext encapsulates the Steamworks API global accessors into -// a single object. This is DEPRECATED and only remains for compatibility. -class CSteamAPIContext -{ -public: - // DEPRECATED - there is no benefit to using this over the global accessors - CSteamAPIContext() { Clear(); } - void Clear(); - bool Init(); - ISteamClient* SteamClient() const { return m_pSteamClient; } - ISteamUser* SteamUser() const { return m_pSteamUser; } - ISteamFriends* SteamFriends() const { return m_pSteamFriends; } - ISteamUtils* SteamUtils() const { return m_pSteamUtils; } - ISteamMatchmaking* SteamMatchmaking() const { return m_pSteamMatchmaking; } - ISteamUserStats* SteamUserStats() const { return m_pSteamUserStats; } - ISteamApps* SteamApps() const { return m_pSteamApps; } - ISteamMatchmakingServers* SteamMatchmakingServers() const { return m_pSteamMatchmakingServers; } - ISteamNetworking* SteamNetworking() const { return m_pSteamNetworking; } - ISteamRemoteStorage* SteamRemoteStorage() const { return m_pSteamRemoteStorage; } - ISteamScreenshots* SteamScreenshots() const { return m_pSteamScreenshots; } - ISteamHTTP* SteamHTTP() const { return m_pSteamHTTP; } - ISteamController* SteamController() const { return m_pController; } - ISteamUGC* SteamUGC() const { return m_pSteamUGC; } - ISteamAppList* SteamAppList() const { return m_pSteamAppList; } - ISteamMusic* SteamMusic() const { return m_pSteamMusic; } - ISteamMusicRemote* SteamMusicRemote() const { return m_pSteamMusicRemote; } - ISteamHTMLSurface* SteamHTMLSurface() const { return m_pSteamHTMLSurface; } - ISteamInventory* SteamInventory() const { return m_pSteamInventory; } - ISteamVideo* SteamVideo() const { return m_pSteamVideo; } - ISteamParentalSettings* SteamParentalSettings() const { return m_pSteamParentalSettings; } - // DEPRECATED - there is no benefit to using this over the global accessors -private: - ISteamClient *m_pSteamClient; - ISteamUser *m_pSteamUser; - ISteamFriends *m_pSteamFriends; - ISteamUtils *m_pSteamUtils; - ISteamMatchmaking *m_pSteamMatchmaking; - ISteamUserStats *m_pSteamUserStats; - ISteamApps *m_pSteamApps; - ISteamMatchmakingServers *m_pSteamMatchmakingServers; - ISteamNetworking *m_pSteamNetworking; - ISteamRemoteStorage *m_pSteamRemoteStorage; - ISteamScreenshots *m_pSteamScreenshots; - ISteamHTTP *m_pSteamHTTP; - ISteamController *m_pController; - ISteamUGC *m_pSteamUGC; - ISteamAppList *m_pSteamAppList; - ISteamMusic *m_pSteamMusic; - ISteamMusicRemote *m_pSteamMusicRemote; - ISteamHTMLSurface *m_pSteamHTMLSurface; - ISteamInventory *m_pSteamInventory; - ISteamVideo *m_pSteamVideo; - ISteamParentalSettings *m_pSteamParentalSettings; -}; - - -//----------------------------------------------------------------------------------------------------------------------------------------------------------// -// steam callback and call-result helpers -// -// The following macros and classes are used to register your application for -// callbacks and call-results, which are delivered in a predictable manner. -// -// STEAM_CALLBACK macros are meant for use inside of a C++ class definition. -// They map a Steam notification callback directly to a class member function -// which is automatically prototyped as "void func( callback_type *pParam )". -// -// CCallResult is used with specific Steam APIs that return "result handles". -// The handle can be passed to a CCallResult object's Set function, along with -// an object pointer and member-function pointer. The member function will -// be executed once the results of the Steam API call are available. -// -// CCallback and CCallbackManual classes can be used instead of STEAM_CALLBACK -// macros if you require finer control over registration and unregistration. -// -// Callbacks and call-results are queued automatically and are only -// delivered/executed when your application calls SteamAPI_RunCallbacks(). -//----------------------------------------------------------------------------------------------------------------------------------------------------------// - -// SteamAPI_RunCallbacks is safe to call from multiple threads simultaneously, -// but if you choose to do this, callback code could be executed on any thread. -// One alternative is to call SteamAPI_RunCallbacks from the main thread only, -// and call SteamAPI_ReleaseCurrentThreadMemory regularly on other threads. -S_API void S_CALLTYPE SteamAPI_RunCallbacks(); - - -// Declares a callback member function plus a helper member variable which -// registers the callback on object creation and unregisters on destruction. -// The optional fourth 'var' param exists only for backwards-compatibility -// and can be ignored. -#define STEAM_CALLBACK( thisclass, func, .../*callback_type, [deprecated] var*/ ) \ - _STEAM_CALLBACK_SELECT( ( __VA_ARGS__, 4, 3 ), ( /**/, thisclass, func, __VA_ARGS__ ) ) - -// Declares a callback function and a named CCallbackManual variable which -// has Register and Unregister functions instead of automatic registration. -#define STEAM_CALLBACK_MANUAL( thisclass, func, callback_type, var ) \ - CCallbackManual< thisclass, callback_type > var; void func( callback_type *pParam ) - - -// Internal functions used by the utility CCallback objects to receive callbacks -S_API void S_CALLTYPE SteamAPI_RegisterCallback( class CCallbackBase *pCallback, int iCallback ); -S_API void S_CALLTYPE SteamAPI_UnregisterCallback( class CCallbackBase *pCallback ); -// Internal functions used by the utility CCallResult objects to receive async call results -S_API void S_CALLTYPE SteamAPI_RegisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall ); -S_API void S_CALLTYPE SteamAPI_UnregisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall ); - - -//----------------------------------------------------------------------------- -// Purpose: base for callbacks and call results - internal implementation detail -//----------------------------------------------------------------------------- -class CCallbackBase -{ -public: - CCallbackBase() { m_nCallbackFlags = 0; m_iCallback = 0; } - // don't add a virtual destructor because we export this binary interface across dll's - virtual void Run( void *pvParam ) = 0; - virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall ) = 0; - int GetICallback() { return m_iCallback; } - virtual int GetCallbackSizeBytes() = 0; - -protected: - enum { k_ECallbackFlagsRegistered = 0x01, k_ECallbackFlagsGameServer = 0x02 }; - uint8 m_nCallbackFlags; - int m_iCallback; - friend class CCallbackMgr; - -private: - CCallbackBase( const CCallbackBase& ); - CCallbackBase& operator=( const CCallbackBase& ); -}; - -//----------------------------------------------------------------------------- -// Purpose: templated base for callbacks - internal implementation detail -//----------------------------------------------------------------------------- -template< int sizeof_P > -class CCallbackImpl : protected CCallbackBase -{ -public: - ~CCallbackImpl() { if ( m_nCallbackFlags & k_ECallbackFlagsRegistered ) SteamAPI_UnregisterCallback( this ); } - void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; } - -protected: - virtual void Run( void *pvParam ) = 0; - virtual void Run( void *pvParam, bool /*bIOFailure*/, SteamAPICall_t /*hSteamAPICall*/ ) { Run( pvParam ); } - virtual int GetCallbackSizeBytes() { return sizeof_P; } -}; - - -//----------------------------------------------------------------------------- -// Purpose: maps a steam async call result to a class member function -// template params: T = local class, P = parameter struct -//----------------------------------------------------------------------------- -template< class T, class P > -class CCallResult : private CCallbackBase -{ -public: - typedef void (T::*func_t)( P*, bool ); - - CCallResult(); - ~CCallResult(); - - void Set( SteamAPICall_t hAPICall, T *p, func_t func ); - bool IsActive() const; - void Cancel(); - - void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; } -private: - virtual void Run( void *pvParam ); - virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall ); - virtual int GetCallbackSizeBytes() { return sizeof( P ); } - - SteamAPICall_t m_hAPICall; - T *m_pObj; - func_t m_Func; -}; - - - -//----------------------------------------------------------------------------- -// Purpose: maps a steam callback to a class member function -// template params: T = local class, P = parameter struct, -// bGameserver = listen for gameserver callbacks instead of client callbacks -//----------------------------------------------------------------------------- -template< class T, class P, bool bGameserver = false > -class CCallback : public CCallbackImpl< sizeof( P ) > -{ -public: - typedef void (T::*func_t)(P*); - - // NOTE: If you can't provide the correct parameters at construction time, you should - // use the CCallbackManual callback object (STEAM_CALLBACK_MANUAL macro) instead. - CCallback( T *pObj, func_t func ); - - void Register( T *pObj, func_t func ); - void Unregister(); - -protected: - virtual void Run( void *pvParam ); - - T *m_pObj; - func_t m_Func; -}; - - -//----------------------------------------------------------------------------- -// Purpose: subclass of CCallback which allows default-construction in -// an unregistered state; you must call Register manually -//----------------------------------------------------------------------------- -template< class T, class P, bool bGameServer = false > -class CCallbackManual : public CCallback< T, P, bGameServer > -{ -public: - CCallbackManual() : CCallback< T, P, bGameServer >( NULL, NULL ) {} - - // Inherits public Register and Unregister functions from base class -}; - - - -#ifdef _WIN32 -// disable this warning; this pattern need for steam callback registration -#pragma warning( disable: 4355 ) // 'this' : used in base member initializer list -#endif - - //----------------------------------------------------------------------------------------------------------------------------------------------------------// // steamclient.dll private wrapper functions // @@ -373,9 +105,6 @@ S_API HSteamUser Steam_GetHSteamUserCurrent(); // DEPRECATED - implementation is Windows only, and the path returned is a UTF-8 string which must be converted to UTF-16 for use with Win32 APIs S_API const char *SteamAPI_GetSteamInstallPath(); -// returns the pipe we are communicating to Steam with -S_API HSteamPipe SteamAPI_GetHSteamPipe(); - // sets whether or not Steam_RunCallbacks() should do a try {} catch (...) {} around calls to issuing callbacks S_API void SteamAPI_SetTryCatchCallbacks( bool bTryCatchCallbacks ); @@ -389,6 +118,126 @@ S_API HSteamUser GetHSteamUser(); S_API bool S_CALLTYPE SteamAPI_InitSafe(); #endif -#include "steam_api_internal.h" +#if defined(USE_BREAKPAD_HANDLER) || defined(STEAM_API_EXPORTS) +// this should be called before the game initialized the steam APIs +// pchDate should be of the format "Mmm dd yyyy" (such as from the __ DATE __ macro ) +// pchTime should be of the format "hh:mm:ss" (such as from the __ TIME __ macro ) +// bFullMemoryDumps (Win32 only) -- writes out a uuid-full.dmp in the client/dumps folder +// pvContext-- can be NULL, will be the void * context passed into m_pfnPreMinidumpCallback +// PFNPreMinidumpCallback m_pfnPreMinidumpCallback -- optional callback which occurs just before a .dmp file is written during a crash. Applications can hook this to allow adding additional information into the .dmp comment stream. +S_API void S_CALLTYPE SteamAPI_UseBreakpadCrashHandler( char const *pchVersion, char const *pchDate, char const *pchTime, bool bFullMemoryDumps, void *pvContext, PFNPreMinidumpCallback m_pfnPreMinidumpCallback ); +S_API void S_CALLTYPE SteamAPI_SetBreakpadAppID( uint32 unAppID ); +#endif + + +//----------------------------------------------------------------------------------------------------------------------------------------------------------// +// +// CSteamAPIContext +// +//----------------------------------------------------------------------------------------------------------------------------------------------------------// + +#ifndef STEAM_API_EXPORTS + +// Deprecated! Use the global accessors directly +inline bool CSteamAPIContext::Init() +{ + m_pSteamClient = ::SteamClient(); + if ( !m_pSteamClient ) + return false; + + m_pSteamUser = ::SteamUser(); + if ( !m_pSteamUser ) + return false; + + m_pSteamFriends = ::SteamFriends(); + if ( !m_pSteamFriends ) + return false; + + m_pSteamUtils = ::SteamUtils(); + if ( !m_pSteamUtils ) + return false; + + m_pSteamMatchmaking = ::SteamMatchmaking(); + if ( !m_pSteamMatchmaking ) + return false; + + m_pSteamGameSearch = ::SteamGameSearch(); + if ( !m_pSteamGameSearch ) + return false; + + m_pSteamMatchmakingServers = ::SteamMatchmakingServers(); + if ( !m_pSteamMatchmakingServers ) + return false; + + m_pSteamUserStats = ::SteamUserStats(); + if ( !m_pSteamUserStats ) + return false; + + m_pSteamApps = ::SteamApps(); + if ( !m_pSteamApps ) + return false; + + m_pSteamNetworking = ::SteamNetworking(); + if ( !m_pSteamNetworking ) + return false; + + m_pSteamRemoteStorage = ::SteamRemoteStorage(); + if ( !m_pSteamRemoteStorage ) + return false; + + m_pSteamScreenshots = ::SteamScreenshots(); + if ( !m_pSteamScreenshots ) + return false; + + m_pSteamHTTP = ::SteamHTTP(); + if ( !m_pSteamHTTP ) + return false; + + m_pController = ::SteamController(); + if ( !m_pController ) + return false; + + m_pSteamUGC = ::SteamUGC(); + if ( !m_pSteamUGC ) + return false; + + m_pSteamAppList = ::SteamAppList(); + if ( !m_pSteamAppList ) + return false; + + m_pSteamMusic = ::SteamMusic(); + if ( !m_pSteamMusic ) + return false; + + m_pSteamMusicRemote = ::SteamMusicRemote(); + if ( !m_pSteamMusicRemote ) + return false; + +#ifndef ANDROID // Not yet supported on Android + m_pSteamHTMLSurface = ::SteamHTMLSurface(); + if ( !m_pSteamHTMLSurface ) + return false; +#endif + + m_pSteamInventory = ::SteamInventory(); + if ( !m_pSteamInventory ) + return false; + + m_pSteamVideo = ::SteamVideo(); + if ( !m_pSteamVideo ) + return false; + + m_pSteamParentalSettings = ::SteamParentalSettings(); + if ( !m_pSteamParentalSettings ) + return false; + + m_pSteamInput = ::SteamInput(); + if ( !m_pSteamInput ) + return false; + + return true; +} + +#endif #endif // STEAM_API_H diff --git a/public/steam/steam_api.json b/public/steam/steam_api.json index 02bc811..43de069 100644 --- a/public/steam/steam_api.json +++ b/public/steam/steam_api.json @@ -28,6 +28,7 @@ ,{"typedef": "PartnerId_t","type": "uint32"} ,{"typedef": "ManifestId_t","type": "uint64"} ,{"typedef": "SiteId_t","type": "uint64"} +,{"typedef": "PartyBeaconID_t","type": "uint64"} ,{"typedef": "HAuthTicket","type": "uint32"} ,{"typedef": "PFNLegacyKeyRegistration","type": "void (*)(const char *, const char *)"} ,{"typedef": "PFNLegacyKeyInstalled","type": "_Bool (*)(void)"} @@ -39,6 +40,8 @@ ,{"typedef": "HSteamUser","type": "int32"} ,{"typedef": "SteamAPIWarningMessageHook_t","type": "void (*)(int, const char *) __attribute__((cdecl))"} ,{"typedef": "SteamAPI_CheckCallbackRegistered_t","type": "uint32 (*)(int)"} +,{"typedef": "CCallResult::func_t","type": "void (T::*)(P *, _Bool)"} +,{"typedef": "CCallback::func_t","type": "void (T::*)(P *)"} ,{"typedef": "FriendsGroupID_t","type": "int16"} ,{"typedef": "SteamAPIWarningMessageHook_t","type": "void (*)(int, const char *) __attribute__((cdecl))"} ,{"typedef": "HServerListRequest","type": "void *"} @@ -53,66 +56,23 @@ ,{"typedef": "SNetSocket_t","type": "uint32"} ,{"typedef": "SNetListenSocket_t","type": "uint32"} ,{"typedef": "ScreenshotHandle","type": "uint32"} -,{"typedef": "PlaybackStatusHasChanged_t::SteamCallback_t","type": "struct PlaybackStatusHasChanged_t"} -,{"typedef": "VolumeHasChanged_t::SteamCallback_t","type": "struct VolumeHasChanged_t"} -,{"typedef": "MusicPlayerRemoteWillActivate_t::SteamCallback_t","type": "struct MusicPlayerRemoteWillActivate_t"} -,{"typedef": "MusicPlayerRemoteWillDeactivate_t::SteamCallback_t","type": "struct MusicPlayerRemoteWillDeactivate_t"} -,{"typedef": "MusicPlayerRemoteToFront_t::SteamCallback_t","type": "struct MusicPlayerRemoteToFront_t"} -,{"typedef": "MusicPlayerWillQuit_t::SteamCallback_t","type": "struct MusicPlayerWillQuit_t"} -,{"typedef": "MusicPlayerWantsPlay_t::SteamCallback_t","type": "struct MusicPlayerWantsPlay_t"} -,{"typedef": "MusicPlayerWantsPause_t::SteamCallback_t","type": "struct MusicPlayerWantsPause_t"} -,{"typedef": "MusicPlayerWantsPlayPrevious_t::SteamCallback_t","type": "struct MusicPlayerWantsPlayPrevious_t"} -,{"typedef": "MusicPlayerWantsPlayNext_t::SteamCallback_t","type": "struct MusicPlayerWantsPlayNext_t"} -,{"typedef": "MusicPlayerWantsShuffled_t::SteamCallback_t","type": "struct MusicPlayerWantsShuffled_t"} -,{"typedef": "MusicPlayerWantsLooped_t::SteamCallback_t","type": "struct MusicPlayerWantsLooped_t"} -,{"typedef": "MusicPlayerWantsVolume_t::SteamCallback_t","type": "struct MusicPlayerWantsVolume_t"} -,{"typedef": "MusicPlayerSelectsQueueEntry_t::SteamCallback_t","type": "struct MusicPlayerSelectsQueueEntry_t"} -,{"typedef": "MusicPlayerSelectsPlaylistEntry_t::SteamCallback_t","type": "struct MusicPlayerSelectsPlaylistEntry_t"} -,{"typedef": "MusicPlayerWantsPlayingRepeatStatus_t::SteamCallback_t","type": "struct MusicPlayerWantsPlayingRepeatStatus_t"} ,{"typedef": "HTTPRequestHandle","type": "uint32"} ,{"typedef": "HTTPCookieContainerHandle","type": "uint32"} +,{"typedef": "InputHandle_t","type": "uint64"} +,{"typedef": "InputActionSetHandle_t","type": "uint64"} +,{"typedef": "InputDigitalActionHandle_t","type": "uint64"} +,{"typedef": "InputAnalogActionHandle_t","type": "uint64"} ,{"typedef": "ControllerHandle_t","type": "uint64"} ,{"typedef": "ControllerActionSetHandle_t","type": "uint64"} ,{"typedef": "ControllerDigitalActionHandle_t","type": "uint64"} ,{"typedef": "ControllerAnalogActionHandle_t","type": "uint64"} ,{"typedef": "UGCQueryHandle_t","type": "uint64"} ,{"typedef": "UGCUpdateHandle_t","type": "uint64"} -,{"typedef": "SteamAppInstalled_t::SteamCallback_t","type": "struct SteamAppInstalled_t"} -,{"typedef": "SteamAppUninstalled_t::SteamCallback_t","type": "struct SteamAppUninstalled_t"} ,{"typedef": "HHTMLBrowser","type": "uint32"} -,{"typedef": "HTML_BrowserReady_t::SteamCallback_t","type": "struct HTML_BrowserReady_t"} -,{"typedef": "HTML_NeedsPaint_t::SteamCallback_t","type": "struct HTML_NeedsPaint_t"} -,{"typedef": "HTML_StartRequest_t::SteamCallback_t","type": "struct HTML_StartRequest_t"} -,{"typedef": "HTML_CloseBrowser_t::SteamCallback_t","type": "struct HTML_CloseBrowser_t"} -,{"typedef": "HTML_URLChanged_t::SteamCallback_t","type": "struct HTML_URLChanged_t"} -,{"typedef": "HTML_FinishedRequest_t::SteamCallback_t","type": "struct HTML_FinishedRequest_t"} -,{"typedef": "HTML_OpenLinkInNewTab_t::SteamCallback_t","type": "struct HTML_OpenLinkInNewTab_t"} -,{"typedef": "HTML_ChangedTitle_t::SteamCallback_t","type": "struct HTML_ChangedTitle_t"} -,{"typedef": "HTML_SearchResults_t::SteamCallback_t","type": "struct HTML_SearchResults_t"} -,{"typedef": "HTML_CanGoBackAndForward_t::SteamCallback_t","type": "struct HTML_CanGoBackAndForward_t"} -,{"typedef": "HTML_HorizontalScroll_t::SteamCallback_t","type": "struct HTML_HorizontalScroll_t"} -,{"typedef": "HTML_VerticalScroll_t::SteamCallback_t","type": "struct HTML_VerticalScroll_t"} -,{"typedef": "HTML_LinkAtPosition_t::SteamCallback_t","type": "struct HTML_LinkAtPosition_t"} -,{"typedef": "HTML_JSAlert_t::SteamCallback_t","type": "struct HTML_JSAlert_t"} -,{"typedef": "HTML_JSConfirm_t::SteamCallback_t","type": "struct HTML_JSConfirm_t"} -,{"typedef": "HTML_FileOpenDialog_t::SteamCallback_t","type": "struct HTML_FileOpenDialog_t"} -,{"typedef": "HTML_NewWindow_t::SteamCallback_t","type": "struct HTML_NewWindow_t"} -,{"typedef": "HTML_SetCursor_t::SteamCallback_t","type": "struct HTML_SetCursor_t"} -,{"typedef": "HTML_StatusText_t::SteamCallback_t","type": "struct HTML_StatusText_t"} -,{"typedef": "HTML_ShowToolTip_t::SteamCallback_t","type": "struct HTML_ShowToolTip_t"} -,{"typedef": "HTML_UpdateToolTip_t::SteamCallback_t","type": "struct HTML_UpdateToolTip_t"} -,{"typedef": "HTML_HideToolTip_t::SteamCallback_t","type": "struct HTML_HideToolTip_t"} -,{"typedef": "HTML_BrowserRestarted_t::SteamCallback_t","type": "struct HTML_BrowserRestarted_t"} ,{"typedef": "SteamItemInstanceID_t","type": "uint64"} ,{"typedef": "SteamItemDef_t","type": "int32"} ,{"typedef": "SteamInventoryResult_t","type": "int32"} ,{"typedef": "SteamInventoryUpdateHandle_t","type": "uint64"} -,{"typedef": "BroadcastUploadStart_t::SteamCallback_t","type": "struct BroadcastUploadStart_t"} -,{"typedef": "BroadcastUploadStop_t::SteamCallback_t","type": "struct BroadcastUploadStop_t"} -,{"typedef": "GetVideoURLResult_t::SteamCallback_t","type": "struct GetVideoURLResult_t"} -,{"typedef": "GetOPFSettingsResult_t::SteamCallback_t","type": "struct GetOPFSettingsResult_t"} -,{"typedef": "CCallResult::func_t","type": "void (T::*)(P *, _Bool)"} -,{"typedef": "CCallback::func_t","type": "void (T::*)(P *)"} ], "enums":[ {"enumname": "EUniverse","values": [ @@ -235,6 +195,7 @@ ,{"name": "k_EResultWGNetworkSendExceeded","value": "110"} ,{"name": "k_EResultAccountNotFriends","value": "111"} ,{"name": "k_EResultLimitedUserAccount","value": "112"} + ,{"name": "k_EResultCantRemoveItem","value": "113"} ]} , {"enumname": "EVoiceResult","values": [ {"name": "k_EVoiceResultOK","value": "0"} @@ -427,6 +388,16 @@ ,{"name": "k_EBroadcastUploadResultMissingAudio","value": "11"} ,{"name": "k_EBroadcastUploadResultTooFarBehind","value": "12"} ,{"name": "k_EBroadcastUploadResultTranscodeBehind","value": "13"} + ,{"name": "k_EBroadcastUploadResultNotAllowedToPlay","value": "14"} + ,{"name": "k_EBroadcastUploadResultBusy","value": "15"} + ,{"name": "k_EBroadcastUploadResultBanned","value": "16"} + ,{"name": "k_EBroadcastUploadResultAlreadyActive","value": "17"} + ,{"name": "k_EBroadcastUploadResultForcedOff","value": "18"} + ,{"name": "k_EBroadcastUploadResultAudioBehind","value": "19"} + ,{"name": "k_EBroadcastUploadResultShutdown","value": "20"} + ,{"name": "k_EBroadcastUploadResultDisconnect","value": "21"} + ,{"name": "k_EBroadcastUploadResultVideoInitFailed","value": "22"} + ,{"name": "k_EBroadcastUploadResultAudioInitFailed","value": "23"} ]} , {"enumname": "ELaunchOptionType","values": [ {"name": "k_ELaunchOptionType_None","value": "0"} @@ -453,6 +424,7 @@ ,{"name": "k_eEVRHMDType_HTC_Dev","value": "1"} ,{"name": "k_eEVRHMDType_HTC_VivePre","value": "2"} ,{"name": "k_eEVRHMDType_HTC_Vive","value": "3"} + ,{"name": "k_eEVRHMDType_HTC_VivePro","value": "4"} ,{"name": "k_eEVRHMDType_HTC_Unknown","value": "20"} ,{"name": "k_eEVRHMDType_Oculus_DK1","value": "21"} ,{"name": "k_eEVRHMDType_Oculus_DK2","value": "22"} @@ -470,6 +442,29 @@ ,{"name": "k_eEVRHMDType_Samsung_Odyssey","value": "91"} ,{"name": "k_eEVRHMDType_Unannounced_Unknown","value": "100"} ,{"name": "k_eEVRHMDType_Unannounced_WindowsMR","value": "101"} + ,{"name": "k_eEVRHMDType_vridge","value": "110"} + ,{"name": "k_eEVRHMDType_Huawei_Unknown","value": "120"} + ,{"name": "k_eEVRHMDType_Huawei_VR2","value": "121"} + ,{"name": "k_eEVRHMDType_Huawei_Unannounced","value": "129"} +]} +, {"enumname": "EMarketNotAllowedReasonFlags","values": [ + {"name": "k_EMarketNotAllowedReason_None","value": "0"} + ,{"name": "k_EMarketNotAllowedReason_TemporaryFailure","value": "1"} + ,{"name": "k_EMarketNotAllowedReason_AccountDisabled","value": "2"} + ,{"name": "k_EMarketNotAllowedReason_AccountLockedDown","value": "4"} + ,{"name": "k_EMarketNotAllowedReason_AccountLimited","value": "8"} + ,{"name": "k_EMarketNotAllowedReason_TradeBanned","value": "16"} + ,{"name": "k_EMarketNotAllowedReason_AccountNotTrusted","value": "32"} + ,{"name": "k_EMarketNotAllowedReason_SteamGuardNotEnabled","value": "64"} + ,{"name": "k_EMarketNotAllowedReason_SteamGuardOnlyRecentlyEnabled","value": "128"} + ,{"name": "k_EMarketNotAllowedReason_RecentPasswordReset","value": "256"} + ,{"name": "k_EMarketNotAllowedReason_NewPaymentMethod","value": "512"} + ,{"name": "k_EMarketNotAllowedReason_InvalidCookie","value": "1024"} + ,{"name": "k_EMarketNotAllowedReason_UsingNewDevice","value": "2048"} + ,{"name": "k_EMarketNotAllowedReason_RecentSelfRefund","value": "4096"} + ,{"name": "k_EMarketNotAllowedReason_NewPaymentMethodCannotBeVerified","value": "8192"} + ,{"name": "k_EMarketNotAllowedReason_NoRecentPurchases","value": "16384"} + ,{"name": "k_EMarketNotAllowedReason_AcceptedWalletGift","value": "32768"} ]} , {"enumname": "CGameID::EGameIDType","values": [ {"name": "k_EGameIDTypeApp","value": "0"} @@ -477,6 +472,24 @@ ,{"name": "k_EGameIDTypeShortcut","value": "2"} ,{"name": "k_EGameIDTypeP2P","value": "3"} ]} +, {"enumname": "EGameSearchErrorCode_t","values": [ + {"name": "k_EGameSearchErrorCode_OK","value": "1"} + ,{"name": "k_EGameSearchErrorCode_Failed_Search_Already_In_Progress","value": "2"} + ,{"name": "k_EGameSearchErrorCode_Failed_No_Search_In_Progress","value": "3"} + ,{"name": "k_EGameSearchErrorCode_Failed_Not_Lobby_Leader","value": "4"} + ,{"name": "k_EGameSearchErrorCode_Failed_No_Host_Available","value": "5"} + ,{"name": "k_EGameSearchErrorCode_Failed_Search_Params_Invalid","value": "6"} + ,{"name": "k_EGameSearchErrorCode_Failed_Offline","value": "7"} + ,{"name": "k_EGameSearchErrorCode_Failed_NotAuthorized","value": "8"} + ,{"name": "k_EGameSearchErrorCode_Failed_Unknown_Error","value": "9"} +]} +, {"enumname": "EPlayerResult_t","values": [ + {"name": "k_EPlayerResultFailedToConnect","value": "1"} + ,{"name": "k_EPlayerResultAbandoned","value": "2"} + ,{"name": "k_EPlayerResultKicked","value": "3"} + ,{"name": "k_EPlayerResultIncomplete","value": "4"} + ,{"name": "k_EPlayerResultCompleted","value": "5"} +]} , {"enumname": "IPCFailure_t::EFailureType","values": [ {"name": "k_EFailureFlushedCallbackQueue","value": "0"} ,{"name": "k_EFailurePipeFail","value": "1"} @@ -500,7 +513,8 @@ ,{"name": "k_EPersonaStateSnooze","value": "4"} ,{"name": "k_EPersonaStateLookingToTrade","value": "5"} ,{"name": "k_EPersonaStateLookingToPlay","value": "6"} - ,{"name": "k_EPersonaStateMax","value": "7"} + ,{"name": "k_EPersonaStateInvisible","value": "7"} + ,{"name": "k_EPersonaStateMax","value": "8"} ]} , {"enumname": "EFriendFlags","values": [ {"name": "k_EFriendFlagNone","value": "0"} @@ -531,6 +545,10 @@ ,{"name": "k_EOverlayToStoreFlag_AddToCart","value": "1"} ,{"name": "k_EOverlayToStoreFlag_AddToCartAndShow","value": "2"} ]} +, {"enumname": "EActivateGameOverlayToWebPageMode","values": [ + {"name": "k_EActivateGameOverlayToWebPageMode_Default","value": "0"} + ,{"name": "k_EActivateGameOverlayToWebPageMode_Modal","value": "1"} +]} , {"enumname": "EPersonaChange","values": [ {"name": "k_EPersonaChangeName","value": "1"} ,{"name": "k_EPersonaChangeStatus","value": "2"} @@ -543,9 +561,10 @@ ,{"name": "k_EPersonaChangeLeftSource","value": "256"} ,{"name": "k_EPersonaChangeRelationshipChanged","value": "512"} ,{"name": "k_EPersonaChangeNameFirstSet","value": "1024"} - ,{"name": "k_EPersonaChangeFacebookInfo","value": "2048"} + ,{"name": "k_EPersonaChangeBroadcast","value": "2048"} ,{"name": "k_EPersonaChangeNickname","value": "4096"} ,{"name": "k_EPersonaChangeSteamLevel","value": "8192"} + ,{"name": "k_EPersonaChangeRichPresence","value": "16384"} ]} , {"enumname": "ESteamAPICallFailure","values": [ {"name": "k_ESteamAPICallFailureNone","value": "-1"} @@ -601,6 +620,23 @@ ,{"name": "k_EChatMemberStateChangeKicked","value": "8"} ,{"name": "k_EChatMemberStateChangeBanned","value": "16"} ]} +, {"enumname": "ESteamPartyBeaconLocationType","values": [ + {"name": "k_ESteamPartyBeaconLocationType_Invalid","value": "0"} + ,{"name": "k_ESteamPartyBeaconLocationType_ChatGroup","value": "1"} + ,{"name": "k_ESteamPartyBeaconLocationType_Max","value": "2"} +]} +, {"enumname": "ESteamPartyBeaconLocationData","values": [ + {"name": "k_ESteamPartyBeaconLocationDataInvalid","value": "0"} + ,{"name": "k_ESteamPartyBeaconLocationDataName","value": "1"} + ,{"name": "k_ESteamPartyBeaconLocationDataIconURLSmall","value": "2"} + ,{"name": "k_ESteamPartyBeaconLocationDataIconURLMedium","value": "3"} + ,{"name": "k_ESteamPartyBeaconLocationDataIconURLLarge","value": "4"} +]} +, {"enumname": "RequestPlayersForGameResultCallback_t::PlayerAcceptState_t","values": [ + {"name": "k_EStateUnknown","value": "0"} + ,{"name": "k_EStatePlayerAccepted","value": "1"} + ,{"name": "k_EStatePlayerDeclined","value": "2"} +]} , {"enumname": "ERemoteStoragePlatform","values": [ {"name": "k_ERemoteStoragePlatformNone","value": "0"} ,{"name": "k_ERemoteStoragePlatformWindows","value": "1"} @@ -608,6 +644,7 @@ ,{"name": "k_ERemoteStoragePlatformPS3","value": "4"} ,{"name": "k_ERemoteStoragePlatformLinux","value": "8"} ,{"name": "k_ERemoteStoragePlatformReserved2","value": "16"} + ,{"name": "k_ERemoteStoragePlatformAndroid","value": "32"} ,{"name": "k_ERemoteStoragePlatformAll","value": "-1"} ]} , {"enumname": "ERemoteStoragePublishedFileVisibility","values": [ @@ -794,10 +831,363 @@ ,{"name": "k_EHTTPStatusCode505HTTPVersionNotSupported","value": "505"} ,{"name": "k_EHTTPStatusCode5xxUnknown","value": "599"} ]} +, {"enumname": "EInputSource","values": [ + {"name": "k_EInputSource_None","value": "0"} + ,{"name": "k_EInputSource_LeftTrackpad","value": "1"} + ,{"name": "k_EInputSource_RightTrackpad","value": "2"} + ,{"name": "k_EInputSource_Joystick","value": "3"} + ,{"name": "k_EInputSource_ABXY","value": "4"} + ,{"name": "k_EInputSource_Switch","value": "5"} + ,{"name": "k_EInputSource_LeftTrigger","value": "6"} + ,{"name": "k_EInputSource_RightTrigger","value": "7"} + ,{"name": "k_EInputSource_LeftBumper","value": "8"} + ,{"name": "k_EInputSource_RightBumper","value": "9"} + ,{"name": "k_EInputSource_Gyro","value": "10"} + ,{"name": "k_EInputSource_CenterTrackpad","value": "11"} + ,{"name": "k_EInputSource_RightJoystick","value": "12"} + ,{"name": "k_EInputSource_DPad","value": "13"} + ,{"name": "k_EInputSource_Key","value": "14"} + ,{"name": "k_EInputSource_Mouse","value": "15"} + ,{"name": "k_EInputSource_LeftGyro","value": "16"} + ,{"name": "k_EInputSource_Count","value": "17"} +]} +, {"enumname": "EInputSourceMode","values": [ + {"name": "k_EInputSourceMode_None","value": "0"} + ,{"name": "k_EInputSourceMode_Dpad","value": "1"} + ,{"name": "k_EInputSourceMode_Buttons","value": "2"} + ,{"name": "k_EInputSourceMode_FourButtons","value": "3"} + ,{"name": "k_EInputSourceMode_AbsoluteMouse","value": "4"} + ,{"name": "k_EInputSourceMode_RelativeMouse","value": "5"} + ,{"name": "k_EInputSourceMode_JoystickMove","value": "6"} + ,{"name": "k_EInputSourceMode_JoystickMouse","value": "7"} + ,{"name": "k_EInputSourceMode_JoystickCamera","value": "8"} + ,{"name": "k_EInputSourceMode_ScrollWheel","value": "9"} + ,{"name": "k_EInputSourceMode_Trigger","value": "10"} + ,{"name": "k_EInputSourceMode_TouchMenu","value": "11"} + ,{"name": "k_EInputSourceMode_MouseJoystick","value": "12"} + ,{"name": "k_EInputSourceMode_MouseRegion","value": "13"} + ,{"name": "k_EInputSourceMode_RadialMenu","value": "14"} + ,{"name": "k_EInputSourceMode_SingleButton","value": "15"} + ,{"name": "k_EInputSourceMode_Switches","value": "16"} +]} +, {"enumname": "EInputActionOrigin","values": [ + {"name": "k_EInputActionOrigin_None","value": "0"} + ,{"name": "k_EInputActionOrigin_SteamController_A","value": "1"} + ,{"name": "k_EInputActionOrigin_SteamController_B","value": "2"} + ,{"name": "k_EInputActionOrigin_SteamController_X","value": "3"} + ,{"name": "k_EInputActionOrigin_SteamController_Y","value": "4"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftBumper","value": "5"} + ,{"name": "k_EInputActionOrigin_SteamController_RightBumper","value": "6"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftGrip","value": "7"} + ,{"name": "k_EInputActionOrigin_SteamController_RightGrip","value": "8"} + ,{"name": "k_EInputActionOrigin_SteamController_Start","value": "9"} + ,{"name": "k_EInputActionOrigin_SteamController_Back","value": "10"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftPad_Touch","value": "11"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftPad_Swipe","value": "12"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftPad_Click","value": "13"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftPad_DPadNorth","value": "14"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftPad_DPadSouth","value": "15"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftPad_DPadWest","value": "16"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftPad_DPadEast","value": "17"} + ,{"name": "k_EInputActionOrigin_SteamController_RightPad_Touch","value": "18"} + ,{"name": "k_EInputActionOrigin_SteamController_RightPad_Swipe","value": "19"} + ,{"name": "k_EInputActionOrigin_SteamController_RightPad_Click","value": "20"} + ,{"name": "k_EInputActionOrigin_SteamController_RightPad_DPadNorth","value": "21"} + ,{"name": "k_EInputActionOrigin_SteamController_RightPad_DPadSouth","value": "22"} + ,{"name": "k_EInputActionOrigin_SteamController_RightPad_DPadWest","value": "23"} + ,{"name": "k_EInputActionOrigin_SteamController_RightPad_DPadEast","value": "24"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftTrigger_Pull","value": "25"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftTrigger_Click","value": "26"} + ,{"name": "k_EInputActionOrigin_SteamController_RightTrigger_Pull","value": "27"} + ,{"name": "k_EInputActionOrigin_SteamController_RightTrigger_Click","value": "28"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftStick_Move","value": "29"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftStick_Click","value": "30"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftStick_DPadNorth","value": "31"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftStick_DPadSouth","value": "32"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftStick_DPadWest","value": "33"} + ,{"name": "k_EInputActionOrigin_SteamController_LeftStick_DPadEast","value": "34"} + ,{"name": "k_EInputActionOrigin_SteamController_Gyro_Move","value": "35"} + ,{"name": "k_EInputActionOrigin_SteamController_Gyro_Pitch","value": "36"} + ,{"name": "k_EInputActionOrigin_SteamController_Gyro_Yaw","value": "37"} + ,{"name": "k_EInputActionOrigin_SteamController_Gyro_Roll","value": "38"} + ,{"name": "k_EInputActionOrigin_SteamController_Reserved0","value": "39"} + ,{"name": "k_EInputActionOrigin_SteamController_Reserved1","value": "40"} + ,{"name": "k_EInputActionOrigin_SteamController_Reserved2","value": "41"} + ,{"name": "k_EInputActionOrigin_SteamController_Reserved3","value": "42"} + ,{"name": "k_EInputActionOrigin_SteamController_Reserved4","value": "43"} + ,{"name": "k_EInputActionOrigin_SteamController_Reserved5","value": "44"} + ,{"name": "k_EInputActionOrigin_SteamController_Reserved6","value": "45"} + ,{"name": "k_EInputActionOrigin_SteamController_Reserved7","value": "46"} + ,{"name": "k_EInputActionOrigin_SteamController_Reserved8","value": "47"} + ,{"name": "k_EInputActionOrigin_SteamController_Reserved9","value": "48"} + ,{"name": "k_EInputActionOrigin_SteamController_Reserved10","value": "49"} + ,{"name": "k_EInputActionOrigin_PS4_X","value": "50"} + ,{"name": "k_EInputActionOrigin_PS4_Circle","value": "51"} + ,{"name": "k_EInputActionOrigin_PS4_Triangle","value": "52"} + ,{"name": "k_EInputActionOrigin_PS4_Square","value": "53"} + ,{"name": "k_EInputActionOrigin_PS4_LeftBumper","value": "54"} + ,{"name": "k_EInputActionOrigin_PS4_RightBumper","value": "55"} + ,{"name": "k_EInputActionOrigin_PS4_Options","value": "56"} + ,{"name": "k_EInputActionOrigin_PS4_Share","value": "57"} + ,{"name": "k_EInputActionOrigin_PS4_LeftPad_Touch","value": "58"} + ,{"name": "k_EInputActionOrigin_PS4_LeftPad_Swipe","value": "59"} + ,{"name": "k_EInputActionOrigin_PS4_LeftPad_Click","value": "60"} + ,{"name": "k_EInputActionOrigin_PS4_LeftPad_DPadNorth","value": "61"} + ,{"name": "k_EInputActionOrigin_PS4_LeftPad_DPadSouth","value": "62"} + ,{"name": "k_EInputActionOrigin_PS4_LeftPad_DPadWest","value": "63"} + ,{"name": "k_EInputActionOrigin_PS4_LeftPad_DPadEast","value": "64"} + ,{"name": "k_EInputActionOrigin_PS4_RightPad_Touch","value": "65"} + ,{"name": "k_EInputActionOrigin_PS4_RightPad_Swipe","value": "66"} + ,{"name": "k_EInputActionOrigin_PS4_RightPad_Click","value": "67"} + ,{"name": "k_EInputActionOrigin_PS4_RightPad_DPadNorth","value": "68"} + ,{"name": "k_EInputActionOrigin_PS4_RightPad_DPadSouth","value": "69"} + ,{"name": "k_EInputActionOrigin_PS4_RightPad_DPadWest","value": "70"} + ,{"name": "k_EInputActionOrigin_PS4_RightPad_DPadEast","value": "71"} + ,{"name": "k_EInputActionOrigin_PS4_CenterPad_Touch","value": "72"} + ,{"name": "k_EInputActionOrigin_PS4_CenterPad_Swipe","value": "73"} + ,{"name": "k_EInputActionOrigin_PS4_CenterPad_Click","value": "74"} + ,{"name": "k_EInputActionOrigin_PS4_CenterPad_DPadNorth","value": "75"} + ,{"name": "k_EInputActionOrigin_PS4_CenterPad_DPadSouth","value": "76"} + ,{"name": "k_EInputActionOrigin_PS4_CenterPad_DPadWest","value": "77"} + ,{"name": "k_EInputActionOrigin_PS4_CenterPad_DPadEast","value": "78"} + ,{"name": "k_EInputActionOrigin_PS4_LeftTrigger_Pull","value": "79"} + ,{"name": "k_EInputActionOrigin_PS4_LeftTrigger_Click","value": "80"} + ,{"name": "k_EInputActionOrigin_PS4_RightTrigger_Pull","value": "81"} + ,{"name": "k_EInputActionOrigin_PS4_RightTrigger_Click","value": "82"} + ,{"name": "k_EInputActionOrigin_PS4_LeftStick_Move","value": "83"} + ,{"name": "k_EInputActionOrigin_PS4_LeftStick_Click","value": "84"} + ,{"name": "k_EInputActionOrigin_PS4_LeftStick_DPadNorth","value": "85"} + ,{"name": "k_EInputActionOrigin_PS4_LeftStick_DPadSouth","value": "86"} + ,{"name": "k_EInputActionOrigin_PS4_LeftStick_DPadWest","value": "87"} + ,{"name": "k_EInputActionOrigin_PS4_LeftStick_DPadEast","value": "88"} + ,{"name": "k_EInputActionOrigin_PS4_RightStick_Move","value": "89"} + ,{"name": "k_EInputActionOrigin_PS4_RightStick_Click","value": "90"} + ,{"name": "k_EInputActionOrigin_PS4_RightStick_DPadNorth","value": "91"} + ,{"name": "k_EInputActionOrigin_PS4_RightStick_DPadSouth","value": "92"} + ,{"name": "k_EInputActionOrigin_PS4_RightStick_DPadWest","value": "93"} + ,{"name": "k_EInputActionOrigin_PS4_RightStick_DPadEast","value": "94"} + ,{"name": "k_EInputActionOrigin_PS4_DPad_North","value": "95"} + ,{"name": "k_EInputActionOrigin_PS4_DPad_South","value": "96"} + ,{"name": "k_EInputActionOrigin_PS4_DPad_West","value": "97"} + ,{"name": "k_EInputActionOrigin_PS4_DPad_East","value": "98"} + ,{"name": "k_EInputActionOrigin_PS4_Gyro_Move","value": "99"} + ,{"name": "k_EInputActionOrigin_PS4_Gyro_Pitch","value": "100"} + ,{"name": "k_EInputActionOrigin_PS4_Gyro_Yaw","value": "101"} + ,{"name": "k_EInputActionOrigin_PS4_Gyro_Roll","value": "102"} + ,{"name": "k_EInputActionOrigin_PS4_Reserved0","value": "103"} + ,{"name": "k_EInputActionOrigin_PS4_Reserved1","value": "104"} + ,{"name": "k_EInputActionOrigin_PS4_Reserved2","value": "105"} + ,{"name": "k_EInputActionOrigin_PS4_Reserved3","value": "106"} + ,{"name": "k_EInputActionOrigin_PS4_Reserved4","value": "107"} + ,{"name": "k_EInputActionOrigin_PS4_Reserved5","value": "108"} + ,{"name": "k_EInputActionOrigin_PS4_Reserved6","value": "109"} + ,{"name": "k_EInputActionOrigin_PS4_Reserved7","value": "110"} + ,{"name": "k_EInputActionOrigin_PS4_Reserved8","value": "111"} + ,{"name": "k_EInputActionOrigin_PS4_Reserved9","value": "112"} + ,{"name": "k_EInputActionOrigin_PS4_Reserved10","value": "113"} + ,{"name": "k_EInputActionOrigin_XBoxOne_A","value": "114"} + ,{"name": "k_EInputActionOrigin_XBoxOne_B","value": "115"} + ,{"name": "k_EInputActionOrigin_XBoxOne_X","value": "116"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Y","value": "117"} + ,{"name": "k_EInputActionOrigin_XBoxOne_LeftBumper","value": "118"} + ,{"name": "k_EInputActionOrigin_XBoxOne_RightBumper","value": "119"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Menu","value": "120"} + ,{"name": "k_EInputActionOrigin_XBoxOne_View","value": "121"} + ,{"name": "k_EInputActionOrigin_XBoxOne_LeftTrigger_Pull","value": "122"} + ,{"name": "k_EInputActionOrigin_XBoxOne_LeftTrigger_Click","value": "123"} + ,{"name": "k_EInputActionOrigin_XBoxOne_RightTrigger_Pull","value": "124"} + ,{"name": "k_EInputActionOrigin_XBoxOne_RightTrigger_Click","value": "125"} + ,{"name": "k_EInputActionOrigin_XBoxOne_LeftStick_Move","value": "126"} + ,{"name": "k_EInputActionOrigin_XBoxOne_LeftStick_Click","value": "127"} + ,{"name": "k_EInputActionOrigin_XBoxOne_LeftStick_DPadNorth","value": "128"} + ,{"name": "k_EInputActionOrigin_XBoxOne_LeftStick_DPadSouth","value": "129"} + ,{"name": "k_EInputActionOrigin_XBoxOne_LeftStick_DPadWest","value": "130"} + ,{"name": "k_EInputActionOrigin_XBoxOne_LeftStick_DPadEast","value": "131"} + ,{"name": "k_EInputActionOrigin_XBoxOne_RightStick_Move","value": "132"} + ,{"name": "k_EInputActionOrigin_XBoxOne_RightStick_Click","value": "133"} + ,{"name": "k_EInputActionOrigin_XBoxOne_RightStick_DPadNorth","value": "134"} + ,{"name": "k_EInputActionOrigin_XBoxOne_RightStick_DPadSouth","value": "135"} + ,{"name": "k_EInputActionOrigin_XBoxOne_RightStick_DPadWest","value": "136"} + ,{"name": "k_EInputActionOrigin_XBoxOne_RightStick_DPadEast","value": "137"} + ,{"name": "k_EInputActionOrigin_XBoxOne_DPad_North","value": "138"} + ,{"name": "k_EInputActionOrigin_XBoxOne_DPad_South","value": "139"} + ,{"name": "k_EInputActionOrigin_XBoxOne_DPad_West","value": "140"} + ,{"name": "k_EInputActionOrigin_XBoxOne_DPad_East","value": "141"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Reserved0","value": "142"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Reserved1","value": "143"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Reserved2","value": "144"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Reserved3","value": "145"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Reserved4","value": "146"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Reserved5","value": "147"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Reserved6","value": "148"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Reserved7","value": "149"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Reserved8","value": "150"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Reserved9","value": "151"} + ,{"name": "k_EInputActionOrigin_XBoxOne_Reserved10","value": "152"} + ,{"name": "k_EInputActionOrigin_XBox360_A","value": "153"} + ,{"name": "k_EInputActionOrigin_XBox360_B","value": "154"} + ,{"name": "k_EInputActionOrigin_XBox360_X","value": "155"} + ,{"name": "k_EInputActionOrigin_XBox360_Y","value": "156"} + ,{"name": "k_EInputActionOrigin_XBox360_LeftBumper","value": "157"} + ,{"name": "k_EInputActionOrigin_XBox360_RightBumper","value": "158"} + ,{"name": "k_EInputActionOrigin_XBox360_Start","value": "159"} + ,{"name": "k_EInputActionOrigin_XBox360_Back","value": "160"} + ,{"name": "k_EInputActionOrigin_XBox360_LeftTrigger_Pull","value": "161"} + ,{"name": "k_EInputActionOrigin_XBox360_LeftTrigger_Click","value": "162"} + ,{"name": "k_EInputActionOrigin_XBox360_RightTrigger_Pull","value": "163"} + ,{"name": "k_EInputActionOrigin_XBox360_RightTrigger_Click","value": "164"} + ,{"name": "k_EInputActionOrigin_XBox360_LeftStick_Move","value": "165"} + ,{"name": "k_EInputActionOrigin_XBox360_LeftStick_Click","value": "166"} + ,{"name": "k_EInputActionOrigin_XBox360_LeftStick_DPadNorth","value": "167"} + ,{"name": "k_EInputActionOrigin_XBox360_LeftStick_DPadSouth","value": "168"} + ,{"name": "k_EInputActionOrigin_XBox360_LeftStick_DPadWest","value": "169"} + ,{"name": "k_EInputActionOrigin_XBox360_LeftStick_DPadEast","value": "170"} + ,{"name": "k_EInputActionOrigin_XBox360_RightStick_Move","value": "171"} + ,{"name": "k_EInputActionOrigin_XBox360_RightStick_Click","value": "172"} + ,{"name": "k_EInputActionOrigin_XBox360_RightStick_DPadNorth","value": "173"} + ,{"name": "k_EInputActionOrigin_XBox360_RightStick_DPadSouth","value": "174"} + ,{"name": "k_EInputActionOrigin_XBox360_RightStick_DPadWest","value": "175"} + ,{"name": "k_EInputActionOrigin_XBox360_RightStick_DPadEast","value": "176"} + ,{"name": "k_EInputActionOrigin_XBox360_DPad_North","value": "177"} + ,{"name": "k_EInputActionOrigin_XBox360_DPad_South","value": "178"} + ,{"name": "k_EInputActionOrigin_XBox360_DPad_West","value": "179"} + ,{"name": "k_EInputActionOrigin_XBox360_DPad_East","value": "180"} + ,{"name": "k_EInputActionOrigin_XBox360_Reserved0","value": "181"} + ,{"name": "k_EInputActionOrigin_XBox360_Reserved1","value": "182"} + ,{"name": "k_EInputActionOrigin_XBox360_Reserved2","value": "183"} + ,{"name": "k_EInputActionOrigin_XBox360_Reserved3","value": "184"} + ,{"name": "k_EInputActionOrigin_XBox360_Reserved4","value": "185"} + ,{"name": "k_EInputActionOrigin_XBox360_Reserved5","value": "186"} + ,{"name": "k_EInputActionOrigin_XBox360_Reserved6","value": "187"} + ,{"name": "k_EInputActionOrigin_XBox360_Reserved7","value": "188"} + ,{"name": "k_EInputActionOrigin_XBox360_Reserved8","value": "189"} + ,{"name": "k_EInputActionOrigin_XBox360_Reserved9","value": "190"} + ,{"name": "k_EInputActionOrigin_XBox360_Reserved10","value": "191"} + ,{"name": "k_EInputActionOrigin_Switch_A","value": "192"} + ,{"name": "k_EInputActionOrigin_Switch_B","value": "193"} + ,{"name": "k_EInputActionOrigin_Switch_X","value": "194"} + ,{"name": "k_EInputActionOrigin_Switch_Y","value": "195"} + ,{"name": "k_EInputActionOrigin_Switch_LeftBumper","value": "196"} + ,{"name": "k_EInputActionOrigin_Switch_RightBumper","value": "197"} + ,{"name": "k_EInputActionOrigin_Switch_Plus","value": "198"} + ,{"name": "k_EInputActionOrigin_Switch_Minus","value": "199"} + ,{"name": "k_EInputActionOrigin_Switch_Capture","value": "200"} + ,{"name": "k_EInputActionOrigin_Switch_LeftTrigger_Pull","value": "201"} + ,{"name": "k_EInputActionOrigin_Switch_LeftTrigger_Click","value": "202"} + ,{"name": "k_EInputActionOrigin_Switch_RightTrigger_Pull","value": "203"} + ,{"name": "k_EInputActionOrigin_Switch_RightTrigger_Click","value": "204"} + ,{"name": "k_EInputActionOrigin_Switch_LeftStick_Move","value": "205"} + ,{"name": "k_EInputActionOrigin_Switch_LeftStick_Click","value": "206"} + ,{"name": "k_EInputActionOrigin_Switch_LeftStick_DPadNorth","value": "207"} + ,{"name": "k_EInputActionOrigin_Switch_LeftStick_DPadSouth","value": "208"} + ,{"name": "k_EInputActionOrigin_Switch_LeftStick_DPadWest","value": "209"} + ,{"name": "k_EInputActionOrigin_Switch_LeftStick_DPadEast","value": "210"} + ,{"name": "k_EInputActionOrigin_Switch_RightStick_Move","value": "211"} + ,{"name": "k_EInputActionOrigin_Switch_RightStick_Click","value": "212"} + ,{"name": "k_EInputActionOrigin_Switch_RightStick_DPadNorth","value": "213"} + ,{"name": "k_EInputActionOrigin_Switch_RightStick_DPadSouth","value": "214"} + ,{"name": "k_EInputActionOrigin_Switch_RightStick_DPadWest","value": "215"} + ,{"name": "k_EInputActionOrigin_Switch_RightStick_DPadEast","value": "216"} + ,{"name": "k_EInputActionOrigin_Switch_DPad_North","value": "217"} + ,{"name": "k_EInputActionOrigin_Switch_DPad_South","value": "218"} + ,{"name": "k_EInputActionOrigin_Switch_DPad_West","value": "219"} + ,{"name": "k_EInputActionOrigin_Switch_DPad_East","value": "220"} + ,{"name": "k_EInputActionOrigin_Switch_ProGyro_Move","value": "221"} + ,{"name": "k_EInputActionOrigin_Switch_ProGyro_Pitch","value": "222"} + ,{"name": "k_EInputActionOrigin_Switch_ProGyro_Yaw","value": "223"} + ,{"name": "k_EInputActionOrigin_Switch_ProGyro_Roll","value": "224"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved0","value": "225"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved1","value": "226"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved2","value": "227"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved3","value": "228"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved4","value": "229"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved5","value": "230"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved6","value": "231"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved7","value": "232"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved8","value": "233"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved9","value": "234"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved10","value": "235"} + ,{"name": "k_EInputActionOrigin_Switch_RightGyro_Move","value": "236"} + ,{"name": "k_EInputActionOrigin_Switch_RightGyro_Pitch","value": "237"} + ,{"name": "k_EInputActionOrigin_Switch_RightGyro_Yaw","value": "238"} + ,{"name": "k_EInputActionOrigin_Switch_RightGyro_Roll","value": "239"} + ,{"name": "k_EInputActionOrigin_Switch_LeftGyro_Move","value": "240"} + ,{"name": "k_EInputActionOrigin_Switch_LeftGyro_Pitch","value": "241"} + ,{"name": "k_EInputActionOrigin_Switch_LeftGyro_Yaw","value": "242"} + ,{"name": "k_EInputActionOrigin_Switch_LeftGyro_Roll","value": "243"} + ,{"name": "k_EInputActionOrigin_Switch_LeftGrip_Lower","value": "244"} + ,{"name": "k_EInputActionOrigin_Switch_LeftGrip_Upper","value": "245"} + ,{"name": "k_EInputActionOrigin_Switch_RightGrip_Lower","value": "246"} + ,{"name": "k_EInputActionOrigin_Switch_RightGrip_Upper","value": "247"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved11","value": "248"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved12","value": "249"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved13","value": "250"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved14","value": "251"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved15","value": "252"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved16","value": "253"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved17","value": "254"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved18","value": "255"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved19","value": "256"} + ,{"name": "k_EInputActionOrigin_Switch_Reserved20","value": "257"} + ,{"name": "k_EInputActionOrigin_Count","value": "258"} + ,{"name": "k_EInputActionOrigin_MaximumPossibleValue","value": "32767"} +]} +, {"enumname": "EXboxOrigin","values": [ + {"name": "k_EXboxOrigin_A","value": "0"} + ,{"name": "k_EXboxOrigin_B","value": "1"} + ,{"name": "k_EXboxOrigin_X","value": "2"} + ,{"name": "k_EXboxOrigin_Y","value": "3"} + ,{"name": "k_EXboxOrigin_LeftBumper","value": "4"} + ,{"name": "k_EXboxOrigin_RightBumper","value": "5"} + ,{"name": "k_EXboxOrigin_Menu","value": "6"} + ,{"name": "k_EXboxOrigin_View","value": "7"} + ,{"name": "k_EXboxOrigin_LeftTrigger_Pull","value": "8"} + ,{"name": "k_EXboxOrigin_LeftTrigger_Click","value": "9"} + ,{"name": "k_EXboxOrigin_RightTrigger_Pull","value": "10"} + ,{"name": "k_EXboxOrigin_RightTrigger_Click","value": "11"} + ,{"name": "k_EXboxOrigin_LeftStick_Move","value": "12"} + ,{"name": "k_EXboxOrigin_LeftStick_Click","value": "13"} + ,{"name": "k_EXboxOrigin_LeftStick_DPadNorth","value": "14"} + ,{"name": "k_EXboxOrigin_LeftStick_DPadSouth","value": "15"} + ,{"name": "k_EXboxOrigin_LeftStick_DPadWest","value": "16"} + ,{"name": "k_EXboxOrigin_LeftStick_DPadEast","value": "17"} + ,{"name": "k_EXboxOrigin_RightStick_Move","value": "18"} + ,{"name": "k_EXboxOrigin_RightStick_Click","value": "19"} + ,{"name": "k_EXboxOrigin_RightStick_DPadNorth","value": "20"} + ,{"name": "k_EXboxOrigin_RightStick_DPadSouth","value": "21"} + ,{"name": "k_EXboxOrigin_RightStick_DPadWest","value": "22"} + ,{"name": "k_EXboxOrigin_RightStick_DPadEast","value": "23"} + ,{"name": "k_EXboxOrigin_DPad_North","value": "24"} + ,{"name": "k_EXboxOrigin_DPad_South","value": "25"} + ,{"name": "k_EXboxOrigin_DPad_West","value": "26"} + ,{"name": "k_EXboxOrigin_DPad_East","value": "27"} + ,{"name": "k_EXboxOrigin_Count","value": "28"} +]} , {"enumname": "ESteamControllerPad","values": [ {"name": "k_ESteamControllerPad_Left","value": "0"} ,{"name": "k_ESteamControllerPad_Right","value": "1"} ]} +, {"enumname": "ESteamInputType","values": [ + {"name": "k_ESteamInputType_Unknown","value": "0"} + ,{"name": "k_ESteamInputType_SteamController","value": "1"} + ,{"name": "k_ESteamInputType_XBox360Controller","value": "2"} + ,{"name": "k_ESteamInputType_XBoxOneController","value": "3"} + ,{"name": "k_ESteamInputType_GenericGamepad","value": "4"} + ,{"name": "k_ESteamInputType_PS4Controller","value": "5"} + ,{"name": "k_ESteamInputType_AppleMFiController","value": "6"} + ,{"name": "k_ESteamInputType_AndroidController","value": "7"} + ,{"name": "k_ESteamInputType_SwitchJoyConPair","value": "8"} + ,{"name": "k_ESteamInputType_SwitchJoyConSingle","value": "9"} + ,{"name": "k_ESteamInputType_SwitchProController","value": "10"} + ,{"name": "k_ESteamInputType_MobileTouch","value": "11"} + ,{"name": "k_ESteamInputType_PS3Controller","value": "12"} + ,{"name": "k_ESteamInputType_Count","value": "13"} + ,{"name": "k_ESteamInputType_MaximumPossibleValue","value": "255"} +]} +, {"enumname": "ESteamInputLEDFlag","values": [ + {"name": "k_ESteamInputLEDFlag_SetColor","value": "0"} + ,{"name": "k_ESteamInputLEDFlag_RestoreUserDefault","value": "1"} +]} , {"enumname": "EControllerSource","values": [ {"name": "k_EControllerSource_None","value": "0"} ,{"name": "k_EControllerSource_LeftTrackpad","value": "1"} @@ -807,13 +1197,16 @@ ,{"name": "k_EControllerSource_Switch","value": "5"} ,{"name": "k_EControllerSource_LeftTrigger","value": "6"} ,{"name": "k_EControllerSource_RightTrigger","value": "7"} - ,{"name": "k_EControllerSource_Gyro","value": "8"} - ,{"name": "k_EControllerSource_CenterTrackpad","value": "9"} - ,{"name": "k_EControllerSource_RightJoystick","value": "10"} - ,{"name": "k_EControllerSource_DPad","value": "11"} - ,{"name": "k_EControllerSource_Key","value": "12"} - ,{"name": "k_EControllerSource_Mouse","value": "13"} - ,{"name": "k_EControllerSource_Count","value": "14"} + ,{"name": "k_EControllerSource_LeftBumper","value": "8"} + ,{"name": "k_EControllerSource_RightBumper","value": "9"} + ,{"name": "k_EControllerSource_Gyro","value": "10"} + ,{"name": "k_EControllerSource_CenterTrackpad","value": "11"} + ,{"name": "k_EControllerSource_RightJoystick","value": "12"} + ,{"name": "k_EControllerSource_DPad","value": "13"} + ,{"name": "k_EControllerSource_Key","value": "14"} + ,{"name": "k_EControllerSource_Mouse","value": "15"} + ,{"name": "k_EControllerSource_LeftGyro","value": "16"} + ,{"name": "k_EControllerSource_Count","value": "17"} ]} , {"enumname": "EControllerSourceMode","values": [ {"name": "k_EControllerSourceMode_None","value": "0"} @@ -989,9 +1382,9 @@ ,{"name": "k_EControllerActionOrigin_SteamV2_Y","value": "151"} ,{"name": "k_EControllerActionOrigin_SteamV2_LeftBumper","value": "152"} ,{"name": "k_EControllerActionOrigin_SteamV2_RightBumper","value": "153"} - ,{"name": "k_EControllerActionOrigin_SteamV2_LeftGrip","value": "154"} - ,{"name": "k_EControllerActionOrigin_SteamV2_RightGrip","value": "155"} - ,{"name": "k_EControllerActionOrigin_SteamV2_LeftGrip_Upper","value": "156"} + ,{"name": "k_EControllerActionOrigin_SteamV2_LeftGrip_Lower","value": "154"} + ,{"name": "k_EControllerActionOrigin_SteamV2_LeftGrip_Upper","value": "155"} + ,{"name": "k_EControllerActionOrigin_SteamV2_RightGrip_Lower","value": "156"} ,{"name": "k_EControllerActionOrigin_SteamV2_RightGrip_Upper","value": "157"} ,{"name": "k_EControllerActionOrigin_SteamV2_LeftBumper_Pressure","value": "158"} ,{"name": "k_EControllerActionOrigin_SteamV2_RightBumper_Pressure","value": "159"} @@ -1031,20 +1424,58 @@ ,{"name": "k_EControllerActionOrigin_SteamV2_Gyro_Pitch","value": "193"} ,{"name": "k_EControllerActionOrigin_SteamV2_Gyro_Yaw","value": "194"} ,{"name": "k_EControllerActionOrigin_SteamV2_Gyro_Roll","value": "195"} - ,{"name": "k_EControllerActionOrigin_Count","value": "196"} + ,{"name": "k_EControllerActionOrigin_Switch_A","value": "196"} + ,{"name": "k_EControllerActionOrigin_Switch_B","value": "197"} + ,{"name": "k_EControllerActionOrigin_Switch_X","value": "198"} + ,{"name": "k_EControllerActionOrigin_Switch_Y","value": "199"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftBumper","value": "200"} + ,{"name": "k_EControllerActionOrigin_Switch_RightBumper","value": "201"} + ,{"name": "k_EControllerActionOrigin_Switch_Plus","value": "202"} + ,{"name": "k_EControllerActionOrigin_Switch_Minus","value": "203"} + ,{"name": "k_EControllerActionOrigin_Switch_Capture","value": "204"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftTrigger_Pull","value": "205"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftTrigger_Click","value": "206"} + ,{"name": "k_EControllerActionOrigin_Switch_RightTrigger_Pull","value": "207"} + ,{"name": "k_EControllerActionOrigin_Switch_RightTrigger_Click","value": "208"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftStick_Move","value": "209"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftStick_Click","value": "210"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftStick_DPadNorth","value": "211"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftStick_DPadSouth","value": "212"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftStick_DPadWest","value": "213"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftStick_DPadEast","value": "214"} + ,{"name": "k_EControllerActionOrigin_Switch_RightStick_Move","value": "215"} + ,{"name": "k_EControllerActionOrigin_Switch_RightStick_Click","value": "216"} + ,{"name": "k_EControllerActionOrigin_Switch_RightStick_DPadNorth","value": "217"} + ,{"name": "k_EControllerActionOrigin_Switch_RightStick_DPadSouth","value": "218"} + ,{"name": "k_EControllerActionOrigin_Switch_RightStick_DPadWest","value": "219"} + ,{"name": "k_EControllerActionOrigin_Switch_RightStick_DPadEast","value": "220"} + ,{"name": "k_EControllerActionOrigin_Switch_DPad_North","value": "221"} + ,{"name": "k_EControllerActionOrigin_Switch_DPad_South","value": "222"} + ,{"name": "k_EControllerActionOrigin_Switch_DPad_West","value": "223"} + ,{"name": "k_EControllerActionOrigin_Switch_DPad_East","value": "224"} + ,{"name": "k_EControllerActionOrigin_Switch_ProGyro_Move","value": "225"} + ,{"name": "k_EControllerActionOrigin_Switch_ProGyro_Pitch","value": "226"} + ,{"name": "k_EControllerActionOrigin_Switch_ProGyro_Yaw","value": "227"} + ,{"name": "k_EControllerActionOrigin_Switch_ProGyro_Roll","value": "228"} + ,{"name": "k_EControllerActionOrigin_Switch_RightGyro_Move","value": "229"} + ,{"name": "k_EControllerActionOrigin_Switch_RightGyro_Pitch","value": "230"} + ,{"name": "k_EControllerActionOrigin_Switch_RightGyro_Yaw","value": "231"} + ,{"name": "k_EControllerActionOrigin_Switch_RightGyro_Roll","value": "232"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftGyro_Move","value": "233"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftGyro_Pitch","value": "234"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftGyro_Yaw","value": "235"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftGyro_Roll","value": "236"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftGrip_Lower","value": "237"} + ,{"name": "k_EControllerActionOrigin_Switch_LeftGrip_Upper","value": "238"} + ,{"name": "k_EControllerActionOrigin_Switch_RightGrip_Lower","value": "239"} + ,{"name": "k_EControllerActionOrigin_Switch_RightGrip_Upper","value": "240"} + ,{"name": "k_EControllerActionOrigin_Count","value": "241"} + ,{"name": "k_EControllerActionOrigin_MaximumPossibleValue","value": "32767"} ]} , {"enumname": "ESteamControllerLEDFlag","values": [ {"name": "k_ESteamControllerLEDFlag_SetColor","value": "0"} ,{"name": "k_ESteamControllerLEDFlag_RestoreUserDefault","value": "1"} ]} -, {"enumname": "ESteamInputType","values": [ - {"name": "k_ESteamInputType_Unknown","value": "0"} - ,{"name": "k_ESteamInputType_SteamController","value": "1"} - ,{"name": "k_ESteamInputType_XBox360Controller","value": "2"} - ,{"name": "k_ESteamInputType_XBoxOneController","value": "3"} - ,{"name": "k_ESteamInputType_GenericXInput","value": "4"} - ,{"name": "k_ESteamInputType_PS4Controller","value": "5"} -]} , {"enumname": "EUGCMatchingUGCType","values": [ {"name": "k_EUGCMatchingUGCType_Items","value": "0"} ,{"name": "k_EUGCMatchingUGCType_Items_Mtx","value": "1"} @@ -1243,6 +1674,10 @@ "constname": "k_iSteamUserStatsCallbacks","consttype": "int", "constval": "1100"} ,{ "constname": "k_iSteamNetworkingCallbacks","consttype": "int", "constval": "1200"} +,{ + "constname": "k_iSteamNetworkingSocketsCallbacks","consttype": "int", "constval": "1220"} +,{ + "constname": "k_iSteamNetworkingMessagesCallbacks","consttype": "int", "constval": "1250"} ,{ "constname": "k_iClientRemoteStorageCallbacks","consttype": "int", "constval": "1300"} ,{ @@ -1321,12 +1756,18 @@ "constname": "k_ISteamParentalSettingsCallbacks","consttype": "int", "constval": "5000"} ,{ "constname": "k_iClientShaderCallbacks","consttype": "int", "constval": "5100"} +,{ + "constname": "k_iSteamGameSearchCallbacks","consttype": "int", "constval": "5200"} +,{ + "constname": "k_iSteamPartiesCallbacks","consttype": "int", "constval": "5300"} +,{ + "constname": "k_iClientPartiesCallbacks","consttype": "int", "constval": "5400"} ,{ "constname": "k_cchPersonaNameMax","consttype": "int", "constval": "128"} ,{ "constname": "k_cwchPersonaNameMax","consttype": "int", "constval": "32"} ,{ - "constname": "k_cchMaxRichPresenceKeys","consttype": "int", "constval": "20"} + "constname": "k_cchMaxRichPresenceKeys","consttype": "int", "constval": "30"} ,{ "constname": "k_cchMaxRichPresenceKeyLength","consttype": "int", "constval": "64"} ,{ @@ -1364,6 +1805,50 @@ { "fieldname": "m_u64", "fieldtype": "uint64"}, { "fieldname": "m_u16", "fieldtype": "uint16"}, { "fieldname": "m_d", "fieldtype": "double"}]} +,{"struct": "CCallbackBase","fields": [ +{ "fieldname": "m_nCallbackFlags", "fieldtype": "uint8"}, +{ "fieldname": "m_iCallback", "fieldtype": "int"}]} +,{"struct": "CCallResult","fields": [ +{ "fieldname": "m_hAPICall", "fieldtype": "SteamAPICall_t"}, +{ "fieldname": "m_pObj", "fieldtype": "T *"}, +{ "fieldname": "m_Func", "fieldtype": "func_t"}]} +,{"struct": "CCallback","fields": [ +{ "fieldname": "m_pObj", "fieldtype": "T *"}, +{ "fieldname": "m_Func", "fieldtype": "func_t"}]} +,{"struct": "CSteamAPIContext","fields": [ +{ "fieldname": "m_pSteamClient", "fieldtype": "class ISteamClient *"}, +{ "fieldname": "m_pSteamUser", "fieldtype": "class ISteamUser *"}, +{ "fieldname": "m_pSteamFriends", "fieldtype": "class ISteamFriends *"}, +{ "fieldname": "m_pSteamUtils", "fieldtype": "class ISteamUtils *"}, +{ "fieldname": "m_pSteamMatchmaking", "fieldtype": "class ISteamMatchmaking *"}, +{ "fieldname": "m_pSteamGameSearch", "fieldtype": "class ISteamGameSearch *"}, +{ "fieldname": "m_pSteamUserStats", "fieldtype": "class ISteamUserStats *"}, +{ "fieldname": "m_pSteamApps", "fieldtype": "class ISteamApps *"}, +{ "fieldname": "m_pSteamMatchmakingServers", "fieldtype": "class ISteamMatchmakingServers *"}, +{ "fieldname": "m_pSteamNetworking", "fieldtype": "class ISteamNetworking *"}, +{ "fieldname": "m_pSteamRemoteStorage", "fieldtype": "class ISteamRemoteStorage *"}, +{ "fieldname": "m_pSteamScreenshots", "fieldtype": "class ISteamScreenshots *"}, +{ "fieldname": "m_pSteamHTTP", "fieldtype": "class ISteamHTTP *"}, +{ "fieldname": "m_pController", "fieldtype": "class ISteamController *"}, +{ "fieldname": "m_pSteamUGC", "fieldtype": "class ISteamUGC *"}, +{ "fieldname": "m_pSteamAppList", "fieldtype": "class ISteamAppList *"}, +{ "fieldname": "m_pSteamMusic", "fieldtype": "class ISteamMusic *"}, +{ "fieldname": "m_pSteamMusicRemote", "fieldtype": "class ISteamMusicRemote *"}, +{ "fieldname": "m_pSteamHTMLSurface", "fieldtype": "class ISteamHTMLSurface *"}, +{ "fieldname": "m_pSteamInventory", "fieldtype": "class ISteamInventory *"}, +{ "fieldname": "m_pSteamVideo", "fieldtype": "class ISteamVideo *"}, +{ "fieldname": "m_pSteamParentalSettings", "fieldtype": "class ISteamParentalSettings *"}, +{ "fieldname": "m_pSteamInput", "fieldtype": "class ISteamInput *"}]} +,{"struct": "CSteamGameServerAPIContext","fields": [ +{ "fieldname": "m_pSteamClient", "fieldtype": "class ISteamClient *"}, +{ "fieldname": "m_pSteamGameServer", "fieldtype": "class ISteamGameServer *"}, +{ "fieldname": "m_pSteamGameServerUtils", "fieldtype": "class ISteamUtils *"}, +{ "fieldname": "m_pSteamGameServerNetworking", "fieldtype": "class ISteamNetworking *"}, +{ "fieldname": "m_pSteamGameServerStats", "fieldtype": "class ISteamGameServerStats *"}, +{ "fieldname": "m_pSteamHTTP", "fieldtype": "class ISteamHTTP *"}, +{ "fieldname": "m_pSteamInventory", "fieldtype": "class ISteamInventory *"}, +{ "fieldname": "m_pSteamUGC", "fieldtype": "class ISteamUGC *"}, +{ "fieldname": "m_pSteamApps", "fieldtype": "class ISteamApps *"}]} ,{"struct": "CallbackMsg_t","fields": [ { "fieldname": "m_hSteamUser", "fieldtype": "HSteamUser"}, { "fieldname": "m_iCallback", "fieldtype": "int"}, @@ -1397,6 +1882,12 @@ { "fieldname": "m_szURL", "fieldtype": "char [256]"}]} ,{"struct": "StoreAuthURLResponse_t","fields": [ { "fieldname": "m_szURL", "fieldtype": "char [512]"}]} +,{"struct": "MarketEligibilityResponse_t","fields": [ +{ "fieldname": "m_bAllowed", "fieldtype": "_Bool"}, +{ "fieldname": "m_eNotAllowedReason", "fieldtype": "enum EMarketNotAllowedReasonFlags"}, +{ "fieldname": "m_rtAllowedAtTime", "fieldtype": "RTime32"}, +{ "fieldname": "m_cdaySteamGuardRequiredDays", "fieldtype": "int"}, +{ "fieldname": "m_cdayNewDeviceCooldown", "fieldtype": "int"}]} ,{"struct": "FriendGameInfo_t","fields": [ { "fieldname": "m_gameID", "fieldtype": "class CGameID"}, { "fieldname": "m_unGameIP", "fieldtype": "uint32"}, @@ -1506,6 +1997,9 @@ { "fieldname": "m_szServerName", "fieldtype": "char [64]"}, { "fieldname": "m_szGameTags", "fieldtype": "char [128]"}, { "fieldname": "m_steamID", "fieldtype": "class CSteamID"}]} +,{"struct": "SteamPartyBeaconLocation_t","fields": [ +{ "fieldname": "m_eType", "fieldtype": "enum ESteamPartyBeaconLocationType"}, +{ "fieldname": "m_ulLocationID", "fieldtype": "uint64"}]} ,{"struct": "FavoritesListChanged_t","fields": [ { "fieldname": "m_nIP", "fieldtype": "uint32"}, { "fieldname": "m_nQueryPort", "fieldtype": "uint32"}, @@ -1556,6 +2050,58 @@ { "fieldname": "m_steamIDLobby", "fieldtype": "class CSteamID"}]} ,{"struct": "FavoritesListAccountsUpdated_t","fields": [ { "fieldname": "m_eResult", "fieldtype": "enum EResult"}]} +,{"struct": "SearchForGameProgressCallback_t","fields": [ +{ "fieldname": "m_ullSearchID", "fieldtype": "uint64"}, +{ "fieldname": "m_eResult", "fieldtype": "enum EResult"}, +{ "fieldname": "m_lobbyID", "fieldtype": "class CSteamID"}, +{ "fieldname": "m_steamIDEndedSearch", "fieldtype": "class CSteamID"}, +{ "fieldname": "m_nSecondsRemainingEstimate", "fieldtype": "int32"}, +{ "fieldname": "m_cPlayersSearching", "fieldtype": "int32"}]} +,{"struct": "SearchForGameResultCallback_t","fields": [ +{ "fieldname": "m_ullSearchID", "fieldtype": "uint64"}, +{ "fieldname": "m_eResult", "fieldtype": "enum EResult"}, +{ "fieldname": "m_nCountPlayersInGame", "fieldtype": "int32"}, +{ "fieldname": "m_nCountAcceptedGame", "fieldtype": "int32"}, +{ "fieldname": "m_steamIDHost", "fieldtype": "class CSteamID"}, +{ "fieldname": "m_bFinalCallback", "fieldtype": "_Bool"}]} +,{"struct": "RequestPlayersForGameProgressCallback_t","fields": [ +{ "fieldname": "m_eResult", "fieldtype": "enum EResult"}, +{ "fieldname": "m_ullSearchID", "fieldtype": "uint64"}]} +,{"struct": "RequestPlayersForGameResultCallback_t","fields": [ +{ "fieldname": "m_eResult", "fieldtype": "enum EResult"}, +{ "fieldname": "m_ullSearchID", "fieldtype": "uint64"}, +{ "fieldname": "m_SteamIDPlayerFound", "fieldtype": "class CSteamID"}, +{ "fieldname": "m_SteamIDLobby", "fieldtype": "class CSteamID"}, +{ "fieldname": "m_ePlayerAcceptState", "fieldtype": "enum RequestPlayersForGameResultCallback_t::PlayerAcceptState_t"}, +{ "fieldname": "m_nPlayerIndex", "fieldtype": "int32"}, +{ "fieldname": "m_nTotalPlayersFound", "fieldtype": "int32"}, +{ "fieldname": "m_nTotalPlayersAcceptedGame", "fieldtype": "int32"}, +{ "fieldname": "m_nSuggestedTeamIndex", "fieldtype": "int32"}, +{ "fieldname": "m_ullUniqueGameID", "fieldtype": "uint64"}]} +,{"struct": "RequestPlayersForGameFinalResultCallback_t","fields": [ +{ "fieldname": "m_eResult", "fieldtype": "enum EResult"}, +{ "fieldname": "m_ullSearchID", "fieldtype": "uint64"}, +{ "fieldname": "m_ullUniqueGameID", "fieldtype": "uint64"}]} +,{"struct": "SubmitPlayerResultResultCallback_t","fields": [ +{ "fieldname": "m_eResult", "fieldtype": "enum EResult"}, +{ "fieldname": "ullUniqueGameID", "fieldtype": "uint64"}, +{ "fieldname": "steamIDPlayer", "fieldtype": "class CSteamID"}]} +,{"struct": "EndGameResultCallback_t","fields": [ +{ "fieldname": "m_eResult", "fieldtype": "enum EResult"}, +{ "fieldname": "ullUniqueGameID", "fieldtype": "uint64"}]} +,{"struct": "JoinPartyCallback_t","fields": [ +{ "fieldname": "m_eResult", "fieldtype": "enum EResult"}, +{ "fieldname": "m_ulBeaconID", "fieldtype": "PartyBeaconID_t"}, +{ "fieldname": "m_SteamIDBeaconOwner", "fieldtype": "class CSteamID"}, +{ "fieldname": "m_rgchConnectString", "fieldtype": "char [256]"}]} +,{"struct": "CreateBeaconCallback_t","fields": [ +{ "fieldname": "m_eResult", "fieldtype": "enum EResult"}, +{ "fieldname": "m_ulBeaconID", "fieldtype": "PartyBeaconID_t"}]} +,{"struct": "ReservationNotificationCallback_t","fields": [ +{ "fieldname": "m_ulBeaconID", "fieldtype": "PartyBeaconID_t"}, +{ "fieldname": "m_steamIDJoiner", "fieldtype": "class CSteamID"}]} +,{"struct": "ChangeNumOpenSlotsCallback_t","fields": [ +{ "fieldname": "m_eResult", "fieldtype": "enum EResult"}]} ,{"struct": "SteamParamStringArray_t","fields": [ { "fieldname": "m_ppStrings", "fieldtype": "const char **"}, { "fieldname": "m_nNumStrings", "fieldtype": "int32"}]} @@ -1819,25 +2365,6 @@ { "fieldname": "m_ulContextValue", "fieldtype": "uint64"}, { "fieldname": "m_cOffset", "fieldtype": "uint32"}, { "fieldname": "m_cBytesReceived", "fieldtype": "uint32"}]} -,{"struct": "ControllerAnalogActionData_t","fields": [ -{ "fieldname": "eMode", "fieldtype": "enum EControllerSourceMode"}, -{ "fieldname": "x", "fieldtype": "float"}, -{ "fieldname": "y", "fieldtype": "float"}, -{ "fieldname": "bActive", "fieldtype": "_Bool"}]} -,{"struct": "ControllerDigitalActionData_t","fields": [ -{ "fieldname": "bState", "fieldtype": "_Bool"}, -{ "fieldname": "bActive", "fieldtype": "_Bool"}]} -,{"struct": "ControllerMotionData_t","fields": [ -{ "fieldname": "rotQuatX", "fieldtype": "float"}, -{ "fieldname": "rotQuatY", "fieldtype": "float"}, -{ "fieldname": "rotQuatZ", "fieldtype": "float"}, -{ "fieldname": "rotQuatW", "fieldtype": "float"}, -{ "fieldname": "posAccelX", "fieldtype": "float"}, -{ "fieldname": "posAccelY", "fieldtype": "float"}, -{ "fieldname": "posAccelZ", "fieldtype": "float"}, -{ "fieldname": "rotVelX", "fieldtype": "float"}, -{ "fieldname": "rotVelY", "fieldtype": "float"}, -{ "fieldname": "rotVelZ", "fieldtype": "float"}]} ,{"struct": "SteamUGCDetails_t","fields": [ { "fieldname": "m_nPublishedFileId", "fieldtype": "PublishedFileId_t"}, { "fieldname": "m_eResult", "fieldtype": "enum EResult"}, @@ -1870,7 +2397,8 @@ { "fieldname": "m_eResult", "fieldtype": "enum EResult"}, { "fieldname": "m_unNumResultsReturned", "fieldtype": "uint32"}, { "fieldname": "m_unTotalMatchingResults", "fieldtype": "uint32"}, -{ "fieldname": "m_bCachedData", "fieldtype": "_Bool"}]} +{ "fieldname": "m_bCachedData", "fieldtype": "_Bool"}, +{ "fieldname": "m_rgchNextCursor", "fieldtype": "char [256]"}]} ,{"struct": "SteamUGCRequestUGCDetailsResult_t","fields": [ { "fieldname": "m_details", "fieldtype": "struct SteamUGCDetails_t"}, { "fieldname": "m_bCachedData", "fieldtype": "_Bool"}]} @@ -2019,7 +2547,7 @@ { "fieldname": "unY", "fieldtype": "uint32"}, { "fieldname": "unWide", "fieldtype": "uint32"}, { "fieldname": "unTall", "fieldtype": "uint32"}, -{ "fieldname": "unNewWindow_BrowserHandle", "fieldtype": "HHTMLBrowser"}]} +{ "fieldname": "unNewWindow_BrowserHandle_IGNORE", "fieldtype": "HHTMLBrowser"}]} ,{"struct": "HTML_SetCursor_t","fields": [ { "fieldname": "unBrowserHandle", "fieldtype": "HHTMLBrowser"}, { "fieldname": "eMouseCursor", "fieldtype": "uint32"}]} @@ -2068,38 +2596,6 @@ ,{"struct": "GetOPFSettingsResult_t","fields": [ { "fieldname": "m_eResult", "fieldtype": "enum EResult"}, { "fieldname": "m_unVideoAppID", "fieldtype": "AppId_t"}]} -,{"struct": "CSteamAPIContext","fields": [ -{ "fieldname": "m_pSteamClient", "fieldtype": "class ISteamClient *"}, -{ "fieldname": "m_pSteamUser", "fieldtype": "class ISteamUser *"}, -{ "fieldname": "m_pSteamFriends", "fieldtype": "class ISteamFriends *"}, -{ "fieldname": "m_pSteamUtils", "fieldtype": "class ISteamUtils *"}, -{ "fieldname": "m_pSteamMatchmaking", "fieldtype": "class ISteamMatchmaking *"}, -{ "fieldname": "m_pSteamUserStats", "fieldtype": "class ISteamUserStats *"}, -{ "fieldname": "m_pSteamApps", "fieldtype": "class ISteamApps *"}, -{ "fieldname": "m_pSteamMatchmakingServers", "fieldtype": "class ISteamMatchmakingServers *"}, -{ "fieldname": "m_pSteamNetworking", "fieldtype": "class ISteamNetworking *"}, -{ "fieldname": "m_pSteamRemoteStorage", "fieldtype": "class ISteamRemoteStorage *"}, -{ "fieldname": "m_pSteamScreenshots", "fieldtype": "class ISteamScreenshots *"}, -{ "fieldname": "m_pSteamHTTP", "fieldtype": "class ISteamHTTP *"}, -{ "fieldname": "m_pController", "fieldtype": "class ISteamController *"}, -{ "fieldname": "m_pSteamUGC", "fieldtype": "class ISteamUGC *"}, -{ "fieldname": "m_pSteamAppList", "fieldtype": "class ISteamAppList *"}, -{ "fieldname": "m_pSteamMusic", "fieldtype": "class ISteamMusic *"}, -{ "fieldname": "m_pSteamMusicRemote", "fieldtype": "class ISteamMusicRemote *"}, -{ "fieldname": "m_pSteamHTMLSurface", "fieldtype": "class ISteamHTMLSurface *"}, -{ "fieldname": "m_pSteamInventory", "fieldtype": "class ISteamInventory *"}, -{ "fieldname": "m_pSteamVideo", "fieldtype": "class ISteamVideo *"}, -{ "fieldname": "m_pSteamParentalSettings", "fieldtype": "class ISteamParentalSettings *"}]} -,{"struct": "CCallbackBase","fields": [ -{ "fieldname": "m_nCallbackFlags", "fieldtype": "uint8"}, -{ "fieldname": "m_iCallback", "fieldtype": "int"}]} -,{"struct": "CCallResult","fields": [ -{ "fieldname": "m_hAPICall", "fieldtype": "SteamAPICall_t"}, -{ "fieldname": "m_pObj", "fieldtype": "T *"}, -{ "fieldname": "m_Func", "fieldtype": "func_t"}]} -,{"struct": "CCallback","fields": [ -{ "fieldname": "m_pObj", "fieldtype": "T *"}, -{ "fieldname": "m_Func", "fieldtype": "func_t"}]} ,{"struct": "GSClientApprove_t","fields": [ { "fieldname": "m_SteamID", "fieldtype": "class CSteamID"}, { "fieldname": "m_OwnerSteamID", "fieldtype": "class CSteamID"}]} @@ -2328,6 +2824,16 @@ { "paramname": "pchVersion" ,"paramtype": "const char *"} ] } +,{ + "classname": "ISteamClient", + "methodname": "GetISteamGameSearch", + "returntype": "class ISteamGameSearch *", + "params": [ +{ "paramname": "hSteamuser" ,"paramtype": "HSteamUser"}, +{ "paramname": "hSteamPipe" ,"paramtype": "HSteamPipe"}, +{ "paramname": "pchVersion" ,"paramtype": "const char *"} + ] +} ,{ "classname": "ISteamClient", "methodname": "GetIPCCallCount", @@ -2446,6 +2952,26 @@ { "paramname": "pchVersion" ,"paramtype": "const char *"} ] } +,{ + "classname": "ISteamClient", + "methodname": "GetISteamInput", + "returntype": "class ISteamInput *", + "params": [ +{ "paramname": "hSteamUser" ,"paramtype": "HSteamUser"}, +{ "paramname": "hSteamPipe" ,"paramtype": "HSteamPipe"}, +{ "paramname": "pchVersion" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "ISteamClient", + "methodname": "GetISteamParties", + "returntype": "class ISteamParties *", + "params": [ +{ "paramname": "hSteamUser" ,"paramtype": "HSteamUser"}, +{ "paramname": "hSteamPipe" ,"paramtype": "HSteamPipe"}, +{ "paramname": "pchVersion" ,"paramtype": "const char *"} + ] +} ,{ "classname": "ISteamUser", "methodname": "GetHSteamUser", @@ -2677,6 +3203,11 @@ "methodname": "BIsPhoneRequiringVerification", "returntype": "bool" } +,{ + "classname": "ISteamUser", + "methodname": "GetMarketEligibility", "callresult": "MarketEligibilityResponse_t", + "returntype": "SteamAPICall_t" +} ,{ "classname": "ISteamFriends", "methodname": "GetPersonaName", @@ -2924,7 +3455,8 @@ "methodname": "ActivateGameOverlayToWebPage", "returntype": "void", "params": [ -{ "paramname": "pchURL" ,"paramtype": "const char *"} +{ "paramname": "pchURL" ,"paramtype": "const char *"}, +{ "paramname": "eMode" ,"paramtype": "EActivateGameOverlayToWebPageMode"} ] } ,{ @@ -3266,6 +3798,11 @@ { "paramname": "steamIDClan" ,"paramtype": "class CSteamID"} ] } +,{ + "classname": "ISteamFriends", + "methodname": "GetNumChatsWithUnreadPriorityMessages", + "returntype": "int" +} ,{ "classname": "ISteamUtils", "methodname": "GetSecondsSinceAppActive", @@ -4057,6 +4594,225 @@ { "paramname": "hServerQuery" ,"paramtype": "HServerQuery"} ] } +,{ + "classname": "ISteamGameSearch", + "methodname": "AddGameSearchParams", + "returntype": "EGameSearchErrorCode_t", + "params": [ +{ "paramname": "pchKeyToFind" ,"paramtype": "const char *"}, +{ "paramname": "pchValuesToFind" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "ISteamGameSearch", + "methodname": "SearchForGameWithLobby", + "returntype": "EGameSearchErrorCode_t", + "params": [ +{ "paramname": "steamIDLobby" ,"paramtype": "class CSteamID"}, +{ "paramname": "nPlayerMin" ,"paramtype": "int"}, +{ "paramname": "nPlayerMax" ,"paramtype": "int"} + ] +} +,{ + "classname": "ISteamGameSearch", + "methodname": "SearchForGameSolo", + "returntype": "EGameSearchErrorCode_t", + "params": [ +{ "paramname": "nPlayerMin" ,"paramtype": "int"}, +{ "paramname": "nPlayerMax" ,"paramtype": "int"} + ] +} +,{ + "classname": "ISteamGameSearch", + "methodname": "AcceptGame", + "returntype": "EGameSearchErrorCode_t" +} +,{ + "classname": "ISteamGameSearch", + "methodname": "DeclineGame", + "returntype": "EGameSearchErrorCode_t" +} +,{ + "classname": "ISteamGameSearch", + "methodname": "RetrieveConnectionDetails", + "returntype": "EGameSearchErrorCode_t", + "params": [ +{ "paramname": "steamIDHost" ,"paramtype": "class CSteamID"}, +{ "paramname": "pchConnectionDetails" ,"paramtype": "char *"}, +{ "paramname": "cubConnectionDetails" ,"paramtype": "int"} + ] +} +,{ + "classname": "ISteamGameSearch", + "methodname": "EndGameSearch", + "returntype": "EGameSearchErrorCode_t" +} +,{ + "classname": "ISteamGameSearch", + "methodname": "SetGameHostParams", + "returntype": "EGameSearchErrorCode_t", + "params": [ +{ "paramname": "pchKey" ,"paramtype": "const char *"}, +{ "paramname": "pchValue" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "ISteamGameSearch", + "methodname": "SetConnectionDetails", + "returntype": "EGameSearchErrorCode_t", + "params": [ +{ "paramname": "pchConnectionDetails" ,"paramtype": "const char *"}, +{ "paramname": "cubConnectionDetails" ,"paramtype": "int"} + ] +} +,{ + "classname": "ISteamGameSearch", + "methodname": "RequestPlayersForGame", + "returntype": "EGameSearchErrorCode_t", + "params": [ +{ "paramname": "nPlayerMin" ,"paramtype": "int"}, +{ "paramname": "nPlayerMax" ,"paramtype": "int"}, +{ "paramname": "nMaxTeamSize" ,"paramtype": "int"} + ] +} +,{ + "classname": "ISteamGameSearch", + "methodname": "HostConfirmGameStart", + "returntype": "EGameSearchErrorCode_t", + "params": [ +{ "paramname": "ullUniqueGameID" ,"paramtype": "uint64"} + ] +} +,{ + "classname": "ISteamGameSearch", + "methodname": "CancelRequestPlayersForGame", + "returntype": "EGameSearchErrorCode_t" +} +,{ + "classname": "ISteamGameSearch", + "methodname": "SubmitPlayerResult", + "returntype": "EGameSearchErrorCode_t", + "params": [ +{ "paramname": "ullUniqueGameID" ,"paramtype": "uint64"}, +{ "paramname": "steamIDPlayer" ,"paramtype": "class CSteamID"}, +{ "paramname": "EPlayerResult" ,"paramtype": "EPlayerResult_t"} + ] +} +,{ + "classname": "ISteamGameSearch", + "methodname": "EndGame", + "returntype": "EGameSearchErrorCode_t", + "params": [ +{ "paramname": "ullUniqueGameID" ,"paramtype": "uint64"} + ] +} +,{ + "classname": "ISteamParties", + "methodname": "GetNumActiveBeacons", + "returntype": "uint32" +} +,{ + "classname": "ISteamParties", + "methodname": "GetBeaconByIndex", + "returntype": "PartyBeaconID_t", + "params": [ +{ "paramname": "unIndex" ,"paramtype": "uint32"} + ] +} +,{ + "classname": "ISteamParties", + "methodname": "GetBeaconDetails", + "returntype": "bool", + "params": [ +{ "paramname": "ulBeaconID" ,"paramtype": "PartyBeaconID_t"}, +{ "paramname": "pSteamIDBeaconOwner" ,"paramtype": "class CSteamID *"}, +{ "paramname": "pLocation" ,"out_struct": " " ,"paramtype": "struct SteamPartyBeaconLocation_t *"}, +{ "paramname": "pchMetadata" ,"out_string_count": "cchMetadata" ,"paramtype": "char *"}, +{ "paramname": "cchMetadata" ,"paramtype": "int"} + ] +} +,{ + "classname": "ISteamParties", + "methodname": "JoinParty", "callresult": "JoinPartyCallback_t", + "returntype": "SteamAPICall_t", + "params": [ +{ "paramname": "ulBeaconID" ,"paramtype": "PartyBeaconID_t"} + ] +} +,{ + "classname": "ISteamParties", + "methodname": "GetNumAvailableBeaconLocations", + "returntype": "bool", + "params": [ +{ "paramname": "puNumLocations" ,"paramtype": "uint32 *"} + ] +} +,{ + "classname": "ISteamParties", + "methodname": "GetAvailableBeaconLocations", + "returntype": "bool", + "params": [ +{ "paramname": "pLocationList" ,"paramtype": "struct SteamPartyBeaconLocation_t *"}, +{ "paramname": "uMaxNumLocations" ,"paramtype": "uint32"} + ] +} +,{ + "classname": "ISteamParties", + "methodname": "CreateBeacon", "callresult": "CreateBeaconCallback_t", + "returntype": "SteamAPICall_t", + "params": [ +{ "paramname": "unOpenSlots" ,"paramtype": "uint32"}, +{ "paramname": "pBeaconLocation" ,"paramtype": "struct SteamPartyBeaconLocation_t *"}, +{ "paramname": "pchConnectString" ,"paramtype": "const char *"}, +{ "paramname": "pchMetadata" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "ISteamParties", + "methodname": "OnReservationCompleted", + "returntype": "void", + "params": [ +{ "paramname": "ulBeacon" ,"paramtype": "PartyBeaconID_t"}, +{ "paramname": "steamIDUser" ,"paramtype": "class CSteamID"} + ] +} +,{ + "classname": "ISteamParties", + "methodname": "CancelReservation", + "returntype": "void", + "params": [ +{ "paramname": "ulBeacon" ,"paramtype": "PartyBeaconID_t"}, +{ "paramname": "steamIDUser" ,"paramtype": "class CSteamID"} + ] +} +,{ + "classname": "ISteamParties", + "methodname": "ChangeNumOpenSlots", "callresult": "ChangeNumOpenSlotsCallback_t", + "returntype": "SteamAPICall_t", + "params": [ +{ "paramname": "ulBeacon" ,"paramtype": "PartyBeaconID_t"}, +{ "paramname": "unOpenSlots" ,"paramtype": "uint32"} + ] +} +,{ + "classname": "ISteamParties", + "methodname": "DestroyBeacon", + "returntype": "bool", + "params": [ +{ "paramname": "ulBeacon" ,"paramtype": "PartyBeaconID_t"} + ] +} +,{ + "classname": "ISteamParties", + "methodname": "GetBeaconLocationData", + "returntype": "bool", + "params": [ +{ "paramname": "BeaconLocation" ,"paramtype": "struct SteamPartyBeaconLocation_t"}, +{ "paramname": "eData" ,"paramtype": "ESteamPartyBeaconLocationData"}, +{ "paramname": "pchDataStringOut" ,"out_string_count": "cchDataStringOut" ,"paramtype": "char *"}, +{ "paramname": "cchDataStringOut" ,"paramtype": "int"} + ] +} ,{ "classname": "ISteamRemoteStorage", "methodname": "FileWrite", @@ -5113,6 +5869,20 @@ { "paramname": "pszFileName" ,"paramtype": "const char *"} ] } +,{ + "classname": "ISteamApps", + "methodname": "GetLaunchCommandLine", + "returntype": "int", + "params": [ +{ "paramname": "pszCommandLine" ,"paramtype": "char *"}, +{ "paramname": "cubCommandLine" ,"paramtype": "int"} + ] +} +,{ + "classname": "ISteamApps", + "methodname": "BIsSubscribedFromFamilySharing", + "returntype": "bool" +} ,{ "classname": "ISteamNetworking", "methodname": "SendP2PPacket", @@ -5918,6 +6688,289 @@ { "paramname": "pbWasTimedOut" ,"paramtype": "bool *"} ] } +,{ + "classname": "ISteamInput", + "methodname": "Init", + "returntype": "bool" +} +,{ + "classname": "ISteamInput", + "methodname": "Shutdown", + "returntype": "bool" +} +,{ + "classname": "ISteamInput", + "methodname": "RunFrame", + "returntype": "void" +} +,{ + "classname": "ISteamInput", + "methodname": "GetConnectedControllers", + "returntype": "int", + "params": [ +{ "paramname": "handlesOut" ,"paramtype": "InputHandle_t *"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetActionSetHandle", + "returntype": "InputActionSetHandle_t", + "params": [ +{ "paramname": "pszActionSetName" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "ActivateActionSet", + "returntype": "void", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "actionSetHandle" ,"paramtype": "InputActionSetHandle_t"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetCurrentActionSet", + "returntype": "InputActionSetHandle_t", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "ActivateActionSetLayer", + "returntype": "void", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "actionSetLayerHandle" ,"paramtype": "InputActionSetHandle_t"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "DeactivateActionSetLayer", + "returntype": "void", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "actionSetLayerHandle" ,"paramtype": "InputActionSetHandle_t"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "DeactivateAllActionSetLayers", + "returntype": "void", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetActiveActionSetLayers", + "returntype": "int", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "handlesOut" ,"paramtype": "InputActionSetHandle_t *"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetDigitalActionHandle", + "returntype": "InputDigitalActionHandle_t", + "params": [ +{ "paramname": "pszActionName" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetDigitalActionData", + "returntype": "struct InputDigitalActionData_t", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "digitalActionHandle" ,"paramtype": "InputDigitalActionHandle_t"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetDigitalActionOrigins", + "returntype": "int", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "actionSetHandle" ,"paramtype": "InputActionSetHandle_t"}, +{ "paramname": "digitalActionHandle" ,"paramtype": "InputDigitalActionHandle_t"}, +{ "paramname": "originsOut" ,"paramtype": "EInputActionOrigin *"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetAnalogActionHandle", + "returntype": "InputAnalogActionHandle_t", + "params": [ +{ "paramname": "pszActionName" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetAnalogActionData", + "returntype": "struct InputAnalogActionData_t", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "analogActionHandle" ,"paramtype": "InputAnalogActionHandle_t"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetAnalogActionOrigins", + "returntype": "int", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "actionSetHandle" ,"paramtype": "InputActionSetHandle_t"}, +{ "paramname": "analogActionHandle" ,"paramtype": "InputAnalogActionHandle_t"}, +{ "paramname": "originsOut" ,"paramtype": "EInputActionOrigin *"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetGlyphForActionOrigin", + "returntype": "const char *", + "params": [ +{ "paramname": "eOrigin" ,"paramtype": "EInputActionOrigin"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetStringForActionOrigin", + "returntype": "const char *", + "params": [ +{ "paramname": "eOrigin" ,"paramtype": "EInputActionOrigin"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "StopAnalogActionMomentum", + "returntype": "void", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "eAction" ,"paramtype": "InputAnalogActionHandle_t"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetMotionData", + "returntype": "struct InputMotionData_t", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "TriggerVibration", + "returntype": "void", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "usLeftSpeed" ,"paramtype": "unsigned short"}, +{ "paramname": "usRightSpeed" ,"paramtype": "unsigned short"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "SetLEDColor", + "returntype": "void", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "nColorR" ,"paramtype": "uint8"}, +{ "paramname": "nColorG" ,"paramtype": "uint8"}, +{ "paramname": "nColorB" ,"paramtype": "uint8"}, +{ "paramname": "nFlags" ,"paramtype": "unsigned int"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "TriggerHapticPulse", + "returntype": "void", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "eTargetPad" ,"paramtype": "ESteamControllerPad"}, +{ "paramname": "usDurationMicroSec" ,"paramtype": "unsigned short"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "TriggerRepeatedHapticPulse", + "returntype": "void", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "eTargetPad" ,"paramtype": "ESteamControllerPad"}, +{ "paramname": "usDurationMicroSec" ,"paramtype": "unsigned short"}, +{ "paramname": "usOffMicroSec" ,"paramtype": "unsigned short"}, +{ "paramname": "unRepeat" ,"paramtype": "unsigned short"}, +{ "paramname": "nFlags" ,"paramtype": "unsigned int"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "ShowBindingPanel", + "returntype": "bool", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetInputTypeForHandle", + "returntype": "ESteamInputType", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetControllerForGamepadIndex", + "returntype": "InputHandle_t", + "params": [ +{ "paramname": "nIndex" ,"paramtype": "int"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetGamepadIndexForController", + "returntype": "int", + "params": [ +{ "paramname": "ulinputHandle" ,"paramtype": "InputHandle_t"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetStringForXboxOrigin", + "returntype": "const char *", + "params": [ +{ "paramname": "eOrigin" ,"paramtype": "EXboxOrigin"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetGlyphForXboxOrigin", + "returntype": "const char *", + "params": [ +{ "paramname": "eOrigin" ,"paramtype": "EXboxOrigin"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "GetActionOriginFromXboxOrigin", + "returntype": "EInputActionOrigin", + "params": [ +{ "paramname": "inputHandle" ,"paramtype": "InputHandle_t"}, +{ "paramname": "eOrigin" ,"paramtype": "EXboxOrigin"} + ] +} +,{ + "classname": "ISteamInput", + "methodname": "TranslateActionOrigin", + "returntype": "EInputActionOrigin", + "params": [ +{ "paramname": "eDestinationInputType" ,"paramtype": "ESteamInputType"}, +{ "paramname": "eSourceOrigin" ,"paramtype": "EInputActionOrigin"} + ] +} ,{ "classname": "ISteamController", "methodname": "Init", @@ -5941,14 +6994,6 @@ { "paramname": "handlesOut" ,"paramtype": "ControllerHandle_t *"} ] } -,{ - "classname": "ISteamController", - "methodname": "ShowBindingPanel", - "returntype": "bool", - "params": [ -{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"} - ] -} ,{ "classname": "ISteamController", "methodname": "GetActionSetHandle", @@ -6020,7 +7065,7 @@ ,{ "classname": "ISteamController", "methodname": "GetDigitalActionData", - "returntype": "struct ControllerDigitalActionData_t", + "returntype": "struct InputDigitalActionData_t", "params": [ { "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"}, { "paramname": "digitalActionHandle" ,"paramtype": "ControllerDigitalActionHandle_t"} @@ -6048,7 +7093,7 @@ ,{ "classname": "ISteamController", "methodname": "GetAnalogActionData", - "returntype": "struct ControllerAnalogActionData_t", + "returntype": "struct InputAnalogActionData_t", "params": [ { "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"}, { "paramname": "analogActionHandle" ,"paramtype": "ControllerAnalogActionHandle_t"} @@ -6065,6 +7110,22 @@ { "paramname": "originsOut" ,"paramtype": "EControllerActionOrigin *"} ] } +,{ + "classname": "ISteamController", + "methodname": "GetGlyphForActionOrigin", + "returntype": "const char *", + "params": [ +{ "paramname": "eOrigin" ,"paramtype": "EControllerActionOrigin"} + ] +} +,{ + "classname": "ISteamController", + "methodname": "GetStringForActionOrigin", + "returntype": "const char *", + "params": [ +{ "paramname": "eOrigin" ,"paramtype": "EControllerActionOrigin"} + ] +} ,{ "classname": "ISteamController", "methodname": "StopAnalogActionMomentum", @@ -6074,6 +7135,14 @@ { "paramname": "eAction" ,"paramtype": "ControllerAnalogActionHandle_t"} ] } +,{ + "classname": "ISteamController", + "methodname": "GetMotionData", + "returntype": "struct InputMotionData_t", + "params": [ +{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"} + ] +} ,{ "classname": "ISteamController", "methodname": "TriggerHapticPulse", @@ -6121,10 +7190,18 @@ } ,{ "classname": "ISteamController", - "methodname": "GetGamepadIndexForController", - "returntype": "int", + "methodname": "ShowBindingPanel", + "returntype": "bool", "params": [ -{ "paramname": "ulControllerHandle" ,"paramtype": "ControllerHandle_t"} +{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"} + ] +} +,{ + "classname": "ISteamController", + "methodname": "GetInputTypeForHandle", + "returntype": "ESteamInputType", + "params": [ +{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"} ] } ,{ @@ -6137,58 +7214,44 @@ } ,{ "classname": "ISteamController", - "methodname": "GetMotionData", - "returntype": "struct ControllerMotionData_t", + "methodname": "GetGamepadIndexForController", + "returntype": "int", "params": [ -{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"} +{ "paramname": "ulControllerHandle" ,"paramtype": "ControllerHandle_t"} ] } ,{ "classname": "ISteamController", - "methodname": "ShowDigitalActionOrigins", - "returntype": "bool", - "params": [ -{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"}, -{ "paramname": "digitalActionHandle" ,"paramtype": "ControllerDigitalActionHandle_t"}, -{ "paramname": "flScale" ,"paramtype": "float"}, -{ "paramname": "flXPosition" ,"paramtype": "float"}, -{ "paramname": "flYPosition" ,"paramtype": "float"} - ] -} -,{ - "classname": "ISteamController", - "methodname": "ShowAnalogActionOrigins", - "returntype": "bool", - "params": [ -{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"}, -{ "paramname": "analogActionHandle" ,"paramtype": "ControllerAnalogActionHandle_t"}, -{ "paramname": "flScale" ,"paramtype": "float"}, -{ "paramname": "flXPosition" ,"paramtype": "float"}, -{ "paramname": "flYPosition" ,"paramtype": "float"} - ] -} -,{ - "classname": "ISteamController", - "methodname": "GetStringForActionOrigin", + "methodname": "GetStringForXboxOrigin", "returntype": "const char *", "params": [ -{ "paramname": "eOrigin" ,"paramtype": "EControllerActionOrigin"} +{ "paramname": "eOrigin" ,"paramtype": "EXboxOrigin"} ] } ,{ "classname": "ISteamController", - "methodname": "GetGlyphForActionOrigin", + "methodname": "GetGlyphForXboxOrigin", "returntype": "const char *", "params": [ -{ "paramname": "eOrigin" ,"paramtype": "EControllerActionOrigin"} +{ "paramname": "eOrigin" ,"paramtype": "EXboxOrigin"} ] } ,{ "classname": "ISteamController", - "methodname": "GetInputTypeForHandle", - "returntype": "ESteamInputType", + "methodname": "GetActionOriginFromXboxOrigin", + "returntype": "EControllerActionOrigin", "params": [ -{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"} +{ "paramname": "controllerHandle" ,"paramtype": "ControllerHandle_t"}, +{ "paramname": "eOrigin" ,"paramtype": "EXboxOrigin"} + ] +} +,{ + "classname": "ISteamController", + "methodname": "TranslateActionOrigin", + "returntype": "EControllerActionOrigin", + "params": [ +{ "paramname": "eDestinationInputType" ,"paramtype": "ESteamInputType"}, +{ "paramname": "eSourceOrigin" ,"paramtype": "EControllerActionOrigin"} ] } ,{ @@ -6217,6 +7280,18 @@ { "paramname": "unPage" ,"paramtype": "uint32"} ] } +,{ + "classname": "ISteamUGC", + "methodname": "CreateQueryAllUGCRequest", + "returntype": "UGCQueryHandle_t", + "params": [ +{ "paramname": "eQueryType" ,"paramtype": "EUGCQuery"}, +{ "paramname": "eMatchingeMatchingUGCTypeFileType" ,"paramtype": "EUGCMatchingUGCType"}, +{ "paramname": "nCreatorAppID" ,"paramtype": "AppId_t"}, +{ "paramname": "nConsumerAppID" ,"paramtype": "AppId_t"}, +{ "paramname": "pchCursor" ,"paramtype": "const char *"} + ] +} ,{ "classname": "ISteamUGC", "methodname": "CreateQueryUGCDetailsRequest", @@ -6596,6 +7671,15 @@ { "paramname": "pszPreviewFile" ,"paramtype": "const char *"} ] } +,{ + "classname": "ISteamUGC", + "methodname": "SetAllowLegacyUpload", + "returntype": "bool", + "params": [ +{ "paramname": "handle" ,"paramtype": "UGCUpdateHandle_t"}, +{ "paramname": "bAllowLegacyUpload" ,"paramtype": "bool"} + ] +} ,{ "classname": "ISteamUGC", "methodname": "RemoveItemKeyValueTags", @@ -7076,7 +8160,8 @@ "params": [ { "paramname": "unBrowserHandle" ,"paramtype": "HHTMLBrowser"}, { "paramname": "nNativeKeyCode" ,"paramtype": "uint32"}, -{ "paramname": "eHTMLKeyModifiers" ,"paramtype": "ISteamHTMLSurface::EHTMLKeyModifiers"} +{ "paramname": "eHTMLKeyModifiers" ,"paramtype": "ISteamHTMLSurface::EHTMLKeyModifiers"}, +{ "paramname": "bIsSystemKey" ,"paramtype": "bool"} ] } ,{ @@ -7222,6 +8307,14 @@ { "paramname": "flDPIScaling" ,"paramtype": "float"} ] } +,{ + "classname": "ISteamHTMLSurface", + "methodname": "OpenDeveloperTools", + "returntype": "void", + "params": [ +{ "paramname": "unBrowserHandle" ,"paramtype": "HHTMLBrowser"} + ] +} ,{ "classname": "ISteamHTMLSurface", "methodname": "AllowStartRequest", @@ -7505,7 +8598,8 @@ "returntype": "bool", "params": [ { "paramname": "pArrayItemDefs" ,"out_array_count": "pArrayItemDefs" ,"desc": "Items with prices" ,"paramtype": "SteamItemDef_t *"}, -{ "paramname": "pPrices" ,"out_array_count": "pPrices" ,"desc": "List of prices for the given item defs" ,"paramtype": "uint64 *"}, +{ "paramname": "pCurrentPrices" ,"out_array_count": "pPrices" ,"desc": "List of prices for the given item defs" ,"paramtype": "uint64 *"}, +{ "paramname": "pBasePrices" ,"out_array_count": "pPrices" ,"desc": "List of prices for the given item defs" ,"paramtype": "uint64 *"}, { "paramname": "unArrayLength" ,"paramtype": "uint32"} ] } @@ -7515,7 +8609,8 @@ "returntype": "bool", "params": [ { "paramname": "iDefinition" ,"paramtype": "SteamItemDef_t"}, -{ "paramname": "pPrice" ,"paramtype": "uint64 *"} +{ "paramname": "pCurrentPrice" ,"paramtype": "uint64 *"}, +{ "paramname": "pBasePrice" ,"paramtype": "uint64 *"} ] } ,{ diff --git a/public/steam/steam_api_common.h b/public/steam/steam_api_common.h new file mode 100644 index 0000000..cc936de --- /dev/null +++ b/public/steam/steam_api_common.h @@ -0,0 +1,231 @@ +//====== Copyright Valve Corporation, All rights reserved. ==================== +// +// Steamworks SDK minimal include +// +// Defines the minimal set of things we need to use any single interface +// or register for any callback. +// +//============================================================================= + +#ifndef STEAM_API_COMMON_H +#define STEAM_API_COMMON_H +#ifdef _WIN32 +#pragma once +#endif + +#include "steamtypes.h" +#include "steamclientpublic.h" + +// S_API defines the linkage and calling conventions for steam_api.dll exports +#if defined( _WIN32 ) && !defined( _X360 ) + #if defined( STEAM_API_EXPORTS ) + #define S_API extern "C" __declspec( dllexport ) + #elif defined( STEAM_API_NODLL ) + #define S_API extern "C" + #else + #define S_API extern "C" __declspec( dllimport ) + #endif // STEAM_API_EXPORTS +#elif defined( GNUC ) + #if defined( STEAM_API_EXPORTS ) + #define S_API extern "C" __attribute__ ((visibility("default"))) + #else + #define S_API extern "C" + #endif // STEAM_API_EXPORTS +#else // !WIN32 + #if defined( STEAM_API_EXPORTS ) + #define S_API extern "C" + #else + #define S_API extern "C" + #endif // STEAM_API_EXPORTS +#endif + +#if ( defined(STEAM_API_EXPORTS) || defined(STEAM_API_NODLL) ) && !defined(API_GEN) +#define STEAM_PRIVATE_API( ... ) __VA_ARGS__ +#elif defined(STEAM_API_EXPORTS) && defined(API_GEN) +#define STEAM_PRIVATE_API( ... ) +#else +#define STEAM_PRIVATE_API( ... ) protected: __VA_ARGS__ public: +#endif + +// handle to a communication pipe to the Steam client +typedef int32 HSteamPipe; +// handle to single instance of a steam user +typedef int32 HSteamUser; +// function prototype +#if defined( POSIX ) +#define __cdecl +#endif +extern "C" typedef void (__cdecl *SteamAPIWarningMessageHook_t)(int, const char *); +extern "C" typedef uint32 ( *SteamAPI_CheckCallbackRegistered_t )( int iCallbackNum ); +#if defined( __SNC__ ) + #pragma diag_suppress=1700 // warning 1700: class "%s" has virtual functions but non-virtual destructor +#endif + +//----------------------------------------------------------------------------------------------------------------------------------------------------------// +// steam callback and call-result helpers +// +// The following macros and classes are used to register your application for +// callbacks and call-results, which are delivered in a predictable manner. +// +// STEAM_CALLBACK macros are meant for use inside of a C++ class definition. +// They map a Steam notification callback directly to a class member function +// which is automatically prototyped as "void func( callback_type *pParam )". +// +// CCallResult is used with specific Steam APIs that return "result handles". +// The handle can be passed to a CCallResult object's Set function, along with +// an object pointer and member-function pointer. The member function will +// be executed once the results of the Steam API call are available. +// +// CCallback and CCallbackManual classes can be used instead of STEAM_CALLBACK +// macros if you require finer control over registration and unregistration. +// +// Callbacks and call-results are queued automatically and are only +// delivered/executed when your application calls SteamAPI_RunCallbacks(). +//----------------------------------------------------------------------------------------------------------------------------------------------------------// + +// Dispatch all queued Steamworks callbacks. +// +// This is safe to call from multiple threads simultaneously, +// but if you choose to do this, callback code could be executed on any thread. +// One alternative is to call SteamAPI_RunCallbacks from the main thread only, +// and call SteamAPI_ReleaseCurrentThreadMemory regularly on other threads. +S_API void S_CALLTYPE SteamAPI_RunCallbacks(); + +// Declares a callback member function plus a helper member variable which +// registers the callback on object creation and unregisters on destruction. +// The optional fourth 'var' param exists only for backwards-compatibility +// and can be ignored. +#define STEAM_CALLBACK( thisclass, func, .../*callback_type, [deprecated] var*/ ) \ + _STEAM_CALLBACK_SELECT( ( __VA_ARGS__, 4, 3 ), ( /**/, thisclass, func, __VA_ARGS__ ) ) + +// Declares a callback function and a named CCallbackManual variable which +// has Register and Unregister functions instead of automatic registration. +#define STEAM_CALLBACK_MANUAL( thisclass, func, callback_type, var ) \ + CCallbackManual< thisclass, callback_type > var; void func( callback_type *pParam ) + +// Dispatch callbacks relevant to the gameserver client and interfaces. +// To register for these, you need to use STEAM_GAMESERVER_CALLBACK. +// (Or call SetGameserverFlag on your CCallbackBase object.) +S_API void S_CALLTYPE SteamGameServer_RunCallbacks(); + +// Same as STEAM_CALLBACK, but for callbacks on the gameserver interface. +// These will be dispatched during SteamGameServer_RunCallbacks +#define STEAM_GAMESERVER_CALLBACK( thisclass, func, /*callback_type, [deprecated] var*/... ) \ + _STEAM_CALLBACK_SELECT( ( __VA_ARGS__, GS, 3 ), ( this->SetGameserverFlag();, thisclass, func, __VA_ARGS__ ) ) +#define STEAM_GAMESERVER_CALLBACK_MANUAL( thisclass, func, callback_type, var ) \ + CCallbackManual< thisclass, callback_type, true > var; void func( callback_type *pParam ) + +//----------------------------------------------------------------------------- +// Purpose: base for callbacks and call results - internal implementation detail +//----------------------------------------------------------------------------- +class CCallbackBase +{ +public: + CCallbackBase() { m_nCallbackFlags = 0; m_iCallback = 0; } + // don't add a virtual destructor because we export this binary interface across dll's + virtual void Run( void *pvParam ) = 0; + virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall ) = 0; + int GetICallback() { return m_iCallback; } + virtual int GetCallbackSizeBytes() = 0; + +protected: + enum { k_ECallbackFlagsRegistered = 0x01, k_ECallbackFlagsGameServer = 0x02 }; + uint8 m_nCallbackFlags; + int m_iCallback; + friend class CCallbackMgr; + +private: + CCallbackBase( const CCallbackBase& ); + CCallbackBase& operator=( const CCallbackBase& ); +}; + +//----------------------------------------------------------------------------- +// Purpose: templated base for callbacks - internal implementation detail +//----------------------------------------------------------------------------- +template< int sizeof_P > +class CCallbackImpl : protected CCallbackBase +{ +public: + virtual ~CCallbackImpl() { if ( m_nCallbackFlags & k_ECallbackFlagsRegistered ) SteamAPI_UnregisterCallback( this ); } + void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; } + +protected: + virtual void Run( void *pvParam ) = 0; + virtual void Run( void *pvParam, bool /*bIOFailure*/, SteamAPICall_t /*hSteamAPICall*/ ) { Run( pvParam ); } + virtual int GetCallbackSizeBytes() { return sizeof_P; } +}; + + +//----------------------------------------------------------------------------- +// Purpose: maps a steam async call result to a class member function +// template params: T = local class, P = parameter struct +//----------------------------------------------------------------------------- +template< class T, class P > +class CCallResult : private CCallbackBase +{ +public: + typedef void (T::*func_t)( P*, bool ); + + CCallResult(); + ~CCallResult(); + + void Set( SteamAPICall_t hAPICall, T *p, func_t func ); + bool IsActive() const; + void Cancel(); + + void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; } +private: + virtual void Run( void *pvParam ); + virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall ); + virtual int GetCallbackSizeBytes() { return sizeof( P ); } + + SteamAPICall_t m_hAPICall; + T *m_pObj; + func_t m_Func; +}; + + + +//----------------------------------------------------------------------------- +// Purpose: maps a steam callback to a class member function +// template params: T = local class, P = parameter struct, +// bGameserver = listen for gameserver callbacks instead of client callbacks +//----------------------------------------------------------------------------- +template< class T, class P, bool bGameserver = false > +class CCallback : public CCallbackImpl< sizeof( P ) > +{ +public: + typedef void (T::*func_t)(P*); + + // NOTE: If you can't provide the correct parameters at construction time, you should + // use the CCallbackManual callback object (STEAM_CALLBACK_MANUAL macro) instead. + CCallback( T *pObj, func_t func ); + + void Register( T *pObj, func_t func ); + void Unregister(); + +protected: + virtual void Run( void *pvParam ); + + T *m_pObj; + func_t m_Func; +}; + + +//----------------------------------------------------------------------------- +// Purpose: subclass of CCallback which allows default-construction in +// an unregistered state; you must call Register manually +//----------------------------------------------------------------------------- +template< class T, class P, bool bGameServer = false > +class CCallbackManual : public CCallback< T, P, bGameServer > +{ +public: + CCallbackManual() : CCallback< T, P, bGameServer >( nullptr, nullptr ) {} + + // Inherits public Register and Unregister functions from base class +}; + +// Internal implementation details for all of the above +#include "steam_api_internal.h" + +#endif // STEAM_API_COMMON_H diff --git a/public/steam/steam_api_flat.h b/public/steam/steam_api_flat.h index 45ba7c3..b8c579e 100644 --- a/public/steam/steam_api_flat.h +++ b/public/steam/steam_api_flat.h @@ -42,6 +42,7 @@ typedef uint32 AccountID_t; typedef uint32 PartnerId_t; typedef uint64 ManifestId_t; typedef uint64 SiteId_t; +typedef uint64 PartyBeaconID_t; typedef uint32 HAuthTicket; typedef void * BREAKPAD_HANDLE; typedef char compile_time_assert_type[1]; @@ -62,6 +63,10 @@ typedef uint32 SNetListenSocket_t; typedef uint32 ScreenshotHandle; typedef uint32 HTTPRequestHandle; typedef uint32 HTTPCookieContainerHandle; +typedef uint64 InputHandle_t; +typedef uint64 InputActionSetHandle_t; +typedef uint64 InputDigitalActionHandle_t; +typedef uint64 InputAnalogActionHandle_t; typedef uint64 ControllerHandle_t; typedef uint64 ControllerActionSetHandle_t; typedef uint64 ControllerDigitalActionHandle_t; @@ -86,6 +91,8 @@ int const_k_iClientUserCallbacks = 900; int const_k_iSteamAppsCallbacks = 1000; int const_k_iSteamUserStatsCallbacks = 1100; int const_k_iSteamNetworkingCallbacks = 1200; +int const_k_iSteamNetworkingSocketsCallbacks = 1220; +int const_k_iSteamNetworkingMessagesCallbacks = 1250; int const_k_iClientRemoteStorageCallbacks = 1300; int const_k_iClientDepotBuilderCallbacks = 1400; int const_k_iSteamGameServerItemsCallbacks = 1500; @@ -125,9 +132,12 @@ int const_k_iClientBluetoothManagerCallbacks = 4800; int const_k_iClientSharedConnectionCallbacks = 4900; int const_k_ISteamParentalSettingsCallbacks = 5000; int const_k_iClientShaderCallbacks = 5100; +int const_k_iSteamGameSearchCallbacks = 5200; +int const_k_iSteamPartiesCallbacks = 5300; +int const_k_iClientPartiesCallbacks = 5400; int const_k_cchPersonaNameMax = 128; int const_k_cwchPersonaNameMax = 32; -int const_k_cchMaxRichPresenceKeys = 20; +int const_k_cchMaxRichPresenceKeys = 30; int const_k_cchMaxRichPresenceKeyLength = 64; int const_k_cchMaxRichPresenceValueLength = 256; int const_k_cchStatNameMax = 128; @@ -162,6 +172,7 @@ S_API class ISteamApps * SteamAPI_ISteamClient_GetISteamApps(intptr_t instancePt S_API class ISteamNetworking * SteamAPI_ISteamClient_GetISteamNetworking(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion); S_API class ISteamRemoteStorage * SteamAPI_ISteamClient_GetISteamRemoteStorage(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion); S_API class ISteamScreenshots * SteamAPI_ISteamClient_GetISteamScreenshots(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion); +S_API class ISteamGameSearch * SteamAPI_ISteamClient_GetISteamGameSearch(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion); S_API uint32 SteamAPI_ISteamClient_GetIPCCallCount(intptr_t instancePtr); S_API void SteamAPI_ISteamClient_SetWarningMessageHook(intptr_t instancePtr, SteamAPIWarningMessageHook_t pFunction); S_API bool SteamAPI_ISteamClient_BShutdownIfAllPipesClosed(intptr_t instancePtr); @@ -175,6 +186,8 @@ S_API class ISteamHTMLSurface * SteamAPI_ISteamClient_GetISteamHTMLSurface(intpt S_API class ISteamInventory * SteamAPI_ISteamClient_GetISteamInventory(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion); S_API class ISteamVideo * SteamAPI_ISteamClient_GetISteamVideo(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion); S_API class ISteamParentalSettings * SteamAPI_ISteamClient_GetISteamParentalSettings(intptr_t instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char * pchVersion); +S_API class ISteamInput * SteamAPI_ISteamClient_GetISteamInput(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion); +S_API class ISteamParties * SteamAPI_ISteamClient_GetISteamParties(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion); S_API HSteamUser SteamAPI_ISteamUser_GetHSteamUser(intptr_t instancePtr); S_API bool SteamAPI_ISteamUser_BLoggedOn(intptr_t instancePtr); S_API uint64 SteamAPI_ISteamUser_GetSteamID(intptr_t instancePtr); @@ -204,6 +217,7 @@ S_API bool SteamAPI_ISteamUser_BIsPhoneVerified(intptr_t instancePtr); S_API bool SteamAPI_ISteamUser_BIsTwoFactorEnabled(intptr_t instancePtr); S_API bool SteamAPI_ISteamUser_BIsPhoneIdentifying(intptr_t instancePtr); S_API bool SteamAPI_ISteamUser_BIsPhoneRequiringVerification(intptr_t instancePtr); +S_API SteamAPICall_t SteamAPI_ISteamUser_GetMarketEligibility(intptr_t instancePtr); S_API const char * SteamAPI_ISteamFriends_GetPersonaName(intptr_t instancePtr); S_API SteamAPICall_t SteamAPI_ISteamFriends_SetPersonaName(intptr_t instancePtr, const char * pchPersonaName); S_API EPersonaState SteamAPI_ISteamFriends_GetPersonaState(intptr_t instancePtr); @@ -234,7 +248,7 @@ S_API bool SteamAPI_ISteamFriends_IsUserInSource(intptr_t instancePtr, class CSt S_API void SteamAPI_ISteamFriends_SetInGameVoiceSpeaking(intptr_t instancePtr, class CSteamID steamIDUser, bool bSpeaking); S_API void SteamAPI_ISteamFriends_ActivateGameOverlay(intptr_t instancePtr, const char * pchDialog); S_API void SteamAPI_ISteamFriends_ActivateGameOverlayToUser(intptr_t instancePtr, const char * pchDialog, class CSteamID steamID); -S_API void SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(intptr_t instancePtr, const char * pchURL); +S_API void SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(intptr_t instancePtr, const char * pchURL, EActivateGameOverlayToWebPageMode eMode); S_API void SteamAPI_ISteamFriends_ActivateGameOverlayToStore(intptr_t instancePtr, AppId_t nAppID, EOverlayToStoreFlag eFlag); S_API void SteamAPI_ISteamFriends_SetPlayedWith(intptr_t instancePtr, class CSteamID steamIDUserPlayedWith); S_API void SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialog(intptr_t instancePtr, class CSteamID steamIDLobby); @@ -276,6 +290,7 @@ S_API SteamAPICall_t SteamAPI_ISteamFriends_IsFollowing(intptr_t instancePtr, cl S_API SteamAPICall_t SteamAPI_ISteamFriends_EnumerateFollowingList(intptr_t instancePtr, uint32 unStartIndex); S_API bool SteamAPI_ISteamFriends_IsClanPublic(intptr_t instancePtr, class CSteamID steamIDClan); S_API bool SteamAPI_ISteamFriends_IsClanOfficialGameGroup(intptr_t instancePtr, class CSteamID steamIDClan); +S_API int SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages(intptr_t instancePtr); S_API uint32 SteamAPI_ISteamUtils_GetSecondsSinceAppActive(intptr_t instancePtr); S_API uint32 SteamAPI_ISteamUtils_GetSecondsSinceComputerActive(intptr_t instancePtr); S_API EUniverse SteamAPI_ISteamUtils_GetConnectedUniverse(intptr_t instancePtr); @@ -371,6 +386,32 @@ S_API HServerQuery SteamAPI_ISteamMatchmakingServers_PingServer(intptr_t instanc S_API HServerQuery SteamAPI_ISteamMatchmakingServers_PlayerDetails(intptr_t instancePtr, uint32 unIP, uint16 usPort, class ISteamMatchmakingPlayersResponse * pRequestServersResponse); S_API HServerQuery SteamAPI_ISteamMatchmakingServers_ServerRules(intptr_t instancePtr, uint32 unIP, uint16 usPort, class ISteamMatchmakingRulesResponse * pRequestServersResponse); S_API void SteamAPI_ISteamMatchmakingServers_CancelServerQuery(intptr_t instancePtr, HServerQuery hServerQuery); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_AddGameSearchParams(intptr_t instancePtr, const char * pchKeyToFind, const char * pchValuesToFind); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_SearchForGameWithLobby(intptr_t instancePtr, class CSteamID steamIDLobby, int nPlayerMin, int nPlayerMax); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_SearchForGameSolo(intptr_t instancePtr, int nPlayerMin, int nPlayerMax); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_AcceptGame(intptr_t instancePtr); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_DeclineGame(intptr_t instancePtr); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_RetrieveConnectionDetails(intptr_t instancePtr, class CSteamID steamIDHost, char * pchConnectionDetails, int cubConnectionDetails); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_EndGameSearch(intptr_t instancePtr); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_SetGameHostParams(intptr_t instancePtr, const char * pchKey, const char * pchValue); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_SetConnectionDetails(intptr_t instancePtr, const char * pchConnectionDetails, int cubConnectionDetails); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_RequestPlayersForGame(intptr_t instancePtr, int nPlayerMin, int nPlayerMax, int nMaxTeamSize); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_HostConfirmGameStart(intptr_t instancePtr, uint64 ullUniqueGameID); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame(intptr_t instancePtr); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_SubmitPlayerResult(intptr_t instancePtr, uint64 ullUniqueGameID, class CSteamID steamIDPlayer, EPlayerResult_t EPlayerResult); +S_API EGameSearchErrorCode_t SteamAPI_ISteamGameSearch_EndGame(intptr_t instancePtr, uint64 ullUniqueGameID); +S_API uint32 SteamAPI_ISteamParties_GetNumActiveBeacons(intptr_t instancePtr); +S_API PartyBeaconID_t SteamAPI_ISteamParties_GetBeaconByIndex(intptr_t instancePtr, uint32 unIndex); +S_API bool SteamAPI_ISteamParties_GetBeaconDetails(intptr_t instancePtr, PartyBeaconID_t ulBeaconID, class CSteamID * pSteamIDBeaconOwner, struct SteamPartyBeaconLocation_t * pLocation, char * pchMetadata, int cchMetadata); +S_API SteamAPICall_t SteamAPI_ISteamParties_JoinParty(intptr_t instancePtr, PartyBeaconID_t ulBeaconID); +S_API bool SteamAPI_ISteamParties_GetNumAvailableBeaconLocations(intptr_t instancePtr, uint32 * puNumLocations); +S_API bool SteamAPI_ISteamParties_GetAvailableBeaconLocations(intptr_t instancePtr, struct SteamPartyBeaconLocation_t * pLocationList, uint32 uMaxNumLocations); +S_API SteamAPICall_t SteamAPI_ISteamParties_CreateBeacon(intptr_t instancePtr, uint32 unOpenSlots, struct SteamPartyBeaconLocation_t * pBeaconLocation, const char * pchConnectString, const char * pchMetadata); +S_API void SteamAPI_ISteamParties_OnReservationCompleted(intptr_t instancePtr, PartyBeaconID_t ulBeacon, class CSteamID steamIDUser); +S_API void SteamAPI_ISteamParties_CancelReservation(intptr_t instancePtr, PartyBeaconID_t ulBeacon, class CSteamID steamIDUser); +S_API SteamAPICall_t SteamAPI_ISteamParties_ChangeNumOpenSlots(intptr_t instancePtr, PartyBeaconID_t ulBeacon, uint32 unOpenSlots); +S_API bool SteamAPI_ISteamParties_DestroyBeacon(intptr_t instancePtr, PartyBeaconID_t ulBeacon); +S_API bool SteamAPI_ISteamParties_GetBeaconLocationData(intptr_t instancePtr, struct SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, char * pchDataStringOut, int cchDataStringOut); S_API bool SteamAPI_ISteamRemoteStorage_FileWrite(intptr_t instancePtr, const char * pchFile, const void * pvData, int32 cubData); S_API int32 SteamAPI_ISteamRemoteStorage_FileRead(intptr_t instancePtr, const char * pchFile, void * pvData, int32 cubDataToRead); S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_FileWriteAsync(intptr_t instancePtr, const char * pchFile, const void * pvData, uint32 cubData); @@ -495,6 +536,8 @@ S_API bool SteamAPI_ISteamApps_GetDlcDownloadProgress(intptr_t instancePtr, AppI S_API int SteamAPI_ISteamApps_GetAppBuildId(intptr_t instancePtr); S_API void SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys(intptr_t instancePtr); S_API SteamAPICall_t SteamAPI_ISteamApps_GetFileDetails(intptr_t instancePtr, const char * pszFileName); +S_API int SteamAPI_ISteamApps_GetLaunchCommandLine(intptr_t instancePtr, char * pszCommandLine, int cubCommandLine); +S_API bool SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing(intptr_t instancePtr); S_API bool SteamAPI_ISteamNetworking_SendP2PPacket(intptr_t instancePtr, class CSteamID steamIDRemote, const void * pubData, uint32 cubData, EP2PSend eP2PSendType, int nChannel); S_API bool SteamAPI_ISteamNetworking_IsP2PPacketAvailable(intptr_t instancePtr, uint32 * pcubMsgSize, int nChannel); S_API bool SteamAPI_ISteamNetworking_ReadP2PPacket(intptr_t instancePtr, void * pubDest, uint32 cubDest, uint32 * pcubMsgSize, class CSteamID * psteamIDRemote, int nChannel); @@ -592,11 +635,43 @@ S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestUserAgentInfo(intptr_t instancePtr, S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate(intptr_t instancePtr, HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate); S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(intptr_t instancePtr, HTTPRequestHandle hRequest, uint32 unMilliseconds); S_API bool SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut(intptr_t instancePtr, HTTPRequestHandle hRequest, bool * pbWasTimedOut); +S_API bool SteamAPI_ISteamInput_Init(intptr_t instancePtr); +S_API bool SteamAPI_ISteamInput_Shutdown(intptr_t instancePtr); +S_API void SteamAPI_ISteamInput_RunFrame(intptr_t instancePtr); +S_API int SteamAPI_ISteamInput_GetConnectedControllers(intptr_t instancePtr, InputHandle_t * handlesOut); +S_API InputActionSetHandle_t SteamAPI_ISteamInput_GetActionSetHandle(intptr_t instancePtr, const char * pszActionSetName); +S_API void SteamAPI_ISteamInput_ActivateActionSet(intptr_t instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle); +S_API InputActionSetHandle_t SteamAPI_ISteamInput_GetCurrentActionSet(intptr_t instancePtr, InputHandle_t inputHandle); +S_API void SteamAPI_ISteamInput_ActivateActionSetLayer(intptr_t instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle); +S_API void SteamAPI_ISteamInput_DeactivateActionSetLayer(intptr_t instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle); +S_API void SteamAPI_ISteamInput_DeactivateAllActionSetLayers(intptr_t instancePtr, InputHandle_t inputHandle); +S_API int SteamAPI_ISteamInput_GetActiveActionSetLayers(intptr_t instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t * handlesOut); +S_API InputDigitalActionHandle_t SteamAPI_ISteamInput_GetDigitalActionHandle(intptr_t instancePtr, const char * pszActionName); +S_API struct InputDigitalActionData_t SteamAPI_ISteamInput_GetDigitalActionData(intptr_t instancePtr, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle); +S_API int SteamAPI_ISteamInput_GetDigitalActionOrigins(intptr_t instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, EInputActionOrigin * originsOut); +S_API InputAnalogActionHandle_t SteamAPI_ISteamInput_GetAnalogActionHandle(intptr_t instancePtr, const char * pszActionName); +S_API struct InputAnalogActionData_t SteamAPI_ISteamInput_GetAnalogActionData(intptr_t instancePtr, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle); +S_API int SteamAPI_ISteamInput_GetAnalogActionOrigins(intptr_t instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, EInputActionOrigin * originsOut); +S_API const char * SteamAPI_ISteamInput_GetGlyphForActionOrigin(intptr_t instancePtr, EInputActionOrigin eOrigin); +S_API const char * SteamAPI_ISteamInput_GetStringForActionOrigin(intptr_t instancePtr, EInputActionOrigin eOrigin); +S_API void SteamAPI_ISteamInput_StopAnalogActionMomentum(intptr_t instancePtr, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction); +S_API struct InputMotionData_t SteamAPI_ISteamInput_GetMotionData(intptr_t instancePtr, InputHandle_t inputHandle); +S_API void SteamAPI_ISteamInput_TriggerVibration(intptr_t instancePtr, InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed); +S_API void SteamAPI_ISteamInput_SetLEDColor(intptr_t instancePtr, InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags); +S_API void SteamAPI_ISteamInput_TriggerHapticPulse(intptr_t instancePtr, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec); +S_API void SteamAPI_ISteamInput_TriggerRepeatedHapticPulse(intptr_t instancePtr, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags); +S_API bool SteamAPI_ISteamInput_ShowBindingPanel(intptr_t instancePtr, InputHandle_t inputHandle); +S_API ESteamInputType SteamAPI_ISteamInput_GetInputTypeForHandle(intptr_t instancePtr, InputHandle_t inputHandle); +S_API InputHandle_t SteamAPI_ISteamInput_GetControllerForGamepadIndex(intptr_t instancePtr, int nIndex); +S_API int SteamAPI_ISteamInput_GetGamepadIndexForController(intptr_t instancePtr, InputHandle_t ulinputHandle); +S_API const char * SteamAPI_ISteamInput_GetStringForXboxOrigin(intptr_t instancePtr, EXboxOrigin eOrigin); +S_API const char * SteamAPI_ISteamInput_GetGlyphForXboxOrigin(intptr_t instancePtr, EXboxOrigin eOrigin); +S_API EInputActionOrigin SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin(intptr_t instancePtr, InputHandle_t inputHandle, EXboxOrigin eOrigin); +S_API EInputActionOrigin SteamAPI_ISteamInput_TranslateActionOrigin(intptr_t instancePtr, ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin); S_API bool SteamAPI_ISteamController_Init(intptr_t instancePtr); S_API bool SteamAPI_ISteamController_Shutdown(intptr_t instancePtr); S_API void SteamAPI_ISteamController_RunFrame(intptr_t instancePtr); S_API int SteamAPI_ISteamController_GetConnectedControllers(intptr_t instancePtr, ControllerHandle_t * handlesOut); -S_API bool SteamAPI_ISteamController_ShowBindingPanel(intptr_t instancePtr, ControllerHandle_t controllerHandle); S_API ControllerActionSetHandle_t SteamAPI_ISteamController_GetActionSetHandle(intptr_t instancePtr, const char * pszActionSetName); S_API void SteamAPI_ISteamController_ActivateActionSet(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle); S_API ControllerActionSetHandle_t SteamAPI_ISteamController_GetCurrentActionSet(intptr_t instancePtr, ControllerHandle_t controllerHandle); @@ -605,26 +680,30 @@ S_API void SteamAPI_ISteamController_DeactivateActionSetLayer(intptr_t instanceP S_API void SteamAPI_ISteamController_DeactivateAllActionSetLayers(intptr_t instancePtr, ControllerHandle_t controllerHandle); S_API int SteamAPI_ISteamController_GetActiveActionSetLayers(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t * handlesOut); S_API ControllerDigitalActionHandle_t SteamAPI_ISteamController_GetDigitalActionHandle(intptr_t instancePtr, const char * pszActionName); -S_API struct ControllerDigitalActionData_t SteamAPI_ISteamController_GetDigitalActionData(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle); +S_API struct InputDigitalActionData_t SteamAPI_ISteamController_GetDigitalActionData(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle); S_API int SteamAPI_ISteamController_GetDigitalActionOrigins(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin * originsOut); S_API ControllerAnalogActionHandle_t SteamAPI_ISteamController_GetAnalogActionHandle(intptr_t instancePtr, const char * pszActionName); -S_API struct ControllerAnalogActionData_t SteamAPI_ISteamController_GetAnalogActionData(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle); +S_API struct InputAnalogActionData_t SteamAPI_ISteamController_GetAnalogActionData(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle); S_API int SteamAPI_ISteamController_GetAnalogActionOrigins(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin * originsOut); +S_API const char * SteamAPI_ISteamController_GetGlyphForActionOrigin(intptr_t instancePtr, EControllerActionOrigin eOrigin); +S_API const char * SteamAPI_ISteamController_GetStringForActionOrigin(intptr_t instancePtr, EControllerActionOrigin eOrigin); S_API void SteamAPI_ISteamController_StopAnalogActionMomentum(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction); +S_API struct InputMotionData_t SteamAPI_ISteamController_GetMotionData(intptr_t instancePtr, ControllerHandle_t controllerHandle); S_API void SteamAPI_ISteamController_TriggerHapticPulse(intptr_t instancePtr, ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec); S_API void SteamAPI_ISteamController_TriggerRepeatedHapticPulse(intptr_t instancePtr, ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags); S_API void SteamAPI_ISteamController_TriggerVibration(intptr_t instancePtr, ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed); S_API void SteamAPI_ISteamController_SetLEDColor(intptr_t instancePtr, ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags); -S_API int SteamAPI_ISteamController_GetGamepadIndexForController(intptr_t instancePtr, ControllerHandle_t ulControllerHandle); -S_API ControllerHandle_t SteamAPI_ISteamController_GetControllerForGamepadIndex(intptr_t instancePtr, int nIndex); -S_API struct ControllerMotionData_t SteamAPI_ISteamController_GetMotionData(intptr_t instancePtr, ControllerHandle_t controllerHandle); -S_API bool SteamAPI_ISteamController_ShowDigitalActionOrigins(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition); -S_API bool SteamAPI_ISteamController_ShowAnalogActionOrigins(intptr_t instancePtr, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition); -S_API const char * SteamAPI_ISteamController_GetStringForActionOrigin(intptr_t instancePtr, EControllerActionOrigin eOrigin); -S_API const char * SteamAPI_ISteamController_GetGlyphForActionOrigin(intptr_t instancePtr, EControllerActionOrigin eOrigin); +S_API bool SteamAPI_ISteamController_ShowBindingPanel(intptr_t instancePtr, ControllerHandle_t controllerHandle); S_API ESteamInputType SteamAPI_ISteamController_GetInputTypeForHandle(intptr_t instancePtr, ControllerHandle_t controllerHandle); +S_API ControllerHandle_t SteamAPI_ISteamController_GetControllerForGamepadIndex(intptr_t instancePtr, int nIndex); +S_API int SteamAPI_ISteamController_GetGamepadIndexForController(intptr_t instancePtr, ControllerHandle_t ulControllerHandle); +S_API const char * SteamAPI_ISteamController_GetStringForXboxOrigin(intptr_t instancePtr, EXboxOrigin eOrigin); +S_API const char * SteamAPI_ISteamController_GetGlyphForXboxOrigin(intptr_t instancePtr, EXboxOrigin eOrigin); +S_API EControllerActionOrigin SteamAPI_ISteamController_GetActionOriginFromXboxOrigin(intptr_t instancePtr, ControllerHandle_t controllerHandle, EXboxOrigin eOrigin); +S_API EControllerActionOrigin SteamAPI_ISteamController_TranslateActionOrigin(intptr_t instancePtr, ESteamInputType eDestinationInputType, EControllerActionOrigin eSourceOrigin); S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUserUGCRequest(intptr_t instancePtr, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage); S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequest(intptr_t instancePtr, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage); +S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0(intptr_t instancePtr, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char * pchCursor); S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest(intptr_t instancePtr, PublishedFileId_t * pvecPublishedFileID, uint32 unNumPublishedFileIDs); S_API SteamAPICall_t SteamAPI_ISteamUGC_SendQueryUGCRequest(intptr_t instancePtr, UGCQueryHandle_t handle); S_API bool SteamAPI_ISteamUGC_GetQueryUGCResult(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, struct SteamUGCDetails_t * pDetails); @@ -665,6 +744,7 @@ S_API bool SteamAPI_ISteamUGC_SetItemVisibility(intptr_t instancePtr, UGCUpdateH S_API bool SteamAPI_ISteamUGC_SetItemTags(intptr_t instancePtr, UGCUpdateHandle_t updateHandle, const struct SteamParamStringArray_t * pTags); S_API bool SteamAPI_ISteamUGC_SetItemContent(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pszContentFolder); S_API bool SteamAPI_ISteamUGC_SetItemPreview(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pszPreviewFile); +S_API bool SteamAPI_ISteamUGC_SetAllowLegacyUpload(intptr_t instancePtr, UGCUpdateHandle_t handle, bool bAllowLegacyUpload); S_API bool SteamAPI_ISteamUGC_RemoveItemKeyValueTags(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pchKey); S_API bool SteamAPI_ISteamUGC_AddItemKeyValueTag(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pchKey, const char * pchValue); S_API bool SteamAPI_ISteamUGC_AddItemPreviewFile(intptr_t instancePtr, UGCUpdateHandle_t handle, const char * pszPreviewFile, EItemPreviewType type); @@ -720,7 +800,7 @@ S_API void SteamAPI_ISteamHTMLSurface_MouseDown(intptr_t instancePtr, HHTMLBrows S_API void SteamAPI_ISteamHTMLSurface_MouseDoubleClick(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton); S_API void SteamAPI_ISteamHTMLSurface_MouseMove(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, int x, int y); S_API void SteamAPI_ISteamHTMLSurface_MouseWheel(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, int32 nDelta); -S_API void SteamAPI_ISteamHTMLSurface_KeyDown(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers); +S_API void SteamAPI_ISteamHTMLSurface_KeyDown(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers, bool bIsSystemKey); S_API void SteamAPI_ISteamHTMLSurface_KeyUp(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers); S_API void SteamAPI_ISteamHTMLSurface_KeyChar(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers); S_API void SteamAPI_ISteamHTMLSurface_SetHorizontalScroll(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll); @@ -736,6 +816,7 @@ S_API void SteamAPI_ISteamHTMLSurface_SetCookie(intptr_t instancePtr, const char S_API void SteamAPI_ISteamHTMLSurface_SetPageScaleFactor(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY); S_API void SteamAPI_ISteamHTMLSurface_SetBackgroundMode(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, bool bBackgroundMode); S_API void SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, float flDPIScaling); +S_API void SteamAPI_ISteamHTMLSurface_OpenDeveloperTools(intptr_t instancePtr, HHTMLBrowser unBrowserHandle); S_API void SteamAPI_ISteamHTMLSurface_AllowStartRequest(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, bool bAllowed); S_API void SteamAPI_ISteamHTMLSurface_JSDialogResponse(intptr_t instancePtr, HHTMLBrowser unBrowserHandle, bool bResult); S_API EResult SteamAPI_ISteamInventory_GetResultStatus(intptr_t instancePtr, SteamInventoryResult_t resultHandle); @@ -766,8 +847,8 @@ S_API bool SteamAPI_ISteamInventory_GetEligiblePromoItemDefinitionIDs(intptr_t i S_API SteamAPICall_t SteamAPI_ISteamInventory_StartPurchase(intptr_t instancePtr, const SteamItemDef_t * pArrayItemDefs, const uint32 * punArrayQuantity, uint32 unArrayLength); S_API SteamAPICall_t SteamAPI_ISteamInventory_RequestPrices(intptr_t instancePtr); S_API uint32 SteamAPI_ISteamInventory_GetNumItemsWithPrices(intptr_t instancePtr); -S_API bool SteamAPI_ISteamInventory_GetItemsWithPrices(intptr_t instancePtr, SteamItemDef_t * pArrayItemDefs, uint64 * pPrices, uint32 unArrayLength); -S_API bool SteamAPI_ISteamInventory_GetItemPrice(intptr_t instancePtr, SteamItemDef_t iDefinition, uint64 * pPrice); +S_API bool SteamAPI_ISteamInventory_GetItemsWithPrices(intptr_t instancePtr, SteamItemDef_t * pArrayItemDefs, uint64 * pCurrentPrices, uint64 * pBasePrices, uint32 unArrayLength); +S_API bool SteamAPI_ISteamInventory_GetItemPrice(intptr_t instancePtr, SteamItemDef_t iDefinition, uint64 * pCurrentPrice, uint64 * pBasePrice); S_API SteamInventoryUpdateHandle_t SteamAPI_ISteamInventory_StartUpdateProperties(intptr_t instancePtr); S_API bool SteamAPI_ISteamInventory_RemoveProperty(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName); S_API bool SteamAPI_ISteamInventory_SetProperty(intptr_t instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, const char * pchPropertyValue); diff --git a/public/steam/steam_api_internal.h b/public/steam/steam_api_internal.h index f5e5721..6c98b25 100644 --- a/public/steam/steam_api_internal.h +++ b/public/steam/steam_api_internal.h @@ -1,188 +1,40 @@ -//====== Copyright 1996-2015, Valve Corporation, All rights reserved. ======= +//====== Copyright Valve Corporation, All rights reserved. ==================== // -// Purpose: Internal private Steamworks API declarations and definitions +// Internal implementation details of the steamworks SDK. // -//============================================================================= - -#ifndef STEAM_API_INTERNAL_H -#define STEAM_API_INTERNAL_H - -S_API HSteamUser SteamAPI_GetHSteamUser(); -S_API void * S_CALLTYPE SteamInternal_ContextInit( void *pContextInitData ); -S_API void * S_CALLTYPE SteamInternal_CreateInterface( const char *ver ); - -#if !defined( STEAM_API_EXPORTS ) - -inline void S_CALLTYPE SteamInternal_OnContextInit( void* p ) -{ - ((CSteamAPIContext*)p)->Clear(); - if ( SteamAPI_GetHSteamPipe() ) - ((CSteamAPIContext*)p)->Init(); -} -inline CSteamAPIContext& SteamInternal_ModuleContext() -{ - // SteamInternal_ContextInit takes a base pointer for the equivalent of - // struct { void (*pFn)(void* pCtx); uintp counter; CSteamAPIContext ctx; } - // Do not change layout of 2 + sizeof... or add non-pointer aligned data! - // NOTE: declaring "static CSteamAPIConext" creates a large function - // which queries the initialization status of the object. We know that - // it is pointer-aligned and fully memset with zeros, so just alias a - // static buffer of the appropriate size and call it a CSteamAPIContext. - static void* s_CallbackCounterAndContext[ 2 + sizeof(CSteamAPIContext)/sizeof(void*) ] = { (void*)&SteamInternal_OnContextInit, 0 }; - return *(CSteamAPIContext*)SteamInternal_ContextInit( s_CallbackCounterAndContext ); -} - -inline ISteamClient *SteamClient() { return SteamInternal_ModuleContext().SteamClient(); } -inline ISteamUser *SteamUser() { return SteamInternal_ModuleContext().SteamUser(); } -inline ISteamFriends *SteamFriends() { return SteamInternal_ModuleContext().SteamFriends(); } -inline ISteamUtils *SteamUtils() { return SteamInternal_ModuleContext().SteamUtils(); } -inline ISteamMatchmaking *SteamMatchmaking() { return SteamInternal_ModuleContext().SteamMatchmaking(); } -inline ISteamUserStats *SteamUserStats() { return SteamInternal_ModuleContext().SteamUserStats(); } -inline ISteamApps *SteamApps() { return SteamInternal_ModuleContext().SteamApps(); } -inline ISteamMatchmakingServers *SteamMatchmakingServers() { return SteamInternal_ModuleContext().SteamMatchmakingServers(); } -inline ISteamNetworking *SteamNetworking() { return SteamInternal_ModuleContext().SteamNetworking(); } -inline ISteamRemoteStorage *SteamRemoteStorage() { return SteamInternal_ModuleContext().SteamRemoteStorage(); } -inline ISteamScreenshots *SteamScreenshots() { return SteamInternal_ModuleContext().SteamScreenshots(); } -inline ISteamHTTP *SteamHTTP() { return SteamInternal_ModuleContext().SteamHTTP(); } -inline ISteamController *SteamController() { return SteamInternal_ModuleContext().SteamController(); } -inline ISteamUGC *SteamUGC() { return SteamInternal_ModuleContext().SteamUGC(); } -inline ISteamAppList *SteamAppList() { return SteamInternal_ModuleContext().SteamAppList(); } -inline ISteamMusic *SteamMusic() { return SteamInternal_ModuleContext().SteamMusic(); } -inline ISteamMusicRemote *SteamMusicRemote() { return SteamInternal_ModuleContext().SteamMusicRemote(); } -inline ISteamHTMLSurface *SteamHTMLSurface() { return SteamInternal_ModuleContext().SteamHTMLSurface(); } -inline ISteamInventory *SteamInventory() { return SteamInternal_ModuleContext().SteamInventory(); } -inline ISteamVideo *SteamVideo() { return SteamInternal_ModuleContext().SteamVideo(); } -inline ISteamParentalSettings *SteamParentalSettings() { return SteamInternal_ModuleContext().SteamParentalSettings(); } - -#endif // !defined( STEAM_API_EXPORTS ) - - -inline void CSteamAPIContext::Clear() -{ - m_pSteamClient = NULL; - m_pSteamUser = NULL; - m_pSteamFriends = NULL; - m_pSteamUtils = NULL; - m_pSteamMatchmaking = NULL; - m_pSteamUserStats = NULL; - m_pSteamApps = NULL; - m_pSteamMatchmakingServers = NULL; - m_pSteamNetworking = NULL; - m_pSteamRemoteStorage = NULL; - m_pSteamHTTP = NULL; - m_pSteamScreenshots = NULL; - m_pSteamMusic = NULL; - m_pController = NULL; - m_pSteamUGC = NULL; - m_pSteamAppList = NULL; - m_pSteamMusic = NULL; - m_pSteamMusicRemote = NULL; - m_pSteamHTMLSurface = NULL; - m_pSteamInventory = NULL; - m_pSteamVideo = NULL; - m_pSteamParentalSettings = NULL; -} - - -// This function must be declared inline in the header so the module using steam_api.dll gets the version names they want. -inline bool CSteamAPIContext::Init() -{ - HSteamUser hSteamUser = SteamAPI_GetHSteamUser(); - HSteamPipe hSteamPipe = SteamAPI_GetHSteamPipe(); - if ( !hSteamPipe ) - return false; - - m_pSteamClient = (ISteamClient*) SteamInternal_CreateInterface( STEAMCLIENT_INTERFACE_VERSION ); - if ( !m_pSteamClient ) - return false; - - m_pSteamUser = m_pSteamClient->GetISteamUser( hSteamUser, hSteamPipe, STEAMUSER_INTERFACE_VERSION ); - if ( !m_pSteamUser ) - return false; - - m_pSteamFriends = m_pSteamClient->GetISteamFriends( hSteamUser, hSteamPipe, STEAMFRIENDS_INTERFACE_VERSION ); - if ( !m_pSteamFriends ) - return false; - - m_pSteamUtils = m_pSteamClient->GetISteamUtils( hSteamPipe, STEAMUTILS_INTERFACE_VERSION ); - if ( !m_pSteamUtils ) - return false; - - m_pSteamMatchmaking = m_pSteamClient->GetISteamMatchmaking( hSteamUser, hSteamPipe, STEAMMATCHMAKING_INTERFACE_VERSION ); - if ( !m_pSteamMatchmaking ) - return false; - - m_pSteamMatchmakingServers = m_pSteamClient->GetISteamMatchmakingServers( hSteamUser, hSteamPipe, STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION ); - if ( !m_pSteamMatchmakingServers ) - return false; - - m_pSteamUserStats = m_pSteamClient->GetISteamUserStats( hSteamUser, hSteamPipe, STEAMUSERSTATS_INTERFACE_VERSION ); - if ( !m_pSteamUserStats ) - return false; - - m_pSteamApps = m_pSteamClient->GetISteamApps( hSteamUser, hSteamPipe, STEAMAPPS_INTERFACE_VERSION ); - if ( !m_pSteamApps ) - return false; - - m_pSteamNetworking = m_pSteamClient->GetISteamNetworking( hSteamUser, hSteamPipe, STEAMNETWORKING_INTERFACE_VERSION ); - if ( !m_pSteamNetworking ) - return false; - - m_pSteamRemoteStorage = m_pSteamClient->GetISteamRemoteStorage( hSteamUser, hSteamPipe, STEAMREMOTESTORAGE_INTERFACE_VERSION ); - if ( !m_pSteamRemoteStorage ) - return false; - - m_pSteamScreenshots = m_pSteamClient->GetISteamScreenshots( hSteamUser, hSteamPipe, STEAMSCREENSHOTS_INTERFACE_VERSION ); - if ( !m_pSteamScreenshots ) - return false; - - m_pSteamHTTP = m_pSteamClient->GetISteamHTTP( hSteamUser, hSteamPipe, STEAMHTTP_INTERFACE_VERSION ); - if ( !m_pSteamHTTP ) - return false; - - m_pController = m_pSteamClient->GetISteamController( hSteamUser, hSteamPipe, STEAMCONTROLLER_INTERFACE_VERSION ); - if ( !m_pController ) - return false; - - m_pSteamUGC = m_pSteamClient->GetISteamUGC( hSteamUser, hSteamPipe, STEAMUGC_INTERFACE_VERSION ); - if ( !m_pSteamUGC ) - return false; - - m_pSteamAppList = m_pSteamClient->GetISteamAppList( hSteamUser, hSteamPipe, STEAMAPPLIST_INTERFACE_VERSION ); - if ( !m_pSteamAppList ) - return false; - - m_pSteamMusic = m_pSteamClient->GetISteamMusic( hSteamUser, hSteamPipe, STEAMMUSIC_INTERFACE_VERSION ); - if ( !m_pSteamMusic ) - return false; - - m_pSteamMusicRemote = m_pSteamClient->GetISteamMusicRemote( hSteamUser, hSteamPipe, STEAMMUSICREMOTE_INTERFACE_VERSION ); - if ( !m_pSteamMusicRemote ) - return false; - - m_pSteamHTMLSurface = m_pSteamClient->GetISteamHTMLSurface( hSteamUser, hSteamPipe, STEAMHTMLSURFACE_INTERFACE_VERSION ); - if ( !m_pSteamHTMLSurface ) - return false; - - m_pSteamInventory = m_pSteamClient->GetISteamInventory( hSteamUser, hSteamPipe, STEAMINVENTORY_INTERFACE_VERSION ); - if ( !m_pSteamInventory ) - return false; - - m_pSteamVideo = m_pSteamClient->GetISteamVideo( hSteamUser, hSteamPipe, STEAMVIDEO_INTERFACE_VERSION ); - if ( !m_pSteamVideo ) - return false; - - m_pSteamParentalSettings = m_pSteamClient->GetISteamParentalSettings( hSteamUser, hSteamPipe, STEAMPARENTALSETTINGS_INTERFACE_VERSION ); - if ( !m_pSteamParentalSettings ) - return false; - - return true; -} - - -//----------------------------------------------------------------------------- -// The following macros are implementation details, not intended for public use +// You should be able to figure out how to use the SDK by reading +// steam_api_common.h, and should not need to understand anything in here. +// //----------------------------------------------------------------------------- + +#ifdef STEAM_CALLBACK_BEGIN +#error "This file should only be included from steam_api_common.h" +#endif + +#include + +// Internal functions used by the utility CCallback objects to receive callbacks +S_API void S_CALLTYPE SteamAPI_RegisterCallback( class CCallbackBase *pCallback, int iCallback ); +S_API void S_CALLTYPE SteamAPI_UnregisterCallback( class CCallbackBase *pCallback ); +// Internal functions used by the utility CCallResult objects to receive async call results +S_API void S_CALLTYPE SteamAPI_RegisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall ); +S_API void S_CALLTYPE SteamAPI_UnregisterCallResult( class CCallbackBase *pCallback, SteamAPICall_t hAPICall ); + +S_API HSteamPipe S_CALLTYPE SteamAPI_GetHSteamPipe(); +S_API HSteamUser S_CALLTYPE SteamAPI_GetHSteamUser(); +S_API HSteamPipe S_CALLTYPE SteamGameServer_GetHSteamPipe(); +S_API HSteamUser S_CALLTYPE SteamGameServer_GetHSteamUser(); +S_API void *S_CALLTYPE SteamInternal_ContextInit( void *pContextInitData ); +S_API void *S_CALLTYPE SteamInternal_CreateInterface( const char *ver ); +S_API void *S_CALLTYPE SteamInternal_FindOrCreateUserInterface( HSteamUser hSteamUser, const char *pszVersion ); +S_API void *S_CALLTYPE SteamInternal_FindOrCreateGameServerInterface( HSteamUser hSteamUser, const char *pszVersion ); + +// disable this warning; this pattern need for steam callback registration +#ifdef _MSVC_VER +#pragma warning( push ) +#pragma warning( disable: 4355 ) // 'this' : used in base member initializer list +#endif + #define _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param ) #define _STEAM_CALLBACK_HELPER( _1, _2, SELECTED, ... ) _STEAM_CALLBACK_##SELECTED #define _STEAM_CALLBACK_SELECT( X, Y ) _STEAM_CALLBACK_HELPER X Y @@ -198,18 +50,15 @@ inline bool CSteamAPIContext::Init() } m_steamcallback_ ## func ; void func( param *pParam ) #define _STEAM_CALLBACK_4( _, thisclass, func, param, var ) \ CCallback< thisclass, param > var; void func( param *pParam ) +#define _STEAM_CALLBACK_GS( _, thisclass, func, param, var ) \ + CCallback< thisclass, param, true > var; void func( param *pParam ) - -//----------------------------------------------------------------------------- -// Purpose: maps a steam async call result to a class member function -// template params: T = local class, P = parameter struct -//----------------------------------------------------------------------------- template< class T, class P > inline CCallResult::CCallResult() { m_hAPICall = k_uAPICallInvalid; - m_pObj = NULL; - m_Func = NULL; + m_pObj = nullptr; + m_Func = nullptr; m_iCallback = P::k_iCallback; } @@ -241,7 +90,6 @@ inline void CCallResult::Cancel() SteamAPI_UnregisterCallResult( this, m_hAPICall ); m_hAPICall = k_uAPICallInvalid; } - } template< class T, class P > @@ -267,15 +115,9 @@ inline void CCallResult::Run( void *pvParam, bool bIOFailure, SteamAPICall } } - -//----------------------------------------------------------------------------- -// Purpose: maps a steam callback to a class member function -// template params: T = local class, P = parameter struct, -// bGameserver = listen for gameserver callbacks instead of client callbacks -//----------------------------------------------------------------------------- template< class T, class P, bool bGameserver > inline CCallback< T, P, bGameserver >::CCallback( T *pObj, func_t func ) - : m_pObj( NULL ), m_Func( NULL ) + : m_pObj( nullptr ), m_Func( nullptr ) { if ( bGameserver ) { @@ -312,17 +154,232 @@ inline void CCallback< T, P, bGameserver >::Run( void *pvParam ) (m_pObj->*m_Func)((P *)pvParam); } +//----------------------------------------------------------------------------- +// Macros to define steam callback structures. Used internally for debugging +//----------------------------------------------------------------------------- -#if defined(USE_BREAKPAD_HANDLER) || defined(STEAM_API_EXPORTS) -// this should be called before the game initialized the steam APIs -// pchDate should be of the format "Mmm dd yyyy" (such as from the __ DATE __ macro ) -// pchTime should be of the format "hh:mm:ss" (such as from the __ TIME __ macro ) -// bFullMemoryDumps (Win32 only) -- writes out a uuid-full.dmp in the client/dumps folder -// pvContext-- can be NULL, will be the void * context passed into m_pfnPreMinidumpCallback -// PFNPreMinidumpCallback m_pfnPreMinidumpCallback -- optional callback which occurs just before a .dmp file is written during a crash. Applications can hook this to allow adding additional information into the .dmp comment stream. -S_API void S_CALLTYPE SteamAPI_UseBreakpadCrashHandler( char const *pchVersion, char const *pchDate, char const *pchTime, bool bFullMemoryDumps, void *pvContext, PFNPreMinidumpCallback m_pfnPreMinidumpCallback ); -S_API void S_CALLTYPE SteamAPI_SetBreakpadAppID( uint32 unAppID ); +#ifdef STEAM_CALLBACK_INSPECTION_ENABLED + #include "../../clientdll/steam_api_callback_inspection.h" +#else + #define STEAM_CALLBACK_BEGIN( callbackname, callbackid ) struct callbackname { enum { k_iCallback = callbackid }; + #define STEAM_CALLBACK_MEMBER( varidx, vartype, varname ) vartype varname ; + #define STEAM_CALLBACK_MEMBER_ARRAY( varidx, vartype, varname, varcount ) vartype varname [ varcount ]; + #define STEAM_CALLBACK_END(nArgs) }; #endif +// Forward declare all of the Steam interfaces. (Do we really need to do this?) +class ISteamClient; +class ISteamUser; +class ISteamGameServer; +class ISteamFriends; +class ISteamUtils; +class ISteamMatchmaking; +class ISteamContentServer; +class ISteamMatchmakingServers; +class ISteamUserStats; +class ISteamApps; +class ISteamNetworking; +class ISteamRemoteStorage; +class ISteamScreenshots; +class ISteamMusic; +class ISteamMusicRemote; +class ISteamGameServerStats; +class ISteamPS3OverlayRender; +class ISteamHTTP; +class ISteamController; +class ISteamUGC; +class ISteamAppList; +class ISteamHTMLSurface; +class ISteamInventory; +class ISteamVideo; +class ISteamParentalSettings; +class ISteamGameSearch; +class ISteamInput; +class ISteamParties; + +//----------------------------------------------------------------------------- +// Purpose: Base values for callback identifiers, each callback must +// have a unique ID. +//----------------------------------------------------------------------------- +enum { k_iSteamUserCallbacks = 100 }; +enum { k_iSteamGameServerCallbacks = 200 }; +enum { k_iSteamFriendsCallbacks = 300 }; +enum { k_iSteamBillingCallbacks = 400 }; +enum { k_iSteamMatchmakingCallbacks = 500 }; +enum { k_iSteamContentServerCallbacks = 600 }; +enum { k_iSteamUtilsCallbacks = 700 }; +enum { k_iClientFriendsCallbacks = 800 }; +enum { k_iClientUserCallbacks = 900 }; +enum { k_iSteamAppsCallbacks = 1000 }; +enum { k_iSteamUserStatsCallbacks = 1100 }; +enum { k_iSteamNetworkingCallbacks = 1200 }; +enum { k_iSteamNetworkingSocketsCallbacks = 1220 }; +enum { k_iSteamNetworkingMessagesCallbacks = 1250 }; +enum { k_iClientRemoteStorageCallbacks = 1300 }; +enum { k_iClientDepotBuilderCallbacks = 1400 }; +enum { k_iSteamGameServerItemsCallbacks = 1500 }; +enum { k_iClientUtilsCallbacks = 1600 }; +enum { k_iSteamGameCoordinatorCallbacks = 1700 }; +enum { k_iSteamGameServerStatsCallbacks = 1800 }; +enum { k_iSteam2AsyncCallbacks = 1900 }; +enum { k_iSteamGameStatsCallbacks = 2000 }; +enum { k_iClientHTTPCallbacks = 2100 }; +enum { k_iClientScreenshotsCallbacks = 2200 }; +enum { k_iSteamScreenshotsCallbacks = 2300 }; +enum { k_iClientAudioCallbacks = 2400 }; +enum { k_iClientUnifiedMessagesCallbacks = 2500 }; +enum { k_iSteamStreamLauncherCallbacks = 2600 }; +enum { k_iClientControllerCallbacks = 2700 }; +enum { k_iSteamControllerCallbacks = 2800 }; +enum { k_iClientParentalSettingsCallbacks = 2900 }; +enum { k_iClientDeviceAuthCallbacks = 3000 }; +enum { k_iClientNetworkDeviceManagerCallbacks = 3100 }; +enum { k_iClientMusicCallbacks = 3200 }; +enum { k_iClientRemoteClientManagerCallbacks = 3300 }; +enum { k_iClientUGCCallbacks = 3400 }; +enum { k_iSteamStreamClientCallbacks = 3500 }; +enum { k_IClientProductBuilderCallbacks = 3600 }; +enum { k_iClientShortcutsCallbacks = 3700 }; +enum { k_iClientRemoteControlManagerCallbacks = 3800 }; +enum { k_iSteamAppListCallbacks = 3900 }; +enum { k_iSteamMusicCallbacks = 4000 }; +enum { k_iSteamMusicRemoteCallbacks = 4100 }; +enum { k_iClientVRCallbacks = 4200 }; +enum { k_iClientGameNotificationCallbacks = 4300 }; +enum { k_iSteamGameNotificationCallbacks = 4400 }; +enum { k_iSteamHTMLSurfaceCallbacks = 4500 }; +enum { k_iClientVideoCallbacks = 4600 }; +enum { k_iClientInventoryCallbacks = 4700 }; +enum { k_iClientBluetoothManagerCallbacks = 4800 }; +enum { k_iClientSharedConnectionCallbacks = 4900 }; +enum { k_ISteamParentalSettingsCallbacks = 5000 }; +enum { k_iClientShaderCallbacks = 5100 }; +enum { k_iSteamGameSearchCallbacks = 5200 }; +enum { k_iSteamPartiesCallbacks = 5300 }; +enum { k_iClientPartiesCallbacks = 5400 }; + +// Macro used to define a type-safe accessor that will always return the version +// of the interface of the *header file* you are compiling with! We also bounce +// through a safety function that checks for interfaces being created or destroyed. +#ifndef STEAM_API_EXPORTS + // SteamInternal_ContextInit takes a base pointer for the equivalent of + // struct { void (*pFn)(void* pCtx); uintp counter; CSteamAPIContext ctx; } + // Do not change layout of 2 + sizeof... or add non-pointer aligned data! + // NOTE: declaring "static CSteamAPIConext" creates a large function + // which queries the initialization status of the object. We know that + // it is pointer-aligned and fully memset with zeros, so just alias a + // static buffer of the appropriate size and call it a CSteamAPIContext. + #define STEAM_DEFINE_INTERFACE_ACCESSOR( type, name, expr ) \ + inline void S_CALLTYPE SteamInternal_Init_ ## name( type *p ) { *p = (type)( expr ); } \ + inline type name() { \ + static void* s_CallbackCounterAndContext[ 3 ] = { (void*)&SteamInternal_Init_ ## name, 0, 0 }; \ + return *(type*)SteamInternal_ContextInit( s_CallbackCounterAndContext ); \ + } + +#else + // Stub when we're compiling steam_api.dll itself. These are inline + // functions defined when the header is included. not functions exported + // by the lib! + #define STEAM_DEFINE_INTERFACE_ACCESSOR( type, name, expr ) +#endif + +#define STEAM_DEFINE_USER_INTERFACE_ACCESSOR( type, name, version ) \ + STEAM_DEFINE_INTERFACE_ACCESSOR( type, name, SteamInternal_FindOrCreateUserInterface( SteamAPI_GetHSteamUser(), version ) ) +#define STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( type, name, version ) \ + STEAM_DEFINE_INTERFACE_ACCESSOR( type, name, SteamInternal_FindOrCreateGameServerInterface( SteamGameServer_GetHSteamUser(), version ) ) + +#ifdef _MSVC_VER +#pragma warning( pop ) +#endif + +// CSteamAPIContext encapsulates the Steamworks API global accessors into +// a single object. +// +// DEPRECATED: Used the global interface accessors instead! +// +// This will be removed in a future iteration of the SDK +class CSteamAPIContext +{ +public: + CSteamAPIContext() { Clear(); } + inline void Clear() { memset( this, 0, sizeof(*this) ); } + inline bool Init(); // NOTE: This is defined in steam_api.h, to avoid this file having to include everything + ISteamClient* SteamClient() const { return m_pSteamClient; } + ISteamUser* SteamUser() const { return m_pSteamUser; } + ISteamFriends* SteamFriends() const { return m_pSteamFriends; } + ISteamUtils* SteamUtils() const { return m_pSteamUtils; } + ISteamMatchmaking* SteamMatchmaking() const { return m_pSteamMatchmaking; } + ISteamGameSearch* SteamGameSearch() const { return m_pSteamGameSearch; } + ISteamUserStats* SteamUserStats() const { return m_pSteamUserStats; } + ISteamApps* SteamApps() const { return m_pSteamApps; } + ISteamMatchmakingServers* SteamMatchmakingServers() const { return m_pSteamMatchmakingServers; } + ISteamNetworking* SteamNetworking() const { return m_pSteamNetworking; } + ISteamRemoteStorage* SteamRemoteStorage() const { return m_pSteamRemoteStorage; } + ISteamScreenshots* SteamScreenshots() const { return m_pSteamScreenshots; } + ISteamHTTP* SteamHTTP() const { return m_pSteamHTTP; } + ISteamController* SteamController() const { return m_pController; } + ISteamUGC* SteamUGC() const { return m_pSteamUGC; } + ISteamAppList* SteamAppList() const { return m_pSteamAppList; } + ISteamMusic* SteamMusic() const { return m_pSteamMusic; } + ISteamMusicRemote* SteamMusicRemote() const { return m_pSteamMusicRemote; } + ISteamHTMLSurface* SteamHTMLSurface() const { return m_pSteamHTMLSurface; } + ISteamInventory* SteamInventory() const { return m_pSteamInventory; } + ISteamVideo* SteamVideo() const { return m_pSteamVideo; } + ISteamParentalSettings* SteamParentalSettings() const { return m_pSteamParentalSettings; } + ISteamInput* SteamInput() const { return m_pSteamInput; } +private: + ISteamClient *m_pSteamClient; + ISteamUser *m_pSteamUser; + ISteamFriends *m_pSteamFriends; + ISteamUtils *m_pSteamUtils; + ISteamMatchmaking *m_pSteamMatchmaking; + ISteamGameSearch *m_pSteamGameSearch; + ISteamUserStats *m_pSteamUserStats; + ISteamApps *m_pSteamApps; + ISteamMatchmakingServers *m_pSteamMatchmakingServers; + ISteamNetworking *m_pSteamNetworking; + ISteamRemoteStorage *m_pSteamRemoteStorage; + ISteamScreenshots *m_pSteamScreenshots; + ISteamHTTP *m_pSteamHTTP; + ISteamController *m_pController; + ISteamUGC *m_pSteamUGC; + ISteamAppList *m_pSteamAppList; + ISteamMusic *m_pSteamMusic; + ISteamMusicRemote *m_pSteamMusicRemote; + ISteamHTMLSurface *m_pSteamHTMLSurface; + ISteamInventory *m_pSteamInventory; + ISteamVideo *m_pSteamVideo; + ISteamParentalSettings *m_pSteamParentalSettings; + ISteamInput *m_pSteamInput; +}; + +class CSteamGameServerAPIContext +{ +public: + CSteamGameServerAPIContext() { Clear(); } + inline void Clear() { memset( this, 0, sizeof(*this) ); } + inline bool Init(); // NOTE: This is defined in steam_gameserver.h, to avoid this file having to include everything + + ISteamClient *SteamClient() const { return m_pSteamClient; } + ISteamGameServer *SteamGameServer() const { return m_pSteamGameServer; } + ISteamUtils *SteamGameServerUtils() const { return m_pSteamGameServerUtils; } + ISteamNetworking *SteamGameServerNetworking() const { return m_pSteamGameServerNetworking; } + ISteamGameServerStats *SteamGameServerStats() const { return m_pSteamGameServerStats; } + ISteamHTTP *SteamHTTP() const { return m_pSteamHTTP; } + ISteamInventory *SteamInventory() const { return m_pSteamInventory; } + ISteamUGC *SteamUGC() const { return m_pSteamUGC; } + ISteamApps *SteamApps() const { return m_pSteamApps; } + +private: + ISteamClient *m_pSteamClient; + ISteamGameServer *m_pSteamGameServer; + ISteamUtils *m_pSteamGameServerUtils; + ISteamNetworking *m_pSteamGameServerNetworking; + ISteamGameServerStats *m_pSteamGameServerStats; + ISteamHTTP *m_pSteamHTTP; + ISteamInventory *m_pSteamInventory; + ISteamUGC *m_pSteamUGC; + ISteamApps *m_pSteamApps; +}; + -#endif // STEAM_API_INTERNAL_H diff --git a/public/steam/steam_api_interop.cs b/public/steam/steam_api_interop.cs index eb8721c..52bff12 100644 --- a/public/steam/steam_api_interop.cs +++ b/public/steam/steam_api_interop.cs @@ -55,6 +55,8 @@ internal static extern IntPtr SteamAPI_ISteamClient_GetISteamNetworking(IntPtr i internal static extern IntPtr SteamAPI_ISteamClient_GetISteamRemoteStorage(IntPtr instancePtr, uint hSteamuser, uint hSteamPipe, string pchVersion); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamScreenshots")] internal static extern IntPtr SteamAPI_ISteamClient_GetISteamScreenshots(IntPtr instancePtr, uint hSteamuser, uint hSteamPipe, string pchVersion); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamGameSearch")] +internal static extern IntPtr SteamAPI_ISteamClient_GetISteamGameSearch(IntPtr instancePtr, uint hSteamuser, uint hSteamPipe, string pchVersion); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetIPCCallCount")] internal static extern uint SteamAPI_ISteamClient_GetIPCCallCount(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_SetWarningMessageHook")] @@ -81,6 +83,10 @@ internal static extern IntPtr SteamAPI_ISteamClient_GetISteamInventory(IntPtr in internal static extern IntPtr SteamAPI_ISteamClient_GetISteamVideo(IntPtr instancePtr, uint hSteamuser, uint hSteamPipe, string pchVersion); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamParentalSettings")] internal static extern IntPtr SteamAPI_ISteamClient_GetISteamParentalSettings(IntPtr instancePtr, uint hSteamuser, uint hSteamPipe, string pchVersion); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamInput")] +internal static extern IntPtr SteamAPI_ISteamClient_GetISteamInput(IntPtr instancePtr, uint hSteamUser, uint hSteamPipe, string pchVersion); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamParties")] +internal static extern IntPtr SteamAPI_ISteamClient_GetISteamParties(IntPtr instancePtr, uint hSteamUser, uint hSteamPipe, string pchVersion); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUser_GetHSteamUser")] internal static extern uint SteamAPI_ISteamUser_GetHSteamUser(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUser_BLoggedOn")] @@ -139,6 +145,8 @@ internal static extern bool SteamAPI_ISteamUser_BIsTwoFactorEnabled(IntPtr insta internal static extern bool SteamAPI_ISteamUser_BIsPhoneIdentifying(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUser_BIsPhoneRequiringVerification")] internal static extern bool SteamAPI_ISteamUser_BIsPhoneRequiringVerification(IntPtr instancePtr); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUser_GetMarketEligibility")] +internal static extern ulong SteamAPI_ISteamUser_GetMarketEligibility(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamFriends_GetPersonaName")] internal static extern IntPtr SteamAPI_ISteamFriends_GetPersonaName(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamFriends_SetPersonaName")] @@ -200,7 +208,7 @@ internal static extern void SteamAPI_ISteamFriends_ActivateGameOverlay(IntPtr in [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToUser")] internal static extern void SteamAPI_ISteamFriends_ActivateGameOverlayToUser(IntPtr instancePtr, string pchDialog, ulong steamID); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage")] -internal static extern void SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(IntPtr instancePtr, string pchURL); +internal static extern void SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(IntPtr instancePtr, string pchURL, uint eMode); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToStore")] internal static extern void SteamAPI_ISteamFriends_ActivateGameOverlayToStore(IntPtr instancePtr, uint nAppID, char eFlag); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamFriends_SetPlayedWith")] @@ -283,6 +291,8 @@ internal static extern ulong SteamAPI_ISteamFriends_EnumerateFollowingList(IntPt internal static extern bool SteamAPI_ISteamFriends_IsClanPublic(IntPtr instancePtr, ulong steamIDClan); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamFriends_IsClanOfficialGameGroup")] internal static extern bool SteamAPI_ISteamFriends_IsClanOfficialGameGroup(IntPtr instancePtr, ulong steamIDClan); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages")] +internal static extern int SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceAppActive")] internal static extern uint SteamAPI_ISteamUtils_GetSecondsSinceAppActive(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceComputerActive")] @@ -473,6 +483,58 @@ internal static extern uint SteamAPI_ISteamMatchmakingServers_PlayerDetails(IntP internal static extern uint SteamAPI_ISteamMatchmakingServers_ServerRules(IntPtr instancePtr, uint unIP, char usPort, IntPtr pRequestServersResponse); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamMatchmakingServers_CancelServerQuery")] internal static extern void SteamAPI_ISteamMatchmakingServers_CancelServerQuery(IntPtr instancePtr, uint hServerQuery); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_AddGameSearchParams")] +internal static extern uint SteamAPI_ISteamGameSearch_AddGameSearchParams(IntPtr instancePtr, string pchKeyToFind, string pchValuesToFind); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_SearchForGameWithLobby")] +internal static extern uint SteamAPI_ISteamGameSearch_SearchForGameWithLobby(IntPtr instancePtr, ulong steamIDLobby, int nPlayerMin, int nPlayerMax); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_SearchForGameSolo")] +internal static extern uint SteamAPI_ISteamGameSearch_SearchForGameSolo(IntPtr instancePtr, int nPlayerMin, int nPlayerMax); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_AcceptGame")] +internal static extern uint SteamAPI_ISteamGameSearch_AcceptGame(IntPtr instancePtr); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_DeclineGame")] +internal static extern uint SteamAPI_ISteamGameSearch_DeclineGame(IntPtr instancePtr); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_RetrieveConnectionDetails")] +internal static extern uint SteamAPI_ISteamGameSearch_RetrieveConnectionDetails(IntPtr instancePtr, ulong steamIDHost, string pchConnectionDetails, int cubConnectionDetails); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_EndGameSearch")] +internal static extern uint SteamAPI_ISteamGameSearch_EndGameSearch(IntPtr instancePtr); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_SetGameHostParams")] +internal static extern uint SteamAPI_ISteamGameSearch_SetGameHostParams(IntPtr instancePtr, string pchKey, string pchValue); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_SetConnectionDetails")] +internal static extern uint SteamAPI_ISteamGameSearch_SetConnectionDetails(IntPtr instancePtr, string pchConnectionDetails, int cubConnectionDetails); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_RequestPlayersForGame")] +internal static extern uint SteamAPI_ISteamGameSearch_RequestPlayersForGame(IntPtr instancePtr, int nPlayerMin, int nPlayerMax, int nMaxTeamSize); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_HostConfirmGameStart")] +internal static extern uint SteamAPI_ISteamGameSearch_HostConfirmGameStart(IntPtr instancePtr, ulong ullUniqueGameID); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame")] +internal static extern uint SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame(IntPtr instancePtr); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_SubmitPlayerResult")] +internal static extern uint SteamAPI_ISteamGameSearch_SubmitPlayerResult(IntPtr instancePtr, ulong ullUniqueGameID, ulong steamIDPlayer, uint EPlayerResult); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameSearch_EndGame")] +internal static extern uint SteamAPI_ISteamGameSearch_EndGame(IntPtr instancePtr, ulong ullUniqueGameID); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamParties_GetNumActiveBeacons")] +internal static extern uint SteamAPI_ISteamParties_GetNumActiveBeacons(IntPtr instancePtr); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamParties_GetBeaconByIndex")] +internal static extern ulong SteamAPI_ISteamParties_GetBeaconByIndex(IntPtr instancePtr, uint unIndex); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamParties_GetBeaconDetails")] +internal static extern bool SteamAPI_ISteamParties_GetBeaconDetails(IntPtr instancePtr, ulong ulBeaconID, ref CSteamID pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, System.Text.StringBuilder pchMetadata, int cchMetadata); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamParties_JoinParty")] +internal static extern ulong SteamAPI_ISteamParties_JoinParty(IntPtr instancePtr, ulong ulBeaconID); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamParties_GetNumAvailableBeaconLocations")] +internal static extern bool SteamAPI_ISteamParties_GetNumAvailableBeaconLocations(IntPtr instancePtr, ref uint puNumLocations); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamParties_GetAvailableBeaconLocations")] +internal static extern bool SteamAPI_ISteamParties_GetAvailableBeaconLocations(IntPtr instancePtr, ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamParties_CreateBeacon")] +internal static extern ulong SteamAPI_ISteamParties_CreateBeacon(IntPtr instancePtr, uint unOpenSlots, ref SteamPartyBeaconLocation_t pBeaconLocation, string pchConnectString, string pchMetadata); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamParties_OnReservationCompleted")] +internal static extern void SteamAPI_ISteamParties_OnReservationCompleted(IntPtr instancePtr, ulong ulBeacon, ulong steamIDUser); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamParties_CancelReservation")] +internal static extern void SteamAPI_ISteamParties_CancelReservation(IntPtr instancePtr, ulong ulBeacon, ulong steamIDUser); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamParties_ChangeNumOpenSlots")] +internal static extern ulong SteamAPI_ISteamParties_ChangeNumOpenSlots(IntPtr instancePtr, ulong ulBeacon, uint unOpenSlots); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamParties_DestroyBeacon")] +internal static extern bool SteamAPI_ISteamParties_DestroyBeacon(IntPtr instancePtr, ulong ulBeacon); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamParties_GetBeaconLocationData")] +internal static extern bool SteamAPI_ISteamParties_GetBeaconLocationData(IntPtr instancePtr, SteamPartyBeaconLocation_t BeaconLocation, uint eData, System.Text.StringBuilder pchDataStringOut, int cchDataStringOut); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWrite")] internal static extern bool SteamAPI_ISteamRemoteStorage_FileWrite(IntPtr instancePtr, string pchFile, IntPtr pvData, int cubData); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamRemoteStorage_FileRead")] @@ -721,6 +783,10 @@ internal static extern int SteamAPI_ISteamApps_GetAppBuildId(IntPtr instancePtr) internal static extern void SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamApps_GetFileDetails")] internal static extern ulong SteamAPI_ISteamApps_GetFileDetails(IntPtr instancePtr, string pszFileName); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamApps_GetLaunchCommandLine")] +internal static extern int SteamAPI_ISteamApps_GetLaunchCommandLine(IntPtr instancePtr, string pszCommandLine, int cubCommandLine); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing")] +internal static extern bool SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_SendP2PPacket")] internal static extern bool SteamAPI_ISteamNetworking_SendP2PPacket(IntPtr instancePtr, ulong steamIDRemote, IntPtr pubData, uint cubData, uint eP2PSendType, int nChannel); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_IsP2PPacketAvailable")] @@ -915,6 +981,72 @@ internal static extern bool SteamAPI_ISteamHTTP_SetHTTPRequestRequiresVerifiedCe internal static extern bool SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(IntPtr instancePtr, uint hRequest, uint unMilliseconds); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut")] internal static extern bool SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut(IntPtr instancePtr, uint hRequest, ref bool pbWasTimedOut); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_Init")] +internal static extern bool SteamAPI_ISteamInput_Init(IntPtr instancePtr); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_Shutdown")] +internal static extern bool SteamAPI_ISteamInput_Shutdown(IntPtr instancePtr); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_RunFrame")] +internal static extern void SteamAPI_ISteamInput_RunFrame(IntPtr instancePtr); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetConnectedControllers")] +internal static extern int SteamAPI_ISteamInput_GetConnectedControllers(IntPtr instancePtr, ref ulong handlesOut); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetActionSetHandle")] +internal static extern ulong SteamAPI_ISteamInput_GetActionSetHandle(IntPtr instancePtr, string pszActionSetName); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_ActivateActionSet")] +internal static extern void SteamAPI_ISteamInput_ActivateActionSet(IntPtr instancePtr, ulong inputHandle, ulong actionSetHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetCurrentActionSet")] +internal static extern ulong SteamAPI_ISteamInput_GetCurrentActionSet(IntPtr instancePtr, ulong inputHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_ActivateActionSetLayer")] +internal static extern void SteamAPI_ISteamInput_ActivateActionSetLayer(IntPtr instancePtr, ulong inputHandle, ulong actionSetLayerHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_DeactivateActionSetLayer")] +internal static extern void SteamAPI_ISteamInput_DeactivateActionSetLayer(IntPtr instancePtr, ulong inputHandle, ulong actionSetLayerHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_DeactivateAllActionSetLayers")] +internal static extern void SteamAPI_ISteamInput_DeactivateAllActionSetLayers(IntPtr instancePtr, ulong inputHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetActiveActionSetLayers")] +internal static extern int SteamAPI_ISteamInput_GetActiveActionSetLayers(IntPtr instancePtr, ulong inputHandle, ref ulong handlesOut); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionHandle")] +internal static extern ulong SteamAPI_ISteamInput_GetDigitalActionHandle(IntPtr instancePtr, string pszActionName); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionData")] +internal static extern InputDigitalActionData_t SteamAPI_ISteamInput_GetDigitalActionData(IntPtr instancePtr, ulong inputHandle, ulong digitalActionHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionOrigins")] +internal static extern int SteamAPI_ISteamInput_GetDigitalActionOrigins(IntPtr instancePtr, ulong inputHandle, ulong actionSetHandle, ulong digitalActionHandle, ref uint originsOut); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionHandle")] +internal static extern ulong SteamAPI_ISteamInput_GetAnalogActionHandle(IntPtr instancePtr, string pszActionName); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionData")] +internal static extern InputAnalogActionData_t SteamAPI_ISteamInput_GetAnalogActionData(IntPtr instancePtr, ulong inputHandle, ulong analogActionHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionOrigins")] +internal static extern int SteamAPI_ISteamInput_GetAnalogActionOrigins(IntPtr instancePtr, ulong inputHandle, ulong actionSetHandle, ulong analogActionHandle, ref uint originsOut); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetGlyphForActionOrigin")] +internal static extern IntPtr SteamAPI_ISteamInput_GetGlyphForActionOrigin(IntPtr instancePtr, uint eOrigin); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetStringForActionOrigin")] +internal static extern IntPtr SteamAPI_ISteamInput_GetStringForActionOrigin(IntPtr instancePtr, uint eOrigin); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_StopAnalogActionMomentum")] +internal static extern void SteamAPI_ISteamInput_StopAnalogActionMomentum(IntPtr instancePtr, ulong inputHandle, ulong eAction); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetMotionData")] +internal static extern InputMotionData_t SteamAPI_ISteamInput_GetMotionData(IntPtr instancePtr, ulong inputHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_TriggerVibration")] +internal static extern void SteamAPI_ISteamInput_TriggerVibration(IntPtr instancePtr, ulong inputHandle, char usLeftSpeed, char usRightSpeed); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_SetLEDColor")] +internal static extern void SteamAPI_ISteamInput_SetLEDColor(IntPtr instancePtr, ulong inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_TriggerHapticPulse")] +internal static extern void SteamAPI_ISteamInput_TriggerHapticPulse(IntPtr instancePtr, ulong inputHandle, uint eTargetPad, char usDurationMicroSec); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_TriggerRepeatedHapticPulse")] +internal static extern void SteamAPI_ISteamInput_TriggerRepeatedHapticPulse(IntPtr instancePtr, ulong inputHandle, uint eTargetPad, char usDurationMicroSec, char usOffMicroSec, char unRepeat, uint nFlags); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_ShowBindingPanel")] +internal static extern bool SteamAPI_ISteamInput_ShowBindingPanel(IntPtr instancePtr, ulong inputHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetInputTypeForHandle")] +internal static extern uint SteamAPI_ISteamInput_GetInputTypeForHandle(IntPtr instancePtr, ulong inputHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetControllerForGamepadIndex")] +internal static extern ulong SteamAPI_ISteamInput_GetControllerForGamepadIndex(IntPtr instancePtr, int nIndex); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetGamepadIndexForController")] +internal static extern int SteamAPI_ISteamInput_GetGamepadIndexForController(IntPtr instancePtr, ulong ulinputHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetStringForXboxOrigin")] +internal static extern IntPtr SteamAPI_ISteamInput_GetStringForXboxOrigin(IntPtr instancePtr, uint eOrigin); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetGlyphForXboxOrigin")] +internal static extern IntPtr SteamAPI_ISteamInput_GetGlyphForXboxOrigin(IntPtr instancePtr, uint eOrigin); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin")] +internal static extern uint SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin(IntPtr instancePtr, ulong inputHandle, uint eOrigin); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInput_TranslateActionOrigin")] +internal static extern uint SteamAPI_ISteamInput_TranslateActionOrigin(IntPtr instancePtr, uint eDestinationInputType, uint eSourceOrigin); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_Init")] internal static extern bool SteamAPI_ISteamController_Init(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_Shutdown")] @@ -923,8 +1055,6 @@ internal static extern bool SteamAPI_ISteamController_Shutdown(IntPtr instancePt internal static extern void SteamAPI_ISteamController_RunFrame(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetConnectedControllers")] internal static extern int SteamAPI_ISteamController_GetConnectedControllers(IntPtr instancePtr, ref ulong handlesOut); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_ShowBindingPanel")] -internal static extern bool SteamAPI_ISteamController_ShowBindingPanel(IntPtr instancePtr, ulong controllerHandle); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetActionSetHandle")] internal static extern ulong SteamAPI_ISteamController_GetActionSetHandle(IntPtr instancePtr, string pszActionSetName); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_ActivateActionSet")] @@ -942,17 +1072,23 @@ internal static extern int SteamAPI_ISteamController_GetActiveActionSetLayers(In [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetDigitalActionHandle")] internal static extern ulong SteamAPI_ISteamController_GetDigitalActionHandle(IntPtr instancePtr, string pszActionName); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetDigitalActionData")] -internal static extern ControllerDigitalActionData_t SteamAPI_ISteamController_GetDigitalActionData(IntPtr instancePtr, ulong controllerHandle, ulong digitalActionHandle); +internal static extern InputDigitalActionData_t SteamAPI_ISteamController_GetDigitalActionData(IntPtr instancePtr, ulong controllerHandle, ulong digitalActionHandle); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetDigitalActionOrigins")] internal static extern int SteamAPI_ISteamController_GetDigitalActionOrigins(IntPtr instancePtr, ulong controllerHandle, ulong actionSetHandle, ulong digitalActionHandle, ref uint originsOut); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetAnalogActionHandle")] internal static extern ulong SteamAPI_ISteamController_GetAnalogActionHandle(IntPtr instancePtr, string pszActionName); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetAnalogActionData")] -internal static extern ControllerAnalogActionData_t SteamAPI_ISteamController_GetAnalogActionData(IntPtr instancePtr, ulong controllerHandle, ulong analogActionHandle); +internal static extern InputAnalogActionData_t SteamAPI_ISteamController_GetAnalogActionData(IntPtr instancePtr, ulong controllerHandle, ulong analogActionHandle); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetAnalogActionOrigins")] internal static extern int SteamAPI_ISteamController_GetAnalogActionOrigins(IntPtr instancePtr, ulong controllerHandle, ulong actionSetHandle, ulong analogActionHandle, ref uint originsOut); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetGlyphForActionOrigin")] +internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForActionOrigin(IntPtr instancePtr, uint eOrigin); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetStringForActionOrigin")] +internal static extern IntPtr SteamAPI_ISteamController_GetStringForActionOrigin(IntPtr instancePtr, uint eOrigin); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_StopAnalogActionMomentum")] internal static extern void SteamAPI_ISteamController_StopAnalogActionMomentum(IntPtr instancePtr, ulong controllerHandle, ulong eAction); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetMotionData")] +internal static extern InputMotionData_t SteamAPI_ISteamController_GetMotionData(IntPtr instancePtr, ulong controllerHandle); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_TriggerHapticPulse")] internal static extern void SteamAPI_ISteamController_TriggerHapticPulse(IntPtr instancePtr, ulong controllerHandle, uint eTargetPad, char usDurationMicroSec); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_TriggerRepeatedHapticPulse")] @@ -961,26 +1097,28 @@ internal static extern void SteamAPI_ISteamController_TriggerRepeatedHapticPulse internal static extern void SteamAPI_ISteamController_TriggerVibration(IntPtr instancePtr, ulong controllerHandle, char usLeftSpeed, char usRightSpeed); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_SetLEDColor")] internal static extern void SteamAPI_ISteamController_SetLEDColor(IntPtr instancePtr, ulong controllerHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetGamepadIndexForController")] -internal static extern int SteamAPI_ISteamController_GetGamepadIndexForController(IntPtr instancePtr, ulong ulControllerHandle); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetControllerForGamepadIndex")] -internal static extern ulong SteamAPI_ISteamController_GetControllerForGamepadIndex(IntPtr instancePtr, int nIndex); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetMotionData")] -internal static extern ControllerMotionData_t SteamAPI_ISteamController_GetMotionData(IntPtr instancePtr, ulong controllerHandle); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_ShowDigitalActionOrigins")] -internal static extern bool SteamAPI_ISteamController_ShowDigitalActionOrigins(IntPtr instancePtr, ulong controllerHandle, ulong digitalActionHandle, float flScale, float flXPosition, float flYPosition); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_ShowAnalogActionOrigins")] -internal static extern bool SteamAPI_ISteamController_ShowAnalogActionOrigins(IntPtr instancePtr, ulong controllerHandle, ulong analogActionHandle, float flScale, float flXPosition, float flYPosition); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetStringForActionOrigin")] -internal static extern IntPtr SteamAPI_ISteamController_GetStringForActionOrigin(IntPtr instancePtr, uint eOrigin); -[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetGlyphForActionOrigin")] -internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForActionOrigin(IntPtr instancePtr, uint eOrigin); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_ShowBindingPanel")] +internal static extern bool SteamAPI_ISteamController_ShowBindingPanel(IntPtr instancePtr, ulong controllerHandle); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetInputTypeForHandle")] internal static extern uint SteamAPI_ISteamController_GetInputTypeForHandle(IntPtr instancePtr, ulong controllerHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetControllerForGamepadIndex")] +internal static extern ulong SteamAPI_ISteamController_GetControllerForGamepadIndex(IntPtr instancePtr, int nIndex); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetGamepadIndexForController")] +internal static extern int SteamAPI_ISteamController_GetGamepadIndexForController(IntPtr instancePtr, ulong ulControllerHandle); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetStringForXboxOrigin")] +internal static extern IntPtr SteamAPI_ISteamController_GetStringForXboxOrigin(IntPtr instancePtr, uint eOrigin); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetGlyphForXboxOrigin")] +internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForXboxOrigin(IntPtr instancePtr, uint eOrigin); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_GetActionOriginFromXboxOrigin")] +internal static extern uint SteamAPI_ISteamController_GetActionOriginFromXboxOrigin(IntPtr instancePtr, ulong controllerHandle, uint eOrigin); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamController_TranslateActionOrigin")] +internal static extern uint SteamAPI_ISteamController_TranslateActionOrigin(IntPtr instancePtr, uint eDestinationInputType, uint eSourceOrigin); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUserUGCRequest")] internal static extern ulong SteamAPI_ISteamUGC_CreateQueryUserUGCRequest(IntPtr instancePtr, uint unAccountID, uint eListType, uint eMatchingUGCType, uint eSortOrder, uint nCreatorAppID, uint nConsumerAppID, uint unPage); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequest")] internal static extern ulong SteamAPI_ISteamUGC_CreateQueryAllUGCRequest(IntPtr instancePtr, uint eQueryType, uint eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, uint unPage); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0")] +internal static extern ulong SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0(IntPtr instancePtr, uint eQueryType, uint eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, string pchCursor); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest")] internal static extern ulong SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest(IntPtr instancePtr, ref ulong pvecPublishedFileID, uint unNumPublishedFileIDs); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_SendQueryUGCRequest")] @@ -1061,6 +1199,8 @@ internal static extern bool SteamAPI_ISteamUGC_SetItemTags(IntPtr instancePtr, u internal static extern bool SteamAPI_ISteamUGC_SetItemContent(IntPtr instancePtr, ulong handle, string pszContentFolder); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_SetItemPreview")] internal static extern bool SteamAPI_ISteamUGC_SetItemPreview(IntPtr instancePtr, ulong handle, string pszPreviewFile); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_SetAllowLegacyUpload")] +internal static extern bool SteamAPI_ISteamUGC_SetAllowLegacyUpload(IntPtr instancePtr, ulong handle, bool bAllowLegacyUpload); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_RemoveItemKeyValueTags")] internal static extern bool SteamAPI_ISteamUGC_RemoveItemKeyValueTags(IntPtr instancePtr, ulong handle, string pchKey); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_AddItemKeyValueTag")] @@ -1172,7 +1312,7 @@ internal static extern void SteamAPI_ISteamHTMLSurface_MouseMove(IntPtr instance [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseWheel")] internal static extern void SteamAPI_ISteamHTMLSurface_MouseWheel(IntPtr instancePtr, uint unBrowserHandle, int nDelta); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyDown")] -internal static extern void SteamAPI_ISteamHTMLSurface_KeyDown(IntPtr instancePtr, uint unBrowserHandle, uint nNativeKeyCode, uint eHTMLKeyModifiers); +internal static extern void SteamAPI_ISteamHTMLSurface_KeyDown(IntPtr instancePtr, uint unBrowserHandle, uint nNativeKeyCode, uint eHTMLKeyModifiers, bool bIsSystemKey); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyUp")] internal static extern void SteamAPI_ISteamHTMLSurface_KeyUp(IntPtr instancePtr, uint unBrowserHandle, uint nNativeKeyCode, uint eHTMLKeyModifiers); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyChar")] @@ -1203,6 +1343,8 @@ internal static extern void SteamAPI_ISteamHTMLSurface_SetPageScaleFactor(IntPtr internal static extern void SteamAPI_ISteamHTMLSurface_SetBackgroundMode(IntPtr instancePtr, uint unBrowserHandle, bool bBackgroundMode); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor")] internal static extern void SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor(IntPtr instancePtr, uint unBrowserHandle, float flDPIScaling); +[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamHTMLSurface_OpenDeveloperTools")] +internal static extern void SteamAPI_ISteamHTMLSurface_OpenDeveloperTools(IntPtr instancePtr, uint unBrowserHandle); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamHTMLSurface_AllowStartRequest")] internal static extern void SteamAPI_ISteamHTMLSurface_AllowStartRequest(IntPtr instancePtr, uint unBrowserHandle, bool bAllowed); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamHTMLSurface_JSDialogResponse")] @@ -1264,9 +1406,9 @@ internal static extern ulong SteamAPI_ISteamInventory_RequestPrices(IntPtr insta [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_GetNumItemsWithPrices")] internal static extern uint SteamAPI_ISteamInventory_GetNumItemsWithPrices(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_GetItemsWithPrices")] -internal static extern bool SteamAPI_ISteamInventory_GetItemsWithPrices(IntPtr instancePtr, [In, Out] int[] pArrayItemDefs, [In, Out] ulong[] pPrices, uint unArrayLength); +internal static extern bool SteamAPI_ISteamInventory_GetItemsWithPrices(IntPtr instancePtr, [In, Out] int[] pArrayItemDefs, [In, Out] ulong[] pCurrentPrices, [In, Out] ulong[] pBasePrices, uint unArrayLength); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_GetItemPrice")] -internal static extern bool SteamAPI_ISteamInventory_GetItemPrice(IntPtr instancePtr, int iDefinition, ref ulong pPrice); +internal static extern bool SteamAPI_ISteamInventory_GetItemPrice(IntPtr instancePtr, int iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_StartUpdateProperties")] internal static extern ulong SteamAPI_ISteamInventory_StartUpdateProperties(IntPtr instancePtr); [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamInventory_RemoveProperty")] @@ -1539,6 +1681,11 @@ public delegate void SteamAPI_HTML_BrowserReady_t_CallResult(HTML_BrowserReady_t public static extern ulong CHTML_BrowserReady_t_SetCallResult(ulong hAPICall, SteamAPI_HTML_BrowserReady_t_CallResult func); [DllImportAttribute("Steam_api", EntryPoint = "CHTML_BrowserReady_t_RemoveCallResult")] public static extern ulong CHTML_BrowserReady_t_RemoveCallResult(ulong handle); +public delegate void SteamAPI_MarketEligibilityResponse_t_CallResult(MarketEligibilityResponse_t pMarketEligibilityResponse_t, bool bIOFailure); +[DllImportAttribute("Steam_api", EntryPoint = "CMarketEligibilityResponse_t_SetCallResult")] +public static extern ulong CMarketEligibilityResponse_t_SetCallResult(ulong hAPICall, SteamAPI_MarketEligibilityResponse_t_CallResult func); +[DllImportAttribute("Steam_api", EntryPoint = "CMarketEligibilityResponse_t_RemoveCallResult")] +public static extern ulong CMarketEligibilityResponse_t_RemoveCallResult(ulong handle); public delegate void SteamAPI_LeaderboardScoresDownloaded_t_CallResult(LeaderboardScoresDownloaded_t pLeaderboardScoresDownloaded_t, bool bIOFailure); [DllImportAttribute("Steam_api", EntryPoint = "CLeaderboardScoresDownloaded_t_SetCallResult")] public static extern ulong CLeaderboardScoresDownloaded_t_SetCallResult(ulong hAPICall, SteamAPI_LeaderboardScoresDownloaded_t_CallResult func); @@ -1549,11 +1696,11 @@ public delegate void SteamAPI_RemoteStorageUpdateUserPublishedItemVoteResult_t_C public static extern ulong CRemoteStorageUpdateUserPublishedItemVoteResult_t_SetCallResult(ulong hAPICall, SteamAPI_RemoteStorageUpdateUserPublishedItemVoteResult_t_CallResult func); [DllImportAttribute("Steam_api", EntryPoint = "CRemoteStorageUpdateUserPublishedItemVoteResult_t_RemoveCallResult")] public static extern ulong CRemoteStorageUpdateUserPublishedItemVoteResult_t_RemoveCallResult(ulong handle); -public delegate void SteamAPI_RemoteStorageEnumerateUserSubscribedFilesResult_t_CallResult(RemoteStorageEnumerateUserSubscribedFilesResult_t pRemoteStorageEnumerateUserSubscribedFilesResult_t, bool bIOFailure); -[DllImportAttribute("Steam_api", EntryPoint = "CRemoteStorageEnumerateUserSubscribedFilesResult_t_SetCallResult")] -public static extern ulong CRemoteStorageEnumerateUserSubscribedFilesResult_t_SetCallResult(ulong hAPICall, SteamAPI_RemoteStorageEnumerateUserSubscribedFilesResult_t_CallResult func); -[DllImportAttribute("Steam_api", EntryPoint = "CRemoteStorageEnumerateUserSubscribedFilesResult_t_RemoveCallResult")] -public static extern ulong CRemoteStorageEnumerateUserSubscribedFilesResult_t_RemoveCallResult(ulong handle); +public delegate void SteamAPI_CreateBeaconCallback_t_CallResult(CreateBeaconCallback_t pCreateBeaconCallback_t, bool bIOFailure); +[DllImportAttribute("Steam_api", EntryPoint = "CCreateBeaconCallback_t_SetCallResult")] +public static extern ulong CCreateBeaconCallback_t_SetCallResult(ulong hAPICall, SteamAPI_CreateBeaconCallback_t_CallResult func); +[DllImportAttribute("Steam_api", EntryPoint = "CCreateBeaconCallback_t_RemoveCallResult")] +public static extern ulong CCreateBeaconCallback_t_RemoveCallResult(ulong handle); public delegate void SteamAPI_CreateItemResult_t_CallResult(CreateItemResult_t pCreateItemResult_t, bool bIOFailure); [DllImportAttribute("Steam_api", EntryPoint = "CCreateItemResult_t_SetCallResult")] public static extern ulong CCreateItemResult_t_SetCallResult(ulong hAPICall, SteamAPI_CreateItemResult_t_CallResult func); @@ -1584,11 +1731,16 @@ public delegate void SteamAPI_LeaderboardScoreUploaded_t_CallResult(LeaderboardS public static extern ulong CLeaderboardScoreUploaded_t_SetCallResult(ulong hAPICall, SteamAPI_LeaderboardScoreUploaded_t_CallResult func); [DllImportAttribute("Steam_api", EntryPoint = "CLeaderboardScoreUploaded_t_RemoveCallResult")] public static extern ulong CLeaderboardScoreUploaded_t_RemoveCallResult(ulong handle); -public delegate void SteamAPI_GlobalAchievementPercentagesReady_t_CallResult(GlobalAchievementPercentagesReady_t pGlobalAchievementPercentagesReady_t, bool bIOFailure); -[DllImportAttribute("Steam_api", EntryPoint = "CGlobalAchievementPercentagesReady_t_SetCallResult")] -public static extern ulong CGlobalAchievementPercentagesReady_t_SetCallResult(ulong hAPICall, SteamAPI_GlobalAchievementPercentagesReady_t_CallResult func); -[DllImportAttribute("Steam_api", EntryPoint = "CGlobalAchievementPercentagesReady_t_RemoveCallResult")] -public static extern ulong CGlobalAchievementPercentagesReady_t_RemoveCallResult(ulong handle); +public delegate void SteamAPI_JoinPartyCallback_t_CallResult(JoinPartyCallback_t pJoinPartyCallback_t, bool bIOFailure); +[DllImportAttribute("Steam_api", EntryPoint = "CJoinPartyCallback_t_SetCallResult")] +public static extern ulong CJoinPartyCallback_t_SetCallResult(ulong hAPICall, SteamAPI_JoinPartyCallback_t_CallResult func); +[DllImportAttribute("Steam_api", EntryPoint = "CJoinPartyCallback_t_RemoveCallResult")] +public static extern ulong CJoinPartyCallback_t_RemoveCallResult(ulong handle); +public delegate void SteamAPI_RemoteStorageEnumerateUserSubscribedFilesResult_t_CallResult(RemoteStorageEnumerateUserSubscribedFilesResult_t pRemoteStorageEnumerateUserSubscribedFilesResult_t, bool bIOFailure); +[DllImportAttribute("Steam_api", EntryPoint = "CRemoteStorageEnumerateUserSubscribedFilesResult_t_SetCallResult")] +public static extern ulong CRemoteStorageEnumerateUserSubscribedFilesResult_t_SetCallResult(ulong hAPICall, SteamAPI_RemoteStorageEnumerateUserSubscribedFilesResult_t_CallResult func); +[DllImportAttribute("Steam_api", EntryPoint = "CRemoteStorageEnumerateUserSubscribedFilesResult_t_RemoveCallResult")] +public static extern ulong CRemoteStorageEnumerateUserSubscribedFilesResult_t_RemoveCallResult(ulong handle); public delegate void SteamAPI_GlobalStatsReceived_t_CallResult(GlobalStatsReceived_t pGlobalStatsReceived_t, bool bIOFailure); [DllImportAttribute("Steam_api", EntryPoint = "CGlobalStatsReceived_t_SetCallResult")] public static extern ulong CGlobalStatsReceived_t_SetCallResult(ulong hAPICall, SteamAPI_GlobalStatsReceived_t_CallResult func); @@ -1624,6 +1776,11 @@ public delegate void SteamAPI_GSReputation_t_CallResult(GSReputation_t pGSReputa public static extern ulong CGSReputation_t_SetCallResult(ulong hAPICall, SteamAPI_GSReputation_t_CallResult func); [DllImportAttribute("Steam_api", EntryPoint = "CGSReputation_t_RemoveCallResult")] public static extern ulong CGSReputation_t_RemoveCallResult(ulong handle); +public delegate void SteamAPI_GlobalAchievementPercentagesReady_t_CallResult(GlobalAchievementPercentagesReady_t pGlobalAchievementPercentagesReady_t, bool bIOFailure); +[DllImportAttribute("Steam_api", EntryPoint = "CGlobalAchievementPercentagesReady_t_SetCallResult")] +public static extern ulong CGlobalAchievementPercentagesReady_t_SetCallResult(ulong hAPICall, SteamAPI_GlobalAchievementPercentagesReady_t_CallResult func); +[DllImportAttribute("Steam_api", EntryPoint = "CGlobalAchievementPercentagesReady_t_RemoveCallResult")] +public static extern ulong CGlobalAchievementPercentagesReady_t_RemoveCallResult(ulong handle); public delegate void SteamAPI_UserFavoriteItemsListChanged_t_CallResult(UserFavoriteItemsListChanged_t pUserFavoriteItemsListChanged_t, bool bIOFailure); [DllImportAttribute("Steam_api", EntryPoint = "CUserFavoriteItemsListChanged_t_SetCallResult")] public static extern ulong CUserFavoriteItemsListChanged_t_SetCallResult(ulong hAPICall, SteamAPI_UserFavoriteItemsListChanged_t_CallResult func); @@ -1659,6 +1816,11 @@ public delegate void SteamAPI_FriendsEnumerateFollowingList_t_CallResult(Friends public static extern ulong CFriendsEnumerateFollowingList_t_SetCallResult(ulong hAPICall, SteamAPI_FriendsEnumerateFollowingList_t_CallResult func); [DllImportAttribute("Steam_api", EntryPoint = "CFriendsEnumerateFollowingList_t_RemoveCallResult")] public static extern ulong CFriendsEnumerateFollowingList_t_RemoveCallResult(ulong handle); +public delegate void SteamAPI_ChangeNumOpenSlotsCallback_t_CallResult(ChangeNumOpenSlotsCallback_t pChangeNumOpenSlotsCallback_t, bool bIOFailure); +[DllImportAttribute("Steam_api", EntryPoint = "CChangeNumOpenSlotsCallback_t_SetCallResult")] +public static extern ulong CChangeNumOpenSlotsCallback_t_SetCallResult(ulong hAPICall, SteamAPI_ChangeNumOpenSlotsCallback_t_CallResult func); +[DllImportAttribute("Steam_api", EntryPoint = "CChangeNumOpenSlotsCallback_t_RemoveCallResult")] +public static extern ulong CChangeNumOpenSlotsCallback_t_RemoveCallResult(ulong handle); public delegate void SteamAPI_RemoteStorageSubscribePublishedFileResult_t_CallResult(RemoteStorageSubscribePublishedFileResult_t pRemoteStorageSubscribePublishedFileResult_t, bool bIOFailure); [DllImportAttribute("Steam_api", EntryPoint = "CRemoteStorageSubscribePublishedFileResult_t_SetCallResult")] public static extern ulong CRemoteStorageSubscribePublishedFileResult_t_SetCallResult(ulong hAPICall, SteamAPI_RemoteStorageSubscribePublishedFileResult_t_CallResult func); @@ -1754,6 +1916,7 @@ namespace Valve.Steamworks public abstract ISteamNetworking GetISteamNetworking(uint hSteamUser,uint hSteamPipe,string pchVersion); public abstract ISteamRemoteStorage GetISteamRemoteStorage(uint hSteamuser,uint hSteamPipe,string pchVersion); public abstract ISteamScreenshots GetISteamScreenshots(uint hSteamuser,uint hSteamPipe,string pchVersion); + public abstract ISteamGameSearch GetISteamGameSearch(uint hSteamuser,uint hSteamPipe,string pchVersion); public abstract uint GetIPCCallCount(); public abstract void SetWarningMessageHook(IntPtr pFunction); public abstract bool BShutdownIfAllPipesClosed(); @@ -1767,6 +1930,8 @@ namespace Valve.Steamworks public abstract ISteamInventory GetISteamInventory(uint hSteamuser,uint hSteamPipe,string pchVersion); public abstract ISteamVideo GetISteamVideo(uint hSteamuser,uint hSteamPipe,string pchVersion); public abstract ISteamParentalSettings GetISteamParentalSettings(uint hSteamuser,uint hSteamPipe,string pchVersion); + public abstract ISteamInput GetISteamInput(uint hSteamUser,uint hSteamPipe,string pchVersion); + public abstract ISteamParties GetISteamParties(uint hSteamUser,uint hSteamPipe,string pchVersion); } @@ -1802,6 +1967,7 @@ namespace Valve.Steamworks public abstract bool BIsTwoFactorEnabled(); public abstract bool BIsPhoneIdentifying(); public abstract bool BIsPhoneRequiringVerification(); + public abstract ulong GetMarketEligibility(); } @@ -1838,7 +2004,7 @@ namespace Valve.Steamworks public abstract void SetInGameVoiceSpeaking(ulong steamIDUser,bool bSpeaking); public abstract void ActivateGameOverlay(string pchDialog); public abstract void ActivateGameOverlayToUser(string pchDialog,ulong steamID); - public abstract void ActivateGameOverlayToWebPage(string pchURL); + public abstract void ActivateGameOverlayToWebPage(string pchURL,uint eMode); public abstract void ActivateGameOverlayToStore(uint nAppID,char eFlag); public abstract void SetPlayedWith(ulong steamIDUserPlayedWith); public abstract void ActivateGameOverlayInviteDialog(ulong steamIDLobby); @@ -1880,6 +2046,7 @@ namespace Valve.Steamworks public abstract ulong EnumerateFollowingList(uint unStartIndex); public abstract bool IsClanPublic(ulong steamIDClan); public abstract bool IsClanOfficialGameGroup(ulong steamIDClan); + public abstract int GetNumChatsWithUnreadPriorityMessages(); } @@ -2020,6 +2187,44 @@ namespace Valve.Steamworks } + public abstract class ISteamGameSearch + { + public abstract IntPtr GetIntPtr(); + public abstract uint AddGameSearchParams(string pchKeyToFind,string pchValuesToFind); + public abstract uint SearchForGameWithLobby(ulong steamIDLobby,int nPlayerMin,int nPlayerMax); + public abstract uint SearchForGameSolo(int nPlayerMin,int nPlayerMax); + public abstract uint AcceptGame(); + public abstract uint DeclineGame(); + public abstract uint RetrieveConnectionDetails(ulong steamIDHost,string pchConnectionDetails,int cubConnectionDetails); + public abstract uint EndGameSearch(); + public abstract uint SetGameHostParams(string pchKey,string pchValue); + public abstract uint SetConnectionDetails(string pchConnectionDetails,int cubConnectionDetails); + public abstract uint RequestPlayersForGame(int nPlayerMin,int nPlayerMax,int nMaxTeamSize); + public abstract uint HostConfirmGameStart(ulong ullUniqueGameID); + public abstract uint CancelRequestPlayersForGame(); + public abstract uint SubmitPlayerResult(ulong ullUniqueGameID,ulong steamIDPlayer,uint EPlayerResult); + public abstract uint EndGame(ulong ullUniqueGameID); + } + + + public abstract class ISteamParties + { + public abstract IntPtr GetIntPtr(); + public abstract uint GetNumActiveBeacons(); + public abstract ulong GetBeaconByIndex(uint unIndex); + public abstract bool GetBeaconDetails(ulong ulBeaconID,ref CSteamID pSteamIDBeaconOwner,out SteamPartyBeaconLocation_t pLocation,out string pchMetadata); + public abstract ulong JoinParty(ulong ulBeaconID); + public abstract bool GetNumAvailableBeaconLocations(ref uint puNumLocations); + public abstract bool GetAvailableBeaconLocations(ref SteamPartyBeaconLocation_t pLocationList,uint uMaxNumLocations); + public abstract ulong CreateBeacon(uint unOpenSlots,ref SteamPartyBeaconLocation_t pBeaconLocation,string pchConnectString,string pchMetadata); + public abstract void OnReservationCompleted(ulong ulBeacon,ulong steamIDUser); + public abstract void CancelReservation(ulong ulBeacon,ulong steamIDUser); + public abstract ulong ChangeNumOpenSlots(ulong ulBeacon,uint unOpenSlots); + public abstract bool DestroyBeacon(ulong ulBeacon); + public abstract bool GetBeaconLocationData(SteamPartyBeaconLocation_t BeaconLocation,uint eData,out string pchDataStringOut); + } + + public abstract class ISteamRemoteStorage { public abstract IntPtr GetIntPtr(); @@ -2159,6 +2364,8 @@ namespace Valve.Steamworks public abstract int GetAppBuildId(); public abstract void RequestAllProofOfPurchaseKeys(); public abstract ulong GetFileDetails(string pszFileName); + public abstract int GetLaunchCommandLine(string pszCommandLine,int cubCommandLine); + public abstract bool BIsSubscribedFromFamilySharing(); } @@ -2289,6 +2496,45 @@ namespace Valve.Steamworks } + public abstract class ISteamInput + { + public abstract IntPtr GetIntPtr(); + public abstract bool Init(); + public abstract bool Shutdown(); + public abstract void RunFrame(); + public abstract int GetConnectedControllers(ref ulong handlesOut); + public abstract ulong GetActionSetHandle(string pszActionSetName); + public abstract void ActivateActionSet(ulong inputHandle,ulong actionSetHandle); + public abstract ulong GetCurrentActionSet(ulong inputHandle); + public abstract void ActivateActionSetLayer(ulong inputHandle,ulong actionSetLayerHandle); + public abstract void DeactivateActionSetLayer(ulong inputHandle,ulong actionSetLayerHandle); + public abstract void DeactivateAllActionSetLayers(ulong inputHandle); + public abstract int GetActiveActionSetLayers(ulong inputHandle,ref ulong handlesOut); + public abstract ulong GetDigitalActionHandle(string pszActionName); + public abstract InputDigitalActionData_t GetDigitalActionData(ulong inputHandle,ulong digitalActionHandle); + public abstract int GetDigitalActionOrigins(ulong inputHandle,ulong actionSetHandle,ulong digitalActionHandle,ref uint originsOut); + public abstract ulong GetAnalogActionHandle(string pszActionName); + public abstract InputAnalogActionData_t GetAnalogActionData(ulong inputHandle,ulong analogActionHandle); + public abstract int GetAnalogActionOrigins(ulong inputHandle,ulong actionSetHandle,ulong analogActionHandle,ref uint originsOut); + public abstract string GetGlyphForActionOrigin(uint eOrigin); + public abstract string GetStringForActionOrigin(uint eOrigin); + public abstract void StopAnalogActionMomentum(ulong inputHandle,ulong eAction); + public abstract InputMotionData_t GetMotionData(ulong inputHandle); + public abstract void TriggerVibration(ulong inputHandle,char usLeftSpeed,char usRightSpeed); + public abstract void SetLEDColor(ulong inputHandle,byte nColorR,byte nColorG,byte nColorB,uint nFlags); + public abstract void TriggerHapticPulse(ulong inputHandle,uint eTargetPad,char usDurationMicroSec); + public abstract void TriggerRepeatedHapticPulse(ulong inputHandle,uint eTargetPad,char usDurationMicroSec,char usOffMicroSec,char unRepeat,uint nFlags); + public abstract bool ShowBindingPanel(ulong inputHandle); + public abstract uint GetInputTypeForHandle(ulong inputHandle); + public abstract ulong GetControllerForGamepadIndex(int nIndex); + public abstract int GetGamepadIndexForController(ulong ulinputHandle); + public abstract string GetStringForXboxOrigin(uint eOrigin); + public abstract string GetGlyphForXboxOrigin(uint eOrigin); + public abstract uint GetActionOriginFromXboxOrigin(ulong inputHandle,uint eOrigin); + public abstract uint TranslateActionOrigin(uint eDestinationInputType,uint eSourceOrigin); + } + + public abstract class ISteamController { public abstract IntPtr GetIntPtr(); @@ -2296,7 +2542,6 @@ namespace Valve.Steamworks public abstract bool Shutdown(); public abstract void RunFrame(); public abstract int GetConnectedControllers(ref ulong handlesOut); - public abstract bool ShowBindingPanel(ulong controllerHandle); public abstract ulong GetActionSetHandle(string pszActionSetName); public abstract void ActivateActionSet(ulong controllerHandle,ulong actionSetHandle); public abstract ulong GetCurrentActionSet(ulong controllerHandle); @@ -2305,24 +2550,27 @@ namespace Valve.Steamworks public abstract void DeactivateAllActionSetLayers(ulong controllerHandle); public abstract int GetActiveActionSetLayers(ulong controllerHandle,ref ulong handlesOut); public abstract ulong GetDigitalActionHandle(string pszActionName); - public abstract ControllerDigitalActionData_t GetDigitalActionData(ulong controllerHandle,ulong digitalActionHandle); + public abstract InputDigitalActionData_t GetDigitalActionData(ulong controllerHandle,ulong digitalActionHandle); public abstract int GetDigitalActionOrigins(ulong controllerHandle,ulong actionSetHandle,ulong digitalActionHandle,ref uint originsOut); public abstract ulong GetAnalogActionHandle(string pszActionName); - public abstract ControllerAnalogActionData_t GetAnalogActionData(ulong controllerHandle,ulong analogActionHandle); + public abstract InputAnalogActionData_t GetAnalogActionData(ulong controllerHandle,ulong analogActionHandle); public abstract int GetAnalogActionOrigins(ulong controllerHandle,ulong actionSetHandle,ulong analogActionHandle,ref uint originsOut); + public abstract string GetGlyphForActionOrigin(uint eOrigin); + public abstract string GetStringForActionOrigin(uint eOrigin); public abstract void StopAnalogActionMomentum(ulong controllerHandle,ulong eAction); + public abstract InputMotionData_t GetMotionData(ulong controllerHandle); public abstract void TriggerHapticPulse(ulong controllerHandle,uint eTargetPad,char usDurationMicroSec); public abstract void TriggerRepeatedHapticPulse(ulong controllerHandle,uint eTargetPad,char usDurationMicroSec,char usOffMicroSec,char unRepeat,uint nFlags); public abstract void TriggerVibration(ulong controllerHandle,char usLeftSpeed,char usRightSpeed); public abstract void SetLEDColor(ulong controllerHandle,byte nColorR,byte nColorG,byte nColorB,uint nFlags); - public abstract int GetGamepadIndexForController(ulong ulControllerHandle); - public abstract ulong GetControllerForGamepadIndex(int nIndex); - public abstract ControllerMotionData_t GetMotionData(ulong controllerHandle); - public abstract bool ShowDigitalActionOrigins(ulong controllerHandle,ulong digitalActionHandle,float flScale,float flXPosition,float flYPosition); - public abstract bool ShowAnalogActionOrigins(ulong controllerHandle,ulong analogActionHandle,float flScale,float flXPosition,float flYPosition); - public abstract string GetStringForActionOrigin(uint eOrigin); - public abstract string GetGlyphForActionOrigin(uint eOrigin); + public abstract bool ShowBindingPanel(ulong controllerHandle); public abstract uint GetInputTypeForHandle(ulong controllerHandle); + public abstract ulong GetControllerForGamepadIndex(int nIndex); + public abstract int GetGamepadIndexForController(ulong ulControllerHandle); + public abstract string GetStringForXboxOrigin(uint eOrigin); + public abstract string GetGlyphForXboxOrigin(uint eOrigin); + public abstract uint GetActionOriginFromXboxOrigin(ulong controllerHandle,uint eOrigin); + public abstract uint TranslateActionOrigin(uint eDestinationInputType,uint eSourceOrigin); } @@ -2331,6 +2579,7 @@ namespace Valve.Steamworks public abstract IntPtr GetIntPtr(); public abstract ulong CreateQueryUserUGCRequest(uint unAccountID,uint eListType,uint eMatchingUGCType,uint eSortOrder,uint nCreatorAppID,uint nConsumerAppID,uint unPage); public abstract ulong CreateQueryAllUGCRequest(uint eQueryType,uint eMatchingeMatchingUGCTypeFileType,uint nCreatorAppID,uint nConsumerAppID,uint unPage); + public abstract ulong CreateQueryAllUGCRequest0(uint eQueryType,uint eMatchingeMatchingUGCTypeFileType,uint nCreatorAppID,uint nConsumerAppID,string pchCursor); public abstract ulong CreateQueryUGCDetailsRequest(ref ulong pvecPublishedFileID,uint unNumPublishedFileIDs); public abstract ulong SendQueryUGCRequest(ulong handle); public abstract bool GetQueryUGCResult(ulong handle,uint index,ref SteamUGCDetails_t pDetails); @@ -2371,6 +2620,7 @@ namespace Valve.Steamworks public abstract bool SetItemTags(ulong updateHandle,ref SteamParamStringArray_t pTags); public abstract bool SetItemContent(ulong handle,string pszContentFolder); public abstract bool SetItemPreview(ulong handle,string pszPreviewFile); + public abstract bool SetAllowLegacyUpload(ulong handle,bool bAllowLegacyUpload); public abstract bool RemoveItemKeyValueTags(ulong handle,string pchKey); public abstract bool AddItemKeyValueTag(ulong handle,string pchKey,string pchValue); public abstract bool AddItemPreviewFile(ulong handle,string pszPreviewFile,uint type); @@ -2438,7 +2688,7 @@ namespace Valve.Steamworks public abstract void MouseDoubleClick(uint unBrowserHandle,uint eMouseButton); public abstract void MouseMove(uint unBrowserHandle,int x,int y); public abstract void MouseWheel(uint unBrowserHandle,int nDelta); - public abstract void KeyDown(uint unBrowserHandle,uint nNativeKeyCode,uint eHTMLKeyModifiers); + public abstract void KeyDown(uint unBrowserHandle,uint nNativeKeyCode,uint eHTMLKeyModifiers,bool bIsSystemKey); public abstract void KeyUp(uint unBrowserHandle,uint nNativeKeyCode,uint eHTMLKeyModifiers); public abstract void KeyChar(uint unBrowserHandle,uint cUnicodeChar,uint eHTMLKeyModifiers); public abstract void SetHorizontalScroll(uint unBrowserHandle,uint nAbsolutePixelScroll); @@ -2454,6 +2704,7 @@ namespace Valve.Steamworks public abstract void SetPageScaleFactor(uint unBrowserHandle,float flZoom,int nPointX,int nPointY); public abstract void SetBackgroundMode(uint unBrowserHandle,bool bBackgroundMode); public abstract void SetDPIScalingFactor(uint unBrowserHandle,float flDPIScaling); + public abstract void OpenDeveloperTools(uint unBrowserHandle); public abstract void AllowStartRequest(uint unBrowserHandle,bool bAllowed); public abstract void JSDialogResponse(uint unBrowserHandle,bool bResult); } @@ -2490,8 +2741,8 @@ namespace Valve.Steamworks public abstract ulong StartPurchase(int [] pArrayItemDefs,uint [] punArrayQuantity); public abstract ulong RequestPrices(); public abstract uint GetNumItemsWithPrices(); - public abstract bool GetItemsWithPrices(out int [] pArrayItemDefs,out ulong [] pPrices,uint unArrayLength); - public abstract bool GetItemPrice(int iDefinition,ref ulong pPrice); + public abstract bool GetItemsWithPrices(out int [] pArrayItemDefs,out ulong [] pCurrentPrices,out ulong [] pBasePrices,uint unArrayLength); + public abstract bool GetItemPrice(int iDefinition,ref ulong pCurrentPrice,ref ulong pBasePrice); public abstract ulong StartUpdateProperties(); public abstract bool RemoveProperty(ulong handle,ulong nItemID,string pchPropertyName); public abstract bool SetProperty(ulong handle,ulong nItemID,string pchPropertyName,string pchPropertyValue); @@ -2720,6 +2971,12 @@ public override ISteamScreenshots GetISteamScreenshots(uint hSteamuser,uint hSte IntPtr result = NativeEntrypoints.SteamAPI_ISteamClient_GetISteamScreenshots(m_pSteamClient,hSteamuser,hSteamPipe,pchVersion); return (ISteamScreenshots) Marshal.PtrToStructure(result, typeof(ISteamScreenshots)); } +public override ISteamGameSearch GetISteamGameSearch(uint hSteamuser,uint hSteamPipe,string pchVersion) +{ + CheckIfUsable(); + IntPtr result = NativeEntrypoints.SteamAPI_ISteamClient_GetISteamGameSearch(m_pSteamClient,hSteamuser,hSteamPipe,pchVersion); + return (ISteamGameSearch) Marshal.PtrToStructure(result, typeof(ISteamGameSearch)); +} public override uint GetIPCCallCount() { CheckIfUsable(); @@ -2797,6 +3054,18 @@ public override ISteamParentalSettings GetISteamParentalSettings(uint hSteamuser IntPtr result = NativeEntrypoints.SteamAPI_ISteamClient_GetISteamParentalSettings(m_pSteamClient,hSteamuser,hSteamPipe,pchVersion); return (ISteamParentalSettings) Marshal.PtrToStructure(result, typeof(ISteamParentalSettings)); } +public override ISteamInput GetISteamInput(uint hSteamUser,uint hSteamPipe,string pchVersion) +{ + CheckIfUsable(); + IntPtr result = NativeEntrypoints.SteamAPI_ISteamClient_GetISteamInput(m_pSteamClient,hSteamUser,hSteamPipe,pchVersion); + return (ISteamInput) Marshal.PtrToStructure(result, typeof(ISteamInput)); +} +public override ISteamParties GetISteamParties(uint hSteamUser,uint hSteamPipe,string pchVersion) +{ + CheckIfUsable(); + IntPtr result = NativeEntrypoints.SteamAPI_ISteamClient_GetISteamParties(m_pSteamClient,hSteamUser,hSteamPipe,pchVersion); + return (ISteamParties) Marshal.PtrToStructure(result, typeof(ISteamParties)); +} } @@ -2991,6 +3260,12 @@ public override bool BIsPhoneRequiringVerification() bool result = NativeEntrypoints.SteamAPI_ISteamUser_BIsPhoneRequiringVerification(m_pSteamUser); return result; } +public override ulong GetMarketEligibility() +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamUser_GetMarketEligibility(m_pSteamUser); + return result; +} } @@ -3193,10 +3468,10 @@ public override void ActivateGameOverlayToUser(string pchDialog,ulong steamID) CheckIfUsable(); NativeEntrypoints.SteamAPI_ISteamFriends_ActivateGameOverlayToUser(m_pSteamFriends,pchDialog,steamID); } -public override void ActivateGameOverlayToWebPage(string pchURL) +public override void ActivateGameOverlayToWebPage(string pchURL,uint eMode) { CheckIfUsable(); - NativeEntrypoints.SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(m_pSteamFriends,pchURL); + NativeEntrypoints.SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(m_pSteamFriends,pchURL,eMode); } public override void ActivateGameOverlayToStore(uint nAppID,char eFlag) { @@ -3442,6 +3717,12 @@ public override bool IsClanOfficialGameGroup(ulong steamIDClan) bool result = NativeEntrypoints.SteamAPI_ISteamFriends_IsClanOfficialGameGroup(m_pSteamFriends,steamIDClan); return result; } +public override int GetNumChatsWithUnreadPriorityMessages() +{ + CheckIfUsable(); + int result = NativeEntrypoints.SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages(m_pSteamFriends); + return result; +} } @@ -4141,6 +4422,210 @@ public override void CancelServerQuery(uint hServerQuery) } +public class CSteamGameSearch : ISteamGameSearch +{ +public CSteamGameSearch(IntPtr SteamGameSearch) +{ + m_pSteamGameSearch = SteamGameSearch; +} +IntPtr m_pSteamGameSearch; + +public override IntPtr GetIntPtr() { return m_pSteamGameSearch; } + +private void CheckIfUsable() +{ + if (m_pSteamGameSearch == IntPtr.Zero) + { + throw new Exception("Steam Pointer not configured"); + } +} +public override uint AddGameSearchParams(string pchKeyToFind,string pchValuesToFind) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_AddGameSearchParams(m_pSteamGameSearch,pchKeyToFind,pchValuesToFind); + return result; +} +public override uint SearchForGameWithLobby(ulong steamIDLobby,int nPlayerMin,int nPlayerMax) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_SearchForGameWithLobby(m_pSteamGameSearch,steamIDLobby,nPlayerMin,nPlayerMax); + return result; +} +public override uint SearchForGameSolo(int nPlayerMin,int nPlayerMax) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_SearchForGameSolo(m_pSteamGameSearch,nPlayerMin,nPlayerMax); + return result; +} +public override uint AcceptGame() +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_AcceptGame(m_pSteamGameSearch); + return result; +} +public override uint DeclineGame() +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_DeclineGame(m_pSteamGameSearch); + return result; +} +public override uint RetrieveConnectionDetails(ulong steamIDHost,string pchConnectionDetails,int cubConnectionDetails) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_RetrieveConnectionDetails(m_pSteamGameSearch,steamIDHost,pchConnectionDetails,cubConnectionDetails); + return result; +} +public override uint EndGameSearch() +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_EndGameSearch(m_pSteamGameSearch); + return result; +} +public override uint SetGameHostParams(string pchKey,string pchValue) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_SetGameHostParams(m_pSteamGameSearch,pchKey,pchValue); + return result; +} +public override uint SetConnectionDetails(string pchConnectionDetails,int cubConnectionDetails) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_SetConnectionDetails(m_pSteamGameSearch,pchConnectionDetails,cubConnectionDetails); + return result; +} +public override uint RequestPlayersForGame(int nPlayerMin,int nPlayerMax,int nMaxTeamSize) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_RequestPlayersForGame(m_pSteamGameSearch,nPlayerMin,nPlayerMax,nMaxTeamSize); + return result; +} +public override uint HostConfirmGameStart(ulong ullUniqueGameID) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_HostConfirmGameStart(m_pSteamGameSearch,ullUniqueGameID); + return result; +} +public override uint CancelRequestPlayersForGame() +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame(m_pSteamGameSearch); + return result; +} +public override uint SubmitPlayerResult(ulong ullUniqueGameID,ulong steamIDPlayer,uint EPlayerResult) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_SubmitPlayerResult(m_pSteamGameSearch,ullUniqueGameID,steamIDPlayer,EPlayerResult); + return result; +} +public override uint EndGame(ulong ullUniqueGameID) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamGameSearch_EndGame(m_pSteamGameSearch,ullUniqueGameID); + return result; +} +} + + +public class CSteamParties : ISteamParties +{ +public CSteamParties(IntPtr SteamParties) +{ + m_pSteamParties = SteamParties; +} +IntPtr m_pSteamParties; + +public override IntPtr GetIntPtr() { return m_pSteamParties; } + +private void CheckIfUsable() +{ + if (m_pSteamParties == IntPtr.Zero) + { + throw new Exception("Steam Pointer not configured"); + } +} +public override uint GetNumActiveBeacons() +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamParties_GetNumActiveBeacons(m_pSteamParties); + return result; +} +public override ulong GetBeaconByIndex(uint unIndex) +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamParties_GetBeaconByIndex(m_pSteamParties,unIndex); + return result; +} +public override bool GetBeaconDetails(ulong ulBeaconID,ref CSteamID pSteamIDBeaconOwner,out SteamPartyBeaconLocation_t pLocation,out string pchMetadata) +{ + CheckIfUsable(); + pLocation = new SteamPartyBeaconLocation_t(); + int cchMetadata = 0; + bool result = NativeEntrypoints.SteamAPI_ISteamParties_GetBeaconDetails(m_pSteamParties,ulBeaconID,ref pSteamIDBeaconOwner,ref pLocation,null,ref cchMetadata); + System.Text.StringBuilder pStrBuffer1 = new System.Text.StringBuilder((int)cchMetadata); + result = NativeEntrypoints.SteamAPI_ISteamParties_GetBeaconDetails(m_pSteamParties,ulBeaconID,ref pSteamIDBeaconOwner,ref pLocation,pStrBuffer1,ref cchMetadata); + pchMetadata = pStrBuffer1.ToString(); + return result; +} +public override ulong JoinParty(ulong ulBeaconID) +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamParties_JoinParty(m_pSteamParties,ulBeaconID); + return result; +} +public override bool GetNumAvailableBeaconLocations(ref uint puNumLocations) +{ + CheckIfUsable(); + puNumLocations = 0; + bool result = NativeEntrypoints.SteamAPI_ISteamParties_GetNumAvailableBeaconLocations(m_pSteamParties,ref puNumLocations); + return result; +} +public override bool GetAvailableBeaconLocations(ref SteamPartyBeaconLocation_t pLocationList,uint uMaxNumLocations) +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamParties_GetAvailableBeaconLocations(m_pSteamParties,ref pLocationList,uMaxNumLocations); + return result; +} +public override ulong CreateBeacon(uint unOpenSlots,ref SteamPartyBeaconLocation_t pBeaconLocation,string pchConnectString,string pchMetadata) +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamParties_CreateBeacon(m_pSteamParties,unOpenSlots,ref pBeaconLocation,pchConnectString,pchMetadata); + return result; +} +public override void OnReservationCompleted(ulong ulBeacon,ulong steamIDUser) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamParties_OnReservationCompleted(m_pSteamParties,ulBeacon,steamIDUser); +} +public override void CancelReservation(ulong ulBeacon,ulong steamIDUser) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamParties_CancelReservation(m_pSteamParties,ulBeacon,steamIDUser); +} +public override ulong ChangeNumOpenSlots(ulong ulBeacon,uint unOpenSlots) +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamParties_ChangeNumOpenSlots(m_pSteamParties,ulBeacon,unOpenSlots); + return result; +} +public override bool DestroyBeacon(ulong ulBeacon) +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamParties_DestroyBeacon(m_pSteamParties,ulBeacon); + return result; +} +public override bool GetBeaconLocationData(SteamPartyBeaconLocation_t BeaconLocation,uint eData,out string pchDataStringOut) +{ + CheckIfUsable(); + int cchDataStringOut = 0; + bool result = NativeEntrypoints.SteamAPI_ISteamParties_GetBeaconLocationData(m_pSteamParties,BeaconLocation,eData,null,ref cchDataStringOut); + System.Text.StringBuilder pStrBuffer1 = new System.Text.StringBuilder((int)cchDataStringOut); + result = NativeEntrypoints.SteamAPI_ISteamParties_GetBeaconLocationData(m_pSteamParties,BeaconLocation,eData,pStrBuffer1,ref cchDataStringOut); + pchDataStringOut = pStrBuffer1.ToString(); + return result; +} +} + + public class CSteamRemoteStorage : ISteamRemoteStorage { public CSteamRemoteStorage(IntPtr SteamRemoteStorage) @@ -4969,6 +5454,18 @@ public override ulong GetFileDetails(string pszFileName) ulong result = NativeEntrypoints.SteamAPI_ISteamApps_GetFileDetails(m_pSteamApps,pszFileName); return result; } +public override int GetLaunchCommandLine(string pszCommandLine,int cubCommandLine) +{ + CheckIfUsable(); + int result = NativeEntrypoints.SteamAPI_ISteamApps_GetLaunchCommandLine(m_pSteamApps,pszCommandLine,cubCommandLine); + return result; +} +public override bool BIsSubscribedFromFamilySharing() +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing(m_pSteamApps); + return result; +} } @@ -5666,6 +6163,218 @@ public override bool GetHTTPRequestWasTimedOut(uint hRequest,ref bool pbWasTimed } +public class CSteamInput : ISteamInput +{ +public CSteamInput(IntPtr SteamInput) +{ + m_pSteamInput = SteamInput; +} +IntPtr m_pSteamInput; + +public override IntPtr GetIntPtr() { return m_pSteamInput; } + +private void CheckIfUsable() +{ + if (m_pSteamInput == IntPtr.Zero) + { + throw new Exception("Steam Pointer not configured"); + } +} +public override bool Init() +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamInput_Init(m_pSteamInput); + return result; +} +public override bool Shutdown() +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamInput_Shutdown(m_pSteamInput); + return result; +} +public override void RunFrame() +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamInput_RunFrame(m_pSteamInput); +} +public override int GetConnectedControllers(ref ulong handlesOut) +{ + CheckIfUsable(); + handlesOut = 0; + int result = NativeEntrypoints.SteamAPI_ISteamInput_GetConnectedControllers(m_pSteamInput,ref handlesOut); + return result; +} +public override ulong GetActionSetHandle(string pszActionSetName) +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamInput_GetActionSetHandle(m_pSteamInput,pszActionSetName); + return result; +} +public override void ActivateActionSet(ulong inputHandle,ulong actionSetHandle) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamInput_ActivateActionSet(m_pSteamInput,inputHandle,actionSetHandle); +} +public override ulong GetCurrentActionSet(ulong inputHandle) +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamInput_GetCurrentActionSet(m_pSteamInput,inputHandle); + return result; +} +public override void ActivateActionSetLayer(ulong inputHandle,ulong actionSetLayerHandle) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamInput_ActivateActionSetLayer(m_pSteamInput,inputHandle,actionSetLayerHandle); +} +public override void DeactivateActionSetLayer(ulong inputHandle,ulong actionSetLayerHandle) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamInput_DeactivateActionSetLayer(m_pSteamInput,inputHandle,actionSetLayerHandle); +} +public override void DeactivateAllActionSetLayers(ulong inputHandle) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamInput_DeactivateAllActionSetLayers(m_pSteamInput,inputHandle); +} +public override int GetActiveActionSetLayers(ulong inputHandle,ref ulong handlesOut) +{ + CheckIfUsable(); + handlesOut = 0; + int result = NativeEntrypoints.SteamAPI_ISteamInput_GetActiveActionSetLayers(m_pSteamInput,inputHandle,ref handlesOut); + return result; +} +public override ulong GetDigitalActionHandle(string pszActionName) +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamInput_GetDigitalActionHandle(m_pSteamInput,pszActionName); + return result; +} +public override InputDigitalActionData_t GetDigitalActionData(ulong inputHandle,ulong digitalActionHandle) +{ + CheckIfUsable(); + InputDigitalActionData_t result = NativeEntrypoints.SteamAPI_ISteamInput_GetDigitalActionData(m_pSteamInput,inputHandle,digitalActionHandle); + return result; +} +public override int GetDigitalActionOrigins(ulong inputHandle,ulong actionSetHandle,ulong digitalActionHandle,ref uint originsOut) +{ + CheckIfUsable(); + originsOut = 0; + int result = NativeEntrypoints.SteamAPI_ISteamInput_GetDigitalActionOrigins(m_pSteamInput,inputHandle,actionSetHandle,digitalActionHandle,ref originsOut); + return result; +} +public override ulong GetAnalogActionHandle(string pszActionName) +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamInput_GetAnalogActionHandle(m_pSteamInput,pszActionName); + return result; +} +public override InputAnalogActionData_t GetAnalogActionData(ulong inputHandle,ulong analogActionHandle) +{ + CheckIfUsable(); + InputAnalogActionData_t result = NativeEntrypoints.SteamAPI_ISteamInput_GetAnalogActionData(m_pSteamInput,inputHandle,analogActionHandle); + return result; +} +public override int GetAnalogActionOrigins(ulong inputHandle,ulong actionSetHandle,ulong analogActionHandle,ref uint originsOut) +{ + CheckIfUsable(); + originsOut = 0; + int result = NativeEntrypoints.SteamAPI_ISteamInput_GetAnalogActionOrigins(m_pSteamInput,inputHandle,actionSetHandle,analogActionHandle,ref originsOut); + return result; +} +public override string GetGlyphForActionOrigin(uint eOrigin) +{ + CheckIfUsable(); + IntPtr result = NativeEntrypoints.SteamAPI_ISteamInput_GetGlyphForActionOrigin(m_pSteamInput,eOrigin); + return Marshal.PtrToStringAnsi(result); +} +public override string GetStringForActionOrigin(uint eOrigin) +{ + CheckIfUsable(); + IntPtr result = NativeEntrypoints.SteamAPI_ISteamInput_GetStringForActionOrigin(m_pSteamInput,eOrigin); + return Marshal.PtrToStringAnsi(result); +} +public override void StopAnalogActionMomentum(ulong inputHandle,ulong eAction) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamInput_StopAnalogActionMomentum(m_pSteamInput,inputHandle,eAction); +} +public override InputMotionData_t GetMotionData(ulong inputHandle) +{ + CheckIfUsable(); + InputMotionData_t result = NativeEntrypoints.SteamAPI_ISteamInput_GetMotionData(m_pSteamInput,inputHandle); + return result; +} +public override void TriggerVibration(ulong inputHandle,char usLeftSpeed,char usRightSpeed) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamInput_TriggerVibration(m_pSteamInput,inputHandle,usLeftSpeed,usRightSpeed); +} +public override void SetLEDColor(ulong inputHandle,byte nColorR,byte nColorG,byte nColorB,uint nFlags) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamInput_SetLEDColor(m_pSteamInput,inputHandle,nColorR,nColorG,nColorB,nFlags); +} +public override void TriggerHapticPulse(ulong inputHandle,uint eTargetPad,char usDurationMicroSec) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamInput_TriggerHapticPulse(m_pSteamInput,inputHandle,eTargetPad,usDurationMicroSec); +} +public override void TriggerRepeatedHapticPulse(ulong inputHandle,uint eTargetPad,char usDurationMicroSec,char usOffMicroSec,char unRepeat,uint nFlags) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamInput_TriggerRepeatedHapticPulse(m_pSteamInput,inputHandle,eTargetPad,usDurationMicroSec,usOffMicroSec,unRepeat,nFlags); +} +public override bool ShowBindingPanel(ulong inputHandle) +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamInput_ShowBindingPanel(m_pSteamInput,inputHandle); + return result; +} +public override uint GetInputTypeForHandle(ulong inputHandle) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamInput_GetInputTypeForHandle(m_pSteamInput,inputHandle); + return result; +} +public override ulong GetControllerForGamepadIndex(int nIndex) +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamInput_GetControllerForGamepadIndex(m_pSteamInput,nIndex); + return result; +} +public override int GetGamepadIndexForController(ulong ulinputHandle) +{ + CheckIfUsable(); + int result = NativeEntrypoints.SteamAPI_ISteamInput_GetGamepadIndexForController(m_pSteamInput,ulinputHandle); + return result; +} +public override string GetStringForXboxOrigin(uint eOrigin) +{ + CheckIfUsable(); + IntPtr result = NativeEntrypoints.SteamAPI_ISteamInput_GetStringForXboxOrigin(m_pSteamInput,eOrigin); + return Marshal.PtrToStringAnsi(result); +} +public override string GetGlyphForXboxOrigin(uint eOrigin) +{ + CheckIfUsable(); + IntPtr result = NativeEntrypoints.SteamAPI_ISteamInput_GetGlyphForXboxOrigin(m_pSteamInput,eOrigin); + return Marshal.PtrToStringAnsi(result); +} +public override uint GetActionOriginFromXboxOrigin(ulong inputHandle,uint eOrigin) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin(m_pSteamInput,inputHandle,eOrigin); + return result; +} +public override uint TranslateActionOrigin(uint eDestinationInputType,uint eSourceOrigin) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamInput_TranslateActionOrigin(m_pSteamInput,eDestinationInputType,eSourceOrigin); + return result; +} +} + + public class CSteamController : ISteamController { public CSteamController(IntPtr SteamController) @@ -5707,12 +6416,6 @@ public override int GetConnectedControllers(ref ulong handlesOut) int result = NativeEntrypoints.SteamAPI_ISteamController_GetConnectedControllers(m_pSteamController,ref handlesOut); return result; } -public override bool ShowBindingPanel(ulong controllerHandle) -{ - CheckIfUsable(); - bool result = NativeEntrypoints.SteamAPI_ISteamController_ShowBindingPanel(m_pSteamController,controllerHandle); - return result; -} public override ulong GetActionSetHandle(string pszActionSetName) { CheckIfUsable(); @@ -5758,10 +6461,10 @@ public override ulong GetDigitalActionHandle(string pszActionName) ulong result = NativeEntrypoints.SteamAPI_ISteamController_GetDigitalActionHandle(m_pSteamController,pszActionName); return result; } -public override ControllerDigitalActionData_t GetDigitalActionData(ulong controllerHandle,ulong digitalActionHandle) +public override InputDigitalActionData_t GetDigitalActionData(ulong controllerHandle,ulong digitalActionHandle) { CheckIfUsable(); - ControllerDigitalActionData_t result = NativeEntrypoints.SteamAPI_ISteamController_GetDigitalActionData(m_pSteamController,controllerHandle,digitalActionHandle); + InputDigitalActionData_t result = NativeEntrypoints.SteamAPI_ISteamController_GetDigitalActionData(m_pSteamController,controllerHandle,digitalActionHandle); return result; } public override int GetDigitalActionOrigins(ulong controllerHandle,ulong actionSetHandle,ulong digitalActionHandle,ref uint originsOut) @@ -5777,10 +6480,10 @@ public override ulong GetAnalogActionHandle(string pszActionName) ulong result = NativeEntrypoints.SteamAPI_ISteamController_GetAnalogActionHandle(m_pSteamController,pszActionName); return result; } -public override ControllerAnalogActionData_t GetAnalogActionData(ulong controllerHandle,ulong analogActionHandle) +public override InputAnalogActionData_t GetAnalogActionData(ulong controllerHandle,ulong analogActionHandle) { CheckIfUsable(); - ControllerAnalogActionData_t result = NativeEntrypoints.SteamAPI_ISteamController_GetAnalogActionData(m_pSteamController,controllerHandle,analogActionHandle); + InputAnalogActionData_t result = NativeEntrypoints.SteamAPI_ISteamController_GetAnalogActionData(m_pSteamController,controllerHandle,analogActionHandle); return result; } public override int GetAnalogActionOrigins(ulong controllerHandle,ulong actionSetHandle,ulong analogActionHandle,ref uint originsOut) @@ -5790,11 +6493,29 @@ public override int GetAnalogActionOrigins(ulong controllerHandle,ulong actionSe int result = NativeEntrypoints.SteamAPI_ISteamController_GetAnalogActionOrigins(m_pSteamController,controllerHandle,actionSetHandle,analogActionHandle,ref originsOut); return result; } +public override string GetGlyphForActionOrigin(uint eOrigin) +{ + CheckIfUsable(); + IntPtr result = NativeEntrypoints.SteamAPI_ISteamController_GetGlyphForActionOrigin(m_pSteamController,eOrigin); + return Marshal.PtrToStringAnsi(result); +} +public override string GetStringForActionOrigin(uint eOrigin) +{ + CheckIfUsable(); + IntPtr result = NativeEntrypoints.SteamAPI_ISteamController_GetStringForActionOrigin(m_pSteamController,eOrigin); + return Marshal.PtrToStringAnsi(result); +} public override void StopAnalogActionMomentum(ulong controllerHandle,ulong eAction) { CheckIfUsable(); NativeEntrypoints.SteamAPI_ISteamController_StopAnalogActionMomentum(m_pSteamController,controllerHandle,eAction); } +public override InputMotionData_t GetMotionData(ulong controllerHandle) +{ + CheckIfUsable(); + InputMotionData_t result = NativeEntrypoints.SteamAPI_ISteamController_GetMotionData(m_pSteamController,controllerHandle); + return result; +} public override void TriggerHapticPulse(ulong controllerHandle,uint eTargetPad,char usDurationMicroSec) { CheckIfUsable(); @@ -5815,10 +6536,16 @@ public override void SetLEDColor(ulong controllerHandle,byte nColorR,byte nColor CheckIfUsable(); NativeEntrypoints.SteamAPI_ISteamController_SetLEDColor(m_pSteamController,controllerHandle,nColorR,nColorG,nColorB,nFlags); } -public override int GetGamepadIndexForController(ulong ulControllerHandle) +public override bool ShowBindingPanel(ulong controllerHandle) { CheckIfUsable(); - int result = NativeEntrypoints.SteamAPI_ISteamController_GetGamepadIndexForController(m_pSteamController,ulControllerHandle); + bool result = NativeEntrypoints.SteamAPI_ISteamController_ShowBindingPanel(m_pSteamController,controllerHandle); + return result; +} +public override uint GetInputTypeForHandle(ulong controllerHandle) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamController_GetInputTypeForHandle(m_pSteamController,controllerHandle); return result; } public override ulong GetControllerForGamepadIndex(int nIndex) @@ -5827,40 +6554,34 @@ public override ulong GetControllerForGamepadIndex(int nIndex) ulong result = NativeEntrypoints.SteamAPI_ISteamController_GetControllerForGamepadIndex(m_pSteamController,nIndex); return result; } -public override ControllerMotionData_t GetMotionData(ulong controllerHandle) +public override int GetGamepadIndexForController(ulong ulControllerHandle) { CheckIfUsable(); - ControllerMotionData_t result = NativeEntrypoints.SteamAPI_ISteamController_GetMotionData(m_pSteamController,controllerHandle); + int result = NativeEntrypoints.SteamAPI_ISteamController_GetGamepadIndexForController(m_pSteamController,ulControllerHandle); return result; } -public override bool ShowDigitalActionOrigins(ulong controllerHandle,ulong digitalActionHandle,float flScale,float flXPosition,float flYPosition) +public override string GetStringForXboxOrigin(uint eOrigin) { CheckIfUsable(); - bool result = NativeEntrypoints.SteamAPI_ISteamController_ShowDigitalActionOrigins(m_pSteamController,controllerHandle,digitalActionHandle,flScale,flXPosition,flYPosition); - return result; -} -public override bool ShowAnalogActionOrigins(ulong controllerHandle,ulong analogActionHandle,float flScale,float flXPosition,float flYPosition) -{ - CheckIfUsable(); - bool result = NativeEntrypoints.SteamAPI_ISteamController_ShowAnalogActionOrigins(m_pSteamController,controllerHandle,analogActionHandle,flScale,flXPosition,flYPosition); - return result; -} -public override string GetStringForActionOrigin(uint eOrigin) -{ - CheckIfUsable(); - IntPtr result = NativeEntrypoints.SteamAPI_ISteamController_GetStringForActionOrigin(m_pSteamController,eOrigin); + IntPtr result = NativeEntrypoints.SteamAPI_ISteamController_GetStringForXboxOrigin(m_pSteamController,eOrigin); return Marshal.PtrToStringAnsi(result); } -public override string GetGlyphForActionOrigin(uint eOrigin) +public override string GetGlyphForXboxOrigin(uint eOrigin) { CheckIfUsable(); - IntPtr result = NativeEntrypoints.SteamAPI_ISteamController_GetGlyphForActionOrigin(m_pSteamController,eOrigin); + IntPtr result = NativeEntrypoints.SteamAPI_ISteamController_GetGlyphForXboxOrigin(m_pSteamController,eOrigin); return Marshal.PtrToStringAnsi(result); } -public override uint GetInputTypeForHandle(ulong controllerHandle) +public override uint GetActionOriginFromXboxOrigin(ulong controllerHandle,uint eOrigin) { CheckIfUsable(); - uint result = NativeEntrypoints.SteamAPI_ISteamController_GetInputTypeForHandle(m_pSteamController,controllerHandle); + uint result = NativeEntrypoints.SteamAPI_ISteamController_GetActionOriginFromXboxOrigin(m_pSteamController,controllerHandle,eOrigin); + return result; +} +public override uint TranslateActionOrigin(uint eDestinationInputType,uint eSourceOrigin) +{ + CheckIfUsable(); + uint result = NativeEntrypoints.SteamAPI_ISteamController_TranslateActionOrigin(m_pSteamController,eDestinationInputType,eSourceOrigin); return result; } } @@ -5895,6 +6616,12 @@ public override ulong CreateQueryAllUGCRequest(uint eQueryType,uint eMatchingeMa ulong result = NativeEntrypoints.SteamAPI_ISteamUGC_CreateQueryAllUGCRequest(m_pSteamUGC,eQueryType,eMatchingeMatchingUGCTypeFileType,nCreatorAppID,nConsumerAppID,unPage); return result; } +public override ulong CreateQueryAllUGCRequest0(uint eQueryType,uint eMatchingeMatchingUGCTypeFileType,uint nCreatorAppID,uint nConsumerAppID,string pchCursor) +{ + CheckIfUsable(); + ulong result = NativeEntrypoints.SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0(m_pSteamUGC,eQueryType,eMatchingeMatchingUGCTypeFileType,nCreatorAppID,nConsumerAppID,pchCursor); + return result; +} public override ulong CreateQueryUGCDetailsRequest(ref ulong pvecPublishedFileID,uint unNumPublishedFileIDs) { CheckIfUsable(); @@ -6151,6 +6878,12 @@ public override bool SetItemPreview(ulong handle,string pszPreviewFile) bool result = NativeEntrypoints.SteamAPI_ISteamUGC_SetItemPreview(m_pSteamUGC,handle,pszPreviewFile); return result; } +public override bool SetAllowLegacyUpload(ulong handle,bool bAllowLegacyUpload) +{ + CheckIfUsable(); + bool result = NativeEntrypoints.SteamAPI_ISteamUGC_SetAllowLegacyUpload(m_pSteamUGC,handle,bAllowLegacyUpload); + return result; +} public override bool RemoveItemKeyValueTags(ulong handle,string pchKey) { CheckIfUsable(); @@ -6517,10 +7250,10 @@ public override void MouseWheel(uint unBrowserHandle,int nDelta) CheckIfUsable(); NativeEntrypoints.SteamAPI_ISteamHTMLSurface_MouseWheel(m_pSteamHTMLSurface,unBrowserHandle,nDelta); } -public override void KeyDown(uint unBrowserHandle,uint nNativeKeyCode,uint eHTMLKeyModifiers) +public override void KeyDown(uint unBrowserHandle,uint nNativeKeyCode,uint eHTMLKeyModifiers,bool bIsSystemKey) { CheckIfUsable(); - NativeEntrypoints.SteamAPI_ISteamHTMLSurface_KeyDown(m_pSteamHTMLSurface,unBrowserHandle,nNativeKeyCode,eHTMLKeyModifiers); + NativeEntrypoints.SteamAPI_ISteamHTMLSurface_KeyDown(m_pSteamHTMLSurface,unBrowserHandle,nNativeKeyCode,eHTMLKeyModifiers,bIsSystemKey); } public override void KeyUp(uint unBrowserHandle,uint nNativeKeyCode,uint eHTMLKeyModifiers) { @@ -6597,6 +7330,11 @@ public override void SetDPIScalingFactor(uint unBrowserHandle,float flDPIScaling CheckIfUsable(); NativeEntrypoints.SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor(m_pSteamHTMLSurface,unBrowserHandle,flDPIScaling); } +public override void OpenDeveloperTools(uint unBrowserHandle) +{ + CheckIfUsable(); + NativeEntrypoints.SteamAPI_ISteamHTMLSurface_OpenDeveloperTools(m_pSteamHTMLSurface,unBrowserHandle); +} public override void AllowStartRequest(uint unBrowserHandle,bool bAllowed) { CheckIfUsable(); @@ -6823,22 +7561,25 @@ public override uint GetNumItemsWithPrices() uint result = NativeEntrypoints.SteamAPI_ISteamInventory_GetNumItemsWithPrices(m_pSteamInventory); return result; } -public override bool GetItemsWithPrices(out int [] pArrayItemDefs,out ulong [] pPrices,uint unArrayLength) +public override bool GetItemsWithPrices(out int [] pArrayItemDefs,out ulong [] pCurrentPrices,out ulong [] pBasePrices,uint unArrayLength) { CheckIfUsable(); pArrayItemDefs = 0; pPrices = 0; - bool result = NativeEntrypoints.SteamAPI_ISteamInventory_GetItemsWithPrices(m_pSteamInventory,pArrayItemDefs,null,unArrayLength); + pBasePrices = 0; + bool result = NativeEntrypoints.SteamAPI_ISteamInventory_GetItemsWithPrices(m_pSteamInventory,pArrayItemDefs,pCurrentPrices,null,unArrayLength); pArrayItemDefs= new int[pArrayItemDefs]; - pPrices= new ulong[pPrices]; - result = NativeEntrypoints.SteamAPI_ISteamInventory_GetItemsWithPrices(m_pSteamInventory,pArrayItemDefs,pPrices,unArrayLength); + pCurrentPrices= new ulong[pPrices]; + pBasePrices= new ulong[pPrices]; + result = NativeEntrypoints.SteamAPI_ISteamInventory_GetItemsWithPrices(m_pSteamInventory,pArrayItemDefs,pCurrentPrices,pBasePrices,unArrayLength); return result; } -public override bool GetItemPrice(int iDefinition,ref ulong pPrice) +public override bool GetItemPrice(int iDefinition,ref ulong pCurrentPrice,ref ulong pBasePrice) { CheckIfUsable(); - pPrice = 0; - bool result = NativeEntrypoints.SteamAPI_ISteamInventory_GetItemPrice(m_pSteamInventory,iDefinition,ref pPrice); + pCurrentPrice = 0; + pBasePrice = 0; + bool result = NativeEntrypoints.SteamAPI_ISteamInventory_GetItemPrice(m_pSteamInventory,iDefinition,ref pCurrentPrice,ref pBasePrice); return result; } public override ulong StartUpdateProperties() @@ -7851,6 +8592,26 @@ public class CHTML_BrowserReady_t_CallResult m_Handle = Valve.Interop.NativeEntrypoints.CHTML_BrowserReady_t_SetCallResult(hAPICall, func); } } +public class CMarketEligibilityResponse_t_CallResult +{ + public CMarketEligibilityResponse_t_CallResult() { } + ~CMarketEligibilityResponse_t_CallResult() + { + if(m_Handle != 0) + { + Valve.Interop.NativeEntrypoints.CMarketEligibilityResponse_t_RemoveCallResult(m_Handle); + } + } + ulong m_Handle = 0; + public void Set(ulong hAPICall, Valve.Interop.NativeEntrypoints.SteamAPI_MarketEligibilityResponse_t_CallResult func) + { + if (m_Handle != 0) + { + Valve.Interop.NativeEntrypoints.CMarketEligibilityResponse_t_RemoveCallResult(m_Handle); + } + m_Handle = Valve.Interop.NativeEntrypoints.CMarketEligibilityResponse_t_SetCallResult(hAPICall, func); + } +} public class CLeaderboardScoresDownloaded_t_CallResult { public CLeaderboardScoresDownloaded_t_CallResult() { } @@ -7891,24 +8652,24 @@ public class CRemoteStorageUpdateUserPublishedItemVoteResult_t_CallResult m_Handle = Valve.Interop.NativeEntrypoints.CRemoteStorageUpdateUserPublishedItemVoteResult_t_SetCallResult(hAPICall, func); } } -public class CRemoteStorageEnumerateUserSubscribedFilesResult_t_CallResult +public class CCreateBeaconCallback_t_CallResult { - public CRemoteStorageEnumerateUserSubscribedFilesResult_t_CallResult() { } - ~CRemoteStorageEnumerateUserSubscribedFilesResult_t_CallResult() + public CCreateBeaconCallback_t_CallResult() { } + ~CCreateBeaconCallback_t_CallResult() { if(m_Handle != 0) { - Valve.Interop.NativeEntrypoints.CRemoteStorageEnumerateUserSubscribedFilesResult_t_RemoveCallResult(m_Handle); + Valve.Interop.NativeEntrypoints.CCreateBeaconCallback_t_RemoveCallResult(m_Handle); } } ulong m_Handle = 0; - public void Set(ulong hAPICall, Valve.Interop.NativeEntrypoints.SteamAPI_RemoteStorageEnumerateUserSubscribedFilesResult_t_CallResult func) + public void Set(ulong hAPICall, Valve.Interop.NativeEntrypoints.SteamAPI_CreateBeaconCallback_t_CallResult func) { if (m_Handle != 0) { - Valve.Interop.NativeEntrypoints.CRemoteStorageEnumerateUserSubscribedFilesResult_t_RemoveCallResult(m_Handle); + Valve.Interop.NativeEntrypoints.CCreateBeaconCallback_t_RemoveCallResult(m_Handle); } - m_Handle = Valve.Interop.NativeEntrypoints.CRemoteStorageEnumerateUserSubscribedFilesResult_t_SetCallResult(hAPICall, func); + m_Handle = Valve.Interop.NativeEntrypoints.CCreateBeaconCallback_t_SetCallResult(hAPICall, func); } } public class CCreateItemResult_t_CallResult @@ -8031,24 +8792,44 @@ public class CLeaderboardScoreUploaded_t_CallResult m_Handle = Valve.Interop.NativeEntrypoints.CLeaderboardScoreUploaded_t_SetCallResult(hAPICall, func); } } -public class CGlobalAchievementPercentagesReady_t_CallResult +public class CJoinPartyCallback_t_CallResult { - public CGlobalAchievementPercentagesReady_t_CallResult() { } - ~CGlobalAchievementPercentagesReady_t_CallResult() + public CJoinPartyCallback_t_CallResult() { } + ~CJoinPartyCallback_t_CallResult() { if(m_Handle != 0) { - Valve.Interop.NativeEntrypoints.CGlobalAchievementPercentagesReady_t_RemoveCallResult(m_Handle); + Valve.Interop.NativeEntrypoints.CJoinPartyCallback_t_RemoveCallResult(m_Handle); } } ulong m_Handle = 0; - public void Set(ulong hAPICall, Valve.Interop.NativeEntrypoints.SteamAPI_GlobalAchievementPercentagesReady_t_CallResult func) + public void Set(ulong hAPICall, Valve.Interop.NativeEntrypoints.SteamAPI_JoinPartyCallback_t_CallResult func) { if (m_Handle != 0) { - Valve.Interop.NativeEntrypoints.CGlobalAchievementPercentagesReady_t_RemoveCallResult(m_Handle); + Valve.Interop.NativeEntrypoints.CJoinPartyCallback_t_RemoveCallResult(m_Handle); } - m_Handle = Valve.Interop.NativeEntrypoints.CGlobalAchievementPercentagesReady_t_SetCallResult(hAPICall, func); + m_Handle = Valve.Interop.NativeEntrypoints.CJoinPartyCallback_t_SetCallResult(hAPICall, func); + } +} +public class CRemoteStorageEnumerateUserSubscribedFilesResult_t_CallResult +{ + public CRemoteStorageEnumerateUserSubscribedFilesResult_t_CallResult() { } + ~CRemoteStorageEnumerateUserSubscribedFilesResult_t_CallResult() + { + if(m_Handle != 0) + { + Valve.Interop.NativeEntrypoints.CRemoteStorageEnumerateUserSubscribedFilesResult_t_RemoveCallResult(m_Handle); + } + } + ulong m_Handle = 0; + public void Set(ulong hAPICall, Valve.Interop.NativeEntrypoints.SteamAPI_RemoteStorageEnumerateUserSubscribedFilesResult_t_CallResult func) + { + if (m_Handle != 0) + { + Valve.Interop.NativeEntrypoints.CRemoteStorageEnumerateUserSubscribedFilesResult_t_RemoveCallResult(m_Handle); + } + m_Handle = Valve.Interop.NativeEntrypoints.CRemoteStorageEnumerateUserSubscribedFilesResult_t_SetCallResult(hAPICall, func); } } public class CGlobalStatsReceived_t_CallResult @@ -8191,6 +8972,26 @@ public class CGSReputation_t_CallResult m_Handle = Valve.Interop.NativeEntrypoints.CGSReputation_t_SetCallResult(hAPICall, func); } } +public class CGlobalAchievementPercentagesReady_t_CallResult +{ + public CGlobalAchievementPercentagesReady_t_CallResult() { } + ~CGlobalAchievementPercentagesReady_t_CallResult() + { + if(m_Handle != 0) + { + Valve.Interop.NativeEntrypoints.CGlobalAchievementPercentagesReady_t_RemoveCallResult(m_Handle); + } + } + ulong m_Handle = 0; + public void Set(ulong hAPICall, Valve.Interop.NativeEntrypoints.SteamAPI_GlobalAchievementPercentagesReady_t_CallResult func) + { + if (m_Handle != 0) + { + Valve.Interop.NativeEntrypoints.CGlobalAchievementPercentagesReady_t_RemoveCallResult(m_Handle); + } + m_Handle = Valve.Interop.NativeEntrypoints.CGlobalAchievementPercentagesReady_t_SetCallResult(hAPICall, func); + } +} public class CUserFavoriteItemsListChanged_t_CallResult { public CUserFavoriteItemsListChanged_t_CallResult() { } @@ -8331,6 +9132,26 @@ public class CFriendsEnumerateFollowingList_t_CallResult m_Handle = Valve.Interop.NativeEntrypoints.CFriendsEnumerateFollowingList_t_SetCallResult(hAPICall, func); } } +public class CChangeNumOpenSlotsCallback_t_CallResult +{ + public CChangeNumOpenSlotsCallback_t_CallResult() { } + ~CChangeNumOpenSlotsCallback_t_CallResult() + { + if(m_Handle != 0) + { + Valve.Interop.NativeEntrypoints.CChangeNumOpenSlotsCallback_t_RemoveCallResult(m_Handle); + } + } + ulong m_Handle = 0; + public void Set(ulong hAPICall, Valve.Interop.NativeEntrypoints.SteamAPI_ChangeNumOpenSlotsCallback_t_CallResult func) + { + if (m_Handle != 0) + { + Valve.Interop.NativeEntrypoints.CChangeNumOpenSlotsCallback_t_RemoveCallResult(m_Handle); + } + m_Handle = Valve.Interop.NativeEntrypoints.CChangeNumOpenSlotsCallback_t_SetCallResult(hAPICall, func); + } +} public class CRemoteStorageSubscribePublishedFileResult_t_CallResult { public CRemoteStorageSubscribePublishedFileResult_t_CallResult() { } @@ -8623,6 +9444,10 @@ internal static extern IntPtr SteamMatchmakingPlayersResponse(); internal static extern IntPtr SteamMatchmakingRulesResponse(); [DllImportAttribute("Steam_api", EntryPoint = "SteamMatchmakingServers")] internal static extern IntPtr SteamMatchmakingServers(); +[DllImportAttribute("Steam_api", EntryPoint = "SteamGameSearch")] +internal static extern IntPtr SteamGameSearch(); +[DllImportAttribute("Steam_api", EntryPoint = "SteamParties")] +internal static extern IntPtr SteamParties(); [DllImportAttribute("Steam_api", EntryPoint = "SteamRemoteStorage")] internal static extern IntPtr SteamRemoteStorage(); [DllImportAttribute("Steam_api", EntryPoint = "SteamUserStats")] @@ -8639,6 +9464,8 @@ internal static extern IntPtr SteamMusic(); internal static extern IntPtr SteamMusicRemote(); [DllImportAttribute("Steam_api", EntryPoint = "SteamHTTP")] internal static extern IntPtr SteamHTTP(); +[DllImportAttribute("Steam_api", EntryPoint = "SteamInput")] +internal static extern IntPtr SteamInput(); [DllImportAttribute("Steam_api", EntryPoint = "SteamController")] internal static extern IntPtr SteamController(); [DllImportAttribute("Steam_api", EntryPoint = "SteamUGC")] @@ -8782,6 +9609,7 @@ public enum EResult k_EResultWGNetworkSendExceeded = 110, k_EResultAccountNotFriends = 111, k_EResultLimitedUserAccount = 112, + k_EResultCantRemoveItem = 113, } public enum EVoiceResult { @@ -8990,6 +9818,16 @@ public enum EBroadcastUploadResult k_EBroadcastUploadResultMissingAudio = 11, k_EBroadcastUploadResultTooFarBehind = 12, k_EBroadcastUploadResultTranscodeBehind = 13, + k_EBroadcastUploadResultNotAllowedToPlay = 14, + k_EBroadcastUploadResultBusy = 15, + k_EBroadcastUploadResultBanned = 16, + k_EBroadcastUploadResultAlreadyActive = 17, + k_EBroadcastUploadResultForcedOff = 18, + k_EBroadcastUploadResultAudioBehind = 19, + k_EBroadcastUploadResultShutdown = 20, + k_EBroadcastUploadResultDisconnect = 21, + k_EBroadcastUploadResultVideoInitFailed = 22, + k_EBroadcastUploadResultAudioInitFailed = 23, } public enum ELaunchOptionType { @@ -9018,6 +9856,7 @@ public enum EVRHMDType k_eEVRHMDType_HTC_Dev = 1, k_eEVRHMDType_HTC_VivePre = 2, k_eEVRHMDType_HTC_Vive = 3, + k_eEVRHMDType_HTC_VivePro = 4, k_eEVRHMDType_HTC_Unknown = 20, k_eEVRHMDType_Oculus_DK1 = 21, k_eEVRHMDType_Oculus_DK2 = 22, @@ -9035,6 +9874,50 @@ public enum EVRHMDType k_eEVRHMDType_Samsung_Odyssey = 91, k_eEVRHMDType_Unannounced_Unknown = 100, k_eEVRHMDType_Unannounced_WindowsMR = 101, + k_eEVRHMDType_vridge = 110, + k_eEVRHMDType_Huawei_Unknown = 120, + k_eEVRHMDType_Huawei_VR2 = 121, + k_eEVRHMDType_Huawei_Unannounced = 129, +} +public enum EMarketNotAllowedReasonFlags +{ + k_EMarketNotAllowedReason_None = 0, + k_EMarketNotAllowedReason_TemporaryFailure = 1, + k_EMarketNotAllowedReason_AccountDisabled = 2, + k_EMarketNotAllowedReason_AccountLockedDown = 4, + k_EMarketNotAllowedReason_AccountLimited = 8, + k_EMarketNotAllowedReason_TradeBanned = 16, + k_EMarketNotAllowedReason_AccountNotTrusted = 32, + k_EMarketNotAllowedReason_SteamGuardNotEnabled = 64, + k_EMarketNotAllowedReason_SteamGuardOnlyRecentlyEnabled = 128, + k_EMarketNotAllowedReason_RecentPasswordReset = 256, + k_EMarketNotAllowedReason_NewPaymentMethod = 512, + k_EMarketNotAllowedReason_InvalidCookie = 1024, + k_EMarketNotAllowedReason_UsingNewDevice = 2048, + k_EMarketNotAllowedReason_RecentSelfRefund = 4096, + k_EMarketNotAllowedReason_NewPaymentMethodCannotBeVerified = 8192, + k_EMarketNotAllowedReason_NoRecentPurchases = 16384, + k_EMarketNotAllowedReason_AcceptedWalletGift = 32768, +} +public enum EGameSearchErrorCode_t +{ + k_EGameSearchErrorCode_OK = 1, + k_EGameSearchErrorCode_Failed_Search_Already_In_Progress = 2, + k_EGameSearchErrorCode_Failed_No_Search_In_Progress = 3, + k_EGameSearchErrorCode_Failed_Not_Lobby_Leader = 4, + k_EGameSearchErrorCode_Failed_No_Host_Available = 5, + k_EGameSearchErrorCode_Failed_Search_Params_Invalid = 6, + k_EGameSearchErrorCode_Failed_Offline = 7, + k_EGameSearchErrorCode_Failed_NotAuthorized = 8, + k_EGameSearchErrorCode_Failed_Unknown_Error = 9, +} +public enum EPlayerResult_t +{ + k_EPlayerResultFailedToConnect = 1, + k_EPlayerResultAbandoned = 2, + k_EPlayerResultKicked = 3, + k_EPlayerResultIncomplete = 4, + k_EPlayerResultCompleted = 5, } public enum EFailureType { @@ -9062,7 +9945,8 @@ public enum EPersonaState k_EPersonaStateSnooze = 4, k_EPersonaStateLookingToTrade = 5, k_EPersonaStateLookingToPlay = 6, - k_EPersonaStateMax = 7, + k_EPersonaStateInvisible = 7, + k_EPersonaStateMax = 8, } public enum EFriendFlags { @@ -9096,6 +9980,11 @@ public enum EOverlayToStoreFlag k_EOverlayToStoreFlag_AddToCart = 1, k_EOverlayToStoreFlag_AddToCartAndShow = 2, } +public enum EActivateGameOverlayToWebPageMode +{ + k_EActivateGameOverlayToWebPageMode_Default = 0, + k_EActivateGameOverlayToWebPageMode_Modal = 1, +} public enum EPersonaChange { k_EPersonaChangeName = 1, @@ -9109,9 +9998,10 @@ public enum EPersonaChange k_EPersonaChangeLeftSource = 256, k_EPersonaChangeRelationshipChanged = 512, k_EPersonaChangeNameFirstSet = 1024, - k_EPersonaChangeFacebookInfo = 2048, + k_EPersonaChangeBroadcast = 2048, k_EPersonaChangeNickname = 4096, k_EPersonaChangeSteamLevel = 8192, + k_EPersonaChangeRichPresence = 16384, } public enum ESteamAPICallFailure { @@ -9176,6 +10066,20 @@ public enum EChatMemberStateChange k_EChatMemberStateChangeKicked = 8, k_EChatMemberStateChangeBanned = 16, } +public enum ESteamPartyBeaconLocationType +{ + k_ESteamPartyBeaconLocationType_Invalid = 0, + k_ESteamPartyBeaconLocationType_ChatGroup = 1, + k_ESteamPartyBeaconLocationType_Max = 2, +} +public enum ESteamPartyBeaconLocationData +{ + k_ESteamPartyBeaconLocationDataInvalid = 0, + k_ESteamPartyBeaconLocationDataName = 1, + k_ESteamPartyBeaconLocationDataIconURLSmall = 2, + k_ESteamPartyBeaconLocationDataIconURLMedium = 3, + k_ESteamPartyBeaconLocationDataIconURLLarge = 4, +} public enum ERemoteStoragePlatform { k_ERemoteStoragePlatformNone = 0, @@ -9184,6 +10088,7 @@ public enum ERemoteStoragePlatform k_ERemoteStoragePlatformPS3 = 4, k_ERemoteStoragePlatformLinux = 8, k_ERemoteStoragePlatformReserved2 = 16, + k_ERemoteStoragePlatformAndroid = 32, k_ERemoteStoragePlatformAll = -1, } public enum ERemoteStoragePublishedFileVisibility @@ -9390,11 +10295,370 @@ public enum EHTTPStatusCode k_EHTTPStatusCode505HTTPVersionNotSupported = 505, k_EHTTPStatusCode5xxUnknown = 599, } +public enum EInputSource +{ + k_EInputSource_None = 0, + k_EInputSource_LeftTrackpad = 1, + k_EInputSource_RightTrackpad = 2, + k_EInputSource_Joystick = 3, + k_EInputSource_ABXY = 4, + k_EInputSource_Switch = 5, + k_EInputSource_LeftTrigger = 6, + k_EInputSource_RightTrigger = 7, + k_EInputSource_LeftBumper = 8, + k_EInputSource_RightBumper = 9, + k_EInputSource_Gyro = 10, + k_EInputSource_CenterTrackpad = 11, + k_EInputSource_RightJoystick = 12, + k_EInputSource_DPad = 13, + k_EInputSource_Key = 14, + k_EInputSource_Mouse = 15, + k_EInputSource_LeftGyro = 16, + k_EInputSource_Count = 17, +} +public enum EInputSourceMode +{ + k_EInputSourceMode_None = 0, + k_EInputSourceMode_Dpad = 1, + k_EInputSourceMode_Buttons = 2, + k_EInputSourceMode_FourButtons = 3, + k_EInputSourceMode_AbsoluteMouse = 4, + k_EInputSourceMode_RelativeMouse = 5, + k_EInputSourceMode_JoystickMove = 6, + k_EInputSourceMode_JoystickMouse = 7, + k_EInputSourceMode_JoystickCamera = 8, + k_EInputSourceMode_ScrollWheel = 9, + k_EInputSourceMode_Trigger = 10, + k_EInputSourceMode_TouchMenu = 11, + k_EInputSourceMode_MouseJoystick = 12, + k_EInputSourceMode_MouseRegion = 13, + k_EInputSourceMode_RadialMenu = 14, + k_EInputSourceMode_SingleButton = 15, + k_EInputSourceMode_Switches = 16, +} +public enum EInputActionOrigin +{ + k_EInputActionOrigin_None = 0, + k_EInputActionOrigin_SteamController_A = 1, + k_EInputActionOrigin_SteamController_B = 2, + k_EInputActionOrigin_SteamController_X = 3, + k_EInputActionOrigin_SteamController_Y = 4, + k_EInputActionOrigin_SteamController_LeftBumper = 5, + k_EInputActionOrigin_SteamController_RightBumper = 6, + k_EInputActionOrigin_SteamController_LeftGrip = 7, + k_EInputActionOrigin_SteamController_RightGrip = 8, + k_EInputActionOrigin_SteamController_Start = 9, + k_EInputActionOrigin_SteamController_Back = 10, + k_EInputActionOrigin_SteamController_LeftPad_Touch = 11, + k_EInputActionOrigin_SteamController_LeftPad_Swipe = 12, + k_EInputActionOrigin_SteamController_LeftPad_Click = 13, + k_EInputActionOrigin_SteamController_LeftPad_DPadNorth = 14, + k_EInputActionOrigin_SteamController_LeftPad_DPadSouth = 15, + k_EInputActionOrigin_SteamController_LeftPad_DPadWest = 16, + k_EInputActionOrigin_SteamController_LeftPad_DPadEast = 17, + k_EInputActionOrigin_SteamController_RightPad_Touch = 18, + k_EInputActionOrigin_SteamController_RightPad_Swipe = 19, + k_EInputActionOrigin_SteamController_RightPad_Click = 20, + k_EInputActionOrigin_SteamController_RightPad_DPadNorth = 21, + k_EInputActionOrigin_SteamController_RightPad_DPadSouth = 22, + k_EInputActionOrigin_SteamController_RightPad_DPadWest = 23, + k_EInputActionOrigin_SteamController_RightPad_DPadEast = 24, + k_EInputActionOrigin_SteamController_LeftTrigger_Pull = 25, + k_EInputActionOrigin_SteamController_LeftTrigger_Click = 26, + k_EInputActionOrigin_SteamController_RightTrigger_Pull = 27, + k_EInputActionOrigin_SteamController_RightTrigger_Click = 28, + k_EInputActionOrigin_SteamController_LeftStick_Move = 29, + k_EInputActionOrigin_SteamController_LeftStick_Click = 30, + k_EInputActionOrigin_SteamController_LeftStick_DPadNorth = 31, + k_EInputActionOrigin_SteamController_LeftStick_DPadSouth = 32, + k_EInputActionOrigin_SteamController_LeftStick_DPadWest = 33, + k_EInputActionOrigin_SteamController_LeftStick_DPadEast = 34, + k_EInputActionOrigin_SteamController_Gyro_Move = 35, + k_EInputActionOrigin_SteamController_Gyro_Pitch = 36, + k_EInputActionOrigin_SteamController_Gyro_Yaw = 37, + k_EInputActionOrigin_SteamController_Gyro_Roll = 38, + k_EInputActionOrigin_SteamController_Reserved0 = 39, + k_EInputActionOrigin_SteamController_Reserved1 = 40, + k_EInputActionOrigin_SteamController_Reserved2 = 41, + k_EInputActionOrigin_SteamController_Reserved3 = 42, + k_EInputActionOrigin_SteamController_Reserved4 = 43, + k_EInputActionOrigin_SteamController_Reserved5 = 44, + k_EInputActionOrigin_SteamController_Reserved6 = 45, + k_EInputActionOrigin_SteamController_Reserved7 = 46, + k_EInputActionOrigin_SteamController_Reserved8 = 47, + k_EInputActionOrigin_SteamController_Reserved9 = 48, + k_EInputActionOrigin_SteamController_Reserved10 = 49, + k_EInputActionOrigin_PS4_X = 50, + k_EInputActionOrigin_PS4_Circle = 51, + k_EInputActionOrigin_PS4_Triangle = 52, + k_EInputActionOrigin_PS4_Square = 53, + k_EInputActionOrigin_PS4_LeftBumper = 54, + k_EInputActionOrigin_PS4_RightBumper = 55, + k_EInputActionOrigin_PS4_Options = 56, + k_EInputActionOrigin_PS4_Share = 57, + k_EInputActionOrigin_PS4_LeftPad_Touch = 58, + k_EInputActionOrigin_PS4_LeftPad_Swipe = 59, + k_EInputActionOrigin_PS4_LeftPad_Click = 60, + k_EInputActionOrigin_PS4_LeftPad_DPadNorth = 61, + k_EInputActionOrigin_PS4_LeftPad_DPadSouth = 62, + k_EInputActionOrigin_PS4_LeftPad_DPadWest = 63, + k_EInputActionOrigin_PS4_LeftPad_DPadEast = 64, + k_EInputActionOrigin_PS4_RightPad_Touch = 65, + k_EInputActionOrigin_PS4_RightPad_Swipe = 66, + k_EInputActionOrigin_PS4_RightPad_Click = 67, + k_EInputActionOrigin_PS4_RightPad_DPadNorth = 68, + k_EInputActionOrigin_PS4_RightPad_DPadSouth = 69, + k_EInputActionOrigin_PS4_RightPad_DPadWest = 70, + k_EInputActionOrigin_PS4_RightPad_DPadEast = 71, + k_EInputActionOrigin_PS4_CenterPad_Touch = 72, + k_EInputActionOrigin_PS4_CenterPad_Swipe = 73, + k_EInputActionOrigin_PS4_CenterPad_Click = 74, + k_EInputActionOrigin_PS4_CenterPad_DPadNorth = 75, + k_EInputActionOrigin_PS4_CenterPad_DPadSouth = 76, + k_EInputActionOrigin_PS4_CenterPad_DPadWest = 77, + k_EInputActionOrigin_PS4_CenterPad_DPadEast = 78, + k_EInputActionOrigin_PS4_LeftTrigger_Pull = 79, + k_EInputActionOrigin_PS4_LeftTrigger_Click = 80, + k_EInputActionOrigin_PS4_RightTrigger_Pull = 81, + k_EInputActionOrigin_PS4_RightTrigger_Click = 82, + k_EInputActionOrigin_PS4_LeftStick_Move = 83, + k_EInputActionOrigin_PS4_LeftStick_Click = 84, + k_EInputActionOrigin_PS4_LeftStick_DPadNorth = 85, + k_EInputActionOrigin_PS4_LeftStick_DPadSouth = 86, + k_EInputActionOrigin_PS4_LeftStick_DPadWest = 87, + k_EInputActionOrigin_PS4_LeftStick_DPadEast = 88, + k_EInputActionOrigin_PS4_RightStick_Move = 89, + k_EInputActionOrigin_PS4_RightStick_Click = 90, + k_EInputActionOrigin_PS4_RightStick_DPadNorth = 91, + k_EInputActionOrigin_PS4_RightStick_DPadSouth = 92, + k_EInputActionOrigin_PS4_RightStick_DPadWest = 93, + k_EInputActionOrigin_PS4_RightStick_DPadEast = 94, + k_EInputActionOrigin_PS4_DPad_North = 95, + k_EInputActionOrigin_PS4_DPad_South = 96, + k_EInputActionOrigin_PS4_DPad_West = 97, + k_EInputActionOrigin_PS4_DPad_East = 98, + k_EInputActionOrigin_PS4_Gyro_Move = 99, + k_EInputActionOrigin_PS4_Gyro_Pitch = 100, + k_EInputActionOrigin_PS4_Gyro_Yaw = 101, + k_EInputActionOrigin_PS4_Gyro_Roll = 102, + k_EInputActionOrigin_PS4_Reserved0 = 103, + k_EInputActionOrigin_PS4_Reserved1 = 104, + k_EInputActionOrigin_PS4_Reserved2 = 105, + k_EInputActionOrigin_PS4_Reserved3 = 106, + k_EInputActionOrigin_PS4_Reserved4 = 107, + k_EInputActionOrigin_PS4_Reserved5 = 108, + k_EInputActionOrigin_PS4_Reserved6 = 109, + k_EInputActionOrigin_PS4_Reserved7 = 110, + k_EInputActionOrigin_PS4_Reserved8 = 111, + k_EInputActionOrigin_PS4_Reserved9 = 112, + k_EInputActionOrigin_PS4_Reserved10 = 113, + k_EInputActionOrigin_XBoxOne_A = 114, + k_EInputActionOrigin_XBoxOne_B = 115, + k_EInputActionOrigin_XBoxOne_X = 116, + k_EInputActionOrigin_XBoxOne_Y = 117, + k_EInputActionOrigin_XBoxOne_LeftBumper = 118, + k_EInputActionOrigin_XBoxOne_RightBumper = 119, + k_EInputActionOrigin_XBoxOne_Menu = 120, + k_EInputActionOrigin_XBoxOne_View = 121, + k_EInputActionOrigin_XBoxOne_LeftTrigger_Pull = 122, + k_EInputActionOrigin_XBoxOne_LeftTrigger_Click = 123, + k_EInputActionOrigin_XBoxOne_RightTrigger_Pull = 124, + k_EInputActionOrigin_XBoxOne_RightTrigger_Click = 125, + k_EInputActionOrigin_XBoxOne_LeftStick_Move = 126, + k_EInputActionOrigin_XBoxOne_LeftStick_Click = 127, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadNorth = 128, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadSouth = 129, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadWest = 130, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadEast = 131, + k_EInputActionOrigin_XBoxOne_RightStick_Move = 132, + k_EInputActionOrigin_XBoxOne_RightStick_Click = 133, + k_EInputActionOrigin_XBoxOne_RightStick_DPadNorth = 134, + k_EInputActionOrigin_XBoxOne_RightStick_DPadSouth = 135, + k_EInputActionOrigin_XBoxOne_RightStick_DPadWest = 136, + k_EInputActionOrigin_XBoxOne_RightStick_DPadEast = 137, + k_EInputActionOrigin_XBoxOne_DPad_North = 138, + k_EInputActionOrigin_XBoxOne_DPad_South = 139, + k_EInputActionOrigin_XBoxOne_DPad_West = 140, + k_EInputActionOrigin_XBoxOne_DPad_East = 141, + k_EInputActionOrigin_XBoxOne_Reserved0 = 142, + k_EInputActionOrigin_XBoxOne_Reserved1 = 143, + k_EInputActionOrigin_XBoxOne_Reserved2 = 144, + k_EInputActionOrigin_XBoxOne_Reserved3 = 145, + k_EInputActionOrigin_XBoxOne_Reserved4 = 146, + k_EInputActionOrigin_XBoxOne_Reserved5 = 147, + k_EInputActionOrigin_XBoxOne_Reserved6 = 148, + k_EInputActionOrigin_XBoxOne_Reserved7 = 149, + k_EInputActionOrigin_XBoxOne_Reserved8 = 150, + k_EInputActionOrigin_XBoxOne_Reserved9 = 151, + k_EInputActionOrigin_XBoxOne_Reserved10 = 152, + k_EInputActionOrigin_XBox360_A = 153, + k_EInputActionOrigin_XBox360_B = 154, + k_EInputActionOrigin_XBox360_X = 155, + k_EInputActionOrigin_XBox360_Y = 156, + k_EInputActionOrigin_XBox360_LeftBumper = 157, + k_EInputActionOrigin_XBox360_RightBumper = 158, + k_EInputActionOrigin_XBox360_Start = 159, + k_EInputActionOrigin_XBox360_Back = 160, + k_EInputActionOrigin_XBox360_LeftTrigger_Pull = 161, + k_EInputActionOrigin_XBox360_LeftTrigger_Click = 162, + k_EInputActionOrigin_XBox360_RightTrigger_Pull = 163, + k_EInputActionOrigin_XBox360_RightTrigger_Click = 164, + k_EInputActionOrigin_XBox360_LeftStick_Move = 165, + k_EInputActionOrigin_XBox360_LeftStick_Click = 166, + k_EInputActionOrigin_XBox360_LeftStick_DPadNorth = 167, + k_EInputActionOrigin_XBox360_LeftStick_DPadSouth = 168, + k_EInputActionOrigin_XBox360_LeftStick_DPadWest = 169, + k_EInputActionOrigin_XBox360_LeftStick_DPadEast = 170, + k_EInputActionOrigin_XBox360_RightStick_Move = 171, + k_EInputActionOrigin_XBox360_RightStick_Click = 172, + k_EInputActionOrigin_XBox360_RightStick_DPadNorth = 173, + k_EInputActionOrigin_XBox360_RightStick_DPadSouth = 174, + k_EInputActionOrigin_XBox360_RightStick_DPadWest = 175, + k_EInputActionOrigin_XBox360_RightStick_DPadEast = 176, + k_EInputActionOrigin_XBox360_DPad_North = 177, + k_EInputActionOrigin_XBox360_DPad_South = 178, + k_EInputActionOrigin_XBox360_DPad_West = 179, + k_EInputActionOrigin_XBox360_DPad_East = 180, + k_EInputActionOrigin_XBox360_Reserved0 = 181, + k_EInputActionOrigin_XBox360_Reserved1 = 182, + k_EInputActionOrigin_XBox360_Reserved2 = 183, + k_EInputActionOrigin_XBox360_Reserved3 = 184, + k_EInputActionOrigin_XBox360_Reserved4 = 185, + k_EInputActionOrigin_XBox360_Reserved5 = 186, + k_EInputActionOrigin_XBox360_Reserved6 = 187, + k_EInputActionOrigin_XBox360_Reserved7 = 188, + k_EInputActionOrigin_XBox360_Reserved8 = 189, + k_EInputActionOrigin_XBox360_Reserved9 = 190, + k_EInputActionOrigin_XBox360_Reserved10 = 191, + k_EInputActionOrigin_Switch_A = 192, + k_EInputActionOrigin_Switch_B = 193, + k_EInputActionOrigin_Switch_X = 194, + k_EInputActionOrigin_Switch_Y = 195, + k_EInputActionOrigin_Switch_LeftBumper = 196, + k_EInputActionOrigin_Switch_RightBumper = 197, + k_EInputActionOrigin_Switch_Plus = 198, + k_EInputActionOrigin_Switch_Minus = 199, + k_EInputActionOrigin_Switch_Capture = 200, + k_EInputActionOrigin_Switch_LeftTrigger_Pull = 201, + k_EInputActionOrigin_Switch_LeftTrigger_Click = 202, + k_EInputActionOrigin_Switch_RightTrigger_Pull = 203, + k_EInputActionOrigin_Switch_RightTrigger_Click = 204, + k_EInputActionOrigin_Switch_LeftStick_Move = 205, + k_EInputActionOrigin_Switch_LeftStick_Click = 206, + k_EInputActionOrigin_Switch_LeftStick_DPadNorth = 207, + k_EInputActionOrigin_Switch_LeftStick_DPadSouth = 208, + k_EInputActionOrigin_Switch_LeftStick_DPadWest = 209, + k_EInputActionOrigin_Switch_LeftStick_DPadEast = 210, + k_EInputActionOrigin_Switch_RightStick_Move = 211, + k_EInputActionOrigin_Switch_RightStick_Click = 212, + k_EInputActionOrigin_Switch_RightStick_DPadNorth = 213, + k_EInputActionOrigin_Switch_RightStick_DPadSouth = 214, + k_EInputActionOrigin_Switch_RightStick_DPadWest = 215, + k_EInputActionOrigin_Switch_RightStick_DPadEast = 216, + k_EInputActionOrigin_Switch_DPad_North = 217, + k_EInputActionOrigin_Switch_DPad_South = 218, + k_EInputActionOrigin_Switch_DPad_West = 219, + k_EInputActionOrigin_Switch_DPad_East = 220, + k_EInputActionOrigin_Switch_ProGyro_Move = 221, + k_EInputActionOrigin_Switch_ProGyro_Pitch = 222, + k_EInputActionOrigin_Switch_ProGyro_Yaw = 223, + k_EInputActionOrigin_Switch_ProGyro_Roll = 224, + k_EInputActionOrigin_Switch_Reserved0 = 225, + k_EInputActionOrigin_Switch_Reserved1 = 226, + k_EInputActionOrigin_Switch_Reserved2 = 227, + k_EInputActionOrigin_Switch_Reserved3 = 228, + k_EInputActionOrigin_Switch_Reserved4 = 229, + k_EInputActionOrigin_Switch_Reserved5 = 230, + k_EInputActionOrigin_Switch_Reserved6 = 231, + k_EInputActionOrigin_Switch_Reserved7 = 232, + k_EInputActionOrigin_Switch_Reserved8 = 233, + k_EInputActionOrigin_Switch_Reserved9 = 234, + k_EInputActionOrigin_Switch_Reserved10 = 235, + k_EInputActionOrigin_Switch_RightGyro_Move = 236, + k_EInputActionOrigin_Switch_RightGyro_Pitch = 237, + k_EInputActionOrigin_Switch_RightGyro_Yaw = 238, + k_EInputActionOrigin_Switch_RightGyro_Roll = 239, + k_EInputActionOrigin_Switch_LeftGyro_Move = 240, + k_EInputActionOrigin_Switch_LeftGyro_Pitch = 241, + k_EInputActionOrigin_Switch_LeftGyro_Yaw = 242, + k_EInputActionOrigin_Switch_LeftGyro_Roll = 243, + k_EInputActionOrigin_Switch_LeftGrip_Lower = 244, + k_EInputActionOrigin_Switch_LeftGrip_Upper = 245, + k_EInputActionOrigin_Switch_RightGrip_Lower = 246, + k_EInputActionOrigin_Switch_RightGrip_Upper = 247, + k_EInputActionOrigin_Switch_Reserved11 = 248, + k_EInputActionOrigin_Switch_Reserved12 = 249, + k_EInputActionOrigin_Switch_Reserved13 = 250, + k_EInputActionOrigin_Switch_Reserved14 = 251, + k_EInputActionOrigin_Switch_Reserved15 = 252, + k_EInputActionOrigin_Switch_Reserved16 = 253, + k_EInputActionOrigin_Switch_Reserved17 = 254, + k_EInputActionOrigin_Switch_Reserved18 = 255, + k_EInputActionOrigin_Switch_Reserved19 = 256, + k_EInputActionOrigin_Switch_Reserved20 = 257, + k_EInputActionOrigin_Count = 258, + k_EInputActionOrigin_MaximumPossibleValue = 32767, +} +public enum EXboxOrigin +{ + k_EXboxOrigin_A = 0, + k_EXboxOrigin_B = 1, + k_EXboxOrigin_X = 2, + k_EXboxOrigin_Y = 3, + k_EXboxOrigin_LeftBumper = 4, + k_EXboxOrigin_RightBumper = 5, + k_EXboxOrigin_Menu = 6, + k_EXboxOrigin_View = 7, + k_EXboxOrigin_LeftTrigger_Pull = 8, + k_EXboxOrigin_LeftTrigger_Click = 9, + k_EXboxOrigin_RightTrigger_Pull = 10, + k_EXboxOrigin_RightTrigger_Click = 11, + k_EXboxOrigin_LeftStick_Move = 12, + k_EXboxOrigin_LeftStick_Click = 13, + k_EXboxOrigin_LeftStick_DPadNorth = 14, + k_EXboxOrigin_LeftStick_DPadSouth = 15, + k_EXboxOrigin_LeftStick_DPadWest = 16, + k_EXboxOrigin_LeftStick_DPadEast = 17, + k_EXboxOrigin_RightStick_Move = 18, + k_EXboxOrigin_RightStick_Click = 19, + k_EXboxOrigin_RightStick_DPadNorth = 20, + k_EXboxOrigin_RightStick_DPadSouth = 21, + k_EXboxOrigin_RightStick_DPadWest = 22, + k_EXboxOrigin_RightStick_DPadEast = 23, + k_EXboxOrigin_DPad_North = 24, + k_EXboxOrigin_DPad_South = 25, + k_EXboxOrigin_DPad_West = 26, + k_EXboxOrigin_DPad_East = 27, + k_EXboxOrigin_Count = 28, +} public enum ESteamControllerPad { k_ESteamControllerPad_Left = 0, k_ESteamControllerPad_Right = 1, } +public enum ESteamInputType +{ + k_ESteamInputType_Unknown = 0, + k_ESteamInputType_SteamController = 1, + k_ESteamInputType_XBox360Controller = 2, + k_ESteamInputType_XBoxOneController = 3, + k_ESteamInputType_GenericGamepad = 4, + k_ESteamInputType_PS4Controller = 5, + k_ESteamInputType_AppleMFiController = 6, + k_ESteamInputType_AndroidController = 7, + k_ESteamInputType_SwitchJoyConPair = 8, + k_ESteamInputType_SwitchJoyConSingle = 9, + k_ESteamInputType_SwitchProController = 10, + k_ESteamInputType_MobileTouch = 11, + k_ESteamInputType_PS3Controller = 12, + k_ESteamInputType_Count = 13, + k_ESteamInputType_MaximumPossibleValue = 255, +} +public enum ESteamInputLEDFlag +{ + k_ESteamInputLEDFlag_SetColor = 0, + k_ESteamInputLEDFlag_RestoreUserDefault = 1, +} public enum EControllerSource { k_EControllerSource_None = 0, @@ -9405,13 +10669,16 @@ public enum EControllerSource k_EControllerSource_Switch = 5, k_EControllerSource_LeftTrigger = 6, k_EControllerSource_RightTrigger = 7, - k_EControllerSource_Gyro = 8, - k_EControllerSource_CenterTrackpad = 9, - k_EControllerSource_RightJoystick = 10, - k_EControllerSource_DPad = 11, - k_EControllerSource_Key = 12, - k_EControllerSource_Mouse = 13, - k_EControllerSource_Count = 14, + k_EControllerSource_LeftBumper = 8, + k_EControllerSource_RightBumper = 9, + k_EControllerSource_Gyro = 10, + k_EControllerSource_CenterTrackpad = 11, + k_EControllerSource_RightJoystick = 12, + k_EControllerSource_DPad = 13, + k_EControllerSource_Key = 14, + k_EControllerSource_Mouse = 15, + k_EControllerSource_LeftGyro = 16, + k_EControllerSource_Count = 17, } public enum EControllerSourceMode { @@ -9589,9 +10856,9 @@ public enum EControllerActionOrigin k_EControllerActionOrigin_SteamV2_Y = 151, k_EControllerActionOrigin_SteamV2_LeftBumper = 152, k_EControllerActionOrigin_SteamV2_RightBumper = 153, - k_EControllerActionOrigin_SteamV2_LeftGrip = 154, - k_EControllerActionOrigin_SteamV2_RightGrip = 155, - k_EControllerActionOrigin_SteamV2_LeftGrip_Upper = 156, + k_EControllerActionOrigin_SteamV2_LeftGrip_Lower = 154, + k_EControllerActionOrigin_SteamV2_LeftGrip_Upper = 155, + k_EControllerActionOrigin_SteamV2_RightGrip_Lower = 156, k_EControllerActionOrigin_SteamV2_RightGrip_Upper = 157, k_EControllerActionOrigin_SteamV2_LeftBumper_Pressure = 158, k_EControllerActionOrigin_SteamV2_RightBumper_Pressure = 159, @@ -9631,22 +10898,59 @@ public enum EControllerActionOrigin k_EControllerActionOrigin_SteamV2_Gyro_Pitch = 193, k_EControllerActionOrigin_SteamV2_Gyro_Yaw = 194, k_EControllerActionOrigin_SteamV2_Gyro_Roll = 195, - k_EControllerActionOrigin_Count = 196, + k_EControllerActionOrigin_Switch_A = 196, + k_EControllerActionOrigin_Switch_B = 197, + k_EControllerActionOrigin_Switch_X = 198, + k_EControllerActionOrigin_Switch_Y = 199, + k_EControllerActionOrigin_Switch_LeftBumper = 200, + k_EControllerActionOrigin_Switch_RightBumper = 201, + k_EControllerActionOrigin_Switch_Plus = 202, + k_EControllerActionOrigin_Switch_Minus = 203, + k_EControllerActionOrigin_Switch_Capture = 204, + k_EControllerActionOrigin_Switch_LeftTrigger_Pull = 205, + k_EControllerActionOrigin_Switch_LeftTrigger_Click = 206, + k_EControllerActionOrigin_Switch_RightTrigger_Pull = 207, + k_EControllerActionOrigin_Switch_RightTrigger_Click = 208, + k_EControllerActionOrigin_Switch_LeftStick_Move = 209, + k_EControllerActionOrigin_Switch_LeftStick_Click = 210, + k_EControllerActionOrigin_Switch_LeftStick_DPadNorth = 211, + k_EControllerActionOrigin_Switch_LeftStick_DPadSouth = 212, + k_EControllerActionOrigin_Switch_LeftStick_DPadWest = 213, + k_EControllerActionOrigin_Switch_LeftStick_DPadEast = 214, + k_EControllerActionOrigin_Switch_RightStick_Move = 215, + k_EControllerActionOrigin_Switch_RightStick_Click = 216, + k_EControllerActionOrigin_Switch_RightStick_DPadNorth = 217, + k_EControllerActionOrigin_Switch_RightStick_DPadSouth = 218, + k_EControllerActionOrigin_Switch_RightStick_DPadWest = 219, + k_EControllerActionOrigin_Switch_RightStick_DPadEast = 220, + k_EControllerActionOrigin_Switch_DPad_North = 221, + k_EControllerActionOrigin_Switch_DPad_South = 222, + k_EControllerActionOrigin_Switch_DPad_West = 223, + k_EControllerActionOrigin_Switch_DPad_East = 224, + k_EControllerActionOrigin_Switch_ProGyro_Move = 225, + k_EControllerActionOrigin_Switch_ProGyro_Pitch = 226, + k_EControllerActionOrigin_Switch_ProGyro_Yaw = 227, + k_EControllerActionOrigin_Switch_ProGyro_Roll = 228, + k_EControllerActionOrigin_Switch_RightGyro_Move = 229, + k_EControllerActionOrigin_Switch_RightGyro_Pitch = 230, + k_EControllerActionOrigin_Switch_RightGyro_Yaw = 231, + k_EControllerActionOrigin_Switch_RightGyro_Roll = 232, + k_EControllerActionOrigin_Switch_LeftGyro_Move = 233, + k_EControllerActionOrigin_Switch_LeftGyro_Pitch = 234, + k_EControllerActionOrigin_Switch_LeftGyro_Yaw = 235, + k_EControllerActionOrigin_Switch_LeftGyro_Roll = 236, + k_EControllerActionOrigin_Switch_LeftGrip_Lower = 237, + k_EControllerActionOrigin_Switch_LeftGrip_Upper = 238, + k_EControllerActionOrigin_Switch_RightGrip_Lower = 239, + k_EControllerActionOrigin_Switch_RightGrip_Upper = 240, + k_EControllerActionOrigin_Count = 241, + k_EControllerActionOrigin_MaximumPossibleValue = 32767, } public enum ESteamControllerLEDFlag { k_ESteamControllerLEDFlag_SetColor = 0, k_ESteamControllerLEDFlag_RestoreUserDefault = 1, } -public enum ESteamInputType -{ - k_ESteamInputType_Unknown = 0, - k_ESteamInputType_SteamController = 1, - k_ESteamInputType_XBox360Controller = 2, - k_ESteamInputType_XBoxOneController = 3, - k_ESteamInputType_GenericXInput = 4, - k_ESteamInputType_PS4Controller = 5, -} public enum EUGCMatchingUGCType { k_EUGCMatchingUGCType_Items = 0, @@ -9862,6 +11166,60 @@ public enum EParentalFeature public char m_u16; public double m_d; } +[StructLayout(LayoutKind.Sequential)] public struct CCallbackBase +{ + public byte m_nCallbackFlags; + public int m_iCallback; +} +[StructLayout(LayoutKind.Sequential)] public struct CCallResult +{ + public ulong m_hAPICall; + public IntPtr m_pObj; // T * + public IntPtr m_Func; +} +[StructLayout(LayoutKind.Sequential)] public struct CCallback +{ + public IntPtr m_pObj; // T * + public IntPtr m_Func; +} +[StructLayout(LayoutKind.Sequential)] public struct CSteamAPIContext +{ + public IntPtr m_pSteamClient; // class ISteamClient * + public IntPtr m_pSteamUser; // class ISteamUser * + public IntPtr m_pSteamFriends; // class ISteamFriends * + public IntPtr m_pSteamUtils; // class ISteamUtils * + public IntPtr m_pSteamMatchmaking; // class ISteamMatchmaking * + public IntPtr m_pSteamGameSearch; // class ISteamGameSearch * + public IntPtr m_pSteamUserStats; // class ISteamUserStats * + public IntPtr m_pSteamApps; // class ISteamApps * + public IntPtr m_pSteamMatchmakingServers; // class ISteamMatchmakingServers * + public IntPtr m_pSteamNetworking; // class ISteamNetworking * + public IntPtr m_pSteamRemoteStorage; // class ISteamRemoteStorage * + public IntPtr m_pSteamScreenshots; // class ISteamScreenshots * + public IntPtr m_pSteamHTTP; // class ISteamHTTP * + public IntPtr m_pController; // class ISteamController * + public IntPtr m_pSteamUGC; // class ISteamUGC * + public IntPtr m_pSteamAppList; // class ISteamAppList * + public IntPtr m_pSteamMusic; // class ISteamMusic * + public IntPtr m_pSteamMusicRemote; // class ISteamMusicRemote * + public IntPtr m_pSteamHTMLSurface; // class ISteamHTMLSurface * + public IntPtr m_pSteamInventory; // class ISteamInventory * + public IntPtr m_pSteamVideo; // class ISteamVideo * + public IntPtr m_pSteamParentalSettings; // class ISteamParentalSettings * + public IntPtr m_pSteamInput; // class ISteamInput * +} +[StructLayout(LayoutKind.Sequential)] public struct CSteamGameServerAPIContext +{ + public IntPtr m_pSteamClient; // class ISteamClient * + public IntPtr m_pSteamGameServer; // class ISteamGameServer * + public IntPtr m_pSteamGameServerUtils; // class ISteamUtils * + public IntPtr m_pSteamGameServerNetworking; // class ISteamNetworking * + public IntPtr m_pSteamGameServerStats; // class ISteamGameServerStats * + public IntPtr m_pSteamHTTP; // class ISteamHTTP * + public IntPtr m_pSteamInventory; // class ISteamInventory * + public IntPtr m_pSteamUGC; // class ISteamUGC * + public IntPtr m_pSteamApps; // class ISteamApps * +} [StructLayout(LayoutKind.Sequential)] public struct CallbackMsg_t { public uint m_hSteamUser; @@ -9918,6 +11276,15 @@ public enum EParentalFeature [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)] public string m_szURL; //char[512] } +[StructLayout(LayoutKind.Sequential)] public struct MarketEligibilityResponse_t +{ + [MarshalAs(UnmanagedType.I1)] + public bool m_bAllowed; + public EMarketNotAllowedReasonFlags m_eNotAllowedReason; + public ulong m_rtAllowedAtTime; + public int m_cdaySteamGuardRequiredDays; + public int m_cdayNewDeviceCooldown; +} [StructLayout(LayoutKind.Sequential)] public struct FriendGameInfo_t { public ulong m_gameID; @@ -10103,6 +11470,11 @@ public enum EParentalFeature public string m_szGameTags; //char[128] public ulong m_steamID; } +[StructLayout(LayoutKind.Sequential)] public struct SteamPartyBeaconLocation_t +{ + public ESteamPartyBeaconLocationType m_eType; + public ulong m_ulLocationID; +} [StructLayout(LayoutKind.Sequential)] public struct FavoritesListChanged_t { public uint m_nIP; @@ -10180,6 +11552,82 @@ public enum EParentalFeature { public EResult m_eResult; } +[StructLayout(LayoutKind.Sequential)] public struct SearchForGameProgressCallback_t +{ + public ulong m_ullSearchID; + public EResult m_eResult; + public ulong m_lobbyID; + public ulong m_steamIDEndedSearch; + public int m_nSecondsRemainingEstimate; + public int m_cPlayersSearching; +} +[StructLayout(LayoutKind.Sequential)] public struct SearchForGameResultCallback_t +{ + public ulong m_ullSearchID; + public EResult m_eResult; + public int m_nCountPlayersInGame; + public int m_nCountAcceptedGame; + public ulong m_steamIDHost; + [MarshalAs(UnmanagedType.I1)] + public bool m_bFinalCallback; +} +[StructLayout(LayoutKind.Sequential)] public struct RequestPlayersForGameProgressCallback_t +{ + public EResult m_eResult; + public ulong m_ullSearchID; +} +[StructLayout(LayoutKind.Sequential)] public struct RequestPlayersForGameResultCallback_t +{ + public EResult m_eResult; + public ulong m_ullSearchID; + public ulong m_SteamIDPlayerFound; + public ulong m_SteamIDLobby; + public PlayerAcceptState_t m_ePlayerAcceptState; + public int m_nPlayerIndex; + public int m_nTotalPlayersFound; + public int m_nTotalPlayersAcceptedGame; + public int m_nSuggestedTeamIndex; + public ulong m_ullUniqueGameID; +} +[StructLayout(LayoutKind.Sequential)] public struct RequestPlayersForGameFinalResultCallback_t +{ + public EResult m_eResult; + public ulong m_ullSearchID; + public ulong m_ullUniqueGameID; +} +[StructLayout(LayoutKind.Sequential)] public struct SubmitPlayerResultResultCallback_t +{ + public EResult m_eResult; + public ulong ullUniqueGameID; + public ulong steamIDPlayer; +} +[StructLayout(LayoutKind.Sequential)] public struct EndGameResultCallback_t +{ + public EResult m_eResult; + public ulong ullUniqueGameID; +} +[StructLayout(LayoutKind.Sequential)] public struct JoinPartyCallback_t +{ + public EResult m_eResult; + public ulong m_ulBeaconID; + public ulong m_SteamIDBeaconOwner; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string m_rgchConnectString; //char[256] +} +[StructLayout(LayoutKind.Sequential)] public struct CreateBeaconCallback_t +{ + public EResult m_eResult; + public ulong m_ulBeaconID; +} +[StructLayout(LayoutKind.Sequential)] public struct ReservationNotificationCallback_t +{ + public ulong m_ulBeaconID; + public ulong m_steamIDJoiner; +} +[StructLayout(LayoutKind.Sequential)] public struct ChangeNumOpenSlotsCallback_t +{ + public EResult m_eResult; +} [StructLayout(LayoutKind.Sequential)] public struct SteamParamStringArray_t { public IntPtr m_ppStrings; // const char ** @@ -10548,33 +11996,33 @@ public enum EParentalFeature public uint m_hLocal; public EResult m_eResult; } -[StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t +[StructLayout(LayoutKind.Sequential)] public struct VolumeHasChanged_t { public float m_flNewVolume; } -[StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t +[StructLayout(LayoutKind.Sequential)] public struct MusicPlayerWantsShuffled_t { [MarshalAs(UnmanagedType.I1)] public bool m_bShuffled; } -[StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t +[StructLayout(LayoutKind.Sequential)] public struct MusicPlayerWantsLooped_t { [MarshalAs(UnmanagedType.I1)] public bool m_bLooped; } -[StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t +[StructLayout(LayoutKind.Sequential)] public struct MusicPlayerWantsVolume_t { public float m_flNewVolume; } -[StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t +[StructLayout(LayoutKind.Sequential)] public struct MusicPlayerSelectsQueueEntry_t { public int nID; } -[StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t +[StructLayout(LayoutKind.Sequential)] public struct MusicPlayerSelectsPlaylistEntry_t { public int nID; } -[StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t +[StructLayout(LayoutKind.Sequential)] public struct MusicPlayerWantsPlayingRepeatStatus_t { public int m_nPlayingRepeatStatus; } @@ -10599,34 +12047,6 @@ public enum EParentalFeature public uint m_cOffset; public uint m_cBytesReceived; } -[StructLayout(LayoutKind.Sequential)] public struct ControllerAnalogActionData_t -{ - public EControllerSourceMode eMode; - public float x; - public float y; - [MarshalAs(UnmanagedType.I1)] - public bool bActive; -} -[StructLayout(LayoutKind.Sequential)] public struct ControllerDigitalActionData_t -{ - [MarshalAs(UnmanagedType.I1)] - public bool bState; - [MarshalAs(UnmanagedType.I1)] - public bool bActive; -} -[StructLayout(LayoutKind.Sequential)] public struct ControllerMotionData_t -{ - public float rotQuatX; - public float rotQuatY; - public float rotQuatZ; - public float rotQuatW; - public float posAccelX; - public float posAccelY; - public float posAccelZ; - public float rotVelX; - public float rotVelY; - public float rotVelZ; -} [StructLayout(LayoutKind.Sequential)] public struct SteamUGCDetails_t { public ulong m_nPublishedFileId; @@ -10672,6 +12092,8 @@ public enum EParentalFeature public uint m_unTotalMatchingResults; [MarshalAs(UnmanagedType.I1)] public bool m_bCachedData; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string m_rgchNextCursor; //char[256] } [StructLayout(LayoutKind.Sequential)] public struct SteamUGCRequestUGCDetailsResult_t { @@ -10770,11 +12192,11 @@ public enum EParentalFeature public EResult m_eResult; public ulong m_nPublishedFileId; } -[StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t +[StructLayout(LayoutKind.Sequential)] public struct SteamAppInstalled_t { public uint m_nAppID; } -[StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t +[StructLayout(LayoutKind.Sequential)] public struct SteamAppUninstalled_t { public uint m_nAppID; } @@ -10906,7 +12328,7 @@ public enum EParentalFeature public uint unY; public uint unWide; public uint unTall; - public uint unNewWindow_BrowserHandle; + public uint unNewWindow_BrowserHandle_IGNORE; } [StructLayout(LayoutKind.Sequential)] public struct HTML_SetCursor_t { @@ -10973,62 +12395,22 @@ public enum EParentalFeature [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)] public string m_rgchCurrency; //char[4] } -[StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t +[StructLayout(LayoutKind.Sequential)] public struct BroadcastUploadStop_t { public EBroadcastUploadResult m_eResult; } -[StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t +[StructLayout(LayoutKind.Sequential)] public struct GetVideoURLResult_t { public EResult m_eResult; public uint m_unVideoAppID; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string m_rgchURL; //char[256] } -[StructLayout(LayoutKind.Sequential)] public struct SteamCallback_t +[StructLayout(LayoutKind.Sequential)] public struct GetOPFSettingsResult_t { public EResult m_eResult; public uint m_unVideoAppID; } -[StructLayout(LayoutKind.Sequential)] public struct CSteamAPIContext -{ - public IntPtr m_pSteamClient; // class ISteamClient * - public IntPtr m_pSteamUser; // class ISteamUser * - public IntPtr m_pSteamFriends; // class ISteamFriends * - public IntPtr m_pSteamUtils; // class ISteamUtils * - public IntPtr m_pSteamMatchmaking; // class ISteamMatchmaking * - public IntPtr m_pSteamUserStats; // class ISteamUserStats * - public IntPtr m_pSteamApps; // class ISteamApps * - public IntPtr m_pSteamMatchmakingServers; // class ISteamMatchmakingServers * - public IntPtr m_pSteamNetworking; // class ISteamNetworking * - public IntPtr m_pSteamRemoteStorage; // class ISteamRemoteStorage * - public IntPtr m_pSteamScreenshots; // class ISteamScreenshots * - public IntPtr m_pSteamHTTP; // class ISteamHTTP * - public IntPtr m_pController; // class ISteamController * - public IntPtr m_pSteamUGC; // class ISteamUGC * - public IntPtr m_pSteamAppList; // class ISteamAppList * - public IntPtr m_pSteamMusic; // class ISteamMusic * - public IntPtr m_pSteamMusicRemote; // class ISteamMusicRemote * - public IntPtr m_pSteamHTMLSurface; // class ISteamHTMLSurface * - public IntPtr m_pSteamInventory; // class ISteamInventory * - public IntPtr m_pSteamVideo; // class ISteamVideo * - public IntPtr m_pSteamParentalSettings; // class ISteamParentalSettings * -} -[StructLayout(LayoutKind.Sequential)] public struct CCallbackBase -{ - public byte m_nCallbackFlags; - public int m_iCallback; -} -[StructLayout(LayoutKind.Sequential)] public struct CCallResult -{ - public ulong m_hAPICall; - public IntPtr m_pObj; // T * - public IntPtr m_Func; -} -[StructLayout(LayoutKind.Sequential)] public struct CCallback -{ - public IntPtr m_pObj; // T * - public IntPtr m_Func; -} [StructLayout(LayoutKind.Sequential)] public struct GSClientApprove_t { public ulong m_SteamID; @@ -11147,6 +12529,8 @@ public const int k_iClientUserCallbacks = 900; public const int k_iSteamAppsCallbacks = 1000; public const int k_iSteamUserStatsCallbacks = 1100; public const int k_iSteamNetworkingCallbacks = 1200; +public const int k_iSteamNetworkingSocketsCallbacks = 1220; +public const int k_iSteamNetworkingMessagesCallbacks = 1250; public const int k_iClientRemoteStorageCallbacks = 1300; public const int k_iClientDepotBuilderCallbacks = 1400; public const int k_iSteamGameServerItemsCallbacks = 1500; @@ -11186,9 +12570,12 @@ public const int k_iClientBluetoothManagerCallbacks = 4800; public const int k_iClientSharedConnectionCallbacks = 4900; public const int k_ISteamParentalSettingsCallbacks = 5000; public const int k_iClientShaderCallbacks = 5100; +public const int k_iSteamGameSearchCallbacks = 5200; +public const int k_iSteamPartiesCallbacks = 5300; +public const int k_iClientPartiesCallbacks = 5400; public const int k_cchPersonaNameMax = 128; public const int k_cwchPersonaNameMax = 32; -public const int k_cchMaxRichPresenceKeys = 20; +public const int k_cchMaxRichPresenceKeys = 30; public const int k_cchMaxRichPresenceKeyLength = 64; public const int k_cchMaxRichPresenceValueLength = 256; public const int k_cchStatNameMax = 128; @@ -11246,6 +12633,16 @@ public static ISteamMatchmakingServers SteamMatchmakingServers() return new CSteamMatchmakingServers(SteamAPIInterop.SteamMatchmakingServers()); } +public static ISteamGameSearch SteamGameSearch() +{ +return new CSteamGameSearch(SteamAPIInterop.SteamGameSearch()); +} + +public static ISteamParties SteamParties() +{ +return new CSteamParties(SteamAPIInterop.SteamParties()); +} + public static ISteamRemoteStorage SteamRemoteStorage() { return new CSteamRemoteStorage(SteamAPIInterop.SteamRemoteStorage()); @@ -11286,6 +12683,11 @@ public static ISteamHTTP SteamHTTP() return new CSteamHTTP(SteamAPIInterop.SteamHTTP()); } +public static ISteamInput SteamInput() +{ +return new CSteamInput(SteamAPIInterop.SteamInput()); +} + public static ISteamController SteamController() { return new CSteamController(SteamAPIInterop.SteamController()); diff --git a/public/steam/steam_gameserver.h b/public/steam/steam_gameserver.h index c6bdd52..bec600d 100644 --- a/public/steam/steam_gameserver.h +++ b/public/steam/steam_gameserver.h @@ -22,12 +22,17 @@ enum EServerMode eServerModeAuthenticationAndSecure = 3, // Authenticate users, list on the server list and VAC protect clients }; -// Initialize ISteamGameServer interface object, and set server properties which may not be changed. +// Initialize SteamGameServer client and interface objects, and set server properties which may not be changed. // // After calling this function, you should set any additional server parameters, and then // call ISteamGameServer::LogOnAnonymous() or ISteamGameServer::LogOn() // // - usSteamPort is the local port used to communicate with the steam servers. +// NOTE: unless you are using ver old Steam client binaries, this parameter is ignored, and +// you should pass 0. Gameservers now always use WebSockets to talk to Steam. +// This protocol is TCP-based and thus always uses an ephemeral local port. +// Older steam client binaries used UDP to talk to Steam, and this argument was useful. +// A future version of the SDK will remove this argument. // - usGamePort is the port that clients will connect to for gameplay. // - usQueryPort is the port that will manage server browser related duties and info // pings from clients. If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE for usQueryPort, then it @@ -35,11 +40,10 @@ enum EServerMode // UDP packets for the master server updater. See references to GameSocketShare in isteamgameserver.h. // - The version string is usually in the form x.x.x.x, and is used by the master server to detect when the // server is out of date. (Only servers with the latest version will be listed.) - inline bool SteamGameServer_Init( uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString ); +// Shutdown SteamGameSeverXxx interfaces, log out, and free resources. S_API void SteamGameServer_Shutdown(); -S_API void SteamGameServer_RunCallbacks(); // Most Steam API functions allocate some amount of thread-local memory for // parameter storage. Calling SteamGameServer_ReleaseCurrentThreadMemory() @@ -51,56 +55,6 @@ inline void SteamGameServer_ReleaseCurrentThreadMemory(); S_API bool SteamGameServer_BSecure(); S_API uint64 SteamGameServer_GetSteamID(); - -//----------------------------------------------------------------------------------------------------------------------------------------------------------// -// Global accessors for game server C++ APIs. See individual isteam*.h files for details. -// You should not cache the results of these accessors or pass the result pointers across -// modules! Different modules may be compiled against different SDK header versions, and -// the interface pointers could therefore be different across modules. Every line of code -// which calls into a Steamworks API should retrieve the interface from a global accessor. -//----------------------------------------------------------------------------------------------------------------------------------------------------------// -#if !defined( STEAM_API_EXPORTS ) -inline ISteamClient *SteamGameServerClient(); -inline ISteamGameServer *SteamGameServer(); -inline ISteamUtils *SteamGameServerUtils(); -inline ISteamNetworking *SteamGameServerNetworking(); -inline ISteamGameServerStats *SteamGameServerStats(); -inline ISteamHTTP *SteamGameServerHTTP(); -inline ISteamInventory *SteamGameServerInventory(); -inline ISteamUGC *SteamGameServerUGC(); -inline ISteamApps *SteamGameServerApps(); -#endif - -class CSteamGameServerAPIContext -{ -public: - CSteamGameServerAPIContext() { Clear(); } - inline void Clear(); - inline bool Init(); - - ISteamClient *SteamClient() const { return m_pSteamClient; } - ISteamGameServer *SteamGameServer() const { return m_pSteamGameServer; } - ISteamUtils *SteamGameServerUtils() const { return m_pSteamGameServerUtils; } - ISteamNetworking *SteamGameServerNetworking() const { return m_pSteamGameServerNetworking; } - ISteamGameServerStats *SteamGameServerStats() const { return m_pSteamGameServerStats; } - ISteamHTTP *SteamHTTP() const { return m_pSteamHTTP; } - ISteamInventory *SteamInventory() const { return m_pSteamInventory; } - ISteamUGC *SteamUGC() const { return m_pSteamUGC; } - ISteamApps *SteamApps() const { return m_pSteamApps; } - -private: - ISteamClient *m_pSteamClient; - ISteamGameServer *m_pSteamGameServer; - ISteamUtils *m_pSteamGameServerUtils; - ISteamNetworking *m_pSteamGameServerNetworking; - ISteamGameServerStats *m_pSteamGameServerStats; - ISteamHTTP *m_pSteamHTTP; - ISteamInventory *m_pSteamInventory; - ISteamUGC *m_pSteamUGC; - ISteamApps *m_pSteamApps; -}; - - // Older SDKs exported this global pointer, but it is no longer supported. // You should use SteamGameServerClient() or CSteamGameServerAPIContext to // safely access the ISteamClient APIs from your game server application. @@ -110,122 +64,37 @@ private: // is no longer supported. Use SteamGameServer_Init instead. //S_API void S_CALLTYPE SteamGameServer_InitSafe(); - -//----------------------------------------------------------------------------------------------------------------------------------------------------------// -// These macros are similar to the STEAM_CALLBACK_* macros in steam_api.h, but only trigger for gameserver callbacks -//----------------------------------------------------------------------------------------------------------------------------------------------------------// -#define STEAM_GAMESERVER_CALLBACK( thisclass, func, /*callback_type, [deprecated] var*/... ) \ - _STEAM_CALLBACK_SELECT( ( __VA_ARGS__, GS, 3 ), ( this->SetGameserverFlag();, thisclass, func, __VA_ARGS__ ) ) - -#define STEAM_GAMESERVER_CALLBACK_MANUAL( thisclass, func, callback_type, var ) \ - CCallbackManual< thisclass, callback_type, true > var; void func( callback_type *pParam ) - - -#define _STEAM_CALLBACK_GS( _, thisclass, func, param, var ) \ - CCallback< thisclass, param, true > var; void func( param *pParam ) - -//----------------------------------------------------------------------------------------------------------------------------------------------------------// -// steamclient.dll private wrapper functions +//============================================================================= // -// The following functions are part of abstracting API access to the steamclient.dll, but should only be used in very specific cases -//----------------------------------------------------------------------------------------------------------------------------------------------------------// -S_API HSteamPipe S_CALLTYPE SteamGameServer_GetHSteamPipe(); -S_API HSteamUser S_CALLTYPE SteamGameServer_GetHSteamUser(); -S_API bool S_CALLTYPE SteamInternal_GameServer_Init( uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString ); - - -#if !defined( STEAM_API_EXPORTS ) -inline void S_CALLTYPE SteamGameServerInternal_OnContextInit( void* p ) -{ - ((CSteamGameServerAPIContext*)p)->Clear(); - if ( SteamGameServer_GetHSteamPipe() ) - ((CSteamGameServerAPIContext*)p)->Init(); -} -inline CSteamGameServerAPIContext& SteamGameServerInternal_ModuleContext() -{ - // SteamInternal_ContextInit takes a base pointer for the equivalent of - // struct { void (*pFn)(void* pCtx); uintp counter; CSteamAPIContext ctx; } - // Do not change layout of 2 + sizeof... or add non-pointer aligned data! - // NOTE: declaring "static CSteamAPIConext" creates a large function - // which queries the initialization status of the object. We know that - // it is pointer-aligned and fully memset with zeros, so just alias a - // static buffer of the appropriate size and call it a CSteamAPIContext. - static void* s_CallbackCounterAndContext[2 + sizeof( CSteamGameServerAPIContext ) / sizeof( void* )] = { (void*)&SteamGameServerInternal_OnContextInit, 0 }; - return *(CSteamGameServerAPIContext*)SteamInternal_ContextInit( s_CallbackCounterAndContext ); -} -inline ISteamClient *SteamGameServerClient() { return SteamGameServerInternal_ModuleContext().SteamClient(); } -inline ISteamGameServer *SteamGameServer() { return SteamGameServerInternal_ModuleContext().SteamGameServer(); } -inline ISteamUtils *SteamGameServerUtils() { return SteamGameServerInternal_ModuleContext().SteamGameServerUtils(); } -inline ISteamNetworking *SteamGameServerNetworking() { return SteamGameServerInternal_ModuleContext().SteamGameServerNetworking(); } -inline ISteamGameServerStats *SteamGameServerStats() { return SteamGameServerInternal_ModuleContext().SteamGameServerStats(); } -inline ISteamHTTP *SteamGameServerHTTP() { return SteamGameServerInternal_ModuleContext().SteamHTTP(); } -inline ISteamInventory *SteamGameServerInventory() { return SteamGameServerInternal_ModuleContext().SteamInventory(); } -inline ISteamUGC *SteamGameServerUGC() { return SteamGameServerInternal_ModuleContext().SteamUGC(); } -inline ISteamApps *SteamGameServerApps() { return SteamGameServerInternal_ModuleContext().SteamApps(); } -#endif // !defined( STEAM_API_EXPORTS ) - - -inline void CSteamGameServerAPIContext::Clear() -{ - m_pSteamClient = NULL; - m_pSteamGameServer = NULL; - m_pSteamGameServerUtils = NULL; - m_pSteamGameServerNetworking = NULL; - m_pSteamGameServerStats = NULL; - m_pSteamHTTP = NULL; - m_pSteamInventory = NULL; - m_pSteamUGC = NULL; - m_pSteamApps = NULL; -} +// Internal implementation details below +// +//============================================================================= +#ifndef STEAM_API_EXPORTS // This function must be declared inline in the header so the module using steam_api.dll gets the version names they want. inline bool CSteamGameServerAPIContext::Init() { - HSteamUser hSteamUser = SteamGameServer_GetHSteamUser(); - HSteamPipe hSteamPipe = SteamGameServer_GetHSteamPipe(); - if ( !hSteamPipe ) - return false; - - m_pSteamClient = (ISteamClient*) SteamInternal_CreateInterface( STEAMCLIENT_INTERFACE_VERSION ); + m_pSteamClient = ::SteamGameServerClient(); if ( !m_pSteamClient ) return false; - - m_pSteamGameServer = m_pSteamClient->GetISteamGameServer( hSteamUser, hSteamPipe, STEAMGAMESERVER_INTERFACE_VERSION ); - if ( !m_pSteamGameServer ) - return false; - m_pSteamGameServerUtils = m_pSteamClient->GetISteamUtils( hSteamPipe, STEAMUTILS_INTERFACE_VERSION ); - if ( !m_pSteamGameServerUtils ) - return false; - - m_pSteamGameServerNetworking = m_pSteamClient->GetISteamNetworking( hSteamUser, hSteamPipe, STEAMNETWORKING_INTERFACE_VERSION ); - if ( !m_pSteamGameServerNetworking ) - return false; - - m_pSteamGameServerStats = m_pSteamClient->GetISteamGameServerStats( hSteamUser, hSteamPipe, STEAMGAMESERVERSTATS_INTERFACE_VERSION ); - if ( !m_pSteamGameServerStats ) - return false; - - m_pSteamHTTP = m_pSteamClient->GetISteamHTTP( hSteamUser, hSteamPipe, STEAMHTTP_INTERFACE_VERSION ); - if ( !m_pSteamHTTP ) - return false; - - m_pSteamInventory = m_pSteamClient->GetISteamInventory( hSteamUser, hSteamPipe, STEAMINVENTORY_INTERFACE_VERSION ); - if ( !m_pSteamInventory ) - return false; - - m_pSteamUGC = m_pSteamClient->GetISteamUGC( hSteamUser, hSteamPipe, STEAMUGC_INTERFACE_VERSION ); - if ( !m_pSteamUGC ) - return false; - - m_pSteamApps = m_pSteamClient->GetISteamApps( hSteamUser, hSteamPipe, STEAMAPPS_INTERFACE_VERSION ); - if ( !m_pSteamApps ) + m_pSteamGameServer = ::SteamGameServer(); + m_pSteamGameServerUtils = ::SteamGameServerUtils(); + m_pSteamGameServerNetworking = ::SteamGameServerNetworking(); + m_pSteamGameServerStats = ::SteamGameServerStats(); + m_pSteamHTTP = ::SteamGameServerHTTP(); + m_pSteamInventory = ::SteamGameServerInventory(); + m_pSteamUGC = ::SteamGameServerUGC(); + m_pSteamApps = ::SteamGameServerApps(); + if ( !m_pSteamGameServer || !m_pSteamGameServerUtils || !m_pSteamGameServerNetworking || !m_pSteamGameServerStats + || !m_pSteamHTTP || !m_pSteamInventory || !m_pSteamUGC || !m_pSteamApps ) return false; return true; } +#endif - +S_API bool S_CALLTYPE SteamInternal_GameServer_Init( uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString ); inline bool SteamGameServer_Init( uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString ) { if ( !SteamInternal_GameServer_Init( unIP, usSteamPort, usGamePort, usQueryPort, eServerMode, pchVersionString ) ) @@ -233,8 +102,6 @@ inline bool SteamGameServer_Init( uint32 unIP, uint16 usSteamPort, uint16 usGame return true; } - - inline void SteamGameServer_ReleaseCurrentThreadMemory() { SteamAPI_ReleaseCurrentThreadMemory(); diff --git a/public/steam/steamclientpublic.h b/public/steam/steamclientpublic.h index 7b89ba2..a03f172 100644 --- a/public/steam/steamclientpublic.h +++ b/public/steam/steamclientpublic.h @@ -137,6 +137,7 @@ enum EResult k_EResultWGNetworkSendExceeded = 110, // the WG couldn't send a response because we exceeded max network send size k_EResultAccountNotFriends = 111, // the user is not mutually friends k_EResultLimitedUserAccount = 112, // the user is limited + k_EResultCantRemoveItem = 113, // item can't be removed }; // Error codes for use with the voice functions @@ -448,6 +449,16 @@ enum EBroadcastUploadResult k_EBroadcastUploadResultMissingAudio = 11, // client failed to send audio data k_EBroadcastUploadResultTooFarBehind = 12, // clients was too slow uploading k_EBroadcastUploadResultTranscodeBehind = 13, // server failed to keep up with transcode + k_EBroadcastUploadResultNotAllowedToPlay = 14, // Broadcast does not have permissions to play game + k_EBroadcastUploadResultBusy = 15, // RTMP host to busy to take new broadcast stream, choose another + k_EBroadcastUploadResultBanned = 16, // Account banned from community broadcast + k_EBroadcastUploadResultAlreadyActive = 17, // We already already have an stream running. + k_EBroadcastUploadResultForcedOff = 18, // We explicitly shutting down a broadcast + k_EBroadcastUploadResultAudioBehind = 19, // Audio stream was too far behind video + k_EBroadcastUploadResultShutdown = 20, // Broadcast Server was shut down + k_EBroadcastUploadResultDisconnect = 21, // broadcast uploader TCP disconnected + k_EBroadcastUploadResultVideoInitFailed = 22, // invalid video settings + k_EBroadcastUploadResultAudioInitFailed = 23, // invalid audio settings }; @@ -503,6 +514,7 @@ enum EVRHMDType k_eEVRHMDType_HTC_Dev = 1, // original HTC dev kits k_eEVRHMDType_HTC_VivePre = 2, // htc vive pre k_eEVRHMDType_HTC_Vive = 3, // htc vive consumer release + k_eEVRHMDType_HTC_VivePro = 4, // htc vive pro release k_eEVRHMDType_HTC_Unknown = 20, // unknown htc hmd @@ -530,6 +542,12 @@ enum EVRHMDType k_eEVRHMDType_Unannounced_Unknown = 100, // Unannounced unknown HMD k_eEVRHMDType_Unannounced_WindowsMR = 101, // Unannounced Windows MR headset + k_eEVRHMDType_vridge = 110, // VRIDGE tool + + k_eEVRHMDType_Huawei_Unknown = 120, // Huawei unknown HMD + k_eEVRHMDType_Huawei_VR2 = 121, // Huawei VR2 3DOF headset + k_eEVRHMDType_Huawei_EndOfRange = 129, // end of Huawei HMD range + }; @@ -551,15 +569,84 @@ static inline bool BIsWindowsMRHeadset( EVRHMDType eType ) } +//----------------------------------------------------------------------------- +// Purpose: true if this is from a Hauwei HMD +//----------------------------------------------------------------------------- +static inline bool BIsHuaweiHeadset( EVRHMDType eType ) +{ + return eType >= k_eEVRHMDType_Huawei_Unknown && eType <= k_eEVRHMDType_Huawei_EndOfRange; +} + + //----------------------------------------------------------------------------- // Purpose: true if this is from an Vive HMD //----------------------------------------------------------------------------- static inline bool BIsViveHMD( EVRHMDType eType ) { - return eType == k_eEVRHMDType_HTC_Dev || eType == k_eEVRHMDType_HTC_VivePre || eType == k_eEVRHMDType_HTC_Vive || eType == k_eEVRHMDType_HTC_Unknown; + return eType == k_eEVRHMDType_HTC_Dev || eType == k_eEVRHMDType_HTC_VivePre || eType == k_eEVRHMDType_HTC_Vive || eType == k_eEVRHMDType_HTC_Unknown || eType == k_eEVRHMDType_HTC_VivePro; } +//----------------------------------------------------------------------------- +// Purpose: Reasons a user may not use the Community Market. +// Used in MarketEligibilityResponse_t. +//----------------------------------------------------------------------------- +enum EMarketNotAllowedReasonFlags +{ + k_EMarketNotAllowedReason_None = 0, + + // A back-end call failed or something that might work again on retry + k_EMarketNotAllowedReason_TemporaryFailure = (1 << 0), + + // Disabled account + k_EMarketNotAllowedReason_AccountDisabled = (1 << 1), + + // Locked account + k_EMarketNotAllowedReason_AccountLockedDown = (1 << 2), + + // Limited account (no purchases) + k_EMarketNotAllowedReason_AccountLimited = (1 << 3), + + // The account is banned from trading items + k_EMarketNotAllowedReason_TradeBanned = (1 << 4), + + // Wallet funds aren't tradable because the user has had no purchase + // activity in the last year or has had no purchases prior to last month + k_EMarketNotAllowedReason_AccountNotTrusted = (1 << 5), + + // The user doesn't have Steam Guard enabled + k_EMarketNotAllowedReason_SteamGuardNotEnabled = (1 << 6), + + // The user has Steam Guard, but it hasn't been enabled for the required + // number of days + k_EMarketNotAllowedReason_SteamGuardOnlyRecentlyEnabled = (1 << 7), + + // The user has recently forgotten their password and reset it + k_EMarketNotAllowedReason_RecentPasswordReset = (1 << 8), + + // The user has recently funded his or her wallet with a new payment method + k_EMarketNotAllowedReason_NewPaymentMethod = (1 << 9), + + // An invalid cookie was sent by the user + k_EMarketNotAllowedReason_InvalidCookie = (1 << 10), + + // The user has Steam Guard, but is using a new computer or web browser + k_EMarketNotAllowedReason_UsingNewDevice = (1 << 11), + + // The user has recently refunded a store purchase by his or herself + k_EMarketNotAllowedReason_RecentSelfRefund = (1 << 12), + + // The user has recently funded his or her wallet with a new payment method that cannot be verified + k_EMarketNotAllowedReason_NewPaymentMethodCannotBeVerified = (1 << 13), + + // Not only is the account not trusted, but they have no recent purchases at all + k_EMarketNotAllowedReason_NoRecentPurchases = (1 << 14), + + // User accepted a wallet gift that was recently purchased + k_EMarketNotAllowedReason_AcceptedWalletGift = (1 << 15), +}; + + #pragma pack( push, 1 ) #define CSTEAMID_DEFINED @@ -1197,9 +1284,6 @@ public: return m_gameID.m_nAppID == k_uAppIdInvalid && m_gameID.m_nModID & 0x80000000; default: -#if defined(Assert) - Assert(false); -#endif return false; } @@ -1267,4 +1351,67 @@ typedef void (*PFNPreMinidumpCallback)(void *context); typedef void *BREAKPAD_HANDLE; #define BREAKPAD_INVALID_HANDLE (BREAKPAD_HANDLE)0 +enum EGameSearchErrorCode_t +{ + k_EGameSearchErrorCode_OK = 1, + k_EGameSearchErrorCode_Failed_Search_Already_In_Progress = 2, + k_EGameSearchErrorCode_Failed_No_Search_In_Progress = 3, + k_EGameSearchErrorCode_Failed_Not_Lobby_Leader = 4, // if not the lobby leader can not call SearchForGameWithLobby + k_EGameSearchErrorCode_Failed_No_Host_Available = 5, // no host is available that matches those search params + k_EGameSearchErrorCode_Failed_Search_Params_Invalid = 6, // search params are invalid + k_EGameSearchErrorCode_Failed_Offline = 7, // offline, could not communicate with server + k_EGameSearchErrorCode_Failed_NotAuthorized = 8, // either the user or the application does not have priveledges to do this + k_EGameSearchErrorCode_Failed_Unknown_Error = 9, // unknown error +}; + +enum EPlayerResult_t +{ + k_EPlayerResultFailedToConnect = 1, // failed to connect after confirming + k_EPlayerResultAbandoned = 2, // quit game without completing it + k_EPlayerResultKicked = 3, // kicked by other players/moderator/server rules + k_EPlayerResultIncomplete = 4, // player stayed to end but game did not conclude successfully ( nofault to player ) + k_EPlayerResultCompleted = 5, // player completed game +}; + +// Define compile time assert macros to let us validate the structure sizes. +#define VALVE_COMPILE_TIME_ASSERT( pred ) typedef char compile_time_assert_type[(pred) ? 1 : -1]; + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#define VALVE_CALLBACK_PACK_SMALL +#else +#define VALVE_CALLBACK_PACK_LARGE +#endif + +#if defined( VALVE_CALLBACK_PACK_SMALL ) +#pragma pack( push, 4 ) +#elif defined( VALVE_CALLBACK_PACK_LARGE ) +#pragma pack( push, 8 ) +#else +#error ??? +#endif + +typedef struct ValvePackingSentinel_t +{ + uint32 m_u32; + uint64 m_u64; + uint16 m_u16; + double m_d; +} ValvePackingSentinel_t; + +#pragma pack( pop ) + + +#if defined(VALVE_CALLBACK_PACK_SMALL) +VALVE_COMPILE_TIME_ASSERT( sizeof(ValvePackingSentinel_t) == 24 ) +#elif defined(VALVE_CALLBACK_PACK_LARGE) +VALVE_COMPILE_TIME_ASSERT( sizeof(ValvePackingSentinel_t) == 32 ) +#else +#error ??? +#endif + #endif // STEAMCLIENTPUBLIC_H diff --git a/public/steam/steamtypes.h b/public/steam/steamtypes.h index 45c195e..72d2d17 100644 --- a/public/steam/steamtypes.h +++ b/public/steam/steamtypes.h @@ -85,25 +85,25 @@ typedef unsigned int uintp; #endif // else _WIN32 #ifdef API_GEN -# define CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +# define STEAM_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) #else -# define CLANG_ATTR(ATTR) +# define STEAM_CLANG_ATTR(ATTR) #endif -#define METHOD_DESC(DESC) CLANG_ATTR( "desc:" #DESC ";" ) -#define IGNOREATTR() CLANG_ATTR( "ignore" ) -#define OUT_STRUCT() CLANG_ATTR( "out_struct: ;" ) -#define OUT_STRING() CLANG_ATTR( "out_string: ;" ) -#define OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) -#define OUT_ARRAY_COUNT(COUNTER, DESC) CLANG_ATTR( "out_array_count:" #COUNTER ";desc:" #DESC ) -#define ARRAY_COUNT(COUNTER) CLANG_ATTR( "array_count:" #COUNTER ";" ) -#define ARRAY_COUNT_D(COUNTER, DESC) CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) -#define BUFFER_COUNT(COUNTER) CLANG_ATTR( "buffer_count:" #COUNTER ";" ) -#define OUT_BUFFER_COUNT(COUNTER) CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) -#define OUT_STRING_COUNT(COUNTER) CLANG_ATTR( "out_string_count:" #COUNTER ";" ) -#define DESC(DESC) CLANG_ATTR("desc:" #DESC ";") -#define CALL_RESULT(RESULT_TYPE) CLANG_ATTR("callresult:" #RESULT_TYPE ";") -#define CALL_BACK(RESULT_TYPE) CLANG_ATTR("callback:" #RESULT_TYPE ";") +#define STEAM_METHOD_DESC(DESC) STEAM_CLANG_ATTR( "desc:" #DESC ";" ) +#define STEAM_IGNOREATTR() STEAM_CLANG_ATTR( "ignore" ) +#define STEAM_OUT_STRUCT() STEAM_CLANG_ATTR( "out_struct: ;" ) +#define STEAM_OUT_STRING() STEAM_CLANG_ATTR( "out_string: ;" ) +#define STEAM_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) STEAM_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define STEAM_OUT_ARRAY_COUNT(COUNTER, DESC) STEAM_CLANG_ATTR( "out_array_count:" #COUNTER ";desc:" #DESC ) +#define STEAM_ARRAY_COUNT(COUNTER) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define STEAM_ARRAY_COUNT_D(COUNTER, DESC) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define STEAM_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define STEAM_OUT_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define STEAM_OUT_STRING_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +#define STEAM_DESC(DESC) STEAM_CLANG_ATTR("desc:" #DESC ";") +#define STEAM_CALL_RESULT(RESULT_TYPE) STEAM_CLANG_ATTR("callresult:" #RESULT_TYPE ";") +#define STEAM_CALL_BACK(RESULT_TYPE) STEAM_CLANG_ATTR("callback:" #RESULT_TYPE ";") const int k_cubSaltSize = 8; typedef uint8 Salt_t[ k_cubSaltSize ]; @@ -180,5 +180,8 @@ const ManifestId_t k_uManifestIdInvalid = 0; typedef uint64 SiteId_t; const SiteId_t k_ulSiteIdInvalid = 0; +// Party Beacon ID +typedef uint64 PartyBeaconID_t; +const PartyBeaconID_t k_ulPartyBeaconIdInvalid = 0; #endif // STEAMTYPES_H diff --git a/redistributable_bin/linux32/libsteam_api.so b/redistributable_bin/linux32/libsteam_api.so index 4ee02fe..348a107 100644 Binary files a/redistributable_bin/linux32/libsteam_api.so and b/redistributable_bin/linux32/libsteam_api.so differ diff --git a/redistributable_bin/linux64/libsteam_api.so b/redistributable_bin/linux64/libsteam_api.so index edcda83..eb230a9 100644 Binary files a/redistributable_bin/linux64/libsteam_api.so and b/redistributable_bin/linux64/libsteam_api.so differ diff --git a/redistributable_bin/osx32/libsteam_api.dylib b/redistributable_bin/osx32/libsteam_api.dylib index 6e2309a..ce8dc57 100644 Binary files a/redistributable_bin/osx32/libsteam_api.dylib and b/redistributable_bin/osx32/libsteam_api.dylib differ diff --git a/redistributable_bin/steam_api.dll b/redistributable_bin/steam_api.dll index 97158ab..060b6b9 100644 Binary files a/redistributable_bin/steam_api.dll and b/redistributable_bin/steam_api.dll differ diff --git a/redistributable_bin/steam_api.lib b/redistributable_bin/steam_api.lib index e4ee851..07bf145 100644 Binary files a/redistributable_bin/steam_api.lib and b/redistributable_bin/steam_api.lib differ diff --git a/redistributable_bin/win64/steam_api64.dll b/redistributable_bin/win64/steam_api64.dll index 0013288..328dade 100644 Binary files a/redistributable_bin/win64/steam_api64.dll and b/redistributable_bin/win64/steam_api64.dll differ diff --git a/redistributable_bin/win64/steam_api64.lib b/redistributable_bin/win64/steam_api64.lib index f4e8baf..6370681 100644 Binary files a/redistributable_bin/win64/steam_api64.lib and b/redistributable_bin/win64/steam_api64.lib differ diff --git a/steamworksexample/Inventory.cpp b/steamworksexample/Inventory.cpp index 2556e76..f07f74c 100644 --- a/steamworksexample/Inventory.cpp +++ b/steamworksexample/Inventory.cpp @@ -213,6 +213,21 @@ void CSpaceWarLocalInventory::CheckForItemDrops() SteamInventory()->TriggerItemDrop( &m_hPlaytimeRequestResult, k_SpaceWarItem_TimedDropList ); } +void CSpaceWarLocalInventory::ModifyItemProperties() +{ + const CSpaceWarItem *item100 = GetInstanceOf( k_SpaceWarItem_ShipDecoration1 ); + if ( item100 ) + { + auto updateHandle = SteamInventory()->StartUpdateProperties(); + SteamInventory()->SetProperty( updateHandle, item100->GetItemId(), "string_value", "blah" ); + SteamInventory()->SetProperty( updateHandle, item100->GetItemId(), "bool_value", true ); + SteamInventory()->SetProperty( updateHandle, item100->GetItemId(), "int64_value", (int64)55 ); + SteamInventory()->SetProperty( updateHandle, item100->GetItemId(), "float_value", 123.456f ); + SteamInventoryResult_t resultHandle; + SteamInventory()->SubmitUpdateProperties( updateHandle, &resultHandle ); + } +} + void CSpaceWarLocalInventory::DoExchange() { const CSpaceWarItem *item100 = GetInstanceOf( k_SpaceWarItem_ShipDecoration1 ); diff --git a/steamworksexample/Inventory.h b/steamworksexample/Inventory.h index 3578a64..4f4f933 100644 --- a/steamworksexample/Inventory.h +++ b/steamworksexample/Inventory.h @@ -37,6 +37,7 @@ public: void GrantTestItems(); void CheckForItemDrops(); void DoExchange(); + void ModifyItemProperties(); const std::list& GetItemList() const { return m_listPlayerItems; } const CSpaceWarItem * GetItem( SteamItemInstanceID_t nItemId ) const; diff --git a/steamworksexample/gameengineosx.h b/steamworksexample/gameengineosx.h index 479b362..280f6da 100644 --- a/steamworksexample/gameengineosx.h +++ b/steamworksexample/gameengineosx.h @@ -182,11 +182,11 @@ public: // Get the first (in some arbitrary order) key down, if any bool BGetFirstKeyDown( DWORD *pdwVK ); - // Return true if there is an active Steam Controller - bool BIsSteamControllerActive( ); + // Return true if there is an active Steam Input device + bool BIsSteamInputDeviceActive( ); - // Find an active Steam controller - void FindActiveSteamController( ); + // Find the active device + void FindActiveSteamInputDevice( ); // Get the current state of a controller action bool BIsControllerActionActive( ECONTROLLERDIGITALACTION dwAction ); @@ -197,6 +197,13 @@ public: // Set the current Steam Controller Action set void SetSteamControllerActionSet( ECONTROLLERACTIONSET dwActionSet ); + // Set an Action Set Layer for Steam Input + virtual void ActivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSet ); + virtual void DeactivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSet ); + + // Returns whether a given action set layer is active + virtual bool BIsActionSetLayerActive( ECONTROLLERACTIONSET dwActionSetLayer ); + // These calls return a string describing which controller button the action is currently bound to const char *GetTextStringForControllerOriginDigital( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERDIGITALACTION dwDigitalAction ); const char *GetTextStringForControllerOriginAnalog( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERANALOGACTION dwDigitalAction ); @@ -210,11 +217,11 @@ public: // Trigger haptics on the specified pad of the controller, if available void TriggerControllerHaptics( ESteamControllerPad ePad, unsigned short usOnMicroSec, unsigned short usOffMicroSec, unsigned short usRepeat ); - // Initialize the Steam Controller interfaces - void InitSteamController( ); + // Initialize the Steam Input interface + void InitSteamInput( ); - // Called each frame to update the Steam Controller interface - void PollSteamController(); + // Called each frame to update the Steam Input interface + void PollSteamInput(); // Get current tick count for the game engine uint64 GetGameTickCount() { return m_ulGameTickCount; } @@ -492,21 +499,21 @@ public: #endif // An array of handles to Steam Controller events that player can bind to controls - ControllerDigitalActionHandle_t m_ControllerDigitalActionHandles[eControllerDigitalAction_NumActions]; + InputDigitalActionHandle_t m_ControllerDigitalActionHandles[eControllerDigitalAction_NumActions]; // An array of handles to Steam Controller events that player can bind to controls - ControllerAnalogActionHandle_t m_ControllerAnalogActionHandles[eControllerAnalogAction_NumActions]; + InputAnalogActionHandle_t m_ControllerAnalogActionHandles[eControllerAnalogAction_NumActions]; // An array of handles to different Steam Controller action set configurations - ControllerActionSetHandle_t m_ControllerActionSetHandles[eControllerActionSet_NumSets]; + InputActionSetHandle_t m_ControllerActionSetHandles[eControllerActionSet_NumSets]; // A handle to the currently active Steam Controller. - ControllerHandle_t m_ActiveControllerHandle; + InputHandle_t m_ActiveControllerHandle; - // Origins for all the Steam Controller actions. The 'origin' is where the action is currently bound to, - // ie 'jump' is currently bound to the 'A' button. - EControllerActionOrigin m_ControllerDigitalActionOrigins[eControllerDigitalAction_NumActions]; - EControllerActionOrigin m_ControllerAnalogActionOrigins[eControllerDigitalAction_NumActions]; + // Origins for all the Steam Input actions. The 'origin' is where the action is currently bound to, + // ie 'jump' is currently bound to the Steam Controller 'A' button. + EInputActionOrigin m_ControllerDigitalActionOrigins[eControllerDigitalAction_NumActions]; + EInputActionOrigin m_ControllerAnalogActionOrigins[eControllerDigitalAction_NumActions]; }; diff --git a/steamworksexample/gameengineosx.mm b/steamworksexample/gameengineosx.mm index a70ef48..18e1b05 100644 --- a/steamworksexample/gameengineosx.mm +++ b/steamworksexample/gameengineosx.mm @@ -723,6 +723,9 @@ bool CGameEngineGL::StartFrame() if ( BShuttingDown() ) return false; + // Poll Steam Input devices + PollSteamInput(); + #if DX9MODE uint bkcolor = m_dwBackgroundColor; @@ -2163,7 +2166,9 @@ void CGameEngineGL::MessagePump() UpdateKey( VK_CONTROL, c & NSControlKeyMask ); UpdateKey( VK_SELECT, c & NSAlternateKeyMask ); continue; - + + default: + break; } [pApp sendEvent:event]; @@ -2427,7 +2432,7 @@ void CGameEngineGL::ShowPixels ( CShowPixelsParams *params ) //----------------------------------------------------------------------------- // Purpose: Return true if there is an active Steam Controller //----------------------------------------------------------------------------- -bool CGameEngineGL::BIsSteamControllerActive( ) +bool CGameEngineGL::BIsSteamInputDeviceActive( ) { if ( m_ActiveControllerHandle ) { @@ -2440,36 +2445,36 @@ bool CGameEngineGL::BIsSteamControllerActive( ) //----------------------------------------------------------------------------- // Purpose: Initialize the steam controller actions //----------------------------------------------------------------------------- -void CGameEngineGL::InitSteamController( ) +void CGameEngineGL::InitSteamInput( ) { // Digital game actions - m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnLeft] = SteamController( )->GetDigitalActionHandle( "turn_left" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnRight] = SteamController( )->GetDigitalActionHandle( "turn_right" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_ForwardThrust] = SteamController( )->GetDigitalActionHandle( "forward_thrust" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_ReverseThrust] = SteamController( )->GetDigitalActionHandle( "backward_thrust" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_FireLasers] = SteamController( )->GetDigitalActionHandle( "fire_lasers" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_PauseMenu] = SteamController( )->GetDigitalActionHandle( "pause_menu" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnLeft] = SteamInput()->GetDigitalActionHandle( "turn_left" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnRight] = SteamInput()->GetDigitalActionHandle( "turn_right" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_ForwardThrust] = SteamInput()->GetDigitalActionHandle( "forward_thrust" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_ReverseThrust] = SteamInput()->GetDigitalActionHandle( "backward_thrust" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_FireLasers] = SteamInput()->GetDigitalActionHandle( "fire_lasers" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_PauseMenu] = SteamInput()->GetDigitalActionHandle( "pause_menu" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuUp] = SteamController( )->GetDigitalActionHandle( "menu_up" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuDown] = SteamController( )->GetDigitalActionHandle( "menu_down" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuLeft] = SteamController( )->GetDigitalActionHandle( "menu_left" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuRight] = SteamController( )->GetDigitalActionHandle( "menu_right" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuSelect] = SteamController( )->GetDigitalActionHandle( "menu_select" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuCancel] = SteamController( )->GetDigitalActionHandle( "menu_cancel" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuUp] = SteamInput()->GetDigitalActionHandle( "menu_up" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuDown] = SteamInput()->GetDigitalActionHandle( "menu_down" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuLeft] = SteamInput()->GetDigitalActionHandle( "menu_left" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuRight] = SteamInput()->GetDigitalActionHandle( "menu_right" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuSelect] = SteamInput()->GetDigitalActionHandle( "menu_select" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuCancel] = SteamInput()->GetDigitalActionHandle( "menu_cancel" ); // Analog game actions - m_ControllerAnalogActionHandles[eControllerAnalogAction_AnalogControls] = SteamController( )->GetAnalogActionHandle( "analog_controls" ); + m_ControllerAnalogActionHandles[eControllerAnalogAction_AnalogControls] = SteamInput()->GetAnalogActionHandle( "analog_controls" ); // Action set handles - m_ControllerActionSetHandles[eControllerActionSet_ShipControls] = SteamController( )->GetActionSetHandle( "ship_controls" ); - m_ControllerActionSetHandles[eControllerActionSet_MenuControls] = SteamController( )->GetActionSetHandle( "menu_controls" ); + m_ControllerActionSetHandles[eControllerActionSet_ShipControls] = SteamInput()->GetActionSetHandle( "ship_controls" ); + m_ControllerActionSetHandles[eControllerActionSet_MenuControls] = SteamInput()->GetActionSetHandle( "menu_controls" ); } //----------------------------------------------------------------------------- // Purpose: Find an active Steam controller //----------------------------------------------------------------------------- -void CGameEngineGL::FindActiveSteamController( ) +void CGameEngineGL::FindActiveSteamInputDevice( ) { // Use the first available steam controller for all interaction. We can call this each frame to handle // a controller disconnecting and a different one reconnecting. Handles are guaranteed to be unique for @@ -2477,7 +2482,7 @@ void CGameEngineGL::FindActiveSteamController( ) // See how many Steam Controllers are active. ControllerHandle_t pHandles[STEAM_CONTROLLER_MAX_COUNT]; - int nNumActive = SteamController( )->GetConnectedControllers( pHandles ); + int nNumActive = SteamInput()->GetConnectedControllers( pHandles ); // If there's an active controller, and if we're not already using it, select the first one. if ( nNumActive && (m_ActiveControllerHandle != pHandles[0]) ) @@ -2492,17 +2497,17 @@ void CGameEngineGL::FindActiveSteamController( ) //-------------------------------------------------------------------------------------------------------------- const char *CGameEngineGL::GetTextStringForControllerOriginDigital( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERDIGITALACTION dwDigitalAction ) { - EControllerActionOrigin origins[STEAM_CONTROLLER_MAX_ORIGINS]; - int nNumOrigins = SteamController( )->GetDigitalActionOrigins( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet], m_ControllerDigitalActionHandles[dwDigitalAction], origins ); + EInputActionOrigin origins[STEAM_CONTROLLER_MAX_ORIGINS]; + int nNumOrigins = SteamInput()->GetDigitalActionOrigins( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet], m_ControllerDigitalActionHandles[dwDigitalAction], origins ); if ( nNumOrigins ) { // We should handle the case where this action is bound to multiple buttons, but // here we just grab the first. - return SteamController()->GetStringForActionOrigin( origins[0] ); + return SteamInput()->GetStringForActionOrigin( origins[0] ); } - return SteamController()->GetStringForActionOrigin( k_EControllerActionOrigin_None ); // Return "None" + return SteamInput()->GetStringForActionOrigin( k_EInputActionOrigin_None ); // Return "None" } //-------------------------------------------------------------------------------------------------------------- @@ -2510,34 +2515,34 @@ const char *CGameEngineGL::GetTextStringForControllerOriginDigital( ECONTROLLERA //-------------------------------------------------------------------------------------------------------------- const char *CGameEngineGL::GetTextStringForControllerOriginAnalog( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERANALOGACTION dwDigitalAction ) { - EControllerActionOrigin origins[STEAM_CONTROLLER_MAX_ORIGINS]; - int nNumOrigins = SteamController( )->GetAnalogActionOrigins( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet], m_ControllerDigitalActionHandles[dwDigitalAction], origins ); + EInputActionOrigin origins[STEAM_CONTROLLER_MAX_ORIGINS]; + int nNumOrigins = SteamInput()->GetAnalogActionOrigins( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet], m_ControllerDigitalActionHandles[dwDigitalAction], origins ); if ( nNumOrigins ) { // We should handle the case where this action is bound to multiple buttons, but // here we just grab the first. - return SteamController()->GetStringForActionOrigin( origins[0] ); + return SteamInput()->GetStringForActionOrigin( origins[0] ); } - return SteamController()->GetStringForActionOrigin( k_EControllerActionOrigin_None ); // Return "None" + return SteamInput()->GetStringForActionOrigin( k_EInputActionOrigin_None ); // Return "None" } //----------------------------------------------------------------------------- // Purpose: Called each frame //----------------------------------------------------------------------------- -void CGameEngineGL::PollSteamController( ) +void CGameEngineGL::PollSteamInput( ) { // There's a bug where the action handles aren't non-zero until a config is done loading. Soon config // information will be available immediately. Until then try to init as long as the handles are invalid. if ( m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnLeft] == 0 ) { - InitSteamController( ); + InitSteamInput( ); return; } // Each frame check our active controller handle - FindActiveSteamController( ); + FindActiveSteamInputDevice( ); } @@ -2546,7 +2551,7 @@ void CGameEngineGL::PollSteamController( ) //----------------------------------------------------------------------------- void CGameEngineGL::SetControllerColor( uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) { - SteamController()->SetLEDColor( m_ActiveControllerHandle, nColorR, nColorG, nColorB, nFlags ); + SteamInput()->SetLEDColor( m_ActiveControllerHandle, nColorR, nColorG, nColorB, nFlags ); } //----------------------------------------------------------------------------- @@ -2554,7 +2559,7 @@ void CGameEngineGL::SetControllerColor( uint8 nColorR, uint8 nColorG, uint8 nCol //----------------------------------------------------------------------------- void CGameEngineGL::TriggerControllerVibration( unsigned short nLeftSpeed, unsigned short nRightSpeed ) { - SteamController()->TriggerVibration( m_ActiveControllerHandle, nLeftSpeed, nRightSpeed ); + SteamInput()->TriggerVibration( m_ActiveControllerHandle, nLeftSpeed, nRightSpeed ); } //----------------------------------------------------------------------------- @@ -2562,7 +2567,7 @@ void CGameEngineGL::TriggerControllerVibration( unsigned short nLeftSpeed, unsig //----------------------------------------------------------------------------- void CGameEngineGL::TriggerControllerHaptics( ESteamControllerPad ePad, unsigned short usOnMicroSec, unsigned short usOffMicroSec, unsigned short usRepeat ) { - SteamController()->TriggerRepeatedHapticPulse( m_ActiveControllerHandle, ePad, usOnMicroSec, usOffMicroSec, usRepeat, 0 ); + SteamInput()->TriggerRepeatedHapticPulse( m_ActiveControllerHandle, ePad, usOnMicroSec, usOffMicroSec, usRepeat, 0 ); } //----------------------------------------------------------------------------- @@ -2570,7 +2575,7 @@ void CGameEngineGL::TriggerControllerHaptics( ESteamControllerPad ePad, unsigned //----------------------------------------------------------------------------- bool CGameEngineGL::BIsControllerActionActive( ECONTROLLERDIGITALACTION dwAction ) { - ControllerDigitalActionData_t digitalData = SteamController( )->GetDigitalActionData( m_ActiveControllerHandle, m_ControllerDigitalActionHandles[dwAction] ); + ControllerDigitalActionData_t digitalData = SteamInput()->GetDigitalActionData( m_ActiveControllerHandle, m_ControllerDigitalActionHandles[dwAction] ); // Actions are only 'active' when they're assigned to a control in an action set, and that action set is active. if ( digitalData.bActive ) @@ -2584,7 +2589,7 @@ bool CGameEngineGL::BIsControllerActionActive( ECONTROLLERDIGITALACTION dwAction //--------------------------------------------------------------------------------------------------------------------------------------------------- void CGameEngineGL::GetControllerAnalogAction( ECONTROLLERANALOGACTION dwAction, float *x, float *y ) { - ControllerAnalogActionData_t analogData = SteamController( )->GetAnalogActionData( m_ActiveControllerHandle, m_ControllerAnalogActionHandles[dwAction] ); + ControllerAnalogActionData_t analogData = SteamInput()->GetAnalogActionData( m_ActiveControllerHandle, m_ControllerAnalogActionHandles[dwAction] ); // Actions are only 'active' when they're assigned to a control in an action set, and that action set is active. if ( analogData.bActive ) @@ -2608,6 +2613,50 @@ void CGameEngineGL::SetSteamControllerActionSet( ECONTROLLERACTIONSET dwActionSe return; // This call is low-overhead and can be called repeatedly from game code that is active in a specific mode. - SteamController( )->ActivateActionSet( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet] ); + SteamInput()->ActivateActionSet( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet] ); } +//----------------------------------------------------------------------------------------------------------------------------------------------------- +// Purpose: Put the controller into a specific action set layer. Action sets layers apply modifications to an existing action set. +//----------------------------------------------------------------------------------------------------------------------------------------------------- +void CGameEngineGL::ActivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSetLayer ) +{ + if ( m_ActiveControllerHandle == 0 ) + return; + + // This call is low-overhead and can be called repeatedly from game code that is active in a specific mode. + SteamInput()->ActivateActionSetLayer( m_ActiveControllerHandle, m_ControllerActionSetHandles[ dwActionSetLayer ] ); +} + +//----------------------------------------------------------------------------------------------------------------------------------------------------- +// Purpose: Deactivate an existing action set layer +//----------------------------------------------------------------------------------------------------------------------------------------------------- +void CGameEngineGL::DeactivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSetLayer ) +{ + if ( m_ActiveControllerHandle == 0 ) + return; + + // This call is low-overhead and can be called repeatedly from game code that is active in a specific mode. + SteamInput()->DeactivateActionSetLayer( m_ActiveControllerHandle, m_ControllerActionSetHandles[ dwActionSetLayer ] ); +} + + +//----------------------------------------------------------------------------------------------------------------------------------------------------- +// Purpose: Determine whether an action set layer is currently active +//----------------------------------------------------------------------------------------------------------------------------------------------------- +bool CGameEngineGL::BIsActionSetLayerActive( ECONTROLLERACTIONSET dwActionSetLayer ) +{ + if ( m_ActiveControllerHandle == 0 ) + return false; + + ControllerActionSetHandle_t pActionSetLayerHandles[ 32 ]; + int nActiveLayerCount = SteamInput()->GetActiveActionSetLayers( m_ActiveControllerHandle, pActionSetLayerHandles ); + + for ( int i = 0; i < nActiveLayerCount; i++ ) + { + if ( pActionSetLayerHandles[ i ] == m_ControllerActionSetHandles[ dwActionSetLayer ] ) + return true; + } + + return false; +} diff --git a/steamworksexample/gameenginesdl.cpp b/steamworksexample/gameenginesdl.cpp index 8f25477..901e073 100644 --- a/steamworksexample/gameenginesdl.cpp +++ b/steamworksexample/gameenginesdl.cpp @@ -397,6 +397,9 @@ bool CGameEngineGL::StartFrame() // Pump system callbacks MessagePump(); + // Poll Steam Input devices + PollSteamInput(); + // We may now be shutting down, check and don't start a frame then if ( BShuttingDown() ) return false; @@ -1187,7 +1190,7 @@ bool CGameEngineGL::AddVoiceData( HGAMEVOICECHANNEL hChannel, const uint8 *pVoic //----------------------------------------------------------------------------- // Purpose: Return true if there is an active Steam Controller //----------------------------------------------------------------------------- -bool CGameEngineGL::BIsSteamControllerActive( ) +bool CGameEngineGL::BIsSteamInputDeviceActive( ) { if ( m_ActiveControllerHandle ) { @@ -1200,36 +1203,36 @@ bool CGameEngineGL::BIsSteamControllerActive( ) //----------------------------------------------------------------------------- // Purpose: Initialize the steam controller actions //----------------------------------------------------------------------------- -void CGameEngineGL::InitSteamController( ) +void CGameEngineGL::InitSteamInput( ) { // Digital game actions - m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnLeft] = SteamController( )->GetDigitalActionHandle( "turn_left" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnRight] = SteamController( )->GetDigitalActionHandle( "turn_right" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_ForwardThrust] = SteamController( )->GetDigitalActionHandle( "forward_thrust" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_ReverseThrust] = SteamController( )->GetDigitalActionHandle( "backward_thrust" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_FireLasers] = SteamController( )->GetDigitalActionHandle( "fire_lasers" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_PauseMenu] = SteamController( )->GetDigitalActionHandle( "pause_menu" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnLeft] =SteamInput()->GetDigitalActionHandle( "turn_left" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnRight] =SteamInput()->GetDigitalActionHandle( "turn_right" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_ForwardThrust] =SteamInput()->GetDigitalActionHandle( "forward_thrust" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_ReverseThrust] =SteamInput()->GetDigitalActionHandle( "backward_thrust" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_FireLasers] =SteamInput()->GetDigitalActionHandle( "fire_lasers" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_PauseMenu] =SteamInput()->GetDigitalActionHandle( "pause_menu" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuUp] = SteamController( )->GetDigitalActionHandle( "menu_up" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuDown] = SteamController( )->GetDigitalActionHandle( "menu_down" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuLeft] = SteamController( )->GetDigitalActionHandle( "menu_left" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuRight] = SteamController( )->GetDigitalActionHandle( "menu_right" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuSelect] = SteamController( )->GetDigitalActionHandle( "menu_select" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuCancel] = SteamController( )->GetDigitalActionHandle( "menu_cancel" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuUp] =SteamInput()->GetDigitalActionHandle( "menu_up" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuDown] =SteamInput()->GetDigitalActionHandle( "menu_down" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuLeft] =SteamInput()->GetDigitalActionHandle( "menu_left" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuRight] =SteamInput()->GetDigitalActionHandle( "menu_right" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuSelect] =SteamInput()->GetDigitalActionHandle( "menu_select" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuCancel] =SteamInput()->GetDigitalActionHandle( "menu_cancel" ); // Analog game actions - m_ControllerAnalogActionHandles[eControllerAnalogAction_AnalogControls] = SteamController( )->GetAnalogActionHandle( "analog_controls" ); + m_ControllerAnalogActionHandles[eControllerAnalogAction_AnalogControls] =SteamInput()->GetAnalogActionHandle( "analog_controls" ); // Action set handles - m_ControllerActionSetHandles[eControllerActionSet_ShipControls] = SteamController( )->GetActionSetHandle( "ship_controls" ); - m_ControllerActionSetHandles[eControllerActionSet_MenuControls] = SteamController( )->GetActionSetHandle( "menu_controls" ); + m_ControllerActionSetHandles[eControllerActionSet_ShipControls] =SteamInput()->GetActionSetHandle( "ship_controls" ); + m_ControllerActionSetHandles[eControllerActionSet_MenuControls] =SteamInput()->GetActionSetHandle( "menu_controls" ); } //----------------------------------------------------------------------------- // Purpose: Find an active Steam controller //----------------------------------------------------------------------------- -void CGameEngineGL::FindActiveSteamController( ) +void CGameEngineGL::FindActiveSteamInputDevice( ) { // Use the first available steam controller for all interaction. We can call this each frame to handle // a controller disconnecting and a different one reconnecting. Handles are guaranteed to be unique for @@ -1237,7 +1240,7 @@ void CGameEngineGL::FindActiveSteamController( ) // See how many Steam Controllers are active. ControllerHandle_t pHandles[STEAM_CONTROLLER_MAX_COUNT]; - int nNumActive = SteamController( )->GetConnectedControllers( pHandles ); + int nNumActive =SteamInput()->GetConnectedControllers( pHandles ); // If there's an active controller, and if we're not already using it, select the first one. if ( nNumActive && (m_ActiveControllerHandle != pHandles[0]) ) @@ -1252,17 +1255,17 @@ void CGameEngineGL::FindActiveSteamController( ) //-------------------------------------------------------------------------------------------------------------- const char *CGameEngineGL::GetTextStringForControllerOriginDigital( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERDIGITALACTION dwDigitalAction ) { - EControllerActionOrigin origins[STEAM_CONTROLLER_MAX_ORIGINS]; - int nNumOrigins = SteamController( )->GetDigitalActionOrigins( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet], m_ControllerDigitalActionHandles[dwDigitalAction], origins ); + EInputActionOrigin origins[STEAM_CONTROLLER_MAX_ORIGINS]; + int nNumOrigins =SteamInput()->GetDigitalActionOrigins( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet], m_ControllerDigitalActionHandles[dwDigitalAction], origins ); if ( nNumOrigins ) { // We should handle the case where this action is bound to multiple buttons, but // here we just grab the first. - return SteamController()->GetStringForActionOrigin( origins[0] ); + return SteamInput()->GetStringForActionOrigin( origins[0] ); } - return SteamController()->GetStringForActionOrigin( k_EControllerActionOrigin_None ); // Return "None" + return SteamInput()->GetStringForActionOrigin( k_EInputActionOrigin_None ); // Return "None" } //-------------------------------------------------------------------------------------------------------------- @@ -1270,34 +1273,34 @@ const char *CGameEngineGL::GetTextStringForControllerOriginDigital( ECONTROLLERA //-------------------------------------------------------------------------------------------------------------- const char *CGameEngineGL::GetTextStringForControllerOriginAnalog( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERANALOGACTION dwDigitalAction ) { - EControllerActionOrigin origins[STEAM_CONTROLLER_MAX_ORIGINS]; - int nNumOrigins = SteamController( )->GetAnalogActionOrigins( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet], m_ControllerDigitalActionHandles[dwDigitalAction], origins ); + EInputActionOrigin origins[STEAM_CONTROLLER_MAX_ORIGINS]; + int nNumOrigins =SteamInput()->GetAnalogActionOrigins( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet], m_ControllerDigitalActionHandles[dwDigitalAction], origins ); if ( nNumOrigins ) { // We should handle the case where this action is bound to multiple buttons, but // here we just grab the first. - return SteamController()->GetStringForActionOrigin( origins[0] ); + return SteamInput()->GetStringForActionOrigin( origins[0] ); } - return SteamController()->GetStringForActionOrigin( k_EControllerActionOrigin_None ); // Return "None" + return SteamInput()->GetStringForActionOrigin( k_EInputActionOrigin_None ); // Return "None" } //----------------------------------------------------------------------------- // Purpose: Called each frame //----------------------------------------------------------------------------- -void CGameEngineGL::PollSteamController( ) +void CGameEngineGL::PollSteamInput( ) { // There's a bug where the action handles aren't non-zero until a config is done loading. Soon config // information will be available immediately. Until then try to init as long as the handles are invalid. if ( m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnLeft] == 0 ) { - InitSteamController( ); + InitSteamInput( ); return; } // Each frame check our active controller handle - FindActiveSteamController( ); + FindActiveSteamInputDevice( ); } @@ -1306,7 +1309,7 @@ void CGameEngineGL::PollSteamController( ) //----------------------------------------------------------------------------- void CGameEngineGL::SetControllerColor( uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) { - SteamController()->SetLEDColor( m_ActiveControllerHandle, nColorR, nColorG, nColorB, nFlags ); + SteamInput()->SetLEDColor( m_ActiveControllerHandle, nColorR, nColorG, nColorB, nFlags ); } //----------------------------------------------------------------------------- @@ -1314,7 +1317,7 @@ void CGameEngineGL::SetControllerColor( uint8 nColorR, uint8 nColorG, uint8 nCol //----------------------------------------------------------------------------- void CGameEngineGL::TriggerControllerVibration( unsigned short nLeftSpeed, unsigned short nRightSpeed ) { - SteamController()->TriggerVibration( m_ActiveControllerHandle, nLeftSpeed, nRightSpeed ); + SteamInput()->TriggerVibration( m_ActiveControllerHandle, nLeftSpeed, nRightSpeed ); } //----------------------------------------------------------------------------- @@ -1322,7 +1325,7 @@ void CGameEngineGL::TriggerControllerVibration( unsigned short nLeftSpeed, unsig //----------------------------------------------------------------------------- void CGameEngineGL::TriggerControllerHaptics( ESteamControllerPad ePad, unsigned short usOnMicroSec, unsigned short usOffMicroSec, unsigned short usRepeat ) { - SteamController()->TriggerRepeatedHapticPulse( m_ActiveControllerHandle, ePad, usOnMicroSec, usOffMicroSec, usRepeat, 0 ); + SteamInput()->TriggerRepeatedHapticPulse( m_ActiveControllerHandle, ePad, usOnMicroSec, usOffMicroSec, usRepeat, 0 ); } //----------------------------------------------------------------------------- @@ -1330,7 +1333,7 @@ void CGameEngineGL::TriggerControllerHaptics( ESteamControllerPad ePad, unsigned //----------------------------------------------------------------------------- bool CGameEngineGL::BIsControllerActionActive( ECONTROLLERDIGITALACTION dwAction ) { - ControllerDigitalActionData_t digitalData = SteamController( )->GetDigitalActionData( m_ActiveControllerHandle, m_ControllerDigitalActionHandles[dwAction] ); + ControllerDigitalActionData_t digitalData =SteamInput()->GetDigitalActionData( m_ActiveControllerHandle, m_ControllerDigitalActionHandles[dwAction] ); // Actions are only 'active' when they're assigned to a control in an action set, and that action set is active. if ( digitalData.bActive ) @@ -1344,7 +1347,7 @@ bool CGameEngineGL::BIsControllerActionActive( ECONTROLLERDIGITALACTION dwAction //--------------------------------------------------------------------------------------------------------------------------------------------------- void CGameEngineGL::GetControllerAnalogAction( ECONTROLLERANALOGACTION dwAction, float *x, float *y ) { - ControllerAnalogActionData_t analogData = SteamController( )->GetAnalogActionData( m_ActiveControllerHandle, m_ControllerAnalogActionHandles[dwAction] ); + ControllerAnalogActionData_t analogData =SteamInput()->GetAnalogActionData( m_ActiveControllerHandle, m_ControllerAnalogActionHandles[dwAction] ); // Actions are only 'active' when they're assigned to a control in an action set, and that action set is active. if ( analogData.bActive ) @@ -1372,4 +1375,48 @@ void CGameEngineGL::SetSteamControllerActionSet( ECONTROLLERACTIONSET dwActionSe } +//----------------------------------------------------------------------------------------------------------------------------------------------------- +// Purpose: Put the controller into a specific action set layer. Action sets layers apply modifications to an existing action set. +//----------------------------------------------------------------------------------------------------------------------------------------------------- +void CGameEngineGL::ActivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSetLayer ) +{ + if ( m_ActiveControllerHandle == 0 ) + return; + + // This call is low-overhead and can be called repeatedly from game code that is active in a specific mode. + SteamInput()->ActivateActionSetLayer( m_ActiveControllerHandle, m_ControllerActionSetHandles[ dwActionSetLayer ] ); +} + +//----------------------------------------------------------------------------------------------------------------------------------------------------- +// Purpose: Deactivate an existing action set layer +//----------------------------------------------------------------------------------------------------------------------------------------------------- +void CGameEngineGL::DeactivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSetLayer ) +{ + if ( m_ActiveControllerHandle == 0 ) + return; + + // This call is low-overhead and can be called repeatedly from game code that is active in a specific mode. + SteamInput()->DeactivateActionSetLayer( m_ActiveControllerHandle, m_ControllerActionSetHandles[ dwActionSetLayer ] ); +} + + +//----------------------------------------------------------------------------------------------------------------------------------------------------- +// Purpose: Determine whether an action set layer is currently active +//----------------------------------------------------------------------------------------------------------------------------------------------------- +bool CGameEngineGL::BIsActionSetLayerActive( ECONTROLLERACTIONSET dwActionSetLayer ) +{ + if ( m_ActiveControllerHandle == 0 ) + return false; + + ControllerActionSetHandle_t pActionSetLayerHandles[ 32 ]; + int nActiveLayerCount = SteamInput()->GetActiveActionSetLayers( m_ActiveControllerHandle, pActionSetLayerHandles ); + + for ( int i = 0; i < nActiveLayerCount; i++ ) + { + if ( pActionSetLayerHandles[ i ] == m_ControllerActionSetHandles[ dwActionSetLayer ] ) + return true; + } + + return false; +} diff --git a/steamworksexample/gameenginesdl.h b/steamworksexample/gameenginesdl.h index 7d1bd65..486785c 100644 --- a/steamworksexample/gameenginesdl.h +++ b/steamworksexample/gameenginesdl.h @@ -140,10 +140,10 @@ public: bool BGetFirstKeyDown( DWORD *pdwVK ); // Return true if there is an active Steam Controller - bool BIsSteamControllerActive( ); + bool BIsSteamInputDeviceActive( ); // Find an active Steam controller - void FindActiveSteamController( ); + void FindActiveSteamInputDevice( ); // Get the current state of a controller action bool BIsControllerActionActive( ECONTROLLERDIGITALACTION dwAction ); @@ -154,6 +154,13 @@ public: // Set the current Steam Controller Action set void SetSteamControllerActionSet( ECONTROLLERACTIONSET dwActionSet ); + // Set an Action Set Layer for Steam Input + virtual void ActivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSet ); + virtual void DeactivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSet ); + + // Returns whether a given action set layer is active + virtual bool BIsActionSetLayerActive( ECONTROLLERACTIONSET dwActionSetLayer ); + // These calls return a string describing which controller button the action is currently bound to const char *GetTextStringForControllerOriginDigital( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERDIGITALACTION dwDigitalAction ); const char *GetTextStringForControllerOriginAnalog( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERANALOGACTION dwDigitalAction ); @@ -168,10 +175,10 @@ public: void TriggerControllerHaptics( ESteamControllerPad ePad, unsigned short usOnMicroSec, unsigned short usOffMicroSec, unsigned short usRepeat ); // Initialize the Steam Controller interfaces - void InitSteamController( ); + void InitSteamInput( ); - // Called each frame to update the Steam Controller interface - void PollSteamController(); + // Called each frame to update the Steam Input interface + void PollSteamInput(); // Get current tick count for the game engine uint64 GetGameTickCount() { return m_ulGameTickCount; } @@ -285,21 +292,21 @@ public: uint32 m_unVoiceChannelCount; // An array of handles to Steam Controller events that player can bind to controls - ControllerDigitalActionHandle_t m_ControllerDigitalActionHandles[eControllerDigitalAction_NumActions]; + InputDigitalActionHandle_t m_ControllerDigitalActionHandles[eControllerDigitalAction_NumActions]; // An array of handles to Steam Controller events that player can bind to controls - ControllerAnalogActionHandle_t m_ControllerAnalogActionHandles[eControllerAnalogAction_NumActions]; + InputAnalogActionHandle_t m_ControllerAnalogActionHandles[eControllerAnalogAction_NumActions]; // An array of handles to different Steam Controller action set configurations - ControllerActionSetHandle_t m_ControllerActionSetHandles[eControllerActionSet_NumSets]; + InputActionSetHandle_t m_ControllerActionSetHandles[eControllerActionSet_NumSets]; // A handle to the currently active Steam Controller. - ControllerHandle_t m_ActiveControllerHandle; + InputHandle_t m_ActiveControllerHandle; - // Origins for all the Steam Controller actions. The 'origin' is where the action is currently bound to, - // ie 'jump' is currently bound to the 'A' button. - EControllerActionOrigin m_ControllerDigitalActionOrigins[eControllerDigitalAction_NumActions]; - EControllerActionOrigin m_ControllerAnalogActionOrigins[eControllerDigitalAction_NumActions]; + // Origins for all the Steam Input actions. The 'origin' is where the action is currently bound to, + // ie 'jump' is currently bound to the Steam Controller 'A' button. + EInputActionOrigin m_ControllerDigitalActionOrigins[eControllerDigitalAction_NumActions]; + EInputActionOrigin m_ControllerAnalogActionOrigins[eControllerDigitalAction_NumActions]; static const char *pOriginStrings[k_EControllerActionOrigin_Count]; diff --git a/steamworksexample/gameenginewin32.cpp b/steamworksexample/gameenginewin32.cpp index 9166fcb..222197a 100644 --- a/steamworksexample/gameenginewin32.cpp +++ b/steamworksexample/gameenginewin32.cpp @@ -8,6 +8,7 @@ #include "stdafx.h" #include "GameEngineWin32.h" #include +#include "steam\isteaminput.h" #ifdef WIN32 #include @@ -222,12 +223,12 @@ CGameEngineWin32::CGameEngineWin32( HINSTANCE hInstance, int nShowCommand, int32 for ( int i = 0; i TestCooperativeLevel(); @@ -1891,7 +1892,7 @@ void CGameEngineWin32::MessagePump() //----------------------------------------------------------------------------- // Purpose: Return true if there is an active Steam Controller //----------------------------------------------------------------------------- -bool CGameEngineWin32::BIsSteamControllerActive( ) +bool CGameEngineWin32::BIsSteamInputDeviceActive( ) { if ( m_ActiveControllerHandle ) { @@ -1904,49 +1905,52 @@ bool CGameEngineWin32::BIsSteamControllerActive( ) //----------------------------------------------------------------------------- // Purpose: Initialize the steam controller actions //----------------------------------------------------------------------------- -void CGameEngineWin32::InitSteamController( ) +void CGameEngineWin32::InitSteamInput( ) { // Digital game actions - m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnLeft] = SteamController( )->GetDigitalActionHandle( "turn_left" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnRight] = SteamController( )->GetDigitalActionHandle( "turn_right" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_ForwardThrust] = SteamController( )->GetDigitalActionHandle( "forward_thrust" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_ReverseThrust] = SteamController( )->GetDigitalActionHandle( "backward_thrust" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_FireLasers] = SteamController( )->GetDigitalActionHandle( "fire_lasers" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_PauseMenu] = SteamController( )->GetDigitalActionHandle( "pause_menu" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnLeft] = SteamInput()->GetDigitalActionHandle( "turn_left" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_TurnRight] = SteamInput()->GetDigitalActionHandle( "turn_right" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_ForwardThrust] = SteamInput()->GetDigitalActionHandle( "forward_thrust" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_ReverseThrust] = SteamInput()->GetDigitalActionHandle( "backward_thrust" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_FireLasers] = SteamInput()->GetDigitalActionHandle( "fire_lasers" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_PauseMenu] = SteamInput()->GetDigitalActionHandle( "pause_menu" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuUp] = SteamController( )->GetDigitalActionHandle( "menu_up" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuDown] = SteamController( )->GetDigitalActionHandle( "menu_down" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuLeft] = SteamController( )->GetDigitalActionHandle( "menu_left" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuRight] = SteamController( )->GetDigitalActionHandle( "menu_right" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuSelect] = SteamController( )->GetDigitalActionHandle( "menu_select" ); - m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuCancel] = SteamController( )->GetDigitalActionHandle( "menu_cancel" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuUp] = SteamInput()->GetDigitalActionHandle( "menu_up" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuDown] = SteamInput()->GetDigitalActionHandle( "menu_down" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuLeft] = SteamInput()->GetDigitalActionHandle( "menu_left" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuRight] = SteamInput()->GetDigitalActionHandle( "menu_right" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuSelect] = SteamInput()->GetDigitalActionHandle( "menu_select" ); + m_ControllerDigitalActionHandles[eControllerDigitalAction_MenuCancel] = SteamInput()->GetDigitalActionHandle( "menu_cancel" ); // Analog game actions - m_ControllerAnalogActionHandles[eControllerAnalogAction_AnalogControls] = SteamController( )->GetAnalogActionHandle( "analog_controls" ); + m_ControllerAnalogActionHandles[eControllerAnalogAction_AnalogControls] = SteamInput()->GetAnalogActionHandle( "analog_controls" ); // Action set handles - m_ControllerActionSetHandles[eControllerActionSet_ShipControls] = SteamController( )->GetActionSetHandle( "ship_controls" ); - m_ControllerActionSetHandles[eControllerActionSet_MenuControls] = SteamController( )->GetActionSetHandle( "menu_controls" ); + m_ControllerActionSetHandles[eControllerActionSet_ShipControls] = SteamInput()->GetActionSetHandle( "ship_controls" ); + m_ControllerActionSetHandles[eControllerActionSet_MenuControls] = SteamInput()->GetActionSetHandle( "menu_controls" ); + + // Action set layer handle + m_ControllerActionSetHandles[eControllerActionSet_Layer_Thrust] = SteamInput()->GetActionSetHandle( "thrust_action_layer" ); } //----------------------------------------------------------------------------- // Purpose: Find an active Steam controller //----------------------------------------------------------------------------- -void CGameEngineWin32::FindActiveSteamController() +void CGameEngineWin32::FindActiveSteamInputDevice() { // Use the first available steam controller for all interaction. We can call this each frame to handle // a controller disconnecting and a different one reconnecting. Handles are guaranteed to be unique for // a given controller, even across power cycles. // See how many Steam Controllers are active. - ControllerHandle_t pHandles[STEAM_CONTROLLER_MAX_COUNT]; - int nNumActive = SteamController( )->GetConnectedControllers( pHandles ); + InputHandle_t pHandles[STEAM_CONTROLLER_MAX_COUNT]; + int nNumActive = SteamInput( )->GetConnectedControllers( pHandles ); // If there's an active controller, and if we're not already using it, select the first one. - if ( nNumActive && (m_ActiveControllerHandle != pHandles[0]) ) + if ( nNumActive && ( m_ActiveControllerHandle != pHandles[0] ) ) { - m_ActiveControllerHandle = pHandles[0]; + m_ActiveControllerHandle = pHandles[ 0 ]; } return; @@ -1961,16 +1965,15 @@ void CGameEngineWin32::FindActiveSteamController() //-------------------------------------------------------------------------------------------------------------- const char *CGameEngineWin32::GetTextStringForControllerOriginDigital( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERDIGITALACTION dwDigitalAction ) { - EControllerActionOrigin origins[STEAM_CONTROLLER_MAX_ORIGINS]; - int nNumOrigins = SteamController( )->GetDigitalActionOrigins( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet], m_ControllerDigitalActionHandles[dwDigitalAction], origins ); - + EInputActionOrigin origins[STEAM_CONTROLLER_MAX_ORIGINS]; + int nNumOrigins = SteamInput( )->GetDigitalActionOrigins( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet], m_ControllerDigitalActionHandles[dwDigitalAction], origins ); if ( nNumOrigins ) { // We should handle the case where this action is bound to multiple buttons, but // here we just grab the first. - return SteamController()->GetStringForActionOrigin( origins[0] ); + return SteamInput()->GetStringForActionOrigin( origins[0] ); } - return SteamController()->GetStringForActionOrigin( k_EControllerActionOrigin_None ); // Return "None" + return SteamInput()->GetStringForActionOrigin( k_EInputActionOrigin_None ); // Return "None" } //-------------------------------------------------------------------------------------------------------------- @@ -1978,27 +1981,27 @@ const char *CGameEngineWin32::GetTextStringForControllerOriginDigital( ECONTROLL //-------------------------------------------------------------------------------------------------------------- const char *CGameEngineWin32::GetTextStringForControllerOriginAnalog( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERANALOGACTION dwDigitalAction ) { - EControllerActionOrigin origins[STEAM_CONTROLLER_MAX_ORIGINS]; - int nNumOrigins = SteamController( )->GetAnalogActionOrigins( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet], m_ControllerDigitalActionHandles[dwDigitalAction], origins ); + EInputActionOrigin origins[STEAM_CONTROLLER_MAX_ORIGINS]; + int nNumOrigins = SteamInput( )->GetAnalogActionOrigins( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet], m_ControllerDigitalActionHandles[dwDigitalAction], origins ); if ( nNumOrigins ) { // We should handle the case where this action is bound to multiple buttons, but // here we just grab the first. - return SteamController()->GetStringForActionOrigin( origins[0] ); + return SteamInput()->GetStringForActionOrigin( origins[0] ); } - return SteamController()->GetStringForActionOrigin( k_EControllerActionOrigin_None ); // Return "None" + return SteamInput()->GetStringForActionOrigin( k_EInputActionOrigin_None ); // Return "None" } //----------------------------------------------------------------------------- // Purpose: Called each frame //----------------------------------------------------------------------------- -void CGameEngineWin32::PollSteamController() +void CGameEngineWin32::PollSteamInput() { // Each frame check our active controller handle - FindActiveSteamController(); + FindActiveSteamInputDevice(); } @@ -2007,7 +2010,7 @@ void CGameEngineWin32::PollSteamController() //----------------------------------------------------------------------------- void CGameEngineWin32::SetControllerColor( uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) { - SteamController()->SetLEDColor( m_ActiveControllerHandle, nColorR, nColorG, nColorB, nFlags ); + SteamInput()->SetLEDColor( m_ActiveControllerHandle, nColorR, nColorG, nColorB, nFlags ); } //----------------------------------------------------------------------------- @@ -2015,7 +2018,7 @@ void CGameEngineWin32::SetControllerColor( uint8 nColorR, uint8 nColorG, uint8 n //----------------------------------------------------------------------------- void CGameEngineWin32::TriggerControllerVibration( unsigned short nLeftSpeed, unsigned short nRightSpeed ) { - SteamController()->TriggerVibration( m_ActiveControllerHandle, nLeftSpeed, nRightSpeed ); + SteamInput()->TriggerVibration( m_ActiveControllerHandle, nLeftSpeed, nRightSpeed ); } //----------------------------------------------------------------------------- @@ -2023,7 +2026,7 @@ void CGameEngineWin32::TriggerControllerVibration( unsigned short nLeftSpeed, un //----------------------------------------------------------------------------- void CGameEngineWin32::TriggerControllerHaptics( ESteamControllerPad ePad, unsigned short usOnMicroSec, unsigned short usOffMicroSec, unsigned short usRepeat ) { - SteamController()->TriggerRepeatedHapticPulse( m_ActiveControllerHandle, ePad, usOnMicroSec, usOffMicroSec, usRepeat, 0 ); + SteamInput()->TriggerRepeatedHapticPulse( m_ActiveControllerHandle, ePad, usOnMicroSec, usOffMicroSec, usRepeat, 0 ); } //----------------------------------------------------------------------------- @@ -2031,7 +2034,7 @@ void CGameEngineWin32::TriggerControllerHaptics( ESteamControllerPad ePad, unsig //----------------------------------------------------------------------------- bool CGameEngineWin32::BIsControllerActionActive( ECONTROLLERDIGITALACTION dwAction ) { - ControllerDigitalActionData_t digitalData = SteamController( )->GetDigitalActionData( m_ActiveControllerHandle, m_ControllerDigitalActionHandles[dwAction] ); + ControllerDigitalActionData_t digitalData = SteamInput( )->GetDigitalActionData( m_ActiveControllerHandle, m_ControllerDigitalActionHandles[dwAction] ); // Actions are only 'active' when they're assigned to a control in an action set, and that action set is active. if ( digitalData.bActive ) @@ -2045,7 +2048,7 @@ bool CGameEngineWin32::BIsControllerActionActive( ECONTROLLERDIGITALACTION dwAct //--------------------------------------------------------------------------------------------------------------------------------------------------- void CGameEngineWin32::GetControllerAnalogAction( ECONTROLLERANALOGACTION dwAction, float *x, float *y ) { - ControllerAnalogActionData_t analogData = SteamController( )->GetAnalogActionData( m_ActiveControllerHandle, m_ControllerAnalogActionHandles[dwAction] ); + ControllerAnalogActionData_t analogData = SteamInput( )->GetAnalogActionData( m_ActiveControllerHandle, m_ControllerAnalogActionHandles[dwAction] ); // Actions are only 'active' when they're assigned to a control in an action set, and that action set is active. if ( analogData.bActive ) @@ -2069,10 +2072,54 @@ void CGameEngineWin32::SetSteamControllerActionSet( ECONTROLLERACTIONSET dwActio return; // This call is low-overhead and can be called repeatedly from game code that is active in a specific mode. - SteamController( )->ActivateActionSet( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet] ); + SteamInput()->ActivateActionSet( m_ActiveControllerHandle, m_ControllerActionSetHandles[dwActionSet] ); } +//----------------------------------------------------------------------------------------------------------------------------------------------------- +// Purpose: Put the controller into a specific action set layer. Action sets layers apply modifications to an existing action set. +//----------------------------------------------------------------------------------------------------------------------------------------------------- +void CGameEngineWin32::ActivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSetLayer ) +{ + if ( m_ActiveControllerHandle == 0 ) + return; + + // This call is low-overhead and can be called repeatedly from game code that is active in a specific mode. + SteamInput()->ActivateActionSetLayer( m_ActiveControllerHandle, m_ControllerActionSetHandles[ dwActionSetLayer ] ); +} + +//----------------------------------------------------------------------------------------------------------------------------------------------------- +// Purpose: Deactivate an existing action set layer +//----------------------------------------------------------------------------------------------------------------------------------------------------- +void CGameEngineWin32::DeactivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSetLayer ) +{ + if ( m_ActiveControllerHandle == 0 ) + return; + + // This call is low-overhead and can be called repeatedly from game code that is active in a specific mode. + SteamInput()->DeactivateActionSetLayer( m_ActiveControllerHandle, m_ControllerActionSetHandles[ dwActionSetLayer ] ); +} + + +//----------------------------------------------------------------------------------------------------------------------------------------------------- +// Purpose: Determine whether an action set layer is currently active +//----------------------------------------------------------------------------------------------------------------------------------------------------- +bool CGameEngineWin32::BIsActionSetLayerActive( ECONTROLLERACTIONSET dwActionSetLayer ) +{ + if ( m_ActiveControllerHandle == 0 ) + return false; + + ControllerActionSetHandle_t pActionSetLayerHandles[ 32 ]; + int nActiveLayerCount = SteamInput()->GetActiveActionSetLayers( m_ActiveControllerHandle, pActionSetLayerHandles ); + + for( int i = 0; i < nActiveLayerCount; i++ ) + { + if ( pActionSetLayerHandles[i] == m_ControllerActionSetHandles[ dwActionSetLayer ] ) + return true; + } + + return false; +} //----------------------------------------------------------------------------- // Purpose: Track keys which are down diff --git a/steamworksexample/gameenginewin32.h b/steamworksexample/gameenginewin32.h index a9c2181..46276d0 100644 --- a/steamworksexample/gameenginewin32.h +++ b/steamworksexample/gameenginewin32.h @@ -183,10 +183,10 @@ public: bool BGetFirstKeyDown( DWORD *pdwVK ); // Return true if there is an active Steam Controller - bool BIsSteamControllerActive( ); + bool BIsSteamInputDeviceActive( ); // Find an active Steam controller - void FindActiveSteamController( ); + void FindActiveSteamInputDevice( ); // Get the current state of a controller action bool BIsControllerActionActive( ECONTROLLERDIGITALACTION dwAction ); @@ -197,6 +197,13 @@ public: // Set the current Steam Controller Action set void SetSteamControllerActionSet( ECONTROLLERACTIONSET dwActionSet ); + // Set an Action Set Layer for Steam Input + virtual void ActivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSet ); + virtual void DeactivateSteamControllerActionSetLayer( ECONTROLLERACTIONSET dwActionSet ); + + // Returns whether a given action set layer is active + virtual bool BIsActionSetLayerActive( ECONTROLLERACTIONSET dwActionSetLayer ); + // These calls return a string describing which controller button the action is currently bound to const char *GetTextStringForControllerOriginDigital( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERDIGITALACTION dwDigitalAction ); const char *GetTextStringForControllerOriginAnalog( ECONTROLLERACTIONSET dwActionSet, ECONTROLLERANALOGACTION dwDigitalAction ); @@ -211,10 +218,10 @@ public: void TriggerControllerHaptics( ESteamControllerPad ePad, unsigned short usOnMicroSec, unsigned short usOffMicroSec, unsigned short usRepeat ); // Initialize the Steam Controller interfaces - void InitSteamController( ); + void InitSteamInput( ); // Called each frame to update the Steam Controller interface - void PollSteamController(); + void PollSteamInput(); // Get current tick count for the game engine uint64 GetGameTickCount() { return m_ulGameTickCount; } @@ -438,21 +445,21 @@ private: uint32 m_unVoiceChannelCount; // An array of handles to Steam Controller events that player can bind to controls - ControllerDigitalActionHandle_t m_ControllerDigitalActionHandles[eControllerDigitalAction_NumActions]; + InputDigitalActionHandle_t m_ControllerDigitalActionHandles[eControllerDigitalAction_NumActions]; // An array of handles to Steam Controller events that player can bind to controls - ControllerAnalogActionHandle_t m_ControllerAnalogActionHandles[eControllerAnalogAction_NumActions]; + InputAnalogActionHandle_t m_ControllerAnalogActionHandles[eControllerAnalogAction_NumActions]; // An array of handles to different Steam Controller action set configurations - ControllerActionSetHandle_t m_ControllerActionSetHandles[eControllerActionSet_NumSets]; + InputActionSetHandle_t m_ControllerActionSetHandles[eControllerActionSet_NumSets]; // A handle to the currently active Steam Controller. - ControllerHandle_t m_ActiveControllerHandle; + InputHandle_t m_ActiveControllerHandle; - // Origins for all the Steam Controller actions. The 'origin' is where the action is currently bound to, - // ie 'jump' is currently bound to the 'A' button. - EControllerActionOrigin m_ControllerDigitalActionOrigins[eControllerDigitalAction_NumActions]; - EControllerActionOrigin m_ControllerAnalogActionOrigins[eControllerDigitalAction_NumActions]; + // Origins for all the Steam Input actions. The 'origin' is where the action is currently bound to, + // ie 'jump' is currently bound to the Steam Controller 'A' button. + EInputActionOrigin m_ControllerDigitalActionOrigins[eControllerDigitalAction_NumActions]; + EInputActionOrigin m_ControllerAnalogActionOrigins[eControllerDigitalAction_NumActions]; }; #endif // GAMEENGINEWIN32_H diff --git a/steamworksexample/glstringosx.mm b/steamworksexample/glstringosx.mm index e58841e..39ea388 100644 --- a/steamworksexample/glstringosx.mm +++ b/steamworksexample/glstringosx.mm @@ -112,7 +112,8 @@ } -- (void) genTexture; // generates the texture without drawing texture to current context +// generates the texture without drawing texture to current context +- (void) genTexture { NSImage * image; NSBitmapImageRep * bitmap; diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Breakpad b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Breakpad index 5159262..9fd8b92 100644 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Breakpad and b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Breakpad differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Headers b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Headers new file mode 100644 index 0000000..5bbdca6 --- /dev/null +++ b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Headers/Breakpad.h b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Headers/Breakpad.h deleted file mode 100644 index b9c3b78..0000000 --- a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Headers/Breakpad.h +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Framework to provide a simple C API to crash reporting for -// applications. By default, if any machine-level exception (e.g., -// EXC_BAD_ACCESS) occurs, it will be handled by the BreakpadRef -// object as follows: -// -// 1. Create a minidump file (see Breakpad for details) -// 2. Prompt the user (using CFUserNotification) -// 3. Invoke a command line reporting tool to send the minidump to a -// server -// -// By specifying parameters to the BreakpadCreate function, you can -// modify the default behavior to suit your needs and wants and -// desires. - -// A service name associated with the original bootstrap parent port, saved in -// OnDemandServer and restored in Inspector. -#define BREAKPAD_BOOTSTRAP_PARENT_PORT "com.Breakpad.BootstrapParent" - -typedef void *BreakpadRef; - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include "BreakpadDefines.h" - -// Optional user-defined function to dec to decide if we should handle -// this crash or forward it along. -// Return true if you want Breakpad to handle it. -// Return false if you want Breakpad to skip it -// The exception handler always returns false, as if SEND_AND_EXIT were false -// (which means the next exception handler will take the exception) -typedef bool (*BreakpadFilterCallback)(int exception_type, - int exception_code, - mach_port_t crashing_thread, - void *context); - -// Create a new BreakpadRef object and install it as an exception -// handler. The |parameters| will typically be the contents of your -// bundle's Info.plist. -// -// You can also specify these additional keys for customizable behavior: -// Key: Value: -// BREAKPAD_PRODUCT Product name (e.g., "MyAwesomeProduct") -// This one is used as the key to identify -// the product when uploading. Falls back to -// CFBundleName if not specified. -// REQUIRED -// -// BREAKPAD_PRODUCT_DISPLAY This is the display name, e.g. a pretty -// name for the product when the crash_sender -// pops up UI for the user. Falls back first to -// CFBundleDisplayName and then to -// BREAKPAD_PRODUCT if not specified. -// -// BREAKPAD_VERSION Product version (e.g., 1.2.3), used -// as metadata for crash report. Falls back to -// CFBundleVersion if not specified. -// REQUIRED -// -// BREAKPAD_VENDOR Vendor name, used in UI (e.g. "A report has -// been created that you can send to ") -// -// BREAKPAD_URL URL destination for reporting -// REQUIRED -// -// BREAKPAD_REPORT_INTERVAL # of seconds between sending -// reports. If an additional report is -// generated within this time, it will -// be ignored. Default: 3600sec. -// Specify 0 to send all reports. -// -// BREAKPAD_SKIP_CONFIRM If true, the reporter will send the report -// without any user intervention. -// Defaults to NO -// -// BREAKPAD_CONFIRM_TIMEOUT Number of seconds before the upload -// confirmation dialog will be automatically -// dismissed (cancelling the upload). -// Default: 300 seconds (min of 60). -// Specify 0 to prevent timeout. -// -// BREAKPAD_SEND_AND_EXIT If true, the handler will exit after sending. -// This will prevent any other handler (e.g., -// CrashReporter) from getting the crash. -// Defaults TO YES -// -// BREAKPAD_DUMP_DIRECTORY The directory to store crash-dumps -// in. By default, we use -// ~/Library/Breakpad/ -// The path you specify here is tilde-expanded. -// -// BREAKPAD_INSPECTOR_LOCATION The full path to the Inspector executable. -// Defaults to /Inspector -// -// BREAKPAD_REPORTER_EXE_LOCATION The full path to the Reporter/sender -// executable. -// Default: -// /crash_report_sender.app -// -// BREAKPAD_LOGFILES Indicates an array of log file paths that -// should be uploaded at crash time. -// -// BREAKPAD_REQUEST_COMMENTS If true, the message dialog will have a -// text box for the user to enter comments. -// Default: NO -// -// BREAKPAD_REQUEST_EMAIL If true and BREAKPAD_REQUEST_COMMENTS is also -// true, the message dialog will have a text -// box for the user to enter their email address. -// Default: NO -// -// BREAKPAD_SERVER_TYPE A parameter that tells Breakpad how to -// rewrite the upload parameters for a specific -// server type. The currently valid values are -// 'socorro' or 'google'. If you want to add -// other types, see the function in -// crash_report_sender.m that maps parameters to -// URL parameters. Defaults to 'google'. -// -// BREAKPAD_SERVER_PARAMETER_DICT A plist dictionary of static -// parameters that are uploaded to the -// server. The parameters are sent as -// is to the crash server. Their -// content isn't added to the minidump -// but pass as URL parameters when -// uploading theminidump to the crash -// server. -//============================================================================= -// The BREAKPAD_PRODUCT, BREAKPAD_VERSION and BREAKPAD_URL are -// required to have non-NULL values. By default, the BREAKPAD_PRODUCT -// will be the CFBundleName and the BREAKPAD_VERSION will be the -// CFBundleVersion when these keys are present in the bundle's -// Info.plist, which is usually passed in to BreakpadCreate() as an -// NSDictionary (you could also pass in another dictionary that had -// the same keys configured). If the BREAKPAD_PRODUCT or -// BREAKPAD_VERSION are ultimately undefined, BreakpadCreate() will -// fail. You have been warned. -// -// If you are running in a debugger, Breakpad will not install, unless the -// BREAKPAD_IGNORE_DEBUGGER envionment variable is set and/or non-zero. -// -// The BREAKPAD_SKIP_CONFIRM and BREAKPAD_SEND_AND_EXIT default -// values are NO and YES. However, they can be controlled by setting their -// values in a user or global plist. -// -// It's easiest to use Breakpad via the Framework, but if you're compiling the -// code in directly, BREAKPAD_INSPECTOR_LOCATION and -// BREAKPAD_REPORTER_EXE_LOCATION allow you to specify custom paths -// to the helper executables. -// -//============================================================================= -// The following are NOT user-supplied but are documented here for -// completeness. They are calculated by Breakpad during initialization & -// crash-dump generation, or entered in by the user. -// -// BREAKPAD_PROCESS_START_TIME The time, in seconds since the Epoch, the -// process started -// -// BREAKPAD_PROCESS_CRASH_TIME The time, in seconds since the Epoch, the -// process crashed. -// -// BREAKPAD_PROCESS_UP_TIME The total time in milliseconds the process -// has been running. This parameter is not -// set until the crash-dump-generation phase. -// -// BREAKPAD_LOGFILE_KEY_PREFIX Used to find out which parameters in the -// parameter dictionary correspond to log -// file paths. -// -// BREAKPAD_SERVER_PARAMETER_PREFIX This prefix is used by Breakpad -// internally, because Breakpad uses -// the same dictionary internally to -// track both its internal -// configuration parameters and -// parameters meant to be uploaded -// to the server. This string is -// used internally by Breakpad to -// prefix user-supplied parameter -// names so those can be sent to the -// server without leaking Breakpad's -// internal values. -// -// BREAKPAD_ON_DEMAND Used internally to indicate to the -// Reporter that we're sending on-demand, -// not as result of a crash. -// -// BREAKPAD_COMMENTS The text the user provided as comments. -// Only used in crash_report_sender. - -// Returns a new BreakpadRef object on success, NULL otherwise. -BreakpadRef BreakpadCreate(NSDictionary *parameters); - -// Uninstall and release the data associated with |ref|. -void BreakpadRelease(BreakpadRef ref); - -// Clients may set an optional callback which gets called when a crash -// occurs. The callback function should return |true| if we should -// handle the crash, generate a crash report, etc. or |false| if we -// should ignore it and forward the crash (normally to CrashReporter). -// Context is a pointer to arbitrary data to make the callback with. -void BreakpadSetFilterCallback(BreakpadRef ref, - BreakpadFilterCallback callback, - void *context); - -// User defined key and value string storage. Generally this is used -// to configure Breakpad's internal operation, such as whether the -// crash_sender should prompt the user, or the filesystem location for -// the minidump file. See Breakpad.h for some parameters that can be -// set. Anything longer than 255 bytes will be truncated. Note that -// the string is converted to UTF8 before truncation, so any multibyte -// character that straddles the 255(256 - 1 for terminator) byte limit -// will be mangled. -// -// A maximum number of 64 key/value pairs are supported. An assert() -// will fire if more than this number are set. Unfortunately, right -// now, the same dictionary is used for both Breakpad's parameters AND -// the Upload parameters. -// -// TODO (nealsid): Investigate how necessary this is if we don't -// automatically upload parameters to the server anymore. -// TODO (nealsid): separate server parameter dictionary from the -// dictionary used to configure Breakpad, and document limits for each -// independently. -void BreakpadSetKeyValue(BreakpadRef ref, NSString *key, NSString *value); -NSString *BreakpadKeyValue(BreakpadRef ref, NSString *key); -void BreakpadRemoveKeyValue(BreakpadRef ref, NSString *key); - -// You can use this method to specify parameters that will be uploaded -// to the crash server. They will be automatically encoded as -// necessary. Note that as mentioned above there are limits on both -// the number of keys and their length. -void BreakpadAddUploadParameter(BreakpadRef ref, NSString *key, - NSString *value); - -// This method will remove a previously-added parameter from the -// upload parameter set. -void BreakpadRemoveUploadParameter(BreakpadRef ref, NSString *key); - -// Add a log file for Breakpad to read and send upon crash dump -void BreakpadAddLogFile(BreakpadRef ref, NSString *logPathname); - -// Generate a minidump and send -void BreakpadGenerateAndSendReport(BreakpadRef ref); - -void BreakpadSetComment( BreakpadRef ref, char const *pchComment ); - -#ifdef __cplusplus -} -#endif diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Headers/BreakpadDefines.h b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Headers/BreakpadDefines.h deleted file mode 100644 index 8986cd1..0000000 --- a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Headers/BreakpadDefines.h +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2011, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Keys for configuration file -#define kReporterMinidumpDirectoryKey "MinidumpDir" -#define kReporterMinidumpIDKey "MinidumpID" - -// Filename for recording uploaded IDs -#define kReporterLogFilename "uploads.log" - -// The default subdirectory of the Library to put crash dumps in -// The subdirectory is -// ~/Library// -#define kDefaultLibrarySubdirectory "Breakpad" - -// Specify some special keys to be used in the configuration file that is -// generated by Breakpad and consumed by the crash_sender. -#define BREAKPAD_PRODUCT "BreakpadProduct" -#define BREAKPAD_PRODUCT_DISPLAY "BreakpadProductDisplay" -#define BREAKPAD_VERSION "BreakpadVersion" -#define BREAKPAD_VENDOR "BreakpadVendor" -#define BREAKPAD_URL "BreakpadURL" -#define BREAKPAD_REPORT_INTERVAL "BreakpadReportInterval" -#define BREAKPAD_SKIP_CONFIRM "BreakpadSkipConfirm" -#define BREAKPAD_CONFIRM_TIMEOUT "BreakpadConfirmTimeout" -#define BREAKPAD_SEND_AND_EXIT "BreakpadSendAndExit" -#define BREAKPAD_DUMP_DIRECTORY "BreakpadMinidumpLocation" -#define BREAKPAD_INSPECTOR_LOCATION "BreakpadInspectorLocation" -#define BREAKPAD_REPORTER_EXE_LOCATION \ - "BreakpadReporterExeLocation" -#define BREAKPAD_LOGFILES "BreakpadLogFiles" -#define BREAKPAD_LOGFILE_UPLOAD_SIZE "BreakpadLogFileTailSize" -#define BREAKPAD_REQUEST_COMMENTS "BreakpadRequestComments" -#define BREAKPAD_COMMENTS "BreakpadComments" -#define BREAKPAD_REQUEST_EMAIL "BreakpadRequestEmail" -#define BREAKPAD_EMAIL "BreakpadEmail" -#define BREAKPAD_SERVER_TYPE "BreakpadServerType" -#define BREAKPAD_SERVER_PARAMETER_DICT "BreakpadServerParameters" - -// The keys below are NOT user supplied, and are used internally. -#define BREAKPAD_PROCESS_START_TIME "BreakpadProcStartTime" -#define BREAKPAD_PROCESS_UP_TIME "BreakpadProcessUpTime" -#define BREAKPAD_PROCESS_CRASH_TIME "BreakpadProcessCrashTime" -#define BREAKPAD_LOGFILE_KEY_PREFIX "BreakpadAppLogFile" -#define BREAKPAD_SERVER_PARAMETER_PREFIX "BreakpadServerParameterPrefix_" -#define BREAKPAD_ON_DEMAND "BreakpadOnDemand" diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources new file mode 100644 index 0000000..6e50ab9 --- /dev/null +++ b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/Info.plist b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/Info.plist deleted file mode 100644 index 1113206..0000000 --- a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - BuildMachineOSBuild - 11G63 - CFBundleDevelopmentRegion - English - CFBundleExecutable - Breakpad - CFBundleIdentifier - com.googlecode.google-breakpad - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Breakpad - CFBundlePackageType - FMWK - CFBundleSignature - ???? - CFBundleVersion - 1.0 - DTCompiler - com.apple.compilers.llvm.clang.1_0.compiler - DTPlatformBuild - 4E3002 - DTPlatformVersion - GM - DTSDKBuild - 10K549 - DTSDKName - macosx10.6 - DTXcode - 0433 - DTXcodeBuild - 4E3002 - - diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/Inspector b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/Inspector deleted file mode 100644 index e4d6ca5..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/Inspector and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/breakpadUtilities.dylib b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/breakpadUtilities.dylib deleted file mode 100644 index ba6037a..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/breakpadUtilities.dylib and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Info.plist b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Info.plist deleted file mode 100644 index f802b01..0000000 --- a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Info.plist +++ /dev/null @@ -1,48 +0,0 @@ - - - - - BuildMachineOSBuild - 11G63 - CFBundleDevelopmentRegion - English - CFBundleDisplayName - crash_report_sender - CFBundleExecutable - crash_report_sender - CFBundleIconFile - crash_report_sender - CFBundleIdentifier - com.Breakpad.crash_report_sender - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - crash_report_sender - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - DTCompiler - com.apple.compilers.llvm.clang.1_0.compiler - DTPlatformBuild - 4E3002 - DTPlatformVersion - GM - DTSDKBuild - 10K549 - DTSDKName - macosx10.6 - DTXcode - 0433 - DTXcodeBuild - 4E3002 - LSHasLocalizedDisplayName - - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/MacOS/crash_report_sender b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/MacOS/crash_report_sender deleted file mode 100644 index 14abcbf..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/MacOS/crash_report_sender and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/PkgInfo b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/PkgInfo deleted file mode 100644 index bd04210..0000000 --- a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPL???? \ No newline at end of file diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/Breakpad.nib b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/Breakpad.nib deleted file mode 100644 index 432a001..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/Breakpad.nib and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/English.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/English.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings deleted file mode 100644 index b731522..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/crash_report_sender.icns b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/crash_report_sender.icns deleted file mode 100644 index e8c2124..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/crash_report_sender.icns and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/da.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/da.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/da.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/da.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/da.lproj/Localizable.strings deleted file mode 100644 index 59b0fae..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/da.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/de.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/de.lproj/InfoPlist.strings deleted file mode 100644 index e30f049..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/de.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/de.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/de.lproj/Localizable.strings deleted file mode 100644 index 4fb2a0a..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/de.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/es.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/es.lproj/InfoPlist.strings deleted file mode 100644 index 2ddf311..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/es.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/es.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/es.lproj/Localizable.strings deleted file mode 100644 index ee3c368..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/es.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/fr.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/fr.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/fr.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/fr.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/fr.lproj/Localizable.strings deleted file mode 100644 index 760e85a..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/fr.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/goArrow.png b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/goArrow.png deleted file mode 100644 index f318a56..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/goArrow.png and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/it.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/it.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/it.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/it.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/it.lproj/Localizable.strings deleted file mode 100644 index 9e99cd1..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/it.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/ja.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/ja.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/ja.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/ja.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/ja.lproj/Localizable.strings deleted file mode 100644 index 8d8fd91..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/ja.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/nl.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/nl.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/nl.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/nl.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/nl.lproj/Localizable.strings deleted file mode 100644 index affe56e..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/nl.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/no.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/no.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/no.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/no.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/no.lproj/Localizable.strings deleted file mode 100644 index 8849c0b..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/no.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/sl.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/sl.lproj/InfoPlist.strings deleted file mode 100644 index a375f9d..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/sl.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/sl.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/sl.lproj/Localizable.strings deleted file mode 100644 index 3ad772d..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/sl.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/sv.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/sv.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/sv.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/sv.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/sv.lproj/Localizable.strings deleted file mode 100644 index ffcce74..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/sv.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/tr.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/tr.lproj/InfoPlist.strings deleted file mode 100644 index 3a0f347..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/tr.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/tr.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/tr.lproj/Localizable.strings deleted file mode 100644 index 05acb9b..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Resources/crash_report_sender.app/Contents/Resources/tr.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current new file mode 100644 index 0000000..f70f10e --- /dev/null +++ b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current @@ -0,0 +1 @@ +A diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Breakpad b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Breakpad deleted file mode 100644 index 5159262..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Breakpad and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Headers/Breakpad.h b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Headers/Breakpad.h deleted file mode 100644 index b9c3b78..0000000 --- a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Headers/Breakpad.h +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Framework to provide a simple C API to crash reporting for -// applications. By default, if any machine-level exception (e.g., -// EXC_BAD_ACCESS) occurs, it will be handled by the BreakpadRef -// object as follows: -// -// 1. Create a minidump file (see Breakpad for details) -// 2. Prompt the user (using CFUserNotification) -// 3. Invoke a command line reporting tool to send the minidump to a -// server -// -// By specifying parameters to the BreakpadCreate function, you can -// modify the default behavior to suit your needs and wants and -// desires. - -// A service name associated with the original bootstrap parent port, saved in -// OnDemandServer and restored in Inspector. -#define BREAKPAD_BOOTSTRAP_PARENT_PORT "com.Breakpad.BootstrapParent" - -typedef void *BreakpadRef; - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#include "BreakpadDefines.h" - -// Optional user-defined function to dec to decide if we should handle -// this crash or forward it along. -// Return true if you want Breakpad to handle it. -// Return false if you want Breakpad to skip it -// The exception handler always returns false, as if SEND_AND_EXIT were false -// (which means the next exception handler will take the exception) -typedef bool (*BreakpadFilterCallback)(int exception_type, - int exception_code, - mach_port_t crashing_thread, - void *context); - -// Create a new BreakpadRef object and install it as an exception -// handler. The |parameters| will typically be the contents of your -// bundle's Info.plist. -// -// You can also specify these additional keys for customizable behavior: -// Key: Value: -// BREAKPAD_PRODUCT Product name (e.g., "MyAwesomeProduct") -// This one is used as the key to identify -// the product when uploading. Falls back to -// CFBundleName if not specified. -// REQUIRED -// -// BREAKPAD_PRODUCT_DISPLAY This is the display name, e.g. a pretty -// name for the product when the crash_sender -// pops up UI for the user. Falls back first to -// CFBundleDisplayName and then to -// BREAKPAD_PRODUCT if not specified. -// -// BREAKPAD_VERSION Product version (e.g., 1.2.3), used -// as metadata for crash report. Falls back to -// CFBundleVersion if not specified. -// REQUIRED -// -// BREAKPAD_VENDOR Vendor name, used in UI (e.g. "A report has -// been created that you can send to ") -// -// BREAKPAD_URL URL destination for reporting -// REQUIRED -// -// BREAKPAD_REPORT_INTERVAL # of seconds between sending -// reports. If an additional report is -// generated within this time, it will -// be ignored. Default: 3600sec. -// Specify 0 to send all reports. -// -// BREAKPAD_SKIP_CONFIRM If true, the reporter will send the report -// without any user intervention. -// Defaults to NO -// -// BREAKPAD_CONFIRM_TIMEOUT Number of seconds before the upload -// confirmation dialog will be automatically -// dismissed (cancelling the upload). -// Default: 300 seconds (min of 60). -// Specify 0 to prevent timeout. -// -// BREAKPAD_SEND_AND_EXIT If true, the handler will exit after sending. -// This will prevent any other handler (e.g., -// CrashReporter) from getting the crash. -// Defaults TO YES -// -// BREAKPAD_DUMP_DIRECTORY The directory to store crash-dumps -// in. By default, we use -// ~/Library/Breakpad/ -// The path you specify here is tilde-expanded. -// -// BREAKPAD_INSPECTOR_LOCATION The full path to the Inspector executable. -// Defaults to /Inspector -// -// BREAKPAD_REPORTER_EXE_LOCATION The full path to the Reporter/sender -// executable. -// Default: -// /crash_report_sender.app -// -// BREAKPAD_LOGFILES Indicates an array of log file paths that -// should be uploaded at crash time. -// -// BREAKPAD_REQUEST_COMMENTS If true, the message dialog will have a -// text box for the user to enter comments. -// Default: NO -// -// BREAKPAD_REQUEST_EMAIL If true and BREAKPAD_REQUEST_COMMENTS is also -// true, the message dialog will have a text -// box for the user to enter their email address. -// Default: NO -// -// BREAKPAD_SERVER_TYPE A parameter that tells Breakpad how to -// rewrite the upload parameters for a specific -// server type. The currently valid values are -// 'socorro' or 'google'. If you want to add -// other types, see the function in -// crash_report_sender.m that maps parameters to -// URL parameters. Defaults to 'google'. -// -// BREAKPAD_SERVER_PARAMETER_DICT A plist dictionary of static -// parameters that are uploaded to the -// server. The parameters are sent as -// is to the crash server. Their -// content isn't added to the minidump -// but pass as URL parameters when -// uploading theminidump to the crash -// server. -//============================================================================= -// The BREAKPAD_PRODUCT, BREAKPAD_VERSION and BREAKPAD_URL are -// required to have non-NULL values. By default, the BREAKPAD_PRODUCT -// will be the CFBundleName and the BREAKPAD_VERSION will be the -// CFBundleVersion when these keys are present in the bundle's -// Info.plist, which is usually passed in to BreakpadCreate() as an -// NSDictionary (you could also pass in another dictionary that had -// the same keys configured). If the BREAKPAD_PRODUCT or -// BREAKPAD_VERSION are ultimately undefined, BreakpadCreate() will -// fail. You have been warned. -// -// If you are running in a debugger, Breakpad will not install, unless the -// BREAKPAD_IGNORE_DEBUGGER envionment variable is set and/or non-zero. -// -// The BREAKPAD_SKIP_CONFIRM and BREAKPAD_SEND_AND_EXIT default -// values are NO and YES. However, they can be controlled by setting their -// values in a user or global plist. -// -// It's easiest to use Breakpad via the Framework, but if you're compiling the -// code in directly, BREAKPAD_INSPECTOR_LOCATION and -// BREAKPAD_REPORTER_EXE_LOCATION allow you to specify custom paths -// to the helper executables. -// -//============================================================================= -// The following are NOT user-supplied but are documented here for -// completeness. They are calculated by Breakpad during initialization & -// crash-dump generation, or entered in by the user. -// -// BREAKPAD_PROCESS_START_TIME The time, in seconds since the Epoch, the -// process started -// -// BREAKPAD_PROCESS_CRASH_TIME The time, in seconds since the Epoch, the -// process crashed. -// -// BREAKPAD_PROCESS_UP_TIME The total time in milliseconds the process -// has been running. This parameter is not -// set until the crash-dump-generation phase. -// -// BREAKPAD_LOGFILE_KEY_PREFIX Used to find out which parameters in the -// parameter dictionary correspond to log -// file paths. -// -// BREAKPAD_SERVER_PARAMETER_PREFIX This prefix is used by Breakpad -// internally, because Breakpad uses -// the same dictionary internally to -// track both its internal -// configuration parameters and -// parameters meant to be uploaded -// to the server. This string is -// used internally by Breakpad to -// prefix user-supplied parameter -// names so those can be sent to the -// server without leaking Breakpad's -// internal values. -// -// BREAKPAD_ON_DEMAND Used internally to indicate to the -// Reporter that we're sending on-demand, -// not as result of a crash. -// -// BREAKPAD_COMMENTS The text the user provided as comments. -// Only used in crash_report_sender. - -// Returns a new BreakpadRef object on success, NULL otherwise. -BreakpadRef BreakpadCreate(NSDictionary *parameters); - -// Uninstall and release the data associated with |ref|. -void BreakpadRelease(BreakpadRef ref); - -// Clients may set an optional callback which gets called when a crash -// occurs. The callback function should return |true| if we should -// handle the crash, generate a crash report, etc. or |false| if we -// should ignore it and forward the crash (normally to CrashReporter). -// Context is a pointer to arbitrary data to make the callback with. -void BreakpadSetFilterCallback(BreakpadRef ref, - BreakpadFilterCallback callback, - void *context); - -// User defined key and value string storage. Generally this is used -// to configure Breakpad's internal operation, such as whether the -// crash_sender should prompt the user, or the filesystem location for -// the minidump file. See Breakpad.h for some parameters that can be -// set. Anything longer than 255 bytes will be truncated. Note that -// the string is converted to UTF8 before truncation, so any multibyte -// character that straddles the 255(256 - 1 for terminator) byte limit -// will be mangled. -// -// A maximum number of 64 key/value pairs are supported. An assert() -// will fire if more than this number are set. Unfortunately, right -// now, the same dictionary is used for both Breakpad's parameters AND -// the Upload parameters. -// -// TODO (nealsid): Investigate how necessary this is if we don't -// automatically upload parameters to the server anymore. -// TODO (nealsid): separate server parameter dictionary from the -// dictionary used to configure Breakpad, and document limits for each -// independently. -void BreakpadSetKeyValue(BreakpadRef ref, NSString *key, NSString *value); -NSString *BreakpadKeyValue(BreakpadRef ref, NSString *key); -void BreakpadRemoveKeyValue(BreakpadRef ref, NSString *key); - -// You can use this method to specify parameters that will be uploaded -// to the crash server. They will be automatically encoded as -// necessary. Note that as mentioned above there are limits on both -// the number of keys and their length. -void BreakpadAddUploadParameter(BreakpadRef ref, NSString *key, - NSString *value); - -// This method will remove a previously-added parameter from the -// upload parameter set. -void BreakpadRemoveUploadParameter(BreakpadRef ref, NSString *key); - -// Add a log file for Breakpad to read and send upon crash dump -void BreakpadAddLogFile(BreakpadRef ref, NSString *logPathname); - -// Generate a minidump and send -void BreakpadGenerateAndSendReport(BreakpadRef ref); - -void BreakpadSetComment( BreakpadRef ref, char const *pchComment ); - -#ifdef __cplusplus -} -#endif diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Headers/BreakpadDefines.h b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Headers/BreakpadDefines.h deleted file mode 100644 index 8986cd1..0000000 --- a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Headers/BreakpadDefines.h +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2011, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Keys for configuration file -#define kReporterMinidumpDirectoryKey "MinidumpDir" -#define kReporterMinidumpIDKey "MinidumpID" - -// Filename for recording uploaded IDs -#define kReporterLogFilename "uploads.log" - -// The default subdirectory of the Library to put crash dumps in -// The subdirectory is -// ~/Library// -#define kDefaultLibrarySubdirectory "Breakpad" - -// Specify some special keys to be used in the configuration file that is -// generated by Breakpad and consumed by the crash_sender. -#define BREAKPAD_PRODUCT "BreakpadProduct" -#define BREAKPAD_PRODUCT_DISPLAY "BreakpadProductDisplay" -#define BREAKPAD_VERSION "BreakpadVersion" -#define BREAKPAD_VENDOR "BreakpadVendor" -#define BREAKPAD_URL "BreakpadURL" -#define BREAKPAD_REPORT_INTERVAL "BreakpadReportInterval" -#define BREAKPAD_SKIP_CONFIRM "BreakpadSkipConfirm" -#define BREAKPAD_CONFIRM_TIMEOUT "BreakpadConfirmTimeout" -#define BREAKPAD_SEND_AND_EXIT "BreakpadSendAndExit" -#define BREAKPAD_DUMP_DIRECTORY "BreakpadMinidumpLocation" -#define BREAKPAD_INSPECTOR_LOCATION "BreakpadInspectorLocation" -#define BREAKPAD_REPORTER_EXE_LOCATION \ - "BreakpadReporterExeLocation" -#define BREAKPAD_LOGFILES "BreakpadLogFiles" -#define BREAKPAD_LOGFILE_UPLOAD_SIZE "BreakpadLogFileTailSize" -#define BREAKPAD_REQUEST_COMMENTS "BreakpadRequestComments" -#define BREAKPAD_COMMENTS "BreakpadComments" -#define BREAKPAD_REQUEST_EMAIL "BreakpadRequestEmail" -#define BREAKPAD_EMAIL "BreakpadEmail" -#define BREAKPAD_SERVER_TYPE "BreakpadServerType" -#define BREAKPAD_SERVER_PARAMETER_DICT "BreakpadServerParameters" - -// The keys below are NOT user supplied, and are used internally. -#define BREAKPAD_PROCESS_START_TIME "BreakpadProcStartTime" -#define BREAKPAD_PROCESS_UP_TIME "BreakpadProcessUpTime" -#define BREAKPAD_PROCESS_CRASH_TIME "BreakpadProcessCrashTime" -#define BREAKPAD_LOGFILE_KEY_PREFIX "BreakpadAppLogFile" -#define BREAKPAD_SERVER_PARAMETER_PREFIX "BreakpadServerParameterPrefix_" -#define BREAKPAD_ON_DEMAND "BreakpadOnDemand" diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/Info.plist b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/Info.plist deleted file mode 100644 index 1113206..0000000 --- a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - BuildMachineOSBuild - 11G63 - CFBundleDevelopmentRegion - English - CFBundleExecutable - Breakpad - CFBundleIdentifier - com.googlecode.google-breakpad - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Breakpad - CFBundlePackageType - FMWK - CFBundleSignature - ???? - CFBundleVersion - 1.0 - DTCompiler - com.apple.compilers.llvm.clang.1_0.compiler - DTPlatformBuild - 4E3002 - DTPlatformVersion - GM - DTSDKBuild - 10K549 - DTSDKName - macosx10.6 - DTXcode - 0433 - DTXcodeBuild - 4E3002 - - diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/Inspector b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/Inspector deleted file mode 100644 index e4d6ca5..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/Inspector and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/breakpadUtilities.dylib b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/breakpadUtilities.dylib deleted file mode 100644 index ba6037a..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/breakpadUtilities.dylib and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Info.plist b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Info.plist deleted file mode 100644 index f802b01..0000000 --- a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Info.plist +++ /dev/null @@ -1,48 +0,0 @@ - - - - - BuildMachineOSBuild - 11G63 - CFBundleDevelopmentRegion - English - CFBundleDisplayName - crash_report_sender - CFBundleExecutable - crash_report_sender - CFBundleIconFile - crash_report_sender - CFBundleIdentifier - com.Breakpad.crash_report_sender - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - crash_report_sender - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - DTCompiler - com.apple.compilers.llvm.clang.1_0.compiler - DTPlatformBuild - 4E3002 - DTPlatformVersion - GM - DTSDKBuild - 10K549 - DTSDKName - macosx10.6 - DTXcode - 0433 - DTXcodeBuild - 4E3002 - LSHasLocalizedDisplayName - - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/MacOS/crash_report_sender b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/MacOS/crash_report_sender deleted file mode 100644 index 14abcbf..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/MacOS/crash_report_sender and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/PkgInfo b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/PkgInfo deleted file mode 100644 index bd04210..0000000 --- a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPL???? \ No newline at end of file diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/Breakpad.nib b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/Breakpad.nib deleted file mode 100644 index 432a001..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/Breakpad.nib and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/English.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/English.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings deleted file mode 100644 index b731522..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/crash_report_sender.icns b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/crash_report_sender.icns deleted file mode 100644 index e8c2124..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/crash_report_sender.icns and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/da.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/da.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/da.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/da.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/da.lproj/Localizable.strings deleted file mode 100644 index 59b0fae..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/da.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/de.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/de.lproj/InfoPlist.strings deleted file mode 100644 index e30f049..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/de.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/de.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/de.lproj/Localizable.strings deleted file mode 100644 index 4fb2a0a..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/de.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/es.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/es.lproj/InfoPlist.strings deleted file mode 100644 index 2ddf311..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/es.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/es.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/es.lproj/Localizable.strings deleted file mode 100644 index ee3c368..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/es.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/fr.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/fr.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/fr.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/fr.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/fr.lproj/Localizable.strings deleted file mode 100644 index 760e85a..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/fr.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/goArrow.png b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/goArrow.png deleted file mode 100644 index f318a56..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/goArrow.png and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/it.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/it.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/it.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/it.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/it.lproj/Localizable.strings deleted file mode 100644 index 9e99cd1..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/it.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/ja.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/ja.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/ja.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/ja.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/ja.lproj/Localizable.strings deleted file mode 100644 index 8d8fd91..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/ja.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/nl.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/nl.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/nl.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/nl.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/nl.lproj/Localizable.strings deleted file mode 100644 index affe56e..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/nl.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/no.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/no.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/no.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/no.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/no.lproj/Localizable.strings deleted file mode 100644 index 8849c0b..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/no.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/sl.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/sl.lproj/InfoPlist.strings deleted file mode 100644 index a375f9d..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/sl.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/sl.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/sl.lproj/Localizable.strings deleted file mode 100644 index 3ad772d..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/sl.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/sv.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/sv.lproj/InfoPlist.strings deleted file mode 100644 index ae230ab..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/sv.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/sv.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/sv.lproj/Localizable.strings deleted file mode 100644 index ffcce74..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/sv.lproj/Localizable.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/tr.lproj/InfoPlist.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/tr.lproj/InfoPlist.strings deleted file mode 100644 index 3a0f347..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/tr.lproj/InfoPlist.strings and /dev/null differ diff --git a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/tr.lproj/Localizable.strings b/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/tr.lproj/Localizable.strings deleted file mode 100644 index 05acb9b..0000000 Binary files a/tools/ContentBuilder/builder_osx/frameworks/Breakpad.framework/Versions/Current/Resources/crash_report_sender.app/Contents/Resources/tr.lproj/Localizable.strings and /dev/null differ diff --git a/tools/SteamPipeGUI.zip b/tools/SteamPipeGUI.zip index 5aa971e..3bbbd2c 100644 Binary files a/tools/SteamPipeGUI.zip and b/tools/SteamPipeGUI.zip differ diff --git a/tools/drm/drmtool.exe b/tools/drm/drmtool.exe index d917a2b..38eaead 100644 Binary files a/tools/drm/drmtool.exe and b/tools/drm/drmtool.exe differ diff --git a/tools/drm/drmtoolp.exe b/tools/drm/drmtoolp.exe index 0df13c6..c93b1ea 100644 Binary files a/tools/drm/drmtoolp.exe and b/tools/drm/drmtoolp.exe differ diff --git a/tools/drm/ubuntu12_32/drmtoolp b/tools/drm/ubuntu12_32/drmtoolp index ba2f97f..21c5771 100644 Binary files a/tools/drm/ubuntu12_32/drmtoolp and b/tools/drm/ubuntu12_32/drmtoolp differ diff --git a/tools/drm/ubuntu12_32/steamdrmp.so b/tools/drm/ubuntu12_32/steamdrmp.so index 49ff861..fdc91ec 100644 Binary files a/tools/drm/ubuntu12_32/steamdrmp.so and b/tools/drm/ubuntu12_32/steamdrmp.so differ diff --git a/tools/drm/ubuntu12_64/drmtoolp b/tools/drm/ubuntu12_64/drmtoolp index 42d3075..75a41db 100644 Binary files a/tools/drm/ubuntu12_64/drmtoolp and b/tools/drm/ubuntu12_64/drmtoolp differ diff --git a/tools/drm/ubuntu12_64/steamdrmp.so b/tools/drm/ubuntu12_64/steamdrmp.so index dcdbcb8..4eca84d 100644 Binary files a/tools/drm/ubuntu12_64/steamdrmp.so and b/tools/drm/ubuntu12_64/steamdrmp.so differ diff --git a/tools/goldmaster/disk_assets/SteamSetup.exe b/tools/goldmaster/disk_assets/SteamSetup.exe index 74c1922..a2280bb 100644 Binary files a/tools/goldmaster/disk_assets/SteamSetup.exe and b/tools/goldmaster/disk_assets/SteamSetup.exe differ