18#ifndef __VSF_TINY_GUI_V_TMPLATE_TYPE_H__
19#define __VSF_TINY_GUI_V_TMPLATE_TYPE_H__
22#include "../../vsf_tgui_cfg.h"
24#if VSF_USE_TINY_GUI == ENABLED \
25 && VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL == VSF_TGUI_V_TEMPLATE_SIMPLE_VIEW
29#include "../../port/view/vsf_tgui_sv_port.h"
33#ifndef VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR
34# define VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR ENABLED
37#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == DISLABED
38#ifndef VSF_TGUI_CFG_V_SUPPORT_FIXED_BACKGROUND_COLOR
39# define VSF_TGUI_CFG_V_SUPPORT_FIXED_BACKGROUND_COLOR ENABLED
43#ifndef VSF_TGUI_CFG_V_SUPPORT_TILE_TRANSPARENCY
44# define VSF_TGUI_CFG_V_SUPPORT_TILE_TRANSPARENCY ENABLED
47#ifndef VSF_TGUI_CFG_V_SUPPORT_CORNER_TILE
48# define VSF_TGUI_CFG_V_SUPPORT_CORNER_TILE ENABLED
51#ifndef VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR
52# define VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR ENABLED
55#ifndef VSF_TGUI_CFG_V_CONTROL_BACKGROUND_COLOR
56# define VSF_TGUI_CFG_V_CONTROL_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
59#ifndef VSF_TGUI_CFG_V_LABEL_BACKGROUND_COLOR
60# define VSF_TGUI_CFG_V_LABEL_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
63#ifndef VSF_TGUI_CFG_V_LABEL_TEXT_COLOR
64# define VSF_TGUI_CFG_V_LABEL_TEXT_COLOR VSF_TGUI_COLOR_BLACK
67#ifndef VSF_TGUI_CFG_V_LABEL_DISABLED_TEXT_MIX_COLOR
68# define VSF_TGUI_CFG_V_LABEL_DISABLED_TEXT_MIX_COLOR VSF_TGUI_COLOR_WHITE
71#ifndef VSF_TGUI_CFG_V_LABEL_DISABLED_TEXT_MIX_VALUE
72# define VSF_TGUI_CFG_V_LABEL_DISABLED_TEXT_MIX_VALUE 128
75#ifndef VSF_TGUI_CFG_V_BUTTON_BACKGROUND_COLOR
76# define VSF_TGUI_CFG_V_BUTTON_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
79#ifndef VSF_TGUI_CFG_V_BUTTON_CLICKED_BACKGROUND_COLOR
80# define VSF_TGUI_CFG_V_BUTTON_CLICKED_BACKGROUND_COLOR VSF_TGUI_COLOR_BLUE
83#ifndef VSF_TGUI_CFG_V_BUTTON_CLICKED_MIX_COLOR
84# define VSF_TGUI_CFG_V_BUTTON_CLICKED_MIX_COLOR VSF_TGUI_COLOR_BLUE
87#ifndef VSF_TGUI_CFG_V_BUTTON_CLICKED_MIX_VALUE
88# define VSF_TGUI_CFG_V_BUTTON_CLICKED_MIX_VALUE 128
91#ifndef VSF_TGUI_CFG_V_BUTTON_TEXT_COLOR
92# define VSF_TGUI_CFG_V_BUTTON_TEXT_COLOR VSF_TGUI_COLOR_BLACK
95#ifndef VSF_TGUI_CFG_V_CONTAINER_BACKGROUND_COLOR
96# define VSF_TGUI_CFG_V_CONTAINER_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0x44, 0x72, 0xC4)
99#ifndef VSF_TGUI_CFG_V_PANEL_BACKGROUND_COLOR
100# define VSF_TGUI_CFG_V_PANEL_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0x44, 0x72, 0xC4)
103#ifndef VSF_TGUI_CFG_V_LIST_BACKGROUND_COLOR
104# define VSF_TGUI_CFG_V_LIST_BACKGROUND_COLOR VSF_TGUI_COLOR_RGBA(0xB4, 0xC7, 0xE7, 0x00)
107#ifndef VSF_TGUI_CFG_V_TEXT_LIST_BACKGROUND_COLOR
108# define VSF_TGUI_CFG_V_TEXT_LIST_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
111#ifndef VSF_TGUI_CFG_V_TEXT_LIST_INDICATOR_COLOR
112# define VSF_TGUI_CFG_V_TEXT_LIST_INDICATOR_COLOR VSF_TGUI_COLOR_RGB(0x44, 0x72, 0xC4)
115#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
116# define __SV_BACKGROUND_COLOR(__COLOR) .background_color = __COLOR,
118# define __SV_BACKGROUND_COLOR(__COLOR)
121#if VSF_TGUI_CFG_V_SUPPORT_TILE_TRANSPARENCY == ENABLED
122# define __SV_TILE_TRANS_RATE(__COLOR) .tile_trans_rate = __COLOR,
124# define __SV_TILE_TRANS_RATE(__COLOR)
127#if VSF_TGUI_CFG_V_SUPPORT_CORNER_TILE == ENABLED
128# define __SV_SHOW_CORNER_TILE(__VALUE) .show_corner_tile = __VALUE,
130# define __SV_SHOW_CORNER_TILE(__VALUE)
133#if VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR == ENABLED
134# define __SV_TEXT_COLOR(__COLOR) .text_color = __COLOR,
136# define __SV_TEXT_COLOR(__COLOR)
139#define VSF_TGUI_V_CONTROL_STATIC_INIT_DEFAULT \
140 __SV_SHOW_CORNER_TILE(false) \
141 __SV_TILE_TRANS_RATE(0xFF) \
142 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_V_CONTROL_BACKGROUND_COLOR)
144#define VSF_TGUI_V_LABEL_STATIC_INIT_DEFAULT \
145 __SV_SHOW_CORNER_TILE(true) \
146 __SV_TILE_TRANS_RATE(0xFF) \
147 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_V_LABEL_BACKGROUND_COLOR) \
148 __SV_TEXT_COLOR(VSF_TGUI_CFG_V_LABEL_TEXT_COLOR)
150#define VSF_TGUI_V_BUTTON_STATIC_INIT_DEFAULT \
151 __SV_SHOW_CORNER_TILE(true) \
152 __SV_TILE_TRANS_RATE(0xFF) \
153 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_V_BUTTON_BACKGROUND_COLOR) \
154 __SV_TEXT_COLOR(VSF_TGUI_CFG_V_BUTTON_TEXT_COLOR)
156#define VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
157 __SV_SHOW_CORNER_TILE(true) \
158 __SV_TILE_TRANS_RATE(0xFF) \
159 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_V_CONTAINER_BACKGROUND_COLOR)
161#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_DEFAULT \
162 __SV_SHOW_CORNER_TILE(true) \
163 __SV_TILE_TRANS_RATE(0xFF) \
164 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_V_TEXT_LIST_BACKGROUND_COLOR)
166#define VSF_TGUI_V_LIST_STATIC_INIT_DEFAULT \
167 __SV_SHOW_CORNER_TILE(true) \
168 __SV_TILE_TRANS_RATE(0xFF)
170#define VSF_TGUI_V_PANEL_STATIC_INIT_DEFAULT \
171 __SV_SHOW_CORNER_TILE(true) \
172 __SV_TILE_TRANS_RATE(0xFF)
174#define VSF_TGUI_V_CONTROL_STATIC_INIT_OVERRIDE
175#define VSF_TGUI_V_LABEL_STATIC_INIT_OVERRIDE
176#define VSF_TGUI_V_BUTTON_STATIC_INIT_OVERRIDE
177#define VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE
178#define VSF_TGUI_V_LIST_STATIC_INIT_OVERRIDE
180#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
181#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_BACKGROUND_CLOLOR_OVERRIDE \
182 .tList.background_color = VSF_TGUI_COLOR_RGBA(0x00, 0x00, 0x00, 0x00),
184#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_BACKGROUND_CLOLOR_OVERRIDE
187#if VSF_TGUI_CFG_V_SUPPORT_CORNER_TILE == ENABLED
188#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_TILE_OVERRIDE \
189 .show_corner_tile = true,
191#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_TILE_OVERRIDE
194#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_OVERRIDE \
195 VSF_TGUI_V_TEXT_LIST_STATIC_INIT_BACKGROUND_CLOLOR_OVERRIDE
197#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
198# define VSF_TGUI_V_TEXT_LIST_CONTENT_INIT_OVERRIDE \
199 .background_color = VSF_TGUI_COLOR_RGBA(0x00, 0x00, 0x00, 0x00), \
200 VSF_TGUI_V_TEXT_LIST_STATIC_INIT_TILE_OVERRIDE
202# define VSF_TGUI_V_TEXT_LIST_CONTENT_INIT_OVERRIDE
205#define VSF_TGUI_V_TEXT_LIST_CONTENT_INIT_DEFAULT
207#define VSF_TGUI_V_PANEL_STATIC_INIT_OVERRIDE
209#define tgui_v_font(...) \
210 __tgui_attribute(font_index, __VA_ARGS__)
212#if VSF_TGUI_CFG_V_SUPPORT_CORNER_TILE == ENABLED
213#define tgui_v_show_corner_tile(...) \
214 __tgui_attribute(show_corner_tile, __VA_ARGS__)
217#if VSF_TGUI_CFG_V_SUPPORT_TILE_TRANSPARENCY == ENABLED
218#define tgui_v_tile_trans_rate(...) \
219 __tgui_attribute(tile_trans_rate, __VA_ARGS__)
222#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
223#define tgui_v_background_color(...) \
224 __tgui_attribute(background_color, __VA_ARGS__)
227#if VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR == ENABLED
228#define tgui_v_text_color(...) \
229 __tgui_attribute(text_color, __VA_ARGS__)
239#if VSF_TGUI_CFG_V_SUPPORT_CORNER_TILE == ENABLED
242#if VSF_TGUI_CFG_V_SUPPORT_TILE_TRANSPARENCY == ENABLED
245#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
252#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
260#if VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR == ENABLED
267#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
275#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
283#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
291#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
#define REG_RSVD_U8
Definition i_io_systick.h:136
unsigned char uint8_t
Definition lvgl.h:40
def_structure(vsf_tgui_v_control_t) vsf_tgui_v_color_t background_color
uint8_t font_index
Definition vsf_tgui_v_type.h:226
vsf_tgui_v_color_t background_color
Definition vsf_tgui_v_type.h:246
declare_structure(vsf_tgui_v_control_t) def_structure(vsf_tgui_v_control_t) uint8_t font_index uint8_t __skip_frame
Definition vsf_tgui_v_type.h:235
uint8_t tile_trans_rate
Definition vsf_tgui_v_type.h:243
uint8_t show_corner_tile
Definition vsf_tgui_v_type.h:240
Definition vsf_tgui_sv_color.h:87
vsf_tgui_evt_t declare_structure(__vk_tgui_focus_t) def_structure(__vk_tgui_focus_t) const vsf_tgui_control_t *current_ptr
end_def_structure(vsf_tgui_v_port_t) extern void __vsf_tgui_v_update_dirty_region(vsf_tgui_t *gui_ptr