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
40#include "../vsf_tgui_cfg.h"
41
42#if VSF_USE_TINY_GUI == ENABLED
43#include "../controls/vsf_tgui_controls.h"
44
45#if VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL == VSF_TGUI_V_TEMPLATE_SIMPLE_VIEW
46# define VSF_TGUI_V_TEMPLATE_HEADER_FILE "./simple_view/vsf_tgui_v_template.h"
47#elif VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL == VSF_TGUI_V_TEMPLATE_SCGUI_VIEW
48# define VSF_TGUI_V_TEMPLATE_HEADER_FILE "./scgui_view/vsf_tgui_v_template.h"
49#else
50# undef VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL
51# define VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL VSF_TGUI_V_TEMPLATE_EXAMPLE
52# define VSF_TGUI_V_TEMPLATE_HEADER_FILE "./template/vsf_tgui_v_template.h"
53#endif
54
55#include VSF_TGUI_V_TEMPLATE_HEADER_FILE
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
61/*============================ MACROS ========================================*/
62/*============================ MACROFIED FUNCTIONS ===========================*/
63
64// define unsupported view functions
65#ifndef tgui_v_tile_trans_rate
66# define tgui_v_tile_trans_rate(...) .dummy_bits = 0
67#endif
68#ifndef tgui_v_show_corner_tile
69# define tgui_v_show_corner_tile(...) .dummy_bits = 0
70#endif
71#ifndef tgui_v_background_color
72# define tgui_v_background_color(...) .dummy_bits = 0
73#endif
74#ifndef tgui_v_font
75# define tgui_v_font(...) .dummy_bits = 0
76#endif
77#ifndef tgui_v_text_color
78# define tgui_v_text_color(...) .dummy_bits = 0
79#endif
80#ifndef tgui_v_border_width
81# define tgui_v_border_width(...) .dummy_bits = 0
82#endif
83#ifndef tgui_v_border_radius
84# define tgui_v_border_radius(...) .dummy_bits = 0
85#endif
86#ifndef tgui_v_border_color
87# define tgui_v_border_color(...) .dummy_bits = 0
88#endif
89
90/*============================ TYPES =========================================*/
91/*============================ GLOBAL VARIABLES ==============================*/
92/*============================ PROTOTYPES ====================================*/
93
94/*
95extern
96void vsf_tgui_location_get_in_sizes_with_align( vsf_tgui_location_t* ptLocation,
97 vsf_tgui_size_t* ptCtrlSize,
98 vsf_tgui_size_t* ptDrawSize,
99 vsf_tgui_align_mode_t tMode);
100*/
101
102extern
104 vsf_tgui_region_t* ptResourceRegion,
106
107
108extern
109vsf_tgui_size_t __vk_tgui_label_v_text_get_size(vsf_tgui_label_t* ptLabel,
110 uint16_t *phwLineCount,
111 uint8_t *pchCharHeight);
112
113extern
115
116// font APIs for all views
117
120extern void vsf_tgui_font_release_char(const uint8_t font_index, uint32_t char_u32, void *bitmap);
121extern void * vsf_tgui_font_get_char(const uint8_t font_index, uint32_t char_u32, vsf_tgui_region_t *char_region_ptr);
122
123#ifdef __cplusplus
124}
125#endif
126
127#endif
128#endif
129/* 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:231
Definition vsf_tgui_common.h:281
Definition vsf_tgui_common.h:276
vsf_tgui_align_mode_t
Definition vsf_tgui_common.h:287
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