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 /**   Canvas Management (Canvas)                                          */
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 #include "gx_utility.h"
30 #include "gx_canvas.h"
31 #include "gx_port.h"
32 
33 /* Bring in externs for caller checking code.  */
34 GX_CALLER_CHECKING_EXTERNS
35 
36 
37 /**************************************************************************/
38 /*                                                                        */
39 /*  FUNCTION                                               RELEASE        */
40 /*                                                                        */
41 /*    _gxe_canvas_show                                    PORTABLE C      */
42 /*                                                           6.1          */
43 /*  AUTHOR                                                                */
44 /*                                                                        */
45 /*    Kenneth Maxwell, Microsoft Corporation                              */
46 /*                                                                        */
47 /*  DESCRIPTION                                                           */
48 /*                                                                        */
49 /*    This function checks for errors in the canvas show function         */
50 /*    call.                                                               */
51 /*                                                                        */
52 /*  INPUT                                                                 */
53 /*                                                                        */
54 /*    canvas                                Canvas control block          */
55 /*    alpha                                 alpha value                   */
56 /*                                                                        */
57 /*  OUTPUT                                                                */
58 /*                                                                        */
59 /*    status                                Completion status             */
60 /*                                                                        */
61 /*  CALLS                                                                 */
62 /*                                                                        */
63 /*    _gx_canvas_show                       Actual canvas alpha set call  */
64 /*                                                                        */
65 /*  CALLED BY                                                             */
66 /*                                                                        */
67 /*    Application Code                                                    */
68 /*                                                                        */
69 /*  RELEASE HISTORY                                                       */
70 /*                                                                        */
71 /*    DATE              NAME                      DESCRIPTION             */
72 /*                                                                        */
73 /*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
74 /*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
75 /*                                            resulting in version 6.1    */
76 /*                                                                        */
77 /**************************************************************************/
_gxe_canvas_show(GX_CANVAS * canvas)78 UINT  _gxe_canvas_show(GX_CANVAS *canvas)
79 {
80 UINT status;
81 
82     /* Check for appropriate caller.  */
83     GX_INIT_AND_THREADS_CALLER_CHECKING
84 
85     /* Check for the invalid input pointers.  */
86     if (canvas == GX_NULL)
87     {
88         return(GX_PTR_ERROR);
89     }
90 
91     if (canvas -> gx_canvas_id != GX_CANVAS_ID)
92     {
93         return (GX_INVALID_CANVAS);
94     }
95 
96     /* Call the actual canvas alpha set function.  */
97     status = _gx_canvas_show(canvas);
98 
99     /* Return completion status.  */
100     return status;
101 }
102 
103