Steamworks 文獻庫
ISteamHTMLSurface 介面
用於渲染 HTML 網頁並與其互動之介面。

您可直接在您的遊戲或應用程式中使用此介面來渲染並顯示 HTML 頁面。 使用此介面前必須呼叫 Init,使用結束後則呼叫 Shutdown

此 API 建立在 Chromium 嵌入式架構之上,並支援 HTML5 標記。

詳細資訊請參閱 Steam HTML Surface 一文。

成員函式

ISteamHTMLSurface 的成員函式可透過全域存取子函式 SteamHTMLSurface() 呼叫。

AddHeader

void AddHeader( HHTMLBrowser unBrowserHandle, const char *pchKey, const char *pchValue );
名稱型別說明
unBrowserHandleHHTMLBrowser要新增標題的 Surface 的控制代碼。
pchKeyconst char *要新增的標題名稱。
pchValueconst char *要與索引碼關聯的標題值。

為來自此瀏覽器的任何 HTTP 請求新增標題。

如果需要標準請求欄位的列表,請參閱 Wikipedia

AllowStartRequest

void AllowStartRequest( HHTMLBrowser unBrowserHandle, bool bAllowed );
名稱型別說明
unBrowserHandleHHTMLBrowser正在導向的 Surface 的控制代碼。
bAllowedbool允許或拒絕前往目前的開始請求。

設定是否允許或取消待處理的載入。
備註:回應 HTML_StartRequest_t 回呼時必須呼叫此函式。

可使用此功能來限制您 HTML Surface 中允許的有效頁面數。

CopyToClipboard

void CopyToClipboard( HHTMLBrowser unBrowserHandle );
名稱型別說明
unBrowserHandleHHTMLBrowser要從中複製文字的 Surface 的控制代碼。

從 HTML surface 中的目前頁面將選取的文字複製到本機剪貼簿。

CreateBrowser

SteamAPICall_t CreateBrowser( const char *pchUserAgent, const char *pchUserCSS );
名稱型別說明
pchUserAgentconst char *將字串附加至瀏覽器的一般使用者代理程式字串,允許您在網頁伺服器上偵測您的用戶端。 如果不需要此功能,則使用 NULL
pchUserCSSconst char *這允許您將此瀏覽器顯式的每個頁面設定為 CSS 樣式。 如果不需要此功能,則使用 NULL

為顯示一個 HTML 頁面建立一個瀏覽其物件。
備註: 您必須已先實作了HTML_BrowserReady_tHTML_StartRequest_tHTML_JSAlert_tHTML_JSConfirm_t,和 HTML_FileOpenDialog_t 的回呼處理常式!
如果不實作這些回呼處理常式,瀏覽器可能呈現無回應的狀態,而不會前往新頁面或觸發 JavaScript 彈出視窗!

備註:使用完瀏覽器後,必須呼叫 RemoveBrowser 以釋放與之關聯的資源。 否則會導致記憶體漏失。

您可能需要呼叫 SetSizeLoadURL 以開始使用您的顯示 Surface。

傳回: 用於 HTML_BrowserReady_t 呼叫結果的 SteamAPICall_t

ExecuteJavascript

void ExecuteJavascript( HHTMLBrowser unBrowserHandle, const char *pchScript );
名稱型別說明
unBrowserHandleHHTMLBrowser正在導向的 Surface 的控制代碼。
pchScriptconst char *要執行的 JavaScript 指令碼。

在目前已載入的頁面執行 JavaScript 指令碼。

FileLoadDialogResponse

void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles );
名稱型別說明
unBrowserHandleHHTMLBrowser要叫出開啟檔案對話方塊的 Surface 的控制代碼。
pchSelectedFilesconst char **應為使用者所選擇的檔案的絕對檔案路徑陣列。 若使用者未選擇任何檔案,則為 NULL

讓您對要開啟下載檔案對話方塊的頁面做出回應。
備註:回應 HTML_FileOpenDialog_t 回呼時必須呼叫此函式。

Find

void Find( HHTMLBrowser unBrowserHandle, const char *pchSearchStr, bool bCurrentlyInFind, bool bReverse );
名稱型別說明
unBrowserHandleHHTMLBrowser要在其中找到字串的 Surface 的控制代碼。
pchSearchStrconst char *要搜尋的字串。
bCurrentlyInFindbool在後續呼叫中將此設為 true,才能找到下一個相符的字串。
bReversebool從下往上搜尋嗎?

在 HTML Surface 的目前頁面尋找字串。

