Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: interface to streaming launcher functions in Steam
  4. //
  5. //=============================================================================
  6. #ifndef ISTEAMSTREAMLAUNCHER_H
  7. #define ISTEAMSTREAMLAUNCHER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "isteamclient.h"
  12. enum EStreamLauncherResult
  13. {
  14. k_EStreamLaunchResultSuccess = 0,
  15. k_EStreamLaunchResultFailure = 1, // Unknown streaming launch failure
  16. k_EStreamLaunchResultAlreadyStreaming = 2, // The UI is already streaming to a different application
  17. k_EStreamLaunchResultInvalidLauncher = 3, // The streaming launcher doesn't exist, or failed signature check
  18. k_EStreamLaunchResultNotReady = 4, // The UI isn't ready to go into streaming mode (Desktop UI login?)
  19. };
  20. //-----------------------------------------------------------------------------
  21. // Purpose: interface to streaming launcher functions in Steam
  22. //-----------------------------------------------------------------------------
  23. class ISteamStreamLauncher
  24. {
  25. public:
  26. // Switch Steam to Big Picture mode and optionally set a launcher to run all games
  27. virtual EStreamLauncherResult StartStreaming( const char *pchLauncher = NULL ) = 0;
  28. // Switch Steam back to the original mode and clear the launcher
  29. virtual void StopStreaming() = 0;
  30. };
  31. #define STEAMSTREAMLAUNCHER_INTERFACE_VERSION "SteamStreamLauncher001"
  32. // callbacks
  33. #if defined( VALVE_CALLBACK_PACK_SMALL )
  34. #pragma pack( push, 4 )
  35. #elif defined( VALVE_CALLBACK_PACK_LARGE )
  36. #pragma pack( push, 8 )
  37. #else
  38. #error isteamclient.h must be included
  39. #endif
  40. //-----------------------------------------------------------------------------
  41. // The big picture window is visible and ready for streaming
  42. //-----------------------------------------------------------------------------
  43. struct BigPictureStreamingResult_t
  44. {
  45. enum { k_iCallback = k_iSteamStreamLauncherCallbacks + 1 };
  46. bool m_bSuccess;
  47. void *m_hwnd;
  48. };
  49. //-----------------------------------------------------------------------------
  50. // The user requested that the application stop streaming
  51. //-----------------------------------------------------------------------------
  52. struct StopStreamingRequest_t
  53. {
  54. enum { k_iCallback = k_iSteamStreamLauncherCallbacks + 2 };
  55. };
  56. //-----------------------------------------------------------------------------
  57. // The big picture window is closed and no longer ready for streaming
  58. //-----------------------------------------------------------------------------
  59. struct BigPictureStreamingDone_t
  60. {
  61. enum { k_iCallback = k_iSteamStreamLauncherCallbacks + 3 };
  62. };
  63. //-----------------------------------------------------------------------------
  64. // Steam is about to restart, continue streaming when it is available again
  65. //-----------------------------------------------------------------------------
  66. struct BigPictureStreamRestarting_t
  67. {
  68. enum { k_iCallback = k_iSteamStreamLauncherCallbacks + 4 };
  69. };
  70. #pragma pack( pop )
  71. #endif // ISTEAMSTREAMLAUNCHER_H