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_XDropTarget_idl__
29*cdf0e10cSrcweir#define __com_sun_star_datatransfer_dnd_XDropTarget_idl__
30*cdf0e10cSrcweir
31*cdf0e10cSrcweir#ifndef __com_sun_star_datatransfer_XTransferable_idl__
32*cdf0e10cSrcweir#include <com/sun/star/datatransfer/XTransferable.idl>
33*cdf0e10cSrcweir#endif
34*cdf0e10cSrcweir
35*cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
36*cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
37*cdf0e10cSrcweir#endif
38*cdf0e10cSrcweir
39*cdf0e10cSrcweir//=============================================================================
40*cdf0e10cSrcweir
41*cdf0e10cSrcweirmodule com { module sun { module star { module datatransfer { module dnd {
42*cdf0e10cSrcweir
43*cdf0e10cSrcweir published interface XDropTargetListener;
44*cdf0e10cSrcweir
45*cdf0e10cSrcweir//=============================================================================
46*cdf0e10cSrcweir/** This interface is implemented by a view or window that supports drop
47*cdf0e10cSrcweir	operations.
48*cdf0e10cSrcweir
49*cdf0e10cSrcweir	<p>Differently to Java, the association between view and interface is fixed
50*cdf0e10cSrcweir	and cannot be changed. Otherwise, the AWT messaging would have to be
51*cdf0e10cSrcweir	implemented for any window supporting Drag and Drop operations, which would
52*cdf0e10cSrcweir	be a performance issue.</p>
53*cdf0e10cSrcweir*/
54*cdf0e10cSrcweir
55*cdf0e10cSrcweirpublished interface XDropTarget: com::sun::star::uno::XInterface
56*cdf0e10cSrcweir{
57*cdf0e10cSrcweir	//-------------------------------------------------------------------------
58*cdf0e10cSrcweir	/** Add a DropTargetListener.
59*cdf0e10cSrcweir
60*cdf0e10cSrcweir		<p>The listener will be queried for the <type>XAutoscroll</type> interface
61*cdf0e10cSrcweir		to see if it supports autoscrolling.</p>
62*cdf0e10cSrcweir
63*cdf0e10cSrcweir		@param dtl
64*cdf0e10cSrcweir		The listener to add to the notification list.
65*cdf0e10cSrcweir	*/
66*cdf0e10cSrcweir
67*cdf0e10cSrcweir	[oneway] void addDropTargetListener( [in] XDropTargetListener dtl );
68*cdf0e10cSrcweir
69*cdf0e10cSrcweir	//-------------------------------------------------------------------------
70*cdf0e10cSrcweir	/** Remove a drop target listener.
71*cdf0e10cSrcweir
72*cdf0e10cSrcweir		@param dtl
73*cdf0e10cSrcweir		The listener to remove from notification list.
74*cdf0e10cSrcweir	*/
75*cdf0e10cSrcweir
76*cdf0e10cSrcweir	[oneway] void removeDropTargetListener( [in] XDropTargetListener dtl );
77*cdf0e10cSrcweir
78*cdf0e10cSrcweir	//-------------------------------------------------------------------------
79*cdf0e10cSrcweir	/** Indicates either a drop target object is active or not.
80*cdf0e10cSrcweir
81*cdf0e10cSrcweir		@returns
82*cdf0e10cSrcweir		A boolean indicating whether or not this drop target object is
83*cdf0e10cSrcweir		currently active, that is ready to accept drops.
84*cdf0e10cSrcweir	*/
85*cdf0e10cSrcweir
86*cdf0e10cSrcweir	boolean isActive();
87*cdf0e10cSrcweir
88*cdf0e10cSrcweir	//-------------------------------------------------------------------------
89*cdf0e10cSrcweir	/** Sets the drop target object active or inactive.
90*cdf0e10cSrcweir
91*cdf0e10cSrcweir		@param active
92*cdf0e10cSrcweir		A value of <TRUE/> sets the drop target object active.
93*cdf0e10cSrcweir		<p>A value of <FALSE/> sets the drop target object inactive.
94*cdf0e10cSrcweir	*/
95*cdf0e10cSrcweir
96*cdf0e10cSrcweir	void setActive( [in] boolean active );
97*cdf0e10cSrcweir
98*cdf0e10cSrcweir	//-------------------------------------------------------------------------
99*cdf0e10cSrcweir	/** Determine the actions supported by a drop target.
100*cdf0e10cSrcweir
101*cdf0e10cSrcweir		@returns
102*cdf0e10cSrcweir		The current action or actions supported by this drop target.
103*cdf0e10cSrcweir
104*cdf0e10cSrcweir		<p>By default this will include all drag and drop actions.</p>
105*cdf0e10cSrcweir
106*cdf0e10cSrcweir		@see com::sun::star::datatransfer::dnd::DNDConstants
107*cdf0e10cSrcweir	*/
108*cdf0e10cSrcweir
109*cdf0e10cSrcweir	byte getDefaultActions();
110*cdf0e10cSrcweir
111*cdf0e10cSrcweir	//-------------------------------------------------------------------------
112*cdf0e10cSrcweir	/**	Sets the default acceptable actions for this drop target.
113*cdf0e10cSrcweir
114*cdf0e10cSrcweir		<p>This method is a way to reduce the number of Drag and Drop events
115*cdf0e10cSrcweir		by blocking events for actions not supported by this target.</p>
116*cdf0e10cSrcweir		<p>By default the listener will receive notifications for all actions.</p>
117*cdf0e10cSrcweir
118*cdf0e10cSrcweir		@param actions
119*cdf0e10cSrcweir		The actions.
120*cdf0e10cSrcweir
121*cdf0e10cSrcweir		@see com::sun::star::datatransfer::dnd::DNDConstants
122*cdf0e10cSrcweir	*/
123*cdf0e10cSrcweir	[oneway] void setDefaultActions( [in] byte actions );
124*cdf0e10cSrcweir};
125*cdf0e10cSrcweir
126*cdf0e10cSrcweir//=============================================================================
127*cdf0e10cSrcweir
128*cdf0e10cSrcweir}; }; }; }; };
129*cdf0e10cSrcweir
130*cdf0e10cSrcweir#endif
131