FILE COMPARISON
Produced: 2/18/2011 1:31:40 AM
   
Mode:  All Lines  
Left base folder: C:\Documents and Settings\krollins\My Documents\Admin\OpenSource\eRCP\eSWT\eSWT-1.2.orig  
Right base folder: C:\Documents and Settings\krollins\My Documents\Admin\OpenSource\eRCP\eSWT\eSWT-1.2.today  
   
File: org.eclipse.ercp.swt.core.win\ugl\com\ibm\ugl\eswt\OS.java  
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 *******************************************************************************/   10 *******************************************************************************/
    <> 11  
      12 /*******************************************************************************
      13 * Additions/modifications to this source file by Oracle America, Inc. 2011
      14 *******************************************************************************/
      15  
11 package com.ibm.ugl.eswt; = 16 package com.ibm.ugl.eswt;
12     17  
13     18  
14 /**   19 /**
15 * The UGL API hierarchy as it applies to eSWT is as follows.   20 * The UGL API hierarchy as it applies to eSWT is as follows.
16 * The API hierarchy can be thought of as a class hierarchy in    21 * The API hierarchy can be thought of as a class hierarchy in 
17 * OO terms. E.g., the Widget, Control and Button API can be    22 * OO terms. E.g., the Widget, Control and Button API can be 
18 * called with a Checkbox handle, in addition to the Checkbox   23 * called with a Checkbox handle, in addition to the Checkbox
19 * API.   24 * API.
20 * <p>   25 * <p>
21 * <table border=0>   26 * <table border=0>
22 * <tr><td colspan=5>Clipboard</td></tr>   27 * <tr><td colspan=5>Clipboard</td></tr>
23 * <tr><td colspan=5>Color</td></tr>   28 * <tr><td colspan=5>Color</td></tr>
24 * <tr><td colspan=5>Cursor</td></tr>   29 * <tr><td colspan=5>Cursor</td></tr>
25 * <tr><td colspan=5>Device</td></tr>   30 * <tr><td colspan=5>Device</td></tr>
26 * <tr><td width=25>&nbsp;</td><td colspan=4>Display</td></tr>   31 * <tr><td width=25>&nbsp;</td><td colspan=4>Display</td></tr>
27 * <tr><td colspan=5>Font</td></tr>   32 * <tr><td colspan=5>Font</td></tr>
28 * <tr><td colspan=5>Graphics</td></tr>   33 * <tr><td colspan=5>Graphics</td></tr>
29 * <tr><td colspan=5>Image</td></tr>   34 * <tr><td colspan=5>Image</td></tr>
30 * <tr><td colspan=5>MessageBox</td></tr>   35 * <tr><td colspan=5>MessageBox</td></tr>
31 * <tr><td colspan=5>Widget</td></tr>   36 * <tr><td colspan=5>Widget</td></tr>
32 * <tr><td>&nbsp;</td><td colspan=4>Control</td></tr>   37 * <tr><td>&nbsp;</td><td colspan=4>Control</td></tr>
33 * <tr><td>&nbsp;</td><td width=25>&nbsp;</td><td colspan=3>Button</td></tr>   38 * <tr><td>&nbsp;</td><td width=25>&nbsp;</td><td colspan=3>Button</td></tr>
34 * <tr><td>&nbsp;</td><td>&nbsp;</td><td width=25>&nbsp;</td><td colspan=2>Checkbox</td></tr>   39 * <tr><td>&nbsp;</td><td>&nbsp;</td><td width=25>&nbsp;</td><td colspan=2>Checkbox</td></tr>
35 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>PushButton</td></tr>   40 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>PushButton</td></tr>
36 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>RadioButton</td></tr>   41 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>RadioButton</td></tr>
37 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>ToggleButton</td></tr>   42 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>ToggleButton</td></tr>
38 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>Choice</td></tr>   43 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>Choice</td></tr>
39 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>Combo</td></tr>   44 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>Combo</td></tr>
40 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>Label</td></tr>   45 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>Label</td></tr>
41 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>ProgressBar</td></tr>   46 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>ProgressBar</td></tr>
42 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>Scrollable</td></tr>   47 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>Scrollable</td></tr>
43 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>Composite</td></tr>   48 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>Composite</td></tr>
44 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td width=25>&nbsp;</td><td>Shell</td></tr>   49 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td width=25>&nbsp;</td><td>Shell</td></tr>
45 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>List</td></tr>   50 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>List</td></tr>
46 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>AbstractTextComponent</td></tr>   51 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>AbstractTextComponent</td></tr>
47 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>TextArea</td></tr>   52 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>TextArea</td></tr>
48 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>TextField</td></tr>   53 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>TextField</td></tr>
49 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>Scrollbar</td></tr>   54 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>Scrollbar</td></tr>
50 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>Separator</td></tr>   55 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>Separator</td></tr>
51 * <tr><td>&nbsp;</td><td colspan=4>FileDialog</td></tr>   56 * <tr><td>&nbsp;</td><td colspan=4>FileDialog</td></tr>
52 * <tr><td>&nbsp;</td><td colspan=4>AbstractMenu</td></tr>   57 * <tr><td>&nbsp;</td><td colspan=4>AbstractMenu</td></tr>
53 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>DropDownMenu</td></tr>   58 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>DropDownMenu</td></tr>
54 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>PopupMenu</td></tr>   59 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>PopupMenu</td></tr>
55 * <tr><td>&nbsp;</td><td colspan=4>MenuBar</td></tr>   60 * <tr><td>&nbsp;</td><td colspan=4>MenuBar</td></tr>
56 * <tr><td>&nbsp;</td><td colspan=4>AbstractMenuItem</td></tr>   61 * <tr><td>&nbsp;</td><td colspan=4>AbstractMenuItem</td></tr>
57 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>LabeledMenuItem</td></tr>   62 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>LabeledMenuItem</td></tr>
58 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>CascadeMenuItem</td></tr>   63 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>CascadeMenuItem</td></tr>
59 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>PushMenuItem</td></tr>   64 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>PushMenuItem</td></tr>
60 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>StateMenuItem</td></tr>   65 * <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td colspan=2>StateMenuItem</td></tr>
61 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>SeparatorItem</td></tr>   66 * <tr><td>&nbsp;</td><td>&nbsp;</td><td colspan=3>SeparatorItem</td></tr>
62 * </table>   67 * </table>
63 * </p>   68 * </p>
64 * <br>   69 * <br>
65 *   70 *
66 * <p><h2>Abstract widget documentation.</h2></p><br>   71 * <p><h2>Abstract widget documentation.</h2></p><br>
67 *   72 *
68 * <p><h3>Control</h3></p><br>   73 * <p><h3>Control</h3></p><br>
69 *   74 *
70 * <ol>   75 * <ol>
71 * <li><b>Valid constructor hints</b>: STYLE_BORDER   76 * <li><b>Valid constructor hints</b>: STYLE_BORDER
72 * <li><b>Z order expectations</b>: When a Control is created, it is expected to be placed below   77 * <li><b>Z order expectations</b>: When a Control is created, it is expected to be placed below
73 * its siblings in the Z order.  (Siblings are children of the same parent.)   78 * its siblings in the Z order.  (Siblings are children of the same parent.)
74 * </ol>   79 * </ol>
75 * <br>   80 * <br>
76 *   81 *
77 * <p><h3>Scrollable</h3></p><br>   82 * <p><h3>Scrollable</h3></p><br>
78 *   83 *
79 * <ol>   84 * <ol>
80 * <li><b>Valid constructor styles</b>: STYLE_V_SCROLL, STYLE_H_SCROLL   85 * <li><b>Valid constructor styles</b>: STYLE_V_SCROLL, STYLE_H_SCROLL
81 * </ol>   86 * </ol>
82 * <br>   87 * <br>
83 *   88 *
84 */   89 */
85 public class OS extends com.ibm.ugl.p3ml.OS {   90 public class OS extends com.ibm.ugl.p3ml.OS {
86           91        
87         /** File dialog style for opening a file. */   92         /** File dialog style for opening a file. */
88         public static final int STYLE_OPEN = 1 << 12;   93         public static final int STYLE_OPEN = 1 << 12;
89           94        
90         /** File dialog style for saving a file. */   95         /** File dialog style for saving a file. */
91         public static final int STYLE_SAVE = 1 << 13;   96         public static final int STYLE_SAVE = 1 << 13;
92           97        
93         /**   98         /**
94          * The following label styles are used by toolkits to specify   99          * The following label styles are used by toolkits to specify
95          * the vertical alignment of the text. This is necessary since,   100          * the vertical alignment of the text. This is necessary since,
96          * for example, eSWT and Personal Profile have different defaults.   101          * for example, eSWT and Personal Profile have different defaults.
97          *   102          *
98          * Note that these values overlap with the values used to   103          * Note that these values overlap with the values used to
99          * specify the horizontal alignment. This is currently ok   104          * specify the horizontal alignment. This is currently ok
100          * since the vertical alignment is specified on the constructor   105          * since the vertical alignment is specified on the constructor
101          * while horizontal alignment is set via the _SetAlignment API.   106          * while horizontal alignment is set via the _SetAlignment API.
102          */   107          */
103           108        
104         /** Label style for top aligning the text. */   109         /** Label style for top aligning the text. */
105         public static final int STYLE_TOP = 1;   110         public static final int STYLE_TOP = 1;
106           111        
107         /** Label style for vertically centering the text. */   112         /** Label style for vertically centering the text. */
108         public static final int STYLE_MIDDLE = 1 << 1;   113         public static final int STYLE_MIDDLE = 1 << 1;
109           114        
110         /**   115         /**
111          * @internal this should only be used by toolkit implementors   116          * @internal this should only be used by toolkit implementors
112          */   117          */
113         public static final int CALLBACK_COMBO = 14;   118         public static final int CALLBACK_COMBO = 14;
114           119        
115         /**   120         /**
116          * @internal this should only be used by toolkit implementors   121          * @internal this should only be used by toolkit implementors
117          */   122          */
118         public static final int CALLBACK_HAS_MENU = 1458260670;   123         public static final int CALLBACK_HAS_MENU = 1458260670;
119           124        
120         /**   125         /**
121          * @internal this should only be used by toolkit implementors   126          * @internal this should only be used by toolkit implementors
122          */   127          */
123         public static final int CALLBACK_TEXT_VERIFY = 15;   128         public static final int CALLBACK_TEXT_VERIFY = 15;
124           129        
125         /** @internal this should only be used by toolkit implementors */   130         /** @internal this should only be used by toolkit implementors */
126         public static final int CALLBACK_MENU = 16;   131         public static final int CALLBACK_MENU = 16;
127           132        
128         /** Combo text changed.  Passed as an argument to the   133         /** Combo text changed.  Passed as an argument to the
129          * method registered as the CALLBACK_COMBO. */   134          * method registered as the CALLBACK_COMBO. */
130         public static final int EVENT_COMBO_TEXT = 1;   135         public static final int EVENT_COMBO_TEXT = 1;
131           136        
132         /**   137         /**
133          * Combo was default selected when the user pressed the ENTER key.    138          * Combo was default selected when the user pressed the ENTER key. 
134          * Passed as an argument to the method registered as the CALLBACK_COMBO.   139          * Passed as an argument to the method registered as the CALLBACK_COMBO.
135          */   140          */
136         public static final int EVENT_COMBO_DEFAULTSELECTION = 2;   141         public static final int EVENT_COMBO_DEFAULTSELECTION = 2;
137     142  
138         /**   143         /**
139          * Event indicating that a menu has been popped up or dropped down.   144          * Event indicating that a menu has been popped up or dropped down.
140          */   145          */
141         public static final int EVENT_MENU_SHOW = 1;   146         public static final int EVENT_MENU_SHOW = 1;
142           147        
143         /**   148         /**
144          * Event indicating that a menu that has been popped up or   149          * Event indicating that a menu that has been popped up or
145      * dropped down has been hidden (i.e., no longer displayed).   150      * dropped down has been hidden (i.e., no longer displayed).
146          */   151          */
147         public static final int EVENT_MENU_HIDE = 2;   152         public static final int EVENT_MENU_HIDE = 2;
148           153        
149         public static final int INFO_HASMENU_MAYBE = 0;   154         public static final int INFO_HASMENU_MAYBE = 0;
150         public static final int INFO_HASMENU_YES = 1;   155         public static final int INFO_HASMENU_YES = 1;
151         public static final int INFO_HASMENU_NO = 2;      156         public static final int INFO_HASMENU_NO = 2;   
152     157  
153         /**   158         /**
154          * Styles to indicate logical font names that can have   159          * Styles to indicate logical font names that can have
155          * different mappings on each platform.  This represents   160          * different mappings on each platform.  This represents
156          * the platform's default font.   161          * the platform's default font.
157          */   162          */
158         public static final int FONT_LOGICAL_DEFAULT = 0;   163         public static final int FONT_LOGICAL_DEFAULT = 0;
159     164  
160         /**   165         /**
161          * Styles to indicate logical font names that can have   166          * Styles to indicate logical font names that can have
162          * different mappings on each platform.  This represents   167          * different mappings on each platform.  This represents
163          * the font that might appear in platform dialogs.   168          * the font that might appear in platform dialogs.
164          */   169          */
165         public static final int FONT_LOGICAL_DIALOG = 1;   170         public static final int FONT_LOGICAL_DIALOG = 1;
166     171  
167         /**   172         /**
168          * Styles to indicate logical font names that can have   173          * Styles to indicate logical font names that can have
169          * different mappings on each platform.  This represents   174          * different mappings on each platform.  This represents
170          * a sans-serif font, such as Helvetica.   175          * a sans-serif font, such as Helvetica.
171          */   176          */
172         public static final int FONT_LOGICAL_SANSSERIF = 2;   177         public static final int FONT_LOGICAL_SANSSERIF = 2;
173     178  
174         /**   179         /**
175          * Styles to indicate logical font names that can have   180          * Styles to indicate logical font names that can have
176          * different mappings on each platform.  This represents   181          * different mappings on each platform.  This represents
177          * a serif font, such as Times Roman.   182          * a serif font, such as Times Roman.
178          */   183          */
179         public static final int FONT_LOGICAL_SERIF = 3;   184         public static final int FONT_LOGICAL_SERIF = 3;
180     185  
181         /**   186         /**
182          * Styles to indicate logical font names that can have   187          * Styles to indicate logical font names that can have
183          * different mappings on each platform.  This represents   188          * different mappings on each platform.  This represents
184          * a monospaced font where all characters are equal widths,   189          * a monospaced font where all characters are equal widths,
185          * such as Courier.   190          * such as Courier.
186          */   191          */
187         public static final int FONT_LOGICAL_MONOSPACED = 4;   192         public static final int FONT_LOGICAL_MONOSPACED = 4;
188     193  
189         /**   194         /**
190          * Styles to indicate logical font names that can have   195          * Styles to indicate logical font names that can have
191          * different mappings on each platform.  This represents   196          * different mappings on each platform.  This represents
192          * a font that might be used for dialog input on a platform.   197          * a font that might be used for dialog input on a platform.
193          */   198          */
194         public static final int FONT_LOGICAL_DIALOGINPUT = 5;   199         public static final int FONT_LOGICAL_DIALOGINPUT = 5;
195           200        
196         public static final int LINE_CAP_BUTT = 1 << 5;   201         public static final int LINE_CAP_BUTT = 1 << 5;
197         public static final int LINE_CAP_ROUND = 1 << 6;   202         public static final int LINE_CAP_ROUND = 1 << 6;
198         public static final int LINE_CAP_SQUARE = 1 << 7;   203         public static final int LINE_CAP_SQUARE = 1 << 7;
199         public static final int LINE_JOIN_BEVEL = 1 << 8;   204         public static final int LINE_JOIN_BEVEL = 1 << 8;
200         public static final int LINE_JOIN_MITER = 1 << 9;   205         public static final int LINE_JOIN_MITER = 1 << 9;
201         public static final int LINE_JOIN_ROUND = 1 << 10;   206         public static final int LINE_JOIN_ROUND = 1 << 10;
202           207        
203           208        
204         // The following MessageBox styles must be exclusive of the modality style constants.   209         // The following MessageBox styles must be exclusive of the modality style constants.
205           210        
206         public static final int MESSAGEBOX_OK           = 1 << 11;   211         public static final int MESSAGEBOX_OK           = 1 << 11;
207         public static final int MESSAGEBOX_CANCEL       = 1 << 12;   212         public static final int MESSAGEBOX_CANCEL       = 1 << 12;
208         public static final int MESSAGEBOX_YES          = 1 << 13;   213         public static final int MESSAGEBOX_YES          = 1 << 13;
209         public static final int MESSAGEBOX_NO           = 1 << 14;   214         public static final int MESSAGEBOX_NO           = 1 << 14;
210         public static final int MESSAGEBOX_RETRY        = 1 << 15;   215         public static final int MESSAGEBOX_RETRY        = 1 << 15;
211           216        
212         public static final int MESSAGEBOX_ICON_ERROR           = 1 << 18;   217         public static final int MESSAGEBOX_ICON_ERROR           = 1 << 18;
213         public static final int MESSAGEBOX_ICON_INFORMATION     = 1 << 19;   218         public static final int MESSAGEBOX_ICON_INFORMATION     = 1 << 19;
214         public static final int MESSAGEBOX_ICON_QUESTION        = 1 << 20;   219         public static final int MESSAGEBOX_ICON_QUESTION        = 1 << 20;
215         public static final int MESSAGEBOX_ICON_WARNING         = 1 << 21;   220         public static final int MESSAGEBOX_ICON_WARNING         = 1 << 21;
216         public static final int MESSAGEBOX_ICON_WORKING         = 1 << 22;   221         public static final int MESSAGEBOX_ICON_WORKING         = 1 << 22;
217           222        
218         /**   223         /**
219          * Shell style for indicating that a Shell is   224          * Shell style for indicating that a Shell is
220          * to remain on top of the z order.  This style   225          * to remain on top of the z order.  This style
221          * is a hint, so it may not be implemented everywhere.   226          * is a hint, so it may not be implemented everywhere.
222          */   227          */
223         public static final int STYLE_ON_TOP = 1 << 25;   228         public static final int STYLE_ON_TOP = 1 << 25;
224           229        
225         /**   230         /**
226          * A hint the ProgressBar widget to display as   231          * A hint the ProgressBar widget to display as
227          * a constant line.   232          * a constant line.
228          */   233          */
229         public static final int STYLE_SMOOTH = 1 << 16;   234         public static final int STYLE_SMOOTH = 1 << 16;
230     235  
231         /**   236         /**
232          * Shell style indicating that while the Shell is open it will   237          * Shell style indicating that while the Shell is open it will
233          * block all input from the system. Modality styles are treated   238          * block all input from the system. Modality styles are treated
234          * as hints since all types of modality are not supported on every   239          * as hints since all types of modality are not supported on every
235          * platform.   240          * platform.
236          */   241          */
237         public static final int STYLE_SYSTEM_MODAL = 1 << 27;   242         public static final int STYLE_SYSTEM_MODAL = 1 << 27;
238     243  
239         /**   244         /**
240          * ProgressBar style for indicating that the amount   245          * ProgressBar style for indicating that the amount
241          * of work to be done is not known.   246          * of work to be done is not known.
242          */   247          */
243         public static final int STYLE_INDETERMINATE = 1 << 1;   248         public static final int STYLE_INDETERMINATE = 1 << 1;
244     249  
245           250        
246         /**   251         /**
247          * The constant used to ask the platform whether it supports   252          * The constant used to ask the platform whether it supports
248          * making toplevel shells user resizable.  The return value from   253          * making toplevel shells user resizable.  The return value from
249          * the platform should be non-zero if the platform can support   254          * the platform should be non-zero if the platform can support
250          * toplevel shells that are user resizable.   255          * toplevel shells that are user resizable.
251          */   256          */
252         public static final int CAPABILITY_SHELL_TOPLEVEL_RESIZABLE = 1;   257         public static final int CAPABILITY_SHELL_TOPLEVEL_RESIZABLE = 1;
253           258        
254         /**   259         /**
255          * The constant used to ask the platform whether it supports   260          * The constant used to ask the platform whether it supports
256          * making child shells user resizable.  The return value from   261          * making child shells user resizable.  The return value from
257          * the platform should be non-zero if the platform can support   262          * the platform should be non-zero if the platform can support
258          * child shells that are user resizable.   263          * child shells that are user resizable.
259          */   264          */
260         public static final int CAPABILITY_SHELL_CHILD_RESIZABLE = 2;   265         public static final int CAPABILITY_SHELL_CHILD_RESIZABLE = 2;
261           266        
262         /**   267         /**
263          * The constant used to ask the platform whether it supports minimizing   268          * The constant used to ask the platform whether it supports minimizing
264          * or maximizing shells.  The return value from the platform should be   269          * or maximizing shells.  The return value from the platform should be
265          * non-zero if the platform supports minimizing and maximizing shells.   270          * non-zero if the platform supports minimizing and maximizing shells.
266          */   271          */
267         public static final int CAPABILITY_SHELL_MINMAX = 3;   272         public static final int CAPABILITY_SHELL_MINMAX = 3;
268           273        
269         /**   274         /**
270          * The constant used to ask the platform about the Personal Profile and   275          * The constant used to ask the platform about the Personal Profile and
271          * Personal Basis Profile restrictions that are in place.  The return   276          * Personal Basis Profile restrictions that are in place.  The return
272          * value should be a bitwise-OR of RESTRICTION flags, or zero if no   277          * value should be a bitwise-OR of RESTRICTION flags, or zero if no
273          * restrictions are in place   278          * restrictions are in place
274          */   279          */
275         public static final int CAPABILITY_AWT_RESTRICTIONS = 4;   280         public static final int CAPABILITY_AWT_RESTRICTIONS = 4;
276           281        
277         /**   282         /**
278          * The constant used to ask the platform whether it supports fullscreen   283          * The constant used to ask the platform whether it supports fullscreen
279          * exclusive mode.  In this mode, a shell stays on top in the z-order   284          * exclusive mode.  In this mode, a shell stays on top in the z-order
280          * and no other windows overlap it.  The return value from the platform   285          * and no other windows overlap it.  The return value from the platform
281          * should be non-zero if the platform supports fullscreen exclusive mode.   286          * should be non-zero if the platform supports fullscreen exclusive mode.
282          *   287          *
283          * If this mode is unsupported, the Java libraries will emulate fullscreen   288          * If this mode is unsupported, the Java libraries will emulate fullscreen
284          * exclusive mode by setting the shell bounds to the display bounds.   289          * exclusive mode by setting the shell bounds to the display bounds.
285          */   290          */
286         public static final int CAPABILITY_FULLSCREEN_EXCLUSIVE_MODE = 5;   291         public static final int CAPABILITY_FULLSCREEN_EXCLUSIVE_MODE = 5;
287           292        
288         /** java.awt.AlphaComposite.SRC_OVER.isRestricted */   293         /** java.awt.AlphaComposite.SRC_OVER.isRestricted */
289         public static final int RESTRICTION_AlphaComposite_SRC_OVER = 1;   294         public static final int RESTRICTION_AlphaComposite_SRC_OVER = 1;
290     295  
291         /** java.awt.Component.setCursor.isRestricted */   296         /** java.awt.Component.setCursor.isRestricted */
292         public static final int RESTRICTION_Component_setCursor = 1 << 1;   297         public static final int RESTRICTION_Component_setCursor = 1 << 1;
293           298        
294         /** java.awt.Frame.setSize.isRestricted */   299         /** java.awt.Frame.setSize.isRestricted */
295         public static final int RESTRICTION_Frame_setSize = 1 << 2;   300         public static final int RESTRICTION_Frame_setSize = 1 << 2;
296           301        
297         /** java.awt.Frame.setResizable.isRestricted */   302         /** java.awt.Frame.setResizable.isRestricted */
298         public static final int RESTRICTION_Frame_setResizable = 1 << 3;   303         public static final int RESTRICTION_Frame_setResizable = 1 << 3;
299           304        
300         /** java.awt.Frame.setLocation.isRestricted */   305         /** java.awt.Frame.setLocation.isRestricted */
301         public static final int RESTRICTION_Frame_setLocation = 1 << 4;   306         public static final int RESTRICTION_Frame_setLocation = 1 << 4;
302           307        
303         /** java.awt.Frame.setState.isRestricted */   308         /** java.awt.Frame.setState.isRestricted */
304         public static final int RESTRICTION_Frame_setState = 1 << 5;   309         public static final int RESTRICTION_Frame_setState = 1 << 5;
305           310        
306         /** java.awt.Frame.setTitle.isRestricted */   311         /** java.awt.Frame.setTitle.isRestricted */
307         public static final int RESTRICTION_Frame_setTitle = 1 << 6;   312         public static final int RESTRICTION_Frame_setTitle = 1 << 6;
308           313        
309         /** java.awt.TextField.setEchoChar.isRestricted */   314         /** java.awt.TextField.setEchoChar.isRestricted */
310         public static final int RESTRICTION_TextField_setEchoChar = 1 << 7;   315         public static final int RESTRICTION_TextField_setEchoChar = 1 << 7;
311     316  
312         /** java.awt.Dialog.setSize.isRestricted */   317         /** java.awt.Dialog.setSize.isRestricted */
313         public static final int RESTRICTION_Dialog_setSize = 1 << 8;   318         public static final int RESTRICTION_Dialog_setSize = 1 << 8;
314           319        
315         /** java.awt.Dialog.setResizable.isRestricted */   320         /** java.awt.Dialog.setResizable.isRestricted */
316         public static final int RESTRICTION_Dialog_setResizable = 1 << 9;   321         public static final int RESTRICTION_Dialog_setResizable = 1 << 9;
317           322        
318         /** java.awt.Dialog.setLocation.isRestricted */   323         /** java.awt.Dialog.setLocation.isRestricted */
319         public static final int RESTRICTION_Dialog_setLocation = 1 << 10;   324         public static final int RESTRICTION_Dialog_setLocation = 1 << 10;
320           325        
321         /** java.awt.Dialog.setTitle.isRestricted */   326         /** java.awt.Dialog.setTitle.isRestricted */
322         public static final int RESTRICTION_Dialog_setTitle = 1 << 11;   327         public static final int RESTRICTION_Dialog_setTitle = 1 << 11;
323           328        
324         /** java.awt.Graphics2D.setStroke.BasicStroke.isRestricted */   329         /** java.awt.Graphics2D.setStroke.BasicStroke.isRestricted */
325         public static final int RESTRICTION_Graphics2D_setStroke_BasicStroke = 1 << 12;   330         public static final int RESTRICTION_Graphics2D_setStroke_BasicStroke = 1 << 12;
326           331        
327         /** java.awt.event.MouseEvent.isRestricted */   332         /** java.awt.event.MouseEvent.isRestricted */
328         public static final int RESTRICTION_MouseEvent = 1 << 13;   333         public static final int RESTRICTION_MouseEvent = 1 << 13;
329           334        
330         /** java.awt.event.KeyEvent.isRestricted */   335         /** java.awt.event.KeyEvent.isRestricted */
331         public static final int RESTRICTION_KeyEvent = 1 << 14;   336         public static final int RESTRICTION_KeyEvent = 1 << 14;
332     337  
333         /**   338         /**
334          * Value used by <code>Sound_GetPreferredChunkSize()</code>   339          * Value used by <code>Sound_GetPreferredChunkSize()</code>
335          * indicating that the entire sound data should be written   340          * indicating that the entire sound data should be written
336          * in a single chunk.   341          * in a single chunk.
337          */   342          */
338         public static final int SOUND_CHUNK_SIZE_ALL = -1;   343         public static final int SOUND_CHUNK_SIZE_ALL = -1;
339     344  
340         /**   345         /**
341          * Value used by <code>Sound_Play()</code> indicating that   346          * Value used by <code>Sound_Play()</code> indicating that
342          * the sound data should be played back until <code>Sound_Stop()</code>   347          * the sound data should be played back until <code>Sound_Stop()</code>
343          * is called.   348          * is called.
344          */   349          */
345         public static final int SOUND_REPEAT_FOREVER = -1;   350         public static final int SOUND_REPEAT_FOREVER = -1;
    <> 351  
      352         /**
      353          * System icon for error.
      354          */
      355         public static final int IMAGE_ERROR = 1;
      356  
      357         /**
      358          * System icon for information.
      359          */
      360         public static final int IMAGE_INFORMATION = 2;
      361  
      362         /**
      363          * System icon for question.
      364          */
      365         public static final int IMAGE_QUESTION = 3;
      366  
      367         /**
      368          * System icon for warning.
      369          */
      370         public static final int IMAGE_WARNING = 4;
346         = 371        
347         /**   372         /**
348          * Sets the position of the label or image on the button.   373          * Sets the position of the label or image on the button.
349          * On left to right locales, STYLE_LEAD is left, and STYLE_TRAIL   374          * On left to right locales, STYLE_LEAD is left, and STYLE_TRAIL
350          * is right.  Right to left locales reverse this notation.   375          * is right.  Right to left locales reverse this notation.
351          *   376          *
352          * @param handle the button handle   377          * @param handle the button handle
353          * @param alignment OS.STYLE_LEAD, OS.STYLE_CENTER or OS.STYLE_TRAIL   378          * @param alignment OS.STYLE_LEAD, OS.STYLE_CENTER or OS.STYLE_TRAIL
354          */   379          */
355         public static final native void Button_SetAlignment(int handle, int alignment);   380         public static final native void Button_SetAlignment(int handle, int alignment);
356           381        
357         /**   382         /**
358          * Sets the image of a button.  Please note that a button may not display   383          * Sets the image of a button.  Please note that a button may not display
359          * its image and its label simultaneously.   384          * its image and its label simultaneously.
360          *   385          *
361          * @param handle the button handle   386          * @param handle the button handle
362          * @param imageHandle the image handle   387          * @param imageHandle the image handle
363          */   388          */
364         public static final native void Button_SetImage(int handle, int imageHandle);   389         public static final native void Button_SetImage(int handle, int imageHandle);
365         /**   390         /**
366          * Sets the label of a button.  Please note that a button may not display   391          * Sets the label of a button.  Please note that a button may not display
367          * its image and its label simultaneously.   392          * its image and its label simultaneously.
368          *   393          *
369          * @param handle the button handle   394          * @param handle the button handle
370          * @param string the label   395          * @param string the label
371          */   396          */
372         public static final native void Button_SetLabel(int handle, String string);   397         public static final native void Button_SetLabel(int handle, String string);
373           398        
374         /**   399         /**
375          * Set the selection state of a button.   400          * Set the selection state of a button.
376          *   401          *
377          * @param handle the button handle   402          * @param handle the button handle
378          * @param selection true for selected, false for unselected   403          * @param selection true for selected, false for unselected
379          */   404          */
380         public static final native void Button_SetSelection(int handle, boolean selection);   405         public static final native void Button_SetSelection(int handle, boolean selection);
381     406  
    <> 407     /**
      408      * Gets the selection state of a button.
      409      *
      410      * @param handle the button handle
      411      * @return the selection state of the button
      412      */
      413     public static final native boolean Button_GetSelection(int handle);
      414  
382         /** = 415         /**
383          * Creates a new Checkbox widget   416          * Creates a new Checkbox widget
384          *   417          *
385          * @param parentHandle handle of parent widget   418          * @param parentHandle handle of parent widget
386          * @param style STYLE_FLAT or 0   419          * @param style STYLE_FLAT or 0
387          * @return handle of new widget   420          * @return handle of new widget
388          * @uglGroup Button   421          * @uglGroup Button
389          */   422          */
390         public static final native int Checkbox_New(int parentHandle, int style);   423         public static final native int Checkbox_New(int parentHandle, int style);
391         /**   424         /**
392          * Returns a handle to an instance of the system font.  The system font   425          * Returns a handle to an instance of the system font.  The system font
393          * is a good default font for an application to use.  This handle   426          * is a good default font for an application to use.  This handle
394          * must be disposed by the caller with Font_Dispose.   427          * must be disposed by the caller with Font_Dispose.
395          *   428          *
396          * @param handle device handle   429          * @param handle device handle
397          * @return handle of system font   430          * @return handle of system font
398          */   431          */
399         public static final native int Device_GetSystemFont(int handle);   432         public static final native int Device_GetSystemFont(int handle);
400           433        
401         /**   434         /**
402          * Returns the number of bytes available in accelerated memory on this device.  The return   435          * Returns the number of bytes available in accelerated memory on this device.  The return
403          * value is considered a shapshot of the current amount of available memory, and is used in   436          * value is considered a shapshot of the current amount of available memory, and is used in
404          * calculations for image allocation.  Depending on a variety of platform conditions,   437          * calculations for image allocation.  Depending on a variety of platform conditions,
405          * the full extent of this number of bytes might not be available for an image.   438          * the full extent of this number of bytes might not be available for an image.
406          *   439          *
407          * @param handle device handle   440          * @param handle device handle
408          * @return number of bytes available in accelerated memory.   441          * @return number of bytes available in accelerated memory.
409          * A negative value indicates an unlimited amount of available   442          * A negative value indicates an unlimited amount of available
410          * space.   443          * space.
411          */   444          */
412         public static final native int Device_GetAvailableAcceleratedMemory(int handle); <> 445         // public static final native int Device_GetAvailableAcceleratedMemory(int handle);
413         = 446        
414         /**   447         /**
415          * Returns the color depth, in bits per pixel, of the device   448          * Returns the color depth, in bits per pixel, of the device
416          * identified by <code>handle</code>.   449          * identified by <code>handle</code>.
417          *   450          *
418          * @param handle the device handle   451          * @param handle the device handle
419          * @return the color depth, in bits per pixel   452          * @return the color depth, in bits per pixel
420          */   453          */
421         public static final native int Device_GetDepth(int handle);   454         public static final native int Device_GetDepth(int handle);
422           455        
423         /**   456         /**
424          * Returns the resolution, in pixels, of the device identified by   457          * Returns the resolution, in pixels, of the device identified by
425          * <code>handle</code>.   458          * <code>handle</code>.
426          *   459          *
427          * @param handle the device handle   460          * @param handle the device handle
428          * @return (point) the resolution of the device. Access the   461          * @return (point) the resolution of the device. Access the
429          *      horizontal resolution using the <code>INDEX_X</code> constant   462          *      horizontal resolution using the <code>INDEX_X</code> constant
430          *      and the vertical resolution using the <code>INDEX_Y</code>   463          *      and the vertical resolution using the <code>INDEX_Y</code>
431          *      constant   464          *      constant
432          */   465          */
433         public static final native int[] Device_GetDPI(int handle);   466         public static final native int[] Device_GetDPI(int handle);
434     467  
435         /**   468         /**
436          * Returns <code>true</code> if the device identified by   469          * Returns <code>true</code> if the device identified by
437          * <code>handle</code> is using a direct color model. Returns   470          * <code>handle</code> is using a direct color model. Returns
438          * <code>false</code> if the device is using an indexed color   471          * <code>false</code> if the device is using an indexed color
439          * model.   472          * model.
440          *   473          *
441          * @param handle the device handle.   474          * @param handle the device handle.
442          * @return true - the device is using a direct color model   475          * @return true - the device is using a direct color model
443          *      false - the device is using an indexed color model   476          *      false - the device is using an indexed color model
444          * @see #Device_GetDirectPaletteMasks   477          * @see #Device_GetDirectPaletteMasks
445          * @see #Device_GetIndexedPalette   478          * @see #Device_GetIndexedPalette
446          */   479          */
447         public static final native boolean Device_IsDirect(int handle); <> 480         // public static final native boolean Device_IsDirect(int handle);     
448         = 481        
449         /**   482         /**
450          * Returns the palette masks of the direct, default color model of the   483          * Returns the palette masks of the direct, default color model of the
451          * device identified by <code>handle</code>. Must not be called if the   484          * device identified by <code>handle</code>. Must not be called if the
452          * device uses an indexed color model.   485          * device uses an indexed color model.
453          *   486          *
454          * @param handle the device handle   487          * @param handle the device handle
455          * @return (palettemasks) the direct palette masks of the default   488          * @return (palettemasks) the direct palette masks of the default
456          *      color model of the specified device. Access array elements using   489          *      color model of the specified device. Access array elements using
457          *      the <code>PALETTE_MASK_RED</code>, <code>PALETTE_MASK_GREEN</code>,   490          *      the <code>PALETTE_MASK_RED</code>, <code>PALETTE_MASK_GREEN</code>,
458          *      <code>PALETTE_MASK_BLUE</code> and <code>PALETTE_MASK_ALPHA</code>   491          *      <code>PALETTE_MASK_BLUE</code> and <code>PALETTE_MASK_ALPHA</code>
459          *      constants.   492          *      constants.
460          * @see #Device_IsDirect   493          * @see #Device_IsDirect
461          * @see #Device_GetIndexedPalette   494          * @see #Device_GetIndexedPalette
462          */   495          */
463         public static final native int[] Device_GetDirectPaletteMasks(int handle); <> 496         // public static final native int[] Device_GetDirectPaletteMasks(int handle);
464         /** = 497         /**
465          * Returns the palette of the indexed, default color model of the device   498          * Returns the palette of the indexed, default color model of the device
466          * identified by <code>handle</code>. The red, green and blue arrays must be   499          * identified by <code>handle</code>. The red, green and blue arrays must be
467          * big enough to hold all color indices for the device's color depth. Must   500          * big enough to hold all color indices for the device's color depth. Must
468          * not be called if the device uses a direct color model.   501          * not be called if the device uses a direct color model.
469          *    502          * 
470          * @param handle the device handle   503          * @param handle the device handle
471          * @param red the red component of palette colors   504          * @param red the red component of palette colors
472          * @param green the green component of palette colors   505          * @param green the green component of palette colors
473          * @param blue the blue component of palette colors   506          * @param blue the blue component of palette colors
474          * @see #Device_IsDirect   507          * @see #Device_IsDirect
475          * @see #Device_GetDirectPaletteMasks   508          * @see #Device_GetDirectPaletteMasks
476          */   509          */
477         public static final native void Device_GetIndexedPalette(int handle, byte[] red, byte[] green, byte[] blue); <> 510         // public static final native void Device_GetIndexedPalette(int handle, byte[] red, byte[] green, byte[] blue);
478         = 511        
479         /**   512         /**
480          * Creates a new graphics context (GC) on the device identified by   513          * Creates a new graphics context (GC) on the device identified by
481          * <code>handle</code>.   514          * <code>handle</code>.
482          *   515          *
483          * @param handle the device handle   516          * @param handle the device handle
484          * @return the new graphics context   517          * @return the new graphics context
485          */   518          */
486         public static final native int Device_NewGraphics(int handle);   519         public static final native int Device_NewGraphics(int handle);
487           520        
488         /**   521         /**
489          * Copies a rectangular region of the device to an image.   522          * Copies a rectangular region of the device to an image.
490          *   523          *
491          * @param handle the device handle   524          * @param handle the device handle
492          * @param image the image handle   525          * @param image the image handle
493          * @param x the x origin of the region   526          * @param x the x origin of the region
494          * @param y the y origin of the region   527          * @param y the y origin of the region
495          * @param width the width of the region   528          * @param width the width of the region
496          * @param height the height of the region   529          * @param height the height of the region
497          */   530          */
498         public static final native void Device_CopyArea(int handle, int image, int x, int y, int width, int height);   531         public static final native void Device_CopyArea(int handle, int image, int x, int y, int width, int height);
499           532        
500         /**   533         /**
501          * Causes the system hardware to emit a short sound   534          * Causes the system hardware to emit a short sound
502          * (if it supports this capability).   535          * (if it supports this capability).
503          *   536          *
504          * @param handle the display handle   537          * @param handle the display handle
505          */   538          */
506         public static final native void Display_Beep(int handle);   539         public static final native void Display_Beep(int handle);
507           540        
508         /**   541         /**
509          * Returns the handle of the system color which corresponds with   542          * Returns the handle of the system color which corresponds with
510          * the given id.  The id should be one of the COLOR constants   543          * the given id.  The id should be one of the COLOR constants
511          * (e.g., COLOR_CONTROL_FOREGROUND).  The color resource should   544          * (e.g., COLOR_CONTROL_FOREGROUND).  The color resource should
512          * always be disposed by the caller.   545          * always be disposed by the caller.
513          *   546          *
514          * @param handle the display handle   547          * @param handle the display handle
515          * @param id the system color id (one of the COLOR constants)   548          * @param id the system color id (one of the COLOR constants)
516          * @return system color handle   549          * @return system color handle
517          */   550          */
518         public static final native int Display_GetSystemColor(int handle, int id);   551         public static final native int Display_GetSystemColor(int handle, int id);
519     552  
520         /**   553         /**
521          * Returns the longest duration, in milliseconds, between   554          * Returns the longest duration, in milliseconds, between
522          * two mouse button clicks that will be considered a   555          * two mouse button clicks that will be considered a
523          * <em>double click</em>.   556          * <em>double click</em>.
524          *   557          *
525          * @param handle the display handle   558          * @param handle the display handle
526          * @return the longest duration, in milliseconds, between   559          * @return the longest duration, in milliseconds, between
527          * two mouse button clicks that will be considered a   560          * two mouse button clicks that will be considered a
528          * <em>double click</em>   561          * <em>double click</em>
529          */   562          */
530         public static final native int Display_GetDoubleClickTime(int handle);   563         public static final native int Display_GetDoubleClickTime(int handle);
531     564  
532         /**   565         /**
533          * Starts a timer which will go off after the given number   566          * Starts a timer which will go off after the given number
534          * of milliseconds.  The timerId is passed to the timer   567          * of milliseconds.  The timerId is passed to the timer
535          * callback when the timer has gone off.   568          * callback when the timer has gone off.
536          *   569          *
537          * @param handle the display handle   570          * @param handle the display handle
538          * @param milliseconds must be greater than or equal to zero   571          * @param milliseconds must be greater than or equal to zero
539          * @param timerId can be any value   572          * @param timerId can be any value
540          */   573          */
541         public static final native void Display_StartTimer(int handle, int milliseconds, int timerId);   574         public static final native void Display_StartTimer(int handle, int milliseconds, int timerId);
542           575        
543         /**   576         /**
544          * On platforms which support it, sets the application name   577          * On platforms which support it, sets the application name
545          * to be the argument. On Motif, for example, this can be used   578          * to be the argument. On Motif, for example, this can be used
546          * to set the name used for resource lookup.   579          * to set the name used for resource lookup.
547          *   580          *
548          * @param name the new app name   581          * @param name the new app name
549          */   582          */
550         public static final native void Display_SetAppName(String name);   583         public static final native void Display_SetAppName(String name);
551           584        
552         /**   585         /**
553          * Returns the insets of the display identified by <code>handle</code>.   586          * Returns the insets of the display identified by <code>handle</code>.
554          * This is the portion of the screen that is unusable for drawing,   587          * This is the portion of the screen that is unusable for drawing,
555          * such as the area covered by a task bar.  These insets are positive   588          * such as the area covered by a task bar.  These insets are positive
556          * integers that indicate the distance inward from each edge.   589          * integers that indicate the distance inward from each edge.
557          *   590          *
558          * @param handle the display handle   591          * @param handle the display handle
559          * @return (insets) the display insets. Access array members using the   592          * @return (insets) the display insets. Access array members using the
560          *      <code>INDEX_LEFT</code>, <code>INDEX_TOP</code>, <code>INDEX_RIGHT</code>   593          *      <code>INDEX_LEFT</code>, <code>INDEX_TOP</code>, <code>INDEX_RIGHT</code>
561          *      and <code>INDEX_BOTTOM</code> constants.   594          *      and <code>INDEX_BOTTOM</code> constants.
562          */   595          */
563         public static final native int[] Display_GetInsets(int handle);   596         public static final native int[] Display_GetInsets(int handle);
564           597        
565         /**   598         /**
566          * Generates a system key event. Either the <code>keyCode</code> or   599          * Generates a system key event. Either the <code>keyCode</code> or
567          * <code>character</code> argument has to be specified.   600          * <code>character</code> argument has to be specified.
568          *   601          *
569          * @param handle the display handle   602          * @param handle the display handle
570          * @param type either <code>EVENT_KEY_DOWN</code> or <code>EVENT_KEY_UP</code>   603          * @param type either <code>EVENT_KEY_DOWN</code> or <code>EVENT_KEY_UP</code>
571          * @param keyCode one of the KEYCODE constants   604          * @param keyCode one of the KEYCODE constants
572          * @param character the character   605          * @param character the character
573          *   606          *
574          * @return true if the event was generated or false otherwise   607          * @return true if the event was generated or false otherwise
575          */   608          */
576         public static final native boolean Display_PostKeyEvent(int handle, int type, int keyCode, char character);   609         public static final native boolean Display_PostKeyEvent(int handle, int type, int keyCode, char character);
577           610        
578         /**   611         /**
579          * Generates a system pointer event.   612          * Generates a system pointer event.
580          *   613          *
581          * @param handle the display handle   614          * @param handle the display handle
582          * @param type the type of mouse event to generate. Either   615          * @param type the type of mouse event to generate. Either
583          *      <code>EVENT_POINTER_DOWN</code> or <code>EVENT_POINTER_UP</code>   616          *      <code>EVENT_POINTER_DOWN</code> or <code>EVENT_POINTER_UP</code>
584          * @param button the pointer button to set in the event. one of   617          * @param button the pointer button to set in the event. one of
585          *      <code>POINTER_MASK_BUTTON1</code>, <code>POINTER_MASK_BUTTON2</code> or   618          *      <code>POINTER_MASK_BUTTON1</code>, <code>POINTER_MASK_BUTTON2</code> or
586          *      <code>POINTER_MASK_BUTTON3</code>   619          *      <code>POINTER_MASK_BUTTON3</code>
587          *   620          *
588          * @return true if the event was generated or false otherwise   621          * @return true if the event was generated or false otherwise
589          */   622          */
590         public static final native boolean Display_PostPointerEvent(int handle, int type, int button);   623         public static final native boolean Display_PostPointerEvent(int handle, int type, int button);
591           624        
592         /**   625         /**
593          * Generates a system pointer move event.   626          * Generates a system pointer move event.
594          *   627          *
595          * @param handle the display handle   628          * @param handle the display handle
596          * @param x the x coordinate of the new pointer location   629          * @param x the x coordinate of the new pointer location
597          * @param y the y coordinate of the new pointer location   630          * @param y the y coordinate of the new pointer location
598          *   631          *
599          * @return true if the event was generated or false otherwise   632          * @return true if the event was generated or false otherwise
600          */   633          */
601         public static final native boolean Display_PostPointerMoveEvent(int handle, int x, int y);   634         public static final native boolean Display_PostPointerMoveEvent(int handle, int x, int y);
602           635        
603         /**   636         /**
604          * Sets the window indicated by the argument to be in   637          * Sets the window indicated by the argument to be in
605          * exclusive full screen mode.  In this mode, a shell stays on top in   638          * exclusive full screen mode.  In this mode, a shell stays on top in
606          * the z-order and no other windows overlap it.   639          * the z-order and no other windows overlap it.
607          *   640          *
608          * If this <code>shellHandle</code> is a valid handle for   641          * If this <code>shellHandle</code> is a valid handle for
609          * a shell different than the current full screen shell, the current   642          * a shell different than the current full screen shell, the current
610          * full screen shell is restored to its previous size (i.e. the size   643          * full screen shell is restored to its previous size (i.e. the size
611          * it was before it became full screen).   644          * it was before it became full screen).
612          *   645          *
613          * If the <code>shellHandle</code> is 0,   646          * If the <code>shellHandle</code> is 0,
614          * then overlapping window mode is restored.   647          * then overlapping window mode is restored.
615          *   648          *
616          * If CAPABILITY_FULLSCREEN_EXCLUSIVE_MODE is not natively supported,   649          * If CAPABILITY_FULLSCREEN_EXCLUSIVE_MODE is not natively supported,
617          * the Java toolkit will emulate this behavior, and this function will   650          * the Java toolkit will emulate this behavior, and this function will
618          * not be called.   651          * not be called.
619          *   652          *
620          * @param handle the display handle   653          * @param handle the display handle
621          * @param shellHandle handle of the shell to be made exclusive full screen   654          * @param shellHandle handle of the shell to be made exclusive full screen
622          * @see #CAPABILITY_FULLSCREEN_EXCLUSIVE_MODE   655          * @see #CAPABILITY_FULLSCREEN_EXCLUSIVE_MODE
623          */   656          */
624         public static final native void Display_SetFullScreenShell(int handle, int shellHandle); <> 657         // public static final native void Display_SetFullScreenShell(int handle, int shellHandle);
625         = 658        
626         /**   659         /**
627          * Unfocuses the currently focused widget.  The currently active window should   660          * Unfocuses the currently focused widget.  The currently active window should
628          * stay active, but it will have no focused widget.    661          * stay active, but it will have no focused widget. 
629          *   662          *
630          * @param handle the display handle   663          * @param handle the display handle
631          */   664          */
632         public static final native void Display_ClearFocus(int handle); <> 665         // public static final native void Display_ClearFocus(int handle);
633         = 666        
634         /**   667         /**
635          * Creates a new font with the specified logical type, height   668          * Creates a new font with the specified logical type, height
636          * in points, and style flags.  This method allows the platform to resolve   669          * in points, and style flags.  This method allows the platform to resolve
637          * logical fonts with size and style requirements in addition to the   670          * logical fonts with size and style requirements in addition to the
638          * logical type.  On some platforms, two different monospaced fonts may be   671          * logical type.  On some platforms, two different monospaced fonts may be
639          * used for two different sizes.   672          * used for two different sizes.
640          *   673          *
641          * The value of the logical type can be one of the following:   674          * The value of the logical type can be one of the following:
642          *   675          *
643          * <ul>   676          * <ul>
644          *    <li>FONT_LOGICAL_DEFAULT</li>   677          *    <li>FONT_LOGICAL_DEFAULT</li>
645          *    <li>FONT_LOGICAL_DIALOG</li>   678          *    <li>FONT_LOGICAL_DIALOG</li>
646          *    <li>FONT_LOGICAL_SANSSERIF</li>   679          *    <li>FONT_LOGICAL_SANSSERIF</li>
647          *    <li>FONT_LOGICAL_SERIF</li>   680          *    <li>FONT_LOGICAL_SERIF</li>
648          *    <li>FONT_LOGICAL_MONOSPACED</li>   681          *    <li>FONT_LOGICAL_MONOSPACED</li>
649          *    <li>FONT_LOGICAL_DIALOGINPUT</li>   682          *    <li>FONT_LOGICAL_DIALOGINPUT</li>
650          * </ul>   683          * </ul>
651          *   684          *
652          * @param deviceHandle the device/display handle   685          * @param deviceHandle the device/display handle
653          * @param logicalFont one of the font constants above   686          * @param logicalFont one of the font constants above
654          * @param height the requested height of the font in points   687          * @param height the requested height of the font in points
655          * @param style one of the FONT_STYLE constants   688          * @param style one of the FONT_STYLE constants
656          *   689          *
657          * @return the font with the specified qualities.   690          * @return the font with the specified qualities.
658          */   691          */
659         public static final native int Font_NewLogical(int deviceHandle, int logicalFont, int height, int style); <> 692         // public static final native int Font_NewLogical(int deviceHandle, int logicalFont, int height, int style);
660   = 693  
661         /**   694         /**
662          * Measures the advance width, in pixels, of the given string.   695          * Measures the advance width, in pixels, of the given string.
663          * <p>   696          * <p>
664          * The advance width is the distance to where the next string in   697          * The advance width is the distance to where the next string in
665          * a series of strings should be drawn. This is typically not the   698          * a series of strings should be drawn. This is typically not the
666          * same as the width returned by <code>Font_StringExtent()</code>.    699          * same as the width returned by <code>Font_StringExtent()</code>. 
667          * </p>   700          * </p>
668          *   701          *
669          * @param handle the font handle   702          * @param handle the font handle
670          * @param string the text to measure   703          * @param string the text to measure
671          * @return the advance width of the given string   704          * @return the advance width of the given string
672          */   705          */
673         public static final native int Font_StringAdvance(int handle, String string); <> 706         // public static final native int Font_StringAdvance(int handle, String string);
674         = 707        
675         /**   708         /**
676          * Returns the average character width of the font with the specified handle.   709          * Returns the average character width of the font with the specified handle.
677          *   710          *
678          * @param handle font handle   711          * @param handle font handle
679          * @return average character width   712          * @return average character width
680          */   713          */
681         public static final native int Font_GetAverageCharWidth(int handle);   714         public static final native int Font_GetAverageCharWidth(int handle);
682           715        
683         /**   716         /**
684          * Returns a font's style flags.  The return value should be a bitwise OR   717          * Returns a font's style flags.  The return value should be a bitwise OR
685          * of FONT_STYLE_BOLD, FONT_STYLE_ITALIC, FONT_STYLE_STRIKETHROUGH, and FONT_STYLE_UNDERLINED. <> 718          * of FONT_STYLE_BOLD, FONT_STYLE_ITALIC, FONT_STYLE_UNDERLINED, FONT_STYLE_STRIKETHROUGH, and FONT_STYLE_UNDERLINED.
686          * Or the return value may be zero, to indicate a normal font. = 719          * Or the return value may be zero, to indicate a normal font.
687          *   720          *
688          * @param handle the font handle   721          * @param handle the font handle
689          * @return style flags for font   722          * @return style flags for font
690          */   723          */
691         public static final native int Font_GetStyle(int handle);   724         public static final native int Font_GetStyle(int handle);
692           725        
693         /**   726         /**
694          * Returns the name of a font.  The name should be one   727          * Returns the name of a font.  The name should be one
695          * of the system typeface names returned by Device_GetTypefaces.   728          * of the system typeface names returned by Device_GetTypefaces.
696          *     729          *  
697          * @param handle the font handle   730          * @param handle the font handle
698          * @return font name   731          * @return font name
699          */   732          */
700         public static final native String Font_GetName(int handle);   733         public static final native String Font_GetName(int handle);
701           734        
702         /**   735         /**
703          * Creates a new shell that is a child of the shell identified by   736          * Creates a new shell that is a child of the shell identified by
704          * <code>parentHandle</code>.   737          * <code>parentHandle</code>.
705          * <p>Note: The styles supported by this method must be treated   738          * <p>Note: The styles supported by this method must be treated
706          * as <em>HINT</em>s, since the window manager has ultimate   739          * as <em>HINT</em>s, since the window manager has ultimate
707          * control over the appearance and behavior of decorations   740          * control over the appearance and behavior of decorations
708          * and modality.  In addition, if a  modality style is not   741          * and modality.  In addition, if a  modality style is not
709          * supported, it is "upgraded" to a more restrictive modality   742          * supported, it is "upgraded" to a more restrictive modality
710          * style that is supported. For example, if <code>STYLE_PRIMARY_MODAL</code>   743          * style that is supported. For example, if <code>STYLE_PRIMARY_MODAL</code>
711          * is not supported, it would be upgraded to <code>STYLE_APPLICATION_MODAL</code>.   744          * is not supported, it would be upgraded to <code>STYLE_APPLICATION_MODAL</code>.
712          * </p>   745          * </p>
713          *   746          *
714          * @param parentHandle the parent shell handle. Must not be 0.   747          * @param parentHandle the parent shell handle. Must not be 0.
715          * @param style one or more of <code>CLOSE</code>, <code>MIN</code>,    748          * @param style one or more of <code>CLOSE</code>, <code>MIN</code>, 
716          *      <code>MAX</code>, <code>NO_TRIM</code>,    749          *      <code>MAX</code>, <code>NO_TRIM</code>, 
717          *  <code>TITLE</code>, <code>STYLE_APPLICATION_MODAL</code>,   750          *  <code>TITLE</code>, <code>STYLE_APPLICATION_MODAL</code>,
718          *  <code>STYLE_SYSTEM_MODAL</code>,    751          *  <code>STYLE_SYSTEM_MODAL</code>, 
719          *  <code>STYLE_MODELESS</code> and <code>STYLE_PRIMARY_MODAL</code>   752          *  <code>STYLE_MODELESS</code> and <code>STYLE_PRIMARY_MODAL</code>
720          * @return the new shell   753          * @return the new shell
721          */   754          */
722         public static final native int Shell_NewChild(int parentHandle, int style);   755         public static final native int Shell_NewChild(int parentHandle, int style);
723           756        
724         /**   757         /**
725          * Returns <code>true</code> if the shell identified by <code>handle</code>   758          * Returns <code>true</code> if the shell identified by <code>handle</code>
726          * is currently minimized, and <code>false</code> otherwise.   759          * is currently minimized, and <code>false</code> otherwise.
727     760  
728          * @param handle the shell handle   761          * @param handle the shell handle
729          * @return <code>true</code> if the shell is currently minimized,   762          * @return <code>true</code> if the shell is currently minimized,
730          *      and <code>false</code> otherwise.   763          *      and <code>false</code> otherwise.
731          */   764          */
732         public static final native boolean Shell_GetMinimized(int handle);   765         public static final native boolean Shell_GetMinimized(int handle);
733           766        
734         /**   767         /**
735          * Returns <code>true</code> if the shell identified by <code>handle</code>   768          * Returns <code>true</code> if the shell identified by <code>handle</code>
736          * is currently maximized, and <code>false</code> otherwise.   769          * is currently maximized, and <code>false</code> otherwise.
737     770  
738          * @param handle the shell handle   771          * @param handle the shell handle
739          * @return <code>true</code> if the shell is currently maximized,   772          * @return <code>true</code> if the shell is currently maximized,
740          *      and <code>false</code> otherwise.   773          *      and <code>false</code> otherwise.
741          */   774          */
742         public static final native boolean Shell_GetMaximized(int handle);   775         public static final native boolean Shell_GetMaximized(int handle);
743           776        
744         /**   777         /**
745          * Sets the minimized stated of the shell identified by <code>handle</code>.   778          * Sets the minimized stated of the shell identified by <code>handle</code>.
746          *   779          *
747          * Note: some platforms do not have the capability to programmatically change   780          * Note: some platforms do not have the capability to programmatically change
748          * the minimized or maximized state, so calls to this method on those platforms   781          * the minimized or maximized state, so calls to this method on those platforms
749          * should fail silently.   782          * should fail silently.
750          *    783          * 
751          * @param handle the shell handle   784          * @param handle the shell handle
752          * @param minimized true - the shell switches to the minimized state   785          * @param minimized true - the shell switches to the minimized state
753          *      false - if the shell was previously minimized, causes the   786          *      false - if the shell was previously minimized, causes the
754          *      shell to switch back to either the maximized or normal states.   787          *      shell to switch back to either the maximized or normal states.
755          */   788          */
756         public static final native void Shell_SetMinimized(int handle, boolean minimized);   789         public static final native void Shell_SetMinimized(int handle, boolean minimized);
757     790  
758         /**   791         /**
759          * Sets the image of the shell identified by <code>handle</code>   792          * Sets the image of the shell identified by <code>handle</code>
760          * to the argument, which may be 0. The image is typically   793          * to the argument, which may be 0. The image is typically
761          * displayed by the window manager when the instance is   794          * displayed by the window manager when the instance is
762          * marked as iconified, and may also be displayed somewhere   795          * marked as iconified, and may also be displayed somewhere
763          * in the trim when the instance is in normal or maximized   796          * in the trim when the instance is in normal or maximized
764          * states.   797          * states.
765          *   798          *
766          * @param handle the shell handle   799          * @param handle the shell handle
767          * @param imageHandle the image handle. 0 to remove the shell image.   800          * @param imageHandle the image handle. 0 to remove the shell image.
768          * @see #Display_GetIconSize   801          * @see #Display_GetIconSize
769          */   802          */
770         public static final native void Shell_SetImage(int handle, int imageHandle);   803         public static final native void Shell_SetImage(int handle, int imageHandle);
771         /**   804         /**
772          * Specifies whether the size of the shell identified by   805          * Specifies whether the size of the shell identified by
773          * <code>handle</code> may be changed.   806          * <code>handle</code> may be changed.
774          *   807          *
775          * Note: some platforms do not support resizing of shells, so calls to this method on those platforms   808          * Note: some platforms do not support resizing of shells, so calls to this method on those platforms
776          * should fail silently.   809          * should fail silently.
777          *   810          *
778          * @param handle the shell handle   811          * @param handle the shell handle
779          * @param resizable true - the shell may be resized   812          * @param resizable true - the shell may be resized
780          *      false - the shell size may not be changed   813          *      false - the shell size may not be changed
781          */   814          */
782         public static final native void Shell_SetResizable(int handle, boolean resizable);   815         public static final native void Shell_SetResizable(int handle, boolean resizable);
783           816        
784         /**   817         /**
785          * Sets the specified menu bar as the shell menu bar for the   818          * Sets the specified menu bar as the shell menu bar for the
786          * shell identified by <code>handle</code>.   819          * shell identified by <code>handle</code>.
787          *   820          *
788          * @param handle the shell handle   821          * @param handle the shell handle
789          * @param menuBarHandle the menu bar handle. 0 to remove the current menu bar.   822          * @param menuBarHandle the menu bar handle. 0 to remove the current menu bar.
790          */   823          */
791         public static final native void Shell_SetMenuBar(int handle, int menuBarHandle);   824         public static final native void Shell_SetMenuBar(int handle, int menuBarHandle);
792           825        
793         /**   826         /**
794          * Makes a button the default for this shell.  Default buttons may   827          * Makes a button the default for this shell.  Default buttons may
795          * have a special appearance, or they may take the initial focus   828          * have a special appearance, or they may take the initial focus
796          * from the shell.    829          * from the shell. 
797          *   830          *
798          * @param shellHandle the handle to the shell   831          * @param shellHandle the handle to the shell
799          * @param buttonHandle the button to be made default, or 0 if no default   832          * @param buttonHandle the button to be made default, or 0 if no default
800          *                     button should be used.  This handle will only   833          *                     button should be used.  This handle will only
801          *                     be buttons created with PushButton_New()   834          *                     be buttons created with PushButton_New()
802          */   835          */
803         public static final native void Shell_SetDefaultButton(int shellHandle, int buttonHandle);   836         public static final native void Shell_SetDefaultButton(int shellHandle, int buttonHandle);
804           837        
805     838  
806         /**   839         /**
807          * Disposes off resources associated with the specified sound   840          * Disposes off resources associated with the specified sound
808          * <code>handle</code>   841          * <code>handle</code>
809          *   842          *
810          * @param handle the sound handle   843          * @param handle the sound handle
811          */   844          */
812         public static final native void Sound_Dispose(int handle); <> 845         // public static final native void Sound_Dispose(int handle);
813         = 846        
814         /**   847         /**
815          * Get the preferred size of a sound data chunk.   848          * Get the preferred size of a sound data chunk.
816          * Returns <code>SOUND_CHUNK_SIZE_ALL</code> to indicate that    849          * Returns <code>SOUND_CHUNK_SIZE_ALL</code> to indicate that 
817          * the entire sound data should be written in a single chunk.   850          * the entire sound data should be written in a single chunk.
818          *   851          *
819          * @param handle the sound handle   852          * @param handle the sound handle
820          * @return the preferred size of a sound data chunk.   853          * @return the preferred size of a sound data chunk.
821          */   854          */
822         public static final native int Sound_GetPreferredChunkSize(int handle); <> 855         // public static final native int Sound_GetPreferredChunkSize(int handle);
823   = 856  
824         /**   857         /**
825          * Creates a new sound clip.   858          * Creates a new sound clip.
826          *   859          *
827          * @return the sound handle or 0 if sound is not supported   860          * @return the sound handle or 0 if sound is not supported
828          */   861          */
829         public static final native int Sound_New(); <> 862         // public static final native int Sound_New();
830   = 863  
831         /**   864         /**
832          * Writes a sound data chunk to the sound clip identified by   865          * Writes a sound data chunk to the sound clip identified by
833          * <code>handle</code>. The chunk size is no bigger than the   866          * <code>handle</code>. The chunk size is no bigger than the
834          * preferred size returned by <code>Sound_GetPreferredChunkSize()</code>.   867          * preferred size returned by <code>Sound_GetPreferredChunkSize()</code>.
835          * Playback begins immediately and is asynchronous. This call   868          * Playback begins immediately and is asynchronous. This call
836          * returns as soon as playback has started.   869          * returns as soon as playback has started.
837          * Playback is not interrupted by other calls to   870          * Playback is not interrupted by other calls to
838          * <code>Sound_Play()</code>. Instead the data is queued for   871          * <code>Sound_Play()</code>. Instead the data is queued for
839          * playback after the last chunk finishes playing.   872          * playback after the last chunk finishes playing.
840          * <p>   873          * <p>
841          * To loop an entire sound clip the sound data has to be written   874          * To loop an entire sound clip the sound data has to be written
842          * in a single chunk.   875          * in a single chunk.
843          * </p>   876          * </p>
844          *   877          *
845          * @param handle the sound handle   878          * @param handle the sound handle
846          * @param data the sound data   879          * @param data the sound data
847          * @param length length of the sound data chunk.   880          * @param length length of the sound data chunk.
848          * @param repeatCount number of repeated playbacks. Use 0 to play   881          * @param repeatCount number of repeated playbacks. Use 0 to play
849          *      once. Use <code>SOUND_REPEAT_FOREVER</code> to continue   882          *      once. Use <code>SOUND_REPEAT_FOREVER</code> to continue
850          *      playing until <code>Sound_Stop()</code> is called.   883          *      playing until <code>Sound_Stop()</code> is called.
851          * @see #Sound_GetPreferredChunkSize   884          * @see #Sound_GetPreferredChunkSize
852          */   885          */
853         public static final native void Sound_Play(int handle, byte[] data, int length, int repeatCount); <> 886         // public static final native void Sound_Play(int handle, byte[] data, int length, int repeatCount);
854   = 887  
855         /**   888         /**
856          * Stops playback of the sound clip identified by   889          * Stops playback of the sound clip identified by
857          * <code>handle</code>. Does nothing if no sound is currently   890          * <code>handle</code>. Does nothing if no sound is currently
858          * playing.   891          * playing.
859          *   892          *
860          * @param handle the sound handle   893          * @param handle the sound handle
861          */   894          */
862         public static final native void Sound_Stop(int handle); <> 895         // public static final native void Sound_Stop(int handle);
863         = 896        
864         /**   897         /**
865          * Valid styles are STYLE_READ_ONLY.  All Combos are drop down lists.   898          * Valid styles are STYLE_READ_ONLY.  All Combos are drop down lists.
866          *   899          *
867          * @param parentHandle handle of the parent container   900          * @param parentHandle handle of the parent container
868          * @param style a logical OR of styles for this widget   901          * @param style a logical OR of styles for this widget
869          * @return handle of new widget   902          * @return handle of new widget
870          */   903          */
871         public static final native int Combo_New(int parentHandle, int style);   904         public static final native int Combo_New(int parentHandle, int style);
872           905        
873         /**   906         /**
874          * Replaces the text between two caret positions with   907          * Replaces the text between two caret positions with
875          * new text.  See AbstractTextComponent_SetCaretPosition   908          * new text.  See AbstractTextComponent_SetCaretPosition
876          * for valid start and end values.  This method should not   909          * for valid start and end values.  This method should not
877          * generate a modify callback.   910          * generate a modify callback.
878          *   911          *
879          * @param handle the combo handle   912          * @param handle the combo handle
880          * @param text the new text   913          * @param text the new text
881          * @param start the start position   914          * @param start the start position
882          * @param end the end position   915          * @param end the end position
883          * @see #AbstractTextComponent_SetCaretPosition(int, int)   916          * @see #AbstractTextComponent_SetCaretPosition(int, int)
884          */   917          */
885         public static final native void Combo_ReplaceText(int handle, String text, int start, int end);   918         public static final native void Combo_ReplaceText(int handle, String text, int start, int end);
886           919        
887         /**   920         /**
888          * Returns the start and end position of the current text selection.   921          * Returns the start and end position of the current text selection.
889          * The values returned range from 0 to N inclusive, where N is the   922          * The values returned range from 0 to N inclusive, where N is the
890          * number of characters in the text field.   923          * number of characters in the text field.
891          *   924          *
892          * @param handle handle of combo widget   925          * @param handle handle of combo widget
893          * @return (point)   926          * @return (point)
894          */   927          */
895         public static final native int[] Combo_GetTextSelection(int handle);   928         public static final native int[] Combo_GetTextSelection(int handle);
896           929        
897         /**   930         /**
898          * Returns the entire contents of the text field.   931          * Returns the entire contents of the text field.
899          *   932          *
900          * @param handle handle of combo widget   933          * @param handle handle of combo widget
901          * @return entire text from text field   934          * @return entire text from text field
902          */   935          */
903         public static final native String Combo_GetText(int handle);   936         public static final native String Combo_GetText(int handle);
904           937        
905         /**   938         /**
906          * Returns the height of the text field.   939          * Returns the height of the text field.
907          *   940          *
908          * @param handle handle of combo widget   941          * @param handle handle of combo widget
909          * @return height of text field   942          * @return height of text field
910          */   943          */
911         public static final native int Combo_GetTextHeight(int handle);   944         public static final native int Combo_GetTextHeight(int handle);
912           945        
913         /**   946         /**
914          * Sets the start and end positions of the text selection.  Both values   947          * Sets the start and end positions of the text selection.  Both values
915          * must be in the range 0 to N inclusive, where N is the number of   948          * must be in the range 0 to N inclusive, where N is the number of
916          * characters in the text field.   949          * characters in the text field.
917          *   950          *
918          * @param handle handle of combo widget   951          * @param handle handle of combo widget
919          * @param start start position of new text selection   952          * @param start start position of new text selection
920          * @param end end position of new text selection   953          * @param end end position of new text selection
921          */   954          */
922         public static final native void Combo_SetTextSelection(int handle, int start, int end);   955         public static final native void Combo_SetTextSelection(int handle, int start, int end);
923           956        
924         /**   957         /**
925          * Sets the contents of the text field.  Any existing text will be   958          * Sets the contents of the text field.  Any existing text will be
926          * removed.   959          * removed.
927          *   960          *
928          * @param handle handle of combo widget   961          * @param handle handle of combo widget
929          * @param string new contents of text field   962          * @param string new contents of text field
930          */   963          */
931         public static final native void Combo_SetText(int handle, String string);   964         public static final native void Combo_SetText(int handle, String string);
932           965        
933         /**   966         /**
934          * Sets the maximum number of characters that the text field can hold.   967          * Sets the maximum number of characters that the text field can hold.
935          * The value must be in the range 0 to M inclusive, where M is the value   968          * The value must be in the range 0 to M inclusive, where M is the value
936          * returned by Combo_GetDefaultTextLimit().   969          * returned by Combo_GetDefaultTextLimit().
937          *   970          *
938          * @param handle handle of combo widget   971          * @param handle handle of combo widget
939          * @param limit max number of characters text field can hold   972          * @param limit max number of characters text field can hold
940          */   973          */
941         public static final native void Combo_SetTextLimit(int handle, int limit);   974         public static final native void Combo_SetTextLimit(int handle, int limit);
942           975        
943         /**   976         /**
944          * Returns the default maximum number of characters that the text field   977          * Returns the default maximum number of characters that the text field
945          * can hold.   978          * can hold.
946          *   979          *
947          * @return maximum number of characters in text field   980          * @return maximum number of characters in text field
948          */   981          */
949         public static final native int Combo_GetDefaultTextLimit();   982         public static final native int Combo_GetDefaultTextLimit();
950           983        
951         /**   984         /**
952          * Sets the orientation of the text field.  The argument must be either   985          * Sets the orientation of the text field.  The argument must be either
953          * STYLE_LEFT_TO_RIGHT or STYLE_RIGHT_TO_LEFT.   986          * STYLE_LEFT_TO_RIGHT or STYLE_RIGHT_TO_LEFT.
954          *   987          *
955          * @param handle widget handle   988          * @param handle widget handle
956          * @param orientation STYLE_LEFT_TO_RIGHT or STYLE_RIGHT_TO_LEFT   989          * @param orientation STYLE_LEFT_TO_RIGHT or STYLE_RIGHT_TO_LEFT
957          */   990          */
958         public static final native void Combo_SetOrientation(int handle, int orientation);   991         public static final native void Combo_SetOrientation(int handle, int orientation);
959           992        
960         /**   993         /**
961          * Deselects the item at index, if and only if it is currently selected.   994          * Deselects the item at index, if and only if it is currently selected.
962          *   995          *
963          * @param handle widget handle   996          * @param handle widget handle
964          * @param index index of item to be deselected   997          * @param index index of item to be deselected
965          */   998          */
966         public static final native void Combo_DeselectItem(int handle, int index);   999         public static final native void Combo_DeselectItem(int handle, int index);
967           1000        
968         /**   1001         /**
969          * Deselects all currently selected items.   1002          * Deselects all currently selected items.
970          *   1003          *
971          * @param handle widget handle   1004          * @param handle widget handle
972          */   1005          */
973         public static final native void Combo_DeselectAllItems(int handle);   1006         public static final native void Combo_DeselectAllItems(int handle);
974           1007        
975         /**   1008         /**
976          * Returns the height of an individual list item.   1009          * Returns the height of an individual list item.
977          *   1010          *
978          * @param handle widget handle   1011          * @param handle widget handle
979          * @return height of each item in the drop down list   1012          * @return height of each item in the drop down list
980          */   1013          */
981         public static final native int Combo_GetItemHeight(int handle);   1014         public static final native int Combo_GetItemHeight(int handle);
982           1015        
983         /**   1016         /**
984          * Sets the value of the item at the given index.   1017          * Sets the value of the item at the given index.
985          *   1018          *
986          * @param handle handle of the combo widget   1019          * @param handle handle of the combo widget
987          * @param string text to be used for this item   1020          * @param string text to be used for this item
988          * @param index index of the item to be changed   1021          * @param index index of the item to be changed
989          */   1022          */
990         public static final native void Combo_SetItem(int handle, String string, int index);   1023         public static final native void Combo_SetItem(int handle, String string, int index);
991           1024        
992         /**   1025         /**
993          * Returns the number of items that are visible in the drop down list.   1026          * Returns the number of items that are visible in the drop down list.
994          * This getter is necessary because there is no default value for this   1027          * This getter is necessary because there is no default value for this
995          * property.   1028          * property.
996          *   1029          *
997          * @param handle handle of the combo widget   1030          * @param handle handle of the combo widget
998          * @return number of visible items   1031          * @return number of visible items
999          */   1032          */
1000         public static final native int Combo_GetVisibleItemCount(int handle);   1033         public static final native int Combo_GetVisibleItemCount(int handle);
1001           1034        
1002         /**   1035         /**
1003          * Sets the number of items that are visible in the drop down list.   1036          * Sets the number of items that are visible in the drop down list.
1004          *   1037          *
1005          * @param handle handle of the combo widget   1038          * @param handle handle of the combo widget
1006          * @param count new number of visible items   1039          * @param count new number of visible items
1007          */   1040          */
1008         public static final native void Combo_SetVisibleItemCount(int handle, int count);   1041         public static final native void Combo_SetVisibleItemCount(int handle, int count);
1009         /**   1042         /**
1010          * Creates a new Composite.  Valid styles are STYLE_NO_BACKGROUND,   1043          * Creates a new Composite.  Valid styles are STYLE_NO_BACKGROUND,
1011          * STYLE_NO_FOCUS, STYLE_NO_MERGE_PAINTS, and STYLE_NO_REDRAW_RESIZE.   1044          * STYLE_NO_FOCUS, STYLE_NO_MERGE_PAINTS, and STYLE_NO_REDRAW_RESIZE.
1012          *   1045          *
1013          * @param parentHandle the parent handle   1046          * @param parentHandle the parent handle
1014          * @param style the style   1047          * @param style the style
1015          * @return handle of new widget   1048          * @return handle of new widget
1016          */   1049          */
1017         public static final native int Composite_New(int parentHandle, int style);   1050         public static final native int Composite_New(int parentHandle, int style);
1018           1051        
1019         /**   1052         /**
1020          * Copies a rectangular region of the control to an image.   1053          * Copies a rectangular region of the control to an image.
1021          *   1054          *
1022          * @param handle the control handle   1055          * @param handle the control handle
1023          * @param image the image handle   1056          * @param image the image handle
1024          * @param x the x origin of the region   1057          * @param x the x origin of the region
1025          * @param y the y origin of the region   1058          * @param y the y origin of the region
1026          * @param width the width of the region   1059          * @param width the width of the region
1027          * @param height the height of the region   1060          * @param height the height of the region
1028          */   1061          */
1029         public static final native void Control_CopyArea(int handle, int image, int x, int y, int width, int height);   1062         public static final native void Control_CopyArea(int handle, int image, int x, int y, int width, int height);
1030           1063        
1031         /**   1064         /**
1032          * Sets the control's background color.  The background color of child widgets   1065          * Sets the control's background color.  The background color of child widgets
1033          * should not be set to this new color.  If the color handle is zero, the   1066          * should not be set to this new color.  If the color handle is zero, the
1034          * default background color should be used.   1067          * default background color should be used.
1035          *   1068          *
1036          * @param handle the control handle   1069          * @param handle the control handle
1037          * @param color the color handle   1070          * @param color the color handle
1038          */   1071          */
1039         public static final native void Control_SetBackground(int handle, int color);   1072         public static final native void Control_SetBackground(int handle, int color);
1040           1073        
1041         /**   1074         /**
1042          * Returns an RGB value which represents the control's background   1075          * Returns an RGB value which represents the control's background
1043          * color.  The return value will have the format 0x00RRGGBB.   1076          * color.  The return value will have the format 0x00RRGGBB.
1044          *   1077          *
1045          * @param handle the control handle   1078          * @param handle the control handle
1046          * @return RGB value of background color   1079          * @return RGB value of background color
1047          */   1080          */
1048         public static final native int Control_GetBackgroundRGB(int handle);   1081         public static final native int Control_GetBackgroundRGB(int handle);
1049           1082        
1050         /**   1083         /**
1051          * Returns an RGB value which represents the control's foreground   1084          * Returns an RGB value which represents the control's foreground
1052          * color.  The return value will have the format 0x00RRGGBB.   1085          * color.  The return value will have the format 0x00RRGGBB.
1053          *   1086          *
1054          * @param handle the control handle   1087          * @param handle the control handle
1055          * @return RGB value of foreground color   1088          * @return RGB value of foreground color
1056          */   1089          */
1057         public static final native int Control_GetForegroundRGB(int handle);   1090         public static final native int Control_GetForegroundRGB(int handle);
1058           1091        
1059         /**   1092         /**
1060          * Enables or disables the control.  Disabled controls do not respond   1093          * Enables or disables the control.  Disabled controls do not respond
1061          * to mouse, key, or focus events.  They may appear dimmed or "grayed-out",   1094          * to mouse, key, or focus events.  They may appear dimmed or "grayed-out",
1062          * depending on the implementation.   1095          * depending on the implementation.
1063          *   1096          *
1064          * @param handle the control handle   1097          * @param handle the control handle
1065          * @param enabled enables the control if true, disables the control if false   1098          * @param enabled enables the control if true, disables the control if false
1066          */   1099          */
1067         public static final native void Control_SetEnabled(int handle, boolean enabled);   1100         public static final native void Control_SetEnabled(int handle, boolean enabled);
1068           1101        
1069         /**   1102         /**
1070          * Sets the control's font.    1103          * Sets the control's font. 
1071          *   1104          *
1072          * @param handle the control handle   1105          * @param handle the control handle
1073          * @param font the font handle   1106          * @param font the font handle
1074          */   1107          */
1075         public static final native void Control_SetFont(int handle, int font);   1108         public static final native void Control_SetFont(int handle, int font);
1076           1109        
1077         /**   1110         /**
1078          * Sets the control's foreground color.  The background color of child widgets   1111          * Sets the control's foreground color.  The background color of child widgets
1079          * should not be set to this new color.  If the color handle is zero, the   1112          * should not be set to this new color.  If the color handle is zero, the
1080          * default foreground color should be used.   1113          * default foreground color should be used.
1081          *   1114          *
1082          * @param handle the control handle   1115          * @param handle the control handle
1083          * @param color the color handle   1116          * @param color the color handle
1084          */   1117          */
1085         public static final native void Control_SetForeground(int handle, int color);   1118         public static final native void Control_SetForeground(int handle, int color);
1086           1119        
1087         /**   1120         /**
1088          * Forces the control to have keyboard focus.  Returns true   1121          * Forces the control to have keyboard focus.  Returns true
1089          * if the control got focus, false otherwise.   1122          * if the control got focus, false otherwise.
1090          *   1123          *
1091          * @param handle the control handle   1124          * @param handle the control handle
1092          * @return whether the control received focus   1125          * @return whether the control received focus
1093          */   1126          */
1094         public static final native boolean Control_ForceFocus(int handle);   1127         public static final native boolean Control_ForceFocus(int handle);
1095           1128        
1096         /**   1129         /**
1097          * Sets the control's cursor.   1130          * Sets the control's cursor.
1098          *   1131          *
1099          * @param handle the control handle   1132          * @param handle the control handle
1100          * @param cursor the cursor handle   1133          * @param cursor the cursor handle
1101          */   1134          */
1102         public static final native void Control_SetCursor(int handle, int cursor); <> 1135         // public static final native void Control_SetCursor(int handle, int cursor);
1103         = 1136        
1104         /**   1137         /**
1105          * Moves the control above another control in the z order.  If the second   1138          * Moves the control above another control in the z order.  If the second
1106          * argument is zero, the control will be moved to the top of the z order.   1139          * argument is zero, the control will be moved to the top of the z order.
1107          *   1140          *
1108          * @param handle the control handle   1141          * @param handle the control handle
1109          * @param control the other control handle   1142          * @param control the other control handle
1110          */   1143          */
1111         public static final native void Control_MoveAbove(int handle, int control);   1144         public static final native void Control_MoveAbove(int handle, int control);
1112           1145        
1113         /**   1146         /**
1114          * Moves a Control below another Control in the drawing order.   1147          * Moves a Control below another Control in the drawing order.
1115          * If the second parameter is 0, the Control will be moved to   1148          * If the second parameter is 0, the Control will be moved to
1116          * the bottom of the drawing order.   1149          * the bottom of the drawing order.
1117          *   1150          *
1118          * @param handle the handle of the Control to move   1151          * @param handle the handle of the Control to move
1119          * @param otherHandle the other Control   1152          * @param otherHandle the other Control
1120          */   1153          */
1121         public static final native void Control_MoveBelow(int handle, int otherHandle);   1154         public static final native void Control_MoveBelow(int handle, int otherHandle);
1122           1155        
1123         /**   1156         /**
1124          * Returns the control's minimum size.   1157          * Returns the control's minimum size.
1125          *   1158          *
1126          * @param handle the control handle   1159          * @param handle the control handle
1127          * @return (size)   1160          * @return (size)
1128          */   1161          */
1129         public static final native int[] Control_GetMinimumSize(int handle);   1162         public static final native int[] Control_GetMinimumSize(int handle);
1130           1163        
1131         /**   1164         /**
1132          * Sets the control's redraw flag.  When set to false, the UGL   1165          * Sets the control's redraw flag.  When set to false, the UGL
1133          * implementation should not allow the control to be redrawn.   1166          * implementation should not allow the control to be redrawn.
1134          * When set to true, redrawing should proceed as usual. In addition,   1167          * When set to true, redrawing should proceed as usual. In addition,
1135          * an invalidate of the control may be necessary as the control may   1168          * an invalidate of the control may be necessary as the control may
1136          * have become stale while redraw was disabled.   1169          * have become stale while redraw was disabled.
1137          * Please note that calls to this method should not be nested.   1170          * Please note that calls to this method should not be nested.
1138          * This is because not all UGL implementations can implement   1171          * This is because not all UGL implementations can implement
1139          * nested redraws.   1172          * nested redraws.
1140          *   1173          *
1141          * @param handle the control handle   1174          * @param handle the control handle
1142          * @param redraw true to allow redraws, false to disallow redraws   1175          * @param redraw true to allow redraws, false to disallow redraws
1143          */   1176          */
1144         public static final native void Control_SetRedraw(int handle, boolean redraw);   1177         public static final native void Control_SetRedraw(int handle, boolean redraw);
1145           1178        
1146         /**   1179         /**
1147          * Returns the font that this control would use if no font is set.    1180          * Returns the font that this control would use if no font is set. 
1148          *   1181          *
1149          * NOTE:  This API must always return a valid font object.  The font is assumed to   1182          * NOTE:  This API must always return a valid font object.  The font is assumed to
1150          * be owned by the system and will not be disposed from java.   1183          * be owned by the system and will not be disposed from java.
1151          *   1184          *
1152          * @param handle the control   1185          * @param handle the control
1153          * @return the default font for this control.   1186          * @return the default font for this control.
1154          */   1187          */
1155         public static final native int Control_GetDefaultFont(int handle);   1188         public static final native int Control_GetDefaultFont(int handle);
1156           1189        
1157         /**   1190         /**
1158          * Returns whether this control would like to inherit the background color   1191          * Returns whether this control would like to inherit the background color
1159          * of the parent during creation.  Some controls like Labels and Checkboxes   1192          * of the parent during creation.  Some controls like Labels and Checkboxes
1160          * typically look better when they inherit the parent's color both others   1193          * typically look better when they inherit the parent's color both others
1161          * do not, like List and Text.    1194          * do not, like List and Text. 
1162          *   1195          *
1163          * NOTE:  This API is only used to support Personal Profile since in eSWT controls never   1196          * NOTE:  This API is only used to support Personal Profile since in eSWT controls never
1164          * inherit the background color of the parent.  Returning false from this   1197          * inherit the background color of the parent.  Returning false from this
1165          * method will not stop the background color from being inherited if   1198          * method will not stop the background color from being inherited if
1166          * SetBackground(null) is called after creation, but makes it the ONLY time that   1199          * SetBackground(null) is called after creation, but makes it the ONLY time that
1167          * the background is passed down from the parent.   1200          * the background is passed down from the parent.
1168          *   1201          *
1169          * @param handle the target control   1202          * @param handle the target control
1170          * @return true if the background color should be passed down during creation   1203          * @return true if the background color should be passed down during creation
1171          */   1204          */
1172         public static final native boolean Control_InheritsBackground(int handle);      <> 1205         // public static final native boolean Control_InheritsBackground(int handle);  
1173         = 1206        
1174         /**   1207         /**
1175          * Requests that a rectangular region of the control be redrawn.    1208          * Requests that a rectangular region of the control be redrawn. 
1176          * Please note that the actual redraw will not occur until the   1209          * Please note that the actual redraw will not occur until the
1177          * event loop has processed the draw event.   1210          * event loop has processed the draw event.
1178          *   1211          *
1179          * @param handle the control handle   1212          * @param handle the control handle
1180          * @param x the x origin of the region   1213          * @param x the x origin of the region
1181          * @param y the y origin of the region   1214          * @param y the y origin of the region
1182          * @param width the width of the region   1215          * @param width the width of the region
1183          * @param height the height of the region   1216          * @param height the height of the region
1184          */   1217          */
1185         public static final native void Control_RedrawRegion(int handle, int x, int y, int width, int height);   1218         public static final native void Control_RedrawRegion(int handle, int x, int y, int width, int height);
1186           1219        
1187         /**   1220         /**
1188          * Forces all outstanding redraw requests.   1221          * Forces all outstanding redraw requests.
1189          *    1222          * 
1190          * @param handle control handle   1223          * @param handle control handle
1191          * @param updateChildren if true, force all children to redraw also   1224          * @param updateChildren if true, force all children to redraw also
1192          */   1225          */
1193         public static final native void Control_Update(int handle, boolean updateChildren);   1226         public static final native void Control_Update(int handle, boolean updateChildren);
1194           1227        
1195         /**   1228         /**
1196          * Returns the control's border width in pixels.  The border is   1229          * Returns the control's border width in pixels.  The border is
1197          * assumed to be the same size on each side of the control.   1230          * assumed to be the same size on each side of the control.
1198          *   1231          *
1199          * @param handle the control handle   1232          * @param handle the control handle
1200          * @return the border width in pixels   1233          * @return the border width in pixels
1201          */   1234          */
1202         public static final native int Control_GetBorderWidth(int handle);   1235         public static final native int Control_GetBorderWidth(int handle);
1203           1236        
1204         /**   1237         /**
1205          * Toggles the pointer capture state of the control.  If capture is true,   1238          * Toggles the pointer capture state of the control.  If capture is true,
1206          * the control will receive all pointer events, regardless of their   1239          * the control will receive all pointer events, regardless of their
1207          * origin.  If capture is false, pointer events are delivered to their   1240          * origin.  If capture is false, pointer events are delivered to their
1208          * respective controls.   1241          * respective controls.
1209          *   1242          *
1210          * @param handle control handle   1243          * @param handle control handle
1211          * @param capture the pointer capture state   1244          * @param capture the pointer capture state
1212          */   1245          */
1213         public static final native void Control_SetPointerCapture(int handle, boolean capture);   1246         public static final native void Control_SetPointerCapture(int handle, boolean capture);
1214           1247        
1215         /**   1248         /**
1216          * Returns whether or not the Control can change its parent.  This behavior   1249          * Returns whether or not the Control can change its parent.  This behavior
1217          * should be considered optional for UGL implementors, because reparenting   1250          * should be considered optional for UGL implementors, because reparenting
1218          * is considered to be improper, and may not be supported by the underlying   1251          * is considered to be improper, and may not be supported by the underlying
1219          * widget library.   1252          * widget library.
1220          *    1253          * 
1221          * @param handle the Control handle   1254          * @param handle the Control handle
1222          * @return true if the Control can change its parent, false otherwise   1255          * @return true if the Control can change its parent, false otherwise
1223          * @see #Control_SetParent(int, int)   1256          * @see #Control_SetParent(int, int)
1224          */   1257          */
1225         public static final native boolean Control_IsReparentable(int handle);   1258         public static final native boolean Control_IsReparentable(int handle);
1226           1259        
1227         /**   1260         /**
1228          * Sets a new parent on a Control.  This method is expected to work only   1261          * Sets a new parent on a Control.  This method is expected to work only
1229          * if Control_IsReparentable() returns true.   1262          * if Control_IsReparentable() returns true.
1230          *   1263          *
1231          * @param handle the Control handle   1264          * @param handle the Control handle
1232          * @param parentHandle the new parent handle (must be a Composite or Composite subclass)   1265          * @param parentHandle the new parent handle (must be a Composite or Composite subclass)
1233          * @return true if the Control was reparented, false otherwise   1266          * @return true if the Control was reparented, false otherwise
1234          * @see #Control_IsReparentable(int)   1267          * @see #Control_IsReparentable(int)
1235          */   1268          */
1236         public static final native boolean Control_SetParent(int handle, int parentHandle);   1269         public static final native boolean Control_SetParent(int handle, int parentHandle);
1237           1270        
1238         /**   1271         /**
1239          * Returns the red component of a color.  This value should   1272          * Returns the red component of a color.  This value should
1240          * be between 0 and 255 inclusive.   1273          * be between 0 and 255 inclusive.
1241          *   1274          *
1242          * @param handle the color handle   1275          * @param handle the color handle
1243          * @return the color's red component   1276          * @return the color's red component
1244          */   1277          */
1245         public static final native int Color_GetRed(int handle);   1278         public static final native int Color_GetRed(int handle);
1246     1279  
1247         /**   1280         /**
1248          * Returns the green component of a color.  This value should   1281          * Returns the green component of a color.  This value should
1249          * be between 0 and 255 inclusive.   1282          * be between 0 and 255 inclusive.
1250          *   1283          *
1251          * @param handle the color handle   1284          * @param handle the color handle
1252          * @return the color's green component   1285          * @return the color's green component
1253          */   1286          */
1254         public static final native int Color_GetGreen(int handle);   1287         public static final native int Color_GetGreen(int handle);
1255           1288        
1256         /**   1289         /**
1257          * Returns the blue component of a color.  This value should   1290          * Returns the blue component of a color.  This value should
1258          * be between 0 and 255 inclusive.   1291          * be between 0 and 255 inclusive.
1259          *   1292          *
1260          * @param handle the color handle   1293          * @param handle the color handle
1261          * @return the color's blue component   1294          * @return the color's blue component
1262          */   1295          */
1263         public static final native int Color_GetBlue(int handle);   1296         public static final native int Color_GetBlue(int handle);
1264           1297        
1265         /**   1298         /**
1266          * Clears the previously set clipping in the graphics context   1299          * Clears the previously set clipping in the graphics context
1267          * identified by <code>handle</code>.   1300          * identified by <code>handle</code>.
1268          *   1301          *
1269          * @param handle the graphics context handle   1302          * @param handle the graphics context handle
1270          */   1303          */
1271         public static final native void Graphics_ClearClipping(int handle);   1304         public static final native void Graphics_ClearClipping(int handle);
1272           1305        
1273         /**   1306         /**
1274          * Copies the specified region of the graphics context identified   1307          * Copies the specified region of the graphics context identified
1275          * by <code>handle</code>.   1308          * by <code>handle</code>.
1276          *   1309          *
1277          * @param handle the graphics context handle   1310          * @param handle the graphics context handle
1278          * @param x x coordinate of the top left corner of the region to copy   1311          * @param x x coordinate of the top left corner of the region to copy
1279          * @param y y coordinate of the top left corner of the region to copy   1312          * @param y y coordinate of the top left corner of the region to copy
1280          * @param width width of the region to copy   1313          * @param width width of the region to copy
1281          * @param height height of the region to copy   1314          * @param height height of the region to copy
1282          * @param destX destination x coordinate of the copied region   1315          * @param destX destination x coordinate of the copied region
1283          * @param destY destination y coordinate of the copied region   1316          * @param destY destination y coordinate of the copied region
1284          */   1317          */
1285         public static final native void Graphics_CopyArea(int handle, int x, int y, int width, int height, int destX, int destY);   1318         public static final native void Graphics_CopyArea(int handle, int x, int y, int width, int height, int destX, int destY);
1286           1319        
1287         /**   1320         /**
1288          * Draws a rectangle indicating widget focus on the graphics context   1321          * Draws a rectangle indicating widget focus on the graphics context
1289          * identified by <code>handle</code>.   1322          * identified by <code>handle</code>.
1290          * <p>   1323          * <p>
1291          * The rectangle's right edge is at location <code>x + width - 1</code>   1324          * The rectangle's right edge is at location <code>x + width - 1</code>
1292          * on the graphics context. The rectangle's bottom edge is at location   1325          * on the graphics context. The rectangle's bottom edge is at location
1293          * <code>y + height - 1</code> on the graphics context.   1326          * <code>y + height - 1</code> on the graphics context.
1294          * </p>   1327          * </p>
1295          *   1328          *
1296          * @param handle the graphics context handle   1329          * @param handle the graphics context handle
1297          * @param x x coordinate of the top left corner of the focus rectangle   1330          * @param x x coordinate of the top left corner of the focus rectangle
1298          * @param y y coordinate of the top left corner of the focus rectangle   1331          * @param y y coordinate of the top left corner of the focus rectangle
1299          * @param width width of the focus rectangle   1332          * @param width width of the focus rectangle
1300          * @param height height of the focus rectangle   1333          * @param height height of the focus rectangle
1301          */   1334          */
1302         public static final native void Graphics_DrawFocus(int handle, int x, int y, int width, int height);   1335         public static final native void Graphics_DrawFocus(int handle, int x, int y, int width, int height);
1303           1336        
1304         /**   1337         /**
1305          * Draws the specified sub-image within the given bounding rectangle on   1338          * Draws the specified sub-image within the given bounding rectangle on
1306          * the graphics context identified by <code>handle</code>.   1339          * the graphics context identified by <code>handle</code>.
1307          * <p>   1340          * <p>
1308          * The region of the image to draw described by <code>srcX</code>,   1341          * The region of the image to draw described by <code>srcX</code>,
1309          * <code>srcY</code>, <code>srcWidth</code>, <code>srcHeight</code>   1342          * <code>srcY</code>, <code>srcWidth</code>, <code>srcHeight</code>
1310          * must be within the image bounds.   1343          * must be within the image bounds.
1311          * </p>   1344          * </p>
1312          * <p>   1345          * <p>
1313          * The drawn image's right edge is at location <code>destX + destWidth - 1</code>   1346          * The drawn image's right edge is at location <code>destX + destWidth - 1</code>
1314          * on the graphics context. The image's bottom edge is at location   1347          * on the graphics context. The image's bottom edge is at location
1315          * <code>destY + destHeight - 1</code> on the graphics context. The drawn   1348          * <code>destY + destHeight - 1</code> on the graphics context. The drawn
1316          * image region will be stretched or shrunk to fit the destination bounds.   1349          * image region will be stretched or shrunk to fit the destination bounds.
1317          * </p>   1350          * </p>
1318          *   1351          *
1319          * @param handle the graphics context handle   1352          * @param handle the graphics context handle
1320          * @param image image handle   1353          * @param image image handle
1321          * @param srcX x coordinate of the top left corner of the sub-image   1354          * @param srcX x coordinate of the top left corner of the sub-image
1322          * @param srcY y coordinate of the top left corner of the sub-image   1355          * @param srcY y coordinate of the top left corner of the sub-image
1323          * @param srcWidth width of the sub-image to draw   1356          * @param srcWidth width of the sub-image to draw
1324          * @param srcHeight height of the sub-image to draw   1357          * @param srcHeight height of the sub-image to draw
1325          * @param destX x coordinate of the top left corner of the   1358          * @param destX x coordinate of the top left corner of the
1326          *      destination bounding rectangle to draw the sub-image in.   1359          *      destination bounding rectangle to draw the sub-image in.
1327          * @param destY y coordinate of the top left corner of the   1360          * @param destY y coordinate of the top left corner of the
1328          *      destination bounding rectangle to draw the sub-image in.   1361          *      destination bounding rectangle to draw the sub-image in.
1329          * @param destWidth width of the destination bounding rectangle to   1362          * @param destWidth width of the destination bounding rectangle to
1330          *      draw the sub-image in. Must be > 0.   1363          *      draw the sub-image in. Must be > 0.
1331          * @param destHeight height of the destination bounding rectangle to   1364          * @param destHeight height of the destination bounding rectangle to
1332          *      draw the sub-image in. Must be > 0.   1365          *      draw the sub-image in. Must be > 0.
1333          */   1366          */
1334         public static final native void Graphics_DrawImageRegion(int handle, int image, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight);   1367         public static final native void Graphics_DrawImageRegion(int handle, int image, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight);
1335           1368        
1336         /**   1369         /**
1337          * Fills the specified rectangle with the given color on the graphics   1370          * Fills the specified rectangle with the given color on the graphics
1338          * context identified by <code>handle</code>.  The current XOR mode should   1371          * context identified by <code>handle</code>.  The current XOR mode should
1339          * be ignored and specified color should be filled as is.   1372          * be ignored and specified color should be filled as is.
1340          *    1373          * 
1341          * @param handle the graphics context handle   1374          * @param handle the graphics context handle
1342          * @param color the handle of the fill color   1375          * @param color the handle of the fill color
1343          * @param x x coordinate of the top left corner of the fill rectangle   1376          * @param x x coordinate of the top left corner of the fill rectangle
1344          * @param y y coordinate of the top left corner of the fill rectangle   1377          * @param y y coordinate of the top left corner of the fill rectangle
1345          * @param width width of the fill rectangle   1378          * @param width width of the fill rectangle
1346          * @param height height of the fill rectangle   1379          * @param height height of the fill rectangle
1347          */   1380          */
1348         public static final native void Graphics_FillBackground(int handle, int color, int x, int y, int width, int height); <> 1381         // public static final native void Graphics_FillBackground(int handle, int color, int x, int y, int width, int height);
1349         = 1382        
1350         /**   1383         /**
1351          * Sets the line rendering style of the graphics context identified by   1384          * Sets the line rendering style of the graphics context identified by
1352          * <code>handle</code>. All subsequent outline rendering operations will   1385          * <code>handle</code>. All subsequent outline rendering operations will
1353          * use this line style. E.g., line, rectangle, oval.   1386          * use this line style. E.g., line, rectangle, oval.
1354          *   1387          *
1355          * @param handle the graphics context handle   1388          * @param handle the graphics context handle
1356          * @param style one of LINE_SOLID, LINE_DASH, LINE_DOT, LINE_DASHDOT,   1389          * @param style one of LINE_SOLID, LINE_DASH, LINE_DOT, LINE_DASHDOT,
1357          *      LINE_DASHDOTDOT     1390          *      LINE_DASHDOTDOT  
1358          */   1391          */
1359         public static final native void Graphics_SetLineStyle(int handle, int style);   1392         public static final native void Graphics_SetLineStyle(int handle, int style);
1360     1393  
1361         /**   1394         /**
1362          * Sets the line style attributes of the graphics context identified by   1395          * Sets the line style attributes of the graphics context identified by
1363          * <code>handle</code>. All subsequent outline rendering operations will   1396          * <code>handle</code>. All subsequent outline rendering operations will
1364          * use these line styles. E.g., line, rectangle, oval.   1397          * use these line styles. E.g., line, rectangle, oval.
1365          *   1398          *
1366          * <b>Note:</b> for Personal Profile 1.1 and Personal Basis Profile 1.1,   1399          * <b>Note:</b> for Personal Profile 1.1 and Personal Basis Profile 1.1,
1367          * these are optional settings.  Platforms that cannot support these can   1400          * these are optional settings.  Platforms that cannot support these can
1368          * ignore these settings.   1401          * ignore these settings.
1369          *   1402          *
1370          * @param handle the graphics context handle   1403          * @param handle the graphics context handle
1371          * @param endCap the decoration of the ends of a line   1404          * @param endCap the decoration of the ends of a line
1372          * @param lineJoin the decoration used where line segments connect   1405          * @param lineJoin the decoration used where line segments connect
1373          * @param miterLimit the limit to trim the miter join   1406          * @param miterLimit the limit to trim the miter join
1374          */   1407          */
1375         public static final native void Graphics_SetLineNodeStyle(int handle, int endCap, int lineJoin, int miterLimit); <> 1408         // public static final native void Graphics_SetLineNodeStyle(int handle, int endCap, int lineJoin, int miterLimit);
1376         = 1409        
1377         /**   1410         /**
1378          * Sets XOR mode.  If <code>xorMode</code> is true all subsequent   1411          * Sets XOR mode.  If <code>xorMode</code> is true all subsequent
1379          * graphics operations are XORed with the background.   1412          * graphics operations are XORed with the background.
1380          *   1413          *
1381          * @param handle the graphics context handle   1414          * @param handle the graphics context handle
1382          * @param xorMode if true all graphics operations are XORed with the background.   1415          * @param xorMode if true all graphics operations are XORed with the background.
1383          *      If false all graphics operations are drawn normally, erasing the background.   1416          *      If false all graphics operations are drawn normally, erasing the background.
1384          */   1417          */
1385         public static final native void Graphics_SetXORMode(int handle, boolean xorMode);   1418         public static final native void Graphics_SetXORMode(int handle, boolean xorMode);
1386           1419        
1387         /**   1420         /**
1388          * Flips the specified area of the image identified by <code>handle</code>   1421          * Flips the specified area of the image identified by <code>handle</code>
1389          * and returns the resulting image handle. The original image is unchanged.   1422          * and returns the resulting image handle. The original image is unchanged.
1390          *   1423          *
1391          * @param handle image handle   1424          * @param handle image handle
1392          * @param hFlip flip horizontally   1425          * @param hFlip flip horizontally
1393          * @param vFlip flip vertically   1426          * @param vFlip flip vertically
1394          * @param x x coordinate of the area to flip. Must be within the image's bounds.   1427          * @param x x coordinate of the area to flip. Must be within the image's bounds.
1395          * @param y y coordinate of the area to flip. Must be within the image's bounds.   1428          * @param y y coordinate of the area to flip. Must be within the image's bounds.
1396          * @param width width of the area to flip. Must be within the image's bounds.   1429          * @param width width of the area to flip. Must be within the image's bounds.
1397          * @param height height of the area to flip. Must be within the image's bounds.   1430          * @param height height of the area to flip. Must be within the image's bounds.
1398          * @return the flipped sub-image   1431          * @return the flipped sub-image
1399          */   1432          */
1400         public static final native int Image_Flip(int handle, boolean hFlip, boolean vFlip, int x, int y, int width, int height); <> 1433         // public static final native int Image_Flip(int handle, boolean hFlip, boolean vFlip, int x, int y, int width, int height);
1401   = 1434  
1402         /**   1435         /**
1403          * Creates a new image which is a duplicate of the image identified by   1436          * Creates a new image which is a duplicate of the image identified by
1404          * <code>handle</code>.   1437          * <code>handle</code>.
1405          *   1438          *
1406          * @param deviceHandle the device/display handle   1439          * @param deviceHandle the device/display handle
1407          * @param handle image handle   1440          * @param handle image handle
1408          * @return handle to the new image   1441          * @return handle to the new image
1409          */   1442          */
1410         public static final native int Image_NewFromHandle(int deviceHandle, int handle); <> 1443         // public static final native int Image_NewFromHandle(int deviceHandle, int handle);
1411         = 1444        
1412         /**   1445         /**
1413          * Creates a new image loaded from the specified file.   1446          * Creates a new image loaded from the specified file.
1414          * <p>   1447          * <p>
1415          * May result in the following errors:   1448          * May result in the following errors:
1416          * <ul>   1449          * <ul>
1417          * <li>ERROR_IO - I/O error occurred opening or reading the image file</li>   1450          * <li>ERROR_IO - I/O error occurred opening or reading the image file</li>
1418          * <li>ERROR_UNSUPPORTED_DEPTH - the color depth is not supported</li>   1451          * <li>ERROR_UNSUPPORTED_DEPTH - the color depth is not supported</li>
1419          * <li>ERROR_INVALID_IMAGE - an error has occurred while creating the image</li>   1452          * <li>ERROR_INVALID_IMAGE - an error has occurred while creating the image</li>
1420          * </ul>    1453          * </ul> 
1421          * </p>   1454          * </p>
1422          *   1455          *
1423          * @param deviceHandle the device/display handle   1456          * @param deviceHandle the device/display handle
1424          * @param fileName image file to load   1457          * @param fileName image file to load
1425          * @return handle to the new image loaded from the specified file.   1458          * @return handle to the new image loaded from the specified file.
1426          *      0 if the file could not be decoded as an image.   1459          *      0 if the file could not be decoded as an image.
1427          */   1460          */
1428         public static final native int Image_NewFromFile(int deviceHandle, String fileName);   1461         public static final native int Image_NewFromFile(int deviceHandle, String fileName);
1429           1462        
1430         /**   1463         /**
1431          * Sets the specified pixel to the given ARGB color. The new pixel value   1464          * Sets the specified pixel to the given ARGB color. The new pixel value
1432          * is supplied in 0xAARRGGBB format, regardless of the actual color depth   1465          * is supplied in 0xAARRGGBB format, regardless of the actual color depth
1433          * and color model of the image.   1466          * and color model of the image.
1434          * <p>   1467          * <p>
1435          * If the image is using an indexed color model there may not be an exact   1468          * If the image is using an indexed color model there may not be an exact
1436          * match for the specified ARGB color. The color will be matched to a   1469          * match for the specified ARGB color. The color will be matched to a
1437          * close palette index in this case.   1470          * close palette index in this case.
1438          * </p>   1471          * </p>
1439          *   1472          *
1440          * @param handle image handle   1473          * @param handle image handle
1441          * @param x x coordinate of the pixel   1474          * @param x x coordinate of the pixel
1442          * @param y y coordinate of the pixel   1475          * @param y y coordinate of the pixel
1443          * @param argb new pixel value in 0xAARRGGBB format   1476          * @param argb new pixel value in 0xAARRGGBB format
1444          * @see #Image_IsDirect   1477          * @see #Image_IsDirect
1445          */   1478          */
1446         public static final native void Image_SetRGB(int handle, int x, int y, int argb);       <> 1479         // public static final native void Image_SetRGB(int handle, int x, int y, int argb);   
1447         = 1480        
1448         /**   1481         /**
1449          * Returns the direct color model masks of the image identified by   1482          * Returns the direct color model masks of the image identified by
1450          * <code>handle</code>.   1483          * <code>handle</code>.
1451          * <p>   1484          * <p>
1452          * Color masks are used to access individual color components of a   1485          * Color masks are used to access individual color components of a
1453          * direct color pixel. There is one mask for each of the red, green,   1486          * direct color pixel. There is one mask for each of the red, green,
1454          * blue and alpha component of a pixel. The masks for a 32 bit   1487          * blue and alpha component of a pixel. The masks for a 32 bit
1455          * per pixel image for example might be red=0xFF, green=0x00FF,   1488          * per pixel image for example might be red=0xFF, green=0x00FF,
1456          * blue=0x0000FF, alpha=0x000000FF.   1489          * blue=0x0000FF, alpha=0x000000FF.
1457          * </p>   1490          * </p>
1458          * <p>   1491          * <p>
1459          * Example: Given a pixel value, <code>int pixel</code>, returned by   1492          * Example: Given a pixel value, <code>int pixel</code>, returned by
1460          * <code>Image_GetPixelsHighColor()</code> the red color component can be extracted   1493          * <code>Image_GetPixelsHighColor()</code> the red color component can be extracted
1461          * as follows.   1494          * as follows.
1462          * <pre>   1495          * <pre>
1463          *      int[] masks = Image_GetDirectPaletteMasks(imageHandle);   1496          *      int[] masks = Image_GetDirectPaletteMasks(imageHandle);
1464          *      int redMask = masks[OS.PALETTE_MASK_RED];   1497          *      int redMask = masks[OS.PALETTE_MASK_RED];
1465          *      int redShift = getMaskShift(redMask);   1498          *      int redShift = getMaskShift(redMask);
1466          *      int red = (pixel & redMask) >>> redShift;   1499          *      int red = (pixel & redMask) >>> redShift;
1467          * </pre>   1500          * </pre>
1468          * Where getMaskShift is defined separately to return the bit shift   1501          * Where getMaskShift is defined separately to return the bit shift
1469          * necessary to shift the masked bits to the low order bits.   1502          * necessary to shift the masked bits to the low order bits.
1470          * <pre>   1503          * <pre>
1471          *      int getMaskShift(int colorMask) {   1504          *      int getMaskShift(int colorMask) {
1472          *              int shiftCount = 0;   1505          *              int shiftCount = 0;
1473          *              if (mask == 0) return 0;   1506          *              if (mask == 0) return 0;
1474          *              while (((mask >> shiftCount) & 0x1) == 0) {   1507          *              while (((mask >> shiftCount) & 0x1) == 0) {
1475          *                      shiftCount++;   1508          *                      shiftCount++;
1476          *              }   1509          *              }
1477          *              return shiftCount;   1510          *              return shiftCount;
1478          *      }   1511          *      }
1479          * </pre>   1512          * </pre>
1480          * </p>   1513          * </p>
1481          * <p>   1514          * <p>
1482          * May result in the following error:   1515          * May result in the following error:
1483          * <ul>   1516          * <ul>
1484          * <li>ERROR_UNSUPPORTED_DEPTH - direct palette not supported for this color depth</li>   1517          * <li>ERROR_UNSUPPORTED_DEPTH - direct palette not supported for this color depth</li>
1485          * </ul>    1518          * </ul> 
1486          * </p>   1519          * </p>
1487          *   1520          *
1488          * @param handle image handle   1521          * @param handle image handle
1489          * @return (palettemasks) the direct color model masks of the specified   1522          * @return (palettemasks) the direct color model masks of the specified
1490          *      image. Access array elements using the <code>PALETTE_MASK_RED</code>,   1523          *      image. Access array elements using the <code>PALETTE_MASK_RED</code>,
1491          *      <code>PALETTE_MASK_GREEN</code>, <code>PALETTE_MASK_BLUE</code>,   1524          *      <code>PALETTE_MASK_GREEN</code>, <code>PALETTE_MASK_BLUE</code>,
1492          *      <code>PALETTE_MASK_ALPHA</code> constants.   1525          *      <code>PALETTE_MASK_ALPHA</code> constants.
1493          * @see #Image_IsDirect   1526          * @see #Image_IsDirect
1494          */   1527          */
1495         public static final native int[] Image_GetDirectPaletteMasks(int handle);   1528         public static final native int[] Image_GetDirectPaletteMasks(int handle);
1496           1529        
1497         /**   1530         /**
1498          * Returns the indexed palette of the image identified by <code>handle</code>.   1531          * Returns the indexed palette of the image identified by <code>handle</code>.
1499          * The red, green and blue arrays must be big enough to hold all color   1532          * The red, green and blue arrays must be big enough to hold all color
1500          * indices for the image's color depth.   1533          * indices for the image's color depth.
1501          * <p>   1534          * <p>
1502          * May result in the following error:   1535          * May result in the following error:
1503          * <ul>   1536          * <ul>
1504          * <li>ERROR_UNSUPPORTED_DEPTH - indexed palette not supported for this color depth</li>   1537          * <li>ERROR_UNSUPPORTED_DEPTH - indexed palette not supported for this color depth</li>
1505          * </ul>    1538          * </ul> 
1506          * </p>   1539          * </p>
1507          *    1540          * 
1508          * @param handle image handle   1541          * @param handle image handle
1509          * @param red red component of palette colors   1542          * @param red red component of palette colors
1510          * @param green green component of palette colors   1543          * @param green green component of palette colors
1511          * @param blue blue component of palette colors   1544          * @param blue blue component of palette colors
1512          * @see #Image_IsDirect   1545          * @see #Image_IsDirect
1513          */   1546          */
1514         public static final native void Image_GetIndexedPalette(int handle, byte[] red, byte[] green, byte[] blue);   1547         public static final native void Image_GetIndexedPalette(int handle, byte[] red, byte[] green, byte[] blue);
1515         /**   1548         /**
1516          * Returns pixel data for images with 8 bit per pixel color depth or less.   1549          * Returns pixel data for images with 8 bit per pixel color depth or less.
1517          * Each byte array element holds one or more pixels but it never holds   1550          * Each byte array element holds one or more pixels but it never holds
1518          * pixels of two different scanlines. An 8 bpp image has one pixel per byte,   1551          * pixels of two different scanlines. An 8 bpp image has one pixel per byte,
1519          * a 4 bpp image has up to 2 pixels per byte etc. Each pixel is an index   1552          * a 4 bpp image has up to 2 pixels per byte etc. Each pixel is an index
1520          * into the image's indexed color palette (Image_GetIndexedPalette).   1553          * into the image's indexed color palette (Image_GetIndexedPalette).
1521          * <p>   1554          * <p>
1522          * The most significant bit of each scanline in the returned buffer   1555          * The most significant bit of each scanline in the returned buffer
1523          * corresponds to the leftmost pixel on the displayed scanline. Each   1556          * corresponds to the leftmost pixel on the displayed scanline. Each
1524          * scanline in the returned buffer may have unused bits, depending on color   1557          * scanline in the returned buffer may have unused bits, depending on color
1525          * depth and image width. For example in a 3x3 image with 4 bpp color depth   1558          * depth and image width. For example in a 3x3 image with 4 bpp color depth
1526          * the 4 least significant bits of the last byte on each scanline will be   1559          * the 4 least significant bits of the last byte on each scanline will be
1527          * unused. In addition, each scanline may be padded with unused bytes. The   1560          * unused. In addition, each scanline may be padded with unused bytes. The
1528          * number of bytes per scanline is determined by dividing the image size   1561          * number of bytes per scanline is determined by dividing the image size
1529          * (the size of the returned array) by the number of scanlines (height    1562          * (the size of the returned array) by the number of scanlines (height 
1530          * returned by Image_GetBounds()).   1563          * returned by Image_GetBounds()).
1531          * </p>   1564          * </p>
1532          * <p>   1565          * <p>
1533          * May result in the following error:   1566          * May result in the following error:
1534          * <ul>   1567          * <ul>
1535          * <li>ERROR_UNSUPPORTED_DEPTH - the color depth is not supported</li>   1568          * <li>ERROR_UNSUPPORTED_DEPTH - the color depth is not supported</li>
1536          * </ul>   1569          * </ul>
1537          * </p>   1570          * </p>
1538          *   1571          *
1539          * @param handle image handle   1572          * @param handle image handle
1540          * @return pixel data of entire image   1573          * @return pixel data of entire image
1541          * @see #Image_GetIndexedPalette   1574          * @see #Image_GetIndexedPalette
1542          * @ignore non-standard array creation, implementation provided   1575          * @ignore non-standard array creation, implementation provided
1543          */   1576          */
1544         public static final native byte[] Image_GetPixelsLowColor(int handle);   1577         public static final native byte[] Image_GetPixelsLowColor(int handle);
1545         /**   1578         /**
1546          * Returns pixel data for images with more than 8 bit per pixel color depth.   1579          * Returns pixel data for images with more than 8 bit per pixel color depth.
1547          * Each int array element holds exactly one pixel, compatible with the image's   1580          * Each int array element holds exactly one pixel, compatible with the image's
1548          * color model. The color components of each pixel are layed out to match the   1581          * color model. The color components of each pixel are layed out to match the
1549          * direct palette masks returned by <code>Image_GetDirectPaletteMasks()</code>.   1582          * direct palette masks returned by <code>Image_GetDirectPaletteMasks()</code>.
1550          * <p>   1583          * <p>
1551          * There is no scanline pad. Therefore, the size of the returned array equals   1584          * There is no scanline pad. Therefore, the size of the returned array equals
1552          * the image width multiplied with the image height.   1585          * the image width multiplied with the image height.
1553          * </p>   1586          * </p>
1554          * <p>   1587          * <p>
1555          * May result in the following error:   1588          * May result in the following error:
1556          * <ul>   1589          * <ul>
1557          * <li>ERROR_UNSUPPORTED_DEPTH - the color depth is not supported</li>   1590          * <li>ERROR_UNSUPPORTED_DEPTH - the color depth is not supported</li>
1558          * </ul>    1591          * </ul> 
1559          * </p>   1592          * </p>
1560          *   1593          *
1561          * @param handle image handle   1594          * @param handle image handle
1562          * @return pixel data of entire image   1595          * @return pixel data of entire image
1563          * @see #Image_GetDirectPaletteMasks   1596          * @see #Image_GetDirectPaletteMasks
1564          * @ignore non-standard array creation, implementation provided   1597          * @ignore non-standard array creation, implementation provided
1565          */   1598          */
1566         public static final native int[] Image_GetPixelsHighColor(int handle);   1599         public static final native int[] Image_GetPixelsHighColor(int handle);
1567     1600  
1568         /**   1601         /**
1569          * Returns the transparent color of the image identified by   1602          * Returns the transparent color of the image identified by
1570          * <code>handle</code> or -1 if the image has no transparency.   1603          * <code>handle</code> or -1 if the image has no transparency.
1571          *   1604          *
1572          * @param handle image handle   1605          * @param handle image handle
1573          * @return the transparent color of the image. This is a palette index   1606          * @return the transparent color of the image. This is a palette index
1574          *      in the case of paletted images or an RGB color value for direct   1607          *      in the case of paletted images or an RGB color value for direct
1575          *      color images (Image_IsDirect). For RGB values the format matches   1608          *      color images (Image_IsDirect). For RGB values the format matches
1576          *      that returned by <code>Image_GetDirectPaletteMasks()</code>   1609          *      that returned by <code>Image_GetDirectPaletteMasks()</code>
1577          * @see #Image_GetDirectPaletteMasks   1610          * @see #Image_GetDirectPaletteMasks
1578          * @see #Image_GetIndexedPalette   1611          * @see #Image_GetIndexedPalette
1579          * @see #Image_IsDirect   1612          * @see #Image_IsDirect
1580          */   1613          */
1581         public static final native int Image_GetTransparentColor(int handle);   1614         public static final native int Image_GetTransparentColor(int handle);
1582         /**   1615         /**
1583          * Returns whether the image identified by <code>handle</code> uses   1616          * Returns whether the image identified by <code>handle</code> uses
1584          * a direct color model or a paletted color model.   1617          * a direct color model or a paletted color model.
1585          *   1618          *
1586          * @param handle image handle   1619          * @param handle image handle
1587          * @return true - the image uses a direct color model. Pixel values are   1620          * @return true - the image uses a direct color model. Pixel values are
1588          *      RGB values (Red, Green, Blue) with optional alpha channel.   1621          *      RGB values (Red, Green, Blue) with optional alpha channel.
1589          *      false - the image uses a paletted color mode. Pixel values are indices   1622          *      false - the image uses a paletted color mode. Pixel values are indices
1590          *      into a color palette.   1623          *      into a color palette.
1591          * @see #Image_GetDirectPaletteMasks   1624          * @see #Image_GetDirectPaletteMasks
1592          * @see #Image_GetIndexedPalette   1625          * @see #Image_GetIndexedPalette
1593          */   1626          */
1594         public static final native boolean Image_IsDirect(int handle);   1627         public static final native boolean Image_IsDirect(int handle);
1595     1628  
1596         /**   1629         /**
1597          * Creates a new single line text widget.  Valid   1630          * Creates a new single line text widget.  Valid
1598          * styles include STYLE_BORDER | STYLE_LEFT_TO_RIGHT | STYLE_RIGHT_TO_LEFT.   1631          * styles include STYLE_BORDER | STYLE_LEFT_TO_RIGHT | STYLE_RIGHT_TO_LEFT.
1599          *   1632          *
1600          * @param parent parent container of the text field widget   1633          * @param parent parent container of the text field widget
1601          * @param style logical OR of widget styles   1634          * @param style logical OR of widget styles
1602          * @return handle of new text field widget   1635          * @return handle of new text field widget
1603          */   1636          */
1604         public static final native int TextField_New(int parent, int style);   1637         public static final native int TextField_New(int parent, int style);
1605           1638        
1606         /**   1639         /**
1607          * Returns the minimum size required to display a text field with   1640          * Returns the minimum size required to display a text field with
1608          * the desired number of columns.   1641          * the desired number of columns.
1609          *   1642          *
1610          * @param handle the text field handle   1643          * @param handle the text field handle
1611          * @param columns the desired number of columns   1644          * @param columns the desired number of columns
1612          * @return (size)   1645          * @return (size)
1613          */   1646          */
1614         public static final native int[] TextField_GetMinimumSize(int handle, int columns); <> 1647         // public static final native int[] TextField_GetMinimumSize(int handle, int columns);
1615         = 1648        
1616         /**   1649         /**
1617          * Creates a new multiple line text widget.  Valid styles are   1650          * Creates a new multiple line text widget.  Valid styles are
1618          * STYLE_H_SCROLL and STYLE_V_SCROLL. Horizontal and vertical   1651          * STYLE_H_SCROLL and STYLE_V_SCROLL. Horizontal and vertical
1619          * scollbars should always be visible if the STYLE_H_SCROLL and   1652          * scollbars should always be visible if the STYLE_H_SCROLL and
1620          * STYLE_V_SCROLL flags, respectively, are supplied.   1653          * STYLE_V_SCROLL flags, respectively, are supplied.
1621          *   1654          *
1622          * Other valid styles include STYLE_WRAP, STYLE_BORDER,   1655          * Other valid styles include STYLE_WRAP, STYLE_BORDER,
1623          * STYLE_LEFT_TO_RIGHT, and STYLE_RIGHT_TO_LEFT.   1656          * STYLE_LEFT_TO_RIGHT, and STYLE_RIGHT_TO_LEFT.
1624          *   1657          *
1625          * @param parent the parent container of the text area widget   1658          * @param parent the parent container of the text area widget
1626          * @param style a logical OR of styles used for this widget   1659          * @param style a logical OR of styles used for this widget
1627          * @return handle of new text area widget   1660          * @return handle of new text area widget
1628          */   1661          */
1629         public static final native int TextArea_New(int parent, int style);   1662         public static final native int TextArea_New(int parent, int style);
1630           1663        
1631         /**   1664         /**
1632          * Returns the minimum size required to display a text area with   1665          * Returns the minimum size required to display a text area with
1633          * the desired number of rows and columns.   1666          * the desired number of rows and columns.
1634          *   1667          *
1635          * @param handle the text area handle   1668          * @param handle the text area handle
1636          * @param rows the desired number of rows   1669          * @param rows the desired number of rows
1637          * @param columns the desired number of columns   1670          * @param columns the desired number of columns
1638          * @return (size)   1671          * @return (size)
1639          */   1672          */
1640         public static final native int[] TextArea_GetMinimumSize(int handle, int rows, int columns); <> 1673         // public static final native int[] TextArea_GetMinimumSize(int handle, int rows, int columns);
1641         = 1674        
1642         /**   1675         /**
1643          * Returns the index of the first visible line of the text widget.   1676          * Returns the index of the first visible line of the text widget.
1644          * This value is zero indexed.   1677          * This value is zero indexed.
1645          *   1678          *
1646          * @param handle text widget handle   1679          * @param handle text widget handle
1647          * @return topmost visible line number of widget   1680          * @return topmost visible line number of widget
1648          */   1681          */
1649         public static final native int TextArea_GetTopLine(int handle);   1682         public static final native int TextArea_GetTopLine(int handle);
1650           1683        
1651         /**   1684         /**
1652          * Sets the index of the first visible line of the text widget.   1685          * Sets the index of the first visible line of the text widget.
1653          * The line parameter is zero indexed.  If the argument is larger   1686          * The line parameter is zero indexed.  If the argument is larger
1654          * than the total number of lines, the top line will be set to the   1687          * than the total number of lines, the top line will be set to the
1655          * last line.   1688          * last line.
1656          *   1689          *
1657          * @param handle widget handle   1690          * @param handle widget handle
1658          * @param line index of first visible line   1691          * @param line index of first visible line
1659          */   1692          */
1660         public static final native void TextArea_SetTopLine(int handle, int line);        1693         public static final native void TextArea_SetTopLine(int handle, int line);     
1661           1694        
1662         /**   1695         /**
1663          * Returns the number of lines in a text widget.  The result must be greater   1696          * Returns the number of lines in a text widget.  The result must be greater
1664          * than or equal to one.   1697          * than or equal to one.
1665          *   1698          *
1666          * @param handle text widget handle   1699          * @param handle text widget handle
1667          * @return number of lines in the widget   1700          * @return number of lines in the widget
1668          */   1701          */
1669         public static final native int TextArea_GetLineCount(int handle);   1702         public static final native int TextArea_GetLineCount(int handle);
1670           1703        
1671         /**   1704         /**
1672          * Returns the line that the caret is on.  This value is zero indexed.   1705          * Returns the line that the caret is on.  This value is zero indexed.
1673          *   1706          *
1674          * @param handle text widget handle   1707          * @param handle text widget handle
1675          * @return number of line containing the caret   1708          * @return number of line containing the caret
1676          */   1709          */
1677         public static final native int TextArea_GetCaretLineNumber(int handle);   1710         public static final native int TextArea_GetCaretLineNumber(int handle);
1678         /**   1711         /**
1679          * Returns the current text.   1712          * Returns the current text.
1680          *   1713          *
1681          * @param handle the text component handle   1714          * @param handle the text component handle
1682          * @return current text string   1715          * @return current text string
1683          */   1716          */
1684         public static final native String AbstractTextComponent_GetText(int handle);   1717         public static final native String AbstractTextComponent_GetText(int handle);
1685           1718        
1686         /**   1719         /**
1687          * Returns the currently selected text.   1720          * Returns the currently selected text.
1688          *   1721          *
1689          * @param handle the text component handle   1722          * @param handle the text component handle
1690          * @return currently selected text string   1723          * @return currently selected text string
1691          */   1724          */
1692         public static final native String AbstractTextComponent_GetSelectionText(int handle);   1725         public static final native String AbstractTextComponent_GetSelectionText(int handle);
1693           1726        
1694         /**   1727         /**
1695          * Sets the text.  This method does not make a text callback.   1728          * Sets the text.  This method does not make a text callback.
1696          * The reason for this behavior is that some toolkits require   1729          * The reason for this behavior is that some toolkits require
1697          * an event to be created as a result of this call.  In those   1730          * an event to be created as a result of this call.  In those
1698          * cases, the event needs to be created in Java because it is   1731          * cases, the event needs to be created in Java because it is
1699          * possible to call setText before the event dispatch loop is   1732          * possible to call setText before the event dispatch loop is
1700          * running. Unfortunately, some UGL implementations cannot make   1733          * running. Unfortunately, some UGL implementations cannot make
1701          * callbacks without this loop.   1734          * callbacks without this loop.
1702          *   1735          *
1703          * @param handle widget handle   1736          * @param handle widget handle
1704          * @param text new text value   1737          * @param text new text value
1705          */   1738          */
1706         public static final native void AbstractTextComponent_SetText(int handle, String text);   1739         public static final native void AbstractTextComponent_SetText(int handle, String text);
1707           1740        
1708         /**   1741         /**
1709          * Sets a text component's editable flag.  When the flag is false,   1742          * Sets a text component's editable flag.  When the flag is false,
1710          * the text component is considered to be read only.    1743          * the text component is considered to be read only. 
1711          *   1744          *
1712          * @param handle the text component handle   1745          * @param handle the text component handle
1713          * @param editable true for read and write, false for read only   1746          * @param editable true for read and write, false for read only
1714          */   1747          */
1715         public static final native void AbstractTextComponent_SetEditable(int handle, boolean editable);   1748         public static final native void AbstractTextComponent_SetEditable(int handle, boolean editable);
1716           1749        
1717         /**   1750         /**
1718          * Selects all of the text in a text component.   1751          * Selects all of the text in a text component.
1719          *   1752          *
1720          * @param handle the text component handle   1753          * @param handle the text component handle
1721          */   1754          */
1722         public static final native void AbstractTextComponent_SelectAll(int handle);   1755         public static final native void AbstractTextComponent_SelectAll(int handle);
1723           1756        
1724         /**   1757         /**
1725          * Sets the selection between two positions in the text.  The start   1758          * Sets the selection between two positions in the text.  The start
1726          * value should be between 0 and N inclusive, where N is the number   1759          * value should be between 0 and N inclusive, where N is the number
1727          * of characters.  The end value should be greater than or equal to   1760          * of characters.  The end value should be greater than or equal to
1728          * the start value.   1761          * the start value.
1729          *   1762          *
1730          * @param handle the text component handle   1763          * @param handle the text component handle
1731          * @param start the start position   1764          * @param start the start position
1732          * @param end the end position   1765          * @param end the end position
1733          */   1766          */
1734         public static final native void AbstractTextComponent_SetSelection(int handle, int start, int end);   1767         public static final native void AbstractTextComponent_SetSelection(int handle, int start, int end);
1735           1768        
1736         /**   1769         /**
1737          * Returns the number of characters in a text component.   1770          * Returns the number of characters in a text component.
1738          *   1771          *
1739          * @param handle the text component handle   1772          * @param handle the text component handle
1740          * @return number of characters in component   1773          * @return number of characters in component
1741          */   1774          */
1742         public static final native int AbstractTextComponent_GetCharCount(int handle);   1775         public static final native int AbstractTextComponent_GetCharCount(int handle);
1743           1776        
1744         /**   1777         /**
1745          * Sets the caret position of a text component.  The position   1778          * Sets the caret position of a text component.  The position
1746          * value should be between 0 and N inclusive, where N is   1779          * value should be between 0 and N inclusive, where N is
1747          * the number of characters in the component.   1780          * the number of characters in the component.
1748          *   1781          *
1749          * @param handle the text component handle   1782          * @param handle the text component handle
1750          * @param position the index where the caret should be displayed   1783          * @param position the index where the caret should be displayed
1751          */   1784          */
1752         public static final native void AbstractTextComponent_SetCaretPosition(int handle, int position);   1785         public static final native void AbstractTextComponent_SetCaretPosition(int handle, int position);
1753           1786        
1754         /**   1787         /**
1755          * Returns an array containing the start and end positions of the   1788          * Returns an array containing the start and end positions of the
1756          * current selection.   1789          * current selection.
1757          *   1790          *
1758          * @param handle the text component handle   1791          * @param handle the text component handle
1759          * @return (point)   1792          * @return (point)
1760          */   1793          */
1761         public static final native int[] AbstractTextComponent_GetSelection(int handle);   1794         public static final native int[] AbstractTextComponent_GetSelection(int handle);
1762           1795        
1763         /**   1796         /**
1764          * Replaces the text between two caret positions with   1797          * Replaces the text between two caret positions with
1765          * new text.  See AbstractTextComponent_SetCaretPosition   1798          * new text.  See AbstractTextComponent_SetCaretPosition
1766          * for valid start and end values.  Please note that this   1799          * for valid start and end values.  Please note that this
1767          * method does not make a TextModifyCallback.   1800          * method does not make a TextModifyCallback.
1768          *   1801          *
1769          * @param handle the text component handle   1802          * @param handle the text component handle
1770          * @param string the new text   1803          * @param string the new text
1771          * @param start the start position   1804          * @param start the start position
1772          * @param end the end position   1805          * @param end the end position
1773          * @see #AbstractTextComponent_SetCaretPosition(int, int)   1806          * @see #AbstractTextComponent_SetCaretPosition(int, int)
1774          */   1807          */
1775         public static final native void AbstractTextComponent_Replace(int handle, String string, int start, int end);   1808         public static final native void AbstractTextComponent_Replace(int handle, String string, int start, int end);
1776           1809        
1777         /**   1810         /**
1778          * Sets the echo character.  The echo character is   1811          * Sets the echo character.  The echo character is
1779          * displayed instead of the character that was typed.   1812          * displayed instead of the character that was typed.
1780          *   1813          *
1781          * <b>Note:</b> some platforms support a limited set of echo characters.   1814          * <b>Note:</b> some platforms support a limited set of echo characters.
1782          * In these cases, the suggested <code>echo</code> character might   1815          * In these cases, the suggested <code>echo</code> character might
1783          * be ignored for a suitable substitute.   1816          * be ignored for a suitable substitute.
1784          *    1817          * 
1785          * @param handle the text component handle   1818          * @param handle the text component handle
1786          * @param echo the echo character   1819          * @param echo the echo character
1787          */   1820          */
1788         public static final native void AbstractTextComponent_SetEchoChar(int handle, char echo);   1821         public static final native void AbstractTextComponent_SetEchoChar(int handle, char echo);
1789         /**   1822         /**
1790          * Returns the line delimiter used by the text widget.   1823          * Returns the line delimiter used by the text widget.
1791          *   1824          *
1792          * @return the native line delimiter for multi-line text widgets   1825          * @return the native line delimiter for multi-line text widgets
1793          */   1826          */
1794         public static final native String AbstractTextComponent_GetDelimiter();   1827         public static final native String AbstractTextComponent_GetDelimiter();
1795           1828        
1796         /**   1829         /**
1797          * Computes the minimum size of the text component based on the width passed in.  This   1830          * Computes the minimum size of the text component based on the width passed in.  This
1798          * method is used for text components instead of Control_GetMinimumSize because the   1831          * method is used for text components instead of Control_GetMinimumSize because the
1799          * WRAP flag makes desired width important to properly calculate the height.   1832          * WRAP flag makes desired width important to properly calculate the height.
1800          *   1833          *
1801          * @param handle the text component   1834          * @param handle the text component
1802          * @param width the desired width, this value will be -1 if no   1835          * @param width the desired width, this value will be -1 if no
1803          *              desired width is provided.   1836          *              desired width is provided.
1804          * @return (point)   1837          * @return (point)
1805          */   1838          */
1806         public static final native int[] AbstractTextComponent_GetMinimumSize(int handle, int width);   1839         public static final native int[] AbstractTextComponent_GetMinimumSize(int handle, int width);
1807           1840        
1808         /**   1841         /**
1809          * Returns the height of a single line of text.   1842          * Returns the height of a single line of text.
1810          *   1843          *
1811          * @param handle widget handle   1844          * @param handle widget handle
1812          * @return height of text line   1845          * @return height of text line
1813          */   1846          */
1814         public static final native int AbstractTextComponent_GetLineHeight(int handle);   1847         public static final native int AbstractTextComponent_GetLineHeight(int handle);
1815           1848        
1816         /**   1849         /**
1817          * Returns the maximum number of characters that a text widget can hold.   1850          * Returns the maximum number of characters that a text widget can hold.
1818          * This is a default value which is valid when the widget has been   1851          * This is a default value which is valid when the widget has been
1819          * created.  Call AbstractTextComponent_SetTextLimit() to override this value.   1852          * created.  Call AbstractTextComponent_SetTextLimit() to override this value.
1820          *    1853          * 
1821          * @return maximum number of characters that the widget can hold   1854          * @return maximum number of characters that the widget can hold
1822          */   1855          */
1823         public static final native int AbstractTextComponent_GetDefaultTextLimit();   1856         public static final native int AbstractTextComponent_GetDefaultTextLimit();
1824           1857        
1825         /**   1858         /**
1826          * Sets the maximum number of characters that can be held by a text widget.   1859          * Sets the maximum number of characters that can be held by a text widget.
1827          * This value must be greater than zero, and less than or equal to the value   1860          * This value must be greater than zero, and less than or equal to the value
1828          * returned by AbstractTextComponent_GetDefaultTextLimit().   1861          * returned by AbstractTextComponent_GetDefaultTextLimit().
1829          *   1862          *
1830          * @param handle widget handle   1863          * @param handle widget handle
1831          * @param limit set the number of characters limit for the text   1864          * @param limit set the number of characters limit for the text
1832          */   1865          */
1833         public static final native void AbstractTextComponent_SetTextLimit(int handle, int limit);   1866         public static final native void AbstractTextComponent_SetTextLimit(int handle, int limit);
1834     1867  
1835         /**   1868         /**
1836          * Returns the (x,y) position of the caret relative to the text widget's origin.   1869          * Returns the (x,y) position of the caret relative to the text widget's origin.
1837          *   1870          *
1838          * @param handle widget handle   1871          * @param handle widget handle
1839          * @return (point)   1872          * @return (point)
1840          */   1873          */
1841         public static final native int[] AbstractTextComponent_GetCaretPosition(int handle);   1874         public static final native int[] AbstractTextComponent_GetCaretPosition(int handle);
1842           1875        
1843         /**   1876         /**
1844          * Enables or disables the default double-click behavior for the text component.   1877          * Enables or disables the default double-click behavior for the text component.
1845          * This setting is enabled when a text component is created.   1878          * This setting is enabled when a text component is created.
1846          *   1879          *
1847          * @param handle the text component handle   1880          * @param handle the text component handle
1848          * @param enabled true to enable, false to disable   1881          * @param enabled true to enable, false to disable
1849          */   1882          */
1850         public static final native void AbstractTextComponent_SetDoubleClickEnabled(int handle, boolean enabled);   1883         public static final native void AbstractTextComponent_SetDoubleClickEnabled(int handle, boolean enabled);
1851           1884        
1852           1885        
1853         public static final native void AbstractTextComponent_SetVKStatus(boolean show, int handle);   1886         public static final native void AbstractTextComponent_SetVKStatus(boolean show, int handle);
1854           1887        
1855           1888        
1856         /**   1889         /**
1857          * Valid styles include STYLE_WRAP and STYLE_TOP, STYLE_MIDDLE for   1890          * Valid styles include STYLE_WRAP and STYLE_TOP, STYLE_MIDDLE for
1858          * specifying the vertical alignment.   1891          * specifying the vertical alignment.
1859          *   1892          *
1860          * @param parentHandle handle of parent container   1893          * @param parentHandle handle of parent container
1861          * @param style a logical OR of styles for this widget   1894          * @param style a logical OR of styles for this widget
1862          * @return handle of new label widget   1895          * @return handle of new label widget
1863          */   1896          */
1864         public static final native int Label_New(int parentHandle, int style);   1897         public static final native int Label_New(int parentHandle, int style);
1865           1898        
1866         /**   1899         /**
1867          * Valid alignments include STYLE_LEAD, STYLE_TRAIL, STYLE_CENTER.   1900          * Valid alignments include STYLE_LEAD, STYLE_TRAIL, STYLE_CENTER.
1868          *   1901          *
1869          * @param handle widget handle   1902          * @param handle widget handle
1870          * @param alignment new alignment style for label   1903          * @param alignment new alignment style for label
1871          */   1904          */
1872         public static final native void Label_SetAlignment(int handle, int alignment);   1905         public static final native void Label_SetAlignment(int handle, int alignment);
1873           1906        
1874         /**   1907         /**
1875          * Sets the label's text.  The label can have text or an   1908          * Sets the label's text.  The label can have text or an
1876          * image, but not both.   1909          * image, but not both.
1877          *   1910          *
1878          * @param handle the label handle   1911          * @param handle the label handle
1879          * @param string the new text   1912          * @param string the new text
1880          */   1913          */
1881         public static final native void Label_SetText(int handle, String string);   1914         public static final native void Label_SetText(int handle, String string);
1882         /**   1915         /**
1883          * Computes the minimum size of the label based on the width passed in.  This   1916          * Computes the minimum size of the label based on the width passed in.  This
1884          * method is used for labels instead of Control_GetMinimumSize because the   1917          * method is used for labels instead of Control_GetMinimumSize because the
1885          * WRAP flag makes the width important when calculating the height.   1918          * WRAP flag makes the width important when calculating the height.
1886          *   1919          *
1887          * @param handle the label   1920          * @param handle the label
1888          * @param width the desired width, this value will be -1 if no   1921          * @param width the desired width, this value will be -1 if no
1889          *              desired width is provided.   1922          *              desired width is provided.
1890          * @return (point)   1923          * @return (point)
1891          */   1924          */
1892         public static final native int[] Label_GetMinimumSize(int handle, int width);   1925         public static final native int[] Label_GetMinimumSize(int handle, int width);
1893           1926        
1894         /**   1927         /**
1895          * Sets the label's image.  The label can have text or an   1928          * Sets the label's image.  The label can have text or an
1896          * image, but not both.   1929          * image, but not both.
1897          *   1930          *
1898          * @param handle the label handle   1931          * @param handle the label handle
1899          * @param imageHandle the image handle   1932          * @param imageHandle the image handle
1900          */   1933          */
1901         public static final native void Label_SetImage(int handle, int imageHandle);   1934         public static final native void Label_SetImage(int handle, int imageHandle);
1902           1935        
1903           1936        
1904         /**   1937         /**
1905          * Valid styles include STYLE_LEFT_TO_RIGHT, STYLE_RIGHT_TO_LEFT, STYLE_BORDER,   1938          * Valid styles include STYLE_LEFT_TO_RIGHT, STYLE_RIGHT_TO_LEFT, STYLE_BORDER,
1906          * STYLE_V_SCROLL, and STYLE_H_SCROLL.   1939          * STYLE_V_SCROLL, and STYLE_H_SCROLL.
1907          *   1940          *
1908          * @param parentHandle handle of parent widget   1941          * @param parentHandle handle of parent widget
1909          * @param style a logical OR of styles for this widget   1942          * @param style a logical OR of styles for this widget
1910          * @return handle of new List widget   1943          * @return handle of new List widget
1911          */   1944          */
1912         public static final native int List_New(int parentHandle, int style);   1945         public static final native int List_New(int parentHandle, int style);
1913           1946        
1914         /**   1947         /**
1915          * Deselects the item at the given index.   1948          * Deselects the item at the given index.
1916          *   1949          *
1917          * @param handle the list handle   1950          * @param handle the list handle
1918          * @param index the index to be deselected   1951          * @param index the index to be deselected
1919          */   1952          */
1920         public static final native void List_Deselect(int handle, int index);   1953         public static final native void List_Deselect(int handle, int index);
1921     1954  
1922         /**   1955         /**
1923          * Deselects all selected items.   1956          * Deselects all selected items.
1924          *   1957          *
1925          * @param handle the list handle   1958          * @param handle the list handle
1926          */   1959          */
1927         public static final native void List_DeselectAll(int handle);   1960         public static final native void List_DeselectAll(int handle);
1928     1961  
1929         /**   1962         /**
1930          * Returns the number of selected items.   1963          * Returns the number of selected items.
1931          *   1964          *
1932          * @param handle the list handle   1965          * @param handle the list handle
1933          * @return number of selected items   1966          * @return number of selected items
1934          */   1967          */
1935         public static final native int List_GetSelectionCount(int handle);   1968         public static final native int List_GetSelectionCount(int handle);
1936           1969        
1937         /**   1970         /**
1938          * Removes all items from the list.   1971          * Removes all items from the list.
1939          *   1972          *
1940          * @param handle the list handle   1973          * @param handle the list handle
1941          */   1974          */
1942         public static final native void List_RemoveAll(int handle);   1975         public static final native void List_RemoveAll(int handle);
1943           1976        
1944         /**   1977         /**
1945          * Sets the text of the item at the given index.   1978          * Sets the text of the item at the given index.
1946          *   1979          *
1947          * @param handle the list handle   1980          * @param handle the list handle
1948          * @param index the item index   1981          * @param index the item index
1949          * @param string the new text   1982          * @param string the new text
1950          */   1983          */
1951         public static final native void List_SetItem(int handle, int index, String string);   1984         public static final native void List_SetItem(int handle, int index, String string);
1952           1985        
1953         /**   1986         /**
1954          * Returns the selection state of the item at the given index.   1987          * Returns the selection state of the item at the given index.
1955          *   1988          *
1956          * @param handle the list handle   1989          * @param handle the list handle
1957          * @param index the item index   1990          * @param index the item index
1958          * @return true if the item is selected, false otherwise   1991          * @return true if the item is selected, false otherwise
1959          */   1992          */
1960         public static final native boolean List_IsSelected(int handle, int index);   1993         public static final native boolean List_IsSelected(int handle, int index);
1961           1994        
1962         /**   1995         /**
1963          * Selects the item at the given index.   1996          * Selects the item at the given index.
1964          *   1997          *
1965          * @param handle the list handle   1998          * @param handle the list handle
1966          * @param index the item index   1999          * @param index the item index
1967          */   2000          */
1968         public static final native void List_Select(int handle, int index);   2001         public static final native void List_Select(int handle, int index);
1969           2002        
1970         /**   2003         /**
1971          * Returns an array containing the indices of the currently   2004          * Returns an array containing the indices of the currently
1972          * selected items.   2005          * selected items.
1973          *   2006          *
1974          * @param handle the list handle   2007          * @param handle the list handle
1975          * @return indices of selected items   2008          * @return indices of selected items
1976          */   2009          */
1977         public static final native int[] List_GetSelectionIndices(int handle);   2010         public static final native int[] List_GetSelectionIndices(int handle);
1978           2011        
1979         /**   2012         /**
1980          * Returns the index of the currently selected item.  When multiple items   2013          * Returns the index of the currently selected item.  When multiple items
1981          * are selected, the index of the topmost item will be returned.   2014          * are selected, the index of the topmost item will be returned.
1982          *   2015          *
1983          * @param handle the list handle   2016          * @param handle the list handle
1984          * @return the selection index of the list   2017          * @return the selection index of the list
1985          */   2018          */
1986         public static final native int List_GetSelectionIndex(int handle);   2019         public static final native int List_GetSelectionIndex(int handle);
1987           2020        
1988         /**   2021         /**
1989          * Adds an item with the given text at the given index.   2022          * Adds an item with the given text at the given index.
1990          *   2023          *
1991          * @param handle the list handle   2024          * @param handle the list handle
1992          * @param string the item text   2025          * @param string the item text
1993          * @param index the item index   2026          * @param index the item index
1994          */   2027          */
1995         public static final native void List_Add(int handle, String string, int index);   2028         public static final native void List_Add(int handle, String string, int index);
1996     2029  
1997         /**   2030         /**
1998          * Sets the selection mode.  If the mode is true, the list should   2031          * Sets the selection mode.  If the mode is true, the list should
1999          * allow selection of multiple items.  If the mode is false, the   2032          * allow selection of multiple items.  If the mode is false, the
2000          * list should allow selection of only one item.   2033          * list should allow selection of only one item.
2001          *   2034          *
2002          * @param handle the list handle   2035          * @param handle the list handle
2003          * @param multipleMode true for multiple selection, false for single selection   2036          * @param multipleMode true for multiple selection, false for single selection
2004          */   2037          */
2005         public static final native void List_SetMultipleMode(int handle, boolean multipleMode);   2038         public static final native void List_SetMultipleMode(int handle, boolean multipleMode);
2006           2039        
2007         /**   2040         /**
2008          * Sets the index of the item which should appear at the top of the list.   2041          * Sets the index of the item which should appear at the top of the list.
2009          *   2042          *
2010          * @param handle the list handle   2043          * @param handle the list handle
2011          * @param index the item index   2044          * @param index the item index
2012          */   2045          */
2013         public static final native void List_SetTopItemIndex(int handle, int index);   2046         public static final native void List_SetTopItemIndex(int handle, int index);
2014           2047        
2015         /**   2048         /**
2016          * Removes the item at the given index from the list.   2049          * Removes the item at the given index from the list.
2017          *   2050          *
2018          * @param handle the list handle   2051          * @param handle the list handle
2019          * @param index the item index   2052          * @param index the item index
2020          */   2053          */
2021         public static final native void List_Remove(int handle, int index);   2054         public static final native void List_Remove(int handle, int index);
2022     2055  
2023         /**   2056         /**
2024          * Returns the minimum size of the list if it   2057          * Returns the minimum size of the list if it
2025          * had the desired number of rows.   2058          * had the desired number of rows.
2026          *   2059          *
2027          * @param handle the list handle   2060          * @param handle the list handle
2028          * @param rows the desired number of rows   2061          * @param rows the desired number of rows
2029          * @return (size)   2062          * @return (size)
2030          */   2063          */
2031         public static final native int[] List_GetMinimumSize(int handle, int rows);   2064         public static final native int[] List_GetMinimumSize(int handle, int rows);
2032           2065        
2033     2066  
2034     2067  
2035         /**   2068         /**
2036          * Selects the items which have the given indices.   2069          * Selects the items which have the given indices.
2037          *   2070          *
2038          * @param handle the list handle   2071          * @param handle the list handle
2039          * @param indices the indices to select   2072          * @param indices the indices to select
2040          * @param length length of indices array   2073          * @param length length of indices array
2041          */   2074          */
2042         public static final native void List_SelectIndices(int handle, int[] indices, int length); <> 2075         // public static final native void List_SelectIndices(int handle, int[] indices, int length);
2043         = 2076        
2044           2077        
2045     2078  
2046         /**   2079         /**
2047          * Returns the height of an item.  Please note that   2080          * Returns the height of an item.  Please note that
2048          * all items must have the same height.   2081          * all items must have the same height.
2049          *   2082          *
2050          * @param handle the list handle   2083          * @param handle the list handle
2051          * @return item height   2084          * @return item height
2052          */   2085          */
2053         public static final native int List_GetItemHeight(int handle);   2086         public static final native int List_GetItemHeight(int handle);
2054           2087        
2055         /**   2088         /**
2056          * Returns the index of the item which is currently   2089          * Returns the index of the item which is currently
2057          * at the top of the list.   2090          * at the top of the list.
2058          *   2091          *
2059          * @param handle the list handle   2092          * @param handle the list handle
2060          * @return index of topmost item displayed in list   2093          * @return index of topmost item displayed in list
2061          */   2094          */
2062         public static final native int List_GetTopItemIndex(int handle);   2095         public static final native int List_GetTopItemIndex(int handle);
2063           2096        
2064         /**   2097         /**
2065          * Makes the currently selected items visible.  If there   2098          * Makes the currently selected items visible.  If there
2066          * are more items than the list can currently display,   2099          * are more items than the list can currently display,
2067          * make sure that the top selected item is visible.   2100          * make sure that the top selected item is visible.
2068          *   2101          *
2069          * @param handle the list handle   2102          * @param handle the list handle
2070          */   2103          */
2071         public static final native void List_MakeSelectionVisible(int handle);   2104         public static final native void List_MakeSelectionVisible(int handle);
2072           2105        
2073         /**   2106         /**
2074          * Returns the currently focused item, which is not   2107          * Returns the currently focused item, which is not
2075          * necessarily the currently selected item.   2108          * necessarily the currently selected item.
2076          *   2109          *
2077          * @param handle widget handle   2110          * @param handle widget handle
2078          * @return index of currently focused item   2111          * @return index of currently focused item
2079          */   2112          */
2080         public static final native int List_GetCurrentItemIndex(int handle);   2113         public static final native int List_GetCurrentItemIndex(int handle);
2081           2114        
2082           2115        
2083         /**   2116         /**
2084          * Separator styles include STYLE_VERTICAL, STYLE_HORIZONTAL, STYLE_SHADOW_IN,   2117          * Separator styles include STYLE_VERTICAL, STYLE_HORIZONTAL, STYLE_SHADOW_IN,
2085          * STYLE_SHADOW_OUT, STYLE_SHADOW_NONE.   2118          * STYLE_SHADOW_OUT, STYLE_SHADOW_NONE.
2086          *   2119          *
2087          * @param parentHandle handle for parent widget   2120          * @param parentHandle handle for parent widget
2088          * @param style a logical OR of styles for this widget   2121          * @param style a logical OR of styles for this widget
2089          * @return handle of new separator widget   2122          * @return handle of new separator widget
2090          */   2123          */
2091         public static final native int Separator_New(int parentHandle, int style);   2124         public static final native int Separator_New(int parentHandle, int style);
2092         /**   2125         /**
2093          * Create a new PushButton widget   2126          * Create a new PushButton widget
2094          *   2127          *
2095          * @param parentHandle handle of parent widget   2128          * @param parentHandle handle of parent widget
2096          * @param style STYLE_FLAT or 0   2129          * @param style STYLE_FLAT or 0
2097          * @return handle of new widget   2130          * @return handle of new widget
2098          * @uglGroup Button   2131          * @uglGroup Button
2099          */   2132          */
2100         public static final native int PushButton_New(int parentHandle, int style);   2133         public static final native int PushButton_New(int parentHandle, int style);
2101     2134  
2102         /**   2135         /**
2103          * Create a new RadioButton widget   2136          * Create a new RadioButton widget
2104          *   2137          *
2105          * @param parentHandle handle of parent widget   2138          * @param parentHandle handle of parent widget
2106          * @param style STYLE_FLAT or 0   2139          * @param style STYLE_FLAT or 0
2107          * @return handle of new widget   2140          * @return handle of new widget
2108          * @uglGroup Button   2141          * @uglGroup Button
2109          */   2142          */
2110         public static final native int RadioButton_New(int parentHandle, int style);   2143         public static final native int RadioButton_New(int parentHandle, int style);
2111         /**   2144         /**
2112          * Create a new ToggleButton widget   2145          * Create a new ToggleButton widget
2113          *   2146          *
2114          * @param parentHandle handle of parent widget   2147          * @param parentHandle handle of parent widget
2115          * @param style STYLE_FLAT or 0   2148          * @param style STYLE_FLAT or 0
2116          * @return handle of new widget   2149          * @return handle of new widget
2117          * @uglGroup Button   2150          * @uglGroup Button
2118          */   2151          */
2119         public static final native int ToggleButton_New(int parentHandle, int style);   2152         public static final native int ToggleButton_New(int parentHandle, int style);
2120         /**   2153         /**
2121          * Returns the horizontal adjustable.  The returned adjustable must implement   2154          * Returns the horizontal adjustable.  The returned adjustable must implement
2122          * the Adjustable interface, and it must be a Widget subclass.   2155          * the Adjustable interface, and it must be a Widget subclass.
2123          * Note this will not be called for Scrollables created without STYLE_H_SCROLL.   2156          * Note this will not be called for Scrollables created without STYLE_H_SCROLL.
2124          *   2157          *
2125          * @param handle the scrollable handle   2158          * @param handle the scrollable handle
2126          * @return horizontal adjustable handle   2159          * @return horizontal adjustable handle
2127          */   2160          */
2128         public static final native int Scrollable_GetHorizontalBar(int handle);   2161         public static final native int Scrollable_GetHorizontalBar(int handle);
2129           2162        
2130         /**   2163         /**
2131          * Returns the vertical adjustable.  The returned adjustable must implement   2164          * Returns the vertical adjustable.  The returned adjustable must implement
2132          * the Adjustable interface, and it must be a Widget subclass.   2165          * the Adjustable interface, and it must be a Widget subclass.
2133          * Note this will not be called for Scrollables created without STYLE_V_SCROLL.   2166          * Note this will not be called for Scrollables created without STYLE_V_SCROLL.
2134          *   2167          *
2135          * @param handle the scrollable handle   2168          * @param handle the scrollable handle
2136          * @return vertical adjustable handle   2169          * @return vertical adjustable handle
2137          */   2170          */
2138         public static final native int Scrollable_GetVerticalBar(int handle);   2171         public static final native int Scrollable_GetVerticalBar(int handle);
2139           2172        
2140         /**   2173         /**
2141          * Creates a new scrollbar.  The scrollbar must implement the   2174          * Creates a new scrollbar.  The scrollbar must implement the
2142          * Adjustable interface.   2175          * Adjustable interface.
2143          *   2176          *
2144          * @param parentHandle the parent handle   2177          * @param parentHandle the parent handle
2145          * @return handle of new widget   2178          * @return handle of new widget
2146          */   2179          */
2147         public static final native int Scrollbar_New(int parentHandle);   2180         public static final native int Scrollbar_New(int parentHandle);
2148           2181        
2149         /**   2182         /**
2150          * Returns the bounding rectangle of the adjustable, relative to the parent.   2183          * Returns the bounding rectangle of the adjustable, relative to the parent.
2151          *   2184          *
2152          * @param handle the handle of the scrollable (the container)   2185          * @param handle the handle of the scrollable (the container)
2153          * @param adjustableHandle the handle of the adjustable (the scrollbar)   2186          * @param adjustableHandle the handle of the adjustable (the scrollbar)
2154          * @return (rect)   2187          * @return (rect)
2155          */   2188          */
2156         public static final native int[] Scrollable_GetAdjustableBounds(int handle, int adjustableHandle);   2189         public static final native int[] Scrollable_GetAdjustableBounds(int handle, int adjustableHandle);
2157           2190        
2158         /**   2191         /**
2159          * Enable or disable a Scrollable's Adjustable.   2192          * Enable or disable a Scrollable's Adjustable.
2160          *   2193          *
2161          * @param handle the handle of the scrollable (the container)   2194          * @param handle the handle of the scrollable (the container)
2162          * @param adjustableHandle the handle of the adjustable (the scrollbar)   2195          * @param adjustableHandle the handle of the adjustable (the scrollbar)
2163          * @param enabled a boolean indicating whether the adjustable should be enabled   2196          * @param enabled a boolean indicating whether the adjustable should be enabled
2164          */   2197          */
2165         public static final native void Scrollable_SetAdjustableEnabled(int handle, int adjustableHandle, boolean enabled);   2198         public static final native void Scrollable_SetAdjustableEnabled(int handle, int adjustableHandle, boolean enabled);
2166           2199        
2167         /**   2200         /**
2168          * Show or hide a Scrollable's Adjustable.   2201          * Show or hide a Scrollable's Adjustable.
2169          *   2202          *
2170          * @param handle the handle of the scrollable (the container)   2203          * @param handle the handle of the scrollable (the container)
2171          * @param adjustableHandle the handle of the adjustable (the scrollbar)   2204          * @param adjustableHandle the handle of the adjustable (the scrollbar)
2172          * @param visible a boolean indicating whether the adjustable should be visible   2205          * @param visible a boolean indicating whether the adjustable should be visible
2173          */   2206          */
2174         public static final native void Scrollable_SetAdjustableVisible(int handle, int adjustableHandle, boolean visible);   2207         public static final native void Scrollable_SetAdjustableVisible(int handle, int adjustableHandle, boolean visible);
2175           2208        
2176         /**   2209         /**
2177          * Returns the scrollbar's maximum value.   2210          * Returns the scrollbar's maximum value.
2178          *   2211          *
2179          * @param handle the scrollbar handle   2212          * @param handle the scrollbar handle
2180          * @return maximum value of scrollbar   2213          * @return maximum value of scrollbar
2181          */   2214          */
2182         public static final native int Adjustable_GetMaximum(int handle);   2215         public static final native int Adjustable_GetMaximum(int handle);
2183     2216  
2184         /**   2217         /**
2185          * Returns the scrollbar's minimum value.   2218          * Returns the scrollbar's minimum value.
2186          *   2219          *
2187          * @param handle the scrollbar handle   2220          * @param handle the scrollbar handle
2188          * @return minimum value of scrollbar   2221          * @return minimum value of scrollbar
2189          */   2222          */
2190         public static final native int Adjustable_GetMinimum(int handle);   2223         public static final native int Adjustable_GetMinimum(int handle);
2191     2224  
2192         /**   2225         /**
2193          * Returns the scrollbar's current value.   2226          * Returns the scrollbar's current value.
2194          *   2227          *
2195          * @param handle the scrollbar handle   2228          * @param handle the scrollbar handle
2196          * @return current value of scrollbar   2229          * @return current value of scrollbar
2197          */   2230          */
2198         public static final native int Adjustable_GetValue(int handle);   2231         public static final native int Adjustable_GetValue(int handle);
2199     2232  
2200         /**   2233         /**
2201          * Returns the scrollbar's visible amount.  This is also   2234          * Returns the scrollbar's visible amount.  This is also
2202          * known as the thumb size.   2235          * known as the thumb size.
2203          *   2236          *
2204          * @param handle the scrollbar handle   2237          * @param handle the scrollbar handle
2205          * @return size of scrollbar thumb   2238          * @return size of scrollbar thumb
2206          */   2239          */
2207         public static final native int Adjustable_GetVisibleAmount(int handle);   2240         public static final native int Adjustable_GetVisibleAmount(int handle);
2208           2241        
2209         /**   2242         /**
2210          * Sets the scrollbar's block increment.   2243          * Sets the scrollbar's block increment.
2211          *   2244          *
2212          * @param handle the scrollbar handle   2245          * @param handle the scrollbar handle
2213          * @param value the block increment value   2246          * @param value the block increment value
2214          */   2247          */
2215         public static final native void Adjustable_SetBlockIncrement(int handle, int value);   2248         public static final native void Adjustable_SetBlockIncrement(int handle, int value);
2216           2249        
2217         /**   2250         /**
2218          * Sets the scrollbar's maximum value.   2251          * Sets the scrollbar's maximum value.
2219          *   2252          *
2220          * @param handle the scrollbar handle   2253          * @param handle the scrollbar handle
2221          * @param value the maximum value   2254          * @param value the maximum value
2222          */   2255          */
2223         public static final native void Adjustable_SetMaximum(int handle, int value);   2256         public static final native void Adjustable_SetMaximum(int handle, int value);
2224           2257        
2225         /**   2258         /**
2226          * Sets the scrollbar's minimum value.   2259          * Sets the scrollbar's minimum value.
2227          *   2260          *
2228          * @param handle the scrollbar handle   2261          * @param handle the scrollbar handle
2229          * @param value the minimum value   2262          * @param value the minimum value
2230          */   2263          */
2231         public static final native void Adjustable_SetMinimum(int handle, int value);   2264         public static final native void Adjustable_SetMinimum(int handle, int value);
2232           2265        
2233         /**   2266         /**
2234          * Sets the scrollbar's orientation.   2267          * Sets the scrollbar's orientation.
2235          *   2268          *
2236          * @param handle the scrollbar handle   2269          * @param handle the scrollbar handle
2237          * @param orientation either STYLE_HORIZONTAL or STYLE_VERTICAL   2270          * @param orientation either STYLE_HORIZONTAL or STYLE_VERTICAL
2238          */   2271          */
2239         public static final native void Scrollbar_SetOrientation(int handle, int orientation);   2272         public static final native void Scrollbar_SetOrientation(int handle, int orientation);
2240           2273        
2241         /**   2274         /**
2242          * Sets the scrollbar's unit increment.   2275          * Sets the scrollbar's unit increment.
2243          *   2276          *
2244          * @param handle the scrollbar handle   2277          * @param handle the scrollbar handle
2245          * @param value the unit increment value   2278          * @param value the unit increment value
2246          */   2279          */
2247         public static final native void Adjustable_SetUnitIncrement(int handle, int value);   2280         public static final native void Adjustable_SetUnitIncrement(int handle, int value);
2248           2281        
2249         /**   2282         /**
2250          * Sets the scrollbar's current value.   2283          * Sets the scrollbar's current value.
2251          *   2284          *
2252          * @param handle the scrollbar handle   2285          * @param handle the scrollbar handle
2253          * @param value the current value of the scrollbar   2286          * @param value the current value of the scrollbar
2254          */   2287          */
2255         public static final native void Adjustable_SetValue(int handle, int value);   2288         public static final native void Adjustable_SetValue(int handle, int value);
2256           2289        
2257         /**   2290         /**
2258          * Sets the scrollbar's visible amount.   2291          * Sets the scrollbar's visible amount.
2259          *   2292          *
2260          * @param handle the scrollbar handle   2293          * @param handle the scrollbar handle
2261          * @param value the visible amount of the scrollbar   2294          * @param value the visible amount of the scrollbar
2262          */   2295          */
2263         public static final native void Adjustable_SetVisibleAmount(int handle, int value);   2296         public static final native void Adjustable_SetVisibleAmount(int handle, int value);
2264           2297        
2265         /**   2298         /**
2266          * Returns the scrollbar's unit increment.   2299          * Returns the scrollbar's unit increment.
2267          *   2300          *
2268          * @param handle the scrollbar handle   2301          * @param handle the scrollbar handle
2269          * @return scrollbar's unit increment   2302          * @return scrollbar's unit increment
2270          */   2303          */
2271         public static final native int Adjustable_GetUnitIncrement(int handle);   2304         public static final native int Adjustable_GetUnitIncrement(int handle);
2272           2305        
2273         /**   2306         /**
2274          * Returns the scrollbar's block increment.   2307          * Returns the scrollbar's block increment.
2275          *   2308          *
2276          * @param handle the scrollbar handle   2309          * @param handle the scrollbar handle
2277          * @return block increment for the scrollbar   2310          * @return block increment for the scrollbar
2278          */   2311          */
2279         public static final native int Adjustable_GetBlockIncrement(int handle);   2312         public static final native int Adjustable_GetBlockIncrement(int handle);
2280     2313  
2281         /**   2314         /**
2282          * Returns the text that is on the system clipboard.   2315          * Returns the text that is on the system clipboard.
2283          *   2316          *
2284          * @return text from system clipboard   2317          * @return text from system clipboard
2285          */   2318          */
2286         public static final native String Clipboard_GetText();   2319         public static final native String Clipboard_GetText();
2287           2320        
2288         /**   2321         /**
2289          * Put the text on the system clipboard.   2322          * Put the text on the system clipboard.
2290          *   2323          *
2291          * @param text new text to be stored on the clipboard   2324          * @param text new text to be stored on the clipboard
2292          */   2325          */
2293         public static final native void Clipboard_SetText(String text);   2326         public static final native void Clipboard_SetText(String text);
2294           2327        
2295         /**   2328         /**
2296          * Creates a new choice widget.   2329          * Creates a new choice widget.
2297          *   2330          *
2298          * @param parentHandle handle of the parent container   2331          * @param parentHandle handle of the parent container
2299          * @return handle of new widget   2332          * @return handle of new widget
2300          */   2333          */
2301         public static final native int Choice_New(int parentHandle); <> 2334         // public static final native int Choice_New(int parentHandle);
2302         = 2335        
2303         /**   2336         /**
2304          * Returns the index of the currently selected item.  If no item   2337          * Returns the index of the currently selected item.  If no item
2305          * is selected, return -1.   2338          * is selected, return -1.
2306          *   2339          *
2307          * @param handle widget handle   2340          * @param handle widget handle
2308          * @return index of currently selected item or -1   2341          * @return index of currently selected item or -1
2309          */   2342          */
2310         public static final native int Choice_GetSelectedItemIndex(int handle);   2343         public static final native int Choice_GetSelectedItemIndex(int handle);
2311           2344        
2312         /**   2345         /**
2313          * Adds an item at the given index.  The index must be in the range 0 to   2346          * Adds an item at the given index.  The index must be in the range 0 to
2314          * N inclusive, where N is the number of items in the list.   2347          * N inclusive, where N is the number of items in the list.
2315          *    2348          * 
2316          * @param handle widget handle   2349          * @param handle widget handle
2317          * @param string item to be added   2350          * @param string item to be added
2318          * @param index insertion index   2351          * @param index insertion index
2319          */   2352          */
2320         public static final native void Choice_AddItem(int handle, String string, int index);   2353         public static final native void Choice_AddItem(int handle, String string, int index);
2321     2354  
2322         /**   2355         /**
2323          * Removes the item at the given index from the list.  The index must be in   2356          * Removes the item at the given index from the list.  The index must be in
2324          * the range 0 to (N - 1) inclusive, where N is the number of items in the list.   2357          * the range 0 to (N - 1) inclusive, where N is the number of items in the list.
2325          *   2358          *
2326          * @param handle widget handle   2359          * @param handle widget handle
2327          * @param index index of item to be removed   2360          * @param index index of item to be removed
2328          */   2361          */
2329         public static final native void Choice_RemoveItem(int handle, int index);   2362         public static final native void Choice_RemoveItem(int handle, int index);
2330           2363        
2331         /**   2364         /**
2332          * Selects the item at the given index.  Any previous selection will be   2365          * Selects the item at the given index.  Any previous selection will be
2333          * cleared first.  The index must be in the range 0 to (N - 1) inclusive,   2366          * cleared first.  The index must be in the range 0 to (N - 1) inclusive,
2334          * where N is the number of items in the list.   2367          * where N is the number of items in the list.
2335          *   2368          *
2336          * @param handle widget handle   2369          * @param handle widget handle
2337          * @param index index of item to be selected   2370          * @param index index of item to be selected
2338          */   2371          */
2339         public static final native void Choice_SelectItem(int handle, int index);   2372         public static final native void Choice_SelectItem(int handle, int index);
2340           2373        
2341         /**   2374         /**
2342          * Removes all items from the list.   2375          * Removes all items from the list.
2343          *   2376          *
2344          * @param handle widget handle   2377          * @param handle widget handle
2345          */   2378          */
2346         public static final native void Choice_RemoveAllItems(int handle);   2379         public static final native void Choice_RemoveAllItems(int handle);
2347     2380  
2348         /**   2381         /**
2349          * Creates a new menu bar for the shell.   2382          * Creates a new menu bar for the shell.
2350          *   2383          *
2351          * @param shellHandle the shell which owns the new menu bar   2384          * @param shellHandle the shell which owns the new menu bar
2352          * @return handle of new widget   2385          * @return handle of new widget
2353          * @uglGroup Menu   2386          * @uglGroup Menu
2354          */   2387          */
2355         public static final native int MenuBar_New(int shellHandle);   2388         public static final native int MenuBar_New(int shellHandle);
2356           2389        
2357         /**   2390         /**
2358          * Creates a new popup menu for the shell.   2391          * Creates a new popup menu for the shell.
2359          *   2392          *
2360          * @param shellHandle the shell which owns the new popup menu   2393          * @param shellHandle the shell which owns the new popup menu
2361          * @return handle of new widget   2394          * @return handle of new widget
2362          * @uglGroup Menu   2395          * @uglGroup Menu
2363          */       2396          */    
2364         public static final native int PopupMenu_New(int shellHandle);   2397         public static final native int PopupMenu_New(int shellHandle);
2365           2398        
2366         /**   2399         /**
2367          * Creates a new drop down menu for the shell.   2400          * Creates a new drop down menu for the shell.
2368          *   2401          *
2369          * @param shellHandle the shell which owns the new drop down menu   2402          * @param shellHandle the shell which owns the new drop down menu
2370          * @return handle of new widget   2403          * @return handle of new widget
2371          * @uglGroup Menu   2404          * @uglGroup Menu
2372          */   2405          */
2373         public static final native int DropDownMenu_New(int shellHandle);   2406         public static final native int DropDownMenu_New(int shellHandle);
2374         /**   2407         /**
2375          * Sets the font of a menu.   2408          * Sets the font of a menu.
2376          *   2409          *
2377          * @param menuHandle the menu   2410          * @param menuHandle the menu
2378          * @param fontHandle the font   2411          * @param fontHandle the font
2379          */   2412          */
2380         public static final native void Menu_SetFont(int menuHandle, int fontHandle); <> 2413         // public static final native void Menu_SetFont(int menuHandle, int fontHandle);
2381         /** = 2414         /**
2382          * Shows the popup menu identified by <code>popupMenuHandle</code>   2415          * Shows the popup menu identified by <code>popupMenuHandle</code>
2383          * at the specified location.   2416          * at the specified location.
2384          *   2417          *
2385          * @param popupMenuHandle popup menu handle   2418          * @param popupMenuHandle popup menu handle
2386          * @param x x coordinate of the menu location, relative to the owning shell   2419          * @param x x coordinate of the menu location, relative to the owning shell
2387          * @param y y coordinate of the menu location, relative to the owning shell   2420          * @param y y coordinate of the menu location, relative to the owning shell
2388          * @uglGroup Menu   2421          * @uglGroup Menu
2389          */       2422          */    
2390         public static final native void PopupMenu_Show(int popupMenuHandle, int x, int y);   2423         public static final native void PopupMenu_Show(int popupMenuHandle, int x, int y);
2391           2424        
2392         /**   2425         /**
2393          * Enables or disables a menu item.   2426          * Enables or disables a menu item.
2394          *   2427          *
2395          * @param menuItemHandle the menu item handle   2428          * @param menuItemHandle the menu item handle
2396          * @param enabled the enablement state of the menu item   2429          * @param enabled the enablement state of the menu item
2397          * @uglGroup MenuItem   2430          * @uglGroup MenuItem
2398          */       2431          */    
2399         public static final native void AbstractMenuItem_SetEnabled(int menuItemHandle, boolean enabled);   2432         public static final native void AbstractMenuItem_SetEnabled(int menuItemHandle, boolean enabled);
2400           2433        
2401         /**   2434         /**
2402          * Creates a new push menu item.    2435          * Creates a new push menu item. 
2403          *   2436          *
2404          * @param menuHandle the menu handle which contains this new item   2437          * @param menuHandle the menu handle which contains this new item
2405          * @param index the index inside menu where this new item is placed   2438          * @param index the index inside menu where this new item is placed
2406          * @return handle of new widget   2439          * @return handle of new widget
2407          * @uglGroup MenuItem   2440          * @uglGroup MenuItem
2408          */       2441          */    
2409         public static final native int PushMenuItem_New(int menuHandle, int index);   2442         public static final native int PushMenuItem_New(int menuHandle, int index);
2410           2443        
2411         /**   2444         /**
2412          * Sets the descriptive text and the accelerator text of a LabeledMenuItem.   2445          * Sets the descriptive text and the accelerator text of a LabeledMenuItem.
2413          *   2446          *
2414          * The descriptive text may contain mnemonic characters, which are preceded   2447          * The descriptive text may contain mnemonic characters, which are preceded
2415          * by the '&amp;' character.  In order to add a '&amp;' character to the text,   2448          * by the '&amp;' character.  In order to add a '&amp;' character to the text,
2416          * it should be escaped with another '&amp;' character.    2449          * it should be escaped with another '&amp;' character. 
2417          *   2450          *
2418          * The accelerator text is displayed next to the descriptive text in the item,   2451          * The accelerator text is displayed next to the descriptive text in the item,
2419          * and usually describes the accelerator, if one is being used.  Note that the   2452          * and usually describes the accelerator, if one is being used.  Note that the
2420          * accelerator text does not actually set the accelerator.  That is done by   2453          * accelerator text does not actually set the accelerator.  That is done by
2421          * LabeledMenuItem_SetAccelerator.   2454          * LabeledMenuItem_SetAccelerator.
2422          *   2455          *
2423          * @param menuItemHandle the menu item handle   2456          * @param menuItemHandle the menu item handle
2424          * @param text the descriptive text   2457          * @param text the descriptive text
2425          * @param accelText the accelerator text   2458          * @param accelText the accelerator text
2426          * @uglGroup MenuItem   2459          * @uglGroup MenuItem
2427          */       2460          */    
2428         public static final native void LabeledMenuItem_SetText(int menuItemHandle, String text, String accelText);   2461         public static final native void LabeledMenuItem_SetText(int menuItemHandle, String text, String accelText);
2429         /**   2462         /**
2430          * Sets the font of a LabeledMenuItem.   2463          * Sets the font of a LabeledMenuItem.
2431          *   2464          *
2432          * @param menuItemHandle the menu item handle   2465          * @param menuItemHandle the menu item handle
2433          * @param fontHandle the font handle   2466          * @param fontHandle the font handle
2434          * @uglGroup MenuItem   2467          * @uglGroup MenuItem
2435          */       2468          */    
2436         public static final native void LabeledMenuItem_SetFont(int menuItemHandle, int fontHandle); <> 2469         // public static final native void LabeledMenuItem_SetFont(int menuItemHandle, int fontHandle);
2437         = 2470        
2438         /**   2471         /**
2439          * Sets the image which is displayed on a LabeledMenuItem.  If the   2472          * Sets the image which is displayed on a LabeledMenuItem.  If the
2440          * imageHandle is zero, remove the current image.   2473          * imageHandle is zero, remove the current image.
2441          *   2474          *
2442          * @param menuItemHandle the menu item handle   2475          * @param menuItemHandle the menu item handle
2443          * @param imageHandle the image handle   2476          * @param imageHandle the image handle
2444          * @uglGroup MenuItem   2477          * @uglGroup MenuItem
2445          */       2478          */    
2446         public static final native void LabeledMenuItem_SetImage(int menuItemHandle, int imageHandle);   2479         public static final native void LabeledMenuItem_SetImage(int menuItemHandle, int imageHandle);
2447         /**   2480         /**
2448          * Sets the accelerator for a LabeledMenuItem.  The accelerator is a bitwise   2481          * Sets the accelerator for a LabeledMenuItem.  The accelerator is a bitwise
2449          * OR of MODIFIER_MASK constants and keycode values.  The MODIFIER_MASK constants   2482          * OR of MODIFIER_MASK constants and keycode values.  The MODIFIER_MASK constants
2450          * are placed in the upper 16 bits of the value.  The keycode is in the lower   2483          * are placed in the upper 16 bits of the value.  The keycode is in the lower
2451          * 16 bits.  Valid keycodes are either KEYCODE constants or 16-bit char values.   2484          * 16 bits.  Valid keycodes are either KEYCODE constants or 16-bit char values.
2452          *   2485          *
2453          * @param menuItemHandle the menu item handle   2486          * @param menuItemHandle the menu item handle
2454          * @param accelerator the accelerator   2487          * @param accelerator the accelerator
2455          * @uglGroup MenuItem   2488          * @uglGroup MenuItem
2456          */       2489          */    
2457         public static final native void LabeledMenuItem_SetAccelerator(int menuItemHandle, int accelerator);   2490         public static final native void LabeledMenuItem_SetAccelerator(int menuItemHandle, int accelerator);
2458     2491  
2459         /**   2492         /**
2460          * Creates a new menu item which has a selection state, similar to a checkbox.   2493          * Creates a new menu item which has a selection state, similar to a checkbox.
2461          *   2494          *
2462          * @param menuHandle the menu handle which contains this new item   2495          * @param menuHandle the menu handle which contains this new item
2463          * @param index the index inside menu where this new item is placed   2496          * @param index the index inside menu where this new item is placed
2464          * @param style either STYLE_RADIO or STYLE_CHECK   2497          * @param style either STYLE_RADIO or STYLE_CHECK
2465          * @return handle of new widget   2498          * @return handle of new widget
2466          * @uglGroup MenuItem   2499          * @uglGroup MenuItem
2467          */       2500          */    
2468         public static final native int StateMenuItem_New(int menuHandle, int index, int style);   2501         public static final native int StateMenuItem_New(int menuHandle, int index, int style);
2469           2502        
2470         /**   2503         /**
2471          * Sets the selection state of a state menu item.   2504          * Sets the selection state of a state menu item.
2472          *   2505          *
2473          * @param statefulMenuItemHandle the menu item handle   2506          * @param statefulMenuItemHandle the menu item handle
2474          * @param selected the new selection state   2507          * @param selected the new selection state
2475          * @uglGroup MenuItem   2508          * @uglGroup MenuItem
2476          */       2509          */    
2477         public static final native void StateMenuItem_SetSelection(int statefulMenuItemHandle, boolean selected);   2510         public static final native void StateMenuItem_SetSelection(int statefulMenuItemHandle, boolean selected);
    <> 2511  
      2512         /**
      2513          * Sets the disableAutoSelection state of a state menu item.
      2514          *
      2515          * @param statefulMenuItemHandle the menu item handle
      2516          * @param disableAutoSelection the new disableAutoSelection state
      2517          * @uglGroup MenuItem
      2518          */    
      2519         public static final native void StateMenuItem_DisableAutoSelection(int statefulMenuItemHandle, boolean disableAutoSelection);
2478         = 2520        
2479         /**   2521         /**
2480          * Creates a new cascade menu item, and places it at the given   2522          * Creates a new cascade menu item, and places it at the given
2481          * index of the menu.  If the index value is -1, the menu should   2523          * index of the menu.  If the index value is -1, the menu should
2482          * append the new item.   2524          * append the new item.
2483          *   2525          *
2484          * @param menuHandle the menu handle which contains this new item   2526          * @param menuHandle the menu handle which contains this new item
2485          * @param index the index inside menu where this new item is placed   2527          * @param index the index inside menu where this new item is placed
2486          * @return handle of new widget   2528          * @return handle of new widget
2487          * @uglGroup MenuItem   2529          * @uglGroup MenuItem
2488          */       2530          */    
2489         public static final native int CascadeMenuItem_New(int menuHandle, int index);   2531         public static final native int CascadeMenuItem_New(int menuHandle, int index);
2490           2532        
2491         /**   2533         /**
2492          * Sets the submenu of a cascade menu item.   2534          * Sets the submenu of a cascade menu item.
2493          *   2535          *
2494          * @param cascadeMenuItemHandle the cascade menu item   2536          * @param cascadeMenuItemHandle the cascade menu item
2495          * @param dropDownMenuHandle the submenu, or 0 if the current menu   2537          * @param dropDownMenuHandle the submenu, or 0 if the current menu
2496          *                           should be removed.    2538          *                           should be removed. 
2497          * @uglGroup MenuItem   2539          * @uglGroup MenuItem
2498          */       2540          */    
2499         public static final native void CascadeMenuItem_SetMenu(int cascadeMenuItemHandle, int dropDownMenuHandle);   2541         public static final native void CascadeMenuItem_SetMenu(int cascadeMenuItemHandle, int dropDownMenuHandle);
2500           2542        
2501         /**   2543         /**
2502          * Creates a new separator menu item.   2544          * Creates a new separator menu item.
2503          *   2545          *
2504          * @param menuHandle the menu handle which contains this new item   2546          * @param menuHandle the menu handle which contains this new item
2505          * @param index the index inside menu where this new item is placed        2547          * @param index the index inside menu where this new item is placed     
2506          * @return handle of new widget   2548          * @return handle of new widget
2507          * @uglGroup MenuItem   2549          * @uglGroup MenuItem
2508          */       2550          */    
2509         public static final native int SeparatorItem_New(int menuHandle, int index);   2551         public static final native int SeparatorItem_New(int menuHandle, int index);
2510           2552        
2511         /**   2553         /**
2512          * Creates a new cursor.  The style value should be one   2554          * Creates a new cursor.  The style value should be one
2513          * of the CURSOR constants.   2555          * of the CURSOR constants.
2514          *   2556          *
2515          * @param deviceHandle the device handle   2557          * @param deviceHandle the device handle
2516          * @param style the cursor style   2558          * @param style the cursor style
2517          * @return handle of new widget   2559          * @return handle of new widget
2518          */   2560          */
2519         public static final native int Cursor_New(int deviceHandle, int style); <> 2561         // public static final native int Cursor_New(int deviceHandle, int style);
2520         = 2562        
2521         /**   2563         /**
2522          * Release any resources that were allocated to a cursor.   2564          * Release any resources that were allocated to a cursor.
2523          *   2565          *
2524          * @param handle the cursor handle   2566          * @param handle the cursor handle
2525          */   2567          */
2526         public static final native void Cursor_Dispose(int handle); <> 2568         // public static final native void Cursor_Dispose(int handle);
2527         = 2569        
2528         /**   2570         /**
2529          * Creates a new file dialog.  Valid styles are STYLE_APPLICATION_MODAL,   2571          * Creates a new file dialog.  Valid styles are STYLE_APPLICATION_MODAL,
2530          * STYLE_PRIMARY_MODAL, STYLE_OPEN, STYLE_SAVE, and STYLE_MULTI.   2572          * STYLE_PRIMARY_MODAL, STYLE_OPEN, STYLE_SAVE, and STYLE_MULTI.
2531          *   2573          *
2532          * @param peerParent handle of shell this dialog is modal to   2574          * @param peerParent handle of shell this dialog is modal to
2533          * @param style a logical OR of styles for this widget   2575          * @param style a logical OR of styles for this widget
2534          * @return handle of new FileDialog widget   2576          * @return handle of new FileDialog widget
2535          */   2577          */
2536         public static final native int FileDialog_New(int peerParent, int style);   2578         public static final native int FileDialog_New(int peerParent, int style);
2537           2579        
2538         /**   2580         /**
2539          * Returns the list of file names that were selected by the user.   2581          * Returns the list of file names that were selected by the user.
2540          * This list has a length greater than one only if the dialog was   2582          * This list has a length greater than one only if the dialog was
2541          * created with STYLE_MULTI.   2583          * created with STYLE_MULTI.
2542          *   2584          *
2543          * @param peerHandle widget handle   2585          * @param peerHandle widget handle
2544          * @return selected file name(s)   2586          * @return selected file name(s)
2545          */   2587          */
2546         public static final native String[] FileDialog_GetFileNames(int peerHandle);   2588         public static final native String[] FileDialog_GetFileNames(int peerHandle);
2547           2589        
2548         /**   2590         /**
2549          * Returns the path of the directory that contains all selected files.   2591          * Returns the path of the directory that contains all selected files.
2550          *   2592          *
2551          * @param peerHandle widget handle   2593          * @param peerHandle widget handle
2552          * @return directory path for selected file(s)   2594          * @return directory path for selected file(s)
2553          */   2595          */
2554         public static final native String FileDialog_GetFilterPath(int peerHandle);   2596         public static final native String FileDialog_GetFilterPath(int peerHandle);
2555     2597  
2556         /**   2598         /**
2557          * Opens a file dialog.  Returns true if the dialog was opened   2599          * Opens a file dialog.  Returns true if the dialog was opened
2558          * successfully, false otherwise.    2600          * successfully, false otherwise. 
2559          *   2601          *
2560          * @param peerHandle widget handle   2602          * @param peerHandle widget handle
2561          * @return boolean indicating whether the file selection was accepted   2603          * @return boolean indicating whether the file selection was accepted
2562          */   2604          */
2563         public static final native boolean FileDialog_Open(int peerHandle);   2605         public static final native boolean FileDialog_Open(int peerHandle);
2564           2606        
2565         /**   2607         /**
2566          * Sets the initial file name that the file dialog should display.   2608          * Sets the initial file name that the file dialog should display.
2567          *   2609          *
2568          * @param peerHandle widget handle   2610          * @param peerHandle widget handle
2569          * @param string file name to display in text field   2611          * @param string file name to display in text field
2570          */   2612          */
2571         public static final native void FileDialog_SetFileName(int peerHandle, String string);   2613         public static final native void FileDialog_SetFileName(int peerHandle, String string);
2572           2614        
2573         /**   2615         /**
2574          * Sets the filter extension of the file dialog.   2616          * Sets the filter extension of the file dialog.
2575          *   2617          *
2576          * @param peerHandle widget handle   2618          * @param peerHandle widget handle
2577          * @param string[] filter extension   2619          * @param string[] filter extension
2578          */   2620          */
2579         public static final native void FileDialog_SetFilterExtensions(int peerHandle, String[] extensions);   2621         public static final native void FileDialog_SetFilterExtensions(int peerHandle, String[] extensions);
2580     2622  
2581         /**   2623         /**
2582          * Sets the filter name of the file dialog.   2624          * Sets the filter name of the file dialog.
2583          *   2625          *
2584          * @param peerHandle widget handle   2626          * @param peerHandle widget handle
2585          * @param string[] filter name   2627          * @param string[] filter name
2586          */   2628          */
2587         public static final native void FileDialog_SetFilterNames(int peerHandle, String[] names);   2629         public static final native void FileDialog_SetFilterNames(int peerHandle, String[] names);
2588     2630  
2589         /**   2631         /**
2590          * Sets the filter path of the file dialog.   2632          * Sets the filter path of the file dialog.
2591          *   2633          *
2592          * @param peerHandle widget handle   2634          * @param peerHandle widget handle
2593          * @param string filter path (such as "*.txt")   2635          * @param string filter path (such as "*.txt")
2594          */   2636          */
2595         public static final native void FileDialog_SetFilterPath(int peerHandle, String string);   2637         public static final native void FileDialog_SetFilterPath(int peerHandle, String string);
2596           2638        
2597         /**   2639         /**
2598          * Sets the title of a file dialog.  This method will only be called if the   2640          * Sets the title of a file dialog.  This method will only be called if the
2599          * user would like to use a non default title.   2641          * user would like to use a non default title.
2600          *   2642          *
2601          * @param peerHandle widget handle   2643          * @param peerHandle widget handle
2602          * @param string the new title to use for the dialog.  This will never be null   2644          * @param string the new title to use for the dialog.  This will never be null
2603          */   2645          */
2604         public static final native void FileDialog_SetTitle(int peerHandle, String string);   2646         public static final native void FileDialog_SetTitle(int peerHandle, String string);
2605           2647        
2606         /**   2648         /**
2607          * Returns the name of the native platform.  This is typically   2649          * Returns the name of the native platform.  This is typically
2608          * the name of the user interface library or window toolkit.   2650          * the name of the user interface library or window toolkit.
2609          *   2651          *
2610          * @return a string indicating the platform name   2652          * @return a string indicating the platform name
2611          */   2653          */
2612         public static final native String Platform_GetName();   2654         public static final native String Platform_GetName();
2613           2655        
2614         public static final native int Platform_GetIdentifyCode();   2656         public static final native int Platform_GetIdentifyCode();
2615     2657  
2616         public static final native int Platform_GetMajorVersion();   2658         public static final native int Platform_GetMajorVersion();
2617     2659  
2618         /**   2660         /**
2619          * Returns the platform support for certain capabilities.  The meaning of   2661          * Returns the platform support for certain capabilities.  The meaning of
2620          * the return value is dependent on the capability parameter.  Possible   2662          * the return value is dependent on the capability parameter.  Possible
2621          * values for the parameter are below and the corresponding return value   2663          * values for the parameter are below and the corresponding return value
2622          * is documented with each constant:   2664          * is documented with each constant:
2623          *   2665          *
2624          * CAPABILITY_SHELL_TOPLEVEL_RESIZING - indicates whether top-level shells (i.e. shells without a parent shell) are resizable   2666          * CAPABILITY_SHELL_TOPLEVEL_RESIZING - indicates whether top-level shells (i.e. shells without a parent shell) are resizable
2625          * CAPABILITY_SHELL_CHILD_RESIZABLE - indicates whether shells that are children of another shell can be resized   2667          * CAPABILITY_SHELL_CHILD_RESIZABLE - indicates whether shells that are children of another shell can be resized
2626          * CAPABILITY_SHELL_MINMAX - indicates whether shells can be minimized and maximized on this platform   2668          * CAPABILITY_SHELL_MINMAX - indicates whether shells can be minimized and maximized on this platform
2627          *   2669          *
2628          * @param capability a constant representing a particular platform capability   2670          * @param capability a constant representing a particular platform capability
2629          * @return an integer that represents the platform's ability to fulfill a capability (0 indicates a lack of capability)   2671          * @return an integer that represents the platform's ability to fulfill a capability (0 indicates a lack of capability)
2630          */   2672          */
2631         public static final native int Platform_GetCapability(int capability);   2673         public static final native int Platform_GetCapability(int capability);
2632           2674        
2633         /**   2675         /**
2634          * Opens a new message box and waits for the user to dismiss it.   2676          * Opens a new message box and waits for the user to dismiss it.
2635          *   2677          *
2636          * @param parentShell the parent of the message box   2678          * @param parentShell the parent of the message box
2637          * @param style one of the following combinations of MESSAGEBOX_* styles, denoting   2679          * @param style one of the following combinations of MESSAGEBOX_* styles, denoting
2638          *              which buttons should be available in the message box, and   2680          *              which buttons should be available in the message box, and
2639          *              zero or one MESSAGEBOX_ICON_* style denoting which icon should   2681          *              zero or one MESSAGEBOX_ICON_* style denoting which icon should
2640          *              be used. Valid button combinations are ok, ok/cancel, yes/no,   2682          *              be used. Valid button combinations are ok, ok/cancel, yes/no,
2641          *              yes/no/cancel, retry/cancel.  Style also can indicate modality   2683          *              yes/no/cancel, retry/cancel.  Style also can indicate modality
2642          *              (one of STYLE_SYSTEM_MODAL, STYLE_APPLICATION_MODAL, STYLE_PRIMARY_MODAL,   2684          *              (one of STYLE_SYSTEM_MODAL, STYLE_APPLICATION_MODAL, STYLE_PRIMARY_MODAL,
2643          *              STYLE_MODELESS).  Modality styles are hints and may not be supported   2685          *              STYLE_MODELESS).  Modality styles are hints and may not be supported
2644          *              on all platforms.   2686          *              on all platforms.
2645          * @param title the tile of the message box, or null if the default title should   2687          * @param title the tile of the message box, or null if the default title should
2646          *              be used   2688          *              be used
2647          * @param message the message to display for the user   2689          * @param message the message to display for the user
2648          * @return one of the MESSAGEBOX_* styles denoting which button was pressed to   2690          * @return one of the MESSAGEBOX_* styles denoting which button was pressed to
2649          *         dismiss the message.   2691          *         dismiss the message.
2650          */   2692          */
2651         public static final native int MessageBox_Open(int parentShell, int style, String title, String message);   2693         public static final native int MessageBox_Open(int parentShell, int style, String title, String message);
2652           2694        
2653         /**   2695         /**
2654          * Creates a new progress bar.  In addition to the styles supported by   2696          * Creates a new progress bar.  In addition to the styles supported by
2655          * Control, the valid styles are STYLE_VERTICAL, STYLE_HORIZONTAL, STYLE_SMOOTH, INDETERMINATE.   2697          * Control, the valid styles are STYLE_VERTICAL, STYLE_HORIZONTAL, STYLE_SMOOTH, INDETERMINATE.
2656          *   2698          *
2657          * @param parentHandle handle of parent widget   2699          * @param parentHandle handle of parent widget
2658          * @param style one of the valid style constants   2700          * @param style one of the valid style constants
2659          * @return handle of new widget   2701          * @return handle of new widget
2660          */   2702          */
2661         public static final native int ProgressBar_New(int parentHandle, int style);   2703         public static final native int ProgressBar_New(int parentHandle, int style);
2662           2704        
2663         /**   2705         /**
2664          * Updates the current selection in the progress bar.  The value passed   2706          * Updates the current selection in the progress bar.  The value passed
2665          * in will always be in [min,max].    2707          * in will always be in [min,max]. 
2666          *   2708          *
2667          * @param handle the handle to the bar   2709          * @param handle the handle to the bar
2668          * @param value the new selection   2710          * @param value the new selection
2669          */   2711          */
2670         public static final native void ProgressBar_SetSelection(int handle, int value);   2712         public static final native void ProgressBar_SetSelection(int handle, int value);
2671           2713        
2672         /**   2714         /**
2673          * Updates the current minimum in the progress bar.  The value passed in   2715          * Updates the current minimum in the progress bar.  The value passed in
2674          * will always be in [0,max].   2716          * will always be in [0,max].
2675          *   2717          *
2676          * @param handle the handle the bar   2718          * @param handle the handle the bar
2677          * @param value the new minimum value   2719          * @param value the new minimum value
2678          */   2720          */
2679         public static final native void ProgressBar_SetMinimum(int handle, int value);   2721         public static final native void ProgressBar_SetMinimum(int handle, int value);
2680           2722        
2681         /**   2723         /**
2682          * Updates the current maximum in the progress bar.  The value passed in   2724          * Updates the current maximum in the progress bar.  The value passed in
2683          * will always be in [min,MAX_INT].   2725          * will always be in [min,MAX_INT].
2684          *   2726          *
2685          * @param handle the handle the bar   2727          * @param handle the handle the bar
2686          * @param value the new maximum value   2728          * @param value the new maximum value
2687          */       2729          */    
2688         public static final native void ProgressBar_SetMaximum(int handle, int value);   2730         public static final native void ProgressBar_SetMaximum(int handle, int value);
2689           2731        
2690         public static final native int Tray_New(int displayHandle);   2732         public static final native int Tray_New(int displayHandle);
2691         public static final native int TrayItem_New(int trayHandle);   2733         public static final native int TrayItem_New(int trayHandle);
2692         public static final native void TrayItem_setImage(int handle, int imageHandle);   2734         public static final native void TrayItem_setImage(int handle, int imageHandle);
2693         public static final native void TrayItem_setToolTipText(int handle, String toolTip);   2735         public static final native void TrayItem_setToolTipText(int handle, String toolTip);
2694         public static final native void TrayItem_setVisible(int handle, boolean visible);   2736         public static final native void TrayItem_setVisible(int handle, boolean visible);
2695           2737        
2696 }   2738 }