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 /** Text Input Management (Single Line Text Input) */
18 /** */
19 /**************************************************************************/
20
21 #define GX_SOURCE_CODE
22
23
24 /* Include necessary system files. */
25
26 #include "gx_api.h"
27 #include "gx_single_line_text_input.h"
28
29 /* Bring in externs for caller checking code. */
30 GX_CALLER_CHECKING_EXTERNS
31
32 /**************************************************************************/
33 /* */
34 /* FUNCTION RELEASE */
35 /* */
36 /* _gxe_single_line_text_input_buffer_get PORTABLE C */
37 /* 6.1 */
38 /* AUTHOR */
39 /* */
40 /* Kenneth Maxwell, Microsoft Corporation */
41 /* */
42 /* DESCRIPTION */
43 /* */
44 /* This function checks for errors in the single line text input */
45 /* buffer get call. */
46 /* */
47 /* INPUT */
48 /* */
49 /* text_input Single-line text input widget */
50 /* control block */
51 /* buffer_address The address of the input */
52 /* buffer */
53 /* content_size The count of the input data */
54 /* buffer_size The size of the input buffer. */
55 /* */
56 /* OUTPUT */
57 /* */
58 /* status Completion status */
59 /* */
60 /* CALLS */
61 /* */
62 /* _gx_single_line_text_input_buffer_get */
63 /* Actual single line text input */
64 /* buffer get call */
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_single_line_text_input_buffer_get(GX_SINGLE_LINE_TEXT_INPUT * text_input_ptr,GX_CHAR ** buffer_address,UINT * content_size,UINT * buffer_size)80 UINT _gxe_single_line_text_input_buffer_get(GX_SINGLE_LINE_TEXT_INPUT *text_input_ptr, GX_CHAR **buffer_address,
81 UINT *content_size, UINT *buffer_size)
82 {
83 UINT status;
84
85 /* Check for invalid caller. */
86 GX_INIT_AND_THREADS_CALLER_CHECKING
87
88 /* Check for invalid input pointers. */
89 if (text_input_ptr == GX_NULL)
90 {
91 return(GX_PTR_ERROR);
92 }
93
94 if (text_input_ptr -> gx_widget_type == 0)
95 {
96 return(GX_INVALID_WIDGET);
97 }
98
99 /* Call actual single line text input buffer get function. */
100 status = _gx_single_line_text_input_buffer_get(text_input_ptr, buffer_address, content_size, buffer_size);
101
102 return status;
103 }
104
105