這在您選擇的瀏覽器中相當於「ctrl+f」。 將凸顯所有相符的字串。

當輸入的字串已改變或您想停止搜尋時,應呼叫 StopFind

傳回: void
觸發 HTML_SearchResults_t 回呼。

GetLinkAtPosition

void GetLinkAtPosition( HHTMLBrowser unBrowserHandle, int x, int y );
名稱型別說明
unBrowserHandleHHTMLBrowser要從中取得連結的 Surface 的控制代碼。
xintThe X (width) position in pixels within the surface. (0, 0) is the top left corner.
yintThe Y (height) position in pixels within the surface. (0, 0) is the top left corner.

Retrieves details about a link at a specific position on the current page in an HTML surface.

Returns: void
Triggers a HTML_LinkAtPosition_t callback.

GoBack

void GoBack( HHTMLBrowser unBrowserHandle );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to navigate back on.

Navigate back in the page history.

GoForward

void GoForward( HHTMLBrowser unBrowserHandle );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to navigate forward on.

Navigate forward in the page history

Init

bool Init();
Initializes the HTML Surface API.

This must be called prior to using any other functions in this interface.

You MUST call Shutdown when you are done using the interface to free up the resources associated with it. Failing to do so will result in a memory leak!

Returns: bool
true if the API was successfully initialized; otherwise, false.

JSDialogResponse

void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that is spawning a dialog.
bResultboolSet this to true to simulate pressing the "OK" button, otherwise false for "Cancel".

Allows you to react to a page wanting to open a javascript modal dialog notification.
NOTE:You MUST call this in response to HTML_JSAlert_t and HTML_JSConfirm_t callbacks.

KeyChar

