1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_datatransfer_dnd_XDropTarget_idl__
25#define __com_sun_star_datatransfer_dnd_XDropTarget_idl__
26
27#ifndef __com_sun_star_datatransfer_XTransferable_idl__
28#include <com/sun/star/datatransfer/XTransferable.idl>
29#endif
30
31#ifndef __com_sun_star_uno_XInterface_idl__
32#include <com/sun/star/uno/XInterface.idl>
33#endif
34
35//=============================================================================
36
37module com { module sun { module star { module datatransfer { module dnd {
38
39 published interface XDropTargetListener;
40
41//=============================================================================
42/** This interface is implemented by a view or window that supports drop
43	operations.
44
45	<p>Differently to Java, the association between view and interface is fixed
46	and cannot be changed. Otherwise, the AWT messaging would have to be
47	implemented for any window supporting Drag and Drop operations, which would
48	be a performance issue.</p>
49*/
50
51published interface XDropTarget: com::sun::star::uno::XInterface
52{
53	//-------------------------------------------------------------------------
54	/** Add a DropTargetListener.
55
56		<p>The listener will be queried for the <type>XAutoscroll</type> interface
57		to see if it supports autoscrolling.</p>
58
59		@param dtl
60		The listener to add to the notification list.
61	*/
62
63	[oneway] void addDropTargetListener( [in] XDropTargetListener dtl );
64
65	//-------------------------------------------------------------------------
66	/** Remove a drop target listener.
67
68		@param dtl
69		The listener to remove from notification list.
70	*/
71
72	[oneway] void removeDropTargetListener( [in] XDropTargetListener dtl );
73
74	//-------------------------------------------------------------------------
75	/** Indicates either a drop target object is active or not.
76
77		@returns
78		A boolean indicating whether or not this drop target object is
79		currently active, that is ready to accept drops.
80	*/
81
82	boolean isActive();
83
84	//-------------------------------------------------------------------------
85	/** Sets the drop target object active or inactive.
86
87		@param active
88		A value of <TRUE/> sets the drop target object active.
89		<p>A value of <FALSE/> sets the drop target object inactive.
90	*/
91
92	void setActive( [in] boolean active );
93
94	//-------------------------------------------------------------------------
95	/** Determine the actions supported by a drop target.
96
97		@returns
98		The current action or actions supported by this drop target.
99
100		<p>By default this will include all drag and drop actions.</p>
101
102		@see com::sun::star::datatransfer::dnd::DNDConstants
103	*/
104
105	byte getDefaultActions();
106
107	//-------------------------------------------------------------------------
108	/**	Sets the default acceptable actions for this drop target.
109
110		<p>This method is a way to reduce the number of Drag and Drop events
111		by blocking events for actions not supported by this target.</p>
112		<p>By default the listener will receive notifications for all actions.</p>
113
114		@param actions
115		The actions.
116
117		@see com::sun::star::datatransfer::dnd::DNDConstants
118	*/
119	[oneway] void setDefaultActions( [in] byte actions );
120};
121
122//=============================================================================
123
124}; }; }; }; };
125
126#endif
127