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 |
|
|
/** Widget Management (Widget) */ |
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 |
|
|
|
30 |
|
|
|
31 |
|
|
/**************************************************************************/ |
32 |
|
|
/* */ |
33 |
|
|
/* FUNCTION RELEASE */ |
34 |
|
|
/* */ |
35 |
|
|
/* _gx_widget_border_width_get PORTABLE C */ |
36 |
|
|
/* 6.1 */ |
37 |
|
|
/* AUTHOR */ |
38 |
|
|
/* */ |
39 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
40 |
|
|
/* */ |
41 |
|
|
/* DESCRIPTION */ |
42 |
|
|
/* */ |
43 |
|
|
/* This service gets the widget border width. */ |
44 |
|
|
/* */ |
45 |
|
|
/* INPUT */ |
46 |
|
|
/* */ |
47 |
|
|
/* widget Pointer to widget */ |
48 |
|
|
/* return_width Pointer to destination for */ |
49 |
|
|
/* widget border width */ |
50 |
|
|
/* */ |
51 |
|
|
/* OUTPUT */ |
52 |
|
|
/* */ |
53 |
|
|
/* status Completion status */ |
54 |
|
|
/* */ |
55 |
|
|
/* CALLS */ |
56 |
|
|
/* */ |
57 |
|
|
/* None */ |
58 |
|
|
/* */ |
59 |
|
|
/* CALLED BY */ |
60 |
|
|
/* */ |
61 |
|
|
/* Application Code */ |
62 |
|
|
/* GUIX draw functions */ |
63 |
|
|
/* */ |
64 |
|
|
/**************************************************************************/ |
65 |
|
2413751 |
UINT _gx_widget_border_width_get(GX_WIDGET *widget, GX_VALUE *return_width) |
66 |
|
|
{ |
67 |
✓✓✓✓
|
2413751 |
switch (widget -> gx_widget_style & GX_STYLE_BORDER_MASK) |
68 |
|
|
{ |
69 |
|
519749 |
case GX_STYLE_BORDER_RAISED: |
70 |
|
|
case GX_STYLE_BORDER_RECESSED: |
71 |
|
519749 |
*return_width = 2; |
72 |
|
519749 |
break; |
73 |
|
|
|
74 |
|
800285 |
case GX_STYLE_BORDER_THIN: |
75 |
|
800285 |
*return_width = 1; |
76 |
|
800285 |
break; |
77 |
|
|
|
78 |
|
87863 |
case GX_STYLE_BORDER_THICK: |
79 |
|
87863 |
*return_width = 5; |
80 |
|
87863 |
break; |
81 |
|
|
|
82 |
|
1005854 |
case GX_STYLE_BORDER_NONE: |
83 |
|
|
default: |
84 |
|
1005854 |
*return_width = 0; |
85 |
|
1005854 |
break; |
86 |
|
|
} |
87 |
|
2413751 |
return(GX_SUCCESS); |
88 |
|
|
} |
89 |
|
|
|