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 /**   Text Input Management (Single Line Text Input)                      */
19 /**                                                                       */
20 /**************************************************************************/
21 
22 #define GX_SOURCE_CODE
23 
24 
25 /* Include necessary system files.  */
26 
27 #include "gx_api.h"
28 #include "gx_single_line_text_input.h"
29 
30 
31 /**************************************************************************/
32 /*                                                                        */
33 /*  FUNCTION                                               RELEASE        */
34 /*                                                                        */
35 /*    gx_single_line_text_input_buffer_get                PORTABLE C      */
36 /*                                                           6.1          */
37 /*  AUTHOR                                                                */
38 /*                                                                        */
39 /*    Kenneth Maxwell, Microsoft Corporation                              */
40 /*                                                                        */
41 /*  DESCRIPTION                                                           */
42 /*                                                                        */
43 /*    This service retrieves buffer information of the text input widget. */
44 /*                                                                        */
45 /*  INPUT                                                                 */
46 /*                                                                        */
47 /*    text_input_ptr                        Single line text input        */
48 /*                                            control blcok               */
49 /*    buffer_address                        The address of the input      */
50 /*                                            buffer                      */
51 /*    content_size                          The count of the input data   */
52 /*    buffer_size                           The size of the input buffer. */
53 /*                                                                        */
54 /*  OUTPUT                                                                */
55 /*                                                                        */
56 /*    status                                Completion status             */
57 /*                                                                        */
58 /*  CALLS                                                                 */
59 /*                                                                        */
60 /*    None                                                                */
61 /*                                                                        */
62 /*  CALLED BY                                                             */
63 /*                                                                        */
64 /*    Application Code                                                    */
65 /*    GUIX Internal Code                                                  */
66 /*                                                                        */
67 /*  RELEASE HISTORY                                                       */
68 /*                                                                        */
69 /*    DATE              NAME                      DESCRIPTION             */
70 /*                                                                        */
71 /*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
72 /*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
73 /*                                            resulting in version 6.1    */
74 /*                                                                        */
75 /**************************************************************************/
_gx_single_line_text_input_buffer_get(GX_SINGLE_LINE_TEXT_INPUT * text_input_ptr,GX_CHAR ** buffer_address,UINT * content_size,UINT * buffer_size)76 UINT _gx_single_line_text_input_buffer_get(GX_SINGLE_LINE_TEXT_INPUT *text_input_ptr, GX_CHAR **buffer_address,
77                                            UINT *content_size, UINT *buffer_size)
78 {
79     if (buffer_address)
80     {
81         *buffer_address = text_input_ptr -> gx_single_line_text_input_buffer;
82     }
83 
84     if (content_size)
85     {
86         *content_size = text_input_ptr -> gx_single_line_text_input_string_size;
87     }
88 
89     if (buffer_size)
90     {
91         *buffer_size = text_input_ptr -> gx_single_line_text_input_buffer_size;
92     }
93 
94     return GX_SUCCESS;
95 }
96 
97