C# 클래스 Steamworks.SteamHTMLSurface

파일 보기 프로젝트 열기: rlabrecque/Steamworks.NET

공개 메소드들

메소드 설명
AddHeader ( HHTMLBrowser unBrowserHandle, string pchKey, string pchValue ) : void

add this header to any url requests from this browser

AllowStartRequest ( HHTMLBrowser unBrowserHandle, bool bAllowed ) : void

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.

CopyToClipboard ( HHTMLBrowser unBrowserHandle ) : void

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

CreateBrowser ( string pchUserAgent, string pchUserCSS ) : SteamAPICall_t

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.

ExecuteJavascript ( HHTMLBrowser unBrowserHandle, string pchScript ) : void

run this javascript script in the currently loaded page

FileLoadDialogResponse ( HHTMLBrowser unBrowserHandle, IntPtr pchSelectedFiles ) : void

You MUST call this in response to a HTML_FileOpenDialog_t callback

Find ( HHTMLBrowser unBrowserHandle, string pchSearchStr, bool bCurrentlyInFind, bool bReverse ) : void

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

GetLinkAtPosition ( HHTMLBrowser unBrowserHandle, int x, int y ) : void

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

GoBack ( HHTMLBrowser unBrowserHandle ) : void

navigate back in the page history

GoForward ( HHTMLBrowser unBrowserHandle ) : void

navigate forward in the page history

Init ( ) : bool

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

JSDialogResponse ( HHTMLBrowser unBrowserHandle, bool bResult ) : void

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

KeyChar ( HHTMLBrowser unBrowserHandle, uint cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers ) : void

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

KeyDown ( HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) : void

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

KeyUp ( HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) : void
LoadURL ( HHTMLBrowser unBrowserHandle, string pchURL, string pchPostData ) : void

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

MouseDoubleClick ( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) : void
MouseDown ( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) : void
MouseMove ( HHTMLBrowser unBrowserHandle, int x, int y ) : void

x and y are relative to the HTML bounds

MouseUp ( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) : void

Mouse click and mouse movement commands

MouseWheel ( HHTMLBrowser unBrowserHandle, int nDelta ) : void

nDelta is pixels of scroll

PasteFromClipboard ( HHTMLBrowser unBrowserHandle ) : void

paste from the local clipboard to the current html page

Reload ( HHTMLBrowser unBrowserHandle ) : void

Reload (most likely from local cache) the current page

RemoveBrowser ( HHTMLBrowser unBrowserHandle ) : void

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

SetBackgroundMode ( HHTMLBrowser unBrowserHandle, bool bBackgroundMode ) : void

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 ( string pchHostname, string pchKey, string pchValue, string pchPath = "/", uint nExpires, bool bSecure = false, bool bHTTPOnly = false ) : void

set a webcookie for the hostname in question

SetHorizontalScroll ( HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll ) : void

programmatically scroll this many pixels on the page

SetKeyFocus ( HHTMLBrowser unBrowserHandle, bool bHasKeyFocus ) : void

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

SetPageScaleFactor ( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY ) : void

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)

SetSize ( HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight ) : void

Tells the surface the size in pixels to display the surface

SetVerticalScroll ( HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll ) : void
Shutdown ( ) : bool
StopFind ( HHTMLBrowser unBrowserHandle ) : void

cancel a currently running find

StopLoad ( HHTMLBrowser unBrowserHandle ) : void

Stop the load of the current html page

ViewSource ( HHTMLBrowser unBrowserHandle ) : void

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

메소드 상세

AddHeader() 공개 정적인 메소드

add this header to any url requests from this browser

public static AddHeader ( HHTMLBrowser unBrowserHandle, string pchKey, string pchValue ) : void
unBrowserHandle HHTMLBrowser
pchKey string
pchValue string
리턴 void

AllowStartRequest() 공개 정적인 메소드

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.

