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 /* */
32 /* FUNCTION RELEASE */
33 /* */
34 /* _gx_display_language_table_get PORTABLE C */
35 /* 6.1 */
36 /* AUTHOR */
37 /* */
38 /* Kenneth Maxwell, Microsoft Corporation */
39 /* */
40 /* DESCRIPTION (Deprecated) */
41 /* */
42 /* This function returns a pointer to the display language table. */
43 /* */
44 /* INPUT */
45 /* */
46 /* display pointer to display */
47 /* language_table Pointer to string table */
48 /* language_count Number of languages in table */
49 /* string_count Number of strings in each */
50 /* language */
51 /* */
52 /* OUTPUT */
53 /* */
54 /* status Completion status */
55 /* */
56 /* CALLS */
57 /* */
58 /* None */
59 /* */
60 /* CALLED BY */
61 /* */
62 /* Application Code */
63 /* */
64 /* RELEASE HISTORY */
65 /* */
66 /* DATE NAME DESCRIPTION */
67 /* */
68 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
69 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
70 /* resulting in version 6.1 */
71 /* */
72 /**************************************************************************/
73 #if defined(GX_ENABLE_DEPRECATED_STRING_API)
_gx_display_language_table_get(GX_DISPLAY * display,GX_CHAR **** language_table,GX_UBYTE * language_count,UINT * string_count)74 UINT _gx_display_language_table_get(GX_DISPLAY *display,
75 GX_CHAR ****language_table, GX_UBYTE *language_count, UINT *string_count)
76 {
77
78 if(language_table)
79 {
80 *language_table = (GX_CHAR ***)display -> gx_display_language_table_deprecated;
81 }
82
83 if(language_count)
84 {
85 *language_count = display -> gx_display_language_table_size;
86 }
87
88 if(string_count)
89 {
90 *string_count = display -> gx_display_string_table_size;
91 }
92
93 return GX_SUCCESS;
94 }
95 #endif
96
97 /**************************************************************************/
98 /* */
99 /* FUNCTION RELEASE */
100 /* */
101 /* _gx_display_language_table_get_ext PORTABLE C */
102 /* 6.1 */
103 /* AUTHOR */
104 /* */
105 /* Kenneth Maxwell, Microsoft Corporation */
106 /* */
107 /* DESCRIPTION */
108 /* */
109 /* This function returns a pointer to the display language table. */
110 /* */
111 /* INPUT */
112 /* */
113 /* display pointer to display */
114 /* language_table Pointer to string table */
115 /* language_count Number of languages in table */
116 /* string_count Number of strings in each */
117 /* language */
118 /* */
119 /* OUTPUT */
120 /* */
121 /* status Completion status */
122 /* */
123 /* CALLS */
124 /* */
125 /* None */
126 /* */
127 /* CALLED BY */
128 /* */
129 /* Application Code */
130 /* */
131 /* RELEASE HISTORY */
132 /* */
133 /* DATE NAME DESCRIPTION */
134 /* */
135 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
136 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
137 /* resulting in version 6.1 */
138 /* */
139 /**************************************************************************/
_gx_display_language_table_get_ext(GX_DISPLAY * display,GX_STRING *** language_table,GX_UBYTE * language_count,UINT * string_count)140 UINT _gx_display_language_table_get_ext(GX_DISPLAY *display,
141 GX_STRING ***language_table, GX_UBYTE *language_count, UINT *string_count)
142 {
143 if (language_table)
144 {
145 *language_table = (GX_STRING **) display -> gx_display_language_table;
146 }
147 if (language_count)
148 {
149 *language_count = display -> gx_display_language_table_size;
150 }
151 if (string_count)
152 {
153 *string_count = display -> gx_display_string_table_size;
154 }
155 return GX_SUCCESS;
156 }
157