mikroSDK Reference Manual
VTFT Library

VTFT Library API Reference. More...

Functions list

void vtft_init (vtft_t *vtft_instance, tp_t *tp_instance)
 Initialize the VTFT library with the given gl and tp instances. More...
 
void vtft_set_progress_bar_position (vtft_t *instance, vtft_progress_bar *progress_bar, vtft_ucoord_t position)
 Set the position of the given progress bar. More...
 
void vtft_draw_component (vtft_t *instance, const vtft_component *__generic component)
 Draw the given component, using the appropriate drawing function. More...
 
void vtft_refresh_current_screen (vtft_t *instance)
 Redraw the current screen and all of its components. More...
 
void vtft_set_current_screen (vtft_t *instance, vtft_screen *screen)
 Set the current screen and draws it. More...
 
void vtft_process (vtft_t *instance)
 Processes the periodic events. More...
 
void _draw_none (vtft_t *instance, const vtft_component *__generic component)
 An empty drawing handle for components with an invalid type. More...
 
void _draw_box (vtft_t *instance, const vtft_component *__generic component)
 Draw the given box component. More...
 
void _draw_rounded_box (vtft_t *instance, const vtft_component *__generic component)
 Draw the given rounded box component. More...
 
void _draw_circle (vtft_t *instance, const vtft_component *__generic component)
 Draw the given circle component. More...
 
void _draw_ellipse (vtft_t *instance, const vtft_component *__generic_ptr component)
 Draws the given ellipse component. More...
 
void _draw_line (vtft_t *instance, const vtft_component *__generic component)
 Draw the given line component. More...
 
void _draw_label (vtft_t *instance, const vtft_component *__generic component)
 Draw the given label component. More...
 
void _draw_button (vtft_t *instance, const vtft_component *__generic component)
 Draw the given button component. More...
 
void _draw_rounded_button (vtft_t *instance, const vtft_component *__generic component)
 Draw the given rounded button component. More...
 
void _draw_circle_button (vtft_t *instance, const vtft_component *__generic component)
 Draw the given circle button component. More...
 
void _draw_image (vtft_t *instance, const vtft_component *__generic component)
 Draw the given image component. More...
 
void _draw_check_box (vtft_t *instance, const vtft_component *__generic component)
 Draw the given check box. More...
 
void _draw_radio_button (vtft_t *instance, const vtft_component *__generic component)
 Draw the given radio button. More...
 
void _draw_progress_bar (vtft_t *instance, const vtft_component *__generic component)
 Draw the given progress bar. More...
 
void _update_progress_bar (vtft_t *instance, vtft_progress_bar *progressBar)
 Update the position of the given progress bar. More...
 

Detailed Description

API for configuring and manipulating VTFT library.

Function Documentation

◆ vtft_init()

void vtft_init ( vtft_t vtft_instance,
tp_t tp_instance 
)

Initializes the VTFT library with the given gl and tp instances.

Parameters
[out]vtft_instanceVTFT instance to be initialized. See vtft_t structure definition for detailed explanation.
[in]tp_instanceTP instance. See tp_t structure definition for detailed explanation.
Returns
Nothing.

◆ vtft_set_progress_bar_position()

void vtft_set_progress_bar_position ( vtft_t instance,
vtft_progress_bar progress_bar,
vtft_ucoord_t  position 
)

Sets the position of the given progress bar.

Parameters
[in]instanceInitialized VTFT instance. See vtft_t structure definition for detailed explanation.
[in]progress_barProgress bar whose position is going to be set. See vtft_progress_bar structure definition for detailed explanation.
[in]positionPosition to be set. See vtft_ucoord_t structure definition for detailed explanation.
Returns
Nothing.

◆ vtft_draw_component()

void vtft_draw_component ( vtft_t instance,
const vtft_component *__generic  component 
)

Draws the given component, using the appropriate drawing function.

Parameters
[in]instanceInitialized VTFT instance. See vtft_t structure definition for detailed explanation.
[in]componentComponent to be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ vtft_refresh_current_screen()

void vtft_refresh_current_screen ( vtft_t instance)

