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 /** Radial Slider Management (Slider) */
19 /** */
20 /**************************************************************************/
21
22 #define GX_SOURCE_CODE
23
24
25 /* Include necessary system files. */
26
27 #include "gx_api.h"
28 #include "gx_radial_slider.h"
29
30 /* Bring in externs for caller checking code. */
31 GX_CALLER_CHECKING_EXTERNS
32
33 /**************************************************************************/
34 /* */
35 /* FUNCTION RELEASE */
36 /* */
37 /* _gxe_radial_slider_animation_set PORTABLE C */
38 /* 6.1 */
39 /* AUTHOR */
40 /* */
41 /* Kenneth Maxwell, Microsoft Corporation */
42 /* */
43 /* DESCRIPTION */
44 /* */
45 /* This function checks for errors in the radial slider animation set */
46 /* function call. */
47 /* */
48 /* INPUT */
49 /* */
50 /* slider Radial slider control block */
51 /* steps Total steps for one animation */
52 /* delay Delay time for every step */
53 /* animation_style Easing function type */
54 /* animation_update_callback Function that to be called */
55 /* after each animation step, */
56 /* could be NULL */
57 /* */
58 /* OUTPUT */
59 /* */
60 /* status Completion status */
61 /* */
62 /* CALLS */
63 /* */
64 /* _gx_radial_slider_animation_set Actual radial slider */
65 /* animation set function */
66 /* */
67 /* CALLED BY */
68 /* */
69 /* Application Code */
70 /* */
71 /* RELEASE HISTORY */
72 /* */
73 /* DATE NAME DESCRIPTION */
74 /* */
75 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
76 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
77 /* resulting in version 6.1 */
78 /* */
79 /**************************************************************************/
_gxe_radial_slider_animation_set(GX_RADIAL_SLIDER * slider,USHORT steps,USHORT delay,USHORT animation_style,VOID (* animation_update_callback)(GX_RADIAL_SLIDER * slider))80 UINT _gxe_radial_slider_animation_set(GX_RADIAL_SLIDER *slider, USHORT steps, USHORT delay, USHORT animation_style,
81 VOID (*animation_update_callback)(GX_RADIAL_SLIDER *slider))
82 {
83 UINT status;
84
85 /* Check for appropriate caller. */
86 GX_INIT_AND_THREADS_CALLER_CHECKING
87
88 /* Check for invalid input pointers. */
89 if (slider == GX_NULL)
90 {
91 return(GX_PTR_ERROR);
92 }
93
94 /* Check for invalid widget. */
95 if (slider -> gx_widget_type == 0)
96 {
97 return(GX_INVALID_WIDGET);
98 }
99
100 /* Call actual radial slider animation set function. */
101 status = _gx_radial_slider_animation_set(slider, steps, delay, animation_style, animation_update_callback);
102
103 /* Return completion status. */
104 return(status);
105 }
106
107