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 /** Context Management (Context) */
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 #include "gx_system.h"
30 #include "gx_context.h"
31
32
33 /**************************************************************************/
34 /* */
35 /* FUNCTION RELEASE */
36 /* */
37 /* _gx_context_string_get PORTABLE C */
38 /* 6.1 */
39 /* AUTHOR */
40 /* */
41 /* Kenneth Maxwell, Microsoft Corporation */
42 /* */
43 /* DESCRIPTION (deprecated) */
44 /* */
45 /* This service gets the string associated with the supplied */
46 /* resource ID. */
47 /* */
48 /* INPUT */
49 /* */
50 /* string_id String resource ID */
51 /* return_string Pointer to string */
52 /* destination pointer */
53 /* */
54 /* OUTPUT */
55 /* */
56 /* status Completion status */
57 /* */
58 /* CALLS */
59 /* */
60 /* _gx_display_string_get */
61 /* */
62 /* CALLED BY */
63 /* */
64 /* _gx_widget_text_id_draw */
65 /* */
66 /* RELEASE HISTORY */
67 /* */
68 /* DATE NAME DESCRIPTION */
69 /* */
70 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
71 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
72 /* resulting in version 6.1 */
73 /* */
74 /**************************************************************************/
75 #if defined(GX_ENABLE_DEPRECATED_STRING_API)
76
_gx_context_string_get(GX_RESOURCE_ID resource_id,GX_CONST GX_CHAR ** return_string)77 UINT _gx_context_string_get(GX_RESOURCE_ID resource_id, GX_CONST GX_CHAR **return_string)
78 {
79 GX_DRAW_CONTEXT *context = _gx_system_current_draw_context;
80 GX_DISPLAY *display;
81
82 display = context -> gx_draw_context_display;
83 return _gx_display_string_get(display, resource_id, return_string);
84 }
85
86 #endif
87
88 /**************************************************************************/
89 /* */
90 /* FUNCTION RELEASE */
91 /* */
92 /* _gx_context_string_get_ext PORTABLE C */
93 /* 6.1 */
94 /* AUTHOR */
95 /* */
96 /* Kenneth Maxwell, Microsoft Corporation */
97 /* */
98 /* DESCRIPTION */
99 /* */
100 /* This service gets the string associated with the supplied */
101 /* resource ID. */
102 /* */
103 /* INPUT */
104 /* */
105 /* string_id String resource ID */
106 /* return_string Pointer to string */
107 /* destination pointer */
108 /* */
109 /* OUTPUT */
110 /* */
111 /* status Completion status */
112 /* */
113 /* CALLS */
114 /* */
115 /* _gx_display_string_get_ext */
116 /* */
117 /* CALLED BY */
118 /* */
119 /* _gx_widget_text_id_draw */
120 /* */
121 /* RELEASE HISTORY */
122 /* */
123 /* DATE NAME DESCRIPTION */
124 /* */
125 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
126 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
127 /* resulting in version 6.1 */
128 /* */
129 /**************************************************************************/
_gx_context_string_get_ext(GX_RESOURCE_ID resource_id,GX_STRING * return_string)130 UINT _gx_context_string_get_ext(GX_RESOURCE_ID resource_id, GX_STRING *return_string)
131 {
132 GX_DRAW_CONTEXT *context = _gx_system_current_draw_context;
133 GX_DISPLAY *display;
134
135 display = context -> gx_draw_context_display;
136 return _gx_display_string_get_ext(display, resource_id, return_string);
137 }
138
139