Counter Strike : Global Offensive Source Code
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.

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