GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_single_line_text_input_fill_color_set.c Lines: 8 8 100.0 %
Date: 2024-12-05 08:52:37 Branches: 2 2 100.0 %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 *
4
 * This program and the accompanying materials are made available under the
5
 * terms of the MIT License which is available at
6
 * https://opensource.org/licenses/MIT.
7
 *
8
 * SPDX-License-Identifier: MIT
9
 **************************************************************************/
10
11
12
/**************************************************************************/
13
/**************************************************************************/
14
/**                                                                       */
15
/** GUIX Component                                                        */
16
/**                                                                       */
17
/**   Single Line Text Input Management (Single Line Text Input)          */
18
/**                                                                       */
19
/**************************************************************************/
20
21
#define GX_SOURCE_CODE
22
23
24
/* Include necessary system files.  */
25
26
#include "gx_api.h"
27
#include "gx_system.h"
28
#include "gx_single_line_text_input.h"
29
30
/**************************************************************************/
31
/*                                                                        */
32
/*  FUNCTION                                               RELEASE        */
33
/*                                                                        */
34
/*    _gx_single_line_text_input_fill_color_set           PORTABLE C      */
35
/*                                                           6.1          */
36
/*  AUTHOR                                                                */
37
/*                                                                        */
38
/*    Kenneth Maxwell, Microsoft Corporation                              */
39
/*                                                                        */
40
/*  DESCRIPTION                                                           */
41
/*                                                                        */
42
/*    This service sets the fill color of a single line text input widget.*/
43
/*                                                                        */
44
/*                                                                        */
45
/*  INPUT                                                                 */
46
/*                                                                        */
47
/*    input                                 Single-line text input widget */
48
/*                                            control block               */
49
/*    normal_fill_color_id                  Resource ID of the normal     */
50
/*                                            fill color                  */
51
/*    selected_fill_color_id                Resource ID of the selected   */
52
/*                                            fill color                  */
53
/*    disabled_fill_color_id                Resource ID of the disabled   */
54
/*                                            fill color                  */
55
/*    readonly_fill_color_id                Resource ID of the read only  */
56
/*                                            fill color                  */
57
/*                                                                        */
58
/*  OUTPUT                                                                */
59
/*                                                                        */
60
/*    status                                Completion status             */
61
/*                                                                        */
62
/*  CALLS                                                                 */
63
/*                                                                        */
64
/*    _gx_system_dirty_mark                 Mark a widget as dirty        */
65
/*                                                                        */
66
/*  CALLED BY                                                             */
67
/*                                                                        */
68
/*    Application Code                                                    */
69
/*                                                                        */
70
/*  RELEASE HISTORY                                                       */
71
/*                                                                        */
72
/*    DATE              NAME                      DESCRIPTION             */
73
/*                                                                        */
74
/*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
75
/*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
76
/*                                            resulting in version 6.1    */
77
/*                                                                        */
78
/**************************************************************************/
79
869
UINT  _gx_single_line_text_input_fill_color_set(GX_SINGLE_LINE_TEXT_INPUT *input,
80
                                                GX_RESOURCE_ID normal_fill_color_id,
81
                                                GX_RESOURCE_ID selected_fill_color_id,
82
                                                GX_RESOURCE_ID disabled_fill_color_id,
83
                                                GX_RESOURCE_ID readonly_fill_color_id)
84
{
85
86
869
    input -> gx_widget_normal_fill_color = normal_fill_color_id;
87
869
    input -> gx_widget_selected_fill_color = selected_fill_color_id;
88
869
    input -> gx_widget_disabled_fill_color = disabled_fill_color_id;
89
869
    input -> gx_single_line_text_input_readonly_fill_color = readonly_fill_color_id;
90
91
869
    if (input -> gx_widget_status & GX_STATUS_VISIBLE)
92
    {
93
1
        _gx_system_dirty_mark((GX_WIDGET *)input);
94
    }
95
96
869
    return(GX_SUCCESS);
97
}
98