Coherent UI for Unity3D  2.5.3
A modern user interface library for games
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Coherent.UI.ViewListener Class Reference

Interface that allows clients to listen to More...

+ Inheritance diagram for Coherent.UI.ViewListener:

Public Member Functions

override void Release ()
 Called when the listener is no longer needed by the UI context. More...
 
override void OnViewCreated (View view)
 Called when the requested More...
 
override void OnDraw (CoherentHandle handle, bool usesSharedMemory, int width, int height)
 Called when a new surface has been drawn and is ready to use by the client. More...
 
override void OnFinishLoad (int frameId, string validatedPath, bool isMainFrame, int statusCode, HTTPHeader[] headers)
 Called when a frame has been successfully loaded. More...
 
override void OnFailLoad (int frameId, string validatedPath, bool isMainFrame, string error)
 Called when a frame has been failed loading. More...
 
override void OnURLRequest (URLRequest request)
 Called before an URL request is made. The default implementation allows all requests. More...
 
override void OnReadyForBindings (int frameId, string path, bool isMainFrame)
 Called when a frame is ready for bindings. More...
 
override void OnBindingsReleased (int frameId, string path, bool isMainFrame)
 Called when the bindings for frame are released. More...
 
override void OnStartLoading ()
 Called when a new path has started loading. More...
 
override void OnStopLoading ()
 Called when all load operations have completed. More...
 
override void OnNavigateTo (string path)
 Called when the view starts navigation to a new path. More...
 
override void OnError (ViewError error)
 Called when an error occurs for this specific More...
 
override void OnScriptMessage (ViewListenerBase.MessageLevel level, string message, string sourceId, int line)
 Called when a message is sent from a script running in this specific More...
 
override void OnCursorChanged (CursorTypes cursor)
 Called when the cursor has changed internally in the More...
 
override void OnCallback (string eventName, Binding.CallbackArguments arguments)
 Called by the UI when there is no registered handler for this event. More...
 
override void OnJavaScriptMessage (string message, string defaultPrompt, string frameUrl, int messageType)
 Called when the view triggered a javascript message box, i.e. an alert, confirmation dialog or a prompt dialog. More...
 
override void OnGetAuthCredentials (bool isProxy, string host, uint port, string realm, string scheme)
 Called when a view requires authentication credentials. More...
 
override void CreateSurface (bool sharedMemory, uint width, uint height, SurfaceResponse response)
 Called when the The format for DirectX9 must be D3DFMT_A8R8G8B8 The format for DirectX10 and DirectX11 must be B8G8R8A8_UNORM More...
 
override void DestroySurface (CoherentHandle surface, bool usesSharedMemory)
 Called when a surface is unneeded anymore and should be destroyed This function can be called from a thread different than the main UI context thread in order to support client applications with multi-threaded rendering. More...
 
override void OnCertificateError (string url, CertificateStatus status, Certificate certificate, CertificateErrorResponse response)
 Called when there is an error with the certificate of a particular URL. the certificate and response pointers are valid only for the duration of this call More...
 
override void OnRequestMediaStream (MediaStreamRequest request)
 Called when the view requests access to a media stream. Media streams are the audio capture (microphone) and video capture (camera) devices on the system. More...
 
override void OnTextInputTypeChanged (TextInputControlType type, bool canComposeInline)
 Called when the current text input control changes (i.e. the user click an edit-box). Use this methof to decide when to allow for IME input. the method will be called ONLY if IME is activated on this View. View::IMEActivate More...
 
override void OnCaretRectChanged (uint x, uint y, uint width, uint height)
 Called when the caret changes during IME composition. You can use this method to correctly position a custom IME control & candidate list. More...
 
override void OnIMEShouldCancelComposition ()
 Called when the user must cancel the IME composition due to an event in the More...
 
override bool OnCanCreateChildWindow (string openerUrl, string targetUrl, ChildViewInfo childViewInfo)
 Called when the view wants to open a new window. More...
 
override void OnFileSelectRequest (FileSelectRequest request)
 Called when the view requests file selection. It could be either single file, directory or multiple files. More...
 
override void OnAudioStreamCreated (int streamId, int channels, int bitDepth, int frequency)
 Called when a new WebAudio stream is created. This is usually when the page is loading (for <audio> HTML tags). More...
 
