Termux:GUI C/C++ Bindings
|
This file contains all functions related to Activities and Tasks. More...
#include "types.h"
Go to the source code of this file.
Functions | |
tgui_err | tgui_activity_create (tgui_connection c, tgui_activity *a, tgui_activity_type type, tgui_task *t, bool intercept) |
Creates a new Activity. More... | |
tgui_err | tgui_activity_task_to_back (tgui_connection c, tgui_activity a) |
Moves to Task of the Activity to the back, making it not visible anymore. More... | |
tgui_err | tgui_activity_set_theme (tgui_connection c, tgui_activity a, tgui_color status_bar_color, tgui_color primary_color, tgui_color accent_color, tgui_color window_background, tgui_color text_color) |
Sets the color palette for the Activity. The text color is only changed for Views created after this call. More... | |
tgui_err | tgui_activity_set_task_description (tgui_connection c, tgui_activity a, const void *img, size_t img_size, const char *label) |
Sets the label and icon for the Task of the Activity, if the Activity is the first one in the Task. More... | |
tgui_err | tgui_activity_set_pip_params (tgui_connection c, tgui_activity a, unsigned int num, unsigned int den) |
Sets the aspect ration for picture-in-picture mode. More... | |
tgui_err | tgui_activity_set_pip_mode (tgui_connection c, tgui_activity a, bool pip) |
Causes an Activity to enter or leave picture-in-picture mode. More... | |
tgui_err | tgui_activity_set_pip_mode_auto (tgui_connection c, tgui_activity a, bool automatic) |
Sets whether an Activity should automatically go into picture-in-picture mode when the user is leaving. More... | |
tgui_err | tgui_activity_set_input_mode (tgui_connection c, tgui_activity a, tgui_activity_input_mode mode) |
Sets how the Activity reacts to the soft keyboard being shown. More... | |
tgui_err | tgui_activity_set_keep_screen_on (tgui_connection c, tgui_activity a, bool keep) |
Sets whether the Activity being visible should keep the screen from turning off. More... | |
tgui_err | tgui_activity_set_orientation (tgui_connection c, tgui_activity a, tgui_orientation o) |
Sets the orientation for an Activity. More... | |
tgui_err | tgui_activity_set_position (tgui_connection c, tgui_activity a, unsigned int x, unsigned int y) |
Sets the position of the Activity on screen if it's an overlay. More... | |
tgui_err | tgui_activity_get_configuration (tgui_connection c, tgui_activity a, tgui_activity_configuration *conf) |
Gets the current Activity configuration. More... | |
tgui_err | tgui_activity_hide_soft_keyboard (tgui_connection c, tgui_activity a) |
Hides the soft keyboard. More... | |
tgui_err | tgui_activity_intercept_back_button (tgui_connection c, tgui_activity a, bool intercept) |
Sets whether the user pressing the back button should finish the Activity (default action) or intercept that and send the TGUI_EVENT_BACK event instead. More... | |
tgui_err | tgui_activity_intercept_volume_buttons (tgui_connection c, tgui_activity a, bool intercept_up, bool intercept_down) |
Sets whether the user pressing the volume buttons should change the volume or send an event instead. More... | |
tgui_err | tgui_activity_configure_insets (tgui_connection c, tgui_activity a, tgui_inset visible, tgui_inset_behaviour behaviour) |
tgui_err | tgui_activity_set_secure (tgui_connection c, tgui_activity a, bool secure) |
Sets the secure flag for the Activity. Disables screenshots and shows a blank Activity in the task switcher if enabled. More... | |
tgui_err | tgui_activity_finish (tgui_connection c, tgui_activity a) |
Finishes the Activity. More... | |
tgui_err | tgui_task_to_front (tgui_connection c, tgui_task t) |
Brings the Task to the front (make it visible to the user as if they opened it). More... | |
tgui_err | tgui_task_finish (tgui_connection c, tgui_task t) |
Finishes the Task, closing all Activities in it. More... | |
This file contains all functions related to Activities and Tasks.
tgui_err tgui_activity_create | ( | tgui_connection | c, |
tgui_activity * | a, | ||
tgui_activity_type | type, | ||
tgui_task * | t, | ||
bool | intercept | ||
) |
Creates a new Activity.
c | The connection to use. | |
[out] | a | A pointer to the Activity to be created. |
type | The type the Activity should be. | |
[in,out] | t | The Task in which to put the Activity. Use NULL if you never need the Task. After calling it will contain the Task the Activity was created in. Use -1 as a value to create a new Task and get the new Task as a value. Overlay Activities never have a Task. |
intercept | Whether or not to intercept back button events. See tgui_activity_intercept_back_button for more information. |
tgui_err tgui_activity_task_to_back | ( | tgui_connection | c, |
tgui_activity | a | ||
) |
Moves to Task of the Activity to the back, making it not visible anymore.
c | The connection to use. |
a | The Activity. |
tgui_err tgui_activity_set_theme | ( | tgui_connection | c, |
tgui_activity | a, | ||
tgui_color | status_bar_color, | ||
tgui_color | primary_color, | ||
tgui_color | accent_color, | ||
tgui_color | window_background, | ||
tgui_color | text_color | ||
) |
Sets the color palette for the Activity. The text color is only changed for Views created after this call.
c | The connection to use. |
a | The Activity. |
status_bar_color | The color for the status bar. |
primary_color | The primary color. |
accent_color | The accent color. |
window_background | The Activity background color. |
text_color | The text color. |
tgui_err tgui_activity_set_task_description | ( | tgui_connection | c, |
tgui_activity | a, | ||
const void * | img, | ||
size_t | img_size, | ||
const char * | label | ||
) |
Sets the label and icon for the Task of the Activity, if the Activity is the first one in the Task.
c | The connection to use. | |
a | The Activity. | |
[in] | img | The image in PNG or JPEG format. |
img_size | The size of the image in bytes. | |
[in] | label | The label for the Task. |
tgui_err tgui_activity_set_pip_params | ( | tgui_connection | c, |
tgui_activity | a, | ||
unsigned int | num, | ||
unsigned int | den | ||
) |
Sets the aspect ration for picture-in-picture mode.
c | The connection to use. |
a | The Activity. |
num | Numerator of the aspect ratio. |
den | Denominator of the aspect ratio. |
tgui_err tgui_activity_set_pip_mode | ( | tgui_connection | c, |
tgui_activity | a, | ||
bool | pip | ||
) |
Causes an Activity to enter or leave picture-in-picture mode.
c | The connection to use. |
a | The Activity. |
pip | Whether picture-in-picture mode should be enabled or disabled. |
tgui_err tgui_activity_set_pip_mode_auto | ( | tgui_connection | c, |
tgui_activity | a, | ||
bool | automatic | ||
) |
Sets whether an Activity should automatically go into picture-in-picture mode when the user is leaving.
c | The connection to use. |
a | The Activity. |
automatic | Whether to automatically go into picture-in-picture mode. |
tgui_err tgui_activity_set_input_mode | ( | tgui_connection | c, |
tgui_activity | a, | ||
tgui_activity_input_mode | mode | ||
) |
Sets how the Activity reacts to the soft keyboard being shown.
c | The connection to use. |
a | The Activity. |
mode | How the Activity should react. |
tgui_err tgui_activity_set_keep_screen_on | ( | tgui_connection | c, |
tgui_activity | a, | ||
bool | keep | ||
) |
Sets whether the Activity being visible should keep the screen from turning off.
c | The connection to use. |
a | The Activity. |
keep | Whether to keep the screen on or not. |
tgui_err tgui_activity_set_orientation | ( | tgui_connection | c, |
tgui_activity | a, | ||
tgui_orientation | o | ||
) |
Sets the orientation for an Activity.
c | The connection to use. |
a | The Activity. |
o | The new orientation. |
tgui_err tgui_activity_set_position | ( | tgui_connection | c, |
tgui_activity | a, | ||
unsigned int | x, | ||
unsigned int | y | ||
) |
Sets the position of the Activity on screen if it's an overlay.
c | The connection to use. |
a | The Activity. |
x | The x position in pixels. |
y | The y position in pixels. |
tgui_err tgui_activity_get_configuration | ( | tgui_connection | c, |
tgui_activity | a, | ||
tgui_activity_configuration * | conf | ||
) |
Gets the current Activity configuration.
c | The connection to use. | |
a | The Activity. | |
[out] | conf | The configuration is put here. |
tgui_err tgui_activity_hide_soft_keyboard | ( | tgui_connection | c, |
tgui_activity | a | ||
) |
tgui_err tgui_activity_intercept_back_button | ( | tgui_connection | c, |
tgui_activity | a, | ||
bool | intercept | ||
) |
Sets whether the user pressing the back button should finish the Activity (default action) or intercept that and send the TGUI_EVENT_BACK
event instead.
c | The connection to use. |
a | The Activity. |
intercept | Whether to intercept the back button press. |
tgui_err tgui_activity_intercept_volume_buttons | ( | tgui_connection | c, |
tgui_activity | a, | ||
bool | intercept_up, | ||
bool | intercept_down | ||
) |
Sets whether the user pressing the volume buttons should change the volume or send an event instead.
c | The connection to use. |
a | The Activity. |
intercept_up | Whether to intercept the volume up press. |
intercept_down | Whether to intercept the volume down press. |
tgui_err tgui_activity_configure_insets | ( | tgui_connection | c, |
tgui_activity | a, | ||
tgui_inset | visible, | ||
tgui_inset_behaviour | behaviour | ||
) |
c | The connection to use. |
a | The Activity. |
visible | The insets that should be visible. |
behaviour | How the insets will behave on user input. |
tgui_err tgui_activity_set_secure | ( | tgui_connection | c, |
tgui_activity | a, | ||
bool | secure | ||
) |
Sets the secure flag for the Activity. Disables screenshots and shows a blank Activity in the task switcher if enabled.
c | The connection to use. |
a | The Activity. |
secure | The secure flag setting. |
tgui_err tgui_activity_finish | ( | tgui_connection | c, |
tgui_activity | a | ||
) |
tgui_err tgui_task_to_front | ( | tgui_connection | c, |
tgui_task | t | ||
) |
tgui_err tgui_task_finish | ( | tgui_connection | c, |
tgui_task | t | ||
) |