VirtualBox

Changeset 81044 in vbox


Ignore:
Timestamp:
Sep 27, 2019 10:49:07 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133647
Message:

Shared Clipboard/X11: Emphasize which X11 backend APIs are callbacks and which aren't.

Location:
trunk
Files:
4 edited

Legend:

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

    r80858 r81044  
    225225typedef struct _CLIPREADCBREQ CLIPREADCBREQ;
    226226
    227 /* APIs exported by the X11 backend */
     227/* APIs exported by the X11 backend. */
    228228extern CLIPBACKEND *ClipConstructX11(SHCLCONTEXT *pFrontend, bool fHeadless);
    229229extern void ClipDestructX11(CLIPBACKEND *pBackend);
     
    233233extern int ClipRequestDataFromX11(CLIPBACKEND *pBackend, SHCLFORMATS vboxFormat, CLIPREADCBREQ *pReq);
    234234
    235 /* APIs exported by the X11/VBox frontend */
    236 extern int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb);
    237 extern void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats);
    238 extern void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb);
     235/* APIs (as callbacks) exported by the X11/VBox frontend. */
     236extern DECLCALLBACK(int)  ClipRequestDataForX11Callback(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb);
     237extern DECLCALLBACK(void) ClipReportX11FormatsCallback(SHCLCONTEXT *pCtx, uint32_t u32Formats);
     238extern DECLCALLBACK(void) ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb);
    239239#endif /* !VBOX_INCLUDED_GuestHost_SharedClipboard_h */
    240240
  • trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp

    r81043 r81044  
    8686 *                    returned
    8787 */
    88 int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
     88DECLCALLBACK(int) ClipRequestDataForX11Callback(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
    8989{
    9090    RT_NOREF(pCtx);
     
    148148 * @param u32Formats            The formats to report.
    149149 */
    150 void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats)
     150DECLCALLBACK(void) ClipReportX11FormatsCallback(SHCLCONTEXT *pCtx, uint32_t u32Formats)
    151151{
    152152    RT_NOREF(pCtx);
     
    166166 * @param  cb        the size of the data in @a pv
    167167 */
    168 void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
     168DECLCALLBACK(void) ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
    169169{
    170170    RT_NOREF(pCtx);
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp

    r81043 r81044  
    377377                    pCtx->X11TextFormat, pCtx->X11BitmapFormat, pCtx->X11HTMLFormat,
    378378                    u32VBoxFormats ));
    379     ClipReportX11Formats(pCtx->pFrontend, u32VBoxFormats);
     379    ClipReportX11FormatsCallback(pCtx->pFrontend, u32VBoxFormats);
    380380}
    381381
     
    10971097    {
    10981098        if (pCtx->pvUnicodeCache == NULL)
    1099             rc = ClipRequestDataForX11(pCtx->pFrontend, u32Format,
    1100                                               &pCtx->pvUnicodeCache,
    1101                                               &pCtx->cbUnicodeCache);
     1099            rc = ClipRequestDataForX11Callback(pCtx->pFrontend, u32Format,
     1100                                               &pCtx->pvUnicodeCache,
     1101                                               &pCtx->cbUnicodeCache);
    11021102        if (RT_SUCCESS(rc))
    11031103        {
     
    11091109    }
    11101110    else
    1111         rc = ClipRequestDataForX11(pCtx->pFrontend, u32Format,
    1112                                           ppv, pcb);
     1111        rc = ClipRequestDataForX11Callback(pCtx->pFrontend, u32Format,
     1112                                           ppv, pcb);
    11131113    LogRelFlowFunc(("returning %Rrc\n", rc));
    11141114    if (RT_SUCCESS(rc))
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r80995 r81044  
    6262 * @param  u32Formats           The formats available.
    6363 */
    64 void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats)
     64DECLCALLBACK(void) ClipReportX11FormatsCallback(SHCLCONTEXT *pCtx, uint32_t u32Formats)
    6565{
    6666    LogFlowFunc(("pCtx=%p, u32Formats=%02X\n", pCtx, u32Formats));
     
    351351 * @note   Host glue code.
    352352 */
    353 int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
     353DECLCALLBACK(int) ClipRequestDataForX11Callback(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
    354354{
    355355    LogFlowFunc(("pCtx=%p, u32Format=%02X, ppv=%p\n", pCtx, u32Format, ppv));
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