GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_context_string_get.c Lines: 8 8 100.0 %
Date: 2026-03-06 19:21:09 Branches: 0 0 - %

Line Branch Exec Source
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
/**   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
/**************************************************************************/
67
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
68
69
1
UINT  _gx_context_string_get(GX_RESOURCE_ID resource_id, GX_CONST GX_CHAR **return_string)
70
{
71
1
GX_DRAW_CONTEXT *context = _gx_system_current_draw_context;
72
GX_DISPLAY      *display;
73
74
1
    display = context -> gx_draw_context_display;
75
1
    return _gx_display_string_get(display, resource_id, return_string);
76
}
77
78
#endif
79
80
/**************************************************************************/
81
/*                                                                        */
82
/*  FUNCTION                                               RELEASE        */
83
/*                                                                        */
84
/*    _gx_context_string_get_ext                          PORTABLE C      */
85
/*                                                           6.1          */
86
/*  AUTHOR                                                                */
87
/*                                                                        */
88
/*    Kenneth Maxwell, Microsoft Corporation                              */
89
/*                                                                        */
90
/*  DESCRIPTION                                                           */
91
/*                                                                        */
92
/*    This service gets the string associated with the supplied           */
93
/*      resource ID.                                                      */
94
/*                                                                        */
95
/*  INPUT                                                                 */
96
/*                                                                        */
97
/*    string_id                             String resource ID            */
98
/*    return_string                         Pointer to string             */
99
/*                                            destination pointer         */
100
/*                                                                        */
101
/*  OUTPUT                                                                */
102
/*                                                                        */
103
/*    status                                Completion status             */
104
/*                                                                        */
105
/*  CALLS                                                                 */
106
/*                                                                        */
107
/*    _gx_display_string_get_ext                                          */
108
/*                                                                        */
109
/*  CALLED BY                                                             */
110
/*                                                                        */
111
/*    _gx_widget_text_id_draw                                             */
112
/*                                                                        */
113
/**************************************************************************/
114
1226
UINT  _gx_context_string_get_ext(GX_RESOURCE_ID resource_id, GX_STRING *return_string)
115
{
116
1226
GX_DRAW_CONTEXT *context = _gx_system_current_draw_context;
117
GX_DISPLAY      *display;
118
119
1226
    display = context -> gx_draw_context_display;
120
1226
    return _gx_display_string_get_ext(display, resource_id, return_string);
121
}
122