GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_radial_slider_animation_set.c Lines: 8 8 100.0 %
Date: 2026-03-06 19:21:09 Branches: 10 10 100.0 %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 * Copyright (c) 2026-present Eclipse ThreadX contributors
4
 *
5
 * This program and the accompanying materials are made available under the
6
 * terms of the MIT License which is available at
7
 * https://opensource.org/licenses/MIT.
8
 *
9
 * SPDX-License-Identifier: MIT
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
/**************************************************************************/
72
251
UINT _gxe_radial_slider_animation_set(GX_RADIAL_SLIDER *slider, USHORT steps, USHORT delay, USHORT animation_style,
73
                                      VOID (*animation_update_callback)(GX_RADIAL_SLIDER *slider))
74
{
75
UINT status;
76
77
    /* Check for appropriate caller.  */
78

251
    GX_INIT_AND_THREADS_CALLER_CHECKING
79
80
    /* Check for invalid input pointers.  */
81
249
    if (slider == GX_NULL)
82
    {
83
2
        return(GX_PTR_ERROR);
84
    }
85
86
    /* Check for invalid widget.  */
87
247
    if (slider -> gx_widget_type == 0)
88
    {
89
1
        return(GX_INVALID_WIDGET);
90
    }
91
92
    /* Call actual radial slider animation set function.  */
93
246
    status = _gx_radial_slider_animation_set(slider, steps, delay, animation_style, animation_update_callback);
94
95
    /* Return completion status.  */
96
246
    return(status);
97
}
98