GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_single_line_text_input_text_color_set.c Lines: 8 8 100.0 %
Date: 2026-03-06 19:21:09 Branches: 2 2 100.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
/**   Single Line Text Input Management (Single Line Text Input)          */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_system.h"
29
#include "gx_single_line_text_input.h"
30
31
32
/**************************************************************************/
33
/*                                                                        */
34
/*  FUNCTION                                               RELEASE        */
35
/*                                                                        */
36
/*    _gx_single_line_text_input_text_color_set           PORTABLE C      */
37
/*                                                           6.1          */
38
/*  AUTHOR                                                                */
39
/*                                                                        */
40
/*    Kenneth Maxwell, Microsoft Corporation                              */
41
/*                                                                        */
42
/*  DESCRIPTION                                                           */
43
/*                                                                        */
44
/*    This service sets the text color of a single line text input widget.*/
45
/*                                                                        */
46
/*                                                                        */
47
/*  INPUT                                                                 */
48
/*                                                                        */
49
/*    input                                 Single-line text input widget */
50
/*                                            control block               */
51
/*    normal_text_color_id                  Resource ID of the normal     */
52
/*                                            text color                  */
53
/*    selected_text_color_id                Resource ID of the selected   */
54
/*                                            text color                  */
55
/*    disabled_text_color_id                Resource ID of the disabled   */
56
/*                                            text color                  */
57
/*    readonly_text_color_id                Resource ID of the read only  */
58
/*                                            text color                  */
59
/*                                                                        */
60
/*  OUTPUT                                                                */
61
/*                                                                        */
62
/*    status                                Completion status             */
63
/*                                                                        */
64
/*  CALLS                                                                 */
65
/*                                                                        */
66
/*    _gx_system_dirty_mark                 Mark a widget as dirty        */
67
/*                                                                        */
68
/*  CALLED BY                                                             */
69
/*                                                                        */
70
/*    Application Code                                                    */
71
/*                                                                        */
72
/**************************************************************************/
73
869
UINT  _gx_single_line_text_input_text_color_set(GX_SINGLE_LINE_TEXT_INPUT *input,
74
                                                GX_RESOURCE_ID normal_text_color_id,
75
                                                GX_RESOURCE_ID selected_text_color_id,
76
                                                GX_RESOURCE_ID disabled_text_color_id,
77
                                                GX_RESOURCE_ID readonly_text_color_id)
78
{
79
80
869
    input -> gx_prompt_normal_text_color = normal_text_color_id;
81
869
    input -> gx_prompt_selected_text_color = selected_text_color_id;
82
869
    input -> gx_prompt_disabled_text_color = disabled_text_color_id;
83
869
    input -> gx_single_line_text_input_readonly_text_color = readonly_text_color_id;
84
85
869
    if (input -> gx_widget_status & GX_STATUS_VISIBLE)
86
    {
87
1
        _gx_system_dirty_mark((GX_WIDGET *)input);
88
    }
89
90
869
    return(GX_SUCCESS);
91
}
92