Class that encapsulates a UI More...
Public Member Functions | |
BoundEventHandle | BindCall (string name, System.Delegate handler) |
Expose C++ handler to be called from UI. More... | |
BoundEventHandle | RegisterForEvent (string name, System.Delegate handler) |
Expose C++ handler to be called when a specific event occurs. More... | |
void | UnregisterFromEvent (BoundEventHandle handle) |
Remove a registered C++ handler. More... | |
void | UnbindCall (BoundEventHandle handle) |
Remove a bound C++ handler. More... | |
void | UnbindObject (object target) |
Remove all handlers bound to a specific object. More... | |
virtual ViewContext | GetContext () |
Get the view context. More... | |
virtual ViewType | GetViewType () |
Get the type of the view. More... | |
virtual void | Destroy () |
Destroys this view. After a call to Destroy calling any other method except the destructor results in undefined behavior More... | |
virtual void | SetFocus () |
Sets this view on focus. More... | |
virtual void | KillFocus () |
Removes the focus from this view. More... | |
virtual void | MouseEvent (MouseEventData arg0) |
Sends a mouse event to the UI renderer. More... | |
virtual void | KeyEvent (KeyEventData arg0) |
Sends a key event to the UI renderer. More... | |
virtual void | TouchEvent (TouchEventData events, uint count) |
Sends a touch event to the UI renderer. More... | |
virtual void | MouseActivate () |
Sends a mouse event to the UI renderer. More... | |
virtual int | GetWidth () |
Gets the width of the More... | |
virtual int | GetHeight () |
Gets the height of the More... | |
virtual void | Resize (uint width, uint height) |
Send a resize event to the UI renderer. Resize will result in multiple calls to CreateBuffers and DestroyBuffers in the listener More... | |
virtual void | IssueMouseOnUIQuery (float normX, float normY) |
Issues a query on the Calling IsMouseOnView while a query is in-flight is an error and will be logged - the result returned by IsMouseOnView in that case is undefined. More... | |
virtual ViewErrorType | HasMouseQueryFinished () |
Returns the status of the mouse query. More... | |
virtual void | FetchMouseOnUIQuery () |
Ends a mouse-on-UI query. Waits for the result. Should be called as far apart from IssueMouseOnUIQuery in order to maximize the chances that the query has finished at the time of this call and no waiting will be performed More... | |
virtual bool | IsMouseOnView () |
Checks if the mouse is currently on the logical view (a part of the view that has elements on it) or not (click-through). Uses the coordinates last set in IssueMouseOnUIQuery. Calling the method while a query is in-flight (between a call to IssueMouseOnUIQuery and FetchMouseOnUIQuery) results in a warning and the return result is undefined More... | |
virtual void | SetClickThroughAlphaThreshold (float threshold) |
The alpha value of the pixels is used to determine if the mouse is on an element or on the background (click-through). All pixels below or equal to the alpha threshold (default = 0) are marked as not-belonging to the More... | |
virtual float | GetClickThroughAlphaThreshold () |
Get the currently set alpha threshold for click-through queries. More... | |
virtual bool | UsesSharedMemory () |
Tells if this view uses shared memory for image transport. More... | |
virtual bool | IsTransparent () |
Tells if this view is transparent or not. More... | |
virtual bool | SupportsClickThrough () |
Tells if this view supports click-through queries or not. More... | |
virtual void | Redraw () |
Request a redraw of the current view. More... | |
virtual void | DownloadUrl (string path) |
Initiates a download request on the specified path. More... | |
virtual void | Load (string path) |
Loads a new path in the More... | |
virtual void | Reload (bool ignoreCache) |
Reloads the last requested or navigated-to path. More... | |
virtual string | GetCurentViewPath () |
Get the last requested or navigated-to path. More... | |
virtual string | GetLastRequestedPath () |
Get the last requested path to load for the More... | |
virtual string | GetLastLoadedPath () |
Get the last successfully loaded path for the More... | |
virtual string | GetLastFailedPath () |
Get the last failed path for the More... | |
virtual void | ExecuteScript (string script) |
Execute arbitrary JavaScript code. More... | |
virtual void | TriggerEvent (string eventName) |
Triggers a UI event. More... | |
virtual void | ReplyToJavaScriptMessage (bool success, string userInput) |
Sends a reply to a javascript message triggered for the view. More... | |
virtual void | AuthCredentialsResponse (string username, string password, bool success) |
Sends credentials for a pending authentication request for the view. More... | |
virtual void | SetScriptError (ScriptCallErrorType error, string message) |
Sets an error for the currently executing handler. More... | |
virtual void | InterceptURLRequests (bool intercept) |
Controls intercepting URL requests. For each request More... | |
virtual void | IMEActivate (bool active) |
Sets if the More... | |
virtual bool | IMEIsActive () |
Tells if IME events are currently active for this view. More... | |
virtual bool | IMESetComposition (string composition, uint cursorPos, uint targetStart, uint targetEnd) |
Updates the internal state of the IME composition in the More... | |
virtual bool | IMEConfirmComposition (string composition) |
Confirms the current IME composition. More... | |
virtual bool | IMECancelComposition () |
Cancels the current IME composition. More... | |
virtual ImageData | CreateImageData (string name, int width, int height, IntPtr data, bool flipY) |
Create an More... | |
virtual int | GetAudioData (int streamId, IntPtr buffer, int bufferSize, int timeoutMs) |
Obtains audio data for the specified stream in the current view and copies it into the client-provided buffer. More... | |
virtual void | SetZoomLevel (double zoomLevel) |
Sets the page zoom level. Specifying 0.0 will reset to the default zoom level. The zoom factor operates on protocol and host level, meaning that all views with the same protocol and host as the current URL will be scaled as well. More... | |
virtual void | SetMasterVolume (double volume) |
Sets the master volume for all audio and video streams. More... | |
Class that encapsulates a UI
|
inlinevirtual |
Sends credentials for a pending authentication request for the view.
username | the username |
password | the password |
success | defines whether the response is valid, i.e. if the request should be answered or canceled |
|
inline |
|
inlinevirtual |
Create an
name | the name of the image data object |
width | the width of the image |
height | the height of the image |
data | initial data to fill the image data with |
flipY | flips vertically the content of the source image |
|
inlinevirtual |
Destroys this view. After a call to Destroy calling any other method except the destructor results in undefined behavior
|
inlinevirtual |
Initiates a download request on the specified path.
|
inlinevirtual |
Execute arbitrary JavaScript code.
script | code to be evaluated in the context of the main frame of the view |
|
inlinevirtual |
Ends a mouse-on-UI query. Waits for the result. Should be called as far apart from IssueMouseOnUIQuery in order to maximize the chances that the query has finished at the time of this call and no waiting will be performed
|
inlinevirtual |
Obtains audio data for the specified stream in the current view and copies it into the client-provided buffer.
streamId | the stream for which to get PCM data |
buffer | the client buffer into which the data is copied |
bufferSize | the size of the client buffer |
timeoutMs | the timeout in milliseconds to wait for audio data. Use 0 to wait indefinitely. |
|
inlinevirtual |
Get the currently set alpha threshold for click-through queries.
|
inlinevirtual |
Get the view context.
|
inlinevirtual |
Get the last requested or navigated-to path.
|
inlinevirtual |
Gets the height of the
|
inlinevirtual |
Get the last failed path for the
|
inlinevirtual |
Get the last successfully loaded path for the
|
inlinevirtual |
Get the last requested path to load for the
|
inlinevirtual |
|
inlinevirtual |
Gets the width of the
|
inlinevirtual |
Returns the status of the mouse query.
|
inlinevirtual |
Sets if the
active | whether to activate IME handling for this view |
|
inlinevirtual |
Cancels the current IME composition.
|
inlinevirtual |
Confirms the current IME composition.
composition | the string to confirm |
|
inlinevirtual |
Tells if IME events are currently active for this view.
|
inlinevirtual |
Updates the internal state of the IME composition in the
composition | the composition string so far |
the | cursor position in the composition |
targetStart | the index at the start of the selection |
targetEnd | the index at the end of the selection |
|
inlinevirtual |
Controls intercepting URL requests. For each request
intercept | whether to intercept all URL requests |
|
inlinevirtual |
Checks if the mouse is currently on the logical view (a part of the view that has elements on it) or not (click-through). Uses the coordinates last set in IssueMouseOnUIQuery. Calling the method while a query is in-flight (between a call to IssueMouseOnUIQuery and FetchMouseOnUIQuery) results in a warning and the return result is undefined
|
inlinevirtual |
Issues a query on the Calling IsMouseOnView while a query is in-flight is an error and will be logged - the result returned by IsMouseOnView in that case is undefined.
Put as much processing as possible between IssueMouseOnUIQuery and the corresponding FetchMouseOnUIQuery, this allows leveraging the cost of the query and to reduce it to ~0. The best way to do this is call IssueMouseOnUIQuery early in the frame, perform all game rendering and the call FetchMouseOnUIQuery followed by IsMouseOnView to update the needed data.
normX | the x coordinate of the mouse in the normalized space of the view [0..1] |
normY | the y coordinate of the mouse in the normalized space of the view [0..1] |
|
inlinevirtual |
Tells if this view is transparent or not.
|
inlinevirtual |
Sends a key event to the UI renderer.
event | the key event |
|
inlinevirtual |
Removes the focus from this view.
|
inlinevirtual |
Loads a new path in the
path | the path to load |
|
inlinevirtual |
Sends a mouse event to the UI renderer.
|
inlinevirtual |
Sends a mouse event to the UI renderer.
event | the mouse event |
|
inlinevirtual |
Request a redraw of the current view.
|
inline |
Expose C++ handler to be called when a specific event occurs.
name | name of the event |
handler | handler to be executed |
|
inlinevirtual |
Reloads the last requested or navigated-to path.
ignoreCache | whether to ignore the cache for the reload |
|
inlinevirtual |
Sends a reply to a javascript message triggered for the view.
success | defines whether the user replies positively to the message (i.e. clicks the OK button) |
userInput | the user reply message (only used in prompt messages) |
|
inlinevirtual |
|
inlinevirtual |
The alpha value of the pixels is used to determine if the mouse is on an element or on the background (click-through). All pixels below or equal to the alpha threshold (default = 0) are marked as not-belonging to the
threshold | sets the new alpha threshold |
|
inlinevirtual |
Sets this view on focus.
|
inlinevirtual |
Sets the master volume for all audio and video streams.
volume | coefficient between 0.0 and 1.0 |
|
inlinevirtual |
Sets an error for the currently executing handler.
error | the type of the error |
message | the error message |
|
inlinevirtual |
Sets the page zoom level. Specifying 0.0 will reset to the default zoom level. The zoom factor operates on protocol and host level, meaning that all views with the same protocol and host as the current URL will be scaled as well.
|
inlinevirtual |
Tells if this view supports click-through queries or not.
|
inlinevirtual |
Sends a touch event to the UI renderer.
events | array of touch events |
count | the count of the passed touch events in the array |
|
inlinevirtual |
Triggers a UI event.
|
inline |
Remove a bound C++ handler.
handle | the handle of the handler to be unbound |
|
inline |
Remove all handlers bound to a specific object.
object | the object whose handlers will be removed |
|
inline |
Remove a registered C++ handler.
handle | the handle of the event handler to be unregistered |
|
inlinevirtual |
Tells if this view uses shared memory for image transport.