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 /** System Management (System) */
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
31
32 /**************************************************************************/
33 /* */
34 /* FUNCTION RELEASE */
35 /* */
36 /* _gx_system_free_view_get PORTABLE C */
37 /* 6.1 */
38 /* AUTHOR */
39 /* */
40 /* Kenneth Maxwell, Microsoft Corporation */
41 /* */
42 /* DESCRIPTION */
43 /* */
44 /* Grabs a free GX_VIEW from the list of free views, updates free */
45 /* view list. */
46 /* */
47 /* */
48 /* INPUT */
49 /* */
50 /* None */
51 /* */
52 /* OUTPUT */
53 /* */
54 /* Returns a pointer to a free GX_VIEW structure */
55 /* */
56 /* CALLS */
57 /* */
58 /* _gx_system_error_process Process a system error */
59 /* */
60 /* CALLED BY */
61 /* */
62 /* _gx_system_view_add Link a view to window's */
63 /* view list */
64 /* */
65 /* RELEASE HISTORY */
66 /* */
67 /* DATE NAME DESCRIPTION */
68 /* */
69 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
70 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
71 /* resulting in version 6.1 */
72 /* */
73 /**************************************************************************/
74
_gx_system_free_view_get(VOID)75 GX_VIEW *_gx_system_free_view_get(VOID)
76 {
77 GX_VIEW *retval = GX_NULL;
78
79 if (_gx_system_free_views)
80 {
81 retval = _gx_system_free_views;
82 _gx_system_free_views = _gx_system_free_views -> gx_view_next;
83 }
84 else
85 {
86 _gx_system_error_process(GX_SYSTEM_OUT_OF_VIEWS);
87 }
88 return retval;
89 }
90
91