VirtualBox

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

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

DragAndDropDefs.h: Either get the #endif comments right, or skip them!

  • 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#include <iprt/types.h>
30
31/*
32 * The mode of operations.
33 */
34#define VBOX_DRAG_AND_DROP_MODE_OFF 0
35#define VBOX_DRAG_AND_DROP_MODE_HOST_TO_GUEST 1
36#define VBOX_DRAG_AND_DROP_MODE_GUEST_TO_HOST 2
37#define VBOX_DRAG_AND_DROP_MODE_BIDIRECTIONAL 3
38
39#define VBOX_DND_ACTION_IGNORE UINT32_C(0)
40#define VBOX_DND_ACTION_COPY RT_BIT_32(0)
41#define VBOX_DND_ACTION_MOVE RT_BIT_32(1)
42#define VBOX_DND_ACTION_LINK RT_BIT_32(2)
43
44/** A single DnD action. */
45typedef uint32_t VBOXDNDACTION;
46/** A list of (OR'ed) DnD actions. */
47typedef uint32_t VBOXDNDACTIONLIST;
48
49#define hasDnDCopyAction(a) ((a) & VBOX_DND_ACTION_COPY)
50#define hasDnDMoveAction(a) ((a) & VBOX_DND_ACTION_MOVE)
51#define hasDnDLinkAction(a) ((a) & VBOX_DND_ACTION_LINK)
52
53#define isDnDIgnoreAction(a) ((a) == VBOX_DND_ACTION_IGNORE)
54#define isDnDCopyAction(a) ((a) == VBOX_DND_ACTION_COPY)
55#define isDnDMoveAction(a) ((a) == VBOX_DND_ACTION_MOVE)
56#define isDnDLinkAction(a) ((a) == VBOX_DND_ACTION_LINK)
57
58/** @def VBOX_DND_FORMATS_DEFAULT
59 * Default drag'n drop formats.
60 * Note: If you add new entries here, make sure you test those
61 * with all supported guest OSes!
62 */
63#define VBOX_DND_FORMATS_DEFAULT \
64 "text/uri-list", \
65 /* Text. */ \
66 "text/html", \
67 "text/plain;charset=utf-8", \
68 "text/plain;charset=utf-16", \
69 "text/plain", \
70 "text/richtext", \
71 "UTF8_STRING", \
72 "TEXT", \
73 "STRING", \
74 /* OpenOffice formats. */ \
75 /* See: https://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Common_Application_Features#OpenOffice.org_Clipboard_Data_Formats */ \
76 "application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source (XML)\"", \
77 "application/x-openoffice;windows_formatname=\"Bitmap\""
78
79#endif
80
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