cohtml.Net.View
Partial class view which holds additional TriggerEvent methods. Other partial class cohtml.Net.View will be generated from SWIG generation. More…
Inherits from SystemIDisposable
Public Functions
Name | |
---|---|
virtual void | TriggerEvent< T1 >(string name, T1 argument1) Trigger event in view |
virtual void | TriggerEvent< T1, T2 >(string name, T1 argument1, T2 argument2) |
virtual void | TriggerEvent< T1, T2, T3 >(string name, T1 argument1, T2 argument2, T3 argument3) |
virtual void | TriggerEvent< T1, T2, T3, T4 >(string name, T1 argument1, T2 argument2, T3 argument3, T4 argument4) |
virtual void | TriggerEvent< T1, T2, T3, T4, T5 >(string name, T1 argument1, T2 argument2, T3 argument3, T4 argument4, T5 argument5) |
virtual void | TriggerEvent< T1, T2, T3, T4, T5, T6 >(string name, T1 argument1, T2 argument2, T3 argument3, T4 argument4, T5 argument5, T6 argument6) |
virtual void | TriggerEvent< T1, T2, T3, T4, T5, T6, T7 >(string name, T1 argument1, T2 argument2, T3 argument3, T4 argument4, T5 argument5, T6 argument6, T7 argument7) |
virtual void | TriggerEvent< T1, T2, T3, T4, T5, T6, T7, T8 >(string name, T1 argument1, T2 argument2, T3 argument3, T4 argument4, T5 argument5, T6 argument6, T7 argument7, T8 argument8) |
virtual void | Dispose() |
BoundEventHandle | BindCall(string name, global.System.Delegate handler) Used to call only one registered handler and can return a result from it. Can be called with zero, one, or more arguments. For that purpose you must use a a promise in the JS, which returns the result from the C# handler. |
BoundEventHandle | RegisterForEvent(string name, global.System.Delegate handler) Used to subscribe one or multiple handlers to the event. It does not return a result. |
void | UnregisterFromEvent(BoundEventHandle handle) Detach from an event registered in RegisterForEvent once it is no longer needed to free up the memory it occupies. |
void | UnbindCall(BoundEventHandle handle) It detaches from an already registered call with BindCall once it is no longer needed to free up the memory it occupies. |
void | Destroy(uint systemId) Marks the native view for deletion, instead of deleting it on its own. If ViewRenderer has already been deleted, the actual deletion of the Native View object will occur on the next update of CohtmlUISystem. This method is deprecated, please use MarkForDestroy instead. |
void | MarkForDestroy(uint systemId) Marks the native view for deletion. Before this method must send a Plugin Render event request to destroy the View Renderer. You can use cohtml.CohtmlView.MarkForDestroyViewRenderer method for reference. Note that this operation will happen on the render thread. After the ViewRenderer is successfully deleted, the actual deletion of the Native View object will occur on the next update of CohtmlUISystem. systemIdID of the system that creates this Native View. |
virtual void | LoadURL(string url) Loads a page in the View. |
virtual void | Reload() Reloads the current page in the view. |
virtual void | UnloadDocument() Unloads the HTML document. This will remove the entire DOM tree, so nothing will rendered but the view object will still be usable and another document might be loaded using View.LoadURL. |
virtual void | ClearNavigationHistory() Clears the navigation history accessed from JavaScript History object Use that method after View.LoadURL to reset the navigation history in case the view is reused to display unrelated page. |
virtual uint | GetId() Returns the unique ID of the View. |
virtual int | GetTaskFamilyId() Returns the Task Family Id that can be used to schedule Layout work in an auxiliary thread. |
virtual void | Resize(uint width, uint height) Resizes the View contents. You must also update the texture for the ViewRenderer with the SetRenderTarget method |
virtual void | SetUserBackgroundOffset(float x, float y) Set the user background offset. This has to be the location of the upper left corner of the UI texture relative to the upper left corner of the user background texture. |
virtual void | SetResolutionForRendering(uint width, uint height) Sets a resolution for rendering. This allows setting one size for the HTML (via the Resize method) and authoring the UI for that resolution, while here you can tell the SDK that it should render the UI into a different-sized texture. The ViewRenderer’s render target could be of a different size, although usually you’d want to have the resolution for rendering and ViewRenderer RT size to be the same. This API is useful for implementing a LOD system |
virtual uint | GetWidth() Gets the View width. |
virtual uint | GetHeight() Gets the View height. |
virtual void | OnListenerLost() Informs the View that its listener has been lost. |
virtual void | EnableRendering(bool value) Enables or disables the recording of rendering commands for the view. Enabled by default. |
virtual void | EnableImmediateLayout(bool isEnabled) Enables or disables immediate layout. Disabled by default. |
virtual bool | IsImmediateLayoutEnabled() Returns whether or not immediate layout is enabled. |
virtual void | ContinuousRepaint(bool enable) Debugging flag. This will cause the View to re-draw itself each frame. |
virtual void | EnableUISurfacePartitioning(bool enable) Enable/Disable the UI partitioning mode. In this mode coh-partitioned elements wiil be rendered in persistent scratch textures. |
virtual void | ShowPaintRectangles(bool show) Debugging flag. This will cause the View show which parts of the texture are re-drawn each frame. |
virtual void | ShowElementAABBs(bool show) Debugging flag. This will cause the View to draw the bounding-boxes of all elements. |
virtual void | EmitRenderingMetadata(bool emit) Debugging flag. Enabling this will request the library to attach and emit metadata for every rendering command in the rendering backend. The metadata will contain the ID, CLASS and Node type of the Element that caused the drawing command. As multiple elements can be batched in the same command, the metadata will be a concatenated list of all Elements that have contributed to the batch. The user can emit the metadata in rendering & GPU debugging tools like PIX, RenderDoc, Razor etc. in order to gain better insight on the rendering operations & performance. |
virtual bool | SetAdditionalFontFallbacks(string fontFamilies) Sets fallback font families that will be used by all elements. Additional font families do not affect computed styles of an element. |
virtual DebugDump | DebugDumpDOMTree(uint flags) Debugging helper. Collects a comprehensive DOM structure dump. |
virtual DebugDump | DebugDumpStackingContextTree() Debugging helper. Collects data about stacking context subtrees of the DOM tree. |
virtual bool | IMESetComposition(string composition, uint targetStart, uint targetEnd) Updates the internal state of the IME composition in the View. |
virtual bool | IMEConfirmComposition(string composition) Confirms the current IME composition. |
virtual bool | IMECancelComposition() Cancels the current IME composition. |
virtual float | GetStartPanThreshold() Returns the minimum length of pans to be performed. |
virtual void | SetStartPanThreshold(float value) Sets the minimum length of pans to be performed. |
virtual void | SetUserAgent(string userAgent) Sets the User Agent string. |
virtual ImagesList | GetUsedImagesList(Options options) Return a list of images currently in use by the View The list can be used to decide which images to pre-load or use for JS-based loading screens. The list is a current snapshot of the state of the View. Once built it will not change even if the View does. The user has to call the method again if she wants such changes applied. |
virtual void | EndCaptureDebugFrame() Ends serializing rendered frames. |
virtual void | EndCaptureBackendDebugFrame() Ends serializing backend commands. |
virtual void | QueueSetCacheCountSize(InternalCaches cache, uint capacity) Queue task to set the maximum number of objects in internal cache. This takes effect at the next Advance/Paint cycle the ICACHE_ScratchLayerTextures doesn’t have this statistic |
virtual void | QueueSetCacheBytesSize(InternalCaches cache, uint capacity) Queue task to set the maximum bytes allowed for internal cache. This takes effect at the next Advance/Paint cycle only the ICACHE_Textures and the ICACHE_ScratchLayerTextures have the bytes statistic |
virtual void | QueueClearCaches(uint caches) Queue a task to clear an internal caches list. This takes effect at the next Advance/Paint cycle |
virtual void | UnregisterFromEvent(global.System.IntPtr handle) Remove a registered C++ handler. |
virtual void | UnbindCall(global.System.IntPtr handle) Remove a bound C++ handler. |
virtual void | UnbindObject(global.System.IntPtr arg0) Remove all handlers bound to a specific object. |
virtual void | DestroyExposedArray(global.System.IntPtr array) Remove exposed array from JavaScript. |
virtual bool | IsReadyForBindings() Checks whether the cohtml.js bindings are initialized and ready to use. |
virtual string | GetCurrentScriptStackTrace(int frameLimit) Get the current script stack trace. |
virtual string | GetCurrentScriptStackTrace() Get the current script stack trace. |
virtual void | ExecuteScript(string script) Execute arbitrary JavaScript code. This should be called only with a valid script context created. |
virtual void | AddInitialScript(string script) Schedules execution of JavaScript code on every page load. Can be called at any time. The scripts will be executed on the next page load in the same order they were added. |
virtual void | ResetInitialScripts() Resets the list of initial scripts executed on every page load. |
virtual void | TerminateScriptExecution() Forcefully terminates the current script execution. A script execution is any callback in the scripting or script tag evaluation. Therefore in order to terminate a very long running View method you may need to call TerminateScriptExecution more than once. It may be called on a different thread, but you must ensure that the View is still alive. Termination will throw uncaught exception in the script This method works only on platforms with V8 as scripting engine |
virtual global.System.IntPtr | GetBinder() Returns a pointer to the internal binder. |
virtual bool | SetCustomMediaFeature(string name, string value) Enables a media feature with the given name and value. |
virtual void | ResetCustomMediaFeatures() Disables all currently enabled custom media features. |
virtual void | SynchronizeModels() Applies the changes accumulated by View.UpdateWholeModel to the corresponding JavaScript objects. |
virtual global.System.IntPtr | ReservedMethod(global.System.IntPtr command, global.System.IntPtr data) Reserved method for internal usage. Do not use. |
virtual void | TriggerEvent(string name) Triggers a UI event. |
void | TouchEvent(TouchEventData [] touches, uint count) Sends a touch input event to the View |
void | KeyEvent(KeyEventData arg0) Sends a keyboard input event to the View |
void | MouseEvent(MouseEventData arg0) Sends a mouse input event to the View |
void | GestureEvent(GestureEventData arg0) Sends a gesture input event to the View |
uint | GetCacheCountFilled(InternalCaches cache) Get info about the number of objects statistic of a particular internal cache |
uint | GetCacheBytesStatsFilled(InternalCaches cache) Get info about the bytes statistic of a particular internal cache |
void | Advance(uint systemId, double time) Advances the internal timer of the View and runs all animations. If changes have happened in the page, this call will also trigger a new layout and render on the other threads. |
void | MarkViewForDestroyInternal(uint systemId) |
Protected Attributes
Name | |
---|---|
bool | swigCMemOwn |
Detailed Description
class cohtml.Net.View;
Partial class view which holds additional TriggerEvent methods. Other partial class cohtml.Net.View will be generated from SWIG generation.
The View represents a UI page with its DOM, styles and JavaScript context. Think of the View as a whole UI or UI element. The View for instance could be the whole HUD of a game. All View APIs, unless explicitly stated otherwise, can be called on any thread, but should not be used on multiple threads simultaneously.
Public Functions Documentation
function TriggerEvent< T1 >
virtual void TriggerEvent< T1 >(
string name,
T1 argument1
)
Trigger event in view
Parameters:
- name name of the event
- argument1 argument for the event
Template Parameters:
- T1 Type for the event argument
function TriggerEvent< T1, T2 >
virtual void TriggerEvent< T1, T2 >(
string name,
T1 argument1,
T2 argument2
)
Parameters:
- name name of the event
- argument1 argument for the event
- argument2 argument for the event
Template Parameters:
- T1 Type for the event argument
- T2 Type for the event argument
function TriggerEvent< T1, T2, T3 >
virtual void TriggerEvent< T1, T2, T3 >(
string name,
T1 argument1,
T2 argument2,
T3 argument3
)
Parameters:
- name name of the event
- argument1 argument for the event
- argument2 argument for the event
- argument3 argument for the event
Template Parameters:
- T1 Type for the event argument
- T2 Type for the event argument
- T3 Type for the event argument
function TriggerEvent< T1, T2, T3, T4 >
virtual void TriggerEvent< T1, T2, T3, T4 >(
string name,
T1 argument1,
T2 argument2,
T3 argument3,
T4 argument4
)
Parameters:
- name name of the event
- argument1 argument for the event
- argument2 argument for the event
- argument3 argument for the event
- argument4 argument for the event
Template Parameters:
- T1 Type for the event argument
- T2 Type for the event argument
- T3 Type for the event argument
- T4 Type for the event argument
function TriggerEvent< T1, T2, T3, T4, T5 >
virtual void TriggerEvent< T1, T2, T3, T4, T5 >(
string name,
T1 argument1,
T2 argument2,
T3 argument3,
T4 argument4,
T5 argument5
)
Parameters:
- name name of the event
- argument1 argument for the event
- argument2 argument for the event
- argument3 argument for the event
- argument4 argument for the event
- argument5 argument for the event
Template Parameters:
- T1 Type for the event argument
- T2 Type for the event argument
- T3 Type for the event argument
- T4 Type for the event argument
- T5 Type for the event argument
function TriggerEvent< T1, T2, T3, T4, T5, T6 >
virtual void TriggerEvent< T1, T2, T3, T4, T5, T6 >(
string name,
T1 argument1,
T2 argument2,
T3 argument3,
T4 argument4,
T5 argument5,
T6 argument6
)
Parameters:
- name name of the event
- argument1 argument for the event
- argument2 argument for the event
- argument3 argument for the event
- argument4 argument for the event
- argument5 argument for the event
- argument6 argument for the event
Template Parameters:
- T1 Type for the event argument
- T2 Type for the event argument
- T3 Type for the event argument
- T4 Type for the event argument
- T5 Type for the event argument
- T6 Type for the event argument
function TriggerEvent< T1, T2, T3, T4, T5, T6, T7 >
virtual void TriggerEvent< T1, T2, T3, T4, T5, T6, T7 >(
string name,
T1 argument1,
T2 argument2,
T3 argument3,
T4 argument4,
T5 argument5,
T6 argument6,
T7 argument7
)
Parameters:
- name name of the event
- argument1 argument for the event
- argument2 argument for the event
- argument3 argument for the event
- argument4 argument for the event
- argument5 argument for the event
- argument6 argument for the event
- argument7 argument for the event
Template Parameters:
- T1 Type for the event argument
- T2 Type for the event argument
- T3 Type for the event argument
- T4 Type for the event argument
- T5 Type for the event argument
- T6 Type for the event argument
- T7 Type for the event argument
function TriggerEvent< T1, T2, T3, T4, T5, T6, T7, T8 >
virtual void TriggerEvent< T1, T2, T3, T4, T5, T6, T7, T8 >(
string name,
T1 argument1,
T2 argument2,
T3 argument3,
T4 argument4,
T5 argument5,
T6 argument6,
T7 argument7,
T8 argument8
)
Parameters:
- name name of the event
- argument1 argument for the event
- argument2 argument for the event
- argument3 argument for the event
- argument4 argument for the event
- argument5 argument for the event
- argument6 argument for the event
- argument7 argument for the event
- argument8 argument for the event
Template Parameters:
- T1 Type for the event argument
- T2 Type for the event argument
- T3 Type for the event argument
- T4 Type for the event argument
- T5 Type for the event argument
- T6 Type for the event argument
- T7 Type for the event argument
- T8 Type for the event argument
function Dispose
virtual void Dispose()
function BindCall
BoundEventHandle BindCall(
string name,
global.System.Delegate handler
)
Used to call only one registered handler and can return a result from it. Can be called with zero, one, or more arguments. For that purpose you must use a a promise in the JS, which returns the result from the C# handler.
Parameters:
- name The name of the event, with it you can call the handler from the UI/JS side.
- handler The method to invoke when the event is called. You can attach a delegate with arguments, as well as a return result type.
Return: Handle for registered delegates
function RegisterForEvent
BoundEventHandle RegisterForEvent(
string name,
global.System.Delegate handler
)
Used to subscribe one or multiple handlers to the event. It does not return a result.
Parameters:
- name The name of the event, which you can use to trigger the handler(s) from the JS side.
- handler The method to invoke when the event is triggered. You can also attach a delegate with arguments.
Return: Handle for registered delegates
function UnregisterFromEvent
void UnregisterFromEvent(
BoundEventHandle handle
)
Detach from an event registered in RegisterForEvent once it is no longer needed to free up the memory it occupies.
Parameters:
- handle BoundEventHandle pointer, saved when the event was created.
function UnbindCall
void UnbindCall(
BoundEventHandle handle
)
It detaches from an already registered call with BindCall once it is no longer needed to free up the memory it occupies.
Parameters:
- handle BoundEventHandle pointer, saved when the event was created.
function Destroy
void Destroy(
uint systemId
)
Marks the native view for deletion, instead of deleting it on its own. If ViewRenderer has already been deleted, the actual deletion of the Native View object will occur on the next update of CohtmlUISystem. This method is deprecated, please use MarkForDestroy instead.
function MarkForDestroy
void MarkForDestroy(
uint systemId
)
Marks the native view for deletion. Before this method must send a Plugin Render event request to destroy the View Renderer. You can use cohtml.CohtmlView.MarkForDestroyViewRenderer method for reference. Note that this operation will happen on the render thread. After the ViewRenderer is successfully deleted, the actual deletion of the Native View object will occur on the next update of CohtmlUISystem. systemIdID of the system that creates this Native View.
function LoadURL
virtual void LoadURL(
string url
)
Loads a page in the View.
Parameters:
- url A URL for the page to be loaded. Must be a valid URL. Spaces aren’t allowed.
Note: Calling View.LoadURL pushes states in the navigation history. If thats undesired, call View.ClearNavigationHistory next.
function Reload
virtual void Reload()
Reloads the current page in the view.
function UnloadDocument
virtual void UnloadDocument()
Unloads the HTML document. This will remove the entire DOM tree, so nothing will rendered but the view object will still be usable and another document might be loaded using View.LoadURL.
function ClearNavigationHistory
virtual void ClearNavigationHistory()
Clears the navigation history accessed from JavaScript History object Use that method after View.LoadURL to reset the navigation history in case the view is reused to display unrelated page.
function GetId
virtual uint GetId()
Returns the unique ID of the View.
function GetTaskFamilyId
virtual int GetTaskFamilyId()
Returns the Task Family Id that can be used to schedule Layout work in an auxiliary thread.
function Resize
virtual void Resize(
uint width,
uint height
)
Resizes the View contents. You must also update the texture for the ViewRenderer with the SetRenderTarget method
Parameters:
function SetUserBackgroundOffset
virtual void SetUserBackgroundOffset(
float x,
float y
)
Set the user background offset. This has to be the location of the upper left corner of the UI texture relative to the upper left corner of the user background texture.
Parameters:
- x The x coordinate of the upper left corner where the UI texture will be drawn
- y The y coordinate of the upper left corner where the UI texture will be drawn
function SetResolutionForRendering
virtual void SetResolutionForRendering(
uint width,
uint height
)
Sets a resolution for rendering. This allows setting one size for the HTML (via the Resize method) and authoring the UI for that resolution, while here you can tell the SDK that it should render the UI into a different-sized texture. The ViewRenderer’s render target could be of a different size, although usually you’d want to have the resolution for rendering and ViewRenderer RT size to be the same. This API is useful for implementing a LOD system
Parameters:
- width the width component of the resolution to render to
- height the height component of the resolution to render to
function GetWidth
virtual uint GetWidth()
Gets the View width.
function GetHeight
virtual uint GetHeight()
Gets the View height.
function OnListenerLost
virtual void OnListenerLost()
Informs the View that its listener has been lost.
function EnableRendering
virtual void EnableRendering(
bool value
)
Enables or disables the recording of rendering commands for the view. Enabled by default.
Parameters:
- value whether to enable the recording of rendering commands
Note: You must still call Paint for resource management on the GPU.
function EnableImmediateLayout
virtual void EnableImmediateLayout(
bool isEnabled
)
Enables or disables immediate layout. Disabled by default.
Parameters:
- isEnabled whether to enable immediate layout
function IsImmediateLayoutEnabled
virtual bool IsImmediateLayoutEnabled()
Returns whether or not immediate layout is enabled.
function ContinuousRepaint
virtual void ContinuousRepaint(
bool enable
)
Debugging flag. This will cause the View to re-draw itself each frame.
Parameters:
- enable whether to enable the continuous repaint mode
Note: this flag will have a significant impact on performance. Use for debugging purposes ONLY.
function EnableUISurfacePartitioning
virtual void EnableUISurfacePartitioning(
bool enable
)
Enable/Disable the UI partitioning mode. In this mode coh-partitioned elements wiil be rendered in persistent scratch textures.
Parameters:
- enable whether to enable the UI partitioning mode
function ShowPaintRectangles
virtual void ShowPaintRectangles(
bool show
)
Debugging flag. This will cause the View show which parts of the texture are re-drawn each frame.
Parameters:
- show whether to show the paint rectangles
function ShowElementAABBs
virtual void ShowElementAABBs(
bool show
)
Debugging flag. This will cause the View to draw the bounding-boxes of all elements.
Parameters:
- show whether to show the bounding-boxes of elements
function EmitRenderingMetadata
virtual void EmitRenderingMetadata(
bool emit
)
Debugging flag. Enabling this will request the library to attach and emit metadata for every rendering command in the rendering backend. The metadata will contain the ID, CLASS and Node type of the Element that caused the drawing command. As multiple elements can be batched in the same command, the metadata will be a concatenated list of all Elements that have contributed to the batch. The user can emit the metadata in rendering & GPU debugging tools like PIX, RenderDoc, Razor etc. in order to gain better insight on the rendering operations & performance.
Parameters:
- emit whether to emit or not the metadata - disabled by default
Note: The option should only be used during development as it has a perceivable CPU cost associated.
function SetAdditionalFontFallbacks
virtual bool SetAdditionalFontFallbacks(
string fontFamilies
)
Sets fallback font families that will be used by all elements. Additional font families do not affect computed styles of an element.
Parameters:
- fontFamilies font families to be applied (use CSS font-family property format: “Arial, Roboto”)
Return: if font families were parsed or cleared successfully. The value was not changed if return value is false
Note: pass nullptr or empty string to clear additional fallbacks.
function DebugDumpDOMTree
virtual DebugDump DebugDumpDOMTree(
uint flags
)
Debugging helper. Collects a comprehensive DOM structure dump.
function DebugDumpStackingContextTree
virtual DebugDump DebugDumpStackingContextTree()
Debugging helper. Collects data about stacking context subtrees of the DOM tree.
function IMESetComposition
virtual bool IMESetComposition(
string composition,
uint targetStart,
uint targetEnd
)
Updates the internal state of the IME composition in the View.
Parameters:
- composition the composition string so far
- targetStart the index at the start of the selection
- targetEnd the index at the end of the selection
Return: the outcome of the operation (will fail if there isn’t a focused input field)
function IMEConfirmComposition
virtual bool IMEConfirmComposition(
string composition
)
Confirms the current IME composition.
Parameters:
- composition the string to confirm
Return: the outcome of the operation (will fail if there isn’t a focused input field)
function IMECancelComposition
virtual bool IMECancelComposition()
Cancels the current IME composition.
Return: the outcome of the operation (will fail if there isn’t a focused input field)
function GetStartPanThreshold
virtual float GetStartPanThreshold()
Returns the minimum length of pans to be performed.
function SetStartPanThreshold
virtual void SetStartPanThreshold(
float value
)
Sets the minimum length of pans to be performed.
Parameters:
- value the minimum length in pixels
function SetUserAgent
virtual void SetUserAgent(
string userAgent
)
Sets the User Agent string.
Parameters:
- userAgent the user agent string
function GetUsedImagesList
virtual ImagesList GetUsedImagesList(
Options options
)
Return a list of images currently in use by the View The list can be used to decide which images to pre-load or use for JS-based loading screens. The list is a current snapshot of the state of the View. Once built it will not change even if the View does. The user has to call the method again if she wants such changes applied.
Return: An object that represents an iterator over the list
Note: Call the Release method on the returned ImagesList to reclaim its memory.
function EndCaptureDebugFrame
virtual void EndCaptureDebugFrame()
Ends serializing rendered frames.
function EndCaptureBackendDebugFrame
virtual void EndCaptureBackendDebugFrame()
Ends serializing backend commands.
function QueueSetCacheCountSize
virtual void QueueSetCacheCountSize(
InternalCaches cache,
uint capacity
)
Queue task to set the maximum number of objects in internal cache. This takes effect at the next Advance/Paint cycle the ICACHE_ScratchLayerTextures doesn’t have this statistic
Parameters:
- cache specifies for which cache to set the bytes size
- capacity maximum number of objects allowed in the cache
function QueueSetCacheBytesSize
virtual void QueueSetCacheBytesSize(
InternalCaches cache,
uint capacity
)
Queue task to set the maximum bytes allowed for internal cache. This takes effect at the next Advance/Paint cycle only the ICACHE_Textures and the ICACHE_ScratchLayerTextures have the bytes statistic
Parameters:
- cache specifies for which cache to set the count size
- capacity maximum bytes allowed in the cache
function QueueClearCaches
virtual void QueueClearCaches(
uint caches
)
Queue a task to clear an internal caches list. This takes effect at the next Advance/Paint cycle
Parameters:
- caches a bit field listing all caches to clear
function UnregisterFromEvent
virtual void UnregisterFromEvent(
global.System.IntPtr handle
)
Remove a registered C++ handler.
Parameters:
- handle the handle of the event handler to be unregistered
Warning: Unregistering a handler inside the handler callback is not supported and will result in undefined behavior
function UnbindCall
virtual void UnbindCall(
global.System.IntPtr handle
)
Remove a bound C++ handler.
Parameters:
- handle the handle of the handler to be unbound
Warning: Unbinding a handler inside the handler callback is not supported and will result in undefined behavior
function UnbindObject
virtual void UnbindObject(
global.System.IntPtr arg0
)
Remove all handlers bound to a specific object.
Warning: Unbinding the object inside the handler callback is not supported and will result in undefined behavior
function DestroyExposedArray
virtual void DestroyExposedArray(
global.System.IntPtr array
)
Remove exposed array from JavaScript.
Parameters:
- array - the array pointer provided when binding the array with Binder.TryBindArrayByRef
function IsReadyForBindings
virtual bool IsReadyForBindings()
Checks whether the cohtml.js bindings are initialized and ready to use.
Return: true, if the view is ready to accept JavaScript bindings, false otherwise.
function GetCurrentScriptStackTrace
virtual string GetCurrentScriptStackTrace(
int frameLimit
)
Get the current script stack trace.
Parameters:
- frameLimit the maximum number of stack frames to capture
Return: the current script stack trace
Note: The returned pointer is valid until the next call to this method To free the used memory call again with zero frameLimit
function GetCurrentScriptStackTrace
virtual string GetCurrentScriptStackTrace()
Get the current script stack trace.
Return: the current script stack trace
Note: The returned pointer is valid until the next call to this method To free the used memory call again with zero frameLimit
function ExecuteScript
virtual void ExecuteScript(
string script
)
Execute arbitrary JavaScript code. This should be called only with a valid script context created.
Parameters:
- script code to be evaluated in the context of the main frame of the view
function AddInitialScript
virtual void AddInitialScript(
string script
)
Schedules execution of JavaScript code on every page load. Can be called at any time. The scripts will be executed on the next page load in the same order they were added.
Parameters:
- script code to be evaluated in the context of the main frame of the view
function ResetInitialScripts
virtual void ResetInitialScripts()
Resets the list of initial scripts executed on every page load.
function TerminateScriptExecution
virtual void TerminateScriptExecution()
Forcefully terminates the current script execution. A script execution is any callback in the scripting or script tag evaluation. Therefore in order to terminate a very long running View method you may need to call TerminateScriptExecution more than once. It may be called on a different thread, but you must ensure that the View is still alive. Termination will throw uncaught exception in the script This method works only on platforms with V8 as scripting engine
function GetBinder
virtual global.System.IntPtr GetBinder()
Returns a pointer to the internal binder.
function SetCustomMediaFeature
virtual bool SetCustomMediaFeature(
string name,
string value
)
Enables a media feature with the given name and value.
Parameters:
- name of the feature
- value of the feature
Return: a flag to indicate the success of the operation
function ResetCustomMediaFeatures
virtual void ResetCustomMediaFeatures()
Disables all currently enabled custom media features.
function SynchronizeModels
virtual void SynchronizeModels()
Applies the changes accumulated by View.UpdateWholeModel to the corresponding JavaScript objects.
function ReservedMethod
virtual global.System.IntPtr ReservedMethod(
global.System.IntPtr command,
global.System.IntPtr data
)
Reserved method for internal usage. Do not use.
function TriggerEvent
virtual void TriggerEvent(
string name
)
Triggers a UI event.
function TouchEvent
void TouchEvent(
TouchEventData [] touches,
uint count
)
Sends a touch input event to the View
Parameters:
- touches an array of touch events
- count the count of events passed
function KeyEvent
void KeyEvent(
KeyEventData arg0
)
Sends a keyboard input event to the View
function MouseEvent
void MouseEvent(
MouseEventData arg0
)
Sends a mouse input event to the View
function GestureEvent
void GestureEvent(
GestureEventData arg0
)
Sends a gesture input event to the View
function GetCacheCountFilled
uint GetCacheCountFilled(
InternalCaches cache
)
Get info about the number of objects statistic of a particular internal cache
Parameters:
- cache specifies for which cache to return the info about the count statistic
Warning: the ICACHE_ScratchLayerTextures doesn’t currently have the count statistic
Note: the filled count in cache can be higher than the capacity, because some caches are pruned at the end of the frame.
function GetCacheBytesStatsFilled
uint GetCacheBytesStatsFilled(
InternalCaches cache
)
Get info about the bytes statistic of a particular internal cache
Parameters:
- cache specifies for which cache to return the info about the bytes statistic
Warning: only the ICACHE_Textures and the ICACHE_ScratchLayerTextures have the bytes statistic
Note: the filled bytes in cache can be higher than the capacity, because some caches are pruned at the end of the frame.
function Advance
void Advance(
uint systemId,
double time
)
Advances the internal timer of the View and runs all animations. If changes have happened in the page, this call will also trigger a new layout and render on the other threads.
Parameters:
- systemId the system’s Id which that view depend on.
function MarkViewForDestroyInternal
void MarkViewForDestroyInternal(
uint systemId
)
Protected Attributes Documentation
variable swigCMemOwn
bool swigCMemOwn;