1 /**************************************************************************/
2 /*                                                                        */
3 /*       Copyright (c) Microsoft Corporation. All rights reserved.        */
4 /*                                                                        */
5 /*       This software is licensed under the Microsoft Software License   */
6 /*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
7 /*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
8 /*       and in the root directory of this software.                      */
9 /*                                                                        */
10 /**************************************************************************/
11 
12 
13 /**************************************************************************/
14 /**************************************************************************/
15 /**                                                                       */
16 /** GUIX Component                                                        */
17 /**                                                                       */
18 /**   Progress Bar Management (Radial 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_system.h"
28 #include "gx_radial_progress_bar.h"
29 
30 GX_CALLER_CHECKING_EXTERNS
31 
32 /**************************************************************************/
33 /*                                                                        */
34 /*  FUNCTION                                               RELEASE        */
35 /*                                                                        */
36 /*    _gxe_radial_progress_bar_info_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 info set     */
45 /*      call.                                                             */
46 /*                                                                        */
47 /*                                                                        */
48 /*  INPUT                                                                 */
49 /*                                                                        */
50 /*    bar                                   Radial proress bar control    */
51 /*                                            block                       */
52 /*    info                                  Radial progess bar info block */
53 /*                                                                        */
54 /*  OUTPUT                                                                */
55 /*                                                                        */
56 /*    status                                Completion status             */
57 /*                                                                        */
58 /*  CALLS                                                                 */
59 /*                                                                        */
60 /*    _gx_radial_progress_bar_info_set      The actual radial progress    */
61 /*                                            bar info set 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 /**************************************************************************/
_gxe_radial_progress_bar_info_set(GX_RADIAL_PROGRESS_BAR * progress_bar,GX_RADIAL_PROGRESS_BAR_INFO * info)77 UINT _gxe_radial_progress_bar_info_set(GX_RADIAL_PROGRESS_BAR *progress_bar, GX_RADIAL_PROGRESS_BAR_INFO *info)
78 {
79 UINT status;
80 
81     /* Check for appropriate caller.  */
82     GX_INIT_AND_THREADS_CALLER_CHECKING
83 
84     /* Check for invalid input pointers.  */
85     if ((progress_bar == GX_NULL) || (info == GX_NULL))
86     {
87         return(GX_PTR_ERROR);
88     }
89 
90     /* Check for invalid widget.  */
91     if (progress_bar -> gx_widget_type == 0)
92     {
93         return(GX_INVALID_WIDGET);
94     }
95 
96     /* Call actual slider info set function. */
97     status = _gx_radial_progress_bar_info_set(progress_bar, info);
98 
99     /* Return completion status.  */
100     return(status);
101 }
102 
103