Redraws the current screen and all of its components.

Parameters
[in]instanceInitialized VTFT instance. See vtft_t structure definition for detailed explanation.
Returns
Nothing.

◆ vtft_set_current_screen()

void vtft_set_current_screen ( vtft_t instance,
vtft_screen screen 
)

Sets the current screen and draws it.

Parameters
[in]instanceInitialized VTFT instance. See vtft_t structure definition for detailed explanation.
[in]screenScreen to be set as current. See vtft_screen structure definition for detailed explanation.
Returns
Nothing.

◆ vtft_process()

void vtft_process ( vtft_t instance)

Processes the periodic events.

Parameters
[in]instanceInitialized VTFT instance. See vtft_t structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_none()

void _draw_none ( vtft_t instance,
const vtft_component *__generic  component 
)

An empty drawing handle for components with an invalid type.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentComponent of invalid type. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_box()

void _draw_box ( vtft_t instance,
const vtft_component *__generic  component 
)

Function uses Graphics Library to draw a box shape.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe box component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_rounded_box()

void _draw_rounded_box ( vtft_t instance,
const vtft_component *__generic  component 
)

Function uses Graphics Library to draw a rounded box shape.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe rounded box component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_circle()

void _draw_circle ( vtft_t instance,
const vtft_component *__generic  component 
)

Function uses Graphics Library to draw a circle.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe circle component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_ellipse()

void _draw_ellipse ( vtft_t instance,
const vtft_component *__generic_ptr  component 
)

Function uses Graphics Library to draw a ellipse.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe ellipse component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_line()

void _draw_line ( vtft_t instance,
const vtft_component *__generic  component 
)

Function uses Graphics Library to draw a line.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe line component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_label()

void _draw_label ( vtft_t instance,
const vtft_component *__generic  component 
)

Function uses Graphics Library to draw text.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe label component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_button()

void _draw_button ( vtft_t instance,
const vtft_component *__generic  component 
)

Function uses Graphics Library to frst draw button shape, then writes text over said shape.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe button component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_rounded_button()

void _draw_rounded_button ( vtft_t instance,
const vtft_component *__generic  component 
)

Function uses Graphics Library to first draw button shape, then writes text over said shape.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe rounded button component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_circle_button()

void _draw_circle_button ( vtft_t instance,
const vtft_component *__generic  component 
)

Function uses Graphics Library to frst draw circular button shape, then writes text over said shape.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe circle component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_image()

void _draw_image ( vtft_t instance,
const vtft_component *__generic  component 
)

Function uses Graphics Library to draw an image. Supported formats are 16bit BMP, 8bit BMP, 4bit BMP, 1bit BMP and JPEG.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe image component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_check_box()

void _draw_check_box ( vtft_t instance,
const vtft_component *__generic  component 
)

Function uses Graphics Library to draw checkbox shape. It's in the nature of check box to change it's value when checked or unchecked so the component itself should probably not be constant.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe check box component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_radio_button()

void _draw_radio_button ( vtft_t instance,
const vtft_component *__generic  component 
)

Function uses Graphics Library to draw radio button shape. It's in the nature of radio button to change it's value when checked or unchecked so the component itself should probably not be constant.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe radio button component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _draw_progress_bar()

void _draw_progress_bar ( vtft_t instance,
const vtft_component *__generic  component 
)

Function uses Graphics Library to draw progres bar shape. It's in the nature of progress bar to change it's value so the component itself should probably not be constant.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[in]componentThe progress bar component that will be drawn. See vtft_component structure definition for detailed explanation.
Returns
Nothing.

◆ _update_progress_bar()

void _update_progress_bar ( vtft_t instance,
vtft_progress_bar progressBar 
)

Some components can be constant due to the fact that their values can not be changed while other components, such as progress bar, change their value making them invalid for a const prameter.

Parameters
[in]instanceInitialized VTFT library instance. See vtft_t structure definition for detailed explanation.
[out]progressBarThe progres bar component that will be updated. See vtft_progress_bar structure definition for detailed explanation.
Returns
Nothing.