]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/SWT.java
5629185a5c125cec59c11dae72b4a6f01b9a06b1
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / SWT.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2019 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *     Lars Vogel <Lars.Vogel@vogella.com> - Bug 455263
14  *******************************************************************************/
15 package org.eclipse.swt;
16
17
18 import org.eclipse.swt.internal.*;
19 import org.eclipse.swt.widgets.*;
20
21 /**
22  * This class provides access to a small number of SWT system-wide
23  * methods, and in addition defines the public constants provided
24  * by SWT.
25  * <p>
26  * By defining constants like UP and DOWN in a single class, SWT
27  * can share common names and concepts at the same time minimizing
28  * the number of classes, names and constants for the application
29  * programmer.
30  * </p><p>
31  * Note that some of the constants provided by this class represent
32  * optional, appearance related aspects of widgets which are available
33  * either only on some window systems, or for a differing set of
34  * widgets on each window system. These constants are marked
35  * as <em>HINT</em>s. The set of widgets which support a particular
36  * <em>HINT</em> may change from release to release, although we typically
37  * will not withdraw support for a <em>HINT</em> once it is made available.
38  * </p>
39  *
40  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
41  */
42
43 /* NOTE:
44  *   Good javadoc coding style is to put the values of static final
45  *   constants in the comments. This reinforces the fact that
46  *   consumers are allowed to rely on the value (and they must
47  *   since the values are compiled inline in their code). We
48  *   can <em>not</em> change the values of these constants between
49  *   releases.
50  */
51 public class SWT {
52
53         /* Widget Event Constants */
54
55         /**
56          * The null event type (value is 0).
57          *
58          * @since 3.0
59          */
60         public static final int None = 0;
61
62         /**
63          * The key down event type (value is 1).
64          *
65          * @see org.eclipse.swt.widgets.Widget#addListener
66          * @see org.eclipse.swt.widgets.Display#addFilter
67          * @see org.eclipse.swt.widgets.Event
68          *
69          * @see org.eclipse.swt.widgets.Control#addKeyListener
70          * @see org.eclipse.swt.widgets.Tracker#addKeyListener
71          * @see org.eclipse.swt.events.KeyListener#keyPressed
72          * @see org.eclipse.swt.events.KeyEvent
73          */
74         public static final int KeyDown = 1;
75
76         /**
77          * The key up event type (value is 2).
78          *
79          * @see org.eclipse.swt.widgets.Widget#addListener
80          * @see org.eclipse.swt.widgets.Display#addFilter
81          * @see org.eclipse.swt.widgets.Event
82          *
83          * @see org.eclipse.swt.widgets.Control#addKeyListener
84          * @see org.eclipse.swt.widgets.Tracker#addKeyListener
85          * @see org.eclipse.swt.events.KeyListener#keyReleased
86          * @see org.eclipse.swt.events.KeyEvent
87          */
88         public static final int KeyUp = 2;
89
90         /**
91          * The mouse down event type (value is 3).
92          *
93          * @see org.eclipse.swt.widgets.Widget#addListener
94          * @see org.eclipse.swt.widgets.Display#addFilter
95          * @see org.eclipse.swt.widgets.Event
96          *
97          * @see org.eclipse.swt.widgets.Control#addMouseListener
98          * @see org.eclipse.swt.events.MouseListener#mouseDown
99          * @see org.eclipse.swt.events.MouseEvent
100          */
101         public static final int MouseDown = 3;
102
103         /**
104          * The mouse up event type (value is 4).
105          *
106          * @see org.eclipse.swt.widgets.Widget#addListener
107          * @see org.eclipse.swt.widgets.Display#addFilter
108          * @see org.eclipse.swt.widgets.Event
109          *
110          * @see org.eclipse.swt.widgets.Control#addMouseListener
111          * @see org.eclipse.swt.events.MouseListener#mouseUp
112          * @see org.eclipse.swt.events.MouseEvent
113          */
114         public static final int MouseUp = 4;
115
116         /**
117          * The mouse move event type (value is 5).
118          *
119          * @see org.eclipse.swt.widgets.Widget#addListener
120          * @see org.eclipse.swt.widgets.Display#addFilter
121          * @see org.eclipse.swt.widgets.Event
122          *
123          * @see org.eclipse.swt.widgets.Control#addMouseMoveListener
124          * @see org.eclipse.swt.events.MouseMoveListener#mouseMove
125          * @see org.eclipse.swt.events.MouseEvent
126          */
127         public static final int MouseMove = 5;
128
129         /**
130          * The mouse enter event type (value is 6).
131          *
132          * @see org.eclipse.swt.widgets.Widget#addListener
133          * @see org.eclipse.swt.widgets.Display#addFilter
134          * @see org.eclipse.swt.widgets.Event
135          *
136          * @see org.eclipse.swt.widgets.Control#addMouseTrackListener
137          * @see org.eclipse.swt.events.MouseTrackListener#mouseEnter
138          * @see org.eclipse.swt.events.MouseEvent
139          */
140         public static final int MouseEnter = 6;
141
142         /**
143          * The mouse exit event type (value is 7).
144          *
145          * @see org.eclipse.swt.widgets.Widget#addListener
146          * @see org.eclipse.swt.widgets.Display#addFilter
147          * @see org.eclipse.swt.widgets.Event
148          *
149          * @see org.eclipse.swt.widgets.Control#addMouseTrackListener
150          * @see org.eclipse.swt.events.MouseTrackListener#mouseExit
151          * @see org.eclipse.swt.events.MouseEvent
152          */
153         public static final int MouseExit = 7;
154
155         /**
156          * The mouse double click event type (value is 8).
157          *
158          * @see org.eclipse.swt.widgets.Widget#addListener
159          * @see org.eclipse.swt.widgets.Display#addFilter
160          * @see org.eclipse.swt.widgets.Event
161          *
162          * @see org.eclipse.swt.widgets.Control#addMouseListener
163          * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick
164          * @see org.eclipse.swt.events.MouseEvent
165          */
166         public static final int MouseDoubleClick = 8;
167
168         /**
169          * The paint event type (value is 9).
170          *
171          * @see org.eclipse.swt.widgets.Widget#addListener
172          * @see org.eclipse.swt.widgets.Display#addFilter
173          * @see org.eclipse.swt.widgets.Event
174          *
175          * @see org.eclipse.swt.widgets.Control#addPaintListener
176          * @see org.eclipse.swt.events.PaintListener#paintControl
177          * @see org.eclipse.swt.events.PaintEvent
178          */
179         public static final int Paint = 9;
180
181         /**
182          * The move event type (value is 10).
183          *
184          * @see org.eclipse.swt.widgets.Widget#addListener
185          * @see org.eclipse.swt.widgets.Display#addFilter
186          * @see org.eclipse.swt.widgets.Event
187          *
188          * @see org.eclipse.swt.widgets.Control#addControlListener
189          * @see org.eclipse.swt.widgets.TableColumn#addControlListener
190          * @see org.eclipse.swt.widgets.Tracker#addControlListener
191          * @see org.eclipse.swt.widgets.TreeColumn#addControlListener
192          * @see org.eclipse.swt.events.ControlListener#controlMoved
193          * @see org.eclipse.swt.events.ControlEvent
194          */
195         public static final int Move = 10;
196
197         /**
198          * The resize event type (value is 11).
199          *
200          * @see org.eclipse.swt.widgets.Widget#addListener
201          * @see org.eclipse.swt.widgets.Display#addFilter
202          * @see org.eclipse.swt.widgets.Event
203          *
204          * @see org.eclipse.swt.widgets.Control#addControlListener
205          * @see org.eclipse.swt.widgets.TableColumn#addControlListener
206          * @see org.eclipse.swt.widgets.Tracker#addControlListener
207          * @see org.eclipse.swt.widgets.TreeColumn#addControlListener
208          * @see org.eclipse.swt.events.ControlListener#controlResized
209          * @see org.eclipse.swt.events.ControlEvent
210          */
211         public static final int Resize = 11;
212
213         /**
214          * The dispose event type (value is 12).
215          *
216          * @see org.eclipse.swt.widgets.Widget#addListener
217          * @see org.eclipse.swt.widgets.Display#addListener
218          * @see org.eclipse.swt.widgets.Display#addFilter
219          * @see org.eclipse.swt.widgets.Event
220          *
221          * @see org.eclipse.swt.widgets.Widget#addDisposeListener
222          * @see org.eclipse.swt.events.DisposeListener#widgetDisposed
223          * @see org.eclipse.swt.events.DisposeEvent
224          */
225         public static final int Dispose = 12;
226
227         /**
228          * The selection event type (value is 13).
229          *
230          * @see org.eclipse.swt.widgets.Widget#addListener
231          * @see org.eclipse.swt.widgets.Display#addFilter
232          * @see org.eclipse.swt.widgets.Event
233          *
234          * @see org.eclipse.swt.widgets.Button#addSelectionListener
235          * @see org.eclipse.swt.widgets.Combo#addSelectionListener
236          * @see org.eclipse.swt.widgets.CoolItem#addSelectionListener
237          * @see org.eclipse.swt.widgets.Link#addSelectionListener
238          * @see org.eclipse.swt.widgets.List#addSelectionListener
239          * @see org.eclipse.swt.widgets.MenuItem#addSelectionListener
240          * @see org.eclipse.swt.widgets.Sash#addSelectionListener
241          * @see org.eclipse.swt.widgets.Scale#addSelectionListener
242          * @see org.eclipse.swt.widgets.ScrollBar#addSelectionListener
243          * @see org.eclipse.swt.widgets.Slider#addSelectionListener
244          * @see org.eclipse.swt.widgets.TabFolder#addSelectionListener
245          * @see org.eclipse.swt.widgets.Table#addSelectionListener
246          * @see org.eclipse.swt.widgets.TableColumn#addSelectionListener
247          * @see org.eclipse.swt.widgets.ToolItem#addSelectionListener
248          * @see org.eclipse.swt.widgets.TrayItem#addSelectionListener
249          * @see org.eclipse.swt.widgets.Tree#addSelectionListener
250          * @see org.eclipse.swt.widgets.TreeColumn#addSelectionListener
251          * @see org.eclipse.swt.events.SelectionListener#widgetSelected
252          * @see org.eclipse.swt.events.SelectionEvent
253          */
254         public static final int Selection = 13;
255
256         /**
257          * The default selection event type (value is 14).
258          *
259          * @see org.eclipse.swt.widgets.Widget#addListener
260          * @see org.eclipse.swt.widgets.Display#addFilter
261          * @see org.eclipse.swt.widgets.Event
262          *
263          * @see org.eclipse.swt.widgets.Combo#addSelectionListener
264          * @see org.eclipse.swt.widgets.List#addSelectionListener
265          * @see org.eclipse.swt.widgets.Spinner#addSelectionListener
266          * @see org.eclipse.swt.widgets.Table#addSelectionListener
267          * @see org.eclipse.swt.widgets.Text#addSelectionListener
268          * @see org.eclipse.swt.widgets.TrayItem#addSelectionListener
269          * @see org.eclipse.swt.widgets.Tree#addSelectionListener
270          * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected
271          * @see org.eclipse.swt.events.SelectionEvent
272          */
273         public static final int DefaultSelection = 14;
274
275         /**
276          * The focus in event type (value is 15).
277          *
278          * @see org.eclipse.swt.widgets.Widget#addListener
279          * @see org.eclipse.swt.widgets.Display#addFilter
280          * @see org.eclipse.swt.widgets.Event
281          *
282          * @see org.eclipse.swt.widgets.Control#addFocusListener
283          * @see org.eclipse.swt.events.FocusListener#focusGained
284          * @see org.eclipse.swt.events.FocusEvent
285          */
286         public static final int FocusIn = 15;
287
288         /**
289          * The focus out event type (value is 16).
290          *
291          * @see org.eclipse.swt.widgets.Widget#addListener
292          * @see org.eclipse.swt.widgets.Display#addFilter
293          * @see org.eclipse.swt.widgets.Event
294          *
295          * @see org.eclipse.swt.widgets.Control#addFocusListener
296          * @see org.eclipse.swt.events.FocusListener#focusLost
297          * @see org.eclipse.swt.events.FocusEvent
298          */
299         public static final int FocusOut = 16;
300
301         /**
302          * The expand event type (value is 17).
303          *
304          * @see org.eclipse.swt.widgets.Widget#addListener
305          * @see org.eclipse.swt.widgets.Display#addFilter
306          * @see org.eclipse.swt.widgets.Event
307          *
308          * @see org.eclipse.swt.widgets.Tree#addTreeListener
309          * @see org.eclipse.swt.events.TreeListener#treeExpanded
310          * @see org.eclipse.swt.events.TreeEvent
311          */
312         public static final int Expand = 17;
313
314         /**
315          * The collapse event type (value is 18).
316          *
317          * @see org.eclipse.swt.widgets.Widget#addListener
318          * @see org.eclipse.swt.widgets.Display#addFilter
319          * @see org.eclipse.swt.widgets.Event
320          *
321          * @see org.eclipse.swt.widgets.Tree#addTreeListener
322          * @see org.eclipse.swt.events.TreeListener#treeCollapsed
323          * @see org.eclipse.swt.events.TreeEvent
324          */
325         public static final int Collapse = 18;
326
327         /**
328          * The iconify event type (value is 19).
329          *
330          * @see org.eclipse.swt.widgets.Widget#addListener
331          * @see org.eclipse.swt.widgets.Display#addFilter
332          * @see org.eclipse.swt.widgets.Event
333          *
334          * @see org.eclipse.swt.widgets.Shell#addShellListener
335          * @see org.eclipse.swt.events.ShellListener#shellIconified
336          * @see org.eclipse.swt.events.ShellEvent
337          */
338         public static final int Iconify = 19;
339
340         /**
341          * The de-iconify event type (value is 20).
342          *
343          * @see org.eclipse.swt.widgets.Widget#addListener
344          * @see org.eclipse.swt.widgets.Display#addFilter
345          * @see org.eclipse.swt.widgets.Event
346          *
347          * @see org.eclipse.swt.widgets.Shell#addShellListener
348          * @see org.eclipse.swt.events.ShellListener#shellDeiconified
349          * @see org.eclipse.swt.events.ShellEvent
350          */
351         public static final int Deiconify = 20;
352
353         /**
354          * The close event type (value is 21).
355          *
356          * @see org.eclipse.swt.widgets.Widget#addListener
357          * @see org.eclipse.swt.widgets.Display#addListener
358          * @see org.eclipse.swt.widgets.Display#addFilter
359          * @see org.eclipse.swt.widgets.Event
360          *
361          * @see org.eclipse.swt.widgets.Shell#addShellListener
362          * @see org.eclipse.swt.events.ShellListener#shellClosed
363          * @see org.eclipse.swt.events.ShellEvent
364          */
365         public static final int Close = 21;
366
367         /**
368          * The show event type (value is 22).
369          *
370          * @see org.eclipse.swt.widgets.Widget#addListener
371          * @see org.eclipse.swt.widgets.Display#addFilter
372          * @see org.eclipse.swt.widgets.Event
373          *
374          * @see org.eclipse.swt.widgets.Menu#addMenuListener
375          * @see org.eclipse.swt.events.MenuListener#menuShown
376          * @see org.eclipse.swt.events.MenuEvent
377          */
378         public static final int Show = 22;
379
380         /**
381          * The hide event type (value is 23).
382          *
383          * @see org.eclipse.swt.widgets.Widget#addListener
384          * @see org.eclipse.swt.widgets.Display#addFilter
385          * @see org.eclipse.swt.widgets.Event
386          *
387          * @see org.eclipse.swt.widgets.Menu#addMenuListener
388          * @see org.eclipse.swt.events.MenuListener#menuHidden
389          * @see org.eclipse.swt.events.MenuEvent
390          */
391         public static final int Hide = 23;
392
393         /**
394          * The modify event type (value is 24).
395          *
396          * @see org.eclipse.swt.widgets.Widget#addListener
397          * @see org.eclipse.swt.widgets.Display#addFilter
398          * @see org.eclipse.swt.widgets.Event
399          *
400          * @see org.eclipse.swt.widgets.Combo#addModifyListener
401          * @see org.eclipse.swt.widgets.Spinner#addModifyListener
402          * @see org.eclipse.swt.widgets.Text#addModifyListener
403          * @see org.eclipse.swt.events.ModifyListener#modifyText
404          * @see org.eclipse.swt.events.ModifyEvent
405          */
406         public static final int Modify = 24;
407
408         /**
409          * The verify event type (value is 25).
410          *
411          * @see org.eclipse.swt.widgets.Widget#addListener
412          * @see org.eclipse.swt.widgets.Display#addFilter
413          * @see org.eclipse.swt.widgets.Event
414          *
415          * @see org.eclipse.swt.custom.CCombo#addVerifyListener
416          * @see org.eclipse.swt.widgets.Combo#addVerifyListener
417          * @see org.eclipse.swt.custom.StyledText#addVerifyListener
418          * @see org.eclipse.swt.widgets.Text#addVerifyListener
419          * @see org.eclipse.swt.events.VerifyListener#verifyText
420          * @see org.eclipse.swt.events.VerifyEvent
421          */
422         public static final int Verify = 25;
423
424         /**
425          * The activate event type (value is 26).
426          *
427          * @see org.eclipse.swt.widgets.Widget#addListener
428          * @see org.eclipse.swt.widgets.Display#addFilter
429          * @see org.eclipse.swt.widgets.Event
430          *
431          * @see org.eclipse.swt.widgets.Shell#addShellListener
432          * @see org.eclipse.swt.events.ShellListener#shellActivated
433          * @see org.eclipse.swt.events.ShellEvent
434          */
435         public static final int Activate = 26;
436
437         /**
438          * The deactivate event type (value is 27).
439          *
440          * @see org.eclipse.swt.widgets.Widget#addListener
441          * @see org.eclipse.swt.widgets.Display#addFilter
442          * @see org.eclipse.swt.widgets.Event
443          *
444          * @see org.eclipse.swt.widgets.Shell#addShellListener
445          * @see org.eclipse.swt.events.ShellListener#shellDeactivated
446          * @see org.eclipse.swt.events.ShellEvent
447          */
448         public static final int Deactivate = 27;
449
450         /**
451          * The help event type (value is 28).
452          *
453          * @see org.eclipse.swt.widgets.Widget#addListener
454          * @see org.eclipse.swt.widgets.Display#addFilter
455          * @see org.eclipse.swt.widgets.Event
456          *
457          * @see org.eclipse.swt.widgets.Control#addHelpListener
458          * @see org.eclipse.swt.widgets.Menu#addHelpListener
459          * @see org.eclipse.swt.widgets.MenuItem#addHelpListener
460          * @see org.eclipse.swt.events.HelpListener#helpRequested
461          * @see org.eclipse.swt.events.HelpEvent
462          */
463         public static final int Help = 28;
464
465         /**
466          * The drag detect event type (value is 29).
467          *
468          * @see org.eclipse.swt.widgets.Widget#addListener
469          * @see org.eclipse.swt.widgets.Display#addFilter
470          * @see org.eclipse.swt.widgets.Event
471          *
472          * @see org.eclipse.swt.widgets.Control#addDragDetectListener
473          * @see org.eclipse.swt.events.DragDetectListener#dragDetected
474          * @see org.eclipse.swt.events.DragDetectEvent
475          * @see org.eclipse.swt.dnd.DragSource
476          */
477         public static final int DragDetect = 29;
478
479         /**
480          * The arm event type (value is 30).
481          *
482          * @see org.eclipse.swt.widgets.Widget#addListener
483          * @see org.eclipse.swt.widgets.Display#addFilter
484          * @see org.eclipse.swt.widgets.Event
485          *
486          * @see org.eclipse.swt.widgets.MenuItem#addArmListener
487          * @see org.eclipse.swt.events.ArmListener#widgetArmed
488          * @see org.eclipse.swt.events.ArmEvent
489          */
490         public static final int Arm = 30;
491
492         /**
493          * The traverse event type (value is 31).
494          *
495          * @see org.eclipse.swt.widgets.Widget#addListener
496          * @see org.eclipse.swt.widgets.Display#addFilter
497          * @see org.eclipse.swt.widgets.Event
498          *
499          * @see org.eclipse.swt.widgets.Control#addTraverseListener
500          * @see org.eclipse.swt.events.TraverseListener#keyTraversed
501          * @see org.eclipse.swt.events.TraverseEvent
502          */
503         public static final int Traverse = 31;
504
505         /**
506          * The mouse hover event type (value is 32).
507          *
508          * @see org.eclipse.swt.widgets.Widget#addListener
509          * @see org.eclipse.swt.widgets.Display#addFilter
510          * @see org.eclipse.swt.widgets.Event
511          *
512          * @see org.eclipse.swt.widgets.Control#addMouseTrackListener
513          * @see org.eclipse.swt.events.MouseTrackListener#mouseHover
514          * @see org.eclipse.swt.events.MouseEvent
515          */
516         public static final int MouseHover = 32;
517
518         /**
519          * The hardware key down event type (value is 33).
520          *
521          * @see org.eclipse.swt.widgets.Widget#addListener
522          * @see org.eclipse.swt.widgets.Display#addFilter
523          * @see org.eclipse.swt.widgets.Event
524          */
525         public static final int HardKeyDown = 33;
526
527         /**
528          * The hardware key up event type (value is 34).
529          *
530          * @see org.eclipse.swt.widgets.Widget#addListener
531          * @see org.eclipse.swt.widgets.Display#addFilter
532          * @see org.eclipse.swt.widgets.Event
533          */
534         public static final int HardKeyUp = 34;
535
536         /**
537          * The menu detect event type (value is 35).
538          *
539          * @see org.eclipse.swt.widgets.Widget#addListener
540          * @see org.eclipse.swt.widgets.Display#addFilter
541          * @see org.eclipse.swt.widgets.Event
542          *
543          * @see org.eclipse.swt.widgets.Control#addMenuDetectListener
544          * @see org.eclipse.swt.widgets.TrayItem#addMenuDetectListener
545          * @see org.eclipse.swt.events.MenuDetectListener#menuDetected
546          * @see org.eclipse.swt.events.MenuDetectEvent
547          *
548          * @since 3.0
549          */
550         public static final int MenuDetect = 35;
551
552         /**
553          * The set data event type (value is 36).
554          *
555          * @see org.eclipse.swt.widgets.Widget#addListener
556          * @see org.eclipse.swt.widgets.Display#addFilter
557          * @see org.eclipse.swt.widgets.Event
558          *
559          * @see org.eclipse.swt.widgets.Table
560          * @see org.eclipse.swt.widgets.Tree
561          *
562          * @since 3.0
563          */
564         public static final int SetData = 36;
565
566         /**
567          * The mouse vertical wheel event type (value is 37).
568          *
569          * @see org.eclipse.swt.widgets.Control#addMouseWheelListener
570          * @see org.eclipse.swt.widgets.Display#addFilter
571          * @see org.eclipse.swt.widgets.Event
572          *
573          * @since 3.6
574          */
575         public static final int MouseVerticalWheel = 37;
576
577         /**
578          * The mouse horizontal wheel event type (value is 38).
579          *
580          * @see org.eclipse.swt.widgets.Widget#addListener
581          * @see org.eclipse.swt.widgets.Display#addFilter
582          * @see org.eclipse.swt.widgets.Event
583          *
584          * @since 3.6
585          */
586         public static final int MouseHorizontalWheel = 38;
587
588         /**
589          * The mouse wheel event type (value is 37).
590          * This is a synonym for {@link #MouseVerticalWheel} (value is 37).
591          * Newer applications should use {@link #MouseVerticalWheel} instead
592          * of {@link #MouseWheel} to make code more understandable.
593          *
594          * @see org.eclipse.swt.widgets.Control#addMouseWheelListener
595          * @see org.eclipse.swt.widgets.Display#addFilter
596          * @see org.eclipse.swt.widgets.Event
597          *
598          * @since 3.1
599          */
600         public static final int MouseWheel = MouseVerticalWheel;
601
602         /**
603          * The settings changed event type (value is 39).
604          * <p>
605          * The settings changed event is sent when an operating system
606          * property, such as a system font or color, has been changed.
607          * The event occurs after the property has been changed, but
608          * before any widget is redrawn.  Applications that cache operating
609          * system properties can use this event to update their caches.
610          * A specific property change can be detected by querying the
611          * new value of a property and comparing it with the equivalent
612          * cached value.  The operating system automatically redraws and
613          * lays out all widgets after this event is sent.
614          * </p>
615          *
616          * @see org.eclipse.swt.widgets.Display#addListener
617          * @see org.eclipse.swt.widgets.Event
618          *
619          * @since 3.2
620          */
621         public static final int Settings = 39;
622
623         /**
624          * The erase item event type (value is 40).
625          *
626          * @see org.eclipse.swt.widgets.Widget#addListener
627          * @see org.eclipse.swt.widgets.Display#addFilter
628          * @see org.eclipse.swt.widgets.Event
629          *
630          * @since 3.2
631          */
632         public static final int EraseItem = 40;
633
634         /**
635          * The measure item event type (value is 41).
636          *
637          * @see org.eclipse.swt.widgets.Widget#addListener
638          * @see org.eclipse.swt.widgets.Display#addFilter
639          * @see org.eclipse.swt.widgets.Event
640          *
641          * @since 3.2
642          */
643         public static final int MeasureItem = 41;
644
645         /**
646          * The paint item event type (value is 42).
647          *
648          * @see org.eclipse.swt.widgets.Widget#addListener
649          * @see org.eclipse.swt.widgets.Display#addFilter
650          * @see org.eclipse.swt.widgets.Event
651          *
652          * @since 3.2
653          */
654         public static final int PaintItem = 42;
655
656         /**
657          * The IME composition event type (value is 43).
658          * <p>
659          * The IME composition event is sent to allow
660          * custom text editors to implement in-line
661          * editing of international text.
662          * </p>
663          *
664          * The detail field indicates the action to be taken:
665          * <ul>
666          * <li>{@link SWT#COMPOSITION_CHANGED}</li>
667          * <li>{@link SWT#COMPOSITION_OFFSET}</li>
668          * <li>{@link SWT#COMPOSITION_SELECTION}</li>
669          * </ul>
670          *
671          * @see org.eclipse.swt.widgets.Widget#addListener
672          * @see org.eclipse.swt.widgets.Display#addFilter
673          * @see org.eclipse.swt.widgets.Event
674          *
675          * @since 3.4
676          */
677         public static final int ImeComposition = 43;
678
679         /**
680          * The orientation change event type (value is 44).
681          * <p>
682          * On some platforms the orientation of text widgets
683          * can be changed by keyboard shortcut.
684          * The application can use the <code>doit</code> field
685          * of the event to stop the change from happening.
686          * </p>
687          *
688          * @see org.eclipse.swt.widgets.Widget#addListener
689          * @see org.eclipse.swt.widgets.Display#addFilter
690          * @see org.eclipse.swt.widgets.Event
691          *
692          * @since 3.6
693          */
694         public static final int OrientationChange = 44;
695
696         /**
697          * The skin event type (value is 45).
698          *
699          * <p>
700          * The skin event is sent by the display when a widget needs to
701          * be skinned.
702          * </p>
703          *
704          * @see org.eclipse.swt.widgets.Widget#addListener
705          * @see org.eclipse.swt.widgets.Display#addFilter
706          * @see org.eclipse.swt.widgets.Event
707          * @see org.eclipse.swt.widgets.Widget#reskin(int)
708          *
709          * @since 3.6
710          */
711         public static final int Skin = 45;
712
713         /**
714          * The open document event type (value is 46).
715          *
716          * <p>
717          * This event is sent when SWT receives notification that a document
718          * should be opened.
719          * </p>
720          *
721          * @see org.eclipse.swt.widgets.Display#addListener
722          * @see org.eclipse.swt.widgets.Event
723          *
724          * @since 3.6
725          */
726         public static final int OpenDocument = 46;
727
728         /**
729          * The touch event type (value is 47).
730          *
731          * <p>
732          * This event is sent when a touch has been performed
733          * on a touch-based input source.
734          * </p>
735          *
736          * @see org.eclipse.swt.widgets.Display#addListener
737          * @see org.eclipse.swt.widgets.Event
738          *
739          * @since 3.7
740          */
741         public static final int Touch = 47;
742
743         /**
744          * The gesture event type (value is 48).
745          *
746          * <p>
747          * This event is sent when a gesture has been performed.
748          * </p>
749          *
750          * @see org.eclipse.swt.widgets.Display#addListener
751          * @see org.eclipse.swt.widgets.Event
752          * @see SWT#GESTURE_MAGNIFY
753          * @see SWT#GESTURE_PAN
754          * @see SWT#GESTURE_ROTATE
755          * @see SWT#GESTURE_SWIPE
756          *
757          * @since 3.7
758          */
759         public static final int Gesture = 48;
760
761         /**
762          * The segments event type (value is 49).
763          *
764          * <p>
765          * This event is sent when text content has been changed.
766          * </p>
767          *
768          * @see org.eclipse.swt.widgets.Widget#addListener
769          * @see org.eclipse.swt.widgets.Display#addFilter
770          * @see org.eclipse.swt.widgets.Event
771          *
772          * @see org.eclipse.swt.widgets.Text#addSegmentListener
773          * @see org.eclipse.swt.events.SegmentEvent
774          *
775          * @since 3.8
776          */
777         public static final int Segments = 49;
778
779         /**
780          * The PreEvent event type (value is 50).
781          *
782          * <p>
783          * This event is sent before an event other than {@link #PreExternalEventDispatch} or
784          * {@link #PostExternalEventDispatch} is dispatched.
785          * </p>
786          * <p>
787          * The detail field of the event contains the type of the following event.
788          * </p>
789          *
790          * @since 3.103
791          */
792         public static final int PreEvent = 50;
793
794         /**
795          * The PostEvent event type (value is 51).
796          *
797          * <p>
798          * This event is sent after an event other than {@link #PreExternalEventDispatch} or
799          * {@link #PostExternalEventDispatch} is dispatched.
800          * </p>
801          * <p>
802          * The detail field of the event contains the type of the prior event.
803          * </p>
804          *
805          * @since 3.103
806          */
807         public static final int PostEvent = 51;
808
809         /**
810          * The PreExternalEventDispatch event type (value is 52).
811          *
812          * <p>
813          * This event is sent before calling a blocking method that does its own event dispatch outside
814          * of the SWT code.
815          * </p>
816          *
817          * @since 3.104
818          */
819         public static final int PreExternalEventDispatch = 52;
820
821         /**
822          * The PostExternalEventDispatch event type (value is 53).
823          *
824          * <p>
825          * This event is sent after calling a blocking method that does its own event dispatch outside
826          * of the SWT code.
827          * </p>
828          *
829          * @since 3.104
830          */
831         public static final int PostExternalEventDispatch = 53;
832
833         /**
834          * @deprecated The same as PreExternalEventDispatch (value is 52).
835          * @since 3.103
836          */
837         @Deprecated
838         public static final int Sleep = PreExternalEventDispatch;
839
840         /**
841          * @deprecated The same as PostExternalEventDispatch (value is 53).
842          * @since 3.103
843          */
844         @Deprecated
845         public static final int Wakeup = PostExternalEventDispatch;
846
847         /**
848          * The open URL event type (value is 54).
849          *
850          * <p>
851          * This event is sent when SWT receives notification that a URL
852          * should be opened.
853          * </p>
854          *
855          * @see org.eclipse.swt.widgets.Display#addListener
856          * @see org.eclipse.swt.widgets.Event
857          *
858          * @since 3.107
859          */
860         public static final int OpenUrl = 54;
861
862         /**
863          * The SWT zoom change event type (value is 55).
864          *
865          * <p>
866          * This event is sent on <code>Shell</code> when the SWT zoom has changed. The SWT
867          * zoom changes when the operating system DPI or scale factor changes dynamically.
868          * </p>
869          * <p>
870          * Note that this is a <em>HINT</em> and is not sent on platforms that do not
871          * support dynamic DPI changes. This event is currently sent on Windows 10 and GTK
872          * only.
873          * </p>
874          *
875          * @see org.eclipse.swt.widgets.Widget#addListener
876          * @see org.eclipse.swt.widgets.Display#addFilter
877          * @see org.eclipse.swt.widgets.Event
878          *
879          * @since 3.108
880          */
881         public static final int ZoomChanged = 55;
882
883         /* Event Details */
884
885         /**
886          * The IME composition event detail that indicates
887          * a change in the IME composition. The text field
888          * of the event is the new composition text.
889          * The start and end indicate the offsets where the
890          * composition text should be inserted.
891          * The styles and ranges are stored in the IME
892          * object (value is 1).
893          *
894          * @see SWT#ImeComposition
895          *
896          * @since 3.4
897          */
898         public static final int COMPOSITION_CHANGED = 1;
899
900         /**
901          * The IME composition event detail that indicates
902          * that the IME needs the offset for a given location.
903          * The x and y fields of the event are used by the
904          * application to determine the offset.
905          *
906          * The index field of the event should be set to the
907          * text offset at that location. The count field should
908          * be set to indicate whether the location is closer to
909          * the leading edge (0) or the trailing edge (1) (value is 2).
910          *
911          * @see SWT#ImeComposition
912          * @see org.eclipse.swt.graphics.TextLayout#getOffset(int, int, int[])
913          *
914          * @since 3.4
915          */
916         public static final int COMPOSITION_OFFSET = 2;
917
918         /**
919          * The IME composition event detail that indicates
920          * that IME needs the selected text and its start
921          * and end offsets (value is 3).
922          *
923          * @see SWT#ImeComposition
924          *
925          * @since 3.4
926          */
927         public static final int COMPOSITION_SELECTION = 3;
928
929         /**
930          * Indicates that a user-interface component is being dragged,
931          * for example dragging the thumb of a scroll bar (value is 1).
932          */
933         public static final int DRAG = 1;
934
935         /**
936          * Event detail field that indicates a user-interface component
937          * state is selected (value is 1&lt;&lt;1).
938          *
939          * @since 3.2
940          */
941         public static final int SELECTED = 1 << 1;
942
943         /**
944          * Event detail field that indicates a user-interface component
945          * state is focused (value is 1&lt;&lt;2).
946          *
947          * @since 3.2
948          */
949         public static final int FOCUSED = 1 << 2;
950
951         /**
952          * Event detail field that indicates a user-interface component
953          * draws the background (value is 1&lt;&lt;3).
954          *
955          * @since 3.2
956          */
957         public static final int BACKGROUND = 1 << 3;
958
959         /**
960          * Event detail field that indicates a user-interface component
961          * draws the foreground (value is 1&lt;&lt;4).
962          *
963          * @since 3.2
964          */
965         public static final int FOREGROUND = 1 << 4;
966
967         /**
968          * Event detail field that indicates a user-interface component
969          * state is hot (value is 1&lt;&lt;5).
970          *
971          * @since 3.3
972          */
973         public static final int HOT = 1 << 5;
974
975         /* This code is intentionally commented */
976         //public static final int PRESSED = 1 << 3;
977         //public static final int ACTIVE = 1 << 4;
978         //public static final int DISABLED = 1 << 5;
979         //public static final int HOT = 1 << 6;
980         //public static final int DEFAULTED = 1 << 7;
981
982         /**
983          * Traversal event detail field value indicating that no
984          * traversal action should be taken
985          * (value is 0).
986          */
987         public static final int TRAVERSE_NONE = 0;
988
989         /**
990          * Traversal event detail field value indicating that the
991          * key which designates that a dialog should be cancelled was
992          * pressed; typically, this is the ESC key
993          * (value is 1&lt;&lt;1).
994          */
995         public static final int TRAVERSE_ESCAPE = 1 << 1;
996
997         /**
998          * Traversal event detail field value indicating that the
999          * key which activates the default button in a dialog was
1000          * pressed; typically, this is the ENTER key
1001          * (value is 1&lt;&lt;2).
1002          */
1003         public static final int TRAVERSE_RETURN = 1 << 2;
1004
1005         /**
1006          * Traversal event detail field value indicating that the
1007          * key which designates that focus should be given to the
1008          * previous tab group was pressed; typically, this is the
1009          * SHIFT-TAB key sequence
1010          * (value is 1&lt;&lt;3).
1011          */
1012         public static final int TRAVERSE_TAB_PREVIOUS = 1 << 3;
1013
1014         /**
1015          * Traversal event detail field value indicating that the
1016          * key which designates that focus should be given to the
1017          * next tab group was pressed; typically, this is the
1018          * TAB key
1019          * (value is 1&lt;&lt;4).
1020          */
1021         public static final int TRAVERSE_TAB_NEXT = 1 << 4;
1022
1023         /**
1024          * Traversal event detail field value indicating that the
1025          * key which designates that focus should be given to the
1026          * previous tab item was pressed; typically, this is either
1027          * the LEFT-ARROW or UP-ARROW keys
1028          * (value is 1&lt;&lt;5).
1029          */
1030         public static final int TRAVERSE_ARROW_PREVIOUS = 1 << 5;
1031
1032         /**
1033          * Traversal event detail field value indicating that the
1034          * key which designates that focus should be given to the
1035          * previous tab item was pressed; typically, this is either
1036          * the RIGHT-ARROW or DOWN-ARROW keys
1037          * (value is 1&lt;&lt;6).
1038          */
1039         public static final int TRAVERSE_ARROW_NEXT = 1 << 6;
1040
1041         /**
1042          * Traversal event detail field value indicating that a
1043          * mnemonic key sequence was pressed
1044          * (value is 1&lt;&lt;7).
1045          */
1046         public static final int TRAVERSE_MNEMONIC = 1 << 7;
1047
1048         /**
1049          * Traversal event detail field value indicating that the
1050          * key which designates that the previous page of a multi-page
1051          * window should be shown was pressed; typically, this
1052          * is the CTRL-PAGEUP key sequence
1053          * (value is 1&lt;&lt;8).
1054          */
1055         public static final int TRAVERSE_PAGE_PREVIOUS = 1 << 8;
1056
1057         /**
1058          * Traversal event detail field value indicating that the
1059          * key which designates that the next page of a multi-page
1060          * window should be shown was pressed; typically, this
1061          * is the CTRL-PAGEDOWN key sequence
1062          * (value is 1&lt;&lt;9).
1063          */
1064         public static final int TRAVERSE_PAGE_NEXT = 1 << 9;
1065
1066         /**
1067          * Gesture event detail field value indicating that a continuous
1068          * gesture is about to begin.
1069          *
1070          * @since 3.7
1071          */
1072         public static final int GESTURE_BEGIN = 1 << 1;
1073
1074         /**
1075          * Gesture event detail field value indicating that a continuous
1076          * gesture has ended.
1077          *
1078          * @since 3.7
1079          */
1080         public static final int GESTURE_END = 1 << 2;
1081
1082         /**
1083          * Gesture event detail field value indicating that a
1084          * rotation gesture has happened. Only the rotation field
1085          * of the event is valid.
1086          *
1087          * @since 3.7
1088          */
1089         public static final int GESTURE_ROTATE = 1 << 3;
1090
1091         /**
1092          * Gesture event detail field value indicating that a
1093          * swipe gesture has happened.
1094          *
1095          * @since 3.7
1096          */
1097         public static final int GESTURE_SWIPE = 1 << 4;
1098
1099         /**
1100          * Gesture event detail field value indicating that a
1101          * magnification gesture has happened.
1102          *
1103          * @since 3.7
1104          */
1105         public static final int GESTURE_MAGNIFY = 1 << 5;
1106
1107         /**
1108          * Gesture event detail field value indicating that a
1109          * panning (two-finger scroll) gesture has happened.
1110          *
1111          * @since 3.7
1112          */
1113         public static final int GESTURE_PAN = 1 << 6;
1114
1115         /**
1116          * A constant indicating that a finger touched the device.
1117          *
1118          * @see org.eclipse.swt.widgets.Touch#state
1119          *
1120          * @since 3.7
1121          */
1122         public static final int TOUCHSTATE_DOWN = 1 << 0;
1123
1124         /**
1125          * A constant indicating that a finger moved on the device.
1126          *
1127          * @see org.eclipse.swt.widgets.Touch#state
1128          *
1129          * @since 3.7
1130          */
1131         public static final int TOUCHSTATE_MOVE = 1 << 1;
1132
1133         /**
1134          * A constant indicating that a finger was lifted from the device.
1135          *
1136          * @see org.eclipse.swt.widgets.Touch#state
1137          *
1138          * @since 3.7
1139          */
1140         public static final int TOUCHSTATE_UP = 1 << 2;
1141
1142         /**
1143          * MenuDetect event detail value indicating that a context menu
1144          * was requested by a mouse or other pointing device (value is 0).
1145          *
1146          * @since 3.8
1147          */
1148         public static final int MENU_MOUSE = 0;
1149
1150         /**
1151          * MenuDetect event detail value indicating that a context menu
1152          * was requested by a keyboard or other focus-based device (value is 1).
1153          *
1154          * @since 3.8
1155          */
1156         public static final int MENU_KEYBOARD = 1;
1157
1158         /**
1159          * A constant indicating that widgets have changed.
1160          * (value is 1&lt;&lt;1).
1161          *
1162          * <p><b>Used By:</b></p>
1163          * <ul>
1164          * <li><code>Composite</code> layout</li>
1165          * </ul>
1166          *
1167          * @see org.eclipse.swt.widgets.Composite#layout(org.eclipse.swt.widgets.Control[], int)
1168          *
1169          * @since 3.6
1170          */
1171         public static final int CHANGED = 1 << 1;
1172
1173         /**
1174          * A constant indicating that a given operation should be deferred.
1175          * (value is 1&lt;&lt;2).
1176          *
1177          * <p><b>Used By:</b></p>
1178          * <ul>
1179          * <li><code>Composite</code> layout</li>
1180          * </ul>
1181          *
1182          * @see org.eclipse.swt.widgets.Composite#layout(org.eclipse.swt.widgets.Control[], int)
1183          *
1184          * @since 3.6
1185          */
1186         public static final int DEFER = 1 << 2;
1187
1188         /**
1189          * A constant known to be zero (0), typically used in operations
1190          * which take bit flags to indicate that "no bits are set".
1191          */
1192         public static final int NONE = 0;
1193
1194         /**
1195          * A constant known to be zero (0), used in operations which
1196          * take pointers to indicate a null argument.
1197          */
1198         public static final int NULL = 0;
1199
1200         /**
1201          * Indicates that a default should be used (value is -1).
1202          */
1203         public static final int DEFAULT = -1;
1204
1205         /**
1206          * Indicates that a property is off (value is 0).
1207          *
1208          * @since 3.1
1209          */
1210         public static final int OFF = 0;
1211
1212         /**
1213          * Indicates that a property is on (value is 1).
1214          *
1215          * @since 3.1
1216          */
1217         public static final int ON = 1;
1218
1219         /**
1220          * Indicates low quality (value is 1).
1221          *
1222          * @since 3.1
1223          */
1224         public static final int LOW = 1;
1225
1226         /**
1227          * Indicates high quality (value is 2).
1228          *
1229          * @since 3.1
1230          */
1231         public static final int HIGH = 2;
1232
1233         /**
1234          * Style constant for menu bar behavior (value is 1&lt;&lt;1).
1235          * <p><b>Used By:</b></p>
1236          * <ul>
1237          * <li><code>Menu</code></li>
1238          * </ul>
1239          */
1240         public static final int BAR = 1 << 1;
1241
1242         /**
1243          * Style constant for drop down menu/list behavior (value is 1&lt;&lt;2).
1244          * <p><b>Used By:</b></p>
1245          * <ul>
1246          * <li><code>Menu</code></li>
1247          * <li><code>ToolItem</code></li>
1248          * <li><code>CoolItem</code></li>
1249          * <li><code>Combo</code></li>
1250          * <li><code>DateTime</code></li>
1251          * </ul>
1252          */
1253         public static final int DROP_DOWN = 1 << 2;
1254
1255         /**
1256          * Style constant for pop up menu behavior (value is 1&lt;&lt;3).
1257          * <p><b>Used By:</b></p>
1258          * <ul>
1259          * <li><code>Menu</code></li>
1260          * </ul>
1261          */
1262         public static final int POP_UP = 1 << 3;
1263
1264         /**
1265          * Style constant for line separator behavior (value is 1&lt;&lt;1).
1266          * <p><b>Used By:</b></p>
1267          * <ul>
1268          * <li><code>Label</code></li>
1269          * <li><code>MenuItem</code></li>
1270          * <li><code>ToolItem</code></li>
1271          * </ul>
1272          */
1273         public static final int SEPARATOR = 1 << 1;
1274
1275         /**
1276          * Constant representing a flexible space separator in a ToolBar.
1277          * <p><b>Used By:</b></p>
1278          * <ul>
1279          * <li><code>ToolItem.setWidth()</code></li>
1280          * </ul>
1281          *
1282          * @since 3.7
1283          */
1284         public static final int SEPARATOR_FILL = -2;
1285
1286         /**
1287          * Style constant for toggle button behavior (value is 1&lt;&lt;1).
1288          * <p><b>Used By:</b></p>
1289          * <ul>
1290          * <li><code>Button</code></li>
1291          * </ul>
1292          */
1293         public static final int TOGGLE = 1 << 1;
1294
1295         /**
1296          * Style constant for arrow button behavior (value is 1&lt;&lt;2).
1297          * <p><b>Used By:</b></p>
1298          * <ul>
1299          * <li><code>Button</code></li>
1300          * </ul>
1301          */
1302         public static final int ARROW = 1 << 2;
1303
1304         /**
1305          * Style constant for push button behavior (value is 1&lt;&lt;3).
1306          * <p><b>Used By:</b></p>
1307          * <ul>
1308          * <li><code>Button</code></li>
1309          * <li><code>MenuItem</code></li>
1310          * <li><code>ToolItem</code></li>
1311          * </ul>
1312          */
1313         public static final int PUSH = 1 << 3;
1314
1315         /**
1316          * Style constant for radio button behavior (value is 1&lt;&lt;4).
1317          * <p><b>Used By:</b></p>
1318          * <ul>
1319          * <li><code>Button</code></li>
1320          * <li><code>MenuItem</code></li>
1321          * <li><code>ToolItem</code></li>
1322          * </ul>
1323          */
1324         public static final int RADIO = 1 << 4;
1325
1326         /**
1327          * Style constant for check box behavior (value is 1&lt;&lt;5).
1328          * <p><b>Used By:</b></p>
1329          * <ul>
1330          * <li><code>Button</code></li>
1331          * <li><code>MenuItem</code></li>
1332          * <li><code>ToolItem</code></li>
1333          * <li><code>Table</code></li>
1334          * <li><code>Tree</code></li>
1335          * </ul>
1336          */
1337         public static final int CHECK = 1 << 5;
1338
1339         /**
1340          * Style constant for cascade behavior (value is 1&lt;&lt;6).
1341          * <p><b>Used By:</b></p>
1342          * <ul>
1343          * <li><code>MenuItem</code></li>
1344          * </ul>
1345          */
1346         public static final int CASCADE = 1 << 6;
1347
1348         /**
1349          * Style constant for multi-selection behavior in lists
1350          * and multiple line support on text fields (value is 1&lt;&lt;1).
1351          * <p><b>Used By:</b></p>
1352          * <ul>
1353          * <li><code>Text</code></li>
1354          * <li><code>List</code></li>
1355          * <li><code>Table</code></li>
1356          * <li><code>Tree</code></li>
1357          * <li><code>FileDialog</code></li>
1358          * </ul>
1359          */
1360         public static final int MULTI = 1 << 1;
1361
1362         /**
1363          * Style constant for single selection behavior in lists
1364          * and single line support on text fields (value is 1&lt;&lt;2).
1365          * <p><b>Used By:</b></p>
1366          * <ul>
1367          * <li><code>Text</code></li>
1368          * <li><code>List</code></li>
1369          * <li><code>Table</code></li>
1370          * <li><code>Tree</code></li>
1371          * </ul>
1372          */
1373         public static final int SINGLE = 1 << 2;
1374
1375         /**
1376          * Style constant for read-only behavior (value is 1&lt;&lt;3).
1377          * <p><b>Used By:</b></p>
1378          * <ul>
1379          * <li><code>Combo</code></li>
1380          * <li><code>Text</code></li>
1381          * </ul>
1382          */
1383         public static final int READ_ONLY = 1 << 3;
1384
1385         /**
1386          * Style constant for automatic line wrap behavior (value is 1&lt;&lt;6).
1387          * <p><b>Used By:</b></p>
1388          * <ul>
1389          * <li><code>Button</code></li>
1390          * <li><code>Label</code></li>
1391          * <li><code>Text</code></li>
1392          * <li><code>ToolBar</code></li>
1393          * <li><code>Spinner</code></li>
1394          * </ul>
1395          */
1396         public static final int WRAP = 1 << 6;
1397
1398         /**
1399          * Style constant for search behavior (value is 1&lt;&lt;7).
1400          * <p><b>Used By:</b></p>
1401          * <ul>
1402          * <li><code>Text</code></li>
1403          * </ul>
1404          *
1405          * @since 3.3
1406          */
1407         public static final int SEARCH = 1 << 7;
1408
1409         /**
1410          * Style constant for simple (not drop down) behavior (value is 1&lt;&lt;6).
1411          * <br>Note that this is a <em>HINT</em>.
1412          * <p><b>Used By:</b></p>
1413          * <ul>
1414          * <li><code>Combo</code></li>
1415          * </ul>
1416          */
1417         public static final int SIMPLE = 1 << 6;
1418
1419         /**
1420          * Style constant for password behavior (value is 1&lt;&lt;22).
1421          * <p><b>Used By:</b></p>
1422          * <ul>
1423          * <li><code>Text</code></li>
1424          * </ul>
1425          *
1426          * @since 3.0
1427          */
1428         public static final int PASSWORD = 1 << 22;
1429
1430         /**
1431          * Style constant for shadow in behavior (value is 1&lt;&lt;2).
1432          * <br>Note that this is a <em>HINT</em>.
1433          * <p><b>Used By:</b></p>
1434          * <ul>
1435          * <li><code>Label</code></li>
1436          * <li><code>Group</code></li>
1437          * </ul>
1438          */
1439         public static final int SHADOW_IN = 1 << 2;
1440
1441         /**
1442          * Style constant for shadow out behavior (value is 1&lt;&lt;3).
1443          * <br>Note that this is a <em>HINT</em>.
1444          * <p><b>Used By:</b></p>
1445          * <ul>
1446          * <li><code>Label</code></li>
1447          * <li><code>Group</code></li>
1448          * <li><code>ToolBar</code></li>
1449          * </ul>
1450          */
1451         public static final int SHADOW_OUT = 1 << 3;
1452
1453         /**
1454          * Style constant for shadow etched in behavior (value is 1&lt;&lt;4).
1455          * <br>Note that this is a <em>HINT</em>. It is currently ignored on all platforms.
1456          * <p><b>Used By:</b></p>
1457          * <ul>
1458          * <li><code>Group</code></li>
1459          * </ul>
1460          */
1461         public static final int SHADOW_ETCHED_IN = 1 << 4;
1462
1463         /**
1464          * Style constant for shadow etched out behavior (value is 1&lt;&lt;6).
1465          * <br>Note that this is a <em>HINT</em>. It is currently ignored on all platforms.
1466          * <p><b>Used By:</b></p>
1467          * <ul>
1468          * <li><code>Group</code></li>
1469          * </ul>
1470          */
1471         public static final int SHADOW_ETCHED_OUT = 1 << 6;
1472
1473         /**
1474          * Style constant for no shadow behavior (value is 1&lt;&lt;5).
1475          * <br>Note that this is a <em>HINT</em>.
1476          * <p><b>Used By:</b></p>
1477          * <ul>
1478          * <li><code>Label</code></li>
1479          * <li><code>Group</code></li>
1480          * </ul>
1481          */
1482         public static final int SHADOW_NONE = 1 << 5;
1483
1484         /**
1485          * Style constant for progress bar behavior (value is 1&lt;&lt;1).
1486          * <p><b>Used By:</b></p>
1487          * <ul>
1488          * <li><code>ProgressBar</code></li>
1489          * </ul>
1490          */
1491         public static final int INDETERMINATE = 1 << 1;
1492
1493         /**
1494          * Style constant for tool window behavior (value is 1&lt;&lt;2).
1495          * <p>
1496          * A tool window is a window intended to be used as a floating toolbar.
1497          * It typically has a title bar that is shorter than a normal title bar,
1498          * and the window title is typically drawn using a smaller font.
1499          * <br>Note that this is a <em>HINT</em>.
1500          * </p><p><b>Used By:</b></p>
1501          * <ul>
1502          * <li><code>Decorations</code> and subclasses</li>
1503          * </ul>
1504          */
1505         public static final int TOOL = 1 << 2;
1506
1507         /**
1508          * Style constant to ensure no trimmings are used (value is 1&lt;&lt;3).
1509          * <br>Note that this overrides all other trim styles.
1510          * <p><b>Used By:</b></p>
1511          * <ul>
1512          * <li><code>Decorations</code> and subclasses</li>
1513          * </ul>
1514          */
1515         public static final int NO_TRIM = 1 << 3;
1516
1517         /**
1518          * Style constant for resize box trim (value is 1&lt;&lt;4).
1519          * <p><b>Used By:</b></p>
1520          * <ul>
1521          * <li><code>Decorations</code> and subclasses</li>
1522          * <li><code>Tracker</code></li>
1523          * </ul>
1524          */
1525         public static final int RESIZE = 1 << 4;
1526
1527         /**
1528          * Style constant for title area trim (value is 1&lt;&lt;5).
1529          * <p><b>Used By:</b></p>
1530          * <ul>
1531          * <li><code>Decorations</code> and subclasses</li>
1532          * </ul>
1533          */
1534         public static final int TITLE = 1 << 5;
1535
1536         /**
1537          * Style constant for close box trim (value is 1&lt;&lt;6,
1538          * since we do not distinguish between CLOSE style and MENU style).
1539          * <p><b>Used By:</b></p>
1540          * <ul>
1541          * <li><code>Decorations</code> and subclasses</li>
1542          * </ul>
1543          */
1544         public static final int CLOSE = 1 << 6;
1545
1546         /**
1547          * Style constant for shell menu trim (value is 1&lt;&lt;6,
1548          * since we do not distinguish between CLOSE style and MENU style).
1549          * <p><b>Used By:</b></p>
1550          * <ul>
1551          * <li><code>Decorations</code> and subclasses</li>
1552          * </ul>
1553          */
1554         public static final int MENU = CLOSE;
1555
1556         /**
1557          * Style constant for minimize box trim (value is 1&lt;&lt;7).
1558          * <p><b>Used By:</b></p>
1559          * <ul>
1560          * <li><code>Decorations</code> and subclasses</li>
1561          * </ul>
1562          */
1563         public static final int MIN = 1 << 7;
1564
1565         /**
1566          * Style constant for maximize box trim (value is 1&lt;&lt;10).
1567          * <p><b>Used By:</b></p>
1568          * <ul>
1569          * <li><code>Decorations</code> and subclasses</li>
1570          * </ul>
1571          */
1572         public static final int MAX = 1 << 10;
1573
1574         /**
1575          * Style constant for the no move behavior (value is 1&lt;&lt;23).
1576          * Creates the title trim when no other trim style is specified.
1577          * Doesn't create the title trim when NO_TRIM is specified.
1578          * <p>Note that this is a <em>HINT</em>.
1579          * <p><b>Used By:</b></p>
1580          * <ul>
1581          * <li><code>Shell</code></li>
1582          * </ul>
1583          * @since 3.105
1584          */
1585         public static final int NO_MOVE = 1 << 23;
1586
1587         /**
1588          * Style constant for horizontal scrollbar behavior (value is 1&lt;&lt;8).
1589          * <p><b>Used By:</b></p>
1590          * <ul>
1591          * <li><code>Scrollable</code> and subclasses</li>
1592          * </ul>
1593          */
1594         public static final int H_SCROLL = 1 << 8;
1595
1596         /**
1597          * Style constant for vertical scrollbar behavior (value is 1&lt;&lt;9).
1598          * <p><b>Used By:</b></p>
1599          * <ul>
1600          * <li><code>Scrollable</code> and subclasses</li>
1601          * </ul>
1602          */
1603         public static final int V_SCROLL = 1 << 9;
1604
1605         /**
1606          * Style constant for no scrollbar behavior (value is 1&lt;&lt;4).
1607          * <p>
1608          * When neither H_SCROLL or V_SCROLL are specified, controls
1609          * are free to create the default scroll bars for the control.
1610          * Using NO_SCROLL overrides the default and forces the control
1611          * to have no scroll bars.
1612          *
1613          * <b>Used By:</b></p>
1614          * <ul>
1615          * <li><code>Tree</code></li>
1616          * <li><code>Table</code></li>
1617          * </ul>
1618          *
1619          * @since 3.4
1620          */
1621         public static final int NO_SCROLL = 1 << 4;
1622
1623         /**
1624          * Style constant for bordered behavior (value is 1&lt;&lt;11).
1625          * <br>Note that this is a <em>HINT</em>.
1626          * <p><b>Used By:</b></p>
1627          * <ul>
1628          * <li><code>Control</code> and subclasses</li>
1629          * </ul>
1630          */
1631         public static final int BORDER = 1 << 11;
1632
1633         /**
1634          * Style constant indicating that the window manager should clip
1635          * a widget's children with respect to its viewable area. (value is 1&lt;&lt;12).
1636          * <br>Note that this is a <em>HINT</em>.
1637          * <p><b>Used By:</b></p>
1638          * <ul>
1639          * <li><code>Control</code> and subclasses</li>
1640          * </ul>
1641          */
1642         public static final int CLIP_CHILDREN = 1 << 12;
1643
1644         /**
1645          * Style constant indicating that the window manager should clip
1646          * a widget's siblings with respect to its viewable area. (value is 1&lt;&lt;13).
1647          * <br>Note that this is a <em>HINT</em>.
1648          * <p><b>Used By:</b></p>
1649          * <ul>
1650          * <li><code>Control</code> and subclasses</li>
1651          * </ul>
1652          */
1653         public static final int CLIP_SIBLINGS = 1 << 13;
1654
1655         /**
1656          * Style constant for always on top behavior (value is 1&lt;&lt;14).
1657          * <br>Note that this is a <em>HINT</em>.
1658          * <p><b>Used By:</b></p>
1659          * <ul>
1660          * <li><code>Shell</code> and subclasses</li>
1661          * </ul>
1662          */
1663         public static final int ON_TOP = 1 << 14;
1664
1665         /**
1666          * Style constant for sheet window behavior (value is 1&lt;&lt;28).
1667          * <p>
1668          * A sheet window is a window intended to be used as a temporary modal
1669          * dialog that is attached to a parent window. It is typically used to
1670          * prompt the user before proceeding. The window trim, positioning and
1671          * general look of a sheet window is platform specific. For example,
1672          * on the Macintosh, at the time this documentation was written, the
1673          * window title is not visible.
1674          * <br>Note that this is a <em>HINT</em>.
1675          * </p><p><b>Used By:</b></p>
1676          * <ul>
1677          * <li><code>Dialog</code> and subclasses</li>
1678          * <li><code>Shell</code> and subclasses</li>
1679          * </ul>
1680          *
1681          * @since 3.5
1682          */
1683         public static final int SHEET = 1 << 28;
1684
1685         /**
1686          * Trim style convenience constant for the most common top level shell appearance
1687          * (value is CLOSE|TITLE|MIN|MAX|RESIZE).
1688          * <p><b>Used By:</b></p>
1689          * <ul>
1690          * <li><code>Shell</code></li>
1691          * </ul>
1692          */
1693         public static final int SHELL_TRIM = CLOSE | TITLE | MIN | MAX | RESIZE;
1694
1695         /**
1696          * Trim style convenience constant for the most common dialog shell appearance
1697          * (value is CLOSE|TITLE|BORDER).
1698          * <p><b>Used By:</b></p>
1699          * <ul>
1700          * <li><code>Shell</code></li>
1701          * </ul>
1702          */
1703         public static final int DIALOG_TRIM = TITLE | CLOSE | BORDER;
1704
1705         /**
1706          * Style constant for modeless behavior (value is 0).
1707          * <br>Note that this is a <em>HINT</em>.
1708          * <p><b>Used By:</b></p>
1709          * <ul>
1710          * <li><code>Dialog</code></li>
1711          * <li><code>Shell</code></li>
1712          * </ul>
1713          */
1714         public static final int MODELESS = 0;
1715
1716         /**
1717          * Style constant for primary modal behavior (value is 1&lt;&lt;15).
1718          * <br>Note that this is a <em>HINT</em>.
1719          * <p><b>Used By:</b></p>
1720          * <ul>
1721          * <li><code>Dialog</code></li>
1722          * <li><code>Shell</code></li>
1723          * </ul>
1724          */
1725         public static final int PRIMARY_MODAL = 1 << 15;
1726
1727         /**
1728          * Style constant for application modal behavior (value is 1&lt;&lt;16).
1729          * <br>Note that this is a <em>HINT</em>.
1730          * <p><b>Used By:</b></p>
1731          * <ul>
1732          * <li><code>Dialog</code></li>
1733          * <li><code>Shell</code></li>
1734          * </ul>
1735          */
1736         public static final int APPLICATION_MODAL = 1 << 16;
1737
1738         /**
1739          * Style constant for system modal behavior (value is 1&lt;&lt;17).
1740          * <br>Note that this is a <em>HINT</em>.
1741          * <p><b>Used By:</b></p>
1742          * <ul>
1743          * <li><code>Dialog</code></li>
1744          * <li><code>Shell</code></li>
1745          * </ul>
1746          */
1747         public static final int SYSTEM_MODAL = 1 << 17;
1748
1749         /**
1750          * Style constant for selection hiding behavior when the widget loses focus (value is 1&lt;&lt;15).
1751          * <br>Note that this is a <em>HINT</em>.
1752          * <p><b>Used By:</b></p>
1753          * <ul>
1754          * <li><code>Table</code></li>
1755          * </ul>
1756          */
1757         public static final int HIDE_SELECTION = 1 << 15;
1758
1759         /**
1760          * Style constant for full row selection behavior and
1761          * selection constant indicating that a full line should be
1762          * drawn. (value is 1&lt;&lt;16).
1763          * <br>Note that for some widgets this is a <em>HINT</em>.
1764          * <p><b>Used By:</b></p>
1765          * <ul>
1766          * <li><code>Table</code></li>
1767          * <li><code>Tree</code></li>
1768          * <li><code>StyledText</code></li>
1769          * <li><code>TextLayout</code></li>
1770          * </ul>
1771          */
1772         public static final int FULL_SELECTION = 1 << 16;
1773
1774         /**
1775          * Style constant for flat appearance. (value is 1&lt;&lt;23).
1776          * <br>Note that this is a <em>HINT</em>.
1777          * <p><b>Used By:</b></p>
1778          * <ul>
1779          * <li><code>Button</code></li>
1780          * <li><code>ToolBar</code></li>
1781          * </ul>
1782          */
1783         public static final int FLAT = 1 << 23;
1784
1785         /**
1786          * Style constant for smooth appearance. (value is 1&lt;&lt;16).
1787          * <br>Note that this is a <em>HINT</em>.
1788          * <p><b>Used By:</b></p><ul>
1789          * <li><code>ProgressBar</code></li>
1790          * <li><code>Sash</code></li>
1791          * </ul>
1792          */
1793         public static final int SMOOTH = 1 << 16;
1794
1795         /**
1796          * Style constant for no background behavior (value is 1&lt;&lt;18).
1797          * <p>
1798          * By default, before a widget paints, the client area is filled with the current background.
1799          * When this style is specified, the background is not filled, and the application is responsible
1800          * for filling every pixel of the client area.
1801          * This style might be used as an alternative to "double-buffering" in order to reduce flicker.
1802          * This style does not mean "transparent" - widgets that are obscured will not draw through.
1803          * </p><p><b>Used By:</b></p>
1804          * <ul>
1805          * <li><code>Composite</code></li>
1806          * </ul>
1807          */
1808         public static final int NO_BACKGROUND = 1 << 18;
1809
1810         /**
1811          * Style constant for no focus from the mouse behavior (value is 1&lt;&lt;19).
1812          * <p>
1813          * Normally, when the user clicks on a control, focus is assigned to that
1814          * control, providing the control has no children.  Some controls, such as
1815          * tool bars and sashes, don't normally take focus when the mouse is clicked
1816          * or accept focus when assigned from within the program.  This style allows
1817          * Composites to implement "no focus" mouse behavior.
1818          *
1819          * <br>Note that this is a <em>HINT</em>.
1820          * </p>
1821          * <p><b>Used By:</b></p>
1822          * <ul>
1823          * <li><code>Composite</code></li>
1824          * </ul>
1825          */
1826         public static final int NO_FOCUS = 1 << 19;
1827
1828         /**
1829          * Style constant for no redraw on resize behavior (value is 1&lt;&lt;20).
1830          * <p>
1831          * This style stops the entire client area from being invalidated when the size
1832          * of the Canvas changes. Specifically, when the size of the Canvas gets smaller,
1833          * the SWT.Paint event is not sent. When it gets bigger, an SWT.Paint event is
1834          * sent with a GC clipped to only the new areas to be painted. Without this
1835          * style, the entire client area will be repainted.
1836          *
1837          * <br>Note that this is a <em>HINT</em>.
1838          * </p><p><b>Used By:</b></p>
1839          * <ul>
1840          * <li><code>Composite</code></li>
1841          * </ul>
1842          */
1843         public static final int NO_REDRAW_RESIZE = 1 << 20;
1844
1845         /**
1846          * Style constant for no paint event merging behavior (value is 1&lt;&lt;21).
1847          *
1848          * <br>Note that this is a <em>HINT</em>.
1849          * <p><b>Used By:</b></p>
1850          * <ul>
1851          * <li><code>Composite</code></li>
1852          * </ul>
1853          */
1854         public static final int NO_MERGE_PAINTS = 1 << 21;
1855
1856         /**
1857          * Style constant for preventing child radio group behavior (value is 1&lt;&lt;22).
1858          * <p><b>Used By:</b></p>
1859          * <ul>
1860          * <li><code>Composite</code></li>
1861          * <li><code>Menu</code></li>
1862          * </ul>
1863          */
1864         public static final int NO_RADIO_GROUP = 1 << 22;
1865
1866         /**
1867          * Style constant for left to right orientation (value is 1&lt;&lt;25).
1868          * <p>
1869          * When orientation is not explicitly specified, orientation is
1870          * inherited.  This means that children will be assigned the
1871          * orientation of their parent.  To override this behavior and
1872          * force an orientation for a child, explicitly set the orientation
1873          * of the child when that child is created.
1874          * <br>Note that this is a <em>HINT</em>.
1875          * </p>
1876          * <p><b>Used By:</b></p>
1877          * <ul>
1878          * <li><code>Control</code></li>
1879          * <li><code>Menu</code></li>
1880          * <li><code>GC</code></li>
1881          * </ul>
1882          *
1883          * @since 2.1.2
1884          */
1885         public static final int LEFT_TO_RIGHT = 1 << 25;
1886
1887         /**
1888          * Style constant for right to left orientation (value is 1&lt;&lt;26).
1889          * <p>
1890          * When orientation is not explicitly specified, orientation is
1891          * inherited.  This means that children will be assigned the
1892          * orientation of their parent.  To override this behavior and
1893          * force an orientation for a child, explicitly set the orientation
1894          * of the child when that child is created.
1895          * <br>Note that this is a <em>HINT</em>.
1896          * </p>
1897          * <p><b>Used By:</b></p>
1898          * <ul>
1899          * <li><code>Control</code></li>
1900          * <li><code>Menu</code></li>
1901          * <li><code>GC</code></li>
1902          * </ul>
1903          *
1904          * @since 2.1.2
1905          */
1906         public static final int RIGHT_TO_LEFT = 1 << 26;
1907
1908         /**
1909          * Style constant to indicate coordinate mirroring (value is 1&lt;&lt;27).
1910          * <p><b>Used By:</b></p>
1911          * <ul>
1912          * <li><code>Control</code></li>
1913          * <li><code>Menu</code></li>
1914          * </ul>
1915          *
1916          * @since 2.1.2
1917          */
1918         public static final int MIRRORED = 1 << 27;
1919
1920         /**
1921          * Style constant to allow embedding (value is 1&lt;&lt;24).
1922          * <p><b>Used By:</b></p>
1923          * <ul>
1924          * <li><code>Composite</code></li>
1925          * </ul>
1926          *
1927          * @since 3.0
1928          */
1929         public static final int EMBEDDED = 1 << 24;
1930
1931         /**
1932          * Style constant to allow virtual data (value is 1&lt;&lt;28).
1933          * <p><b>Used By:</b></p>
1934          * <ul>
1935          * <li><code>Table</code></li>
1936          * <li><code>Tree</code></li>
1937          * </ul>
1938          *
1939          * @since 3.0
1940          */
1941         public static final int VIRTUAL = 1 << 28;
1942
1943         /**
1944          * Style constant to indicate double buffering (value is 1&lt;&lt;29).
1945          * <p><b>Used By:</b></p>
1946          * <ul>
1947          * <li><code>Control</code></li>
1948          * </ul>
1949          *
1950          * @since 3.1
1951          */
1952         public static final int DOUBLE_BUFFERED = 1 << 29;
1953
1954         /**
1955          * Style constant for transparent behavior (value is 1&lt;&lt;30).
1956          * <p>
1957          * By default, before a widget paints, the client area is filled with the current background.
1958          * When this style is specified, the background is not filled and widgets that are obscured
1959          * will draw through.
1960          * </p><p><b>Used By:</b></p>
1961          * <ul>
1962          * <li><code>Composite</code></li>
1963          * </ul>
1964          *
1965          * @since 3.4
1966          *
1967          * WARNING: THIS API IS UNDER CONSTRUCTION AND SHOULD NOT BE USED
1968          */
1969         public static final int TRANSPARENT = 1 << 30;
1970
1971         /**
1972          * Style constant to indicate base text direction (value is 1&lt;&lt;31).
1973          * <p>
1974          * When the bit is set, text direction mismatches the widget orientation.
1975          * <br>Note that this is a <em>HINT</em>.
1976          * </p>
1977          * <p><b>Used By:</b></p>
1978          * <ul>
1979          * <li><code>Control</code></li>
1980          * </ul>
1981          *
1982          * @see org.eclipse.swt.widgets.Control#setTextDirection(int)
1983          * @see org.eclipse.swt.widgets.Control#getTextDirection()
1984          *
1985          * @since 3.102
1986          */
1987         public static final int FLIP_TEXT_DIRECTION = 1 << 31;
1988
1989         /**
1990          * A bit mask to indicate Bidi "auto" text direction.
1991          * <p>
1992          * When the bit is set, text direction is derived from the direction of the
1993          * first strong Bidi character.
1994          * </p>
1995          * <br>Note that this is a <em>HINT</em> and it works on Windows only.
1996          * <p><b>Used By:</b></p>
1997          * <ul>
1998          * <li><code>Control</code></li>
1999          * <li><code>TextLayout</code></li>
2000          * </ul>
2001          *
2002          * @see org.eclipse.swt.widgets.Control#setTextDirection(int)
2003          * @see org.eclipse.swt.graphics.TextLayout#setTextDirection(int)
2004          *
2005          * @since 3.105
2006         */
2007         public static final int AUTO_TEXT_DIRECTION = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
2008
2009         /**
2010          * Style constant for align up behavior (value is 1&lt;&lt;7,
2011          * since align UP and align TOP are considered the same).
2012          * <p><b>Used By:</b></p>
2013          * <ul>
2014          * <li><code>Button</code> with <code>ARROW</code> style</li>
2015          * <li><code>Tracker</code></li>
2016          * <li><code>Table</code></li>
2017          * <li><code>Tree</code></li>
2018          * </ul>
2019          */
2020         public static final int UP = 1 << 7;
2021
2022         /**
2023          * Style constant to indicate single underline (value is 0).
2024          * <p><b>Used By:</b></p>
2025          * <ul>
2026          * <li><code>TextStyle</code></li>
2027          * </ul>
2028          *
2029          * @since 3.4
2030          */
2031         public static final int UNDERLINE_SINGLE = 0;
2032
2033         /**
2034          * Style constant to indicate double underline (value is 1).
2035          * <p><b>Used By:</b></p>
2036          * <ul>
2037          * <li><code>TextStyle</code></li>
2038          * </ul>
2039          *
2040          * @since 3.4
2041          */
2042         public static final int UNDERLINE_DOUBLE = 1;
2043
2044         /**
2045          * Style constant to indicate error underline (value is 2).
2046          * <p><b>Used By:</b></p>
2047          * <ul>
2048          * <li><code>TextStyle</code></li>
2049          * </ul>
2050          *
2051          * @since 3.4
2052          */
2053         public static final int UNDERLINE_ERROR = 2;
2054
2055         /**
2056          * Style constant to indicate squiggle underline (value is 3).
2057          * <p><b>Used By:</b></p>
2058          * <ul>
2059          * <li><code>TextStyle</code></li>
2060          * </ul>
2061          *
2062          * @since 3.4
2063          */
2064         public static final int UNDERLINE_SQUIGGLE = 3;
2065
2066         /**
2067          * Style constant to indicate link underline (value is 0).
2068          * <p>
2069          * If the text color or the underline color are not set in the range
2070          * the usage of <code>UNDERLINE_LINK</code> will change these colors
2071          * to the preferred link color of the platform.<br>
2072          * Note that clients that use this style, such as <code>StyledText</code>,
2073          * will include code to track the mouse and change the cursor to the hand
2074          * cursor when mouse is over the link.
2075          * </p>
2076          * <p><b>Used By:</b></p>
2077          * <ul>
2078          * <li><code>TextStyle</code></li>
2079          * </ul>
2080          *
2081          * @since 3.5
2082          */
2083         public static final int UNDERLINE_LINK = 4;
2084
2085         /**
2086          * Style constant to indicate solid border (value is 1).
2087          * <p><b>Used By:</b></p>
2088          * <ul>
2089          * <li><code>TextStyle</code></li>
2090          * </ul>
2091          *
2092          * @since 3.4
2093          */
2094         public static final int BORDER_SOLID = 1;
2095
2096         /**
2097          * Style constant to indicate dashed border (value is 2).
2098          * <p><b>Used By:</b></p>
2099          * <ul>
2100          * <li><code>TextStyle</code></li>
2101          * </ul>
2102          *
2103          * @since 3.4
2104          */
2105         public static final int BORDER_DASH = 2;
2106
2107         /**
2108          * Style constant to indicate dotted border (value is 4).
2109          * <p><b>Used By:</b></p>
2110          * <ul>
2111          * <li><code>TextStyle</code></li>
2112          * </ul>
2113          *
2114          * @since 3.4
2115          */
2116         public static final int BORDER_DOT = 4;
2117
2118         /**
2119          * Style constant for align top behavior (value is 1&lt;&lt;7,
2120          * since align UP and align TOP are considered the same).
2121          * <p><b>Used By:</b></p>
2122          * <ul>
2123          * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
2124          * </ul>
2125          */
2126         public static final int TOP = UP;
2127
2128         /**
2129          * Style constant for align down behavior (value is 1&lt;&lt;10,
2130          * since align DOWN and align BOTTOM are considered the same).
2131          * <p><b>Used By:</b></p>
2132          * <ul>
2133          * <li><code>Button</code> with <code>ARROW</code> style</li>
2134          * <li><code>Tracker</code></li>
2135          * <li><code>Table</code></li>
2136          * <li><code>Tree</code></li>
2137          * </ul>
2138          */
2139         public static final int DOWN               = 1 << 10;
2140
2141         /**
2142          * Style constant for align bottom behavior (value is 1&lt;&lt;10,
2143          * since align DOWN and align BOTTOM are considered the same).
2144          * <p><b>Used By:</b></p>
2145          * <ul>
2146          * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
2147          * <li><code>TabFolder</code></li>
2148          * </ul>
2149          */
2150         public static final int BOTTOM             = DOWN;
2151
2152         /**
2153          * Style constant for leading alignment (value is 1&lt;&lt;14).
2154          * <p><b>Used By:</b></p>
2155          * <ul>
2156          * <li><code>Button</code></li>
2157          * <li><code>Label</code></li>
2158          * <li><code>Text</code></li>
2159          * <li><code>TableColumn</code></li>
2160          * <li><code>TreeColumn</code></li>
2161          * <li><code>Tracker</code></li>
2162          * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
2163          * </ul>
2164          *
2165          * @since 2.1.2
2166          */
2167         public static final int LEAD               = 1 << 14;
2168
2169         /**
2170          * Style constant for align left behavior (value is 1&lt;&lt;14).
2171          * This is a synonym for {@link #LEAD} (value is 1&lt;&lt;14).  Newer
2172          * applications should use {@link #LEAD} instead of {@link #LEFT} to make code more
2173          * understandable on right-to-left platforms.
2174          * <p>
2175          * This constant can also be used to representing the left keyboard
2176          * location during a key event.
2177          * </p>
2178          */
2179         public static final int LEFT               = LEAD;
2180
2181         /**
2182          * Style constant for trailing alignment (value is 1&lt;&lt;17).
2183          * <p><b>Used By:</b></p>
2184          * <ul>
2185          * <li><code>Button</code></li>
2186          * <li><code>Label</code></li>
2187          * <li><code>Text</code></li>
2188          * <li><code>TableColumn</code></li>
2189          * <li><code>TreeColumn</code></li>
2190          * <li><code>Tracker</code></li>
2191          * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
2192          * </ul>
2193          *
2194          * @since 2.1.2
2195          */
2196         public static final int TRAIL              = 1 << 17;
2197
2198         /**
2199          * Style constant for align right behavior (value is 1&lt;&lt;17).
2200          * This is a synonym for {@link #TRAIL} (value is 1&lt;&lt;17).  Newer
2201          * applications should use {@link #TRAIL} instead of {@link #RIGHT} to make code more
2202          * understandable on right-to-left platforms.
2203          * <p>
2204          * This constant can also be used to representing the right keyboard
2205          * location during a key event.
2206          * </p>
2207          */
2208         public static final int RIGHT              = TRAIL;
2209
2210         /**
2211          * Style constant for align center behavior (value is 1&lt;&lt;24).
2212          * <p><b>Used By:</b></p>
2213          * <ul>
2214          * <li><code>Button</code></li>
2215          * <li><code>Label</code></li>
2216          * <li><code>TableColumn</code></li>
2217          * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
2218          * </ul>
2219          */
2220         public static final int CENTER = 1 << 24;
2221
2222         /**
2223          * Style constant for horizontal alignment or orientation behavior (value is 1&lt;&lt;8).
2224          * <p><b>Used By:</b></p>
2225          * <ul>
2226          * <li><code>Label</code></li>
2227          * <li><code>ProgressBar</code></li>
2228          * <li><code>Sash</code></li>
2229          * <li><code>Scale</code></li>
2230          * <li><code>ScrollBar</code></li>
2231          * <li><code>Slider</code></li>
2232          * <li><code>ToolBar</code></li>
2233          * <li><code>FillLayout</code> type</li>
2234          * <li><code>RowLayout</code> type</li>
2235          * </ul>
2236          */
2237         public static final int HORIZONTAL = 1 << 8;
2238
2239         /**
2240          * Style constant for vertical alignment or orientation behavior (value is 1&lt;&lt;9).
2241          * <p><b>Used By:</b></p>
2242          * <ul>
2243          * <li><code>Label</code></li>
2244          * <li><code>ProgressBar</code></li>
2245          * <li><code>Sash</code></li>
2246          * <li><code>Scale</code></li>
2247          * <li><code>ScrollBar</code></li>
2248          * <li><code>Slider</code></li>
2249          * <li><code>ToolBar</code></li>
2250          * <li><code>CoolBar</code></li>
2251          * <li><code>FillLayout</code> type</li>
2252          * <li><code>RowLayout</code> type</li>
2253          * </ul>
2254          */
2255         public static final int VERTICAL = 1 << 9;
2256
2257         /**
2258          * Style constant for date display (value is 1&lt;&lt;5).
2259          * <p><b>Used By:</b></p>
2260          * <ul>
2261          * <li><code>DateTime</code></li>
2262          * </ul>
2263          *
2264          * @since 3.3
2265          */
2266         public static final int DATE = 1 << 5;
2267
2268         /**
2269          * Style constant for time display (value is 1&lt;&lt;7).
2270          * <p><b>Used By:</b></p>
2271          * <ul>
2272          * <li><code>DateTime</code></li>
2273          * </ul>
2274          *
2275          * @since 3.3
2276          */
2277         public static final int TIME = 1 << 7;
2278
2279         /**
2280          * Style constant for calendar display (value is 1&lt;&lt;10).
2281          * <p><b>Used By:</b></p>
2282          * <ul>
2283          * <li><code>DateTime</code></li>
2284          * </ul>
2285          *
2286          * @since 3.3
2287          */
2288         public static final int CALENDAR = 1 << 10;
2289
2290         /**
2291          * Style constant for displaying week numbers in the calendar.
2292          * <br>Note that this is a <em>HINT</em> and is supported on Windows &amp; GTK platforms only.
2293          * <p><b>Used By:</b></p>
2294          * <ul>
2295          * <li><code>DateTime</code></li>
2296          * </ul>
2297          *
2298          * @since 3.108
2299          */
2300         public static final int CALENDAR_WEEKNUMBERS = 1 << 14;
2301
2302         /**
2303          * Style constant for short date/time format (value is 1&lt;&lt;15).
2304          * <p>
2305          * A short date displays the month and year.
2306          * A short time displays hours and minutes.
2307          * <br>Note that this is a <em>HINT</em>.
2308          * </p>
2309          * <p><b>Used By:</b></p>
2310          * <ul>
2311          * <li><code>DateTime</code></li>
2312          * </ul>
2313          *
2314          * @since 3.3
2315          */
2316         public static final int SHORT = 1 << 15;
2317
2318         /**
2319          * Style constant for medium date/time format (value is 1&lt;&lt;16).
2320          * <p>
2321          * A medium date displays the day, month and year.
2322          * A medium time displays hours, minutes, and seconds.
2323          * <br>Note that this is a <em>HINT</em>.
2324          * </p>
2325          * <p><b>Used By:</b></p>
2326          * <ul>
2327          * <li><code>DateTime</code></li>
2328          * </ul>
2329          *
2330          * @since 3.3
2331          */
2332         public static final int MEDIUM = 1 << 16;
2333
2334         /**
2335          * Style constant for long date/time format (value is 1&lt;&lt;28).
2336          * <p>
2337          * A long date displays the day, month and year.
2338          * A long time displays hours, minutes, and seconds.
2339          * The day and month names may be displayed.
2340          * <br>Note that this is a <em>HINT</em>.
2341          * </p>
2342          * <p><b>Used By:</b></p>
2343          * <ul>
2344          * <li><code>DateTime</code></li>
2345          * </ul>
2346          *
2347          * @since 3.3
2348          */
2349         public static final int LONG = 1 << 28;
2350
2351         /**
2352          * Style constant specifying that a Browser should use a Mozilla GRE
2353          * for rendering its content (value is 1&lt;&lt;15).
2354          * <p><b>Used By:</b></p>
2355          * <ul>
2356          * <li><code>Browser</code></li>
2357          * </ul>
2358          *
2359          * @since 3.3
2360          * @deprecated This style is deprecated and will be removed in the future.
2361          *             XULRunner as a browser renderer is no longer supported. Use
2362          *             <code>SWT.WEBKIT</code> or <code>SWT.NONE</code> instead.
2363          */
2364         @Deprecated
2365         public static final int MOZILLA = 1 << 15;
2366
2367         /**
2368          * Style constant specifying that a Browser should use WebKit
2369          * for rendering its content (value is 1&lt;&lt;16).
2370          * <p><b>Used By:</b></p>
2371          * <ul>
2372          * <li><code>Browser</code></li>
2373          * </ul>
2374          *
2375          * @since 3.7
2376          */
2377         public static final int WEBKIT = 1 << 16;
2378
2379         /**
2380          * Style constant for balloon behavior (value is 1&lt;&lt;12).
2381          * <p><b>Used By:</b></p>
2382          * <ul>
2383          * <li><code>ToolTip</code></li>
2384          * </ul>
2385          *
2386          * @since 3.2
2387          */
2388         public static final int BALLOON = 1 << 12;
2389
2390         /**
2391          * Style constant for vertical alignment or orientation behavior (value is 1).
2392          * <p><b>Used By:</b></p>
2393          * <ul>
2394          * <li><code>GridLayout</code> type</li>
2395          * </ul>
2396          */
2397         public static final int BEGINNING = 1;
2398
2399         /**
2400          * Style constant for vertical alignment or orientation behavior (value is 4).
2401          * <p><b>Used By:</b></p>
2402          * <ul>
2403          * <li><code>GridLayout</code> type</li>
2404          * </ul>
2405          */
2406         public static final int FILL = 4;
2407
2408         /**
2409          * Input Method Editor style constant for double byte
2410          * input behavior (value is 1&lt;&lt;1).
2411          */
2412         public static final int DBCS = 1 << 1;
2413
2414         /**
2415          * Input Method Editor style constant for alpha
2416          * input behavior (value is 1&lt;&lt;2).
2417          */
2418         public static final int ALPHA = 1 << 2;
2419
2420         /**
2421          * Input Method Editor style constant for native
2422          * input behavior (value is 1&lt;&lt;3).
2423          */
2424         public static final int NATIVE = 1 << 3;
2425
2426         /**
2427          * Input Method Editor style constant for phonetic
2428          * input behavior (value is 1&lt;&lt;4).
2429          */
2430         public static final int PHONETIC = 1 << 4;
2431
2432         /**
2433          * Input Method Editor style constant for romanicized
2434          * input behavior (value is 1&lt;&lt;5).
2435          */
2436         public static final int ROMAN = 1 << 5;
2437
2438         /**
2439          * ASCII character convenience constant for the backspace character
2440          * (value is the <code>char</code> '\b').
2441          */
2442         public static final char BS = '\b';
2443
2444         /**
2445          * ASCII character convenience constant for the carriage return character
2446          * (value is the <code>char</code> '\r').
2447          */
2448         public static final char CR = '\r';
2449
2450         /**
2451          * ASCII character convenience constant for the delete character
2452          * (value is the <code>char</code> with value 127).
2453          */
2454         public static final char DEL = 0x7F;
2455
2456         /**
2457          * ASCII character convenience constant for the escape character
2458          * (value is the <code>char</code> with value 27).
2459          */
2460         public static final char ESC = 0x1B;
2461
2462         /**
2463          * ASCII character convenience constant for the line feed character
2464          * (value is the <code>char</code> '\n').
2465          */
2466         public static final char LF = '\n';
2467
2468         /**
2469          * ASCII character convenience constant for the tab character
2470          * (value is the <code>char</code> '\t').
2471          *
2472          * @since 2.1
2473          */
2474         public static final char TAB = '\t';
2475
2476         /**
2477          * ASCII character convenience constant for the space character
2478          * (value is the <code>char</code> ' ').
2479          *
2480          * @since 3.7
2481          */
2482         public static final char SPACE = ' ';
2483
2484         /**
2485          * Keyboard and/or mouse event mask indicating that the ALT_GR key
2486          * was pushed on the keyboard when the event was generated
2487          * (value is 1 &lt;&lt; 15).
2488          *
2489          * @since 3.108
2490          */
2491         public static final int ALT_GR = 1 << 15;
2492
2493         /**
2494          * keyboard and/or mouse event mask indicating that the ALT key
2495          * was pushed on the keyboard when the event was generated
2496          * (value is 1&lt;&lt;16).
2497          */
2498         public static final int ALT = 1 << 16;
2499
2500         /**
2501          * Keyboard and/or mouse event mask indicating that the SHIFT key
2502          * was pushed on the keyboard when the event was generated
2503          * (value is 1&lt;&lt;17).
2504          */
2505         public static final int SHIFT = 1 << 17;
2506
2507         /**
2508          * Keyboard and/or mouse event mask indicating that the CTRL key
2509          * was pushed on the keyboard when the event was generated
2510          * (value is 1&lt;&lt;18).
2511          */
2512         public static final int CTRL = 1 << 18;
2513
2514         /**
2515          * Keyboard and/or mouse event mask indicating that the CTRL key
2516          * was pushed on the keyboard when the event was generated. This
2517          * is a synonym for CTRL (value is 1&lt;&lt;18).
2518          */
2519         public static final int CONTROL = CTRL;
2520
2521         /**
2522          * Keyboard and/or mouse event mask indicating that the COMMAND key
2523          * was pushed on the keyboard when the event was generated
2524          * (value is 1&lt;&lt;22).
2525          *
2526          * @since 2.1
2527          */
2528         public static final int COMMAND = 1 << 22;
2529
2530         /**
2531          * Keyboard and/or mouse event mask indicating all possible
2532          * keyboard modifiers.
2533          *
2534          * To allow for the future, this mask  is intended to be used in
2535          * place of code that references  each individual keyboard mask.
2536          *  For example, the following expression will determine whether
2537          * any modifier is pressed and will continue to work as new modifier
2538          * masks are added.
2539          *
2540          * <code>(stateMask &amp; SWT.MODIFIER_MASK) != 0</code>.
2541          *
2542          * @since 2.1
2543          */
2544         public static final int MODIFIER_MASK;
2545
2546         /**
2547          * Keyboard and/or mouse event mask indicating that mouse button one (usually 'left')
2548          * was pushed when the event was generated. (value is 1&lt;&lt;19).
2549          */
2550         public static final int BUTTON1 = 1 << 19;
2551
2552         /**
2553          * Keyboard and/or mouse event mask indicating that mouse button two (usually 'middle')
2554          * was pushed when the event was generated. (value is 1&lt;&lt;20).
2555          */
2556         public static final int BUTTON2 = 1 << 20;
2557
2558         /**
2559          * Keyboard and/or mouse event mask indicating that mouse button three (usually 'right')
2560          * was pushed when the event was generated. (value is 1&lt;&lt;21).
2561          */
2562         public static final int BUTTON3 = 1 << 21;
2563
2564         /**
2565          * Keyboard and/or mouse event mask indicating that mouse button four
2566          * was pushed when the event was generated. (value is 1&lt;&lt;23).
2567          *
2568          * @since 3.1
2569          */
2570         public static final int BUTTON4 = 1 << 23;
2571
2572         /**
2573          * Keyboard and/or mouse event mask indicating that mouse button five
2574          * was pushed when the event was generated. (value is 1&lt;&lt;25).
2575          *
2576          * @since 3.1
2577          */
2578         public static final int BUTTON5 = 1 << 25;
2579
2580         /**
2581          * Keyboard and/or mouse event mask indicating all possible
2582          * mouse buttons.
2583          *
2584          * To allow for the future, this mask  is intended to be used
2585          * in place of code that references each individual button mask.
2586          * For example, the following expression will determine whether
2587          * any button is pressed and will continue to work as new button
2588          * masks are added.
2589          *
2590          * <code>(stateMask &amp; SWT.BUTTON_MASK) != 0</code>.
2591          *
2592          * @since 2.1
2593          */
2594         public static final int BUTTON_MASK;
2595
2596         /**
2597          * Keyboard and/or mouse event mask indicating that the MOD1 key
2598          * was pushed on the keyboard when the event was generated.
2599          *
2600          * This is the primary keyboard modifier for the platform.
2601          * <p>
2602          * {@link #CTRL} on most platforms ({@link #COMMAND} on the Mac).
2603          * </p>
2604          *
2605          * @since 2.1
2606          */
2607         public static final int MOD1;
2608
2609         /**
2610          * Keyboard and/or mouse event mask indicating that the MOD2 key
2611          * was pushed on the keyboard when the event was generated.
2612          *
2613          * This is the secondary keyboard modifier for the platform.
2614          * <p>
2615          * {@link #SHIFT} on most platforms.
2616          * </p>
2617          *
2618          * @since 2.1
2619          */
2620         public static final int MOD2;
2621
2622         /**
2623          * Keyboard and/or mouse event mask indicating that the MOD3 key
2624          * was pushed on the keyboard when the event was generated.
2625          * <p>
2626          * {@link #ALT} on most platforms.
2627          * </p>
2628          *
2629          * @since 2.1
2630          */
2631         public static final int MOD3;
2632
2633         /**
2634          * Keyboard and/or mouse event mask indicating that the MOD4 key
2635          * was pushed on the keyboard when the event was generated.
2636          * <p>
2637          * Undefined on most platforms ({@link #CTRL} on the Mac).
2638          * </p>
2639          *
2640          * @since 2.1
2641          */
2642         public static final int MOD4;
2643
2644         /**
2645          * Constants to indicate line scrolling (value is 1).
2646          * <p><b>Used By:</b></p>
2647          * <ul>
2648          * <li><code>Control</code></li>
2649          * </ul>
2650          *
2651          * @since 3.1
2652          */
2653         public static final int SCROLL_LINE = 1;
2654
2655         /**
2656          * Constants to indicate page scrolling (value is 2).
2657          * <p><b>Used By:</b></p>
2658          * <ul>
2659          * <li><code>Control</code></li>
2660          * </ul>
2661          *
2662          * @since 3.1
2663          */
2664         public static final int SCROLL_PAGE = 2;
2665
2666         /**
2667          * Accelerator constant used to differentiate a key code from a
2668          * unicode character.
2669          *
2670          * If this bit is set, then the key stroke
2671          * portion of an accelerator represents a key code.  If this bit
2672          * is not set, then the key stroke portion of an accelerator is
2673          * a unicode character.
2674          *
2675          * The following expression is false:
2676          *
2677          * <code>((SWT.MOD1 | SWT.MOD2 | 'T') &amp; SWT.KEYCODE_BIT) != 0</code>.
2678          *
2679          * The following expression is true:
2680          *
2681          * <code>((SWT.MOD3 | SWT.F2) &amp; SWT.KEYCODE_BIT) != 0</code>.
2682          *
2683          * (value is (1&lt;&lt;24))
2684          *
2685          * @since 2.1
2686          */
2687         public static final int KEYCODE_BIT = (1 << 24);
2688
2689         /**
2690          * Accelerator constant used to extract the key stroke portion of
2691          * an accelerator.
2692          *
2693          * The key stroke may be a key code or a unicode
2694          * value.  If the key stroke is a key code <code>KEYCODE_BIT</code>
2695          * will be set.
2696          *
2697          * @since 2.1
2698          */
2699         public static final int KEY_MASK = KEYCODE_BIT + 0xFFFF;
2700
2701         /**
2702          * Keyboard event constant representing the UP ARROW key
2703          * (value is (1&lt;&lt;24)+1).
2704          */
2705         public static final int ARROW_UP = KEYCODE_BIT + 1;
2706
2707         /**
2708          * Keyboard event constant representing the DOWN ARROW key
2709          * (value is (1&lt;&lt;24)+2).
2710          */
2711         public static final int ARROW_DOWN = KEYCODE_BIT + 2;
2712
2713         /**
2714          * Keyboard event constant representing the LEFT ARROW key
2715          * (value is (1&lt;&lt;24)+3).
2716          */
2717         public static final int ARROW_LEFT = KEYCODE_BIT + 3;
2718
2719         /**
2720          * Keyboard event constant representing the RIGHT ARROW key
2721          * (value is (1&lt;&lt;24)+4).
2722          */
2723         public static final int ARROW_RIGHT = KEYCODE_BIT + 4;
2724
2725         /**
2726          * Keyboard event constant representing the PAGE UP key
2727          * (value is (1&lt;&lt;24)+5).
2728          */
2729         public static final int PAGE_UP = KEYCODE_BIT + 5;
2730
2731         /**
2732          * Keyboard event constant representing the PAGE DOWN key
2733          * (value is (1&lt;&lt;24)+6).
2734          */
2735         public static final int PAGE_DOWN = KEYCODE_BIT + 6;
2736
2737         /**
2738          * Keyboard event constant representing the HOME key
2739          * (value is (1&lt;&lt;24)+7).
2740          */
2741         public static final int HOME = KEYCODE_BIT + 7;
2742
2743         /**
2744          * Keyboard event constant representing the END key
2745          * (value is (1&lt;&lt;24)+8).
2746          */
2747         public static final int END = KEYCODE_BIT + 8;
2748
2749         /**
2750          * Keyboard event constant representing the INSERT key
2751          * (value is (1&lt;&lt;24)+9).
2752          */
2753         public static final int INSERT = KEYCODE_BIT + 9;
2754
2755         /**
2756          * Keyboard event constant representing the F1 key
2757          * (value is (1&lt;&lt;24)+10).
2758          */
2759         public static final int F1 = KEYCODE_BIT + 10;
2760
2761         /**
2762          * Keyboard event constant representing the F2 key
2763          * (value is (1&lt;&lt;24)+11).
2764          */
2765         public static final int F2 = KEYCODE_BIT + 11;
2766
2767         /**
2768          * Keyboard event constant representing the F3 key
2769          * (value is (1&lt;&lt;24)+12).
2770          */
2771         public static final int F3 = KEYCODE_BIT + 12;
2772
2773         /**
2774          * Keyboard event constant representing the F4 key
2775          * (value is (1&lt;&lt;24)+13).
2776          */
2777         public static final int F4 = KEYCODE_BIT + 13;
2778
2779         /**
2780          * Keyboard event constant representing the F5 key
2781          * (value is (1&lt;&lt;24)+14).
2782          */
2783         public static final int F5 = KEYCODE_BIT + 14;
2784
2785         /**
2786          * Keyboard event constant representing the F6 key
2787          * (value is (1&lt;&lt;24)+15).
2788          */
2789         public static final int F6 = KEYCODE_BIT + 15;
2790
2791         /**
2792          * Keyboard event constant representing the F7 key
2793          * (value is (1&lt;&lt;24)+16).
2794          */
2795         public static final int F7 = KEYCODE_BIT + 16;
2796
2797         /**
2798          * Keyboard event constant representing the F8 key
2799          * (value is (1&lt;&lt;24)+17).
2800          */
2801         public static final int F8 = KEYCODE_BIT + 17;
2802
2803         /**
2804          * Keyboard event constant representing the F9 key
2805          * (value is (1&lt;&lt;24)+18).
2806          */
2807         public static final int F9 = KEYCODE_BIT + 18;
2808
2809         /**
2810          * Keyboard event constant representing the F10 key
2811          * (value is (1&lt;&lt;24)+19).
2812          */
2813         public static final int F10 = KEYCODE_BIT + 19;
2814
2815         /**
2816          * Keyboard event constant representing the F11 key
2817          * (value is (1&lt;&lt;24)+20).
2818          */
2819         public static final int F11 = KEYCODE_BIT + 20;
2820
2821         /**
2822          * Keyboard event constant representing the F12 key
2823          * (value is (1&lt;&lt;24)+21).
2824          */
2825         public static final int F12 = KEYCODE_BIT + 21;
2826
2827         /**
2828          * Keyboard event constant representing the F13 key
2829          * (value is (1&lt;&lt;24)+22).
2830          *
2831          * @since 3.0
2832          */
2833         public static final int F13 = KEYCODE_BIT + 22;
2834
2835         /**
2836          * Keyboard event constant representing the F14 key
2837          * (value is (1&lt;&lt;24)+23).
2838          *
2839          * @since 3.0
2840          */
2841         public static final int F14 = KEYCODE_BIT + 23;
2842
2843         /**
2844          * Keyboard event constant representing the F15 key
2845          * (value is (1&lt;&lt;24)+24).
2846          *
2847          * @since 3.0
2848          */
2849         public static final int F15 = KEYCODE_BIT + 24;
2850
2851         /**
2852          * Keyboard event constant representing the F16 key
2853          * (value is (1&lt;&lt;25)+25).
2854          *
2855          * @since 3.6
2856          */
2857         public static final int F16 = KEYCODE_BIT + 25;
2858
2859
2860         /**
2861          * Keyboard event constant representing the F17 key
2862          * (value is (1&lt;&lt;26)+26).
2863          *
2864          * @since 3.6
2865          */
2866         public static final int F17 = KEYCODE_BIT + 26;
2867
2868
2869         /**
2870          * Keyboard event constant representing the F18 key
2871          * (value is (1&lt;&lt;27)+27).
2872          *
2873          * @since 3.6
2874          */
2875         public static final int F18 = KEYCODE_BIT + 27;
2876
2877
2878         /**
2879          * Keyboard event constant representing the F19 key
2880          * (value is (1&lt;&lt;28)+28).
2881          *
2882          * @since 3.6
2883          */
2884         public static final int F19 = KEYCODE_BIT + 28;
2885
2886         /**
2887          * Keyboard event constant representing the F20 key
2888          * (value is (1&lt;&lt;29)+29).
2889          *
2890          * @since 3.6
2891          */
2892         public static final int F20 = KEYCODE_BIT + 29;
2893
2894         /**
2895          * Keyboard event constant representing the keypad location.
2896          * (value is 1&lt;&lt;1).
2897          *
2898          * @since 3.6
2899          */
2900         public static final int KEYPAD = 1 << 1;
2901
2902         /**
2903          * Keyboard event constant representing the numeric key
2904          * pad multiply key (value is (1&lt;&lt;24)+42).
2905          *
2906          * @since 3.0
2907          */
2908         public static final int KEYPAD_MULTIPLY = KEYCODE_BIT + 42;
2909
2910         /**
2911          * Keyboard event constant representing the numeric key
2912          * pad add key (value is (1&lt;&lt;24)+43).
2913          *
2914          * @since 3.0
2915          */
2916         public static final int KEYPAD_ADD = KEYCODE_BIT + 43;
2917
2918         /**
2919          * Keyboard event constant representing the numeric key
2920          * pad subtract key (value is (1&lt;&lt;24)+45).
2921          *
2922          * @since 3.0
2923          */
2924         public static final int KEYPAD_SUBTRACT = KEYCODE_BIT + 45;
2925
2926         /**
2927          * Keyboard event constant representing the numeric key
2928          * pad decimal key (value is (1&lt;&lt;24)+46).
2929          *
2930          * @since 3.0
2931          */
2932         public static final int KEYPAD_DECIMAL = KEYCODE_BIT + 46;
2933
2934         /**
2935          * Keyboard event constant representing the numeric key
2936          * pad divide key (value is (1&lt;&lt;24)+47).
2937          *
2938          * @since 3.0
2939          */
2940         public static final int KEYPAD_DIVIDE = KEYCODE_BIT + 47;
2941
2942         /**
2943          * Keyboard event constant representing the numeric key
2944          * pad zero key (value is (1&lt;&lt;24)+48).
2945          *
2946          * @since 3.0
2947          */
2948         public static final int KEYPAD_0 = KEYCODE_BIT + 48;
2949
2950         /**
2951          * Keyboard event constant representing the numeric key
2952          * pad one key (value is (1&lt;&lt;24)+49).
2953          *
2954          * @since 3.0
2955          */
2956         public static final int KEYPAD_1 = KEYCODE_BIT + 49;
2957
2958         /**
2959          * Keyboard event constant representing the numeric key
2960          * pad two key (value is (1&lt;&lt;24)+50).
2961          *
2962          * @since 3.0
2963          */
2964         public static final int KEYPAD_2 = KEYCODE_BIT + 50;
2965
2966         /**
2967          * Keyboard event constant representing the numeric key
2968          * pad three key (value is (1&lt;&lt;24)+51).
2969          *
2970          * @since 3.0
2971          */
2972         public static final int KEYPAD_3 = KEYCODE_BIT + 51;
2973
2974         /**
2975          * Keyboard event constant representing the numeric key
2976          * pad four key (value is (1&lt;&lt;24)+52).
2977          *
2978          * @since 3.0
2979          */
2980         public static final int KEYPAD_4 = KEYCODE_BIT + 52;
2981
2982         /**
2983          * Keyboard event constant representing the numeric key
2984          * pad five key (value is (1&lt;&lt;24)+53).
2985          *
2986          * @since 3.0
2987          */
2988         public static final int KEYPAD_5 = KEYCODE_BIT + 53;
2989
2990         /**
2991          * Keyboard event constant representing the numeric key
2992          * pad six key (value is (1&lt;&lt;24)+54).
2993          *
2994          * @since 3.0
2995          */
2996         public static final int KEYPAD_6 = KEYCODE_BIT + 54;
2997
2998         /**
2999          * Keyboard event constant representing the numeric key
3000          * pad seven key (value is (1&lt;&lt;24)+55).
3001          *
3002          * @since 3.0
3003          */
3004         public static final int KEYPAD_7 = KEYCODE_BIT + 55;
3005
3006         /**
3007          * Keyboard event constant representing the numeric key
3008          * pad eight key (value is (1&lt;&lt;24)+56).
3009          *
3010          * @since 3.0
3011          */
3012         public static final int KEYPAD_8 = KEYCODE_BIT + 56;
3013
3014         /**
3015          * Keyboard event constant representing the numeric key
3016          * pad nine key (value is (1&lt;&lt;24)+57).
3017          *
3018          * @since 3.0
3019          */
3020         public static final int KEYPAD_9 = KEYCODE_BIT + 57;
3021
3022         /**
3023          * Keyboard event constant representing the numeric key
3024          * pad equal key (value is (1&lt;&lt;24)+61).
3025          *
3026          * @since 3.0
3027          */
3028         public static final int KEYPAD_EQUAL = KEYCODE_BIT + 61;
3029
3030         /**
3031          * Keyboard event constant representing the numeric key
3032          * pad enter key (value is (1&lt;&lt;24)+80).
3033          *
3034          * @since 3.0
3035          */
3036         public static final int KEYPAD_CR = KEYCODE_BIT + 80;
3037
3038         /**
3039          * Keyboard event constant representing the help
3040          * key (value is (1&lt;&lt;24)+81).
3041          *
3042          * NOTE: The HELP key maps to the key labeled "help",
3043          * not "F1". If your keyboard does not have a HELP key,
3044          * you will never see this key press.  To listen for
3045          * help on a control, use SWT.Help.
3046          *
3047          * @since 3.0
3048          *
3049          * @see SWT#Help
3050          */
3051         public static final int HELP = KEYCODE_BIT + 81;
3052
3053         /**
3054          * Keyboard event constant representing the caps
3055          * lock key (value is (1&lt;&lt;24)+82).
3056          *
3057          * @since 3.0
3058          */
3059         public static final int CAPS_LOCK = KEYCODE_BIT + 82;
3060
3061         /**
3062          * Keyboard event constant representing the num
3063          * lock key (value is (1&lt;&lt;24)+83).
3064          *
3065          * @since 3.0
3066          */
3067         public static final int NUM_LOCK = KEYCODE_BIT + 83;
3068
3069         /**
3070          * Keyboard event constant representing the scroll
3071          * lock key (value is (1&lt;&lt;24)+84).
3072          *
3073          * @since 3.0
3074          */
3075         public static final int SCROLL_LOCK = KEYCODE_BIT + 84;
3076
3077         /**
3078          * Keyboard event constant representing the pause
3079          * key (value is (1&lt;&lt;24)+85).
3080          *
3081          * @since 3.0
3082          */
3083         public static final int PAUSE = KEYCODE_BIT + 85;
3084
3085         /**
3086          * Keyboard event constant representing the break
3087          * key (value is (1&lt;&lt;24)+86).
3088          *
3089          * @since 3.0
3090          */
3091         public static final int BREAK = KEYCODE_BIT + 86;
3092
3093         /**
3094          * Keyboard event constant representing the print screen
3095          * key (value is (1&lt;&lt;24)+87).
3096          *
3097          * @since 3.0
3098          */
3099         public static final int PRINT_SCREEN = KEYCODE_BIT + 87;
3100
3101         /**
3102          * The <code>MessageBox</code> style constant for error icon
3103          * behavior (value is 1).
3104          */
3105         public static final int ICON_ERROR = 1;
3106
3107         /**
3108          * The <code>MessageBox</code> style constant for information icon
3109          * behavior (value is 1&lt;&lt;1).
3110          */
3111         public static final int ICON_INFORMATION = 1 << 1;
3112
3113         /**
3114          * The <code>MessageBox</code> style constant for question icon
3115          * behavior (value is 1&lt;&lt;2).
3116          */
3117         public static final int ICON_QUESTION = 1 << 2;
3118
3119         /**
3120          * The <code>MessageBox</code> style constant for warning icon
3121          * behavior (value is 1&lt;&lt;3).
3122          */
3123         public static final int ICON_WARNING = 1 << 3;
3124
3125         /**
3126          * The <code>MessageBox</code> style constant for "working" icon
3127          * behavior (value is 1&lt;&lt;4).
3128          */
3129         public static final int ICON_WORKING = 1 << 4;
3130
3131         /**
3132          * The style constant for "search" icon. This style constant is
3133          * used with <code>Text</code> in combination with <code>SWT.SEARCH
3134          * </code> (value is 1&lt;&lt;9).
3135          *
3136          * <p><b>Used By:</b></p>
3137          * <ul>
3138          * <li><code>Text</code></li>
3139          * </ul>
3140          *
3141          * @see #SEARCH
3142          * @see #ICON_CANCEL
3143          *
3144          * @since 3.5
3145          */
3146         public static final int ICON_SEARCH = 1 << 9;
3147
3148         /**
3149          * The style constant for "cancel" icon. This style constant is
3150          * used with <code>Text</code> in combination with <code>SWT.SEARCH
3151          * </code> (value is 1&lt;&lt;8).
3152          *
3153          * <p><b>Used By:</b></p>
3154          * <ul>
3155          * <li><code>Text</code></li>
3156          * </ul>
3157          *
3158          * @see #SEARCH
3159          * @see #ICON_SEARCH
3160          *
3161          * @since 3.5
3162          */
3163         public static final int ICON_CANCEL = 1 << 8;
3164
3165
3166         /**
3167          * The <code>MessageBox</code> style constant for an OK button;
3168          * valid combinations are OK, OK|CANCEL
3169          * (value is 1&lt;&lt;5).
3170          */
3171         public static final int OK = 1 << 5;
3172
3173         /**
3174          * The <code>MessageBox</code> style constant for YES button;
3175          * valid combinations are YES|NO, YES|NO|CANCEL
3176          * (value is 1&lt;&lt;6).
3177          */
3178         public static final int YES = 1 << 6;
3179
3180         /**
3181          * The <code>MessageBox</code> style constant for NO button;
3182          * valid combinations are YES|NO, YES|NO|CANCEL
3183          * (value is 1&lt;&lt;7).
3184          */
3185         public static final int NO = 1 << 7;
3186
3187         /**
3188          * The <code>MessageBox</code> style constant for a CANCEL button;
3189          * valid combinations are OK|CANCEL, YES|NO|CANCEL, RETRY|CANCEL
3190          * (value is 1&lt;&lt;8).
3191          *
3192          * <p><b>Used By:</b></p>
3193          * <ul>
3194          * <li><code>MessageBox</code></li>
3195          * </ul>
3196          */
3197         public static final int CANCEL = 1 << 8;
3198
3199         /**
3200          * The <code>MessageBox</code> style constant for an ABORT button;
3201          * the only valid combination is ABORT|RETRY|IGNORE
3202          * (value is 1&lt;&lt;9).
3203          */
3204         public static final int ABORT = 1 << 9;
3205
3206         /**
3207          * The <code>MessageBox</code> style constant for a RETRY button;
3208          *  valid combinations are ABORT|RETRY|IGNORE, RETRY|CANCEL
3209          * (value is 1&lt;&lt;10).
3210          */
3211         public static final int RETRY = 1 << 10;
3212
3213         /**
3214          * The <code>MessageBox</code> style constant for an IGNORE button;
3215          * the only valid combination is ABORT|RETRY|IGNORE
3216          * (value is 1&lt;&lt;11).
3217          */
3218         public static final int IGNORE = 1 << 11;
3219
3220         /**
3221          * The <code>FileDialog</code> style constant for open file dialog behavior
3222          * (value is 1&lt;&lt;12).
3223          */
3224         public static final int OPEN = 1 << 12;
3225
3226         /**
3227          * The <code>FileDialog</code> style constant for save file dialog behavior
3228          * (value is 1&lt;&lt;13).
3229          */
3230         public static final int SAVE = 1 << 13;
3231
3232         /**
3233          * The <code>Composite</code> constant to indicate that
3234          * an attribute (such as background) is not inherited
3235          * by the children (value is 0).
3236          *
3237          * @since 3.2
3238          */
3239         public static final int INHERIT_NONE = 0;
3240
3241         /**
3242          * The <code>Composite</code> constant to indicate that
3243          * an attribute (such as background) is inherited by
3244          * children who choose this value as their "default"
3245          * (value is 1).  For example, a label child will
3246          * typically choose to inherit the background color
3247          * of a composite while a list or table will not.
3248          *
3249          * @since 3.2
3250          */
3251         public static final int INHERIT_DEFAULT = 1;
3252
3253         /**
3254          * The <code>Composite</code> constant to indicate that
3255          * an attribute (such as background) is inherited by
3256          * all children.
3257          *
3258          * @since 3.2
3259          */
3260         public static final int INHERIT_FORCE = 2;
3261
3262         /**
3263          * Default color white (value is 1).
3264          */
3265         public static final int COLOR_WHITE = 1;
3266
3267         /**
3268          * Default color black (value is 2).
3269          */
3270         public static final int COLOR_BLACK = 2;
3271
3272         /**
3273          * Default color red (value is 3).
3274          */
3275         public static final int COLOR_RED = 3;
3276
3277         /**
3278          * Default color dark red (value is 4).
3279          */
3280         public static final int COLOR_DARK_RED = 4;
3281
3282         /**
3283          * Default color green (value is 5).
3284          */
3285         public static final int COLOR_GREEN = 5;
3286
3287         /**
3288          * Default color dark green (value is 6).
3289          */
3290         public static final int COLOR_DARK_GREEN = 6;
3291
3292         /**
3293          * Default color yellow (value is 7).
3294          */
3295         public static final int COLOR_YELLOW = 7;
3296
3297         /**
3298          * Default color dark yellow (value is 8).
3299          */
3300         public static final int COLOR_DARK_YELLOW = 8;
3301
3302         /**
3303          * Default color blue (value is 9).
3304          */
3305         public static final int COLOR_BLUE = 9;
3306
3307         /**
3308          * Default color dark blue (value is 10).
3309          */
3310         public static final int COLOR_DARK_BLUE = 10;
3311
3312         /**
3313          * Default color magenta (value is 11).
3314          */
3315         public static final int COLOR_MAGENTA = 11;
3316
3317         /**
3318          * Default color dark magenta (value is 12).
3319          */
3320         public static final int COLOR_DARK_MAGENTA = 12;
3321
3322         /**
3323          * Default color cyan (value is 13).
3324          */
3325         public static final int COLOR_CYAN = 13;
3326
3327         /**
3328          * Default color dark cyan (value is 14).
3329          */
3330         public static final int COLOR_DARK_CYAN = 14;
3331
3332         /**
3333          * Default color gray (value is 15).
3334          */
3335         public static final int COLOR_GRAY = 15;
3336
3337         /**
3338          * Default color dark gray (value is 16).
3339          */
3340         public static final int COLOR_DARK_GRAY = 16;
3341
3342         /*
3343          * System Colors
3344          *
3345          * Dealing with system colors is an area where there are
3346          * many platform differences.  On some platforms, system
3347          * colors can change dynamically while the program is
3348          * running.  On other platforms, system colors can be
3349          * changed for all instances of a particular widget.
3350          * Therefore, the only truly portable method to obtain
3351          * a widget color query is to query the color from an
3352          * instance of the widget.
3353          *
3354          *      It is expected that the list of supported colors
3355          * will grow over time.
3356          */
3357
3358         /**
3359          * System color used to paint dark shadow areas (value is 17).
3360          */
3361         public static final int COLOR_WIDGET_DARK_SHADOW = 17;
3362
3363         /**
3364          * System color used to paint normal shadow areas (value is 18).
3365          */
3366         public static final int COLOR_WIDGET_NORMAL_SHADOW = 18;
3367
3368         /**
3369          * System color used to paint light shadow areas (value is 19).
3370          */
3371         public static final int COLOR_WIDGET_LIGHT_SHADOW = 19;
3372
3373         /**
3374          * System color used to paint highlight shadow areas (value is 20).
3375          */
3376         public static final int COLOR_WIDGET_HIGHLIGHT_SHADOW = 20;
3377
3378         /**
3379          * System color used to paint foreground areas (value is 21).
3380          */
3381         public static final int COLOR_WIDGET_FOREGROUND = 21;
3382
3383         /**
3384          * System color used to paint background areas (value is 22).
3385          */
3386         public static final int COLOR_WIDGET_BACKGROUND = 22;
3387
3388         /**
3389          * System color used to paint border areas (value is 23).
3390          */
3391         public static final int COLOR_WIDGET_BORDER = 23;
3392
3393         /**
3394          * System color used to paint list foreground areas (value is 24).
3395          */
3396         public static final int COLOR_LIST_FOREGROUND = 24;
3397
3398         /**
3399          * System color used to paint list background areas (value is 25).
3400          */
3401         public static final int COLOR_LIST_BACKGROUND = 25;
3402
3403         /**
3404          * System color used to paint list selection background areas (value is 26).
3405          */
3406         public static final int COLOR_LIST_SELECTION = 26;
3407
3408         /**
3409          * System color used to paint list selected text (value is 27).
3410          */
3411         public static final int COLOR_LIST_SELECTION_TEXT = 27;
3412
3413         /**
3414          * System color used to paint tooltip text (value is 28).
3415          */
3416         public static final int COLOR_INFO_FOREGROUND = 28;
3417
3418         /**
3419          * System color used to paint tooltip background areas (value is 29).
3420          */
3421         public static final int COLOR_INFO_BACKGROUND = 29;
3422
3423         /**
3424          * System color used to paint title text (value is 30).
3425          */
3426         public static final int COLOR_TITLE_FOREGROUND = 30;
3427
3428         /**
3429          * System color used to paint title background areas (value is 31).
3430          */
3431         public static final int COLOR_TITLE_BACKGROUND = 31;
3432
3433         /**
3434          * System color used to paint title background gradient (value is 32).
3435          */
3436         public static final int COLOR_TITLE_BACKGROUND_GRADIENT = 32;
3437
3438         /**
3439          * System color used to paint inactive title text (value is 33).
3440          */
3441         public static final int COLOR_TITLE_INACTIVE_FOREGROUND = 33;
3442
3443         /**
3444          * System color used to paint inactive title background areas (value is 34).
3445          */
3446         public static final int COLOR_TITLE_INACTIVE_BACKGROUND = 34;
3447
3448         /**
3449          * System color used to paint inactive title background gradient (value is 35).
3450          */
3451         public static final int COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT = 35;
3452
3453         /**
3454          * System color used to paint link text (value is 36).
3455          *
3456          * @since 3.102
3457          */
3458         public static final int COLOR_LINK_FOREGROUND = 36;
3459
3460         /**
3461          * System color used to paint with alpha 0 (value is 37).
3462          * <p>
3463          * This pseudo-color can be used to set a transparent background on SWT
3464          * controls. <br>
3465          * Note that this is a <em>HINT</em> and may be overridden by the platform.
3466          * For example:
3467          * <ul>
3468          * <li>{@link org.eclipse.swt.widgets.Combo Combo},
3469          * {@link org.eclipse.swt.widgets.List List} and
3470          * {@link org.eclipse.swt.widgets.Tree Tree} support transparent background
3471          * on GTK3 and Windows only.</li>
3472          * <li>{@link org.eclipse.swt.widgets.Text Text} supports transparent
3473          * background on Windows only whereas {@link org.eclipse.swt.widgets.Table
3474          * Table} supports transparent background on GTK3 only.</li>
3475          * </ul>
3476          *
3477          * @since 3.104
3478          */
3479         public static final int COLOR_TRANSPARENT = 37;
3480
3481         /**
3482          * System color used to paint disabled text background areas (value is 38).
3483          *
3484          * @since 3.112
3485          */
3486         public static final int COLOR_TEXT_DISABLED_BACKGROUND = 38;
3487
3488         /**
3489          * System color used to paint disabled foreground areas (value is 39).
3490          *
3491          * @since 3.112
3492          */
3493         public static final int COLOR_WIDGET_DISABLED_FOREGROUND = 39;
3494
3495         /**
3496          * Draw constant indicating whether the drawing operation
3497          * should fill the background (value is 1&lt;&lt;0).
3498          */
3499         public static final int DRAW_TRANSPARENT = 1 << 0;
3500
3501         /**
3502          * Draw constant indicating whether the string drawing operation
3503          * should handle line-delimiters (value is 1&lt;&lt;1).
3504          */
3505         public static final int DRAW_DELIMITER = 1 << 1;
3506
3507         /**
3508          * Draw constant indicating whether the string drawing operation
3509          * should expand TAB characters (value is 1&lt;&lt;2).
3510          */
3511         public static final int DRAW_TAB = 1 << 2;
3512
3513         /**
3514          * Draw constant indicating whether the string drawing operation
3515          * should handle mnemonics (value is 1&lt;&lt;3).
3516          */
3517         public static final int DRAW_MNEMONIC = 1 << 3;
3518
3519
3520         /**
3521          * Selection constant indicating that a line delimiter should be
3522          * drawn (value is 1&lt;&lt;17).
3523          *
3524          * <p><b>Used By:</b></p>
3525          * <ul>
3526          * <li><code>TextLayout</code></li>
3527          * </ul>
3528          *
3529          * @see #FULL_SELECTION
3530          * @see #LAST_LINE_SELECTION
3531          *
3532          * @since 3.3
3533          */
3534         public static final int DELIMITER_SELECTION = 1 << 17;
3535
3536         /**
3537          * Selection constant indicating that the last line is selected
3538          * to the end and should be drawn using either a line delimiter
3539          * or full line selection (value is 1&lt;&lt;20).
3540          *
3541          * <p><b>Used By:</b></p>
3542          * <ul>
3543          * <li><code>TextLayout</code></li>
3544          * </ul>
3545          *
3546          * @see #DELIMITER_SELECTION
3547          * @see #FULL_SELECTION
3548          *
3549          * @since 3.3
3550          */
3551         public static final int LAST_LINE_SELECTION = 1 << 20;
3552
3553         /**
3554          * SWT error constant indicating that no error number was specified
3555          * (value is 1).
3556          */
3557         public static final int ERROR_UNSPECIFIED = 1;
3558
3559         /**
3560          * SWT error constant indicating that no more handles for an
3561          * operating system resource are available
3562          * (value is 2).
3563          */
3564         public static final int ERROR_NO_HANDLES = 2;
3565
3566         /**
3567          * SWT error constant indicating that no more callback resources are available
3568          * (value is 3).
3569          */
3570         public static final int ERROR_NO_MORE_CALLBACKS = 3;
3571
3572         /**
3573          * SWT error constant indicating that a null argument was passed in
3574          * (value is 4).
3575          */
3576         public static final int ERROR_NULL_ARGUMENT = 4;
3577
3578         /**
3579          * SWT error constant indicating that an invalid argument was passed in
3580          * (value is 5).
3581          */
3582         public static final int ERROR_INVALID_ARGUMENT = 5;
3583
3584         /**
3585          * SWT error constant indicating that a value was found to be
3586          * outside the allowable range
3587          * (value is 6).
3588          */
3589         public static final int ERROR_INVALID_RANGE = 6;
3590
3591         /**
3592          * SWT error constant indicating that a value which can not be
3593          * zero was found to be
3594          * (value is 7).
3595          */
3596         public static final int ERROR_CANNOT_BE_ZERO = 7;
3597
3598         /**
3599          * SWT error constant indicating that the underlying operating
3600          * system was unable to provide the value of an item
3601          * (value is 8).
3602          */
3603         public static final int ERROR_CANNOT_GET_ITEM = 8;
3604
3605         /**
3606          * SWT error constant indicating that the underlying operating
3607          * system was unable to provide the selection
3608          * (value is 9).
3609          */
3610         public static final int ERROR_CANNOT_GET_SELECTION = 9;
3611
3612         /**
3613          * SWT error constant indicating that the matrix is not invertible
3614          * (value is 10).
3615          *
3616          * @since 3.1
3617          */
3618         public static final int ERROR_CANNOT_INVERT_MATRIX = 10;
3619
3620         /**
3621          * SWT error constant indicating that the underlying operating
3622          * system was unable to provide the height of an item
3623          * (value is 11).
3624          */
3625         public static final int ERROR_CANNOT_GET_ITEM_HEIGHT = 11;
3626
3627         /**
3628          * SWT error constant indicating that the underlying operating
3629          * system was unable to provide the text of a widget
3630          * (value is 12).
3631          */
3632         public static final int ERROR_CANNOT_GET_TEXT = 12;
3633
3634         /**
3635          * SWT error constant indicating that the underlying operating
3636          * system was unable to set the text of a widget
3637          * (value is 13).
3638          */
3639         public static final int ERROR_CANNOT_SET_TEXT = 13;
3640
3641         /**
3642          * SWT error constant indicating that the underlying operating
3643          * system was unable to add an item
3644          * (value is 14).
3645          */
3646         public static final int ERROR_ITEM_NOT_ADDED = 14;
3647
3648         /**
3649          * SWT error constant indicating that the underlying operating
3650          * system was unable to remove an item
3651          * (value is 15).
3652          */
3653         public static final int ERROR_ITEM_NOT_REMOVED = 15;
3654
3655         /**
3656          * SWT error constant indicating that the graphics library
3657          * is not available
3658          * (value is 16).
3659          */
3660         public static final int ERROR_NO_GRAPHICS_LIBRARY = 16;
3661
3662         /**
3663          * SWT error constant indicating that a particular feature has
3664          * not been implemented on this platform
3665          * (value is 20).
3666          */
3667         public static final int ERROR_NOT_IMPLEMENTED = 20;
3668
3669         /**
3670          * SWT error constant indicating that a menu which needed
3671          * to have the drop down style had some other style instead
3672          * (value is 21).
3673          */
3674         public static final int ERROR_MENU_NOT_DROP_DOWN = 21;
3675
3676         /**
3677          * SWT error constant indicating that an attempt was made to
3678          * invoke an SWT operation which can only be executed by the
3679          * user-interface thread from some other thread
3680          * (value is 22).
3681          */
3682         public static final int ERROR_THREAD_INVALID_ACCESS = 22;
3683
3684         /**
3685          * SWT error constant indicating that an attempt was made to
3686          * invoke an SWT operation using a widget which had already
3687          * been disposed
3688          * (value is 24).
3689          */
3690         public static final int ERROR_WIDGET_DISPOSED = 24;
3691
3692         /**
3693          * SWT error constant indicating that a menu item which needed
3694          * to have the cascade style had some other style instead
3695          * (value is 27).
3696          */
3697         public static final int ERROR_MENUITEM_NOT_CASCADE = 27;
3698
3699         /**
3700          * SWT error constant indicating that the underlying operating
3701          * system was unable to set the selection of a widget
3702          * (value is 28).
3703          */
3704         public static final int ERROR_CANNOT_SET_SELECTION = 28;
3705
3706         /**
3707          * SWT error constant indicating that the underlying operating
3708          * system was unable to set the menu
3709          * (value is 29).
3710          */
3711         public static final int ERROR_CANNOT_SET_MENU = 29;
3712
3713         /**
3714          * SWT error constant indicating that the underlying operating
3715          * system was unable to set the enabled state
3716          * (value is 30).
3717          */
3718         public static final int ERROR_CANNOT_SET_ENABLED = 30;
3719
3720         /**
3721          * SWT error constant indicating that the underlying operating
3722          * system was unable to provide enabled/disabled state information
3723          * (value is 31).
3724          */
3725         public static final int ERROR_CANNOT_GET_ENABLED = 31;
3726
3727         /**
3728          * SWT error constant indicating that a provided widget can
3729          * not be used as a parent in the current operation
3730          * (value is 32).
3731          */
3732         public static final int ERROR_INVALID_PARENT = 32;
3733
3734         /**
3735          * SWT error constant indicating that a menu which needed
3736          * to have the menu bar style had some other style instead
3737          * (value is 33).
3738          */
3739         public static final int ERROR_MENU_NOT_BAR = 33;
3740
3741         /**
3742          * SWT error constant indicating that the underlying operating
3743          * system was unable to provide count information
3744          * (value is 36).
3745          */
3746         public static final int ERROR_CANNOT_GET_COUNT = 36;
3747
3748         /**
3749          * SWT error constant indicating that a menu which needed
3750          * to have the pop up menu style had some other style instead
3751          * (value is 37).
3752          */
3753         public static final int ERROR_MENU_NOT_POP_UP = 37;
3754
3755         /**
3756          * SWT error constant indicating that a graphics operation
3757          * was attempted with an image of an unsupported depth
3758          * (value is 38).
3759          */
3760         public static final int ERROR_UNSUPPORTED_DEPTH = 38;
3761
3762         /**
3763          * SWT error constant indicating that an input/output operation
3764          * failed during the execution of an SWT operation
3765          * (value is 39).
3766          */
3767         public static final int ERROR_IO = 39;
3768
3769         /**
3770          * SWT error constant indicating that a graphics operation
3771          * was attempted with an image having an invalid format
3772          * (value is 40).
3773          */
3774         public static final int ERROR_INVALID_IMAGE = 40;
3775
3776         /**
3777          * SWT error constant indicating that a graphics operation
3778          * was attempted with an image having a valid but unsupported
3779          * format
3780          * (value is 42).
3781          */
3782         public static final int ERROR_UNSUPPORTED_FORMAT = 42;
3783
3784         /**
3785          * SWT error constant indicating that an attempt was made
3786          * to subclass an SWT widget class without implementing the
3787          * <code>checkSubclass()</code> method
3788          * (value is 43).
3789          *
3790          * For additional information see the comment in
3791          * <code>Widget.checkSubclass()</code>.
3792          *
3793          * @see org.eclipse.swt.widgets.Widget#checkSubclass
3794          */
3795         public static final int ERROR_INVALID_SUBCLASS = 43;
3796
3797         /**
3798          * SWT error constant indicating that an attempt was made to
3799          * invoke an SWT operation using a graphics object which had
3800          * already been disposed
3801          * (value is 44).
3802          */
3803         public static final int ERROR_GRAPHIC_DISPOSED = 44;
3804
3805         /**
3806          * SWT error constant indicating that an attempt was made to
3807          * invoke an SWT operation using a device which had already
3808          * been disposed
3809          * (value is 45).
3810          */
3811         public static final int ERROR_DEVICE_DISPOSED = 45;
3812
3813         /**
3814          * SWT error constant indicating that an exception happened
3815          * when executing a runnable
3816          * (value is 46).
3817          */
3818         public static final int ERROR_FAILED_EXEC = 46;
3819
3820         /**
3821          * SWT error constant indicating that an unsatisfied link
3822          * error occurred while attempting to load a library
3823          * (value is 47).
3824          *
3825          * @since 3.1
3826          */
3827         public static final int ERROR_FAILED_LOAD_LIBRARY = 47;
3828
3829         /**
3830          * SWT error constant indicating that a font is not valid
3831          * (value is 48).
3832          *
3833          * @since 3.1
3834          */
3835         public static final int ERROR_INVALID_FONT = 48;
3836
3837         /**
3838          * SWT error constant indicating that an attempt was made to
3839          * use an BrowserFunction object which had already been disposed
3840          * (value is 49).
3841          *
3842          * @since 3.5
3843          */
3844         public static final int ERROR_FUNCTION_DISPOSED = 49;
3845
3846         /**
3847          * SWT error constant indicating that an exception happened
3848          * when evaluating a javascript expression
3849          * (value is 50).
3850          *
3851          * @since 3.5
3852          */
3853         public static final int ERROR_FAILED_EVALUATE = 50;
3854
3855         /**
3856          * SWT error constant indicating that an invalid value was returned
3857          * (value is 51).
3858          *
3859          * @since 3.5
3860          */
3861         public static final int ERROR_INVALID_RETURN_VALUE = 51;
3862
3863         /**
3864          * Constant indicating that an image or operation is of type bitmap  (value is 0).
3865          */
3866         public static final int BITMAP = 0;
3867
3868         /**
3869          * Constant indicating that an image or operation is of type icon  (value is 1).
3870          */
3871         public static final int ICON = 1;
3872
3873         /**
3874          * The <code>Image</code> constructor argument indicating that
3875          * the new image should be a copy of the image provided as
3876          * an argument  (value is 0).
3877          */
3878         public static final int IMAGE_COPY = 0;
3879
3880         /**
3881          * The <code>Image</code> constructor argument indicating that
3882          * the new image should have the appearance of a "disabled"
3883          * (using the platform's rules for how this should look)
3884          * copy of the image provided as an argument  (value is 1).
3885          */
3886         public static final int IMAGE_DISABLE = 1;
3887
3888         /**
3889          * The <code>Image</code> constructor argument indicating that
3890          * the new image should have the appearance of a "gray scaled"
3891          * copy of the image provided as an argument  (value is 2).
3892          */
3893         public static final int IMAGE_GRAY = 2;
3894
3895         /**
3896          * Constant to indicate an error state (value is 1).
3897          * <p><b>Used By:</b></p>
3898          * <ul>
3899          * <li><code>ProgressBar</code></li>
3900          * </ul>
3901          *
3902          * @since 3.4
3903          */
3904         public static final int ERROR = 1;
3905
3906         /**
3907          * Constant to a indicate a paused state (value is 4).
3908          * <p><b>Used By:</b></p>
3909          * <ul>
3910          * <li><code>ProgressBar</code></li>
3911          * </ul>
3912          *
3913          * @since 3.4
3914          */
3915         public static final int PAUSED = 1 << 2;
3916
3917         /**
3918          * The font style constant indicating a normal weight, non-italic font
3919          * (value is 0). This constant is also used with <code>ProgressBar</code>
3920          * to indicate a normal state.
3921          * <p><b>Used By:</b></p>
3922          * <ul>
3923          * <li><code>ProgressBar</code></li>
3924          * </ul>
3925          */
3926         public static final int NORMAL = 0;
3927
3928         /**
3929          * The font style constant indicating a bold weight font
3930          * (value is 1&lt;&lt;0).
3931          */
3932         public static final int BOLD = 1 << 0;
3933
3934         /**
3935          * The font style constant indicating an italic font
3936          * (value is 1&lt;&lt;1).
3937          */
3938         public static final int ITALIC = 1 << 1;
3939
3940         /**
3941          * System arrow cursor  (value is 0).
3942          */
3943         public static final int CURSOR_ARROW = 0;
3944
3945         /**
3946          * System wait cursor  (value is 1).
3947          */
3948         public static final int CURSOR_WAIT = 1;
3949
3950         /**
3951          * System cross hair cursor  (value is 2).
3952          */
3953         public static final int CURSOR_CROSS = 2;
3954
3955         /**
3956          * System app startup cursor  (value is 3).
3957          */
3958         public static final int CURSOR_APPSTARTING = 3;
3959
3960         /**
3961          * System help cursor  (value is 4).
3962          */
3963         public static final int CURSOR_HELP = 4;
3964
3965         /**
3966          * System resize all directions cursor (value is 5).
3967          */
3968         public static final int CURSOR_SIZEALL = 5;
3969
3970         /**
3971          * System resize north-east-south-west cursor  (value is 6).
3972          */
3973         public static final int CURSOR_SIZENESW = 6;
3974
3975         /**
3976          * System resize north-south cursor  (value is 7).
3977          */
3978         public static final int CURSOR_SIZENS = 7;
3979
3980         /**
3981          * System resize north-west-south-east cursor  (value is 8).
3982          */
3983         public static final int CURSOR_SIZENWSE = 8;
3984
3985         /**
3986          * System resize west-east cursor  (value is 9).
3987          */
3988         public static final int CURSOR_SIZEWE = 9;
3989
3990         /**
3991          * System resize north cursor  (value is 10).
3992          */
3993         public static final int CURSOR_SIZEN = 10;
3994
3995         /**
3996          * System resize south cursor  (value is 11).
3997          */
3998         public static final int CURSOR_SIZES = 11;
3999
4000         /**
4001          * System resize east cursor  (value is 12).
4002          */
4003         public static final int CURSOR_SIZEE = 12;
4004
4005         /**
4006          * System resize west cursor  (value is 13).
4007          */
4008         public static final int CURSOR_SIZEW = 13;
4009
4010         /**
4011          * System resize north-east cursor (value is 14).
4012          */
4013         public static final int CURSOR_SIZENE = 14;
4014
4015         /**
4016          * System resize south-east cursor (value is 15).
4017          */
4018         public static final int CURSOR_SIZESE = 15;
4019
4020         /**
4021          * System resize south-west cursor (value is 16).
4022          */
4023         public static final int CURSOR_SIZESW = 16;
4024
4025         /**
4026          * System resize north-west cursor (value is 17).
4027          */
4028         public static final int CURSOR_SIZENW = 17;
4029
4030         /**
4031          * System up arrow cursor  (value is 18).
4032          */
4033         public static final int CURSOR_UPARROW = 18;
4034
4035         /**
4036          * System i-beam cursor (value is 19).
4037          */
4038         public static final int CURSOR_IBEAM = 19;
4039
4040         /**
4041          * System "not allowed" cursor (value is 20).
4042          */
4043         public static final int CURSOR_NO = 20;
4044
4045         /**
4046          * System hand cursor (value is 21).
4047          */
4048         public static final int CURSOR_HAND = 21;
4049
4050         /**
4051          * Line drawing style for flat end caps (value is 1).
4052          *
4053          * @see org.eclipse.swt.graphics.GC#setLineCap(int)
4054          * @see org.eclipse.swt.graphics.GC#getLineCap()
4055          *
4056          * @since 3.1
4057          */
4058         public static final int CAP_FLAT = 1;
4059
4060         /**
4061          * Line drawing style for rounded end caps (value is 2).
4062          *
4063          * @see org.eclipse.swt.graphics.GC#setLineCap(int)
4064          * @see org.eclipse.swt.graphics.GC#getLineCap()
4065          *
4066          * @since 3.1
4067          */
4068         public static final int CAP_ROUND = 2;
4069
4070         /**
4071          * Line drawing style for square end caps (value is 3).
4072          *
4073          * @see org.eclipse.swt.graphics.GC#setLineCap(int)
4074          * @see org.eclipse.swt.graphics.GC#getLineCap()
4075          *
4076          * @since 3.1
4077          */
4078         public static final int CAP_SQUARE = 3;
4079
4080         /**
4081          * Line drawing style for miter joins (value is 1).
4082          *
4083          * @see org.eclipse.swt.graphics.GC#setLineJoin(int)
4084          * @see org.eclipse.swt.graphics.GC#getLineJoin()
4085          *
4086          * @since 3.1
4087          */
4088         public static final int JOIN_MITER = 1;
4089
4090         /**
4091          * Line drawing  style for rounded joins (value is 2).
4092          *
4093          * @see org.eclipse.swt.graphics.GC#setLineJoin(int)
4094          * @see org.eclipse.swt.graphics.GC#getLineJoin()
4095          *
4096          * @since 3.1
4097          */
4098         public static final int JOIN_ROUND = 2;
4099
4100         /**
4101          * Line drawing style for bevel joins (value is 3).
4102          *
4103          * @see org.eclipse.swt.graphics.GC#setLineJoin(int)
4104          * @see org.eclipse.swt.graphics.GC#getLineJoin()
4105          *
4106          * @since 3.1
4107          */
4108         public static final int JOIN_BEVEL = 3;
4109
4110         /**
4111          * Line drawing style for solid lines  (value is 1).
4112          */
4113         public static final int LINE_SOLID = 1;
4114
4115         /**
4116          * Line drawing style for dashed lines (value is 2).
4117          */
4118         public static final int LINE_DASH = 2;
4119
4120         /**
4121          * Line drawing style for dotted lines (value is 3).
4122          */
4123         public static final int LINE_DOT = 3;
4124
4125         /**
4126          * Line drawing style for alternating dash-dot lines (value is 4).
4127          */
4128         public static final int LINE_DASHDOT = 4;
4129
4130         /**
4131          * Line drawing style for dash-dot-dot lines (value is 5).
4132          */
4133         public static final int LINE_DASHDOTDOT = 5;
4134
4135         /**
4136          * Line drawing style for custom dashed lines (value is 6).
4137          *
4138          * @see org.eclipse.swt.graphics.GC#setLineDash(int[])
4139          * @see org.eclipse.swt.graphics.GC#getLineDash()
4140          *
4141          * @since 3.1
4142          */
4143         public static final int LINE_CUSTOM = 6;
4144
4145         /**
4146          * Path constant that represents a "move to" operation (value is 1).
4147          *
4148          * @since 3.1
4149          */
4150         public static final int PATH_MOVE_TO = 1;
4151
4152         /**
4153          * Path constant that represents a "line to" operation (value is 2).
4154          *
4155          * @since 3.1
4156          */
4157         public static final int PATH_LINE_TO = 2;
4158
4159         /**
4160          * Path constant that represents a "quadratic curve to" operation (value is 3).
4161          *
4162          * @since 3.1
4163          */
4164         public static final int PATH_QUAD_TO = 3;
4165
4166         /**
4167          * Path constant that represents a "cubic curve to" operation (value is 4).
4168          *
4169          * @since 3.1
4170          */
4171         public static final int PATH_CUBIC_TO = 4;
4172
4173         /**
4174          * Path constant that represents a "close" operation (value is 5).
4175          *
4176          * @since 3.1
4177          */
4178         public static final int PATH_CLOSE = 5;
4179
4180         /**
4181          * Even odd rule for filling operations (value is 1).
4182          *
4183          * @since 3.1
4184          */
4185         public static final int FILL_EVEN_ODD = 1;
4186
4187         /**
4188          * Winding rule for filling operations (value is 2).
4189          *
4190          * @since 3.1
4191          */
4192         public static final int FILL_WINDING = 2;
4193
4194         /**
4195          * Image format constant indicating an unknown image type (value is -1).
4196          */
4197         public static final int IMAGE_UNDEFINED = -1;
4198
4199         /**
4200          * Image format constant indicating a Windows BMP format image (value is 0).
4201          */
4202         public static final int IMAGE_BMP = 0;
4203
4204         /**
4205          * Image format constant indicating a run-length encoded
4206          * Windows BMP format image (value is 1).
4207          */
4208         public static final int IMAGE_BMP_RLE = 1;
4209
4210         /**
4211          * Image format constant indicating a GIF format image (value is 2).
4212          */
4213         public static final int IMAGE_GIF = 2;
4214
4215         /**
4216          * Image format constant indicating a ICO format image (value is 3).
4217          */
4218         public static final int IMAGE_ICO = 3;
4219
4220         /**
4221          * Image format constant indicating a JPEG format image (value is 4).
4222          */
4223         public static final int IMAGE_JPEG = 4;
4224
4225         /**
4226          * Image format constant indicating a PNG format image (value is 5).
4227          */
4228         public static final int IMAGE_PNG = 5;
4229
4230         /**
4231          * Image format constant indicating a TIFF format image (value is 6).
4232          */
4233         public static final int IMAGE_TIFF = 6;
4234
4235         /**
4236          * Image format constant indicating an OS/2 BMP format image (value is 7).
4237          */
4238         public static final int IMAGE_OS2_BMP = 7;
4239
4240         /**
4241          * Image format constant indicating a SVG format image (value is 8).
4242          * <br>Note that this is a <em>HINT</em> and is currently only supported on GTK.
4243          *
4244          * @since 3.113
4245          */
4246         public static final int IMAGE_SVG = 8;
4247
4248         /**
4249          * GIF image disposal method constants indicating that the
4250          * disposal method is unspecified (value is 0).
4251          */
4252         public static final int DM_UNSPECIFIED = 0x0;
4253
4254         /**
4255          * GIF image disposal method constants indicating that the
4256          * disposal method is to do nothing; that is, to leave the
4257          * previous image in place (value is 1).
4258          */
4259         public static final int DM_FILL_NONE = 0x1;
4260
4261         /**
4262          * GIF image disposal method constants indicating that the
4263          * the previous images should be covered with the background
4264          * color before displaying the next image (value is 2).
4265          */
4266         public static final int DM_FILL_BACKGROUND = 0x2;
4267
4268         /**
4269          * GIF image disposal method constants indicating that the
4270          * disposal method is to restore the previous picture
4271          * (value is 3).
4272          */
4273         public static final int DM_FILL_PREVIOUS = 0x3;
4274
4275         /**
4276          * Image transparency constant indicating that the image
4277          * contains no transparency information (value is 0).
4278          */
4279         public static final int TRANSPARENCY_NONE = 0x0;
4280
4281         /**
4282          * Image transparency constant indicating that the image
4283          * contains alpha transparency information (value is 1&lt;&lt;0).
4284          */
4285         public static final int TRANSPARENCY_ALPHA = 1 << 0;
4286
4287         /**
4288          * Image transparency constant indicating that the image
4289          * contains a transparency mask (value is 1&lt;&lt;1).
4290          */
4291         public static final int TRANSPARENCY_MASK = 1 << 1;
4292
4293         /**
4294          * Image transparency constant indicating that the image
4295          * contains a transparent pixel (value is 1&lt;&lt;2).
4296          */
4297         public static final int TRANSPARENCY_PIXEL = 1 << 2;
4298
4299         /**
4300          * The character movement type (value is 1&lt;&lt;0).
4301          * This constant is used to move a text offset over a character.
4302          *
4303          * @see org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
4304          * @see org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
4305          *
4306          * @since 3.0
4307          */
4308         public static final int MOVEMENT_CHAR = 1 << 0;
4309
4310         /**
4311          * The cluster movement type (value is 1&lt;&lt;1).
4312          * This constant is used to move a text offset over a cluster.
4313          * A cluster groups one or more characters. A cluster is
4314          * undivisible, this means that a caret offset can not be placed in the
4315          * middle of a cluster.
4316          *
4317          * @see org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
4318          * @see org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
4319          *
4320          * @since 3.0
4321          */
4322         public static final int MOVEMENT_CLUSTER = 1 << 1;
4323
4324         /**
4325          * The word movement type (value is 1&lt;&lt;2).
4326          * This constant is used to move a text offset over a word.
4327          * The behavior of this constant depends on the platform and on the
4328          * direction of the movement. For example, on Windows the stop is
4329          * always at the start of the word. On GTK and Mac the stop is at the end
4330          * of the word if the direction is next and at the start of the word if the
4331          * direction is previous.
4332          *
4333          * @see org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
4334          * @see org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
4335          *
4336          * @since 3.0
4337          */
4338         public static final int MOVEMENT_WORD = 1 << 2;
4339
4340         /**
4341          * The word end movement type (value is 1&lt;&lt;3).
4342          * This constant is used to move a text offset to the next or previous
4343          * word end. The behavior of this constant does not depend on the platform.
4344          *
4345          *
4346          * @see org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
4347          * @see org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
4348          *
4349          * @since 3.3
4350          */
4351         public static final int MOVEMENT_WORD_END = 1 << 3;
4352
4353         /**
4354          * The word start movement type (value is 1&lt;&lt;4).
4355          * This constant is used to move a text offset to the next or previous
4356          * word start. The behavior of this constant does not depend on the platform.
4357          *
4358          * @see org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
4359          * @see org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
4360          *
4361          * @since 3.3
4362          */
4363         public static final int MOVEMENT_WORD_START = 1 << 4;
4364
4365         /**
4366          * A constant indicating that a given operation should be performed on
4367          * all widgets (value is 1&lt;&lt;0).
4368          *
4369          * <p><b>Used By:</b></p>
4370          * <ul>
4371          * <li><code>Composite</code> layout</li>
4372          * </ul>
4373          *
4374          * @see org.eclipse.swt.widgets.Composite#layout(org.eclipse.swt.widgets.Control[], int)
4375          *
4376          * @since 3.6
4377          */
4378         public static final int ALL = 1 << 0;
4379
4380         /**
4381          * ID for the About menu item (value is -1).
4382          *
4383          * @see org.eclipse.swt.widgets.MenuItem#setID(int)
4384          * @see org.eclipse.swt.widgets.MenuItem#getID()
4385          *
4386          * @since 3.7
4387          */
4388         public static final int ID_ABOUT = -1;
4389
4390         /**
4391          * ID for the Preferences menu item (value is -2).
4392          *
4393          * @see org.eclipse.swt.widgets.MenuItem#setID(int)
4394          * @see org.eclipse.swt.widgets.MenuItem#getID()
4395          *
4396          * @since 3.7
4397          */
4398         public static final int ID_PREFERENCES = -2;
4399
4400         /**
4401          * ID for the Hide menu item (value is -3).
4402          *
4403          * @see org.eclipse.swt.widgets.MenuItem#setID(int)
4404          * @see org.eclipse.swt.widgets.MenuItem#getID()
4405          *
4406          * @since 3.7
4407          */
4408         public static final int ID_HIDE = -3;
4409
4410         /**
4411          * ID for the Hide Others menu item (value is -4).
4412          *
4413          * @see org.eclipse.swt.widgets.MenuItem#setID(int)
4414          * @see org.eclipse.swt.widgets.MenuItem#getID()
4415          *
4416          * @since 3.7
4417          */
4418         public static final int ID_HIDE_OTHERS = -4;
4419
4420         /**
4421          * ID for the Show All menu item (value is -5).
4422          *
4423          * @see org.eclipse.swt.widgets.MenuItem#setID(int)
4424          * @see org.eclipse.swt.widgets.MenuItem#getID()
4425          *
4426          * @since 3.7
4427          */
4428         public static final int ID_SHOW_ALL = -5;
4429
4430         /**
4431          * ID for the Quit menu item (value is -6).
4432          *
4433          * @see org.eclipse.swt.widgets.MenuItem#setID(int)
4434          * @see org.eclipse.swt.widgets.MenuItem#getID()
4435          *
4436          * @since 3.7
4437          */
4438         public static final int ID_QUIT = -6;
4439
4440         /**
4441          * Key name for setting and getting the skin class of a widget.
4442          * <p>
4443          * Note: SWT currently doesn't read or process this property. The only
4444          * effect of setting this property is to trigger a call to
4445          * {@link Widget#reskin(int) Widget#reskin(SWT.ALL)}.
4446          * </p>
4447          *
4448          * @see org.eclipse.swt.widgets.Widget#getData(String)
4449          * @see org.eclipse.swt.widgets.Widget#setData(String, Object)
4450          *
4451          * @since 3.6
4452          */
4453         public static final String SKIN_CLASS = "org.eclipse.swt.skin.class"; //$NON-NLS-1$
4454
4455         /**
4456          * Key name for setting and getting the skin id of a widget.
4457          * <p>
4458          * Note: SWT currently doesn't read or process this property. The only
4459          * effect of setting this property is to trigger a call to
4460          * {@link Widget#reskin(int) Widget#reskin(SWT.ALL)}.
4461          * </p>
4462          *
4463          * @see org.eclipse.swt.widgets.Widget#getData(String)
4464          * @see org.eclipse.swt.widgets.Widget#setData(String, Object)
4465          *
4466          * @since 3.6
4467          */
4468         public static final String SKIN_ID = "org.eclipse.swt.skin.id"; //$NON-NLS-1$
4469
4470         /**
4471          * The <code>Scrollable</code> constant to indicate that
4472          * the receiver is using overlay scrollbars. (value is 1)
4473          *
4474          * @since 3.8
4475          */
4476         public static final int SCROLLBAR_OVERLAY = 1 << 1;
4477
4478
4479 /**
4480  * Returns a boolean indicating whether this SWT implementation can
4481  * be loaded.  Examples of criteria that may be used to determine this
4482  * include the OS and architecture of the JRE that is being used.
4483  *
4484  * @return <code>true</code> if this SWT implementation can be loaded
4485  * and <code>false</code> otherwise
4486  *
4487  * @since 3.8
4488  */
4489 public static boolean isLoadable () {
4490         return Platform.isLoadable ();
4491 }
4492
4493 /**
4494  * Answers a concise, human readable description of the error code.
4495  *
4496  * @param code the SWT error code.
4497  * @return a description of the error code.
4498  *
4499  * @see SWT
4500  */
4501 static String findErrorText (int code) {
4502         switch (code) {
4503                 case ERROR_UNSPECIFIED:            return "Unspecified error"; //$NON-NLS-1$
4504                 case ERROR_NO_HANDLES:                     return "No more handles"; //$NON-NLS-1$
4505                 case ERROR_NO_MORE_CALLBACKS:      return "No more callbacks"; //$NON-NLS-1$
4506                 case ERROR_NULL_ARGUMENT:          return "Argument cannot be null"; //$NON-NLS-1$
4507                 case ERROR_INVALID_ARGUMENT:       return "Argument not valid"; //$NON-NLS-1$
4508                 case ERROR_INVALID_RETURN_VALUE:   return "Return value not valid"; //$NON-NLS-1$
4509                 case ERROR_INVALID_RANGE:          return "Index out of bounds"; //$NON-NLS-1$
4510                 case ERROR_CANNOT_BE_ZERO:         return "Argument cannot be zero"; //$NON-NLS-1$
4511                 case ERROR_CANNOT_GET_ITEM:        return "Cannot get item"; //$NON-NLS-1$
4512                 case ERROR_CANNOT_GET_SELECTION:   return "Cannot get selection"; //$NON-NLS-1$
4513                 case ERROR_CANNOT_GET_ITEM_HEIGHT: return "Cannot get item height"; //$NON-NLS-1$
4514                 case ERROR_CANNOT_GET_TEXT:        return "Cannot get text"; //$NON-NLS-1$
4515                 case ERROR_CANNOT_SET_TEXT:        return "Cannot set text"; //$NON-NLS-1$
4516                 case ERROR_ITEM_NOT_ADDED:         return "Item not added"; //$NON-NLS-1$
4517                 case ERROR_ITEM_NOT_REMOVED:       return "Item not removed"; //$NON-NLS-1$
4518                 case ERROR_NOT_IMPLEMENTED:        return "Not implemented"; //$NON-NLS-1$
4519                 case ERROR_MENU_NOT_DROP_DOWN:     return "Menu must be a drop down"; //$NON-NLS-1$
4520                 case ERROR_THREAD_INVALID_ACCESS:  return "Invalid thread access"; //$NON-NLS-1$
4521                 case ERROR_WIDGET_DISPOSED:        return "Widget is disposed"; //$NON-NLS-1$
4522                 case ERROR_MENUITEM_NOT_CASCADE:   return "Menu item is not a CASCADE"; //$NON-NLS-1$
4523                 case ERROR_CANNOT_SET_SELECTION:   return "Cannot set selection";  //$NON-NLS-1$
4524                 case ERROR_CANNOT_SET_MENU:        return "Cannot set menu";  //$NON-NLS-1$
4525                 case ERROR_CANNOT_SET_ENABLED:     return "Cannot set the enabled state";  //$NON-NLS-1$
4526                 case ERROR_CANNOT_GET_ENABLED:     return "Cannot get the enabled state";  //$NON-NLS-1$
4527                 case ERROR_INVALID_PARENT:         return "Widget has the wrong parent";  //$NON-NLS-1$
4528                 case ERROR_MENU_NOT_BAR:           return "Menu is not a BAR";  //$NON-NLS-1$
4529                 case ERROR_CANNOT_GET_COUNT:       return "Cannot get count"; //$NON-NLS-1$
4530                 case ERROR_MENU_NOT_POP_UP:        return "Menu is not a POP_UP"; //$NON-NLS-1$
4531                 case ERROR_UNSUPPORTED_DEPTH:      return "Unsupported color depth"; //$NON-NLS-1$
4532                 case ERROR_IO:                     return "i/o error"; //$NON-NLS-1$
4533                 case ERROR_INVALID_IMAGE:          return "Invalid image"; //$NON-NLS-1$
4534                 case ERROR_UNSUPPORTED_FORMAT:     return "Unsupported or unrecognized format"; //$NON-NLS-1$
4535                 case ERROR_INVALID_SUBCLASS:       return "Subclassing not allowed"; //$NON-NLS-1$
4536                 case ERROR_GRAPHIC_DISPOSED:       return "Graphic is disposed"; //$NON-NLS-1$
4537                 case ERROR_DEVICE_DISPOSED:        return "Device is disposed"; //$NON-NLS-1$
4538                 case ERROR_FUNCTION_DISPOSED:      return "BrowserFunction is disposed"; //$NON-NLS-1$
4539                 case ERROR_FAILED_EXEC:            return "Failed to execute runnable"; //$NON-NLS-1$
4540                 case ERROR_FAILED_EVALUATE:        return "Failed to evaluate javascript expression"; //$NON-NLS-1$
4541                 case ERROR_FAILED_LOAD_LIBRARY:    return "Unable to load library"; //$NON-NLS-1$
4542                 case ERROR_CANNOT_INVERT_MATRIX:    return "Cannot invert matrix"; //$NON-NLS-1$
4543                 case ERROR_NO_GRAPHICS_LIBRARY:    return "Unable to load graphics library"; //$NON-NLS-1$
4544                 case ERROR_INVALID_FONT:                return "Font not valid"; //$NON-NLS-1$
4545         }
4546         return "Unknown error"; //$NON-NLS-1$
4547 }
4548
4549 /**
4550  * Returns the NLS'ed message for the given argument.
4551  *
4552  * @param key the key to look up
4553  * @return the message for the given key
4554  *
4555  * @exception IllegalArgumentException <ul>
4556  *    <li>ERROR_NULL_ARGUMENT - if the key is null</li>
4557  * </ul>
4558  */
4559 public static String getMessage(String key) {
4560         return Compatibility.getMessage(key);
4561 }
4562
4563 /**
4564  * Returns the NLS'ed message for the given arguments.
4565  *
4566  * @param key the key to look up
4567  * @param args the parameters to insert into the message
4568  * @return the message for the given parameterized key
4569  *
4570  * @exception IllegalArgumentException <ul>
4571  *    <li>ERROR_NULL_ARGUMENT - if the key or args are null</li>
4572  * </ul>
4573  *
4574  * @since 3.8
4575  */
4576 public static String getMessage(String key, Object[] args) {
4577         return Compatibility.getMessage(key, args);
4578 }
4579
4580 /**
4581  * Returns the SWT platform name.
4582  * Examples: "win32", "gtk", "cocoa"
4583  *
4584  * @return the SWT platform name
4585  */
4586 public static String getPlatform () {
4587         return Platform.PLATFORM;
4588 }
4589
4590 /**
4591  * Returns the SWT version number as an integer.
4592  * Example: "SWT051" == 51
4593  *
4594  * @return the SWT version number
4595  */
4596 public static int getVersion () {
4597         return Library.SWT_VERSION;
4598 }
4599
4600 /**
4601  * Throws an appropriate exception based on the passed in error code.
4602  *
4603  * @param code the SWT error code
4604  */
4605 public static void error (int code) {
4606         error (code, null);
4607 }
4608
4609 /**
4610  * Throws an appropriate exception based on the passed in error code.
4611  * The <code>throwable</code> argument should be either null, or the
4612  * throwable which caused SWT to throw an exception.
4613  * <p>
4614  * In SWT, errors are reported by throwing one of three exceptions:
4615  * </p>
4616  * <dl>
4617  * <dd>java.lang.IllegalArgumentException</dd>
4618  * <dt>thrown whenever one of the API methods is invoked with an illegal argument</dt>
4619  * <dd>org.eclipse.swt.SWTException (extends java.lang.RuntimeException)</dd>
4620  * <dt>thrown whenever a recoverable error happens internally in SWT</dt>
4621  * <dd>org.eclipse.swt.SWTError (extends java.lang.Error)</dd>
4622  * <dt>thrown whenever a <b>non-recoverable</b> error happens internally in SWT</dt>
4623  * </dl>
4624  * This method provides the logic which maps between error codes
4625  * and one of the above exceptions.
4626  *
4627  * @param code the SWT error code.
4628  * @param throwable the exception which caused the error to occur.
4629  *
4630  * @see SWTError
4631  * @see SWTException
4632  * @see IllegalArgumentException
4633  */
4634 public static void error (int code, Throwable throwable) {
4635         error (code, throwable, null);
4636 }
4637
4638 /**
4639  * Throws an appropriate exception based on the passed in error code.
4640  * The <code>throwable</code> argument should be either null, or the
4641  * throwable which caused SWT to throw an exception.
4642  * <p>
4643  * In SWT, errors are reported by throwing one of three exceptions:
4644  * </p>
4645  * <dl>
4646  * <dd>java.lang.IllegalArgumentException</dd>
4647  * <dt>thrown whenever one of the API methods is invoked with an illegal argument</dt>
4648  * <dd>org.eclipse.swt.SWTException (extends java.lang.RuntimeException)</dd>
4649  * <dt>thrown whenever a recoverable error happens internally in SWT</dt>
4650  * <dd>org.eclipse.swt.SWTError (extends java.lang.Error)</dd>
4651  * <dt>thrown whenever a <b>non-recoverable</b> error happens internally in SWT</dt>
4652  * </dl>
4653  * This method provides the logic which maps between error codes
4654  * and one of the above exceptions.
4655  *
4656  * @param code the SWT error code.
4657  * @param throwable the exception which caused the error to occur.
4658  * @param detail more information about error.
4659  *
4660  * @see SWTError
4661  * @see SWTException
4662  * @see IllegalArgumentException
4663  *
4664  * @since 3.0
4665  */
4666 public static void error (int code, Throwable throwable, String detail) {
4667
4668         /*
4669         * This code prevents the creation of "chains" of SWTErrors and
4670         * SWTExceptions which in turn contain other SWTErrors and
4671         * SWTExceptions as their throwable. This can occur when low level
4672         * code throws an exception past a point where a higher layer is
4673         * being "safe" and catching all exceptions. (Note that, this is
4674         * _a_bad_thing_ which we always try to avoid.)
4675         *
4676         * On the theory that the low level code is closest to the
4677         * original problem, we simply re-throw the original exception here.
4678         *
4679         * NOTE: Exceptions thrown in syncExec and asyncExec must be
4680         * wrapped.
4681         */
4682         if (code != SWT.ERROR_FAILED_EXEC) {
4683                 if (throwable instanceof SWTError) throw (SWTError) throwable;
4684                 if (throwable instanceof SWTException) throw (SWTException) throwable;
4685         }
4686
4687         String message = findErrorText (code);
4688         if (detail != null) message += detail;
4689         switch (code) {
4690
4691                 /* Illegal Arguments (non-fatal) */
4692                 case ERROR_NULL_ARGUMENT:
4693                 case ERROR_CANNOT_BE_ZERO:
4694                 case ERROR_INVALID_ARGUMENT:
4695                 case ERROR_MENU_NOT_BAR:
4696                 case ERROR_MENU_NOT_DROP_DOWN:
4697                 case ERROR_MENU_NOT_POP_UP:
4698                 case ERROR_MENUITEM_NOT_CASCADE:
4699                 case ERROR_INVALID_PARENT:
4700                 case ERROR_INVALID_RANGE: {
4701                         throw new IllegalArgumentException (message);
4702                 }
4703
4704                 /* SWT Exceptions (non-fatal) */
4705                 case ERROR_INVALID_SUBCLASS:
4706                 case ERROR_THREAD_INVALID_ACCESS:
4707                 case ERROR_WIDGET_DISPOSED:
4708                 case ERROR_GRAPHIC_DISPOSED:
4709                 case ERROR_DEVICE_DISPOSED:
4710                 case ERROR_FUNCTION_DISPOSED:
4711                 case ERROR_INVALID_IMAGE:
4712                 case ERROR_UNSUPPORTED_DEPTH:
4713                 case ERROR_UNSUPPORTED_FORMAT:
4714                 case ERROR_FAILED_EXEC:
4715                 case ERROR_FAILED_EVALUATE:
4716                 case ERROR_CANNOT_INVERT_MATRIX:
4717                 case ERROR_NO_GRAPHICS_LIBRARY:
4718                 case ERROR_INVALID_RETURN_VALUE:
4719                 case ERROR_IO: {
4720                         SWTException exception = new SWTException (code, message);
4721                         exception.throwable = throwable;
4722                         throw exception;
4723                 }
4724
4725                 /* Operation System Errors (fatal, may occur only on some platforms) */
4726                 case ERROR_CANNOT_GET_COUNT:
4727                 case ERROR_CANNOT_GET_ENABLED:
4728                 case ERROR_CANNOT_GET_ITEM:
4729                 case ERROR_CANNOT_GET_ITEM_HEIGHT:
4730                 case ERROR_CANNOT_GET_SELECTION:
4731                 case ERROR_CANNOT_GET_TEXT:
4732                 case ERROR_CANNOT_SET_ENABLED:
4733                 case ERROR_CANNOT_SET_MENU:
4734                 case ERROR_CANNOT_SET_SELECTION:
4735                 case ERROR_CANNOT_SET_TEXT:
4736                 case ERROR_ITEM_NOT_ADDED:
4737                 case ERROR_ITEM_NOT_REMOVED:
4738                 case ERROR_NO_HANDLES:
4739                 //FALL THROUGH
4740
4741                 /* SWT Errors (fatal, may occur only on some platforms) */
4742                 case ERROR_FAILED_LOAD_LIBRARY:
4743                 case ERROR_NO_MORE_CALLBACKS:
4744                 case ERROR_NOT_IMPLEMENTED:
4745                 case ERROR_UNSPECIFIED: {
4746                         SWTError error = new SWTError (code, message);
4747                         error.throwable = throwable;
4748                         throw error;
4749                 }
4750         }
4751
4752         /* Unknown/Undefined Error */
4753         SWTError error = new SWTError (code, message);
4754         error.throwable = throwable;
4755         throw error;
4756 }
4757
4758 static {
4759         /*
4760         * These values represent bit masks that may need to
4761         * expand in the future.  Therefore they are not initialized
4762         * in the declaration to stop the compiler from inlining.
4763         */
4764         BUTTON_MASK = BUTTON1 | BUTTON2 | BUTTON3 | BUTTON4 | BUTTON5;
4765         MODIFIER_MASK = ALT | SHIFT | CTRL | COMMAND | ALT_GR;
4766
4767         /*
4768         * These values can be different on different platforms.
4769         * Therefore they are not initialized in the declaration
4770         * to stop the compiler from inlining.
4771         */
4772         String platform = getPlatform ();
4773         if ("cocoa".equals (platform)) { //$NON-NLS-1$
4774                 MOD1 = COMMAND;
4775                 MOD2 = SHIFT;
4776                 MOD3 = ALT;
4777                 MOD4 = CONTROL;
4778         } else {
4779                 MOD1 = CONTROL;
4780                 MOD2 = SHIFT;
4781                 MOD3 = ALT;
4782                 MOD4 = 0;
4783         }
4784 }
4785 }