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_XDragSource_idl__ 29#define __com_sun_star_datatransfer_dnd_XDragSource_idl__ 30 31#ifndef __com_sun_star_datatransfer_dnd_InvalidDNDOperationException_idl__ 32#include <com/sun/star/datatransfer/dnd/InvalidDNDOperationException.idl> 33#endif 34 35#ifndef __com_sun_star_datatransfer_dnd_DragGestureEvent_idl__ 36#include <com/sun/star/datatransfer/dnd/DragGestureEvent.idl> 37#endif 38 39#ifndef __com_sun_star_datatransfer_XTransferable_idl__ 40#include <com/sun/star/datatransfer/XTransferable.idl> 41#endif 42 43#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 44#include <com/sun/star/lang/IllegalArgumentException.idl> 45#endif 46 47//============================================================================= 48 49module com { module sun { module star { module datatransfer { module dnd { 50 51 published interface XDragSourceListener; 52 53//============================================================================= 54/** This interface is implemented by a view or window that supports drag 55 operations and will be received as part of a <type>DragGestureEvent</type> 56 through a <member scope="com::sun::star::datatransfer::dnd">XDragGestureListener::dragGestureRecognized()</member> 57 callback. 58 59 <p>Differently to Java, the association between view and interface is fixed 60 and can not be changed. Otherwise, the AWT messaging would have to be 61 implemented for any window supporting Drag and Drop operations, which would 62 be a real performance issue.</p> 63*/ 64 65published interface XDragSource: com::sun::star::uno::XInterface 66{ 67 68 //------------------------------------------------------------------------- 69 /** In order to query if drag image support is available. 70 71 @returns 72 A boolean indicating whether or not drag image support is 73 available on the underlying platform. 74 */ 75 76 boolean isDragImageSupported(); 77 78 //------------------------------------------------------------------------- 79 /** To get the default cursor for a specified drag action. 80 81 @param dragAction 82 A drag action as specified in <type>DNDConstants</type>. 83 84 @returns 85 The default drag cursor for the specified drag action. 86 <p>The returned value may be used as parameter for the method 87 <member scope="com::sun::star::datatransfer::dnd">XDragSourceContext::setCursor()</member>.</p> 88 */ 89 90 long getDefaultCursor( [in] byte dragAction ) 91 raises( com::sun::star::lang::IllegalArgumentException ); 92 93 //------------------------------------------------------------------------- 94 /** Starts the drag operation. 95 96 <p>Note: this call does <em>not</em> block until the drag and drop 97 operation ends. If the Drag and Drop system is unable to initiate 98 a drag operation or if the user attempts to start a drag while an 99 existing drag operation is still executing, the action fails immediately. 100 This is indicated by calling 101 <member scope="com::sun::star::datatransfer::dnd">XDragSourceListener::dragDropEnd()</member> 102 on the parameter listener with a DragSourceDragEvent showing a failure.</p> 103 104 @param trigger 105 The <type>DragGestureEvent</type> that initiated the drag. 106 107 @param sourceActions 108 The action or actions supported for this transferable as defined 109 in <type>DNDConstants</type>. 110 111 @param cursor 112 The initial drag cursor id or 0 as default. 113 114 @param image 115 The initial drag image id or 0 as default. 116 117 @param trans 118 The transferable object dragged. 119 120 @param listener 121 The <type>XDragSourceListener</type>. 122 123 @see com::sun::star::datatransfer::XTransferable 124 */ 125 126 [oneway] void startDrag( 127 [in] DragGestureEvent trigger, 128 [in] byte sourceActions, 129 [in] long cursor, 130 [in] long image, 131 [in] com::sun::star::datatransfer::XTransferable trans, 132 [in] XDragSourceListener listener ); 133}; 134 135//============================================================================= 136 137}; }; }; }; }; 138 139#endif 140