Termux:GUI C/C++ Bindings
Loading...
Searching...
No Matches
remote.h File Reference

This file contains all functions related to remote layouts and widgets. More...

#include "types.h"

Go to the source code of this file.

Functions

tgui_err tgui_remote_layout_create (tgui_connection c, tgui_remote_layout *layout)
 Creates a remote layout. More...
 
tgui_err tgui_remote_layout_destroy (tgui_connection c, tgui_remote_layout layout)
 Destroys a remote layout. More...
 
tgui_err tgui_remote_create_frame_layout (tgui_connection c, tgui_remote_layout layout, const tgui_view *parent, tgui_view *v)
 Create a remote FrameLayout. More...
 
tgui_err tgui_remote_create_linear_layout (tgui_connection c, tgui_remote_layout layout, const tgui_view *parent, tgui_view *v, bool horizontal)
 Create a remote LinearLayout. More...
 
tgui_err tgui_remote_create_text_view (tgui_connection c, tgui_remote_layout layout, const tgui_view *parent, tgui_view *v)
 Create a remote TextView. More...
 
tgui_err tgui_remote_create_button (tgui_connection c, tgui_remote_layout layout, const tgui_view *parent, tgui_view *v)
 Create a remote Button. More...
 
tgui_err tgui_remote_create_image_view (tgui_connection c, tgui_remote_layout layout, const tgui_view *parent, tgui_view *v)
 Create a remote ImageView. More...
 
tgui_err tgui_remote_create_progress_bar (tgui_connection c, tgui_remote_layout layout, const tgui_view *parent, tgui_view *v)
 Create a remote ProgressBar. More...
 
tgui_err tgui_remote_set_background_color (tgui_connection c, tgui_remote_layout layout, tgui_view v, tgui_color color)
 Sets the background color of a remote View. More...
 
tgui_err tgui_remote_set_progress (tgui_connection c, tgui_remote_layout layout, tgui_view v, unsigned char progress)
 Sets the progress of a remote ProgressBar. More...
 
tgui_err tgui_remote_set_text (tgui_connection c, tgui_remote_layout layout, tgui_view v, const char *text)
 Sets the text of a remote View. More...
 
tgui_err tgui_remote_set_text_size (tgui_connection c, tgui_remote_layout layout, tgui_view v, tgui_size size)
 Sets the text size of a remote View. More...
 
tgui_err tgui_remote_set_text_color (tgui_connection c, tgui_remote_layout layout, tgui_view v, tgui_color color)
 Sets the text color of a remote View. More...
 
tgui_err tgui_remote_set_visibility (tgui_connection c, tgui_remote_layout layout, tgui_view v, tgui_view_visibility vis)
 Sets the visibility of a remote View. More...
 
tgui_err tgui_remote_set_padding (tgui_connection c, tgui_remote_layout layout, tgui_view v, tgui_size left, tgui_size top, tgui_size right, tgui_size bottom)
 Sets the padding of a remote View. More...
 
tgui_err tgui_remote_set_image (tgui_connection c, tgui_remote_layout layout, tgui_view v, const void *img, size_t length)
 Sets the image of a remote ImageView. More...
 
tgui_err tgui_remote_widget_layout (tgui_connection c, tgui_remote_layout layout, const char *wid)
 Sets a widget to the specified remote layout. The widget id is obtained when the user creates the widget. More...
 

Detailed Description

This file contains all functions related to remote layouts and widgets.

Function Documentation

◆ tgui_remote_layout_create()

tgui_err tgui_remote_layout_create ( tgui_connection  c,
tgui_remote_layout layout 
)

Creates a remote layout.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
[out]layoutWill contain the remote layout id if successful.
Returns
The error code.

◆ tgui_remote_layout_destroy()

tgui_err tgui_remote_layout_destroy ( tgui_connection  c,
tgui_remote_layout  layout 
)

Destroys a remote layout.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe layout to destroy.
Returns
The error code.

◆ tgui_remote_create_frame_layout()

tgui_err tgui_remote_create_frame_layout ( tgui_connection  c,
tgui_remote_layout  layout,
const tgui_view parent,
tgui_view v 
)

Create a remote FrameLayout.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
[in]parentThe optional parent View.
[out]vWill contain the remote view id if successful.
Returns
The error code.

◆ tgui_remote_create_linear_layout()

tgui_err tgui_remote_create_linear_layout ( tgui_connection  c,
tgui_remote_layout  layout,
const tgui_view parent,
tgui_view v,
bool  horizontal 
)

Create a remote LinearLayout.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
[in]parentThe optional parent View.
[out]vWill contain the remote view id if successful.
horizontalWhether the LinearLayout should place its children vertically or horizontally.
Returns
The error code.

