GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_single_line_text_input_buffer_get.c Lines: 8 8 100.0 %
Date: 2026-03-06 19:21:09 Branches: 6 6 100.0 %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 * Copyright (c) 2026-present Eclipse ThreadX contributors
4
 *
5
 * This program and the accompanying materials are made available under the
6
 * terms of the MIT License which is available at
7
 * https://opensource.org/licenses/MIT.
8
 *
9
 * SPDX-License-Identifier: MIT
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
/**************************************************************************/
68
250
UINT _gx_single_line_text_input_buffer_get(GX_SINGLE_LINE_TEXT_INPUT *text_input_ptr, GX_CHAR **buffer_address,
69
                                           UINT *content_size, UINT *buffer_size)
70
{
71
250
    if (buffer_address)
72
    {
73
249
        *buffer_address = text_input_ptr -> gx_single_line_text_input_buffer;
74
    }
75
76
250
    if (content_size)
77
    {
78
249
        *content_size = text_input_ptr -> gx_single_line_text_input_string_size;
79
    }
80
81
250
    if (buffer_size)
82
    {
83
249
        *buffer_size = text_input_ptr -> gx_single_line_text_input_buffer_size;
84
    }
85
86
250
    return GX_SUCCESS;
87
}
88