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 /**   Radial Slider Management (Slider)                                   */
18 /**                                                                       */
19 /**************************************************************************/
20 
21 #define GX_SOURCE_CODE
22 
23 
24 /* Include necessary system files.  */
25 
26 #include "gx_api.h"
27 #include "gx_system.h"
28 #include "gx_radial_slider.h"
29 
30 /**************************************************************************/
31 /*                                                                        */
32 /*  FUNCTION                                               RELEASE        */
33 /*                                                                        */
34 /*    _gx_radial_slider_animation_set                     PORTABLE C      */
35 /*                                                           6.1          */
36 /*  AUTHOR                                                                */
37 /*                                                                        */
38 /*    Kenneth Maxwell, Microsoft Corporation                              */
39 /*                                                                        */
40 /*  DESCRIPTION                                                           */
41 /*                                                                        */
42 /*    This service sets animation steps, delay time and animation styles  */
43 /*    for a radial slider.                                                */
44 /*                                                                        */
45 /*  INPUT                                                                 */
46 /*                                                                        */
47 /*    slider                                Radial slider control block   */
48 /*    steps                                 Total steps for one animation */
49 /*    delay                                 Delay time for every step     */
50 /*    animation_style                       Easing function type          */
51 /*    animation_update_callback             Function that to be called    */
52 /*                                          after each animation step,    */
53 /*                                          could be NULL                 */
54 /*                                                                        */
55 /*  OUTPUT                                                                */
56 /*                                                                        */
57 /*    status                                Completion status             */
58 /*                                                                        */
59 /*  CALLS                                                                 */
60 /*                                                                        */
61 /*    None                                                                */
62 /*                                                                        */
63 /*  CALLED BY                                                             */
64 /*                                                                        */
65 /*    GUIX Internal Code                                                  */
66 /*                                                                        */
67 /*  RELEASE HISTORY                                                       */
68 /*                                                                        */
69 /*    DATE              NAME                      DESCRIPTION             */
70 /*                                                                        */
71 /*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
72 /*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
73 /*                                            resulting in version 6.1    */
74 /*                                                                        */
75 /**************************************************************************/
_gx_radial_slider_animation_set(GX_RADIAL_SLIDER * slider,USHORT steps,USHORT delay,USHORT animation_style,VOID (* animation_update_callback)(GX_RADIAL_SLIDER * slider))76 UINT _gx_radial_slider_animation_set(GX_RADIAL_SLIDER *slider, USHORT steps, USHORT delay, USHORT animation_style,
77                                      VOID (*animation_update_callback)(GX_RADIAL_SLIDER *slider))
78 {
79     slider -> gx_radial_slider_animation_total_steps = steps;
80     slider -> gx_radial_slider_animation_delay = delay;
81     slider -> gx_radial_slider_animation_style = animation_style;
82     slider -> gx_radial_slider_animation_update_callback = animation_update_callback;
83 
84     return(GX_SUCCESS);
85 }
86 
87