Termux:GUI C/C++ Bindings
Loading...
Searching...
No Matches
events.h File Reference

This file contains all functions related to event control. More...

#include "types.h"

Go to the source code of this file.

Functions

tgui_err tgui_send_click_event (tgui_connection c, tgui_activity a, tgui_view v, bool send)
 Sets whether click events are send for a View. More...
 
tgui_err tgui_send_long_click_event (tgui_connection c, tgui_activity a, tgui_view v, bool send)
 Sets whether long click events are send for a View. More...
 
tgui_err tgui_send_focus_change_event (tgui_connection c, tgui_activity a, tgui_view v, bool send)
 Sets whether focus change events are send for a View. More...
 
tgui_err tgui_send_touch_event (tgui_connection c, tgui_activity a, tgui_view v, bool send)
 Sets whether touch events are send for a View. More...
 
tgui_err tgui_send_text_event (tgui_connection c, tgui_activity a, tgui_view v, bool send)
 Sets whether text events are send for a View. More...
 
tgui_err tgui_send_overlay_touch_event (tgui_connection c, tgui_activity a, bool send)
 Sets whether overlay touch events are send for an Activity. More...
 

Detailed Description

This file contains all functions related to event control.

Function Documentation

◆ tgui_send_click_event()

tgui_err tgui_send_click_event ( tgui_connection  c,
tgui_activity  a,
tgui_view  v,
bool  send 
)

Sets whether click events are send for a View.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
  • TGUI_ERR_ACTIVITY_DESTROYED: The Activity was already closed.
  • TGUI_ERR_VIEW_INVALID: Invalid view type.
Parameters
cThe connection to use.
aThe Activity the View is in.
vThe View.
sendSet to true if you want to get the event, false if not.
Returns
The error code.

◆ tgui_send_long_click_event()

tgui_err tgui_send_long_click_event ( tgui_connection  c,
tgui_activity  a,
tgui_view  v,
bool  send 
)

Sets whether long click events are send for a View.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
  • TGUI_ERR_ACTIVITY_DESTROYED: The Activity was already closed.
  • TGUI_ERR_VIEW_INVALID: Invalid view type.
Parameters
cThe connection to use.
aThe Activity the View is in.
vThe View.
sendSet to true if you want to get the event, false if not.
Returns
The error code.

◆ tgui_send_focus_change_event()

tgui_err tgui_send_focus_change_event ( tgui_connection  c,
tgui_activity  a,
tgui_view  v,
bool  send 
)

Sets whether focus change events are send for a View.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
  • TGUI_ERR_ACTIVITY_DESTROYED: The Activity was already closed.
  • TGUI_ERR_VIEW_INVALID: Invalid view type.
Parameters
cThe connection to use.
aThe Activity the View is in.
vThe View.
sendSet to true if you want to get the event, false if not.
Returns
The error code.

◆ tgui_send_touch_event()

tgui_err tgui_send_touch_event ( tgui_connection  c,
tgui_activity  a,
tgui_view  v,
bool  send 
)

Sets whether touch events are send for a View.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
  • TGUI_ERR_ACTIVITY_DESTROYED: The Activity was already closed.
  • TGUI_ERR_VIEW_INVALID: Invalid view type.
Parameters
cThe connection to use.
aThe Activity the View is in.
vThe View.
sendSet to true if you want to get the event, false if not.
Returns
The error code.

◆ tgui_send_text_event()

tgui_err tgui_send_text_event ( tgui_connection  c,
tgui_activity  a,
tgui_view  v,
bool  send 
)

Sets whether text events are send for a View.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
  • TGUI_ERR_ACTIVITY_DESTROYED: The Activity was already closed.
  • TGUI_ERR_VIEW_INVALID: Invalid view type.
Parameters
cThe connection to use.
aThe Activity the View is in.
vThe View.
sendSet to true if you want to get the event, false if not.
Returns
The error code.

◆ tgui_send_overlay_touch_event()

tgui_err tgui_send_overlay_touch_event ( tgui_connection  c,
tgui_activity  a,
bool  send 
)

Sets whether overlay touch events are send for an Activity.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
  • TGUI_ERR_ACTIVITY_DESTROYED: The Activity was already closed.
Parameters
cThe connection to use.
aThe overlay Activity.
sendSet to true if you want to get the event, false if not.
Returns
The error code.