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 .
21 module com
{ module sun
{ module star
{ module datatransfer
{ module dnd
{
23 published
interface XDragSourceListener
;
25 /** This interface is implemented by a view or window that supports drag
26 operations and will be received as part of a DragGestureEvent
27 through a com::sun::star::datatransfer::dnd::XDragGestureListener::dragGestureRecognized()
30 <p>Differently to Java, the association between view and interface is fixed
31 and can not be changed. Otherwise, the AWT messaging would have to be
32 implemented for any window supporting Drag and Drop operations, which would
33 be a real performance issue.</p>
36 published
interface XDragSource
: com
::sun
::star
::uno
::XInterface
39 /** In order to query if drag image support is available.
42 A boolean indicating whether or not drag image support is
43 available on the underlying platform.
46 boolean isDragImageSupported
();
48 /** To get the default cursor for a specified drag action.
51 A drag action as specified in DNDConstants.
54 The default drag cursor for the specified drag action.
55 <p>The returned value may be used as parameter for the method
56 com::sun::star::datatransfer::dnd::XDragSourceContext::setCursor().</p>
59 long getDefaultCursor
( [in] byte dragAction
)
60 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
62 /** Starts the drag operation.
64 <p>Note: this call does <em>not</em> block until the drag and drop
65 operation ends. If the Drag and Drop system is unable to initiate
66 a drag operation or if the user attempts to start a drag while an
67 existing drag operation is still executing, the action fails immediately.
68 This is indicated by calling
69 com::sun::star::datatransfer::dnd::XDragSourceListener::dragDropEnd()
70 on the parameter listener with a DragSourceDragEvent showing a failure.</p>
73 The DragGestureEvent that initiated the drag.
76 The action or actions supported for this transferable as defined
80 The initial drag cursor id or 0 as default.
83 The initial drag image id or 0 as default.
86 The transferable object dragged.
89 The XDragSourceListener.
91 @see com::sun::star::datatransfer::XTransferable
95 [in] DragGestureEvent trigger
,
96 [in] byte sourceActions
,
99 [in] com
::sun
::star
::datatransfer
::XTransferable trans
,
100 [in] XDragSourceListener listener
);
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */