VirtualBox

source: vbox/trunk/include/VBox/GuestHost/SharedClipboard.h@ 76823

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

*: scm --fix-header-guard-endif

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/** @file
2 * Shared Clipboard - Common Guest and Host Code.
3 */
4
5/*
6 * Copyright (C) 2006-2019 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_SharedClipboard_h
27#define VBOX_INCLUDED_GuestHost_SharedClipboard_h
28#ifndef RT_WITHOUT_PRAGMA_ONCE
29# pragma once
30#endif
31
32#include <iprt/cdefs.h>
33#include <iprt/types.h>
34
35enum
36{
37 /** The number of milliseconds before the clipboard times out. */
38#ifndef TESTCASE
39 CLIPBOARD_TIMEOUT = 5000
40#else
41 CLIPBOARD_TIMEOUT = 1
42#endif
43};
44
45/** Opaque data structure for the X11/VBox frontend/glue code. */
46struct _VBOXCLIPBOARDCONTEXT;
47typedef struct _VBOXCLIPBOARDCONTEXT VBOXCLIPBOARDCONTEXT;
48
49/** Opaque data structure for the X11/VBox backend code. */
50struct _CLIPBACKEND;
51typedef struct _CLIPBACKEND CLIPBACKEND;
52
53/** Opaque request structure for clipboard data.
54 * @todo All use of single and double underscore prefixes is banned! */
55struct _CLIPREADCBREQ;
56typedef struct _CLIPREADCBREQ CLIPREADCBREQ;
57
58/* APIs exported by the X11 backend */
59extern CLIPBACKEND *ClipConstructX11(VBOXCLIPBOARDCONTEXT *pFrontend, bool fHeadless);
60extern void ClipDestructX11(CLIPBACKEND *pBackend);
61#ifdef __cplusplus
62extern int ClipStartX11(CLIPBACKEND *pBackend, bool grab = false);
63#else
64extern int ClipStartX11(CLIPBACKEND *pBackend, bool grab);
65#endif
66extern int ClipStopX11(CLIPBACKEND *pBackend);
67extern void ClipAnnounceFormatToX11(CLIPBACKEND *pBackend,
68 uint32_t u32Formats);
69extern int ClipRequestDataFromX11(CLIPBACKEND *pBackend, uint32_t u32Format,
70 CLIPREADCBREQ *pReq);
71
72/* APIs exported by the X11/VBox frontend */
73extern int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx,
74 uint32_t u32Format, void **ppv,
75 uint32_t *pcb);
76extern void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx,
77 uint32_t u32Formats);
78extern void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc,
79 CLIPREADCBREQ *pReq, void *pv,
80 uint32_t cb);
81#endif /* !VBOX_INCLUDED_GuestHost_SharedClipboard_h */
82
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