◆ tgui_remote_create_text_view()

tgui_err tgui_remote_create_text_view ( tgui_connection  c,
tgui_remote_layout  layout,
const tgui_view parent,
tgui_view v 
)

Create a remote TextView.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
[in]parentThe optional parent View.
[out]vWill contain the remote view id if successful.
Returns
The error code.

◆ tgui_remote_create_button()

tgui_err tgui_remote_create_button ( tgui_connection  c,
tgui_remote_layout  layout,
const tgui_view parent,
tgui_view v 
)

Create a remote Button.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
[in]parentThe optional parent View.
[out]vWill contain the remote view id if successful.
Returns
The error code.

◆ tgui_remote_create_image_view()

tgui_err tgui_remote_create_image_view ( tgui_connection  c,
tgui_remote_layout  layout,
const tgui_view parent,
tgui_view v 
)

Create a remote ImageView.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
[in]parentThe optional parent View.
[out]vWill contain the remote view id if successful.
Returns
The error code.

◆ tgui_remote_create_progress_bar()

tgui_err tgui_remote_create_progress_bar ( tgui_connection  c,
tgui_remote_layout  layout,
const tgui_view parent,
tgui_view v 
)

Create a remote ProgressBar.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
[in]parentThe optional parent View.
[out]vWill contain the remote view id if successful.
Returns
The error code.

◆ tgui_remote_set_background_color()

tgui_err tgui_remote_set_background_color ( tgui_connection  c,
tgui_remote_layout  layout,
tgui_view  v,
tgui_color  color 
)

Sets the background color of a remote View.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
vThe View.
colorThe color.
Returns
The error code.

◆ tgui_remote_set_progress()

tgui_err tgui_remote_set_progress ( tgui_connection  c,
tgui_remote_layout  layout,
tgui_view  v,
unsigned char  progress 
)

Sets the progress of a remote ProgressBar.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
vThe View.
progressThe progress from 0 to 100 (inclusive).
Returns
The error code.

◆ tgui_remote_set_text()

tgui_err tgui_remote_set_text ( tgui_connection  c,
tgui_remote_layout  layout,
tgui_view  v,
const char *  text 
)

Sets the text of a remote View.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
vThe View.
textThe text to use.
Returns
The error code.

◆ tgui_remote_set_text_size()

tgui_err tgui_remote_set_text_size ( tgui_connection  c,
tgui_remote_layout  layout,
tgui_view  v,
tgui_size  size 
)

Sets the text size of a remote View.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
vThe View.
sizeThe size.
Returns
The error code.

◆ tgui_remote_set_text_color()

tgui_err tgui_remote_set_text_color ( tgui_connection  c,
tgui_remote_layout  layout,
tgui_view  v,
tgui_color  color 
)

Sets the text color of a remote View.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
vThe View.
colorThe color.
Returns
The error code.

◆ tgui_remote_set_visibility()

tgui_err tgui_remote_set_visibility ( tgui_connection  c,
tgui_remote_layout  layout,
tgui_view  v,
tgui_view_visibility  vis 
)

Sets the visibility of a remote View.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
vThe View.
visThe visibility.
Returns
The error code.

◆ tgui_remote_set_padding()

tgui_err tgui_remote_set_padding ( tgui_connection  c,
tgui_remote_layout  layout,
tgui_view  v,
tgui_size  left,
tgui_size  top,
tgui_size  right,
tgui_size  bottom 
)

Sets the padding of a remote View.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
vThe View.
leftThe left padding.
topThe top padding.
rightThe right padding.
bottomThe bottom padding.
Returns
The error code.

◆ tgui_remote_set_image()

tgui_err tgui_remote_set_image ( tgui_connection  c,
tgui_remote_layout  layout,
tgui_view  v,
const void *  img,
size_t  length 
)

Sets the image of a remote ImageView.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
vThe View.
[in]imgThe image data as PGN or JPEG.
lengthThe length of the image data.
Returns
The error code.

◆ tgui_remote_widget_layout()

tgui_err tgui_remote_widget_layout ( tgui_connection  c,
tgui_remote_layout  layout,
const char *  wid 
)

Sets a widget to the specified remote layout. The widget id is obtained when the user creates the widget.

Errors

  • TGUI_ERR_MESSAGE: Protobuf I/O error.
  • TGUI_ERR_NOMEM: Not enough memory.
  • TGUI_ERR_EXCEPTION: Generic exception triggered.
Parameters
cThe connection to use.
layoutThe remote layout to use.
[in]widThe widget id as a string.
Returns
The error code.