VirtualBox

Changeset 100328 in vbox for trunk/include


Ignore:
Timestamp:
Jun 29, 2023 9:47:33 AM (20 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
158043
Message:

Shared Clipboard: Implemented a (very) basic and generic clipboard cache; to be used on the guest and host side. bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/GuestHost/SharedClipboard.h

    r100204 r100328  
    6969 *  @since 7.1
    7070 */
    71 # define VBOX_SHCL_FMT_URI_LIST     RT_BIT(3)
     71#define VBOX_SHCL_FMT_URI_LIST      RT_BIT(3)
     72/** Shared Clipboard format valid mask. */
     73#define VBOX_SHCL_FMT_VALID_MASK    0xf
     74/** Maximum number of Shared Clipboard formats.
     75 *  This currently ASSUMES that there are no gaps in the bit mask. */
     76#define VBOX_SHCL_FMT_MAX           VBOX_SHCL_FMT_VALID_MASK
    7277/** @}  */
    7378
     
    249254} SHCLSOURCE;
    250255
     256/** @name Shared Clipboard caching.
     257 *  @{
     258 */
     259/**
     260 * A single Shared CLipboard cache entry.
     261 */
     262typedef struct _SHCLCACHEENTRY
     263{
     264    /** Entry data.
     265     *  Acts as a beacon for entry validation. */
     266    void  *pvData;
     267    /** Entry data size (in bytes). */
     268    size_t cbData;
     269} SHCLCACHEENTRY;
     270/** Pointer to a Shared Clipboard cache entry. */
     271typedef SHCLCACHEENTRY *PSHCLCACHEENTRY;
     272
     273/**
     274 * A (very simple) Shared Clipboard cache.
     275 */
     276typedef struct _SHCLCACHE
     277{
     278    /** Entries for all formats.
     279     *  Right now this is static to keep it simple. */
     280    SHCLCACHEENTRY aEntries[VBOX_SHCL_FMT_MAX];
     281} SHCLCACHE;
     282/** Pointer to a Shared Clipboard cache. */
     283typedef SHCLCACHE *PSHCLCACHE;
     284
     285void ShClCacheEntryGet(PSHCLCACHEENTRY pCacheEntry, void **pvData, size_t *pcbData);
     286
     287void ShClCacheInit(PSHCLCACHE pCache);
     288void ShClCacheDestroy(PSHCLCACHE pCache);
     289void ShClCacheInvalidate(PSHCLCACHE pCache);
     290void ShClCacheInvalidateEntry(PSHCLCACHE pCache, SHCLFORMAT uFmt);
     291PSHCLCACHEENTRY ShClCacheGet(PSHCLCACHE pCache, SHCLFORMAT uFmt);
     292int ShClCacheSet(PSHCLCACHE pCache, SHCLFORMAT uFmt, const void *pvData, size_t cbData);
     293/** @}  */
     294
    251295/** Opaque data structure for the X11/VBox frontend/glue code.
    252296 * @{ */
Note: See TracChangeset for help on using the changeset viewer.

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