GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_multi_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
/**   Multi Line Text Input Management (Multi 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_multi_line_text_input.h"
29
30
31
/**************************************************************************/
32
/*                                                                        */
33
/*  FUNCTION                                               RELEASE        */
34
/*                                                                        */
35
/*    _gx_multi_line_text_input_buffer_get                PORTABLE C      */
36
/*                                                           6.1          */
37
/*  AUTHOR                                                                */
38
/*                                                                        */
39
/*    Kenneth Maxwell, Microsoft Corporation                              */
40
/*                                                                        */
41
/*  DESCRIPTION                                                           */
42
/*                                                                        */
43
/*    This function retrieves buffer infomation of a multi-line text input*/
44
/*    widget.                                                             */
45
/*                                                                        */
46
/*  INPUT                                                                 */
47
/*                                                                        */
48
/*    text_input                            Multi-line text input widget  */
49
/*                                            control block               */
50
/*    buffer_address                        The address of the input      */
51
/*                                            buffer                      */
52
/*    content_size                          The byte count of the input   */
53
/*                                            data                        */
54
/*    buffer_size                           The size of the input buffer. */
55
/*                                                                        */
56
/*  OUTPUT                                                                */
57
/*                                                                        */
58
/*    status                                Completion status             */
59
/*                                                                        */
60
/*  CALLS                                                                 */
61
/*                                                                        */
62
/*    None                                                                */
63
/*                                                                        */
64
/*  CALLED BY                                                             */
65
/*                                                                        */
66
/*    Application Code                                                    */
67
/*    GUIX Internal Code                                                  */
68
/*                                                                        */
69
/**************************************************************************/
70
3
UINT _gx_multi_line_text_input_buffer_get(GX_MULTI_LINE_TEXT_INPUT *text_input, GX_CHAR **buffer_address,
71
                                          UINT *content_size, UINT *buffer_size)
72
{
73
3
    if (buffer_address)
74
    {
75
2
        *buffer_address = (GX_CHAR *)text_input->gx_multi_line_text_view_text.gx_string_ptr;
76
    }
77
78
3
    if (content_size)
79
    {
80
2
        *content_size = text_input->gx_multi_line_text_view_text.gx_string_length;
81
    }
82
83
3
    if (buffer_size)
84
    {
85
2
        *buffer_size = text_input->gx_multi_line_text_input_buffer_size;
86
    }
87
3
    return GX_SUCCESS;
88
}
89