1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_datatransfer_dnd_XDragSource_idl__
21 #define __com_sun_star_datatransfer_dnd_XDragSource_idl__
23 #include
<com
/sun
/star
/datatransfer
/dnd
/InvalidDNDOperationException.idl
>
24 #include
<com
/sun
/star
/datatransfer
/dnd
/DragGestureEvent.idl
>
25 #include
<com
/sun
/star
/datatransfer
/XTransferable.idl
>
26 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
29 module com
{ module sun
{ module star
{ module datatransfer
{ module dnd
{
31 published
interface XDragSourceListener
;
33 /** This interface is implemented by a view or window that supports drag
34 operations and will be received as part of a DragGestureEvent
35 through a com::sun::star::datatransfer::dnd::XDragGestureListener::dragGestureRecognized()
38 <p>Differently to Java, the association between view and interface is fixed
39 and can not be changed. Otherwise, the AWT messaging would have to be
40 implemented for any window supporting Drag and Drop operations, which would
41 be a real performance issue.</p>
44 published
interface XDragSource
: com
::sun
::star
::uno
::XInterface
47 /** In order to query if drag image support is available.
50 A boolean indicating whether or not drag image support is
51 available on the underlying platform.
54 boolean isDragImageSupported
();
56 /** To get the default cursor for a specified drag action.
59 A drag action as specified in DNDConstants.
62 The default drag cursor for the specified drag action.
63 <p>The returned value may be used as parameter for the method
64 com::sun::star::datatransfer::dnd::XDragSourceContext::setCursor().</p>
67 long getDefaultCursor
( [in] byte dragAction
)
68 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
70 /** Starts the drag operation.
72 <p>Note: this call does <em>not</em> block until the drag and drop
73 operation ends. If the Drag and Drop system is unable to initiate
74 a drag operation or if the user attempts to start a drag while an
75 existing drag operation is still executing, the action fails immediately.
76 This is indicated by calling
77 com::sun::star::datatransfer::dnd::XDragSourceListener::dragDropEnd()
78 on the parameter listener with a DragSourceDragEvent showing a failure.</p>
81 The DragGestureEvent that initiated the drag.
84 The action or actions supported for this transferable as defined
88 The initial drag cursor id or 0 as default.
91 The initial drag image id or 0 as default.
94 The transferable object dragged.
97 The XDragSourceListener.
99 @see com::sun::star::datatransfer::XTransferable
103 [in] DragGestureEvent trigger
,
104 [in] byte sourceActions
,
107 [in] com
::sun
::star
::datatransfer
::XTransferable trans
,
108 [in] XDragSourceListener listener
);
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */