TCohtmlViewListener

More…

Inherits from IViewListener, ITextInputHandler

Public Functions

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()

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()