GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_rich_text_view_fonts_set.c Lines: 6 6 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
/**   Rich Text View Management (Rich Text View)                          */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_rich_text_view.h"
29
#include "gx_system.h"
30
31
/**************************************************************************/
32
/*                                                                        */
33
/*  FUNCTION                                               RELEASE        */
34
/*                                                                        */
35
/*    _gx_rich_text_view_font_set                         PORTABLE C      */
36
/*                                                           6.1          */
37
/*  AUTHOR                                                                */
38
/*                                                                        */
39
/*    Kenneth Maxwell, Microsoft Corporation                              */
40
/*                                                                        */
41
/*  DESCRIPTION                                                           */
42
/*                                                                        */
43
/*    This service sets the font of a rich text view widget.              */
44
/*                                                                        */
45
/*  INPUT                                                                 */
46
/*                                                                        */
47
/*    text_view                             Rich text view widget         */
48
/*                                            control block               */
49
/*    fonts                                 Font list                     */
50
/*                                                                        */
51
/*  OUTPUT                                                                */
52
/*                                                                        */
53
/*    status                                Completion status             */
54
/*                                                                        */
55
/*  CALLS                                                                 */
56
/*                                                                        */
57
/*    _gx_system_dirty_mark                 Mark a widget as dirty        */
58
/*                                                                        */
59
/*  CALLED BY                                                             */
60
/*                                                                        */
61
/*    Application Code                                                    */
62
/*                                                                        */
63
/**************************************************************************/
64
5
UINT  _gx_rich_text_view_fonts_set(GX_RICH_TEXT_VIEW *text_view, GX_RICH_TEXT_FONTS *fonts)
65
{
66
    /* Update rich text view fonts. */
67
5
    text_view -> gx_rich_text_view_fonts = *fonts;
68
69
    /* Mark that we need to update text total height. */
70
5
    text_view -> gx_multi_line_text_view_line_index_old = GX_TRUE;
71
72
5
    if (text_view -> gx_widget_status & GX_STATUS_VISIBLE)
73
    {
74
        /* Mark widget as dirty. */
75
4
        _gx_system_dirty_mark((GX_WIDGET *)text_view);
76
    }
77
78
5
    return(GX_SUCCESS);
79
}
80