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
56#define VSF_TGUI_V_TEMPLATE_SCGUI_VIEW 3
58#ifndef VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL
59# define VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL VSF_TGUI_V_TEMPLATE_EXAMPLE
66#define VSF_TGUI_COLOR_RGB_565 0
67#define VSF_TGUI_COLOR_BGR_565 1
68#define VSF_TGUI_COLOR_ARGB_8888 2
69#define VSF_TGUI_COLOR_RGB8_USER_TEMPLATE 3
71#ifndef VSF_TGUI_CFG_COLOR_MODE
72# define VSF_TGUI_CFG_COLOR_MODE VSF_TGUI_COLOR_ARGB_8888
75#undef __VSF_TGUI_IS_COLOR_SUPPORT_ALPHA__
76#if VSF_TGUI_CFG_COLOR_MODE == VSF_TGUI_COLOR_ARGB_8888
77# define __VSF_TGUI_IS_COLOR_SUPPORT_ALPHA__ 1
79# define __VSF_TGUI_IS_COLOR_SUPPORT_ALPHA__ 0
86#ifndef VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_PADDING
87# define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_PADDING ENABLED
90#ifndef VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_MARGIN
91# define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_MARGIN ENABLED
95#ifndef VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ANCHOR
96# define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ANCHOR DISABLED
99#ifndef VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_DOCK
100# define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_DOCK DISABLED
103#ifndef VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ALIGN
104# define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ALIGN DISABLED
110#define VSF_TGUI_TEXT_ASCII 0
111#define VSF_TGUI_TEXT_UTF8 1
113#ifndef VSF_TGUI_CFG_TEXT_MODE
114# define VSF_TGUI_CFG_TEXT_MODE VSF_TGUI_TEXT_UTF8
117#ifndef VSF_TGUI_CFG_SUPPORT_NAME_STRING
118# define VSF_TGUI_CFG_SUPPORT_NAME_STRING ENABLED
120#if VSF_TGUI_CFG_SUPPORT_NAME_STRING == ENABLED
121# if VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING != ENABLED
122# warning "VSF_TGUI_CFG_SUPPORT_NAME_STRING is ENABLED and depends \
123on VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING, but it is set to DISABLED. \
124In order to continue the compilation process, this macro \
125VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING is forced to be ENABLED. Please \
126enable it in vsf_usr_cfg.h or top vsf_tgui_cfg.h to suppress this \
128# undef VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING
129# define VSF_MSG_TREE_CFG_SUPPORT_NAME_STRING ENABLED
133#ifndef VSF_TGUI_CFG_TEXT_SIZE_INFO_CACHING
134# define VSF_TGUI_CFG_TEXT_SIZE_INFO_CACHING ENABLED
137#ifndef VSF_TGUI_CFG_SAFE_STRING_MODE
138# define VSF_TGUI_CFG_SAFE_STRING_MODE ENABLED
144#define VSF_TGUI_REFRESH_SCHEME_NONE 0
145#define VSF_TGUI_REFRESH_SCHEME_Z_ORDER 1
146#define VSF_TGUI_REFRESH_SCHEME_PRE_ORDER_TRAVERSAL 1
147#define VSF_TGUI_REFRESH_SCHEME_LAYER_BY_LAYER 2
148#define VSF_TGUI_REFRESH_SCHEME_BREADTH_FIRST_TRAVERSAL 2
150#ifndef VSF_TGUI_CFG_REFRESH_SCHEME
151# define VSF_TGUI_CFG_REFRESH_SCHEME VSF_TGUI_REFRESH_SCHEME_Z_ORDER
154#ifndef VSF_TGUI_CFG_SUPPORT_TRANSPARENT_CONTROL
155# define VSF_TGUI_CFG_SUPPORT_TRANSPARENT_CONTROL ENABLED
158#ifndef VSF_TGUI_CFG_SUPPORT_DIRTY_REGION
159# define VSF_TGUI_CFG_SUPPORT_DIRTY_REGION ENABLED
165#ifndef VSF_TGUI_CFG_SUPPORT_DESTRUCTOR_SCHEME
166# define VSF_TGUI_CFG_SUPPORT_DESTRUCTOR_SCHEME ENABLED
169#ifndef VSF_TGUI_CFG_SUPPORT_CONSTRUCTOR_SCHEME
170# define VSF_TGUI_CFG_SUPPORT_CONSTRUCTOR_SCHEME ENABLED
173#ifndef VSF_TGUI_CFG_SUPPORT_MOUSE_LIKE_EVENTS
174# define VSF_TGUI_CFG_SUPPORT_MOUSE_LIKE_EVENTS ENABLED
176#ifndef VSF_TGUI_CFG_SUPPORT_MOUSE_MOVE_HANDLING
177# define VSF_TGUI_CFG_SUPPORT_MOUSE_MOVE_HANDLING DISABLED
180#ifndef VSF_TGUI_CFG_SUPPORT_KEY_EVENTS
181# define VSF_TGUI_CFG_SUPPORT_KEY_EVENTS ENABLED
188#ifndef VSF_TGUI_CFG_DYNAMIC
189# define VSF_TGUI_CFG_DYNAMIC VSF_USE_HEAP
192#ifndef VSF_TGUI_CFG_SUPPORT_TIMER
193# define VSF_TGUI_CFG_SUPPORT_TIMER ENABLED
196#ifndef VSF_TGUI_CFG_SUPPORT_STREAM_CONTAINER
197# define VSF_TGUI_CFG_SUPPORT_STREAM_CONTAINER ENABLED
200#ifndef VSF_TGUI_CFG_SUPPORT_LINE_STREAM_CONTAINER
201# define VSF_TGUI_CFG_SUPPORT_LINE_STREAM_CONTAINER ENABLED
204#ifndef VSF_TGUI_CFG_SUPPORT_SLIDER
205# define VSF_TGUI_CFG_SUPPORT_SLIDER ENABLED
208#ifndef VSF_TGUI_CFG_SUPPORT_TEXT_LIST
209# define VSF_TGUI_CFG_SUPPORT_TEXT_LIST ENABLED
212#if VSF_TGUI_CFG_SUPPORT_TEXT_LIST == ENABLED
213# ifndef VSF_TGUI_CFG_TEXT_LIST_SUPPORT_SLIDE
214# define VSF_TGUI_CFG_TEXT_LIST_SUPPORT_SLIDE ENABLED
218#ifndef VSF_TGUI_CFG_SUPPORT_LIST
219# define VSF_TGUI_CFG_SUPPORT_LIST ENABLED
222#if VSF_TGUI_CFG_SUPPORT_LIST == ENABLED
223# ifndef VSF_TGUI_CFG_LIST_SUPPORT_SLIDE
224# define VSF_TGUI_CFG_LIST_SUPPORT_SLIDE ENABLED
228#ifndef VSF_TGUI_CFG_REFRESH_CONTROL_ON_ACTIVE_STATE_CHANGE
229# define VSF_TGUI_CFG_REFRESH_CONTROL_ON_ACTIVE_STATE_CHANGE DISABLED
232#ifndef VSF_TGUI_CFG_LIST_SUPPORT_SCROOLBAR
233# define VSF_TGUI_CFG_LIST_SUPPORT_SCROOLBAR ENABLED
236#ifndef VSF_TGUI_CFG_PANEL_HAS_LABEL
237# define VSF_TGUI_CFG_PANEL_HAS_LABEL ENABLED
243#ifndef VSF_TGUI_ASSERT
244# define VSF_TGUI_ASSERT VSF_ASSERT
247#ifndef VSF_TGUI_CFG_SHOW_REFRESH_EVT_LOG
248# define VSF_TGUI_CFG_SHOW_REFRESH_EVT_LOG DISABLED
251#ifndef VSF_TGUI_CFG_SHOW_ON_LOAD_EVT_LOG
252# define VSF_TGUI_CFG_SHOW_ON_LOAD_EVT_LOG ENABLED
255#ifndef VSF_TGUI_CFG_SHOW_UPDATE_EVT_LOG
256# define VSF_TGUI_CFG_SHOW_UPDATE_EVT_LOG ENABLED
259#ifndef VSF_TGUI_CFG_SHOW_ON_DEPOSE_EVT_LOG
260# define VSF_TGUI_CFG_SHOW_ON_DEPOSE_EVT_LOG ENABLED
263#ifndef VSF_TGUI_CFG_SHOW_ON_TIME_EVT_LOG
264# define VSF_TGUI_CFG_SHOW_ON_TIME_EVT_LOG DISABLED
267#ifndef VSF_TGUI_CFG_SHOW_GET_ACTIVE_EVT_LOG
268# define VSF_TGUI_CFG_SHOW_GET_ACTIVE_EVT_LOG ENABLED
271#ifndef VSF_TGUI_CFG_SHOW_LOST_ACTIVE_EVT_LOG
272# define VSF_TGUI_CFG_SHOW_LOST_ACTIVE_EVT_LOG ENABLED
275#ifndef VSF_TGUI_CFG_SHOW_POINTER_EVT_LOG
276# define VSF_TGUI_CFG_SHOW_POINTER_EVT_LOG ENABLED
279#ifndef VSF_TGUI_CFG_SHOW_KEY_EVT_LOG
280# define VSF_TGUI_CFG_SHOW_KEY_EVT_LOG ENABLED
283#ifndef VSF_TGUI_CFG_SHOW_GESTURE_EVT_LOG
284# define VSF_TGUI_CFG_SHOW_GESTURE_EVT_LOG ENABLED
287#ifndef VSF_TGUI_CFG_SHOW_CONTROL_SPECIFIC_EVT_LOG
288# define VSF_TGUI_CFG_SHOW_CONTROL_SPECIFIC_EVT_LOG ENABLED
291#ifndef VSF_TGUI_CFG_SHOW_SYSTEM_LOG
292# define VSF_TGUI_CFG_SHOW_SYSTEM_LOG ENABLED
294#if VSF_TGUI_CFG_SHOW_SYSTEM_LOG != ENABLED
295# undef VSF_TGUI_CFG_SHOW_REFRESH_EVT_LOG
296# undef VSF_TGUI_CFG_SHOW_ON_LOAD_EVT_LOG
297# undef VSF_TGUI_CFG_SHOW_UPDATE_EVT_LOG
298# undef VSF_TGUI_CFG_SHOW_ON_DEPOSE_EVT_LOG
299# undef VSF_TGUI_CFG_SHOW_ON_TIME_EVT_LOG
300# undef VSF_TGUI_CFG_SHOW_CONTROL_SPECIFIC_EVT_LOG
301# undef VSF_TGUI_CFG_SHOW_GET_ACTIVE_EVT_LOG
302# undef VSF_TGUI_CFG_SHOW_LOST_ACTIVE_EVT_LOG
304# define VSF_TGUI_CFG_SHOW_REFRESH_EVT_LOG DISABLED
305# define VSF_TGUI_CFG_SHOW_ON_LOAD_EVT_LOG DISABLED
306# define VSF_TGUI_CFG_SHOW_UPDATE_EVT_LOG DISABLED
307# define VSF_TGUI_CFG_SHOW_ON_DEPOSE_EVT_LOG DISABLED
308# define VSF_TGUI_CFG_SHOW_ON_TIME_EVT_LOG DISABLED
309# define VSF_TGUI_CFG_SHOW_CONTROL_SPECIFIC_EVT_LOG DISABLED
310# define VSF_TGUI_CFG_SHOW_GET_ACTIVE_EVT_LOG DISABLED
311# define VSF_TGUI_CFG_SHOW_LOST_ACTIVE_EVT_LOG DISABLED
314#ifndef VSF_TGUI_CFG_SHOW_USER_INPUT_LOG
315# define VSF_TGUI_CFG_SHOW_USER_INPUT_LOG ENABLED
317#if VSF_TGUI_CFG_SHOW_USER_INPUT_LOG != ENABLED
318# undef VSF_TGUI_CFG_SHOW_POINTER_EVT_LOG
319# undef VSF_TGUI_CFG_SHOW_KEY_EVT_LOG
320# undef VSF_TGUI_CFG_SHOW_GESTURE_EVT_LOG
321# define VSF_TGUI_CFG_SHOW_POINTER_EVT_LOG DISABLED
322# define VSF_TGUI_CFG_SHOW_KEY_EVT_LOG DISABLED
323# define VSF_TGUI_CFG_SHOW_GESTURE_EVT_LOG DISABLED
329# if VSF_USE_TRACE == ENABLED
331# warning 'macro VSF_TGUI_LOG() is not defined. Use vsf_trace() by default \
332as VSF_USE_TRACE is ENABLED. You can remove the log output by putting following\
333 code in vsf_usr_cfg.h: #define VSF_TGUI_LOG'
335# define VSF_TGUI_LOG vsf_trace
336# elif defined(__STDC_VERSION__) && __STDC_VERSION__ > 199901L
338# warning 'macro VSF_TGUI_LOG() is not defined. Use printf() by default \
339as VSF_USE_TRACE is DISABLED.You can remove the log output by putting following\
340code in vsf_usr_cfg.h: #define VSF_TGUI_LOG'
342# define VSF_TGUI_LOG(__LEVEL, __STRING, ...) printf(__STRING, ##__VA_ARGS__)