GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_single_line_text_input_draw_position_get.c Lines: 7 7 100.0 %
Date: 2024-12-05 08:52:37 Branches: 8 8 100.0 %

Line Branch Exec Source
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
/**   Single Line Text Input Managment (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
/**************************************************************************/
30
/*                                                                        */
31
/*  FUNCTION                                               RELEASE        */
32
/*                                                                        */
33
/*    _gxe_single_line_text_input_draw_position_get       PORTABLE C      */
34
/*                                                           6.1          */
35
/*  AUTHOR                                                                */
36
/*                                                                        */
37
/*    Kenneth Maxwell, Microsoft Corporation                              */
38
/*                                                                        */
39
/*  DESCRIPTION                                                           */
40
/*                                                                        */
41
/*    This function checks for errors in the single line text input draw  */
42
/*    position get call.                                                  */
43
/*                                                                        */
44
/*                                                                        */
45
/*  INPUT                                                                 */
46
/*                                                                        */
47
/*    input                                 Pointer to single line text   */
48
/*                                            input control block         */
49
/*    xpos                                  Retrieved x-coordinate of     */
50
/*                                            text draw start position    */
51
/*    ypos                                  Retrieved y-coordinate of     */
52
/*                                            text draw start position    */
53
/*                                                                        */
54
/*  OUTPUT                                                                */
55
/*                                                                        */
56
/*    status                                Completion status             */
57
/*                                                                        */
58
/*  CALLS                                                                 */
59
/*                                                                        */
60
/*    _gx_single_line_text_input_draw_position_get                        */
61
/*                                          Actual single line text input */
62
/*                                            draw position get fucntion  */
63
/*                                                                        */
64
/*  CALLED BY                                                             */
65
/*                                                                        */
66
/*    Application Code                                                    */
67
/*                                                                        */
68
/*  RELEASE HISTORY                                                       */
69
/*                                                                        */
70
/*    DATE              NAME                      DESCRIPTION             */
71
/*                                                                        */
72
/*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
73
/*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
74
/*                                            resulting in version 6.1    */
75
/*                                                                        */
76
/**************************************************************************/
77
5
UINT _gxe_single_line_text_input_draw_position_get(GX_SINGLE_LINE_TEXT_INPUT *input, GX_VALUE *xpos, GX_VALUE *ypos)
78
{
79
    UINT status;
80
81

5
    if ((!input) || (!xpos) || (!ypos))
82
    {
83
3
        return(GX_PTR_ERROR);
84
    }
85
86
    /* Check for invalid widget. */
87
2
    if (input -> gx_widget_type == 0)
88
    {
89
1
        return(GX_INVALID_WIDGET);
90
    }
91
92
1
    status = _gx_single_line_text_input_draw_position_get(input, xpos, ypos);
93
94
1
    return(status);
95
}
96