KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > swt > internal > motif > OS


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.swt.internal.motif;
12
13 import org.eclipse.swt.internal.*;
14
15  
16 public class OS extends Platform {
17     static {
18         Library.loadLibrary ("swt");
19     }
20
21     /* OS and locale Constants*/
22     public static final boolean IsAIX, IsSunOS, IsLinux, IsHPUX;
23     public static final boolean IsDBLocale;
24     static {
25         
26         /* Initialize the OS flags and locale constants */
27         String JavaDoc osName = System.getProperty ("os.name");
28         boolean isAIX = false, isSunOS = false, isLinux = false, isHPUX = false;
29         if (osName.equals ("Linux")) isLinux = true;
30         if (osName.equals ("AIX")) isAIX = true;
31         if (osName.equals ("Solaris")) isSunOS = true;
32         if (osName.equals ("SunOS")) isSunOS = true;
33         if (osName.equals ("HP-UX")) isHPUX = true;
34         IsAIX = isAIX; IsSunOS = isSunOS; IsLinux = isLinux; IsHPUX = isHPUX;
35         IsDBLocale = OS.MB_CUR_MAX () != 1;
36     }
37     public static final int CODESET = CODESET ();
38     public static final int LC_CTYPE = LC_CTYPE ();
39
40     public static final int PTR_SIZEOF;
41     static {
42         PTR_SIZEOF = 4;
43     }
44     
45     static final int RESOURCE_LENGTH = 1024 * 3;
46     static final int RESOURCE_START = OS.XtMalloc (RESOURCE_LENGTH);
47     static int NextResourceStart = RESOURCE_START;
48     static {
49         OS.setResourceMem (RESOURCE_START, RESOURCE_START + RESOURCE_LENGTH);
50     }
51     
52     /** Constants */
53     public static final int Above = 0;
54     public static final int AllPlanes = 0xFFFFFFFF;
55     public static final int Below = 1;
56     public static final int Button1Mask = (1<<8);
57     public static final int Button2Mask = (1<<9);
58     public static final int Button3Mask = (1<<10);
59     public static final int ButtonPress = 4;
60     public static final int ButtonPressMask = 1 << 2;
61     public static final int ButtonRelease = 5;
62     public static final int ButtonReleaseMask = 1 << 3;
63     public static final int ButtonMotionMask = 1 << 13;
64     public static final int Button1MotionMask = 1 << 8;
65     public static final int Button2MotionMask = 1 << 9;
66     public static final int Button3MotionMask = 1 << 10;
67     public static final int Button4MotionMask = 1 << 11;
68     public static final int Button5MotionMask = 1 << 12;
69     public static final int CWBackPixmap = 0x1;
70     public static final int CWBitGravity = 0x10;
71     public static final int CWCursor = 0x4000;
72     public static final int CWDontPropagate = 0x1000;
73     public static final int CWEventMask = 0x800;
74     public static final int CWHeight = 0x8;
75     public static final int CWSibling = 0x20;
76     public static final int CWStackMode = 0x40;
77     public static final int CWWidth = 0x4;
78     public static final int CapButt = 0x1;
79     public static final int CapProjecting = 3;
80     public static final int CapRound = 0x2;
81     public static final int ClientMessage = 33;
82     public static final int Complex = 0;
83     public static final int ConfigureNotify = 22;
84     public static final int ControlMask = (1<<2);
85     public static final int CoordModeOrigin = 0x0;
86     public static final int CopyFromParent = 0;
87     public static final int CreateNotify = 16;
88     public static final int CurrentTime = 0;
89     public static final int DestroyNotify = 17;
90     public static final int EnterNotify = 7;
91     public static final int EnterWindowMask = 1 << 4;
92     public static final int EvenOddRule = 0;
93     public static final int Expose = 12;
94     public static final int ExposureMask = 1 << 15;
95     public static final int FillStippled = 0x2;
96     public static final int FocusChangeMask = 1 << 21;
97     public static final int FocusIn = 9;
98     public static final int FocusOut = 10;
99     public static final int ForgetGravity = 0;
100     public static final int GCBackground = 0x8;
101     public static final int GCCapStyle = 1 << 6;
102     public static final int GCFillRule = 1 << 9;
103     public static final int GCForeground = 0x4;
104     public static final int GCFunction = 0x1;
105     public static final int GCJoinStyle = 1 << 7;
106     public static final int GCLineWidth = 0x10;
107     public static final int GXand = 0x1;
108     public static final int GXcopy = 0x3;
109     public static final int GXxor = 0x6;
110     public static final int GrabModeAsync = 1;
111     public static final int GrabSuccess = 0;
112     public static final int GraphicsExpose = 13;
113     public static final int hpXK_BackTab = 0x1000FF74;
114     public static final int IconicState = 0x3;
115     public static final int IncludeInferiors = 0x1;
116     public static final int IsUnviewable = 0x1;
117     public static final int IsViewable = 0x2;
118     public static final int JoinMiter = 0x0;
119     public static final int JoinRound = 0x1;
120     public static final int JoinBevel = 0x2;
121     public static final int KeyPress = 2;
122     public static final int KeyPressMask = 1 << 0;
123     public static final int KeyRelease = 3;
124     public static final int KeyReleaseMask = 1 << 1;
125     public static final int LSBFirst = 0;
126     public static final int LeaveNotify = 8;
127     public static final int LeaveWindowMask = 1 << 5;
128     public static final int LineOnOffDash = 0x1;
129     public static final int LineSolid = 0x0;
130     public static final int MSBFirst = 1;
131     public static final int MWM_DECOR_BORDER = 0x2;
132     public static final int MWM_DECOR_MAXIMIZE = 0x40;
133     public static final int MWM_DECOR_MENU = 0x10;
134     public static final int MWM_DECOR_MINIMIZE = 0x20;
135     public static final int MWM_DECOR_RESIZEH = 0x4;
136     public static final int MWM_DECOR_TITLE = 0x8;
137     public static final int MWM_INPUT_FULL_APPLICATION_MODAL = 0x3;
138     public static final int MWM_INPUT_MODELESS = 0x0;
139     public static final int MWM_INPUT_PRIMARY_APPLICATION_MODAL = 0x1;
140     public static final int MWM_INPUT_SYSTEM_MODAL = 0x2;
141     public static final int MapNotify = 19;
142     public static final int Mod1Mask = (1<<3);
143     public static final int Mod1MapIndex = 3;
144     public static final int Mod2MapIndex = 4;
145     public static final int Mod3MapIndex = 5;
146     public static final int Mod4MapIndex = 6;
147     public static final int Mod5MapIndex = 7;
148     public static final int MotionNotify = 6;
149     public static final int None = 0;
150     public static final int NormalState = 0x1;
151     public static final int NorthWestGravity = 0x1;
152     public static final int NotifyAncestor = 0x0;
153     public static final int NotifyInferior = 0x2;
154     public static final int NotifyNonlinear = 0x3;
155     public static final int NotifyNonlinearVirtual = 0x4;
156     public static final int NotifyNormal = 0x0;
157     public static final int NotifyGrab = 0x1;
158     public static final int NotifyUngrab = 0x2;
159     public static final int PMinSize = 1 << 4;
160     public static final int PMaxSize = 1 << 5;
161     public static final int PPosition = 1 << 2;
162     public static final int PointerMotionMask = 1 << 6;
163     public static final int PointerMotionHintMask = 1 << 7;
164     public static final int PropertyChangeMask = 1 << 22;
165     public static final int PropertyNotify = 28;
166     public static final int PropModeReplace = 0;
167     public static final int QueuedAfterReading = 1;
168     public static final int RectangleOut = 0x0;
169     public static final int ReparentNotify = 21;
170     public static final int ResizeRedirectMask = 1 << 18;
171     public static final int RevertToParent = 0x2;
172     public static final int SelectionClear = 29;
173     public static final int SelectionNotify = 31;
174     public static final int SelectionRequest = 30;
175     public static final int ShapeBounding = 0;
176     public static final int ShapeClip = 1;
177     public static final int ShapeSet = 0;
178     public static final int ShiftMask = (1<<0);
179     public static final int StructureNotifyMask = 1 << 17;
180     public static final int SubstructureNotifyMask = 1 << 19;
181     public static final int SubstructureRedirectMask = 1 << 20;
182     public static final int SunXK_F36 = 0x1005FF10;
183     public static final int SunXK_F37 = 0x1005FF11;
184     public static final int UnmapNotify = 18;
185     public static final int Unsorted = 0x0;
186     public static final int XA_ATOM = 4;
187     public static final int XA_FONT = 18;
188     public static final int XBufferOverflow = 0xFFFFFFFF;
189     public static final int XC_X_cursor = 0;
190     public static final int XC_bottom_left_corner = 12;
191     public static final int XC_bottom_right_corner = 14;
192     public static final int XC_bottom_side = 16;
193     public static final int XC_cross = 30;
194     public static final int XC_double_arrow = 42;
195     public static final int XC_fleur = 52;
196     public static final int XC_hand2 = 60;
197     public static final int XC_left_ptr = 68;
198     public static final int XC_left_side = 70;
199     public static final int XC_question_arrow = 92;
200     public static final int XC_right_side = 96;
201     public static final int XC_sb_h_double_arrow = 108;
202     public static final int XC_sb_up_arrow = 114;
203     public static final int XC_sb_v_double_arrow = 116;
204     public static final int XC_sizing = 120;
205     public static final int XC_top_left_corner = 134;
206     public static final int XC_top_right_corner = 136;
207     public static final int XC_top_side = 138;
208     public static final int XC_watch = 150;
209     public static final int XC_xterm = 152;
210     public static final int XCompoundTextStyle = 1;
211     public static final int XEMBED_EMBEDDED_NOTIFY = 0;
212     public static final int XEMBED_WINDOW_ACTIVATE = 1;
213     public static final int XEMBED_WINDOW_DEACTIVATE = 2;
214     public static final int XEMBED_REQUEST_FOCUS = 3;
215     public static final int XEMBED_FOCUS_IN = 4;
216     public static final int XEMBED_FOCUS_OUT = 5;
217     public static final int XEMBED_FOCUS_NEXT = 6;
218     public static final int XEMBED_FOCUS_PREV = 7;
219     public static final int XEMBED_MODALITY_ON = 10;
220     public static final int XEMBED_MODALITY_OFF = 11;
221     public static final int XEMBED_REGISTER_ACCELERATOR = 12;
222     public static final int XEMBED_UNREGISTER_ACCELERATOR = 13;
223     public static final int XEMBED_ACTIVATE_ACCELERATOR = 14;
224     public static final int XEMBED_FOCUS_CURRENT = 0;
225     public static final int XEMBED_FOCUS_FIRST = 1;
226     public static final int XEMBED_FOCUS_LAST = 2;
227     public static final int XEMBED_MAPPED = 1 << 0;
228     public static final int XK_Alt_L = 0xFFE9;
229     public static final int XK_Alt_R = 0xFFEA;
230     public static final int XK_BackSpace = 0xFF08;
231     public static final int XK_Break = 0xFF6B;
232     public static final int XK_Cancel = 0xFF69;
233     public static final int XK_Caps_Lock = 0xFFE5;
234     public static final int XK_Control_L = 0xFFE3;
235     public static final int XK_Control_R = 0xFFE4;
236     public static final int XK_Delete = 0xFFFF;
237     public static final int XK_Down = 0xFF54;
238     public static final int XK_End = 0xFF57;
239     public static final int XK_Escape = 0xFF1B;
240     public static final int XK_F1 = 0xFFBE;
241     public static final int XK_F10 = 0xFFC7;
242     public static final int XK_F11 = 0xFFC8;
243     public static final int XK_F12 = 0xFFC9;
244     public static final int XK_F13 = 0xFFCA;
245     public static final int XK_F14 = 0xFFCB;
246     public static final int XK_F15 = 0xFFCC;
247     public static final int XK_F2 = 0xFFBF;
248     public static final int XK_F3 = 0xFFC0;
249     public static final int XK_F4 = 0xFFC1;
250     public static final int XK_F5 = 0xFFC2;
251     public static final int XK_F6 = 0xFFC3;
252     public static final int XK_F7 = 0xFFC4;
253     public static final int XK_F8 = 0xFFC5;
254     public static final int XK_F9 = 0xFFC6;
255     public static final int XK_Home = 0xFF50;
256     public static final int XK_Help = 0xFF6A;
257     public static final int XK_ISO_Left_Tab = 0xFE20;
258     public static final int XK_Insert = 0xFF63;
259     public static final int XK_KP_Enter = 0xFF8D;
260     public static final int XK_KP_F1 = 0xFF91;
261     public static final int XK_KP_F2 = 0xFF92;
262     public static final int XK_KP_F3 = 0xFF93;
263     public static final int XK_KP_F4 = 0xFF94;
264     public static final int XK_KP_Home = 0xFF95;
265     public static final int XK_KP_Left = 0xFF96;
266     public static final int XK_KP_Up = 0xFF97;
267     public static final int XK_KP_Right = 0xFF98;
268     public static final int XK_KP_Down = 0xFF99;
269     public static final int XK_KP_Prior = 0xFF9A;
270     public static final int XK_KP_Page_Up = 0xFF9A;
271     public static final int XK_KP_Next = 0xFF9B;
272     public static final int XK_KP_Page_Down = 0xFF9B;
273     public static final int XK_KP_End = 0xFF9C;
274     public static final int XK_KP_Insert = 0xFF9E;
275     public static final int XK_KP_Delete = 0xFF9F;
276     public static final int XK_KP_Equal = 0xFFBD;
277     public static final int XK_KP_Multiply = 0xFFAA;
278     public static final int XK_KP_Add = 0xFFAB;
279     public static final int XK_KP_Subtract = 0xFFAD;
280     public static final int XK_KP_Decimal = 0xFFAE;
281     public static final int XK_KP_Divide = 0xFFAF;
282     public static final int XK_KP_0 = 0xFFB0;
283     public static final int XK_KP_1 = 0xFFB1;
284     public static final int XK_KP_2 = 0xFFB2;
285     public static final int XK_KP_3 = 0xFFB3;
286     public static final int XK_KP_4 = 0xFFB4;
287     public static final int XK_KP_5 = 0xFFB5;
288     public static final int XK_KP_6 = 0xFFB6;
289     public static final int XK_KP_7 = 0xFFB7;
290     public static final int XK_KP_8 = 0xFFB8;
291     public static final int XK_KP_9 = 0xFFB9;
292     public static final int XK_Left = 0xFF51;
293     public static final int XK_Linefeed = 0xFF0A;
294     public static final int XK_Meta_L = 0xFFE7;
295     public static final int XK_Meta_R = 0xFFE8;
296     public static final int XK_Num_Lock= 0xFF7F;
297     public static final int XK_Page_Down = 0xFF56;
298     public static final int XK_Page_Up = 0xFF55;
299     public static final int XK_Pause = 0xFF13;
300     public static final int XK_Print = 0xFF61;
301     public static final int XK_R1 = 0xFFD2;
302     public static final int XK_R2 = 0xFFD3;
303     public static final int XK_R3 = 0xFFD4;
304     public static final int XK_R4 = 0xFFD5;
305     public static final int XK_R5 = 0xFFD6;
306     public static final int XK_R6 = 0xFFD7;
307     public static final int XK_R7 = 0xFFD8;
308     public static final int XK_R9 = 0xFFDA;
309     public static final int XK_R13 = 0xFFDE;
310     public static final int XK_R15 = 0xFFE0;
311     public static final int XK_Return = 0xFF0D;
312     public static final int XK_Right = 0xFF53;
313     public static final int XK_Scroll_Lock = 0xFF14;
314     public static final int XK_Shift_L = 0xFFE1;
315     public static final int XK_Shift_R = 0xFFE2;
316     public static final int XK_Tab = 0xFF09;
317     public static final int XK_Up = 0xFF52;
318     public static final int XK_VoidSymbol = 0xFFFFFF;
319     public static final int XK_space = 0x20;
320     public static final byte XPAttrMerge = 2;
321     public static final byte XPDocAttr = 2;
322     public static final byte XPJobAttr = 1;
323     public static final byte XPPrinterAttr = 4;
324     public static final byte XPSpool = 1;
325     public static final int XYBitmap = 0;
326     public static final int XmALIGNMENT_BEGINNING = 0x0;
327     public static final int XmALIGNMENT_CENTER = 0x1;
328     public static final int XmALIGNMENT_END = 0x2;
329     public static final int XmARROW_DOWN = 0x1;
330     public static final int XmARROW_LEFT = 0x2;
331     public static final int XmARROW_RIGHT = 0x3;
332     public static final int XmARROW_UP = 0x0;
333     public static final int XmATTACH_FORM = 0x1;
334     public static final int XmBLEND_ALL = 0x0;
335     public static final int XmBROWSE_SELECT = 0x3;
336     public static final int XmCHARSET_TEXT = 0x0;
337     public static final int XmCOMBO_BOX = 0x0;
338     public static final int XmCONSTANT = 0x1;
339     public static final int XmCOPY_FAILED = 0x0;
340     public static final int XmCOPY_TRUNCATED = 0x2;
341     public static final int XmCR_DROP_SITE_ENTER_MESSAGE = 0x2;
342     public static final int XmCR_DROP_SITE_LEAVE_MESSAGE = 0x1;
343     public static final int XmCR_DROP_SITE_MOTION_MESSAGE = 0x3;
344     public static final int XmCR_OK = 0x1F;
345     public static final int XmCR_OPERATION_CHANGED = 0x8;
346     public static final int XmClipboardSuccess = 0x1;
347     public static final int XmDEFAULT_SELECT_COLOR = -1;
348     public static final int XmDIALOG_CANCEL_BUTTON = 0x2;
349     public static final int XmDIALOG_FULL_APPLICATION_MODAL = 0x2;
350     public static final int XmDIALOG_HELP_BUTTON = 0x7;
351     public static final int XmDIALOG_LIST = 0x8;
352     public static final int XmDIALOG_LIST_LABEL = 0x9;
353     public static final int XmDIALOG_MESSAGE_LABEL = 0xA;
354     public static final int XmDIALOG_MODELESS = 0x0;
355     public static final int XmDIALOG_OK_BUTTON = 0x4;
356     public static final int XmDIALOG_PRIMARY_APPLICATION_MODAL = 0x1;
357     public static final int XmDIALOG_SELECTION_LABEL = 0xB;
358     public static final int XmDIALOG_SYSTEM_MODAL = 0x3;
359     public static final int XmDIALOG_TEXT = 0xD;
360     public static final int XmDO_NOTHING = 0x2;
361     public static final int XmDRAG_DYNAMIC = 5;
362     public static final int XmDRAG_UNDER_NONE = 0;
363     public static final byte XmDROP = 0;
364     public static final byte XmDROP_COPY = (1 << 1);
365     public static final int XmDROP_DOWN_COMBO_BOX = 0x1;
366     public static final int XmDROP_DOWN_LIST = 0x2;
367     public static final byte XmDROP_LINK = (1 << 2);
368     public static final byte XmDROP_MOVE = (1 << 0);
369     public static final byte XmDROP_NOOP = 0;
370     public static final int XmDROP_SITE_ACTIVE = 0;
371     public static final int XmDROP_SITE_COMPOSITE = 1;
372     public static final int XmDROP_SITE_INACTIVE = 1;
373     public static final int XmDROP_SITE_INVALID = 2;
374     public static final int XmDROP_SITE_VALID = 3;
375     public static final int XmEXTENDED_SELECT = 0x2;
376     public static final byte[] XmFONTLIST_DEFAULT_TAG = {0x46, 0x4F, 0x4E, 0x54, 0x4C, 0x49, 0x53, 0x54, 0x5F, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4C, 0x54, 0x5F, 0x54, 0x41, 0x47, 0x5F, 0x53, 0x54, 0x52, 0x49, 0x4E, 0x47, 0x0};
377     public static final int XmFONT_IS_FONT = 0x0;
378     public static final int XmFONT_IS_FONTSET = 0x1;
379     public static final int XmFOREGROUND_COLOR = 0x1;
380     public static final int XmFRAME_TITLE_CHILD = 0x2;
381     public static final int XmHIGHLIGHT_COLOR = -3;
382     public static final int XmHIGHLIGHT_NORMAL = 0x0;
383     public static final int XmHORIZONTAL = 0x2;
384     public static final int XmLAST_POSITION = -1;
385     public static final int XmMAX_ON_BOTTOM = 0x1;
386     public static final int XmMAX_ON_RIGHT = 0x3;
387     public static final int XmMAX_ON_TOP = 0x0;
388     public static final int XmMERGE_REPLACE = 0x1;
389     public static final int XmMULTIPLE_SELECT = 0x1;
390     public static final int XmMULTI_LINE_EDIT = 0x0;
391     public static final int XmNO_LINE = 0x0;
392     public static final int XmNONE = 0x0;
393     public static final int XmN_OF_MANY = 0x1;
394     public static final int XmNaccelerator = malloc ("accelerator", 4);
395     public static final int XmNacceleratorText = malloc ("acceleratorText", 4);
396     public static final int XmNactivateCallback = malloc ("activateCallback", 4);
397     public static final int XmNalignment = malloc ("alignment", 1);
398     public static final int XmNallowShellResize = malloc ("allowShellResize", 1);
399     public static final int XmNancestorSensitive = malloc ("ancestorSensitive", 1);
400     public static final int XmNanimationStyle = malloc ("animationStyle", 1);
401     public static final int XmNarea = malloc ("area", 4);
402     public static final int XmNarmCallback = malloc ("armCallback", 4);
403     public static final int XmNarrowDirection = malloc ("arrowDirection", 1);
404     public static final int XmNarrowSize = malloc ("arrowSize", 2);
405     public static final int XmNarrowSpacing = malloc ("arrowSpacing", 2);
406     public static final int XmNbackground = malloc ("background", 4);
407     public static final int XmNblendModel = malloc ("blendModel", 1);
408     public static final int XmNblinkRate = malloc ("blinkRate", 4);
409     public static final int XmNborderColor = malloc ("borderColor", 4);
410     public static final int XmNborderWidth = malloc ("borderWidth", 2);
411     public static final int XmNbottomAttachment = malloc ("bottomAttachment", 1);
412     public static final int XmNbottomShadowColor = malloc ("bottomShadowColor", 4);
413     public static final int XmNbrowseSelectionCallback = malloc ("browseSelectionCallback", 4);
414     public static final int XmNcancelCallback = malloc ("cancelCallback", 4);
415     public static final int XmNcancelLabelString = malloc ("cancelLabelString", 4);
416     public static final int XmNcascadingCallback = malloc ("cascadingCallback", 4);
417     public static final int XmNchildHorizontalSpacing = malloc ("childHorizontalSpacing", 2);
418     public static final int XmNchildren = malloc ("children", 4);
419     public static final int XmNclientData = malloc ("clientData", 4);
420     public static final int XmNcolormap = malloc ("colormap", 4);
421     public static final int XmNcolumns = malloc ("columns", 2);
422     public static final int XmNcomboBoxType = malloc ("comboBoxType", 1);
423     public static final int XmNconvertProc = malloc ("convertProc", 4);
424     public static final int XmNcursorPositionVisible = malloc ("cursorPositionVisible", 1);
425     public static final int XmNdecimalPoints = malloc ("decimalPoints", 2);
426     public static final int XmNdecrementCallback = malloc ("decrementCallback", 4);
427     public static final int XmNdefaultActionCallback = malloc ("defaultActionCallback", 4);
428     public static final int XmNdefaultButtonShadowThickness = malloc ("defaultButtonShadowThickness", 4);
429     public static final int XmNdefaultPosition = malloc ("defaultPosition", 1);
430     public static final int XmNdeleteResponse = malloc ("deleteResponse", 1);
431     public static final int XmNdialogStyle = malloc ("dialogStyle", 1);
432     public static final int XmNdialogTitle = malloc ("dialogTitle", 4);
433     public static final int XmNdirMask = malloc ("dirMask", 4);
434     public static final int XmNdirSpec = malloc ("dirSpec", 4);
435     public static final int XmNdirectory = malloc ("directory", 4);
436     public static final int XmNdragCallback = malloc ("dragCallback", 4);
437     public static final int XmNdragDropFinishCallback = malloc ("dragDropFinishCallback", 4);
438     public static final int XmNdragInitiatorProtocolStyle = malloc ("dragInitiatorProtocolStyle", 1);
439     public static final int XmNdragOperations = malloc ("dragOperations", 1);
440     public static final int XmNdragProc = malloc ("dragProc", 4);
441     public static final int XmNdragReceiverProtocolStyle = malloc ("dragReceiverProtocolStyle", 1);
442     public static final int XmNdropFinishCallback = malloc ("dropFinishCallback", 4);
443     public static final int XmNdropProc = malloc("dropProc", 4);
444     public static final int XmNdropSiteActivity = malloc ("dropSiteActivity", 1);
445     public static final int XmNdropSiteOperations = malloc ("dropSiteOperations", 1);
446     public static final int XmNdropSiteType = malloc ("dropSiteType", 1);
447     public static final int XmNdropTransfers = malloc ("dropTransfers", 4);
448     public static final int XmNeditMode = malloc ("editMode", 4);
449     public static final int XmNeditable = malloc ("editable", 1);
450     public static final int XmNenableThinThickness = malloc ("enableThinThickness", 1);
451     public static final int XmNexportTargets = malloc ("exportTargets", 4);
452     public static final int XmNexposeCallback = malloc ("exposeCallback", 4);
453     public static final int XmNextendedSelectionCallback = malloc ("extendedSelectionCallback", 4);
454     public static final int XmNfilterLabelString = malloc ("filterLabelString", 4);
455     public static final int XmNfont = malloc ("font", 4);
456     public static final int XmNfontList = malloc ("fontList", 4);
457     public static final int XmNfontType = malloc ("fontType", 4);
458     public static final int XmNforeground = malloc ("foreground", 4);
459     public static final int XmNframeChildType = malloc ("frameChildType", 1);
460     public static final int XmNheight = malloc ("height", 2);
461     public static final int XmNhelpCallback = malloc ("helpCallback", 4);
462     public static final int XmNhelpLabelString = malloc ("helpLabelString", 4);
463     public static final int XmNhighlightColor = malloc ("highlightColor", 4);
464     public static final int XmNhighlightThickness = malloc ("highlightThickness", 2);
465     public static final int XmNhorizontalScrollBar = malloc ("horizontalScrollBar", 4);
466     public static final int XmNiconMask = malloc ("iconMask", 4);
467     public static final int XmNiconName = malloc ("iconName", 4);
468     public static final int XmNiconPixmap = malloc ("iconPixmap", 4);
469     public static final int XmNiconic = malloc ("iconic", 1);
470     public static final int XmNimportTargets = malloc("importTargets", 4);
471     public static final int XmNincrement = malloc ("increment", 4);
472     public static final int XmNincrementValue = malloc ("incrementValue", 4);
473     public static final int XmNincrementCallback = malloc ("incrementCallback", 4);
474     public static final int XmNindicatorOn = malloc ("indicatorOn", 1);
475     public static final int XmNindicatorType = malloc ("indicatorType", 1);
476     public static final int XmNinitialState = malloc ("initialState", 4);
477     public static final int XmNitemCount = malloc ("itemCount", 4);
478     public static final int XmNitems = malloc ("items", 4);
479     public static final int XmNlabelInsensitivePixmap = malloc ("labelInsensitivePixmap", 4);
480     public static final int XmNlabelPixmap = malloc ("labelPixmap", 4);
481     public static final int XmNlabelString = malloc ("labelString", 4);
482     public static final int XmNlabelType = malloc ("labelType", 1);
483     public static final int XmNleftAttachment = malloc ("leftAttachment", 1);
484     public static final int XmNlist = malloc ("list", 4);
485     public static final int XmNlistMarginHeight = malloc ("listMarginHeight", 2);
486     public static final int XmNlistMarginWidth = malloc ("listMarginWidth", 2);
487     public static final int XmNlistSizePolicy = malloc ("listSizePolicy", 1);
488     public static final int XmNlistSpacing = malloc ("listSpacing", 2);
489     public static final int XmNmapCallback = malloc ("mapCallback", 4);
490     public static final int XmNmappedWhenManaged = malloc ("mappedWhenManaged", 4);
491     public static final int XmNmarginBottom = malloc ("marginBottom", 2);
492     public static final int XmNmarginHeight = malloc ("marginHeight", 2);
493     public static final int XmNmarginLeft = malloc ("marginLeft", 2);
494     public static final int XmNmarginRight = malloc ("marginRight", 2);
495     public static final int XmNmarginTop = malloc ("marginTop", 2);
496     public static final int XmNmarginWidth = malloc ("marginWidth", 2);
497     public static final int XmNmaximum = malloc ("maximum", 4);
498     public static final int XmNmaximumValue = malloc ("maximumValue", 4);
499     public static final int XmNmenuBar = malloc ("menuBar", 4);
500     public static final int XmNmessageString = malloc ("messageString", 4);
501     public static final int XmNminimum = malloc ("minimum", 4);
502     public static final int XmNminimumValue = malloc ("minimumValue", 4);
503     public static final int XmNminHeight = malloc ("minHeight", 4);
504     public static final int XmNminWidth = malloc ("minWidth", 4);
505     public static final int XmNmnemonic = malloc ("mnemonic", 4);
506     public static final int XmNmodifyVerifyCallback = malloc ("modifyVerifyCallback", 4);
507     public static final int XmNmultipleSelectionCallback = malloc ("multipleSelectionCallback", 4);
508     public static final int XmNmwmDecorations = malloc ("mwmDecorations", 4);
509     public static final int XmNmwmInputMode = malloc ("mwmInputMode", 4);
510     public static final int XmNnavigationType = malloc ("navigationType", 1);
511     public static final int XmNnoResize = malloc ("noResize", 1);
512     public static final int XmNnumChildren = malloc ("numChildren", 4);
513     public static final int XmNnumDropTransfers = malloc ("numDropTransfers", 4);
514     public static final int XmNnumExportTargets = malloc ("numExportTargets", 4);
515     public static final int XmNnumImportTargets = malloc("numImportTargets", 4);
516     public static final int XmNokCallback = malloc ("okCallback", 4);
517     public static final int XmNokLabelString = malloc ("okLabelString", 4);
518     public static final int XmNoperationCursorIcon = malloc ("operationCursorIcon", 4);
519     public static final int XmNorientation = malloc ("orientation", 1);
520     public static final int XmNoverrideRedirect = malloc ("overrideRedirect", 1);
521     public static final int XmNpageDecrementCallback = malloc ("pageDecrementCallback", 4);
522     public static final int XmNpageIncrement = malloc ("pageIncrement", 4);
523     public static final int XmNpageIncrementCallback = malloc ("pageIncrementCallback", 4);
524     public static final int XmNpathMode = malloc ("pathMode", 4);
525     public static final int XmNpattern = malloc ("pattern", 4);
526     public static final int XmNposition = malloc ("position", 4);
527     public static final int XmNpositionIndex = malloc ("positionIndex", 2);
528     public static final int XmNprocessingDirection = malloc ("processingDirection", 1);
529     public static final int XmNrecomputeSize = malloc ("recomputeSize", 1);
530     public static final int XmNresizable = malloc ("resizable", 1);
531     public static final int XmNresizePolicy = malloc ("resizePolicy", 1);
532     public static final int XmNrightAttachment = malloc ("rightAttachment", 1);
533     public static final int XmNscaleMultiple = malloc ("scaleMultiple", 4);
534     public static final int XmNscrollHorizontal = malloc ("scrollHorizontal", 1);
535     public static final int XmNscrollVertical = malloc ("scrollVertical", 1);
536     public static final int XmNselectColor = malloc ("selectColor", 1);
537     public static final int XmNselectedItemCount = malloc ("selectedItemCount", 4);
538     public static final int XmNselectedItems = malloc ("selectedItems", 4);
539     public static final int XmNselectedPosition = malloc ("selectedPosition", 4);
540     public static final int XmNselectionArrayCount = malloc ("selectionArrayCount", 4);
541     public static final int XmNselectionCallback = malloc ("selectionCallback", 4);
542     public static final int XmNselectionPolicy = malloc ("selectionPolicy", 1);
543     public static final int XmNsensitive = malloc ("sensitive", 1);
544     public static final int XmNseparatorType = malloc ("separatorType", 1);
545     public static final int XmNset = malloc ("set", 1);
546     public static final int XmNshadowThickness = malloc ("shadowThickness", 2);
547     public static final int XmNshadowType = malloc ("shadowType", 1);
548     public static final int XmNshowArrows = malloc ("showArrows", 4);
549     public static final int XmNshowAsDefault = malloc ("showAsDefault", 2);
550     public static final int XmNsliderSize = malloc ("sliderSize", 4);
551     public static final int XmNsliderVisual = malloc ("sliderVisual", 4);
552     public static final int XmNsourceCursorIcon = malloc ("sourceCursorIcon", 4);
553     public static final int XmNspinBoxChildType = malloc ("spinBoxChildType", 2);
554     public static final int XmNspotLocation = malloc ("spotLocation", 4);
555     public static final int XmNstateCursorIcon = malloc ("stateCursorIcon", 4);
556     public static final int XmNsubMenuId = malloc ("subMenuId", 4);
557     public static final int XmNsubstitute = malloc ("substitute", 4);
558     public static final int XmNtabList = malloc ("tabList", 4);
559     public static final int XmNtextField = malloc ("textField", 4);
560     public static final int XmNtitle = malloc ("title", 4);
561     public static final int XmNtitleString = malloc ("titleString", 4);
562     public static final int XmNtoBottomCallback = malloc ("toBottomCallback", 4);
563     public static final int XmNtoTopCallback = malloc ("toTopCallback", 4);
564     public static final int XmNtopAttachment = malloc ("topAttachment", 1);
565     public static final int XmNtopItemPosition = malloc ("topItemPosition", 4);
566     public static final int XmNtopShadowColor = malloc ("topShadowColor", 4);
567     public static final int XmNtransferProc = malloc ("transferProc", 4);
568     public static final int XmNtransferStatus = malloc ("transferStatus", 4);
569     public static final int XmNtraversalOn = malloc ("traversalOn", 1);
570     public static final int XmNtroughColor = malloc ("troughColor", 4);
571     public static final int XmNunmapCallback = malloc ("unmapCallback", 4);
572     public static final int XmNuserData = malloc ("userData", 4);
573     public static final int XmNvalue = malloc ("value", 4);
574     public static final int XmNvalueChangedCallback = malloc ("valueChangedCallback", 4);
575     public static final int XmNverifyBell = malloc ("verifyBell", 1);
576     public static final int XmNverticalScrollBar = malloc ("verticalScrollBar", 4);
577     public static final int XmNvisibleItemCount = malloc ("visibleItemCount", 4);
578     public static final int XmNUMERIC = 0x3;
579     public static final int XmNwidth = malloc ("width", 2);
580     public static final int XmNwordWrap = malloc ("wordWrap", 1);
581     public static final int XmNx = malloc ("x", 2);
582     public static final int XmNy = malloc ("y", 2);
583     public static final int XmONE_OF_MANY = 0x2;
584     public static final int XmOUTPUT_ALL = 0x0;
585     public static final int XmPATH_MODE_FULL = 0x0;
586     public static final int XmPIXELS = 0x0;
587     public static final int XmPIXMAP = 0x1;
588     public static final int XmRELATIVE = 0x1;
589     public static final int XmRESIZE_NONE = 0x0;
590     public static final int XmREVERSED_GROUND_COLORS = -2;
591     public static final int XmSET = 0x1;
592     public static final int XmSHADOW_ETCHED_IN = 0x5;
593     public static final int XmSHADOW_ETCHED_OUT = 0x6;
594     public static final int XmSHADOW_IN = 0x7;
595     public static final int XmSHADOW_OUT = 0x8;
596     public static final int XmSINGLE_LINE = 0x1;
597     public static final int XmSINGLE_LINE_EDIT = 0x1;
598     public static final int XmSTRING = 0x2;
599     public static final int XmSTRING_COMPONENT_SEPARATOR = 0x4;
600     public static final int XmSTRING_COMPONENT_TAB = 0xC;
601     public static final int XmTRANSFER_FAILURE = 0;
602     public static final int XmTRAVERSE_CURRENT = 0x0;
603     public static final int XmUNSET = 0x0;
604     public static final int XmUNSPECIFIED_PIXMAP = 0x2;
605     public static final int XmVARIABLE = 0x0;
606     public static final int XmVERTICAL = 0x1;
607     public static final int XtGrabNone = 0x0;
608     public static final int XtIMAlternateInput = 0x4;
609     public static final int XtIMTimer = 0x2;
610     public static final int XtIMXEvent = 0x1;
611     public static final int XtInputReadMask = 1;
612     public static final int XtListTail = 0x1;
613     public static final int WindingRule = 1;
614     public static final int ZPixmap = 2;
615     
616     
617     static int malloc (String JavaDoc name, int length) {
618         int strLen = name.length ();
619         if (NextResourceStart + strLen + 2 > RESOURCE_START + RESOURCE_LENGTH) {
620             System.out.println ("*** Warning : SWT - Resource overrun. Increase OS.RESOURCE_LENGTH.");
621             System.out.println ("*** Warning : Exiting ...");
622             System.exit (0);
623         }
624         char [] unicode = new char [strLen];
625         name.getChars (0, strLen, unicode, 0);
626         byte[] buffer = new byte [strLen + 2];
627         buffer [0] = (byte) length;
628         for (int i = 0; i < strLen; i++) {
629             buffer [i+1] = (byte) unicode[i];
630         }
631         OS.memmove (NextResourceStart, buffer, strLen + 2);
632         int result = NextResourceStart + 1;
633         NextResourceStart += strLen + 2;
634         return result;
635     }
636     static final native int setResourceMem (int start, int end);
637
638 /** JNI native methods */
639 public static final native int MonitorEnter(Object JavaDoc object);
640 public static final native int MonitorExit(Object JavaDoc object);
641
642 /** Natives */
643 public static final native int _Call(int proc, int arg1, int arg2);
644 public static final int Call(int proc, int arg1, int arg2) {
645     lock.lock();
646     try {
647         return _Call(proc, arg1, arg2);
648     } finally {
649         lock.unlock();
650     }
651 }
652 public static final native int _ConnectionNumber(int display);
653 public static final int ConnectionNumber(int display) {
654     lock.lock();
655     try {
656         return _ConnectionNumber(display);
657     } finally {
658         lock.unlock();
659     }
660 }
661 public static final native int CODESET();
662 public static final native boolean FD_ISSET(int fd, byte[] fd_set);
663 public static final native void FD_SET(int fd, byte[] fd_set);
664 public static final native void FD_ZERO(byte[] fd_set);
665 public static final native int LC_CTYPE();
666 public static final native int MB_CUR_MAX();
667 public static final native int _applicationShellWidgetClass();
668 public static final int applicationShellWidgetClass() {
669     lock.lock();
670     try {
671         return _applicationShellWidgetClass();
672     } finally {
673         lock.unlock();
674     }
675 }
676 public static final native int _overrideShellWidgetClass();
677 public static final int overrideShellWidgetClass() {
678     lock.lock();
679     try {
680         return _overrideShellWidgetClass();
681     } finally {
682         lock.unlock();
683     }
684 }
685 public static final native int _shellWidgetClass();
686 public static final int shellWidgetClass() {
687     lock.lock();
688     try {
689         return _shellWidgetClass();
690     } finally {
691         lock.unlock();
692     }
693 }
694 public static final native int _topLevelShellWidgetClass();
695 public static final int topLevelShellWidgetClass() {
696     lock.lock();
697     try {
698         return _topLevelShellWidgetClass();
699     } finally {
700         lock.unlock();
701     }
702 }
703 public static final native int _transientShellWidgetClass();
704 public static final int transientShellWidgetClass() {
705     lock.lock();
706     try {
707         return _transientShellWidgetClass();
708     } finally {
709         lock.unlock();
710     }
711 }
712 public static final native int _xmMenuShellWidgetClass();
713 public static final int xmMenuShellWidgetClass() {
714     lock.lock();
715     try {
716         return _xmMenuShellWidgetClass();
717     } finally {
718         lock.unlock();
719     }
720 }
721 public static final native int _XAllocColor(int display, int colormap, XColor color);
722 public static final int XAllocColor(int display, int colormap, XColor color) {
723     lock.lock();
724     try {
725         return _XAllocColor(display, colormap, color);
726     } finally {
727         lock.unlock();
728     }
729 }
730 public static final native void _XBell(int display, int ms);
731 public static final void XBell(int display, int ms) {
732     lock.lock();
733     try {
734         _XBell(display, ms);
735     } finally {
736         lock.unlock();
737     }
738 }
739 public static final native int _XBlackPixel(int display, int screenNum);
740 public static final int XBlackPixel(int display, int screenNum) {
741     lock.lock();
742     try {
743         return _XBlackPixel(display, screenNum);
744     } finally {
745         lock.unlock();
746     }
747 }
748 public static final native int _XChangeActivePointerGrab(int display, int eventMask, int cursor, int time);
749 public static final int XChangeActivePointerGrab(int display, int eventMask, int cursor, int time) {
750     lock.lock();
751     try {
752         return _XChangeActivePointerGrab(display, eventMask, cursor, time);
753     } finally {
754         lock.unlock();
755     }
756 }
757 public static final native void _XChangeProperty(int display, int w, int property, int type, int format, int mode, int[] data, int nelements);
758 public static final void XChangeProperty(int display, int w, int property, int type, int format, int mode, int[] data, int nelements) {
759     lock.lock();
760     try {
761         _XChangeProperty(display, w, property, type, format, mode, data, nelements);
762     } finally {
763         lock.unlock();
764     }
765 }
766 public static final native void _XChangeWindowAttributes(int display, int window, int mask, XSetWindowAttributes attributes);
767 public static final void XChangeWindowAttributes(int display, int window, int mask, XSetWindowAttributes attributes) {
768     lock.lock();
769     try {
770         _XChangeWindowAttributes(display, window, mask, attributes);
771     } finally {
772         lock.unlock();
773     }
774 }
775 public static final native int _XCheckIfEvent(int display, int event_return, int predicate, int arg);
776 public static final int XCheckIfEvent(int display, int event_return, int predicate, int arg) {
777     lock.lock();
778     try {
779         return _XCheckIfEvent(display, event_return, predicate, arg);
780     } finally {
781         lock.unlock();
782     }
783 }
784 public static final native boolean _XCheckMaskEvent(int display, int mask, int event);
785 public static final boolean XCheckMaskEvent(int display, int mask, int event) {
786     lock.lock();
787     try {
788         return _XCheckMaskEvent(display, mask, event);
789     } finally {
790         lock.unlock();
791     }
792 }
793 public static final native boolean _XCheckWindowEvent(int display, int window, int mask, int event);
794 public static final boolean XCheckWindowEvent(int display, int window, int mask, int event) {
795     lock.lock();
796     try {
797         return _XCheckWindowEvent(display, window, mask, event);
798     } finally {
799         lock.unlock();
800     }
801 }
802 public static final native void _XClearArea(int display, int window, int x, int y, int width, int height, boolean exposures);
803 public static final void XClearArea(int display, int window, int x, int y, int width, int height, boolean exposures) {
804     lock.lock();
805     try {
806         _XClearArea(display, window, x, y, width, height, exposures);
807     } finally {
808         lock.unlock();
809     }
810 }
811 public static final native void _XClipBox(int region, XRectangle rectangle);
812 public static final void XClipBox(int region, XRectangle rectangle) {
813     lock.lock();
814     try {
815         _XClipBox(region, rectangle);
816     } finally {
817         lock.unlock();
818     }
819 }
820 public static final native void _XCloseDisplay(int display);
821 public static final void XCloseDisplay(int display) {
822     lock.lock();
823     try {
824         _XCloseDisplay(display);
825     } finally {
826         lock.unlock();
827     }
828 }
829 public static final native void _XCopyArea(int display, int src, int dest, int gc, int src_x, int src_y, int width, int height, int dest_x, int dest_y);
830 public static final void XCopyArea(int display, int src, int dest, int gc, int src_x, int src_y, int width, int height, int dest_x, int dest_y) {
831     lock.lock();
832     try {
833         _XCopyArea(display, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y);
834     } finally {
835         lock.unlock();
836     }
837 }
838 public static final native void _XCopyPlane(int display, int src, int dest, int gc, int src_x, int src_y, int width, int height, int dest_x, int dest_y, int plane);
839 public static final void XCopyPlane(int display, int src, int dest, int gc, int src_x, int src_y, int width, int height, int dest_x, int dest_y, int plane) {
840     lock.lock();
841     try {
842         _XCopyPlane(display, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y, plane);
843     } finally {
844         lock.unlock();
845     }
846 }
847 public static final native int _XCreateBitmapFromData(int display, int drawable, byte[] data, int width, int height);
848 public static final int XCreateBitmapFromData(int display, int drawable, byte[] data, int width, int height) {
849     lock.lock();
850     try {
851         return _XCreateBitmapFromData(display, drawable, data, width, height);
852     } finally {
853         lock.unlock();
854     }
855 }
856 public static final native int _XCreateFontCursor(int display, int shape);
857 public static final int XCreateFontCursor(int display, int shape) {
858     lock.lock();
859     try {
860         return _XCreateFontCursor(display, shape);
861     } finally {
862         lock.unlock();
863     }
864 }
865 public static final native int _XCreateGC(int display, int window, int mask, XGCValues values);
866 public static final int XCreateGC(int display, int window, int mask, XGCValues values) {
867     lock.lock();
868     try {
869         return _XCreateGC(display, window, mask, values);
870     } finally {
871         lock.unlock();
872     }
873 }
874 public static final native int _XCreateImage(int display, int visual, int depth, int format, int offset, int data, int width, int height, int bitmap_pad, int bytes_per_line);
875 public static final int XCreateImage(int display, int visual, int depth, int format, int offset, int data, int width, int height, int bitmap_pad, int bytes_per_line) {
876     lock.lock();
877     try {
878         return _XCreateImage(display, visual, depth, format, offset, data, width, height, bitmap_pad, bytes_per_line);
879     } finally {
880         lock.unlock();
881     }
882 }
883 public static final native int _XCreatePixmap(int display, int drawable, int width, int height, int depth);
884 public static final int XCreatePixmap(int display, int drawable, int width, int height, int depth) {
885     lock.lock();
886     try {
887         return _XCreatePixmap(display, drawable, width, height, depth);
888     } finally {
889         lock.unlock();
890     }
891 }
892 public static final native int _XCreatePixmapCursor(int display, int source, int mask, XColor foreground_color, XColor background_color, int x, int y);
893 public static final int XCreatePixmapCursor(int display, int source, int mask, XColor foreground_color, XColor background_color, int x, int y) {
894     lock.lock();
895     try {
896         return _XCreatePixmapCursor(display, source, mask, foreground_color, background_color, x, y);
897     } finally {
898         lock.unlock();
899     }
900 }
901 public static final native int _XCreateRegion();
902 public static final int XCreateRegion() {
903     lock.lock();
904     try {
905         return _XCreateRegion();
906     } finally {
907         lock.unlock();
908     }
909 }
910 public static final native int _XCreateWindow(int display, int parent, int x, int y, int width, int height, int border_width, int depth, int clazz, int visual, long value_mask, XSetWindowAttributes attributes);
911 public static final int XCreateWindow(int display, int parent, int x, int y, int width, int height, int border_width, int depth, int clazz, int visual, long value_mask, XSetWindowAttributes attributes) {
912     lock.lock();
913     try {
914         return _XCreateWindow(display, parent, x, y, width, height, border_width, depth, clazz, visual, value_mask, attributes);
915     } finally {
916         lock.unlock();
917     }
918 }
919 public static final native int _XDefaultColormap(int display, int screen_number);
920 public static final int XDefaultColormap(int display, int screen_number) {
921     lock.lock();
922     try {
923         return _XDefaultColormap(display, screen_number);
924     } finally {
925         lock.unlock();
926     }
927 }
928 public static final native int _XDefaultColormapOfScreen(int screen);
929 public static final int XDefaultColormapOfScreen(int screen) {
930     lock.lock();
931     try {
932         return _XDefaultColormapOfScreen(screen);
933     } finally {
934         lock.unlock();
935     }
936 }
937 public static final native int _XDefaultDepthOfScreen(int screen);
938 public static final int XDefaultDepthOfScreen(int screen) {
939     lock.lock();
940     try {
941         return _XDefaultDepthOfScreen(screen);
942     } finally {
943         lock.unlock();
944     }
945 }
946 public static final native int _XDefaultGCOfScreen(int screen);
947 public static final int XDefaultGCOfScreen(int screen) {
948     lock.lock();
949     try {
950         return _XDefaultGCOfScreen(screen);
951     } finally {
952         lock.unlock();
953     }
954 }
955 public static final native int _XDefaultRootWindow(int display);
956 public static final int XDefaultRootWindow(int display) {
957     lock.lock();
958     try {
959         return _XDefaultRootWindow(display);
960     } finally {
961         lock.unlock();
962     }
963 }
964 public static final native int _XDefaultScreen(int display);
965 public static final int XDefaultScreen(int display) {
966     lock.lock();
967     try {
968         return _XDefaultScreen(display);
969     } finally {
970         lock.unlock();
971     }
972 }
973 public static final native int _XDefaultScreenOfDisplay(int display);
974 public static final int XDefaultScreenOfDisplay(int display) {
975     lock.lock();
976     try {
977         return _XDefaultScreenOfDisplay(display);
978     } finally {
979         lock.unlock();
980     }
981 }
982 public static final native int _XDefaultVisual(int display, int screen_number);
983 public static final int XDefaultVisual(int display, int screen_number) {
984     lock.lock();
985     try {
986         return _XDefaultVisual(display, screen_number);
987     } finally {
988         lock.unlock();
989     }
990 }
991 public static final native void _XDefineCursor(int display, int window, int cursor);
992 public static final void XDefineCursor(int display, int window, int cursor) {
993     lock.lock();
994     try {
995         _XDefineCursor(display, window, cursor);
996     } finally {
997         lock.unlock();
998     }
999 }
1000public static final native int _XDestroyImage(int ximage);
1001public static final int XDestroyImage(int ximage) {
1002    lock.lock();
1003    try {
1004        return _XDestroyImage(ximage);
1005    } finally {
1006        lock.unlock();
1007    }
1008}
1009public static final native void _XDestroyRegion(int region);
1010public static final void XDestroyRegion(int region) {
1011    lock.lock();
1012    try {
1013        _XDestroyRegion(region);
1014    } finally {
1015        lock.unlock();
1016    }
1017}
1018public static final native void _XDestroyWindow(int display, int w);
1019public static final void XDestroyWindow(int display, int w) {
1020    lock.lock();
1021    try {
1022        _XDestroyWindow(display, w);
1023    } finally {
1024        lock.unlock();
1025    }
1026}
1027public static final native int _XDisplayHeight(int display, int screen);
1028public static final int XDisplayHeight(int display, int screen) {
1029    lock.lock();
1030    try {
1031        return _XDisplayHeight(display, screen);
1032    } finally {
1033        lock.unlock();
1034    }
1035}
1036public static final native int _XDisplayHeightMM(int display, int screen);
1037public static final int XDisplayHeightMM(int display, int screen) {
1038    lock.lock();
1039    try {
1040        return _XDisplayHeightMM(display, screen);
1041    } finally {
1042        lock.unlock();
1043    }
1044}
1045public static final native int _XDisplayWidth(int display, int screen);
1046public static final int XDisplayWidth(int display, int screen) {
1047    lock.lock();
1048    try {
1049        return _XDisplayWidth(display, screen);
1050    } finally {
1051        lock.unlock();
1052    }
1053}
1054public static final native int _XDisplayWidthMM(int display, int screen);
1055public static final int XDisplayWidthMM(int display, int screen) {
1056    lock.lock();
1057    try {
1058        return _XDisplayWidthMM(display, screen);
1059    } finally {
1060        lock.unlock();
1061    }
1062}
1063public static final native void _XDrawArc(int display, int drawable, int gc, int x1, int y1, int x2, int y2, int a1, int a2);
1064public static final void XDrawArc(int display, int drawable, int gc, int x1, int y1, int x2, int y2, int a1, int a2) {
1065    lock.lock();
1066    try {
1067        _XDrawArc(display, drawable, gc, x1, y1, x2, y2, a1, a2);
1068    } finally {
1069        lock.unlock();
1070    }
1071}
1072public static final native void _XDrawLine(int display, int drawable, int gc, int x1, int y1, int x2, int y2);
1073public static final void XDrawLine(int display, int drawable, int gc, int x1, int y1, int x2, int y2) {
1074    lock.lock();
1075    try {
1076        _XDrawLine(display, drawable, gc, x1, y1, x2, y2);
1077    } finally {
1078        lock.unlock();
1079    }
1080}
1081public static final native void _XDrawLines(int display, int drawable, int gc, short[] xPoints, int nPoints, int mode);
1082public static final void XDrawLines(int display, int drawable, int gc, short[] xPoints, int nPoints, int mode) {
1083    lock.lock();
1084    try {
1085        _XDrawLines(display, drawable, gc, xPoints, nPoints, mode);
1086    } finally {
1087        lock.unlock();
1088    }
1089}
1090public static final native void _XDrawRectangle(int display, int drawable, int gc, int x, int y, int width, int height);
1091public static final void XDrawRectangle(int display, int drawable, int gc, int x, int y, int width, int height) {
1092    lock.lock();
1093    try {
1094        _XDrawRectangle(display, drawable, gc, x, y, width, height);
1095    } finally {
1096        lock.unlock();
1097    }
1098}
1099public static final native void _XDrawPoint(int display, int drawable, int gc, int x, int y);
1100public static final void XDrawPoint(int display, int drawable, int gc, int x, int y) {
1101    lock.lock();
1102    try {
1103        _XDrawPoint(display, drawable, gc, x, y);
1104    } finally {
1105        lock.unlock();
1106    }
1107}
1108public static final native boolean _XEmptyRegion(int region);
1109public static final boolean XEmptyRegion(int region) {
1110    lock.lock();
1111    try {
1112        return _XEmptyRegion(region);
1113    } finally {
1114        lock.unlock();
1115    }
1116}
1117public static final native int _XEventsQueued(int display, int mode);
1118public static final int XEventsQueued(int display, int mode) {
1119    lock.lock();
1120    try {
1121        return _XEventsQueued(display, mode);
1122    } finally {
1123        lock.unlock();
1124    }
1125}
1126public static final native void _XFillArc(int display, int drawable, int gc, int x1, int y1, int x2, int y2, int a1, int a2);
1127public static final void XFillArc(int display, int drawable, int gc, int x1, int y1, int x2, int y2, int a1, int a2) {
1128    lock.lock();
1129    try {
1130        _XFillArc(display, drawable, gc, x1, y1, x2, y2, a1, a2);
1131    } finally {
1132        lock.unlock();
1133    }
1134}
1135public static final native int _XFillPolygon(int display, int drawable, int gc, short[] xPoints, int nPoints, int mode, int style);
1136public static final int XFillPolygon(int display, int drawable, int gc, short[] xPoints, int nPoints, int mode, int style) {
1137    lock.lock();
1138    try {
1139        return _XFillPolygon(display, drawable, gc, xPoints, nPoints, mode, style);
1140    } finally {
1141        lock.unlock();
1142    }
1143}
1144public static final native void _XFillRectangle(int display, int drawable, int gc, int x, int y, int width, int height);
1145public static final void XFillRectangle(int display, int drawable, int gc, int x, int y, int width, int height) {
1146    lock.lock();
1147    try {
1148        _XFillRectangle(display, drawable, gc, x, y, width, height);
1149    } finally {
1150        lock.unlock();
1151    }
1152}
1153public static final native boolean _XFilterEvent(int event, int window);
1154public static final boolean XFilterEvent(int event, int window) {
1155    lock.lock();
1156    try {
1157        return _XFilterEvent(event, window);
1158    } finally {
1159        lock.unlock();
1160    }
1161}
1162public static final native void _XFlush(int display);
1163public static final void XFlush(int display) {
1164    lock.lock();
1165    try {
1166        _XFlush(display);
1167    } finally {
1168        lock.unlock();
1169    }
1170}
1171public static final native int _XFontsOfFontSet(int fontSet, int[] fontStructs, int[] fontNames);
1172public static final int XFontsOfFontSet(int fontSet, int[] fontStructs, int[] fontNames) {
1173    lock.lock();
1174    try {
1175        return _XFontsOfFontSet(fontSet, fontStructs, fontNames);
1176    } finally {
1177        lock.unlock();
1178    }
1179}
1180public static final native int _XFree(int address);
1181public static final int XFree(int address) {
1182    lock.lock();
1183    try {
1184        return _XFree(address);
1185    } finally {
1186        lock.unlock();
1187    }
1188}
1189public static final native int _XFreeColors(int display, int colormap, int[] pixels, int npixels, int planes);
1190public static final int XFreeColors(int display, int colormap, int[] pixels, int npixels, int planes) {
1191    lock.lock();
1192    try {
1193        return _XFreeColors(display, colormap, pixels, npixels, planes);
1194    } finally {
1195        lock.unlock();
1196    }
1197}
1198public static final native void _XFreeCursor(int display, int pixmap);
1199public static final void XFreeCursor(int display, int pixmap) {
1200    lock.lock();
1201    try {
1202        _XFreeCursor(display, pixmap);
1203    } finally {
1204        lock.unlock();
1205    }
1206}
1207public static final native void _XFreeFont(int display, int font_struct);
1208public static final void XFreeFont(int display, int font_struct) {
1209    lock.lock();
1210    try {
1211        _XFreeFont(display, font_struct);
1212    } finally {
1213        lock.unlock();
1214    }
1215}
1216public static final native void _XFreeFontNames(int list);
1217public static final void XFreeFontNames(int list) {
1218    lock.lock();
1219    try {
1220        _XFreeFontNames(list);
1221    } finally {
1222        lock.unlock();
1223    }
1224}
1225public static final native void _XFreeGC(int display, int gc);
1226public static final void XFreeGC(int display, int gc) {
1227    lock.lock();
1228    try {
1229        _XFreeGC(display, gc);
1230    } finally {
1231        lock.unlock();
1232    }
1233}
1234public static final native void _XFreeModifiermap(int modmap);
1235public static final void XFreeModifiermap(int modmap) {
1236    lock.lock();
1237    try {
1238        _XFreeModifiermap(modmap);
1239    } finally {
1240        lock.unlock();
1241    }
1242}
1243public static final native void _XFreePixmap(int display, int pixmap);
1244public static final void XFreePixmap(int display, int pixmap) {
1245    lock.lock();
1246    try {
1247        _XFreePixmap(display, pixmap);
1248    } finally {
1249        lock.unlock();
1250    }
1251}
1252public static final native void _XFreeStringList(int list);
1253public static final void XFreeStringList(int list) {
1254    lock.lock();
1255    try {
1256        _XFreeStringList(list);
1257    } finally {
1258        lock.unlock();
1259    }
1260}
1261public static final native int _XGetGCValues(int display, int gc, int valuemask, XGCValues values);
1262public static final int XGetGCValues(int display, int gc, int valuemask, XGCValues values) {
1263    lock.lock();
1264    try {
1265        return _XGetGCValues(display, gc, valuemask, values);
1266    } finally {
1267        lock.unlock();
1268    }
1269}
1270public static final native int _XGetGeometry(int display, int drawable, int[] root_return, int[] x_return, int[] y_return, int[] width_return, int[] height_return, int[] border_width_return, int[] depth_return);
1271public static final int XGetGeometry(int display, int drawable, int[] root_return, int[] x_return, int[] y_return, int[] width_return, int[] height_return, int[] border_width_return, int[] depth_return) {
1272    lock.lock();
1273    try {
1274        return _XGetGeometry(display, drawable, root_return, x_return, y_return, width_return, height_return, border_width_return, depth_return);
1275    } finally {
1276        lock.unlock();
1277    }
1278}
1279public static final native int _XGetImage(int display, int drawable, int x, int y, int width, int height, int plane_mask, int format);
1280public static final int XGetImage(int display, int drawable, int x, int y, int width, int height, int plane_mask, int format) {
1281    lock.lock();
1282    try {
1283        return _XGetImage(display, drawable, x, y, width, height, plane_mask, format);
1284    } finally {
1285        lock.unlock();
1286    }
1287}
1288public static final native int _XGetInputFocus(int display, int[] window, int[] revert);
1289public static final int XGetInputFocus(int display, int[] window, int[] revert) {
1290    lock.lock();
1291    try {
1292        return _XGetInputFocus(display, window, revert);
1293    } finally {
1294        lock.unlock();
1295    }
1296}
1297public static final native boolean _XGetWindowAttributes(int display, int window, XWindowAttributes attributes);
1298public static final boolean XGetWindowAttributes(int display, int window, XWindowAttributes attributes) {
1299    lock.lock();
1300    try {
1301        return _XGetWindowAttributes(display, window, attributes);
1302    } finally {
1303        lock.unlock();
1304    }
1305}
1306public static final native int _XGetWindowProperty(int display, int window, int property, int offset, int length, boolean delete, int req_type, int[] actual_type_return, int[] actual_format_return, int[] nitems_return, int[] bytes_after_return, int[] prop_return);
1307public static final int XGetWindowProperty(int display, int window, int property, int offset, int length, boolean delete, int req_type, int[] actual_type_return, int[] actual_format_return, int[] nitems_return, int[] bytes_after_return, int[] prop_return) {
1308    lock.lock();
1309    try {
1310        return _XGetWindowProperty(display, window, property, offset, length, delete, req_type, actual_type_return, actual_format_return, nitems_return, bytes_after_return, prop_return);
1311    } finally {
1312        lock.unlock();
1313    }
1314}
1315public static final native int _XGrabKeyboard(int display, int grabWindow, int ownerEvents, int pointerMode, int keyboardMode, int time);
1316public static final int XGrabKeyboard(int display, int grabWindow, int ownerEvents, int pointerMode, int keyboardMode, int time) {
1317    lock.lock();
1318    try {
1319        return _XGrabKeyboard(display, grabWindow, ownerEvents, pointerMode, keyboardMode, time);
1320    } finally {
1321        lock.unlock();
1322    }
1323}
1324public static final native int _XGrabPointer(int display, int grabWindow, int ownerEvents, int eventMask, int pointerMode, int keyboardMode, int confineToWindow, int cursor, int time);
1325public static final int XGrabPointer(int display, int grabWindow, int ownerEvents, int eventMask, int pointerMode, int keyboardMode, int confineToWindow, int cursor, int time) {
1326    lock.lock();
1327    try {
1328        return _XGrabPointer(display, grabWindow, ownerEvents, eventMask, pointerMode, keyboardMode, confineToWindow, cursor, time);
1329    } finally {
1330        lock.unlock();
1331    }
1332}
1333public static final native int _XInitThreads();
1334public static final int XInitThreads() {
1335    lock.lock();
1336    try {
1337        return _XInitThreads();
1338    } finally {
1339        lock.unlock();
1340    }
1341}
1342public static final native int _XInternAtom(int display, byte[] name, boolean ifExists);
1343public static final int XInternAtom(int display, byte[] name, boolean ifExists) {
1344    lock.lock();
1345    try {
1346        return _XInternAtom(display, name, ifExists);
1347    } finally {
1348        lock.unlock();
1349    }
1350}
1351public static final native void _XIntersectRegion(int sra, int srb, int dr_return);
1352public static final void XIntersectRegion(int sra, int srb, int dr_return) {
1353    lock.lock();
1354    try {
1355        _XIntersectRegion(sra, srb, dr_return);
1356    } finally {
1357        lock.unlock();
1358    }
1359}
1360public static final native int _XKeysymToKeycode(int display, int keysym);
1361public static final int XKeysymToKeycode(int display, int keysym) {
1362    lock.lock();
1363    try {
1364        return _XKeysymToKeycode(display, keysym);
1365    } finally {
1366        lock.unlock();
1367    }
1368}
1369public static final native int _XKeysymToString(int keysym);
1370public static final int XKeysymToString(int keysym) {
1371    lock.lock();
1372    try {
1373        return _XKeysymToString(keysym);
1374    } finally {
1375        lock.unlock();
1376    }
1377}
1378public static final native int _XListFonts(int display, byte[] pattern, int maxnames, int[] actual_count_return);
1379public static final int XListFonts(int display, byte[] pattern, int maxnames, int[] actual_count_return) {
1380    lock.lock();
1381    try {
1382        return _XListFonts(display, pattern, maxnames, actual_count_return);
1383    } finally {
1384        lock.unlock();
1385    }
1386}
1387public static final native int _XListProperties(int display, int window, int[] num_prop_return);
1388public static final int XListProperties(int display, int window, int[] num_prop_return) {
1389    lock.lock();
1390    try {
1391        return _XListProperties(display, window, num_prop_return);
1392    } finally {
1393        lock.unlock();
1394    }
1395}
1396public static final native int _XLocaleOfFontSet(int fontSet);
1397public static final int XLocaleOfFontSet(int fontSet) {
1398    lock.lock();
1399    try {
1400        return _XLocaleOfFontSet(fontSet);
1401    } finally {
1402        lock.unlock();
1403    }
1404}
1405public static final native int _XLookupString(XKeyEvent event, byte[] string, int size, int[] keysym, int[] status);
1406public static final int XLookupString(XKeyEvent event, byte[] string, int size, int[] keysym, int[] status) {
1407    lock.lock();
1408    try {
1409        return _XLookupString(event, string, size, keysym, status);
1410    } finally {
1411        lock.unlock();
1412    }
1413}
1414public static final native int _XLowerWindow(int display, int window);
1415public static final int XLowerWindow(int display, int window) {
1416    lock.lock();
1417    try {
1418        return _XLowerWindow(display, window);
1419    } finally {
1420        lock.unlock();
1421    }
1422}
1423public static final native void _XMapWindow(int display, int w);
1424public static final void XMapWindow(int display, int w) {
1425    lock.lock();
1426    try {
1427        _XMapWindow(display, w);
1428    } finally {
1429        lock.unlock();
1430    }
1431}
1432public static final native int _XGetModifierMapping(int display);
1433public static final int XGetModifierMapping(int display) {
1434    lock.lock();
1435    try {
1436        return _XGetModifierMapping(display);
1437    } finally {
1438        lock.unlock();
1439    }
1440}
1441public static final native int _XGetIconSizes(int display, int w, int[] size_list_return, int[] count_return);
1442public static final int XGetIconSizes(int display, int w, int[] size_list_return, int[] count_return) {
1443    lock.lock();
1444    try {
1445        return _XGetIconSizes(display, w, size_list_return, count_return);
1446    } finally {
1447        lock.unlock();
1448    }
1449}
1450public static final native void _XMoveResizeWindow(int display, int w, int x, int y, int width, int height);
1451public static final void XMoveResizeWindow(int display, int w, int x, int y, int width, int height) {
1452    lock.lock();
1453    try {
1454        _XMoveResizeWindow(display, w, x, y, width, height);
1455    } finally {
1456        lock.unlock();
1457    }
1458}
1459public static final native int _XOffsetRegion(int r, int dx, int dy);
1460public static final int XOffsetRegion(int r, int dx, int dy) {
1461    lock.lock();
1462    try {
1463        return _XOffsetRegion(r, dx, dy);
1464    } finally {
1465        lock.unlock();
1466    }
1467}
1468public static final native int _XOpenDisplay(byte[] display_name);
1469public static final int XOpenDisplay(byte[] display_name) {
1470    lock.lock();
1471    try {
1472        return _XOpenDisplay(display_name);
1473    } finally {
1474        lock.unlock();
1475    }
1476}
1477public static final native boolean _XPointInRegion(int region, int x, int y);
1478public static final boolean XPointInRegion(int region, int x, int y) {
1479    lock.lock();
1480    try {
1481        return _XPointInRegion(region, x, y);
1482    } finally {
1483        lock.unlock();
1484    }
1485}
1486public static final native int _XPolygonRegion(short[] points, int n, int fill_rule);
1487public static final int XPolygonRegion(short[] points, int n, int fill_rule) {
1488    lock.lock();
1489    try {
1490        return _XPolygonRegion(points, n, fill_rule);
1491    } finally {
1492        lock.unlock();
1493    }
1494}
1495public static final native int _XPutImage(int display, int drawable, int gc, int image, int srcX, int srcY, int destX, int destY, int width, int height);
1496public static final int XPutImage(int display, int drawable, int gc, int image, int srcX, int srcY, int destX, int destY, int width, int height) {
1497    lock.lock();
1498    try {
1499        return _XPutImage(display, drawable, gc, image, srcX, srcY, destX, destY, width, height);
1500    } finally {
1501        lock.unlock();
1502    }
1503}
1504public static final native int _XQueryColor(int display, int colormap, XColor color);
1505public static final int XQueryColor(int display, int colormap, XColor color) {
1506    lock.lock();
1507    try {
1508        return _XQueryColor(display, colormap, color);
1509    } finally {
1510        lock.unlock();
1511    }
1512}
1513public static final native int _XQueryBestCursor(int display, int d, int width, int height, int[] width_return, int[] height_return);
1514public static final int XQueryBestCursor(int display, int d, int width, int height, int[] width_return, int[] height_return) {
1515    lock.lock();
1516    try {
1517        return _XQueryBestCursor(display, d, width, height, width_return, height_return);
1518    } finally {
1519        lock.unlock();
1520    }
1521}
1522public static final native int _XQueryPointer(int display, int window, int[] root, int[] child, int[] rootX, int[] rootY, int[] windowX, int[] windowY, int[] mask);
1523public static final int XQueryPointer(int display, int window, int[] root, int[] child, int[] rootX, int[] rootY, int[] windowX, int[] windowY, int[] mask) {
1524    lock.lock();
1525    try {
1526        return _XQueryPointer(display, window, root, child, rootX, rootY, windowX, windowY, mask);
1527    } finally {
1528        lock.unlock();
1529    }
1530}
1531public static final native int _XQueryTree(int display, int window, int[] root_return, int[] parent_return, int[] children_return, int[] nChildren_return);
1532public static final int XQueryTree(int display, int window, int[] root_return, int[] parent_return, int[] children_return, int[] nChildren_return) {
1533    lock.lock();
1534    try {
1535        return _XQueryTree(display, window, root_return, parent_return, children_return, nChildren_return);
1536    } finally {
1537        lock.unlock();
1538    }
1539}
1540public static final native int _XRaiseWindow(int display, int window);
1541public static final int XRaiseWindow(int display, int window) {
1542    lock.lock();
1543    try {
1544        return _XRaiseWindow(display, window);
1545    } finally {
1546        lock.unlock();
1547    }
1548}
1549public static final native int _XReconfigureWMWindow(int display, int window, int screen, int valueMask, XWindowChanges values);
1550public static final int XReconfigureWMWindow(int display, int window, int screen, int valueMask, XWindowChanges values) {
1551    lock.lock();
1552    try {
1553        return _XReconfigureWMWindow(display, window, screen, valueMask, values);
1554    } finally {
1555        lock.unlock();
1556    }
1557}
1558public static final native int _XRectInRegion(int region, int x, int y, int width, int height);
1559public static final int XRectInRegion(int region, int x, int y, int width, int height) {
1560    lock.lock();
1561    try {
1562        return _XRectInRegion(region, x, y, width, height);
1563    } finally {
1564        lock.unlock();
1565    }
1566}
1567public static final native int _XReparentWindow(int display, int win, int parent, int x, int y);
1568public static final int XReparentWindow(int display, int win, int parent, int x, int y) {
1569    lock.lock();
1570    try {
1571        return _XReparentWindow(display, win, parent, x, y);
1572    } finally {
1573        lock.unlock();
1574    }
1575}
1576public static final native void _XResizeWindow(int display, int w, int width, int height);
1577public static final void XResizeWindow(int display, int w, int width, int height) {
1578    lock.lock();
1579    try {
1580        _XResizeWindow(display, w, width, height);
1581    } finally {
1582        lock.unlock();
1583    }
1584}
1585public static final native int _XRootWindowOfScreen(int screen);
1586public static final int XRootWindowOfScreen(int screen) {
1587    lock.lock();
1588    try {
1589        return _XRootWindowOfScreen(screen);
1590    } finally {
1591        lock.unlock();
1592    }
1593}
1594public static final native void _XSelectInput(int display, int window, int mask);
1595public static final void XSelectInput(int display, int window, int mask) {
1596    lock.lock();
1597    try {
1598        _XSelectInput(display, window, mask);
1599    } finally {
1600        lock.unlock();
1601    }
1602}
1603public static final native int _XSendEvent(int display, int window, boolean propagate, int event_mask, int event);
1604public static final int XSendEvent(int display, int window, boolean propagate, int event_mask, int event) {
1605    lock.lock();
1606    try {
1607        return _XSendEvent(display, window, propagate, event_mask, event);
1608    } finally {
1609        lock.unlock();
1610    }
1611}
1612public static final native void _XSetBackground(int display, int gc, int background);
1613public static final void XSetBackground(int display, int gc, int background) {
1614    lock.lock();
1615    try {
1616        _XSetBackground(display, gc, background);
1617    } finally {
1618        lock.unlock();
1619    }
1620}
1621public static final native void _XSetClipMask(int display, int gc, int pixmap);
1622public static final void XSetClipMask(int display, int gc, int pixmap) {
1623    lock.lock();
1624    try {
1625        _XSetClipMask(display, gc, pixmap);
1626    } finally {
1627        lock.unlock();
1628    }
1629}
1630public static final native void _XSetClipRectangles(int display, int gc, int clip_x_origin, int clip_y_origin, XRectangle rectangles, int n, int ordering);
1631public static final void XSetClipRectangles(int display, int gc, int clip_x_origin, int clip_y_origin, XRectangle rectangles, int n, int ordering) {
1632    lock.lock();
1633    try {
1634        _XSetClipRectangles(display, gc, clip_x_origin, clip_y_origin, rectangles, n, ordering);
1635    } finally {
1636        lock.unlock();
1637    }
1638}
1639public static final native int _XSetDashes(int display, int gc, int dash_offset, byte[] dash_list, int n);
1640public static final int XSetDashes(int display, int gc, int dash_offset, byte[] dash_list, int n) {
1641    lock.lock();
1642    try {
1643        return _XSetDashes(display, gc, dash_offset, dash_list, n);
1644    } finally {
1645        lock.unlock();
1646    }
1647}
1648public static final native int _XSetErrorHandler(int handler);
1649public static final int XSetErrorHandler(int handler) {
1650    lock.lock();
1651    try {
1652        return _XSetErrorHandler(handler);
1653    } finally {
1654        lock.unlock();
1655    }
1656}
1657public static final native void _XSetFillRule(int display, int gc, int fill_rule);
1658public static final void XSetFillRule(int display, int gc, int fill_rule) {
1659    lock.lock();
1660    try {
1661        _XSetFillRule(display, gc, fill_rule);
1662    } finally {
1663        lock.unlock();
1664    }
1665}
1666public static final native void _XSetFillStyle(int display, int gc, int fill_style);
1667public static final void XSetFillStyle(int display, int gc, int fill_style) {
1668    lock.lock();
1669    try {
1670        _XSetFillStyle(display, gc, fill_style);
1671    } finally {
1672        lock.unlock();
1673    }
1674}
1675public static final native void _XSetForeground(int display, int gc, int foreground);
1676public static final void XSetForeground(int display, int gc, int foreground) {
1677    lock.lock();
1678    try {
1679        _XSetForeground(display, gc, foreground);
1680    } finally {
1681        lock.unlock();
1682    }
1683}
1684public static final native void _XSetFunction(int display, int gc, int function);
1685public static final void XSetFunction(int display, int gc, int function) {
1686    lock.lock();
1687    try {
1688        _XSetFunction(display, gc, function);
1689    } finally {
1690        lock.unlock();
1691    }
1692}
1693public static final native void _XSetGraphicsExposures(int display, int gc, boolean graphics_exposures);
1694public static final void XSetGraphicsExposures(int display, int gc, boolean graphics_exposures) {
1695    lock.lock();
1696    try {
1697        _XSetGraphicsExposures(display, gc, graphics_exposures);
1698    } finally {
1699        lock.unlock();
1700    }
1701}
1702public static final native int _XSetIOErrorHandler(int handler);
1703public static final int XSetIOErrorHandler(int handler) {
1704    lock.lock();
1705    try {
1706        return _XSetIOErrorHandler(handler);
1707    } finally {
1708        lock.unlock();
1709    }
1710}
1711public static final native int _XSetInputFocus(int display, int window, int revert, int time);
1712public static final int XSetInputFocus(int display, int window, int revert, int time) {
1713    lock.lock();
1714    try {
1715        return _XSetInputFocus(display, window, revert, time);
1716    } finally {
1717        lock.unlock();
1718    }
1719}
1720public static final native int _XSetLineAttributes(int display, int gc, int lineWidth, int lineStyle, int capStyle, int joinStyle);
1721public static final int XSetLineAttributes(int display, int gc, int lineWidth, int lineStyle, int capStyle, int joinStyle) {
1722    lock.lock();
1723    try {
1724        return _XSetLineAttributes(display, gc, lineWidth, lineStyle, capStyle, joinStyle);
1725    } finally {
1726        lock.unlock();
1727    }
1728}
1729public static final native void _XSetRegion(int display, int gc, int region);
1730public static final void XSetRegion(int display, int gc, int region) {
1731    lock.lock();
1732    try {
1733        _XSetRegion(display, gc, region);
1734    } finally {
1735        lock.unlock();
1736    }
1737}
1738public static final native void _XSetStipple(int display, int gc, int pixmap);
1739public static final void XSetStipple(int display, int gc, int pixmap) {
1740    lock.lock();
1741    try {
1742        _XSetStipple(display, gc, pixmap);
1743    } finally {
1744        lock.unlock();
1745    }
1746}
1747public static final native void _XSetSubwindowMode(int display, int gc, int subwindow_mode);
1748public static final void XSetSubwindowMode(int display, int gc, int subwindow_mode) {
1749    lock.lock();
1750    try {
1751        _XSetSubwindowMode(display, gc, subwindow_mode);
1752    } finally {
1753        lock.unlock();
1754    }
1755}
1756public static final native void _XSetWMNormalHints(int display, int w, XSizeHints hints);
1757public static final void XSetWMNormalHints(int display, int w, XSizeHints hints) {
1758    lock.lock();
1759    try {
1760        _XSetWMNormalHints(display, w, hints);
1761    } finally {
1762        lock.unlock();
1763    }
1764}
1765public static final native void _XShapeCombineMask(int display, int dest, int dest_kind, int x_off, int y_off, int src, int op);
1766public static final void XShapeCombineMask(int display, int dest, int dest_kind, int x_off, int y_off, int src, int op) {
1767    lock.lock();
1768    try {
1769        _XShapeCombineMask(display, dest, dest_kind, x_off, y_off, src, op);
1770    } finally {
1771        lock.unlock();
1772    }
1773}
1774public static final native void _XShapeCombineRegion(int display, int dest, int dest_kind, int x_off, int y_off, int region, int op);
1775public static final void XShapeCombineRegion(int display, int dest, int dest_kind, int x_off, int y_off, int region, int op) {
1776    lock.lock();
1777    try {
1778        _XShapeCombineRegion(display, dest, dest_kind, x_off, y_off, region, op);
1779    } finally {
1780        lock.unlock();
1781    }
1782}
1783public static final native void _XSubtractRegion(int sra, int srb, int dr_return);
1784public static final void XSubtractRegion(int sra, int srb, int dr_return) {
1785    lock.lock();
1786    try {
1787        _XSubtractRegion(sra, srb, dr_return);
1788    } finally {
1789        lock.unlock();
1790    }
1791}
1792public static final native void _XSync(int display, boolean discard);
1793public static final void XSync(int display, boolean discard) {
1794    lock.lock();
1795    try {
1796        _XSync(display, discard);
1797    } finally {
1798        lock.unlock();
1799    }
1800}
1801public static final native int _XSynchronize(int display, boolean onoff);
1802public static final int XSynchronize(int display, boolean onoff) {
1803    lock.lock();
1804    try {
1805        return _XSynchronize(display, onoff);
1806    } finally {
1807        lock.unlock();
1808    }
1809}
1810public static final native void _XTestFakeButtonEvent(int display, int button, boolean is_press, int delay);
1811public static final void XTestFakeButtonEvent(int display, int button, boolean is_press, int delay) {
1812    lock.lock();
1813    try {
1814        _XTestFakeButtonEvent(display, button, is_press, delay);
1815    } finally {
1816        lock.unlock();
1817    }
1818}
1819public static final native void _XTestFakeKeyEvent(int display, int keycode, boolean is_press, int delay);
1820public static final void XTestFakeKeyEvent(int display, int keycode, boolean is_press, int delay) {
1821    lock.lock();
1822    try {
1823        _XTestFakeKeyEvent(display, keycode, is_press, delay);
1824    } finally {
1825        lock.unlock();
1826    }
1827}
1828public static final native void _XTestFakeMotionEvent(int display, int screen_number, int x, int y, int delay);
1829public static final void XTestFakeMotionEvent(int display, int screen_number, int x, int y, int delay) {
1830    lock.lock();
1831    try {
1832        _XTestFakeMotionEvent(display, screen_number, x, y, delay);
1833    } finally {
1834        lock.unlock();
1835    }
1836}
1837public static final native boolean _XTranslateCoordinates(int display, int src_w, int dest_w, int src_x, int src_y, int[] dest_x_return, int[] dest_y_return, int[] child_return);
1838public static final boolean XTranslateCoordinates(int display, int src_w, int dest_w, int src_x, int src_y, int[] dest_x_return, int[] dest_y_return, int[] child_return) {
1839    lock.lock();
1840    try {
1841        return _XTranslateCoordinates(display, src_w, dest_w, src_x, src_y, dest_x_return, dest_y_return, child_return);
1842    } finally {
1843        lock.unlock();
1844    }
1845}
1846public static final native void _XUndefineCursor(int display, int window);
1847public static final void XUndefineCursor(int display, int window) {
1848    lock.lock();
1849    try {
1850        _XUndefineCursor(display, window);
1851    } finally {
1852        lock.unlock();
1853    }
1854}
1855public static final native int _XUngrabKeyboard(int display, int time);
1856public static final int XUngrabKeyboard(int display, int time) {
1857    lock.lock();
1858    try {
1859        return _XUngrabKeyboard(display, time);
1860    } finally {
1861        lock.unlock();
1862    }
1863}
1864public static final native int _XUngrabPointer(int display, int time);
1865public static final int XUngrabPointer(int display, int time) {
1866    lock.lock();
1867    try {
1868        return _XUngrabPointer(display, time);
1869    } finally {
1870        lock.unlock();
1871    }
1872}
1873public static final native void _XUnionRectWithRegion(XRectangle rectangle, int src_region, int dest_region_return);
1874public static final void XUnionRectWithRegion(XRectangle rectangle, int src_region, int dest_region_return) {
1875    lock.lock();
1876    try {
1877        _XUnionRectWithRegion(rectangle, src_region, dest_region_return);
1878    } finally {
1879        lock.unlock();
1880    }
1881}
1882public static final native void _XUnionRegion(int sra, int srb, int dr_return);
1883public static final void XUnionRegion(int sra, int srb, int dr_return) {
1884    lock.lock();
1885    try {
1886        _XUnionRegion(sra, srb, dr_return);
1887    } finally {
1888        lock.unlock();
1889    }
1890}
1891public static final native void _XUnmapWindow(int display, int window);
1892public static final void XUnmapWindow(int display, int window) {
1893    lock.lock();
1894    try {
1895        _XUnmapWindow(display, window);
1896    } finally {
1897        lock.unlock();
1898    }
1899}
1900public static final native int _XWarpPointer(int display, int sourceWindow, int destWindow, int sourceX, int sourceY, int sourceWidth, int sourceHeight, int destX, int destY);
1901public static final int XWarpPointer(int display, int sourceWindow, int destWindow, int sourceX, int sourceY, int sourceWidth, int sourceHeight, int destX, int destY) {
1902    lock.lock();
1903    try {
1904        return _XWarpPointer(display, sourceWindow, destWindow, sourceX, sourceY, sourceWidth, sourceHeight, destX, destY);
1905    } finally {
1906        lock.unlock();
1907    }
1908}
1909public static final native int _XWhitePixel(int display, int screenNum);
1910public static final int XWhitePixel(int display, int screenNum) {
1911    lock.lock();
1912    try {
1913        return _XWhitePixel(display, screenNum);
1914    } finally {
1915        lock.unlock();
1916    }
1917}
1918public static final native void _XWithdrawWindow(int display, int window, int screen);
1919public static final void XWithdrawWindow(int display, int window, int screen) {
1920    lock.lock();
1921    try {
1922        _XWithdrawWindow(display, window, screen);
1923    } finally {
1924        lock.unlock();
1925    }
1926}
1927public static final native boolean _XineramaIsActive(int dpy);
1928public static final boolean XineramaIsActive(int dpy) {
1929    lock.lock();
1930    try {
1931        return _XineramaIsActive(dpy);
1932    } finally {
1933        lock.unlock();
1934    }
1935}
1936public static final native int _XineramaQueryScreens(int dpy, int[] number);
1937public static final int XineramaQueryScreens(int dpy, int[] number) {
1938    lock.lock();
1939    try {
1940        return _XineramaQueryScreens(dpy, number);
1941    } finally {
1942        lock.unlock();
1943    }
1944}
1945public static final native void _XmAddWMProtocolCallback(int shell, int protocol, int callback, int closure);
1946public static final void XmAddWMProtocolCallback(int shell, int protocol, int callback, int closure) {
1947    lock.lock();
1948    try {
1949        _XmAddWMProtocolCallback(shell, protocol, callback, closure);
1950    } finally {
1951        lock.unlock();
1952    }
1953}
1954public static final native void _XmChangeColor(int widget, int pixel);
1955public static final void XmChangeColor(int widget, int pixel) {
1956    lock.lock();
1957    try {
1958        _XmChangeColor(widget, pixel);
1959    } finally {
1960        lock.unlock();
1961    }
1962}
1963public static final native int _XmClipboardCopy(int display, int window, int item_id, byte[] format_name, byte[] buffer, int length, int private_id, int[] data_id);
1964public static final int XmClipboardCopy(int display, int window, int item_id, byte[] format_name, byte[] buffer, int length, int private_id, int[] data_id) {
1965    lock.lock();
1966    try {
1967        return _XmClipboardCopy(display, window, item_id, format_name, buffer, length, private_id, data_id);
1968    } finally {
1969        lock.unlock();
1970    }
1971}
1972public static final native int _XmClipboardEndCopy(int display, int window, int item_id);
1973public static final int XmClipboardEndCopy(int display, int window, int item_id) {
1974    lock.lock();
1975    try {
1976        return _XmClipboardEndCopy(display, window, item_id);
1977    } finally {
1978        lock.unlock();
1979    }
1980}
1981public static final native int _XmClipboardEndRetrieve(int display, int window);
1982public static final int XmClipboardEndRetrieve(int display, int window) {
1983    lock.lock();
1984    try {
1985        return _XmClipboardEndRetrieve(display, window);
1986    } finally {
1987        lock.unlock();
1988    }
1989}
1990public static final native int _XmClipboardInquireCount(int display, int window, int[] count, int[] max_format_name_length);
1991public static final int XmClipboardInquireCount(int display, int window, int[] count, int[] max_format_name_length) {
1992    lock.lock();
1993    try {
1994        return _XmClipboardInquireCount(display, window, count, max_format_name_length);
1995    } finally {
1996        lock.unlock();
1997    }
1998}
1999public static final native int _XmClipboardInquireFormat(int display, int window, int index, byte[] format_name_buf, int buffer_len, int[] copied_len);
2000public static final int XmClipboardInquireFormat(int display, int window, int index, byte[] format_name_buf, int buffer_len, int[] copied_len) {
2001    lock.lock();
2002    try {
2003        return _XmClipboardInquireFormat(display, window, index, format_name_buf, buffer_len, copied_len);
2004    } finally {
2005        lock.unlock();
2006    }
2007}
2008public static final native int _XmClipboardInquireLength(int display, int widget, byte[] format_name, int[] length);
2009public static final int XmClipboardInquireLength(int display, int widget, byte[] format_name, int[] length) {
2010    lock.lock();
2011    try {
2012        return _XmClipboardInquireLength(display, widget, format_name, length);
2013    } finally {
2014        lock.unlock();
2015    }
2016}
2017public static final native int _XmClipboardRetrieve(int display, int window, byte[] format_name, byte[] buffer, int length, int[] num_bytes, int[] private_id);
2018public static final int XmClipboardRetrieve(int display, int window, byte[] format_name, byte[] buffer, int length, int[] num_bytes, int[] private_id) {
2019    lock.lock();
2020    try {
2021        return _XmClipboardRetrieve(display, window, format_name, buffer, length, num_bytes, private_id);
2022    } finally {
2023        lock.unlock();
2024    }
2025}
2026public static final native int _XmClipboardStartCopy(int display, int window, int clip_label, int timestamp, int widget, int callback, int[] item_id);
2027public static final int XmClipboardStartCopy(int display, int window, int clip_label, int timestamp, int widget, int callback, int[] item_id) {
2028    lock.lock();
2029    try {
2030        return _XmClipboardStartCopy(display, window, clip_label, timestamp, widget, callback, item_id);
2031    } finally {
2032        lock.unlock();
2033    }
2034}
2035public static final native int _XmClipboardStartRetrieve(int display, int window, int timestamp);
2036public static final int XmClipboardStartRetrieve(int display, int window, int timestamp) {
2037    lock.lock();
2038    try {
2039        return _XmClipboardStartRetrieve(display, window, timestamp);
2040    } finally {
2041        lock.unlock();
2042    }
2043}
2044public static final native void _XmComboBoxAddItem(int widget, int xmString, int position, boolean unique);
2045public static final void XmComboBoxAddItem(int widget, int xmString, int position, boolean unique) {
2046    lock.lock();
2047    try {
2048        _XmComboBoxAddItem(widget, xmString, position, unique);
2049    } finally {
2050        lock.unlock();
2051    }
2052}
2053public static final native void _XmComboBoxDeletePos(int widget, int position);
2054public static final void XmComboBoxDeletePos(int widget, int position) {
2055    lock.lock();
2056    try {
2057        _XmComboBoxDeletePos(widget, position);
2058    } finally {
2059        lock.unlock();
2060    }
2061}
2062public static final native void _XmComboBoxSelectItem(int widget, int xmString);
2063public static final void XmComboBoxSelectItem(int widget, int xmString) {
2064    lock.lock();
2065    try {
2066        _XmComboBoxSelectItem(widget, xmString);
2067    } finally {
2068        lock.unlock();
2069    }
2070}
2071public static final native int _XmCreateArrowButton(int parent, byte[] name, int[] arglist, int argcount);
2072public static final int XmCreateArrowButton(int parent, byte[] name, int[] arglist, int argcount) {
2073    lock.lock();
2074    try {
2075        return _XmCreateArrowButton(parent, name, arglist, argcount);
2076    } finally {
2077        lock.unlock();
2078    }
2079}
2080public static final native int _XmCreateCascadeButtonGadget(int parent, byte[] name, int[] arglist, int argcount);
2081public static final int XmCreateCascadeButtonGadget(int parent, byte[] name, int[] arglist, int argcount) {
2082    lock.lock();
2083    try {
2084        return _XmCreateCascadeButtonGadget(parent, name, arglist, argcount);
2085    } finally {
2086        lock.unlock();
2087    }
2088}
2089public static final native int _XmCreateComboBox(int parent, byte[] name, int[] arglist, int argcount);
2090public static final int XmCreateComboBox(int parent, byte[] name, int[] arglist, int argcount) {
2091    lock.lock();
2092    try {
2093        return _XmCreateComboBox(parent, name, arglist, argcount);
2094    } finally {
2095        lock.unlock();
2096    }
2097}
2098public static final native int _XmCreateDialogShell(int parent, byte[] name, int[] arglist, int argcount);
2099public static final int XmCreateDialogShell(int parent, byte[] name, int[] arglist, int argcount) {
2100    lock.lock();
2101    try {
2102        return _XmCreateDialogShell(parent, name, arglist, argcount);
2103    } finally {
2104        lock.unlock();
2105    }
2106}
2107public static final native int _XmCreateDrawingArea(int parent, byte[] name, int[] arglist, int argcount);
2108public static final int XmCreateDrawingArea(int parent, byte[] name, int[] arglist, int argcount) {
2109    lock.lock();
2110    try {
2111        return _XmCreateDrawingArea(parent, name, arglist, argcount);
2112    } finally {
2113        lock.unlock();
2114    }
2115}
2116public static final native int _XmCreateDrawnButton(int parent, byte[] name, int[] arglist, int argcount);
2117public static final int XmCreateDrawnButton(int parent, byte[] name, int[] arglist, int argcount) {
2118    lock.lock();
2119    try {
2120        return _XmCreateDrawnButton(parent, name, arglist, argcount);
2121    } finally {
2122        lock.unlock();
2123    }
2124}
2125public static final native int _XmCreateErrorDialog(int parent, byte[] name, int[] arglist, int argcount);
2126public static final int XmCreateErrorDialog(int parent, byte[] name, int[] arglist, int argcount) {
2127    lock.lock();
2128    try {
2129        return _XmCreateErrorDialog(parent, name, arglist, argcount);
2130    } finally {
2131        lock.unlock();
2132    }
2133}
2134public static final native int _XmCreateFileSelectionDialog(int parent, byte[] name, int[] arglist, int argcount);
2135public static final int XmCreateFileSelectionDialog(int parent, byte[] name, int[] arglist, int argcount) {
2136    lock.lock();
2137    try {
2138        return _XmCreateFileSelectionDialog(parent, name, arglist, argcount);
2139    } finally {
2140        lock.unlock();
2141    }
2142}
2143public static final native int _XmCreateForm(int parent, byte[] name, int[] arglist, int argcount);
2144public static final int XmCreateForm(int parent, byte[] name, int[] arglist, int argcount) {
2145    lock.lock();
2146    try {
2147        return _XmCreateForm(parent, name, arglist, argcount);
2148    } finally {
2149        lock.unlock();
2150    }
2151}
2152public static final native int _XmCreateFrame(int parent, byte[] name, int[] arglist, int argcount);
2153public static final int XmCreateFrame(int parent, byte[] name, int[] arglist, int argcount) {
2154    lock.lock();
2155    try {
2156        return _XmCreateFrame(parent, name, arglist, argcount);
2157    } finally {
2158        lock.unlock();
2159    }
2160}
2161public static final native int _XmCreateInformationDialog(int parent, byte[] name, int[] arglist, int argcount);
2162public static final int XmCreateInformationDialog(int parent, byte[] name, int[] arglist, int argcount) {
2163    lock.lock();
2164    try {
2165        return _XmCreateInformationDialog(parent, name, arglist, argcount);
2166    } finally {
2167        lock.unlock();
2168    }
2169}
2170public static final native int _XmCreateLabel(int parent, byte[] name, int[] arglist, int argcount);
2171public static final int XmCreateLabel(int parent, byte[] name, int[] arglist, int argcount) {
2172    lock.lock();
2173    try {
2174        return _XmCreateLabel(parent, name, arglist, argcount);
2175    } finally {
2176        lock.unlock();
2177    }
2178}
2179public static final native int _XmCreateList(int parent, byte[] name, int[] arglist, int argcount);
2180public static final int XmCreateList(int parent, byte[] name, int[] arglist, int argcount) {
2181    lock.lock();
2182    try {
2183        return _XmCreateList(parent, name, arglist, argcount);
2184    } finally {
2185        lock.unlock();
2186    }
2187}
2188public static final native int _XmCreateMainWindow(int parent, byte[] name, int[] arglist, int argcount);
2189public static final int XmCreateMainWindow(int parent, byte[] name, int[] arglist, int argcount) {
2190    lock.lock();
2191    try {
2192        return _XmCreateMainWindow(parent, name, arglist, argcount);
2193    } finally {
2194        lock.unlock();
2195    }
2196}
2197public static final native int _XmCreateMenuBar(int parent, byte[] name, int[] arglist, int argcount);
2198public static final int XmCreateMenuBar(int parent, byte[] name, int[] arglist, int argcount) {
2199    lock.lock();
2200    try {
2201        return _XmCreateMenuBar(parent, name, arglist, argcount);
2202    } finally {
2203        lock.unlock();
2204    }
2205}
2206public static final native int _XmCreateMessageDialog(int parent, byte[] name, int[] arglist, int argcount);
2207public static final int XmCreateMessageDialog(int parent, byte[] name, int[] arglist, int argcount) {
2208    lock.lock();
2209    try {
2210        return _XmCreateMessageDialog(parent, name, arglist, argcount);
2211    } finally {
2212        lock.unlock();
2213    }
2214}
2215public static final native int _XmCreatePopupMenu(int parent, byte[] name, int[] arglist, int argcount);
2216public static final int XmCreatePopupMenu(int parent, byte[] name, int[] arglist, int argcount) {
2217    lock.lock();
2218    try {
2219        return _XmCreatePopupMenu(parent, name, arglist, argcount);
2220    } finally {
2221        lock.unlock();
2222    }
2223}
2224public static final native int _XmCreatePulldownMenu(int parent, byte[] name, int[] arglist, int argcount);
2225public static final int XmCreatePulldownMenu(int parent, byte[] name, int[] arglist, int argcount) {
2226    lock.lock();
2227    try {
2228        return _XmCreatePulldownMenu(parent, name, arglist, argcount);
2229    } finally {
2230        lock.unlock();
2231    }
2232}
2233public static final native int _XmCreatePushButton(int parent, byte[] name, int[] arglist, int argcount);
2234public static final int XmCreatePushButton(int parent, byte[] name, int[] arglist, int argcount) {
2235    lock.lock();
2236    try {
2237        return _XmCreatePushButton(parent, name, arglist, argcount);
2238    } finally {
2239        lock.unlock();
2240    }
2241}
2242public static final native int _XmCreatePushButtonGadget(int parent, byte[] name, int[] arglist, int argcount);
2243public static final int XmCreatePushButtonGadget(int parent, byte[] name, int[] arglist, int argcount) {
2244    lock.lock();
2245    try {
2246        return _XmCreatePushButtonGadget(parent, name, arglist, argcount);
2247    } finally {
2248        lock.unlock();
2249    }
2250}
2251public static final native int _XmCreateQuestionDialog(int parent, byte[] name, int[] arglist, int argcount);
2252public static final int XmCreateQuestionDialog(int parent, byte[] name, int[] arglist, int argcount) {
2253    lock.lock();
2254    try {
2255        return _XmCreateQuestionDialog(parent, name, arglist, argcount);
2256    } finally {
2257        lock.unlock();
2258    }
2259}
2260public static final native int _XmCreateScale(int parent, byte[] name, int[] arglist, int argcount);
2261public static final int XmCreateScale(int parent, byte[] name, int[] arglist, int argcount) {
2262    lock.lock();
2263    try {
2264        return _XmCreateScale(parent, name, arglist, argcount);
2265    } finally {
2266        lock.unlock();
2267    }
2268}
2269public static final native int _XmCreateScrollBar(int parent, byte[] name, int[] arglist, int argcount);
2270public static final int XmCreateScrollBar(int parent, byte[] name, int[] arglist, int argcount) {
2271    lock.lock();
2272    try {
2273        return _XmCreateScrollBar(parent, name, arglist, argcount);
2274    } finally {
2275        lock.unlock();
2276    }
2277}
2278public static final native int _XmCreateScrolledList(int parent, byte[] name, int[] arglist, int argcount);
2279public static final int XmCreateScrolledList(int parent, byte[] name, int[] arglist, int argcount) {
2280    lock.lock();
2281    try {
2282        return _XmCreateScrolledList(parent, name, arglist, argcount);
2283    } finally {
2284        lock.unlock();
2285    }
2286}
2287public static final native int _XmCreateScrolledText(int parent, byte[] name, int[] arglist, int argcount);
2288public static final int XmCreateScrolledText(int parent, byte[] name, int[] arglist, int argcount) {
2289    lock.lock();
2290    try {
2291        return _XmCreateScrolledText(parent, name, arglist, argcount);
2292    } finally {
2293        lock.unlock();
2294    }
2295}
2296public static final native int _XmCreateSeparator(int parent, byte[] name, int[] arglist, int argcount);
2297public static final int XmCreateSeparator(int parent, byte[] name, int[] arglist, int argcount) {
2298    lock.lock();
2299    try {
2300        return _XmCreateSeparator(parent, name, arglist, argcount);
2301    } finally {
2302        lock.unlock();
2303    }
2304}
2305public static final native int _XmCreateSeparatorGadget(int parent, byte[] name, int[] arglist, int argcount);
2306public static final int XmCreateSeparatorGadget(int parent, byte[] name, int[] arglist, int argcount) {
2307    lock.lock();
2308    try {
2309        return _XmCreateSeparatorGadget(parent, name, arglist, argcount);
2310    } finally {
2311        lock.unlock();
2312    }
2313}
2314public static final native int _XmCreateSimpleSpinBox(int parent, byte[] name, int[] arglist, int argcount);
2315public static final int XmCreateSimpleSpinBox(int parent, byte[] name, int[] arglist, int argcount) {
2316    lock.lock();
2317    try {
2318        return _XmCreateSimpleSpinBox(parent, name, arglist, argcount);
2319    } finally {
2320        lock.unlock();
2321    }
2322}
2323public static final native int _XmCreateTextField(int parent, byte[] name, int[] arglist, int argcount);
2324public static final int XmCreateTextField(int parent, byte[] name, int[] arglist, int argcount) {
2325    lock.lock();
2326    try {
2327        return _XmCreateTextField(parent, name, arglist, argcount);
2328    } finally {
2329        lock.unlock();
2330    }
2331}
2332public static final native int _XmCreateToggleButton(int parent, byte[] name, int[] arglist, int argcount);
2333public static final int XmCreateToggleButton(int parent, byte[] name, int[] arglist, int argcount) {
2334    lock.lock();
2335    try {
2336        return _XmCreateToggleButton(parent, name, arglist, argcount);
2337    } finally {
2338        lock.unlock();
2339    }
2340}
2341public static final native int _XmCreateToggleButtonGadget(int parent, byte[] name, int[] arglist, int argcount);
2342public static final int XmCreateToggleButtonGadget(int parent, byte[] name, int[] arglist, int argcount) {
2343    lock.lock();
2344    try {
2345        return _XmCreateToggleButtonGadget(parent, name, arglist, argcount);
2346    } finally {
2347        lock.unlock();
2348    }
2349}
2350public static final native int _XmCreateWarningDialog(int parent, byte[] name, int[] arglist, int argcount);
2351public static final int XmCreateWarningDialog(int parent, byte[] name, int[] arglist, int argcount) {
2352    lock.lock();
2353    try {
2354        return _XmCreateWarningDialog(parent, name, arglist, argcount);
2355    } finally {
2356        lock.unlock();
2357    }
2358}
2359public static final native int _XmCreateWorkingDialog(int parent, byte[] name, int[] arglist, int argcount);
2360public static final int XmCreateWorkingDialog(int parent, byte[] name, int[] arglist, int argcount) {
2361    lock.lock();
2362    try {
2363        return _XmCreateWorkingDialog(parent, name, arglist, argcount);
2364    } finally {
2365        lock.unlock();
2366    }
2367}
2368public static final native boolean _XmDestroyPixmap(int screen, int pixmap);
2369public static final boolean XmDestroyPixmap(int screen, int pixmap) {
2370    lock.lock();
2371    try {
2372        return _XmDestroyPixmap(screen, pixmap);
2373    } finally {
2374        lock.unlock();
2375    }
2376}
2377public static final native void _XmDragCancel(int dragcontext);
2378public static final void XmDragCancel(int dragcontext) {
2379    lock.lock();
2380    try {
2381        _XmDragCancel(dragcontext);
2382    } finally {
2383        lock.unlock();
2384    }
2385}
2386public static final native int _XmDragStart(int widget, int event, int[] arglist, int argcount);
2387public static final int XmDragStart(int widget, int event, int[] arglist, int argcount) {
2388    lock.lock();
2389    try {
2390        return _XmDragStart(widget, event, arglist, argcount);
2391    } finally {
2392        lock.unlock();
2393    }
2394}
2395public static final native void _XmDropSiteRegister(int widget, int[] arglist, int argcount);
2396public static final void XmDropSiteRegister(int widget, int[] arglist, int argcount) {
2397    lock.lock();
2398    try {
2399        _XmDropSiteRegister(widget, arglist, argcount);
2400    } finally {
2401        lock.unlock();
2402    }
2403}
2404public static final native void _XmDropSiteUnregister(int widget);
2405public static final void XmDropSiteUnregister(int widget) {
2406    lock.lock();
2407    try {
2408        _XmDropSiteUnregister(widget);
2409    } finally {
2410        lock.unlock();
2411    }
2412}
2413public static final native void _XmDropSiteUpdate(int widget, int[] arglist, int argcount);
2414public static final void XmDropSiteUpdate(int widget, int[] arglist, int argcount) {
2415    lock.lock();
2416    try {
2417        _XmDropSiteUpdate(widget, arglist, argcount);
2418    } finally {
2419        lock.unlock();
2420    }
2421}
2422public static final native void _XmDropTransferAdd(int drop_transfer, int[] transfers, int num_transfers);
2423public static final void XmDropTransferAdd(int drop_transfer, int[] transfers, int num_transfers) {
2424    lock.lock();
2425    try {
2426        _XmDropTransferAdd(drop_transfer, transfers, num_transfers);
2427    } finally {
2428        lock.unlock();
2429    }
2430}
2431public static final native int _XmDropTransferStart(int widget, int[] arglist, int argcount);
2432public static final int XmDropTransferStart(int widget, int[] arglist, int argcount) {
2433    lock.lock();
2434    try {
2435        return _XmDropTransferStart(widget, arglist, argcount);
2436    } finally {
2437        lock.unlock();
2438    }
2439}
2440public static final native int _XmFileSelectionBoxGetChild(int widget, int child);
2441public static final int XmFileSelectionBoxGetChild(int widget, int child) {
2442    lock.lock();
2443    try {
2444        return _XmFileSelectionBoxGetChild(widget, child);
2445    } finally {
2446        lock.unlock();
2447    }
2448}
2449public static final native int _XmFontListAppendEntry(int oldList, int entry);
2450public static final int XmFontListAppendEntry(int oldList, int entry) {
2451    lock.lock();
2452    try {
2453        return _XmFontListAppendEntry(oldList, entry);
2454    } finally {
2455        lock.unlock();
2456    }
2457}
2458public static final native int _XmFontListCopy(int fontlist);
2459public static final int XmFontListCopy(int fontlist) {
2460    lock.lock();
2461    try {
2462        return _XmFontListCopy(fontlist);
2463    } finally {
2464        lock.unlock();
2465    }
2466}
2467public static final native void _XmFontListEntryFree(int[] entry);
2468public static final void XmFontListEntryFree(int[] entry) {
2469    lock.lock();
2470    try {
2471        _XmFontListEntryFree(entry);
2472    } finally {
2473        lock.unlock();
2474    }
2475}
2476public static final native int _XmFontListEntryGetFont(int entry, int[] type_return);
2477public static final int XmFontListEntryGetFont(int entry, int[] type_return) {
2478    lock.lock();
2479    try {
2480        return _XmFontListEntryGetFont(entry, type_return);
2481    } finally {
2482        lock.unlock();
2483    }
2484}
2485public static final native int _XmFontListEntryLoad(int display, byte[] fontName, int type, byte[] tag);
2486public static final int XmFontListEntryLoad(int display, byte[] fontName, int type, byte[] tag) {
2487    lock.lock();
2488    try {
2489        return _XmFontListEntryLoad(display, fontName, type, tag);
2490    } finally {
2491        lock.unlock();
2492    }
2493}
2494public static final native void _XmFontListFree(int list);
2495public static final void XmFontListFree(int list) {
2496    lock.lock();
2497    try {
2498        _XmFontListFree(list);
2499    } finally {
2500        lock.unlock();
2501    }
2502}
2503public static final native void _XmFontListFreeFontContext(int context);
2504public static final void XmFontListFreeFontContext(int context) {
2505    lock.lock();
2506    try {
2507        _XmFontListFreeFontContext(context);
2508    } finally {
2509        lock.unlock();
2510    }
2511}
2512public static final native boolean _XmFontListInitFontContext(int[] context, int fontList);
2513public static final boolean XmFontListInitFontContext(int[] context, int fontList) {
2514    lock.lock();
2515    try {
2516        return _XmFontListInitFontContext(context, fontList);
2517    } finally {
2518        lock.unlock();
2519    }
2520}
2521public static final native int _XmFontListNextEntry(int context);
2522public static final int XmFontListNextEntry(int context) {
2523    lock.lock();
2524    try {
2525        return _XmFontListNextEntry(context);
2526    } finally {
2527        lock.unlock();
2528    }
2529}
2530public static final native int _XmGetAtomName(int display, int atom);
2531public static final int XmGetAtomName(int display, int atom) {
2532    lock.lock();
2533    try {
2534        return _XmGetAtomName(display, atom);
2535    } finally {
2536        lock.unlock();
2537    }
2538}
2539public static final native int _XmGetDragContext(int widget, int timestamp);
2540public static final int XmGetDragContext(int widget, int timestamp) {
2541    lock.lock();
2542    try {
2543        return _XmGetDragContext(widget, timestamp);
2544    } finally {
2545        lock.unlock();
2546    }
2547}
2548public static final native int _XmGetFocusWidget(int widget);
2549public static final int XmGetFocusWidget(int widget) {
2550    lock.lock();
2551    try {
2552        return _XmGetFocusWidget(widget);
2553    } finally {
2554        lock.unlock();
2555    }
2556}
2557public static final native int _XmGetPixmap(int screen, byte[] name, int fgPixel, int bgPixel);
2558public static final int XmGetPixmap(int screen, byte[] name, int fgPixel, int bgPixel) {
2559    lock.lock();
2560    try {
2561        return _XmGetPixmap(screen, name, fgPixel, bgPixel);
2562    } finally {
2563        lock.unlock();
2564    }
2565}
2566public static final native int _XmGetPixmapByDepth(int screen, byte[] image_name, int foreground, int background, int depth);
2567public static final int XmGetPixmapByDepth(int screen, byte[] image_name, int foreground, int background, int depth) {
2568    lock.lock();
2569    try {
2570        return _XmGetPixmapByDepth(screen, image_name, foreground, background, depth);
2571    } finally {
2572        lock.unlock();
2573    }
2574}
2575public static final native int _XmGetXmDisplay(int display);
2576public static final int XmGetXmDisplay(int display) {
2577    lock.lock();
2578    try {
2579        return _XmGetXmDisplay(display);
2580    } finally {
2581        lock.unlock();
2582    }
2583}
2584public static final native int _XmImMbLookupString(int widget, XKeyEvent event, byte[] string, int size, int[] keysym, int[] status);
2585public static final int XmImMbLookupString(int widget, XKeyEvent event, byte[] string, int size, int[] keysym, int[] status) {
2586    lock.lock();
2587    try {
2588        return _XmImMbLookupString(widget, event, string, size, keysym, status);
2589    } finally {
2590        lock.unlock();
2591    }
2592}
2593public static final native void _XmImRegister(int widget, int reserved);
2594public static final void XmImRegister(int widget, int reserved) {
2595    lock.lock();
2596    try {
2597        _XmImRegister(widget, reserved);
2598    } finally {
2599        lock.unlock();
2600    }
2601}
2602public static final native void _XmImSetFocusValues(int widget, int[] args, int num_args);
2603public static final void XmImSetFocusValues(int widget, int[] args, int num_args) {
2604    lock.lock();
2605    try {
2606        _XmImSetFocusValues(widget, args, num_args);
2607    } finally {
2608        lock.unlock();
2609    }
2610}
2611public static final native void _XmImSetValues(int widget, int[] args, int num_args);
2612public static final void XmImSetValues(int widget, int[] args, int num_args) {
2613    lock.lock();
2614    try {
2615        _XmImSetValues(widget, args, num_args);
2616    } finally {
2617        lock.unlock();
2618    }
2619}
2620public static final native void _XmImUnregister(int widget);
2621public static final void XmImUnregister(int widget) {
2622    lock.lock();
2623    try {
2624        _XmImUnregister(widget);
2625    } finally {
2626        lock.unlock();
2627    }
2628}
2629public static final native void _XmImUnsetFocus(int widget);
2630public static final void XmImUnsetFocus(int widget) {
2631    lock.lock();
2632    try {
2633        _XmImUnsetFocus(widget);
2634    } finally {
2635        lock.unlock();
2636    }
2637}
2638public static final native int _XmInternAtom(int display, byte[] name, boolean only_if_exists);
2639public static final int XmInternAtom(int display, byte[] name, boolean only_if_exists) {
2640    lock.lock();
2641    try {
2642        return _XmInternAtom(display, name, only_if_exists);
2643    } finally {
2644        lock.unlock();
2645    }
2646}
2647public static final native void _XmListAddItemUnselected(int list, int xmString, int position);
2648public static final void XmListAddItemUnselected(int list, int xmString, int position) {
2649    lock.lock();
2650    try {
2651        _XmListAddItemUnselected(list, xmString, position);
2652    } finally {
2653        lock.unlock();
2654    }
2655}
2656public static final native void _XmListDeleteAllItems(int list);
2657public static final void XmListDeleteAllItems(int list) {
2658    lock.lock();
2659    try {
2660        _XmListDeleteAllItems(list);
2661    } finally {
2662        lock.unlock();
2663    }
2664}
2665public static final native void _XmListDeleteItemsPos(int list, int item_count, int position);
2666public static final void XmListDeleteItemsPos(int list, int item_count, int position) {
2667    lock.lock();
2668    try {
2669        _XmListDeleteItemsPos(list, item_count, position);
2670    } finally {
2671        lock.unlock();
2672    }
2673}
2674public static final native void _XmListDeletePos(int list, int position);
2675public static final void XmListDeletePos(int list, int position) {
2676    lock.lock();
2677    try {
2678        _XmListDeletePos(list, position);
2679    } finally {
2680        lock.unlock();
2681    }
2682}
2683public static final native void _XmListDeletePositions(int list, int[] position_list, int position_count);
2684public static final void XmListDeletePositions(int list, int[] position_list, int position_count) {
2685    lock.lock();
2686    try {
2687        _XmListDeletePositions(list, position_list, position_count);
2688    } finally {
2689        lock.unlock();
2690    }
2691}
2692public static final native void _XmListDeselectAllItems(int list);
2693public static final void XmListDeselectAllItems(int list) {
2694    lock.lock();
2695    try {
2696        _XmListDeselectAllItems(list);
2697    } finally {
2698        lock.unlock();
2699    }
2700}
2701public static final native void _XmListDeselectPos(int list, int position);
2702public static final void XmListDeselectPos(int list, int position) {
2703    lock.lock();
2704    try {
2705        _XmListDeselectPos(list, position);
2706    } finally {
2707        lock.unlock();
2708    }
2709}
2710public static final native int _XmListGetKbdItemPos(int list);
2711public static final int XmListGetKbdItemPos(int list) {
2712    lock.lock();
2713    try {
2714        return _XmListGetKbdItemPos(list);
2715    } finally {
2716        lock.unlock();
2717    }
2718}
2719public static final native boolean _XmListGetSelectedPos(int list, int[] positions, int[] count);
2720public static final boolean XmListGetSelectedPos(int list, int[] positions, int[] count) {
2721    lock.lock();
2722    try {
2723        return _XmListGetSelectedPos(list, positions, count);
2724    } finally {
2725        lock.unlock();
2726    }
2727}
2728public static final native int _XmListItemPos(int list, int xmString);
2729public static final int XmListItemPos(int list, int xmString) {
2730    lock.lock();
2731    try {
2732        return _XmListItemPos(list, xmString);
2733    } finally {
2734        lock.unlock();
2735    }
2736}
2737public static final native boolean _XmListPosSelected(int list, int position);
2738public static final boolean XmListPosSelected(int list, int position) {
2739    lock.lock();
2740    try {
2741        return _XmListPosSelected(list, position);
2742    } finally {
2743        lock.unlock();
2744    }
2745}
2746public static final native void _XmListReplaceItemsPosUnselected(int list, int[] new_items, int item_count, int position);
2747public static final void XmListReplaceItemsPosUnselected(int list, int[] new_items, int item_count, int position) {
2748    lock.lock();
2749    try {
2750        _XmListReplaceItemsPosUnselected(list, new_items, item_count, position);
2751    } finally {
2752        lock.unlock();
2753    }
2754}
2755public static final native void _XmListSelectPos(int list, int position, boolean notify);
2756public static final void XmListSelectPos(int list, int position, boolean notify) {
2757    lock.lock();
2758    try {
2759        _XmListSelectPos(list, position, notify);
2760    } finally {
2761        lock.unlock();
2762    }
2763}
2764public static final native boolean _XmListSetKbdItemPos(int list, int position);
2765public static final boolean XmListSetKbdItemPos(int list, int position) {
2766    lock.lock();
2767    try {
2768        return _XmListSetKbdItemPos(list, position);
2769    } finally {
2770        lock.unlock();
2771    }
2772}
2773public static final native void _XmListSetPos(int list, int position);
2774public static final void XmListSetPos(int list, int position) {
2775    lock.lock();
2776    try {
2777        _XmListSetPos(list, position);
2778    } finally {
2779        lock.unlock();
2780    }
2781}
2782public static final native void _XmListUpdateSelectedList(int list);
2783public static final void XmListUpdateSelectedList(int list) {
2784    lock.lock();
2785    try {
2786        _XmListUpdateSelectedList(list);
2787    } finally {
2788        lock.unlock();
2789    }
2790}
2791public static final native void _XmMainWindowSetAreas(int widget, int menu, int command, int hscroll, int vscroll, int wregion);
2792public static final void XmMainWindowSetAreas(int widget, int menu, int command, int hscroll, int vscroll, int wregion) {
2793    lock.lock();
2794    try {
2795        _XmMainWindowSetAreas(widget, menu, command, hscroll, vscroll, wregion);
2796    } finally {
2797        lock.unlock();
2798    }
2799}
2800public static final native int _XmMessageBoxGetChild(int widget, int child);
2801public static final int XmMessageBoxGetChild(int widget, int child) {
2802    lock.lock();
2803    try {
2804        return _XmMessageBoxGetChild(widget, child);
2805    } finally {
2806        lock.unlock();
2807    }
2808}
2809public static final native int _XmParseMappingCreate(int[] argList, int argCount);
2810public static final int XmParseMappingCreate(int[] argList, int argCount) {
2811    lock.lock();
2812    try {
2813        return _XmParseMappingCreate(argList, argCount);
2814    } finally {
2815        lock.unlock();
2816    }
2817}
2818public static final native void _XmParseMappingFree(int parseMapping);
2819public static final void XmParseMappingFree(int parseMapping) {
2820    lock.lock();
2821    try {
2822        _XmParseMappingFree(parseMapping);
2823    } finally {
2824        lock.unlock();
2825    }
2826}
2827public static final native boolean _XmProcessTraversal(int widget, int dir);
2828public static final boolean XmProcessTraversal(int widget, int dir) {
2829    lock.lock();
2830    try {
2831        return _XmProcessTraversal(widget, dir);
2832    } finally {
2833        lock.unlock();
2834    }
2835}
2836public static final native int _XmRenderTableAddRenditions(int oldTable, int[] renditions, int renditionCount, int mergeMode);
2837public static final int XmRenderTableAddRenditions(int oldTable, int[] renditions, int renditionCount, int mergeMode) {
2838    lock.lock();
2839    try {
2840        return _XmRenderTableAddRenditions(oldTable, renditions, renditionCount, mergeMode);
2841    } finally {
2842        lock.unlock();
2843    }
2844}
2845public static final native void _XmRenderTableFree(int renderTable);
2846public static final void XmRenderTableFree(int renderTable) {
2847    lock.lock();
2848    try {
2849        _XmRenderTableFree(renderTable);
2850    } finally {
2851        lock.unlock();
2852    }
2853}
2854public static final native int _XmRenditionCreate(int widget, byte[] tag, int[] argList, int argCount);
2855public static final int XmRenditionCreate(int widget, byte[] tag, int[] argList, int argCount) {
2856    lock.lock();
2857    try {
2858        return _XmRenditionCreate(widget, tag, argList, argCount);
2859    } finally {
2860        lock.unlock();
2861    }
2862}
2863public static final native void _XmRenditionFree(int rendition);
2864public static final void XmRenditionFree(int rendition) {
2865    lock.lock();
2866    try {
2867        _XmRenditionFree(rendition);
2868    } finally {
2869        lock.unlock();
2870    }
2871}
2872public static final native int _XmStringBaseline(int fontList, int xmString);
2873public static final int XmStringBaseline(int fontList, int xmString) {
2874    lock.lock();
2875    try {
2876        return _XmStringBaseline(fontList, xmString);
2877    } finally {
2878        lock.unlock();
2879    }
2880}
2881public static final native boolean _XmStringCompare(int xmString1, int xmString2);
2882public static final boolean XmStringCompare(int xmString1, int xmString2) {
2883    lock.lock();
2884    try {
2885        return _XmStringCompare(xmString1, xmString2);
2886    } finally {
2887        lock.unlock();
2888    }
2889}
2890public static final native int _XmStringComponentCreate(int type, int length, byte[] value);
2891public static final int XmStringComponentCreate(int type, int length, byte[] value) {
2892    lock.lock();
2893    try {
2894        return _XmStringComponentCreate(type, length, value);
2895    } finally {
2896        lock.unlock();
2897    }
2898}
2899public static final native int _XmStringConcat(int xmString1, int xmString2);
2900public static final int XmStringConcat(int xmString1, int xmString2) {
2901    lock.lock();
2902    try {
2903        return _XmStringConcat(xmString1, xmString2);
2904    } finally {
2905        lock.unlock();
2906    }
2907}
2908public static final native int _XmStringCreate(byte[] string, byte[] charset);
2909public static final int XmStringCreate(byte[] string, byte[] charset) {
2910    lock.lock();
2911    try {
2912        return _XmStringCreate(string, charset);
2913    } finally {
2914        lock.unlock();
2915    }
2916}
2917public static final native int _XmStringCreateLocalized(byte[] string);
2918public static final int XmStringCreateLocalized(byte[] string) {
2919    lock.lock();
2920    try {
2921        return _XmStringCreateLocalized(string);
2922    } finally {
2923        lock.unlock();
2924    }
2925}
2926public static final native void _XmStringDraw(int display, int window, int renderTable, int xmString, int gc, int x, int y, int width, int align, int lay_dir, XRectangle clip);
2927public static final void XmStringDraw(int display, int window, int renderTable, int xmString, int gc, int x, int y, int width, int align, int lay_dir, XRectangle clip) {
2928    lock.lock();
2929    try {
2930        _XmStringDraw(display, window, renderTable, xmString, gc, x, y, width, align, lay_dir, clip);
2931    } finally {
2932        lock.unlock();
2933    }
2934}
2935public static final native void _XmStringDrawImage(int display, int window, int renderTable, int xmString, int gc, int x, int y, int width, int align, int lay_dir, XRectangle clip);
2936public static final void XmStringDrawImage(int display, int window, int renderTable, int xmString, int gc, int x, int y, int width, int align, int lay_dir, XRectangle clip) {
2937    lock.lock();
2938    try {
2939        _XmStringDrawImage(display, window, renderTable, xmString, gc, x, y, width, align, lay_dir, clip);
2940    } finally {
2941        lock.unlock();
2942    }
2943}
2944public static final native void _XmStringDrawUnderline(int display, int window, int fontlist, int xmString, int gc, int x, int y, int width, int align, int lay_dir, XRectangle clip, int xmStringUnderline);
2945public static final void XmStringDrawUnderline(int display, int window, int fontlist, int xmString, int gc, int x, int y, int width, int align, int lay_dir, XRectangle clip, int xmStringUnderline) {
2946    lock.lock();
2947    try {
2948        _XmStringDrawUnderline(display, window, fontlist, xmString, gc, x, y, width, align, lay_dir, clip, xmStringUnderline);
2949    } finally {
2950        lock.unlock();
2951    }
2952}
2953public static final native boolean _XmStringEmpty(int s1);
2954public static final boolean XmStringEmpty(int s1) {
2955    lock.lock();
2956    try {
2957        return _XmStringEmpty(s1);
2958    } finally {
2959        lock.unlock();
2960    }
2961}
2962public static final native void _XmStringExtent(int fontList, int xmString, short[] width, short[] height);
2963public static final void XmStringExtent(int fontList, int xmString, short[] width, short[] height) {
2964    lock.lock();
2965    try {
2966        _XmStringExtent(fontList, xmString, width, height);
2967    } finally {
2968        lock.unlock();
2969    }
2970}
2971public static final native void _XmStringFree(int xmString);
2972public static final void XmStringFree(int xmString) {
2973    lock.lock();
2974    try {
2975        _XmStringFree(xmString);
2976    } finally {
2977        lock.unlock();
2978    }
2979}
2980public static final native int _XmStringGenerate(byte[] text, byte[] tag, int type, byte[] rendition);
2981public static final int XmStringGenerate(byte[] text, byte[] tag, int type, byte[] rendition) {
2982    lock.lock();
2983    try {
2984        return _XmStringGenerate(text, tag, type, rendition);
2985    } finally {
2986        lock.unlock();
2987    }
2988}
2989public static final native int _XmStringHeight(int fontList, int xmString);
2990public static final int XmStringHeight(int fontList, int xmString) {
2991    lock.lock();
2992    try {
2993        return _XmStringHeight(fontList, xmString);
2994    } finally {
2995        lock.unlock();
2996    }
2997}
2998public static final native int _XmStringParseText(byte[] text, int textEnd, byte[] tag, int tagType, int[] parseTable, int parseCount, int callData);
2999public static final int XmStringParseText(byte[] text, int textEnd, byte[] tag, int tagType, int[] parseTable, int parseCount, int callData) {
3000    lock.lock();
3001    try {
3002        return _XmStringParseText(text, textEnd, tag, tagType, parseTable, parseCount, callData);
3003    } finally {
3004        lock.unlock();
3005    }
3006}
3007public static final native int _XmStringUnparse(int xmString, byte[] tag, int tagType, int outputType, int[] parseTable, int parseCount, int parseModel);
3008public static final int XmStringUnparse(int xmString, byte[] tag, int tagType, int outputType, int[] parseTable, int parseCount, int parseModel) {
3009    lock.lock();
3010    try {
3011        return _XmStringUnparse(xmString, tag, tagType, outputType, parseTable, parseCount, parseModel);
3012    } finally {
3013        lock.unlock();
3014    }
3015}
3016public static final native int _XmStringWidth(int fontList, int xmString);
3017public static final int XmStringWidth(int fontList, int xmString) {
3018    lock.lock();
3019    try {
3020        return _XmStringWidth(fontList, xmString);
3021    } finally {
3022        lock.unlock();
3023    }
3024}
3025public static final native int _XmTabCreate(int value, byte units, byte offsetModel, byte alignment, byte[] decimal);
3026public static final int XmTabCreate(int value, byte units, byte offsetModel, byte alignment, byte[] decimal) {
3027    lock.lock();
3028    try {
3029        return _XmTabCreate(value, units, offsetModel, alignment, decimal);
3030    } finally {
3031        lock.unlock();
3032    }
3033}
3034public static final native void _XmTabFree(int tab);
3035public static final void XmTabFree(int tab) {
3036    lock.lock();
3037    try {
3038        _XmTabFree(tab);
3039    } finally {
3040        lock.unlock();
3041    }
3042}
3043public static final native void _XmTabListFree(int tabList);
3044public static final void XmTabListFree(int tabList) {
3045    lock.lock();
3046    try {
3047        _XmTabListFree(tabList);
3048    } finally {
3049        lock.unlock();
3050    }
3051}
3052public static final native int _XmTabListInsertTabs(int oldList, int[] tabs, int tab_count, int position);
3053public static final int XmTabListInsertTabs(int oldList, int[] tabs, int tab_count, int position) {
3054    lock.lock();
3055    try {
3056        return _XmTabListInsertTabs(oldList, tabs, tab_count, position);
3057    } finally {
3058        lock.unlock();
3059    }
3060}
3061public static final native void _XmTextClearSelection(int widget, int time);
3062public static final void XmTextClearSelection(int widget, int time) {
3063    lock.lock();
3064    try {
3065        _XmTextClearSelection(widget, time);
3066    } finally {
3067        lock.unlock();
3068    }
3069}
3070public static final native boolean _XmTextCopy(int widget, int time);
3071public static final boolean XmTextCopy(int widget, int time) {
3072    lock.lock();
3073    try {
3074        return _XmTextCopy(widget, time);
3075    } finally {
3076        lock.unlock();
3077    }
3078}
3079public static final native boolean _XmTextCut(int widget, int time);
3080public static final boolean XmTextCut(int widget, int time) {
3081    lock.lock();
3082    try {
3083        return _XmTextCut(widget, time);
3084    } finally {
3085        lock.unlock();
3086    }
3087}
3088public static final native void _XmTextDisableRedisplay(int widget);
3089public static final void XmTextDisableRedisplay(int widget) {
3090    lock.lock();
3091    try {
3092        _XmTextDisableRedisplay(widget);
3093    } finally {
3094        lock.unlock();
3095    }
3096}
3097public static final native void _XmTextEnableRedisplay(int widget);
3098public static final void XmTextEnableRedisplay(int widget) {
3099    lock.lock();
3100    try {
3101        _XmTextEnableRedisplay(widget);
3102    } finally {
3103        lock.unlock();
3104    }
3105}
3106public static final native boolean _XmTextFieldPaste(int widget);
3107public static final boolean XmTextFieldPaste(int widget) {
3108    lock.lock();
3109    try {
3110        return _XmTextFieldPaste(widget);
3111    } finally {
3112        lock.unlock();
3113    }
3114}
3115public static final native int _XmTextGetInsertionPosition(int widget);
3116public static final int XmTextGetInsertionPosition(int widget) {
3117    lock.lock();
3118    try {
3119        return _XmTextGetInsertionPosition(widget);
3120    } finally {
3121        lock.unlock();
3122    }
3123}
3124public static final native int _XmTextGetLastPosition(int widget);
3125public static final int XmTextGetLastPosition(int widget) {
3126    lock.lock();
3127    try {
3128        return _XmTextGetLastPosition(widget);
3129    } finally {
3130        lock.unlock();
3131    }
3132}
3133public static final native int _XmTextGetMaxLength(int widget);
3134public static final int XmTextGetMaxLength(int widget) {
3135    lock.lock();
3136    try {
3137        return _XmTextGetMaxLength(widget);
3138    } finally {
3139        lock.unlock();
3140    }
3141}
3142public static final native int _XmTextGetSelection(int widget);
3143public static final int XmTextGetSelection(int widget) {
3144    lock.lock();
3145    try {
3146        return _XmTextGetSelection(widget);
3147    } finally {
3148        lock.unlock();
3149    }
3150}
3151public static final native boolean _XmTextGetSelectionPosition(int widget, int[] left, int[] right);
3152public static final boolean XmTextGetSelectionPosition(int widget, int[] left, int[] right) {
3153    lock.lock();
3154    try {
3155        return _XmTextGetSelectionPosition(widget, left, right);
3156    } finally {
3157        lock.unlock();
3158    }
3159}
3160public static final native int _XmTextGetString(int widget);
3161public static final int XmTextGetString(int widget) {
3162    lock.lock();
3163    try {
3164        return _XmTextGetString(widget);
3165    } finally {
3166        lock.unlock();
3167    }
3168}
3169public static final native int _XmTextGetSubstring(int widget, int start, int num_chars, int buffer_size, byte[] buffer);
3170public static final int XmTextGetSubstring(int widget, int start, int num_chars, int buffer_size, byte[] buffer) {
3171    lock.lock();
3172    try {
3173        return _XmTextGetSubstring(widget, start, num_chars, buffer_size, buffer);
3174    } finally {
3175        lock.unlock();
3176    }
3177}
3178public static final native int _XmTextGetSubstringWcs(int widget, int start, int num_chars, int buffer_size, char[] buffer);
3179public static final int XmTextGetSubstringWcs(int widget, int start, int num_chars, int buffer_size, char[] buffer) {
3180    lock.lock();
3181    try {
3182        return _XmTextGetSubstringWcs(widget, start, num_chars, buffer_size, buffer);
3183    } finally {
3184        lock.unlock();
3185    }
3186}
3187public static final native void _XmTextInsert(int widget, int position, byte[] value);
3188public static final void XmTextInsert(int widget, int position, byte[] value) {
3189    lock.lock();
3190    try {
3191        _XmTextInsert(widget, position, value);
3192    } finally {
3193        lock.unlock();
3194    }
3195}
3196public static final native boolean _XmTextPaste(int widget);
3197public static final boolean XmTextPaste(int widget) {
3198    lock.lock();
3199    try {
3200        return _XmTextPaste(widget);
3201    } finally {
3202        lock.unlock();
3203    }
3204}
3205public static final native boolean _XmTextPosToXY(int widget, int position, short[] x, short[] y);
3206public static final boolean XmTextPosToXY(int widget, int position, short[] x, short[] y) {
3207    lock.lock();
3208    try {
3209        return _XmTextPosToXY(widget, position, x, y);
3210    } finally {
3211        lock.unlock();
3212    }
3213}
3214public static final native void _XmTextReplace(int widget, int from_pos, int to_pos, byte[] value);
3215public static final void XmTextReplace(int widget, int from_pos, int to_pos, byte[] value) {
3216    lock.lock();
3217    try {
3218        _XmTextReplace(widget, from_pos, to_pos, value);
3219    } finally {
3220        lock.unlock();
3221    }
3222}
3223public static final native void _XmTextScroll(int widget, int lines);
3224public static final void XmTextScroll(int widget, int lines) {
3225    lock.lock();
3226    try {
3227        _XmTextScroll(widget, lines);
3228    } finally {
3229        lock.unlock();
3230    }
3231}
3232public static final native void _XmTextSetEditable(int widget, boolean editable);
3233public static final void XmTextSetEditable(int widget, boolean editable) {
3234    lock.lock();
3235    try {
3236        _XmTextSetEditable(widget, editable);
3237    } finally {
3238        lock.unlock();
3239    }
3240}
3241public static final native void _XmTextSetHighlight(int widget, int left, int right, int mode);
3242public static final void XmTextSetHighlight(int widget, int left, int right, int mode) {
3243    lock.lock();
3244    try {
3245        _XmTextSetHighlight(widget, left, right, mode);
3246    } finally {
3247        lock.unlock();
3248    }
3249}
3250public static final native void _XmTextSetInsertionPosition(int widget, int position);
3251public static final void XmTextSetInsertionPosition(int widget, int position) {
3252    lock.lock();
3253    try {
3254        _XmTextSetInsertionPosition(widget, position);
3255    } finally {
3256        lock.unlock();
3257    }
3258}
3259public static final native void _XmTextSetMaxLength(int widget, int max_length);
3260public static final void XmTextSetMaxLength(int widget, int max_length) {
3261    lock.lock();
3262    try {
3263        _XmTextSetMaxLength(widget, max_length);
3264    } finally {
3265        lock.unlock();
3266    }
3267}
3268public static final native void _XmTextSetSelection(int widget, int first, int last, int time);
3269public static final void XmTextSetSelection(int widget, int first, int last, int time) {
3270    lock.lock();
3271    try {
3272        _XmTextSetSelection(widget, first, last, time);
3273    } finally {
3274        lock.unlock();
3275    }
3276}
3277public static final native void _XmTextSetString(int widget, byte[] value);
3278public static final void XmTextSetString(int widget, byte[] value) {
3279    lock.lock();
3280    try {
3281        _XmTextSetString(widget, value);
3282    } finally {
3283        lock.unlock();
3284    }
3285}
3286public static final native void _XmTextShowPosition(int widget, int position);
3287public static final void XmTextShowPosition(int widget, int position) {
3288    lock.lock();
3289    try {
3290        _XmTextShowPosition(widget, position);
3291    } finally {
3292        lock.unlock();
3293    }
3294}
3295public static final native void _XmUpdateDisplay(int widget);
3296public static final void XmUpdateDisplay(int widget) {
3297    lock.lock();
3298    try {
3299        _XmUpdateDisplay(widget);
3300    } finally {
3301        lock.unlock();
3302    }
3303}
3304public static final native boolean _XmWidgetGetDisplayRect(int region, XRectangle rectangle);
3305public static final boolean XmWidgetGetDisplayRect(int region, XRectangle rectangle) {
3306    lock.lock();
3307    try {
3308        return _XmWidgetGetDisplayRect(region, rectangle);
3309    } finally {
3310        lock.unlock();
3311    }
3312}
3313public static final native int _XmbTextListToTextProperty(int display, int list, int count, int style, XTextProperty text_prop_return);
3314public static final int XmbTextListToTextProperty(int display, int list, int count, int style, XTextProperty text_prop_return) {
3315    lock.lock();
3316    try {
3317        return _XmbTextListToTextProperty(display, list, count, style, text_prop_return);
3318    } finally {
3319        lock.unlock();
3320    }
3321}
3322public static final native int _XmbTextPropertyToTextList(int display, XTextProperty text_prop, int[] list_return, int[] count_return);
3323public static final int XmbTextPropertyToTextList(int display, XTextProperty text_prop, int[] list_return, int[] count_return) {
3324    lock.lock();
3325    try {
3326        return _XmbTextPropertyToTextList(display, text_prop, list_return, count_return);
3327    } finally {
3328        lock.unlock();
3329    }
3330}
3331public static final native void _XpCancelJob(int display, boolean discard);
3332public static final void XpCancelJob(int display, boolean discard) {
3333    lock.lock();
3334    try {
3335        _XpCancelJob(display, discard);
3336    } finally {
3337        lock.unlock();
3338    }
3339}
3340public static final native int _XpCreateContext(int display, byte[] printer_name);
3341public static final int XpCreateContext(int display, byte[] printer_name) {
3342    lock.lock();
3343    try {
3344        return _XpCreateContext(display, printer_name);
3345    } finally {
3346        lock.unlock();
3347    }
3348}
3349public static final native void _XpDestroyContext(int display, int print_context);
3350public static final void XpDestroyContext(int display, int print_context) {
3351    lock.lock();
3352    try {
3353        _XpDestroyContext(display, print_context);
3354    } finally {
3355        lock.unlock();
3356    }
3357}
3358public static final native void _XpEndJob(int display);
3359public static final void XpEndJob(int display) {
3360    lock.lock();
3361    try {
3362        _XpEndJob(display);
3363    } finally {
3364        lock.unlock();
3365    }
3366}
3367public static final native void _XpEndPage(int display);
3368public static final void XpEndPage(int display) {
3369    lock.lock();
3370    try {
3371        _XpEndPage(display);
3372    } finally {
3373        lock.unlock();
3374    }
3375}
3376public static final native void _XpFreePrinterList(int printer_list);
3377public static final void XpFreePrinterList(int printer_list) {
3378    lock.lock();
3379    try {
3380        _XpFreePrinterList(printer_list);
3381    } finally {
3382        lock.unlock();
3383    }
3384}
3385public static final native int _XpGetOneAttribute(int display, int print_context, byte type, byte[] attribute_name);
3386public static final int XpGetOneAttribute(int display, int print_context, byte type, byte[] attribute_name) {
3387    lock.lock();
3388    try {
3389        return _XpGetOneAttribute(display, print_context, type, attribute_name);
3390    } finally {
3391        lock.unlock();
3392    }
3393}
3394public static final native int _XpGetPageDimensions(int display, int print_context, short[] width, short[] height, XRectangle reproducible_area);
3395public static final int XpGetPageDimensions(int display, int print_context, short[] width, short[] height, XRectangle reproducible_area) {
3396    lock.lock();
3397    try {
3398        return _XpGetPageDimensions(display, print_context, width, height, reproducible_area);
3399    } finally {
3400        lock.unlock();
3401    }
3402}
3403public static final native int _XpGetPrinterList(int display, byte[] printer_name, int[] list_count);
3404public static final int XpGetPrinterList(int display, byte[] printer_name, int[] list_count) {
3405    lock.lock();
3406    try {
3407        return _XpGetPrinterList(display, printer_name, list_count);
3408    } finally {
3409        lock.unlock();
3410    }
3411}
3412public static final native int _XpGetScreenOfContext(int display, int print_context);
3413public static final int XpGetScreenOfContext(int display, int print_context) {
3414    lock.lock();
3415    try {
3416        return _XpGetScreenOfContext(display, print_context);
3417    } finally {
3418        lock.unlock();
3419    }
3420}
3421public static final native void _XpSetAttributes(int display, int print_context, byte type, byte[] pool, byte replacement_rule);
3422public static final void XpSetAttributes(int display, int print_context, byte type, byte[] pool, byte replacement_rule) {
3423    lock.lock();
3424    try {
3425        _XpSetAttributes(display, print_context, type, pool, replacement_rule);
3426    } finally {
3427        lock.unlock();
3428    }
3429}
3430public static final native void _XpSetContext(int display, int print_context);
3431public static final void XpSetContext(int display, int print_context) {
3432    lock.lock();
3433    try {
3434        _XpSetContext(display, print_context);
3435    } finally {
3436        lock.unlock();
3437    }
3438}
3439public static final native void _XpStartJob(int display, byte save_data);
3440public static final void XpStartJob(int display, byte save_data) {
3441    lock.lock();
3442    try {
3443        _XpStartJob(display, save_data);
3444    } finally {
3445        lock.unlock();
3446    }
3447}
3448public static final native void _XpStartPage(int display, int window);
3449public static final void XpStartPage(int display, int window) {
3450    lock.lock();
3451    try {
3452        _XpStartPage(display, window);
3453    } finally {
3454        lock.unlock();
3455    }
3456}
3457public static final native void _XtAddCallback(int widget, int callback_name, int callback, int client_data);
3458public static final void XtAddCallback(int widget, int callback_name, int callback, int client_data) {
3459    lock.lock();
3460    try {
3461        _XtAddCallback(widget, callback_name, callback, client_data);
3462    } finally {
3463        lock.unlock();
3464    }
3465}
3466public static final native void _XtAddEventHandler(int widget, int event_mask, boolean nonmaskable, int proc, int client_data);
3467public static final void XtAddEventHandler(int widget, int event_mask, boolean nonmaskable, int proc, int client_data) {
3468    lock.lock();
3469    try {
3470        _XtAddEventHandler(widget, event_mask, nonmaskable, proc, client_data);
3471    } finally {
3472        lock.unlock();
3473    }
3474}
3475public static final native void _XtAddExposureToRegion(int event, int region);
3476public static final void XtAddExposureToRegion(int event, int region) {
3477    lock.lock();
3478    try {
3479        _XtAddExposureToRegion(event, region);
3480    } finally {
3481        lock.unlock();
3482    }
3483}
3484public static final native int _XtAppAddInput(int app_context, int source, int condition, int proc, int client_data);
3485public static final int XtAppAddInput(int app_context, int source, int condition, int proc, int client_data) {
3486    lock.lock();
3487    try {
3488        return _XtAppAddInput(app_context, source, condition, proc, client_data);
3489    } finally {
3490        lock.unlock();
3491    }
3492}
3493public static final native int _XtAppAddTimeOut(int app_context, int interval, int proc, int client_data);
3494public static final int XtAppAddTimeOut(int app_context, int interval, int proc, int client_data) {
3495    lock.lock();
3496    try {
3497        return _XtAppAddTimeOut(app_context, interval, proc, client_data);
3498    } finally {
3499        lock.unlock();
3500    }
3501}
3502public static final native int _XtAppCreateShell(byte[] appName, byte[] appClass, int widgetClass, int display, int[] argList, int argCount);
3503public static final int XtAppCreateShell(byte[] appName, byte[] appClass, int widgetClass, int display, int[] argList, int argCount) {
3504    lock.lock();
3505    try {
3506        return _XtAppCreateShell(appName, appClass, widgetClass, display, argList, argCount);
3507    } finally {
3508        lock.unlock();
3509    }
3510}
3511public static final native int _XtAppGetSelectionTimeout(int appContext);
3512public static final int XtAppGetSelectionTimeout(int appContext) {
3513    lock.lock();
3514    try {
3515        return _XtAppGetSelectionTimeout(appContext);
3516    } finally {
3517        lock.unlock();
3518    }
3519}
3520public static final native void _XtAppNextEvent(int appContext, int event);
3521public static final void XtAppNextEvent(int appContext, int event) {
3522    lock.lock();
3523    try {
3524        _XtAppNextEvent(appContext, event);
3525    } finally {
3526        lock.unlock();
3527    }
3528}
3529public static final native boolean _XtAppPeekEvent(int appContext, int event);
3530public static final boolean XtAppPeekEvent(int appContext, int event) {
3531    lock.lock();
3532    try {
3533        return _XtAppPeekEvent(appContext, event);
3534    } finally {
3535        lock.unlock();
3536    }
3537}
3538public static final native int _XtAppPending(int appContext);
3539public static final int XtAppPending(int appContext) {
3540    lock.lock();
3541    try {
3542        return _XtAppPending(appContext);
3543    } finally {
3544        lock.unlock();
3545    }
3546}
3547public static final native void _XtAppProcessEvent(int appContext, int inputMask);
3548public static final void XtAppProcessEvent(int appContext, int inputMask) {
3549    lock.lock();
3550    try {
3551        _XtAppProcessEvent(appContext, inputMask);
3552    } finally {
3553        lock.unlock();
3554    }
3555}
3556public static final native int _XtAppSetErrorHandler(int app_context, int handler);
3557public static final int XtAppSetErrorHandler(int app_context, int handler) {
3558    lock.lock();
3559    try {
3560        return _XtAppSetErrorHandler(app_context, handler);
3561    } finally {
3562        lock.unlock();
3563    }
3564}
3565public static final native void _XtAppSetFallbackResources(int app_context, int specification_list);
3566public static final void XtAppSetFallbackResources(int app_context, int specification_list) {
3567    lock.lock();
3568    try {
3569        _XtAppSetFallbackResources(app_context, specification_list);
3570    } finally {
3571        lock.unlock();
3572    }
3573}
3574public static final native void _XtAppSetSelectionTimeout(int appContext, int timeout);
3575public static final void XtAppSetSelectionTimeout(int appContext, int timeout) {
3576    lock.lock();
3577    try {
3578        _XtAppSetSelectionTimeout(appContext, timeout);
3579    } finally {
3580        lock.unlock();
3581    }
3582}
3583public static final native int _XtAppSetWarningHandler(int app_context, int handler);
3584public static final int XtAppSetWarningHandler(int app_context, int handler) {
3585    lock.lock();
3586    try {
3587        return _XtAppSetWarningHandler(app_context, handler);
3588    } finally {
3589        lock.unlock();
3590    }
3591}
3592public static final native int _XtBuildEventMask(int widget);
3593public static final int XtBuildEventMask(int widget) {
3594    lock.lock();
3595    try {
3596        return _XtBuildEventMask(widget);
3597    } finally {
3598        lock.unlock();
3599    }
3600}
3601public static final native void _XtCallActionProc(int widget, byte[] action, int event, int[] params, int num_params);
3602public static final void XtCallActionProc(int widget, byte[] action, int event, int[] params, int num_params) {
3603    lock.lock();
3604    try {
3605        _XtCallActionProc(widget, action, event, params, num_params);
3606    } finally {
3607        lock.unlock();
3608    }
3609}
3610public static final native int _XtClass(int widget);
3611public static final int XtClass(int widget) {
3612    lock.lock();
3613    try {
3614        return _XtClass(widget);
3615    } finally {
3616        lock.unlock();
3617    }
3618}
3619public static final native void _XtConfigureWidget(int widget, int x, int y, int width, int height, int borderWidth);
3620public static final void XtConfigureWidget(int widget, int x, int y, int width, int height, int borderWidth) {
3621    lock.lock();
3622    try {
3623        _XtConfigureWidget(widget, x, y, width, height, borderWidth);
3624    } finally {
3625        lock.unlock();
3626    }
3627}
3628public static final native int _XtCreateApplicationContext();
3629public static final int XtCreateApplicationContext() {
3630    lock.lock();
3631    try {
3632        return _XtCreateApplicationContext();
3633    } finally {
3634        lock.unlock();
3635    }
3636}
3637public static final native int _XtCreatePopupShell(byte[] name, int widgetClass, int parent, int[] argList, int argCount);
3638public static final int XtCreatePopupShell(byte[] name, int widgetClass, int parent, int[] argList, int argCount) {
3639    lock.lock();
3640    try {
3641        return _XtCreatePopupShell(name, widgetClass, parent, argList, argCount);
3642    } finally {
3643        lock.unlock();
3644    }
3645}
3646public static final native void _XtDestroyApplicationContext(int appContext);
3647public static final void XtDestroyApplicationContext(int appContext) {
3648    lock.lock();
3649    try {
3650        _XtDestroyApplicationContext(appContext);
3651    } finally {
3652        lock.unlock();
3653    }
3654}
3655public static final native void _XtDestroyWidget(int widget);
3656public static final void XtDestroyWidget(int widget) {
3657    lock.lock();
3658    try {
3659        _XtDestroyWidget(widget);
3660    } finally {
3661        lock.unlock();
3662    }
3663}
3664public static final native void _XtDisownSelection(int w, int selection, int time);
3665public static final void XtDisownSelection(int w, int selection, int time) {
3666    lock.lock();
3667    try {
3668        _XtDisownSelection(w, selection, time);
3669    } finally {
3670        lock.unlock();
3671    }
3672}
3673public static final native boolean _XtDispatchEvent(int event);
3674public static final boolean XtDispatchEvent(int event) {
3675    lock.lock();
3676    try {
3677        return _XtDispatchEvent(event);
3678    } finally {
3679        lock.unlock();
3680    }
3681}
3682public static final native int _XtDisplay(int widget);
3683public static final int XtDisplay(int widget) {
3684    lock.lock();
3685    try {
3686        return _XtDisplay(widget);
3687    } finally {
3688        lock.unlock();
3689    }
3690}
3691public static final native int _XtDisplayToApplicationContext(int display);
3692public static final int XtDisplayToApplicationContext(int display) {
3693    lock.lock();
3694    try {
3695        return _XtDisplayToApplicationContext(display);
3696    } finally {
3697        lock.unlock();
3698    }
3699}
3700public static final native void _XtFree(int ptr);
3701public static final void XtFree(int ptr) {
3702    lock.lock();
3703    try {
3704        _XtFree(ptr);
3705    } finally {
3706        lock.unlock();
3707    }
3708}
3709public static final native int _XtGetMultiClickTime(int display);
3710public static final int XtGetMultiClickTime(int display) {
3711    lock.lock();
3712    try {
3713        return _XtGetMultiClickTime(display);
3714    } finally {
3715        lock.unlock();
3716    }
3717}
3718public static final native void _XtGetSelectionValue(int w, int selection, int target, int callback, int client_data, int time);
3719public static final void XtGetSelectionValue(int w, int selection, int target, int callback, int client_data, int time) {
3720    lock.lock();
3721    try {
3722        _XtGetSelectionValue(w, selection, target, callback, client_data, time);
3723    } finally {
3724        lock.unlock();
3725    }
3726}
3727public static final native void _XtGetValues(int widget, int[] argList, int numArgs);
3728public static final void XtGetValues(int widget, int[] argList, int numArgs) {
3729    lock.lock();
3730    try {
3731        _XtGetValues(widget, argList, numArgs);
3732    } finally {
3733        lock.unlock();
3734    }
3735}
3736public static final native void _XtInsertEventHandler(int w, int event_mask, boolean nonmaskable, int proc, int client_data, int position);
3737public static final void XtInsertEventHandler(int w, int event_mask, boolean nonmaskable, int proc, int client_data, int position) {
3738    lock.lock();
3739    try {
3740        _XtInsertEventHandler(w, event_mask, nonmaskable, proc, client_data, position);
3741    } finally {
3742        lock.unlock();
3743    }
3744}
3745public static final native boolean _XtIsManaged(int widget);
3746public static final boolean XtIsManaged(int widget) {
3747    lock.lock();
3748    try {
3749        return _XtIsManaged(widget);
3750    } finally {
3751        lock.unlock();
3752    }
3753}
3754public static final native boolean _XtIsRealized(int widget);
3755public static final boolean XtIsRealized(int widget) {
3756    lock.lock();
3757    try {
3758        return _XtIsRealized(widget);
3759    } finally {
3760        lock.unlock();
3761    }
3762}
3763public static final native boolean _XtIsSubclass(int widget, int widgetClass);
3764public static final boolean XtIsSubclass(int widget, int widgetClass) {
3765    lock.lock();
3766    try {
3767        return _XtIsSubclass(widget, widgetClass);
3768    } finally {
3769        lock.unlock();
3770    }
3771}
3772public static final native boolean _XtIsTopLevelShell(int widget);
3773public static final boolean XtIsTopLevelShell(int widget) {
3774    lock.lock();
3775    try {
3776        return _XtIsTopLevelShell(widget);
3777    } finally {
3778        lock.unlock();
3779    }
3780}
3781public static final native int _XtLastTimestampProcessed(int display);
3782public static final int XtLastTimestampProcessed(int display) {
3783    lock.lock();
3784    try {
3785        return _XtLastTimestampProcessed(display);
3786    } finally {
3787        lock.unlock();
3788    }
3789}
3790public static final native int _XtMalloc(int size);
3791public static final int XtMalloc(int size) {
3792    lock.lock();
3793    try {
3794        return _XtMalloc(size);
3795    } finally {
3796        lock.unlock();
3797    }
3798}
3799public static final native void _XtManageChild(int widget);
3800public static final void XtManageChild(int widget) {
3801    lock.lock();
3802    try {
3803        _XtManageChild(widget);
3804    } finally {
3805        lock.unlock();
3806    }
3807}
3808public static final native void _XtMapWidget(int widget);
3809public static final void XtMapWidget(int widget) {
3810    lock.lock();
3811    try {
3812        _XtMapWidget(widget);
3813    } finally {
3814        lock.unlock();
3815    }
3816}
3817public static final native void _XtMoveWidget(int widget, int x, int y);
3818public static final void XtMoveWidget(int widget, int x, int y) {
3819    lock.lock();
3820    try {
3821        _XtMoveWidget(widget, x, y);
3822    } finally {
3823        lock.unlock();
3824    }
3825}
3826public static final native int _XtNameToWidget(int reference, byte[] names);
3827public static final int XtNameToWidget(int reference, byte[] names) {
3828    lock.lock();
3829    try {
3830        return _XtNameToWidget(reference, names);
3831    } finally {
3832        lock.unlock();
3833    }
3834}
3835public static final native int _XtOpenDisplay(int xtAppContext, byte[] displayName, byte[] applicationName, byte[] applicationClass, int options, int numOptions, int[] argc, int argv);
3836public static final int XtOpenDisplay(int xtAppContext, byte[] displayName, byte[] applicationName, byte[] applicationClass, int options, int numOptions, int[] argc, int argv) {
3837    lock.lock();
3838    try {
3839        return _XtOpenDisplay(xtAppContext, displayName, applicationName, applicationClass, options, numOptions, argc, argv);
3840    } finally {
3841        lock.unlock();
3842    }
3843}
3844public static final native void _XtOverrideTranslations(int w, int translations);
3845public static final void XtOverrideTranslations(int w, int translations) {
3846    lock.lock();
3847    try {
3848        _XtOverrideTranslations(w, translations);
3849    } finally {
3850        lock.unlock();
3851    }
3852}
3853public static final native boolean _XtOwnSelection(int w, int selection, int time, int convert_proc, int lose_selection, int done_proc);
3854public static final boolean XtOwnSelection(int w, int selection, int time, int convert_proc, int lose_selection, int done_proc) {
3855    lock.lock();
3856    try {
3857        return _XtOwnSelection(w, selection, time, convert_proc, lose_selection, done_proc);
3858    } finally {
3859        lock.unlock();
3860    }
3861}
3862public static final native int _XtParent(int widget);
3863public static final int XtParent(int widget) {
3864    lock.lock();
3865    try {
3866        return _XtParent(widget);
3867    } finally {
3868        lock.unlock();
3869    }
3870}
3871public static final native int _XtParseTranslationTable(byte[] string);
3872public static final int XtParseTranslationTable(byte[] string) {
3873    lock.lock();
3874    try {
3875        return _XtParseTranslationTable(string);
3876    } finally {
3877        lock.unlock();
3878    }
3879}
3880public static final native void _XtPopdown(int widget);
3881public static final void XtPopdown(int widget) {
3882    lock.lock();
3883    try {
3884        _XtPopdown(widget);
3885    } finally {
3886        lock.unlock();
3887    }
3888}
3889public static final native void _XtPopup(int widget, int flags);
3890public static final void XtPopup(int widget, int flags) {
3891    lock.lock();
3892    try {
3893        _XtPopup(widget, flags);
3894    } finally {
3895        lock.unlock();
3896    }
3897}
3898public static final native int _XtQueryGeometry(int widget, XtWidgetGeometry intended, XtWidgetGeometry preferred_return);
3899public static final int XtQueryGeometry(int widget, XtWidgetGeometry intended, XtWidgetGeometry preferred_return) {
3900    lock.lock();
3901    try {
3902        return _XtQueryGeometry(widget, intended, preferred_return);
3903    } finally {
3904        lock.unlock();
3905    }
3906}
3907public static final native void _XtRealizeWidget(int widget);
3908public static final void XtRealizeWidget(int widget) {
3909    lock.lock();
3910    try {
3911        _XtRealizeWidget(widget);
3912    } finally {
3913        lock.unlock();
3914    }
3915}
3916public static final native void _XtRegisterDrawable(int display, int drawable, int widget);
3917public static final void XtRegisterDrawable(int display, int drawable, int widget) {
3918    lock.lock();
3919    try {
3920        _XtRegisterDrawable(display, drawable, widget);
3921    } finally {
3922        lock.unlock();
3923    }
3924}
3925public static final native void _XtRemoveEventHandler(int widget, int event_mask, boolean nonmaskable, int proc, int client_data);
3926public static final void XtRemoveEventHandler(int widget, int event_mask, boolean nonmaskable, int proc, int client_data) {
3927    lock.lock();
3928    try {
3929        _XtRemoveEventHandler(widget, event_mask, nonmaskable, proc, client_data);
3930    } finally {
3931        lock.unlock();
3932    }
3933}
3934public static final native void _XtRemoveInput(int id);
3935public static final void XtRemoveInput(int id) {
3936    lock.lock();
3937    try {
3938        _XtRemoveInput(id);
3939    } finally {
3940        lock.unlock();
3941    }
3942}
3943public static final native void _XtRemoveTimeOut(int id);
3944public static final void XtRemoveTimeOut(int id) {
3945    lock.lock();
3946    try {
3947        _XtRemoveTimeOut(id);
3948    } finally {
3949        lock.unlock();
3950    }
3951}
3952public static final native void _XtResizeWidget(int widget, int width, int height, int borderWidth);
3953public static final void XtResizeWidget(int widget, int width, int height, int borderWidth) {
3954    lock.lock();
3955    try {
3956        _XtResizeWidget(widget, width, height, borderWidth);
3957    } finally {
3958        lock.unlock();
3959    }
3960}
3961public static final native void _XtResizeWindow(int widget);
3962public static final void XtResizeWindow(int widget) {
3963    lock.lock();
3964    try {
3965        _XtResizeWindow(widget);
3966    } finally {
3967        lock.unlock();
3968    }
3969}
3970public static final native int _XtSetLanguageProc(int appContext, int languageProc, int pointer);
3971public static final int XtSetLanguageProc(int appContext, int languageProc, int pointer) {
3972    lock.lock();
3973    try {
3974        return _XtSetLanguageProc(appContext, languageProc, pointer);
3975    } finally {
3976        lock.unlock();
3977    }
3978}
3979public static final native void _XtSetMappedWhenManaged(int widget, boolean flag);
3980public static final void XtSetMappedWhenManaged(int widget, boolean flag) {
3981    lock.lock();
3982    try {
3983        _XtSetMappedWhenManaged(widget, flag);
3984    } finally {
3985        lock.unlock();
3986    }
3987}
3988public static final native void _XtSetValues(int widget, int[] argList, int numArgs);
3989public static final void XtSetValues(int widget, int[] argList, int numArgs) {
3990    lock.lock();
3991    try {
3992        _XtSetValues(widget, argList, numArgs);
3993    } finally {
3994        lock.unlock();
3995    }
3996}
3997public static final native void _XtToolkitInitialize();
3998public static final void XtToolkitInitialize() {
3999    lock.lock();
4000    try {
4001        _XtToolkitInitialize();
4002    } finally {
4003        lock.unlock();
4004    }
4005}
4006public static final native boolean _XtToolkitThreadInitialize();
4007public static final boolean XtToolkitThreadInitialize() {
4008    lock.lock();
4009    try {
4010        return _XtToolkitThreadInitialize();
4011    } finally {
4012        lock.unlock();
4013    }
4014}
4015public static final native void _XtTranslateCoords(int widget, short x, short y, short[] root_x, short[] root_y);
4016public static final void XtTranslateCoords(int widget, short x, short y, short[] root_x, short[] root_y) {
4017    lock.lock();
4018    try {
4019        _XtTranslateCoords(widget, x, y, root_x, root_y);
4020    } finally {
4021        lock.unlock();
4022    }
4023}
4024public static final native void _XtUnmanageChild(int widget);
4025public static final void XtUnmanageChild(int widget) {
4026    lock.lock();
4027    try {
4028        _XtUnmanageChild(widget);
4029    } finally {
4030        lock.unlock();
4031    }
4032}
4033public static final native void _XtUnmapWidget(int widget);
4034public static final void XtUnmapWidget(int widget) {
4035    lock.lock();
4036    try {
4037        _XtUnmapWidget(widget);
4038    } finally {
4039        lock.unlock();
4040    }
4041}
4042public static final native void _XtUnregisterDrawable(int display, int drawable);
4043public static final void XtUnregisterDrawable(int display, int drawable) {
4044    lock.lock();
4045    try {
4046        _XtUnregisterDrawable(display, drawable);
4047    } finally {
4048        lock.unlock();
4049    }
4050}
4051public static final native int _XtWindow(int widget);
4052public static final int XtWindow(int widget) {
4053    lock.lock();
4054    try {
4055        return _XtWindow(widget);
4056    } finally {
4057        lock.unlock();
4058    }
4059}
4060public static final native int _XtWindowToWidget(int display, int widget);
4061public static final int XtWindowToWidget(int display, int widget) {
4062    lock.lock();
4063    try {
4064        return _XtWindowToWidget(display, widget);
4065    } finally {
4066        lock.unlock();
4067    }
4068}
4069public static final native void __XmSetMenuTraversal(int menu, boolean traversal);
4070public static final void _XmSetMenuTraversal(int menu, boolean traversal) {
4071    lock.lock();
4072    try {
4073        __XmSetMenuTraversal(menu, traversal);
4074    } finally {
4075        lock.unlock();
4076    }
4077}
4078public static final native int close(int filedes);
4079public static final native int fd_set_sizeof();
4080public static final native int getenv(byte[] name);
4081public static final native int iconv(int cd, int[] inBuf, int[] inBytesLeft, int[] outBuf, int[] outBytesLeft);
4082public static final native int iconv_close(int cd);
4083public static final native int iconv_open(byte[] tocode, byte[] fromcode);
4084public static final native int localeconv_decimal_point();
4085public static final native void memmove(int dest, XImage src, int count);
4086public static final native void memmove(int dest, XmDragProcCallbackStruct src, int count);
4087public static final native void memmove(int dest, XmSpinBoxCallbackStruct src, int count);
4088public static final native void memmove(int dest, XmTextBlockRec src, int count);
4089public static final native void memmove(int dest, XmTextVerifyCallbackStruct src, int count);
4090public static final native void memmove(int dest, byte[] src, int count);
4091public static final native void memmove(int dest, char[] src, int count);
4092public static final native void memmove(int dest, int[] src, int count);
4093public static final native void memmove(Visual dest, int src, int count);
4094public static final native void memmove(XAnyEvent dest, int src, int count);
4095public static final native void memmove(XButtonEvent dest, int src, int count);
4096public static final native void memmove(int dest, XButtonEvent src, int count);
4097public static final native void memmove(XCharStruct dest, int src, int count);
4098public static final native void memmove(XClientMessageEvent dest, int src, int count);
4099public static final native void memmove(XConfigureEvent dest, int src, int count);
4100public static final native void memmove(XCreateWindowEvent dest, int src, int count);
4101public static final native void memmove(XCrossingEvent dest, int src, int count);
4102public static final native void memmove(XDestroyWindowEvent dest, int src, int count);
4103public static final native void memmove(XExposeEvent dest, int src, int count);
4104public static final native void memmove(XFocusChangeEvent dest, int src, int count);
4105public static final native void memmove(XFontStruct dest, int src, int count);
4106public static final native void memmove(XImage dest, int src, int count);
4107public static final native void memmove(XineramaScreenInfo dest, int src, int count);
4108public static final native void memmove(XKeyEvent dest, int src, int count);
4109public static final native void memmove(XEvent dest, int src, int count);
4110public static final native void memmove(XModifierKeymap dest, int src, int count);
4111public static final native void memmove(XMotionEvent dest, int src, int count);
4112public static final native void memmove(XPropertyEvent dest, int src, int count);
4113public static final native void memmove(XReparentEvent dest, int src, int count);
4114public static final native void memmove(XmAnyCallbackStruct dest, int src, int count);
4115public static final native void memmove(XmDragProcCallbackStruct dest, int src, int count);
4116public static final native void memmove(XmDropFinishCallbackStruct dest, int src, int count);
4117public static final native void memmove(XmDropProcCallbackStruct dest, int src, int count);
4118public static final native void memmove(XmSpinBoxCallbackStruct dest, int src, int count);
4119public static final native void memmove(XmTextBlockRec dest, int src, int count);
4120public static final native void memmove(XmTextVerifyCallbackStruct dest, int src, int count);
4121public static final native void memmove(byte[] dest, int src, int count);
4122public static final native void memmove(char[] dest, int src, int count);
4123public static final native void memmove(int[] dest, int src, int count);
4124public static final native void memmove(int dest, short[] src, int count);
4125public static final native void memmove(int dest, XExposeEvent src, int count);
4126public static final native void memmove(int dest, XClientMessageEvent src, int count);
4127public static final native void memmove(int dest, XConfigureEvent src, int count);
4128public static final native void memmove(int dest, XKeyEvent src, int count);
4129public static final native void memmove(XIconSize dest, int src, int count);
4130public static final native int nl_langinfo(int item);
4131public static final native int pipe(int[] filedes);
4132public static final native int read(int filedes, byte[] buf, int nbyte);
4133public static final native int select(int n, byte[] readfds, byte[] writefds, byte[] exceptfds, int[] timeout);
4134public static final native int setlocale(int category, byte[] locale);
4135public static final native int strlen(int string);
4136public static final native int write(int filedes, byte[] buf, int nbyte);
4137
4138}
4139
Popular Tags