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