public static AllowStartRequest ( HHTMLBrowser unBrowserHandle, bool bAllowed ) : void
unBrowserHandle HHTMLBrowser
bAllowed bool
리턴 void

CopyToClipboard() 공개 정적인 메소드

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

public static CopyToClipboard ( HHTMLBrowser unBrowserHandle ) : void
unBrowserHandle HHTMLBrowser
리턴 void

CreateBrowser() 공개 정적인 메소드

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.

public static CreateBrowser ( string pchUserAgent, string pchUserCSS ) : SteamAPICall_t
pchUserAgent string
pchUserCSS string
리턴 SteamAPICall_t

ExecuteJavascript() 공개 정적인 메소드

run this javascript script in the currently loaded page

public static ExecuteJavascript ( HHTMLBrowser unBrowserHandle, string pchScript ) : void
unBrowserHandle HHTMLBrowser
pchScript string
리턴 void

FileLoadDialogResponse() 공개 정적인 메소드

You MUST call this in response to a HTML_FileOpenDialog_t callback

public static FileLoadDialogResponse ( HHTMLBrowser unBrowserHandle, IntPtr pchSelectedFiles ) : void
unBrowserHandle HHTMLBrowser
pchSelectedFiles System.IntPtr
리턴 void

Find() 공개 정적인 메소드

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

public static Find ( HHTMLBrowser unBrowserHandle, string pchSearchStr, bool bCurrentlyInFind, bool bReverse ) : void
unBrowserHandle HHTMLBrowser
pchSearchStr string
bCurrentlyInFind bool
bReverse bool
리턴 void

GetLinkAtPosition() 공개 정적인 메소드

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

public static GetLinkAtPosition ( HHTMLBrowser unBrowserHandle, int x, int y ) : void
unBrowserHandle HHTMLBrowser
x int
y int
리턴 void

GoBack() 공개 정적인 메소드

navigate back in the page history

public static GoBack ( HHTMLBrowser unBrowserHandle ) : void
unBrowserHandle HHTMLBrowser
리턴 void

GoForward() 공개 정적인 메소드

navigate forward in the page history

public static GoForward ( HHTMLBrowser unBrowserHandle ) : void
unBrowserHandle HHTMLBrowser
리턴 void

Init() 공개 정적인 메소드

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

public static Init ( ) : bool
리턴 bool

JSDialogResponse() 공개 정적인 메소드

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

public static JSDialogResponse ( HHTMLBrowser unBrowserHandle, bool bResult ) : void
unBrowserHandle HHTMLBrowser
bResult bool
리턴 void

KeyChar() 공개 정적인 메소드

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

public static KeyChar ( HHTMLBrowser unBrowserHandle, uint cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers ) : void
unBrowserHandle HHTMLBrowser
cUnicodeChar uint
eHTMLKeyModifiers EHTMLKeyModifiers
리턴 void

KeyDown() 공개 정적인 메소드

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

public static KeyDown ( HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) : void
unBrowserHandle HHTMLBrowser
nNativeKeyCode uint
eHTMLKeyModifiers EHTMLKeyModifiers
리턴 void

KeyUp() 공개 정적인 메소드

public static KeyUp ( HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) : void
unBrowserHandle HHTMLBrowser
nNativeKeyCode uint
eHTMLKeyModifiers EHTMLKeyModifiers
리턴 void

LoadURL() 공개 정적인 메소드

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

public static LoadURL ( HHTMLBrowser unBrowserHandle, string pchURL, string pchPostData ) : void
unBrowserHandle HHTMLBrowser
pchURL string
pchPostData string
리턴 void

MouseDoubleClick() 공개 정적인 메소드

public static MouseDoubleClick ( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) : void
unBrowserHandle HHTMLBrowser
eMouseButton EHTMLMouseButton
리턴 void

MouseDown() 공개 정적인 메소드

public static MouseDown ( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) : void
unBrowserHandle HHTMLBrowser
eMouseButton EHTMLMouseButton
리턴 void

