blob: 349f754d24769ffd1950e02f9f1ab1c0d9cd681c [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
25
26package sun.awt.X11;
27
28interface XDragSourceProtocolListener {
29 /**
30 * Called when a reply from the current drop target is received.
31 *
32 * @param action is the drop action selected by the drop target
33 */
34 void handleDragReply(int action);
35
36 /**
37 * Called when a reply from the current drop target is received.
38 *
39 * @param action the drop action selected by the drop target
40 * @param x the x coordinate of the pointer location in screen coordinates
41 * for the reply
42 * @param y the x coordinate of the pointer location in screen coordinates
43 * for the reply
44 */
45 void handleDragReply(int action, int x, int y);
46
47 /**
48 * Called when a reply from the current drop target is received.
49 *
50 * @param action the drop action selected by the drop target
51 * @param x the x coordinate of the pointer location in screen coordinates
52 * for the reply
53 * @param y the x coordinate of the pointer location in screen coordinates
54 * for the reply
55 * @param modifiers the keyboard modifiers state for the reply
56 */
57 void handleDragReply(int action, int x, int y, int modifiers);
58
59 /**
60 * Called when the current drop target signals that the drag-and-drop
61 * operation is finished.
62 */
63 void handleDragFinished();
64
65 /**
66 * Called when the current drop target signals that the drag-and-drop
67 * operation is finished.
68 *
69 * @param success true if the drop target successfully performed the drop
70 * action
71 */
72 void handleDragFinished(boolean success);
73
74 /**
75 * Called when the current drop target signals that the drag-and-drop
76 * operation is finished.
77 *
78 * @param action the drop action performed by the drop target
79 * @param success true if the drop target successfully performed the drop
80 * action
81 */
82 void handleDragFinished(boolean success, int action);
83
84 /**
85 * Called when the current drop target signals that the drag-and-drop
86 * operation is finished.
87 *
88 * @param action the drop action performed by the drop target
89 * @param success true if the drop target successfully performed the drop
90 * action
91 * @param x the x coordinate of the pointer location in screen coordinates
92 * for the signal
93 * @param y the x coordinate of the pointer location in screen coordinates
94 * for the signal
95 */
96 void handleDragFinished(boolean success, int action, int x, int y);
97
98 /**
99 * Terminates the current drag-and-drop operation (if any) and performs
100 * the necessary cleanup.
101 * @param time the time stamp of the event that triggered drag termination
102 * or XlibWrapper.CurrentTime
103 */
104 void cleanup(long time);
105}