GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_radial_slider_anchor_angles_set.c Lines: 9 9 100.0 %
Date: 2026-03-06 19:21:09 Branches: 8 8 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
/**************************************************************************/
31
/*                                                                        */
32
/*  FUNCTION                                               RELEASE        */
33
/*                                                                        */
34
/*    _gxe_radial_slider_anchor_angles_set                PORTABLE C      */
35
/*                                                           6.1          */
36
/*  AUTHOR                                                                */
37
/*                                                                        */
38
/*    Kenneth Maxwell, Microsoft Corporation                              */
39
/*                                                                        */
40
/*  DESCRIPTION                                                           */
41
/*                                                                        */
42
/*    This function checks for errors in the radial slider anchor angles  */
43
/*    set function call.                                                  */
44
/*                                                                        */
45
/*  INPUT                                                                 */
46
/*                                                                        */
47
/*    slider                                Radial slider control block   */
48
/*    anchor_angles                         The angle list to set, which  */
49
/*                                            defines anchor angles for   */
50
/*                                            radial slider               */
51
/*    anchor_count                          The count of the anchor angles*/
52
/*                                                                        */
53
/*  OUTPUT                                                                */
54
/*                                                                        */
55
/*    status                                Completion status             */
56
/*                                                                        */
57
/*  CALLS                                                                 */
58
/*                                                                        */
59
/*    _gx_radial_slider_anchor_angles_set   Actual radial slider anchor   */
60
/*                                            angles set function         */
61
/*                                                                        */
62
/*  CALLED BY                                                             */
63
/*                                                                        */
64
/*    Application Code                                                    */
65
/*                                                                        */
66
/**************************************************************************/
67
7
UINT _gxe_radial_slider_anchor_angles_set(GX_RADIAL_SLIDER *slider, GX_VALUE *anchor_angles, USHORT anchor_count)
68
{
69
UINT status;
70
71
    /* Check for invalid input pointers.  */
72
7
    if (slider == GX_NULL)
73
    {
74
2
        return(GX_PTR_ERROR);
75
    }
76
77
    /* Check for invalid anchor count. */
78

5
    if ((anchor_angles) && (anchor_count == 0))
79
    {
80
1
        return(GX_INVALID_VALUE);
81
    }
82
83
    /* Check for invalid widget.  */
84
4
    if (slider -> gx_widget_type == 0)
85
    {
86
1
        return(GX_INVALID_WIDGET);
87
    }
88
89
    /* Call actual radial slider anchor angles set function.  */
90
3
    status = _gx_radial_slider_anchor_angles_set(slider, anchor_angles, anchor_count);
91
92
    /* Return completion status.  */
93
3
    return(status);
94
}
95