GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_prompt_text_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
/**   Prompt Management (Prompt)                                          */
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_prompt.h"
30
31
/* Bring in externs for caller checking code.  */
32
GX_CALLER_CHECKING_EXTERNS
33
34
/**************************************************************************/
35
/*                                                                        */
36
/*  FUNCTION                                               RELEASE        */
37
/*                                                                        */
38
/*    _gxe_prompt_text_color_set                          PORTABLE C      */
39
/*                                                           6.1          */
40
/*  AUTHOR                                                                */
41
/*                                                                        */
42
/*    Kenneth Maxwell, Microsoft Corporation                              */
43
/*                                                                        */
44
/*  DESCRIPTION                                                           */
45
/*                                                                        */
46
/*    This service checks errors in the prompt text color get function.   */
47
/*                                                                        */
48
/*                                                                        */
49
/*  INPUT                                                                 */
50
/*                                                                        */
51
/*    prompt                                Pointer to prompt control     */
52
/*                                             block                      */
53
/*    normal_text_color_id                  Resource ID of the normal     */
54
/*                                             text color                 */
55
/*    selected_text_color_id                Resource ID of the selected   */
56
/*                                             text color                 */
57
/*    disabled_text_color_id                Resource ID of the disabled   */
58
/*                                             text color                 */
59
/*                                                                        */
60
/*  OUTPUT                                                                */
61
/*                                                                        */
62
/*    status                                Completion status             */
63
/*                                                                        */
64
/*  CALLS                                                                 */
65
/*                                                                        */
66
/*    _gx_prompt_text_color_set             The actual function           */
67
/*                                                                        */
68
/*  CALLED BY                                                             */
69
/*                                                                        */
70
/*    Application Code                                                    */
71
/*                                                                        */
72
/**************************************************************************/
73
71882
UINT  _gxe_prompt_text_color_set(GX_PROMPT *prompt,
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
{
78
UINT status;
79
80
    /* Check for appropriate caller.  */
81

71882
    GX_INIT_AND_THREADS_CALLER_CHECKING
82
83
    /* Check error for valid pointer. */
84
71880
    if (prompt == GX_NULL)
85
    {
86
2
        return(GX_PTR_ERROR);
87
    }
88
89
    /* Check for invalid widget size.  */
90
71878
    if (prompt -> gx_widget_type == 0)
91
    {
92
1
        return(GX_INVALID_WIDGET);
93
    }
94
95
    /* Call the actual function.  */
96
71877
    status = _gx_prompt_text_color_set(prompt, normal_text_color_id, selected_text_color_id, disabled_text_color_id);
97
98
    /* Return completion status.  */
99
71877
    return(status);
100
}
101