1 |
|
|
/*************************************************************************** |
2 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
3 |
|
|
* |
4 |
|
|
* This program and the accompanying materials are made available under the |
5 |
|
|
* terms of the MIT License which is available at |
6 |
|
|
* https://opensource.org/licenses/MIT. |
7 |
|
|
* |
8 |
|
|
* SPDX-License-Identifier: MIT |
9 |
|
|
**************************************************************************/ |
10 |
|
|
|
11 |
|
|
|
12 |
|
|
/**************************************************************************/ |
13 |
|
|
/**************************************************************************/ |
14 |
|
|
/** */ |
15 |
|
|
/** GUIX Component */ |
16 |
|
|
/** */ |
17 |
|
|
/** Text Scroll Wheel Management (Scroll Wheel) */ |
18 |
|
|
/** */ |
19 |
|
|
/**************************************************************************/ |
20 |
|
|
|
21 |
|
|
#define GX_SOURCE_CODE |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
/* Include necessary system files. */ |
25 |
|
|
|
26 |
|
|
#include "gx_api.h" |
27 |
|
|
#include "gx_scroll_wheel.h" |
28 |
|
|
|
29 |
|
|
GX_CALLER_CHECKING_EXTERNS |
30 |
|
|
|
31 |
|
|
|
32 |
|
|
/**************************************************************************/ |
33 |
|
|
/* */ |
34 |
|
|
/* FUNCTION RELEASE */ |
35 |
|
|
/* */ |
36 |
|
|
/* _gxe_text_scroll_wheel_text_color_set PORTABLE C */ |
37 |
|
|
/* 6.1 */ |
38 |
|
|
/* AUTHOR */ |
39 |
|
|
/* */ |
40 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
41 |
|
|
/* */ |
42 |
|
|
/* DESCRIPTION */ |
43 |
|
|
/* */ |
44 |
|
|
/* This function checks for errors in scroll wheel base text color set.*/ |
45 |
|
|
/* */ |
46 |
|
|
/* INPUT */ |
47 |
|
|
/* */ |
48 |
|
|
/* wheel Scroll wheel control block */ |
49 |
|
|
/* normal_text_color Normal text color id */ |
50 |
|
|
/* selected_text_color Selected text color id */ |
51 |
|
|
/* disabled_text_color Disabled text color id */ |
52 |
|
|
/* */ |
53 |
|
|
/* OUTPUT */ |
54 |
|
|
/* */ |
55 |
|
|
/* status Completion status */ |
56 |
|
|
/* */ |
57 |
|
|
/* CALLS */ |
58 |
|
|
/* */ |
59 |
|
|
/* _gx_text_scroll_wheel_text_color_set Actual text scroll wheel text */ |
60 |
|
|
/* color set call */ |
61 |
|
|
/* */ |
62 |
|
|
/* CALLED BY */ |
63 |
|
|
/* */ |
64 |
|
|
/* Application Code */ |
65 |
|
|
/* */ |
66 |
|
|
/* RELEASE HISTORY */ |
67 |
|
|
/* */ |
68 |
|
|
/* DATE NAME DESCRIPTION */ |
69 |
|
|
/* */ |
70 |
|
|
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ |
71 |
|
|
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */ |
72 |
|
|
/* resulting in version 6.1 */ |
73 |
|
|
/* */ |
74 |
|
|
/**************************************************************************/ |
75 |
|
453 |
UINT _gxe_text_scroll_wheel_text_color_set(GX_TEXT_SCROLL_WHEEL *wheel, |
76 |
|
|
GX_RESOURCE_ID normal_text_color, |
77 |
|
|
GX_RESOURCE_ID selected_text_color, |
78 |
|
|
GX_RESOURCE_ID disabled_text_color) |
79 |
|
|
{ |
80 |
|
|
UINT status; |
81 |
|
|
|
82 |
|
|
/* Check for appropriate caller. */ |
83 |
✓✓✓✓ ✓✓ |
453 |
GX_INIT_AND_THREADS_CALLER_CHECKING |
84 |
|
|
|
85 |
✓✓ |
451 |
if (wheel == GX_NULL) |
86 |
|
|
{ |
87 |
|
2 |
return GX_PTR_ERROR; |
88 |
|
|
} |
89 |
|
|
|
90 |
|
|
/* Check for invalid widget. */ |
91 |
✓✓ |
449 |
if (wheel -> gx_widget_type == 0) |
92 |
|
|
{ |
93 |
|
1 |
return GX_INVALID_WIDGET; |
94 |
|
|
} |
95 |
|
|
|
96 |
|
448 |
status = _gx_text_scroll_wheel_text_color_set(wheel, normal_text_color, selected_text_color, disabled_text_color); |
97 |
|
|
|
98 |
|
448 |
return status; |
99 |
|
|
} |
100 |
|
|
|