GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_multi_line_text_button_text_set.c Lines: 10 10 100.0 %
Date: 2026-03-06 19:21:09 Branches: 3 4 75.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
/**   Text Button Management (Button)                                     */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_widget.h"
29
#include "gx_button.h"
30
31
/**************************************************************************/
32
/*                                                                        */
33
/*  FUNCTION                                               RELEASE        */
34
/*                                                                        */
35
/*    _gx_multi_line_text_button_text_set                 PORTABLE C      */
36
/*                                                           6.3.0        */
37
/*  AUTHOR                                                                */
38
/*                                                                        */
39
/*    Kenneth Maxwell, Microsoft Corporation                              */
40
/*                                                                        */
41
/*  DESCRIPTION (Deprecated)                                              */
42
/*                                                                        */
43
/*    This function assigns text to a multi-line text button              */
44
/*                                                                        */
45
/*  INPUT                                                                 */
46
/*                                                                        */
47
/*    button                                Button control block          */
48
/*    text                                  text pointer                  */
49
/*                                                                        */
50
/*  OUTPUT                                                                */
51
/*                                                                        */
52
/*    status                                Completion status             */
53
/*                                                                        */
54
/*  CALLS                                                                 */
55
/*                                                                        */
56
/*    _gx_text_button_text_set                                            */
57
/*    _gx_multi_line_text_button_line_pointers_set                        */
58
/*                                                                        */
59
/*  CALLED BY                                                             */
60
/*                                                                        */
61
/*    Application Code                                                    */
62
/*                                                                        */
63
/**************************************************************************/
64
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
65
3
UINT  _gx_multi_line_text_button_text_set(GX_MULTI_LINE_TEXT_BUTTON *button, GX_CONST GX_CHAR *text)
66
{
67
UINT status;
68
69
3
    status = _gx_text_button_text_set((GX_TEXT_BUTTON *)button, text);
70
71
3
    if (status == GX_SUCCESS)
72
    {
73
2
        _gx_multi_line_text_button_line_pointers_set(button);
74
    }
75
76
3
    return status;
77
}
78
#endif
79
80
/**************************************************************************/
81
/*                                                                        */
82
/*  FUNCTION                                               RELEASE        */
83
/*                                                                        */
84
/*    _gx_multi_line_text_button_text_set_ext             PORTABLE C      */
85
/*                                                           6.3.0        */
86
/*  AUTHOR                                                                */
87
/*                                                                        */
88
/*    Kenneth Maxwell, Microsoft Corporation                              */
89
/*                                                                        */
90
/*  DESCRIPTION (Deprecated)                                              */
91
/*                                                                        */
92
/*    This function assigns text to a multi-line text button              */
93
/*                                                                        */
94
/*  INPUT                                                                 */
95
/*                                                                        */
96
/*    button                                Button control block          */
97
/*    text                                  text pointer                  */
98
/*                                                                        */
99
/*  OUTPUT                                                                */
100
/*                                                                        */
101
/*    status                                Completion status             */
102
/*                                                                        */
103
/*  CALLS                                                                 */
104
/*                                                                        */
105
/*    _gx_text_button_text_set_ext                                        */
106
/*    _gx_multi_line_text_button_line_pointers_set                        */
107
/*                                                                        */
108
/*  CALLED BY                                                             */
109
/*                                                                        */
110
/*    Application Code                                                    */
111
/*                                                                        */
112
/**************************************************************************/
113
3
UINT  _gx_multi_line_text_button_text_set_ext(GX_MULTI_LINE_TEXT_BUTTON *button, GX_CONST GX_STRING *text)
114
{
115
UINT status;
116
117
3
    status = _gx_text_button_text_set_ext((GX_TEXT_BUTTON *)button, text);
118
119
3
    if (status == GX_SUCCESS)
120
    {
121
3
        _gx_multi_line_text_button_line_pointers_set(button);
122
    }
123
3
    return status;
124
}