VSF Documented
Macros | Functions
vsf_tgui.c File Reference
#include "./vsf_tgui_cfg.h"
#include "./vsf_tgui.h"

Macros

#define __VSF_TGUI_CONTROLS_CONTROL_CLASS_INHERIT
 
#define __VSF_TGUI_CLASS_IMPLEMENT
 
#define this   (*this_ptr)
 

Functions

 implement_vsf_rng_buf (__vsf_tgui_evt_queue_t, vsf_tgui_evt_t, __vsf_interrupt_safe)
 
vsf_err_t vk_tgui_set_root_container (vsf_tgui_t *gui_ptr, vsf_tgui_root_container_t *root_node_ptr, bool req_first_refresh)
 
vsf_err_t vk_tgui_close_root_container (vsf_tgui_t *gui_ptr)
 
bool vk_tgui_send_message (vsf_tgui_t *gui_ptr, vsf_tgui_evt_t event)
 tgui msg queue producer
 
bool vk_tgui_update (vsf_tgui_t *gui_ptr, const vsf_tgui_control_t *target_ptr)
 
bool vk_tgui_send_timer_event (vsf_tgui_t *gui_ptr, const vsf_tgui_control_t *target_ptr)
 
bool vk_tgui_update_tree (vsf_tgui_t *gui_ptr, const vsf_tgui_control_t *target_ptr)
 
const vsf_tgui_control_tvsf_tgui_actived_control_get (vsf_tgui_t *gui_ptr)
 
const vsf_tgui_control_tvsf_tgui_pointed_control_get (vsf_tgui_t *gui_ptr)
 
bool vsf_tgui_set_pointer_location (vsf_tgui_t *gui_ptr, int_fast8_t idx, vsf_tgui_location_t *location_ptr)
 
const vsf_tgui_location_tvsf_tgui_get_pointer_location (vsf_tgui_t *gui_ptr, int_fast8_t idx)
 
void vsf_tgui_low_level_refresh_ready (vsf_tgui_t *gui_ptr)
 
 implement_vsf_pt (__vsf_tgui_evt_shooter_t)
 tgui msg queue consumer
 

Macro Definition Documentation

◆ __VSF_TGUI_CONTROLS_CONTROL_CLASS_INHERIT

#define __VSF_TGUI_CONTROLS_CONTROL_CLASS_INHERIT

◆ __VSF_TGUI_CLASS_IMPLEMENT

#define __VSF_TGUI_CLASS_IMPLEMENT

◆ this

#define this   (*this_ptr)

Function Documentation

◆ implement_vsf_rng_buf()

implement_vsf_rng_buf ( __vsf_tgui_evt_queue_t  ,
vsf_tgui_evt_t  ,
__vsf_interrupt_safe   
)

initialise the queue

initialise input

initialise consumer pt task

start pt task

◆ vk_tgui_set_root_container()

vsf_err_t vk_tgui_set_root_container ( vsf_tgui_t *  gui_ptr,
vsf_tgui_root_container_t root_node_ptr,
bool  req_first_refresh 
)

◆ vk_tgui_close_root_container()

vsf_err_t vk_tgui_close_root_container ( vsf_tgui_t *  gui_ptr)

◆ vk_tgui_send_message()

bool vk_tgui_send_message ( vsf_tgui_t *  gui_ptr,
vsf_tgui_evt_t  event 
)

tgui msg queue producer

wake pt task up

◆ vk_tgui_update()

bool vk_tgui_update ( vsf_tgui_t *  gui_ptr,
const vsf_tgui_control_t target_ptr 
)

◆ vk_tgui_send_timer_event()

bool vk_tgui_send_timer_event ( vsf_tgui_t *  gui_ptr,
const vsf_tgui_control_t target_ptr 
)

◆ vk_tgui_update_tree()

bool vk_tgui_update_tree ( vsf_tgui_t *  gui_ptr,
const vsf_tgui_control_t target_ptr 
)

◆ vsf_tgui_actived_control_get()

const vsf_tgui_control_t * vsf_tgui_actived_control_get ( vsf_tgui_t *  gui_ptr)

◆ vsf_tgui_pointed_control_get()

const vsf_tgui_control_t * vsf_tgui_pointed_control_get ( vsf_tgui_t *  gui_ptr)

◆ vsf_tgui_set_pointer_location()

bool vsf_tgui_set_pointer_location ( vsf_tgui_t *  gui_ptr,
int_fast8_t  idx,
vsf_tgui_location_t location_ptr 
)

◆ vsf_tgui_get_pointer_location()

const vsf_tgui_location_t * vsf_tgui_get_pointer_location ( vsf_tgui_t *  gui_ptr,
int_fast8_t  idx 
)

◆ vsf_tgui_low_level_refresh_ready()

void vsf_tgui_low_level_refresh_ready ( vsf_tgui_t *  gui_ptr)

◆ implement_vsf_pt()

implement_vsf_pt ( __vsf_tgui_evt_shooter_t  )

tgui msg queue consumer

wait for new event arrival

Note
Use user specific target_ptr, otherwise use RootNode

use user specified target

set new top container

send on load message

constructor message

constructor message

send message

send message

message we don't need to handle

Note
specified target will not change current activated control

send message to currently activated control

pointer up event could only be sent to active node

check new target of activation

missed all node (control)

\IMPORTANT only pointer/finger 0 can active controls. tGUI is mainly designed to support touch screen rather than a device with a mouse. So when you use PC to simulate a touchscreen, a right click won't change the activated controls. It is a KNOWN ISSUE and we will NOT fix vsf_this, because designing an application with normal mouse support is out of original scope.

check new target of activation

missed all node (control)

send message to currently activated control

message we don't need to handle

default message handling