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