TCohtmlViewListener
Inherits from IViewListener, ITextInputHandler
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() |
Detailed Description
template <typename T >
class TCohtmlViewListener;
Public Functions Documentation
function TCohtmlViewListener
inline TCohtmlViewListener(
T * owner
)
function ~TCohtmlViewListener
inline virtual ~TCohtmlViewListener()
function OwnerDestroyed
inline void OwnerDestroyed()
function OnNavigateTo
inline 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.
Parameters:
- url The URL which the view will load
function OnScriptContextCreated
inline 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.
function OnDOMBuilt
inline virtual void OnDOMBuilt() override
Called when the page’s DOM is fully constructed, but the referenced resources may not finish loading.
function OnLoadFailed
inline virtual void OnLoadFailed(
const char * url,
const char * error
) override
Called when a navigation change request failed.
Parameters:
- url The URL which failed to load
- error The error message
function OnFinishLoad
inline virtual void OnFinishLoad(
const char * url
) override
Called when a page, including the resources it refers to, is completely loaded and initialized.
Parameters:
- url The URL which loaded successfully
function OnCursorChanged
inline virtual void OnCursorChanged(
cohtml::CursorTypes::Cursors Cursor,
const char * Url,
const float * XHotspot,
const float * YHotspot
) override
function OnClipboardTextSet
inline virtual void OnClipboardTextSet(
const char * Text,
unsigned LengthBytes
)
function OnClipboardTextGet
inline virtual void OnClipboardTextGet(
IClipboardData * SetDataObject
)
function OnReadyForBindings
inline virtual void OnReadyForBindings() override
function OnBindingsReleased
inline virtual void OnBindingsReleased() override
function OnScreenInfoRequested
inline virtual cohtml::ScreenInfo OnScreenInfoRequested() override
function OnNodeTouched
inline 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.
function OnNodeMouseEvent
inline 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.
function OnNodeKeyEvent
inline 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.
function OnFocus
inline virtual void OnFocus(
cohtml::IInputProxy * proxy
) override
function OnBlur
inline virtual void OnBlur(
cohtml::IInputProxy * proxy
) override
function OnCaretRectChanged
inline virtual void OnCaretRectChanged(
int x,
int y,
unsigned width,
unsigned height
) override
function OnAudioStreamCreated
inline virtual void OnAudioStreamCreated(
int Id,
int BitDepth,
int Channels,
float SamplingRate
) override
function OnAudioStreamClosed
inline virtual void OnAudioStreamClosed(
int Id
) override
function OnAudioStreamPlay
inline virtual void OnAudioStreamPlay(
int Id
) override
function OnAudioStreamPause
inline virtual void OnAudioStreamPause(
int Id
) override
function OnAudioDataReceived
inline virtual void OnAudioDataReceived(
int Id,
int Samples,
float ** Pcm,
int Channels
) override
function OnAudioStreamEnded
inline virtual void OnAudioStreamEnded(
int Id
) override
function OnAudioStreamVolumeChanged
inline virtual void OnAudioStreamVolumeChanged(
int Id,
float Volume
) override
function OnCreateWebSocket
inline virtual cohtml::IClientSideSocket * OnCreateWebSocket(
cohtml::ISocketListener * listener,
const char * url,
const char ** protocols,
unsigned protocolsCount
) override
function GetCurrentPageState
inline cohtml::ECohtmlPageLoadState GetCurrentPageState()