1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_datatransfer_dnd_XDropTarget_idl__ 29#define __com_sun_star_datatransfer_dnd_XDropTarget_idl__ 30 31#ifndef __com_sun_star_datatransfer_XTransferable_idl__ 32#include <com/sun/star/datatransfer/XTransferable.idl> 33#endif 34 35#ifndef __com_sun_star_uno_XInterface_idl__ 36#include <com/sun/star/uno/XInterface.idl> 37#endif 38 39//============================================================================= 40 41module com { module sun { module star { module datatransfer { module dnd { 42 43 published interface XDropTargetListener; 44 45//============================================================================= 46/** This interface is implemented by a view or window that supports drop 47 operations. 48 49 <p>Differently to Java, the association between view and interface is fixed 50 and cannot be changed. Otherwise, the AWT messaging would have to be 51 implemented for any window supporting Drag and Drop operations, which would 52 be a performance issue.</p> 53*/ 54 55published interface XDropTarget: com::sun::star::uno::XInterface 56{ 57 //------------------------------------------------------------------------- 58 /** Add a DropTargetListener. 59 60 <p>The listener will be queried for the <type>XAutoscroll</type> interface 61 to see if it supports autoscrolling.</p> 62 63 @param dtl 64 The listener to add to the notification list. 65 */ 66 67 [oneway] void addDropTargetListener( [in] XDropTargetListener dtl ); 68 69 //------------------------------------------------------------------------- 70 /** Remove a drop target listener. 71 72 @param dtl 73 The listener to remove from notification list. 74 */ 75 76 [oneway] void removeDropTargetListener( [in] XDropTargetListener dtl ); 77 78 //------------------------------------------------------------------------- 79 /** Indicates either a drop target object is active or not. 80 81 @returns 82 A boolean indicating whether or not this drop target object is 83 currently active, that is ready to accept drops. 84 */ 85 86 boolean isActive(); 87 88 //------------------------------------------------------------------------- 89 /** Sets the drop target object active or inactive. 90 91 @param active 92 A value of <TRUE/> sets the drop target object active. 93 <p>A value of <FALSE/> sets the drop target object inactive. 94 */ 95 96 void setActive( [in] boolean active ); 97 98 //------------------------------------------------------------------------- 99 /** Determine the actions supported by a drop target. 100 101 @returns 102 The current action or actions supported by this drop target. 103 104 <p>By default this will include all drag and drop actions.</p> 105 106 @see com::sun::star::datatransfer::dnd::DNDConstants 107 */ 108 109 byte getDefaultActions(); 110 111 //------------------------------------------------------------------------- 112 /** Sets the default acceptable actions for this drop target. 113 114 <p>This method is a way to reduce the number of Drag and Drop events 115 by blocking events for actions not supported by this target.</p> 116 <p>By default the listener will receive notifications for all actions.</p> 117 118 @param actions 119 The actions. 120 121 @see com::sun::star::datatransfer::dnd::DNDConstants 122 */ 123 [oneway] void setDefaultActions( [in] byte actions ); 124}; 125 126//============================================================================= 127 128}; }; }; }; }; 129 130#endif 131