GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_radial_progress_bar_event_process.c Lines: 8 8 100.0 %
Date: 2024-12-05 08:52:37 Branches: 12 12 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
/*                                                                        */
35
/*  FUNCTION                                               RELEASE        */
36
/*                                                                        */
37
/*    _gxe_radial_progress_bar_event_process              PORTABLE C      */
38
/*                                                           6.1          */
39
/*  AUTHOR                                                                */
40
/*                                                                        */
41
/*    Kenneth Maxwell, Microsoft Corporation                              */
42
/*                                                                        */
43
/*  DESCRIPTION                                                           */
44
/*                                                                        */
45
/*    This function checks for errors in radial progress bar event process*/
46
/*      call.                                                             */
47
/*                                                                        */
48
/*  INPUT                                                                 */
49
/*                                                                        */
50
/*    progress_bar                          Radial Progress Bar control   */
51
/*                                            block                       */
52
/*    event_ptr                             Pointer to event process      */
53
/*                                                                        */
54
/*  OUTPUT                                                                */
55
/*                                                                        */
56
/*    status                                Completion status             */
57
/*                                                                        */
58
/*  CALLS                                                                 */
59
/*                                                                        */
60
/*    _gx_radial_progress_bar_event_process Actual radial progress bar    */
61
/*                                            event process call          */
62
/*                                                                        */
63
/*  CALLED BY                                                             */
64
/*                                                                        */
65
/*    Application Code                                                    */
66
/*    GUIX Internal Code                                                  */
67
/*                                                                        */
68
/*  RELEASE HISTORY                                                       */
69
/*                                                                        */
70
/*    DATE              NAME                      DESCRIPTION             */
71
/*                                                                        */
72
/*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
73
/*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
74
/*                                            resulting in version 6.1    */
75
/*                                                                        */
76
/**************************************************************************/
77
6
UINT  _gxe_radial_progress_bar_event_process(GX_RADIAL_PROGRESS_BAR *progress_bar, GX_EVENT *event_ptr)
78
{
79
UINT status;
80
81
    /* Check for invalid caller.  */
82

6
    GX_INIT_AND_THREADS_CALLER_CHECKING
83
84
    /* Check for invalid pointer.  */
85

4
    if ((progress_bar == GX_NULL) || (event_ptr == GX_NULL))
86
    {
87
2
        return(GX_PTR_ERROR);
88
    }
89
90
    /* Check for invalid widget. */
91
2
    if (progress_bar -> gx_widget_type == 0)
92
    {
93
1
        return(GX_INVALID_WIDGET);
94
    }
95
96
    /* Call actual radial progress bar event process function.  */
97
1
    status = _gx_radial_progress_bar_event_process(progress_bar, event_ptr);
98
99
    /* Return completion status.  */
100
1
    return(status);
101
}
102