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 /** Prompt Management (Prompt) */
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_pixelmap_prompt.h"
32
33
34 /**************************************************************************/
35 /* */
36 /* FUNCTION RELEASE */
37 /* */
38 /* _gx_pixelmap_prompt_pixelmap_set PORTABLE C */
39 /* 6.1 */
40 /* AUTHOR */
41 /* */
42 /* Kenneth Maxwell, Microsoft Corporation */
43 /* */
44 /* DESCRIPTION */
45 /* */
46 /* This function assigned the pixelmaps used to draw a pixelmap_prompt */
47 /* */
48 /* */
49 /* INPUT */
50 /* */
51 /* prompt Prompt control block */
52 /* normal_left_id Left pixelmap ID */
53 /* normal_fill_id Fill pixelmap ID */
54 /* normal_right_id Right pixelmap ID */
55 /* selected_left_id Left pixelmap ID */
56 /* selected_fill_id Fill pixelmap ID */
57 /* selected_right_id Right pixelmap ID */
58 /* */
59 /* OUTPUT */
60 /* */
61 /* status Completion status */
62 /* */
63 /* CALLS */
64 /* */
65 /* _gx_system_dirty_mark Mark the widget as dirty */
66 /* */
67 /* CALLED BY */
68 /* */
69 /* Application Code */
70 /* */
71 /* RELEASE HISTORY */
72 /* */
73 /* DATE NAME DESCRIPTION */
74 /* */
75 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
76 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
77 /* resulting in version 6.1 */
78 /* */
79 /**************************************************************************/
_gx_pixelmap_prompt_pixelmap_set(GX_PIXELMAP_PROMPT * prompt,GX_RESOURCE_ID normal_left_id,GX_RESOURCE_ID normal_fill_id,GX_RESOURCE_ID normal_right_id,GX_RESOURCE_ID selected_left_id,GX_RESOURCE_ID selected_fill_id,GX_RESOURCE_ID selected_right_id)80 UINT _gx_pixelmap_prompt_pixelmap_set(GX_PIXELMAP_PROMPT *prompt,
81 GX_RESOURCE_ID normal_left_id,
82 GX_RESOURCE_ID normal_fill_id,
83 GX_RESOURCE_ID normal_right_id,
84 GX_RESOURCE_ID selected_left_id,
85 GX_RESOURCE_ID selected_fill_id,
86 GX_RESOURCE_ID selected_right_id)
87 {
88 prompt -> gx_normal_left_pixelmap_id = normal_left_id;
89 prompt -> gx_normal_fill_pixelmap_id = normal_fill_id;
90 prompt -> gx_normal_right_pixelmap_id = normal_right_id;
91
92 prompt -> gx_selected_left_pixelmap_id = selected_left_id;
93 prompt -> gx_selected_fill_pixelmap_id = selected_fill_id;
94 prompt -> gx_selected_right_pixelmap_id = selected_right_id;
95
96 if (prompt -> gx_widget_status & GX_STATUS_VISIBLE)
97 {
98 /* Mark widget as needing to be re-painted. */
99 _gx_system_dirty_mark((GX_WIDGET *)prompt);
100 }
101
102 return(GX_SUCCESS);
103 }
104
105