1 |
/******************************************************************************* |
= |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2005 IBM Corporation and others. |
|
2 |
* Copyright (c) 2000, 2005 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
|
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
|
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
|
5 |
* which accompanies this distribution, and is available at |
6 |
* http://www.eclipse.org/legal/epl-v10.html |
|
6 |
* http://www.eclipse.org/legal/epl-v10.html |
7 |
* |
|
7 |
* |
8 |
* Contributors: |
|
8 |
* Contributors: |
9 |
* IBM Corporation - initial API and implementation |
|
9 |
* IBM Corporation - initial API and implementation |
10 |
* Radoslav Gerganov <r.gerganov@prosyst.bg> - bug 213627 |
|
10 |
* Radoslav Gerganov <r.gerganov@prosyst.bg> - bug 213627 |
11 |
*******************************************************************************/ |
|
11 |
*******************************************************************************/ |
|
|
<> |
12 |
|
|
|
|
13 |
/******************************************************************************* |
|
|
|
14 |
* Additions/modifications to this source file by Oracle America, Inc. 2011 |
|
|
|
15 |
*******************************************************************************/ |
|
|
|
16 |
|
12 |
package com.ibm.ugl.p3ml; |
= |
17 |
package com.ibm.ugl.p3ml; |
13 |
|
|
18 |
|
14 |
|
|
19 |
|
15 |
import com.ibm.ugl.UGLCompatibility; |
|
20 |
import com.ibm.ugl.UGLCompatibility; |
16 |
import com.ibm.ugl.UGLErrorHandler; |
|
21 |
import com.ibm.ugl.UGLErrorHandler; |
17 |
|
|
22 |
|
18 |
/** |
|
23 |
/** |
19 |
* The UGL API hierarchy as it applies to P3ML is as follows. |
|
24 |
* The UGL API hierarchy as it applies to P3ML is as follows. |
20 |
* The API hierarchy can be thought of as a class hierarchy in |
|
25 |
* The API hierarchy can be thought of as a class hierarchy in |
21 |
* OO terms. E.g., the Widget, Control and Scrollable API can |
|
26 |
* OO terms. E.g., the Widget, Control and Scrollable API can |
22 |
* be called with a Shell handle, in addition to the Shell API. |
|
27 |
* be called with a Shell handle, in addition to the Shell API. |
23 |
* <p> |
|
28 |
* <p> |
24 |
* <table border=0> |
|
29 |
* <table border=0> |
25 |
* <tr><td colspan=4>Color</td></tr> |
|
30 |
* <tr><td colspan=4>Color</td></tr> |
26 |
* <tr><td colspan=4>Device</td></tr> |
|
31 |
* <tr><td colspan=4>Device</td></tr> |
27 |
* <tr><td width=25> </td><td colspan=3>Display</td></tr> |
|
32 |
* <tr><td width=25> </td><td colspan=3>Display</td></tr> |
28 |
* <tr><td colspan=4>Font</td></tr> |
|
33 |
* <tr><td colspan=4>Font</td></tr> |
29 |
* <tr><td colspan=4>Graphics</td></tr> |
|
34 |
* <tr><td colspan=4>Graphics</td></tr> |
30 |
* <tr><td colspan=4>Image</td></tr> |
|
35 |
* <tr><td colspan=4>Image</td></tr> |
31 |
* <tr><td colspan=4>Widget</td></tr> |
|
36 |
* <tr><td colspan=4>Widget</td></tr> |
32 |
* <tr><td> </td><td colspan=3>Control</td></tr> |
|
37 |
* <tr><td> </td><td colspan=3>Control</td></tr> |
33 |
* <tr><td> </td><td width=25> </td><td colspan=2>Scrollable</td></tr> |
|
38 |
* <tr><td> </td><td width=25> </td><td colspan=2>Scrollable</td></tr> |
34 |
* <tr><td> </td><td> </td><td width=25> </td><td>Shell</td></tr> |
|
39 |
* <tr><td> </td><td> </td><td width=25> </td><td>Shell</td></tr> |
35 |
* </table> |
|
40 |
* </table> |
36 |
* </p> |
|
41 |
* </p> |
37 |
*/ |
|
42 |
*/ |
38 |
public class OS { |
|
43 |
public class OS { |
39 |
|
|
44 |
|
40 |
static { |
|
45 |
static { |
41 |
UGLCompatibility.loadLibrary("eswt-core"); |
<> |
46 |
UGLCompatibility.loadLibrary("eswt-converged"); |
42 |
} |
= |
47 |
} |
43 |
|
|
48 |
|
44 |
/** |
|
49 |
/** |
45 |
* This field must be set by the toolkit |
|
50 |
* This field must be set by the toolkit |
46 |
* to handle native errors that could occur. |
|
51 |
* to handle native errors that could occur. |
47 |
* The toolkit may choose to have the handler |
|
52 |
* The toolkit may choose to have the handler |
48 |
* be a no-op, but a handler must be set |
|
53 |
* be a no-op, but a handler must be set |
49 |
* regardless. |
|
54 |
* regardless. |
50 |
* @ignore don't generate anything for this field natively. |
|
55 |
* @ignore don't generate anything for this field natively. |
51 |
*/ |
|
56 |
*/ |
52 |
public static UGLErrorHandler uglErrorHandler; |
|
57 |
public static UGLErrorHandler uglErrorHandler; |
53 |
|
|
58 |
|
54 |
/** |
|
59 |
/** |
55 |
* No error has occurred. |
|
60 |
* No error has occurred. |
56 |
*/ |
|
61 |
*/ |
57 |
public static final int ERROR_NONE = 0; |
|
62 |
public static final int ERROR_NONE = 0; |
58 |
|
|
63 |
|
59 |
/** |
|
64 |
/** |
60 |
* API/function is unimplemented |
|
65 |
* API/function is unimplemented |
61 |
*/ |
|
66 |
*/ |
62 |
public static final int ERROR_NOT_IMPLEMENTED = -1; |
|
67 |
public static final int ERROR_NOT_IMPLEMENTED = -1; |
63 |
|
|
68 |
|
64 |
/** |
|
69 |
/** |
65 |
* An unrecoverable error occurred. The error is not specified further. |
|
70 |
* An unrecoverable error occurred. The error is not specified further. |
66 |
* Any API may throw this error. |
|
71 |
* Any API may throw this error. |
67 |
*/ |
|
72 |
*/ |
68 |
public static final int ERROR_OTHER = -3; |
|
73 |
public static final int ERROR_OTHER = -3; |
69 |
|
|
74 |
|
70 |
/** |
|
75 |
/** |
71 |
* Out of memory/handles. Any API may throw this error. |
|
76 |
* Out of memory/handles. Any API may throw this error. |
72 |
*/ |
|
77 |
*/ |
73 |
public static final int ERROR_OUT_OF_MEMORY = -4; |
|
78 |
public static final int ERROR_OUT_OF_MEMORY = -4; |
74 |
|
|
79 |
|
75 |
/** |
|
80 |
/** |
76 |
* Attempt to load/create an image with unsupported color depth. |
|
81 |
* Attempt to load/create an image with unsupported color depth. |
77 |
*/ |
|
82 |
*/ |
78 |
public static final int ERROR_UNSUPPORTED_DEPTH = -5; |
|
83 |
public static final int ERROR_UNSUPPORTED_DEPTH = -5; |
79 |
|
|
84 |
|
80 |
/** |
|
85 |
/** |
81 |
* Attempt to load/save an image of an unsupported format. |
|
86 |
* Attempt to load/save an image of an unsupported format. |
82 |
*/ |
|
87 |
*/ |
83 |
public static final int ERROR_UNSUPPORTED_FORMAT = -6; |
|
88 |
public static final int ERROR_UNSUPPORTED_FORMAT = -6; |
84 |
|
|
89 |
|
85 |
/** |
|
90 |
/** |
86 |
* I/O error |
|
91 |
* I/O error |
87 |
*/ |
|
92 |
*/ |
88 |
public static final int ERROR_IO = -7; |
|
93 |
public static final int ERROR_IO = -7; |
89 |
|
|
94 |
|
90 |
/** |
|
95 |
/** |
91 |
* Invalid image error |
|
96 |
* Invalid image error |
92 |
*/ |
|
97 |
*/ |
93 |
public static final int ERROR_INVALID_IMAGE = -8; |
|
98 |
public static final int ERROR_INVALID_IMAGE = -8; |
94 |
|
|
99 |
|
95 |
/** |
|
100 |
/** |
96 |
* The x index into an array returning a rectangle |
|
101 |
* The x index into an array returning a rectangle |
97 |
* @internal this should only be used by toolkit implementors |
|
102 |
* @internal this should only be used by toolkit implementors |
98 |
*/ |
|
103 |
*/ |
99 |
public static final int INDEX_X = 0; |
|
104 |
public static final int INDEX_X = 0; |
100 |
|
|
105 |
|
101 |
/** |
|
106 |
/** |
102 |
* The y index into an array returning a rectangle |
|
107 |
* The y index into an array returning a rectangle |
103 |
* @internal this should only be used by toolkit implementors |
|
108 |
* @internal this should only be used by toolkit implementors |
104 |
*/ |
|
109 |
*/ |
105 |
public static final int INDEX_Y = 1; |
|
110 |
public static final int INDEX_Y = 1; |
106 |
|
|
111 |
|
107 |
/** |
|
112 |
/** |
108 |
* The width index into an array returning a rectangle |
|
113 |
* The width index into an array returning a rectangle |
109 |
* @internal this should only be used by toolkit implementors |
|
114 |
* @internal this should only be used by toolkit implementors |
110 |
*/ |
|
115 |
*/ |
111 |
public static final int INDEX_WIDTH = 2; |
|
116 |
public static final int INDEX_WIDTH = 2; |
112 |
|
|
117 |
|
113 |
/** |
|
118 |
/** |
114 |
* The height index into an array returning a rectangle |
|
119 |
* The height index into an array returning a rectangle |
115 |
* @internal this should only be used by toolkit implementors |
|
120 |
* @internal this should only be used by toolkit implementors |
116 |
*/ |
|
121 |
*/ |
117 |
public static final int INDEX_HEIGHT = 3; |
|
122 |
public static final int INDEX_HEIGHT = 3; |
118 |
|
|
123 |
|
119 |
/* |
|
124 |
/* |
120 |
* Constants for indexing a four element insets array. |
|
125 |
* Constants for indexing a four element insets array. |
121 |
*/ |
|
126 |
*/ |
122 |
/** @internal this should only be used by toolkit implementors */ |
|
127 |
/** @internal this should only be used by toolkit implementors */ |
123 |
public static final int INDEX_LEFT = 0; |
|
128 |
public static final int INDEX_LEFT = 0; |
124 |
/** @internal this should only be used by toolkit implementors */ |
|
129 |
/** @internal this should only be used by toolkit implementors */ |
125 |
public static final int INDEX_TOP = 1; |
|
130 |
public static final int INDEX_TOP = 1; |
126 |
/** @internal this should only be used by toolkit implementors */ |
|
131 |
/** @internal this should only be used by toolkit implementors */ |
127 |
public static final int INDEX_RIGHT = 2; |
|
132 |
public static final int INDEX_RIGHT = 2; |
128 |
/** @internal this should only be used by toolkit implementors */ |
|
133 |
/** @internal this should only be used by toolkit implementors */ |
129 |
public static final int INDEX_BOTTOM = 3; |
|
134 |
public static final int INDEX_BOTTOM = 3; |
130 |
|
|
135 |
|
131 |
/** @internal this should only be used by toolkit implementors */ |
|
136 |
/** @internal this should only be used by toolkit implementors */ |
132 |
public static final int CALLBACK_BUTTON = 0; |
|
137 |
public static final int CALLBACK_BUTTON = 0; |
133 |
|
|
138 |
|
134 |
/** @internal this should only be used by toolkit implementors */ |
|
139 |
/** @internal this should only be used by toolkit implementors */ |
135 |
public static final int CALLBACK_CHOICE = 4; |
|
140 |
public static final int CALLBACK_CHOICE = 4; |
136 |
|
|
141 |
|
137 |
/** @internal this should only be used by toolkit implementors */ |
|
142 |
/** @internal this should only be used by toolkit implementors */ |
138 |
public static final int CALLBACK_CONTROL_KEY = 5; |
|
143 |
public static final int CALLBACK_CONTROL_KEY = 5; |
139 |
|
|
144 |
|
140 |
/** @internal this should only be used by toolkit implementors */ |
|
145 |
/** @internal this should only be used by toolkit implementors */ |
141 |
public static final int CALLBACK_CONTROL_POINTER = 7; |
|
146 |
public static final int CALLBACK_CONTROL_POINTER = 7; |
142 |
|
|
147 |
|
143 |
/** @internal this should only be used by toolkit implementors */ |
|
148 |
/** @internal this should only be used by toolkit implementors */ |
144 |
public static final int CALLBACK_FOCUS = 9; |
|
149 |
public static final int CALLBACK_FOCUS = 9; |
145 |
|
|
150 |
|
146 |
/** @internal this should only be used by toolkit implementors */ |
|
151 |
/** @internal this should only be used by toolkit implementors */ |
147 |
public static final int CALLBACK_LIST = 1; |
|
152 |
public static final int CALLBACK_LIST = 1; |
148 |
|
|
153 |
|
149 |
/** @internal this should only be used by toolkit implementors */ |
|
154 |
/** @internal this should only be used by toolkit implementors */ |
150 |
public static final int CALLBACK_MENU_SELECTION = 8; |
|
155 |
public static final int CALLBACK_MENU_SELECTION = 8; |
151 |
|
|
156 |
|
152 |
/** @internal this should only be used by toolkit implementors */ |
|
157 |
/** @internal this should only be used by toolkit implementors */ |
153 |
public static final int CALLBACK_PAINT = 10; |
|
158 |
public static final int CALLBACK_PAINT = 10; |
154 |
|
|
159 |
|
155 |
/** @internal this should only be used by toolkit implementors */ |
|
160 |
/** @internal this should only be used by toolkit implementors */ |
156 |
public static final int CALLBACK_SCROLLBAR = 3; |
|
161 |
public static final int CALLBACK_SCROLLBAR = 3; |
157 |
|
|
162 |
|
158 |
/** @internal this should only be used by toolkit implementors */ |
|
163 |
/** @internal this should only be used by toolkit implementors */ |
159 |
public static final int CALLBACK_SHELL = 2; |
|
164 |
public static final int CALLBACK_SHELL = 2; |
160 |
|
|
165 |
|
161 |
/** @internal this should only be used by toolkit implementors */ |
|
166 |
/** @internal this should only be used by toolkit implementors */ |
162 |
public static final int CALLBACK_SHELL_RESIZE = 11; |
|
167 |
public static final int CALLBACK_SHELL_RESIZE = 11; |
163 |
|
|
168 |
|
164 |
/** @internal this should only be used by toolkit implementors */ |
|
169 |
/** @internal this should only be used by toolkit implementors */ |
165 |
public static final int CALLBACK_SHELL_MOVE = 12; |
|
170 |
public static final int CALLBACK_SHELL_MOVE = 12; |
166 |
|
|
171 |
|
167 |
/** @internal this should only be used by toolkit implementors */ |
|
172 |
/** @internal this should only be used by toolkit implementors */ |
168 |
public static final int CALLBACK_TEXT_MODIFY = 6; |
|
173 |
public static final int CALLBACK_TEXT_MODIFY = 6; |
169 |
|
|
174 |
|
170 |
/** @internal this should only be used by toolkit implementors */ |
|
175 |
/** @internal this should only be used by toolkit implementors */ |
171 |
public static final int CALLBACK_CONTROL_WHEEL = 17; |
|
176 |
public static final int CALLBACK_CONTROL_WHEEL = 17; |
172 |
|
|
177 |
|
173 |
/** @internal this should only be used by toolkit implementors */ |
|
178 |
/** @internal this should only be used by toolkit implementors */ |
174 |
public static final int CALLBACK_DISPLAY_TIMER = 13; |
|
179 |
public static final int CALLBACK_DISPLAY_TIMER = 13; |
175 |
|
|
180 |
|
176 |
/** @internal this should only be used by toolkit implementors */ |
|
181 |
/** @internal this should only be used by toolkit implementors */ |
177 |
public static final int CALLBACK_TRAYITEM = 50; |
|
182 |
public static final int CALLBACK_TRAYITEM = 50; |
178 |
|
|
183 |
|
179 |
/** Active caption background color id */ |
|
184 |
/** Active caption background color id */ |
180 |
public static final int COLOR_ACTIVE_CAPTION_BACKGROUND = 1; |
|
185 |
public static final int COLOR_ACTIVE_CAPTION_BACKGROUND = 1; |
181 |
|
|
186 |
|
182 |
/** Active caption border color id */ |
|
187 |
/** Active caption border color id */ |
183 |
public static final int COLOR_ACTIVE_CAPTION_BORDER = 3; |
|
188 |
public static final int COLOR_ACTIVE_CAPTION_BORDER = 3; |
184 |
|
|
189 |
|
185 |
/** Active caption foreground color id */ |
|
190 |
/** Active caption foreground color id */ |
186 |
public static final int COLOR_ACTIVE_CAPTION_FOREGROUND = 2; |
|
191 |
public static final int COLOR_ACTIVE_CAPTION_FOREGROUND = 2; |
187 |
|
|
192 |
|
188 |
/** Control background color id */ |
|
193 |
/** Control background color id */ |
189 |
public static final int COLOR_CONTROL_BACKGROUND = 17; |
|
194 |
public static final int COLOR_CONTROL_BACKGROUND = 17; |
190 |
|
|
195 |
|
191 |
/** Control foreground color id */ |
|
196 |
/** Control foreground color id */ |
192 |
public static final int COLOR_CONTROL_FOREGROUND = 18; |
|
197 |
public static final int COLOR_CONTROL_FOREGROUND = 18; |
193 |
|
|
198 |
|
194 |
/** Control light highlight color id */ |
|
199 |
/** Control light highlight color id */ |
195 |
public static final int COLOR_CONTROL_HIGHLIGHT_LIGHT = 20; |
|
200 |
public static final int COLOR_CONTROL_HIGHLIGHT_LIGHT = 20; |
196 |
|
|
201 |
|
197 |
/** Control normal highlight color id */ |
|
202 |
/** Control normal highlight color id */ |
198 |
public static final int COLOR_CONTROL_HIGHLIGHT_NORMAL = 19; |
|
203 |
public static final int COLOR_CONTROL_HIGHLIGHT_NORMAL = 19; |
199 |
|
|
204 |
|
200 |
/** Control dark shadow color id */ |
|
205 |
/** Control dark shadow color id */ |
201 |
public static final int COLOR_CONTROL_SHADOW_DARK = 22; |
|
206 |
public static final int COLOR_CONTROL_SHADOW_DARK = 22; |
202 |
|
|
207 |
|
203 |
/** Control normal shadow color id */ |
|
208 |
/** Control normal shadow color id */ |
204 |
public static final int COLOR_CONTROL_SHADOW_NORMAL = 21; |
|
209 |
public static final int COLOR_CONTROL_SHADOW_NORMAL = 21; |
205 |
|
|
210 |
|
206 |
/** Desktop background color id */ |
|
211 |
/** Desktop background color id */ |
207 |
public static final int COLOR_DESKTOP_BACKGROUND = 0; |
|
212 |
public static final int COLOR_DESKTOP_BACKGROUND = 0; |
208 |
|
|
213 |
|
209 |
/** Inactive caption background color id */ |
|
214 |
/** Inactive caption background color id */ |
210 |
public static final int COLOR_INACTIVE_CAPTION_BACKGROUND = 4; |
|
215 |
public static final int COLOR_INACTIVE_CAPTION_BACKGROUND = 4; |
211 |
|
|
216 |
|
212 |
/** Inactive caption foreground color id */ |
|
217 |
/** Inactive caption foreground color id */ |
213 |
public static final int COLOR_INACTIVE_CAPTION_FOREGROUND = 5; |
|
218 |
public static final int COLOR_INACTIVE_CAPTION_FOREGROUND = 5; |
214 |
|
|
219 |
|
215 |
/** Inactive caption border color id */ |
|
220 |
/** Inactive caption border color id */ |
216 |
public static final int COLOR_INACTIVE_CAPTION_BORDER = 6; |
|
221 |
public static final int COLOR_INACTIVE_CAPTION_BORDER = 6; |
217 |
|
|
222 |
|
218 |
/** Window background color id */ |
|
223 |
/** Window background color id */ |
219 |
public static final int COLOR_WINDOW_BACKGROUND = 7; |
|
224 |
public static final int COLOR_WINDOW_BACKGROUND = 7; |
220 |
|
|
225 |
|
221 |
/** Window border color id */ |
|
226 |
/** Window border color id */ |
222 |
public static final int COLOR_WINDOW_BORDER = 8; |
|
227 |
public static final int COLOR_WINDOW_BORDER = 8; |
223 |
|
|
228 |
|
224 |
/** Window foreground color id */ |
|
229 |
/** Window foreground color id */ |
225 |
public static final int COLOR_WINDOW_FOREGROUND = 9; |
|
230 |
public static final int COLOR_WINDOW_FOREGROUND = 9; |
226 |
|
|
231 |
|
227 |
/** Menu background color id */ |
|
232 |
/** Menu background color id */ |
228 |
public static final int COLOR_MENU_BACKGROUND = 10; |
|
233 |
public static final int COLOR_MENU_BACKGROUND = 10; |
229 |
|
|
234 |
|
230 |
/** Menu foreground color id */ |
|
235 |
/** Menu foreground color id */ |
231 |
public static final int COLOR_MENU_FOREGROUND = 11; |
|
236 |
public static final int COLOR_MENU_FOREGROUND = 11; |
232 |
|
|
237 |
|
233 |
/** Text widget background color id */ |
|
238 |
/** Text widget background color id */ |
234 |
public static final int COLOR_TEXT_BACKGROUND = 12; |
|
239 |
public static final int COLOR_TEXT_BACKGROUND = 12; |
235 |
|
|
240 |
|
236 |
/** Text widget foreground color id */ |
|
241 |
/** Text widget foreground color id */ |
237 |
public static final int COLOR_TEXT_FOREGROUND = 13; |
|
242 |
public static final int COLOR_TEXT_FOREGROUND = 13; |
238 |
|
|
243 |
|
239 |
/** Text widget inactive foreground color id */ |
|
244 |
/** Text widget inactive foreground color id */ |
240 |
public static final int COLOR_TEXT_INACTIVE_FOREGROUND = 16; |
|
245 |
public static final int COLOR_TEXT_INACTIVE_FOREGROUND = 16; |
241 |
|
|
246 |
|
242 |
/** Scrollbar background color id */ |
|
247 |
/** Scrollbar background color id */ |
243 |
public static final int COLOR_SCROLLBAR_BACKGROUND = 23; |
|
248 |
public static final int COLOR_SCROLLBAR_BACKGROUND = 23; |
244 |
|
|
249 |
|
245 |
/** Tool tip background color id */ |
|
250 |
/** Tool tip background color id */ |
246 |
public static final int COLOR_INFO_BACKGROUND = 24; |
|
251 |
public static final int COLOR_INFO_BACKGROUND = 24; |
247 |
|
|
252 |
|
248 |
/** Tool tip foreground color id */ |
|
253 |
/** Tool tip foreground color id */ |
249 |
public static final int COLOR_INFO_FOREGROUND = 25; |
|
254 |
public static final int COLOR_INFO_FOREGROUND = 25; |
250 |
|
|
255 |
|
251 |
/** Text widget highlight background color id */ |
|
256 |
/** Text widget highlight background color id */ |
252 |
public static final int COLOR_TEXT_HIGHLIGHT_BACKGROUND = 14; |
|
257 |
public static final int COLOR_TEXT_HIGHLIGHT_BACKGROUND = 14; |
253 |
|
|
258 |
|
254 |
/** Text widget highlight foreground color id */ |
|
259 |
/** Text widget highlight foreground color id */ |
255 |
public static final int COLOR_TEXT_HIGHLIGHT_FOREGROUND = 15; |
|
260 |
public static final int COLOR_TEXT_HIGHLIGHT_FOREGROUND = 15; |
256 |
|
|
261 |
|
257 |
/** Title bar background color id */ |
|
262 |
/** Title bar background color id */ |
258 |
public static final int COLOR_TITLE_BACKGROUND = 26; |
|
263 |
public static final int COLOR_TITLE_BACKGROUND = 26; |
259 |
|
|
264 |
|
260 |
/** Title bar foreground color id */ |
|
265 |
/** Title bar foreground color id */ |
261 |
public static final int COLOR_TITLE_FOREGROUND = 27; |
|
266 |
public static final int COLOR_TITLE_FOREGROUND = 27; |
262 |
|
|
267 |
|
263 |
/** Arrow cursor style */ |
|
268 |
/** Arrow cursor style */ |
264 |
public static final int CURSOR_ARROW = 1; |
|
269 |
public static final int CURSOR_ARROW = 1; |
265 |
|
|
270 |
|
266 |
/** Crosshair cursor style */ |
|
271 |
/** Crosshair cursor style */ |
267 |
public static final int CURSOR_CROSSHAIR = 2; |
|
272 |
public static final int CURSOR_CROSSHAIR = 2; |
268 |
|
|
273 |
|
269 |
/** Hand cursor style */ |
|
274 |
/** Hand cursor style */ |
270 |
public static final int CURSOR_HAND = 13; |
|
275 |
public static final int CURSOR_HAND = 13; |
271 |
|
|
276 |
|
272 |
/** Move cursor style */ |
|
277 |
/** Move cursor style */ |
273 |
public static final int CURSOR_MOVE = 14; |
|
278 |
public static final int CURSOR_MOVE = 14; |
274 |
|
|
279 |
|
275 |
/** East resize cursor style */ |
|
280 |
/** East resize cursor style */ |
276 |
public static final int CURSOR_RESIZE_E = 6; |
|
281 |
public static final int CURSOR_RESIZE_E = 6; |
277 |
|
|
282 |
|
278 |
/** North resize cursor style */ |
|
283 |
/** North resize cursor style */ |
279 |
public static final int CURSOR_RESIZE_N = 5; |
|
284 |
public static final int CURSOR_RESIZE_N = 5; |
280 |
|
|
285 |
|
281 |
/** Northeast resize cursor style */ |
|
286 |
/** Northeast resize cursor style */ |
282 |
public static final int CURSOR_RESIZE_NE = 9; |
|
287 |
public static final int CURSOR_RESIZE_NE = 9; |
283 |
|
|
288 |
|
284 |
/** Northwest resize cursor style */ |
|
289 |
/** Northwest resize cursor style */ |
285 |
public static final int CURSOR_RESIZE_NW = 12; |
|
290 |
public static final int CURSOR_RESIZE_NW = 12; |
286 |
|
|
291 |
|
287 |
/** South resize cursor style */ |
|
292 |
/** South resize cursor style */ |
288 |
public static final int CURSOR_RESIZE_S = 7; |
|
293 |
public static final int CURSOR_RESIZE_S = 7; |
289 |
|
|
294 |
|
290 |
/** Southeast resize cursor style */ |
|
295 |
/** Southeast resize cursor style */ |
291 |
public static final int CURSOR_RESIZE_SE = 10; |
|
296 |
public static final int CURSOR_RESIZE_SE = 10; |
292 |
|
|
297 |
|
293 |
/** Southwest resize cursor style */ |
|
298 |
/** Southwest resize cursor style */ |
294 |
public static final int CURSOR_RESIZE_SW = 11; |
|
299 |
public static final int CURSOR_RESIZE_SW = 11; |
295 |
|
|
300 |
|
296 |
/** West resize cursor style */ |
|
301 |
/** West resize cursor style */ |
297 |
public static final int CURSOR_RESIZE_W = 8; |
|
302 |
public static final int CURSOR_RESIZE_W = 8; |
298 |
|
|
303 |
|
299 |
/** Text cursor style */ |
|
304 |
/** Text cursor style */ |
300 |
public static final int CURSOR_TEXT = 3; |
|
305 |
public static final int CURSOR_TEXT = 3; |
301 |
|
|
306 |
|
302 |
/** Wait cursor style */ |
|
307 |
/** Wait cursor style */ |
303 |
public static final int CURSOR_WAIT = 4; |
|
308 |
public static final int CURSOR_WAIT = 4; |
304 |
|
|
309 |
|
305 |
/** Focus event triggered when a Control has gained focus. */ |
|
310 |
/** Focus event triggered when a Control has gained focus. */ |
306 |
public static final int EVENT_FOCUS_IN = 1; |
|
311 |
public static final int EVENT_FOCUS_IN = 1; |
307 |
|
|
312 |
|
308 |
/** Focus event triggered when a Control has lost focus. */ |
|
313 |
/** Focus event triggered when a Control has lost focus. */ |
309 |
public static final int EVENT_FOCUS_OUT = 2; |
|
314 |
public static final int EVENT_FOCUS_OUT = 2; |
310 |
|
|
315 |
|
311 |
/** Focus event flag which indicates that the focus change was temporary. */ |
|
316 |
/** Focus event flag which indicates that the focus change was temporary. */ |
312 |
public static final int EVENT_FOCUS_TEMPORARY_FLAG = 1 << 16; |
|
317 |
public static final int EVENT_FOCUS_TEMPORARY_FLAG = 1 << 16; |
313 |
|
|
318 |
|
314 |
/** Key down event. */ |
|
319 |
/** Key down event. */ |
315 |
public static final int EVENT_KEY_DOWN = 1; |
|
320 |
public static final int EVENT_KEY_DOWN = 1; |
316 |
|
|
321 |
|
317 |
/** Key up event. */ |
|
322 |
/** Key up event. */ |
318 |
public static final int EVENT_KEY_UP = 2; |
|
323 |
public static final int EVENT_KEY_UP = 2; |
319 |
|
|
324 |
|
320 |
/** |
|
325 |
/** |
321 |
* List event which indicates that the currently selected item has |
|
326 |
* List event which indicates that the currently selected item has |
322 |
* been actioned. |
|
327 |
* been actioned. |
323 |
*/ |
|
328 |
*/ |
324 |
public static final int EVENT_LIST_ACTION = 2; |
|
329 |
public static final int EVENT_LIST_ACTION = 2; |
325 |
|
|
330 |
|
326 |
/** List event which indicates that a new item has been selected. */ |
|
331 |
/** List event which indicates that a new item has been selected. */ |
327 |
public static final int EVENT_LIST_SELECTION = 1; |
|
332 |
public static final int EVENT_LIST_SELECTION = 1; |
328 |
|
|
333 |
|
329 |
/** The pointer has been double clicked. */ |
|
334 |
/** The pointer has been double clicked. */ |
330 |
public static final int EVENT_POINTER_DOUBLECLICK = 7; |
|
335 |
public static final int EVENT_POINTER_DOUBLECLICK = 7; |
331 |
|
|
336 |
|
332 |
/** The pointer has been pressed. */ |
|
337 |
/** The pointer has been pressed. */ |
333 |
public static final int EVENT_POINTER_DOWN = 1; |
|
338 |
public static final int EVENT_POINTER_DOWN = 1; |
334 |
|
|
339 |
|
335 |
/** The pointer has been released. */ |
|
340 |
/** The pointer has been released. */ |
336 |
public static final int EVENT_POINTER_DRAG = 6; |
|
341 |
public static final int EVENT_POINTER_DRAG = 6; |
337 |
|
|
342 |
|
338 |
/** The pointer has entered a control's bounds. */ |
|
343 |
/** The pointer has entered a control's bounds. */ |
339 |
public static final int EVENT_POINTER_ENTER = 4; |
|
344 |
public static final int EVENT_POINTER_ENTER = 4; |
340 |
|
|
345 |
|
341 |
/** The pointer has left a control's bounds. */ |
|
346 |
/** The pointer has left a control's bounds. */ |
342 |
public static final int EVENT_POINTER_EXIT = 5; |
|
347 |
public static final int EVENT_POINTER_EXIT = 5; |
343 |
|
|
348 |
|
344 |
/** The pointer has moved. */ |
|
349 |
/** The pointer has moved. */ |
345 |
public static final int EVENT_POINTER_MOVE = 3; |
|
350 |
public static final int EVENT_POINTER_MOVE = 3; |
346 |
|
|
351 |
|
347 |
/** The pointer has been released. */ |
|
352 |
/** The pointer has been released. */ |
348 |
public static final int EVENT_POINTER_UP = 2; |
|
353 |
public static final int EVENT_POINTER_UP = 2; |
349 |
|
|
354 |
|
350 |
/** The mouse wheel has been moved with a block scroll. */ |
|
355 |
/** The mouse wheel has been moved with a block scroll. */ |
351 |
public static final int EVENT_WHEEL_BLOCK = 8; |
|
356 |
public static final int EVENT_WHEEL_BLOCK = 8; |
352 |
|
|
357 |
|
353 |
/** The mouse wheel has been moved with a unit scroll. */ |
|
358 |
/** The mouse wheel has been moved with a unit scroll. */ |
354 |
public static final int EVENT_WHEEL_UNIT = 9; |
|
359 |
public static final int EVENT_WHEEL_UNIT = 9; |
355 |
|
|
360 |
|
356 |
/** |
|
361 |
/** |
357 |
* Event code that will be passed into the shell callback method |
|
362 |
* Event code that will be passed into the shell callback method |
358 |
* when the shell is activated. |
|
363 |
* when the shell is activated. |
359 |
*/ |
|
364 |
*/ |
360 |
public static final int EVENT_SHELL_ACTIVATED = 205; |
|
365 |
public static final int EVENT_SHELL_ACTIVATED = 205; |
361 |
|
|
366 |
|
362 |
/** |
|
367 |
/** |
363 |
* Event code that will be passed into the shell callback method |
|
368 |
* Event code that will be passed into the shell callback method |
364 |
* when the user clicks on the close button. |
|
369 |
* when the user clicks on the close button. |
365 |
*/ |
|
370 |
*/ |
366 |
public static final int EVENT_SHELL_CLOSING = 201; |
|
371 |
public static final int EVENT_SHELL_CLOSING = 201; |
367 |
|
|
372 |
|
368 |
/** |
|
373 |
/** |
369 |
* Event code that will be passed into the shell callback method |
|
374 |
* Event code that will be passed into the shell callback method |
370 |
* when the shell is deactivated. |
|
375 |
* when the shell is deactivated. |
371 |
*/ |
|
376 |
*/ |
372 |
public static final int EVENT_SHELL_DEACTIVATED = 206; |
|
377 |
public static final int EVENT_SHELL_DEACTIVATED = 206; |
373 |
|
|
378 |
|
374 |
/** |
|
379 |
/** |
375 |
* Event code that will be passed into the shell callback method |
|
380 |
* Event code that will be passed into the shell callback method |
376 |
* when the shell is deiconified. |
|
381 |
* when the shell is deiconified. |
377 |
*/ |
|
382 |
*/ |
378 |
public static final int EVENT_SHELL_DEICONIFIED = 204; |
|
383 |
public static final int EVENT_SHELL_DEICONIFIED = 204; |
379 |
|
|
384 |
|
380 |
/** |
|
385 |
/** |
381 |
* Event code that will be passed into the shell callback method |
|
386 |
* Event code that will be passed into the shell callback method |
382 |
* when the shell is iconified. |
|
387 |
* when the shell is iconified. |
383 |
*/ |
|
388 |
*/ |
384 |
public static final int EVENT_SHELL_ICONIFIED = 203; |
|
389 |
public static final int EVENT_SHELL_ICONIFIED = 203; |
385 |
|
|
390 |
|
386 |
/** Font style flag bold */ |
|
391 |
/** Font style flag bold */ |
387 |
public static final int FONT_STYLE_BOLD = 1 << 1; |
|
392 |
public static final int FONT_STYLE_BOLD = 1 << 1; |
388 |
|
|
393 |
|
389 |
/** Font style flag italic */ |
|
394 |
/** Font style flag italic */ |
390 |
public static final int FONT_STYLE_ITALIC = 1 << 2; |
|
395 |
public static final int FONT_STYLE_ITALIC = 1 << 2; |
391 |
|
|
396 |
|
392 |
/** Font style flag underlined */ |
|
397 |
/** Font style flag underlined */ |
393 |
public static final int FONT_STYLE_UNDERLINED = 1 << 3; |
|
398 |
public static final int FONT_STYLE_UNDERLINED = 1 << 3; |
394 |
|
|
399 |
|
395 |
/** Font style flag strikethrough (Personal Profile 1.1 only) */ |
|
400 |
/** Font style flag strikethrough (Personal Profile 1.1 only) */ |
396 |
public static final int FONT_STYLE_STRIKETHROUGH = 1 << 4; |
|
401 |
public static final int FONT_STYLE_STRIKETHROUGH = 1 << 4; |
397 |
|
|
402 |
|
398 |
public static final int KEYCODE_ALT = 1018; |
|
403 |
public static final int KEYCODE_ALT = 1018; |
399 |
|
|
404 |
|
400 |
public static final int KEYCODE_ARROW_DOWN = 1016; |
|
405 |
public static final int KEYCODE_ARROW_DOWN = 1016; |
401 |
|
|
406 |
|
402 |
public static final int KEYCODE_ARROW_LEFT = 1013; |
|
407 |
public static final int KEYCODE_ARROW_LEFT = 1013; |
403 |
|
|
408 |
|
404 |
public static final int KEYCODE_ARROW_RIGHT = 1014; |
|
409 |
public static final int KEYCODE_ARROW_RIGHT = 1014; |
405 |
|
|
410 |
|
406 |
public static final int KEYCODE_ARROW_UP = 1015; |
|
411 |
public static final int KEYCODE_ARROW_UP = 1015; |
407 |
|
|
412 |
|
408 |
public static final int KEYCODE_BACKSPACE = 1000; |
|
413 |
public static final int KEYCODE_BACKSPACE = 1000; |
409 |
|
|
414 |
|
410 |
public static final int KEYCODE_CONTROL = 1019; |
|
415 |
public static final int KEYCODE_CONTROL = 1019; |
411 |
|
|
416 |
|
412 |
public static final int KEYCODE_DELETE = 1012; |
|
417 |
public static final int KEYCODE_DELETE = 1012; |
413 |
|
|
418 |
|
414 |
public static final int KEYCODE_DEVICE0 = 1063; |
|
419 |
public static final int KEYCODE_DEVICE0 = 1063; |
415 |
|
|
420 |
|
416 |
public static final int KEYCODE_DEVICE1 = 1064; |
|
421 |
public static final int KEYCODE_DEVICE1 = 1064; |
417 |
|
|
422 |
|
418 |
public static final int KEYCODE_DEVICE2 = 1065; |
|
423 |
public static final int KEYCODE_DEVICE2 = 1065; |
419 |
|
|
424 |
|
420 |
public static final int KEYCODE_DEVICE3 = 1066; |
|
425 |
public static final int KEYCODE_DEVICE3 = 1066; |
421 |
|
|
426 |
|
422 |
public static final int KEYCODE_END = 1008; |
|
427 |
public static final int KEYCODE_END = 1008; |
423 |
|
|
428 |
|
424 |
public static final int KEYCODE_ENTER = 1002; |
|
429 |
public static final int KEYCODE_ENTER = 1002; |
425 |
|
|
430 |
|
426 |
public static final int KEYCODE_ESCAPE = 1003; |
|
431 |
public static final int KEYCODE_ESCAPE = 1003; |
427 |
|
|
432 |
|
428 |
public static final int KEYCODE_F1 = 1023; |
|
433 |
public static final int KEYCODE_F1 = 1023; |
429 |
|
|
434 |
|
430 |
public static final int KEYCODE_F10 = 1032; |
|
435 |
public static final int KEYCODE_F10 = 1032; |
431 |
|
|
436 |
|
432 |
public static final int KEYCODE_F11 = 1033; |
|
437 |
public static final int KEYCODE_F11 = 1033; |
433 |
|
|
438 |
|
434 |
public static final int KEYCODE_F12 = 1034; |
|
439 |
public static final int KEYCODE_F12 = 1034; |
435 |
|
|
440 |
|
436 |
public static final int KEYCODE_F13 = 1035; |
|
441 |
public static final int KEYCODE_F13 = 1035; |
437 |
|
|
442 |
|
438 |
public static final int KEYCODE_F14 = 1036; |
|
443 |
public static final int KEYCODE_F14 = 1036; |
439 |
|
|
444 |
|
440 |
public static final int KEYCODE_F15 = 1037; |
|
445 |
public static final int KEYCODE_F15 = 1037; |
441 |
|
|
446 |
|
442 |
public static final int KEYCODE_F16 = 1038; |
|
447 |
public static final int KEYCODE_F16 = 1038; |
443 |
|
|
448 |
|
444 |
public static final int KEYCODE_F17 = 1039; |
|
449 |
public static final int KEYCODE_F17 = 1039; |
445 |
|
|
450 |
|
446 |
public static final int KEYCODE_F18 = 1040; |
|
451 |
public static final int KEYCODE_F18 = 1040; |
447 |
|
|
452 |
|
448 |
public static final int KEYCODE_F19 = 1041; |
|
453 |
public static final int KEYCODE_F19 = 1041; |
449 |
|
|
454 |
|
450 |
public static final int KEYCODE_F2 = 1024; |
|
455 |
public static final int KEYCODE_F2 = 1024; |
451 |
|
|
456 |
|
452 |
public static final int KEYCODE_F20 = 1042; |
|
457 |
public static final int KEYCODE_F20 = 1042; |
453 |
|
|
458 |
|
454 |
public static final int KEYCODE_F21 = 1043; |
|
459 |
public static final int KEYCODE_F21 = 1043; |
455 |
|
|
460 |
|
456 |
public static final int KEYCODE_F22 = 1044; |
|
461 |
public static final int KEYCODE_F22 = 1044; |
457 |
|
|
462 |
|
458 |
public static final int KEYCODE_F23 = 1045; |
|
463 |
public static final int KEYCODE_F23 = 1045; |
459 |
|
|
464 |
|
460 |
public static final int KEYCODE_F24 = 1046; |
|
465 |
public static final int KEYCODE_F24 = 1046; |
461 |
|
|
466 |
|
462 |
public static final int KEYCODE_F3 = 1025; |
|
467 |
public static final int KEYCODE_F3 = 1025; |
463 |
|
|
468 |
|
464 |
public static final int KEYCODE_F4 = 1026; |
|
469 |
public static final int KEYCODE_F4 = 1026; |
465 |
|
|
470 |
|
466 |
public static final int KEYCODE_F5 = 1027; |
|
471 |
public static final int KEYCODE_F5 = 1027; |
467 |
|
|
472 |
|
468 |
public static final int KEYCODE_F6 = 1028; |
|
473 |
public static final int KEYCODE_F6 = 1028; |
469 |
|
|
474 |
|
470 |
public static final int KEYCODE_F7 = 1029; |
|
475 |
public static final int KEYCODE_F7 = 1029; |
471 |
|
|
476 |
|
472 |
public static final int KEYCODE_F8 = 1030; |
|
477 |
public static final int KEYCODE_F8 = 1030; |
473 |
|
|
478 |
|
474 |
public static final int KEYCODE_F9 = 1031; |
|
479 |
public static final int KEYCODE_F9 = 1031; |
475 |
|
|
480 |
|
476 |
public static final int KEYCODE_HELP = 1062; |
|
481 |
public static final int KEYCODE_HELP = 1062; |
477 |
|
|
482 |
|
478 |
public static final int KEYCODE_HOME = 1007; |
|
483 |
public static final int KEYCODE_HOME = 1007; |
479 |
|
|
484 |
|
480 |
public static final int KEYCODE_INSERT = 1011; |
|
485 |
public static final int KEYCODE_INSERT = 1011; |
481 |
|
|
486 |
|
482 |
public static final int KEYCODE_LOCK_CAPS = 1020; |
|
487 |
public static final int KEYCODE_LOCK_CAPS = 1020; |
483 |
|
|
488 |
|
484 |
public static final int KEYCODE_LOCK_NUM = 1021; |
|
489 |
public static final int KEYCODE_LOCK_NUM = 1021; |
485 |
|
|
490 |
|
486 |
public static final int KEYCODE_LOCK_SCROLL = 1022; |
|
491 |
public static final int KEYCODE_LOCK_SCROLL = 1022; |
487 |
|
|
492 |
|
488 |
public static final int KEYCODE_PAGE_DOWN = 1010; |
|
493 |
public static final int KEYCODE_PAGE_DOWN = 1010; |
489 |
|
|
494 |
|
490 |
public static final int KEYCODE_PAGE_UP = 1009; |
|
495 |
public static final int KEYCODE_PAGE_UP = 1009; |
491 |
|
|
496 |
|
492 |
public static final int KEYCODE_PAUSE = 1006; |
|
497 |
public static final int KEYCODE_PAUSE = 1006; |
493 |
|
|
498 |
|
494 |
public static final int KEYCODE_PRINTSCREEN = 1005; |
|
499 |
public static final int KEYCODE_PRINTSCREEN = 1005; |
495 |
|
|
500 |
|
496 |
public static final int KEYCODE_SHIFT = 1017; |
|
501 |
public static final int KEYCODE_SHIFT = 1017; |
497 |
|
|
502 |
|
498 |
public static final int KEYCODE_TAB = 1001; |
|
503 |
public static final int KEYCODE_TAB = 1001; |
499 |
|
|
504 |
|
500 |
/** |
|
505 |
/** |
501 |
* Keyboard event constant representing the numeric key |
|
506 |
* Keyboard event constant representing the numeric key |
502 |
* pad multiply key. |
|
507 |
* pad multiply key. |
503 |
*/ |
|
508 |
*/ |
504 |
public static final int KEYCODE_KEYPAD_MULTIPLY = 1067; |
|
509 |
public static final int KEYCODE_KEYPAD_MULTIPLY = 1067; |
505 |
|
|
510 |
|
506 |
/** |
|
511 |
/** |
507 |
* Keyboard event constant representing the numeric key |
|
512 |
* Keyboard event constant representing the numeric key |
508 |
* pad add key. |
|
513 |
* pad add key. |
509 |
*/ |
|
514 |
*/ |
510 |
public static final int KEYCODE_KEYPAD_ADD = 1068; |
|
515 |
public static final int KEYCODE_KEYPAD_ADD = 1068; |
511 |
|
|
516 |
|
512 |
/** |
|
517 |
/** |
513 |
* Keyboard event constant representing the numeric key |
|
518 |
* Keyboard event constant representing the numeric key |
514 |
* pad subtract key. |
|
519 |
* pad subtract key. |
515 |
*/ |
|
520 |
*/ |
516 |
public static final int KEYCODE_KEYPAD_SUBTRACT = 1069; |
|
521 |
public static final int KEYCODE_KEYPAD_SUBTRACT = 1069; |
517 |
|
|
522 |
|
518 |
/** |
|
523 |
/** |
519 |
* Keyboard event constant representing the numeric key |
|
524 |
* Keyboard event constant representing the numeric key |
520 |
* pad decimal key. |
|
525 |
* pad decimal key. |
521 |
*/ |
|
526 |
*/ |
522 |
public static final int KEYCODE_KEYPAD_DECIMAL = 1070; |
|
527 |
public static final int KEYCODE_KEYPAD_DECIMAL = 1070; |
523 |
|
|
528 |
|
524 |
/** |
|
529 |
/** |
525 |
* Keyboard event constant representing the numeric key |
|
530 |
* Keyboard event constant representing the numeric key |
526 |
* pad divide key. |
|
531 |
* pad divide key. |
527 |
*/ |
|
532 |
*/ |
528 |
public static final int KEYCODE_KEYPAD_DIVIDE = 1071; |
|
533 |
public static final int KEYCODE_KEYPAD_DIVIDE = 1071; |
529 |
|
|
534 |
|
530 |
/** |
|
535 |
/** |
531 |
* Keyboard event constant representing the numeric key |
|
536 |
* Keyboard event constant representing the numeric key |
532 |
* pad zero key. |
|
537 |
* pad zero key. |
533 |
*/ |
|
538 |
*/ |
534 |
public static final int KEYCODE_KEYPAD_0 = 1072; |
|
539 |
public static final int KEYCODE_KEYPAD_0 = 1072; |
535 |
|
|
540 |
|
536 |
/** |
|
541 |
/** |
537 |
* Keyboard event constant representing the numeric key |
|
542 |
* Keyboard event constant representing the numeric key |
538 |
* pad one key. |
|
543 |
* pad one key. |
539 |
*/ |
|
544 |
*/ |
540 |
public static final int KEYCODE_KEYPAD_1 = 1073; |
|
545 |
public static final int KEYCODE_KEYPAD_1 = 1073; |
541 |
|
|
546 |
|
542 |
/** |
|
547 |
/** |
543 |
* Keyboard event constant representing the numeric key |
|
548 |
* Keyboard event constant representing the numeric key |
544 |
* pad two key. |
|
549 |
* pad two key. |
545 |
*/ |
|
550 |
*/ |
546 |
public static final int KEYCODE_KEYPAD_2 = 1074; |
|
551 |
public static final int KEYCODE_KEYPAD_2 = 1074; |
547 |
|
|
552 |
|
548 |
/** |
|
553 |
/** |
549 |
* Keyboard event constant representing the numeric key |
|
554 |
* Keyboard event constant representing the numeric key |
550 |
* pad three key. |
|
555 |
* pad three key. |
551 |
*/ |
|
556 |
*/ |
552 |
public static final int KEYCODE_KEYPAD_3 = 1075; |
|
557 |
public static final int KEYCODE_KEYPAD_3 = 1075; |
553 |
|
|
558 |
|
554 |
/** |
|
559 |
/** |
555 |
* Keyboard event constant representing the numeric key |
|
560 |
* Keyboard event constant representing the numeric key |
556 |
* pad four key. |
|
561 |
* pad four key. |
557 |
*/ |
|
562 |
*/ |
558 |
public static final int KEYCODE_KEYPAD_4 = 1076; |
|
563 |
public static final int KEYCODE_KEYPAD_4 = 1076; |
559 |
|
|
564 |
|
560 |
/** |
|
565 |
/** |
561 |
* Keyboard event constant representing the numeric key |
|
566 |
* Keyboard event constant representing the numeric key |
562 |
* pad five key. |
|
567 |
* pad five key. |
563 |
*/ |
|
568 |
*/ |
564 |
public static final int KEYCODE_KEYPAD_5 = 1077; |
|
569 |
public static final int KEYCODE_KEYPAD_5 = 1077; |
565 |
|
|
570 |
|
566 |
/** |
|
571 |
/** |
567 |
* Keyboard event constant representing the numeric key |
|
572 |
* Keyboard event constant representing the numeric key |
568 |
* pad six key. |
|
573 |
* pad six key. |
569 |
*/ |
|
574 |
*/ |
570 |
public static final int KEYCODE_KEYPAD_6 = 1078; |
|
575 |
public static final int KEYCODE_KEYPAD_6 = 1078; |
571 |
|
|
576 |
|
572 |
/** |
|
577 |
/** |
573 |
* Keyboard event constant representing the numeric key |
|
578 |
* Keyboard event constant representing the numeric key |
574 |
* pad seven key. |
|
579 |
* pad seven key. |
575 |
*/ |
|
580 |
*/ |
576 |
public static final int KEYCODE_KEYPAD_7 = 1079; |
|
581 |
public static final int KEYCODE_KEYPAD_7 = 1079; |
577 |
|
|
582 |
|
578 |
/** |
|
583 |
/** |
579 |
* Keyboard event constant representing the numeric key |
|
584 |
* Keyboard event constant representing the numeric key |
580 |
* pad eight key. |
|
585 |
* pad eight key. |
581 |
*/ |
|
586 |
*/ |
582 |
public static final int KEYCODE_KEYPAD_8 = 1080; |
|
587 |
public static final int KEYCODE_KEYPAD_8 = 1080; |
583 |
|
|
588 |
|
584 |
/** |
|
589 |
/** |
585 |
* Keyboard event constant representing the numeric key |
|
590 |
* Keyboard event constant representing the numeric key |
586 |
* pad nine key. |
|
591 |
* pad nine key. |
587 |
*/ |
|
592 |
*/ |
588 |
public static final int KEYCODE_KEYPAD_9 = 1081; |
|
593 |
public static final int KEYCODE_KEYPAD_9 = 1081; |
589 |
|
|
594 |
|
590 |
/** |
|
595 |
/** |
591 |
* Keyboard event constant representing the numeric key |
|
596 |
* Keyboard event constant representing the numeric key |
592 |
* pad enter key. |
|
597 |
* pad enter key. |
593 |
*/ |
|
598 |
*/ |
594 |
public static final int KEYCODE_KEYPAD_ENTER = 1082; |
|
599 |
public static final int KEYCODE_KEYPAD_ENTER = 1082; |
595 |
|
|
600 |
|
596 |
public static final int LINE_DASH = 1 << 1; |
|
601 |
public static final int LINE_DASH = 1 << 1; |
597 |
|
|
602 |
|
598 |
public static final int LINE_DASHDOT = 1 << 3; |
|
603 |
public static final int LINE_DASHDOT = 1 << 3; |
599 |
|
|
604 |
|
600 |
public static final int LINE_DASHDOTDOT = 1 << 4; |
|
605 |
public static final int LINE_DASHDOTDOT = 1 << 4; |
601 |
|
|
606 |
|
602 |
public static final int LINE_DOT = 1 << 2; |
|
607 |
public static final int LINE_DOT = 1 << 2; |
603 |
|
|
608 |
|
604 |
public static final int LINE_SOLID = 1; |
|
609 |
public static final int LINE_SOLID = 1; |
605 |
|
|
610 |
|
606 |
public static final int MODIFIER_MASK_ALT = 1; |
|
611 |
public static final int MODIFIER_MASK_ALT = 1; |
607 |
|
|
612 |
|
608 |
public static final int MODIFIER_MASK_CONTROL = 4; |
|
613 |
public static final int MODIFIER_MASK_CONTROL = 4; |
609 |
|
|
614 |
|
610 |
public static final int MODIFIER_MASK_SHIFT = 2; |
|
615 |
public static final int MODIFIER_MASK_SHIFT = 2; |
611 |
|
|
616 |
|
612 |
/** |
|
617 |
/** |
613 |
* Index into palette mask array for alpha mask. |
|
618 |
* Index into palette mask array for alpha mask. |
614 |
* Palette mask array is returned by <code>Image_GetDirectPaletteMasks()</code> |
|
619 |
* Palette mask array is returned by <code>Image_GetDirectPaletteMasks()</code> |
615 |
* @internal this should only be used by toolkit implementors |
|
620 |
* @internal this should only be used by toolkit implementors |
616 |
*/ |
|
621 |
*/ |
617 |
public static final int PALETTE_MASK_ALPHA = 3; |
|
622 |
public static final int PALETTE_MASK_ALPHA = 3; |
618 |
|
|
623 |
|
619 |
/** |
|
624 |
/** |
620 |
* Index into palette mask array for blue mask. |
|
625 |
* Index into palette mask array for blue mask. |
621 |
* Palette mask array is returned by <code>Image_GetDirectPaletteMasks()</code> |
|
626 |
* Palette mask array is returned by <code>Image_GetDirectPaletteMasks()</code> |
622 |
* @internal this should only be used by toolkit implementors |
|
627 |
* @internal this should only be used by toolkit implementors |
623 |
*/ |
|
628 |
*/ |
624 |
public static final int PALETTE_MASK_BLUE = 2; |
|
629 |
public static final int PALETTE_MASK_BLUE = 2; |
625 |
|
|
630 |
|
626 |
/** |
|
631 |
/** |
627 |
* Index into palette mask array for green mask. |
|
632 |
* Index into palette mask array for green mask. |
628 |
* Palette mask array is returned by <code>Image_GetDirectPaletteMasks()</code> |
|
633 |
* Palette mask array is returned by <code>Image_GetDirectPaletteMasks()</code> |
629 |
* @internal this should only be used by toolkit implementors |
|
634 |
* @internal this should only be used by toolkit implementors |
630 |
*/ |
|
635 |
*/ |
631 |
public static final int PALETTE_MASK_GREEN = 1; |
|
636 |
public static final int PALETTE_MASK_GREEN = 1; |
632 |
|
|
637 |
|
633 |
/** |
|
638 |
/** |
634 |
* Index into palette mask array for red mask. |
|
639 |
* Index into palette mask array for red mask. |
635 |
* Palette mask array is returned by <code>Image_GetDirectPaletteMasks()</code> |
|
640 |
* Palette mask array is returned by <code>Image_GetDirectPaletteMasks()</code> |
636 |
* @internal this should only be used by toolkit implementors |
|
641 |
* @internal this should only be used by toolkit implementors |
637 |
*/ |
|
642 |
*/ |
638 |
public static final int PALETTE_MASK_RED = 0; |
|
643 |
public static final int PALETTE_MASK_RED = 0; |
639 |
|
|
644 |
|
640 |
/** |
|
645 |
/** |
641 |
* Pointer button masks must not conflict with the alt, control, |
|
646 |
* Pointer button masks must not conflict with the alt, control, |
642 |
* and shift modifiers |
|
647 |
* and shift modifiers |
643 |
*/ |
|
648 |
*/ |
644 |
public static final int POINTER_MASK_NOBUTTON = 0; |
|
649 |
public static final int POINTER_MASK_NOBUTTON = 0; |
645 |
|
|
650 |
|
646 |
public static final int POINTER_MASK_BUTTON1 = 8; |
|
651 |
public static final int POINTER_MASK_BUTTON1 = 8; |
647 |
|
|
652 |
|
648 |
public static final int POINTER_MASK_BUTTON2 = 16; |
|
653 |
public static final int POINTER_MASK_BUTTON2 = 16; |
649 |
|
|
654 |
|
650 |
public static final int POINTER_MASK_BUTTON3 = 32; |
|
655 |
public static final int POINTER_MASK_BUTTON3 = 32; |
651 |
|
|
656 |
|
652 |
public static final int POINTER_POPUP_TRIGGER = 1 << 6; |
|
657 |
public static final int POINTER_POPUP_TRIGGER = 1 << 6; |
653 |
|
|
658 |
|
654 |
public static final int SCROLLBAR_ACTION_BLOCK_DECREMENT = 2; |
|
659 |
public static final int SCROLLBAR_ACTION_BLOCK_DECREMENT = 2; |
655 |
|
|
660 |
|
656 |
public static final int SCROLLBAR_ACTION_BLOCK_INCREMENT = 3; |
|
661 |
public static final int SCROLLBAR_ACTION_BLOCK_INCREMENT = 3; |
657 |
|
|
662 |
|
658 |
public static final int SCROLLBAR_ACTION_END = 6; |
|
663 |
public static final int SCROLLBAR_ACTION_END = 6; |
659 |
|
|
664 |
|
660 |
public static final int SCROLLBAR_ACTION_HOME = 5; |
|
665 |
public static final int SCROLLBAR_ACTION_HOME = 5; |
661 |
|
|
666 |
|
662 |
public static final int SCROLLBAR_ACTION_TRACK = 4; |
|
667 |
public static final int SCROLLBAR_ACTION_TRACK = 4; |
663 |
|
|
668 |
|
664 |
public static final int SCROLLBAR_ACTION_UNIT_DECREMENT = 0; |
|
669 |
public static final int SCROLLBAR_ACTION_UNIT_DECREMENT = 0; |
665 |
|
|
670 |
|
666 |
public static final int SCROLLBAR_ACTION_UNIT_INCREMENT = 1; |
|
671 |
public static final int SCROLLBAR_ACTION_UNIT_INCREMENT = 1; |
667 |
|
|
672 |
|
668 |
public static final int SCROLLBAR_ACTION_NONE = 7; |
|
673 |
public static final int SCROLLBAR_ACTION_NONE = 7; |
669 |
|
|
674 |
|
670 |
/** |
|
675 |
/** |
671 |
* Interpret tab characters (<code>"\t"</code>) as tab stops. |
|
676 |
* Interpret tab characters (<code>"\t"</code>) as tab stops. |
672 |
* @see #Graphics_DrawString |
|
677 |
* @see #Graphics_DrawString |
673 |
* @see #Font_StringExtent |
|
678 |
* @see #Font_StringExtent |
674 |
*/ |
|
679 |
*/ |
675 |
public static final int STRING_EXPAND_TAB = 1 << 1; |
|
680 |
public static final int STRING_EXPAND_TAB = 1 << 1; |
676 |
|
|
681 |
|
677 |
/** |
|
682 |
/** |
678 |
* Interpret a mnemonic character (<code>&</code>) to |
|
683 |
* Interpret a mnemonic character (<code>&</code>) to |
679 |
* underline the next character instead of rendering the |
|
684 |
* underline the next character instead of rendering the |
680 |
* ampersand. |
|
685 |
* ampersand. |
681 |
* @see #Graphics_DrawString |
|
686 |
* @see #Graphics_DrawString |
682 |
* @see #Font_StringExtent |
|
687 |
* @see #Font_StringExtent |
683 |
*/ |
|
688 |
*/ |
684 |
public static final int STRING_MNEMONIC = 1 << 2; |
|
689 |
public static final int STRING_MNEMONIC = 1 << 2; |
685 |
|
|
690 |
|
686 |
/** |
|
691 |
/** |
687 |
* Render text transparently on the background. |
|
692 |
* Render text transparently on the background. |
688 |
* @see #Graphics_DrawString |
|
693 |
* @see #Graphics_DrawString |
689 |
*/ |
|
694 |
*/ |
690 |
public static final int STRING_TRANSPARENT = 1 << 3; |
|
695 |
public static final int STRING_TRANSPARENT = 1 << 3; |
691 |
|
|
696 |
|
692 |
/** |
|
697 |
/** |
693 |
* Wrap text at the line delimiters. Valid line delimiters are |
|
698 |
* Wrap text at the line delimiters. Valid line delimiters are |
694 |
* <code>"\r"</code>, <code>"\n"</code> and <code>"\r\n"</code> |
|
699 |
* <code>"\r"</code>, <code>"\n"</code> and <code>"\r\n"</code> |
695 |
* @see #Graphics_DrawString() |
|
700 |
* @see #Graphics_DrawString() |
696 |
* @see #Font_StringExtent() |
|
701 |
* @see #Font_StringExtent() |
697 |
*/ |
|
702 |
*/ |
698 |
public static final int STRING_WRAP = 1; |
|
703 |
public static final int STRING_WRAP = 1; |
699 |
|
|
704 |
|
700 |
/** |
|
705 |
/** |
701 |
* Shell style indicating that while the Shell is open it will |
|
706 |
* Shell style indicating that while the Shell is open it will |
702 |
* block input to every other Shell in the application. Modality |
|
707 |
* block input to every other Shell in the application. Modality |
703 |
* styles are treated as hints since typically all types of modality |
|
708 |
* styles are treated as hints since typically all types of modality |
704 |
* are not supported on every platform. |
|
709 |
* are not supported on every platform. |
705 |
*/ |
|
710 |
*/ |
706 |
public static final int STYLE_APPLICATION_MODAL = 1 << 6; |
|
711 |
public static final int STYLE_APPLICATION_MODAL = 1 << 6; |
707 |
|
|
712 |
|
708 |
/** Border */ |
|
713 |
/** Border */ |
709 |
public static final int STYLE_BORDER = 1 << 11; |
|
714 |
public static final int STYLE_BORDER = 1 << 11; |
710 |
|
|
715 |
|
711 |
/** Center alignment */ |
|
716 |
/** Center alignment */ |
712 |
public static final int STYLE_CENTER = 1 << 1; |
|
717 |
public static final int STYLE_CENTER = 1 << 1; |
713 |
|
|
718 |
|
714 |
/** The MenuItem style for a checkbox item */ |
|
719 |
/** The MenuItem style for a checkbox item */ |
715 |
public static final int STYLE_CHECK = 1 << 5; |
|
720 |
public static final int STYLE_CHECK = 1 << 5; |
716 |
|
|
721 |
|
717 |
/** Close trim */ |
|
722 |
/** Close trim */ |
718 |
public static final int STYLE_CLOSE = 1; |
|
723 |
public static final int STYLE_CLOSE = 1; |
719 |
|
|
724 |
|
720 |
/** Drop-down menu and combo behavior */ |
|
725 |
/** Drop-down menu and combo behavior */ |
721 |
public static final int STYLE_DROP_DOWN = 1 << 26; |
|
726 |
public static final int STYLE_DROP_DOWN = 1 << 26; |
722 |
|
|
727 |
|
723 |
/** Flat */ |
|
728 |
/** Flat */ |
724 |
public static final int STYLE_FLAT = 1 << 12; |
|
729 |
public static final int STYLE_FLAT = 1 << 12; |
725 |
|
|
730 |
|
726 |
/** Horizontal scroll bars */ |
|
731 |
/** Horizontal scroll bars */ |
727 |
public static final int STYLE_H_SCROLL = 1 << 16; |
|
732 |
public static final int STYLE_H_SCROLL = 1 << 16; |
728 |
|
|
733 |
|
729 |
/** Horizontal style */ |
|
734 |
/** Horizontal style */ |
730 |
public static final int STYLE_HORIZONTAL = 1 << 4; |
|
735 |
public static final int STYLE_HORIZONTAL = 1 << 4; |
731 |
|
|
736 |
|
732 |
/** Lead alignment (left alignment in left-to-right languages) */ |
|
737 |
/** Lead alignment (left alignment in left-to-right languages) */ |
733 |
public static final int STYLE_LEAD = 1; |
|
738 |
public static final int STYLE_LEAD = 1; |
734 |
|
|
739 |
|
735 |
/** Left to right orientation */ |
|
740 |
/** Left to right orientation */ |
736 |
public static final int STYLE_LEFT_TO_RIGHT = 1 << 14; |
|
741 |
public static final int STYLE_LEFT_TO_RIGHT = 1 << 14; |
737 |
|
|
742 |
|
738 |
/** Maximize trim */ |
|
743 |
/** Maximize trim */ |
739 |
public static final int STYLE_MAX = 1 << 2; |
|
744 |
public static final int STYLE_MAX = 1 << 2; |
740 |
|
|
745 |
|
741 |
/** Minimize trim */ |
|
746 |
/** Minimize trim */ |
742 |
public static final int STYLE_MIN = 1 << 1; |
|
747 |
public static final int STYLE_MIN = 1 << 1; |
743 |
|
|
748 |
|
744 |
/** Modeless */ |
|
749 |
/** Modeless */ |
745 |
public static final int STYLE_MODELESS = 1 << 7; |
|
750 |
public static final int STYLE_MODELESS = 1 << 7; |
746 |
|
|
751 |
|
747 |
/** Multiple selection and multiple line style */ |
|
752 |
/** Multiple selection and multiple line style */ |
748 |
public static final int STYLE_MULTI = 1 << 23; |
|
753 |
public static final int STYLE_MULTI = 1 << 23; |
749 |
|
|
754 |
|
750 |
/** Do not clear the background on paint events */ |
|
755 |
/** Do not clear the background on paint events */ |
751 |
public static final int STYLE_NO_BACKGROUND = 1 << 18; |
|
756 |
public static final int STYLE_NO_BACKGROUND = 1 << 18; |
752 |
|
|
757 |
|
753 |
/** Do not take focus */ |
|
758 |
/** Do not take focus */ |
754 |
public static final int STYLE_NO_FOCUS = 1 << 20; |
|
759 |
public static final int STYLE_NO_FOCUS = 1 << 20; |
755 |
|
|
760 |
|
756 |
/** Do not merge paint events */ |
|
761 |
/** Do not merge paint events */ |
757 |
public static final int STYLE_NO_MERGE_PAINTS = 1 << 19; |
|
762 |
public static final int STYLE_NO_MERGE_PAINTS = 1 << 19; |
758 |
|
|
763 |
|
759 |
/** Do not redraw the entire client area on resize */ |
|
764 |
/** Do not redraw the entire client area on resize */ |
760 |
public static final int STYLE_NO_REDRAW_RESIZE = 1 << 21; |
|
765 |
public static final int STYLE_NO_REDRAW_RESIZE = 1 << 21; |
761 |
|
|
766 |
|
762 |
/** |
|
767 |
/** |
763 |
* Shell style indicating that while the Shell is open it will |
|
768 |
* Shell style indicating that while the Shell is open it will |
764 |
* block input to its parent. Modality styles are treated as |
|
769 |
* block input to its parent. Modality styles are treated as |
765 |
* hints since typically all types of modality are not supported |
|
770 |
* hints since typically all types of modality are not supported |
766 |
* on every platform. |
|
771 |
* on every platform. |
767 |
*/ |
|
772 |
*/ |
768 |
public static final int STYLE_PRIMARY_MODAL = 1 << 8; |
|
773 |
public static final int STYLE_PRIMARY_MODAL = 1 << 8; |
769 |
|
|
774 |
|
770 |
/** The MenuItem style for a radio button item */ |
|
775 |
/** The MenuItem style for a radio button item */ |
771 |
public static final int STYLE_RADIO = 1 << 4; |
|
776 |
public static final int STYLE_RADIO = 1 << 4; |
772 |
|
|
777 |
|
773 |
/** Read-only text field */ |
|
778 |
/** Read-only text field */ |
774 |
public static final int STYLE_READ_ONLY = 1 << 24; |
|
779 |
public static final int STYLE_READ_ONLY = 1 << 24; |
775 |
|
|
780 |
|
776 |
/** Right to left orientation */ |
|
781 |
/** Right to left orientation */ |
777 |
public static final int STYLE_RIGHT_TO_LEFT = 1 << 15; |
|
782 |
public static final int STYLE_RIGHT_TO_LEFT = 1 << 15; |
778 |
|
|
783 |
|
779 |
/** Shadow inside */ |
|
784 |
/** Shadow inside */ |
780 |
public static final int STYLE_SHADOW_IN = 1 << 5; |
|
785 |
public static final int STYLE_SHADOW_IN = 1 << 5; |
781 |
|
|
786 |
|
782 |
/** No shadow */ |
|
787 |
/** No shadow */ |
783 |
public static final int STYLE_SHADOW_NONE = 1 << 7; |
|
788 |
public static final int STYLE_SHADOW_NONE = 1 << 7; |
784 |
|
|
789 |
|
785 |
/** Shadow outside */ |
|
790 |
/** Shadow outside */ |
786 |
public static final int STYLE_SHADOW_OUT = 1 << 6; |
|
791 |
public static final int STYLE_SHADOW_OUT = 1 << 6; |
787 |
|
|
792 |
|
788 |
/** Title trim */ |
|
793 |
/** Title trim */ |
789 |
public static final int STYLE_TITLE = 1 << 5; |
|
794 |
public static final int STYLE_TITLE = 1 << 5; |
790 |
|
|
795 |
|
791 |
/** Trail alignment (right alignment in left-to-right languages) */ |
|
796 |
/** Trail alignment (right alignment in left-to-right languages) */ |
792 |
public static final int STYLE_TRAIL = 1 << 2; |
|
797 |
public static final int STYLE_TRAIL = 1 << 2; |
793 |
|
|
798 |
|
794 |
/** Vertical scroll bars */ |
|
799 |
/** Vertical scroll bars */ |
795 |
public static final int STYLE_V_SCROLL = 1 << 17; |
|
800 |
public static final int STYLE_V_SCROLL = 1 << 17; |
796 |
|
|
801 |
|
797 |
/** Vertical style */ |
|
802 |
/** Vertical style */ |
798 |
public static final int STYLE_VERTICAL = 1 << 3; |
|
803 |
public static final int STYLE_VERTICAL = 1 << 3; |
799 |
|
|
804 |
|
800 |
/** Line wrapping text */ |
|
805 |
/** Line wrapping text */ |
801 |
public static final int STYLE_WRAP = 1 << 8; |
|
806 |
public static final int STYLE_WRAP = 1 << 8; |
802 |
|
|
807 |
|
803 |
/** No trimmings */ |
|
808 |
/** No trimmings */ |
804 |
public static final int STYLE_NO_TRIM = 1 << 3; |
|
809 |
public static final int STYLE_NO_TRIM = 1 << 3; |
805 |
|
|
810 |
|
806 |
/** virtual */ |
|
811 |
/** virtual */ |
807 |
public static final int STYLE_VIRTUAL = 1 << 28; |
|
812 |
public static final int STYLE_VIRTUAL = 1 << 28; |
808 |
|
|
813 |
|
809 |
/** |
|
814 |
/** |
810 |
* Returns the bounds of the device identified by <code>handle</code>. |
|
815 |
* Returns the bounds of the device identified by <code>handle</code>. |
811 |
* |
|
816 |
* |
812 |
* @param handle the device handle |
|
817 |
* @param handle the device handle |
813 |
* @return (rect) the device bounds. Access array members using the |
|
818 |
* @return (rect) the device bounds. Access array members using the |
814 |
* <code>INDEX_X</code>, <code>INDEX_Y</code>, <code>INDEX_WIDTH</code> |
|
819 |
* <code>INDEX_X</code>, <code>INDEX_Y</code>, <code>INDEX_WIDTH</code> |
815 |
* and <code>INDEX_HEIGHT</code> constants. |
|
820 |
* and <code>INDEX_HEIGHT</code> constants. |
816 |
*/ |
|
821 |
*/ |
817 |
public static final native int[] Device_GetBounds(int handle); |
|
822 |
public static final native int[] Device_GetBounds(int handle); |
818 |
|
|
823 |
|
819 |
/** |
|
824 |
/** |
820 |
* Returns a String array containing all typeface names which |
|
825 |
* Returns a String array containing all typeface names which |
821 |
* are either scalable or non-scalable. |
|
826 |
* are either scalable or non-scalable. |
822 |
* |
|
827 |
* |
823 |
* @param handle device handle |
|
828 |
* @param handle device handle |
824 |
* @param scalable indicates whether scalable typefaces are returned |
|
829 |
* @param scalable indicates whether scalable typefaces are returned |
825 |
*/ |
|
830 |
*/ |
826 |
public static final native String[] Device_GetTypefaces(int handle, boolean scalable); |
|
831 |
public static final native String[] Device_GetTypefaces(int handle, boolean scalable); |
827 |
|
|
832 |
|
828 |
/** |
|
833 |
/** |
829 |
* Returns a String array containing all the available variants |
|
834 |
* Returns a String array containing all the available variants |
830 |
* of a particular typeface. Each returned String will have |
|
835 |
* of a particular typeface. Each returned String will have |
831 |
* the following format: |
|
836 |
* the following format: |
832 |
* |
|
837 |
* |
833 |
* 1|<typeface name>|<height>|<style>| |
|
838 |
* 1|<typeface name>|<height>|<style>| |
834 |
* |
|
839 |
* |
835 |
* where: |
|
840 |
* where: |
836 |
* |
|
841 |
* |
837 |
* <typeface name> should match the faceName argument |
|
842 |
* <typeface name> should match the faceName argument |
838 |
* <height> is the height in points of the font |
|
843 |
* <height> is the height in points of the font |
839 |
* <style> is a bitwise OR of FONT_STYLE constants |
|
844 |
* <style> is a bitwise OR of FONT_STYLE constants |
840 |
* |
|
845 |
* |
841 |
* See Font_GetStyle() for a list of supported styles. |
|
846 |
* See Font_GetStyle() for a list of supported styles. |
842 |
* |
|
847 |
* |
843 |
* @param handle device handle |
|
848 |
* @param handle device handle |
844 |
* @param faceName typeface name |
|
849 |
* @param faceName typeface name |
845 |
* @param scalable indicates whether variants should be scalable |
|
850 |
* @param scalable indicates whether variants should be scalable |
846 |
* @return string array of available variants |
|
851 |
* @return string array of available variants |
847 |
*/ |
|
852 |
*/ |
848 |
public static final native String[] Device_GetTypefaceVariants(int handle, String faceName, boolean scalable); |
|
853 |
public static final native String[] Device_GetTypefaceVariants(int handle, String faceName, boolean scalable); |
849 |
|
|
854 |
|
850 |
/** |
|
855 |
/** |
851 |
* Frees the platform resources associated with the device |
|
856 |
* Frees the platform resources associated with the device |
852 |
* identified by <code>handle</code>. |
|
857 |
* identified by <code>handle</code>. |
853 |
* |
|
858 |
* |
854 |
* @param handle the device handle |
|
859 |
* @param handle the device handle |
855 |
*/ |
|
860 |
*/ |
856 |
public static final native void Device_Dispose(int handle); |
|
861 |
public static final native void Device_Dispose(int handle); |
857 |
|
|
862 |
|
858 |
/** |
|
863 |
/** |
859 |
* Creates a new display. |
|
864 |
* Creates a new display. |
860 |
* |
|
865 |
* |
861 |
* @return the new display |
|
866 |
* @return the new display |
862 |
*/ |
|
867 |
*/ |
863 |
public static final native int Display_New(); |
|
868 |
public static final native int Display_New(); |
864 |
|
|
869 |
|
865 |
/** |
|
870 |
/** |
866 |
* Reads an event from the event queue of the display |
|
871 |
* Reads an event from the event queue of the display |
867 |
* identified by <code>handle</code>. |
|
872 |
* identified by <code>handle</code>. |
868 |
* The event is dispatched to one of the event handlers |
|
873 |
* The event is dispatched to one of the event handlers |
869 |
* registered using <code>Display_RegisterCallback()</code> |
|
874 |
* registered using <code>Display_RegisterCallback()</code> |
870 |
* |
|
875 |
* |
871 |
* @param handle the display handle |
|
876 |
* @param handle the display handle |
872 |
* @return true - more events are pending |
|
877 |
* @return true - more events are pending |
873 |
* false - no events are pending, <code>Display_Sleep()</code> |
|
878 |
* false - no events are pending, <code>Display_Sleep()</code> |
874 |
* should be used to wait for the next event |
|
879 |
* should be used to wait for the next event |
875 |
* @see #Display_RegisterCallback |
|
880 |
* @see #Display_RegisterCallback |
876 |
* @see #Display_Sleep |
|
881 |
* @see #Display_Sleep |
877 |
*/ |
|
882 |
*/ |
878 |
public static final native boolean Display_ReadAndDispatch(int handle); |
|
883 |
public static final native boolean Display_ReadAndDispatch(int handle); |
879 |
|
|
884 |
|
880 |
/** |
|
885 |
/** |
881 |
* Initializes the structure used to hold the callback data. This |
|
886 |
* Initializes the structure used to hold the callback data. This |
882 |
* method should always be called once per display and always before |
|
887 |
* method should always be called once per display and always before |
883 |
* any calls to <code>Display_RegisterCallback()</code>. |
|
888 |
* any calls to <code>Display_RegisterCallback()</code>. |
884 |
* |
|
889 |
* |
885 |
* @param handle the display handle |
|
890 |
* @param handle the display handle |
886 |
* @param display the display instance, which is used to setup the display timer callback |
|
891 |
* @param display the display instance, which is used to setup the display timer callback |
887 |
* @see #Display_RegisterCallback |
|
892 |
* @see #Display_RegisterCallback |
888 |
* @ignore the implementation for this method is provided |
|
893 |
* @ignore the implementation for this method is provided |
889 |
*/ |
|
894 |
*/ |
890 |
public static final native void Display_InitCallbacks(int handle, Object display); |
|
895 |
public static final native void Display_InitCallbacks(int handle, Object display); |
891 |
|
|
896 |
|
892 |
/** |
|
897 |
/** |
893 |
* Registers listener a callback for events on the display |
|
898 |
* Registers listener a callback for events on the display |
894 |
* identified by <code>handle</code>. |
|
899 |
* identified by <code>handle</code>. |
895 |
* All events occurring on a class specified in the <code>classNames</code> |
|
900 |
* All events occurring on a class specified in the <code>classNames</code> |
896 |
* array are sent to the corresponding method specified in the |
|
901 |
* array are sent to the corresponding method specified in the |
897 |
* <code>methodNames</code> array. |
|
902 |
* <code>methodNames</code> array. |
898 |
* |
|
903 |
* |
899 |
* This method can only be called after |
|
904 |
* This method can only be called after |
900 |
* <code>Display_InitCallbacks()</code> has been called. |
|
905 |
* <code>Display_InitCallbacks()</code> has been called. |
901 |
* |
|
906 |
* |
902 |
* @param handle the display handle |
|
907 |
* @param handle the display handle |
903 |
* @param id the id of the event to register |
|
908 |
* @param id the id of the event to register |
904 |
* @param className the fully qualified, forward slash ('/') |
|
909 |
* @param className the fully qualified, forward slash ('/') |
905 |
* separated name of the class to register the callback for |
|
910 |
* separated name of the class to register the callback for |
906 |
* @param methodName the name of the callback method to call |
|
911 |
* @param methodName the name of the callback method to call |
907 |
* when event of type <code>id</code> occurs |
|
912 |
* when event of type <code>id</code> occurs |
908 |
* @see #Display_InitCallbacks |
|
913 |
* @see #Display_InitCallbacks |
909 |
* @ignore the implementation for this method is provided |
|
914 |
* @ignore the implementation for this method is provided |
910 |
*/ |
|
915 |
*/ |
911 |
public static final native void Display_RegisterCallback(int handle, int id, String className, String methodName); |
|
916 |
public static final native void Display_RegisterCallback(int handle, int id, String className, String methodName); |
912 |
|
|
917 |
|
913 |
/** |
|
918 |
/** |
914 |
* Causes the calling thread to sleep (that is, to be put in |
|
919 |
* Causes the calling thread to sleep (that is, to be put in |
915 |
* a state where it does not consume CPU cycles) until an |
|
920 |
* a state where it does not consume CPU cycles) until an |
916 |
* event is received for the display identified by |
|
921 |
* event is received for the display identified by |
917 |
* <code>handle</code> or until it is awakened by a call to |
|
922 |
* <code>handle</code> or until it is awakened by a call to |
918 |
* <code>Display_Wake()</code>. |
|
923 |
* <code>Display_Wake()</code>. |
919 |
* |
|
924 |
* |
920 |
* @param handle the display handle |
|
925 |
* @param handle the display handle |
921 |
* @see #Display_Wake |
|
926 |
* @see #Display_Wake |
922 |
*/ |
|
927 |
*/ |
923 |
public static final native void Display_Sleep(int handle); |
|
928 |
public static final native void Display_Sleep(int handle); |
924 |
|
|
929 |
|
925 |
/** |
|
930 |
/** |
926 |
* If the calling thread was sleeping, causes it to be |
|
931 |
* If the calling thread was sleeping, causes it to be |
927 |
* awakened and start running again. |
|
932 |
* awakened and start running again. |
928 |
* |
|
933 |
* |
929 |
* @param handle the display handle |
|
934 |
* @param handle the display handle |
930 |
* @see #Display_Sleep |
|
935 |
* @see #Display_Sleep |
931 |
*/ |
|
936 |
*/ |
932 |
public static final native void Display_Wake(int handle); |
|
937 |
public static final native void Display_Wake(int handle); |
933 |
|
|
938 |
|
934 |
/** |
|
939 |
/** |
935 |
* Creates a new font with the specified typeface name, height |
|
940 |
* Creates a new font with the specified typeface name, height |
936 |
* in points, and style flags. In order for the implementation to |
|
941 |
* in points, and style flags. In order for the implementation to |
937 |
* correctly return a font handle, the exact combination of these |
|
942 |
* correctly return a font handle, the exact combination of these |
938 |
* parameters must match one of the variants returned by |
|
943 |
* parameters must match one of the variants returned by |
939 |
* Device_GetTypefaceVariants(). Otherwise, an error will occur. |
|
944 |
* Device_GetTypefaceVariants(). Otherwise, an error will occur. |
940 |
* |
|
945 |
* |
941 |
* @param deviceHandle the device/display handle |
|
946 |
* @param deviceHandle the device/display handle |
942 |
* @param name one of the system typeface names returned by Device_GetTypefaces |
|
947 |
* @param name one of the system typeface names returned by Device_GetTypefaces |
943 |
* @param height the requested height of the font in points |
|
948 |
* @param height the requested height of the font in points |
944 |
* @param style one of the FONT_STYLE constants |
|
949 |
* @param style one of the FONT_STYLE constants |
945 |
* @return handle of new font |
|
950 |
* @return handle of new font |
946 |
*/ |
|
951 |
*/ |
947 |
public static final native int Font_New(int deviceHandle, String name, int height, int style); |
|
952 |
public static final native int Font_New(int deviceHandle, String name, int height, int style); |
948 |
|
|
953 |
|
949 |
/** |
|
954 |
/** |
950 |
* Frees the platform resources of the font with the specified handle. |
|
955 |
* Frees the platform resources of the font with the specified handle. |
951 |
* |
|
956 |
* |
952 |
* @param handle font handle |
|
957 |
* @param handle font handle |
953 |
*/ |
|
958 |
*/ |
954 |
public static final native void Font_Dispose(int handle); |
|
959 |
public static final native void Font_Dispose(int handle); |
955 |
|
|
960 |
|
956 |
/** |
|
961 |
/** |
957 |
* Returns the advance width in pixels of a character for the |
|
962 |
* Returns the advance width in pixels of a character for the |
958 |
* font with the specified handle. |
|
963 |
* font with the specified handle. |
959 |
* <p> |
|
964 |
* <p> |
960 |
* The advance width is the number of pixels the cursor advances |
|
965 |
* The advance width is the number of pixels the cursor advances |
961 |
* when moving over the character. |
|
966 |
* when moving over the character. |
962 |
* </p> |
|
967 |
* </p> |
963 |
* |
|
968 |
* |
964 |
* @param handle font handle |
|
969 |
* @param handle font handle |
965 |
* @param ch character to be tested for advance width |
|
970 |
* @param ch character to be tested for advance width |
966 |
* @return advance width in pixels |
|
971 |
* @return advance width in pixels |
967 |
*/ |
|
972 |
*/ |
968 |
public static final native int Font_GetAdvanceWidth(int handle, char ch); |
|
973 |
public static final native int Font_GetAdvanceWidth(int handle, char ch); |
969 |
|
|
974 |
|
970 |
/** |
|
975 |
/** |
971 |
* Returns the ascent in pixels of the font with the specified handle. |
|
976 |
* Returns the ascent in pixels of the font with the specified handle. |
972 |
* |
|
977 |
* |
973 |
* @param handle font handle |
|
978 |
* @param handle font handle |
974 |
* @return ascent in pixels |
|
979 |
* @return ascent in pixels |
975 |
*/ |
|
980 |
*/ |
976 |
public static final native int Font_GetAscent(int handle); |
|
981 |
public static final native int Font_GetAscent(int handle); |
977 |
|
|
982 |
|
978 |
/** |
|
983 |
/** |
979 |
* Returns the descent in pixels of the font with the specified handle. |
|
984 |
* Returns the descent in pixels of the font with the specified handle. |
980 |
* |
|
985 |
* |
981 |
* @param handle font handle |
|
986 |
* @param handle font handle |
982 |
* @return descent in pixels |
|
987 |
* @return descent in pixels |
983 |
*/ |
|
988 |
*/ |
984 |
public static final native int Font_GetDescent(int handle); |
|
989 |
public static final native int Font_GetDescent(int handle); |
985 |
|
|
990 |
|
986 |
/** |
|
991 |
/** |
987 |
* Returns the height of the font with the specified handle in points. |
|
992 |
* Returns the height of the font with the specified handle in points. |
988 |
* |
|
993 |
* |
989 |
* @param handle font handle |
|
994 |
* @param handle font handle |
990 |
* @return font height |
|
995 |
* @return font height |
991 |
*/ |
|
996 |
*/ |
992 |
public static final native int Font_GetSizeInPoints(int handle); |
|
997 |
public static final native int Font_GetSizeInPoints(int handle); |
993 |
|
|
998 |
|
994 |
/** |
|
999 |
/** |
995 |
* Returns the leading in pixels of the font with the specified handle. |
|
1000 |
* Returns the leading in pixels of the font with the specified handle. |
996 |
* |
|
1001 |
* |
997 |
* @param handle font handle |
|
1002 |
* @param handle font handle |
998 |
* @return leading in pixels |
|
1003 |
* @return leading in pixels |
999 |
*/ |
|
1004 |
*/ |
1000 |
public static final native int Font_GetLeading(int handle); |
|
1005 |
public static final native int Font_GetLeading(int handle); |
1001 |
|
|
1006 |
|
1002 |
/** |
|
1007 |
/** |
1003 |
* Measures the width and height, in pixels, of the given string. |
|
1008 |
* Measures the width and height, in pixels, of the given string. |
1004 |
* <p> |
|
1009 |
* <p> |
1005 |
* The returned extent is the width and height of the rectangular |
|
1010 |
* The returned extent is the width and height of the rectangular |
1006 |
* area the string would cover if drawn in this font. |
|
1011 |
* area the string would cover if drawn in this font. |
1007 |
* </p> |
|
1012 |
* </p> |
1008 |
* The following flags may be used: |
|
1013 |
* The following flags may be used: |
1009 |
* <ul> |
|
1014 |
* <ul> |
1010 |
* <li><code>STRING_WRAP</code> - wrap text at the line delimiters |
|
1015 |
* <li><code>STRING_WRAP</code> - wrap text at the line delimiters |
1011 |
* prior to measuring. Valid line delimiters are <code>"\r"</code>, |
|
1016 |
* prior to measuring. Valid line delimiters are <code>"\r"</code>, |
1012 |
* <code>"\n"</code> and <code>"\r\n"</code></li> |
|
1017 |
* <code>"\n"</code> and <code>"\r\n"</code></li> |
1013 |
* <li><code>STRING_MNEMONIC</code> - remove any mnemonic characters |
|
1018 |
* <li><code>STRING_MNEMONIC</code> - remove any mnemonic characters |
1014 |
* ('&') prior to measuring</li> |
|
1019 |
* ('&') prior to measuring</li> |
1015 |
* <li><code>STRING_EXPAND_TAB</code> - interpret tab characters |
|
1020 |
* <li><code>STRING_EXPAND_TAB</code> - interpret tab characters |
1016 |
* (<code>"\t"</code>) as tab stops.</li> |
|
1021 |
* (<code>"\t"</code>) as tab stops.</li> |
1017 |
* </ul> |
|
1022 |
* </ul> |
1018 |
* <p> |
|
1023 |
* <p> |
1019 |
* When measuring multiple lines, i.e., line delimiters are present |
|
1024 |
* When measuring multiple lines, i.e., line delimiters are present |
1020 |
* and <code>STRING_WRAP</code> is specified, the returned height |
|
1025 |
* and <code>STRING_WRAP</code> is specified, the returned height |
1021 |
* is the overall height of all lines combined. |
|
1026 |
* is the overall height of all lines combined. |
1022 |
* </p> |
|
1027 |
* </p> |
1023 |
* |
|
1028 |
* |
1024 |
* @param handle the font handle |
|
1029 |
* @param handle the font handle |
1025 |
* @param string the text to measure |
|
1030 |
* @param string the text to measure |
1026 |
* @param flags one or more of <code>STRING_WRAP</code>, |
|
1031 |
* @param flags one or more of <code>STRING_WRAP</code>, |
1027 |
* <code>STRING_MNEMONIC</code> and <code>STRING_EXPAND_TAB</code> |
|
1032 |
* <code>STRING_MNEMONIC</code> and <code>STRING_EXPAND_TAB</code> |
1028 |
* @return (size) the width and height of the given string. Access |
|
1033 |
* @return (size) the width and height of the given string. Access |
1029 |
* array members using the <code>INDEX_X</code> constant for the |
|
1034 |
* array members using the <code>INDEX_X</code> constant for the |
1030 |
* width and using the <code>INDEX_Y</code> constant for the height. |
|
1035 |
* width and using the <code>INDEX_Y</code> constant for the height. |
1031 |
*/ |
|
1036 |
*/ |
1032 |
public static final native int[] Font_StringExtent(int handle, String string, int flags); |
|
1037 |
public static final native int[] Font_StringExtent(int handle, String string, int flags); |
1033 |
|
|
1038 |
|
1034 |
/** |
|
1039 |
/** |
1035 |
* Frees the platform resources associated with the graphics context |
|
1040 |
* Frees the platform resources associated with the graphics context |
1036 |
* identified by <code>handle</code>. |
|
1041 |
* identified by <code>handle</code>. |
1037 |
* |
|
1042 |
* |
1038 |
* @param handle the graphics context handle |
|
1043 |
* @param handle the graphics context handle |
1039 |
*/ |
|
1044 |
*/ |
1040 |
public static final native void Graphics_Dispose(int handle); |
|
1045 |
public static final native void Graphics_Dispose(int handle); |
1041 |
/** |
|
1046 |
/** |
1042 |
* Draws an arc on the graphics context identified by <code>handle</code>. |
|
1047 |
* Draws an arc on the graphics context identified by <code>handle</code>. |
1043 |
* The arc is drawn within the specified bounding rectangle. The |
|
1048 |
* The arc is drawn within the specified bounding rectangle. The |
1044 |
* arc starts at <code>startAngle</code> and extends counter-clockwise |
|
1049 |
* arc starts at <code>startAngle</code> and extends counter-clockwise |
1045 |
* for <code>arcAngle</code> degrees. |
|
1050 |
* for <code>arcAngle</code> degrees. |
1046 |
* <p> |
|
1051 |
* <p> |
1047 |
* The center of the arc is the center of the rectangle whose origin |
|
1052 |
* The center of the arc is the center of the rectangle whose origin |
1048 |
* is <code>x</code>, <code>y</code> and whose size is specified by the |
|
1053 |
* is <code>x</code>, <code>y</code> and whose size is specified by the |
1049 |
* <code>width</code> and <code>height</code> arguments. |
|
1054 |
* <code>width</code> and <code>height</code> arguments. |
1050 |
* </p> |
|
1055 |
* </p> |
1051 |
* <p> |
|
1056 |
* <p> |
1052 |
* The arc's left/top edge is at location <code>x</code>/<code>y</code> |
|
1057 |
* The arc's left/top edge is at location <code>x</code>/<code>y</code> |
1053 |
* respectively. The arc's right edge is at location <code>x + width - 1</code> |
|
1058 |
* respectively. The arc's right edge is at location <code>x + width - 1</code> |
1054 |
* on the graphics context. The arc's bottom edge is at location |
|
1059 |
* on the graphics context. The arc's bottom edge is at location |
1055 |
* <code>y + height - 1</code> on the graphics context. |
|
1060 |
* <code>y + height - 1</code> on the graphics context. |
1056 |
* </p> |
|
1061 |
* </p> |
1057 |
* |
|
1062 |
* |
1058 |
* @param handle the graphics context handle |
|
1063 |
* @param handle the graphics context handle |
1059 |
* @param x x coordinate of the top left corner of the arc bounding |
|
1064 |
* @param x x coordinate of the top left corner of the arc bounding |
1060 |
* rectangle |
|
1065 |
* rectangle |
1061 |
* @param y y coordinate of the top left corner of the arc bounding |
|
1066 |
* @param y y coordinate of the top left corner of the arc bounding |
1062 |
* rectangle |
|
1067 |
* rectangle |
1063 |
* @param width width of the arc |
|
1068 |
* @param width width of the arc |
1064 |
* @param height height of the arc |
|
1069 |
* @param height height of the arc |
1065 |
* @param startAngle identifies the start position of the arc. 0 degrees |
|
1070 |
* @param startAngle identifies the start position of the arc. 0 degrees |
1066 |
* is at the 3 o'clock position. |
|
1071 |
* is at the 3 o'clock position. |
1067 |
* @param arcAngle the angular extent of the arc, relative to the |
|
1072 |
* @param arcAngle the angular extent of the arc, relative to the |
1068 |
* <code>startAngle</code> |
|
1073 |
* <code>startAngle</code> |
1069 |
*/ |
|
1074 |
*/ |
1070 |
public static final native void Graphics_DrawArc(int handle, int x, int y, int width, int height, int startAngle, int arcAngle); |
|
1075 |
public static final native void Graphics_DrawArc(int handle, int x, int y, int width, int height, int startAngle, int arcAngle); |
1071 |
|
|
1076 |
|
1072 |
/** |
|
1077 |
/** |
1073 |
* Draws the specified image at the given location on the graphics |
|
1078 |
* Draws the specified image at the given location on the graphics |
1074 |
* context identified by <code>handle</code>. |
|
1079 |
* context identified by <code>handle</code>. |
1075 |
* |
|
1080 |
* |
1076 |
* @param handle the graphics context handle |
|
1081 |
* @param handle the graphics context handle |
1077 |
* @param image image handle |
|
1082 |
* @param image image handle |
1078 |
* @param x x coordinate of the top left corner of the image |
|
1083 |
* @param x x coordinate of the top left corner of the image |
1079 |
* @param y y coordinate of the top left corner of the image |
|
1084 |
* @param y y coordinate of the top left corner of the image |
1080 |
*/ |
|
1085 |
*/ |
1081 |
public static final native void Graphics_DrawImage(int handle, int image, int x, int y); |
|
1086 |
public static final native void Graphics_DrawImage(int handle, int image, int x, int y); |
1082 |
|
|
1087 |
|
1083 |
|
|
1088 |
|
1084 |
/** |
|
1089 |
/** |
1085 |
* Draws a line in the current pen width and style on the graphics |
|
1090 |
* Draws a line in the current pen width and style on the graphics |
1086 |
* context identified by <code>handle</code>. The line is drawn between |
|
1091 |
* context identified by <code>handle</code>. The line is drawn between |
1087 |
* the end points identified by <code>x1</code>, <code>y1</code> and |
|
1092 |
* the end points identified by <code>x1</code>, <code>y1</code> and |
1088 |
* <code>x2</code>, <code>y2</code>. The end points are included in the |
|
1093 |
* <code>x2</code>, <code>y2</code>. The end points are included in the |
1089 |
* line. |
|
1094 |
* line. |
1090 |
* |
|
1095 |
* |
1091 |
* @param handle the graphics context handle |
|
1096 |
* @param handle the graphics context handle |
1092 |
* @param x1 x coordinate of the first end point |
|
1097 |
* @param x1 x coordinate of the first end point |
1093 |
* @param y1 y coordinate of the first end point |
|
1098 |
* @param y1 y coordinate of the first end point |
1094 |
* @param x2 x coordinate of the second end point |
|
1099 |
* @param x2 x coordinate of the second end point |
1095 |
* @param y2 y coordinate of the second end point |
|
1100 |
* @param y2 y coordinate of the second end point |
1096 |
*/ |
|
1101 |
*/ |
1097 |
public static final native void Graphics_DrawLine(int handle, int x1, int y1, int x2, int y2); |
|
1102 |
public static final native void Graphics_DrawLine(int handle, int x1, int y1, int x2, int y2); |
1098 |
/** |
|
1103 |
/** |
1099 |
* Draws an oval that is within the specified rectangle on the |
|
1104 |
* Draws an oval that is within the specified rectangle on the |
1100 |
* graphics context identified by <code>handle</code>. |
|
1105 |
* graphics context identified by <code>handle</code>. |
1101 |
* <p> |
|
1106 |
* <p> |
1102 |
* The oval's left/top edge is at location <code>x</code>/<code>y</code> |
|
1107 |
* The oval's left/top edge is at location <code>x</code>/<code>y</code> |
1103 |
* respectively. The oval's right edge is at location |
|
1108 |
* respectively. The oval's right edge is at location |
1104 |
* <code>x + width - 1</code> on the graphics context. The oval's |
|
1109 |
* <code>x + width - 1</code> on the graphics context. The oval's |
1105 |
* bottom edge is at location <code>y + height - 1</code> on the |
|
1110 |
* bottom edge is at location <code>y + height - 1</code> on the |
1106 |
* graphics context. |
|
1111 |
* graphics context. |
1107 |
* </p> |
|
1112 |
* </p> |
1108 |
* |
|
1113 |
* |
1109 |
* @param handle the graphics context handle |
|
1114 |
* @param handle the graphics context handle |
1110 |
* @param x x coordinate of the top left corner of the oval bounding |
|
1115 |
* @param x x coordinate of the top left corner of the oval bounding |
1111 |
* rectangle |
|
1116 |
* rectangle |
1112 |
* @param y y coordinate of the top left corner of the oval bounding |
|
1117 |
* @param y y coordinate of the top left corner of the oval bounding |
1113 |
* rectangle |
|
1118 |
* rectangle |
1114 |
* @param width width of the oval |
|
1119 |
* @param width width of the oval |
1115 |
* @param height height of the oval |
|
1120 |
* @param height height of the oval |
1116 |
*/ |
|
1121 |
*/ |
1117 |
public static final native void Graphics_DrawOval(int handle, int x, int y, int width, int height); |
|
1122 |
public static final native void Graphics_DrawOval(int handle, int x, int y, int width, int height); |
1118 |
/** |
|
1123 |
/** |
1119 |
* Draws a closed polygon on the graphics context identified by |
|
1124 |
* Draws a closed polygon on the graphics context identified by |
1120 |
* <code>handle</code>. |
|
1125 |
* <code>handle</code>. |
1121 |
* |
|
1126 |
* |
1122 |
* @param handle the graphics context handle |
|
1127 |
* @param handle the graphics context handle |
1123 |
* @param pointArray an array of alternating x and y values which |
|
1128 |
* @param pointArray an array of alternating x and y values which |
1124 |
* are the vertices of the polygon |
|
1129 |
* are the vertices of the polygon |
1125 |
* @param length number of integers in the pointArray (twice the number of points) |
|
1130 |
* @param length number of integers in the pointArray (twice the number of points) |
1126 |
*/ |
|
1131 |
*/ |
1127 |
public static final native void Graphics_DrawPolygon(int handle, int[] pointArray, int length); |
|
1132 |
public static final native void Graphics_DrawPolygon(int handle, int[] pointArray, int length); |
1128 |
/** |
|
1133 |
/** |
1129 |
* Draws a polygon on the graphics context identified by <code>handle</code>. |
|
1134 |
* Draws a polygon on the graphics context identified by <code>handle</code>. |
1130 |
* |
|
1135 |
* |
1131 |
* @param handle the graphics context handle |
|
1136 |
* @param handle the graphics context handle |
1132 |
* @param pointArray an array of alternating x and y values which |
|
1137 |
* @param pointArray an array of alternating x and y values which |
1133 |
* are the vertices of the polygon |
|
1138 |
* are the vertices of the polygon |
1134 |
* @param length number of integers in the pointArray (twice the number of points) |
|
1139 |
* @param length number of integers in the pointArray (twice the number of points) |
1135 |
*/ |
|
1140 |
*/ |
1136 |
public static final native void Graphics_DrawPolyline(int handle, int[] pointArray, int length); |
|
1141 |
public static final native void Graphics_DrawPolyline(int handle, int[] pointArray, int length); |
1137 |
/** |
|
1142 |
/** |
1138 |
* Draws a rectangle on the graphics context identified by |
|
1143 |
* Draws a rectangle on the graphics context identified by |
1139 |
* <code>handle</code>. |
|
1144 |
* <code>handle</code>. |
1140 |
* <p> |
|
1145 |
* <p> |
1141 |
* The rectangle's right edge is at location <code>x + width - 1</code> |
|
1146 |
* The rectangle's right edge is at location <code>x + width - 1</code> |
1142 |
* on the graphics context. The rectangle's bottom edge is at location |
|
1147 |
* on the graphics context. The rectangle's bottom edge is at location |
1143 |
* <code>y + height - 1</code> on the graphics context. |
|
1148 |
* <code>y + height - 1</code> on the graphics context. |
1144 |
* </p> |
|
1149 |
* </p> |
1145 |
* |
|
1150 |
* |
1146 |
* @param handle the graphics context handle |
|
1151 |
* @param handle the graphics context handle |
1147 |
* @param x x coordinate of the top left corner of the rectangle |
|
1152 |
* @param x x coordinate of the top left corner of the rectangle |
1148 |
* @param y y coordinate of the top left corner of the rectangle |
|
1153 |
* @param y y coordinate of the top left corner of the rectangle |
1149 |
* @param width width of the rectangle |
|
1154 |
* @param width width of the rectangle |
1150 |
* @param height height of the rectangle |
|
1155 |
* @param height height of the rectangle |
1151 |
*/ |
|
1156 |
*/ |
1152 |
public static final native void Graphics_DrawRectangle(int handle, int x, int y, int width, int height); |
|
1157 |
public static final native void Graphics_DrawRectangle(int handle, int x, int y, int width, int height); |
1153 |
/** |
|
1158 |
/** |
1154 |
* Draws a round-cornered rectangle on the graphics context identified |
|
1159 |
* Draws a round-cornered rectangle on the graphics context identified |
1155 |
* by <code>handle</code>. |
|
1160 |
* by <code>handle</code>. |
1156 |
* <p> |
|
1161 |
* <p> |
1157 |
* The rectangle's right edge is at location <code>x + width - 1</code> |
|
1162 |
* The rectangle's right edge is at location <code>x + width - 1</code> |
1158 |
* on the graphics context. The rectangle's bottom edge is at location |
|
1163 |
* on the graphics context. The rectangle's bottom edge is at location |
1159 |
* <code>y + height - 1</code> on the graphics context. |
|
1164 |
* <code>y + height - 1</code> on the graphics context. |
1160 |
* </p> |
|
1165 |
* </p> |
1161 |
* <p> |
|
1166 |
* <p> |
1162 |
* The <em>roundness</em> of the corners is specified by the |
|
1167 |
* The <em>roundness</em> of the corners is specified by the |
1163 |
* <code>arcWidth</code> and <code>arcHeight</code> arguments. |
|
1168 |
* <code>arcWidth</code> and <code>arcHeight</code> arguments. |
1164 |
* </p> |
|
1169 |
* </p> |
1165 |
* |
|
1170 |
* |
1166 |
* @param handle the graphics context handle |
|
1171 |
* @param handle the graphics context handle |
1167 |
* @param x x coordinate of the top left corner of the rectangle |
|
1172 |
* @param x x coordinate of the top left corner of the rectangle |
1168 |
* @param y y coordinate of the top left corner of the rectangle |
|
1173 |
* @param y y coordinate of the top left corner of the rectangle |
1169 |
* @param width width of the rectangle |
|
1174 |
* @param width width of the rectangle |
1170 |
* @param height height of the rectangle |
|
1175 |
* @param height height of the rectangle |
1171 |
* @param arcWidth the horizontal radius of the arc at the four corners |
|
1176 |
* @param arcWidth the horizontal radius of the arc at the four corners |
1172 |
* @param arcHeight the vertical radius of the arc at the four corners |
|
1177 |
* @param arcHeight the vertical radius of the arc at the four corners |
1173 |
*/ |
|
1178 |
*/ |
1174 |
public static final native void Graphics_DrawRoundRectangle(int handle, int x, int y, int width, int height, int arcWidth, int arcHeight); |
|
1179 |
public static final native void Graphics_DrawRoundRectangle(int handle, int x, int y, int width, int height, int arcWidth, int arcHeight); |
1175 |
/** |
|
1180 |
/** |
1176 |
* Draws the specified string at the given location on the graphics |
|
1181 |
* Draws the specified string at the given location on the graphics |
1177 |
* context identified by <code>handle</code>. |
|
1182 |
* context identified by <code>handle</code>. |
1178 |
* The following flags may be used: |
|
1183 |
* The following flags may be used: |
1179 |
* <ul> |
|
1184 |
* <ul> |
1180 |
* <li><code>STRING_WRAP</code> - wrap text at the line delimiters |
|
1185 |
* <li><code>STRING_WRAP</code> - wrap text at the line delimiters |
1181 |
* and render multiple lines. Valid line delimiters are <code>"\r"</code>, |
|
1186 |
* and render multiple lines. Valid line delimiters are <code>"\r"</code>, |
1182 |
* <code>"\n"</code> and <code>"\r\n"</code></li> |
|
1187 |
* <code>"\n"</code> and <code>"\r\n"</code></li> |
1183 |
* <li><code>STRING_MNEMONIC</code> - interpret the last mnemonic |
|
1188 |
* <li><code>STRING_MNEMONIC</code> - interpret the last mnemonic |
1184 |
* character (<code>&</code>) in the string to underline the |
|
1189 |
* character (<code>&</code>) in the string to underline the |
1185 |
* next character instead of rendering the ampersand</li> |
|
1190 |
* next character instead of rendering the ampersand</li> |
1186 |
* <li><code>STRING_EXPAND_TAB</code> - expand tab characters into |
|
1191 |
* <li><code>STRING_EXPAND_TAB</code> - expand tab characters into |
1187 |
* tab stops</li> |
|
1192 |
* tab stops</li> |
1188 |
* <li><code>STRING_TRANSPARENT</code> - render transparently on the |
|
1193 |
* <li><code>STRING_TRANSPARENT</code> - render transparently on the |
1189 |
* background</li> |
|
1194 |
* background</li> |
1190 |
* </ul> |
|
1195 |
* </ul> |
1191 |
* |
|
1196 |
* |
1192 |
* @param handle the graphics context handle |
|
1197 |
* @param handle the graphics context handle |
1193 |
* @param string the string to draw |
|
1198 |
* @param string the string to draw |
1194 |
* @param x the x coordinate of the top left corner of the bounding |
|
1199 |
* @param x the x coordinate of the top left corner of the bounding |
1195 |
* rectangle surrounding the text |
|
1200 |
* rectangle surrounding the text |
1196 |
* @param y the y coordinate of the top left corner of the bounding |
|
1201 |
* @param y the y coordinate of the top left corner of the bounding |
1197 |
* rectangle surrounding the text |
|
1202 |
* rectangle surrounding the text |
1198 |
* @param flags one or more of <code>STRING_WRAP</code>, |
|
1203 |
* @param flags one or more of <code>STRING_WRAP</code>, |
1199 |
* <code>STRING_MNEMONIC</code>, <code>STRING_EXPAND_TAB</code> and |
|
1204 |
* <code>STRING_MNEMONIC</code>, <code>STRING_EXPAND_TAB</code> and |
1200 |
* <code>STRING_TRANSPARENT</code> |
|
1205 |
* <code>STRING_TRANSPARENT</code> |
1201 |
*/ |
|
1206 |
*/ |
1202 |
public static final native void Graphics_DrawString(int handle, String string, int x, int y, int flags); |
|
1207 |
public static final native void Graphics_DrawString(int handle, String string, int x, int y, int flags); |
1203 |
|
|
1208 |
|
1204 |
/** |
|
1209 |
/** |
1205 |
* Draws a filled arc on the graphics context identified by |
|
1210 |
* Draws a filled arc on the graphics context identified by |
1206 |
* <code>handle</code>. The arc is drawn within the specified bounding |
|
1211 |
* <code>handle</code>. The arc is drawn within the specified bounding |
1207 |
* rectangle. It is filled with the graphics context's background |
|
1212 |
* rectangle. It is filled with the graphics context's background |
1208 |
* color. The arc starts at <code>startAngle</code> and extends |
|
1213 |
* color. The arc starts at <code>startAngle</code> and extends |
1209 |
* counter-clockwise for <code>arcAngle</code> degrees. |
|
1214 |
* counter-clockwise for <code>arcAngle</code> degrees. |
1210 |
* <p> |
|
1215 |
* <p> |
1211 |
* The center of the arc is the center of the rectangle whose origin |
|
1216 |
* The center of the arc is the center of the rectangle whose origin |
1212 |
* is <code>x</code>, <code>y</code> and whose size is specified by the |
|
1217 |
* is <code>x</code>, <code>y</code> and whose size is specified by the |
1213 |
* <code>width</code> and <code>height</code> arguments. |
|
1218 |
* <code>width</code> and <code>height</code> arguments. |
1214 |
* </p> |
|
1219 |
* </p> |
1215 |
* <p> |
|
1220 |
* <p> |
1216 |
* The arc's left/top edge is at location <code>x</code>/<code>y</code> |
|
1221 |
* The arc's left/top edge is at location <code>x</code>/<code>y</code> |
1217 |
* respectively. The arc's right edge is at location <code>x + width - 1</code> |
|
1222 |
* respectively. The arc's right edge is at location <code>x + width - 1</code> |
1218 |
* on the graphics context. The arc's bottom edge is at location |
|
1223 |
* on the graphics context. The arc's bottom edge is at location |
1219 |
* <code>y + height - 1</code> on the graphics context. |
|
1224 |
* <code>y + height - 1</code> on the graphics context. |
1220 |
* </p> |
|
1225 |
* </p> |
1221 |
* |
|
1226 |
* |
1222 |
* @param handle the graphics context handle |
|
1227 |
* @param handle the graphics context handle |
1223 |
* @param x x coordinate of the top left corner of the arc bounding |
|
1228 |
* @param x x coordinate of the top left corner of the arc bounding |
1224 |
* rectangle |
|
1229 |
* rectangle |
1225 |
* @param y y coordinate of the top left corner of the arc bounding |
|
1230 |
* @param y y coordinate of the top left corner of the arc bounding |
1226 |
* rectangle |
|
1231 |
* rectangle |
1227 |
* @param width width of the arc |
|
1232 |
* @param width width of the arc |
1228 |
* @param height height of the arc |
|
1233 |
* @param height height of the arc |
1229 |
* @param startAngle identifies the start position of the arc. 0 degrees |
|
1234 |
* @param startAngle identifies the start position of the arc. 0 degrees |
1230 |
* is at the 3 o'clock position. |
|
1235 |
* is at the 3 o'clock position. |
1231 |
* @param arcAngle the angular extent of the arc, relative to the |
|
1236 |
* @param arcAngle the angular extent of the arc, relative to the |
1232 |
* <code>startAngle</code> |
|
1237 |
* <code>startAngle</code> |
1233 |
*/ |
|
1238 |
*/ |
1234 |
public static final native void Graphics_FillArc(int handle, int x, int y, int width, int height, int startAngle, int arcAngle); |
|
1239 |
public static final native void Graphics_FillArc(int handle, int x, int y, int width, int height, int startAngle, int arcAngle); |
1235 |
|
|
1240 |
|
1236 |
/** |
|
1241 |
/** |
1237 |
* Draws a filled oval that is within the specified rectangle on the |
|
1242 |
* Draws a filled oval that is within the specified rectangle on the |
1238 |
* graphics context identified by <code>handle</code>. The oval is |
|
1243 |
* graphics context identified by <code>handle</code>. The oval is |
1239 |
* filled with the graphics context's background color. |
|
1244 |
* filled with the graphics context's background color. |
1240 |
* <p> |
|
1245 |
* <p> |
1241 |
* The oval's left/top edge is at location <code>x</code>/<code>y</code> |
|
1246 |
* The oval's left/top edge is at location <code>x</code>/<code>y</code> |
1242 |
* respectively. The oval's right edge is at location |
|
1247 |
* respectively. The oval's right edge is at location |
1243 |
* <code>x + width - 1</code> on the graphics context. The oval's |
|
1248 |
* <code>x + width - 1</code> on the graphics context. The oval's |
1244 |
* bottom edge is at location <code>y + height - 1</code> on the |
|
1249 |
* bottom edge is at location <code>y + height - 1</code> on the |
1245 |
* graphics context. |
|
1250 |
* graphics context. |
1246 |
* </p> |
|
1251 |
* </p> |
1247 |
* |
|
1252 |
* |
1248 |
* @param handle the graphics context handle |
|
1253 |
* @param handle the graphics context handle |
1249 |
* @param x x coordinate of the top left corner of the oval bounding |
|
1254 |
* @param x x coordinate of the top left corner of the oval bounding |
1250 |
* rectangle |
|
1255 |
* rectangle |
1251 |
* @param y y coordinate of the top left corner of the oval bounding |
|
1256 |
* @param y y coordinate of the top left corner of the oval bounding |
1252 |
* rectangle |
|
1257 |
* rectangle |
1253 |
* @param width width of the oval |
|
1258 |
* @param width width of the oval |
1254 |
* @param height height of the oval |
|
1259 |
* @param height height of the oval |
1255 |
*/ |
|
1260 |
*/ |
1256 |
public static final native void Graphics_FillOval(int handle, int x, int y, int width, int height); |
|
1261 |
public static final native void Graphics_FillOval(int handle, int x, int y, int width, int height); |
1257 |
/** |
|
1262 |
/** |
1258 |
* Draws a closed polygon on the graphics context identified by |
|
1263 |
* Draws a closed polygon on the graphics context identified by |
1259 |
* <code>handle</code>. The closed regions of the polygon are filled |
|
1264 |
* <code>handle</code>. The closed regions of the polygon are filled |
1260 |
* with the graphics context's background color. |
|
1265 |
* with the graphics context's background color. |
1261 |
* |
|
1266 |
* |
1262 |
* @param handle the graphics context handle |
|
1267 |
* @param handle the graphics context handle |
1263 |
* @param pointArray an array of alternating x and y values which |
|
1268 |
* @param pointArray an array of alternating x and y values which |
1264 |
* are the vertices of the polygon |
|
1269 |
* are the vertices of the polygon |
1265 |
* @param length number of integers in the pointArray (twice the number of points) |
|
1270 |
* @param length number of integers in the pointArray (twice the number of points) |
1266 |
*/ |
|
1271 |
*/ |
1267 |
public static final native void Graphics_FillPolygon(int handle, int[] pointArray, int length); |
|
1272 |
public static final native void Graphics_FillPolygon(int handle, int[] pointArray, int length); |
1268 |
/** |
|
1273 |
/** |
1269 |
* Draws a filled rectangle on the graphics context identified by |
|
1274 |
* Draws a filled rectangle on the graphics context identified by |
1270 |
* <code>handle</code>. The rectangle is filled with the graphics |
|
1275 |
* <code>handle</code>. The rectangle is filled with the graphics |
1271 |
* context's background color. |
|
1276 |
* context's background color. |
1272 |
* <p> |
|
1277 |
* <p> |
1273 |
* The rectangle's right edge is at location <code>x + width - 1</code> |
|
1278 |
* The rectangle's right edge is at location <code>x + width - 1</code> |
1274 |
* on the graphics context. The rectangle's bottom edge is at location |
|
1279 |
* on the graphics context. The rectangle's bottom edge is at location |
1275 |
* <code>y + height - 1</code> on the graphics context. |
|
1280 |
* <code>y + height - 1</code> on the graphics context. |
1276 |
* </p> |
|
1281 |
* </p> |
1277 |
* |
|
1282 |
* |
1278 |
* @param handle the graphics context handle |
|
1283 |
* @param handle the graphics context handle |
1279 |
* @param x x coordinate of the top left corner of the rectangle |
|
1284 |
* @param x x coordinate of the top left corner of the rectangle |
1280 |
* @param y y coordinate of the top left corner of the rectangle |
|
1285 |
* @param y y coordinate of the top left corner of the rectangle |
1281 |
* @param width width of the rectangle |
|
1286 |
* @param width width of the rectangle |
1282 |
* @param height height of the rectangle |
|
1287 |
* @param height height of the rectangle |
1283 |
*/ |
|
1288 |
*/ |
1284 |
public static final native void Graphics_FillRectangle(int handle, int x, int y, int width, int height); |
|
1289 |
public static final native void Graphics_FillRectangle(int handle, int x, int y, int width, int height); |
1285 |
/** |
|
1290 |
/** |
1286 |
* Draws a filled round-cornered rectangle on the graphics context |
|
1291 |
* Draws a filled round-cornered rectangle on the graphics context |
1287 |
* identified by <code>handle</code>. The rectangle is filled with the |
|
1292 |
* identified by <code>handle</code>. The rectangle is filled with the |
1288 |
* graphics context's background color. |
|
1293 |
* graphics context's background color. |
1289 |
* <p> |
|
1294 |
* <p> |
1290 |
* The rectangle's right edge is at location <code>x + width - 1</code> |
|
1295 |
* The rectangle's right edge is at location <code>x + width - 1</code> |
1291 |
* on the graphics context. The rectangle's bottom edge is at location |
|
1296 |
* on the graphics context. The rectangle's bottom edge is at location |
1292 |
* <code>y + height - 1</code> on the graphics context. |
|
1297 |
* <code>y + height - 1</code> on the graphics context. |
1293 |
* </p> |
|
1298 |
* </p> |
1294 |
* <p> |
|
1299 |
* <p> |
1295 |
* The <em>roundness</em> of the corners is specified by the |
|
1300 |
* The <em>roundness</em> of the corners is specified by the |
1296 |
* <code>arcWidth</code> and <code>arcHeight</code> arguments. |
|
1301 |
* <code>arcWidth</code> and <code>arcHeight</code> arguments. |
1297 |
* </p> |
|
1302 |
* </p> |
1298 |
* |
|
1303 |
* |
1299 |
* @param handle the graphics context handle |
|
1304 |
* @param handle the graphics context handle |
1300 |
* @param x x coordinate of the top left corner of the rectangle |
|
1305 |
* @param x x coordinate of the top left corner of the rectangle |
1301 |
* @param y y coordinate of the top left corner of the rectangle |
|
1306 |
* @param y y coordinate of the top left corner of the rectangle |
1302 |
* @param width width of the rectangle |
|
1307 |
* @param width width of the rectangle |
1303 |
* @param height height of the rectangle |
|
1308 |
* @param height height of the rectangle |
1304 |
* @param arcWidth the horizontal diameter of the arc at the four corners |
|
1309 |
* @param arcWidth the horizontal diameter of the arc at the four corners |
1305 |
* @param arcHeight the vertical diameter of the arc at the four corners |
|
1310 |
* @param arcHeight the vertical diameter of the arc at the four corners |
1306 |
*/ |
|
1311 |
*/ |
1307 |
public static final native void Graphics_FillRoundRectangle(int handle, int x, int y, int width, int height, int arcWidth, int arcHeight); |
|
1312 |
public static final native void Graphics_FillRoundRectangle(int handle, int x, int y, int width, int height, int arcWidth, int arcHeight); |
1308 |
/** |
|
1313 |
/** |
1309 |
* Sets the background color of the graphics context identified by |
|
1314 |
* Sets the background color of the graphics context identified by |
1310 |
* <code>handle</code>. The background color should be used when filling |
|
1315 |
* <code>handle</code>. The background color should be used when filling |
1311 |
* shapes (i.e. FillRectangle and FillArc). |
|
1316 |
* shapes (i.e. FillRectangle and FillArc). |
1312 |
* |
|
1317 |
* |
1313 |
* @param handle the graphics context handle |
|
1318 |
* @param handle the graphics context handle |
1314 |
* @param color the handle of the new background color |
|
1319 |
* @param color the handle of the new background color |
1315 |
*/ |
|
1320 |
*/ |
1316 |
public static final native void Graphics_SetBackground(int handle, int color); |
|
1321 |
public static final native void Graphics_SetBackground(int handle, int color); |
1317 |
/** |
|
1322 |
/** |
1318 |
* Sets the clipping of the graphics context identified by |
|
1323 |
* Sets the clipping of the graphics context identified by |
1319 |
* <code>handle</code> to the specified rectangle. |
|
1324 |
* <code>handle</code> to the specified rectangle. |
1320 |
* |
|
1325 |
* |
1321 |
* @param handle the graphics context handle |
|
1326 |
* @param handle the graphics context handle |
1322 |
* @param x x coordinate of the top left corner of the clipping |
|
1327 |
* @param x x coordinate of the top left corner of the clipping |
1323 |
* rectangle |
|
1328 |
* rectangle |
1324 |
* @param y y coordinate of the top left corner of the clipping |
|
1329 |
* @param y y coordinate of the top left corner of the clipping |
1325 |
* rectangle |
|
1330 |
* rectangle |
1326 |
* @param width width of the clipping rectangle |
|
1331 |
* @param width width of the clipping rectangle |
1327 |
* @param height height of the clipping rectangle |
|
1332 |
* @param height height of the clipping rectangle |
1328 |
*/ |
|
1333 |
*/ |
1329 |
public static final native void Graphics_SetClipping(int handle, int x, int y, int width, int height); |
|
1334 |
public static final native void Graphics_SetClipping(int handle, int x, int y, int width, int height); |
1330 |
/** |
|
1335 |
/** |
1331 |
* Sets the font of the graphics context identified by <code>handle</code>. |
|
1336 |
* Sets the font of the graphics context identified by <code>handle</code>. |
1332 |
* |
|
1337 |
* |
1333 |
* @param handle the graphics context handle |
|
1338 |
* @param handle the graphics context handle |
1334 |
* @param font the font handle |
|
1339 |
* @param font the font handle |
1335 |
*/ |
|
1340 |
*/ |
1336 |
public static final native void Graphics_SetFont(int handle, int font); |
|
1341 |
public static final native void Graphics_SetFont(int handle, int font); |
1337 |
/** |
|
1342 |
/** |
1338 |
* Sets the foreground color of the graphics context identified by |
|
1343 |
* Sets the foreground color of the graphics context identified by |
1339 |
* <code>handle</code>. The foreground color is used when drawing shape |
|
1344 |
* <code>handle</code>. The foreground color is used when drawing shape |
1340 |
* outlines (i.e. DrawLine and DrawRectangle). |
|
1345 |
* outlines (i.e. DrawLine and DrawRectangle). |
1341 |
* |
|
1346 |
* |
1342 |
* @param handle the graphics context handle |
|
1347 |
* @param handle the graphics context handle |
1343 |
* @param color the handle of the new foreground color |
|
1348 |
* @param color the handle of the new foreground color |
1344 |
*/ |
|
1349 |
*/ |
1345 |
public static final native void Graphics_SetForeground(int handle, int color); |
|
1350 |
public static final native void Graphics_SetForeground(int handle, int color); |
1346 |
|
|
1351 |
|
1347 |
/** |
|
1352 |
/** |
1348 |
* Sets the line width of the graphics context identified by |
|
1353 |
* Sets the line width of the graphics context identified by |
1349 |
* <code>handle</code>. All subsequent outline rendering operations will |
|
1354 |
* <code>handle</code>. All subsequent outline rendering operations will |
1350 |
* use this line width. E.g., line, rectangle, oval. |
|
1355 |
* use this line width. E.g., line, rectangle, oval. |
1351 |
* |
|
1356 |
* |
1352 |
* @param handle the graphics context handle |
|
1357 |
* @param handle the graphics context handle |
1353 |
* @param width the line width in pixels |
|
1358 |
* @param width the line width in pixels |
1354 |
*/ |
|
1359 |
*/ |
1355 |
public static final native void Graphics_SetLineWidth(int handle, int width); |
|
1360 |
public static final native void Graphics_SetLineWidth(int handle, int width); |
1356 |
|
|
1361 |
|
1357 |
/** |
|
1362 |
/** |
1358 |
* Creates a new top-level shell on the display identified by |
|
1363 |
* Creates a new top-level shell on the display identified by |
1359 |
* <code>displayHandle</code>. |
|
1364 |
* <code>displayHandle</code>. |
1360 |
* <p>Note: The styles supported by this method must be treated |
|
1365 |
* <p>Note: The styles supported by this method must be treated |
1361 |
* as <em>HINT</em>s, since the window manager has ultimate |
|
1366 |
* as <em>HINT</em>s, since the window manager has ultimate |
1362 |
* control over the appearance and behavior of decorations |
|
1367 |
* control over the appearance and behavior of decorations |
1363 |
* and modality. In addition, if a modality style is not supported, |
|
1368 |
* and modality. In addition, if a modality style is not supported, |
1364 |
* it is "upgraded" to a more restrictive modality style that is |
|
1369 |
* it is "upgraded" to a more restrictive modality style that is |
1365 |
* supported. For example, if <code>STYLE_PRIMARY_MODAL</code> is not supported, |
|
1370 |
* supported. For example, if <code>STYLE_PRIMARY_MODAL</code> is not supported, |
1366 |
* it would be upgraded to <code>STYLE_APPLICATION_MODAL</code>. |
|
1371 |
* it would be upgraded to <code>STYLE_APPLICATION_MODAL</code>. |
1367 |
* </p> |
|
1372 |
* </p> |
1368 |
* |
|
1373 |
* |
1369 |
* @param displayHandle the display to create the shell on. |
|
1374 |
* @param displayHandle the display to create the shell on. |
1370 |
* Must not be 0. |
|
1375 |
* Must not be 0. |
1371 |
* @param style one or more of <code>CLOSE</code>, <code>MIN</code>, |
|
1376 |
* @param style one or more of <code>CLOSE</code>, <code>MIN</code>, |
1372 |
* <code>MAX</code>, <code>NO_TRIM</code>, |
|
1377 |
* <code>MAX</code>, <code>NO_TRIM</code>, |
1373 |
* <code>TITLE</code>, <code>STYLE_APPLICATION_MODAL</code>, |
|
1378 |
* <code>TITLE</code>, <code>STYLE_APPLICATION_MODAL</code>, |
1374 |
* <code>STYLE_SYSTEM_MODAL</code>, |
|
1379 |
* <code>STYLE_SYSTEM_MODAL</code>, |
1375 |
* <code>STYLE_MODELESS</code>, and <code>STYLE_PRIMARY_MODAL</code> |
|
1380 |
* <code>STYLE_MODELESS</code>, and <code>STYLE_PRIMARY_MODAL</code> |
1376 |
* @return the new top-level shell |
|
1381 |
* @return the new top-level shell |
1377 |
*/ |
|
1382 |
*/ |
1378 |
public static final native int Shell_New(int displayHandle, int style); |
|
1383 |
public static final native int Shell_New(int displayHandle, int style); |
1379 |
|
|
1384 |
|
1380 |
/** |
|
1385 |
/** |
1381 |
* Sets the text of the shell identified by <code>handle</code>. |
|
1386 |
* Sets the text of the shell identified by <code>handle</code>. |
1382 |
* This is the string that the window manager will typically |
|
1387 |
* This is the string that the window manager will typically |
1383 |
* display as the <em>title</em>. |
|
1388 |
* display as the <em>title</em>. |
1384 |
* |
|
1389 |
* |
1385 |
* Note: some platforms might ignore requests to set a shell title, |
|
1390 |
* Note: some platforms might ignore requests to set a shell title, |
1386 |
* so calls to this method on those platforms should fail silently. |
|
1391 |
* so calls to this method on those platforms should fail silently. |
1387 |
* |
|
1392 |
* |
1388 |
* @param handle the shell handle |
|
1393 |
* @param handle the shell handle |
1389 |
* @param text the new text. May not be <code>null</code> |
|
1394 |
* @param text the new text. May not be <code>null</code> |
1390 |
*/ |
|
1395 |
*/ |
1391 |
public static final native void Shell_SetText(int handle, String text); |
|
1396 |
public static final native void Shell_SetText(int handle, String text); |
1392 |
|
|
1397 |
|
1393 |
/** |
|
1398 |
/** |
1394 |
* Sets the maximized state of the shell identified by <code>handle</code>. |
|
1399 |
* Sets the maximized state of the shell identified by <code>handle</code>. |
1395 |
* |
|
1400 |
* |
1396 |
* Note: some platforms do not have the capability to programmatically change |
|
1401 |
* Note: some platforms do not have the capability to programmatically change |
1397 |
* the minimized or maximized state, so calls to this method on those platforms |
|
1402 |
* the minimized or maximized state, so calls to this method on those platforms |
1398 |
* should fail silently. |
|
1403 |
* should fail silently. |
1399 |
* |
|
1404 |
* |
1400 |
* @param handle the shell handle |
|
1405 |
* @param handle the shell handle |
1401 |
* @param maximized true - the shell switches to the maximized state |
|
1406 |
* @param maximized true - the shell switches to the maximized state |
1402 |
* false - if the shell was previously maximized, causes the |
|
1407 |
* false - if the shell was previously maximized, causes the |
1403 |
* shell to switch back to either the minimized or normal states. |
|
1408 |
* shell to switch back to either the minimized or normal states. |
1404 |
*/ |
|
1409 |
*/ |
1405 |
public static final native void Shell_SetMaximized(int handle, boolean maximized); |
|
1410 |
public static final native void Shell_SetMaximized(int handle, boolean maximized); |
1406 |
|
|
1411 |
|
1407 |
/** |
|
1412 |
/** |
1408 |
* Requests that the window manager close the receiver in the |
|
1413 |
* Requests that the window manager close the receiver in the |
1409 |
* same way it would be closed when the user clicks on the |
|
1414 |
* same way it would be closed when the user clicks on the |
1410 |
* "close box" or performs some other platform specific key |
|
1415 |
* "close box" or performs some other platform specific key |
1411 |
* or mouse combination that indicates the window should be |
|
1416 |
* or mouse combination that indicates the window should be |
1412 |
* removed. |
|
1417 |
* removed. |
1413 |
* |
|
1418 |
* |
1414 |
* @param handle the shell handle |
|
1419 |
* @param handle the shell handle |
1415 |
*/ |
|
1420 |
*/ |
1416 |
public static final native void Shell_Close(int handle); |
|
1421 |
public static final native void Shell_Close(int handle); |
1417 |
|
|
1422 |
|
1418 |
/** |
|
1423 |
/** |
1419 |
* Releases any resources that have been allocated to a widget. |
|
1424 |
* Releases any resources that have been allocated to a widget. |
1420 |
* |
|
1425 |
* |
1421 |
* @param handle the widget handle |
|
1426 |
* @param handle the widget handle |
1422 |
*/ |
|
1427 |
*/ |
1423 |
public static final native void Widget_Dispose(int handle); |
|
1428 |
public static final native void Widget_Dispose(int handle); |
1424 |
|
|
1429 |
|
1425 |
/** |
|
1430 |
/** |
1426 |
* @ignore this method is ignored because the implementation is provided |
|
1431 |
* @ignore this method is ignored because the implementation is provided |
1427 |
*/ |
|
1432 |
*/ |
1428 |
public static final native void Widget_SetData(int handle, Object data); |
|
1433 |
public static final native void Widget_SetData(int handle, Object data); |
1429 |
|
|
1434 |
|
1430 |
/** |
|
1435 |
/** |
1431 |
* Changes a control's visibility. Whether or not a control is actually |
|
1436 |
* Changes a control's visibility. Whether or not a control is actually |
1432 |
* displayed depends on several factors, including the visibility of its |
|
1437 |
* displayed depends on several factors, including the visibility of its |
1433 |
* ancestors. So calling this method may not actually affect the appearance |
|
1438 |
* ancestors. So calling this method may not actually affect the appearance |
1434 |
* of a control. |
|
1439 |
* of a control. |
1435 |
* |
|
1440 |
* |
1436 |
* @param handle the control handle |
|
1441 |
* @param handle the control handle |
1437 |
* @param visible the new visibility state |
|
1442 |
* @param visible the new visibility state |
1438 |
*/ |
|
1443 |
*/ |
1439 |
public static final native void Control_SetVisible(int handle, boolean visible); |
|
1444 |
public static final native void Control_SetVisible(int handle, boolean visible); |
1440 |
|
|
1445 |
|
1441 |
/** |
|
1446 |
/** |
1442 |
* Set a control's bounds relative to its parent. When the (x,y) position is (0,0), |
|
1447 |
* Set a control's bounds relative to its parent. When the (x,y) position is (0,0), |
1443 |
* the control will be placed in the upper left corner (in left to right mode), |
|
1448 |
* the control will be placed in the upper left corner (in left to right mode), |
1444 |
* and will not be covered by any of the parent's trimmings. |
|
1449 |
* and will not be covered by any of the parent's trimmings. |
1445 |
* |
|
1450 |
* |
1446 |
* @param handle the control handle |
|
1451 |
* @param handle the control handle |
1447 |
* @param x the new x coordinate of the origin |
|
1452 |
* @param x the new x coordinate of the origin |
1448 |
* @param y the new y coordinate of the origin |
|
1453 |
* @param y the new y coordinate of the origin |
1449 |
* @param width the new width of the control |
|
1454 |
* @param width the new width of the control |
1450 |
* @param height the new height of the control |
|
1455 |
* @param height the new height of the control |
1451 |
*/ |
|
1456 |
*/ |
1452 |
public static final native void Control_SetBounds(int handle, int x, int y, int width, int height); |
|
1457 |
public static final native void Control_SetBounds(int handle, int x, int y, int width, int height); |
1453 |
|
|
1458 |
|
1454 |
/** |
|
1459 |
/** |
1455 |
* Returns the bounding rectangle of the control, relative to the parent. |
|
1460 |
* Returns the bounding rectangle of the control, relative to the parent. |
1456 |
* See Control_SetBounds() for more detail about the position. |
|
1461 |
* See Control_SetBounds() for more detail about the position. |
1457 |
* |
|
1462 |
* |
1458 |
* @param handle the control handle |
|
1463 |
* @param handle the control handle |
1459 |
* @return (rect) |
|
1464 |
* @return (rect) |
1460 |
*/ |
|
1465 |
*/ |
1461 |
public static final native int[] Control_GetBounds(int handle); |
|
1466 |
public static final native int[] Control_GetBounds(int handle); |
1462 |
|
|
1467 |
|
1463 |
/** |
|
1468 |
/** |
1464 |
* Creates a new graphics context (GC) on the control identified by |
|
1469 |
* Creates a new graphics context (GC) on the control identified by |
1465 |
* <code>handle</code>. |
|
1470 |
* <code>handle</code>. |
1466 |
* <p> |
|
1471 |
* <p> |
1467 |
* The origin of the GC is at the top left corner of the control |
|
1472 |
* The origin of the GC is at the top left corner of the control |
1468 |
* client area. For composite controls, it is under the top |
|
1473 |
* client area. For composite controls, it is under the top |
1469 |
* decorations (title bar, menu bar, border) and to the right |
|
1474 |
* decorations (title bar, menu bar, border) and to the right |
1470 |
* of the left hand decorations (scroll bar, border). |
|
1475 |
* of the left hand decorations (scroll bar, border). |
1471 |
* </p> |
|
1476 |
* </p> |
1472 |
* |
|
1477 |
* |
1473 |
* @param handle the control handle |
|
1478 |
* @param handle the control handle |
1474 |
* @return the new graphics context |
|
1479 |
* @return the new graphics context |
1475 |
*/ |
|
1480 |
*/ |
1476 |
public static final native int Control_NewGraphics(int handle); |
|
1481 |
public static final native int Control_NewGraphics(int handle); |
1477 |
|
|
1482 |
|
1478 |
/** |
|
1483 |
/** |
1479 |
* Requests that the entire control be redrawn. Please note that |
|
1484 |
* Requests that the entire control be redrawn. Please note that |
1480 |
* the actual redraw will not occur until the event loop has |
|
1485 |
* the actual redraw will not occur until the event loop has |
1481 |
* processed the draw event. |
|
1486 |
* processed the draw event. |
1482 |
* |
|
1487 |
* |
1483 |
* @param handle handle of the widget |
|
1488 |
* @param handle handle of the widget |
1484 |
*/ |
|
1489 |
*/ |
1485 |
public static final native void Control_Redraw(int handle); |
|
1490 |
public static final native void Control_Redraw(int handle); |
1486 |
|
|
1491 |
|
1487 |
/** |
|
1492 |
/** |
1488 |
* Creates a new RGB color. |
|
1493 |
* Creates a new RGB color. |
1489 |
* |
|
1494 |
* |
1490 |
* @param deviceHandle the device/display handle |
|
1495 |
* @param deviceHandle the device/display handle |
1491 |
* @param red the red component of the color. Valid values 0 to 255. |
|
1496 |
* @param red the red component of the color. Valid values 0 to 255. |
1492 |
* @param green the green component of the color. Valid values 0 to 255. |
|
1497 |
* @param green the green component of the color. Valid values 0 to 255. |
1493 |
* @param blue the blue component of the color. Valid values 0 to 255. |
|
1498 |
* @param blue the blue component of the color. Valid values 0 to 255. |
1494 |
* @return a new RGB color with the specified red, green and blue components |
|
1499 |
* @return a new RGB color with the specified red, green and blue components |
1495 |
*/ |
|
1500 |
*/ |
1496 |
public static final native int Color_New(int deviceHandle, int red, int green, int blue); |
|
1501 |
public static final native int Color_New(int deviceHandle, int red, int green, int blue); |
1497 |
|
|
1502 |
|
1498 |
/** |
|
1503 |
/** |
1499 |
* Releases any resources that have been allocated to a color. |
|
1504 |
* Releases any resources that have been allocated to a color. |
1500 |
* |
|
1505 |
* |
1501 |
* @param handle the color handle |
|
1506 |
* @param handle the color handle |
1502 |
*/ |
|
1507 |
*/ |
1503 |
public static final native void Color_Dispose(int handle); |
|
1508 |
public static final native void Color_Dispose(int handle); |
1504 |
|
|
1509 |
|
1505 |
/** |
|
1510 |
/** |
1506 |
* Copies the specified area from the image identified by <code>handle</code> |
|
1511 |
* Copies the specified area from the image identified by <code>handle</code> |
1507 |
* into the destination image. The area is copied from location <code>x</code>, |
|
1512 |
* into the destination image. The area is copied from location <code>x</code>, |
1508 |
* <code>y</code> in the source image to location 0, 0 in the destination |
|
1513 |
* <code>y</code> in the source image to location 0, 0 in the destination |
1509 |
* image. |
|
1514 |
* image. |
1510 |
* |
|
1515 |
* |
1511 |
* @param handle handle to the image to copy |
|
1516 |
* @param handle handle to the image to copy |
1512 |
* @param destImageHandle handle to the destination image |
|
1517 |
* @param destImageHandle handle to the destination image |
1513 |
* @param x x coordinate of the area to copy to the destination image. |
|
1518 |
* @param x x coordinate of the area to copy to the destination image. |
1514 |
* Must be within the image's bounds. |
|
1519 |
* Must be within the image's bounds. |
1515 |
* @param y y coordinate of the area to copy to the destination image. |
|
1520 |
* @param y y coordinate of the area to copy to the destination image. |
1516 |
* Must be within the image's bounds. |
|
1521 |
* Must be within the image's bounds. |
1517 |
* @param width width of the area to copy to the destination image. |
|
1522 |
* @param width width of the area to copy to the destination image. |
1518 |
* Must be within the image's bounds. |
|
1523 |
* Must be within the image's bounds. |
1519 |
* @param height height of the area to copy to the destination image. |
|
1524 |
* @param height height of the area to copy to the destination image. |
1520 |
* Must be within the image's bounds. |
|
1525 |
* Must be within the image's bounds. |
1521 |
*/ |
|
1526 |
*/ |
1522 |
public static final native void Image_CopyArea(int handle, int destImageHandle, int x, int y, int width, int height); |
|
1527 |
public static final native void Image_CopyArea(int handle, int destImageHandle, int x, int y, int width, int height); |
1523 |
|
|
1528 |
|
1524 |
/** |
|
1529 |
/** |
1525 |
* Frees the platform resources associated with the image identified by |
|
1530 |
* Frees the platform resources associated with the image identified by |
1526 |
* <code>handle</code>. |
|
1531 |
* <code>handle</code>. |
1527 |
* |
|
1532 |
* |
1528 |
* @param handle image handle |
|
1533 |
* @param handle image handle |
1529 |
*/ |
|
1534 |
*/ |
1530 |
public static final native void Image_Dispose(int handle); |
|
1535 |
public static final native void Image_Dispose(int handle); |
1531 |
|
|
1536 |
|
1532 |
/** |
|
1537 |
/** |
1533 |
* Returns the position and size of the image identified by <code>handle</code>. |
|
1538 |
* Returns the position and size of the image identified by <code>handle</code>. |
1534 |
* |
|
1539 |
* |
1535 |
* @param handle image handle |
|
1540 |
* @param handle image handle |
1536 |
* @return (rect) the x, y, width and height describing the image location and |
|
1541 |
* @return (rect) the x, y, width and height describing the image location and |
1537 |
* size. Access array members using the <code>INDEX_X</code>, <code>INDEX_Y</code>, |
|
1542 |
* size. Access array members using the <code>INDEX_X</code>, <code>INDEX_Y</code>, |
1538 |
* <code>INDEX_WIDTH</code>, <code>INDEX_HEIGHT</code> constants. |
|
1543 |
* <code>INDEX_WIDTH</code>, <code>INDEX_HEIGHT</code> constants. |
1539 |
*/ |
|
1544 |
*/ |
1540 |
public static final native int[] Image_GetBounds(int handle); |
|
1545 |
public static final native int[] Image_GetBounds(int handle); |
1541 |
|
|
1546 |
|
1542 |
/** |
|
1547 |
/** |
1543 |
* Returns the color depth of the image identified by <code>handle</code>. |
|
1548 |
* Returns the color depth of the image identified by <code>handle</code>. |
1544 |
* The supported color depths are 1, 2, 4, 8, 16, 24 and 32 bit. The |
|
1549 |
* The supported color depths are 1, 2, 4, 8, 16, 24 and 32 bit. The |
1545 |
* returned depth must be one of the values supported by UGL. In the case |
|
1550 |
* returned depth must be one of the values supported by UGL. In the case |
1546 |
* of 3, 5, 6 or 7 bit GIFs the returned depth should reflect the actual |
|
1551 |
* of 3, 5, 6 or 7 bit GIFs the returned depth should reflect the actual |
1547 |
* "color resolution" as defined in the GIF89a spec. |
|
1552 |
* "color resolution" as defined in the GIF89a spec. |
1548 |
* |
|
1553 |
* |
1549 |
* @param handle image handle |
|
1554 |
* @param handle image handle |
1550 |
* @return color depth in bits per pixel |
|
1555 |
* @return color depth in bits per pixel |
1551 |
*/ |
|
1556 |
*/ |
1552 |
public static final native int Image_GetDepth(int handle); |
|
1557 |
public static final native int Image_GetDepth(int handle); |
1553 |
|
|
1558 |
|
1554 |
/** |
|
1559 |
/** |
1555 |
* Returns 32 bpp ARGB data from the specified region in the image |
|
1560 |
* Returns 32 bpp ARGB data from the specified region in the image |
1556 |
* identified by <code>handle</code>. Each pixel is in 0xAARRGGBB format, |
|
1561 |
* identified by <code>handle</code>. Each pixel is in 0xAARRGGBB format, |
1557 |
* regardless of the actual color depth and color model of the image. |
|
1562 |
* regardless of the actual color depth and color model of the image. |
1558 |
* The most significant byte contains the alpha data and the other three |
|
1563 |
* The most significant byte contains the alpha data and the other three |
1559 |
* bytes hold the red, green and blue color components respectively. The |
|
1564 |
* bytes hold the red, green and blue color components respectively. The |
1560 |
* alpha data should default to 255 indicating opaque pixels if no alpha |
|
1565 |
* alpha data should default to 255 indicating opaque pixels if no alpha |
1561 |
* channel is present in the image. |
|
1566 |
* channel is present in the image. |
1562 |
* <p> |
|
1567 |
* <p> |
1563 |
* The <code>rgbs</code> array must be big enough to hold the entire |
|
1568 |
* The <code>rgbs</code> array must be big enough to hold the entire |
1564 |
* requested image data. |
|
1569 |
* requested image data. |
1565 |
* </p> |
|
1570 |
* </p> |
1566 |
* |
|
1571 |
* |
1567 |
* @param handle image handle |
|
1572 |
* @param handle image handle |
1568 |
* @param startX x coordinate, start location of pixels to return |
|
1573 |
* @param startX x coordinate, start location of pixels to return |
1569 |
* @param startY y coordinate, start location of pixels to return |
|
1574 |
* @param startY y coordinate, start location of pixels to return |
1570 |
* @param width width of the image region to return |
|
1575 |
* @param width width of the image region to return |
1571 |
* @param height height of the image region to return |
|
1576 |
* @param height height of the image region to return |
1572 |
* @param offset offset into the rgb array to start writing data at |
|
1577 |
* @param offset offset into the rgb array to start writing data at |
1573 |
* @param scanSize width of each scanline in the returned rgb data |
|
1578 |
* @param scanSize width of each scanline in the returned rgb data |
1574 |
* @param rgbs return ARGB data. Each pixel is in 0xAARRGGBB format. |
|
1579 |
* @param rgbs return ARGB data. Each pixel is in 0xAARRGGBB format. |
1575 |
*/ |
|
1580 |
*/ |
1576 |
public static final native void Image_GetRGB(int handle, int startX, int startY, int width, int height, int offset, int scanSize, int[] rgbs); |
<> |
1581 |
// public static final native void Image_GetRGB(int handle, int startX, int startY, int width, int height, int offset, int scanSize, int[] rgbs); |
1577 |
|
= |
1582 |
|
1578 |
/** |
|
1583 |
/** |
1579 |
* Creates a new, empty image with the given dimensions. |
|
1584 |
* Creates a new, empty image with the given dimensions. |
1580 |
* <p> |
|
1585 |
* <p> |
1581 |
* Image will be filled with the provided fill color which |
|
1586 |
* Image will be filled with the provided fill color which |
1582 |
* is in 0xAARRGGBB format. |
|
1587 |
* is in 0xAARRGGBB format. |
1583 |
* </p> |
|
1588 |
* </p> |
1584 |
* |
|
1589 |
* |
1585 |
* @param deviceHandle the device/display handle |
|
1590 |
* @param deviceHandle the device/display handle |
1586 |
* @param width width of the new image |
|
1591 |
* @param width width of the new image |
1587 |
* @param height height of the new image |
|
1592 |
* @param height height of the new image |
1588 |
* @param fillColor value with which to fill the image in 0xAARRGGBB format. |
|
1593 |
* @param fillColor value with which to fill the image in 0xAARRGGBB format. |
1589 |
* @return handle to the new image |
|
1594 |
* @return handle to the new image |
1590 |
*/ |
|
1595 |
*/ |
1591 |
public static final native int Image_NewFromSize(int deviceHandle, int width, int height, int fillColor); |
|
1596 |
public static final native int Image_NewFromSize(int deviceHandle, int width, int height, int fillColor); |
1592 |
|
|
1597 |
|
1593 |
/** |
|
1598 |
/** |
1594 |
* Creates a new image from the supplied pixel data. Each pixel is a direct |
|
1599 |
* Creates a new image from the supplied pixel data. Each pixel is a direct |
1595 |
* color RGB value. Supported color depths are 16, 24 and 32 bits per pixel. |
|
1600 |
* color RGB value. Supported color depths are 16, 24 and 32 bits per pixel. |
1596 |
* For 16 bit depth the RGB bits are layed out as 5-6-5 bits for red, green |
|
1601 |
* For 16 bit depth the RGB bits are layed out as 5-6-5 bits for red, green |
1597 |
* and blue respectively, 24 bit depth uses 8-8-8 bits and no alpha channel. |
|
1602 |
* and blue respectively, 24 bit depth uses 8-8-8 bits and no alpha channel. |
1598 |
* 32 bit color depth uses 8-8-8 bits and the most significant byte for the |
|
1603 |
* 32 bit color depth uses 8-8-8 bits and the most significant byte for the |
1599 |
* alpha channel for an ARGB pixel layout. For 32 bit pixel data the alpha |
|
1604 |
* alpha channel for an ARGB pixel layout. For 32 bit pixel data the alpha |
1600 |
* channel byte is ignored if either one of the |
|
1605 |
* channel byte is ignored if either one of the |
1601 |
* <code>transparentColor</code>, <code>globalAlpha</code> or |
|
1606 |
* <code>transparentColor</code>, <code>globalAlpha</code> or |
1602 |
* <code>alphaData</code> is specified. Only one of the three transparency/ |
|
1607 |
* <code>alphaData</code> is specified. Only one of the three transparency/ |
1603 |
* alpha arguments may be specified at a time. |
|
1608 |
* alpha arguments may be specified at a time. |
1604 |
* <p> |
|
1609 |
* <p> |
1605 |
* May result in the following errors: |
|
1610 |
* May result in the following errors: |
1606 |
* <ul> |
|
1611 |
* <ul> |
1607 |
* <li>ERROR_UNSUPPORTED_DEPTH - the color depth is not supported</li> |
|
1612 |
* <li>ERROR_UNSUPPORTED_DEPTH - the color depth is not supported</li> |
1608 |
* <li>ERROR_INVALID_IMAGE - an error has occurred while creating the image</li> |
|
1613 |
* <li>ERROR_INVALID_IMAGE - an error has occurred while creating the image</li> |
1609 |
* </ul> |
|
1614 |
* </ul> |
1610 |
* </p> |
|
1615 |
* </p> |
1611 |
* |
|
1616 |
* |
1612 |
* @param deviceHandle the device handle |
|
1617 |
* @param deviceHandle the device handle |
1613 |
* @param width width of the new image in pixels |
|
1618 |
* @param width width of the new image in pixels |
1614 |
* @param height height of the new image |
|
1619 |
* @param height height of the new image |
1615 |
* @param imageData pixel data. Each int contains one pixel regardless of |
|
1620 |
* @param imageData pixel data. Each int contains one pixel regardless of |
1616 |
* color depth. E.g., a 16 bit pixel is packed in the two least |
|
1621 |
* color depth. E.g., a 16 bit pixel is packed in the two least |
1617 |
* significant bytes of each int. |
|
1622 |
* significant bytes of each int. |
1618 |
* @param depth color depth of the image data, in number of bits per pixel. |
|
1623 |
* @param depth color depth of the image data, in number of bits per pixel. |
1619 |
* One of 16, 24, 32. It is acceptable for an implementation to create an |
|
1624 |
* One of 16, 24, 32. It is acceptable for an implementation to create an |
1620 |
* image with a different depth if platform limitations do not allow the |
|
1625 |
* image with a different depth if platform limitations do not allow the |
1621 |
* original color depth. The depth has to remain the same throughout the |
|
1626 |
* original color depth. The depth has to remain the same throughout the |
1622 |
* life of the image. |
|
1627 |
* life of the image. |
1623 |
* @param transparentColor value of the transparent color. The transparent |
|
1628 |
* @param transparentColor value of the transparent color. The transparent |
1624 |
* color is specified in the same bit format as the image data. Value of |
|
1629 |
* color is specified in the same bit format as the image data. Value of |
1625 |
* <code>-1</code> means no transparency. |
|
1630 |
* <code>-1</code> means no transparency. |
1626 |
* @param globalAlpha global alpha value. Each pixel will be blended using |
|
1631 |
* @param globalAlpha global alpha value. Each pixel will be blended using |
1627 |
* this alpha value. Value of <code>-1</code> means no global alpha value. |
|
1632 |
* this alpha value. Value of <code>-1</code> means no global alpha value. |
1628 |
* @param alphaData alpha data of the image. Each pixel may have an alpha |
|
1633 |
* @param alphaData alpha data of the image. Each pixel may have an alpha |
1629 |
* value ranging from 0 to 255. 0 means fully transparent, 255 means fully |
|
1634 |
* value ranging from 0 to 255. 0 means fully transparent, 255 means fully |
1630 |
* opaque. May be <code>null</code>. |
|
1635 |
* opaque. May be <code>null</code>. |
1631 |
* @return handle to the new image. 0 if no image could be created using the |
|
1636 |
* @return handle to the new image. 0 if no image could be created using the |
1632 |
* supplied parameters. |
|
1637 |
* supplied parameters. |
1633 |
*/ |
|
1638 |
*/ |
1634 |
public static final native int Image_NewFromIntData(int deviceHandle, int width, int height, int[] imageData, int depth, int transparentColor, int globalAlpha, byte[] alphaData); |
|
1639 |
public static final native int Image_NewFromIntData(int deviceHandle, int width, int height, int[] imageData, int depth, int transparentColor, int globalAlpha, byte[] alphaData); |
1635 |
|
|
1640 |
|
1636 |
/** |
|
1641 |
/** |
1637 |
* Creates a new image from the supplied pixel data. Each pixel is an |
|
1642 |
* Creates a new image from the supplied pixel data. Each pixel is an |
1638 |
* index into a color palette. The color palette is supplied in the |
|
1643 |
* index into a color palette. The color palette is supplied in the |
1639 |
* indexed color arrays. The palette may not use all possible color |
|
1644 |
* indexed color arrays. The palette may not use all possible color |
1640 |
* values . In other words the number of elements may be less than |
|
1645 |
* values . In other words the number of elements may be less than |
1641 |
* (2^depth). Supported color depths are 1, 2, 4 and 8 bits per pixel. |
|
1646 |
* (2^depth). Supported color depths are 1, 2, 4 and 8 bits per pixel. |
1642 |
* <p> |
|
1647 |
* <p> |
1643 |
* May result in the following errors: |
|
1648 |
* May result in the following errors: |
1644 |
* <ul> |
|
1649 |
* <ul> |
1645 |
* <li>ERROR_UNSUPPORTED_DEPTH - the color depth is not supported</li> |
|
1650 |
* <li>ERROR_UNSUPPORTED_DEPTH - the color depth is not supported</li> |
1646 |
* <li>ERROR_INVALID_IMAGE - an error has occurred while creating the image</li> |
|
1651 |
* <li>ERROR_INVALID_IMAGE - an error has occurred while creating the image</li> |
1647 |
* </ul> |
|
1652 |
* </ul> |
1648 |
* </p> |
|
1653 |
* </p> |
1649 |
* @param deviceHandle the device handle |
|
1654 |
* @param deviceHandle the device handle |
1650 |
* @param width width of the new image in pixels |
|
1655 |
* @param width width of the new image in pixels |
1651 |
* @param height height of the new image |
|
1656 |
* @param height height of the new image |
1652 |
* @param imageData the pixel data. Each byte holds one or more pixels. An |
|
1657 |
* @param imageData the pixel data. Each byte holds one or more pixels. An |
1653 |
* 8 bit per pixel image has one pixel per byte, a 4 bpp image has exactly |
|
1658 |
* 8 bit per pixel image has one pixel per byte, a 4 bpp image has exactly |
1654 |
* 2 pixels per byte etc. The most significant bit of each byte corresponds |
|
1659 |
* 2 pixels per byte etc. The most significant bit of each byte corresponds |
1655 |
* to the leftmost pixel on a scanline. A scanline may have unused bits if |
|
1660 |
* to the leftmost pixel on a scanline. A scanline may have unused bits if |
1656 |
* the color depth is less than 8 bpp. |
|
1661 |
* the color depth is less than 8 bpp. |
1657 |
* @param bytesPerLine length in bytes of a scan line. The number of bytes |
|
1662 |
* @param bytesPerLine length in bytes of a scan line. The number of bytes |
1658 |
* per scan line may be greater than required for the actual number of |
|
1663 |
* per scan line may be greater than required for the actual number of |
1659 |
* pixels. Excess bytes are unused. |
|
1664 |
* pixels. Excess bytes are unused. |
1660 |
* @param depth color depth of the image data, in number of bits per pixel. |
|
1665 |
* @param depth color depth of the image data, in number of bits per pixel. |
1661 |
* One of 1, 2, 4, 8. It is acceptable for an implementation to create an |
|
1666 |
* One of 1, 2, 4, 8. It is acceptable for an implementation to create an |
1662 |
* image with a different depth if platform limitations do not allow the |
|
1667 |
* image with a different depth if platform limitations do not allow the |
1663 |
* original color depth. The depth has to remain the same throughout the |
|
1668 |
* original color depth. The depth has to remain the same throughout the |
1664 |
* life of the image. |
|
1669 |
* life of the image. |
1665 |
* @param indexedReds red components of indexed color palette. |
|
1670 |
* @param indexedReds red components of indexed color palette. |
1666 |
* @param indexedGreens green components of indexed color palette. |
|
1671 |
* @param indexedGreens green components of indexed color palette. |
1667 |
* @param indexedBlues blue components of indexed color palette. |
|
1672 |
* @param indexedBlues blue components of indexed color palette. |
1668 |
* @param paletteSize number of entries in the color palette arrays. This |
|
1673 |
* @param paletteSize number of entries in the color palette arrays. This |
1669 |
* may be less than the maximum number allowed by the color depth. |
|
1674 |
* may be less than the maximum number allowed by the color depth. |
1670 |
* @param transparentPixel palette index of the transparent pixel. Value of |
|
1675 |
* @param transparentPixel palette index of the transparent pixel. Value of |
1671 |
* <code>-1</code> means no transparency. |
|
1676 |
* <code>-1</code> means no transparency. |
1672 |
* @return handle to the new image. 0 if no image could be created using the |
|
1677 |
* @return handle to the new image. 0 if no image could be created using the |
1673 |
* supplied parameters. |
|
1678 |
* supplied parameters. |
1674 |
* @see com.ibm.ugl.p3ml.OS#Image_GetDepth(int) |
|
1679 |
* @see com.ibm.ugl.p3ml.OS#Image_GetDepth(int) |
1675 |
*/ |
|
1680 |
*/ |
1676 |
public static final native int Image_NewFromByteData(int deviceHandle, int width, int height, byte[] imageData, int bytesPerLine, int depth, byte[] indexedReds, byte[] indexedGreens, byte[] indexedBlues, int paletteSize, int transparentPixel); |
|
1681 |
public static final native int Image_NewFromByteData(int deviceHandle, int width, int height, byte[] imageData, int bytesPerLine, int depth, byte[] indexedReds, byte[] indexedGreens, byte[] indexedBlues, int paletteSize, int transparentPixel); |
1677 |
|
|
1682 |
|
1678 |
/** |
|
1683 |
/** |
1679 |
* Creates a new image using the supplied raw data. |
|
1684 |
* Creates a new image using the supplied raw data. |
1680 |
* <p> |
|
1685 |
* <p> |
1681 |
* May result in the following errors: |
|
1686 |
* May result in the following errors: |
1682 |
* <ul> |
|
1687 |
* <ul> |
1683 |
* <li>ERROR_UNSUPPORTED_DEPTH - the color depth is not supported</li> |
|
1688 |
* <li>ERROR_UNSUPPORTED_DEPTH - the color depth is not supported</li> |
1684 |
* <li>ERROR_INVALID_IMAGE - an error has occurred while creating the image</li> |
|
1689 |
* <li>ERROR_INVALID_IMAGE - an error has occurred while creating the image</li> |
1685 |
* </ul> |
|
1690 |
* </ul> |
1686 |
* </p> |
|
1691 |
* </p> |
1687 |
* |
|
1692 |
* |
1688 |
* @param deviceHandle the device/display handle |
|
1693 |
* @param deviceHandle the device/display handle |
1689 |
* @param data the raw image data, including image header |
|
1694 |
* @param data the raw image data, including image header |
1690 |
* @param length number of bytes in the data array |
|
1695 |
* @param length number of bytes in the data array |
1691 |
* @return handle to the new image or 0 if no image could be created |
|
1696 |
* @return handle to the new image or 0 if no image could be created |
1692 |
* from the supplied data. |
|
1697 |
* from the supplied data. |
1693 |
*/ |
|
1698 |
*/ |
1694 |
public static final native int Image_NewFromFileData(int deviceHandle, byte[] data, int length); |
|
1699 |
public static final native int Image_NewFromFileData(int deviceHandle, byte[] data, int length); |
1695 |
|
|
1700 |
|
1696 |
/** |
|
1701 |
/** |
|
|
<> |
1702 |
*/ |
|
|
|
1703 |
public static final native int Image_NewFromSystemResource(int deviceHandle, int identifier); |
|
|
|
1704 |
|
|
|
|
1705 |
/** |
1697 |
* Creates a new graphics context on the image identified by |
= |
1706 |
* Creates a new graphics context on the image identified by |
1698 |
* <code>handle</code> |
|
1707 |
* <code>handle</code> |
1699 |
* |
|
1708 |
* |
1700 |
* @param handle image handle |
|
1709 |
* @param handle image handle |
1701 |
* @return handle to the new graphics context |
|
1710 |
* @return handle to the new graphics context |
1702 |
*/ |
|
1711 |
*/ |
1703 |
public static final native int Image_NewGraphics(int handle); |
|
1712 |
public static final native int Image_NewGraphics(int handle); |
1704 |
|
|
1713 |
|
1705 |
/** |
|
1714 |
/** |
1706 |
* Returns a scrollable's insets. The insets contain the offset from |
|
1715 |
* Returns a scrollable's insets. The insets contain the offset from |
1707 |
* each side of the scrollable to the actual client area. The client |
|
1716 |
* each side of the scrollable to the actual client area. The client |
1708 |
* area is where children are typically placed and drawing occurs. Please |
|
1717 |
* area is where children are typically placed and drawing occurs. Please |
1709 |
* note that if Adjustables have been created for the Scrollable (as |
|
1718 |
* note that if Adjustables have been created for the Scrollable (as |
1710 |
* returned by Scrollable_GetHorizontalBar and Scrollable_GetVerticalBar), |
|
1719 |
* returned by Scrollable_GetHorizontalBar and Scrollable_GetVerticalBar), |
1711 |
* they will increase the corresponding inset value only if visible. |
|
1720 |
* they will increase the corresponding inset value only if visible. |
1712 |
* |
|
1721 |
* |
1713 |
* @param handle handle of scrollable widget |
|
1722 |
* @param handle handle of scrollable widget |
1714 |
* @return (insets) |
|
1723 |
* @return (insets) |
1715 |
*/ |
|
1724 |
*/ |
1716 |
public static final native int[] Scrollable_GetInsets(int handle); |
|
1725 |
public static final native int[] Scrollable_GetInsets(int handle); |
1717 |
} |
|
1726 |
} |