VSF Documented
vsf_tgui_control.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_TGUI_CONTROLS_CONTROL_H__
36#define __VSF_TGUI_CONTROLS_CONTROL_H__
37
38/*============================ INCLUDES ======================================*/
39
45#ifndef VSF_TGUI_V_TEMPLATE_TYPE_HEADER_FILE
46#if VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL == VSF_TGUI_V_TEMPLATE_SIMPLE_VIEW
47# define VSF_TGUI_V_TEMPLATE_TYPE_HEADER_FILE "../view/simple_view/vsf_tgui_v_type.h"
48#elif VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL == VSF_TGUI_V_TEMPLATE_SCGUI_VIEW
49# define VSF_TGUI_V_TEMPLATE_TYPE_HEADER_FILE "../view/scgui_view/vsf_tgui_v_type.h"
50#else
51# undef VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL
52# define VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL VSF_TGUI_V_TEMPLATE_EXAMPLE
53# define VSF_TGUI_V_TEMPLATE_TYPE_HEADER_FILE "../view/template/vsf_tgui_v_type.h"
54#endif
55
56#include VSF_TGUI_V_TEMPLATE_TYPE_HEADER_FILE
57#endif
58
59#if defined(__VSF_TGUI_CONTROLS_CONTROL_CLASS_IMPLEMENT)
60# define __PLOOC_CLASS_IMPLEMENT__
61# undef __VSF_TGUI_CONTROLS_CONTROL_CLASS_IMPLEMENT
62#elif defined(__VSF_TGUI_CONTROLS_CONTROL_CLASS_INHERIT)
63# define __PLOOC_CLASS_INHERIT__
64# undef __VSF_TGUI_CONTROLS_CONTROL_CLASS_INHERIT
65#endif
66
67#include "utilities/ooc_class.h"
68
69#ifdef __cplusplus
70extern "C" {
71#endif
72
73/*============================ MACROS ========================================*/
74
75#define __VSF_TGUI_INTERFACE_CONTROLS_CONTROL { \
76 .msg_handler = { \
77 VSF_MSGT_NODE_HANDLER_TYPE_FSM, \
78 (vsf_msgt_method_fsm_t *)&vsf_tgui_control_msg_handler, \
79 }, \
80 .Status = (vsf_msgt_method_status_t *) \
81 &vsf_tgui_control_status_get, \
82 .Shoot = (vsf_msgt_method_shoot_t *)&vsf_tgui_control_shoot, \
83 }
84
85#define __VSF_TGUI_INTERFACE_CONTROLS_CONTAINER { \
86 .msg_handler = { \
87 VSF_MSGT_NODE_HANDLER_TYPE_FSM, \
88 (vsf_msgt_method_fsm_t *)&vsf_tgui_container_msg_handler, \
89 }, \
90 .Status = (vsf_msgt_method_status_t *) \
91 &vsf_tgui_control_status_get, \
92 .Shoot = (vsf_msgt_method_shoot_t *)&vsf_tgui_control_shoot, \
93 }
94
95
96#define VSF_TGUI_CTRL_STATUS_INITIALISED VSF_BIT(0)
97#define VSF_TGUI_CTRL_STATUS_ENABLED VSF_BIT(1)
98#define VSF_TGUI_CTRL_STATUS_VISIBLE VSF_BIT(2)
99#define VSF_TGUI_CTRL_STATUS_ACTIVE VSF_BIT(3)
100#define VSF_TGUI_CTRL_STATUS_HIDE_CONTAINER_CONTENT VSF_BIT(4)
101
102/*============================ MACROFIED FUNCTIONS ===========================*/
103
104#if VSF_TGUI_CFG_SUPPORT_NAME_STRING == ENABLED
105# define ____tgui_name_string_tag(__name, __type) \
106 .node_name_ptr = "["#__type"]["#__name"]",
107#else
108# define ____tgui_name_string_tag(__name, __type)
109#endif
110
111#define __tgui_name_string_tag(__name, __type) \
112 ____tgui_name_string_tag(__name, __type)
113
114#if VSF_MSG_TREE_CFG_SUPPORT_DUAL_LIST == ENABLED
115# define ____tgui_node_list_init(__name, __parent_addr, __previous, __next) \
116 .Offset = { \
117 .previous = (intptr_t)&((__parent_addr)->__name) \
118 - (intptr_t)&((__parent_addr)->__previous), \
119 .next = (intptr_t)&((__parent_addr)->__next) \
120 - (intptr_t)&((__parent_addr)->__name), \
121 },
122#else
123# define ____tgui_node_list_init(__name, __parent_addr, __previous, __next) \
124 .Offset = { \
125 .next = (intptr_t)&((__parent_addr)->__next) \
126 - (intptr_t)&((__parent_addr)->__name), \
127 },
128#endif
129
130
131#define __tgui_node_list_init(__name, __parent_addr, __previous, __next) \
132 ____tgui_node_list_init(__name, __parent_addr, __previous, __next)
133
134#define __tgui_control_base( __NAME, \
135 __ID, \
136 __TYPE, \
137 __PARENT_ADDR, \
138 __PREVIOUS, \
139 __NEXT, \
140 ...) \
141 .__NAME = { \
142 .parent_ptr = (vsf_msgt_container_t *) \
143 &(((__TYPE *)(__PARENT_ADDR))->use_as__vsf_msgt_node_t), \
144 .id = (__ID), \
145 __tgui_node_list_init(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT)\
146 __tgui_name_string_tag(__NAME, __TYPE) \
147 .bIsEnabled = true, \
148 .bIsVisible = true, \
149 VSF_TGUI_V_CONTROL_STATIC_INIT_DEFAULT \
150 __VA_ARGS__ \
151 VSF_TGUI_V_CONTROL_STATIC_INIT_OVERRIDE \
152 }
153
154#define __tgui_control_base_const( __NAME, \
155 __ID, \
156 __TYPE, \
157 __PARENT_ADDR, \
158 __PREVIOUS, \
159 __NEXT, \
160 ...) \
161 .__NAME = (const __TYPE) { \
162 .parent_ptr = (vsf_msgt_container_t *) \
163 &((__PARENT_ADDR)->use_as__vsf_msgt_node_t), \
164 .id = (__ID), \
165 __tgui_node_list_init(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT)\
166 __tgui_name_string_tag(__NAME, __TYPE) \
167 .bIsEnabled = true, \
168 .bIsVisible = true, \
169 VSF_TGUI_V_CONTROL_STATIC_INIT_DEFAULT \
170 __VA_ARGS__ \
171 VSF_TGUI_V_CONTROL_STATIC_INIT_OVERRIDE \
172 }
173
174#define __describe_tgui_control_base( __NAME, \
175 __ID, \
176 __TYPE, \
177 ...) \
178 static const __TYPE __NAME = { \
179 .id = (__ID), \
180 __tgui_name_string_tag(__VAR, __TYPE) \
181 .bIsEnabled = true, \
182 .bIsVisible = true, \
183 VSF_TGUI_V_CONTROL_STATIC_INIT_DEFAULT \
184 __VA_ARGS__ \
185 VSF_TGUI_V_CONTROL_STATIC_INIT_OVERRIDE \
186 };
187
188
189#define __describe_tgui_container_base( __NAME, \
190 __ID, \
191 __TYPE, \
192 ...) \
193 __describe_tgui_control_base( \
194 __NAME, \
195 __ID, \
196 __TYPE, \
197 .is_container = true, \
198 .ContainerAttribute.bIsAutoSize = true, \
199 .node_ptr = \
200 (vsf_msgt_node_t*) \
201 &((*(__TYPE *)0).__TYPE##_FirstNode), \
202 VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
203 __VA_ARGS__ \
204 VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE \
205 )
206
207#define describe_tgui_container_base( __NAME, \
208 __ID, \
209 __TYPE, \
210 ...) \
211 __describe_tgui_container_base( __NAME, \
212 __ID, \
213 __TYPE, \
214 __VA_ARGS__)
215
216#define tgui_control_base( __NAME, \
217 __ID, \
218 __TYPE, \
219 __PARENT_ADDR, \
220 __PREVIOUS, \
221 __NEXT, \
222 ...) \
223 __tgui_control_base( \
224 __NAME, \
225 (__ID), \
226 __TYPE, \
227 (__PARENT_ADDR), \
228 __PREVIOUS, \
229 __NEXT, \
230 __VA_ARGS__)
231
232#define tgui_control_base_const( __NAME, \
233 __ID, \
234 __TYPE, \
235 __PARENT_ADDR, \
236 __PREVIOUS, \
237 __NEXT, \
238 ...) \
239 __tgui_control_base_const( \
240 __NAME, \
241 (__ID), \
242 __TYPE, \
243 (__PARENT_ADDR), \
244 __PREVIOUS, \
245 __NEXT, \
246 __VA_ARGS__)
247
248
249#define describe_tgui_control_base( __NAME, \
250 __ID, \
251 __TYPE, \
252 ...) \
253 __describe_tgui_control_base( __NAME, \
254 __ID, \
255 __TYPE, \
256 __VA_ARGS__)
257
258
259#define __tgui_control(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
260 tgui_control_base( __NAME, \
261 VSF_TGUI_COMPONENT_ID_CONTROL, \
262 vsf_tgui_control_t, \
263 (__PARENT_ADDR), \
264 __PREVIOUS, \
265 __NEXT, \
266 __VA_ARGS__)
267
268#define tgui_control(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
269 __tgui_control( __NAME, \
270 (__PARENT_ADDR), \
271 __PREVIOUS, \
272 __NEXT, \
273 __VA_ARGS__)
274
275#define __tgui_control_const(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
276 tgui_control_base_const(__NAME, \
277 VSF_TGUI_COMPONENT_ID_CONTROL, \
278 vsf_tgui_control_t, \
279 (__PARENT_ADDR), \
280 __PREVIOUS, \
281 __NEXT, \
282 __VA_ARGS__)
283
284#define tgui_control_const(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
285 __tgui_control_const( __NAME, \
286 (__PARENT_ADDR), \
287 __PREVIOUS, \
288 __NEXT, \
289 __VA_ARGS__)
290
291#define __use_tgui_container(__NAME, ...) \
292 struct { \
293 implement(vsf_tgui_container_t) \
294 union { \
295 vsf_msgt_node_t __NAME##_FirstNode ; \
296 struct { \
297 __VA_ARGS__; \
298 }; \
299 }; \
300 } __NAME;
301
302#define use_tgui_container(__NAME, ...) __use_tgui_container(__NAME, __VA_ARGS__)
303
304
305
306#define __tgui_container_base( __NAME, \
307 __ID, \
308 __TYPE, \
309 __PARENT_ADDR, \
310 __PREVIOUS, \
311 __NEXT, \
312 ...) \
313 tgui_control_base( \
314 __NAME, \
315 __ID, \
316 __TYPE, \
317 (__PARENT_ADDR), \
318 __PREVIOUS, \
319 __NEXT, \
320 .is_container = true, \
321 .ContainerAttribute.bIsAutoSize = true, \
322 .node_ptr = \
323 (vsf_msgt_node_t*) \
324 &((__PARENT_ADDR)->__NAME.__NAME##_FirstNode), \
325 VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
326 __VA_ARGS__ \
327 VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE \
328 )
329
330#define tgui_container_base(__NAME, \
331 __ID, \
332 __TYPE, \
333 __PARENT_ADDR, \
334 __PREVIOUS, \
335 __NEXT, \
336 ...) \
337 __tgui_container_base( __NAME, \
338 __ID, \
339 __TYPE, \
340 __PARENT_ADDR, \
341 __PREVIOUS, \
342 __NEXT, \
343 __VA_ARGS__)
344
345#define __tgui_container_base_const(__NAME, \
346 __ID, \
347 __TYPE, \
348 __PARENT_ADDR, \
349 __PREVIOUS, \
350 __NEXT, \
351 ...) \
352 tgui_control_base_const( __NAME, \
353 __ID, \
354 __TYPE, \
355 (__PARENT_ADDR), \
356 __PREVIOUS, \
357 __NEXT, \
358 .is_container = true, \
359 .ContainerAttribute.bIsAutoSize = true, \
360 .node_ptr = \
361 (vsf_msgt_node_t*) \
362 &((__PARENT_ADDR)->__NAME.__NAME##_FirstNode), \
363 VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
364 __VA_ARGS__ \
365 VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE \
366 )
367
368#define tgui_container_base_const(__NAME, \
369 __ID, \
370 __TYPE, \
371 __PARENT_ADDR, \
372 __PREVIOUS, \
373 __NEXT, \
374 ...) \
375 __tgui_container_base_const(__NAME, \
376 __ID, \
377 __TYPE, \
378 __PARENT_ADDR, \
379 __PREVIOUS, \
380 __NEXT, \
381 __VA_ARGS__)
382
383# define __tgui_container( __NAME, \
384 __PARENT_ADDR, \
385 __PREVIOUS, \
386 __NEXT, ...) \
387 tgui_container_base(__NAME, \
388 VSF_TGUI_COMPONENT_ID_CONTAINER, \
389 vsf_tgui_container_t, \
390 (__PARENT_ADDR), \
391 __PREVIOUS, \
392 __NEXT, \
393 __VA_ARGS__)
394
395
396#define tgui_container( __NAME, \
397 __PARENT_ADDR, \
398 __PREVIOUS, \
399 __NEXT, \
400 ...) \
401 __tgui_container(__NAME, \
402 (__PARENT_ADDR), \
403 __PREVIOUS, \
404 __NEXT, \
405 __VA_ARGS__)
406
407
408/*============================ TYPES =========================================*/
409
410
411
412typedef union vsf_tgui_status_t {
414 struct {
425
436
438
439
440typedef struct vsf_tgui_control_subcall_t {
444
446 vsf_tgui_control_t* node_ptr,
448
453
455 union {
457 vsf_eda_t* ptEDA;
459 },
460 fn
461 )
463 const char *handler_name_ptr;
464#endif
465
467
469 implement(vsf_msgt_msg_t)
472
473
474#if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_PADDING == ENABLED ||\
475 VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_MARGIN == ENABLED
476typedef struct vsf_tgui_margin_t {
482#endif
483
485
486 public_member(
487 implement(vsf_msgt_node_t)
488 vsf_msgt_node_t* node_ptr; /* do not use if unless it is a container*/
489
490 implement_ex(vsf_tgui_region_t, tRegion)
491
492 #if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ANCHOR == ENABLED
494 #endif
495
496 #if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_DOCK == ENABLED
498 #endif
499
500 #if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_MARGIN == ENABLED
501 vsf_tgui_margin_t tMargin;
502 #endif
503
504 #if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ALIGN == ENABLED
505 struct {
506 vsf_tgui_control_t *ptAlignTo;
507
508 /* \note Only following mode supported:
509 VSF_TGUI_ALIGN_LEFT = VSF_BIT(0),
510 VSF_TGUI_ALIGN_RIGHT = VSF_BIT(1),
511 VSF_TGUI_ALIGN_TOP = VSF_BIT(2),
512 VSF_TGUI_ALIGN_BOTTOM = VSF_BIT(3),
513 */
515 } tAlign;
516 #endif
517
518 struct {
519 const vsf_tgui_tile_t* ptTile;
521 } tBackground;
522
523 struct {
524 const vsf_tgui_user_evt_handler *ptItems;
525 #if VSF_TGUI_CFG_SUPPORT_NAME_STRING == ENABLED
526 const char *name_ptr;
527 #endif
528 uint8_t chCount;
529 uint8_t chState;
530 uint8_t chIndex;
531 } tMSGMap;
532 )
533
534 union {
535 protected_member(
536 implement_ex(vsf_tgui_status_t, Status)
537 )
538 struct {
541 uint8_t : 1;
542 uint8_t bIsEnabled : 1;
543 uint8_t bIsVisible : 1;
544 uint8_t : 1;
545 uint8_t bIsHideContentInsideContainer : 1;
546 // NOTE: If bIsTransparent is set, parent control will be rendered first
547 uint8_t bIsTransparent : 1;
548 uint8_t dummy_bits : 2;
550 };
551 };
552
553#if VSF_TGUI_CFG_SUPPORT_DIRTY_REGION == ENABLED
554 protected_member(
555 vsf_tgui_region_t tDirtyRegion;
556 )
557#endif
558 implement(vsf_tgui_v_control_t)
559)
561
562
563declare_class(vsf_tgui_container_t)
564
565def_class(vsf_tgui_container_t,
567 union {
568 inherit(vsf_msgt_container_t)
569 implement(vsf_tgui_control_t)
570 };
571 implement(vsf_tgui_v_container_t)
572 )
573
574 implement_ex(
575 struct {
576 /* vsf_tgui_container_type_t */
577 uint8_t u5Type : 5;
578 uint8_t bIsAutoSize : 1;
579 uint8_t is_forced_to_refresh_whole_background : 1;
580 uint8_t : 1;
581 },
582 ContainerAttribute
583 )
584
585 protected_member(
588
591#endif
592
593
594)
595end_def_class(vsf_tgui_container_t)
596
598
600 which(implement(vsf_tgui_container_t))
601 public_member(
602 vsf_tgui_t* gui_ptr;
603 )
604)
605
607
608
610 VSF_TGUI_CONTROL_REFRESHED_BY_PARENT = 0,
611 VSF_TGUI_CONTROL_REFRESHED_DIRECTLY_BY_USER
613
615typedef fsm_rt_t vsf_tgui_v_method_render_t(vsf_tgui_t* gui_ptr,
617 vsf_tgui_region_t* ptDirtyRegion,
619
621
622typedef struct i_tgui_v_vtable_t{
629
635
636#if VSF_TGUI_CFG_SUPPORT_TIMER == ENABLED
637declare_class(vsf_tgui_timer_t)
638
639def_class(vsf_tgui_timer_t,
640
641 private_member(
642 implement(vsf_callback_timer_t)
643 const vsf_tgui_control_t *target_ptr;
644 )
645
646 union {
647 public_member(
649 uint32_t : 1;
651 uint32_t bEnabled : 1;
653 private_member(
654 struct {
658 uint32_t bEnabled : 1;
659 }Status;
661 };
662)
663end_def_class(vsf_tgui_timer);
664
665#endif
666/*============================ GLOBAL VARIABLES ==============================*/
667/*============================ PROTOTYPES ====================================*/
668#if VSF_TGUI_CFG_SUPPORT_TIMER == ENABLED
669extern
670void vsf_tgui_timer_init( vsf_tgui_timer_t *ptTimer,
672
673extern
674void vsf_tgui_timer_enable(vsf_tgui_timer_t *ptTimer);
675
676extern
677void vsf_tgui_timer_disable(vsf_tgui_timer_t *ptTimer);
678
679extern
680bool vsf_tgui_timer_is_working(vsf_tgui_timer_t *ptTimer);
681#endif
682/*----------------------------------------------------------------------------*
683 * Region *
684 *----------------------------------------------------------------------------*/
685extern
688
689extern
692
693extern
694bool vsf_tgui_control_is_in_range( const vsf_tgui_region_t *region_ptr,
695 const vsf_tgui_location_t *ptLocation);
696
707extern
711 vsf_tgui_location_t *ptLocation);
712
713extern
716 vsf_tgui_region_t* ptRegionBuffer);
717
718extern
721 vsf_tgui_location_t* ptOffset);
722
737extern
740 vsf_tgui_region_t *region_ptr);
741
742extern
745 const vsf_tgui_region_t *ptParentDirtyRegion,
746 const vsf_tgui_control_t *ptPrivate,
747 vsf_tgui_region_t *ptNewDirtyRegionBuffer);
748
749
750
757extern
759 vsf_tgui_region_t* ptRegionBuffer);
760
761extern
764 vsf_tgui_region_t *ptAbsoluteRegion);
765
766extern
768 const vsf_tgui_location_t *ptLocation);
769
770
771/*----------------------------------------------------------------------------*
772 * Status and Attributes *
773 *----------------------------------------------------------------------------*/
774
781extern
783 bool is_control_transparent);
784
785extern
787
788
789extern
791 vsf_tgui_status_t Status);
792
793extern
795
796extern
799
800extern
802 const vsf_tgui_container_t *container_ptr);
803
804
805/*----------------------------------------------------------------------------*
806 * Methods and Others *
807 *----------------------------------------------------------------------------*/
808extern
811
814
816
817#if VSF_TGUI_CFG_REFRESH_SCHEME != VSF_TGUI_REFRESH_SCHEME_NONE
818extern
819bool vsf_tgui_control_refresh( const vsf_tgui_control_t *control_ptr,
820 const vsf_tgui_region_t *region_ptr);
821#endif
822
823extern
825 vsf_tgui_evt_t event);
826
827extern
829
830extern
832
833extern
835
836extern
839
840extern
841fsm_rt_t vsf_tgui_container_msg_handler(vsf_tgui_container_t* node_ptr,
843
844extern
847 const i_tgui_control_methods_t* ptMethods);
848
849extern
851 const vsf_tgui_evt_t* event_ptr);
852
853extern
855
856extern
857fsm_rt_t vk_tgui_container_init(vsf_tgui_container_t *container_ptr);
858
859extern
861
862extern
863fsm_rt_t vk_tgui_container_update(vsf_tgui_container_t* container_ptr);
864
865#ifdef __cplusplus
866}
867#endif
868
869#endif
870/* EOF */
#define ENABLED
Definition __type.h:28
Definition vsf_eda.h:848
Definition vsf_eda.h:766
unsigned short uint16_t
Definition lvgl.h:41
unsigned int uint32_t
Definition lvgl.h:43
unsigned char uint8_t
Definition lvgl.h:40
signed char int8_t
Definition lvgl.h:38
unsigned char uint_fast8_t
Definition stdint.h:23
Definition vsf_tgui_control.h:630
vsf_tgui_control_method_t * Init
Definition vsf_tgui_control.h:632
vsf_tgui_control_method_t * Update
Definition vsf_tgui_control.h:633
i_tgui_v_vtable_t tView
Definition vsf_tgui_control.h:631
Definition vsf_tgui_control.h:622
vsf_tgui_v_method_render_t * Render
Definition vsf_tgui_control.h:625
vsf_tgui_v_method_t * Init
Definition vsf_tgui_control.h:623
vsf_tgui_v_method_t * Update
Definition vsf_tgui_control.h:627
vsf_tgui_v_method_t * Depose
Definition vsf_tgui_control.h:624
vsf_tgui_v_method_render_t * ContainerPostRender
Definition vsf_tgui_control.h:626
Definition vsf_tgui_control.h:449
uint16_t u10EvtMask
0 means no mask
Definition vsf_tgui_control.h:452
implement_ex(union { vsf_tgui_controal_fsm_t *FSM;vsf_eda_t *ptEDA;vsf_tgui_control_subcall_t *ptSubCall;}, fn) const char *handler_name_ptr
uint16_t u2Type
vsf_msgt_handler_type_t
Definition vsf_tgui_control.h:450
Definition vsf_tgui_common.h:271
Definition vsf_tgui_control.h:476
int8_t chLeft
Definition vsf_tgui_control.h:477
int8_t chTop
Definition vsf_tgui_control.h:478
int8_t chBottom
Definition vsf_tgui_control.h:480
int8_t chRight
Definition vsf_tgui_control.h:479
Definition vsf_tgui_common.h:558
Definition vsf_tgui_common.h:281
Definition vsf_tgui_common.h:276
Definition vsf_tgui_control.h:468
Definition vsf_tgui_common.h:591
Definition vsf_tgui_control.h:412
uint8_t bIsEnabled
Definition vsf_tgui_control.h:418
uint8_t chStatus
Definition vsf_tgui_control.h:413
uint8_t __skip_render_frame
Definition vsf_tgui_control.h:431
uint8_t bIsHideContentInsideContainer
Definition vsf_tgui_control.h:421
uint8_t __is_the_first_node_for_refresh
Definition vsf_tgui_control.h:428
uint8_t bIsVisible
Definition vsf_tgui_control.h:419
uint8_t bIsInitialised
Definition vsf_tgui_control.h:417
struct vsf_tgui_status_t::@138 Values
uint8_t bIsTransparent
Definition vsf_tgui_control.h:422
uint8_t __does_contain_builtin_structure
Definition vsf_tgui_control.h:429
uint8_t bIsActive
Definition vsf_tgui_control.h:420
uint8_t __skip_render
Definition vsf_tgui_control.h:430
Definition vsf_tgui_common.h:444
void(* vsf_param_eda_evthandler_t)(uintptr_t target, vsf_evt_t evt)
Definition vsf_eda.h:658
fsm_rt_t
Definition vsf_fsm.h:315
vsf_msgt_msg_t
Definition vsf_msg_tree.h:79
vsf_msgt_container_t * parent_ptr
parent node
Definition vsf_msg_tree.h:187
def_class(vsf_stream_fifo_t, which(vsf_stream_tx_t TX;vsf_stream_rx_t RX;), private:vsf_slist_queue_t union { vsf_stream_fifo_cfg_t cfg;struct { vsf_stream_dat_rdy_evt_t tDataReadyEventHandling;vsf_stream_dat_drn_evt_t tDataDrainEventHandling;vsf_stream_status_t Status;#if !defined(VSF_PBUF_QUEUE_CFG_ATOM_ACCESS) vsf_protect_region_t *pregion;#endif };};) end_def_class(vsf_stream_fifo_t) extern vsf_err_t vsf_stream_fifo_init(vsf_stream_fifo_t *obj_ptr
uintptr_t item_ptr
Definition vsf_pool.h:476
#define VSF_TGUI_CFG_SUPPORT_NAME_STRING
Definition vsf_tgui_cfg.h:120
#define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_PADDING
Definition vsf_tgui_cfg.h:89
vsf_tgui_align_mode_t
Definition vsf_tgui_common.h:287
vsf_tgui_anchor_mode_t
Definition vsf_tgui_common.h:332
vsf_tgui_dock_mode_t
Definition vsf_tgui_common.h:320
struct vsf_tgui_control_t vsf_tgui_control_t
Definition vsf_tgui_common.h:555
struct vsf_tgui_root_container_t vsf_tgui_root_container_t
Definition vsf_tgui_common.h:556
bool vsf_tgui_control_is_in_range(const vsf_tgui_region_t *region_ptr, const vsf_tgui_location_t *ptLocation)
Definition vsf_tgui_control.c:281
vsf_tgui_size_t * vsf_tgui_control_get_size(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:225
vsf_tgui_region_t * vsf_tgui_get_absolute_control_region(const vsf_tgui_control_t *control_ptr, vsf_tgui_region_t *ptRegionBuffer)
Definition vsf_tgui_control.c:269
vsf_tgui_region_t * vsf_tgui_control_get_relative_region(const vsf_tgui_control_t *control_ptr, vsf_tgui_region_t *ptAbsoluteRegion)
Definition vsf_tgui_control.c:343
bool vsf_tgui_timer_is_working(vsf_tgui_timer_t *ptTimer)
Definition vsf_tgui_control.c:174
fsm_rt_t vsf_tgui_container_msg_handler(vsf_tgui_container_t *control_ptr, vsf_tgui_msg_t *ptMSG)
Definition vsf_tgui_control.c:1109
bool vsf_tgui_control_is_container(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:446
fsm_rt_t vk_tgui_container_update(vsf_tgui_container_t *container_ptr)
Definition vsf_tgui_control.c:1518
bool vsf_tgui_control_set_active(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:555
void vsf_tgui_timer_init(vsf_tgui_timer_t *ptTimer, const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:120
vsf_tgui_status_t vsf_tgui_control_status_get(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:432
bool vsf_tgui_control_get_visible_region(const vsf_tgui_control_t *control_ptr, vsf_tgui_region_t *ptRegionBuffer)
get the visible region (with absolute location) !
Definition vsf_tgui_control.c:315
vsf_tgui_location_t * vsf_tgui_control_get_location(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:220
bool vsf_tgui_control_update(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:509
bool vsf_tgui_control_send_message(const vsf_tgui_control_t *control_ptr, vsf_tgui_evt_t event)
Definition vsf_tgui_control.c:490
vsf_tgui_location_t * __vk_tgui_calculate_control_location_from_parent(const vsf_tgui_control_t *control_ptr, const vsf_tgui_control_t *parent_ptr, vsf_tgui_location_t *ptLocation)
get the relative location information base on the location information ! of or derived from target co...
Definition vsf_tgui_control.c:194
bool vsf_tgui_control_set_is_transparent_bit(vsf_tgui_control_t *control_ptr, bool is_control_transparent)
update bIsTransparent bit in control status ! \parame control_ptr target control address !
Definition vsf_tgui_control.c:416
void vsf_tgui_timer_disable(vsf_tgui_timer_t *ptTimer)
Definition vsf_tgui_control.c:156
fsm_rt_t __vk_tgui_control_user_message_handling(vsf_tgui_control_t *control_ptr, const vsf_tgui_evt_t *event_ptr)
Definition vsf_tgui_control.c:580
uint_fast8_t vk_tgui_container_visible_item_get(const vsf_tgui_container_t *container_ptr)
Definition vsf_tgui_control.c:459
vsf_tgui_region_t * vsf_tgui_control_calculate_absolute_region(const vsf_tgui_control_t *control_ptr, vsf_tgui_region_t *region_ptr)
If you get a relative region inside a control, this function can calculate ! the absolute location an...
Definition vsf_tgui_control.c:259
const vsf_tgui_control_t * __vk_tgui_control_get_next_visible_one_within_container(const vsf_tgui_control_t *item_ptr)
Definition vsf_tgui_control.c:1163
vsf_tgui_t * vsf_tgui_control_get_gui_instance(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:483
bool vsf_tgui_control_shoot(const vsf_tgui_control_t *control_ptr, const vsf_tgui_location_t *ptLocation)
Definition vsf_tgui_control.c:386
fsm_rt_t vk_tgui_control_update(vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:1508
fsm_rt_t vk_tgui_control_init(vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:1523
fsm_rt_t __vsf_tgui_control_msg_handler(vsf_tgui_control_t *control_ptr, vsf_tgui_msg_t *ptMSG, const i_tgui_control_methods_t *ptMethods)
Definition vsf_tgui_control.c:727
void vsf_tgui_timer_enable(vsf_tgui_timer_t *ptTimer)
Definition vsf_tgui_control.c:135
void vsf_tgui_control_status_set(vsf_tgui_control_t *control_ptr, vsf_tgui_status_t Status)
Definition vsf_tgui_control.c:439
vsf_tgui_region_t * vsf_tgui_control_generate_dirty_region_from_parent_dirty_region(const vsf_tgui_control_t *parent_ptr, const vsf_tgui_region_t *ptParentDirtyRegion, const vsf_tgui_control_t *ptPrivate, vsf_tgui_region_t *ptNewDirtyRegionBuffer)
Definition vsf_tgui_control.c:359
fsm_rt_t vk_tgui_container_init(vsf_tgui_container_t *container_ptr)
Definition vsf_tgui_control.c:1534
vsf_tgui_control_t * vsf_tgui_control_get_parent(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:452
const vsf_tgui_root_container_t * vk_tgui_control_get_top(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:470
fsm_rt_t vsf_tgui_control_msg_handler(vsf_tgui_control_t *control_ptr, vsf_tgui_msg_t *ptMSG)
Definition vsf_tgui_control.c:1101
vsf_tgui_location_t * vsf_tgui_control_calculate_absolute_location(const vsf_tgui_control_t *control_ptr, vsf_tgui_location_t *ptOffset)
Definition vsf_tgui_control.c:230
bool vsf_tgui_control_update_tree(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:523
uint32_t bIsWorking
Definition vsf_tgui_control.h:660
fsm_rt_t vsf_tgui_v_method_render_t(vsf_tgui_t *gui_ptr, vsf_tgui_control_t *control_ptr, vsf_tgui_region_t *ptDirtyRegion, vsf_tgui_control_refresh_mode_t tMode)
Definition vsf_tgui_control.h:615
struct i_tgui_control_vtable_t i_tgui_control_methods_t
fsm_rt_t vsf_tgui_control_method_t(vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.h:620
end_def_class(vsf_tgui_container_t) declare_class(vsf_tgui_root_container_t) def_class(vsf_tgui_root_container_t
vsf_tgui_margin_t tContainerPadding
Definition vsf_tgui_control.h:590
which(union { inherit(vsf_msgt_container_t) vsf_tgui_control_t };vsf_tgui_v_container_t) implement_ex(struct
Definition vsf_tgui_control.h:566
uint32_t u29Interval
Definition vsf_tgui_control.h:652
fsm_rt_t vsf_tgui_v_method_t(vsf_tgui_t *gui_ptr, vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.h:614
uint32_t bEnabled
Definition vsf_tgui_control.h:652
uint32_t bIsRepeat
Definition vsf_tgui_control.h:652
fsm_rt_t vsf_tgui_controal_fsm_t(vsf_tgui_control_t *node_ptr, vsf_tgui_msg_t *ptMSG)
Definition vsf_tgui_control.h:445
declare_class(vsf_tgui_control_t) typedef struct vsf_tgui_control_subcall_t
Definition vsf_tgui_control.h:437
vsf_tgui_control_refresh_mode_t
Definition vsf_tgui_control.h:612
uint8_t chVisibleItemCount
Definition vsf_tgui_control.h:581
vsf_tgui_control_subcall_t
Definition vsf_tgui_control.h:443
which(vsf_tgui_control_t vsf_tgui_v_label_t) public vsf_tgui_msg_t * ptMSG
Definition vsf_tgui_label.h:161
const vsf_tgui_control_t * control_ptr
Definition vsf_tgui_scguiv_port.h:91