1 /**************************************************************************/
2 /*                                                                        */
3 /*       Copyright (c) Microsoft Corporation. All rights reserved.        */
4 /*                                                                        */
5 /*       This software is licensed under the Microsoft Software License   */
6 /*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
7 /*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
8 /*       and in the root directory of this software.                      */
9 /*                                                                        */
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 /*  RELEASE HISTORY                                                       */
71 /*                                                                        */
72 /*    DATE              NAME                      DESCRIPTION             */
73 /*                                                                        */
74 /*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
75 /*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
76 /*                                            resulting in version 6.1    */
77 /*                                                                        */
78 /**************************************************************************/
79 
_gxe_multi_line_text_view_event_process(GX_MULTI_LINE_TEXT_VIEW * view,GX_EVENT * event_ptr)80 UINT _gxe_multi_line_text_view_event_process(GX_MULTI_LINE_TEXT_VIEW *view, GX_EVENT *event_ptr)
81 {
82 UINT status;
83 
84     /* Check for invalid caller.  */
85     GX_INIT_AND_THREADS_CALLER_CHECKING
86 
87     /* Check for invalid pointer.  */
88     if ((view == GX_NULL) || (event_ptr == GX_NULL))
89     {
90         return(GX_PTR_ERROR);
91     }
92 
93     /* Check for invalid widget.  */
94     if (view -> gx_widget_type == 0)
95     {
96         return(GX_INVALID_WIDGET);
97     }
98 
99     /* Call the actual multi line text view event process function. */
100     status = _gx_multi_line_text_view_event_process(view, event_ptr);
101 
102     /* Return completion status.  */
103     return(status);
104 }
105 
106