update dev300-m58
[ooovba.git] / offapi / com / sun / star / datatransfer / dnd / XDragSource.idl
blob94639c284896dbd075fb7ca819e3000d7c0fe85d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XDragSource.idl,v $
10 * $Revision: 1.11 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_datatransfer_dnd_XDragSource_idl__
32 #define __com_sun_star_datatransfer_dnd_XDragSource_idl__
34 #ifndef __com_sun_star_datatransfer_dnd_InvalidDNDOperationException_idl__
35 #include <com/sun/star/datatransfer/dnd/InvalidDNDOperationException.idl>
36 #endif
38 #ifndef __com_sun_star_datatransfer_dnd_DragGestureEvent_idl__
39 #include <com/sun/star/datatransfer/dnd/DragGestureEvent.idl>
40 #endif
42 #ifndef __com_sun_star_datatransfer_XTransferable_idl__
43 #include <com/sun/star/datatransfer/XTransferable.idl>
44 #endif
46 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47 #include <com/sun/star/lang/IllegalArgumentException.idl>
48 #endif
50 //=============================================================================
52 module com { module sun { module star { module datatransfer { module dnd {
54 published interface XDragSourceListener;
56 //=============================================================================
57 /** This interface is implemented by a view or window that supports drag
58 operations and will be received as part of a <type>DragGestureEvent</type>
59 through a <member scope="com::sun::star::datatransfer::dnd">XDragGestureListener::dragGestureRecognized()</member>
60 callback.
62 <p>Differently to Java, the association between view and interface is fixed
63 and can not be changed. Otherwise, the AWT messaging would have to be
64 implemented for any window supporting Drag and Drop operations, which would
65 be a real performance issue.</p>
68 published interface XDragSource: com::sun::star::uno::XInterface
71 //-------------------------------------------------------------------------
72 /** In order to query if drag image support is available.
74 @returns
75 A boolean indicating whether or not drag image support is
76 available on the underlying platform.
79 boolean isDragImageSupported();
81 //-------------------------------------------------------------------------
82 /** To get the default cursor for a specified drag action.
84 @param dragAction
85 A drag action as specified in <type>DNDConstants</type>.
87 @returns
88 The default drag cursor for the specified drag action.
89 <p>The returned value may be used as parameter for the method
90 <member scope="com::sun::star::datatransfer::dnd">XDragSourceContext::setCursor()</member>.</p>
93 long getDefaultCursor( [in] byte dragAction )
94 raises( com::sun::star::lang::IllegalArgumentException );
96 //-------------------------------------------------------------------------
97 /** Starts the drag operation.
99 <p>Note: this call does <em>not</em> block until the drag and drop
100 operation ends. If the Drag and Drop system is unable to initiate
101 a drag operation or if the user attempts to start a drag while an
102 existing drag operation is still executing, the action fails immediately.
103 This is indicated by calling
104 <member scope="com::sun::star::datatransfer::dnd">XDragSourceListener::dragDropEnd()</member>
105 on the parameter listener with a DragSourceDragEvent showing a failure.</p>
107 @param trigger
108 The <type>DragGestureEvent</type> that initiated the drag.
110 @param sourceActions
111 The action or actions supported for this transferable as defined
112 in <type>DNDConstants</type>.
114 @param cursor
115 The initial drag cursor id or 0 as default.
117 @param image
118 The initial drag image id or 0 as default.
120 @param trans
121 The transferable object dragged.
123 @param listener
124 The <type>XDragSourceListener</type>.
126 @see com::sun::star::datatransfer::XTransferable
129 [oneway] void startDrag(
130 [in] DragGestureEvent trigger,
131 [in] byte sourceActions,
132 [in] long cursor,
133 [in] long image,
134 [in] com::sun::star::datatransfer::XTransferable trans,
135 [in] XDragSourceListener listener );
138 //=============================================================================
140 }; }; }; }; };
142 #endif