1 |
|
|
/*************************************************************************** |
2 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
3 |
|
|
* Copyright (c) 2026-present Eclipse ThreadX contributors |
4 |
|
|
* |
5 |
|
|
* This program and the accompanying materials are made available under the |
6 |
|
|
* terms of the MIT License which is available at |
7 |
|
|
* https://opensource.org/licenses/MIT. |
8 |
|
|
* |
9 |
|
|
* SPDX-License-Identifier: MIT |
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 |
|
|
/**************************************************************************/ |
72 |
|
13766 |
UINT _gx_pixelmap_prompt_pixelmap_set(GX_PIXELMAP_PROMPT *prompt, |
73 |
|
|
GX_RESOURCE_ID normal_left_id, |
74 |
|
|
GX_RESOURCE_ID normal_fill_id, |
75 |
|
|
GX_RESOURCE_ID normal_right_id, |
76 |
|
|
GX_RESOURCE_ID selected_left_id, |
77 |
|
|
GX_RESOURCE_ID selected_fill_id, |
78 |
|
|
GX_RESOURCE_ID selected_right_id) |
79 |
|
|
{ |
80 |
|
13766 |
prompt -> gx_normal_left_pixelmap_id = normal_left_id; |
81 |
|
13766 |
prompt -> gx_normal_fill_pixelmap_id = normal_fill_id; |
82 |
|
13766 |
prompt -> gx_normal_right_pixelmap_id = normal_right_id; |
83 |
|
|
|
84 |
|
13766 |
prompt -> gx_selected_left_pixelmap_id = selected_left_id; |
85 |
|
13766 |
prompt -> gx_selected_fill_pixelmap_id = selected_fill_id; |
86 |
|
13766 |
prompt -> gx_selected_right_pixelmap_id = selected_right_id; |
87 |
|
|
|
88 |
✓✓ |
13766 |
if (prompt -> gx_widget_status & GX_STATUS_VISIBLE) |
89 |
|
|
{ |
90 |
|
|
/* Mark widget as needing to be re-painted. */ |
91 |
|
3 |
_gx_system_dirty_mark((GX_WIDGET *)prompt); |
92 |
|
|
} |
93 |
|
|
|
94 |
|
13766 |
return(GX_SUCCESS); |
95 |
|
|
} |
96 |
|
|
|