GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_progress_bar_text_color_set.c Lines: 7 7 100.0 %
Date: 2026-03-06 19:21:09 Branches: 2 2 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
/**   Progress Bar Management (Progress Bar)                              */
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_progress_bar.h"
30
31
32
/**************************************************************************/
33
/*                                                                        */
34
/*  FUNCTION                                               RELEASE        */
35
/*                                                                        */
36
/*    _gx_progress_bar_text_color_set                     PORTABLE C      */
37
/*                                                           6.1          */
38
/*  AUTHOR                                                                */
39
/*                                                                        */
40
/*    Kenneth Maxwell, Microsoft Corporation                              */
41
/*                                                                        */
42
/*  DESCRIPTION                                                           */
43
/*                                                                        */
44
/*    This service sets the text color of a progress bar widget.          */
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_system_dirty_mark                 Mark the progress bar as      */
64
/*                                            dirty                       */
65
/*                                                                        */
66
/*  CALLED BY                                                             */
67
/*                                                                        */
68
/*    Application Code                                                    */
69
/*                                                                        */
70
/**************************************************************************/
71
5
UINT  _gx_progress_bar_text_color_set(GX_PROGRESS_BAR *progress_bar,
72
                                      GX_RESOURCE_ID normal_text_color_id,
73
                                      GX_RESOURCE_ID selected_text_color_id,
74
                                      GX_RESOURCE_ID disabled_text_color_id)
75
{
76
5
    progress_bar -> gx_progress_bar_info.gx_progress_bar_normal_text_color = normal_text_color_id;
77
5
    progress_bar -> gx_progress_bar_info.gx_progress_bar_selected_text_color = selected_text_color_id;
78
5
    progress_bar -> gx_progress_bar_info.gx_progress_bar_disabled_text_color = disabled_text_color_id;
79
80
5
    if (progress_bar -> gx_widget_status & GX_STATUS_VISIBLE)
81
    {
82
4
        _gx_system_dirty_mark((GX_WIDGET *)progress_bar);
83
    }
84
85
5
    return(GX_SUCCESS);
86
}
87