override void OnAudioStreamPlay (int streamId)
 Called when a WebAudio stream is played. More...
 
override void OnAudioStreamPause (int streamId)
 Called when a WebAudio stream is stopped. More...
 
override void OnAudioStreamClose (int streamId)
 Called when a WebAudio stream is closed. This is usually called when the page is unloading. More...
 

Events

CoherentUI_OnViewCreated ViewCreated
 Fired when the requested More...
 
CoherentUI_OnDraw Draw
 Fired when a new surface has been drawn and is ready to use by the client. More...
 
CoherentUI_OnFinishLoad FinishLoad
 Fired when a frame has been successfully loaded. More...
 
CoherentUI_OnFailLoad FailLoad
 Fired when a frame has been failed loading. More...
 
CoherentUI_OnURLRequest URLRequest
 Fired before an URL request is made. The default implementation allows all requests. More...
 
CoherentUI_OnReadyForBindings ReadyForBindings
 Fired when a frame is ready for bindings. More...
 
CoherentUI_OnBindingsReleased BindingsReleased
 Fired when the bindings for frame are released. More...
 
CoherentUI_OnStartLoading StartLoading
 Fired when a new path has started loading. More...
 
CoherentUI_OnStopLoading StopLoading
 Fired when all load operations have completed. More...
 
CoherentUI_OnNavigateTo NavigateTo
 Fired when the view starts navigation to a new path. More...
 
CoherentUI_OnError Error
 Fired when an error occurs for this specific More...
 
CoherentUI_OnScriptMessage ScriptMessage
 Fired when a message is sent from a script running in this specific More...
 
CoherentUI_OnCursorChanged CursorChanged
 Fired when the cursor has changed internally in the More...
 
CoherentUI_OnCallback Callback
 Fired by the UI when there is no registered handler for this event. More...
 
CoherentUI_OnJavaScriptMessage JavaScriptMessage
 Fired when the view triggered a javascript message box, i.e. an alert, confirmation dialog or a prompt dialog. More...
 
CoherentUI_OnGetAuthCredentials GetAuthCredentials
 Fired when a view requires authentication credentials. More...
 
CoherentUI_OnCertificateError CertificateError
 Fired when there is an error with the certificate of a particular URL. the certificate and response pointers are valid only for the duration of this call More...
 
CoherentUI_OnRequestMediaStream RequestMediaStream
 Fired when the view requests access to a media stream. Media streams are the audio capture (microphone) and video capture (camera) devices on the system. More...
 
CoherentUI_OnTextInputTypeChanged TextInputTypeChanged
 Fired when the current text input control changes (i.e. the user click an edit-box). Use this methof to decide when to allow for IME input. the method will be called ONLY if IME is activated on this View. View::IMEActivate More...
 
CoherentUI_OnCaretRectChanged CaretRectChanged
 Fired when the caret changes during IME composition. You can use this method to correctly position a custom IME control & candidate list. More...
 
CoherentUI_OnIMEShouldCancelComposition IMEShouldCancelComposition
 Fired when the user must cancel the IME composition due to an event in the More...
 
CoherentUI_OnFileSelectRequest FileSelectRequest
 Fired when the view requests file selection. It could be either single file, directory or multiple files. More...
 
CoherentUI_OnAudioStreamCreated AudioStreamCreated
 Fired when a new WebAudio stream is created. This is usually when the page is loading (for <audio> HTML tags). More...
 
CoherentUI_OnAudioStreamPlay AudioStreamPlay
 Fired when a WebAudio stream is played. More...
 
CoherentUI_OnAudioStreamPause AudioStreamPause
 Fired when a WebAudio stream is stopped. More...
 
CoherentUI_OnAudioStreamClose AudioStreamClose
 Fired when a WebAudio stream is closed. This is usually called when the page is unloading. More...
 

Additional Inherited Members

- Public Types inherited from Coherent.UI.ViewListenerBase
enum  MessageLevel
 Levels of script messages. More...
 

Detailed Description

Interface that allows clients to listen to

Member Function Documentation

