VSF Documented
vsf_tgui_label.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_LABEL_H__
36#define __VSF_TGUI_CONTROLS_LABEL_H__
37
38/*============================ INCLUDES ======================================*/
40#include "./vsf_tgui_control.h"
41
47#if defined(__VSF_TGUI_CONTROLS_LABEL_CLASS_IMPLEMENT)
48# define __PLOOC_CLASS_IMPLEMENT__
49# undef __VSF_TGUI_CONTROLS_LABEL_CLASS_IMPLEMENT
50#elif defined(__VSF_TGUI_CONTROLS_LABEL_CLASS_INHERIT)
51# define __PLOOC_CLASS_INHERIT__
52# undef __VSF_TGUI_CONTROLS_LABEL_CLASS_INHERIT
53#endif
54
55#include "utilities/ooc_class.h"
56
57/*============================ MACROS ========================================*/
58
59# define __VSF_TGUI_INTERFACE_CONTROLS_LABEL { \
60 .msg_handler = { \
61 VSF_MSGT_NODE_HANDLER_TYPE_FSM, \
62 (vsf_msgt_method_fsm_t *)&vsf_tgui_label_msg_handler, \
63 }, \
64 .Status = (vsf_msgt_method_status_t *) \
65 &vsf_tgui_control_status_get, \
66 .Shoot = (vsf_msgt_method_shoot_t *)&vsf_tgui_control_shoot, \
67 }
68
69/*============================ MACROFIED FUNCTIONS ===========================*/
70
71#define __tgui_label(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
72 tgui_control_base( __NAME, \
73 VSF_TGUI_COMPONENT_ID_LABEL, \
74 vsf_tgui_label_t, \
75 (__PARENT_ADDR), \
76 __PREVIOUS, \
77 __NEXT, \
78 VSF_TGUI_V_LABEL_STATIC_INIT_DEFAULT \
79 __VA_ARGS__ \
80 VSF_TGUI_V_LABEL_STATIC_INIT_OVERRIDE)
81
82#define tgui_label(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
83 __tgui_label( __NAME, \
84 (__PARENT_ADDR), \
85 __PREVIOUS, \
86 __NEXT, \
87 __VA_ARGS__)
88
89#define __tgui_label_const(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
90 tgui_control_base_const(__NAME, \
91 VSF_TGUI_COMPONENT_ID_LABEL, \
92 vsf_tgui_label_t, \
93 (__PARENT_ADDR), \
94 __PREVIOUS, \
95 __NEXT, \
96 VSF_TGUI_V_LABEL_STATIC_INIT_DEFAULT \
97 __VA_ARGS__ \
98 VSF_TGUI_V_LABEL_STATIC_INIT_OVERRIDE)
99
100#define tgui_label_const(__NAME, __PARENT_ADDR, __PREVIOUS, __NEXT, ...) \
101 __tgui_label_const( __NAME, \
102 (__PARENT_ADDR), \
103 __PREVIOUS, \
104 __NEXT, \
105 __VA_ARGS__)
106
107
108#define __tgui_set_internal_label( __OWNER_ADDR, \
109 __MEMBER, \
110 __PREVIOUS, \
111 __NEXT, ...) \
112 (*__OWNER_ADDR) tgui_label_const ( \
113 __MEMBER, \
114 (__OWNER_ADDR), \
115 __PREVIOUS, \
116 __NEXT, \
117 __VA_ARGS__)
118
119#define tgui_set_internal_label( __OWNER_ADDR, \
120 __MEMBER, \
121 __PREVIOUS, \
122 __NEXT, ...) \
123 __tgui_set_internal_label( (__OWNER_ADDR), \
124 __MEMBER, \
125 __PREVIOUS, \
126 __NEXT, \
127 __VA_ARGS__)
128
129
130#define tgui_set_priv_label( __OWNER_ADDR , \
131 __MEMBER, \
132 ...) \
133 __tgui_set_internal_label( (__OWNER_ADDR), \
134 __MEMBER, \
135 __MEMBER, __MEMBER, \
136 __VA_ARGS__)
137
138/*============================ TYPES =========================================*/
139declare_class(vsf_tgui_label_t)
140
141def_class(vsf_tgui_label_t,
142 which(
143 implement(vsf_tgui_control_t)
144 implement(vsf_tgui_v_label_t)
145 )
146
147 public_member(
148 implement_ex(vsf_tgui_text_info_t, tLabel);
149 )
150)
151end_def_class(vsf_tgui_label_t)
152
153/*============================ GLOBAL VARIABLES ==============================*/
154/*============================ PROTOTYPES ====================================*/
155extern
156fsm_rt_t vsf_tgui_label_msg_handler(vsf_tgui_label_t* control_ptr,
158extern
159fsm_rt_t vk_tgui_label_init(vsf_tgui_label_t* ptLabel);
160
161extern
162fsm_rt_t vk_tgui_label_update(vsf_tgui_label_t* ptLabel);
163
164#endif
165/* EOF */
166
Definition vsf_tgui_common.h:509
Definition vsf_tgui_common.h:326
fsm_rt_t
Definition vsf_fsm.h:315
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
struct vsf_tgui_control_t vsf_tgui_control_t
Definition vsf_tgui_common.h:506
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
fsm_rt_t vsf_tgui_label_msg_handler(vsf_tgui_label_t *control_ptr, vsf_tgui_msg_t *ptMSG)
Definition vsf_tgui_label.c:67
fsm_rt_t vk_tgui_label_update(vsf_tgui_label_t *ptLabel)
Definition vsf_tgui_label.c:75
which(vsf_tgui_control_t vsf_tgui_v_label_t) public vsf_tgui_msg_t * ptMSG
Definition vsf_tgui_label.h:157
declare_class(vsf_tgui_label_t) def_class(vsf_tgui_label_t
which(vsf_tgui_control_t vsf_tgui_v_label_t) public end_def_class(vsf_tgui_label_t) extern fsm_rt_t vsf_tgui_label_msg_handler(vsf_tgui_label_t *control_ptr
fsm_rt_t vk_tgui_label_init(vsf_tgui_label_t *ptLabel)
Definition vsf_tgui_label.c:106