VirtualBox

Changeset 82480 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Dec 7, 2019 12:32:57 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
135332
Message:

GuestHost/SharedClipboard.h: Got rid of all the leading underscores that I could spot. Shuffled the members of SHCLDATABLOCK so we save 8 bytes on 64-bit machines. bugref:9437

Location:
trunk/include/VBox/GuestHost
Files:
3 edited

Legend:

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

    r82478 r82480  
    4242
    4343#include <VBox/GuestHost/SharedClipboard.h>
     44
     45
     46struct SHCLTRANSFER;
     47/** Pointer to a single shared clipboard transfer   */
     48typedef struct SHCLTRANSFER *PSHCLTRANSFER;
    4449
    4550
     
    713718} SHCLTRANSFERSTATE, *PSHCLTRANSFERSTATE;
    714719
    715 struct _SHCLTRANSFER;
    716 typedef struct _SHCLTRANSFER *PSHCLTRANSFER;
    717 
    718720/**
    719721 * Structure maintaining clipboard transfer provider context data.
     
    801803} SHCLPROVIDERCREATIONCTX, *PSHCLPROVIDERCREATIONCTX;
    802804
    803 struct _SHCLTRANSFER;
    804 typedef _SHCLTRANSFER *PSHCLTRANSFER;
    805805
    806806/**
     
    882882
    883883/**
    884  * Structure for maintaining a single Shared Clipboard transfer.
     884 * A single Shared Clipboard transfer.
    885885 *
    886886 ** @todo Not yet thread safe.
    887887 */
    888 typedef struct _SHCLTRANSFER
     888typedef struct SHCLTRANSFER
    889889{
    890890    /** The node member for using this struct in a RTList. */
  • trunk/include/VBox/GuestHost/SharedClipboard-x11.h

    r82266 r82480  
    5454/** Defines an index of the X11 clipboad format table. */
    5555typedef unsigned SHCLX11FMTIDX;
    56 
    57 /** Prototype for the implementation-specfic Shared Clipboard context. */
    58 struct _SHCLCONTEXT;
    59 typedef SHCLCONTEXT _SHCLCONTEXT;
    6056
    6157/**
  • trunk/include/VBox/GuestHost/SharedClipboard.h

    r82476 r82480  
    3030#endif
    3131
    32 #include <iprt/cdefs.h>
     32#include <iprt/types.h>
    3333#include <iprt/list.h>
    34 #include <iprt/types.h>
    35 
    36 /**
    37  * Enumeration specifying an Shared Clipboard transfer direction.
    38  */
    39 typedef enum _SHCLTRANSFERDIR
     34
     35/**
     36 * Shared Clipboard transfer direction.
     37 */
     38typedef enum SHCLTRANSFERDIR
    4039{
    4140    /** Unknown transfer directory. */
     
    4746    /** The usual 32-bit hack. */
    4847    SHCLTRANSFERDIR_32BIT_HACK = 0x7fffffff
    49 } SHCLTRANSFERDIR, *PSHCLTRANSFERDIR;
    50 
    51 struct _SHCLTRANSFER;
    52 typedef struct _SHCLTRANSFER SHCLTRANSFER;
     48} SHCLTRANSFERDIR;
     49/** Pointer to a shared clipboard transfer direction. */
     50typedef SHCLTRANSFERDIR *PSHCLTRANSFERDIR;
     51
    5352
    5453/** A single Shared Clipboard format. */
     
    6261typedef SHCLFORMATS *PSHCLFORMATS;
    6362
    64 /**
    65  * Supported data formats for Shared Clipboard. Bit mask.
     63/** @name VBOX_SHCL_FMT_XXX - Data formats (flags) for Shared Clipboard.
     64 * @todo r=bird: Wrong header, belongs in the host service!
     65 * @{
    6666 */
    6767/** No format set. */
     
    7575#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    7676/** Shared Clipboard format is a transfer list. */
    77 #define VBOX_SHCL_FMT_URI_LIST      RT_BIT(3)
     77# define VBOX_SHCL_FMT_URI_LIST     RT_BIT(3)
    7878#endif
    79 
    80 /**
    81  * Structure for keeping a generic Shared Clipboard data block.
    82  */
    83 typedef struct _SHCLDATABLOCK
     79/** @}  */
     80
     81/**
     82 * Generic Shared Clipboard data block.
     83 */
     84typedef struct SHCLDATABLOCK
    8485{
    8586    /** Clipboard format this data block represents. */
    8687    SHCLFORMAT  uFormat;
     88    /** Size (in bytes) of actual data block. */
     89    uint32_t    cbData;
    8790    /** Pointer to actual data block. */
    8891    void       *pvData;
    89     /** Size (in bytes) of actual data block. */
    90     uint32_t    cbData;
    91 } SHCLDATABLOCK, *PSHCLDATABLOCK;
    92 
    93 /**
    94  * Structure for keeping a Shared Clipboard data read request.
    95  */
    96 typedef struct _SHCLDATAREQ
     92} SHCLDATABLOCK;
     93/** Pointer to a generic shared clipboard data block. */
     94typedef SHCLDATABLOCK *PSHCLDATABLOCK;
     95
     96/**
     97 * Shared Clipboard data read request.
     98 */
     99typedef struct SHCLDATAREQ
    97100{
    98101    /** In which format the data needs to be sent. */
     
    102105    /** Maximum data (in byte) can be sent. */
    103106    uint32_t   cbSize;
    104 } SHCLDATAREQ, *PSHCLDATAREQ;
    105 
    106 /**
    107  * Structure for keeping Shared Clipboard formats specifications.
    108  */
    109 typedef struct _SHCLFORMATDATA
     107} SHCLDATAREQ;
     108/** Pointer to a shared clipboard data request. */
     109typedef SHCLDATAREQ *PSHCLDATAREQ;
     110
     111/**
     112 * Shared Clipboard formats specification.
     113 */
     114typedef struct SHCLFORMATDATA
    110115{
    111116    /** Available format(s) as bit map. */
     
    113118    /** Formats flags. Currently unused. */
    114119    uint32_t    fFlags;
    115 } SHCLFORMATDATA, *PSHCLFORMATDATA;
    116 
    117 /**
    118  * Structure for an (optional) Shared Clipboard event payload.
    119  */
    120 typedef struct _SHCLEVENTPAYLOAD
     120} SHCLFORMATDATA;
     121/** Pointer to a shared clipboard formats specification. */
     122typedef SHCLFORMATDATA *PSHCLFORMATDATA;
     123
     124/**
     125 * Shared Clipboard event payload (optional).
     126 */
     127typedef struct SHCLEVENTPAYLOAD
    121128{
    122129    /** Payload ID; currently unused. */
     
    126133    /** Pointer to actual payload data. */
    127134    void    *pvData;
    128 } SHCLEVENTPAYLOAD, *PSHCLEVENTPAYLOAD;
    129 
    130 /** Defines an event source ID. */
     135} SHCLEVENTPAYLOAD;
     136/** Pointer to a shared clipboard event payload. */
     137typedef SHCLEVENTPAYLOAD *PSHCLEVENTPAYLOAD;
     138
     139/** A shared clipboard event source ID. */
    131140typedef uint16_t SHCLEVENTSOURCEID;
    132 /** Defines a pointer to a event source ID. */
     141/** Pointer to a shared clipboard event source ID. */
    133142typedef SHCLEVENTSOURCEID *PSHCLEVENTSOURCEID;
    134143
    135 /** Defines a session ID. */
    136 typedef uint16_t     SHCLSESSIONID;
    137 /** Defines a pointer to a session ID. */
    138 typedef SHCLSESSIONID *PSHCLSESSIONID;
    139 /** Defines a NIL session ID. */
     144/** A shared clipboard session ID. */
     145typedef uint16_t        SHCLSESSIONID;
     146/** Pointer to a shared clipboard session ID. */
     147typedef SHCLSESSIONID  *PSHCLSESSIONID;
     148/** NIL shared clipboard session ID. */
    140149#define NIL_SHCLSESSIONID                        UINT16_MAX
    141150
    142 /** Defines a transfer ID. */
    143 typedef uint16_t     SHCLTRANSFERID;
    144 /** Defines a pointer to a transfer ID. */
     151/** A shared clipboard transfer ID. */
     152typedef uint16_t        SHCLTRANSFERID;
     153/** Pointer to a shared clipboard transfer ID. */
    145154typedef SHCLTRANSFERID *PSHCLTRANSFERID;
    146 /** Defines a NIL transfer ID. */
     155/** NIL shared clipboardtransfer ID. */
    147156#define NIL_SHCLTRANSFERID                       UINT16_MAX
    148157
    149 /** Defines an event ID. */
    150 typedef uint32_t     SHCLEVENTID;
    151 /** Defines a pointer to a event source ID. */
    152 typedef SHCLEVENTID *PSHCLEVENTID;
    153 /** Defines a NIL event ID. */
     158/** A shared clipboard event ID. */
     159typedef uint32_t        SHCLEVENTID;
     160/** Pointer to a shared clipboard event source ID. */
     161typedef SHCLEVENTID    *PSHCLEVENTID;
     162/** NIL shared clipboard event ID. */
    154163#define NIL_SHCLEVENTID                          UINT32_MAX
    155164
    156165/** Maximum number of concurrent Shared Clipboard client sessions a VM can have. */
    157166#define VBOX_SHCL_MAX_SESSIONS                   (UINT16_MAX - 1)
    158 /** Maximum number of concurrent Shared Clipboard transfers a single
    159  *  client can have. */
     167/** Maximum number of concurrent Shared Clipboard transfers a single client can have. */
    160168#define VBOX_SHCL_MAX_TRANSFERS                  (UINT16_MAX - 1)
    161169/** Maximum number of events a single Shared Clipboard transfer can have. */
     
    163171
    164172/**
    165  * Creates a context ID out of a client ID, a transfer ID and a count (can be an event ID).
     173 * Creates a context ID out of a client ID, a transfer ID and an event ID (count).
    166174 */
    167175#define VBOX_SHCL_CONTEXTID_MAKE(a_idSession, a_idTransfer, a_idEvent) \
     
    182190 * Shared Clipboard event.
    183191 */
    184 typedef struct _SHCLEVENT
     192typedef struct SHCLEVENT
    185193{
    186194    /** List node. */
    187     RTLISTNODE        Node;
     195    RTLISTNODE          Node;
    188196    /** The event's ID, for self-reference. */
    189     SHCLEVENTID       uID;
     197    SHCLEVENTID         uID;
    190198    /** Event semaphore for signalling the event. */
    191     RTSEMEVENT        hEventSem;
    192     /** Payload to this event. Optional and can be NULL. */
    193     PSHCLEVENTPAYLOAD pPayload;
    194 } SHCLEVENT, *PSHCLEVENT;
     199    RTSEMEVENT          hEventSem;
     200    /** Payload to this event, optional (NULL). */
     201    PSHCLEVENTPAYLOAD   pPayload;
     202} SHCLEVENT;
     203/** Pointer to a shared clipboard event. */
     204typedef SHCLEVENT *PSHCLEVENT;
    195205
    196206/**
     
    208218    /** List of events (PSHCLEVENT). */
    209219    RTLISTANCHOR      lstEvents;
    210 } SHCLEVENTSOURCE, *PSHCLEVENTSOURCE;
     220} SHCLEVENTSOURCE;
     221/** Pointer to a shared clipboard event source. */
     222typedef SHCLEVENTSOURCE *PSHCLEVENTSOURCE;
    211223
    212224/** @name Shared Clipboard data payload functions.
     
    252264} SHCLSOURCE;
    253265
    254 /** Opaque data structure for the X11/VBox frontend/glue code. */
    255 struct _SHCLCONTEXT;
    256 typedef struct _SHCLCONTEXT SHCLCONTEXT;
    257 typedef struct _SHCLCONTEXT *PSHCLCONTEXT;
     266/** Opaque data structure for the X11/VBox frontend/glue code.
     267 * @{ */
     268struct SHCLCONTEXT;
     269typedef struct SHCLCONTEXT SHCLCONTEXT;
     270/** @} */
     271/** Pointer to opaque data structure the X11/VBox frontend/glue code. */
     272typedef SHCLCONTEXT *PSHCLCONTEXT;
    258273
    259274/** Opaque request structure for X11 clipboard data.
    260  * @todo All use of single and double underscore prefixes is banned! */
    261 struct _CLIPREADCBREQ;
    262 typedef struct _CLIPREADCBREQ CLIPREADCBREQ;
     275 * @{ */
     276struct CLIPREADCBREQ;
     277typedef struct CLIPREADCBREQ CLIPREADCBREQ;
     278/** @} */
    263279
    264280#endif /* !VBOX_INCLUDED_GuestHost_SharedClipboard_h */
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