GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_window_client_scroll.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_client_scroll                           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 client scroll         */
46
/*    function call.                                                      */
47
/*                                                                        */
48
/*                                                                        */
49
/*  INPUT                                                                 */
50
/*                                                                        */
51
/*    window                                Pointer to window             */
52
/*    x_scroll                              Amount to scroll on x-axis    */
53
/*    y_scroll                              Amount to scroll on y-axis    */
54
/*                                                                        */
55
/*  OUTPUT                                                                */
56
/*                                                                        */
57
/*    status                                Completion status             */
58
/*                                                                        */
59
/*  CALLS                                                                 */
60
/*                                                                        */
61
/*    _gx_window_client_scroll              Actual window client scroll   */
62
/*                                            function                    */
63
/*                                                                        */
64
/*  CALLED BY                                                             */
65
/*                                                                        */
66
/*    Application Code                                                    */
67
/*                                                                        */
68
/**************************************************************************/
69
81
UINT _gxe_window_client_scroll(GX_WINDOW *window, GX_VALUE x_scroll, GX_VALUE y_scroll)
70
{
71
UINT          status;
72
73
    /* Check for appropriate caller.  */
74

81
    GX_INIT_AND_THREADS_CALLER_CHECKING
75
76
    /* Check for invalid input pointers.  */
77
79
    if (window == GX_NULL)
78
    {
79
2
        return(GX_PTR_ERROR);
80
    }
81
82
    /* Check for invalid widget.  */
83
77
    if (window -> gx_widget_type == 0)
84
    {
85
1
        return(GX_INVALID_WIDGET);
86
    }
87
88
    /* Call actual window client scroll function.  */
89
76
    status = _gx_window_client_scroll(window, x_scroll, y_scroll);
90
91
    /* Return completion status.  */
92
76
    return(status);
93
}
94