GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_widget_children_event_process.c Lines: 6 6 100.0 %
Date: 2026-03-06 19:21:09 Branches: 2 2 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
/*                                                                        */
33
/*  FUNCTION                                               RELEASE        */
34
/*                                                                        */
35
/*    _gx_widget_children_event_process                   PORTABLE C      */
36
/*                                                           6.1          */
37
/*  AUTHOR                                                                */
38
/*                                                                        */
39
/*    Kenneth Maxwell, Microsoft Corporation                              */
40
/*                                                                        */
41
/*  DESCRIPTION                                                           */
42
/*                                                                        */
43
/*    This function propagates widget events to the children of the       */
44
/*    specified widget.                                                   */
45
/*                                                                        */
46
/*  INPUT                                                                 */
47
/*                                                                        */
48
/*    widget                                Widget control block          */
49
/*    event_ptr                             Incoming event to process     */
50
/*                                                                        */
51
/*  OUTPUT                                                                */
52
/*                                                                        */
53
/*    None                                                                */
54
/*                                                                        */
55
/*  CALLS                                                                 */
56
/*                                                                        */
57
/*    [gx_widget_event_process_function]    Child widget event processing */
58
/*                                                                        */
59
/*  CALLED BY                                                             */
60
/*                                                                        */
61
/*    GUIX Internal Code                                                  */
62
/*                                                                        */
63
/**************************************************************************/
64
16788
VOID  _gx_widget_children_event_process(GX_WIDGET *widget, GX_EVENT *event_ptr)
65
{
66
67
GX_WIDGET *child;
68
69
70
    /* Pickup the first child of the widget.  */
71
16788
    child  = widget -> gx_widget_first_child;
72
73
    /* Loop to send event to all children of widget.  */
74
30282
    while (child)
75
    {
76
77
        /* Call widget's event processing.  */
78
13494
        child -> gx_widget_event_process_function(child, event_ptr);
79
80
        /* Move to next child widget.  */
81
13494
        child =  child -> gx_widget_next;
82
    }
83
16788
}
84