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 /**   Scroll Wheel Management (Scroll Wheel)                              */
19 /**                                                                       */
20 /**************************************************************************/
21 
22 #define GX_SOURCE_CODE
23 
24 
25 /* Include necessary system files.  */
26 
27 #include "gx_api.h"
28 #include "gx_scroll_wheel.h"
29 
30 /**************************************************************************/
31 /*                                                                        */
32 /*  FUNCTION                                               RELEASE        */
33 /*                                                                        */
34 /*    _gx_scroll_wheel_speed_set                          PORTABLE C      */
35 /*                                                           6.1          */
36 /*  AUTHOR                                                                */
37 /*                                                                        */
38 /*    Kenneth Maxwell, Microsoft Corporation                              */
39 /*                                                                        */
40 /*  DESCRIPTION                                                           */
41 /*                                                                        */
42 /*    This function sets scrolling speed for the scroll wheel widget.     */
43 /*                                                                        */
44 /*  INPUT                                                                 */
45 /*                                                                        */
46 /*    wheel                                 Scroll wheel control block    */
47 /*    start_speed_rate                      The rate of start speed to    */
48 /*                                            flick speed.                */
49 /*    end_speed_rate                        The rate of end speed to      */
50 /*                                            flick speed.                */
51 /*    max_steps                             Max steps for scrolling       */
52 /*    delay                                 Delay time of each step       */
53 /*                                                                        */
54 /*  OUTPUT                                                                */
55 /*                                                                        */
56 /*    status                                Completion status             */
57 /*                                                                        */
58 /*  CALLS                                                                 */
59 /*                                                                        */
60 /*    None                                                                */
61 /*                                                                        */
62 /*  CALLED BY                                                             */
63 /*                                                                        */
64 /*    Application Code                                                    */
65 /*                                                                        */
66 /*  RELEASE HISTORY                                                       */
67 /*                                                                        */
68 /*    DATE              NAME                      DESCRIPTION             */
69 /*                                                                        */
70 /*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
71 /*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
72 /*                                            resulting in version 6.1    */
73 /*                                                                        */
74 /**************************************************************************/
_gx_scroll_wheel_speed_set(GX_SCROLL_WHEEL * wheel,GX_FIXED_VAL start_speed_rate,GX_FIXED_VAL end_speed_rate,GX_VALUE max_steps,GX_VALUE delay)75 UINT _gx_scroll_wheel_speed_set(GX_SCROLL_WHEEL *wheel, GX_FIXED_VAL start_speed_rate, GX_FIXED_VAL end_speed_rate,
76     GX_VALUE max_steps, GX_VALUE delay)
77 {
78     wheel -> gx_scroll_wheel_animation_start_speed_rate = start_speed_rate;
79     wheel -> gx_scroll_wheel_animation_end_speed_rate = end_speed_rate;
80     wheel -> gx_scroll_wheel_animation_max_steps = max_steps;
81     wheel -> gx_scroll_wheel_animation_delay = delay;
82     return GX_SUCCESS;
83 }
84 
85