1 /**************************************************************************/
2 /* */
3 /* Copyright (c) Microsoft Corporation. All rights reserved. */
4 /* */
5 /* This software is licensed under the Microsoft Software License */
6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */
7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
8 /* and in the root directory of this software. */
9 /* */
10 /**************************************************************************/
11
12
13 /**************************************************************************/
14 /**************************************************************************/
15 /** */
16 /** GUIX Component */
17 /** */
18 /** Text Button Management (Button) */
19 /** */
20 /**************************************************************************/
21
22 #define GX_SOURCE_CODE
23
24
25 /* Include necessary system files. */
26
27 #include "gx_api.h"
28 #include "gx_system.h"
29 #include "gx_display.h"
30 #include "gx_button.h"
31
32 /* Bring in externs for caller checking code. */
33 GX_CALLER_CHECKING_EXTERNS
34 /**************************************************************************/
35 /* */
36 /* FUNCTION RELEASE */
37 /* */
38 /* _gxe_text_button_text_get PORTABLE C */
39 /* 6.1 */
40 /* AUTHOR */
41 /* */
42 /* Kenneth Maxwell, Microsoft Corporation */
43 /* */
44 /* DESCRIPTION */
45 /* */
46 /* This function checks for errors in the text button text get */
47 /* function call. */
48 /* */
49 /* */
50 /* INPUT */
51 /* */
52 /* button Button control block */
53 /* return_text String used in the button */
54 /* */
55 /* OUTPUT */
56 /* */
57 /* status Completion status */
58 /* */
59 /* CALLS */
60 /* */
61 /* _gx_text_button_text_get Actual button text get call */
62 /* */
63 /* CALLED BY */
64 /* */
65 /* Application Code */
66 /* */
67 /* RELEASE HISTORY */
68 /* */
69 /* DATE NAME DESCRIPTION */
70 /* */
71 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
72 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
73 /* resulting in version 6.1 */
74 /* */
75 /**************************************************************************/
76 #if defined(GX_ENABLE_DEPRECATED_STRING_API)
_gxe_text_button_text_get(GX_TEXT_BUTTON * button,GX_CONST GX_CHAR ** return_text)77 UINT _gxe_text_button_text_get(GX_TEXT_BUTTON *button, GX_CONST GX_CHAR **return_text)
78 {
79 UINT status;
80
81 /* Check for appropriate caller. */
82 GX_INIT_AND_THREADS_CALLER_CHECKING
83
84 /* Check for invalid input pointers. */
85 if ((button == GX_NULL) || (return_text == GX_NULL))
86 {
87 return(GX_PTR_ERROR);
88 }
89
90 /* Check for invalid widget. */
91 if (button -> gx_widget_type == 0)
92 {
93 return(GX_INVALID_WIDGET);
94 }
95
96 /* Call the actual text button create function. */
97 status = _gx_text_button_text_get(button, return_text);
98
99 /* Return completion status. */
100 return status;
101 }
102 #endif
103
104 /**************************************************************************/
105 /* */
106 /* FUNCTION RELEASE */
107 /* */
108 /* _gxe_text_button_text_get_ext PORTABLE C */
109 /* 6.1 */
110 /* AUTHOR */
111 /* */
112 /* Kenneth Maxwell, Microsoft Corporation */
113 /* */
114 /* DESCRIPTION */
115 /* */
116 /* This function checks for errors in the text button text get */
117 /* function call. */
118 /* */
119 /* */
120 /* INPUT */
121 /* */
122 /* button Button control block */
123 /* return_text String used in the button */
124 /* */
125 /* OUTPUT */
126 /* */
127 /* status Completion status */
128 /* */
129 /* CALLS */
130 /* */
131 /* _gx_text_button_text_get_ext Actual button text get call */
132 /* */
133 /* CALLED BY */
134 /* */
135 /* Application Code */
136 /* */
137 /* RELEASE HISTORY */
138 /* */
139 /* DATE NAME DESCRIPTION */
140 /* */
141 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
142 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
143 /* resulting in version 6.1 */
144 /* */
145 /**************************************************************************/
_gxe_text_button_text_get_ext(GX_TEXT_BUTTON * button,GX_STRING * return_text)146 UINT _gxe_text_button_text_get_ext(GX_TEXT_BUTTON *button, GX_STRING *return_text)
147 {
148 UINT status;
149
150 /* Check for appropriate caller. */
151 GX_INIT_AND_THREADS_CALLER_CHECKING
152
153 /* Check for invalid input pointers. */
154 if ((button == GX_NULL) || (return_text == GX_NULL))
155 {
156 return(GX_PTR_ERROR);
157 }
158
159 /* Check for invalid widget. */
160 if (button -> gx_widget_type == 0)
161 {
162 return(GX_INVALID_WIDGET);
163 }
164
165 /* Call the actual text button create function. */
166 status = _gx_text_button_text_get_ext(button, return_text);
167
168 /* Return completion status. */
169 return status;
170 }
171
172