VirtualBox

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

Last change on this file since 99770 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.6 KB
Line 
1/** @file
2 * Drag and Drop definitions - Common header for host service and guest clients.
3 */
4
5/*
6 * Copyright (C) 2018-2023 Oracle and/or its affiliates.
7 *
8 * This file is part of VirtualBox base platform packages, as
9 * available from https://www.virtualbox.org.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation, in version 3 of the
14 * License.
15 *
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, see <https://www.gnu.org/licenses>.
23 *
24 * The contents of this file may alternatively be used under the terms
25 * of the Common Development and Distribution License Version 1.0
26 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
27 * in the VirtualBox distribution, in which case the provisions of the
28 * CDDL are applicable instead of those of the GPL.
29 *
30 * You may elect to license modified versions of this file under the
31 * terms and conditions of either the GPL or the CDDL or both.
32 *
33 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
34 */
35
36#ifndef VBOX_INCLUDED_GuestHost_DragAndDropDefs_h
37#define VBOX_INCLUDED_GuestHost_DragAndDropDefs_h
38#ifndef RT_WITHOUT_PRAGMA_ONCE
39# pragma once
40#endif
41
42#include <iprt/types.h>
43
44/*
45 * The mode of operations.
46 */
47#define VBOX_DRAG_AND_DROP_MODE_OFF 0
48#define VBOX_DRAG_AND_DROP_MODE_HOST_TO_GUEST 1
49#define VBOX_DRAG_AND_DROP_MODE_GUEST_TO_HOST 2
50#define VBOX_DRAG_AND_DROP_MODE_BIDIRECTIONAL 3
51
52#define VBOX_DND_ACTION_IGNORE UINT32_C(0)
53#define VBOX_DND_ACTION_COPY RT_BIT_32(0)
54#define VBOX_DND_ACTION_MOVE RT_BIT_32(1)
55#define VBOX_DND_ACTION_LINK RT_BIT_32(2)
56
57/** A single DnD action. */
58typedef uint32_t VBOXDNDACTION;
59/** A list of (OR'ed) DnD actions. */
60typedef uint32_t VBOXDNDACTIONLIST;
61
62#define hasDnDCopyAction(a) ((a) & VBOX_DND_ACTION_COPY)
63#define hasDnDMoveAction(a) ((a) & VBOX_DND_ACTION_MOVE)
64#define hasDnDLinkAction(a) ((a) & VBOX_DND_ACTION_LINK)
65
66#define isDnDIgnoreAction(a) ((a) == VBOX_DND_ACTION_IGNORE)
67#define isDnDCopyAction(a) ((a) == VBOX_DND_ACTION_COPY)
68#define isDnDMoveAction(a) ((a) == VBOX_DND_ACTION_MOVE)
69#define isDnDLinkAction(a) ((a) == VBOX_DND_ACTION_LINK)
70
71/** @def VBOX_DND_FORMATS_DEFAULT
72 * Default drag'n drop formats.
73 * Note: If you add new entries here, make sure you test those
74 * with all supported guest OSes!
75 */
76#define VBOX_DND_FORMATS_DEFAULT \
77 "text/uri-list", \
78 /* Text. */ \
79 "text/html", \
80 "text/plain;charset=utf-8", \
81 "text/plain;charset=utf-16", \
82 "text/plain", \
83 "text/richtext", \
84 "UTF8_STRING", \
85 "TEXT", \
86 "STRING", \
87 /* OpenOffice formats. */ \
88 /* See: https://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Common_Application_Features#OpenOffice.org_Clipboard_Data_Formats */ \
89 "application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source (XML)\"", \
90 "application/x-openoffice;windows_formatname=\"Bitmap\""
91
92/**
93 * Enumeration for keeping a DnD state.
94 */
95typedef enum
96{
97 VBOXDNDSTATE_UNKNOWN = 0,
98 VBOXDNDSTATE_ENTERED,
99 VBOXDNDSTATE_LEFT,
100 VBOXDNDSTATE_QUERY_FORMATS,
101 VBOXDNDSTATE_QUERY_STATUS,
102 VBOXDNDSTATE_DRAGGING,
103 VBOXDNDSTATE_DROP_STARTED,
104 VBOXDNDSTATE_DROP_ENDED,
105 VBOXDNDSTATE_CANCELLED,
106 VBOXDNDSTATE_ERROR
107} VBOXDNDSTATE;
108/** Pointer to a DnD state. */
109typedef VBOXDNDSTATE *PVBOXDNDSTATE;
110
111#endif /* !VBOX_INCLUDED_GuestHost_DragAndDropDefs_h */
112
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