GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_progress_bar_draw.c Lines: 6 6 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
/* Include necessary system files.  */
25
26
#include "gx_api.h"
27
#include "gx_context.h"
28
#include "gx_widget.h"
29
#include "gx_canvas.h"
30
#include "gx_utility.h"
31
#include "gx_progress_bar.h"
32
33
/**************************************************************************/
34
/*                                                                        */
35
/*  FUNCTION                                               RELEASE        */
36
/*                                                                        */
37
/*    _gx_progress_bar_draw                               PORTABLE C      */
38
/*                                                           6.1          */
39
/*  AUTHOR                                                                */
40
/*                                                                        */
41
/*    Kenneth Maxwell, Microsoft Corporation                              */
42
/*                                                                        */
43
/*  DESCRIPTION                                                           */
44
/*                                                                        */
45
/*    This service draws the specified progress bar.                      */
46
/*                                                                        */
47
/*  INPUT                                                                 */
48
/*                                                                        */
49
/*    progress_bar                          Progress Bar control block    */
50
/*                                                                        */
51
/*  OUTPUT                                                                */
52
/*                                                                        */
53
/*    None                                                                */
54
/*                                                                        */
55
/*  CALLS                                                                 */
56
/*                                                                        */
57
/*    _gx_widget_border_draw                Draw border                   */
58
/*    _gx_context_pixelmap_get              Retrieve pixelmap image       */
59
/*    _gx_widget_client_get                 Find the client area of a     */
60
/*                                            widget                      */
61
/*    _gx_canvas_pixelmap_tile              Tile a pixelmap               */
62
/*    _gx_widget_width_get                  Find width of a widget        */
63
/*    _gx_context_fill_color_set            Set the draw context fill     */
64
/*                                            color                       */
65
/*    _gx_widget_children_draw              Draw children widgets         */
66
/*                                                                        */
67
/*  CALLED BY                                                             */
68
/*                                                                        */
69
/*    Application Code                                                    */
70
/*    GUIX Internal Code                                                  */
71
/*                                                                        */
72
/**************************************************************************/
73
2636
VOID  _gx_progress_bar_draw(GX_PROGRESS_BAR *progress_bar)
74
{
75
    /* Draw progress bar background. */
76
2636
    _gx_progress_bar_background_draw(progress_bar);
77
78
    /* Draw text on the progress bar widget.  */
79
2636
    if (progress_bar -> gx_widget_style & GX_STYLE_PROGRESS_TEXT_DRAW)
80
    {
81
2600
        _gx_progress_bar_text_draw(progress_bar);
82
    }
83
84
    /* Draw children widgets of progress bar widget.  */
85
2636
    _gx_widget_children_draw((GX_WIDGET *)progress_bar);
86
2636
}
87