override void Coherent.UI.ViewListener.CreateSurface ( bool  sharedMemory,
uint  width,
uint  height,
SurfaceResponse  response 
)
inlinevirtual

Called when the The format for DirectX9 must be D3DFMT_A8R8G8B8 The format for DirectX10 and DirectX11 must be B8G8R8A8_UNORM

Parameters
sharedMemorytrue if the surface should be created in shared memory (4 * width * height bytes); false if a shared texture must be created.
widththe width of the surface in pixels
heightthe height of the surface in pixels
response
  • object to hold the response when the surface is created or fails it's creation - must be signaled

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.DestroySurface ( CoherentHandle  surface,
bool  usesSharedMemory 
)
inlinevirtual

Called when a surface is unneeded anymore and should be destroyed This function can be called from a thread different than the main UI context thread in order to support client applications with multi-threaded rendering.

Parameters
surfacehandle to the surface
usesSharedMemorydetermines whether the surface parameter is a handle to shared memory or shared texture

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnAudioStreamClose ( int  streamId)
inlinevirtual

Called when a WebAudio stream is closed. This is usually called when the page is unloading.

Parameters
streamIdthe ID of the stream that is closed

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnAudioStreamCreated ( int  streamId,
int  channels,
int  bitDepth,
int  frequency 
)
inlinevirtual

Called when a new WebAudio stream is created. This is usually when the page is loading (for <audio> HTML tags).

Parameters
streamIdthe generated ID for the new stream
channelsthe number of channels in the stream
bitDepthbits per sample in the stream
frequencythe audio stream frequency, in Hz

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnAudioStreamPause ( int  streamId)
inlinevirtual

Called when a WebAudio stream is stopped.

Parameters
streamIdthe ID of the stream that is stopped

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnAudioStreamPlay ( int  streamId)
inlinevirtual

Called when a WebAudio stream is played.

Parameters
streamIdthe ID of the stream that is played

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnBindingsReleased ( int  frameId,
string  path,
bool  isMainFrame 
)
inlinevirtual

Called when the bindings for frame are released.

Parameters
frameIdthe id of the frame
paththe path in the frame
isMainFrametrue if this is the main frame of the view

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnCallback ( string  eventName,
Binding.CallbackArguments  arguments 
)
inlinevirtual

Called by the UI when there is no registered handler for this event.

Parameters
eventNamename of the event
argumentsarguments of the event invocation

Reimplemented from Coherent.UI.ViewListenerBase.

override bool Coherent.UI.ViewListener.OnCanCreateChildWindow ( string  openerUrl,
string  targetUrl,
ChildViewInfo  childViewInfo 
)
inlinevirtual

Called when the view wants to open a new window.

Parameters
openerUrlthe URL that wants to open the new window
targetUrlthe target URL of the new window
childViewInfostructure that the user should fill in if she's about to allow new view creation
Returns
true if you allow the creation of a new window, false otherwise (if false, the childViewInfo parameter is ignored)

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnCaretRectChanged ( uint  x,
uint  y,
uint  width,
uint  height 
)
inlinevirtual

Called when the caret changes during IME composition. You can use this method to correctly position a custom IME control & candidate list.

Parameters
thex position of the selection caret
they position of the selection caret
thewidth of the selection caret
theheight of the selection caret

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnCertificateError ( string  url,
CertificateStatus  status,
Certificate  certificate,
CertificateErrorResponse  response 
)
inlinevirtual

Called when there is an error with the certificate of a particular URL. the certificate and response pointers are valid only for the duration of this call

Parameters
urlthe url of the request
statusthe error status of the certificate
certificatethe certificate details. This pointer will be valid only for this call
responseobject to signal whether to continue loading the URL. This pointer will be valid only for this call

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnCursorChanged ( CursorTypes  cursor)
inlinevirtual

Called when the cursor has changed internally in the

Parameters
cursorthe new cursor

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnDraw ( CoherentHandle  handle,
bool  usesSharedMemory,
int  width,
int  height 
)
inlinevirtual

Called when a new surface has been drawn and is ready to use by the client.

Parameters
handlea handle to one of the buffers created by CreateSurface. May be a shared memory buffer or a shared texture depending on the way the View was created. The handle is valid only during this call
usesSharedMemorydetermines whether the handle parameter is a handle to shared memory or shared texture
widththe width of the surface
heightthe height of the surface

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnError ( ViewError  error)
inlinevirtual

