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 /** Single Line Text Input Managment (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 /* FUNCTION RELEASE */
33 /* */
34 /* _gxe_single_line_text_input_draw_position_get PORTABLE C */
35 /* 6.1 */
36 /* AUTHOR */
37 /* */
38 /* Kenneth Maxwell, Microsoft Corporation */
39 /* */
40 /* DESCRIPTION */
41 /* */
42 /* This function checks for errors in the single line text input draw */
43 /* position get call. */
44 /* */
45 /* */
46 /* INPUT */
47 /* */
48 /* input Pointer to single line text */
49 /* input control block */
50 /* xpos Retrieved x-coordinate of */
51 /* text draw start position */
52 /* ypos Retrieved y-coordinate of */
53 /* text draw start position */
54 /* */
55 /* OUTPUT */
56 /* */
57 /* status Completion status */
58 /* */
59 /* CALLS */
60 /* */
61 /* _gx_single_line_text_input_draw_position_get */
62 /* Actual single line text input */
63 /* draw position get fucntion */
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 /**************************************************************************/
_gxe_single_line_text_input_draw_position_get(GX_SINGLE_LINE_TEXT_INPUT * input,GX_VALUE * xpos,GX_VALUE * ypos)78 UINT _gxe_single_line_text_input_draw_position_get(GX_SINGLE_LINE_TEXT_INPUT *input, GX_VALUE *xpos, GX_VALUE *ypos)
79 {
80 UINT status;
81
82 if ((!input) || (!xpos) || (!ypos))
83 {
84 return(GX_PTR_ERROR);
85 }
86
87 /* Check for invalid widget. */
88 if (input -> gx_widget_type == 0)
89 {
90 return(GX_INVALID_WIDGET);
91 }
92
93 status = _gx_single_line_text_input_draw_position_get(input, xpos, ypos);
94
95 return(status);
96 }
97
98