xref: /AOO41X/main/offapi/com/sun/star/datatransfer/dnd/XDragSourceContext.idl (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
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_XDragSourceContext_idl__
29#define __com_sun_star_datatransfer_dnd_XDragSourceContext_idl__
30
31#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
32#include <com/sun/star/lang/IllegalArgumentException.idl>
33#endif
34
35//=============================================================================
36
37module com { module sun { module star { module datatransfer { module dnd {
38
39 published interface XDragSourceListener;
40
41//=============================================================================
42/** The drag source context class is responsible for managing the initiator side
43	of the Drag and Drop protocol.
44
45	<p>In particular, it is responsible for managing event notifications to the
46	DragSourceListener and providing the Transferable state to enable the data
47	transfer. </p>
48
49	<p>An instance of this class is created as a result of the method <member>XDragSource::startDrag()</member>
50	being successfully invoked. This instance is responsible
51	for tracking the state of the operation on behalf of the drag source and
52	dispatching state changes to the drag source listener. </p>
53
54	@see com::sun::star::datatransfer::dnd::XDragSourceContext
55	@see com::sun::star::datatransfer::dnd::XDragSourceListener
56*/
57
58published interface XDragSourceContext: com::sun::star::uno::XInterface
59{
60	//-------------------------------------------------------------------------
61	/** Get the identifier of the currently used cursor.
62
63		@returns
64		The currently selected drag cursor.
65	*/
66
67	long getCurrentCursor();
68
69	//-------------------------------------------------------------------------
70	/** This method sets the current drag cursor.
71
72		<p>This method should only be called to set another cursor than the
73		default one for drag action currently selected by the user.</p>
74		<p>Invalid cursor identifiers will be ignored.</p>
75
76		@param cursorId
77		The identifier the drag source returned when registering the cursor.
78	*/
79
80	[oneway] void setCursor( [in] long cursorId );
81
82	//-------------------------------------------------------------------------
83	/** This method sets the current drag image.
84
85		@param dragImage
86		The identifier the drag source returned when registering the image (0 = none).
87		Invalid identifier will be ignored.
88	*/
89
90	[oneway] void setImage( [in] long imageId );
91
92	//-------------------------------------------------------------------------
93	/** This method notifies the context that the
94		<type scope="com::sun::star::datatransfer">DataFlavor</type> types
95		of the transferable object have changed.
96
97		@see com::sun::star::datatransfer::XTransferable
98	*/
99
100	[oneway] void transferablesFlavorsChanged();
101};
102
103//=============================================================================
104
105}; }; }; }; };
106
107#endif
108