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

7
    GX_INIT_AND_THREADS_CALLER_CHECKING
85
86
    /* Check for invalid pointer.  */
87

5
    if ((view == GX_NULL) || (event_ptr == GX_NULL))
88
    {
89
2
        return(GX_PTR_ERROR);
90
    }
91
92
    /* Check for invalid widget.  */
93
3
    if (view -> gx_widget_type == 0)
94
    {
95
1
        return(GX_INVALID_WIDGET);
96
    }
97
98
    /* Call the actual multi line text view event process function. */
99
2
    status = _gx_multi_line_text_view_event_process(view, event_ptr);
100
101
    /* Return completion status.  */
102
2
    return(status);
103
}
104