Skip to content
SiteEmail

TCohtmlViewListener

More…

Inherits from IViewListener, ITextInputHandler

Name
TCohtmlViewListener(T * owner)
virtual~TCohtmlViewListener()
voidOwnerDestroyed()
virtual boolOnNavigateTo(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 voidOnScriptContextCreated() 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 voidOnDOMBuilt() override
Called when the page’s DOM is fully constructed, but the referenced resources may not finish loading.
virtual voidOnLoadFailed(const char * url, const char * error) override
Called when a navigation change request failed.
virtual voidOnFinishLoad(const char * url) override
Called when a page, including the resources it refers to, is completely loaded and initialized.
virtual voidOnCursorChanged(cohtml::CursorTypes::Cursors Cursor, const char * Url, const float * XHotspot, const float * YHotspot) override
virtual voidOnClipboardTextSet(const char * Text, unsigned LengthBytes)
virtual voidOnClipboardTextGet(IClipboardData * SetDataObject)
virtual voidOnReadyForBindings() override
virtual voidOnBindingsReleased() override
virtual cohtml::ScreenInfoOnScreenInfoRequested() override
virtual cohtml::EventAction::ActionsOnNodeTouched(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::ActionsOnNodeMouseEvent(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::ActionsOnNodeKeyEvent(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 voidOnFocus(cohtml::IInputProxy * proxy) override
virtual voidOnBlur(cohtml::IInputProxy * proxy) override
virtual voidOnCaretRectChanged(int x, int y, unsigned width, unsigned height) override
virtual voidOnAudioStreamCreated(int Id, int BitDepth, int Channels, float SamplingRate) override
virtual voidOnAudioStreamClosed(int Id) override
virtual voidOnAudioStreamPlay(int Id) override
virtual voidOnAudioStreamPause(int Id) override
virtual voidOnAudioDataReceived(int Id, int Samples, float ** Pcm, int Channels) override
virtual voidOnAudioStreamEnded(int Id) override
virtual voidOnAudioStreamVolumeChanged(int Id, float Volume) override
virtual cohtml::IClientSideSocket *OnCreateWebSocket(cohtml::ISocketListener * listener, const char * url, const char ** protocols, unsigned protocolsCount) override
cohtml::ECohtmlPageLoadStateGetCurrentPageState()
Name
voidCreateVirtualKeyboard(cohtml::IInputProxy * Proxy)
voidShowVirtualKeyboard()
voidHideVirtualKeyboard()
voidDestroyVirtualKeyboard()
template <typename T >
class TCohtmlViewListener;
inline TCohtmlViewListener(
T * owner
)
inline virtual ~TCohtmlViewListener()
inline void OwnerDestroyed()
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
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.

inline virtual void OnDOMBuilt() override

Called when the page’s DOM is fully constructed, but the referenced resources may not finish loading.

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
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
inline virtual void OnCursorChanged(
cohtml::CursorTypes::Cursors Cursor,
const char * Url,
const float * XHotspot,
const float * YHotspot
) override
inline virtual void OnClipboardTextSet(
const char * Text,
unsigned LengthBytes
)
inline virtual void OnClipboardTextGet(
IClipboardData * SetDataObject
)
inline virtual void OnReadyForBindings() override
inline virtual void OnBindingsReleased() override
inline virtual cohtml::ScreenInfo OnScreenInfoRequested() override
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.

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.

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.

inline virtual void OnFocus(
cohtml::IInputProxy * proxy
) override
inline virtual void OnBlur(
cohtml::IInputProxy * proxy
) override
inline virtual void OnCaretRectChanged(
int x,
int y,
unsigned width,
unsigned height
) override
inline virtual void OnAudioStreamCreated(
int Id,
int BitDepth,
int Channels,
float SamplingRate
) override
inline virtual void OnAudioStreamClosed(
int Id
) override
inline virtual void OnAudioStreamPlay(
int Id
) override
inline virtual void OnAudioStreamPause(
int Id
) override
inline virtual void OnAudioDataReceived(
int Id,
int Samples,
float ** Pcm,
int Channels
) override
inline virtual void OnAudioStreamEnded(
int Id
) override
inline virtual void OnAudioStreamVolumeChanged(
int Id,
float Volume
) override
inline virtual cohtml::IClientSideSocket * OnCreateWebSocket(
cohtml::ISocketListener * listener,
const char * url,
const char ** protocols,
unsigned protocolsCount
) override
inline cohtml::ECohtmlPageLoadState GetCurrentPageState()
inline void CreateVirtualKeyboard(
cohtml::IInputProxy * Proxy
)
inline void ShowVirtualKeyboard()
inline void HideVirtualKeyboard()
inline void DestroyVirtualKeyboard()