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 /** Button Management (Button) */
19 /** */
20 /**************************************************************************/
21
22 #define GX_SOURCE_CODE
23
24
25 /* Include necessary system files. */
26
27 #include "gx_api.h"
28 #include "gx_widget.h"
29 #include "gx_button.h"
30 #include "gx_system.h"
31 #include "gx_utility.h"
32
33 /* Bring in externs for caller checking code. */
34 GX_CALLER_CHECKING_EXTERNS
35
36 /**************************************************************************/
37 /* */
38 /* FUNCTION RELEASE */
39 /* */
40 /* _gxe_radio_button_pixelmap_set PORTABLE C */
41 /* 6.1 */
42 /* AUTHOR */
43 /* */
44 /* Kenneth Maxwell, Microsoft Corporation */
45 /* */
46 /* DESCRIPTION */
47 /* */
48 /* This function checks for errors in the checkbox pixlemap set routine*/
49 /* button. */
50 /* */
51 /* INPUT */
52 /* */
53 /* button Button control block */
54 /* off_id Resource ID of the pixelmap */
55 /* used for draw button off */
56 /* on_id Resource ID of the pixelmap */
57 /* used for checke d box */
58 /* off_disabled_id Resource ID of the pixelmap */
59 /* used for unchecked disabled */
60 /* box */
61 /* on_disabled_id Resource ID of the pixelmap */
62 /* used for checked disabled */
63 /* box */
64 /* */
65 /* OUTPUT */
66 /* */
67 /* status Completion status */
68 /* */
69 /* CALLS */
70 /* */
71 /* _gx_radio_button_pixelmap_set Acutal pixelmap set function */
72 /* */
73 /* CALLED BY */
74 /* */
75 /* Application Code */
76 /* */
77 /* RELEASE HISTORY */
78 /* */
79 /* DATE NAME DESCRIPTION */
80 /* */
81 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
82 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
83 /* resulting in version 6.1 */
84 /* */
85 /**************************************************************************/
_gxe_radio_button_pixelmap_set(GX_RADIO_BUTTON * button,GX_RESOURCE_ID off_id,GX_RESOURCE_ID on_id,GX_RESOURCE_ID off_disabled_id,GX_RESOURCE_ID on_disabled_id)86 UINT _gxe_radio_button_pixelmap_set(GX_RADIO_BUTTON *button,
87 GX_RESOURCE_ID off_id,
88 GX_RESOURCE_ID on_id,
89 GX_RESOURCE_ID off_disabled_id,
90 GX_RESOURCE_ID on_disabled_id)
91 {
92 UINT status;
93
94 /* Check for appropriate caller. */
95 GX_INIT_AND_THREADS_CALLER_CHECKING
96
97 /* Check for the invalid input pointers. */
98 if (button == GX_NULL)
99 {
100 return(GX_PTR_ERROR);
101 }
102
103 /* Check for invalid widget. */
104 if (button->gx_widget_type == 0)
105 {
106 return(GX_INVALID_WIDGET);
107 }
108
109 status = _gx_radio_button_pixelmap_set(button, off_id, on_id,
110 off_disabled_id, on_disabled_id);
111
112 return(status);
113 }
114
115