GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_scrollbar_limit_check.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
/**   Scroll Management (Scroll)                                          */
18
/**                                                                       */
19
/**************************************************************************/
20
21
#define GX_SOURCE_CODE
22
23
/* Include necessary system files.  */
24
25
#include "gx_api.h"
26
#include "gx_scrollbar.h"
27
28
/* Bring in externs for caller checking code.  */
29
GX_CALLER_CHECKING_EXTERNS
30
31
/**************************************************************************/
32
/*                                                                        */
33
/*  FUNCTION                                               RELEASE        */
34
/*                                                                        */
35
/*    _gxe_scrollbar_limit_check                          PORTABLE C      */
36
/*                                                           6.1          */
37
/*  AUTHOR                                                                */
38
/*                                                                        */
39
/*    Kenneth Maxwell, Microsoft Corporation                              */
40
/*                                                                        */
41
/*  DESCRIPTION                                                           */
42
/*                                                                        */
43
/*    The service checks errors in the scrollbar limit check function.    */
44
/*                                                                        */
45
/*  INPUT                                                                 */
46
/*                                                                        */
47
/*    scrollbar                             scrollbar control block       */
48
/*                                                                        */
49
/*  OUTPUT                                                                */
50
/*                                                                        */
51
/*    status                                Completion status             */
52
/*                                                                        */
53
/*  CALLS                                                                 */
54
/*                                                                        */
55
/*   _gx_scrollbar_limit_check              The actual function           */
56
/*                                                                        */
57
/*  CALLED BY                                                             */
58
/*                                                                        */
59
/*    Application Code                                                    */
60
/*                                                                        */
61
/*  RELEASE HISTORY                                                       */
62
/*                                                                        */
63
/*    DATE              NAME                      DESCRIPTION             */
64
/*                                                                        */
65
/*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
66
/*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
67
/*                                            resulting in version 6.1    */
68
/*                                                                        */
69
/**************************************************************************/
70
6
UINT  _gxe_scrollbar_limit_check(GX_SCROLLBAR *scrollbar)
71
{
72
UINT status;
73
74
    /* Check for appropriate caller.  */
75

6
    GX_INIT_AND_THREADS_CALLER_CHECKING
76
77
    /* Check for invalid input pointers.  */
78
4
    if (scrollbar == GX_NULL)
79
    {
80
2
        return(GX_PTR_ERROR);
81
    }
82
83
    /* Check for invalid widget.  */
84
2
    if (scrollbar -> gx_widget_type == 0)
85
    {
86
1
        return(GX_INVALID_WIDGET);
87
    }
88
89
    /* Call the actual function.  */
90
1
    status = _gx_scrollbar_limit_check(scrollbar);
91
92
    /* Return successful completion.  */
93
1
    return(status);
94
}
95