VirtualBox

Changeset 102468 in vbox for trunk/include


Ignore:
Timestamp:
Dec 5, 2023 10:37:41 AM (14 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Added a dedicated event type for the X11 requests/responses. Needed for union access. Added some more checks. ​bugref:10384

File:
1 edited

Legend:

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

    r100684 r102468  
    168168
    169169/**
     170 * Enumeration for an X11 event type.
     171 */
     172typedef enum _SHCLX11EVENTTYPE
     173{
     174    /** Invalid event type. */
     175    SHCLX11EVENTTYPE_INVALID = 0,
     176    /** Reports formats to X11. */
     177    SHCLX11EVENTTYPE_REPORT_FORMATS,
     178    /** Reads clipboard from X11. */
     179    SHCLX11EVENTTYPE_READ
     180} SHCLX11EVENTTYPE;
     181/** Pointer to an enumeration for an X11 event type. */
     182typedef SHCLX11EVENTTYPE *PSHCLX11EVENTTYPE;
     183
     184/**
    170185 * Structure describing an X11 clipboard request.
    171186 */
     
    176191    /** Event associated to this request. */
    177192    PSHCLEVENT       pEvent;
     193    /** Request type for the union below. */
     194    SHCLX11EVENTTYPE enmType;
    178195    union
    179196    {
     
    204221typedef struct _SHCLX11RESPONSE
    205222{
    206     int rc;
    207     struct
     223    /** Response type for the union below. */
     224    SHCLX11EVENTTYPE enmType;
     225    /** rc (IPRT-style) of the operation performed as part of the X event thread. */
     226    int              rc;
     227    union
    208228    {
    209         void    *pvData;
    210         uint32_t cbData;
    211     } Read;
     229        struct
     230        {
     231            void    *pvData;
     232            uint32_t cbData;
     233        } Read;
     234    };
    212235} SHCLX11RESPONSE;
    213236/** Pointer to an X11 clipboard response. */
Note: See TracChangeset for help on using the changeset viewer.

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