GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_animation_drag_disable.c Lines: 5 5 100.0 %
Date: 2026-03-06 19:21:09 Branches: 0 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
/**   Animation Management (Animation)                                    */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_animation.h"
29
30
31
/**************************************************************************/
32
/*                                                                        */
33
/*  FUNCTION                                               RELEASE        */
34
/*                                                                        */
35
/*    _gx_animation_drag_disable                          PORTABLE C      */
36
/*                                                           6.1          */
37
/*  AUTHOR                                                                */
38
/*                                                                        */
39
/*    Kenneth Maxwell, Microsoft Corporation                              */
40
/*                                                                        */
41
/*  DESCRIPTION                                                           */
42
/*                                                                        */
43
/*    This function removes the screen slide aimation hook from the       */
44
/*    widget's default event process.                                     */
45
/*                                                                        */
46
/*  INPUT                                                                 */
47
/*                                                                        */
48
/*    animation                             Pointer to animation control  */
49
/*                                            block                       */
50
/*    widget                                Pointer to widget control     */
51
/*                                            block                       */
52
/*                                                                        */
53
/*  OUTPUT                                                                */
54
/*                                                                        */
55
/*    status                                Completion status             */
56
/*                                                                        */
57
/*  CALLS                                                                 */
58
/*                                                                        */
59
/*    _gx_animation_stop                    Stop an animation sequence    */
60
/*                                                                        */
61
/*  CALLED BY                                                             */
62
/*                                                                        */
63
/*    Application Code                                                    */
64
/*                                                                        */
65
/**************************************************************************/
66
#if (GX_ANIMATION_POOL_SIZE > 0)
67
17
UINT  _gx_animation_drag_disable(GX_ANIMATION *animation, GX_WIDGET *widget)
68
{
69
UINT status;
70
71
    /* Replace the widget's event process function with its original event process function. */
72
17
    widget -> gx_widget_event_process_function = animation -> gx_animation_original_event_process_function;
73
17
    animation -> gx_animation_original_event_process_function = GX_NULL;
74
75
    /* Remove a animation from animation list. */
76
17
    status =  _gx_animation_stop(animation);
77
17
    return status;
78
}
79
#endif