Termux:GUI C/C++ Bindings
Loading...
Searching...
No Matches
activity.h
Go to the documentation of this file.
1#pragma once
2
10#include "types.h"
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16
17
18
36
37
38
39
40
41
57
58
78tgui_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);
79
80
98tgui_err tgui_activity_set_task_description(tgui_connection c, tgui_activity a, const void* img, size_t img_size, const char* label);
99
100
117tgui_err tgui_activity_set_pip_params(tgui_connection c, tgui_activity a, unsigned int num, unsigned int den);
118
119
136
137
154
155
172
173
190
191
208
209
227
228
245
246
262
263
280
281
299
300
318
319
320
337
338
339
354
355
356
357
358
373
388
389
390
391
392
393#ifdef __cplusplus
394}
395#endif
tgui_err tgui_activity_get_configuration(tgui_connection c, tgui_activity a, tgui_activity_configuration *conf)
Gets the current Activity configuration.
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.
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.
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 sw...
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 interce...
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 ...
tgui_err tgui_activity_create(tgui_connection c, tgui_activity *a, tgui_activity_type type, tgui_task *t, bool intercept)
Creates a new Activity.
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.
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.
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.
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.
tgui_err tgui_activity_finish(tgui_connection c, tgui_activity a)
Finishes the Activity.
tgui_err tgui_activity_set_orientation(tgui_connection c, tgui_activity a, tgui_orientation o)
Sets the orientation for an Activity.
tgui_err tgui_activity_configure_insets(tgui_connection c, tgui_activity a, tgui_inset visible, tgui_inset_behaviour behaviour)
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.
tgui_err tgui_activity_hide_soft_keyboard(tgui_connection c, tgui_activity a)
Hides the soft keyboard.
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 leavin...
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.
tgui_err tgui_task_finish(tgui_connection c, tgui_task t)
Finishes the Task, closing all Activities in it.
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).
Provides information on the current device and Activity configuration.
Definition: types.h:212
This file contains the types used for all the functions.
struct tgui_connection_ * tgui_connection
Represents a connection to the Termux:GUI plugin.
Definition: types.h:27
int32_t tgui_task
Represents an Android Task.
Definition: types.h:41
tgui_inset
The types of insets of an Activity that can be shown or hidden.
Definition: types.h:583
int32_t tgui_activity
Represents an Android Activity.
Definition: types.h:34
tgui_inset_behaviour
How the insets of an Activity will behave to user interaction.
Definition: types.h:592
tgui_activity_type
All possible types of Activities.
Definition: types.h:108
uint32_t tgui_color
An RGBA8888 color code.
Definition: types.h:68
tgui_orientation
Specifies the orientation you can set an Activity to.
Definition: types.h:128
tgui_err
Status codes for all functions in the library.
Definition: types.h:77
tgui_activity_input_mode
Determines how an Activity reacts when the soft keyboard is opened.
Definition: types.h:167