3876N/A * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 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 * 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 * 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. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A#
endif /* !HEADLESS */ 0N/A to initialize the fieldIDs for fields that may be accessed from C */ 0N/A * Class: sun_awt_X11_XToolkit 3876N/A * Method: getTrayIconDisplayTimeout 3876N/A * Class: sun_awt_X11_XToolkit 0N/A * Method: getDefaultXColormap 0N/A * Class: sun_awt_X11_XToolkit 0N/A * Method: nativeLoadSystemColors 0N/A /* Use _NoClientCode() methods for trusted methods, so that we 0N/A * know that we are not invoking client code on trusted threads 0N/A/* ========================== Begin poll section ================================ */ 3876N/A/* awt_poll_alg - AWT Poll Events Aging Algorithms */ 0N/A// AWT static poll timeout. Zero means "not set", aging algorithm is 0N/A// used. Static poll timeout values higher than 50 cause application 0N/A// look "slow" - they don't respond to user request fast 0N/A// enough. Static poll timeout value less than 10 are usually 0N/A// considered by schedulers as zero, so this might cause unnecessary 0N/A// CPU consumption by Java. The values between 10 - 50 are suggested 0N/A// for single client desktop configurations. For SunRay servers, it 0N/A// is highly recomended to use aging algorithm (set static poll timeout 0N/A * Creates the AWT utility pipe. This pipe exists solely so that 0N/A * we can cause the main event thread to wake up from a poll() or 0N/A * select() by writing to this pipe. 0N/A ** the write wakes us up from the infinite sleep, which 0N/A ** then we cause a delay of AWT_FLUSHTIME and then we 0N/A /* set the pipe to be non-blocking */ 0N/A}
/* awt_pipe_init() */ 0N/A * Reads environment variables to initialize timeout fields. 3876N/A PRINT(
"Unknown value of _AWT_POLL_ALG, assuming Slow Aging Algorithm by default");
0N/A * Returns the amount of milliseconds similar to System.currentTimeMillis() 0N/A * Updates curPollTimeout according to the aging algorithm. 0N/A * @param timeout_control Either TIMEOUT_TIMEDOUT or TIMEOUT_EVENTS 0N/A // If static_poll_timeout is set, curPollTimeout has the fixed value 0N/A // Update it otherwise 3876N/A /* add 1/4 (plus 1, in case the division truncates to 0) */ 3876N/A /* subtract 1/4 (plus 1, in case the division truncates to 0) */ 0N/A * Gets the best timeout for the next call to poll(). 0N/A * @param nextTaskTime -1, if there are no tasks; next time when 0N/A * timeout task needs to be run, in millis(of currentTimeMillis) 3876N/A // Adjust timeout to flush_time and task_time 0N/A * Waits for X/Xt events to appear on the pipe. Returns only when 0N/A * it is likely (but not definite) that there are events waiting to 0N/A * This routine also flushes the outgoing X queue, when the 0N/A * awt_next_flush_time has been reached. 0N/A * If fdAWTPipe is greater or equal than zero the routine also 0N/A * checks if there are events pending on the putback queue. 0N/A}
/* waitForEvents() */ 0N/A * Polls both the X pipe and our AWT utility pipe. Returns 0N/A * when there is data on one of the pipes, or the operation times 0N/A * Not all Xt events come across the X pipe (e.g., timers 0N/A * and alternate inputs), so we must time out every now and 0N/A * then to check the Xt event queue. 0N/A * The fdAWTPipe will be empty when this returns. 0N/A /* ACTUALLY DO THE POLL() */ 0N/A // be sure other threads get a chance 0N/A /* poll() timed out -- update timeout value */ 0N/A /* There is data on the AWT pipe - empty it */ 3876N/A PRINT2(
"%s(): data on the AWT pipe: curPollTimeout = %d \n",
0N/A}
/* performPoll() */ 0N/A * Schedules next auto-flush event or performs forced flush depending 0N/A * on the time of the previous flush. 0N/A // Enough time passed from last flush 0N/A * Wakes-up poll() in performPoll 0N/A/* ========================== End poll section ================================= */ 0N/A * Class: java_awt_KeyboardFocusManager 0N/A * Class: sun_awt_X11_XToolkit 0N/A * Old, compatibility, backdoor for DT. This is a different 0N/A * implementation. It keeps the signature, but acts on 0N/A * awt_root_shell, not the frame passed as an argument. Note, that 0N/A * the code that uses the old backdoor doesn't work correctly with 0N/A * gnome session proxy that checks for WM_COMMAND when the window is 0N/A * firts mapped, because DT code calls this old backdoor *after* the 0N/A * frame is shown or it would get NPE with old AWT (previous 0N/A * implementation of this backdoor) otherwise. Old style session 0N/A * managers (e.g. CDE) that check WM_COMMAND only during session 0N/A * checkpoint should work fine, though. 0N/A * NB: The function name looks deceptively like a JNI native method 0N/A * name. It's not! It's just a plain function. 0N/A * New DT backdoor to set WM_COMMAND. New code should use this 0N/A * backdoor and call it *before* the first frame is shown so that 0N/A * gnome session proxy can correctly handle it. 0N/A * NB: The function name looks deceptively like a JNI native method 0N/A * name. It's not! It's just a plain function. 0N/A /* array of C strings */ 0N/A /* fill C array with platform chars of java strings */ 0N/A /* grr, X prototype doesn't declare cargv as const, thought it really is */ 0N/A "XmbTextListToTextProperty: XNoMemory");
0N/A "XmbTextListToTextProperty: XLocaleNotSupported");
0N/A "XmbTextListToTextProperty: XConverterNotFound");
0N/A "XmbTextListToTextProperty: unknown error");
0N/A * Class: java_awt_TrayIcon 0N/A * Class: java_awt_Cursor 0N/A * Method: finalizeImpl 1224N/A * Class: sun_awt_X11_XToolkit 1224N/A * Method: getNumberOfButtonsImpl 1224N/A * If XTest is asked to press a non-existant mouse button 1224N/A * (i.e. press Button3 on a system configured with a 2-button mouse), 1224N/A * then a crash may happen. To avoid this, we use the XInput 1224N/A * extension to query for the number of buttons on the XPointer, and check 1224N/A * before calling XTestFakeButtonEvent(). 1224N/A DTRACE_PRINTLN3(
"RobotPeer: XQueryExtension(XINPUT) returns major_opcode = %d, first_event = %d, first_error = %d",
4514N/A * Class: sun_awt_X11_XWindowPeer 4514N/A /* Return the JVM's PID. */ 4514N/A * Class: sun_awt_X11_XWindowPeer 4514N/A /* Return the machine's FQDN. */