/// <summary> /// <para> x and y are relative to the HTML bounds</para> /// </summary> public static void MouseMove(HHTMLBrowser unBrowserHandle, int x, int y) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_MouseMove(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, x, y); }
/// <summary> /// <para> nDelta is pixels of scroll</para> /// </summary> public static void MouseWheel(HHTMLBrowser unBrowserHandle, int nDelta) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_MouseWheel(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, nDelta); }
/// <summary> /// <para> Tells the surface the size in pixels to display the surface</para> /// </summary> public static void SetSize(HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_SetSize(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, unWidth, unHeight); }
public static void MouseDoubleClick(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_MouseDoubleClick(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, eMouseButton); }
public static bool Shutdown() { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamHTMLSurface_Shutdown(CSteamAPIContext.GetSteamHTMLSurface())); }
public static void ExecuteJavascript(HHTMLBrowser unBrowserHandle, string pchScript) { InteropHelp.TestIfAvailableClient(); using InteropHelp.UTF8StringHandle pchScript2 = new InteropHelp.UTF8StringHandle(pchScript); NativeMethods.ISteamHTMLSurface_ExecuteJavascript(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, pchScript2); }
/// <summary> /// <para> CALLBACKS</para> /// <para> These set of functions are used as responses to callback requests</para> /// <para> You MUST call this in response to a HTML_StartRequest_t callback</para> /// <para> Set bAllowed to true to allow this navigation, false to cancel it and stay</para> /// <para> on the current page. You can use this feature to limit the valid pages</para> /// <para> allowed in your HTML surface.</para> /// </summary> public static void AllowStartRequest(HHTMLBrowser unBrowserHandle, bool bAllowed) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_AllowStartRequest(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, bAllowed); }
public static void SetVerticalScroll(HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_SetVerticalScroll(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, nAbsolutePixelScroll); }
/// <summary> /// <para> Enable/disable low-resource background mode, where javascript and repaint timers are throttled, resources are</para> /// <para> more aggressively purged from memory, and audio/video elements are paused. When background mode is enabled,</para> /// <para> all HTML5 video and audio objects will execute ".pause()" and gain the property "._steam_background_paused = 1".</para> /// <para> When background mode is disabled, any video or audio objects with that property will resume with ".play()".</para> /// </summary> public static void SetBackgroundMode(HHTMLBrowser unBrowserHandle, bool bBackgroundMode) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_SetBackgroundMode(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, bBackgroundMode); }
/// <summary> /// <para> Scale the output display space by this factor, this is useful when displaying content on high dpi devices.</para> /// <para> Specifies the ratio between physical and logical pixels.</para> /// </summary> public static void SetDPIScalingFactor(HHTMLBrowser unBrowserHandle, float flDPIScaling) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_SetDPIScalingFactor(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, flDPIScaling); }
/// <summary> /// <para> 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)</para> /// </summary> public static void SetPageScaleFactor(HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_SetPageScaleFactor(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, flZoom, nPointX, nPointY); }
/// <summary> /// <para> return details about the link at position x,y on the current page</para> /// </summary> public static void GetLinkAtPosition(HHTMLBrowser unBrowserHandle, int x, int y) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_GetLinkAtPosition(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, x, y); }
/// <summary> /// <para> Open HTML/JS developer tools</para> /// </summary> public static void OpenDeveloperTools(HHTMLBrowser unBrowserHandle) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_OpenDeveloperTools(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle); }
/// <summary> /// <para> keyboard interactions, native keycode is the virtual key code value from your OS</para> /// </summary> public static void KeyDown(HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_KeyDown(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers); }
/// <summary> /// <para> You MUST call this in response to a HTML_JSAlert_t or HTML_JSConfirm_t callback</para> /// <para> Set bResult to true for the OK option of a confirm, use false otherwise</para> /// </summary> public static void JSDialogResponse(HHTMLBrowser unBrowserHandle, bool bResult) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_JSDialogResponse(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, bResult); }
/// <summary> /// <para> cUnicodeChar is the unicode character point for this keypress (and potentially multiple chars per press)</para> /// </summary> public static void KeyChar(HHTMLBrowser unBrowserHandle, uint cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_KeyChar(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, cUnicodeChar, eHTMLKeyModifiers); }
/// <summary> /// <para> You MUST call this in response to a HTML_FileOpenDialog_t callback</para> /// </summary> public static void FileLoadDialogResponse(HHTMLBrowser unBrowserHandle, IntPtr pchSelectedFiles) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_FileLoadDialogResponse(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, pchSelectedFiles); }
/// <summary> /// <para> tell the html control if it has key focus currently, controls showing the I-beam cursor in text controls amongst other things</para> /// </summary> public static void SetKeyFocus(HHTMLBrowser unBrowserHandle, bool bHasKeyFocus) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_SetKeyFocus(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, bHasKeyFocus); }
/// <summary> /// <para> Create a browser object for display of a html page, when creation is complete the call handle</para> /// <para> will return a HTML_BrowserReady_t callback for the HHTMLBrowser of your new browser.</para> /// <para> The user agent string is a substring to be added to the general user agent string so you can</para> /// <para> identify your client on web servers.</para> /// <para> The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if</para> /// <para> you do not require this functionality.</para> /// <para> YOU MUST HAVE IMPLEMENTED HANDLERS FOR HTML_BrowserReady_t, HTML_StartRequest_t,</para> /// <para> HTML_JSAlert_t, HTML_JSConfirm_t, and HTML_FileOpenDialog_t! See the CALLBACKS</para> /// <para> section of this interface (AllowStartRequest, etc) for more details. If you do</para> /// <para> not implement these callback handlers, the browser may appear to hang instead of</para> /// <para> navigating to new pages or triggering javascript popups.</para> /// </summary> public static SteamAPICall_t CreateBrowser(string pchUserAgent, string pchUserCSS) { InteropHelp.TestIfAvailableClient(); using (var pchUserAgent2 = new InteropHelp.UTF8StringHandle(pchUserAgent)) using (var pchUserCSS2 = new InteropHelp.UTF8StringHandle(pchUserCSS)) { return((SteamAPICall_t)NativeMethods.ISteamHTMLSurface_CreateBrowser(CSteamAPIContext.GetSteamHTMLSurface(), pchUserAgent2, pchUserCSS2)); } }
/// <summary> /// <para> cancel a currently running find</para> /// </summary> public static void StopFind(HHTMLBrowser unBrowserHandle) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamHTMLSurface_StopFind(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle); }
public static void Find(HHTMLBrowser unBrowserHandle, string pchSearchStr, bool bCurrentlyInFind, bool bReverse) { InteropHelp.TestIfAvailableClient(); using InteropHelp.UTF8StringHandle pchSearchStr2 = new InteropHelp.UTF8StringHandle(pchSearchStr); NativeMethods.ISteamHTMLSurface_Find(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, pchSearchStr2, bCurrentlyInFind, bReverse); }