VSF Documented
vsf_tgui_v.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18/****************************************************************************
19* Copyright 2020 by Gorgon Meducer (Email:embedded_zhuoran@hotmail.com) *
20* *
21* Licensed under the Apache License, Version 2.0 (the "License"); *
22* you may not use this file except in compliance with the License. *
23* You may obtain a copy of the License at *
24* *
25* http://www.apache.org/licenses/LICENSE-2.0 *
26* *
27* Unless required by applicable law or agreed to in writing, software *
28* distributed under the License is distributed on an "AS IS" BASIS, *
29* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
30* See the License for the specific language governing permissions and *
31* limitations under the License. *
32* *
33****************************************************************************/
34
35#ifndef __VSF_TINY_GUI_V_H__
36#define __VSF_TINY_GUI_V_H__
37
38/*============================ INCLUDES ======================================*/
39#include "../vsf_tgui_cfg.h"
40
41#if VSF_USE_TINY_GUI == ENABLED
42#include "../controls/vsf_tgui_controls.h"
43
44#if VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL == VSF_TGUI_V_TEMPLATE_SIMPLE_VIEW
45# define VSF_TGUI_V_TEMPLATE_HEADER_FILE "./simple_view/vsf_tgui_v_template.h"
46#elif VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL == VSF_TGUI_V_TEMPLATE_SCGUI_VIEW
47# define VSF_TGUI_V_TEMPLATE_HEADER_FILE "./scgui_view/vsf_tgui_v_template.h"
48#else
49# undef VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL
50# define VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL VSF_TGUI_V_TEMPLATE_EXAMPLE
51# define VSF_TGUI_V_TEMPLATE_HEADER_FILE "./template/vsf_tgui_v_template.h"
52#endif
53
54#include VSF_TGUI_V_TEMPLATE_HEADER_FILE
55
56/*============================ MACROS ========================================*/
57/*============================ MACROFIED FUNCTIONS ===========================*/
58
59// define unsupported view functions
60#ifndef tgui_v_tile_trans_rate
61# define tgui_v_tile_trans_rate(...) .dummy_bits = 0
62#endif
63#ifndef tgui_v_show_corner_tile
64# define tgui_v_show_corner_tile(...) .dummy_bits = 0
65#endif
66#ifndef tgui_v_background_color
67# define tgui_v_background_color(...) .dummy_bits = 0
68#endif
69#ifndef tgui_v_font
70# define tgui_v_font(...) .dummy_bits = 0
71#endif
72#ifndef tgui_v_text_color
73# define tgui_v_text_color(...) .dummy_bits = 0
74#endif
75#ifndef tgui_v_border_width
76# define tgui_v_border_width(...) .dummy_bits = 0
77#endif
78#ifndef tgui_v_border_radius
79# define tgui_v_border_radius(...) .dummy_bits = 0
80#endif
81#ifndef tgui_v_border_color
82# define tgui_v_border_color(...) .dummy_bits = 0
83#endif
84
85/*============================ TYPES =========================================*/
86/*============================ GLOBAL VARIABLES ==============================*/
87/*============================ PROTOTYPES ====================================*/
88
89/*
90extern
91void vsf_tgui_location_get_in_sizes_with_align( vsf_tgui_location_t* ptLocation,
92 vsf_tgui_size_t* ptCtrlSize,
93 vsf_tgui_size_t* ptDrawSize,
94 vsf_tgui_align_mode_t tMode);
95*/
96
97extern
99 vsf_tgui_region_t* ptResourceRegion,
101
102
103extern
104vsf_tgui_size_t __vk_tgui_label_v_text_get_size(vsf_tgui_label_t* ptLabel,
105 uint16_t *phwLineCount,
106 uint8_t *pchCharHeight);
107
108extern
110
111// font APIs for all views
112
115extern void vsf_tgui_font_release_char(const uint8_t font_index, uint32_t char_u32, void *bitmap);
116extern void * vsf_tgui_font_get_char(const uint8_t font_index, uint32_t char_u32, vsf_tgui_region_t *char_region_ptr);
117
118#endif
119
120#endif
121/* EOF */
unsigned short uint16_t
Definition lvgl.h:41
unsigned int uint32_t
Definition lvgl.h:43
unsigned char uint8_t
Definition lvgl.h:40
uint8_t font_index
Definition vsf_tgui_v_type.h:226
Definition vsf_tgui_common.h:275
Definition vsf_tgui_common.h:270
vsf_tgui_align_mode_t
Definition vsf_tgui_common.h:281
uint8_t vsf_tgui_font_get_char_width(const uint8_t font_index, uint32_t char_u32)
Definition vsf_tgui_font_port_freetype.c:87
vsf_tgui_size_t __vk_tgui_label_v_text_get_size(vsf_tgui_label_t *ptLabel, uint16_t *phwLineCount, uint8_t *pchCharHeight)
Definition vsf_tgui_v_label.c:60
vsf_tgui_size_t __vk_tgui_label_v_get_minimal_rendering_size(vsf_tgui_label_t *ptLabel)
Definition vsf_tgui_scguiv_label.c:84
void * vsf_tgui_font_get_char(const uint8_t font_index, uint32_t char_u32, vsf_tgui_region_t *char_region_ptr)
Definition vsf_tgui_font_port_freetype.c:113
void vsf_tgui_font_release_char(const uint8_t font_index, uint32_t char_u32, void *bitmap)
Definition vsf_tgui_font_port_freetype.c:109
void vsf_tgui_region_update_with_align(vsf_tgui_region_t *ptDrawRegion, vsf_tgui_region_t *ptResourceRegion, vsf_tgui_align_mode_t tMode)
Definition vsf_tgui_v.c:64
uint8_t vsf_tgui_font_get_char_height(const uint8_t font_index)
Definition vsf_tgui_font_port_freetype.c:101