aboutsummaryrefslogtreecommitdiff
path: root/mp/src/public/steam/isteamhtmlsurface.h
diff options
context:
space:
mode:
Diffstat (limited to 'mp/src/public/steam/isteamhtmlsurface.h')
-rw-r--r--mp/src/public/steam/isteamhtmlsurface.h72
1 files changed, 20 insertions, 52 deletions
diff --git a/mp/src/public/steam/isteamhtmlsurface.h b/mp/src/public/steam/isteamhtmlsurface.h
index 80216fc9..c257164a 100644
--- a/mp/src/public/steam/isteamhtmlsurface.h
+++ b/mp/src/public/steam/isteamhtmlsurface.h
@@ -13,7 +13,7 @@
#include "isteamclient.h"
typedef uint32 HHTMLBrowser;
-const uint32 INVALID_HTTMLBROWSER = 0;
+const uint32 INVALID_HTMLBROWSER = 0;
//-----------------------------------------------------------------------------
// Purpose: Functions for displaying HTML pages and interacting with them
@@ -123,10 +123,10 @@ public:
enum EHTMLKeyModifiers
{
- eHTMLKeyModifier_None = 0,
- eHTMLKeyModifier_AltDown = 1 << 0,
- eHTMLKeyModifier_CrtlDown = 1 << 1,
- eHTMLKeyModifier_ShiftDown = 1 << 2,
+ k_eHTMLKeyModifier_None = 0,
+ k_eHTMLKeyModifier_AltDown = 1 << 0,
+ k_eHTMLKeyModifier_CtrlDown = 1 << 1,
+ k_eHTMLKeyModifier_ShiftDown = 1 << 2,
};
// keyboard interactions, native keycode is the virtual key code value from your OS
@@ -160,9 +160,15 @@ public:
// set a webcookie for the hostname in question
virtual void SetCookie( const char *pchHostname, const char *pchKey, const char *pchValue, const char *pchPath = "/", RTime32 nExpires = 0, bool bSecure = false, bool bHTTPOnly = false ) = 0;
- // Zoom the current page by flZoom ( from 0.0 to 4.0, so to zoom to 120% use 1.2 ), zooming around point X,Y in the page (use 0,0 if you don't care)
+ // Zoom the current page by flZoom ( from 0.0 to 2.0, so to zoom to 120% use 1.2 ), zooming around point X,Y in the page (use 0,0 if you don't care)
virtual void SetPageScaleFactor( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY ) = 0;
+ // Enable/disable low-resource background mode, where javascript and repaint timers are throttled, resources are
+ // more aggressively purged from memory, and audio/video elements are paused. When background mode is enabled,
+ // all HTML5 video and audio objects will execute ".pause()" and gain the property "._steam_background_paused = 1".
+ // When background mode is disabled, any video or audio objects with that property will resume with ".play()".
+ virtual void SetBackgroundMode( HHTMLBrowser unBrowserHandle, bool bBackgroundMode ) = 0;
+
// CALLBACKS
//
// These set of functions are used as responses to callback requests
@@ -182,7 +188,7 @@ public:
virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0;
};
-#define STEAMHTMLSURFACE_INTERFACE_VERSION "STEAMHTMLSURFACE_INTERFACE_VERSION_002"
+#define STEAMHTMLSURFACE_INTERFACE_VERSION "STEAMHTMLSURFACE_INTERFACE_VERSION_003"
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
@@ -334,8 +340,8 @@ END_DEFINE_CALLBACK_6()
//-----------------------------------------------------------------------------
DEFINE_CALLBACK( HTML_LinkAtPosition_t, k_iSteamHTMLSurfaceCallbacks + 13 )
CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
-CALLBACK_MEMBER( 1, uint32, x ) //
-CALLBACK_MEMBER( 2, uint32, y ) //
+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 ) //
@@ -364,8 +370,8 @@ END_DEFINE_CALLBACK_2()
//-----------------------------------------------------------------------------
-// Purpose: show a Javascript confirmation dialog, call JSDialogResponse
-// when the user dismisses this dialog (or right away to ignore it)
+// 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
@@ -375,55 +381,17 @@ END_DEFINE_CALLBACK_3()
//-----------------------------------------------------------------------------
-// Purpose: a popup item (i.e combo box) on the page needs rendering
-//-----------------------------------------------------------------------------
-DEFINE_CALLBACK( HTML_ComboNeedsPaint_t, k_iSteamHTMLSurfaceCallbacks + 17 )
-CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
-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
-END_DEFINE_CALLBACK_4()
-
-
-//-----------------------------------------------------------------------------
-// Purpose: a popup (i.e combo box) wants to display
-//-----------------------------------------------------------------------------
-DEFINE_CALLBACK( HTML_ShowPopup_t, k_iSteamHTMLSurfaceCallbacks + 18 )
-CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
-END_DEFINE_CALLBACK_1()
-
-
-//-----------------------------------------------------------------------------
-// Purpose: a popup (i.e combo box) wants to hide
-//-----------------------------------------------------------------------------
-DEFINE_CALLBACK( HTML_HidePopup_t, k_iSteamHTMLSurfaceCallbacks + 19 )
-CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
-END_DEFINE_CALLBACK_1()
-
-
-//-----------------------------------------------------------------------------
-// Purpose: a popup (i.e combo box) wants to hide
-//-----------------------------------------------------------------------------
-DEFINE_CALLBACK( HTML_SizePopup_t, k_iSteamHTMLSurfaceCallbacks + 20 )
-CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
-CALLBACK_MEMBER( 1, uint32, unX ) // the x pos into the page to display the popup
-CALLBACK_MEMBER( 2, uint32, unY ) // the y pos into the page to display the popup
-CALLBACK_MEMBER( 3, uint32, unWide ) // the total width of the pBGRA texture
-CALLBACK_MEMBER( 4, uint32, unTall ) // the total height of the pBGRA texture
-END_DEFINE_CALLBACK_5()
-
-
-//-----------------------------------------------------------------------------
// Purpose: a new html window has been created
//-----------------------------------------------------------------------------
DEFINE_CALLBACK( HTML_NewWindow_t, k_iSteamHTMLSurfaceCallbacks + 21 )
-CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
+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
-END_DEFINE_CALLBACK_6()
+CALLBACK_MEMBER( 6, HHTMLBrowser, unNewWindow_BrowserHandle ) // the handle of the new window surface
+END_DEFINE_CALLBACK_7()
//-----------------------------------------------------------------------------