GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_context_raw_line_color_set.c Lines: 5 5 100.0 %
Date: 2024-12-05 08:52:37 Branches: 2 2 100.0 %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 *
4
 * This program and the accompanying materials are made available under the
5
 * terms of the MIT License which is available at
6
 * https://opensource.org/licenses/MIT.
7
 *
8
 * SPDX-License-Identifier: MIT
9
 **************************************************************************/
10
11
12
/**************************************************************************/
13
/**************************************************************************/
14
/**                                                                       */
15
/** GUIX Component                                                        */
16
/**                                                                       */
17
/**   Context Management (Context)                                        */
18
/**                                                                       */
19
/**************************************************************************/
20
21
#define GX_SOURCE_CODE
22
/* Include necessary system files.  */
23
24
#include "gx_api.h"
25
#include "gx_system.h"
26
#include "gx_context.h"
27
28
/**************************************************************************/
29
/*                                                                        */
30
/*  FUNCTION                                               RELEASE        */
31
/*                                                                        */
32
/*    _gxe_context_raw_line_color_set                     PORTABLE C      */
33
/*                                                           6.1          */
34
/*  AUTHOR                                                                */
35
/*                                                                        */
36
/*    Kenneth Maxwell, Microsoft Corporation                              */
37
/*                                                                        */
38
/*  DESCRIPTION                                                           */
39
/*                                                                        */
40
/*    This function checks for errors in the context raw line color set   */
41
/*    call.                                                               */
42
/*                                                                        */
43
/*  INPUT                                                                 */
44
/*                                                                        */
45
/*    line_color                            Line color of current context */
46
/*                                                                        */
47
/*  OUTPUT                                                                */
48
/*                                                                        */
49
/*    status                                Completion status             */
50
/*                                                                        */
51
/*  CALLS                                                                 */
52
/*                                                                        */
53
/*    _gx_context_raw_line_color_set        Actual context raw line color */
54
/*                                            set function                */
55
/*                                                                        */
56
/*  CALLED BY                                                             */
57
/*                                                                        */
58
/*    Application Code                                                    */
59
/*                                                                        */
60
/*  RELEASE HISTORY                                                       */
61
/*                                                                        */
62
/*    DATE              NAME                      DESCRIPTION             */
63
/*                                                                        */
64
/*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
65
/*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
66
/*                                            resulting in version 6.1    */
67
/*                                                                        */
68
/**************************************************************************/
69
873
UINT _gxe_context_raw_line_color_set(GX_COLOR line_color)
70
{
71
UINT status;
72
73
873
    if (_gx_system_current_draw_context == GX_NULL)
74
    {
75
2
        return GX_INVALID_CONTEXT;
76
    }
77
78
    /* Call the actual context raw line color set function.  */
79
871
    status = _gx_context_raw_line_color_set(line_color);
80
81
    /* Return completion status.  */
82
871
    return status;
83
}
84