GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_widget_top_visible_child_find.c Lines: 7 7 100.0 %
Date: 2026-03-06 19:21:09 Branches: 6 6 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
/**   Widget Management (Widget)                                          */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_widget.h"
29
30
/**************************************************************************/
31
/*                                                                        */
32
/*  FUNCTION                                               RELEASE        */
33
/*                                                                        */
34
/*    _gxe_widget_top_visible_child_find                  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                              */
43
/*    gx_widget_top_visible_child_find function call.                     */
44
/*                                                                        */
45
/*  INPUT                                                                 */
46
/*                                                                        */
47
/*    parent                               Pointer to parent widget to    */
48
/*                                            start search from           */
49
/*    return_widget                         Pointer to destination for    */
50
/*                                            found widget                */
51
/*                                                                        */
52
/*  OUTPUT                                                                */
53
/*                                                                        */
54
/*    status                                Completion status             */
55
/*                                                                        */
56
/*  CALLS                                                                 */
57
/*                                                                        */
58
/*    _gx_widget_top_visible_child_find     Actual                        */
59
/*                                            widget_previous_sibling_get */
60
/*                                            function.                   */
61
/*                                                                        */
62
/*  CALLED BY                                                             */
63
/*                                                                        */
64
/*    Application Code                                                    */
65
/*                                                                        */
66
/**************************************************************************/
67
6
UINT _gxe_widget_top_visible_child_find(GX_WIDGET *parent, GX_WIDGET **return_widget)
68
{
69
UINT status;
70
    /* Check for invalid input pointers.  */
71

6
    if ((parent == GX_NULL) || (return_widget == GX_NULL))
72
    {
73
2
        return(GX_PTR_ERROR);
74
    }
75
76
    /* Check for invalid widget.  */
77
4
    if (parent -> gx_widget_type == 0)
78
    {
79
1
        return(GX_INVALID_WIDGET);
80
    }
81
82
    /* Call actual widget find function.  */
83
3
    status = _gx_widget_top_visible_child_find(parent, return_widget);
84
85
    /* Return successful completion.  */
86
3
    return(status);
87
}
88