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 |
|
|
/** Button Management (text_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_button.h" |
29 |
|
|
|
30 |
|
|
GX_CALLER_CHECKING_EXTERNS |
31 |
|
|
|
32 |
|
|
/**************************************************************************/ |
33 |
|
|
/* */ |
34 |
|
|
/* FUNCTION RELEASE */ |
35 |
|
|
/* */ |
36 |
|
|
/* _gxe_text_button_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 the text button text color set */ |
45 |
|
|
/* function call. */ |
46 |
|
|
/* */ |
47 |
|
|
/* */ |
48 |
|
|
/* INPUT */ |
49 |
|
|
/* */ |
50 |
|
|
/* text_button Button control block */ |
51 |
|
|
/* normal_text_color_id Resource ID of normal text */ |
52 |
|
|
/* selected_text_color_id Resource ID of selected text */ |
53 |
|
|
/* disabled_text_color_id Resource ID of disabled text */ |
54 |
|
|
/* */ |
55 |
|
|
/* OUTPUT */ |
56 |
|
|
/* */ |
57 |
|
|
/* status Completion status */ |
58 |
|
|
/* */ |
59 |
|
|
/* CALLS */ |
60 |
|
|
/* */ |
61 |
|
|
/* _gx_text_button_text_color_set Actual text button color */ |
62 |
|
|
/* set function */ |
63 |
|
|
/* */ |
64 |
|
|
/* CALLED BY */ |
65 |
|
|
/* */ |
66 |
|
|
/* Application Code */ |
67 |
|
|
/* */ |
68 |
|
|
/**************************************************************************/ |
69 |
|
18520 |
UINT _gxe_text_button_text_color_set(GX_TEXT_BUTTON *text_button, |
70 |
|
|
GX_RESOURCE_ID normal_text_color_id, |
71 |
|
|
GX_RESOURCE_ID selected_text_color_id, |
72 |
|
|
GX_RESOURCE_ID disabled_text_color_id) |
73 |
|
|
{ |
74 |
|
|
|
75 |
|
|
/* Check for appropriate caller. */ |
76 |
✓✓✓✓ ✓✓ |
18520 |
GX_INIT_AND_THREADS_CALLER_CHECKING |
77 |
|
|
|
78 |
|
|
/* Check for invalid input pointers. */ |
79 |
✓✓ |
18518 |
if (text_button == GX_NULL) |
80 |
|
|
{ |
81 |
|
2 |
return(GX_PTR_ERROR); |
82 |
|
|
} |
83 |
|
|
|
84 |
|
|
/* Check for valid widget. */ |
85 |
✓✓ |
18516 |
if (text_button -> gx_widget_type == 0) |
86 |
|
|
{ |
87 |
|
1 |
return GX_INVALID_WIDGET; |
88 |
|
|
} |
89 |
|
|
|
90 |
|
|
/* Call the actual text button color set function. */ |
91 |
|
18515 |
_gx_text_button_text_color_set(text_button, normal_text_color_id, selected_text_color_id, disabled_text_color_id); |
92 |
|
|
|
93 |
|
|
/* Return completion status. */ |
94 |
|
18515 |
return GX_SUCCESS; |
95 |
|
|
} |
96 |
|
|
|