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.

444 lines
21 KiB

  1. //====== Copyright 1996-2013, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: interface to display html pages in a texture
  4. //
  5. //=============================================================================
  6. #ifndef ISTEAMHTMLSURFACE_H
  7. #define ISTEAMHTMLSURFACE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "isteamclient.h"
  12. typedef uint32 HHTMLBrowser;
  13. const uint32 INVALID_HTMLBROWSER = 0;
  14. //-----------------------------------------------------------------------------
  15. // Purpose: Functions for displaying HTML pages and interacting with them
  16. //-----------------------------------------------------------------------------
  17. class ISteamHTMLSurface
  18. {
  19. public:
  20. virtual ~ISteamHTMLSurface() {}
  21. // Must call init and shutdown when starting/ending use of the interface
  22. virtual bool Init() = 0;
  23. virtual bool Shutdown() = 0;
  24. // Create a browser object for display of a html page, when creation is complete the call handle
  25. // will return a HTML_BrowserReady_t callback for the HHTMLBrowser of your new browser.
  26. // The user agent string is a substring to be added to the general user agent string so you can
  27. // identify your client on web servers.
  28. // The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if
  29. // you do not require this functionality.
  30. virtual SteamAPICall_t CreateBrowser( const char *pchUserAgent, const char *pchUserCSS ) = 0;
  31. // Call this when you are done with a html surface, this lets us free the resources being used by it
  32. virtual void RemoveBrowser( HHTMLBrowser unBrowserHandle ) = 0;
  33. // Navigate to this URL, results in a HTML_StartRequest_t as the request commences
  34. virtual void LoadURL( HHTMLBrowser unBrowserHandle, const char *pchURL, const char *pchPostData ) = 0;
  35. // Tells the surface the size in pixels to display the surface
  36. virtual void SetSize( HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight ) = 0;
  37. // Stop the load of the current html page
  38. virtual void StopLoad( HHTMLBrowser unBrowserHandle ) = 0;
  39. // Reload (most likely from local cache) the current page
  40. virtual void Reload( HHTMLBrowser unBrowserHandle ) = 0;
  41. // navigate back in the page history
  42. virtual void GoBack( HHTMLBrowser unBrowserHandle ) = 0;
  43. // navigate forward in the page history
  44. virtual void GoForward( HHTMLBrowser unBrowserHandle ) = 0;
  45. // add this header to any url requests from this browser
  46. virtual void AddHeader( HHTMLBrowser unBrowserHandle, const char *pchKey, const char *pchValue ) = 0;
  47. // run this javascript script in the currently loaded page
  48. virtual void ExecuteJavascript( HHTMLBrowser unBrowserHandle, const char *pchScript ) = 0;
  49. enum EHTMLMouseButton
  50. {
  51. eHTMLMouseButton_Left = 0,
  52. eHTMLMouseButton_Right = 1,
  53. eHTMLMouseButton_Middle = 2,
  54. };
  55. // Mouse click and mouse movement commands
  56. virtual void MouseUp( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0;
  57. virtual void MouseDown( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0;
  58. virtual void MouseDoubleClick( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0;
  59. // x and y are relative to the HTML bounds
  60. virtual void MouseMove( HHTMLBrowser unBrowserHandle, int x, int y ) = 0;
  61. // nDelta is pixels of scroll
  62. virtual void MouseWheel( HHTMLBrowser unBrowserHandle, int32 nDelta ) = 0;
  63. enum EMouseCursor
  64. {
  65. dc_user = 0,
  66. dc_none,
  67. dc_arrow,
  68. dc_ibeam,
  69. dc_hourglass,
  70. dc_waitarrow,
  71. dc_crosshair,
  72. dc_up,
  73. dc_sizenw,
  74. dc_sizese,
  75. dc_sizene,
  76. dc_sizesw,
  77. dc_sizew,
  78. dc_sizee,
  79. dc_sizen,
  80. dc_sizes,
  81. dc_sizewe,
  82. dc_sizens,
  83. dc_sizeall,
  84. dc_no,
  85. dc_hand,
  86. dc_blank, // don't show any custom cursor, just use your default
  87. dc_middle_pan,
  88. dc_north_pan,
  89. dc_north_east_pan,
  90. dc_east_pan,
  91. dc_south_east_pan,
  92. dc_south_pan,
  93. dc_south_west_pan,
  94. dc_west_pan,
  95. dc_north_west_pan,
  96. dc_alias,
  97. dc_cell,
  98. dc_colresize,
  99. dc_copycur,
  100. dc_verticaltext,
  101. dc_rowresize,
  102. dc_zoomin,
  103. dc_zoomout,
  104. dc_help,
  105. dc_custom,
  106. dc_last, // custom cursors start from this value and up
  107. };
  108. enum EHTMLKeyModifiers
  109. {
  110. k_eHTMLKeyModifier_None = 0,
  111. k_eHTMLKeyModifier_AltDown = 1 << 0,
  112. k_eHTMLKeyModifier_CtrlDown = 1 << 1,
  113. k_eHTMLKeyModifier_ShiftDown = 1 << 2,
  114. };
  115. // keyboard interactions, native keycode is the virtual key code value from your OS
  116. virtual void KeyDown( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0;
  117. virtual void KeyUp( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0;
  118. // cUnicodeChar is the unicode character point for this keypress (and potentially multiple chars per press)
  119. virtual void KeyChar( HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0;
  120. // programmatically scroll this many pixels on the page
  121. virtual void SetHorizontalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll ) = 0;
  122. virtual void SetVerticalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll ) = 0;
  123. // tell the html control if it has key focus currently, controls showing the I-beam cursor in text controls amongst other things
  124. virtual void SetKeyFocus( HHTMLBrowser unBrowserHandle, bool bHasKeyFocus ) = 0;
  125. // open the current pages html code in the local editor of choice, used for debugging
  126. virtual void ViewSource( HHTMLBrowser unBrowserHandle ) = 0;
  127. // copy the currently selected text on the html page to the local clipboard
  128. virtual void CopyToClipboard( HHTMLBrowser unBrowserHandle ) = 0;
  129. // paste from the local clipboard to the current html page
  130. virtual void PasteFromClipboard( HHTMLBrowser unBrowserHandle ) = 0;
  131. // find this string in the browser, if bCurrentlyInFind is true then instead cycle to the next matching element
  132. virtual void Find( HHTMLBrowser unBrowserHandle, const char *pchSearchStr, bool bCurrentlyInFind, bool bReverse ) = 0;
  133. // cancel a currently running find
  134. virtual void StopFind( HHTMLBrowser unBrowserHandle ) = 0;
  135. // return details about the link at position x,y on the current page
  136. virtual void GetLinkAtPosition( HHTMLBrowser unBrowserHandle, int x, int y ) = 0;
  137. // set a webcookie for the hostname in question
  138. 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;
  139. // 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)
  140. virtual void SetPageScaleFactor( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY ) = 0;
  141. // Enable/disable low-resource background mode, where javascript and repaint timers are throttled, resources are
  142. // more aggressively purged from memory, and audio/video elements are paused. When background mode is enabled,
  143. // all HTML5 video and audio objects will execute ".pause()" and gain the property "._steam_background_paused = 1".
  144. // When background mode is disabled, any video or audio objects with that property will resume with ".play()".
  145. virtual void SetBackgroundMode( HHTMLBrowser unBrowserHandle, bool bBackgroundMode ) = 0;
  146. // CALLBACKS
  147. //
  148. // These set of functions are used as responses to callback requests
  149. //
  150. // You MUST call this in response to a HTML_StartRequest_t callback
  151. // Set bAllowed to true to allow this navigation, false to cancel it and stay
  152. // on the current page. You can use this feature to limit the valid pages
  153. // allowed in your HTML surface.
  154. virtual void AllowStartRequest( HHTMLBrowser unBrowserHandle, bool bAllowed ) = 0;
  155. // You MUST call this in response to a HTML_JSAlert_t or HTML_JSConfirm_t callback
  156. // Set bResult to true for the OK option of a confirm, use false otherwise
  157. virtual void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult ) = 0;
  158. // You MUST call this in response to a HTML_FileOpenDialog_t callback
  159. virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0;
  160. };
  161. #define STEAMHTMLSURFACE_INTERFACE_VERSION "STEAMHTMLSURFACE_INTERFACE_VERSION_003"
  162. // callbacks
  163. #if defined( VALVE_CALLBACK_PACK_SMALL )
  164. #pragma pack( push, 4 )
  165. #elif defined( VALVE_CALLBACK_PACK_LARGE )
  166. #pragma pack( push, 8 )
  167. #else
  168. #error isteamclient.h must be included
  169. #endif
  170. //-----------------------------------------------------------------------------
  171. // Purpose: The browser is ready for use
  172. //-----------------------------------------------------------------------------
  173. DEFINE_CALLBACK( HTML_BrowserReady_t, k_iSteamHTMLSurfaceCallbacks + 1 )
  174. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this browser is now fully created and ready to navigate to pages
  175. END_DEFINE_CALLBACK_1()
  176. //-----------------------------------------------------------------------------
  177. // Purpose: the browser has a pending paint
  178. //-----------------------------------------------------------------------------
  179. DEFINE_CALLBACK(HTML_NeedsPaint_t, k_iSteamHTMLSurfaceCallbacks + 2)
  180. CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the browser that needs the paint
  181. CALLBACK_MEMBER(1, const char *, pBGRA ) // a pointer to the B8G8R8A8 data for this surface, valid until SteamAPI_RunCallbacks is next called
  182. CALLBACK_MEMBER(2, uint32, unWide) // the total width of the pBGRA texture
  183. CALLBACK_MEMBER(3, uint32, unTall) // the total height of the pBGRA texture
  184. CALLBACK_MEMBER(4, uint32, unUpdateX) // the offset in X for the damage rect for this update
  185. CALLBACK_MEMBER(5, uint32, unUpdateY) // the offset in Y for the damage rect for this update
  186. CALLBACK_MEMBER(6, uint32, unUpdateWide) // the width of the damage rect for this update
  187. CALLBACK_MEMBER(7, uint32, unUpdateTall) // the height of the damage rect for this update
  188. CALLBACK_MEMBER(8, uint32, unScrollX) // the page scroll the browser was at when this texture was rendered
  189. CALLBACK_MEMBER(9, uint32, unScrollY) // the page scroll the browser was at when this texture was rendered
  190. CALLBACK_MEMBER(10, float, flPageScale) // the page scale factor on this page when rendered
  191. CALLBACK_MEMBER(11, uint32, unPageSerial) // incremented on each new page load, you can use this to reject draws while navigating to new pages
  192. END_DEFINE_CALLBACK_12()
  193. //-----------------------------------------------------------------------------
  194. // Purpose: The browser wanted to navigate to a new page
  195. // NOTE - you MUST call AllowStartRequest in response to this callback
  196. //-----------------------------------------------------------------------------
  197. DEFINE_CALLBACK(HTML_StartRequest_t, k_iSteamHTMLSurfaceCallbacks + 3)
  198. CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface navigating
  199. CALLBACK_MEMBER(1, const char *, pchURL) // the url they wish to navigate to
  200. CALLBACK_MEMBER(2, const char *, pchTarget) // the html link target type (i.e _blank, _self, _parent, _top )
  201. CALLBACK_MEMBER(3, const char *, pchPostData ) // any posted data for the request
  202. CALLBACK_MEMBER(4, bool, bIsRedirect) // true if this was a http/html redirect from the last load request
  203. END_DEFINE_CALLBACK_5()
  204. //-----------------------------------------------------------------------------
  205. // Purpose: The browser has been requested to close due to user interaction (usually from a javascript window.close() call)
  206. //-----------------------------------------------------------------------------
  207. DEFINE_CALLBACK(HTML_CloseBrowser_t, k_iSteamHTMLSurfaceCallbacks + 4)
  208. CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface
  209. END_DEFINE_CALLBACK_1()
  210. //-----------------------------------------------------------------------------
  211. // Purpose: the browser is navigating to a new url
  212. //-----------------------------------------------------------------------------
  213. DEFINE_CALLBACK( HTML_URLChanged_t, k_iSteamHTMLSurfaceCallbacks + 5 )
  214. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface navigating
  215. CALLBACK_MEMBER( 1, const char *, pchURL ) // the url they wish to navigate to
  216. CALLBACK_MEMBER( 2, const char *, pchPostData ) // any posted data for the request
  217. CALLBACK_MEMBER( 3, bool, bIsRedirect ) // true if this was a http/html redirect from the last load request
  218. CALLBACK_MEMBER( 4, const char *, pchPageTitle ) // the title of the page
  219. CALLBACK_MEMBER( 5, bool, bNewNavigation ) // true if this was from a fresh tab and not a click on an existing page
  220. END_DEFINE_CALLBACK_6()
  221. //-----------------------------------------------------------------------------
  222. // Purpose: A page is finished loading
  223. //-----------------------------------------------------------------------------
  224. DEFINE_CALLBACK( HTML_FinishedRequest_t, k_iSteamHTMLSurfaceCallbacks + 6 )
  225. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  226. CALLBACK_MEMBER( 1, const char *, pchURL ) //
  227. CALLBACK_MEMBER( 2, const char *, pchPageTitle ) //
  228. END_DEFINE_CALLBACK_3()
  229. //-----------------------------------------------------------------------------
  230. // Purpose: a request to load this url in a new tab
  231. //-----------------------------------------------------------------------------
  232. DEFINE_CALLBACK( HTML_OpenLinkInNewTab_t, k_iSteamHTMLSurfaceCallbacks + 7 )
  233. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  234. CALLBACK_MEMBER( 1, const char *, pchURL ) //
  235. END_DEFINE_CALLBACK_2()
  236. //-----------------------------------------------------------------------------
  237. // Purpose: the page has a new title now
  238. //-----------------------------------------------------------------------------
  239. DEFINE_CALLBACK( HTML_ChangedTitle_t, k_iSteamHTMLSurfaceCallbacks + 8 )
  240. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  241. CALLBACK_MEMBER( 1, const char *, pchTitle ) //
  242. END_DEFINE_CALLBACK_2()
  243. //-----------------------------------------------------------------------------
  244. // Purpose: results from a search
  245. //-----------------------------------------------------------------------------
  246. DEFINE_CALLBACK( HTML_SearchResults_t, k_iSteamHTMLSurfaceCallbacks + 9 )
  247. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  248. CALLBACK_MEMBER( 1, uint32, unResults ) //
  249. CALLBACK_MEMBER( 2, uint32, unCurrentMatch ) //
  250. END_DEFINE_CALLBACK_3()
  251. //-----------------------------------------------------------------------------
  252. // Purpose: page history status changed on the ability to go backwards and forward
  253. //-----------------------------------------------------------------------------
  254. DEFINE_CALLBACK( HTML_CanGoBackAndForward_t, k_iSteamHTMLSurfaceCallbacks + 10 )
  255. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  256. CALLBACK_MEMBER( 1, bool, bCanGoBack ) //
  257. CALLBACK_MEMBER( 2, bool, bCanGoForward ) //
  258. END_DEFINE_CALLBACK_3()
  259. //-----------------------------------------------------------------------------
  260. // Purpose: details on the visibility and size of the horizontal scrollbar
  261. //-----------------------------------------------------------------------------
  262. DEFINE_CALLBACK( HTML_HorizontalScroll_t, k_iSteamHTMLSurfaceCallbacks + 11 )
  263. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  264. CALLBACK_MEMBER( 1, uint32, unScrollMax ) //
  265. CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) //
  266. CALLBACK_MEMBER( 3, float, flPageScale ) //
  267. CALLBACK_MEMBER( 4, bool , bVisible ) //
  268. CALLBACK_MEMBER( 5, uint32, unPageSize ) //
  269. END_DEFINE_CALLBACK_6()
  270. //-----------------------------------------------------------------------------
  271. // Purpose: details on the visibility and size of the vertical scrollbar
  272. //-----------------------------------------------------------------------------
  273. DEFINE_CALLBACK( HTML_VerticalScroll_t, k_iSteamHTMLSurfaceCallbacks + 12 )
  274. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  275. CALLBACK_MEMBER( 1, uint32, unScrollMax ) //
  276. CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) //
  277. CALLBACK_MEMBER( 3, float, flPageScale ) //
  278. CALLBACK_MEMBER( 4, bool, bVisible ) //
  279. CALLBACK_MEMBER( 5, uint32, unPageSize ) //
  280. END_DEFINE_CALLBACK_6()
  281. //-----------------------------------------------------------------------------
  282. // Purpose: response to GetLinkAtPosition call
  283. //-----------------------------------------------------------------------------
  284. DEFINE_CALLBACK( HTML_LinkAtPosition_t, k_iSteamHTMLSurfaceCallbacks + 13 )
  285. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  286. CALLBACK_MEMBER( 1, uint32, x ) // NOTE - Not currently set
  287. CALLBACK_MEMBER( 2, uint32, y ) // NOTE - Not currently set
  288. CALLBACK_MEMBER( 3, const char *, pchURL ) //
  289. CALLBACK_MEMBER( 4, bool, bInput ) //
  290. CALLBACK_MEMBER( 5, bool, bLiveLink ) //
  291. END_DEFINE_CALLBACK_6()
  292. //-----------------------------------------------------------------------------
  293. // Purpose: show a Javascript alert dialog, call JSDialogResponse
  294. // when the user dismisses this dialog (or right away to ignore it)
  295. //-----------------------------------------------------------------------------
  296. DEFINE_CALLBACK( HTML_JSAlert_t, k_iSteamHTMLSurfaceCallbacks + 14 )
  297. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  298. CALLBACK_MEMBER( 1, const char *, pchMessage ) //
  299. END_DEFINE_CALLBACK_2()
  300. //-----------------------------------------------------------------------------
  301. // Purpose: show a Javascript confirmation dialog, call JSDialogResponse
  302. // when the user dismisses this dialog (or right away to ignore it)
  303. //-----------------------------------------------------------------------------
  304. DEFINE_CALLBACK( HTML_JSConfirm_t, k_iSteamHTMLSurfaceCallbacks + 15 )
  305. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  306. CALLBACK_MEMBER( 1, const char *, pchMessage ) //
  307. END_DEFINE_CALLBACK_2()
  308. //-----------------------------------------------------------------------------
  309. // Purpose: when received show a file open dialog
  310. // then call FileLoadDialogResponse with the file(s) the user selected.
  311. //-----------------------------------------------------------------------------
  312. DEFINE_CALLBACK( HTML_FileOpenDialog_t, k_iSteamHTMLSurfaceCallbacks + 16 )
  313. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  314. CALLBACK_MEMBER( 1, const char *, pchTitle ) //
  315. CALLBACK_MEMBER( 2, const char *, pchInitialFile ) //
  316. END_DEFINE_CALLBACK_3()
  317. //-----------------------------------------------------------------------------
  318. // Purpose: a new html window has been created
  319. //-----------------------------------------------------------------------------
  320. DEFINE_CALLBACK( HTML_NewWindow_t, k_iSteamHTMLSurfaceCallbacks + 21 )
  321. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the current surface
  322. CALLBACK_MEMBER( 1, const char *, pchURL ) // the page to load
  323. CALLBACK_MEMBER( 2, uint32, unX ) // the x pos into the page to display the popup
  324. CALLBACK_MEMBER( 3, uint32, unY ) // the y pos into the page to display the popup
  325. CALLBACK_MEMBER( 4, uint32, unWide ) // the total width of the pBGRA texture
  326. CALLBACK_MEMBER( 5, uint32, unTall ) // the total height of the pBGRA texture
  327. CALLBACK_MEMBER( 6, HHTMLBrowser, unNewWindow_BrowserHandle ) // the handle of the new window surface
  328. END_DEFINE_CALLBACK_7()
  329. //-----------------------------------------------------------------------------
  330. // Purpose: change the cursor to display
  331. //-----------------------------------------------------------------------------
  332. DEFINE_CALLBACK( HTML_SetCursor_t, k_iSteamHTMLSurfaceCallbacks + 22 )
  333. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  334. CALLBACK_MEMBER( 1, uint32, eMouseCursor ) // the EMouseCursor to display
  335. END_DEFINE_CALLBACK_2()
  336. //-----------------------------------------------------------------------------
  337. // Purpose: informational message from the browser
  338. //-----------------------------------------------------------------------------
  339. DEFINE_CALLBACK( HTML_StatusText_t, k_iSteamHTMLSurfaceCallbacks + 23 )
  340. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  341. CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
  342. END_DEFINE_CALLBACK_2()
  343. //-----------------------------------------------------------------------------
  344. // Purpose: show a tooltip
  345. //-----------------------------------------------------------------------------
  346. DEFINE_CALLBACK( HTML_ShowToolTip_t, k_iSteamHTMLSurfaceCallbacks + 24 )
  347. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  348. CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
  349. END_DEFINE_CALLBACK_2()
  350. //-----------------------------------------------------------------------------
  351. // Purpose: update the text of an existing tooltip
  352. //-----------------------------------------------------------------------------
  353. DEFINE_CALLBACK( HTML_UpdateToolTip_t, k_iSteamHTMLSurfaceCallbacks + 25 )
  354. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  355. CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
  356. END_DEFINE_CALLBACK_2()
  357. //-----------------------------------------------------------------------------
  358. // Purpose: hide the tooltip you are showing
  359. //-----------------------------------------------------------------------------
  360. DEFINE_CALLBACK( HTML_HideToolTip_t, k_iSteamHTMLSurfaceCallbacks + 26 )
  361. CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
  362. END_DEFINE_CALLBACK_1()
  363. #pragma pack( pop )
  364. #endif // ISTEAMHTMLSURFACE_H