XToolkit.java revision 0
0N/A private static final Logger timeoutTaskLog = Logger.getLogger("sun.awt.X11.timeoutTask.XToolkit");
0N/A private static final Logger backingStoreLog = Logger.getLogger("sun.awt.X11.backingStore.XToolkit");
0N/A static final boolean PRIMARY_LOOP = false;
0N/A static final boolean SECONDARY_LOOP = true;
0N/A protected static boolean dynamicLayoutSetting = false;
0N/A private boolean loadedXSettings;
0N/A static int arrowCursor;
0N/A static int awt_multiclick_time;
0N/A static boolean securityWarningEnabled;
0N/A m_removeSourceEvents = SunToolkit.getMethod(EventQueue.class, "removeSourceEvents", new Class[] {Object.class, Boolean.TYPE}) ;
0N/A static long saved_error_handler;
0N/A static void RESTORE_XERROR_HANDLER() {
0N/A interface XErrorHandler {
0N/A static boolean isToolkitThread() {
0N/A static void initSecurityWarning() {
0N/A static boolean isSecurityWarningEnabled() {
0N/A return securityWarningEnabled;
0N/A static native void awt_output_flush();
0N/A static final void awtFUnlock() {
0N/A return uidefaults;
0N/A static void initUIDefaults() {
0N/A e.printStackTrace();
0N/A public static long getDisplay() {
0N/A public static long getDefaultRootWindow() {
0N/A return awtAppClassName;
0N/A new PrivilegedAction() {
0N/A synchronized(winToDispatcher) {
0N/A synchronized(winToDispatcher) {
0N/A public interface XEventListener {
0N/A (ev.get_type() == MotionNotify || ev.get_type() == EnterNotify || ev.get_type() == LeaveNotify))
0N/A synchronized(winToDispatcher) {
0N/A static native void awt_toolkit_init();
0N/A eventNumber++;
0N/A if( keyEventLog.isLoggable(Level.FINE) && (ev.get_type() == KeyPress || ev.get_type() == KeyRelease) ) {
0N/A if( keyEventLog.isLoggable(Level.FINE) && (ev.get_type() == KeyPress || ev.get_type() == KeyRelease) ) {
0N/A static int getDefaultScreenWidth() {
0N/A return screenWidth;
0N/A static int getDefaultScreenHeight() {
0N/A return screenHeight;
0N/A protected int getScreenWidth() {
0N/A return getDefaultScreenWidth();
0N/A protected int getScreenHeight() {
0N/A return getDefaultScreenHeight();
0N/A if (workareaPresent)
0N/A private Insets getScreenInsetsManually(long root, Rectangle rootBounds, Rectangle screenBounds)
0N/A boolean strutPresent = XA_NET_WM_STRUT_PARTIAL.getAtomData(window, XAtom.XA_CARDINAL, native_ptr, 4);
0N/A if (!strutPresent)
0N/A if (strutPresent)
0N/A public void setDynamicLayout(boolean b) {
0N/A dynamicLayoutSetting = b;
0N/A protected boolean isDynamicLayoutSet() {
0N/A return dynamicLayoutSetting;
0N/A protected boolean isDynamicLayoutSupported() {
0N/A public boolean isDynamicLayoutActive() {
0N/A return isDynamicLayoutSupported();
0N/A public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException {
0N/A public <T extends DragGestureRecognizer> T
0N/A int srcActions,
0N/A XCanvasPeer peer = (isXEmbedServerRequested() ? new XEmbedCanvasPeer(target) : new XCanvasPeer(target));
0N/A public KeyboardFocusManagerPeer createKeyboardFocusManagerPeer(KeyboardFocusManager manager) throws HeadlessException {
0N/A throws IndexOutOfBoundsException {
0N/A public boolean isTraySupported() {
0N/A public int getMaximumCursorColors() {
0N/A throw new IllegalArgumentException();
0N/A throw new IllegalArgumentException();
0N/A public int getScreenResolution() {
0N/A static native long getDefaultXColormap();
0N/A static native long getDefaultScreenData();
0N/A return screenmodel;
0N/A return getStaticColorModel();
0N/A return new XInputMethodDescriptor();
0N/A static int getMultiClickTime() {
0N/A return awt_multiclick_time;
0N/A static void initializeMultiClickTime() {
0N/A String multiclick_time_query = XlibWrapper.XGetDefault(XToolkit.getDisplay(), "*", "multiClickTime");
0N/A throws HeadlessException
0N/A private static boolean initialized;
0N/A private static boolean timeStampUpdated;
0N/A new XEventDispatcher() {
0N/A case PropertyNotify:
0N/A timeStampUpdated = true;
0N/A static long getCurrentServerTime() {
0N/A if (!initialized) {
0N/A initialized = true;
0N/A timeStampUpdated = false;
0N/A if (isToolkitThread()) {
0N/A while (!timeStampUpdated) {
0N/A awtLockWait();
0N/A if (log.isLoggable(Level.FINE)) log.fine("Catched exception, timeStamp may not be correct (ie = " + ie + ")");
0N/A protected void initializeDesktopProperties() {
0N/A private int getNumMouseButtons() {
0N/A if (!loadedXSettings &&
0N/A loadedXSettings = true;
0N/A /* set the fontconfig/KDE property so that
0N/A private void loadXSettings() {
0N/A // Net/DndDragThreshold -> ???
0N/A // Net/DoubleClickTime -> awt.multiClickInterval
0N/A static int numLockMask;
0N/A static int modeSwitchMask;
0N/A static int modLockIsShiftLock;
0N/A static void setupModifierMap() {
0N/A static native void wakeup_poll();
0N/A wakeup_poll();
0N/A private long getNextTaskTime() {
0N/A private static void callTimeoutTasks() {
0N/A static long getAwtDefaultFg() {
0N/A return awt_defaultFg;
0N/A int numButtons = ((Integer)getDefaultToolkit().getDesktopProperty("awt.mouse.numButtons")).intValue();
0N/A static long reset_time_utc;
0N/A protected boolean needsXEmbedImpl() {
0N/A catch (IllegalAccessException e)
0N/A e.printStackTrace();
0N/A catch (InvocationTargetException e) {
0N/A e.printStackTrace();
0N/A public boolean isAlwaysOnTopSupported() {
0N/A public boolean useBufferPerWindow() {
0N/A static int getBackingStoreType() {
0N/A return backingStoreType;
0N/A private static void setBackingStoreType() {
0N/A private static int backingStoreType;
0N/A static boolean awt_ServerInquired = false;
0N/A static boolean awt_IsXsunServer = false;
0N/A static boolean awt_XKBInquired = false;
0N/A static boolean awt_UseXKB = false;
0N/A static boolean isXsunServer() {
0N/A if( awt_ServerInquired ) {
0N/A return awt_IsXsunServer;
0N/A awt_ServerInquired = true;
0N/A awt_IsXsunServer = false;
0N/A awt_ServerInquired = true;
0N/A awt_IsXsunServer = false;
0N/A awt_ServerInquired = true;
0N/A awt_IsXsunServer = true;
0N/A static boolean isXKBenabled() {
0N/A if( awt_XKBInquired ) {
0N/A return awt_UseXKB;
0N/A awt_XKBInquired = true;
0N/A awt_UseXKB = XlibWrapper.XQueryExtension( getDisplay(), name, XlibWrapper.larg1, XlibWrapper.larg2, XlibWrapper.larg3);
0N/A return awt_UseXKB;
0N/A private static long eventNumber;
0N/A public static long getEventNumber() {
0N/A return eventNumber;
0N/A private static boolean oops_updated;
0N/A private static boolean oops_failed;
0N/A oops_updated = true;
0N/A oops_failed = true;
0N/A oops_updated = false;
0N/A oops_failed = false;
0N/A eventLog.log(Level.FINER, "WM_S0 selection owner {0}", new Object[] {XlibWrapper.XGetSelectionOwner(getDisplay(), atom.getAtom())});
0N/A } catch (InterruptedException e) {
0N/A throw new RuntimeException(e);
0N/A public boolean isDesktopSupported(){
0N/A return new XDesktopPeer();
0N/A public static native void setNoisyXErrorHandler();