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/*============================ MACROS ========================================*/
70
71#define __VSF_TGUI_INTERFACE_CONTROLS_CONTROL { \
72 .msg_handler = { \
73 VSF_MSGT_NODE_HANDLER_TYPE_FSM, \
74 (vsf_msgt_method_fsm_t *)&vsf_tgui_control_msg_handler, \
75 }, \
76 .Status = (vsf_msgt_method_status_t *) \
77 &vsf_tgui_control_status_get, \
78 .Shoot = (vsf_msgt_method_shoot_t *)&vsf_tgui_control_shoot, \
79 }
80
81#define __VSF_TGUI_INTERFACE_CONTROLS_CONTAINER { \
82 .msg_handler = { \
83 VSF_MSGT_NODE_HANDLER_TYPE_FSM, \
84 (vsf_msgt_method_fsm_t *)&vsf_tgui_container_msg_handler, \
85 }, \
86 .Status = (vsf_msgt_method_status_t *) \
87 &vsf_tgui_control_status_get, \
88 .Shoot = (vsf_msgt_method_shoot_t *)&vsf_tgui_control_shoot, \
89 }
90
91
92#define VSF_TGUI_CTRL_STATUS_INITIALISED VSF_BIT(0)
93#define VSF_TGUI_CTRL_STATUS_ENABLED VSF_BIT(1)
94#define VSF_TGUI_CTRL_STATUS_VISIBLE VSF_BIT(2)
95#define VSF_TGUI_CTRL_STATUS_ACTIVE VSF_BIT(3)
96#define VSF_TGUI_CTRL_STATUS_HIDE_CONTAINER_CONTENT VSF_BIT(4)
97
98/*============================ MACROFIED FUNCTIONS ===========================*/
99
100#if VSF_TGUI_CFG_SUPPORT_NAME_STRING == ENABLED
101# define ____tgui_name_string_tag(__name, __type) \
102 .node_name_ptr = "["#__type"]["#__name"]",
103#else
104# define ____tgui_name_string_tag(__name, __type)
105#endif
106
107#define __tgui_name_string_tag(__name, __type) \
108 ____tgui_name_string_tag(__name, __type)
109
110#if VSF_MSG_TREE_CFG_SUPPORT_DUAL_LIST == ENABLED
111# define ____tgui_node_list_init(__name, __parent_addr, __previous, __next) \
112 .Offset = { \
113 .previous = (intptr_t)&((__parent_addr)->__name) \
114 - (intptr_t)&((__parent_addr)->__previous), \
115 .next = (intptr_t)&((__parent_addr)->__next) \
116 - (intptr_t)&((__parent_addr)->__name), \
117 },
118#else
119# define ____tgui_node_list_init(__name, __parent_addr, __previous, __next) \
120 .Offset = { \
121 .next = (intptr_t)&((__parent_addr)->__next) \
122 - (intptr_t)&((__parent_addr)->__name), \
123 },
124#endif
125
126
127#define __tgui_node_list_init(__name, __parent_addr, __previous, __next) \
128 ____tgui_node_list_init(__name, __parent_addr, __previous, __next)
129
130#define __tgui_control_base( __NAME, \
131 __ID, \
132 __TYPE, \
133 __PARENT_ADDR, \
134 __PREVIOUS, \
135 __NEXT, \
136 ...) \
137 .__NAME = { \
138 .parent_ptr = (vsf_msgt_container_t *) \
139 &(((__TYPE *)(__PARENT_ADDR))->use_as__vsf_msgt_node_t), \
140 .id = (__ID), \
141 __tgui_node_list_init(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT)\
142 __tgui_name_string_tag(__NAME, __TYPE) \
143 .bIsEnabled = true, \
144 .bIsVisible = true, \
145 VSF_TGUI_V_CONTROL_STATIC_INIT_DEFAULT \
146 __VA_ARGS__ \
147 VSF_TGUI_V_CONTROL_STATIC_INIT_OVERRIDE \
148 }
149
150#define __tgui_control_base_const( __NAME, \
151 __ID, \
152 __TYPE, \
153 __PARENT_ADDR, \
154 __PREVIOUS, \
155 __NEXT, \
156 ...) \
157 .__NAME = (const __TYPE) { \
158 .parent_ptr = (vsf_msgt_container_t *) \
159 &((__PARENT_ADDR)->use_as__vsf_msgt_node_t), \
160 .id = (__ID), \
161 __tgui_node_list_init(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT)\
162 __tgui_name_string_tag(__NAME, __TYPE) \
163 .bIsEnabled = true, \
164 .bIsVisible = true, \
165 VSF_TGUI_V_CONTROL_STATIC_INIT_DEFAULT \
166 __VA_ARGS__ \
167 VSF_TGUI_V_CONTROL_STATIC_INIT_OVERRIDE \
168 }
169
170#define __describe_tgui_control_base( __NAME, \
171 __ID, \
172 __TYPE, \
173 ...) \
174 static const __TYPE __NAME = { \
175 .id = (__ID), \
176 __tgui_name_string_tag(__VAR, __TYPE) \
177 .bIsEnabled = true, \
178 .bIsVisible = true, \
179 VSF_TGUI_V_CONTROL_STATIC_INIT_DEFAULT \
180 __VA_ARGS__ \
181 VSF_TGUI_V_CONTROL_STATIC_INIT_OVERRIDE \
182 };
183
184
185#define __describe_tgui_container_base( __NAME, \
186 __ID, \
187 __TYPE, \
188 ...) \
189 __describe_tgui_control_base( \
190 __NAME, \
191 __ID, \
192 __TYPE, \
193 .is_container = true, \
194 .ContainerAttribute.bIsAutoSize = true, \
195 .node_ptr = \
196 (vsf_msgt_node_t*) \
197 &((*(__TYPE *)0).__TYPE##_FirstNode), \
198 VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
199 __VA_ARGS__ \
200 VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE \
201 )
202
203#define describe_tgui_container_base( __NAME, \
204 __ID, \
205 __TYPE, \
206 ...) \
207 __describe_tgui_container_base( __NAME, \
208 __ID, \
209 __TYPE, \
210 __VA_ARGS__)
211
212#define tgui_control_base( __NAME, \
213 __ID, \
214 __TYPE, \
215 __PARENT_ADDR, \
216 __PREVIOUS, \
217 __NEXT, \
218 ...) \
219 __tgui_control_base( \
220 __NAME, \
221 (__ID), \
222 __TYPE, \
223 (__PARENT_ADDR), \
224 __PREVIOUS, \
225 __NEXT, \
226 __VA_ARGS__)
227
228#define tgui_control_base_const( __NAME, \
229 __ID, \
230 __TYPE, \
231 __PARENT_ADDR, \
232 __PREVIOUS, \
233 __NEXT, \
234 ...) \
235 __tgui_control_base_const( \
236 __NAME, \
237 (__ID), \
238 __TYPE, \
239 (__PARENT_ADDR), \
240 __PREVIOUS, \
241 __NEXT, \
242 __VA_ARGS__)
243
244
245#define describe_tgui_control_base( __NAME, \
246 __ID, \
247 __TYPE, \
248 ...) \
249 __describe_tgui_control_base( __NAME, \
250 __ID, \
251 __TYPE, \
252 __VA_ARGS__)
253
254
255#define __tgui_control(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
256 tgui_control_base( __NAME, \
257 VSF_TGUI_COMPONENT_ID_CONTROL, \
258 vsf_tgui_control_t, \
259 (__PARENT_ADDR), \
260 __PREVIOUS, \
261 __NEXT, \
262 __VA_ARGS__)
263
264#define tgui_control(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
265 __tgui_control( __NAME, \
266 (__PARENT_ADDR), \
267 __PREVIOUS, \
268 __NEXT, \
269 __VA_ARGS__)
270
271#define __tgui_control_const(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
272 tgui_control_base_const(__NAME, \
273 VSF_TGUI_COMPONENT_ID_CONTROL, \
274 vsf_tgui_control_t, \
275 (__PARENT_ADDR), \
276 __PREVIOUS, \
277 __NEXT, \
278 __VA_ARGS__)
279
280#define tgui_control_const(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
281 __tgui_control_const( __NAME, \
282 (__PARENT_ADDR), \
283 __PREVIOUS, \
284 __NEXT, \
285 __VA_ARGS__)
286
287#define __use_tgui_container(__NAME, ...) \
288 struct { \
289 implement(vsf_tgui_container_t) \
290 union { \
291 vsf_msgt_node_t __NAME##_FirstNode ; \
292 struct { \
293 __VA_ARGS__; \
294 }; \
295 }; \
296 } __NAME;
297
298#define use_tgui_container(__NAME, ...) __use_tgui_container(__NAME, __VA_ARGS__)
299
300
301
302#define __tgui_container_base( __NAME, \
303 __ID, \
304 __TYPE, \
305 __PARENT_ADDR, \
306 __PREVIOUS, \
307 __NEXT, \
308 ...) \
309 tgui_control_base( \
310 __NAME, \
311 __ID, \
312 __TYPE, \
313 (__PARENT_ADDR), \
314 __PREVIOUS, \
315 __NEXT, \
316 .is_container = true, \
317 .ContainerAttribute.bIsAutoSize = true, \
318 .node_ptr = \
319 (vsf_msgt_node_t*) \
320 &((__PARENT_ADDR)->__NAME.__NAME##_FirstNode), \
321 VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
322 __VA_ARGS__ \
323 VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE \
324 )
325
326#define tgui_container_base(__NAME, \
327 __ID, \
328 __TYPE, \
329 __PARENT_ADDR, \
330 __PREVIOUS, \
331 __NEXT, \
332 ...) \
333 __tgui_container_base( __NAME, \
334 __ID, \
335 __TYPE, \
336 __PARENT_ADDR, \
337 __PREVIOUS, \
338 __NEXT, \
339 __VA_ARGS__)
340
341#define __tgui_container_base_const(__NAME, \
342 __ID, \
343 __TYPE, \
344 __PARENT_ADDR, \
345 __PREVIOUS, \
346 __NEXT, \
347 ...) \
348 tgui_control_base_const( __NAME, \
349 __ID, \
350 __TYPE, \
351 (__PARENT_ADDR), \
352 __PREVIOUS, \
353 __NEXT, \
354 .is_container = true, \
355 .ContainerAttribute.bIsAutoSize = true, \
356 .node_ptr = \
357 (vsf_msgt_node_t*) \
358 &((__PARENT_ADDR)->__NAME.__NAME##_FirstNode), \
359 VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
360 __VA_ARGS__ \
361 VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE \
362 )
363
364#define tgui_container_base_const(__NAME, \
365 __ID, \
366 __TYPE, \
367 __PARENT_ADDR, \
368 __PREVIOUS, \
369 __NEXT, \
370 ...) \
371 __tgui_container_base_const(__NAME, \
372 __ID, \
373 __TYPE, \
374 __PARENT_ADDR, \
375 __PREVIOUS, \
376 __NEXT, \
377 __VA_ARGS__)
378
379# define __tgui_container( __NAME, \
380 __PARENT_ADDR, \
381 __PREVIOUS, \
382 __NEXT, ...) \
383 tgui_container_base(__NAME, \
384 VSF_TGUI_COMPONENT_ID_CONTAINER, \
385 vsf_tgui_container_t, \
386 (__PARENT_ADDR), \
387 __PREVIOUS, \
388 __NEXT, \
389 __VA_ARGS__)
390
391
392#define tgui_container( __NAME, \
393 __PARENT_ADDR, \
394 __PREVIOUS, \
395 __NEXT, \
396 ...) \
397 __tgui_container(__NAME, \
398 (__PARENT_ADDR), \
399 __PREVIOUS, \
400 __NEXT, \
401 __VA_ARGS__)
402
403
404/*============================ TYPES =========================================*/
405
406
407
408typedef union vsf_tgui_status_t {
410 struct {
421
432
434
435
436typedef struct vsf_tgui_control_subcall_t {
440
442 vsf_tgui_control_t* node_ptr,
444
449
451 union {
453 vsf_eda_t* ptEDA;
455 },
456 fn
457 )
459 const char *handler_name_ptr;
460#endif
461
463
465 implement(vsf_msgt_msg_t)
468
469
470#if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_PADDING == ENABLED ||\
471 VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_MARGIN == ENABLED
472typedef struct vsf_tgui_margin_t {
478#endif
479
481
482 public_member(
483 implement(vsf_msgt_node_t)
484 vsf_msgt_node_t* node_ptr; /* do not use if unless it is a container*/
485
486 implement_ex(vsf_tgui_region_t, tRegion)
487
488 #if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ANCHOR == ENABLED
490 #endif
491
492 #if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_DOCK == ENABLED
494 #endif
495
496 #if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_MARGIN == ENABLED
497 vsf_tgui_margin_t tMargin;
498 #endif
499
500 #if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ALIGN == ENABLED
501 struct {
502 vsf_tgui_control_t *ptAlignTo;
503
504 /* \note Only following mode supported:
505 VSF_TGUI_ALIGN_LEFT = VSF_BIT(0),
506 VSF_TGUI_ALIGN_RIGHT = VSF_BIT(1),
507 VSF_TGUI_ALIGN_TOP = VSF_BIT(2),
508 VSF_TGUI_ALIGN_BOTTOM = VSF_BIT(3),
509 */
511 } tAlign;
512 #endif
513
514 struct {
515 const vsf_tgui_tile_t* ptTile;
517 } tBackground;
518
519 struct {
520 const vsf_tgui_user_evt_handler *ptItems;
521 #if VSF_TGUI_CFG_SUPPORT_NAME_STRING == ENABLED
522 const char *name_ptr;
523 #endif
524 uint8_t chCount;
525 uint8_t chState;
526 uint8_t chIndex;
527 } tMSGMap;
528 )
529
530 union {
531 protected_member(
532 implement_ex(vsf_tgui_status_t, Status)
533 )
534 struct {
537 uint8_t : 1;
538 uint8_t bIsEnabled : 1;
539 uint8_t bIsVisible : 1;
540 uint8_t : 1;
541 uint8_t bIsHideContentInsideContainer : 1;
542 // NOTE: If bIsTransparent is set, parent control will be rendered first
543 uint8_t bIsTransparent : 1;
544 uint8_t dummy_bits : 2;
546 };
547 };
548
549#if VSF_TGUI_CFG_SUPPORT_DIRTY_REGION == ENABLED
550 protected_member(
551 vsf_tgui_region_t tDirtyRegion;
552 )
553#endif
554 implement(vsf_tgui_v_control_t)
555)
557
558
559declare_class(vsf_tgui_container_t)
560
561def_class(vsf_tgui_container_t,
563 union {
564 inherit(vsf_msgt_container_t)
565 implement(vsf_tgui_control_t)
566 };
567 implement(vsf_tgui_v_container_t)
568 )
569
570 implement_ex(
571 struct {
572 /* vsf_tgui_container_type_t */
573 uint8_t u5Type : 5;
574 uint8_t bIsAutoSize : 1;
575 uint8_t is_forced_to_refresh_whole_background : 1;
576 uint8_t : 1;
577 },
578 ContainerAttribute
579 )
580
581 protected_member(
584
587#endif
588
589
590)
591end_def_class(vsf_tgui_container_t)
592
594
596 which(implement(vsf_tgui_container_t))
597 public_member(
598 vsf_tgui_t* gui_ptr;
599 )
600)
601
603
604
606 VSF_TGUI_CONTROL_REFRESHED_BY_PARENT = 0,
607 VSF_TGUI_CONTROL_REFRESHED_DIRECTLY_BY_USER
609
611typedef fsm_rt_t vsf_tgui_v_method_render_t(vsf_tgui_t* gui_ptr,
613 vsf_tgui_region_t* ptDirtyRegion,
615
617
618typedef struct i_tgui_v_vtable_t{
625
631
632#if VSF_TGUI_CFG_SUPPORT_TIMER == ENABLED
633declare_class(vsf_tgui_timer_t)
634
635def_class(vsf_tgui_timer_t,
636
637 private_member(
638 implement(vsf_callback_timer_t)
639 const vsf_tgui_control_t *target_ptr;
640 )
641
642 union {
643 public_member(
645 uint32_t : 1;
647 uint32_t bEnabled : 1;
649 private_member(
650 struct {
654 uint32_t bEnabled : 1;
655 }Status;
657 };
658)
659end_def_class(vsf_tgui_timer);
660
661#endif
662/*============================ GLOBAL VARIABLES ==============================*/
663/*============================ PROTOTYPES ====================================*/
664#if VSF_TGUI_CFG_SUPPORT_TIMER == ENABLED
665extern
666void vsf_tgui_timer_init( vsf_tgui_timer_t *ptTimer,
668
669extern
670void vsf_tgui_timer_enable(vsf_tgui_timer_t *ptTimer);
671
672extern
673void vsf_tgui_timer_disable(vsf_tgui_timer_t *ptTimer);
674
675extern
676bool vsf_tgui_timer_is_working(vsf_tgui_timer_t *ptTimer);
677#endif
678/*----------------------------------------------------------------------------*
679 * Region *
680 *----------------------------------------------------------------------------*/
681extern
684
685extern
688
689extern
690bool vsf_tgui_control_is_in_range( const vsf_tgui_region_t *region_ptr,
691 const vsf_tgui_location_t *ptLocation);
692
703extern
707 vsf_tgui_location_t *ptLocation);
708
709extern
712 vsf_tgui_region_t* ptRegionBuffer);
713
714extern
717 vsf_tgui_location_t* ptOffset);
718
733extern
736 vsf_tgui_region_t *region_ptr);
737
738extern
741 const vsf_tgui_region_t *ptParentDirtyRegion,
742 const vsf_tgui_control_t *ptPrivate,
743 vsf_tgui_region_t *ptNewDirtyRegionBuffer);
744
745
746
753extern
755 vsf_tgui_region_t* ptRegionBuffer);
756
757extern
760 vsf_tgui_region_t *ptAbsoluteRegion);
761
762extern
764 const vsf_tgui_location_t *ptLocation);
765
766
767/*----------------------------------------------------------------------------*
768 * Status and Attributes *
769 *----------------------------------------------------------------------------*/
770
777extern
779 bool is_control_transparent);
780
781extern
783
784
785extern
787 vsf_tgui_status_t Status);
788
789extern
791
792extern
795
796extern
798 const vsf_tgui_container_t *container_ptr);
799
800
801/*----------------------------------------------------------------------------*
802 * Methods and Others *
803 *----------------------------------------------------------------------------*/
804extern
807
810
812
813#if VSF_TGUI_CFG_REFRESH_SCHEME != VSF_TGUI_REFRESH_SCHEME_NONE
814extern
815bool vsf_tgui_control_refresh( const vsf_tgui_control_t *control_ptr,
816 const vsf_tgui_region_t *region_ptr);
817#endif
818
819extern
821 vsf_tgui_evt_t event);
822
823extern
825
826extern
828
829extern
831
832extern
835
836extern
837fsm_rt_t vsf_tgui_container_msg_handler(vsf_tgui_container_t* node_ptr,
839
840extern
843 const i_tgui_control_methods_t* ptMethods);
844
845extern
847 const vsf_tgui_evt_t* event_ptr);
848
849extern
851
852extern
853fsm_rt_t vk_tgui_container_init(vsf_tgui_container_t *container_ptr);
854
855extern
857
858extern
859fsm_rt_t vk_tgui_container_update(vsf_tgui_container_t* container_ptr);
860
861#endif
862/* 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:626
vsf_tgui_control_method_t * Init
Definition vsf_tgui_control.h:628
vsf_tgui_control_method_t * Update
Definition vsf_tgui_control.h:629
i_tgui_v_vtable_t tView
Definition vsf_tgui_control.h:627
Definition vsf_tgui_control.h:618
vsf_tgui_v_method_render_t * Render
Definition vsf_tgui_control.h:621
vsf_tgui_v_method_t * Init
Definition vsf_tgui_control.h:619
vsf_tgui_v_method_t * Update
Definition vsf_tgui_control.h:623
vsf_tgui_v_method_t * Depose
Definition vsf_tgui_control.h:620
vsf_tgui_v_method_render_t * ContainerPostRender
Definition vsf_tgui_control.h:622
Definition vsf_tgui_control.h:445
uint16_t u10EvtMask
0 means no mask
Definition vsf_tgui_control.h:448
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:446
Definition vsf_tgui_common.h:265
Definition vsf_tgui_control.h:472
int8_t chLeft
Definition vsf_tgui_control.h:473
int8_t chTop
Definition vsf_tgui_control.h:474
int8_t chBottom
Definition vsf_tgui_control.h:476
int8_t chRight
Definition vsf_tgui_control.h:475
Definition vsf_tgui_common.h:552
Definition vsf_tgui_common.h:275
Definition vsf_tgui_common.h:270
Definition vsf_tgui_control.h:464
Definition vsf_tgui_common.h:585
Definition vsf_tgui_control.h:408
uint8_t bIsEnabled
Definition vsf_tgui_control.h:414
uint8_t chStatus
Definition vsf_tgui_control.h:409
uint8_t __skip_render_frame
Definition vsf_tgui_control.h:427
uint8_t bIsHideContentInsideContainer
Definition vsf_tgui_control.h:417
uint8_t __is_the_first_node_for_refresh
Definition vsf_tgui_control.h:424
uint8_t bIsVisible
Definition vsf_tgui_control.h:415
uint8_t bIsInitialised
Definition vsf_tgui_control.h:413
struct vsf_tgui_status_t::@138 Values
uint8_t bIsTransparent
Definition vsf_tgui_control.h:418
uint8_t __does_contain_builtin_structure
Definition vsf_tgui_control.h:425
uint8_t bIsActive
Definition vsf_tgui_control.h:416
uint8_t __skip_render
Definition vsf_tgui_control.h:426
Definition vsf_tgui_common.h:438
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:118
#define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_PADDING
Definition vsf_tgui_cfg.h:87
vsf_tgui_align_mode_t
Definition vsf_tgui_common.h:281
vsf_tgui_anchor_mode_t
Definition vsf_tgui_common.h:326
vsf_tgui_dock_mode_t
Definition vsf_tgui_common.h:314
struct vsf_tgui_control_t vsf_tgui_control_t
Definition vsf_tgui_common.h:549
struct vsf_tgui_root_container_t vsf_tgui_root_container_t
Definition vsf_tgui_common.h:550
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:656
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:611
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:616
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:586
which(union { inherit(vsf_msgt_container_t) vsf_tgui_control_t };vsf_tgui_v_container_t) implement_ex(struct
Definition vsf_tgui_control.h:562
uint32_t u29Interval
Definition vsf_tgui_control.h:648
fsm_rt_t vsf_tgui_v_method_t(vsf_tgui_t *gui_ptr, vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.h:610
uint32_t bEnabled
Definition vsf_tgui_control.h:648
uint32_t bIsRepeat
Definition vsf_tgui_control.h:648
fsm_rt_t vsf_tgui_controal_fsm_t(vsf_tgui_control_t *node_ptr, vsf_tgui_msg_t *ptMSG)
Definition vsf_tgui_control.h:441
declare_class(vsf_tgui_control_t) typedef struct vsf_tgui_control_subcall_t
Definition vsf_tgui_control.h:433
vsf_tgui_control_refresh_mode_t
Definition vsf_tgui_control.h:608
uint8_t chVisibleItemCount
Definition vsf_tgui_control.h:577
vsf_tgui_control_subcall_t
Definition vsf_tgui_control.h:439
which(vsf_tgui_control_t vsf_tgui_v_label_t) public vsf_tgui_msg_t * ptMSG
Definition vsf_tgui_label.h:157
const vsf_tgui_control_t * control_ptr
Definition vsf_tgui_scguiv_port.h:87