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 ======================================*/
40
46#if defined(__VSF_TGUI_CONTROLS_CONTROL_CLASS_IMPLEMENT)
47# define __PLOOC_CLASS_IMPLEMENT__
48# undef __VSF_TGUI_CONTROLS_CONTROL_CLASS_IMPLEMENT
49#elif defined(__VSF_TGUI_CONTROLS_CONTROL_CLASS_INHERIT)
50# define __PLOOC_CLASS_INHERIT__
51# undef __VSF_TGUI_CONTROLS_CONTROL_CLASS_INHERIT
52#endif
53
54#include "utilities/ooc_class.h"
55
56/*============================ MACROS ========================================*/
57#define __VSF_TGUI_INTERFACE_CONTROLS_CONTROL { \
58 .msg_handler = { \
59 VSF_MSGT_NODE_HANDLER_TYPE_FSM, \
60 (vsf_msgt_method_fsm_t *)&vsf_tgui_control_msg_handler, \
61 }, \
62 .Status = (vsf_msgt_method_status_t *) \
63 &vsf_tgui_control_status_get, \
64 .Shoot = (vsf_msgt_method_shoot_t *)&vsf_tgui_control_shoot, \
65 }
66
67#define __VSF_TGUI_INTERFACE_CONTROLS_CONTAINER { \
68 .msg_handler = { \
69 VSF_MSGT_NODE_HANDLER_TYPE_FSM, \
70 (vsf_msgt_method_fsm_t *)&vsf_tgui_container_msg_handler, \
71 }, \
72 .Status = (vsf_msgt_method_status_t *) \
73 &vsf_tgui_control_status_get, \
74 .Shoot = (vsf_msgt_method_shoot_t *)&vsf_tgui_control_shoot, \
75 }
76
77
78#define VSF_TGUI_CTRL_STATUS_INITIALISED VSF_BIT(0)
79#define VSF_TGUI_CTRL_STATUS_ENABLED VSF_BIT(1)
80#define VSF_TGUI_CTRL_STATUS_VISIBLE VSF_BIT(2)
81#define VSF_TGUI_CTRL_STATUS_ACTIVE VSF_BIT(3)
82#define VSF_TGUI_CTRL_STATUS_HIDE_CONTAINER_CONTENT VSF_BIT(4)
83
84/*============================ MACROFIED FUNCTIONS ===========================*/
85
86#if VSF_TGUI_CFG_SUPPORT_NAME_STRING == ENABLED
87# define ____tgui_name_string_tag(__name, __type) \
88 .node_name_ptr = "["#__type"]["#__name"]",
89#else
90# define ____tgui_name_string_tag(__name, __type)
91#endif
92
93#define __tgui_name_string_tag(__name, __type) \
94 ____tgui_name_string_tag(__name, __type)
95
96#if VSF_MSG_TREE_CFG_SUPPORT_DUAL_LIST == ENABLED
97# define ____tgui_node_list_init(__name, __parent_addr, __previous, __next) \
98 .Offset = { \
99 .previous = (intptr_t)&((__parent_addr)->__name) \
100 - (intptr_t)&((__parent_addr)->__previous), \
101 .next = (intptr_t)&((__parent_addr)->__next) \
102 - (intptr_t)&((__parent_addr)->__name), \
103 },
104#else
105# define ____tgui_node_list_init(__name, __parent_addr, __previous, __next) \
106 .Offset = { \
107 .next = (intptr_t)&((__parent_addr)->__next) \
108 - (intptr_t)&((__parent_addr)->__name), \
109 },
110#endif
111
112
113#define __tgui_node_list_init(__name, __parent_addr, __previous, __next) \
114 ____tgui_node_list_init(__name, __parent_addr, __previous, __next)
115
116#define __tgui_control_base( __NAME, \
117 __ID, \
118 __TYPE, \
119 __PARENT_ADDR, \
120 __PREVIOUS, \
121 __NEXT, \
122 ...) \
123 .__NAME = { \
124 .parent_ptr = (vsf_msgt_container_t *) \
125 &(((__TYPE *)(__PARENT_ADDR))->use_as__vsf_msgt_node_t), \
126 .id = (__ID), \
127 __tgui_node_list_init(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT)\
128 __tgui_name_string_tag(__NAME, __TYPE) \
129 .bIsEnabled = true, \
130 .bIsVisible = true, \
131 VSF_TGUI_V_CONTROL_STATIC_INIT_DEFAULT \
132 __VA_ARGS__ \
133 VSF_TGUI_V_CONTROL_STATIC_INIT_OVERRIDE \
134 }
135
136#define __tgui_control_base_const( __NAME, \
137 __ID, \
138 __TYPE, \
139 __PARENT_ADDR, \
140 __PREVIOUS, \
141 __NEXT, \
142 ...) \
143 .__NAME = (const __TYPE) { \
144 .parent_ptr = (vsf_msgt_container_t *) \
145 &((__PARENT_ADDR)->use_as__vsf_msgt_node_t), \
146 .id = (__ID), \
147 __tgui_node_list_init(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT)\
148 __tgui_name_string_tag(__NAME, __TYPE) \
149 .bIsEnabled = true, \
150 .bIsVisible = true, \
151 VSF_TGUI_V_CONTROL_STATIC_INIT_DEFAULT \
152 __VA_ARGS__ \
153 VSF_TGUI_V_CONTROL_STATIC_INIT_OVERRIDE \
154 }
155
156#define __describe_tgui_control_base( __NAME, \
157 __ID, \
158 __TYPE, \
159 ...) \
160 static const __TYPE __NAME = { \
161 .id = (__ID), \
162 __tgui_name_string_tag(__VAR, __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
171#define __describe_tgui_container_base( __NAME, \
172 __ID, \
173 __TYPE, \
174 ...) \
175 __describe_tgui_control_base( \
176 __NAME, \
177 __ID, \
178 __TYPE, \
179 .is_container = true, \
180 .ContainerAttribute.bIsAutoSize = true, \
181 .node_ptr = \
182 (vsf_msgt_node_t*) \
183 &((*(__TYPE *)0).__TYPE##_FirstNode), \
184 VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
185 __VA_ARGS__ \
186 VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE \
187 )
188
189#define describe_tgui_container_base( __NAME, \
190 __ID, \
191 __TYPE, \
192 ...) \
193 __describe_tgui_container_base( __NAME, \
194 __ID, \
195 __TYPE, \
196 __VA_ARGS__)
197
198#define tgui_control_base( __NAME, \
199 __ID, \
200 __TYPE, \
201 __PARENT_ADDR, \
202 __PREVIOUS, \
203 __NEXT, \
204 ...) \
205 __tgui_control_base( \
206 __NAME, \
207 (__ID), \
208 __TYPE, \
209 (__PARENT_ADDR), \
210 __PREVIOUS, \
211 __NEXT, \
212 __VA_ARGS__)
213
214#define tgui_control_base_const( __NAME, \
215 __ID, \
216 __TYPE, \
217 __PARENT_ADDR, \
218 __PREVIOUS, \
219 __NEXT, \
220 ...) \
221 __tgui_control_base_const( \
222 __NAME, \
223 (__ID), \
224 __TYPE, \
225 (__PARENT_ADDR), \
226 __PREVIOUS, \
227 __NEXT, \
228 __VA_ARGS__)
229
230
231#define describe_tgui_control_base( __NAME, \
232 __ID, \
233 __TYPE, \
234 ...) \
235 __describe_tgui_control_base( __NAME, \
236 __ID, \
237 __TYPE, \
238 __VA_ARGS__)
239
240
241#define __tgui_control(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
242 tgui_control_base( __NAME, \
243 VSF_TGUI_COMPONENT_ID_CONTROL, \
244 vsf_tgui_control_t, \
245 (__PARENT_ADDR), \
246 __PREVIOUS, \
247 __NEXT, \
248 __VA_ARGS__)
249
250#define tgui_control(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
251 __tgui_control( __NAME, \
252 (__PARENT_ADDR), \
253 __PREVIOUS, \
254 __NEXT, \
255 __VA_ARGS__)
256
257#define __tgui_control_const(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
258 tgui_control_base_const(__NAME, \
259 VSF_TGUI_COMPONENT_ID_CONTROL, \
260 vsf_tgui_control_t, \
261 (__PARENT_ADDR), \
262 __PREVIOUS, \
263 __NEXT, \
264 __VA_ARGS__)
265
266#define tgui_control_const(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
267 __tgui_control_const( __NAME, \
268 (__PARENT_ADDR), \
269 __PREVIOUS, \
270 __NEXT, \
271 __VA_ARGS__)
272
273#define __use_tgui_container(__NAME, ...) \
274 struct { \
275 implement(vsf_tgui_container_t) \
276 union { \
277 vsf_msgt_node_t __NAME##_FirstNode ; \
278 struct { \
279 __VA_ARGS__; \
280 }; \
281 }; \
282 } __NAME;
283
284#define use_tgui_container(__NAME, ...) __use_tgui_container(__NAME, __VA_ARGS__)
285
286
287
288#define __tgui_container_base( __NAME, \
289 __ID, \
290 __TYPE, \
291 __PARENT_ADDR, \
292 __PREVIOUS, \
293 __NEXT, \
294 ...) \
295 tgui_control_base( \
296 __NAME, \
297 __ID, \
298 __TYPE, \
299 (__PARENT_ADDR), \
300 __PREVIOUS, \
301 __NEXT, \
302 .is_container = true, \
303 .ContainerAttribute.bIsAutoSize = true, \
304 .node_ptr = \
305 (vsf_msgt_node_t*) \
306 &((__PARENT_ADDR)->__NAME.__NAME##_FirstNode), \
307 VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
308 __VA_ARGS__ \
309 VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE \
310 )
311
312#define tgui_container_base(__NAME, \
313 __ID, \
314 __TYPE, \
315 __PARENT_ADDR, \
316 __PREVIOUS, \
317 __NEXT, \
318 ...) \
319 __tgui_container_base( __NAME, \
320 __ID, \
321 __TYPE, \
322 __PARENT_ADDR, \
323 __PREVIOUS, \
324 __NEXT, \
325 __VA_ARGS__)
326
327#define __tgui_container_base_const(__NAME, \
328 __ID, \
329 __TYPE, \
330 __PARENT_ADDR, \
331 __PREVIOUS, \
332 __NEXT, \
333 ...) \
334 tgui_control_base_const( __NAME, \
335 __ID, \
336 __TYPE, \
337 (__PARENT_ADDR), \
338 __PREVIOUS, \
339 __NEXT, \
340 .is_container = true, \
341 .ContainerAttribute.bIsAutoSize = true, \
342 .node_ptr = \
343 (vsf_msgt_node_t*) \
344 &((__PARENT_ADDR)->__NAME.__NAME##_FirstNode), \
345 VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
346 __VA_ARGS__ \
347 VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE \
348 )
349
350#define tgui_container_base_const(__NAME, \
351 __ID, \
352 __TYPE, \
353 __PARENT_ADDR, \
354 __PREVIOUS, \
355 __NEXT, \
356 ...) \
357 __tgui_container_base_const(__NAME, \
358 __ID, \
359 __TYPE, \
360 __PARENT_ADDR, \
361 __PREVIOUS, \
362 __NEXT, \
363 __VA_ARGS__)
364
365# define __tgui_container( __NAME, \
366 __PARENT_ADDR, \
367 __PREVIOUS, \
368 __NEXT, ...) \
369 tgui_container_base(__NAME, \
370 VSF_TGUI_COMPONENT_ID_CONTAINER, \
371 vsf_tgui_container_t, \
372 (__PARENT_ADDR), \
373 __PREVIOUS, \
374 __NEXT, \
375 __VA_ARGS__)
376
377
378#define tgui_container( __NAME, \
379 __PARENT_ADDR, \
380 __PREVIOUS, \
381 __NEXT, \
382 ...) \
383 __tgui_container(__NAME, \
384 (__PARENT_ADDR), \
385 __PREVIOUS, \
386 __NEXT, \
387 __VA_ARGS__)
388
389
390/*============================ TYPES =========================================*/
391
392
393
394typedef union vsf_tgui_status_t {
396 struct {
407
416
418
419
420typedef struct vsf_tgui_control_subcall_t {
422 vsf_tgui_control_t *control_ptr;
424
426 vsf_tgui_control_t* node_ptr,
428
433
435 union {
437 vsf_eda_t* ptEDA;
439 },
440 fn
441 )
443 const char *handler_name_ptr;
444#endif
445
447
449 implement(vsf_msgt_msg_t)
452
453
454#if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_PADDING == ENABLED ||\
455 VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_MARGIN == ENABLED
456typedef struct vsf_tgui_margin_t {
462#endif
463
465
466 public_member(
467 implement(vsf_msgt_node_t)
468 vsf_msgt_node_t* node_ptr; /* do not use if unless it is a container*/
469
470 implement_ex(vsf_tgui_region_t, tRegion)
471
472 #if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ANCHOR == ENABLED
474 #endif
475
476 #if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_DOCK == ENABLED
478 #endif
479
480 #if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_MARGIN == ENABLED
481 vsf_tgui_margin_t tMargin;
482 #endif
483
484 #if VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_ALIGN == ENABLED
485 struct {
486 vsf_tgui_control_t *ptAlignTo;
487
488 /* \note Only following mode supported:
489 VSF_TGUI_ALIGN_LEFT = VSF_BIT(0),
490 VSF_TGUI_ALIGN_RIGHT = VSF_BIT(1),
491 VSF_TGUI_ALIGN_TOP = VSF_BIT(2),
492 VSF_TGUI_ALIGN_BOTTOM = VSF_BIT(3),
493 */
495 } tAlign;
496 #endif
497
498 struct {
499 const vsf_tgui_tile_t* ptTile;
501 } tBackground;
502
503 struct {
504 const vsf_tgui_user_evt_handler *ptItems;
505 #if VSF_TGUI_CFG_SUPPORT_NAME_STRING == ENABLED
506 const char *name_ptr;
507 #endif
508 uint8_t chCount;
509 uint8_t chState;
510 uint8_t chIndex;
511 } tMSGMap;
512 )
513
514 union {
515 protected_member(
516 implement_ex(vsf_tgui_status_t, Status)
517 )
518 struct {
521 uint8_t : 1;
522 uint8_t bIsEnabled : 1;
523 uint8_t bIsVisible : 1;
524 uint8_t : 1;
525 uint8_t bIsHideContentInsideContainer : 1;
526 uint8_t is_control_transparent : 1;
527 uint8_t dummy_bits : 2;
529 };
530 };
531
532 implement(vsf_tgui_v_control_t)
533)
535
536
537declare_class(vsf_tgui_container_t)
538
539def_class(vsf_tgui_container_t,
541 union {
542 inherit(vsf_msgt_container_t)
543 implement(vsf_tgui_control_t)
544 };
545 implement(vsf_tgui_v_container_t)
546 )
547
548 implement_ex(
549 struct {
550 /* vsf_tgui_container_type_t */
551 uint8_t u5Type : 5;
552 uint8_t bIsAutoSize : 1;
553 uint8_t is_forced_to_refresh_whole_background : 1;
554 uint8_t : 1;
555 },
556 ContainerAttribute
557 )
558
559 protected_member(
562
565#endif
566
567
568)
569end_def_class(vsf_tgui_container_t)
570
572
574 which(implement(vsf_tgui_container_t))
575 public_member(
576 vsf_tgui_t* gui_ptr;
577 )
578)
579
581
582
584 VSF_TGUI_CONTROL_REFRESHED_BY_PARENT = 0,
585 VSF_TGUI_CONTROL_REFRESHED_DIRECTLY_BY_USER
587
590 vsf_tgui_region_t* ptDirtyRegion,
592
593typedef struct i_tgui_v_vtable_t{
600
606
607#if VSF_TGUI_CFG_SUPPORT_TIMER == ENABLED
608declare_class(vsf_tgui_timer_t)
609
610def_class(vsf_tgui_timer_t,
611
612 private_member(
613 implement(vsf_callback_timer_t)
614 const vsf_tgui_control_t *target_ptr;
615 )
616
617 union {
618 public_member(
620 uint32_t : 1;
622 uint32_t bEnabled : 1;
624 private_member(
625 struct {
629 uint32_t bEnabled : 1;
630 }Status;
632 };
633)
634end_def_class(vsf_tgui_timer);
635
636#endif
637/*============================ GLOBAL VARIABLES ==============================*/
638/*============================ PROTOTYPES ====================================*/
639#if VSF_TGUI_CFG_SUPPORT_TIMER == ENABLED
640extern
641void vsf_tgui_timer_init( vsf_tgui_timer_t *ptTimer,
642 const vsf_tgui_control_t *control_ptr);
643
644extern
645void vsf_tgui_timer_enable(vsf_tgui_timer_t *ptTimer);
646
647extern
648void vsf_tgui_timer_disable(vsf_tgui_timer_t *ptTimer);
649
650extern
651bool vsf_tgui_timer_is_working(vsf_tgui_timer_t *ptTimer);
652#endif
653/*----------------------------------------------------------------------------*
654 * Region *
655 *----------------------------------------------------------------------------*/
656extern
658 const vsf_tgui_control_t* control_ptr);
659
660extern
662 const vsf_tgui_control_t* control_ptr);
663
664extern
665bool vsf_tgui_control_is_in_range( const vsf_tgui_region_t *region_ptr,
666 const vsf_tgui_location_t *ptLocation);
667
677extern
679 const vsf_tgui_control_t *control_ptr,
680 vsf_tgui_location_t *ptLocation);
681
682extern
684 const vsf_tgui_control_t* control_ptr,
685 vsf_tgui_region_t* ptRegionBuffer);
686
687extern
689 const vsf_tgui_control_t* control_ptr,
690 vsf_tgui_location_t* ptOffset);
691
706extern
708 const vsf_tgui_control_t *control_ptr,
709 vsf_tgui_region_t *region_ptr);
710
711extern
714 const vsf_tgui_region_t *ptParentDirtyRegion,
715 const vsf_tgui_control_t *ptPrivate,
716 vsf_tgui_region_t *ptNewDirtyRegionBuffer);
717
718
719
726extern
728 vsf_tgui_region_t* ptRegionBuffer);
729
730extern
732 const vsf_tgui_control_t* control_ptr,
733 vsf_tgui_region_t *ptAbsoluteRegion);
734
735extern
736bool vsf_tgui_control_shoot( const vsf_tgui_control_t* control_ptr,
737 const vsf_tgui_location_t *ptLocation);
738
739
740/*----------------------------------------------------------------------------*
741 * Status and Attributes *
742 *----------------------------------------------------------------------------*/
743
750extern
752 bool is_control_transparent);
753
754extern
756
757
758extern
760 vsf_tgui_status_t Status);
761
762extern
764
765extern
767 const vsf_tgui_control_t* control_ptr);
768
769extern
771 const vsf_tgui_container_t *container_ptr);
772
773
774/*----------------------------------------------------------------------------*
775 * Methods and Others *
776 *----------------------------------------------------------------------------*/
777extern
780
782 const vsf_tgui_control_t* control_ptr);
783
784#if VSF_TGUI_CFG_REFRESH_SCHEME != VSF_TGUI_REFRESH_SCHEME_NONE
785extern
786bool vsf_tgui_control_refresh( const vsf_tgui_control_t *control_ptr,
787 const vsf_tgui_region_t *region_ptr);
788#endif
789
790extern
792 vsf_tgui_evt_t event);
793
794extern
795bool vsf_tgui_control_update(const vsf_tgui_control_t* control_ptr);
796
797extern
798bool vsf_tgui_control_update_tree(const vsf_tgui_control_t* control_ptr);
799
800extern
801bool vsf_tgui_control_set_active(const vsf_tgui_control_t* control_ptr);
802
803extern
806
807extern
808fsm_rt_t vsf_tgui_container_msg_handler(vsf_tgui_container_t* node_ptr,
810
811extern
814 const i_tgui_control_methods_t* ptMethods);
815
816extern
818 const vsf_tgui_evt_t* event_ptr);
819
820extern
822
823extern
824fsm_rt_t vk_tgui_container_init(vsf_tgui_container_t *container_ptr);
825
826extern
828
829extern
830fsm_rt_t vk_tgui_container_update(vsf_tgui_container_t* container_ptr);
831
832#endif
833/* EOF */
#define ENABLED
Definition __type.h:28
Definition vsf_eda.h:848
Definition vsf_eda.h:766
unsigned short uint16_t
Definition stdint.h:7
unsigned char uint_fast8_t
Definition stdint.h:23
unsigned uint32_t
Definition stdint.h:9
unsigned char uint8_t
Definition stdint.h:5
signed char int8_t
Definition stdint.h:4
Definition vsf_tgui_control.h:601
vsf_tgui_method_t * Update
Definition vsf_tgui_control.h:604
vsf_tgui_method_t * Init
Definition vsf_tgui_control.h:603
i_tgui_v_vtable_t tView
Definition vsf_tgui_control.h:602
Definition vsf_tgui_control.h:593
vsf_tgui_v_method_render_t * Render
Definition vsf_tgui_control.h:596
vsf_tgui_method_t * Init
Definition vsf_tgui_control.h:594
vsf_tgui_method_t * Depose
Definition vsf_tgui_control.h:595
vsf_tgui_method_t * Update
Definition vsf_tgui_control.h:598
vsf_tgui_v_method_render_t * ContainerPostRender
Definition vsf_tgui_control.h:597
Definition vsf_tgui_control.h:429
uint16_t u10EvtMask
0 means no mask
Definition vsf_tgui_control.h:432
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:430
Definition vsf_tgui_common.h:226
Definition vsf_tgui_control.h:456
int8_t chLeft
Definition vsf_tgui_control.h:457
int8_t chTop
Definition vsf_tgui_control.h:458
int8_t chBottom
Definition vsf_tgui_control.h:460
int8_t chRight
Definition vsf_tgui_control.h:459
Definition vsf_tgui_common.h:509
Definition vsf_tgui_common.h:236
Definition vsf_tgui_common.h:231
Definition vsf_tgui_control.h:448
Definition vsf_tgui_common.h:539
Definition vsf_tgui_control.h:394
uint8_t bIsEnabled
Definition vsf_tgui_control.h:400
uint8_t chStatus
Definition vsf_tgui_control.h:395
uint8_t bIsHideContentInsideContainer
Definition vsf_tgui_control.h:403
uint8_t __is_the_first_node_for_refresh
Definition vsf_tgui_control.h:410
uint8_t is_control_transparent
Definition vsf_tgui_control.h:404
uint8_t bIsVisible
Definition vsf_tgui_control.h:401
uint8_t bIsInitialised
Definition vsf_tgui_control.h:399
struct vsf_tgui_status_t::@138 Values
uint8_t __does_contain_builtin_structure
Definition vsf_tgui_control.h:411
uint8_t bIsActive
Definition vsf_tgui_control.h:402
Definition vsf_tgui_common.h:395
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:117
#define VSF_TGUI_CFG_SUPPORT_CONTROL_LAYOUT_PADDING
Definition vsf_tgui_cfg.h:86
vsf_tgui_align_mode_t
Definition vsf_tgui_common.h:242
vsf_tgui_anchor_mode_t
Definition vsf_tgui_common.h:287
vsf_tgui_dock_mode_t
Definition vsf_tgui_common.h:275
struct vsf_tgui_control_t vsf_tgui_control_t
Definition vsf_tgui_common.h:506
struct vsf_tgui_root_container_t vsf_tgui_root_container_t
Definition vsf_tgui_common.h:507
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:282
vsf_tgui_size_t * vsf_tgui_control_get_size(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:226
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:270
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:344
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:1101
bool vsf_tgui_control_is_container(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:447
fsm_rt_t vk_tgui_container_update(vsf_tgui_container_t *container_ptr)
Definition vsf_tgui_control.c:1510
bool vsf_tgui_control_set_active(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:549
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:433
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:316
vsf_tgui_location_t * vsf_tgui_control_get_location(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:221
bool vsf_tgui_control_update(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:503
bool vsf_tgui_control_send_message(const vsf_tgui_control_t *control_ptr, vsf_tgui_evt_t event)
Definition vsf_tgui_control.c:484
bool vsf_tgui_control_set_is_transparent_bit(vsf_tgui_control_t *control_ptr, bool is_control_transparent)
update is_control_transparent bit in control status ! \parame control_ptr target control address !
Definition vsf_tgui_control.c:417
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:574
uint_fast8_t vk_tgui_container_visible_item_get(const vsf_tgui_container_t *container_ptr)
Definition vsf_tgui_control.c:460
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:260
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:1155
bool vsf_tgui_control_shoot(const vsf_tgui_control_t *control_ptr, const vsf_tgui_location_t *ptLocation)
Definition vsf_tgui_control.c:387
fsm_rt_t vk_tgui_control_update(vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:1500
fsm_rt_t vk_tgui_control_init(vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:1515
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:721
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:440
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:360
fsm_rt_t vk_tgui_container_init(vsf_tgui_container_t *container_ptr)
Definition vsf_tgui_control.c:1526
vsf_tgui_control_t * vsf_tgui_control_get_parent(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:453
vsf_tgui_location_t * __vk_tgui_calculate_absolute_location_from_control_location(const vsf_tgui_control_t *control_ptr, vsf_tgui_location_t *ptLocation)
get the absolute location information base on the location information ! of or derived from target co...
Definition vsf_tgui_control.c:193
const vsf_tgui_root_container_t * vk_tgui_control_get_top(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:471
fsm_rt_t vsf_tgui_control_msg_handler(vsf_tgui_control_t *control_ptr, vsf_tgui_msg_t *ptMSG)
Definition vsf_tgui_control.c:1093
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:231
bool vsf_tgui_control_update_tree(const vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.c:517
uint32_t bIsWorking
Definition vsf_tgui_control.h:631
fsm_rt_t vsf_tgui_method_t(vsf_tgui_control_t *control_ptr)
Definition vsf_tgui_control.h:588
struct i_tgui_control_vtable_t i_tgui_control_methods_t
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:564
which(union { inherit(vsf_msgt_container_t) vsf_tgui_control_t };vsf_tgui_v_container_t) implement_ex(struct
Definition vsf_tgui_control.h:540
uint32_t u29Interval
Definition vsf_tgui_control.h:623
fsm_rt_t vsf_tgui_v_method_render_t(vsf_tgui_control_t *control_ptr, vsf_tgui_region_t *ptDirtyRegion, vsf_tgui_control_refresh_mode_t tMode)
Definition vsf_tgui_control.h:589
uint32_t bEnabled
Definition vsf_tgui_control.h:623
uint32_t bIsRepeat
Definition vsf_tgui_control.h:623
fsm_rt_t vsf_tgui_controal_fsm_t(vsf_tgui_control_t *node_ptr, vsf_tgui_msg_t *ptMSG)
Definition vsf_tgui_control.h:425
declare_class(vsf_tgui_control_t) typedef struct vsf_tgui_control_subcall_t
Definition vsf_tgui_control.h:417
vsf_tgui_control_refresh_mode_t
Definition vsf_tgui_control.h:586
uint8_t chVisibleItemCount
Definition vsf_tgui_control.h:555
vsf_tgui_control_subcall_t
Definition vsf_tgui_control.h:423
which(vsf_tgui_control_t vsf_tgui_v_label_t) public vsf_tgui_msg_t * ptMSG
Definition vsf_tgui_label.h:157