|
Termux:GUI C/C++ Bindings
|
This file contains all functions related to Views. More...
#include "types.h"Go to the source code of this file.
Functions | |
| tgui_err | tgui_show_cursor (tgui_connection c, tgui_activity a, tgui_view v, bool show) |
| Sets whether an EditText shows the cursor or not. More... | |
| tgui_err | tgui_linear_params (tgui_connection c, tgui_activity a, tgui_view v, float weight, int position) |
| Sets the parameters for a View in a LinearLayout. More... | |
| tgui_err | tgui_grid_params (tgui_connection c, tgui_activity a, tgui_view v, size_t row, size_t col, size_t row_size, size_t col_size, tgui_grid_alignment row_align, tgui_grid_alignment col_align) |
| Sets the parameters for a View in a GridLayout. More... | |
| tgui_err | tgui_view_location (tgui_connection c, tgui_activity a, tgui_view v, tgui_size_unit unit, float x, float y, bool top) |
| Sets the location of the View manually. Useful for FrameLayout. Can also make it display on top of its siblings. More... | |
| tgui_err | tgui_relative_params (tgui_connection c, tgui_activity a, tgui_view v) |
| Sets the parameters for a View in a RelativeLayout. NOT IMPLEMENTED! More... | |
| tgui_err | tgui_visibility (tgui_connection c, tgui_activity a, tgui_view v, tgui_view_visibility vis) |
| Sets the visibility of a View. More... | |
| tgui_err | tgui_set_width (tgui_connection c, tgui_activity a, tgui_view v, tgui_view_size width) |
| Sets the width of a View. More... | |
| tgui_err | tgui_set_height (tgui_connection c, tgui_activity a, tgui_view v, tgui_view_size height) |
| Sets the height of a View. More... | |
| tgui_err | tgui_get_dimensions (tgui_connection c, tgui_activity a, tgui_view v, tgui_size_unit unit, float *width, float *height) |
| Gets the dimensions of a View. More... | |
| tgui_err | tgui_delete_view (tgui_connection c, tgui_activity a, tgui_view v) |
| Deletes a View. More... | |
| tgui_err | tgui_delete_children (tgui_connection c, tgui_activity a, tgui_view v) |
| Deletes the children of a View. More... | |
| tgui_err | tgui_set_margin (tgui_connection c, tgui_activity a, tgui_view v, tgui_size size, tgui_direction dir) |
| Sets the margins for a View. More... | |
| tgui_err | tgui_set_padding (tgui_connection c, tgui_activity a, tgui_view v, tgui_size size, tgui_direction dir) |
| Sets the padding for a View. More... | |
| tgui_err | tgui_background_color (tgui_connection c, tgui_activity a, tgui_view v, tgui_color color) |
| Sets the background color of a View. More... | |
| tgui_err | tgui_text_color (tgui_connection c, tgui_activity a, tgui_view v, tgui_color color) |
| Sets the text color of a View. More... | |
| tgui_err | tgui_progress (tgui_connection c, tgui_activity a, tgui_view v, unsigned char progress) |
| Sets the progress of a ProgressBar. More... | |
| tgui_err | tgui_refreshing (tgui_connection c, tgui_activity a, tgui_view v, bool refreshing) |
| Set whether a SwipeRefreshLayout is in the refreshing state. More... | |
| tgui_err | tgui_set_text (tgui_connection c, tgui_activity a, tgui_view v, const char *text) |
| Sets the Text of a View. More... | |
| tgui_err | tgui_set_gravity (tgui_connection c, tgui_activity a, tgui_view v, tgui_gravity horizontal, tgui_gravity vertical) |
| Sets the gravity of the text in a View. More... | |
| tgui_err | tgui_text_size (tgui_connection c, tgui_activity a, tgui_view v, tgui_size size) |
| Sets the text size of a View. More... | |
| tgui_err | tgui_get_text (tgui_connection c, tgui_activity a, tgui_view v, char **text) |
| Gets the text of a View. More... | |
| tgui_err | tgui_set_checked (tgui_connection c, tgui_activity a, tgui_view v, bool checked) |
| Sets whether a View is checked. More... | |
| tgui_err | tgui_focus (tgui_connection c, tgui_activity a, tgui_view v, bool force_soft) |
| Sets the focus to a View. More... | |
| tgui_err | tgui_get_scroll_position (tgui_connection c, tgui_activity a, tgui_view v, tgui_size_unit unit, float *x, float *y) |
| Gets the scroll position of a View. More... | |
| tgui_err | tgui_set_scroll_position (tgui_connection c, tgui_activity a, tgui_view v, tgui_size x, tgui_size y, bool smooth) |
| Sets the scroll position for a View. More... | |
| tgui_err | tgui_set_list (tgui_connection c, tgui_activity a, tgui_view v, const char *const *list) |
| Sets the list of a Spinner. More... | |
| tgui_err | tgui_set_image (tgui_connection c, tgui_activity a, tgui_view v, const void *img, size_t length) |
| Sets the image of an ImageView. More... | |
| tgui_err | tgui_add_buffer (tgui_connection c, tgui_buffer *buffer) |
| Creates a memory buffer shared with the plugin and maps it. More... | |
| tgui_err | tgui_delete_buffer (tgui_connection c, tgui_buffer *buffer) |
| Deletes the buffer in the plugin, closes the file descriptor and removes the memory mapping. More... | |
| tgui_err | tgui_blit_buffer (tgui_connection c, const tgui_buffer *buffer) |
| Blits a buffer in the plugin, making the image available to ImageViews on the next refresh. More... | |
| tgui_err | tgui_set_buffer (tgui_connection c, tgui_activity a, tgui_view v, const tgui_buffer *buffer) |
| Sets an ImageVIew to display the contents of a buffer. More... | |
| tgui_err | tgui_refresh_image_view (tgui_connection c, tgui_activity a, tgui_view v) |
| Refreshes an ImageView after blitting the contents of its buffer. More... | |
| tgui_err | tgui_select_tab (tgui_connection c, tgui_activity a, tgui_view v, unsigned int index) |
| Selects a tab in a TabLayout. More... | |
| tgui_err | tgui_select_item (tgui_connection c, tgui_activity a, tgui_view v, unsigned int index) |
| Selects an item in a Spinner. More... | |
| tgui_err | tgui_set_clickable (tgui_connection c, tgui_activity a, tgui_view v, bool clickable) |
| Sets whether a View is clickable by the user. More... | |
This file contains all functions related to Views.
| tgui_err tgui_show_cursor | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| bool | show | ||
| ) |
Sets whether an EditText shows the cursor or not.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| show | Whether to show the cursor or not. |
| tgui_err tgui_linear_params | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| float | weight, | ||
| int | position | ||
| ) |
Sets the parameters for a View in a LinearLayout.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| weight | The layout weight. Use a negative number to keep the current weight. |
| position | the position in the View. Use 0 to keep the position. |
| tgui_err tgui_grid_params | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| size_t | row, | ||
| size_t | col, | ||
| size_t | row_size, | ||
| size_t | col_size, | ||
| tgui_grid_alignment | row_align, | ||
| tgui_grid_alignment | col_align | ||
| ) |
Sets the parameters for a View in a GridLayout.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| row | The row position. |
| col | The column position. |
| row_size | How many rows the View occupies. |
| col_size | How many columns the View occupies. |
| row_align | The alignment in the row. |
| col_align | The alignment in the column. |
| tgui_err tgui_view_location | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_size_unit | unit, | ||
| float | x, | ||
| float | y, | ||
| bool | top | ||
| ) |
Sets the location of the View manually. Useful for FrameLayout. Can also make it display on top of its siblings.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| unit | The unit for x and y. |
| x | The horizontal position. |
| y | The vertical position. |
| top | Set to true if you want to move the View on top of its siblings. |
| tgui_err tgui_relative_params | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v | ||
| ) |
Sets the parameters for a View in a RelativeLayout. NOT IMPLEMENTED!
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| tgui_err tgui_visibility | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_view_visibility | vis | ||
| ) |
Sets the visibility of a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| vis | The visibility. |
| tgui_err tgui_set_width | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_view_size | width | ||
| ) |
Sets the width of a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| width | The width. |
| tgui_err tgui_set_height | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_view_size | height | ||
| ) |
Sets the height of a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| height | The height. |
| tgui_err tgui_get_dimensions | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_size_unit | unit, | ||
| float * | width, | ||
| float * | height | ||
| ) |
Gets the dimensions of a View.
| c | The connection to use. | |
| a | The Activity the View is in. | |
| v | The View. | |
| unit | The unit of the returned dimensions. | |
| [out] | width | If successful, will contain the View width in the desired unit. |
| [out] | height | If successful, will contain the View height in the desired unit. |
| tgui_err tgui_delete_view | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v | ||
| ) |
Deletes a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| tgui_err tgui_delete_children | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v | ||
| ) |
Deletes the children of a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| tgui_err tgui_set_margin | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_size | size, | ||
| tgui_direction | dir | ||
| ) |
Sets the margins for a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| size | The margin size. |
| dir | The direction(s) to apply the margin. |
| tgui_err tgui_set_padding | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_size | size, | ||
| tgui_direction | dir | ||
| ) |
Sets the padding for a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| size | The padding size. |
| dir | The direction(s) to apply the padding. |
| tgui_err tgui_background_color | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_color | color | ||
| ) |
Sets the background color of a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| color | The color. |
| tgui_err tgui_text_color | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_color | color | ||
| ) |
Sets the text color of a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| color | The text color. |
| tgui_err tgui_progress | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| unsigned char | progress | ||
| ) |
Sets the progress of a ProgressBar.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| progress | The progress from 0 to 100(inclusive). |
| tgui_err tgui_refreshing | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| bool | refreshing | ||
| ) |
Set whether a SwipeRefreshLayout is in the refreshing state.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| refreshing | The refreshing state. |
| tgui_err tgui_set_text | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| const char * | text | ||
| ) |
Sets the Text of a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| text | The text. |
| tgui_err tgui_set_gravity | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_gravity | horizontal, | ||
| tgui_gravity | vertical | ||
| ) |
Sets the gravity of the text in a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| horizontal | The horizontal gravity. |
| vertical | The vertical gravity. |
| tgui_err tgui_text_size | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_size | size | ||
| ) |
Sets the text size of a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| size | The text size. |
| tgui_err tgui_get_text | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| char ** | text | ||
| ) |
Gets the text of a View.
| c | The connection to use. | |
| a | The Activity the View is in. | |
| v | The View. | |
| [out] | text | The text of the View. When successful, this has to be freed with free(). |
| tgui_err tgui_set_checked | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| bool | checked | ||
| ) |
Sets whether a View is checked.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| checked | The new checked status. |
| tgui_err tgui_focus | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| bool | force_soft | ||
| ) |
Sets the focus to a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| force_soft | If true, forces the software keyboard to open. |
| tgui_err tgui_get_scroll_position | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_size_unit | unit, | ||
| float * | x, | ||
| float * | y | ||
| ) |
Gets the scroll position of a View.
| c | The connection to use. | |
| a | The Activity the View is in. | |
| v | The View. | |
| unit | The unit for x and y. | |
| [out] | x | The x scroll position. |
| [out] | y | The y scroll position. |
| tgui_err tgui_set_scroll_position | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| tgui_size | x, | ||
| tgui_size | y, | ||
| bool | smooth | ||
| ) |
Sets the scroll position for a View.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| x | The x scroll position. |
| y | The y scroll position. |
| smooth | Whether to jump or scroll smoothly. |
| tgui_err tgui_set_list | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| const char *const * | list | ||
| ) |
Sets the list of a Spinner.
| c | The connection to use. | |
| a | The Activity the View is in. | |
| v | The View. | |
| [in] | list | A NULL terminated list of pointers to strings. |
| tgui_err tgui_set_image | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| const void * | img, | ||
| size_t | length | ||
| ) |
Sets the image of an ImageView.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| img | The image data in PGN/JPEG. |
| length | The length of the image data. |
| tgui_err tgui_add_buffer | ( | tgui_connection | c, |
| tgui_buffer * | buffer | ||
| ) |
Creates a memory buffer shared with the plugin and maps it.
| c | The connection to use. | |
| [in] | buffer | A buffer with the width and height fields > 0 and a valid format field. The data, id and fd fields are filled out if successful. |
| tgui_err tgui_delete_buffer | ( | tgui_connection | c, |
| tgui_buffer * | buffer | ||
| ) |
Deletes the buffer in the plugin, closes the file descriptor and removes the memory mapping.
| c | The connection to use. |
| buffer | The buffer to delete. |
| tgui_err tgui_blit_buffer | ( | tgui_connection | c, |
| const tgui_buffer * | buffer | ||
| ) |
Blits a buffer in the plugin, making the image available to ImageViews on the next refresh.
| c | The connection to use. | |
| [in] | buffer | The buffer to blit. |
| tgui_err tgui_set_buffer | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| const tgui_buffer * | buffer | ||
| ) |
Sets an ImageVIew to display the contents of a buffer.
| c | The connection to use. | |
| a | The Activity the View is in. | |
| v | The View. | |
| [in] | buffer | The buffer to set. |
| tgui_err tgui_refresh_image_view | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v | ||
| ) |
Refreshes an ImageView after blitting the contents of its buffer.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| tgui_err tgui_select_tab | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| unsigned int | index | ||
| ) |
Selects a tab in a TabLayout.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| index | The tab to select. |
| tgui_err tgui_select_item | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| unsigned int | index | ||
| ) |
Selects an item in a Spinner.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| index | The item to select. |
| tgui_err tgui_set_clickable | ( | tgui_connection | c, |
| tgui_activity | a, | ||
| tgui_view | v, | ||
| bool | clickable | ||
| ) |
Sets whether a View is clickable by the user.
| c | The connection to use. |
| a | The Activity the View is in. |
| v | The View. |
| clickable | The new clickable state. |