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