GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_system_scroll_appearance_set.c Lines: 7 7 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
/**   System Management (System)                                          */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_system.h"
29
30
31
/**************************************************************************/
32
/*                                                                        */
33
/*  FUNCTION                                               RELEASE        */
34
/*                                                                        */
35
/*    _gx_system_scroll_appearance_set                    PORTABLE C      */
36
/*                                                           6.1          */
37
/*  AUTHOR                                                                */
38
/*                                                                        */
39
/*    Kenneth Maxwell, Microsoft Corporation                              */
40
/*                                                                        */
41
/*  DESCRIPTION                                                           */
42
/*                                                                        */
43
/*    This service sets the default scrollbar appearance.                 */
44
/*                                                                        */
45
/*  INPUT                                                                 */
46
/*                                                                        */
47
/*    style                                 Scrollbar style               */
48
/*                                            GX_SCROLLBAR_HORIZONTAL or  */
49
/*                                            GX_SCROLLBAR_VERTICAL       */
50
/*    appearance                            Pointer to appearance         */
51
/*                                            structure initialized with  */
52
/*                                            various scrollbar           */
53
/*                                            appearance attributes.      */
54
/*                                                                        */
55
/*  OUTPUT                                                                */
56
/*                                                                        */
57
/*    status                                Completion status             */
58
/*                                                                        */
59
/*  CALLS                                                                 */
60
/*                                                                        */
61
/*    None                                  Completion status             */
62
/*                                                                        */
63
/*  CALLED BY                                                             */
64
/*                                                                        */
65
/*    Application Code                                                    */
66
/*                                                                        */
67
/**************************************************************************/
68
1534
UINT _gx_system_scroll_appearance_set(ULONG style, GX_SCROLLBAR_APPEARANCE *appearance)
69
{
70
1534
    if (style & GX_SCROLLBAR_HORIZONTAL)
71
    {
72
791
        _gx_system_horizontal_scrollbar_style = style;
73
791
        _gx_system_horizontal_scrollbar_appearance = *appearance;
74
    }
75
    else
76
    {
77
743
        _gx_system_vertical_scrollbar_style = style;
78
743
        _gx_system_vertical_scrollbar_appearance = *appearance;
79
    }
80
81
1534
    return(GX_SUCCESS);
82
}
83