MouseMove() 공개 정적인 메소드

x and y are relative to the HTML bounds

public static MouseMove ( HHTMLBrowser unBrowserHandle, int x, int y ) : void
unBrowserHandle HHTMLBrowser
x int
y int
리턴 void

MouseUp() 공개 정적인 메소드

Mouse click and mouse movement commands

public static MouseUp ( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) : void
unBrowserHandle HHTMLBrowser
eMouseButton EHTMLMouseButton
리턴 void

MouseWheel() 공개 정적인 메소드

nDelta is pixels of scroll

public static MouseWheel ( HHTMLBrowser unBrowserHandle, int nDelta ) : void
unBrowserHandle HHTMLBrowser
nDelta int
리턴 void

PasteFromClipboard() 공개 정적인 메소드

paste from the local clipboard to the current html page

public static PasteFromClipboard ( HHTMLBrowser unBrowserHandle ) : void
unBrowserHandle HHTMLBrowser
리턴 void

Reload() 공개 정적인 메소드

Reload (most likely from local cache) the current page

public static Reload ( HHTMLBrowser unBrowserHandle ) : void
unBrowserHandle HHTMLBrowser
리턴 void

RemoveBrowser() 공개 정적인 메소드

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

public static RemoveBrowser ( HHTMLBrowser unBrowserHandle ) : void
unBrowserHandle HHTMLBrowser
리턴 void

SetBackgroundMode() 공개 정적인 메소드

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

public static SetBackgroundMode ( HHTMLBrowser unBrowserHandle, bool bBackgroundMode ) : void
unBrowserHandle HHTMLBrowser
bBackgroundMode bool
리턴 void

SetCookie() 공개 정적인 메소드

set a webcookie for the hostname in question

public static SetCookie ( string pchHostname, string pchKey, string pchValue, string pchPath = "/", uint nExpires, bool bSecure = false, bool bHTTPOnly = false ) : void
pchHostname string
pchKey string
pchValue string
pchPath string
nExpires uint
bSecure bool
bHTTPOnly bool
리턴 void

SetHorizontalScroll() 공개 정적인 메소드

programmatically scroll this many pixels on the page

public static SetHorizontalScroll ( HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll ) : void
unBrowserHandle HHTMLBrowser
nAbsolutePixelScroll uint
리턴 void

SetKeyFocus() 공개 정적인 메소드

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

public static SetKeyFocus ( HHTMLBrowser unBrowserHandle, bool bHasKeyFocus ) : void
unBrowserHandle HHTMLBrowser
bHasKeyFocus bool
리턴 void

SetPageScaleFactor() 공개 정적인 메소드

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)

public static SetPageScaleFactor ( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY ) : void
unBrowserHandle HHTMLBrowser
flZoom float
nPointX int
nPointY int
리턴 void

SetSize() 공개 정적인 메소드

Tells the surface the size in pixels to display the surface

public static SetSize ( HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight ) : void
unBrowserHandle HHTMLBrowser
unWidth uint
unHeight uint
리턴 void

SetVerticalScroll() 공개 정적인 메소드

public static SetVerticalScroll ( HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll ) : void
unBrowserHandle HHTMLBrowser
nAbsolutePixelScroll uint
리턴 void

Shutdown() 공개 정적인 메소드

public static Shutdown ( ) : bool
리턴 bool

StopFind() 공개 정적인 메소드

cancel a currently running find

public static StopFind ( HHTMLBrowser unBrowserHandle ) : void
unBrowserHandle HHTMLBrowser
리턴 void

StopLoad() 공개 정적인 메소드

Stop the load of the current html page

public static StopLoad ( HHTMLBrowser unBrowserHandle ) : void
unBrowserHandle HHTMLBrowser
리턴 void

ViewSource() 공개 정적인 메소드

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

public static ViewSource ( HHTMLBrowser unBrowserHandle ) : void
unBrowserHandle HHTMLBrowser
리턴 void