Go to the documentation of this file.
37#include "../vsf_ui_cfg.h"
39#ifndef __VSF_TINY_GUI_CFG_H__
40#define __VSF_TINY_GUI_CFG_H__
42#if VSF_USE_TINY_GUI == ENABLED
45#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
46# error tGUI requires ANSI-C99 and above
54#define VSF_TGUI_V_TEMPLATE_EXAMPLE 1
55#define VSF_TGUI_V_TEMPLATE_SIMPLE_VIEW 2
57#ifndef VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL
58# define VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL VSF_TGUI_V_TEMPLATE_EXAMPLE
65#define VSF_TGUI_COLOR_RGB_565 0
66#define VSF_TGUI_COLOR_BGR_565 1
67#define VSF_TGUI_COLOR_ARGB_8888 2
68#define VSF_TGUI_COLOR_RGB8_USER_TEMPLATE 3
70#ifndef VSF_TGUI_CFG_COLOR_MODE
71# define VSF_TGUI_CFG_COLOR_MODE VSF_TGUI_COLOR_ARGB_8888
74#undef __VSF_TGUI_IS_COLOR_SUPPORT_ALPHA__
75#if VSF_TGUI_CFG_COLOR_MODE == VSF_TGUI_COLOR_ARGB_8888
76# define __VSF_TGUI_IS_COLOR_SUPPORT_ALPHA__ 1
78# define __VSF_TGUI_IS_COLOR_SUPPORT_ALPHA__ 0
85#ifndef VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_PADDING
86# define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_PADDING ENABLED
89#ifndef VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_MARGIN
90# define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_MARGIN ENABLED
94#ifndef VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ANCHOR
95# define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ANCHOR DISABLED
98#ifndef VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_DOCK
99# define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_DOCK DISABLED
102#ifndef VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ALIGN
103# define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ALIGN DISABLED
109#define VSF_TGUI_TEXT_ASCII 0
110#define VSF_TGUI_TEXT_UTF8 1
112#ifndef VSF_TGUI_CFG_TEXT_MODE
113# define VSF_TGUI_CFG_TEXT_MODE VSF_TGUI_TEXT_UTF8
116#ifndef VSF_TGUI_CFG_SUPPORT_NAME_STRING
117# define VSF_TGUI_CFG_SUPPORT_NAME_STRING ENABLED
119#if VSF_TGUI_CFG_SUPPORT_NAME_STRING == ENABLED
120# if VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING != ENABLED
121# warning "VSF_TGUI_CFG_SUPPORT_NAME_STRING is ENABLED and depends \
122on VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING, but it is set to DISABLED. \
123In order to continue the compilation process, this macro \
124VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING is forced to be ENABLED. Please \
125enable it in vsf_usr_cfg.h or top vsf_tgui_cfg.h to suppress this \
127# undef VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING
128# define VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING ENABLED
132#ifndef VSF_TGUI_CFG_TEXT_SIZE_INFO_CACHING
133# define VSF_TGUI_CFG_TEXT_SIZE_INFO_CACHING ENABLED
136#ifndef VSF_TGUI_CFG_SAFE_STRING_MODE
137# define VSF_TGUI_CFG_SAFE_STRING_MODE ENABLED
143#define VSF_TGUI_REFRESH_SCHEME_NONE 0
144#define VSF_TGUI_REFRESH_SCHEME_Z_ORDER 1
145#define VSF_TGUI_REFRESH_SCHEME_PRE_ORDER_TRAVERSAL 1
146#define VSF_TGUI_REFRESH_SCHEME_LAYER_BY_LAYER 2
147#define VSF_TGUI_REFRESH_SCHEME_BREADTH_FIRST_TRAVERSAL 2
149#ifndef VSF_TGUI_CFG_REFRESH_SCHEME
150# define VSF_TGUI_CFG_REFRESH_SCHEME VSF_TGUI_REFRESH_SCHEME_Z_ORDER
153#ifndef VSF_TGUI_CFG_SUPPORT_TRANSPARENT_CONTROL
154# define VSF_TGUI_CFG_SUPPORT_TRANSPARENT_CONTROL ENABLED
157#ifndef VSF_TGUI_CFG_SUPPORT_DIRTY_REGION
158# define VSF_TGUI_CFG_SUPPORT_DIRTY_REGION ENABLED
164#ifndef VSF_TGUI_CFG_SUPPORT_DESTRUCTOR_SCHEME
165# define VSF_TGUI_CFG_SUPPORT_DESTRUCTOR_SCHEME ENABLED
168#ifndef VSF_TGUI_CFG_SUPPORT_CONSTRUCTOR_SCHEME
169# define VSF_TGUI_CFG_SUPPORT_CONSTRUCTOR_SCHEME ENABLED
172#ifndef VSF_TGUI_CFG_SUPPORT_MOUSE_LIKE_EVENTS
173# define VSF_TGUI_CFG_SUPPORT_MOUSE_LIKE_EVENTS ENABLED
175#ifndef VSF_TGUI_CFG_SUPPORT_MOUSE_MOVE_HANDLING
176# define VSF_TGUI_CFG_SUPPORT_MOUSE_MOVE_HANDLING DISABLED
179#ifndef VSF_TGUI_CFG_SUPPORT_KEY_EVENTS
180# define VSF_TGUI_CFG_SUPPORT_KEY_EVENTS ENABLED
187#ifndef VSF_TGUI_CFG_SUPPORT_TIMER
188# define VSF_TGUI_CFG_SUPPORT_TIMER ENABLED
191#ifndef VSF_TGUI_CFG_SUPPORT_STREAM_CONTAINER
192# define VSF_TGUI_CFG_SUPPORT_STREAM_CONTAINER ENABLED
195#ifndef VSF_TGUI_CFG_SUPPORT_LINE_STREAM_CONTAINER
196# define VSF_TGUI_CFG_SUPPORT_LINE_STREAM_CONTAINER ENABLED
199#ifndef VSF_TGUI_CFG_SUPPORT_SLIDER
200# define VSF_TGUI_CFG_SUPPORT_SLIDER ENABLED
203#ifndef VSF_TGUI_CFG_SUPPORT_TEXT_LIST
204# define VSF_TGUI_CFG_SUPPORT_TEXT_LIST ENABLED
207#if VSF_TGUI_CFG_SUPPORT_TEXT_LIST == ENABLED
208# ifndef VSF_TGUI_CFG_TEXT_LIST_SUPPORT_SLIDE
209# define VSF_TGUI_CFG_TEXT_LIST_SUPPORT_SLIDE ENABLED
213#ifndef VSF_TGUI_CFG_SUPPORT_LIST
214# define VSF_TGUI_CFG_SUPPORT_LIST ENABLED
217#if VSF_TGUI_CFG_SUPPORT_LIST == ENABLED
218# ifndef VSF_TGUI_CFG_LIST_SUPPORT_SLIDE
219# define VSF_TGUI_CFG_LIST_SUPPORT_SLIDE ENABLED
223#ifndef VSF_TGUI_CFG_REFRESH_CONTROL_ON_ACTIVE_STATE_CHANGE
224# define VSF_TGUI_CFG_REFRESH_CONTROL_ON_ACTIVE_STATE_CHANGE DISABLED
227#ifndef VSF_TGUI_CFG_LIST_SUPPORT_SCROOLBAR
228# define VSF_TGUI_CFG_LIST_SUPPORT_SCROOLBAR ENABLED
231#ifndef VSF_TGUI_CFG_PANEL_HAS_LABEL
232# define VSF_TGUI_CFG_PANEL_HAS_LABEL ENABLED
238#ifndef VSF_TGUI_ASSERT
239# define VSF_TGUI_ASSERT VSF_ASSERT
242#ifndef VSF_TGUI_CFG_SHOW_REFRESH_EVT_LOG
243# define VSF_TGUI_CFG_SHOW_REFRESH_EVT_LOG DISABLED
246#ifndef VSF_TGUI_CFG_SHOW_ON_LOAD_EVT_LOG
247# define VSF_TGUI_CFG_SHOW_ON_LOAD_EVT_LOG ENABLED
250#ifndef VSF_TGUI_CFG_SHOW_UPDATE_EVT_LOG
251# define VSF_TGUI_CFG_SHOW_UPDATE_EVT_LOG ENABLED
254#ifndef VSF_TGUI_CFG_SHOW_ON_DEPOSE_EVT_LOG
255# define VSF_TGUI_CFG_SHOW_ON_DEPOSE_EVT_LOG ENABLED
258#ifndef VSF_TGUI_CFG_SHOW_ON_TIME_EVT_LOG
259# define VSF_TGUI_CFG_SHOW_ON_TIME_EVT_LOG DISABLED
262#ifndef VSF_TGUI_CFG_SHOW_GET_ACTIVE_EVT_LOG
263# define VSF_TGUI_CFG_SHOW_GET_ACTIVE_EVT_LOG ENABLED
266#ifndef VSF_TGUI_CFG_SHOW_LOST_ACTIVE_EVT_LOG
267# define VSF_TGUI_CFG_SHOW_LOST_ACTIVE_EVT_LOG ENABLED
270#ifndef VSF_TGUI_CFG_SHOW_POINTER_EVT_LOG
271# define VSF_TGUI_CFG_SHOW_POINTER_EVT_LOG ENABLED
274#ifndef VSF_TGUI_CFG_SHOW_KEY_EVT_LOG
275# define VSF_TGUI_CFG_SHOW_KEY_EVT_LOG ENABLED
278#ifndef VSF_TGUI_CFG_SHOW_GESTURE_EVT_LOG
279# define VSF_TGUI_CFG_SHOW_GESTURE_EVT_LOG ENABLED
282#ifndef VSF_TGUI_CFG_SHOW_CONTROL_SPECIFIC_EVT_LOG
283# define VSF_TGUI_CFG_SHOW_CONTROL_SPECIFIC_EVT_LOG ENABLED
286#ifndef VSF_TGUI_CFG_SHOW_SYSTEM_LOG
287# define VSF_TGUI_CFG_SHOW_SYSTEM_LOG ENABLED
289#if VSF_TGUI_CFG_SHOW_SYSTEM_LOG != ENABLED
290# undef VSF_TGUI_CFG_SHOW_REFRESH_EVT_LOG
291# undef VSF_TGUI_CFG_SHOW_ON_LOAD_EVT_LOG
292# undef VSF_TGUI_CFG_SHOW_UPDATE_EVT_LOG
293# undef VSF_TGUI_CFG_SHOW_ON_DEPOSE_EVT_LOG
294# undef VSF_TGUI_CFG_SHOW_ON_TIME_EVT_LOG
295# undef VSF_TGUI_CFG_SHOW_CONTROL_SPECIFIC_EVT_LOG
296# undef VSF_TGUI_CFG_SHOW_GET_ACTIVE_EVT_LOG
297# undef VSF_TGUI_CFG_SHOW_LOST_ACTIVE_EVT_LOG
299# define VSF_TGUI_CFG_SHOW_REFRESH_EVT_LOG DISABLED
300# define VSF_TGUI_CFG_SHOW_ON_LOAD_EVT_LOG DISABLED
301# define VSF_TGUI_CFG_SHOW_UPDATE_EVT_LOG DISABLED
302# define VSF_TGUI_CFG_SHOW_ON_DEPOSE_EVT_LOG DISABLED
303# define VSF_TGUI_CFG_SHOW_ON_TIME_EVT_LOG DISABLED
304# define VSF_TGUI_CFG_SHOW_CONTROL_SPECIFIC_EVT_LOG DISABLED
305# define VSF_TGUI_CFG_SHOW_GET_ACTIVE_EVT_LOG DISABLED
306# define VSF_TGUI_CFG_SHOW_LOST_ACTIVE_EVT_LOG DISABLED
309#ifndef VSF_TGUI_CFG_SHOW_USER_INPUT_LOG
310# define VSF_TGUI_CFG_SHOW_USER_INPUT_LOG ENABLED
312#if VSF_TGUI_CFG_SHOW_USER_INPUT_LOG != ENABLED
313# undef VSF_TGUI_CFG_SHOW_POINTER_EVT_LOG
314# undef VSF_TGUI_CFG_SHOW_KEY_EVT_LOG
315# undef VSF_TGUI_CFG_SHOW_GESTURE_EVT_LOG
316# define VSF_TGUI_CFG_SHOW_POINTER_EVT_LOG DISABLED
317# define VSF_TGUI_CFG_SHOW_KEY_EVT_LOG DISABLED
318# define VSF_TGUI_CFG_SHOW_GESTURE_EVT_LOG DISABLED
324# if VSF_USE_TRACE == ENABLED
326# warning 'macro VSF_TGUI_LOG() is not defined. Use vsf_trace() by default \
327as VSF_USE_TRACE is ENABLED. You can remove the log output by putting following\
328 code in vsf_usr_cfg.h: #define VSF_TGUI_LOG'
330# define VSF_TGUI_LOG vsf_trace
331# elif defined(__STDC_VERSION__) && __STDC_VERSION__ > 199901L
333# warning 'macro VSF_TGUI_LOG() is not defined. Use printf() by default \
334as VSF_USE_TRACE is DISABLED.You can remove the log output by putting following\
335code in vsf_usr_cfg.h: #define VSF_TGUI_LOG'
337# define VSF_TGUI_LOG(__LEVEL, __STRING, ...) printf(__STRING, ##__VA_ARGS__)