Termux:GUI C/C++ Bindings
Loading...
Searching...
No Matches
tgui_event Struct Reference

Represents an event send from the plugin. A union is used so that all events can still have a single type. More...

#include <types.h>

Public Attributes

tgui_event_type type
 The event type specifies which entry in the union is valid.
 
tgui_activity activity
 Most events are specific to an Activity. If the event belongs to an Activity, this field isn't -1.
 
union {
   bool   finishing
 Whether the Activity is finishing.
Valid for: TGUI_EVENT_PAUSE, TGUI_EVENT_STOP and TGUI_EVENT_DESTROY.
 
   tgui_activity_configuration   configuration
 Valid for TGUI_EVENT_CONFIG.
 
   struct {
      int   id
 The id of the View.
 
      bool   set
 For CheckBox, Switch and ToggleButton.
 
   }   click
 Valid for TGUI_EVENT_CLICK.
 
   struct {
      int   id
 The id of the View.
 
   }   longClick
 Valid for TGUI_EVENT_LONG_CLICK.
 
   struct {
      int   id
 The id of the View.
 
      bool   focus
 Whether the View now has focus or not.
 
   }   focus
 Valid for TGUI_EVENT_FOCUS.
 
   struct {
      int   id
 The id of the View.
 
      tgui_touch_action   action
 The type of touch event.
 
      tgui_touch_pointer **   pointers
 
      uint32_t   events
 The number of batched move events (size of the first dimension of the pointers array).
 
      uint32_t   num_pointers
 Number of pointers for each event in the pointers array.
 
      uint32_t   index
 index of the pointer added or removed.
 
      uint64_t   time
 Timestamp of the event.
 
   }   touch
 Valid for TGUI_EVENT_TOUCH.
 
   struct {
      int   id
 The id of the TextView.
 
      char *   text
 The new text of the TextView.
 
   }   text
 Valid for TGUI_EVENT_TEXT.
 
   struct {
      int   id
 The id of the SwipeRefreshLayout.
 
   }   refresh
 Valid for TGUI_EVENT_REFRESH.
 
   struct {
      int   id
 The id of the RadioGroup.
 
      int   selected
 The id of the selected RadioButton.
 
   }   selected
 Valid for TGUI_EVENT_SELECTED.
 
   struct {
      int   id
 The id of the Spinner or TabLayout.
 
      int   selected
 The index of the selected element or tab, starting at 0.
 
   }   itemSelected
 Valid for TGUI_EVENT_ITEM_SELECTED.
 
   struct {
      int   id
 The id of the WebView.
 
      char *   url
 The URL that was tried to navigate to.
 
   }   webNavigation
 Valid for TGUI_EVENT_WEBVIEW_NAVIGATION.
 
   struct {
      int   id
 The id of the WebView.
 
      char *   url
 The URL the HTTP error came from.
 
      int   code
 The HTTP error code.
 
   }   webHTTPError
 Valid for TGUI_EVENT_WEBVIEW_HTTP_ERROR.
 
   struct {
      int   id
 The id of the WebView.
 
      char *   url
 The URL the error was encountered with.
 
   }   webError
 Valid for TGUI_EVENT_WEBVIEW_ERROR.
 
   struct {
      int   id
 The id of the WebView.
 
   }   webDestroyed
 Valid for TGUI_EVENT_WEBVIEW_DESTROYED.
 
   struct {
      int   id
 The id of the WebView.
 
      int   progress
 The progress of the site loading in percent.
 
   }   webProgress
 Valid for TGUI_EVENT_WEBVIEW_PROGRESS.
 
   struct {
      int   id
 The id of the WebView.
 
      char *   msg
 The console message.
 
   }   webConsole
 Valid for TGUI_EVENT_WEBVIEW_CONSOLE.
 
   bool   airplane
 The current state of airplane mode.
Valid for TGUI_EVENT_AIRPLANE.
 
   char   locale [10]
 The current locale.
Valid for TGUI_EVENT_LOCALE.
 
   char   timezone [10]
 The current timezone.
Valid for TGUI_EVENT_TIMEZONE.
 
   struct {
      bool   pip
 The current state of picture-in-picture mode.
 
   }   pip
 Valid for TGUI_EVENT_PIP.
 
   struct {
      int   rid
 The id of the remote layout.
 
      int   id
 The id of the View.
 
   }   remoteClick
 Valid for TGUI_EVENT_REMOTE_CLICK.
 
   struct {
      int   id
 The id of the notification.
 
      int   action
 The index of the action, starting at 0.
 
   }   action
 Valid for TGUI_EVENT_NOTIFICATION_ACTION.
 
   struct {
      float   span
 The new distance between the 2 pointers.
 
   }   overlayScale
 Valid for TGUI_EVENT_OVERLAY_SCALE.
 
   struct {
      tgui_key_modifier   mod
 The active modifiers.
 
      uint32_t   code
 The Android key code.
 
      uint32_t   codePoint
 The unicode code point.
 
   }   key
 Valid for TGUI_EVENT_KEY.
 
   struct {
      int   id
 The id of the view.
 
      uint64_t   timestamp
 The timestamp of the frame.
 
   }   frame
 Valid for TGUI_EVENT_FRAME_COMPLETE.
 
   struct {
      bool   volume_up
 Whether the event is for the up or down volume button.
 
      bool   released
 Whether the button is pressed or released. Multiple repeating events come for a long press.
 
   }   volume
 Valid for TGUI_EVENT_VOLUME.
 
   struct {
      tgui_inset   current_inset
 The system insets (bars) that are now showing.
 
   }   inset
 Valid for TGUI_EVENT_INSET.
 
   struct {
      int   id
 The id of the view.
 
      uint32_t   width
 The new width of the Surface.
 
      uint32_t   height
 The new height of the Surface.
 
   }   surfaceChanged
 Valid for TGUI_EVENT_SURFACE_CHANGED.
 
   double   _dummy [20]
 For future ABI compatibility, to force double alignment and bigger size.
 
}; 
 

Detailed Description

Represents an event send from the plugin. A union is used so that all events can still have a single type.

Member Data Documentation

◆ id

int tgui_event::id

The id of the View.

The id of the view.

The id of the notification.

The id of the WebView.

The id of the Spinner or TabLayout.

The id of the RadioGroup.

The id of the SwipeRefreshLayout.

The id of the TextView.

◆ pointers

tgui_touch_pointer** tgui_event::pointers

The pointers of the touch event.

◆ selected

int tgui_event::selected

The id of the selected RadioButton.

The index of the selected element or tab, starting at 0.

◆ url

char* tgui_event::url

The URL that was tried to navigate to.

The URL the error was encountered with.

The URL the HTTP error came from.


The documentation for this struct was generated from the following file: