GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_context_raw_line_color_set.c Lines: 5 5 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
/**   Context Management (Context)                                        */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
/* Include necessary system files.  */
24
25
#include "gx_api.h"
26
#include "gx_system.h"
27
#include "gx_context.h"
28
29
/**************************************************************************/
30
/*                                                                        */
31
/*  FUNCTION                                               RELEASE        */
32
/*                                                                        */
33
/*    _gxe_context_raw_line_color_set                     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 context raw line color set   */
42
/*    call.                                                               */
43
/*                                                                        */
44
/*  INPUT                                                                 */
45
/*                                                                        */
46
/*    line_color                            Line color of current context */
47
/*                                                                        */
48
/*  OUTPUT                                                                */
49
/*                                                                        */
50
/*    status                                Completion status             */
51
/*                                                                        */
52
/*  CALLS                                                                 */
53
/*                                                                        */
54
/*    _gx_context_raw_line_color_set        Actual context raw line color */
55
/*                                            set function                */
56
/*                                                                        */
57
/*  CALLED BY                                                             */
58
/*                                                                        */
59
/*    Application Code                                                    */
60
/*                                                                        */
61
/**************************************************************************/
62
873
UINT _gxe_context_raw_line_color_set(GX_COLOR line_color)
63
{
64
UINT status;
65
66
873
    if (_gx_system_current_draw_context == GX_NULL)
67
    {
68
2
        return GX_INVALID_CONTEXT;
69
    }
70
71
    /* Call the actual context raw line color set function.  */
72
871
    status = _gx_context_raw_line_color_set(line_color);
73
74
    /* Return completion status.  */
75
871
    return status;
76
}
77