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_SCGUI_VIEW
33#define VSF_TGUI_COLOR_WHITE C_WHITE
34#define VSF_TGUI_COLOR_SILVER C_SILVER
35#define VSF_TGUI_COLOR_GRAY C_GRAY
36#define VSF_TGUI_COLOR_BLACK C_BLACK
37#define VSF_TGUI_COLOR_RED C_RED
38#define VSF_TGUI_COLOR_MAROON C_MAROON
39#define VSF_TGUI_COLOR_YELLOW C_YELLOW
40#define VSF_TGUI_COLOR_LIME C_LIME
41#define VSF_TGUI_COLOR_GREEN C_GREEN
42#define VSF_TGUI_COLOR_AQUA C_AQUA
43#define VSF_TGUI_COLOR_TEAL C_TEAL
44#define VSF_TGUI_COLOR_BLUE C_BLUE
45#define VSF_TGUI_COLOR_NAVY C_NAVY
46#define VSF_TGUI_COLOR_PURPLE C_PURPLE
48#define VSF_TGUI_COLOR_OLIVE C_OLIVER
49#define VSF_TGUI_COLOR_FUCHSIA C_FUCHSIA
51#define VSF_TGUI_COLOR_RGBA(__R, __G, __B, __A) ((vsf_tgui_v_color_t) ((((__R) & 0xF1) << 8) | (((__G) & 0xF3) << 3) | (((__B) & 0xF1) >> 3)) )
52#define VSF_TGUI_COLOR_RGB(__R, __G, __B) VSF_TGUI_COLOR_RGBA((__R), (__G), (__B), 0xFF)
58#ifndef VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR
59# define VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR ENABLED
62#ifndef VSF_TGUI_CFG_V_SUPPORT_BORDER
63# define VSF_TGUI_CFG_V_SUPPORT_BORDER ENABLED
65#if VSF_TGUI_CFG_V_SUPPORT_BORDER == ENABLED
66# ifndef VSF_TGUI_CFG_V_SUPPORT_ROUND_BORDER
67# define VSF_TGUI_CFG_V_SUPPORT_ROUND_BORDER ENABLED
70#ifndef VSF_TGUI_CFG_V_BORDER_COLOR
71# define VSF_TGUI_CFG_V_BORDER_COLOR VSF_TGUI_COLOR_WHITE
74#ifndef VSF_TGUI_CFG_V_CONTROL_BACKGROUND_COLOR
75# define VSF_TGUI_CFG_V_CONTROL_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
80#ifndef VSF_TGUI_CFG_V_CONTAINER_BACKGROUND_COLOR
81# define VSF_TGUI_CFG_V_CONTAINER_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0x44, 0x72, 0xC4)
86#ifndef VSF_TGUI_CFG_V_TEXT_LIST_BACKGROUND_COLOR
87# define VSF_TGUI_CFG_V_TEXT_LIST_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
90#ifndef VSF_TGUI_CFG_V_TEXT_LIST_INDICATOR_COLOR
91# define VSF_TGUI_CFG_V_TEXT_LIST_INDICATOR_COLOR VSF_TGUI_COLOR_RGB(0x44, 0x72, 0xC4)
96#ifndef VSF_TGUI_CFG_V_LABEL_BACKGROUND_COLOR
97# define VSF_TGUI_CFG_V_LABEL_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
100#ifndef VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR
101# define VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR ENABLED
104#ifndef VSF_TGUI_CFG_V_LABEL_TEXT_COLOR
105# define VSF_TGUI_CFG_V_LABEL_TEXT_COLOR VSF_TGUI_COLOR_BLACK
108#ifndef VSF_TGUI_CFG_V_LABEL_DISABLED_TEXT_MIX_COLOR
109# define VSF_TGUI_CFG_V_LABEL_DISABLED_TEXT_MIX_COLOR VSF_TGUI_COLOR_WHITE
112#ifndef VSF_TGUI_CFG_V_LABEL_DISABLED_TEXT_MIX_VALUE
113# define VSF_TGUI_CFG_V_LABEL_DISABLED_TEXT_MIX_VALUE 128
118#ifndef VSF_TGUI_CFG_V_BUTTON_BACKGROUND_COLOR
119# define VSF_TGUI_CFG_V_BUTTON_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
122#ifndef VSF_TGUI_CFG_V_BUTTON_CLICKED_BACKGROUND_COLOR
123# define VSF_TGUI_CFG_V_BUTTON_CLICKED_BACKGROUND_COLOR VSF_TGUI_COLOR_BLUE
126#ifndef VSF_TGUI_CFG_V_BUTTON_CLICKED_MIX_COLOR
127# define VSF_TGUI_CFG_V_BUTTON_CLICKED_MIX_COLOR VSF_TGUI_COLOR_BLUE
130#ifndef VSF_TGUI_CFG_V_BUTTON_CLICKED_MIX_VALUE
131# define VSF_TGUI_CFG_V_BUTTON_CLICKED_MIX_VALUE 128
134#ifndef VSF_TGUI_CFG_V_BUTTON_TEXT_COLOR
135# define VSF_TGUI_CFG_V_BUTTON_TEXT_COLOR VSF_TGUI_COLOR_BLACK
140#define VSF_TGUI_V_CONTROL_STATIC_INIT_DEFAULT \
141 tgui_v_border_color(VSF_TGUI_CFG_V_BORDER_COLOR), \
142 tgui_v_background_color(VSF_TGUI_CFG_V_CONTROL_BACKGROUND_COLOR),
143#define VSF_TGUI_V_LABEL_STATIC_INIT_DEFAULT \
144 tgui_v_border_radius(16), \
145 tgui_v_background_color(VSF_TGUI_CFG_V_LABEL_BACKGROUND_COLOR), \
146 tgui_v_text_color(VSF_TGUI_CFG_V_LABEL_TEXT_COLOR),
147#define VSF_TGUI_V_BUTTON_STATIC_INIT_DEFAULT \
148 tgui_v_border_radius(16), \
149 tgui_v_background_color(VSF_TGUI_CFG_V_BUTTON_BACKGROUND_COLOR), \
150 tgui_v_text_color(VSF_TGUI_CFG_V_BUTTON_TEXT_COLOR),
151#define VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
152 tgui_v_background_color(VSF_TGUI_CFG_V_CONTAINER_BACKGROUND_COLOR),
153#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_DEFAULT \
154 tgui_v_border_radius(16), \
155 tgui_v_background_color(VSF_TGUI_CFG_V_TEXT_LIST_BACKGROUND_COLOR),
156#define VSF_TGUI_V_TEXT_LIST_CONTENT_INIT_DEFAULT
157#define VSF_TGUI_V_LIST_STATIC_INIT_DEFAULT
158#define VSF_TGUI_V_PANEL_STATIC_INIT_DEFAULT \
159 tgui_v_border_radius(16),
161#define VSF_TGUI_V_PANEL_STATIC_INIT_OVERRIDE
162#define VSF_TGUI_V_CONTROL_STATIC_INIT_OVERRIDE
163#define VSF_TGUI_V_LABEL_STATIC_INIT_OVERRIDE
164#define VSF_TGUI_V_BUTTON_STATIC_INIT_OVERRIDE
165#define VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE
166#define VSF_TGUI_V_LIST_STATIC_INIT_OVERRIDE
167#define VSF_TGUI_V_TEXT_LIST_CONTENT_INIT_OVERRIDE
168#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_OVERRIDE
172#define tgui_v_font(...) \
173 __tgui_attribute(font_index, __VA_ARGS__)
175#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
176# define tgui_v_background_color(...) \
177 __tgui_attribute(background_color, __VA_ARGS__)
180#if VSF_TGUI_CFG_V_SUPPORT_BORDER == ENABLED
181# define tgui_v_border_width(...) \
182 __tgui_attribute(border_width, __VA_ARGS__)
185#if VSF_TGUI_CFG_V_SUPPORT_BORDER == ENABLED
186# define tgui_v_border_color(...) \
187 __tgui_attribute(border_color, __VA_ARGS__)
190#if VSF_TGUI_CFG_V_SUPPORT_ROUND_BORDER == ENABLED
191# define tgui_v_border_radius(...) \
192 __tgui_attribute(border_radius, __VA_ARGS__)
195#if VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR == ENABLED
196# define tgui_v_text_color(...) \
197 __tgui_attribute(text_color, __VA_ARGS__)
203#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
206#if VSF_TGUI_CFG_V_SUPPORT_BORDER == ENABLED
209# if VSF_TGUI_CFG_V_SUPPORT_ROUND_BORDER == ENABLED
216#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
223#if VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR == ENABLED
230#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
237#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
244#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
251#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
unsigned char uint8_t
Definition lvgl.h:40
vsf_tgui_v_color_t border_color
Definition vsf_tgui_v_type.h:207
uint8_t border_width
Definition vsf_tgui_v_type.h:208
uint8_t border_radius
Definition vsf_tgui_v_type.h:210
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
Definition vsf_tgui_sv_color.h:87
end_def_structure(vsf_tgui_v_port_t) extern void __vsf_tgui_v_update_dirty_region(vsf_tgui_t *gui_ptr