1 /**************************************************************************/
2 /* */
3 /* Copyright (c) Microsoft Corporation. All rights reserved. */
4 /* */
5 /* This software is licensed under the Microsoft Software License */
6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */
7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
8 /* and in the root directory of this software. */
9 /* */
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 /* RELEASE HISTORY */
63 /* */
64 /* DATE NAME DESCRIPTION */
65 /* */
66 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
67 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
68 /* resulting in version 6.1 */
69 /* */
70 /**************************************************************************/
_gxe_scrollbar_limit_check(GX_SCROLLBAR * scrollbar)71 UINT _gxe_scrollbar_limit_check(GX_SCROLLBAR *scrollbar)
72 {
73 UINT status;
74
75 /* Check for appropriate caller. */
76 GX_INIT_AND_THREADS_CALLER_CHECKING
77
78 /* Check for invalid input pointers. */
79 if (scrollbar == GX_NULL)
80 {
81 return(GX_PTR_ERROR);
82 }
83
84 /* Check for invalid widget. */
85 if (scrollbar -> gx_widget_type == 0)
86 {
87 return(GX_INVALID_WIDGET);
88 }
89
90 /* Call the actual function. */
91 status = _gx_scrollbar_limit_check(scrollbar);
92
93 /* Return successful completion. */
94 return(status);
95 }
96
97