0N/A/*
2362N/A * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage sun.awt.X11;
0N/A
0N/Aimport java.security.AccessController;
0N/Aimport java.security.PrivilegedAction;
5255N/Aimport sun.security.action.GetPropertyAction;
0N/Aimport sun.misc.*;
0N/A
216N/Afinal public class XlibWrapper
0N/A{
0N/A static Unsafe unsafe = Unsafe.getUnsafe();
0N/A // strange constants
0N/A static final int MAXSIZE = 32767;
0N/A static final int MINSIZE = 1;
0N/A
0N/A // define a private constructor here to prevent this class and all
0N/A // its descendants from being created
0N/A private XlibWrapper()
0N/A {
0N/A }
0N/A
0N/A/*
0N/A Display *XOpenDisplay(display_name)
0N/A char *display_name;
0N/A
0N/A*/
0N/A public final static String eventToString[]=
0N/A {"<none:0>", "<none:1>", "KeyPress", "KeyRelease", "ButtonPress", "ButtonRelease",
0N/A "MotionNotify", "EnterNotify", "LeaveNotify", "FocusIn", "FocusOut",
0N/A "KeymapNotify", "Expose", "GraphicsExpose", "NoExpose", "VisibilityNotify",
0N/A "CreateNotify", "DestroyNotify", "UnmapNotify", "MapNotify", "MapRequest",
0N/A "ReparentNotify", "ConfigureNotify", "ConfigureRequest", "GravityNotify",
0N/A "ResizeRequest", "CirculateNotify", "CirculateRequest", "PropertyNotify",
0N/A "SelectionClear", "SelectionRequest", "SelectionNotify", "ColormapNotify",
0N/A "ClientMessage", "MappingNotify", "LASTEvent"};
0N/A
0N/A static native void XFree(long ptr);
0N/A static native void memcpy(long dest_ptr, long src_ptr, long length);
0N/A static native long getAddress(Object o);
0N/A static native void copyIntArray(long dest_ptr, Object array, int size_bytes);
0N/A static native void copyLongArray(long dest_ptr, Object array, int size_bytes);
0N/A
0N/A /**
0N/A * Gets byte string from str_ptr and copies it into byte array
0N/A * String should be NULL terminated
0N/A */
0N/A static native byte[] getStringBytes(long str_ptr);
0N/A
0N/A static native long XOpenDisplay(long display);
0N/A
0N/A static native void XCloseDisplay(long display);
0N/A
0N/A static native long XDisplayString(long display);
0N/A
0N/A static native void XSetCloseDownMode(long display, int close_mode);
0N/A
0N/A static native long DefaultScreen(long display);
0N/A
0N/A static native long ScreenOfDisplay(long display, long screen_number);
0N/A
0N/A static native int DoesBackingStore(long screen);
0N/A
0N/A static native long DisplayWidth(long display, long screen);
0N/A static native long DisplayWidthMM(long display, long screen);
0N/A
0N/A static native long DisplayHeight(long display, long screen);
0N/A static native long DisplayHeightMM(long display, long screen);
0N/A
0N/A static native long RootWindow(long display, long screen_number);
0N/A static native int ScreenCount(long display);
0N/A
0N/A
0N/A/*
0N/A Window XCreateWindow(display, parent, x, y, width, height,
0N/A border_width, depth,
0N/A class, visual, valuemask, attributes)
0N/A Display *display;
0N/A Window parent;
0N/A int x, y;
0N/A unsigned int width, height;
0N/A unsigned int border_width;
0N/A int depth;
0N/A unsigned int class;
0N/A Visual *visual
0N/A unsigned long valuemask;
0N/A XSetWindowAttributes *attributes;
0N/A*/
0N/A
0N/A static native long XCreateWindow(long display, long parent, int x,int y, int width, int height, int border_width, int depth, long wclass, long visual, long valuemask, long attributes);
0N/A
0N/A static native void XDestroyWindow(long display, long window);
0N/A
0N/A static native int XGrabPointer(long display, long grab_window,
0N/A int owner_events, int event_mask, int pointer_mode,
0N/A int keyboard_mode, long confine_to, long cursor, long time);
0N/A
0N/A static native void XUngrabPointer(long display, long time);
0N/A
0N/A static native int XGrabKeyboard(long display, long grab_window,
0N/A int owner_events, int pointer_mode,
0N/A int keyboard_mode, long time);
0N/A
0N/A static native void XUngrabKeyboard(long display, long time);
0N/A
0N/A static native void XGrabServer(long display);
0N/A static native void XUngrabServer(long display);
0N/A
0N/A/*
0N/A
0N/Avoid XSetWMProperties(display, w, window_name, icon_name,
0N/Aargv, argc, normal_hints, wm_hints, class_hints)
0N/ADisplay *display;
0N/AWindow w;
0N/AXTextProperty *window_name;
0N/AXTextProperty *icon_name;
0N/Achar **argv;
0N/Aint argc;
0N/AXSizeHints *normal_hints;
0N/AXWMHints *wm_hints;
0N/AXClassHint *class_hints;
0N/A*/
0N/A
0N/A/*
0N/A
0N/AXMapWindow(display, w)
0N/ADisplay *display;
0N/AWindow w;
0N/A*/
0N/A
0N/A static native void XMapWindow(long display, long window);
0N/A static native void XMapRaised(long display, long window);
0N/A static native void XRaiseWindow(long display, long window);
0N/A
0N/A static native void XLowerWindow(long display, long window);
0N/A static native void XRestackWindows(long display, long windows, int length);
1066N/A static native void XConfigureWindow(long display, long window,
1066N/A long value_mask, long values);
0N/A static native void XSetInputFocus(long display, long window);
0N/A static native void XSetInputFocus2(long display, long window, long time);
0N/A static native long XGetInputFocus(long display);
0N/A
0N/A/*
0N/A
0N/AXUnmapWindow(display, w)
0N/ADisplay *display;
0N/AWindow w;
0N/A*/
0N/A
0N/A static native void XUnmapWindow(long display, long window);
0N/A
0N/A
0N/A
0N/A
0N/A/*
0N/A XSelectInput(display, w, event_mask)
0N/A Display *display;
0N/A Window w;
0N/A long event_mask;
0N/A
0N/A*/
0N/A static native void XSelectInput(long display, long window, long event_mask);
0N/A
0N/A /*
0N/A XNextEvent(display, event_return)
0N/A Display *display;
0N/A XEvent *event_return;
0N/A
0N/A */
0N/A
0N/A static native void XNextEvent(long display,long ptr);
0N/A
0N/A /*
0N/A XMaskEvent(display, event_mask, event_return)
0N/A Display *display;
0N/A long event_mask;
0N/A XEvent *event_return;
0N/A */
0N/A static native void XMaskEvent(long display, long event_mask, long event_return);
0N/A
0N/A static native void XWindowEvent(long display, long window, long event_mask, long event_return);
0N/A
0N/A /*
0N/A Bool XFilterEvent(event, w)
0N/A XEvent *event;
0N/A Window w;
0N/A */
0N/A static native boolean XFilterEvent(long ptr, long window);
0N/A
0N/A/*
0N/A Bool XSupportsLocale()
0N/A*/
0N/Astatic native boolean XSupportsLocale();
0N/A
0N/A/*
0N/A char *XSetLocaleModifiers(modifier_list)
0N/A char *modifier_list;
0N/A*/
0N/Astatic native String XSetLocaleModifiers(String modifier_list);
0N/A
0N/A
0N/A static native int XTranslateCoordinates(
0N/A long display, long src_w, long dest_w,
0N/A long src_x, long src_y,
0N/A long dest_x_return, long dest_y_return,
0N/A long child_return);
0N/A
0N/A /*
0N/A XPeekEvent(display, event_return)
0N/A Display *display;
0N/A XEvent *event_return;
0N/A
0N/A */
0N/A
0N/A static native void XPeekEvent(long display,long ptr);
0N/A
0N/A/*
0N/A XFlush(display)
0N/A Display *display;
0N/A*/
0N/A
0N/A static native void XFlush(long display);
0N/A
0N/A/*
0N/A XSync(display, discard)
0N/A Display *display;
0N/A Bool discard;
0N/A*/
0N/A
0N/A static native void XSync(long display,int discard);
0N/A
0N/A
0N/A/* XMoveResizeWindow(display, w, x, y, width, height)
0N/A Display *display;
0N/A Window w;
0N/A int x, y;
0N/A unsigned int width, height;
0N/A*/
0N/A static native void XMoveResizeWindow(long display, long window, int x, int y, int width, int height);
0N/A static native void XResizeWindow(long display, long window, int width, int height);
0N/A static native void XMoveWindow(long display, long window, int x, int y);
0N/A
0N/A /*
0N/A Bool XQueryPointer(display, w, root_return, child_return,
0N/A root_x_return, root_y_return,
0N/A win_x_return, win_y_return,
0N/A mask_return)
0N/A Display *display;
0N/A Window w;
0N/A Window *root_return, *child_return;
0N/A int *root_x_return, *root_y_return;
0N/A int *win_x_return, *win_y_return;
0N/A unsigned int *mask_return;
0N/A*/
0N/A
0N/A static native boolean XQueryPointer (long display, long window, long root_return, long child_return, long root_x_return, long root_y_return, long win_x_return, long win_y_return, long mask_return);
0N/A
0N/A/* XFreeCursor(display, cursor)
0N/A Display *display;
0N/A Cursor cursor;
0N/A*/
0N/A
0N/A static native void XFreeCursor(long display, long cursor);
0N/A
0N/A/*
0N/A XSetWindowBackground(display, w, background_pixel)
0N/A Display *display;
0N/A Window w;
0N/A unsigned long background_pixel;
0N/A*/
0N/A
0N/A static native void XSetWindowBackground(long display, long window, long background_pixel);
0N/A
0N/A static native int XEventsQueued(long display, int mode);
0N/A
0N/A/*
0N/A Atom XInternAtom(display, atom_name, only_if_exists)
0N/A Display *display;
0N/A char *atom_name;
0N/A Bool only_if_exists;
0N/A*/
0N/A
0N/A static native int XInternAtoms(long display, String[] names, boolean only_if_exists, long atoms);
0N/A
0N/A static native void SetProperty(long display, long window, long atom, String str);
0N/A static native String GetProperty(long display ,long window, long atom);
0N/A static native long InternAtom(long display, String string, int only_if_exists);
0N/A static native int XGetWindowProperty(long display, long window, long atom,
0N/A long long_offset, long long_length,
0N/A long delete, long req_type, long actualy_type,
0N/A long actualy_format, long nitems_ptr,
0N/A long bytes_after, long data_ptr);
0N/A native static void XChangePropertyImpl(long display, long window, long atom,
0N/A long type, int format, int mode, long data,
0N/A int nelements);
0N/A static void XChangeProperty(long display, long window, long atom,
0N/A long type, int format, int mode, long data,
0N/A int nelements) {
0N/A // TODO: handling of XChangePropertyImpl return value, if not Success - don't cache
0N/A if (XPropertyCache.isCachingSupported() &&
0N/A XToolkit.windowToXWindow(window) != null &&
0N/A WindowPropertyGetter.isCacheableProperty(XAtom.get(atom)) &&
216N/A mode == XConstants.PropModeReplace)
0N/A {
0N/A int length = (format / 8) * nelements;
0N/A XPropertyCache.storeCache(
0N/A new XPropertyCache.PropertyCacheEntry(format,
0N/A nelements,
0N/A 0,
0N/A data,
0N/A length),
0N/A window,
0N/A XAtom.get(atom));
0N/A }
0N/A XChangePropertyImpl(display, window, atom, type, format, mode, data, nelements);
0N/A }
0N/A
0N/A static native void XChangePropertyS(long display, long window, long atom,
0N/A long type, int format, int mode, String value);
0N/A static native void XDeleteProperty(long display, long window, long atom);
0N/A
0N/A static native void XSetTransientFor(long display, long window, long transient_for_window);
0N/A static native void XSetWMHints(long display, long window, long wmhints);
0N/A static native void XGetWMHints(long display, long window, long wmhints);
0N/A static native long XAllocWMHints();
0N/A static native int XGetPointerMapping(long display, long map, int buttonNumber);
0N/A static native String XGetDefault(long display, String program, String option);
0N/A static native long getScreenOfWindow(long display, long window);
0N/A static native long XScreenNumberOfScreen(long screen);
0N/A static native int XIconifyWindow(long display, long window, long screenNumber);
0N/A static native String ServerVendor(long display);
0N/A static native int VendorRelease(long display);
1342N/A static native boolean IsXsunKPBehavior(long display);
1975N/A static native boolean IsSunKeyboard(long display);
1975N/A static native boolean IsKanaKeyboard(long display);
0N/A
0N/A static native void XBell(long display, int percent);
0N/A
0N/A /*
0N/A Cursor XCreateFontCursor(display, shape)
0N/A Display *display;
0N/A unsigned int shape;
0N/A
0N/A we always pass int as shape param.
0N/A perhaps later we will need to change type of shape to long.
0N/A*/
0N/A
0N/A static native int XCreateFontCursor(long display, int shape);
0N/A
0N/A/*
0N/A Pixmap XCreateBitmapFromData(display, d, data, width,
0N/A height)
0N/A Display *display;
0N/A Drawable d;
0N/A char *data;
0N/A unsigned int width, height;
0N/A*/
0N/A
0N/A static native long XCreateBitmapFromData(long display, long drawable, long data, int width, int height);
0N/A
0N/A /*
0N/A XFreePixmap(display, pixmap)
0N/A Display *display;
0N/A Pixmap pixmap;
0N/A */
0N/A
0N/A static native void XFreePixmap(long display, long pixmap);
0N/A
0N/A /*
0N/A Cursor XCreatePixmapCursor(display, source, mask,
0N/A foreground_color, background_color, x, y)
0N/A Display *display;
0N/A Pixmap source;
0N/A Pixmap mask;
0N/A XColor *foreground_color;
0N/A XColor *background_color;
0N/A unsigned int x, y;
0N/A */
0N/A static native long XCreatePixmapCursor(long display, long source, long mask, long fore, long back, int x, int y);
0N/A
0N/A
0N/A /*
0N/A Status XQueryBestCursor(display, d, width, height,
0N/A width_return, height_return)
0N/A Display *display;
0N/A Drawable d;
0N/A unsigned int width, height;
0N/A unsigned int *width_return, *height_return;
0N/A
0N/A */
0N/A
0N/A static native boolean XQueryBestCursor(long display, long drawable, int width, int height, long width_return, long height_return);
0N/A
0N/A
0N/A /*
0N/A Status XAllocColor(display, colormap, screen_in_out)
0N/A Display *display;
0N/A Colormap colormap;
0N/A XColor *screen_in_out;
0N/A */
0N/A
0N/A static native boolean XAllocColor( long display, long colormap, long screen_in_out);
0N/A
0N/A
0N/A static native long SetToolkitErrorHandler();
0N/A static native void XSetErrorHandler(long handler);
0N/A static native int CallErrorHandler(long handler, long display, long event_ptr);
0N/A
0N/A /*
0N/A XChangeWindowAttributes(display, w, valuemask, attributes)
0N/A Display *display;
0N/A Window w;
0N/A unsigned long valuemask;
0N/A XSetWindowAttributes *attributes;
0N/A */
0N/A
0N/A static native void XChangeWindowAttributes(long display, long window, long valuemask, long attributes);
0N/A static native int XGetWindowAttributes(long display, long window, long attr_ptr);
0N/A static native int XGetGeometry(long display, long drawable, long root_return, long x_return, long y_return,
0N/A long width_return, long height_return, long border_width_return, long depth_return);
0N/A
0N/A static native int XGetWMNormalHints(long display, long window, long hints, long supplied_return);
0N/A static native void XSetWMNormalHints(long display, long window, long hints);
0N/A static native void XSetMinMaxHints(long display, long window, int x, int y, int width, int height, long flags);
0N/A static native long XAllocSizeHints();
0N/A
0N/A static native int XSendEvent(long display, long window, boolean propagate, long event_mask, long event);
0N/A static native void XPutBackEvent(long display, long event);
0N/A static native int XQueryTree(long display, long window, long root_return, long parent_return, long children_return, long nchildren_return);
0N/A static native long XGetVisualInfo(long display, long vinfo_mask, long vinfo_template, long nitems_return);
0N/A static native void XReparentWindow(long display, long window, long parent, int x, int y);
0N/A
0N/A static native void XConvertSelection(long display, long selection,
0N/A long target, long property,
0N/A long requestor, long time);
0N/A
0N/A static native void XSetSelectionOwner(long display, long selection,
0N/A long owner, long time);
0N/A
0N/A static native long XGetSelectionOwner(long display, long selection);
0N/A
0N/A static native String XGetAtomName(long display, long atom);
0N/A
0N/A static native long XMaxRequestSize(long display);
0N/A
0N/A
0N/A static native long XCreatePixmap(long display, long drawable, int width, int height, int depth);
0N/A static native long XCreateImage(long display, long visual_ptr, int depth, int format,
0N/A int offset, long data, int width, int height, int bitmap_pad,
0N/A int bytes_per_line);
0N/A static native void XDestroyImage(long image);
0N/A static native void XPutImage(long display, long drawable, long gc, long image,
0N/A int src_x, int src_y, int dest_x, int dest_y,
0N/A int width, int height);
0N/A static native long XCreateGC(long display, long drawable, long valuemask, long values);
0N/A static native void XFreeGC(long display, long gc);
0N/A static native void XSetWindowBackgroundPixmap(long display, long window, long pixmap);
0N/A static native void XClearWindow(long display, long window);
0N/A static native int XGetIconSizes(long display, long window, long ret_sizes, long ret_count);
0N/A static native int XdbeQueryExtension(long display, long major_version_return,
0N/A long minor_version_return);
0N/A static native boolean XQueryExtension(long display, String name, long mop_return,
0N/A long feve_return, long err_return);
0N/A static native boolean IsKeypadKey(long keysym);
0N/A static native long XdbeAllocateBackBufferName(long display, long window, int swap_action);
0N/A static native int XdbeDeallocateBackBufferName(long display, long buffer);
0N/A static native int XdbeBeginIdiom(long display);
0N/A static native int XdbeEndIdiom(long display);
0N/A static native int XdbeSwapBuffers(long display, long swap_info, int num_windows);
0N/A
874N/A static native void XQueryKeymap(long display, long vector);
0N/A static native long XKeycodeToKeysym(long display, int keycode, int index);
0N/A
0N/A static native int XKeysymToKeycode(long display, long keysym);
0N/A
1067N/A // xkb-related
1067N/A static native int XkbGetEffectiveGroup(long display);
1067N/A static native long XkbKeycodeToKeysym(long display, int keycode, int group, int level);
1067N/A static native void XkbSelectEvents(long display, long device, long bits_to_change, long values_for_bits);
1067N/A static native void XkbSelectEventDetails(long display, long device, long event_type,
1067N/A long bits_to_change, long values_for_bits);
1067N/A static native boolean XkbQueryExtension(long display, long opcode_rtrn, long event_rtrn,
1067N/A long error_rtrn, long major_in_out, long minor_in_out);
1067N/A static native boolean XkbLibraryVersion(long lib_major_in_out, long lib_minor_in_out);
1067N/A static native long XkbGetMap(long display, long which, long device_spec);
1067N/A static native long XkbGetUpdatedMap(long display, long which, long xkb);
1067N/A static native void XkbFreeKeyboard(long xkb, long which, boolean free_all);
1067N/A static native boolean XkbTranslateKeyCode(long xkb, int keycode, long mods, long mods_rtrn, long keysym_rtrn);
1067N/A
1067N/A
0N/A static native void XConvertCase(long keysym,
0N/A long keysym_lowercase,
0N/A long keysym_uppercase);
0N/A
0N/A static native long XGetModifierMapping(long display);
1975N/A static native void XFreeModifiermap(long keymap);
1975N/A static native void XRefreshKeyboardMapping(long event);
0N/A
0N/A
0N/A static native void XChangeActivePointerGrab(long display, int mask,
0N/A long cursor, long time);
0N/A
0N/A /*
0N/A int (*XSynchronize(Display *display, Bool onoff))();
0N/A display Specifies the connection to the X server.
0N/A onoff Specifies a Boolean value that indicates whether to enable or disable synchronization.
0N/A */
0N/A public static native int XSynchronize(long display, boolean onoff);
0N/A
0N/A /**
0N/A * Extracts an X event that can be processed in a secondary loop.
0N/A * Should only be called on the toolkit thread.
0N/A * Returns false if this secondary event was terminated.
0N/A */
0N/A static native boolean XNextSecondaryLoopEvent(long display, long ptr);
0N/A /**
0N/A * Terminates the topmost secondary loop (if any).
0N/A * Should never be called on the toolkit thread.
0N/A */
0N/A static native void ExitSecondaryLoop();
0N/A
0N/A /**
0N/A * Calls XTextPropertyToStringList on the specified byte array and returns
0N/A * the array of strings.
0N/A */
0N/A static native String[] XTextPropertyToStringList(byte[] bytes, long encoding_atom);
0N/A
0N/A /**
0N/A * XSHAPE extension support.
0N/A */
0N/A static native boolean XShapeQueryExtension(long display, long event_base_return, long error_base_return);
0N/A static native void SetRectangularShape(long display, long window,
0N/A int lox, int loy, int hix, int hiy,
0N/A sun.java2d.pipe.Region region);
1066N/A /** Each int in the bitmap array is one pixel with a 32-bit color:
1066N/A * R, G, B, and Alpha.
1066N/A */
1066N/A static native void SetBitmapShape(long display, long window,
1066N/A int width, int height, int[] bitmap);
1066N/A
1056N/A static native void SetZOrder(long display, long window, long above);
0N/A
0N/A/* Global memory area used for X lib parameter passing */
0N/A
0N/A final static long lbuffer = unsafe.allocateMemory(64); // array to hold 8 longs
0N/A final static long ibuffer = unsafe.allocateMemory(32); // array to hold 8 ints
0N/A
0N/A static final long larg1 = lbuffer;
0N/A static final long larg2 = larg1+8;
0N/A static final long larg3 = larg2+8;
0N/A static final long larg4 = larg3+8;
0N/A static final long larg5 = larg4+8;
0N/A static final long larg6 = larg5+8;
0N/A static final long larg7 = larg6+8;
0N/A static final long larg8 = larg7+8;
0N/A
0N/A static final long iarg1 = ibuffer;
0N/A static final long iarg2 = iarg1+4;
0N/A static final long iarg3 = iarg2+4;
0N/A static final long iarg4 = iarg3+4;
0N/A static final long iarg5 = iarg4+4;
0N/A static final long iarg6 = iarg5+4;
0N/A static final long iarg7 = iarg6+4;
0N/A static final long iarg8 = iarg7+4;
0N/A
0N/A
0N/A static int dataModel;
0N/A static final boolean isBuildInternal;
0N/A
0N/A static {
5255N/A String dataModelProp = AccessController.doPrivileged(
5255N/A new GetPropertyAction("sun.arch.data.model"));
0N/A try {
0N/A dataModel = Integer.parseInt(dataModelProp);
0N/A } catch (Exception e) {
0N/A dataModel = 32;
0N/A }
0N/A
0N/A isBuildInternal = getBuildInternal();
0N/A
0N/A// System.loadLibrary("mawt");
0N/A }
0N/A
0N/A static int getDataModel() {
0N/A return dataModel;
0N/A }
0N/A
0N/A static String hintsToString(long flags) {
0N/A StringBuffer buf = new StringBuffer();
216N/A if ((flags & XUtilConstants.PMaxSize) != 0) {
0N/A buf.append("PMaxSize ");
0N/A }
216N/A if ((flags & XUtilConstants.PMinSize) != 0) {
0N/A buf.append("PMinSize ");
0N/A }
216N/A if ((flags & XUtilConstants.USSize) != 0) {
0N/A buf.append("USSize ");
0N/A }
216N/A if ((flags & XUtilConstants.USPosition) != 0) {
0N/A buf.append("USPosition ");
0N/A }
216N/A if ((flags & XUtilConstants.PPosition) != 0) {
0N/A buf.append("PPosition ");
0N/A }
216N/A if ((flags & XUtilConstants.PSize) != 0) {
0N/A buf.append("PSize ");
0N/A }
216N/A if ((flags & XUtilConstants.PWinGravity) != 0) {
0N/A buf.append("PWinGravity ");
0N/A }
0N/A return buf.toString();
0N/A }
1067N/A static String getEventToString( int type ) {
1067N/A if( (type >= 0) && (type < eventToString.length)) {
1067N/A return eventToString[type];
1067N/A }else if( type == XToolkit.getXKBBaseEventCode() ) {
1067N/A //XXX TODO various xkb types
1067N/A return "XkbEvent";
1067N/A }
1067N/A return eventToString[0];
1067N/A }
0N/A
0N/A private static boolean getBuildInternal() {
5255N/A String javaVersion = AccessController.doPrivileged(
5255N/A new GetPropertyAction("java.version"));
0N/A return javaVersion != null && javaVersion.contains("internal");
0N/A }
1216N/A
1216N/A static native void PrintXErrorEvent(long display, long event_ptr);
0N/A}