GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_radial_progress_bar_text_color_set.c Lines: 8 8 100.0 %
Date: 2024-12-05 08:52:37 Branches: 10 10 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 (Radial 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_radial_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 radial progress bar text color   */
45
/*      set call.                                                         */
46
/*                                                                        */
47
/*                                                                        */
48
/*  INPUT                                                                 */
49
/*                                                                        */
50
/*    progress_bar                          Radial Progress Bar control   */
51
/*                                             block                      */
52
/*    normal_text_color_id                  Resource ID of the normal     */
53
/*                                             text color                 */
54
/*    selected_text_color_id                Resource ID of the selected   */
55
/*                                             text color                 */
56
/*    disabled_text_color_id                Resource ID of the disabled   */
57
/*                                             text color                 */
58
/*                                                                        */
59
/*  OUTPUT                                                                */
60
/*                                                                        */
61
/*    status                                Completion status             */
62
/*                                                                        */
63
/*  CALLS                                                                 */
64
/*                                                                        */
65
/*    _gx_radial_progress_bar_text_color_set                              */
66
/*                                          Actual radial progress bar    */
67
/*                                            text color set call         */
68
/*                                                                        */
69
/*  CALLED BY                                                             */
70
/*                                                                        */
71
/*    Application Code                                                    */
72
/*                                                                        */
73
/*  RELEASE HISTORY                                                       */
74
/*                                                                        */
75
/*    DATE              NAME                      DESCRIPTION             */
76
/*                                                                        */
77
/*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
78
/*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
79
/*                                            resulting in version 6.1    */
80
/*                                                                        */
81
/**************************************************************************/
82
7
UINT  _gxe_radial_progress_bar_text_color_set(GX_RADIAL_PROGRESS_BAR *progress_bar,
83
                                              GX_RESOURCE_ID normal_text_color_id,
84
                                              GX_RESOURCE_ID selected_text_color_id,
85
                                              GX_RESOURCE_ID disabled_text_color_id)
86
{
87
UINT status;
88
89
    /* Check for invalid caller.  */
90

7
    GX_INIT_AND_THREADS_CALLER_CHECKING
91
92
    /* Check for invalid pointer.  */
93
5
    if (progress_bar == GX_NULL)
94
    {
95
2
        return(GX_PTR_ERROR);
96
    }
97
98
    /* Check for invalid widget. */
99
3
    if (progress_bar -> gx_widget_type == 0)
100
    {
101
1
        return(GX_INVALID_WIDGET);
102
    }
103
104
    /* Call actual radial progress bar text color set function.  */
105
2
    status = _gx_radial_progress_bar_text_color_set(progress_bar, normal_text_color_id, selected_text_color_id, disabled_text_color_id);
106
107
    /* Return completion status.  */
108
2
    return(status);
109
}
110