void KeyChar( HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to send the interaction to.
cUnicodeCharuint32The unicode character point for this keypress; and potentially multiple characters per press.
eHTMLKeyModifiersEHTMLKeyModifiersThis should be set to a bitmask of the modifier keys that the user is currently pressing.

cUnicodeChar is the unicode character point for this keypress (and potentially multiple chars per press)

KeyDown

void KeyDown( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to send the interaction to.
nNativeKeyCodeuint32This is the virtual keycode value from the OS.
eHTMLKeyModifiersEHTMLKeyModifiersThis should be set to a bitmask of the modifier keys that the user is currently pressing.

keyboard interactions, native keycode is the virtual key code value from your OS

KeyUp

void KeyUp( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to send the interaction to.
nNativeKeyCodeuint32This is the virtual keycode value from the OS.
eHTMLKeyModifiersEHTMLKeyModifiersThis should be set to a bitmask of the modifier keys that the user is currently pressing.

LoadURL

void LoadURL( HHTMLBrowser unBrowserHandle, const char *pchURL, const char *pchPostData );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to load this URL in.
pchURLconst char *The URL to load.
pchPostDataconst char *Optionally send a POST request with this data, set this to NULL to not send any data.

Navigate to a specified URL.

If you send POST data with pchPostData then the data should be formatted as: name1=value1&name2=value2.

You can load any URI scheme supported by Chromium Embedded Framework including but not limited to: http://, https://, ftp://, and file:///. If no scheme is specified then http:// is used.

Returns: void
Triggers a HTML_StartRequest_t callback.

MouseDoubleClick

void MouseDoubleClick( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to send the interaction to.
eMouseButtonEHTMLMouseButtonThe mouse button which was double clicked.

Tells an HTML surface that a mouse button has been double clicked.

The click will occur where the surface thinks the mouse is based on the last call to MouseMove.

MouseDown

void MouseDown( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to send the interaction to.
eMouseButtonEHTMLMouseButtonThe mouse button which was pressed.

Tells an HTML surface that a mouse button has been pressed.

The click will occur where the surface thinks the mouse is based on the last call to MouseMove.

MouseMove

void MouseMove( HHTMLBrowser unBrowserHandle, int x, int y );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to send the interaction to.
xintX (width) coordinate in pixels relative to the position of the HTML surface. (0, 0) is the top left.
yintY (height) coordinate in pixels relative to the position of the HTML surface. (0, 0) is the top left.

Tells an HTML surface where the mouse is.

MouseUp

void MouseUp( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to send the interaction to.
eMouseButtonEHTMLMouseButtonThe mouse button which was released.

Tells an HTML surface that a mouse button has been released.

The click will occur where the surface thinks the mouse is based on the last call to MouseMove.

MouseWheel

void MouseWheel( HHTMLBrowser unBrowserHandle, int32 nDelta );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to send the interaction to.
nDeltaint32The number of pixels to scroll.

Tells an HTML surface that the mouse wheel has moved.

PasteFromClipboard

void PasteFromClipboard( HHTMLBrowser unBrowserHandle );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to paste into.

Paste from the local clipboard to the current page in an HTML surface.

Reload

void Reload( HHTMLBrowser unBrowserHandle );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to reload.

Refreshes the current page.

The reload will most likely hit the local cache instead of going over the network. This is equivalent to F5 or Ctrl+R in your browser of choice.

RemoveBrowser

void RemoveBrowser( HHTMLBrowser unBrowserHandle );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe browser handle to release.

You MUST call this when you are done with an HTML surface, freeing the resources associated with it.

Failing to call this will result in a memory leak!

SetBackgroundMode

void SetBackgroundMode( HHTMLBrowser unBrowserHandle, bool bBackgroundMode );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface set background mode on.
bBackgroundModeboolToggle background mode on or off.

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()".

SetCookie

void SetCookie( const char *pchHostname, const char *pchKey, const char *pchValue, const char *pchPath = "/", RTime32 nExpires = 0, bool bSecure = false, bool bHTTPOnly = false );
NameTypeDescription
pchHostnameconst char *The hostname of the server to set the cookie for. ('Host' attribute)
pchKeyconst char *The cookie name to set.
pchValueconst char *The cookie value to set.
pchPathconst char *Sets the 'Path' attribute on the cookie. You can use this to restrict the cookie to a specific path on the domain. e.g. "/accounts"
nExpiresRTime32Sets the 'Expires' attribute on the cookie to the specified timestamp in Unix epoch format (seconds since Jan 1st 1970).
bSecureboolSets the 'Secure' attribute.
bHTTPOnlyboolSets the 'HttpOnly' attribute.

Set a webcookie for a specific hostname.

You can read more about the specifics of setting cookies here on wikipedia.

SetHorizontalScroll

void SetHorizontalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to set the horizontal scroll position.
nAbsolutePixelScrolluint32The absolute pixel position to scroll to. 0 is the left and HTML_HorizontalScroll_t.unScrollMax is the right side.

Scroll the current page horizontally.

Returns: void
Triggers a HTML_HorizontalScroll_t callback.


See Also: HTML_HorizontalScroll_t, SetVerticalScroll, HTML_VerticalScroll_t

SetKeyFocus

void SetKeyFocus( HHTMLBrowser unBrowserHandle, bool bHasKeyFocus );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to set key focus on.
bHasKeyFocusboolTurn key focus on or off?

Tell a HTML surface if it has key focus currently, controls showing the I-beam cursor in text controls amongst other things.

SetPageScaleFactor

void SetPageScaleFactor( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to scale.
flZoomfloatThe amount to zoom, this can range from 1 (100% and the default) to 2 (200%).
nPointXintThe X point in pixels to zoom around. Use 0 if you don't care.
nPointYintThe Y point in pixels to zoom around. Use 0 if you don't care.

Zoom the current page in an HTML surface.

The current scale factor is available from HTML_NeedsPaint_t.flPageScale, HTML_HorizontalScroll_t.flPageScale, and HTML_VerticalScroll_t.flPageScale.

SetSize

void SetSize( HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to set the size of.
unWidthuint32The width of the surface in pixels.
unHeightuint32The height of the surface in pixels.

Sets the display size of a surface in pixels.

SetVerticalScroll

void SetVerticalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to set the vertical scroll position.
nAbsolutePixelScrolluint32The absolute pixel position to scroll to. 0 is the top and HTML_VerticalScroll_t.unScrollMax is the bottom.

Scroll the current page vertically.

Returns: void
Triggers a HTML_VerticalScroll_t callback.


See Also: HTML_VerticalScroll_t, SetHorizontalScroll, HTML_HorizontalScroll_t

Shutdown

bool Shutdown();
Shutdown the ISteamHTMLSurface interface, releasing the memory and handles.

You MUST call this when you are done using this interface to prevent memory and handle leaks. After calling this then all of the functions provided in this interface will fail until you call Init to reinitialize again.

Returns: bool
This function currently always returns true.

StopFind

void StopFind( HHTMLBrowser unBrowserHandle );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to stop the find results.

Cancel a currently running find.

See Also: Find

StopLoad

void StopLoad( HHTMLBrowser unBrowserHandle );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to stop loading.

Stop the load of the current HTML page.

ViewSource

void ViewSource( HHTMLBrowser unBrowserHandle );
NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface to view its current pages source.

Open the current pages HTML source code in default local text editor, used for debugging.

Callbacks

These are callbacks which can be fired by calling SteamAPI_RunCallbacks. Many of these will be fired directly in response to the member functions of ISteamHTMLSurface.

HTML_BrowserReady_t

A new browser was created and is ready for use.

NameTypeDescription
unBrowserHandleHHTMLBrowserThis is the handle to the browser that was just created, which you can use with future calls to ISteamHTMLSurface.

Associated Functions: CreateBrowser

HTML_CanGoBackAndForward_t

Called when page history status has changed the ability to go backwards and forward.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
bCanGoBackboolReturns whether you can navigate backwards.
bCanGoForwardboolReturns whether you can navigate forward.

HTML_ChangedTitle_t

Called when the current page in a browser gets a new title.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
pchTitleconst char *The new title of the page.

HTML_CloseBrowser_t

Called when the browser has been requested to close due to user interaction; usually because of a javascript window.close() call.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.

HTML_FileOpenDialog_t

Called when a browser surface has received a file open dialog from a <input type="file"> click or similar, you must call FileLoadDialogResponse with the file(s) the user selected.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that is navigating.
pchTitleconst char *The name of the dialog. (eg. "Upload Images")
pchInitialFileconst char *The filename that the page wants you to set by default. It may be expecting a file with that name or that was the file the user previously uploaded.

HTML_FinishedRequest_t

Called when a browser has finished loading a page.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this call was for.
pchURLconst char *The URL that was loaded.
pchPageTitleconst char *The title of the page that got loaded.

HTML_HideToolTip_t

Called when a a browser wants to hide a tooltip.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.

HTML_HorizontalScroll_t

Provides details on the visibility and size of the horizontal scrollbar.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
unScrollMaxuint32The maximum amount you can scroll horizontally.
unScrollCurrentuint32The current horizontal scroll position.
flPageScalefloatThe current page scale.
bVisibleboolWhether the horizontal scrollbar is visible.
unPageSizeuint32The total width of the page in pixels.

Associated Functions: SetHorizontalScroll

HTML_JSAlert_t

Called when the browser wants to display a Javascript alert dialog, call JSDialogResponse when the user dismisses this dialog; or right away to ignore it.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this call was for.
pchMessageconst char *The message associated with the dialog.

HTML_JSConfirm_t

Called when the browser wants to display a Javascript confirmation dialog, call JSDialogResponse when the user dismisses this dialog; or right away to ignore it.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this call was for.
pchMessageconst char *The message associated with the dialog.

HTML_LinkAtPosition_t

Result of a call to GetLinkAtPosition

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this call was for.
xuint32Unused.
yuint32Unused.
pchURLconst char *The URL found at this position. NULL if no link was found.
bInputboolWas the position an input field?
bLiveLinkbool

Associated Functions: GetLinkAtPosition

HTML_NeedsPaint_t

Called when a browser surface has a pending paint. This is where you get the actual image data to render to the screen.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
pBGRAconst char *A pointer to the B8G8R8A8 image data for this surface, valid until SteamAPI_RunCallbacks is next called.
unWideuint32The total width of the pBGRA texture.
unTalluint32The total height of the pBGRA texture.
unUpdateXuint32The offset in X for the damage rect for this update.
unUpdateYuint32The offset in Y for the damage rect for this update.
unUpdateWideuint32The width of the damage rect for this update.
unUpdateTalluint32The height of the damage rect for this update.
unScrollXuint32The horizontal scroll position the browser was at when this texture was rendered.
unScrollYuint32The veritcal scroll position the browser was at when this texture was rendered.
flPageScalefloatThe scale factor the browser was at when this texture was rendered.
unPageSerialuint32Incremented on each new page load, you can use this to reject draws while navigating to new pages.

HTML_NewWindow_t

A browser has created a new HTML window.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
pchURLconst char *The URL to load in the new window.
unXuint32The x pos into the page to display the popup.
unYuint32The y pos into the page to display the popup.
unWideuint32The total width of the pBGRA texture.
unTalluint32The total height of the pBGRA texture.
unNewWindow_BrowserHandleHHTMLBrowserThe handle of the new window surface.

HTML_OpenLinkInNewTab_t

The browser has requested to load a url in a new tab.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
pchURLconst char *The URL that the browser wants to load.

HTML_SearchResults_t

Results from a search.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
unResultsuint32The number of matching results found.
unCurrentMatchuint32The ordinal of the current match relative to unResults.

Associated Functions: Find

HTML_SetCursor_t

Called when a browser wants to change the mouse cursor.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
eMouseCursoruint32The EMouseCursor to display.

HTML_ShowToolTip_t

Called when a browser wants to display a tooltip.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
pchMsgconst char *The text of the tooltip that wants to be displayed.

HTML_StartRequest_t

Called when a browser wants to navigate to a new page.
NOTE: You MUST call AllowStartRequest in response to this callback!

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that is navigating.
pchURLconst char *The url it wants to navigate to.
pchTargetconst char *The html link target type (i.e _blank, _self, _parent, _top ).
pchPostDataconst char *Any posted data for the request.
bIsRedirectboolTrue if this was a http/html redirect from the last load request.

Associated Functions: LoadURL

HTML_StatusText_t

Called when a browser wants you to display an informational message. This is most commonly used when you hover over links.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
pchMsgconst char *The text of the status message to display.

HTML_UpdateToolTip_t

Called when the text of an existing tooltip has been updated.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
pchMsgconst char *The new text of the tooltip.

HTML_URLChanged_t

Called when the browser is navigating to a new url

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
pchURLconst char *The url that the browser is navigating to.
pchPostDataconst char *Any posted data for the request, NULL if there was none.
bIsRedirectbooltrue if this was a http/html redirect from the last load request, otherwise false.
pchPageTitleconst char *The title of the page.
bNewNavigationboolThis is true if the page has changed rather than just a call to the browser history API.

HTML_VerticalScroll_t

Provides details on the visibility and size of the vertical scrollbar.

NameTypeDescription
unBrowserHandleHHTMLBrowserThe handle of the surface that this callback is for.
unScrollMaxuint32The maximum amount you can scroll vertically.
unScrollCurrentuint32The current vertical scroll position.
flPageScalefloatThe current page scale.
bVisibleboolWhether the vertical scrollbar is visible.
unPageSizeuint32The total height of the page in pixels.

Associated Functions: SetVerticalScroll

Enums

These are enums which are defined for use with ISteamHTMLSurface.

EHTMLKeyModifiers

Used to let the browser know what keys are pressed with: KeyChar, KeyUp and KeyDown. These flags can be added together using bitwise OR.

NameValueDescription
k_eHTMLKeyModifier_None0No modifiers are pressed.
k_eHTMLKeyModifier_AltDown1 << 0One of the alt keys are pressed.
k_eHTMLKeyModifier_CtrlDown1 << 1One of the ctrl keys are pressed.
k_eHTMLKeyModifier_ShiftDown1 << 2One of the shift keys are pressed.

EHTMLMouseButton

Used to let the browser know when a mouse button is pressed with: MouseUp, MouseDown and MouseDoubleClick.

NameValueDescription
eHTMLMouseButton_Left0The left button is pressed.
eHTMLMouseButton_Right1The right button is pressed.
eHTMLMouseButton_Middle2The middle button is pressed.

EMouseCursor

This lists the mouse cursors that the HTML surface will tell you to render.

NameValueDescription
dc_user0
dc_none1
dc_arrow2
dc_ibeam3
dc_hourglass4
dc_waitarrow5
dc_crosshair6
dc_up7
dc_sizenw8
dc_sizese9
dc_sizene10
dc_sizesw11
dc_sizew12
dc_sizee13
dc_sizen14
dc_sizes15
dc_sizewe16
dc_sizens17
dc_sizeall18
dc_no19
dc_hand20
dc_blank21Don't show any custom cursor, just use your default.
dc_middle_pan22
dc_north_pan23
dc_north_east_pan24
dc_east_pan25
dc_south_east_pan26
dc_south_pan27
dc_south_west_pan28
dc_west_pan29
dc_north_west_pan30
dc_alias31
dc_cell32
dc_colresize33
dc_copycur34
dc_verticaltext35
dc_rowresize36
dc_zoomin37
dc_zoomout38
dc_help39
dc_custom40
dc_last41Only used to iterate over all cursors. Custom cursors start from this value and up.

Typedefs

以下為定義來用於 ISteamHTMLSurface 中的 typedefs 。

NameBase typeDescription
HHTMLBrowseruint32Represents a unique handle to an HTML surface.

Constants

以下為定義來用於 ISteamHTMLSurface 中的常數。

NameTypeValueDescription
INVALID_HTMLBROWSERuint320Indicates that a browser handle is invalid. You should initialize your own HHTMLBrowser handles to this value and then set it back to this when the page closes.
STEAMHTMLSURFACE_INTERFACE_VERSIONconst char *"STEAMHTMLSURFACE_INTERFACE_VERSION_003"