GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_multi_line_text_button_event_process.c Lines: 10 10 100.0 %
Date: 2026-03-06 19:21:09 Branches: 2 2 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 Button Management (Button)                                     */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_widget.h"
29
#include "gx_button.h"
30
31
/**************************************************************************/
32
/*                                                                        */
33
/*  FUNCTION                                               RELEASE        */
34
/*                                                                        */
35
/*    _gx_multi_line_text_button_event_process            PORTABLE C      */
36
/*                                                           6.1          */
37
/*  AUTHOR                                                                */
38
/*                                                                        */
39
/*    Kenneth Maxwell, Microsoft Corporation                              */
40
/*                                                                        */
41
/*  DESCRIPTION                                                           */
42
/*                                                                        */
43
/*    This function creates a multi-line text button, which is a special  */
44
/*    type of button (widget).                                            */
45
/*                                                                        */
46
/*  INPUT                                                                 */
47
/*                                                                        */
48
/*    button                                Button control block          */
49
/*    name                                  Name of button                */
50
/*    parent                                Parent widget control block   */
51
/*    text_id                               text resource id              */
52
/*    style                                 Style of button               */
53
/*    size                                  Button size                   */
54
/*                                                                        */
55
/*  OUTPUT                                                                */
56
/*                                                                        */
57
/*    status                                Completion status             */
58
/*                                                                        */
59
/*  CALLS                                                                 */
60
/*                                                                        */
61
/*    _gx_text_button_event_process                                       */
62
/*    _gx_multi_line_text_button_line_pointers_set                        */
63
/*                                                                        */
64
/*  CALLED BY                                                             */
65
/*                                                                        */
66
/*    System and Application Code                                         */
67
/*                                                                        */
68
/**************************************************************************/
69
466
UINT  _gx_multi_line_text_button_event_process(GX_MULTI_LINE_TEXT_BUTTON *button, GX_EVENT *event_ptr)
70
{
71
UINT status;
72
73
    /* Default status to success.  */
74
466
    status =  GX_SUCCESS;
75
76
    /* Process relative to the type of event.  */
77
466
    switch (event_ptr -> gx_event_type)
78
    {
79
272
    case GX_EVENT_SHOW:
80
    case GX_EVENT_LANGUAGE_CHANGE:
81
272
        status = _gx_text_button_event_process((GX_TEXT_BUTTON *)button, event_ptr);
82
272
        _gx_multi_line_text_button_line_pointers_set(button);
83
272
        break;
84
85
#if defined(GX_DYNAMIC_BIDI_TEXT_SUPPORT)
86
    case GX_EVENT_DYNAMIC_BIDI_TEXT_ENABLE:
87
    case GX_EVENT_DYNAMIC_BIDI_TEXT_DISABLE:
88
        _gx_multi_line_text_button_line_pointers_set(button);
89
        break;
90
#endif
91
92
194
    default:
93
94
        /* Call the widget default processing.  */
95
194
        status = _gx_text_button_event_process((GX_TEXT_BUTTON *)button, event_ptr);
96
    }
97
98
    /* Return completion status.  */
99
466
    return(status);
100
}
101