GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_single_line_text_input_fill_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
/*  FUNCTION                                               RELEASE        */
34
/*                                                                        */
35
/*    _gx_single_line_text_input_fill_color_set           PORTABLE C      */
36
/*                                                           6.1          */
37
/*  AUTHOR                                                                */
38
/*                                                                        */
39
/*    Kenneth Maxwell, Microsoft Corporation                              */
40
/*                                                                        */
41
/*  DESCRIPTION                                                           */
42
/*                                                                        */
43
/*    This service sets the fill color of a single line text input widget.*/
44
/*                                                                        */
45
/*                                                                        */
46
/*  INPUT                                                                 */
47
/*                                                                        */
48
/*    input                                 Single-line text input widget */
49
/*                                            control block               */
50
/*    normal_fill_color_id                  Resource ID of the normal     */
51
/*                                            fill color                  */
52
/*    selected_fill_color_id                Resource ID of the selected   */
53
/*                                            fill color                  */
54
/*    disabled_fill_color_id                Resource ID of the disabled   */
55
/*                                            fill color                  */
56
/*    readonly_fill_color_id                Resource ID of the read only  */
57
/*                                            fill color                  */
58
/*                                                                        */
59
/*  OUTPUT                                                                */
60
/*                                                                        */
61
/*    status                                Completion status             */
62
/*                                                                        */
63
/*  CALLS                                                                 */
64
/*                                                                        */
65
/*    _gx_system_dirty_mark                 Mark a widget as dirty        */
66
/*                                                                        */
67
/*  CALLED BY                                                             */
68
/*                                                                        */
69
/*    Application Code                                                    */
70
/*                                                                        */
71
/**************************************************************************/
72
869
UINT  _gx_single_line_text_input_fill_color_set(GX_SINGLE_LINE_TEXT_INPUT *input,
73
                                                GX_RESOURCE_ID normal_fill_color_id,
74
                                                GX_RESOURCE_ID selected_fill_color_id,
75
                                                GX_RESOURCE_ID disabled_fill_color_id,
76
                                                GX_RESOURCE_ID readonly_fill_color_id)
77
{
78
79
869
    input -> gx_widget_normal_fill_color = normal_fill_color_id;
80
869
    input -> gx_widget_selected_fill_color = selected_fill_color_id;
81
869
    input -> gx_widget_disabled_fill_color = disabled_fill_color_id;
82
869
    input -> gx_single_line_text_input_readonly_fill_color = readonly_fill_color_id;
83
84
869
    if (input -> gx_widget_status & GX_STATUS_VISIBLE)
85
    {
86
1
        _gx_system_dirty_mark((GX_WIDGET *)input);
87
    }
88
89
869
    return(GX_SUCCESS);
90
}
91