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

6
    GX_INIT_AND_THREADS_CALLER_CHECKING
69
70
    /* Check for invalid input pointers.  */
71
4
    if (scrollbar == GX_NULL)
72
    {
73
2
        return(GX_PTR_ERROR);
74
    }
75
76
    /* Check for invalid widget.  */
77
2
    if (scrollbar -> gx_widget_type == 0)
78
    {
79
1
        return(GX_INVALID_WIDGET);
80
    }
81
82
    /* Call the actual function.  */
83
1
    status = _gx_scrollbar_limit_check(scrollbar);
84
85
    /* Return successful completion.  */
86
1
    return(status);
87
}
88