1 |
|
|
/*************************************************************************** |
2 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
3 |
|
|
* |
4 |
|
|
* This program and the accompanying materials are made available under the |
5 |
|
|
* terms of the MIT License which is available at |
6 |
|
|
* https://opensource.org/licenses/MIT. |
7 |
|
|
* |
8 |
|
|
* SPDX-License-Identifier: MIT |
9 |
|
|
**************************************************************************/ |
10 |
|
|
|
11 |
|
|
|
12 |
|
|
/**************************************************************************/ |
13 |
|
|
/**************************************************************************/ |
14 |
|
|
/** */ |
15 |
|
|
/** GUIX Component */ |
16 |
|
|
/** */ |
17 |
|
|
/** System Management (System) */ |
18 |
|
|
/** */ |
19 |
|
|
/**************************************************************************/ |
20 |
|
|
|
21 |
|
|
#define GX_SOURCE_CODE |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
/* Include necessary system files. */ |
25 |
|
|
|
26 |
|
|
#include "gx_api.h" |
27 |
|
|
#include "gx_display.h" |
28 |
|
|
|
29 |
|
|
/**************************************************************************/ |
30 |
|
|
/* */ |
31 |
|
|
/* FUNCTION RELEASE */ |
32 |
|
|
/* */ |
33 |
|
|
/* _gx_display_string_table_get PORTABLE C */ |
34 |
|
|
/* 6.1 */ |
35 |
|
|
/* AUTHOR */ |
36 |
|
|
/* */ |
37 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
38 |
|
|
/* */ |
39 |
|
|
/* DESCRIPTION (Deprecated) */ |
40 |
|
|
/* */ |
41 |
|
|
/* This function returns a pointer to the display string table. */ |
42 |
|
|
/* */ |
43 |
|
|
/* INPUT */ |
44 |
|
|
/* */ |
45 |
|
|
/* display Pointer to display instance. */ |
46 |
|
|
/* language The language the string */ |
47 |
|
|
/* table is associated with */ |
48 |
|
|
/* get_table Pointer to string table */ |
49 |
|
|
/* get_size Number of strings in table */ |
50 |
|
|
/* */ |
51 |
|
|
/* OUTPUT */ |
52 |
|
|
/* */ |
53 |
|
|
/* status Completion status */ |
54 |
|
|
/* */ |
55 |
|
|
/* CALLS */ |
56 |
|
|
/* */ |
57 |
|
|
/* None */ |
58 |
|
|
/* */ |
59 |
|
|
/* CALLED BY */ |
60 |
|
|
/* */ |
61 |
|
|
/* Application Code */ |
62 |
|
|
/* */ |
63 |
|
|
/* RELEASE HISTORY */ |
64 |
|
|
/* */ |
65 |
|
|
/* DATE NAME DESCRIPTION */ |
66 |
|
|
/* */ |
67 |
|
|
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ |
68 |
|
|
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */ |
69 |
|
|
/* resulting in version 6.1 */ |
70 |
|
|
/* */ |
71 |
|
|
/**************************************************************************/ |
72 |
|
|
#if defined(GX_ENABLE_DEPRECATED_STRING_API) |
73 |
|
5 |
UINT _gx_display_string_table_get(GX_DISPLAY *display, GX_UBYTE language, GX_CHAR ***put_table, UINT *put_size) |
74 |
|
|
{ |
75 |
✓✓ |
5 |
if(put_table) |
76 |
|
|
{ |
77 |
✓✓ |
4 |
if(display -> gx_display_language_table_deprecated) |
78 |
|
|
{ |
79 |
|
2 |
*put_table = (GX_CHAR **)display -> gx_display_language_table_deprecated[language]; |
80 |
|
|
} |
81 |
|
|
else |
82 |
|
|
{ |
83 |
|
2 |
*put_table = GX_NULL; |
84 |
|
|
} |
85 |
|
|
} |
86 |
|
|
|
87 |
✓✓ |
5 |
if(put_size) |
88 |
|
|
{ |
89 |
|
4 |
*put_size = display -> gx_display_string_table_size; |
90 |
|
|
} |
91 |
|
|
|
92 |
|
5 |
return GX_SUCCESS; |
93 |
|
|
} |
94 |
|
|
#endif |
95 |
|
|
|
96 |
|
|
/**************************************************************************/ |
97 |
|
|
/* */ |
98 |
|
|
/* FUNCTION RELEASE */ |
99 |
|
|
/* */ |
100 |
|
|
/* _gx_display_string_table_get_ext PORTABLE C */ |
101 |
|
|
/* 6.1 */ |
102 |
|
|
/* AUTHOR */ |
103 |
|
|
/* */ |
104 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
105 |
|
|
/* */ |
106 |
|
|
/* DESCRIPTION */ |
107 |
|
|
/* */ |
108 |
|
|
/* This function returns a pointer to the display string table. */ |
109 |
|
|
/* */ |
110 |
|
|
/* INPUT */ |
111 |
|
|
/* */ |
112 |
|
|
/* display Pointer to display instance. */ |
113 |
|
|
/* language The language the string */ |
114 |
|
|
/* table is associated with */ |
115 |
|
|
/* put_table Pointer to string table */ |
116 |
|
|
/* put_size Number of strings in table */ |
117 |
|
|
/* */ |
118 |
|
|
/* OUTPUT */ |
119 |
|
|
/* */ |
120 |
|
|
/* status Completion status */ |
121 |
|
|
/* */ |
122 |
|
|
/* CALLS */ |
123 |
|
|
/* */ |
124 |
|
|
/* None */ |
125 |
|
|
/* */ |
126 |
|
|
/* CALLED BY */ |
127 |
|
|
/* */ |
128 |
|
|
/* Application Code */ |
129 |
|
|
/* */ |
130 |
|
|
/* RELEASE HISTORY */ |
131 |
|
|
/* */ |
132 |
|
|
/* DATE NAME DESCRIPTION */ |
133 |
|
|
/* */ |
134 |
|
|
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ |
135 |
|
|
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */ |
136 |
|
|
/* resulting in version 6.1 */ |
137 |
|
|
/* */ |
138 |
|
|
/**************************************************************************/ |
139 |
|
3 |
UINT _gx_display_string_table_get_ext(GX_DISPLAY *display, GX_UBYTE language, GX_STRING **put_table, UINT *put_size) |
140 |
|
|
{ |
141 |
✓✓ |
3 |
if (put_table) |
142 |
|
|
{ |
143 |
✓✓ |
2 |
if (display -> gx_display_language_table) |
144 |
|
|
{ |
145 |
|
1 |
*put_table = (GX_STRING *) display -> gx_display_language_table[language]; |
146 |
|
|
} |
147 |
|
|
else |
148 |
|
|
{ |
149 |
|
1 |
*put_table = GX_NULL; |
150 |
|
|
} |
151 |
|
|
} |
152 |
✓✓ |
3 |
if (put_size) |
153 |
|
|
{ |
154 |
|
2 |
*put_size = display -> gx_display_string_table_size; |
155 |
|
|
} |
156 |
|
3 |
return GX_SUCCESS; |
157 |
|
|
} |
158 |
|
|
|
159 |
|
|
|