The class provides a way to listen to the events generated by a View Override it to implement logic that depends on the View event. More...
#include <Coherent/Coherent/UIGT/ViewListener.h>
Public Member Functions | |
| virtual void | OnViewCreated (Coherent::UIGT::View *view) |
| Called when the View is created. More... | |
| virtual void | OnViewDestroyed () |
| Called as soon as the View is destroyed. | |
| virtual void | OnDocumentReadyStateChanged (bool isReady) |
| Called when the document readiness has changed. More... | |
| virtual void | OnFinishLoad (const char *path, bool isMainFrame) |
| Called when the View has finished loading the last requested page. More... | |
| virtual void | OnFailLoad (const char *path, const char *error, bool isMainFrame) |
| Called when the View fails loading the last requested page. More... | |
| virtual void | OnStartLoading (const char *path, bool isMainFrame) |
| Called when the View starts loading a new page. More... | |
| virtual void | OnNavigateTo (const char *path, bool isMainFrame) |
| Called when the View navigates to a new page. More... | |
| virtual void | OnReadyForBindings () |
| Called when the View is ready to accept JavaScript bindings. | |
| virtual void | OnBindingsReleased () |
| Called when the bindings have been released. | |
| virtual void | OnCallback (const char *eventName, const Coherent::UIGT::EventArguments &arguments) |
| Called by the UI when there is no registered handler for this event. More... | |
| virtual void | OnAudioStreamCreated (int id, int bitDepth, int channels, float samplingRate) |
| Called by the UI when a media element initializes an audio stream. More... | |
| virtual void | OnAudioStreamClosed (int id) |
| Called when an audio stream is destroyed. More... | |
| virtual void | OnAudioStreamPlay (int id) |
| Called by the UI when a media element starts playing an audio stream. More... | |
| virtual void | OnAudioStreamPause (int id) |
| Called by the UI when a playing media element pauses. More... | |
| virtual void | OnAudioDataReceived (int id, int samples, float **pcm, int channels) |
| Called by the UI when there is decoded PCM data available for playing. More... | |
| virtual void | OnAudioStreamEnded (int id) |
| Called when an audio stream ends and will no longer receive data. More... | |
| virtual void | OnTextInputTypeChanged (TextInputControlType type) |
| Called when the current text input control changes (i.e. the user click an edit-box). Use this method to decide when to allow for IME input. More... | |
| virtual void | OnCaretRectChanged (int x, int y, unsigned width, unsigned height) |
| Called when the caret changes during IME composition. You can use this method to correctly position a custom IME control & candidate list. More... | |
| virtual void | OnIMEShouldCancelComposition () |
| Called when the user must cancel the IME composition due to an event in the View itself (i.e. the user has focused a non-editable element while a composition was on-going) | |
| virtual void | OnCursorChanged (CursorType cursor) |
| Called when the mouse cursor should be changed (i.e. the user hovered over an element with cursor CSS property) More... | |
| virtual void | OnPerformanceAudit (const char *result) |
| Called when a performance audit requested by a call to AuditPerformance has completed. More... | |
| virtual void | OnCertificateError (Coherent::UIGT::CertificateResponse *response, const char *url, const char *error, bool isMainFrame) |
| Called when a SSL connection encounters a certificate error. The response object can be used to allow or deny the connection. If the client doesn't override this method, the default response denies the request. More... | |
| virtual void | OnBindingModelCreated (const char *modelName, Coherent::UIGT::ModelHandle &handle) |
| Called when a binding model has been created and obtaining property handles is available. More... | |
The class provides a way to listen to the events generated by a View Override it to implement logic that depends on the View event.
|
virtual |
Called by the UI when there is decoded PCM data available for playing.
| id | the unique ID of the stream |
| samples | the number of available samples |
| pcm | the decoded PCM data. Represented as a 2D array with |channels| x |samples| floating point elements in the range [-1, 1]. |
| channels | the number of channels |
|
virtual |
Called when an audio stream is destroyed.
| id | the unique id of audio stream that was closed |
|
virtual |
Called by the UI when a media element initializes an audio stream.
| id | the unique ID of the stream |
| bitDepth | the number of bits per audio sample |
| channels | the number of channels in the stream |
| samplingRate | the sampling rate of the stream in Hz |
|
virtual |
Called when an audio stream ends and will no longer receive data.
| id | the unique ID of the stream |
|
virtual |
Called by the UI when a playing media element pauses.
| id | the unique ID of the stream |
|
virtual |
Called by the UI when a media element starts playing an audio stream.
| id | the unique ID of the stream |
|
virtual |
Called when a binding model has been created and obtaining property handles is available.
| modelName | the name for the model that has been created |
| handle | a handle to the model that can be used for obtaining property handles |
|
virtual |
Called by the UI when there is no registered handler for this event.
| eventName | name of the event |
| arguments | arguments of the event invocation |
|
virtual |
Called when the caret changes during IME composition. You can use this method to correctly position a custom IME control & candidate list.
| x | the x position of the selection caret |
| y | the y position of the selection caret |
| width | the width of the selection caret |
| height | the height of the selection caret |
|
virtual |
Called when a SSL connection encounters a certificate error. The response object can be used to allow or deny the connection. If the client doesn't override this method, the default response denies the request.
| response | the response object which the client should use to either allow or deny the SSL connection. |
| url | the URL which triggered the certificate error |
| error | descriptive message of the error encountered |
| isMainFrame | is this frame the main frame of the page |
|
virtual |
Called when the mouse cursor should be changed (i.e. the user hovered over an element with cursor CSS property)
| cursor | the type of the cursor that should be drawn |
|
virtual |
Called when the document readiness has changed.
| isReady | new readiness state |
|
virtual |
Called when the View fails loading the last requested page.
| path | the url of the failed page |
| error | description of the error |
| isMainFrame | is this frame the main frame of the page |
|
virtual |
Called when the View has finished loading the last requested page.
| path | the url of the loaded page |
| isMainFrame | is this frame the main frame of the page |
|
virtual |
|
virtual |
Called when a performance audit requested by a call to AuditPerformance has completed.
| result | a text representation of the gathered data |
|
virtual |
Called when the View starts loading a new page.
| path | the url of the page that is starting to load |
| isMainFrame | is this frame the main frame of the page |
|
virtual |
Called when the current text input control changes (i.e. the user click an edit-box). Use this method to decide when to allow for IME input.
| type | the type of the currently focused text input control by the user |
|
virtual |
Called when the View is created.
| view | the view that was just created |