VirtualBox

source: vbox/trunk/include/VBox/GuestHost/DragAndDropDefs.h@ 74439

Last change on this file since 74439 was 74439, checked in by vboxsync, 6 years ago

DnD: Added typedefs for DNDACTION and DNDACTIONLIST to emphasize usage, did some renaming to clean things up.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
Line 
1/** @file
2 * Drag and Drop definitions - Common header for host service and guest clients.
3 */
4
5/*
6 * Copyright (C) 2018 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef ___VBox_DnDDefs_h
27#define ___VBox_DnDDefs_h
28
29/*
30 * The mode of operations.
31 */
32#define VBOX_DRAG_AND_DROP_MODE_OFF 0
33#define VBOX_DRAG_AND_DROP_MODE_HOST_TO_GUEST 1
34#define VBOX_DRAG_AND_DROP_MODE_GUEST_TO_HOST 2
35#define VBOX_DRAG_AND_DROP_MODE_BIDIRECTIONAL 3
36
37#define VBOX_DND_ACTION_IGNORE UINT32_C(0)
38#define VBOX_DND_ACTION_COPY RT_BIT_32(0)
39#define VBOX_DND_ACTION_MOVE RT_BIT_32(1)
40#define VBOX_DND_ACTION_LINK RT_BIT_32(2)
41
42/** A single DnD action. */
43typedef uint32_t VBOXDNDACTION;
44/** A list of (OR'ed) DnD actions. */
45typedef uint32_t VBOXDNDACTIONLIST;
46
47#define hasDnDCopyAction(a) ((a) & VBOX_DND_ACTION_COPY)
48#define hasDnDMoveAction(a) ((a) & VBOX_DND_ACTION_MOVE)
49#define hasDnDLinkAction(a) ((a) & VBOX_DND_ACTION_LINK)
50
51#define isDnDIgnoreAction(a) ((a) == VBOX_DND_ACTION_IGNORE)
52#define isDnDCopyAction(a) ((a) == VBOX_DND_ACTION_COPY)
53#define isDnDMoveAction(a) ((a) == VBOX_DND_ACTION_MOVE)
54#define isDnDLinkAction(a) ((a) == VBOX_DND_ACTION_LINK)
55
56/** @def VBOX_DND_FORMATS_DEFAULT
57 * Default drag'n drop formats.
58 * Note: If you add new entries here, make sure you test those
59 * with all supported guest OSes!
60 */
61#define VBOX_DND_FORMATS_DEFAULT \
62 "text/uri-list", \
63 /* Text. */ \
64 "text/html", \
65 "text/plain;charset=utf-8", \
66 "text/plain;charset=utf-16", \
67 "text/plain", \
68 "text/richtext", \
69 "UTF8_STRING", \
70 "TEXT", \
71 "STRING", \
72 /* OpenOffice formats. */ \
73 /* See: https://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Common_Application_Features#OpenOffice.org_Clipboard_Data_Formats */ \
74 "application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source (XML)\"", \
75 "application/x-openoffice;windows_formatname=\"Bitmap\""
76
77#endif /* ___VBox_DnDDefs_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette