Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | List of all members
Steamworks.SteamHTMLSurface Class Reference

Static Public Member Functions

static void AddHeader (HHTMLBrowser unBrowserHandle, string pchKey, string pchValue)
 
static void AllowStartRequest (HHTMLBrowser unBrowserHandle, bool bAllowed)
 
static void CopyToClipboard (HHTMLBrowser unBrowserHandle)
 
static SteamAPICall_t CreateBrowser (string pchUserAgent, string pchUserCSS)
 
static void ExecuteJavascript (HHTMLBrowser unBrowserHandle, string pchScript)
 
static void FileLoadDialogResponse (HHTMLBrowser unBrowserHandle, IntPtr pchSelectedFiles)
 
static void Find (HHTMLBrowser unBrowserHandle, string pchSearchStr, bool bCurrentlyInFind, bool bReverse)
 
static void GetLinkAtPosition (HHTMLBrowser unBrowserHandle, int x, int y)
 
static void GoBack (HHTMLBrowser unBrowserHandle)
 
static void GoForward (HHTMLBrowser unBrowserHandle)
 
static bool Init ()
 
static void JSDialogResponse (HHTMLBrowser unBrowserHandle, bool bResult)
 
static void KeyChar (HHTMLBrowser unBrowserHandle, uint cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers)
 
static void KeyDown (HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers)
 
static void KeyUp (HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers)
 
static void LoadURL (HHTMLBrowser unBrowserHandle, string pchURL, string pchPostData)
 
static void MouseDoubleClick (HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton)
 
static void MouseDown (HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton)
 
static void MouseMove (HHTMLBrowser unBrowserHandle, int x, int y)
 
static void MouseUp (HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton)
 
static void MouseWheel (HHTMLBrowser unBrowserHandle, int nDelta)
 
static void PasteFromClipboard (HHTMLBrowser unBrowserHandle)
 
static void Reload (HHTMLBrowser unBrowserHandle)
 
static void RemoveBrowser (HHTMLBrowser unBrowserHandle)
 
static void SetBackgroundMode (HHTMLBrowser unBrowserHandle, bool bBackgroundMode)
 
static void SetCookie (string pchHostname, string pchKey, string pchValue, string pchPath="/", uint nExpires=0, bool bSecure=false, bool bHTTPOnly=false)
 
static void SetDPIScalingFactor (HHTMLBrowser unBrowserHandle, float flDPIScaling)
 
static void SetHorizontalScroll (HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll)
 
static void SetKeyFocus (HHTMLBrowser unBrowserHandle, bool bHasKeyFocus)
 
static void SetPageScaleFactor (HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY)
 
static void SetSize (HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight)
 
static void SetVerticalScroll (HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll)
 
static bool Shutdown ()
 
static void StopFind (HHTMLBrowser unBrowserHandle)
 
static void StopLoad (HHTMLBrowser unBrowserHandle)
 
static void ViewSource (HHTMLBrowser unBrowserHandle)
 

Member Function Documentation

static void Steamworks.SteamHTMLSurface.AddHeader ( HHTMLBrowser  unBrowserHandle,
string  pchKey,
string  pchValue 
)
inlinestatic

add this header to any url requests from this browser

static void Steamworks.SteamHTMLSurface.AllowStartRequest ( HHTMLBrowser  unBrowserHandle,
bool  bAllowed 
)
inlinestatic

CALLBACKS

These set of functions are used as responses to callback requests

You MUST call this in response to a HTML_StartRequest_t callback

Set bAllowed to true to allow this navigation, false to cancel it and stay

on the current page. You can use this feature to limit the valid pages

allowed in your HTML surface.

static void Steamworks.SteamHTMLSurface.CopyToClipboard ( HHTMLBrowser  unBrowserHandle)
inlinestatic

copy the currently selected text on the html page to the local clipboard

static SteamAPICall_t Steamworks.SteamHTMLSurface.CreateBrowser ( string  pchUserAgent,
string  pchUserCSS 
)
inlinestatic

Create a browser object for display of a html page, when creation is complete the call handle

will return a HTML_BrowserReady_t callback for the HHTMLBrowser of your new browser.

The user agent string is a substring to be added to the general user agent string so you can

identify your client on web servers.

The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if

you do not require this functionality.

YOU MUST HAVE IMPLEMENTED HANDLERS FOR HTML_BrowserReady_t, HTML_StartRequest_t,

HTML_JSAlert_t, HTML_JSConfirm_t, and HTML_FileOpenDialog_t! See the CALLBACKS

section of this interface (AllowStartRequest, etc) for more details. If you do

not implement these callback handlers, the browser may appear to hang instead of

navigating to new pages or triggering javascript popups.

static void Steamworks.SteamHTMLSurface.ExecuteJavascript ( HHTMLBrowser  unBrowserHandle,
string  pchScript 
)
inlinestatic

run this javascript script in the currently loaded page

static void Steamworks.SteamHTMLSurface.FileLoadDialogResponse ( HHTMLBrowser  unBrowserHandle,
IntPtr  pchSelectedFiles 
)
inlinestatic

You MUST call this in response to a HTML_FileOpenDialog_t callback

static void Steamworks.SteamHTMLSurface.Find ( HHTMLBrowser  unBrowserHandle,
string  pchSearchStr,
bool  bCurrentlyInFind,
bool  bReverse 
)
inlinestatic

find this string in the browser, if bCurrentlyInFind is true then instead cycle to the next matching element

static void Steamworks.SteamHTMLSurface.GetLinkAtPosition ( HHTMLBrowser  unBrowserHandle,
int  x,
int  y 
)
inlinestatic

return details about the link at position x,y on the current page

static void Steamworks.SteamHTMLSurface.GoBack ( HHTMLBrowser  unBrowserHandle)
inlinestatic

navigate back in the page history

static void Steamworks.SteamHTMLSurface.GoForward ( HHTMLBrowser  unBrowserHandle)
inlinestatic

navigate forward in the page history

static bool Steamworks.SteamHTMLSurface.Init ( )
inlinestatic

Must call init and shutdown when starting/ending use of the interface

static void Steamworks.SteamHTMLSurface.JSDialogResponse ( HHTMLBrowser  unBrowserHandle,
bool  bResult 
)
inlinestatic

You MUST call this in response to a HTML_JSAlert_t or HTML_JSConfirm_t callback

Set bResult to true for the OK option of a confirm, use false otherwise

static void Steamworks.SteamHTMLSurface.KeyChar ( HHTMLBrowser  unBrowserHandle,
uint  cUnicodeChar,
EHTMLKeyModifiers  eHTMLKeyModifiers 
)
inlinestatic

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

static void Steamworks.SteamHTMLSurface.KeyDown ( HHTMLBrowser  unBrowserHandle,
uint  nNativeKeyCode,
EHTMLKeyModifiers  eHTMLKeyModifiers 
)
inlinestatic

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

static void Steamworks.SteamHTMLSurface.KeyUp ( HHTMLBrowser  unBrowserHandle,
uint  nNativeKeyCode,
EHTMLKeyModifiers  eHTMLKeyModifiers 
)
inlinestatic
static void Steamworks.SteamHTMLSurface.LoadURL ( HHTMLBrowser  unBrowserHandle,
string  pchURL,
string  pchPostData 
)
inlinestatic

Navigate to this URL, results in a HTML_StartRequest_t as the request commences

static void Steamworks.SteamHTMLSurface.MouseDoubleClick ( HHTMLBrowser  unBrowserHandle,
EHTMLMouseButton  eMouseButton 
)
inlinestatic
static void Steamworks.SteamHTMLSurface.MouseDown ( HHTMLBrowser  unBrowserHandle,
EHTMLMouseButton  eMouseButton 
)
inlinestatic
static void Steamworks.SteamHTMLSurface.MouseMove ( HHTMLBrowser  unBrowserHandle,
int  x,
int  y 
)
inlinestatic

x and y are relative to the HTML bounds

static void Steamworks.SteamHTMLSurface.MouseUp ( HHTMLBrowser  unBrowserHandle,
EHTMLMouseButton  eMouseButton 
)
inlinestatic

Mouse click and mouse movement commands

static void Steamworks.SteamHTMLSurface.MouseWheel ( HHTMLBrowser  unBrowserHandle,
int  nDelta 
)
inlinestatic

nDelta is pixels of scroll

static void Steamworks.SteamHTMLSurface.PasteFromClipboard ( HHTMLBrowser  unBrowserHandle)
inlinestatic

paste from the local clipboard to the current html page

static void Steamworks.SteamHTMLSurface.Reload ( HHTMLBrowser  unBrowserHandle)
inlinestatic

Reload (most likely from local cache) the current page

static void Steamworks.SteamHTMLSurface.RemoveBrowser ( HHTMLBrowser  unBrowserHandle)
inlinestatic

Call this when you are done with a html surface, this lets us free the resources being used by it

static void Steamworks.SteamHTMLSurface.SetBackgroundMode ( HHTMLBrowser  unBrowserHandle,
bool  bBackgroundMode 
)
inlinestatic

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

static void Steamworks.SteamHTMLSurface.SetCookie ( string  pchHostname,
string  pchKey,
string  pchValue,
string  pchPath = "/",
uint  nExpires = 0,
bool  bSecure = false,
bool  bHTTPOnly = false 
)
inlinestatic

set a webcookie for the hostname in question

static void Steamworks.SteamHTMLSurface.SetDPIScalingFactor ( HHTMLBrowser  unBrowserHandle,
float  flDPIScaling 
)
inlinestatic

Scale the output display space by this factor, this is useful when displaying content on high dpi devices.

Specifies the ratio between physical and logical pixels.

static void Steamworks.SteamHTMLSurface.SetHorizontalScroll ( HHTMLBrowser  unBrowserHandle,
uint  nAbsolutePixelScroll 
)
inlinestatic

programmatically scroll this many pixels on the page

static void Steamworks.SteamHTMLSurface.SetKeyFocus ( HHTMLBrowser  unBrowserHandle,
bool  bHasKeyFocus 
)
inlinestatic

tell the html control if it has key focus currently, controls showing the I-beam cursor in text controls amongst other things

static void Steamworks.SteamHTMLSurface.SetPageScaleFactor ( HHTMLBrowser  unBrowserHandle,
float  flZoom,
int  nPointX,
int  nPointY 
)
inlinestatic

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)

static void Steamworks.SteamHTMLSurface.SetSize ( HHTMLBrowser  unBrowserHandle,
uint  unWidth,
uint  unHeight 
)
inlinestatic

Tells the surface the size in pixels to display the surface

static void Steamworks.SteamHTMLSurface.SetVerticalScroll ( HHTMLBrowser  unBrowserHandle,
uint  nAbsolutePixelScroll 
)
inlinestatic
static bool Steamworks.SteamHTMLSurface.Shutdown ( )
inlinestatic
static void Steamworks.SteamHTMLSurface.StopFind ( HHTMLBrowser  unBrowserHandle)
inlinestatic

cancel a currently running find

static void Steamworks.SteamHTMLSurface.StopLoad ( HHTMLBrowser  unBrowserHandle)
inlinestatic

Stop the load of the current html page

static void Steamworks.SteamHTMLSurface.ViewSource ( HHTMLBrowser  unBrowserHandle)
inlinestatic

open the current pages html code in the local editor of choice, used for debugging


The documentation for this class was generated from the following file: