1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XDropTarget.idl,v $
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_XDropTarget_idl__
32 #define __com_sun_star_datatransfer_dnd_XDropTarget_idl__
34 #ifndef __com_sun_star_datatransfer_XTransferable_idl__
35 #include
<com
/sun
/star
/datatransfer
/XTransferable.idl
>
38 #ifndef __com_sun_star_uno_XInterface_idl__
39 #include
<com
/sun
/star
/uno
/XInterface.idl
>
42 //=============================================================================
44 module com
{ module sun
{ module star
{ module datatransfer
{ module dnd
{
46 published
interface XDropTargetListener
;
48 //=============================================================================
49 /** This interface is implemented by a view or window that supports drop
52 <p>Differently to Java, the association between view and interface is fixed
53 and cannot be changed. Otherwise, the AWT messaging would have to be
54 implemented for any window supporting Drag and Drop operations, which would
55 be a performance issue.</p>
58 published
interface XDropTarget
: com
::sun
::star
::uno
::XInterface
60 //-------------------------------------------------------------------------
61 /** Add a DropTargetListener.
63 <p>The listener will be queried for the <type>XAutoscroll</type> interface
64 to see if it supports autoscrolling.</p>
67 The listener to add to the notification list.
70 [oneway
] void addDropTargetListener
( [in] XDropTargetListener dtl
);
72 //-------------------------------------------------------------------------
73 /** Remove a drop target listener.
76 The listener to remove from notification list.
79 [oneway
] void removeDropTargetListener
( [in] XDropTargetListener dtl
);
81 //-------------------------------------------------------------------------
82 /** Indicates either a drop target object is active or not.
85 A boolean indicating whether or not this drop target object is
86 currently active, that is ready to accept drops.
91 //-------------------------------------------------------------------------
92 /** Sets the drop target object active or inactive.
95 A value of <TRUE/> sets the drop target object active.
96 <p>A value of <FALSE/> sets the drop target object inactive.
99 void setActive
( [in] boolean active
);
101 //-------------------------------------------------------------------------
102 /** Determine the actions supported by a drop target.
105 The current action or actions supported by this drop target.
107 <p>By default this will include all drag and drop actions.</p>
109 @see com::sun::star::datatransfer::dnd::DNDConstants
112 byte getDefaultActions
();
114 //-------------------------------------------------------------------------
115 /** Sets the default acceptable actions for this drop target.
117 <p>This method is a way to reduce the number of Drag and Drop events
118 by blocking events for actions not supported by this target.</p>
119 <p>By default the listener will receive notifications for all actions.</p>
124 @see com::sun::star::datatransfer::dnd::DNDConstants
126 [oneway
] void setDefaultActions
( [in] byte actions
);
129 //=============================================================================