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 
_gxe_multi_line_text_view_event_process(GX_MULTI_LINE_TEXT_VIEW * view,GX_EVENT * event_ptr)79 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     GX_INIT_AND_THREADS_CALLER_CHECKING
85 
86     /* Check for invalid pointer.  */
87     if ((view == GX_NULL) || (event_ptr == GX_NULL))
88     {
89         return(GX_PTR_ERROR);
90     }
91 
92     /* Check for invalid widget.  */
93     if (view -> gx_widget_type == 0)
94     {
95         return(GX_INVALID_WIDGET);
96     }
97 
98     /* Call the actual multi line text view event process function. */
99     status = _gx_multi_line_text_view_event_process(view, event_ptr);
100 
101     /* Return completion status.  */
102     return(status);
103 }
104 
105