GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_progress_bar_text_color_set.c Lines: 6 6 100.0 %
Date: 2024-12-05 08:52:37 Branches: 8 8 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
/**   Progress Bar Management (Progress Bar)                              */
18
/**                                                                       */
19
/**************************************************************************/
20
21
#define GX_SOURCE_CODE
22
23
24
/* Include necessary system files.  */
25
26
#include "gx_api.h"
27
#include "gx_progress_bar.h"
28
29
/* Bring in externs for caller checking code.  */
30
GX_CALLER_CHECKING_EXTERNS
31
32
/**************************************************************************/
33
/*                                                                        */
34
/*  FUNCTION                                               RELEASE        */
35
/*                                                                        */
36
/*    _gxe_progress_bar_text_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 progress bar text color set call.*/
45
/*                                                                        */
46
/*                                                                        */
47
/*  INPUT                                                                 */
48
/*                                                                        */
49
/*    progress_bar                          Progress Bar control block    */
50
/*    normal_text_color_id                  Resource ID of the normal     */
51
/*                                             text color                 */
52
/*    selected_text_color_id                Resource ID of the selected   */
53
/*                                             text color                 */
54
/*    disabled_text_color_id                Resource Id of the disabled   */
55
/*                                             text color                 */
56
/*                                                                        */
57
/*  OUTPUT                                                                */
58
/*                                                                        */
59
/*    status                                Completion status             */
60
/*                                                                        */
61
/*  CALLS                                                                 */
62
/*                                                                        */
63
/*    _gx_progress_bar_text_color_set       Actual progress bar text      */
64
/*                                            color set call              */
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
9
UINT  _gxe_progress_bar_text_color_set(GX_PROGRESS_BAR *progress_bar,
80
                                       GX_RESOURCE_ID normal_text_color_id,
81
                                       GX_RESOURCE_ID selected_text_color_id,
82
                                       GX_RESOURCE_ID disabled_text_color_id)
83
{
84
UINT status;
85
86
    /* Check for invalid caller.  */
87

9
    GX_INIT_AND_THREADS_CALLER_CHECKING
88
89
    /* Check for invalid pointer.  */
90
7
    if (progress_bar == GX_NULL)
91
    {
92
2
        return(GX_PTR_ERROR);
93
    }
94
95
    /* Call actual progress bar text color set function.  */
96
5
    status = _gx_progress_bar_text_color_set(progress_bar, normal_text_color_id, selected_text_color_id, disabled_text_color_id);
97
98
    /* Return completion status.  */
99
5
    return(status);
100
}
101