Called when an error occurs for this specific

Parameters
errorerror description

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnFailLoad ( int  frameId,
string  validatedPath,
bool  isMainFrame,
string  error 
)
inlinevirtual

Called when a frame has been failed loading.

Parameters
frameIdthe id of the frame
validatedPaththe path in the frame
isMainFrametrue if this is the main frame of the View
errorerror message for the failure

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnFileSelectRequest ( FileSelectRequest  request)
inlinevirtual

Called when the view requests file selection. It could be either single file, directory or multiple files.

Parameters
requestcontains the file selection params for the request

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnFinishLoad ( int  frameId,
string  validatedPath,
bool  isMainFrame,
int  statusCode,
HTTPHeader[]  headers 
)
inlinevirtual

Called when a frame has been successfully loaded.

Parameters
frameIdthe id of the loaded frame
validatedPaththe path loaded in the frame
isMainFrametrue if this is the main frame of the View
statusCodethe status code of the response
headersan array of header fields
headersCountthe count of items in the headers array

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnGetAuthCredentials ( bool  isProxy,
string  host,
uint  port,
string  realm,
string  scheme 
)
inlinevirtual

Called when a view requires authentication credentials.

Parameters
isProxywhether the request came from a server or a proxy
hostthe host which triggered the request
portthe port at which the request was triggered
realmrealm of the authentication challenge. Encoded in UTF-8
schemethe authentication scheme used, e.g. "basic" or "digest". Encoded in ASCII

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnIMEShouldCancelComposition ( )
inlinevirtual

Called when the user must cancel the IME composition due to an event in the

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnJavaScriptMessage ( string  message,
string  defaultPrompt,
string  frameUrl,
int  messageType 
)
inlinevirtual

Called when the view triggered a javascript message box, i.e. an alert, confirmation dialog or a prompt dialog.

Parameters
messagethe JavaScript message
defaultPromptthe default value of the prompt text box, in case the message type is prompt
frameUrlthe URL which created the message
messageTypethe type of the message (alert/confirm/prompt)

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnNavigateTo ( string  path)
inlinevirtual

Called when the view starts navigation to a new path.

Parameters
pathURL that the view is navigating to

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnReadyForBindings ( int  frameId,
string  path,
bool  isMainFrame 
)
inlinevirtual

Called when a frame is ready for bindings.

Parameters
frameIdthe id of the frame
paththe path in the frame
isMainFrametrue if this is the main frame of the view

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnRequestMediaStream ( MediaStreamRequest  request)
inlinevirtual

Called when the view requests access to a media stream. Media streams are the audio capture (microphone) and video capture (camera) devices on the system.

Parameters
requestcontains the available media streams for the request

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnScriptMessage ( ViewListenerBase.MessageLevel  level,
string  message,
string  sourceId,
int  line 
)
inlinevirtual

Called when a message is sent from a script running in this specific

Parameters
levelmessage level
messagethe text of the message
sourceIdid of the script (usually file name)
linethe number of the line in which the message was sent

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnStartLoading ( )
inlinevirtual

Called when a new path has started loading.

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnStopLoading ( )
inlinevirtual

Called when all load operations have completed.

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnTextInputTypeChanged ( TextInputControlType  type,
bool  canComposeInline 
)
inlinevirtual

Called when the current text input control changes (i.e. the user click an edit-box). Use this methof to decide when to allow for IME input. the method will be called ONLY if IME is activated on this View. View::IMEActivate

Parameters
typethe type of the currently focused text input control by the user
canComposeInlineif the IME composition could be performed in-line in the control

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnURLRequest ( URLRequest  request)
inlinevirtual

Called before an URL request is made. The default implementation allows all requests.

Parameters
requestthe URLRequest object that can be used to modify the request. This pointer will be valid only for this call

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.OnViewCreated ( View  view)
inlinevirtual

Called when the requested

Parameters
viewthe instance of the view containing all manipulation methods

Reimplemented from Coherent.UI.ViewListenerBase.

override void Coherent.UI.ViewListener.Release ( )
inlinevirtual

