VSF Documented
vsf_tgui_scguiv_port.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#ifndef __VSF_TINY_GUI_SCGUIV_PORT_H__
19#define __VSF_TINY_GUI_SCGUIV_PORT_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "../../vsf_tgui_cfg.h"
24
25#if VSF_USE_TINY_GUI == ENABLED \
26 && VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL == VSF_TGUI_V_TEMPLATE_SCGUI_VIEW
27
28#define __VSF_DISP_CLASS_INHERIT__
30
31#include "./scgui.h"
32
33declare_class(vsf_tgui_t)
34
35/*============================ MACROS ========================================*/
36
37#if VSF_TGUI_CFG_COLOR_MODE != VSF_TGUI_COLOR_MODE_RGB565
38# error "SCGui support RGB565 ONLY"
39#endif
40
41#if VSF_TGUI_CFG_FONT_USE_FREETYPE == ENABLED
42# error "SCGui has internal font implementation, can not use freetype"
43#endif
44#if VSF_TGUI_CFG_FONT_USE_LVGL != ENABLED
45# error "SCGui ues lvgl as internal font, please enable VSF_TGUI_CFG_FONT_USE_LVGL"
46#endif
47
48#ifndef VSF_TGUI_HOR_MAX
49# define VSF_TGUI_HOR_MAX 800
50#endif
51
52#ifndef VSF_TGUI_VER_MAX
53# define VSF_TGUI_VER_MAX 600
54#endif
55
56/*============================ MACROFIED FUNCTIONS ===========================*/
57
58#define vsf_tgui_vport_init(__vsf_tgui_v_port_ptr) \
59 do { \
60 (__vsf_tgui_v_port_ptr)->current_region.tSize.iHeight = 0; \
61 (__vsf_tgui_v_port_ptr)->current_region.tSize.iWidth = 0; \
62 } while(0)
63
64/*============================ TYPES =========================================*/
65
67
68def_structure(vsf_tgui_v_port_t)
69 vk_disp_t *disp;
77
81end_def_structure(vsf_tgui_v_port_t)
82
83/*============================ GLOBAL VARIABLES ==============================*/
84/*============================ PROTOTYPES ====================================*/
85
86extern void __vsf_tgui_v_update_dirty_region(vsf_tgui_t *gui_ptr,
89
90extern void vsf_tgui_control_v_draw_rect(vsf_tgui_t* gui_ptr,
93 const vsf_tgui_region_t* ptRectRegion,
95
96extern void vsf_tgui_control_v_draw_text(vsf_tgui_t* gui_ptr,
99 vsf_tgui_text_info_t *ptStringInfo,
100 const uint8_t font_index,
102 const vsf_tgui_align_mode_t mode);
103
104extern void vsf_tgui_control_v_draw_tile(vsf_tgui_t* gui_ptr,
107 const vsf_tgui_tile_t* tile_ptr,
108 const vsf_tgui_align_mode_t mode,
109 const uint8_t trans_rate,
110 vsf_tgui_region_t* ptPlacedRegion,
112 vsf_tgui_v_color_t bg_color);
113
114#endif
115#endif
116/* EOF */
Definition vsf_disp.h:173
unsigned short uint16_t
Definition lvgl.h:41
unsigned char uint8_t
Definition lvgl.h:40
uint8_t font_index
Definition vsf_tgui_v_type.h:226
Definition scgui.h:27
Definition vsf_disp.h:144
Definition vsf_tgui_common.h:275
Definition vsf_tgui_sv_color.h:87
Definition vsf_tgui_common.h:365
Definition vsf_tgui_common.h:438
uint32_t color
Definition vsf_sdl2_pixelformat.c:31
vsf_tgui_align_mode_t
Definition vsf_tgui_common.h:281
struct vsf_tgui_control_t vsf_tgui_control_t
Definition vsf_tgui_common.h:549
void __vsf_tgui_v_update_dirty_region(vsf_tgui_t *gui_ptr, const vsf_tgui_control_t *control_ptr, const vsf_tgui_region_t *dirty_region_ptr)
Definition vsf_tgui_scguiv_port.c:261
vsf_tgui_region_t current_region
Definition vsf_tgui_scguiv_port.h:80
const vsf_tgui_control_t * control_ptr
Definition vsf_tgui_scguiv_port.h:87
end_def_structure(vsf_tgui_v_port_t) extern void __vsf_tgui_v_update_dirty_region(vsf_tgui_t *gui_ptr
bool refresh_pending
Definition vsf_tgui_scguiv_port.h:72
def_structure(vsf_tgui_v_port_t) vk_disp_t *disp
void vsf_tgui_control_v_draw_text(vsf_tgui_t *gui_ptr, const vsf_tgui_control_t *control_ptr, const vsf_tgui_region_t *dirty_region_ptr, vsf_tgui_text_info_t *ptStringInfo, const uint8_t font_index, const vsf_tgui_v_color_t color, const vsf_tgui_align_mode_t mode)
Definition vsf_tgui_scguiv_port.c:292
void vsf_tgui_control_v_draw_rect(vsf_tgui_t *gui_ptr, const vsf_tgui_control_t *control_ptr, const vsf_tgui_region_t *dirty_region_ptr, const vsf_tgui_region_t *ptRectRegion, const vsf_tgui_v_color_t color)
Definition vsf_tgui_scguiv_port.c:273
uint16_t * refresh_pending_buffer
Definition vsf_tgui_scguiv_port.h:76
bool refresh_pending_notify
Definition vsf_tgui_scguiv_port.h:73
declare_class(vsf_tgui_t) typedef uint16_t vsf_tgui_v_color_t
Definition __vk_tgui_slider.c:41
vk_disp_area_t refresh_pending_area
Definition vsf_tgui_scguiv_port.h:75
SC_tile cur_tile
Definition vsf_tgui_scguiv_port.h:78
uint8_t refresh_pending_cnt
Definition vsf_tgui_scguiv_port.h:74
bool is_disp_inited
Definition vsf_tgui_scguiv_port.h:70
bool refresh_is_first_pfb
Definition vsf_tgui_scguiv_port.h:71
vsf_tgui_region_t request_region
Definition vsf_tgui_scguiv_port.h:79
const vsf_tgui_control_t const vsf_tgui_region_t * dirty_region_ptr
Definition vsf_tgui_scguiv_port.h:88
void vsf_tgui_control_v_draw_tile(vsf_tgui_t *gui_ptr, const vsf_tgui_control_t *control_ptr, const vsf_tgui_region_t *dirty_region_ptr, const vsf_tgui_tile_t *tile_ptr, const vsf_tgui_align_mode_t mode, const uint8_t trans_rate, vsf_tgui_region_t *ptPlacedRegion, vsf_tgui_v_color_t color, vsf_tgui_v_color_t bg_color)
Definition vsf_tgui_scguiv_port.c:324
vsf_tgui_sv_color_bgr565_t vsf_tgui_v_color_t
Definition vsf_tgui_sv_color.h:112