GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_multi_line_text_view_event_process.c Lines: 8 8 100.0 %
Date: 2026-03-06 19:21:09 Branches: 12 12 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
/**   Multi Line Text View Management (Multi Line Text)                   */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_system.h"
29
#include "gx_multi_line_text_view.h"
30
#include "gx_window.h"
31
32
/* Bring in externs for caller checking code.  */
33
GX_CALLER_CHECKING_EXTERNS
34
35
/**************************************************************************/
36
/*                                                                        */
37
/*  FUNCTION                                               RELEASE        */
38
/*                                                                        */
39
/*    _gxe_multi_line_text_view_event_process             PORTABLE C      */
40
/*                                                           6.1          */
41
/*  AUTHOR                                                                */
42
/*                                                                        */
43
/*    Kenneth Maxwell, Microsoft Corporation                              */
44
/*                                                                        */
45
/*  DESCRIPTION                                                           */
46
/*                                                                        */
47
/*    This function checks for errors in the multi line text view event   */
48
/*    process function                                                    */
49
/*                                                                        */
50
/*  INPUT                                                                 */
51
/*                                                                        */
52
/*    widget                                Multi-line text view widget   */
53
/*                                            control block               */
54
/*    event_ptr                             Point to event to process     */
55
/*                                                                        */
56
/*  OUTPUT                                                                */
57
/*                                                                        */
58
/*    status                                Completion status             */
59
/*                                                                        */
60
/*  CALLS                                                                 */
61
/*                                                                        */
62
/*    _gx_multi_line_text_view_event_process                              */
63
/*                                          The actual multi-line text    */
64
/*                                            view event process function */
65
/*                                                                        */
66
/*  CALLED BY                                                             */
67
/*                                                                        */
68
/*    Application Code                                                    */
69
/*                                                                        */
70
/**************************************************************************/
71
72
7
UINT _gxe_multi_line_text_view_event_process(GX_MULTI_LINE_TEXT_VIEW *view, GX_EVENT *event_ptr)
73
{
74
UINT status;
75
76
    /* Check for invalid caller.  */
77

7
    GX_INIT_AND_THREADS_CALLER_CHECKING
78
79
    /* Check for invalid pointer.  */
80

5
    if ((view == GX_NULL) || (event_ptr == GX_NULL))
81
    {
82
2
        return(GX_PTR_ERROR);
83
    }
84
85
    /* Check for invalid widget.  */
86
3
    if (view -> gx_widget_type == 0)
87
    {
88
1
        return(GX_INVALID_WIDGET);
89
    }
90
91
    /* Call the actual multi line text view event process function. */
92
2
    status = _gx_multi_line_text_view_event_process(view, event_ptr);
93
94
    /* Return completion status.  */
95
2
    return(status);
96
}
97