Called when the listener is no longer needed by the UI context.

Reimplemented from Coherent.UI.ViewListenerBase.

Event Documentation

CoherentUI_OnAudioStreamClose Coherent.UI.ViewListener.AudioStreamClose

Fired when a WebAudio stream is closed. This is usually called when the page is unloading.

CoherentUI_OnAudioStreamCreated Coherent.UI.ViewListener.AudioStreamCreated

Fired when a new WebAudio stream is created. This is usually when the page is loading (for <audio> HTML tags).

CoherentUI_OnAudioStreamPause Coherent.UI.ViewListener.AudioStreamPause

Fired when a WebAudio stream is stopped.

CoherentUI_OnAudioStreamPlay Coherent.UI.ViewListener.AudioStreamPlay

Fired when a WebAudio stream is played.

CoherentUI_OnBindingsReleased Coherent.UI.ViewListener.BindingsReleased

Fired when the bindings for frame are released.

CoherentUI_OnCallback Coherent.UI.ViewListener.Callback

Fired by the UI when there is no registered handler for this event.

CoherentUI_OnCaretRectChanged Coherent.UI.ViewListener.CaretRectChanged

Fired when the caret changes during IME composition. You can use this method to correctly position a custom IME control & candidate list.

CoherentUI_OnCertificateError Coherent.UI.ViewListener.CertificateError

Fired when there is an error with the certificate of a particular URL. the certificate and response pointers are valid only for the duration of this call

CoherentUI_OnCursorChanged Coherent.UI.ViewListener.CursorChanged

Fired when the cursor has changed internally in the

CoherentUI_OnDraw Coherent.UI.ViewListener.Draw

Fired when a new surface has been drawn and is ready to use by the client.

CoherentUI_OnError Coherent.UI.ViewListener.Error

Fired when an error occurs for this specific

CoherentUI_OnFailLoad Coherent.UI.ViewListener.FailLoad

Fired when a frame has been failed loading.

CoherentUI_OnFileSelectRequest Coherent.UI.ViewListener.FileSelectRequest

Fired when the view requests file selection. It could be either single file, directory or multiple files.

CoherentUI_OnFinishLoad Coherent.UI.ViewListener.FinishLoad

Fired when a frame has been successfully loaded.

CoherentUI_OnGetAuthCredentials Coherent.UI.ViewListener.GetAuthCredentials

Fired when a view requires authentication credentials.

CoherentUI_OnIMEShouldCancelComposition Coherent.UI.ViewListener.IMEShouldCancelComposition

Fired when the user must cancel the IME composition due to an event in the

CoherentUI_OnJavaScriptMessage Coherent.UI.ViewListener.JavaScriptMessage

Fired when the view triggered a javascript message box, i.e. an alert, confirmation dialog or a prompt dialog.

CoherentUI_OnNavigateTo Coherent.UI.ViewListener.NavigateTo

Fired when the view starts navigation to a new path.

CoherentUI_OnReadyForBindings Coherent.UI.ViewListener.ReadyForBindings

Fired when a frame is ready for bindings.

CoherentUI_OnRequestMediaStream Coherent.UI.ViewListener.RequestMediaStream

Fired when the view requests access to a media stream. Media streams are the audio capture (microphone) and video capture (camera) devices on the system.

CoherentUI_OnScriptMessage Coherent.UI.ViewListener.ScriptMessage

Fired when a message is sent from a script running in this specific

CoherentUI_OnStartLoading Coherent.UI.ViewListener.StartLoading

Fired when a new path has started loading.

CoherentUI_OnStopLoading Coherent.UI.ViewListener.StopLoading

Fired when all load operations have completed.

CoherentUI_OnTextInputTypeChanged Coherent.UI.ViewListener.TextInputTypeChanged

Fired when the current text input control changes (i.e. the user click an edit-box). Use this methof to decide when to allow for IME input. the method will be called ONLY if IME is activated on this View. View::IMEActivate

CoherentUI_OnURLRequest Coherent.UI.ViewListener.URLRequest

Fired before an URL request is made. The default implementation allows all requests.

CoherentUI_OnViewCreated Coherent.UI.ViewListener.ViewCreated

Fired when the requested