bump product version to 4.1.6.2
[LibreOffice.git] / dtrans / source / win32 / dnd / globals.hxx
blob1828fc1549eea5ccfd7578d6dda2793564823c3e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef _GLOBALS_HXX_
20 #define _GLOBALS_HXX_
22 #include <osl/mutex.hxx>
24 #if defined _MSC_VER
25 #pragma warning(push,1)
26 #endif
27 #include <wtypes.h>
28 #if defined _MSC_VER
29 #pragma warning(pop)
30 #endif
31 #include <sal/types.h>
34 #define DNDSOURCE_SERVICE_NAME "com.sun.star.datatransfer.dnd.OleDragSource"
35 #define DNDSOURCE_IMPL_NAME "com.sun.star.comp.datatransfer.dnd.OleDragSource_V1"
37 #define DNDTARGET_SERVICE_NAME "com.sun.star.datatransfer.dnd.OleDropTarget"
38 #define DNDTARGET_IMPL_NAME "com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1"
40 // This maps key states as occur as parameter, e.g. in IDropTarget::DragEnter,
41 // IDropSource::QueryContinueDrag, to actions as are declared in
42 // com::sun::star::datatransfer::dnd::DNDConstants ( ACTION_MOVE etc).
43 // If the grfKeyState indicates the ALt or right mousebutton then the returned
44 // values combines all possible actions. This is because those key and button are
45 // used when the user expect a menu to appear when he drops. The menu then
46 // contains entries, such as move, copy, link, cancel.
47 // An odd fact is that the argument grfKeyState in IDropTarget::Drop does not
48 // contain mouse buttons (winnt 4 SP6). That indicates that the right mouse button
49 // is not considered relevant in a drag operation. Contrarily the file explorer
50 // gives that button a special meaning: the user has to select the effect from
51 // a context menu on drop.
52 sal_Int8 dndOleKeysToAction( DWORD grfKeyState, sal_Int8 sourceActions);
54 // The function maps a windows DROPEFFECTs to actions
55 // ( com::sun::star::datatransfer::dnd::DNDConstants).
56 // The argument can be a combination of different DROPEFFECTS,
57 // In that case the return value is also a combination of the
58 // appropriate actions.
59 sal_Int8 dndOleDropEffectsToActions( DWORD dwEffect);
61 // The function maps actions ( com::sun::star::datatransfer::dnd::DNDConstants)
62 // to window DROPEFFECTs.
63 // The argument can be a combination of different actions
64 // In that case the return value is also a combination of the
65 // appropriate DROPEFFECTS.
66 DWORD dndActionsToDropEffects( sal_Int8 actions);
68 // If the argument constitutes only one action then it is mapped to the
69 // corresponding DROPEFFECT otherwise DROPEFFECT_MOVE is returned. This is
70 // why move is the default effect (no modifiers pressed, or right mouse button
71 // or Alt).
72 DWORD dndActionsToSingleDropEffect( sal_Int8 actions);
76 struct MutexDummy
78 osl::Mutex m_mutex;
82 #endif
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */