/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* An abstract class for drag protocols on X11 systems.
* Contains protocol-independent drag source code.
*
* @since 1.5
*/
abstract class XDragSourceProtocol {
private boolean initialized = false;
// Always use the XAWT root window as the drag source window.
static long getDragSourceWindow() {
}
throw new NullPointerException("Null XDragSourceProtocolListener");
}
}
return listener;
}
/**
* Returns the protocol name. The protocol name cannot be null.
*/
/**
* Initalizes a drag operation with the specified supported drop actions,
* contents and data formats.
*
* @param actions a bitwise mask of <code>DnDConstants</code> that represent
* the supported drop actions.
* @param contents the contents for the drag operation.
* @param formats an array of Atoms that represent the supported data formats.
* @param formats an array of Atoms that represent the supported data formats.
* @throws InvalidDnDOperationException if a drag operation is already
* initialized.
* @throws IllegalArgumentException if some argument has invalid value.
* @throws XException if some X call failed.
*/
throws InvalidDnDOperationException,
try {
try {
if (initialized) {
throw new InvalidDnDOperationException("Already initialized");
}
initialized = true;
} finally {
if (!initialized) {
cleanup();
}
}
} finally {
}
}
/* The caller must hold AWT_LOCK. */
/**
* Terminates the current drag operation (if any) and resets the internal
* state of this object.
*
* @throws XException if some X call failed.
*/
public void cleanup() {
initialized = false;
}
/**
* Clears the information on the current drop target.
*
* @throws XException if some X call failed.
*/
public void cleanupTargetInfo() {
targetWindow = 0;
targetProxyWindow = 0;
}
/**
* Processes the specified client message event.
*
* @returns true if the event was successfully processed.
*/
throws XException;
/* The caller must hold AWT_LOCK. */
assert XToolkit.isAWTLockHeldByCurrentThread();
return false;
} else {
return true;
}
}
/* The caller must hold AWT_LOCK. */
/* The caller must hold AWT_LOCK. */
int sourceActions, long time);
/* The caller must hold AWT_LOCK. */
int sourceAction, int sourceActions,
long time);
/* The caller must hold AWT_LOCK. */
/* The caller must hold AWT_LOCK. */
int sourceAction, int sourceActions,
long time);
int sourceAction, int sourceActions,
long time) {
try {
if ((status == 0) ||
throw new XException("XGetWindowAttributes failed");
}
} finally {
}
throw new XException("XSelectInput failed");
}
}
protected final void finalizeDrop() {
}
long sourceWindow);
protected final long getTargetWindow() {
return targetWindow;
}
protected final long getTargetProxyWindow() {
if (targetProxyWindow != 0) {
return targetProxyWindow;
} else {
return targetWindow;
}
}
protected final int getTargetProtocolVersion() {
return targetProtocolVersion;
}
public static class TargetWindowInfo {
private final long proxyWindow;
private final int protocolVersion;
proxyWindow = proxy;
}
public long getProxyWindow() {
return proxyWindow;
}
public int getProtocolVersion() {
return protocolVersion;
}
}
}