author | prr |
Sat, 19 Sep 2015 15:45:59 -0700 | |
changeset 32865 | f9cb6e427f9e |
parent 25859 | 3317bb8137f4 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
17679
a81555868357
8005607: Recursion in J2DXErrHandler() Causes a Stack Overflow on Linux
alitvinov
parents:
14888
diff
changeset
|
2 |
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package sun.awt.X11; |
|
27 |
||
32865
f9cb6e427f9e
8136783: Run blessed-modifier-order script on java.desktop
prr
parents:
25859
diff
changeset
|
28 |
public final class XConstants { |
439
3488710b02f8
6623459: Get rid of XConstant, XProtocolConstants and XUtilConstants antipattern
dav
parents:
2
diff
changeset
|
29 |
|
3488710b02f8
6623459: Get rid of XConstant, XProtocolConstants and XUtilConstants antipattern
dav
parents:
2
diff
changeset
|
30 |
private XConstants(){} |
3488710b02f8
6623459: Get rid of XConstant, XProtocolConstants and XUtilConstants antipattern
dav
parents:
2
diff
changeset
|
31 |
|
2 | 32 |
public static final int X_PROTOCOL = 11 ; /* current protocol version */ |
33 |
public static final int X_PROTOCOL_REVISION = 0 ; /* current minor version */ |
|
34 |
||
35 |
/* Resources */ |
|
36 |
||
37 |
/* |
|
38 |
* _XSERVER64 must ONLY be defined when compiling X server sources on |
|
39 |
* systems where unsigned long is not 32 bits, must NOT be used in |
|
40 |
* client or library code. |
|
41 |
*/ |
|
42 |
||
43 |
/* |
|
44 |
#ifndef _XSERVER64 |
|
45 |
typedef unsigned long XID; |
|
46 |
typedef unsigned long Mask; |
|
47 |
typedef unsigned long Atom; |
|
48 |
typedef unsigned long VisualID; |
|
49 |
typedef unsigned long Time; |
|
50 |
#else |
|
51 |
typedef CARD32 XID; |
|
52 |
typedef CARD32 Mask; |
|
53 |
typedef CARD32 Atom; |
|
54 |
typedef CARD32 VisualID; |
|
55 |
typedef CARD32 Time; |
|
56 |
#endif |
|
57 |
||
58 |
typedef XID Window; |
|
59 |
typedef XID Drawable; |
|
60 |
typedef XID Font; |
|
61 |
typedef XID Pixmap; |
|
62 |
typedef XID Cursor; |
|
63 |
typedef XID Colormap; |
|
64 |
typedef XID GContext; |
|
65 |
typedef XID KeySym; |
|
66 |
||
67 |
typedef unsigned char KeyCode; |
|
68 |
*/ |
|
69 |
/***************************************************************** |
|
70 |
* RESERVED RESOURCE AND CONSTANT DEFINITIONS |
|
71 |
*****************************************************************/ |
|
72 |
||
73 |
public static final long None = 0L ; /* universal null resource or null atom */ |
|
74 |
||
75 |
/* background pixmap in CreateWindow and ChangeWindowAttributes */ |
|
76 |
public static final long ParentRelative = 1L ; |
|
77 |
||
78 |
/* border pixmap in CreateWindow and ChangeWindowAttributes special |
|
79 |
* VisualID and special window class passed to CreateWindow */ |
|
80 |
public static final long CopyFromParent = 0L ; |
|
81 |
||
82 |
public static final long PointerWindow = 0L ; /* destination window in SendEvent */ |
|
83 |
public static final long InputFocus = 1L ; /* destination window in SendEvent */ |
|
84 |
||
85 |
public static final long PointerRoot = 1L ; /* focus window in SetInputFocus */ |
|
86 |
||
87 |
public static final long AnyPropertyType = 0L ; /* special Atom, passed to GetProperty */ |
|
88 |
||
89 |
public static final long AnyKey = 0L ; /* special Key Code, passed to GrabKey */ |
|
90 |
||
91 |
public static final long AnyButton = 0L ; /* special Button Code, passed to GrabButton */ |
|
92 |
||
93 |
public static final long AllTemporary = 0L ; /* special Resource ID passed to KillClient */ |
|
94 |
||
95 |
public static final long CurrentTime = 0L ; /* special Time */ |
|
96 |
||
97 |
public static final long NoSymbol = 0L ; /* special KeySym */ |
|
98 |
||
99 |
/***************************************************************** |
|
100 |
* EVENT DEFINITIONS |
|
101 |
*****************************************************************/ |
|
102 |
||
103 |
/* Input Event Masks. Used as event-mask window attribute and as arguments |
|
104 |
to Grab requests. Not to be confused with event names. */ |
|
105 |
||
106 |
public static final long NoEventMask = 0L ; |
|
107 |
public static final long KeyPressMask = (1L<<0) ; |
|
108 |
public static final long KeyReleaseMask = (1L<<1) ; |
|
109 |
public static final long ButtonPressMask = (1L<<2) ; |
|
110 |
public static final long ButtonReleaseMask = (1L<<3) ; |
|
111 |
public static final long EnterWindowMask = (1L<<4) ; |
|
112 |
public static final long LeaveWindowMask = (1L<<5) ; |
|
113 |
public static final long PointerMotionMask = (1L<<6) ; |
|
114 |
public static final long PointerMotionHintMask = (1L<<7) ; |
|
115 |
public static final long Button1MotionMask = (1L<<8) ; |
|
116 |
public static final long Button2MotionMask = (1L<<9) ; |
|
117 |
public static final long Button3MotionMask = (1L<<10) ; |
|
118 |
public static final long Button4MotionMask = (1L<<11) ; |
|
119 |
public static final long Button5MotionMask = (1L<<12) ; |
|
120 |
public static final long ButtonMotionMask = (1L<<13) ; |
|
121 |
public static final long KeymapStateMask = (1L<<14) ; |
|
122 |
public static final long ExposureMask = (1L<<15) ; |
|
123 |
public static final long VisibilityChangeMask = (1L<<16) ; |
|
124 |
public static final long StructureNotifyMask = (1L<<17) ; |
|
125 |
public static final long ResizeRedirectMask = (1L<<18) ; |
|
126 |
public static final long SubstructureNotifyMask = (1L<<19) ; |
|
127 |
public static final long SubstructureRedirectMask = (1L<<20) ; |
|
128 |
public static final long FocusChangeMask = (1L<<21) ; |
|
129 |
public static final long PropertyChangeMask = (1L<<22) ; |
|
130 |
public static final long ColormapChangeMask = (1L<<23) ; |
|
131 |
public static final long OwnerGrabButtonMask = (1L<<24) ; |
|
132 |
||
14888
7ad1550e7050
8005018: X11: focus problems with openjdk 1.7.0 under gnome3 when selected keyboard is not the first in keyboard list
neugens
parents:
5506
diff
changeset
|
133 |
public static final int MAX_BUTTONS = 5; |
7ad1550e7050
8005018: X11: focus problems with openjdk 1.7.0 under gnome3 when selected keyboard is not the first in keyboard list
neugens
parents:
5506
diff
changeset
|
134 |
public static final int ALL_BUTTONS_MASK = (int) (Button1MotionMask | Button2MotionMask | Button3MotionMask | Button4MotionMask | Button5MotionMask); |
7ad1550e7050
8005018: X11: focus problems with openjdk 1.7.0 under gnome3 when selected keyboard is not the first in keyboard list
neugens
parents:
5506
diff
changeset
|
135 |
|
2 | 136 |
/* Event names. Used in "type" field in XEvent structures. Not to be |
137 |
confused with event masks above. They start from 2 because 0 and 1 |
|
138 |
are reserved in the protocol for errors and replies. */ |
|
139 |
||
140 |
public static final int KeyPress = 2 ; |
|
141 |
public static final int KeyRelease = 3 ; |
|
142 |
public static final int ButtonPress = 4 ; |
|
143 |
public static final int ButtonRelease = 5 ; |
|
144 |
public static final int MotionNotify = 6 ; |
|
145 |
public static final int EnterNotify = 7 ; |
|
146 |
public static final int LeaveNotify = 8 ; |
|
147 |
public static final int FocusIn = 9 ; |
|
148 |
public static final int FocusOut = 10 ; |
|
149 |
public static final int KeymapNotify = 11 ; |
|
150 |
public static final int Expose = 12 ; |
|
151 |
public static final int GraphicsExpose = 13 ; |
|
152 |
public static final int NoExpose = 14 ; |
|
153 |
public static final int VisibilityNotify = 15 ; |
|
154 |
public static final int CreateNotify = 16 ; |
|
155 |
public static final int DestroyNotify = 17 ; |
|
156 |
public static final int UnmapNotify = 18 ; |
|
157 |
public static final int MapNotify = 19 ; |
|
158 |
public static final int MapRequest = 20 ; |
|
159 |
public static final int ReparentNotify = 21 ; |
|
160 |
public static final int ConfigureNotify = 22 ; |
|
161 |
public static final int ConfigureRequest = 23 ; |
|
162 |
public static final int GravityNotify = 24 ; |
|
163 |
public static final int ResizeRequest = 25 ; |
|
164 |
public static final int CirculateNotify = 26 ; |
|
165 |
public static final int CirculateRequest = 27 ; |
|
166 |
public static final int PropertyNotify = 28 ; |
|
167 |
public static final int SelectionClear = 29 ; |
|
168 |
public static final int SelectionRequest = 30 ; |
|
169 |
public static final int SelectionNotify = 31 ; |
|
170 |
public static final int ColormapNotify = 32 ; |
|
171 |
public static final int ClientMessage = 33 ; |
|
172 |
public static final int MappingNotify = 34 ; |
|
173 |
public static final int LASTEvent = 35 ; /* must be bigger than any event # */ |
|
174 |
||
175 |
||
176 |
/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer, |
|
177 |
state in various key-, mouse-, and button-related events. */ |
|
178 |
||
179 |
public static final int ShiftMask = (1<<0) ; |
|
180 |
public static final int LockMask = (1<<1) ; |
|
181 |
public static final int ControlMask = (1<<2) ; |
|
182 |
public static final int Mod1Mask = (1<<3) ; |
|
183 |
public static final int Mod2Mask = (1<<4) ; |
|
184 |
public static final int Mod3Mask = (1<<5) ; |
|
185 |
public static final int Mod4Mask = (1<<6) ; |
|
186 |
public static final int Mod5Mask = (1<<7) ; |
|
187 |
||
188 |
/* modifier names. Used to build a SetModifierMapping request or |
|
189 |
to read a GetModifierMapping request. These correspond to the |
|
190 |
masks defined above. */ |
|
191 |
public static final int ShiftMapIndex = 0 ; |
|
192 |
public static final int LockMapIndex = 1 ; |
|
193 |
public static final int ControlMapIndex = 2 ; |
|
194 |
public static final int Mod1MapIndex = 3 ; |
|
195 |
public static final int Mod2MapIndex = 4 ; |
|
196 |
public static final int Mod3MapIndex = 5 ; |
|
197 |
public static final int Mod4MapIndex = 6 ; |
|
198 |
public static final int Mod5MapIndex = 7 ; |
|
199 |
||
200 |
public static final int AnyModifier = (1<<15) ; /* used in GrabButton, GrabKey */ |
|
201 |
||
202 |
||
203 |
/* button names. Used as arguments to GrabButton and as detail in ButtonPress |
|
204 |
and ButtonRelease events. Not to be confused with button masks above. |
|
205 |
Note that 0 is already defined above as "AnyButton". */ |
|
206 |
||
1962
6c293d33645b
6315717: Support for mouse with multiple scroll wheels and 4 or more buttons
dav
parents:
439
diff
changeset
|
207 |
public static final int buttons [] = new int [] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}; |
2 | 208 |
|
209 |
/* Notify modes */ |
|
210 |
||
211 |
public static final int NotifyNormal = 0 ; |
|
212 |
public static final int NotifyGrab = 1 ; |
|
213 |
public static final int NotifyUngrab = 2 ; |
|
214 |
public static final int NotifyWhileGrabbed = 3 ; |
|
215 |
||
216 |
public static final int NotifyHint = 1 ; /* for MotionNotify events */ |
|
217 |
||
218 |
/* Notify detail */ |
|
219 |
||
220 |
public static final int NotifyAncestor = 0 ; |
|
221 |
public static final int NotifyVirtual = 1 ; |
|
222 |
public static final int NotifyInferior = 2 ; |
|
223 |
public static final int NotifyNonlinear = 3 ; |
|
224 |
public static final int NotifyNonlinearVirtual = 4 ; |
|
225 |
public static final int NotifyPointer = 5 ; |
|
226 |
public static final int NotifyPointerRoot = 6 ; |
|
227 |
public static final int NotifyDetailNone = 7 ; |
|
228 |
||
229 |
/* Visibility notify */ |
|
230 |
||
231 |
public static final int VisibilityUnobscured = 0 ; |
|
232 |
public static final int VisibilityPartiallyObscured = 1 ; |
|
233 |
public static final int VisibilityFullyObscured = 2 ; |
|
234 |
||
235 |
/* Circulation request */ |
|
236 |
||
237 |
public static final int PlaceOnTop = 0 ; |
|
238 |
public static final int PlaceOnBottom = 1 ; |
|
239 |
||
240 |
/* protocol families */ |
|
241 |
||
242 |
public static final int FamilyInternet = 0 ; |
|
243 |
public static final int FamilyDECnet = 1 ; |
|
244 |
public static final int FamilyChaos = 2 ; |
|
245 |
||
246 |
/* Property notification */ |
|
247 |
||
248 |
public static final int PropertyNewValue = 0 ; |
|
249 |
public static final int PropertyDelete = 1 ; |
|
250 |
||
251 |
/* Color Map notification */ |
|
252 |
||
253 |
public static final int ColormapUninstalled = 0 ; |
|
254 |
public static final int ColormapInstalled = 1 ; |
|
255 |
||
256 |
/* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */ |
|
257 |
||
258 |
public static final int GrabModeSync = 0 ; |
|
259 |
public static final int GrabModeAsync = 1 ; |
|
260 |
||
261 |
/* GrabPointer, GrabKeyboard reply status */ |
|
262 |
||
263 |
public static final int GrabSuccess = 0 ; |
|
264 |
public static final int AlreadyGrabbed = 1 ; |
|
265 |
public static final int GrabInvalidTime = 2 ; |
|
266 |
public static final int GrabNotViewable = 3 ; |
|
267 |
public static final int GrabFrozen = 4 ; |
|
268 |
||
269 |
/* AllowEvents modes */ |
|
270 |
||
271 |
public static final int AsyncPointer = 0 ; |
|
272 |
public static final int SyncPointer = 1 ; |
|
273 |
public static final int ReplayPointer = 2 ; |
|
274 |
public static final int AsyncKeyboard = 3 ; |
|
275 |
public static final int SyncKeyboard = 4 ; |
|
276 |
public static final int ReplayKeyboard = 5 ; |
|
277 |
public static final int AsyncBoth = 6 ; |
|
278 |
public static final int SyncBoth = 7 ; |
|
279 |
||
280 |
/* Used in SetInputFocus, GetInputFocus */ |
|
281 |
||
282 |
public static final int RevertToNone = (int)None ; |
|
283 |
public static final int RevertToPointerRoot = (int)PointerRoot ; |
|
284 |
public static final int RevertToParent = 2 ; |
|
285 |
||
286 |
/* Used in XEventsQueued */ |
|
439
3488710b02f8
6623459: Get rid of XConstant, XProtocolConstants and XUtilConstants antipattern
dav
parents:
2
diff
changeset
|
287 |
public static final int QueuedAlready = 0; |
3488710b02f8
6623459: Get rid of XConstant, XProtocolConstants and XUtilConstants antipattern
dav
parents:
2
diff
changeset
|
288 |
public static final int QueuedAfterReading = 1; |
3488710b02f8
6623459: Get rid of XConstant, XProtocolConstants and XUtilConstants antipattern
dav
parents:
2
diff
changeset
|
289 |
public static final int QueuedAfterFlush = 2; |
2 | 290 |
|
291 |
||
292 |
/***************************************************************** |
|
293 |
* ERROR CODES |
|
294 |
*****************************************************************/ |
|
295 |
||
296 |
public static final int Success = 0 ; /* everything's okay */ |
|
297 |
public static final int BadRequest = 1 ; /* bad request code */ |
|
298 |
public static final int BadValue = 2 ; /* int parameter out of range */ |
|
299 |
public static final int BadWindow = 3 ; /* parameter not a Window */ |
|
300 |
public static final int BadPixmap = 4 ; /* parameter not a Pixmap */ |
|
301 |
public static final int BadAtom = 5 ; /* parameter not an Atom */ |
|
302 |
public static final int BadCursor = 6 ; /* parameter not a Cursor */ |
|
303 |
public static final int BadFont = 7 ; /* parameter not a Font */ |
|
304 |
public static final int BadMatch = 8 ; /* parameter mismatch */ |
|
305 |
public static final int BadDrawable = 9 ; /* parameter not a Pixmap or Window */ |
|
306 |
public static final int BadAccess = 10 ; /* depending on context: |
|
307 |
- key/button already grabbed |
|
308 |
- attempt to free an illegal |
|
309 |
cmap entry |
|
310 |
- attempt to store into a read-only |
|
311 |
color map entry. |
|
312 |
- attempt to modify the access control |
|
313 |
list from other than the local host. |
|
314 |
*/ |
|
315 |
public static final int BadAlloc = 11 ; /* insufficient resources */ |
|
316 |
public static final int BadColor = 12 ; /* no such colormap */ |
|
317 |
public static final int BadGC = 13 ; /* parameter not a GC */ |
|
318 |
public static final int BadIDChoice = 14 ; /* choice not in range or already used */ |
|
319 |
public static final int BadName = 15 ; /* font or color name doesn't exist */ |
|
320 |
public static final int BadLength = 16 ; /* Request length incorrect */ |
|
321 |
public static final int BadImplementation = 17 ; /* server is defective */ |
|
322 |
||
323 |
public static final int FirstExtensionError = 128 ; |
|
324 |
public static final int LastExtensionError = 255 ; |
|
325 |
||
326 |
/***************************************************************** |
|
327 |
* WINDOW DEFINITIONS |
|
328 |
*****************************************************************/ |
|
329 |
||
330 |
/* Window classes used by CreateWindow */ |
|
331 |
/* Note that CopyFromParent is already defined as 0 above */ |
|
332 |
||
333 |
public static final int InputOutput = 1 ; |
|
334 |
public static final int InputOnly = 2 ; |
|
335 |
||
336 |
/* Window attributes for CreateWindow and ChangeWindowAttributes */ |
|
337 |
||
338 |
public static final long CWBackPixmap = (1L<<0) ; |
|
339 |
public static final long CWBackPixel = (1L<<1) ; |
|
340 |
public static final long CWBorderPixmap = (1L<<2) ; |
|
341 |
public static final long CWBorderPixel = (1L<<3) ; |
|
342 |
public static final long CWBitGravity = (1L<<4) ; |
|
343 |
public static final long CWWinGravity = (1L<<5) ; |
|
344 |
public static final long CWBackingStore = (1L<<6) ; |
|
345 |
public static final long CWBackingPlanes = (1L<<7) ; |
|
346 |
public static final long CWBackingPixel = (1L<<8) ; |
|
347 |
public static final long CWOverrideRedirect = (1L<<9) ; |
|
348 |
public static final long CWSaveUnder = (1L<<10) ; |
|
349 |
public static final long CWEventMask = (1L<<11) ; |
|
350 |
public static final long CWDontPropagate = (1L<<12) ; |
|
351 |
public static final long CWColormap = (1L<<13) ; |
|
352 |
public static final long CWCursor = (1L<<14) ; |
|
353 |
||
354 |
/* ConfigureWindow structure */ |
|
355 |
||
356 |
public static final int CWX = (1<<0) ; |
|
357 |
public static final int CWY = (1<<1) ; |
|
358 |
public static final int CWWidth = (1<<2) ; |
|
359 |
public static final int CWHeight = (1<<3) ; |
|
360 |
public static final int CWBorderWidth = (1<<4) ; |
|
361 |
public static final int CWSibling = (1<<5) ; |
|
362 |
public static final int CWStackMode = (1<<6) ; |
|
363 |
||
364 |
||
365 |
/* Bit Gravity */ |
|
366 |
||
367 |
public static final int ForgetGravity = 0 ; |
|
368 |
public static final int NorthWestGravity = 1 ; |
|
369 |
public static final int NorthGravity = 2 ; |
|
370 |
public static final int NorthEastGravity = 3 ; |
|
371 |
public static final int WestGravity = 4 ; |
|
372 |
public static final int CenterGravity = 5 ; |
|
373 |
public static final int EastGravity = 6 ; |
|
374 |
public static final int SouthWestGravity = 7 ; |
|
375 |
public static final int SouthGravity = 8 ; |
|
376 |
public static final int SouthEastGravity = 9 ; |
|
377 |
public static final int StaticGravity = 10 ; |
|
378 |
||
379 |
/* Window gravity + bit gravity above */ |
|
380 |
||
381 |
public static final int UnmapGravity = 0 ; |
|
382 |
||
383 |
/* Used in CreateWindow for backing-store hint */ |
|
384 |
||
385 |
public static final int NotUseful = 0 ; |
|
386 |
public static final int WhenMapped = 1 ; |
|
387 |
public static final int Always = 2 ; |
|
388 |
||
389 |
/* Used in GetWindowAttributes reply */ |
|
390 |
||
391 |
public static final int IsUnmapped = 0 ; |
|
392 |
public static final int IsUnviewable = 1 ; |
|
393 |
public static final int IsViewable = 2 ; |
|
394 |
||
395 |
/* Used in ChangeSaveSet */ |
|
396 |
||
397 |
public static final int SetModeInsert = 0 ; |
|
398 |
public static final int SetModeDelete = 1 ; |
|
399 |
||
400 |
/* Used in ChangeCloseDownMode */ |
|
401 |
||
402 |
public static final int DestroyAll = 0 ; |
|
403 |
public static final int RetainPermanent = 1 ; |
|
404 |
public static final int RetainTemporary = 2 ; |
|
405 |
||
406 |
/* Window stacking method (in configureWindow) */ |
|
407 |
||
408 |
public static final int Above = 0 ; |
|
409 |
public static final int Below = 1 ; |
|
410 |
public static final int TopIf = 2 ; |
|
411 |
public static final int BottomIf = 3 ; |
|
412 |
public static final int Opposite = 4 ; |
|
413 |
||
414 |
/* Circulation direction */ |
|
415 |
||
416 |
public static final int RaiseLowest = 0 ; |
|
417 |
public static final int LowerHighest = 1 ; |
|
418 |
||
419 |
/* Property modes */ |
|
420 |
||
421 |
public static final int PropModeReplace = 0 ; |
|
422 |
public static final int PropModePrepend = 1 ; |
|
423 |
public static final int PropModeAppend = 2 ; |
|
424 |
||
425 |
/***************************************************************** |
|
426 |
* GRAPHICS DEFINITIONS |
|
427 |
*****************************************************************/ |
|
428 |
||
429 |
/* graphics functions, as in GC.alu */ |
|
430 |
||
431 |
public static final int GXclear = 0x0 ; /* 0 */ |
|
432 |
public static final int GXand = 0x1 ; /* src AND dst */ |
|
433 |
public static final int GXandReverse = 0x2 ; /* src AND NOT dst */ |
|
434 |
public static final int GXcopy = 0x3 ; /* src */ |
|
435 |
public static final int GXandInverted = 0x4 ; /* NOT src AND dst */ |
|
436 |
public static final int GXnoop = 0x5 ; /* dst */ |
|
437 |
public static final int GXxor = 0x6 ; /* src XOR dst */ |
|
438 |
public static final int GXor = 0x7 ; /* src OR dst */ |
|
439 |
public static final int GXnor = 0x8 ; /* NOT src AND NOT dst */ |
|
440 |
public static final int GXequiv = 0x9 ; /* NOT src XOR dst */ |
|
441 |
public static final int GXinvert = 0xa ; /* NOT dst */ |
|
442 |
public static final int GXorReverse = 0xb ; /* src OR NOT dst */ |
|
443 |
public static final int GXcopyInverted = 0xc ; /* NOT src */ |
|
444 |
public static final int GXorInverted = 0xd ; /* NOT src OR dst */ |
|
445 |
public static final int GXnand = 0xe ; /* NOT src OR NOT dst */ |
|
446 |
public static final int GXset = 0xf ; /* 1 */ |
|
447 |
||
448 |
/* LineStyle */ |
|
449 |
||
450 |
public static final int LineSolid = 0 ; |
|
451 |
public static final int LineOnOffDash = 1 ; |
|
452 |
public static final int LineDoubleDash = 2 ; |
|
453 |
||
454 |
/* capStyle */ |
|
455 |
||
456 |
public static final int CapNotLast = 0 ; |
|
457 |
public static final int CapButt = 1 ; |
|
458 |
public static final int CapRound = 2 ; |
|
459 |
public static final int CapProjecting = 3 ; |
|
460 |
||
461 |
/* joinStyle */ |
|
462 |
||
463 |
public static final int JoinMiter = 0 ; |
|
464 |
public static final int JoinRound = 1 ; |
|
465 |
public static final int JoinBevel = 2 ; |
|
466 |
||
467 |
/* fillStyle */ |
|
468 |
||
469 |
public static final int FillSolid = 0 ; |
|
470 |
public static final int FillTiled = 1 ; |
|
471 |
public static final int FillStippled = 2 ; |
|
472 |
public static final int FillOpaqueStippled = 3 ; |
|
473 |
||
474 |
/* fillRule */ |
|
475 |
||
476 |
public static final int EvenOddRule = 0 ; |
|
477 |
public static final int WindingRule = 1 ; |
|
478 |
||
479 |
/* subwindow mode */ |
|
480 |
||
481 |
public static final int ClipByChildren = 0 ; |
|
482 |
public static final int IncludeInferiors = 1 ; |
|
483 |
||
484 |
/* SetClipRectangles ordering */ |
|
485 |
||
486 |
public static final int Unsorted = 0 ; |
|
487 |
public static final int YSorted = 1 ; |
|
488 |
public static final int YXSorted = 2 ; |
|
489 |
public static final int YXBanded = 3 ; |
|
490 |
||
491 |
/* CoordinateMode for drawing routines */ |
|
492 |
||
493 |
public static final int CoordModeOrigin = 0 ; /* relative to the origin */ |
|
494 |
public static final int CoordModePrevious = 1 ; /* relative to previous point */ |
|
495 |
||
496 |
/* Polygon shapes */ |
|
497 |
||
498 |
public static final int Complex = 0 ; /* paths may intersect */ |
|
499 |
public static final int Nonconvex = 1 ; /* no paths intersect, but not convex */ |
|
500 |
public static final int Convex = 2 ; /* wholly convex */ |
|
501 |
||
502 |
/* Arc modes for PolyFillArc */ |
|
503 |
||
504 |
public static final int ArcChord = 0 ; /* join endpoints of arc */ |
|
505 |
public static final int ArcPieSlice = 1 ; /* join endpoints to center of arc */ |
|
506 |
||
507 |
/* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into |
|
508 |
GC.stateChanges */ |
|
509 |
||
510 |
public static final long GCFunction = (1L<<0) ; |
|
511 |
public static final long GCPlaneMask = (1L<<1) ; |
|
512 |
public static final long GCForeground = (1L<<2) ; |
|
513 |
public static final long GCBackground = (1L<<3) ; |
|
514 |
public static final long GCLineWidth = (1L<<4) ; |
|
515 |
public static final long GCLineStyle = (1L<<5) ; |
|
516 |
public static final long GCCapStyle = (1L<<6) ; |
|
517 |
public static final long GCJoinStyle = (1L<<7) ; |
|
518 |
public static final long GCFillStyle = (1L<<8) ; |
|
519 |
public static final long GCFillRule = (1L<<9) ; |
|
520 |
public static final long GCTile = (1L<<10) ; |
|
521 |
public static final long GCStipple = (1L<<11) ; |
|
522 |
public static final long GCTileStipXOrigin = (1L<<12) ; |
|
523 |
public static final long GCTileStipYOrigin = (1L<<13) ; |
|
524 |
public static final long GCFont = (1L<<14) ; |
|
525 |
public static final long GCSubwindowMode = (1L<<15) ; |
|
526 |
public static final long GCGraphicsExposures = (1L<<16) ; |
|
527 |
public static final long GCClipXOrigin = (1L<<17) ; |
|
528 |
public static final long GCClipYOrigin = (1L<<18) ; |
|
529 |
public static final long GCClipMask = (1L<<19) ; |
|
530 |
public static final long GCDashOffset = (1L<<20) ; |
|
531 |
public static final long GCDashList = (1L<<21) ; |
|
532 |
public static final long GCArcMode = (1L<<22) ; |
|
533 |
||
534 |
public static final int GCLastBit = 22 ; |
|
535 |
/***************************************************************** |
|
536 |
* FONTS |
|
537 |
*****************************************************************/ |
|
538 |
||
539 |
/* used in QueryFont -- draw direction */ |
|
540 |
||
541 |
public static final int FontLeftToRight = 0 ; |
|
542 |
public static final int FontRightToLeft = 1 ; |
|
543 |
||
544 |
public static final int FontChange = 255 ; |
|
545 |
||
546 |
/***************************************************************** |
|
547 |
* IMAGING |
|
548 |
*****************************************************************/ |
|
549 |
||
550 |
/* ImageFormat -- PutImage, GetImage */ |
|
551 |
||
552 |
public static final int XYBitmap = 0 ; /* depth 1, XYFormat */ |
|
553 |
public static final int XYPixmap = 1 ; /* depth == drawable depth */ |
|
554 |
public static final int ZPixmap = 2 ; /* depth == drawable depth */ |
|
555 |
||
556 |
/***************************************************************** |
|
557 |
* COLOR MAP STUFF |
|
558 |
*****************************************************************/ |
|
559 |
||
560 |
/* For CreateColormap */ |
|
561 |
||
562 |
public static final int AllocNone = 0 ; /* create map with no entries */ |
|
563 |
public static final int AllocAll = 1 ; /* allocate entire map writeable */ |
|
564 |
||
565 |
||
566 |
/* Flags used in StoreNamedColor, StoreColors */ |
|
567 |
||
568 |
public static final int DoRed = (1<<0) ; |
|
569 |
public static final int DoGreen = (1<<1) ; |
|
570 |
public static final int DoBlue = (1<<2) ; |
|
571 |
||
572 |
/***************************************************************** |
|
573 |
* CURSOR STUFF |
|
574 |
*****************************************************************/ |
|
575 |
||
576 |
/* QueryBestSize Class */ |
|
577 |
||
578 |
public static final int CursorShape = 0 ; /* largest size that can be displayed */ |
|
579 |
public static final int TileShape = 1 ; /* size tiled fastest */ |
|
580 |
public static final int StippleShape = 2 ; /* size stippled fastest */ |
|
581 |
||
582 |
/***************************************************************** |
|
583 |
* KEYBOARD/POINTER STUFF |
|
584 |
*****************************************************************/ |
|
585 |
||
586 |
public static final int AutoRepeatModeOff = 0 ; |
|
587 |
public static final int AutoRepeatModeOn = 1 ; |
|
588 |
public static final int AutoRepeatModeDefault = 2 ; |
|
589 |
||
590 |
public static final int LedModeOff = 0 ; |
|
591 |
public static final int LedModeOn = 1 ; |
|
592 |
||
593 |
/* masks for ChangeKeyboardControl */ |
|
594 |
||
595 |
public static final long KBKeyClickPercent = (1L<<0) ; |
|
596 |
public static final long KBBellPercent = (1L<<1) ; |
|
597 |
public static final long KBBellPitch = (1L<<2) ; |
|
598 |
public static final long KBBellDuration = (1L<<3) ; |
|
599 |
public static final long KBLed = (1L<<4) ; |
|
600 |
public static final long KBLedMode = (1L<<5) ; |
|
601 |
public static final long KBKey = (1L<<6) ; |
|
602 |
public static final long KBAutoRepeatMode = (1L<<7) ; |
|
603 |
||
604 |
public static final int MappingSuccess = 0 ; |
|
605 |
public static final int MappingBusy = 1 ; |
|
606 |
public static final int MappingFailed = 2 ; |
|
607 |
||
608 |
public static final int MappingModifier = 0 ; |
|
609 |
public static final int MappingKeyboard = 1 ; |
|
610 |
public static final int MappingPointer = 2 ; |
|
611 |
||
612 |
/***************************************************************** |
|
613 |
* SCREEN SAVER STUFF |
|
614 |
*****************************************************************/ |
|
615 |
||
616 |
public static final int DontPreferBlanking = 0 ; |
|
617 |
public static final int PreferBlanking = 1 ; |
|
618 |
public static final int DefaultBlanking = 2 ; |
|
619 |
||
620 |
public static final int DisableScreenSaver = 0 ; |
|
621 |
public static final int DisableScreenInterval = 0 ; |
|
622 |
||
623 |
public static final int DontAllowExposures = 0 ; |
|
624 |
public static final int AllowExposures = 1 ; |
|
625 |
public static final int DefaultExposures = 2 ; |
|
626 |
||
627 |
/* for ForceScreenSaver */ |
|
628 |
||
629 |
public static final int ScreenSaverReset = 0 ; |
|
630 |
public static final int ScreenSaverActive = 1 ; |
|
631 |
||
632 |
/***************************************************************** |
|
633 |
* HOSTS AND CONNECTIONS |
|
634 |
*****************************************************************/ |
|
635 |
||
636 |
/* for ChangeHosts */ |
|
637 |
||
638 |
public static final int HostInsert = 0 ; |
|
639 |
public static final int HostDelete = 1 ; |
|
640 |
||
641 |
/* for ChangeAccessControl */ |
|
642 |
||
643 |
public static final int EnableAccess = 1 ; |
|
644 |
public static final int DisableAccess = 0 ; |
|
645 |
||
646 |
/* Display classes used in opening the connection |
|
647 |
* Note that the statically allocated ones are even numbered and the |
|
648 |
* dynamically changeable ones are odd numbered */ |
|
649 |
||
650 |
public static final int StaticGray = 0 ; |
|
651 |
public static final int GrayScale = 1 ; |
|
652 |
public static final int StaticColor = 2 ; |
|
653 |
public static final int PseudoColor = 3 ; |
|
654 |
public static final int TrueColor = 4 ; |
|
655 |
public static final int DirectColor = 5 ; |
|
656 |
||
657 |
||
658 |
/* Byte order used in imageByteOrder and bitmapBitOrder */ |
|
659 |
||
660 |
public static final int LSBFirst = 0 ; |
|
661 |
public static final int MSBFirst = 1 ; |
|
2473
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
662 |
|
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
663 |
/* XKB support */ |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
664 |
public static final int XkbUseCoreKbd = 0x0100 ; |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
665 |
public static final int XkbNewKeyboardNotify = 0; |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
666 |
public static final int XkbMapNotify = 1; |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
667 |
public static final int XkbStateNotify = 2; |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
668 |
public static final long XkbNewKeyboardNotifyMask = (1L << 0); |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
669 |
public static final long XkbMapNotifyMask = (1L << 1); |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
670 |
public static final long XkbStateNotifyMask = (1L << 2); |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
671 |
public static final long XkbGroupStateMask = (1L << 4); |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
672 |
public static final long XkbKeyTypesMask = (1L<<0); |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
673 |
public static final long XkbKeySymsMask = (1L<<1); |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
674 |
public static final long XkbModifierMapMask = (1L<<2); |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
675 |
public static final long XkbVirtualModsMask = (1L<<6); //server map |
3f4bbd3be2f1
6680988: KeyEvent is still missing VK values for many keyboards
yan
parents:
1962
diff
changeset
|
676 |
|
2 | 677 |
} |