GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_window_wallpaper_set.c Lines: 8 8 100.0 %
Date: 2026-03-06 19:21:09 Branches: 10 10 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
/**   Window Management (Window)                                          */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_window.h"
29
30
/* Bring in externs for caller checking code.  */
31
GX_CALLER_CHECKING_EXTERNS
32
33
/**************************************************************************/
34
/*                                                                        */
35
/*  FUNCTION                                               RELEASE        */
36
/*                                                                        */
37
/*    _gxe_window_wallpaper_set                           PORTABLE C      */
38
/*                                                           6.1          */
39
/*  AUTHOR                                                                */
40
/*                                                                        */
41
/*    Kenneth Maxwell, Microsoft Corporation                              */
42
/*                                                                        */
43
/*  DESCRIPTION                                                           */
44
/*                                                                        */
45
/*    This function checks for errors in the window wallpaper set         */
46
/*    function call.                                                      */
47
/*                                                                        */
48
/*  INPUT                                                                 */
49
/*                                                                        */
50
/*    window                             Pointer to window                */
51
/*    wallpaper_id                       Resource ID of wallpaper to use  */
52
/*    tile                               Wallpaper is tiled if GX_TRUE,   */
53
/*                                         otherwise wallpaper is         */
54
/*                                         not tiled                      */
55
/*                                                                        */
56
/*  OUTPUT                                                                */
57
/*                                                                        */
58
/*    status                             Completion status                */
59
/*                                                                        */
60
/*  CALLS                                                                 */
61
/*                                                                        */
62
/*    _gx_window_wallpaper_set           Actual window wallpaper set      */
63
/*                                         function                       */
64
/*                                                                        */
65
/*  CALLED BY                                                             */
66
/*                                                                        */
67
/*    Application Code                                                    */
68
/*                                                                        */
69
/**************************************************************************/
70
89977
UINT _gxe_window_wallpaper_set(GX_WINDOW *window, GX_RESOURCE_ID wallpaper_id, GX_BOOL tile)
71
{
72
UINT status;
73
74
    /* Check for appropriate caller.  */
75

89977
    GX_INIT_AND_THREADS_CALLER_CHECKING
76
77
    /* Check for invalid input pointers.  */
78
89975
    if (window == GX_NULL)
79
    {
80
2
        return(GX_PTR_ERROR);
81
    }
82
83
    /* Check for invalid widget.  */
84
89973
    if (window -> gx_widget_type == 0)
85
    {
86
1
        return(GX_INVALID_WIDGET);
87
    }
88
89
    /* Call actual window wallpaper set function.  */
90
89972
    status = _gx_window_wallpaper_set(window, wallpaper_id, tile);
91
92
    /* Return successful completion.  */
93
89972
    return(status);
94
}
95