/*
* 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.
*/
/**
* XDragSourceProtocol implementation for Motif DnD protocol.
*
* @since 1.5
*/
implements XEventDispatcher {
super(listener);
}
/**
* Creates an instance associated with the specified listener.
*
* @throws NullPointerException if listener is <code>null</code>.
*/
return new MotifDnDDragSourceProtocol(listener);
}
return XDragAndDropProtocols.MotifDnD;
}
throws InvalidDnDOperationException,
/* Write the Motif DnD initiator info on the root XWindow. */
try {
} catch (XException xe) {
cleanup();
throw xe;
} catch (InvalidDnDOperationException idoe) {
cleanup();
throw idoe;
}
cleanup();
throw new InvalidDnDOperationException("Cannot acquire selection ownership");
}
}
/**
* Processes the specified client message event.
*
* @returns true if the event was successfully processed.
*/
if (xclient.get_message_type() !=
return false;
}
int x = 0;
int y = 0;
/* Only receiver messages should be handled. */
return false;
}
switch (reason) {
case MotifDnDConstants.DRAG_MOTION:
break;
default:
// Unknown reason.
return false;
}
if (swapNeeded) {
}
long time = t & 0xffffffffL;
// with correction of (32-bit unsigned to 64-bit signed) implicit conversion.
/* Discard events from the previous receiver. */
return true;
}
if (swapNeeded) {
}
} else {
}
if (swapNeeded) {
}
x = tx;
y = ty;
}
return true;
}
assert XToolkit.isAWTLockHeldByCurrentThread();
0, 0xFFFF, false,
try {
/*
* DragICCI.h:
*
* typedef struct _xmDragReceiverInfoStruct{
* BYTE byte_order;
* BYTE protocol_version;
* BYTE drag_protocol_style;
* BYTE pad1;
* CARD32 proxy_window B32;
* CARD16 num_drop_sites B16;
* CARD16 pad2 B16;
* CARD32 heap_offset B32;
* } xmDragReceiverInfoStruct;
*/
wpg.getNumberOfItems() >=
switch (dragProtocolStyle) {
}
default:
// Unsupported protocol style.
return null;
}
} else {
return null;
}
} finally {
}
}
assert XToolkit.isAWTLockHeldByCurrentThread();
assert getTargetWindow() != 0;
try {
int flags =
(byte)(MotifDnDConstants.TOP_LEVEL_ENTER |
false, XConstants.NoEventMask,
} finally {
}
}
assert XToolkit.isAWTLockHeldByCurrentThread();
assert getTargetWindow() != 0;
try {
int flags =
(byte)(MotifDnDConstants.DRAG_MOTION |
false, XConstants.NoEventMask,
} finally {
}
}
assert XToolkit.isAWTLockHeldByCurrentThread();
assert getTargetWindow() != 0;
try {
(byte)(MotifDnDConstants.TOP_LEVEL_LEAVE |
false, XConstants.NoEventMask,
} finally {
}
}
int sourceAction, int sourceActions,
long time) {
assert XToolkit.isAWTLockHeldByCurrentThread();
assert getTargetWindow() != 0;
/*
* Motif drop sites expect TOP_LEVEL_LEAVE before DROP_START.
*/
try {
int flags =
(byte)(MotifDnDConstants.DROP_START |
false, XConstants.NoEventMask,
} finally {
}
}
long sourceWindow) {
// Motif DnD for XEmbed is not implemented.
return false;
}
public void cleanupTargetInfo() {
super.cleanupTargetInfo();
}
case XConstants.SelectionRequest:
getProtocolListener().handleDragFinished(true);
getProtocolListener().handleDragFinished(false);
}
}
break;
}
}
}