GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_single_line_text_input_fill_color_set.c Lines: 8 8 100.0 %
Date: 2026-03-06 19:21:09 Branches: 10 10 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 Managment (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
GX_CALLER_CHECKING_EXTERNS
32
/**************************************************************************/
33
/*                                                                        */
34
/*  FUNCTION                                               RELEASE        */
35
/*                                                                        */
36
/*    _gxe_single_line_text_input_fill_color_set          PORTABLE C      */
37
/*                                                           6.1          */
38
/*  AUTHOR                                                                */
39
/*                                                                        */
40
/*    Kenneth Maxwell, Microsoft Corporation                              */
41
/*                                                                        */
42
/*  DESCRIPTION                                                           */
43
/*                                                                        */
44
/*    This function checks for errors in the single line text input fill  */
45
/*    color set function call.                                            */
46
/*                                                                        */
47
/*                                                                        */
48
/*  INPUT                                                                 */
49
/*                                                                        */
50
/*    input                                 Pointer to single line text   */
51
/*                                            input control block         */
52
/*    normal_fill_color_id                  Resource ID of the normal     */
53
/*                                             fill color                 */
54
/*    selected_fill_color_id                Resource ID of the selected   */
55
/*                                             fill color                 */
56
/*    disabled_fill_color_id                Resource ID of the disabled   */
57
/*                                             fill color                 */
58
/*    readonly_fill_color_id                Resource ID of the read only  */
59
/*                                             fill color                 */
60
/*                                                                        */
61
/*  OUTPUT                                                                */
62
/*                                                                        */
63
/*    status                                Completion status             */
64
/*                                                                        */
65
/*  CALLS                                                                 */
66
/*                                                                        */
67
/*    _gx_single_line_text_input_fill_color_set                           */
68
/*                                          Actual single line text input */
69
/*                                            fill color set function     */
70
/*                                                                        */
71
/*  CALLED BY                                                             */
72
/*                                                                        */
73
/*    Application Code                                                    */
74
/*                                                                        */
75
/**************************************************************************/
76
874
UINT  _gxe_single_line_text_input_fill_color_set(GX_SINGLE_LINE_TEXT_INPUT *input,
77
                                                 GX_RESOURCE_ID normal_fill_color_id,
78
                                                 GX_RESOURCE_ID selected_fill_color_id,
79
                                                 GX_RESOURCE_ID disabled_fill_color_id,
80
                                                 GX_RESOURCE_ID readonly_fill_color_id)
81
{
82
UINT status;
83
84
    /* Check for invalid caller.  */
85

874
    GX_INIT_AND_THREADS_CALLER_CHECKING
86
87
    /* Check for invalid pointer. */
88
872
    if (!input)
89
    {
90
2
        return(GX_PTR_ERROR);
91
    }
92
93
    /* Check for invalid widget type. */
94
870
    if (input -> gx_widget_type == 0)
95
    {
96
1
        return(GX_INVALID_WIDGET);
97
    }
98
99
    /* Call actual text input fill color set. */
100
869
    status = _gx_single_line_text_input_fill_color_set(input,
101
                                                       normal_fill_color_id,
102
                                                       selected_fill_color_id,
103
                                                       disabled_fill_color_id,
104
                                                       readonly_fill_color_id);
105
106
869
    return(status);
107
}
108