1 |
|
|
/*************************************************************************** |
2 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
3 |
|
|
* Copyright (c) 2026-present Eclipse ThreadX contributors |
4 |
|
|
* |
5 |
|
|
* This program and the accompanying materials are made available under the |
6 |
|
|
* terms of the MIT License which is available at |
7 |
|
|
* https://opensource.org/licenses/MIT. |
8 |
|
|
* |
9 |
|
|
* SPDX-License-Identifier: MIT |
10 |
|
|
**************************************************************************/ |
11 |
|
|
|
12 |
|
|
|
13 |
|
|
/**************************************************************************/ |
14 |
|
|
/**************************************************************************/ |
15 |
|
|
/** */ |
16 |
|
|
/** GUIX Component */ |
17 |
|
|
/** */ |
18 |
|
|
/** System Management (System) */ |
19 |
|
|
/** */ |
20 |
|
|
/**************************************************************************/ |
21 |
|
|
|
22 |
|
|
#define GX_SOURCE_CODE |
23 |
|
|
|
24 |
|
|
|
25 |
|
|
/* Include necessary system files. */ |
26 |
|
|
|
27 |
|
|
#include "gx_api.h" |
28 |
|
|
#include "gx_display.h" |
29 |
|
|
|
30 |
|
|
/* Bring in externs for caller checking code. */ |
31 |
|
|
GX_CALLER_CHECKING_EXTERNS |
32 |
|
|
|
33 |
|
|
/**************************************************************************/ |
34 |
|
|
/* */ |
35 |
|
|
/* FUNCTION RELEASE */ |
36 |
|
|
/* */ |
37 |
|
|
/* _gxe_display_string_get PORTABLE C */ |
38 |
|
|
/* 6.1 */ |
39 |
|
|
/* AUTHOR */ |
40 |
|
|
/* */ |
41 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
42 |
|
|
/* */ |
43 |
|
|
/* DESCRIPTION */ |
44 |
|
|
/* */ |
45 |
|
|
/* This function checks for errors in display_string_get call. */ |
46 |
|
|
/* */ |
47 |
|
|
/* INPUT */ |
48 |
|
|
/* */ |
49 |
|
|
/* string_id String resource ID */ |
50 |
|
|
/* return_string Pointer to return string */ |
51 |
|
|
/* pointer */ |
52 |
|
|
/* */ |
53 |
|
|
/* OUTPUT */ |
54 |
|
|
/* */ |
55 |
|
|
/* status Completion status */ |
56 |
|
|
/* */ |
57 |
|
|
/* CALLS */ |
58 |
|
|
/* */ |
59 |
|
|
/* _gx_system_string_get Actual system string get call */ |
60 |
|
|
/* */ |
61 |
|
|
/* CALLED BY */ |
62 |
|
|
/* */ |
63 |
|
|
/* Application Code */ |
64 |
|
|
/* */ |
65 |
|
|
/**************************************************************************/ |
66 |
|
|
#if defined(GX_ENABLE_DEPRECATED_STRING_API) |
67 |
|
14 |
UINT _gxe_display_string_get(GX_DISPLAY *display, GX_RESOURCE_ID string_id, GX_CONST GX_CHAR **return_string) |
68 |
|
|
{ |
69 |
|
|
UINT status; |
70 |
|
|
|
71 |
|
|
/* Check for invalid caller. */ |
72 |
✓✓✓✓ ✓✓ |
14 |
GX_INIT_AND_THREADS_CALLER_CHECKING |
73 |
|
|
|
74 |
|
|
/* Check for invalid pointer. */ |
75 |
✓✓✓✓
|
12 |
if (display == GX_NULL || return_string == GX_NULL) |
76 |
|
|
{ |
77 |
|
5 |
return(GX_PTR_ERROR); |
78 |
|
|
} |
79 |
|
|
|
80 |
|
|
/* Call actual system string get. */ |
81 |
|
7 |
status = _gx_display_string_get(display, string_id, return_string); |
82 |
|
|
|
83 |
|
|
/* Return status. */ |
84 |
|
7 |
return(status); |
85 |
|
|
} |
86 |
|
|
#endif |
87 |
|
|
|
88 |
|
|
/**************************************************************************/ |
89 |
|
|
/* */ |
90 |
|
|
/* FUNCTION RELEASE */ |
91 |
|
|
/* */ |
92 |
|
|
/* _gxe_display_string_get_ext PORTABLE C */ |
93 |
|
|
/* 6.1 */ |
94 |
|
|
/* AUTHOR */ |
95 |
|
|
/* */ |
96 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
97 |
|
|
/* */ |
98 |
|
|
/* DESCRIPTION */ |
99 |
|
|
/* */ |
100 |
|
|
/* This function checks for errors in display_string_get call. */ |
101 |
|
|
/* */ |
102 |
|
|
/* INPUT */ |
103 |
|
|
/* */ |
104 |
|
|
/* string_id String resource ID */ |
105 |
|
|
/* return_string Pointer to return string */ |
106 |
|
|
/* pointer */ |
107 |
|
|
/* */ |
108 |
|
|
/* OUTPUT */ |
109 |
|
|
/* */ |
110 |
|
|
/* status Completion status */ |
111 |
|
|
/* */ |
112 |
|
|
/* CALLS */ |
113 |
|
|
/* */ |
114 |
|
|
/* _gx_system_string_get Actual system string get call */ |
115 |
|
|
/* */ |
116 |
|
|
/* CALLED BY */ |
117 |
|
|
/* */ |
118 |
|
|
/* Application Code */ |
119 |
|
|
/* */ |
120 |
|
|
/**************************************************************************/ |
121 |
|
369 |
UINT _gxe_display_string_get_ext(GX_DISPLAY *display, GX_RESOURCE_ID string_id, GX_STRING *return_string) |
122 |
|
|
{ |
123 |
|
|
UINT status; |
124 |
|
|
|
125 |
|
|
/* Check for invalid caller. */ |
126 |
✓✓✓✓ ✓✓ |
369 |
GX_INIT_AND_THREADS_CALLER_CHECKING |
127 |
|
|
|
128 |
|
|
/* Check for invalid pointer. */ |
129 |
✓✓✓✓
|
367 |
if (display == GX_NULL || return_string == GX_NULL) |
130 |
|
|
{ |
131 |
|
2 |
return(GX_PTR_ERROR); |
132 |
|
|
} |
133 |
|
|
|
134 |
|
|
/* Call actual system string get. */ |
135 |
|
365 |
status = _gx_display_string_get_ext(display, string_id, return_string); |
136 |
|
|
|
137 |
|
|
/* Return status. */ |
138 |
|
365 |
return(status); |
139 |
|
|
} |
140 |
|
|
|