Termux:GUI C/C++ Bindings
|
This file contains functions related to accelerated rendering using SurfaceViews. More...
#include "types.h"
Go to the source code of this file.
Functions | |
tgui_err | tgui_hardware_buffer_create (tgui_connection c, tgui_hardware_buffer *buffer, tgui_hardware_buffer_format format, uint32_t width, uint32_t height, tgui_hardware_buffer_cpu_frequency read, tgui_hardware_buffer_cpu_frequency write) |
Create an AHardwareBuffer shared with the plugin. More... | |
tgui_err | tgui_hardware_buffer_destroy (tgui_connection c, tgui_hardware_buffer *buffer) |
Destroys a shared AHardwareBuffer. You also have to destroy any EGLImages or other mappings. More... | |
tgui_err | tgui_surface_view_set_buffer (tgui_connection c, tgui_activity a, tgui_view v, tgui_hardware_buffer *buffer) |
Sets the buffer displayed in a SurfaceView. More... | |
tgui_err | tgui_surface_view_config (tgui_connection c, tgui_activity a, tgui_view v, tgui_color background_color, tgui_surface_view_dimension_mismatch x, tgui_surface_view_dimension_mismatch y, float framerate) |
Configures the behaviour of a SurfaceView. More... | |
This file contains functions related to accelerated rendering using SurfaceViews.
tgui_err tgui_hardware_buffer_create | ( | tgui_connection | c, |
tgui_hardware_buffer * | buffer, | ||
tgui_hardware_buffer_format | format, | ||
uint32_t | width, | ||
uint32_t | height, | ||
tgui_hardware_buffer_cpu_frequency | read, | ||
tgui_hardware_buffer_cpu_frequency | write | ||
) |
Create an AHardwareBuffer shared with the plugin.
c | The connection to use. | |
[out] | buffer | The buffer to create. |
format | The pixel format for the buffer. | |
width | The width of the buffer. | |
height | The height of the buffer. | |
read | How often the CPU will read the buffer. | |
write | How often the CPU will write to the buffer. |
tgui_err tgui_hardware_buffer_destroy | ( | tgui_connection | c, |
tgui_hardware_buffer * | buffer | ||
) |
Destroys a shared AHardwareBuffer. You also have to destroy any EGLImages or other mappings.
c | The connection to use. | |
[out] | buffer | The buffer to destroy. |
tgui_err tgui_surface_view_set_buffer | ( | tgui_connection | c, |
tgui_activity | a, | ||
tgui_view | v, | ||
tgui_hardware_buffer * | buffer | ||
) |
Sets the buffer displayed in a SurfaceView.
c | The connection to use. | |
a | The Activity the View is in. | |
v | The SurfaceView. | |
[in] | buffer | The buffer to show. |
tgui_err tgui_surface_view_config | ( | tgui_connection | c, |
tgui_activity | a, | ||
tgui_view | v, | ||
tgui_color | background_color, | ||
tgui_surface_view_dimension_mismatch | x, | ||
tgui_surface_view_dimension_mismatch | y, | ||
float | framerate | ||
) |
Configures the behaviour of a SurfaceView.
c | The connection to use. |
a | The Activity the View is in. |
v | The SurfaceView. |
background_color | The color that fills the rest of the SurfaceView in case the buffer is too small. |
x | The behaviour on x axis buffer size mismatch. |
y | The behaviour on y axis buffer size mismatch. |
framerate | The targeted framerate, for Android 11 and higher. |