TCohtmlViewListener
Inherits from IViewListener, ITextInputHandler
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| TCohtmlViewListener(T * owner) | |
| virtual | ~TCohtmlViewListener() |
| void | OwnerDestroyed() |
| virtual bool | OnNavigateTo(const char * url) override Called when a navigation is about to occur. The user is able to interrupt the navigation or let it continue normally. |
| virtual void | OnScriptContextCreated() override Called immediately after the script context has been created for the page. This happens before starting to build the DOM. Execute any scripts that will influence DOM creation here. |
| virtual void | OnDOMBuilt() override Called when the page’s DOM is fully constructed, but the referenced resources may not finish loading. |
| virtual void | OnLoadFailed(const char * url, const char * error) override Called when a navigation change request failed. |
| virtual void | OnFinishLoad(const char * url) override Called when a page, including the resources it refers to, is completely loaded and initialized. |
| virtual void | OnCursorChanged(cohtml::CursorTypes::Cursors Cursor, const char * Url, const float * XHotspot, const float * YHotspot) override |
| virtual void | OnClipboardTextSet(const char * Text, unsigned LengthBytes) |
| virtual void | OnClipboardTextGet(IClipboardData * SetDataObject) |
| virtual void | OnReadyForBindings() override |
| virtual void | OnBindingsReleased() override |
| virtual cohtml::ScreenInfo | OnScreenInfoRequested() override |
| virtual cohtml::EventAction::Actions | OnNodeTouched(const cohtml::INodeProxy * Node, const cohtml::TouchEventData * Event, void * UserData, const cohtml::InputEventPhase::PhaseType Phase) override Called before an event is passed to a DOM node for evaluation. The user is able to interrupt the handling and bubbling of events or let them continue normally. |
| virtual cohtml::EventAction::Actions | OnNodeMouseEvent(const cohtml::INodeProxy * Node, const cohtml::MouseEventData * Event, void * UserData, const cohtml::InputEventPhase::PhaseType Phase) override Called before an event is passed to a DOM node for evaluation. The user is able to interrupt the handling and bubbling of events or let them continue normally. |
| virtual cohtml::EventAction::Actions | OnNodeKeyEvent(const cohtml::INodeProxy * Node, const cohtml::KeyEventData * Event, void * UserData, const cohtml::InputEventPhase::PhaseType Phase) override Called before an event is passed to a DOM node for evaluation. The user is able to interrupt the handling and bubbling of events or let them continue normally. |
| virtual void | OnFocus(cohtml::IInputProxy * proxy) override |
| virtual void | OnBlur(cohtml::IInputProxy * proxy) override |
| virtual void | OnCaretRectChanged(int x, int y, unsigned width, unsigned height) override |
| virtual void | OnAudioStreamCreated(int Id, int BitDepth, int Channels, float SamplingRate) override |
| virtual void | OnAudioStreamClosed(int Id) override |
| virtual void | OnAudioStreamPlay(int Id) override |
| virtual void | OnAudioStreamPause(int Id) override |
| virtual void | OnAudioDataReceived(int Id, int Samples, float ** Pcm, int Channels) override |
| virtual void | OnAudioStreamEnded(int Id) override |
| virtual void | OnAudioStreamVolumeChanged(int Id, float Volume) override |
| virtual cohtml::IClientSideSocket * | OnCreateWebSocket(cohtml::ISocketListener * listener, const char * url, const char ** protocols, unsigned protocolsCount) override |
| cohtml::ECohtmlPageLoadState | GetCurrentPageState() |
Protected Functions
Section titled “Protected Functions”| Name | |
|---|---|
| void | CreateVirtualKeyboard(cohtml::IInputProxy * Proxy) |
| void | ShowVirtualKeyboard() |
| void | HideVirtualKeyboard() |
| void | DestroyVirtualKeyboard() |
Detailed Description
Section titled “Detailed Description”template <typename T >class TCohtmlViewListener;Public Functions Documentation
Section titled “Public Functions Documentation”function TCohtmlViewListener
Section titled “function TCohtmlViewListener”inline TCohtmlViewListener( T * owner)function ~TCohtmlViewListener
Section titled “function ~TCohtmlViewListener”inline virtual ~TCohtmlViewListener()function OwnerDestroyed
Section titled “function OwnerDestroyed”inline void OwnerDestroyed()function OnNavigateTo
Section titled “function OnNavigateTo”inline virtual bool OnNavigateTo( const char * url) overrideCalled when a navigation is about to occur. The user is able to interrupt the navigation or let it continue normally.
Parameters:
- url The URL which the view will load
function OnScriptContextCreated
Section titled “function OnScriptContextCreated”inline virtual void OnScriptContextCreated() overrideCalled immediately after the script context has been created for the page. This happens before starting to build the DOM. Execute any scripts that will influence DOM creation here.
function OnDOMBuilt
Section titled “function OnDOMBuilt”inline virtual void OnDOMBuilt() overrideCalled when the page’s DOM is fully constructed, but the referenced resources may not finish loading.
function OnLoadFailed
Section titled “function OnLoadFailed”inline virtual void OnLoadFailed( const char * url, const char * error) overrideCalled when a navigation change request failed.
Parameters:
- url The URL which failed to load
- error The error message
function OnFinishLoad
Section titled “function OnFinishLoad”inline virtual void OnFinishLoad( const char * url) overrideCalled when a page, including the resources it refers to, is completely loaded and initialized.
Parameters:
- url The URL which loaded successfully
function OnCursorChanged
Section titled “function OnCursorChanged”inline virtual void OnCursorChanged( cohtml::CursorTypes::Cursors Cursor, const char * Url, const float * XHotspot, const float * YHotspot) overridefunction OnClipboardTextSet
Section titled “function OnClipboardTextSet”inline virtual void OnClipboardTextSet( const char * Text, unsigned LengthBytes)function OnClipboardTextGet
Section titled “function OnClipboardTextGet”inline virtual void OnClipboardTextGet( IClipboardData * SetDataObject)function OnReadyForBindings
Section titled “function OnReadyForBindings”inline virtual void OnReadyForBindings() overridefunction OnBindingsReleased
Section titled “function OnBindingsReleased”inline virtual void OnBindingsReleased() overridefunction OnScreenInfoRequested
Section titled “function OnScreenInfoRequested”inline virtual cohtml::ScreenInfo OnScreenInfoRequested() overridefunction OnNodeTouched
Section titled “function OnNodeTouched”inline virtual cohtml::EventAction::Actions OnNodeTouched( const cohtml::INodeProxy * Node, const cohtml::TouchEventData * Event, void * UserData, const cohtml::InputEventPhase::PhaseType Phase) overrideCalled before an event is passed to a DOM node for evaluation. The user is able to interrupt the handling and bubbling of events or let them continue normally.
function OnNodeMouseEvent
Section titled “function OnNodeMouseEvent”inline virtual cohtml::EventAction::Actions OnNodeMouseEvent( const cohtml::INodeProxy * Node, const cohtml::MouseEventData * Event, void * UserData, const cohtml::InputEventPhase::PhaseType Phase) overrideCalled before an event is passed to a DOM node for evaluation. The user is able to interrupt the handling and bubbling of events or let them continue normally.
function OnNodeKeyEvent
Section titled “function OnNodeKeyEvent”inline virtual cohtml::EventAction::Actions OnNodeKeyEvent( const cohtml::INodeProxy * Node, const cohtml::KeyEventData * Event, void * UserData, const cohtml::InputEventPhase::PhaseType Phase) overrideCalled before an event is passed to a DOM node for evaluation. The user is able to interrupt the handling and bubbling of events or let them continue normally.
function OnFocus
Section titled “function OnFocus”inline virtual void OnFocus( cohtml::IInputProxy * proxy) overridefunction OnBlur
Section titled “function OnBlur”inline virtual void OnBlur( cohtml::IInputProxy * proxy) overridefunction OnCaretRectChanged
Section titled “function OnCaretRectChanged”inline virtual void OnCaretRectChanged( int x, int y, unsigned width, unsigned height) overridefunction OnAudioStreamCreated
Section titled “function OnAudioStreamCreated”inline virtual void OnAudioStreamCreated( int Id, int BitDepth, int Channels, float SamplingRate) overridefunction OnAudioStreamClosed
Section titled “function OnAudioStreamClosed”inline virtual void OnAudioStreamClosed( int Id) overridefunction OnAudioStreamPlay
Section titled “function OnAudioStreamPlay”inline virtual void OnAudioStreamPlay( int Id) overridefunction OnAudioStreamPause
Section titled “function OnAudioStreamPause”inline virtual void OnAudioStreamPause( int Id) overridefunction OnAudioDataReceived
Section titled “function OnAudioDataReceived”inline virtual void OnAudioDataReceived( int Id, int Samples, float ** Pcm, int Channels) overridefunction OnAudioStreamEnded
Section titled “function OnAudioStreamEnded”inline virtual void OnAudioStreamEnded( int Id) overridefunction OnAudioStreamVolumeChanged
Section titled “function OnAudioStreamVolumeChanged”inline virtual void OnAudioStreamVolumeChanged( int Id, float Volume) overridefunction OnCreateWebSocket
Section titled “function OnCreateWebSocket”inline virtual cohtml::IClientSideSocket * OnCreateWebSocket( cohtml::ISocketListener * listener, const char * url, const char ** protocols, unsigned protocolsCount) overridefunction GetCurrentPageState
Section titled “function GetCurrentPageState”inline cohtml::ECohtmlPageLoadState GetCurrentPageState()Protected Functions Documentation
Section titled “Protected Functions Documentation”function CreateVirtualKeyboard
Section titled “function CreateVirtualKeyboard”inline void CreateVirtualKeyboard( cohtml::IInputProxy * Proxy)function ShowVirtualKeyboard
Section titled “function ShowVirtualKeyboard”inline void ShowVirtualKeyboard()function HideVirtualKeyboard
Section titled “function HideVirtualKeyboard”inline void HideVirtualKeyboard()function DestroyVirtualKeyboard
Section titled “function DestroyVirtualKeyboard”inline void DestroyVirtualKeyboard()© 2026 Coherent Labs. All rights reserved.