GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_animation_drag_disable.c Lines: 7 7 100.0 %
Date: 2024-12-05 08:52:37 Branches: 12 12 100.0 %

Line Branch Exec Source
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
/**   Animation Management (Animation)                                    */
18
/**                                                                       */
19
/**************************************************************************/
20
21
#define GX_SOURCE_CODE
22
23
24
/* Include necessary system files.  */
25
26
#include "gx_api.h"
27
#include "gx_animation.h"
28
29
/* Bring in externs for caller checking code.  */
30
GX_CALLER_CHECKING_EXTERNS
31
32
/**************************************************************************/
33
/*                                                                        */
34
/*  FUNCTION                                               RELEASE        */
35
/*                                                                        */
36
/*    _gx_animation_drag_disable                          PORTABLE C      */
37
/*                                                           6.1          */
38
/*  AUTHOR                                                                */
39
/*                                                                        */
40
/*    Kenneth Maxwell, Microsoft Corporation                              */
41
/*                                                                        */
42
/*  DESCRIPTION                                                           */
43
/*                                                                        */
44
/*    This function checks error in animation slide disable call.         */
45
/*                                                                        */
46
/*                                                                        */
47
/*  INPUT                                                                 */
48
/*                                                                        */
49
/*    animation                             Pointer to animation control  */
50
/*                                            block                       */
51
/*    widget                                Pointer to widget control     */
52
/*                                            block                       */
53
/*                                                                        */
54
/*  OUTPUT                                                                */
55
/*                                                                        */
56
/*    status                                Completion status             */
57
/*                                                                        */
58
/*  CALLS                                                                 */
59
/*                                                                        */
60
/*    _gx_animation_drag_disable            Actual animation slide disable*/
61
/*                                            call                        */
62
/*                                                                        */
63
/*  CALLED BY                                                             */
64
/*                                                                        */
65
/*    Application 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
/**************************************************************************/
76
23
UINT _gxe_animation_drag_disable(GX_ANIMATION *animation, GX_WIDGET *widget)
77
{
78
    /* Check for appropriate caller.  */
79

23
    GX_INIT_AND_THREADS_CALLER_CHECKING
80
81
    /* Check for invalid pointer. */
82

21
    if ((animation == GX_NULL) || (widget == GX_NULL))
83
    {
84
3
        return GX_PTR_ERROR;
85
    }
86
87
    /* animation drag is not enabled ? */
88
18
    if (animation -> gx_animation_original_event_process_function == GX_NULL)
89
    {
90
1
        return GX_INVALID_ANIMATION;
91
    }
92
93
17
    return _gx_animation_drag_disable(animation, widget);
94
}
95