VirtualBox

Changeset 93321 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 18, 2022 3:20:39 PM (3 years ago)
Author:
vboxsync
Message:

Shared Clipboard/X11: Renamed mandatory (own) X11 callbacks to better point out the data flow, added some docs.

Location:
trunk/src/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp

    r93115 r93321  
    5858
    5959
    60 DECLCALLBACK(int) ShClX11RequestDataForX11Callback(PSHCLCONTEXT pCtx, SHCLFORMAT uFmt, void **ppv, uint32_t *pcb)
     60/** @copydoc ShClX11RequestDataCallback */
     61DECLCALLBACK(int) ShClX11RequestDataCallback(PSHCLCONTEXT pCtx, SHCLFORMAT uFmt, void **ppv, uint32_t *pcb)
    6162{
    6263    LogFlowFunc(("pCtx=%p, uFmt=%#x\n", pCtx, uFmt));
     
    143144};
    144145
     146/** @copydoc ShClX11ReportFormatsCallback */
    145147DECLCALLBACK(void) ShClX11ReportFormatsCallback(PSHCLCONTEXT pCtx, SHCLFORMATS fFormats)
    146148{
     
    154156}
    155157
    156 DECLCALLBACK(void) ShClX11RequestFromX11CompleteCallback(PSHCLCONTEXT pCtx, int rcCompletion,
    157                                                          CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
     158/** @copydoc ShClX11ReportDataCallback */
     159DECLCALLBACK(void) ShClX11ReportDataCallback(PSHCLCONTEXT pCtx, int rcCompletion,
     160                                             CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
    158161{
    159162    LogFlowFunc(("rcCompletion=%Rrc, Format=0x%x, pv=%p, cb=%RU32\n", rcCompletion, pReq->Format, pv, cb));
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp

    r93314 r93321  
    14531453    {
    14541454        if (pCtx->pvUnicodeCache == NULL) /** @todo r=andy Using string cache here? */
    1455             rc = ShClX11RequestDataForX11Callback(pCtx->pFrontend, uFmt,
    1456                                                   &pCtx->pvUnicodeCache,
    1457                                                   &pCtx->cbUnicodeCache);
     1455            rc = ShClX11RequestDataCallback(pCtx->pFrontend, uFmt,
     1456                                            &pCtx->pvUnicodeCache,
     1457                                            &pCtx->cbUnicodeCache);
    14581458        if (RT_SUCCESS(rc))
    14591459        {
     
    14661466    }
    14671467    else
    1468         rc = ShClX11RequestDataForX11Callback(pCtx->pFrontend, uFmt, &pv, &cb);
     1468        rc = ShClX11RequestDataCallback(pCtx->pFrontend, uFmt, &pv, &cb);
    14691469
    14701470
     
    21512151                g_aFormats[pReq->idxFmtX11].pcszAtom, pReq->idxFmtX11, pReq->uFmtVBox, rc));
    21522152
    2153     ShClX11RequestFromX11CompleteCallback(pReq->pCtx->pFrontend, rc, pReq->pReq,
    2154                                           pvDst, cbDst);
     2153    ShClX11ReportDataCallback(pReq->pCtx->pFrontend, rc, pReq->pReq, pvDst, cbDst);
     2154
    21552155    RTMemFree(pvDst);
    21562156    RTMemFree(pReq);
     
    22742274        /* The clipboard callback was never scheduled, so we must signal
    22752275         * that the request processing is finished and clean up ourselves. */
    2276         ShClX11RequestFromX11CompleteCallback(pReq->pCtx->pFrontend, rc, pReq->pReq,
    2277                                               NULL /* pv */ ,0 /* cb */);
     2276        ShClX11ReportDataCallback(pReq->pCtx->pFrontend, rc, pReq->pReq,
     2277                                  NULL /* pv */ ,0 /* cb */);
    22782278        RTMemFree(pReq);
    22792279    }
  • trunk/src/VBox/GuestHost/SharedClipboard/testcase/tstClipboardGH-X11.cpp

    r93315 r93321  
    119119}
    120120
    121 DECLCALLBACK(int) ShClX11RequestDataForX11Callback(PSHCLCONTEXT pCtx, uint32_t uFmt, void **ppv, uint32_t *pcb)
     121/** @copydoc ShClX11RequestDataCallback */
     122DECLCALLBACK(int) ShClX11RequestDataCallback(PSHCLCONTEXT pCtx, SHCLFORMAT uFmt, void **ppv, uint32_t *pcb)
    122123{
    123124    RT_NOREF(pCtx, uFmt);
     
    398399static char g_tst_abCompletedBuf[TESTCASE_MAX_BUF_SIZE];
    399400
    400 DECLCALLBACK(void) ShClX11RequestFromX11CompleteCallback(PSHCLCONTEXT pCtx, int rcCompletion,
    401                                                          CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
     401DECLCALLBACK(void) ShClX11ReportDataCallback(PSHCLCONTEXT pCtx, int rcCompletion,
     402                                             CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
    402403{
    403404    RT_NOREF(pCtx);
  • trunk/src/VBox/GuestHost/SharedClipboard/testcase/tstClipboardGH-X11Smoke.cpp

    r93115 r93321  
    3131
    3232
    33 DECLCALLBACK(int) ShClX11RequestDataForX11Callback(PSHCLCONTEXT pCtx, SHCLFORMAT uFmt, void **ppv, uint32_t *pcb)
     33/** @copydoc ShClX11RequestDataCallback */
     34DECLCALLBACK(int) ShClX11RequestDataCallback(PSHCLCONTEXT pCtx, SHCLFORMAT uFmt, void **ppv, uint32_t *pcb)
    3435{
    3536    RT_NOREF(pCtx, uFmt, ppv, pcb);
     
    3738}
    3839
     40/** @copydoc ShClX11ReportFormatsCallback */
    3941DECLCALLBACK(void) ShClX11ReportFormatsCallback(PSHCLCONTEXT pCtx, SHCLFORMATS fFormats)
    4042{
     
    4244}
    4345
    44 DECLCALLBACK(void) ShClX11RequestFromX11CompleteCallback(PSHCLCONTEXT pCtx, int rcCompletion,
    45                                                          CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
     46/** @copydoc ShClX11ReportDataCallback */
     47DECLCALLBACK(void) ShClX11ReportDataCallback(PSHCLCONTEXT pCtx, int rcCompletion,
     48                                             CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
    4649{
    4750    RT_NOREF(pCtx, rcCompletion, pReq, pv, cb);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r93115 r93321  
    307307}
    308308
    309 DECLCALLBACK(void) ShClX11RequestFromX11CompleteCallback(PSHCLCONTEXT pCtx, int rcCompletion,
    310                                                          CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
     309/** @copydoc ShClX11ReportDataCallback */
     310DECLCALLBACK(void) ShClX11ReportDataCallback(PSHCLCONTEXT pCtx, int rcCompletion,
     311                                             CLIPREADCBREQ *pReq, void *pv, uint32_t cb)
    311312{
    312313    AssertPtrReturnVoid(pCtx);
     
    348349        RTMemFree(pReq);
    349350
    350     LogRel2(("Shared Clipboard: Request for clipboard data from X11 host completed with %Rrc\n", rcCompletion));
    351 }
    352 
    353 DECLCALLBACK(int) ShClX11RequestDataForX11Callback(PSHCLCONTEXT pCtx, SHCLFORMAT uFmt, void **ppv, uint32_t *pcb)
     351    LogRel2(("Shared Clipboard: Reading X11 clipboard data from host completed with %Rrc\n", rcCompletion));
     352}
     353
     354/** @copydoc ShClX11RequestDataCallback */
     355DECLCALLBACK(int) ShClX11RequestDataCallback(PSHCLCONTEXT pCtx, SHCLFORMAT uFmt, void **ppv, uint32_t *pcb)
    354356{
    355357    LogFlowFunc(("pCtx=%p, uFmt=0x%x\n", pCtx, uFmt));
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