]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/dnd/DragSourceListener.java
Work around SWT 4.13 - 4.18 Win32 DnD bug 567422
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / dnd / DragSourceListener.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2011 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.swt.dnd;
15
16 import org.eclipse.swt.internal.*;
17
18 /**
19  * The <code>DragSourceListener</code> class provides event notification to the application for DragSource events.
20  *
21  * <p>When the user drops data on a <code>DropTarget</code>, the application which defines the <code>DragSource</code>
22  * must provide the dropped data by implementing <code>dragSetData</code>.  In the dragSetData, the application
23  * must support all the data types that were specified in the DragSource#setTransfer method.</p>
24  *
25  * <p>After the drop has completed successfully or has been aborted, the application which defines the
26  * <code>DragSource</code> is required to take the appropriate cleanup action.  In the case of a successful
27  * <b>move</b> operation, the application must remove the data that was transferred.</p>
28  *
29  */
30 public interface DragSourceListener extends SWTEventListener {
31
32 /**
33  * The user has begun the actions required to drag the widget. This event gives the application
34  * the chance to decide if a drag should be started.
35  *
36  * <p>The following fields in the DragSourceEvent apply:</p>
37  * <ul>
38  * <li>(in)widget
39  * <li>(in)time
40  * <li>(in,out)doit
41  * </ul>
42  *
43  * @param event the information associated with the drag start event
44  *
45  * @see DragSourceEvent
46  */
47 public void dragStart(DragSourceEvent event);
48
49 /**
50  * The data is required from the drag source.
51  *
52  * <p>The following fields in the DragSourceEvent apply:</p>
53  * <ul>
54  * <li>(in)widget
55  * <li>(in)time
56  * <li>(in)dataType - the type of data requested.
57  * <li>(out)data    - the application inserts the actual data here (must match the dataType)
58  * <li>(out)doit    - set this to cancel the drag
59  * </ul>
60  *
61  * @param event the information associated with the drag set data event
62  *
63  * @see DragSourceEvent
64  */
65 public void dragSetData(DragSourceEvent event);
66
67 /**
68  * The drop has successfully completed(mouse up over a valid target) or has been terminated (such as hitting
69  * the ESC key). Perform cleanup such as removing data from the source side on a successful move operation.
70  *
71  * <p>The following fields in the DragSourceEvent apply:</p>
72  * <ul>
73  * <li>(in)widget
74  * <li>(in)time
75  * <li>(in)doit
76  * <li>(in)detail
77  * </ul>
78  *
79  * @param event the information associated with the drag finished event
80  *
81  * @see DragSourceEvent
82  */
83 public void dragFinished(DragSourceEvent event);
84 }