1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef __com_sun_star_datatransfer_dnd_XDropTarget_idl__
21#define __com_sun_star_datatransfer_dnd_XDropTarget_idl__
22
23#include <com/sun/star/datatransfer/XTransferable.idl>
24#include <com/sun/star/uno/XInterface.idl>
25
26
27module com { module sun { module star { module datatransfer { module dnd {
28
29 published interface XDropTargetListener;
30
31/** This interface is implemented by a view or window that supports drop
32    operations.
33
34    <p>Differently to Java, the association between view and interface is fixed
35    and cannot be changed. Otherwise, the AWT messaging would have to be
36    implemented for any window supporting Drag and Drop operations, which would
37    be a performance issue.</p>
38*/
39
40published interface XDropTarget: com::sun::star::uno::XInterface
41{
42    /** Add a DropTargetListener.
43
44        <p>The listener will be queried for the XAutoscroll interface
45        to see if it supports autoscrolling.</p>
46
47        @param dtl
48        The listener to add to the notification list.
49    */
50
51    void addDropTargetListener( [in] XDropTargetListener dtl );
52
53    /** Remove a drop target listener.
54
55        @param dtl
56        The listener to remove from notification list.
57    */
58
59    void removeDropTargetListener( [in] XDropTargetListener dtl );
60
61    /** Indicates either a drop target object is active or not.
62
63        @returns
64        A boolean indicating whether or not this drop target object is
65        currently active, that is ready to accept drops.
66    */
67
68    boolean isActive();
69
70    /** Sets the drop target object active or inactive.
71
72        @param active
73        A value of `TRUE` sets the drop target object active.
74        <p>A value of `FALSE` sets the drop target object inactive.
75    */
76
77    void setActive( [in] boolean active );
78
79    /** Determine the actions supported by a drop target.
80
81        @returns
82        The current action or actions supported by this drop target.
83
84        <p>By default this will include all drag and drop actions.</p>
85
86        @see com::sun::star::datatransfer::dnd::DNDConstants
87    */
88
89    byte getDefaultActions();
90
91    /** Sets the default acceptable actions for this drop target.
92
93        <p>This method is a way to reduce the number of Drag and Drop events
94        by blocking events for actions not supported by this target.</p>
95        <p>By default the listener will receive notifications for all actions.</p>
96
97        @param actions
98        The actions.
99
100        @see com::sun::star::datatransfer::dnd::DNDConstants
101    */
102    void setDefaultActions( [in] byte actions );
103};
104
105
106}; }; }; }; };
107
108#endif
109
110/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
111