GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_tree_view_root_pixelmap_set.c Lines: 8 8 100.0 %
Date: 2024-12-05 08:52:37 Branches: 10 10 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
/**   Tree View Management (Tree View)                                    */
18
/**                                                                       */
19
/**************************************************************************/
20
21
#define GX_SOURCE_CODE
22
23
24
/* Include necessary system files.  */
25
26
#include "gx_api.h"
27
#include "gx_tree_view.h"
28
29
/* Bring in externs for caller checking code.  */
30
GX_CALLER_CHECKING_EXTERNS
31
32
/**************************************************************************/
33
/*                                                                        */
34
/*  FUNCTION                                               RELEASE        */
35
/*                                                                        */
36
/*    _gxe_tree_view_root_pixelmap_set                    PORTABLE C      */
37
/*                                                           6.1          */
38
/*  AUTHOR                                                                */
39
/*                                                                        */
40
/*    Kenneth Maxwell, Microsoft Corporation                              */
41
/*                                                                        */
42
/*  DESCRIPTION                                                           */
43
/*                                                                        */
44
/*    This function checks for errors in tree view root pixelmap set      */
45
/*    function call.                                                      */
46
/*                                                                        */
47
/*  INPUT                                                                 */
48
/*                                                                        */
49
/*    tree                                  Pointer to the tree view      */
50
/*                                            control block               */
51
/*    expand_map_id                         Resource id of expand         */
52
/*                                            pixelmap                    */
53
/*    collapse_map_id                       Reource id of collapse        */
54
/*                                            pixlemap                    */
55
/*                                                                        */
56
/*  OUTPUT                                                                */
57
/*                                                                        */
58
/*    status                                Completion status             */
59
/*                                                                        */
60
/*  CALLS                                                                 */
61
/*                                                                        */
62
/*    _gxe_tree_view_root_pixelmap_set      Actual tree view root         */
63
/*                                            pixelmap set function call  */
64
/*                                                                        */
65
/*  CALLED BY                                                             */
66
/*                                                                        */
67
/*    Application Code                                                    */
68
/*                                                                        */
69
/*  RELEASE HISTORY                                                       */
70
/*                                                                        */
71
/*    DATE              NAME                      DESCRIPTION             */
72
/*                                                                        */
73
/*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
74
/*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
75
/*                                            resulting in version 6.1    */
76
/*                                                                        */
77
/**************************************************************************/
78
484
UINT  _gxe_tree_view_root_pixelmap_set(GX_TREE_VIEW *tree, GX_RESOURCE_ID expand_map_id, GX_RESOURCE_ID collapse_map_id)
79
{
80
UINT status;
81
82
    /* Check for appropriate caller.  */
83

484
    GX_INIT_AND_THREADS_CALLER_CHECKING
84
85
    /* Check for invalid input pointers.  */
86
482
    if (!tree)
87
    {
88
2
        return(GX_PTR_ERROR);
89
    }
90
91
    /* Check for invalid widget. */
92
480
    if (tree -> gx_widget_type == 0)
93
    {
94
1
        return(GX_INVALID_WIDGET);
95
    }
96
97
    /* Call actual tree view root pixelmap set function.  */
98
479
    status = _gx_tree_view_root_pixelmap_set(tree, expand_map_id, collapse_map_id);
99
100
479
    return(status);
101
}
102