VirtualBox

Changeset 93314 in vbox


Ignore:
Timestamp:
Jan 18, 2022 1:59:14 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
149384
Message:

Shared Clipboard/X11: Renaming "formats" to "targets", to better point out this is what X uses as clipboard formats.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp

    r93232 r93314  
    9494class formats;
    9595SHCL_X11_DECL(Atom) clipGetAtom(PSHCLX11CTX pCtx, const char *pszName);
    96 SHCL_X11_DECL(void) clipQueryX11Formats(PSHCLX11CTX pCtx);
     96SHCL_X11_DECL(void) clipQueryX11Targets(PSHCLX11CTX pCtx);
    9797
    9898static int          clipInitInternal(PSHCLX11CTX pCtx);
     
    702702        /* We may already be out of date. */
    703703        clipSetXtNeedsUpdate(pCtx, false);
    704         clipQueryX11Formats(pCtx);
     704        clipQueryX11Targets(pCtx);
    705705        return;
    706706    }
     
    719719
    720720/**
    721  * Notifies the VBox clipboard about available data formats, based on the
    722  * "targets" information obtained from the X11 clipboard.
    723  *
    724  * @note  Callback for XtGetSelectionValue().
     721 * Notifies the VBox clipboard about available data formats ("targets" on X11),
     722 * based on the information obtained from the X11 clipboard.
     723 *
     724 * @note  Callback installed by clipQueryX11Targets() for XtGetSelectionValue().
    725725 * @note  This function is treated as API glue, and as such is not part of any
    726726 *        unit test.  So keep it simple, be paranoid and log everything.
    727727 */
    728 SHCL_X11_DECL(void) clipConvertX11TargetsCallback(Widget widget, XtPointer pClient,
    729                                                   Atom * /* selection */, Atom *atomType,
    730                                                   XtPointer pValue, long unsigned int *pcLen,
    731                                                   int *piFormat)
     728SHCL_X11_DECL(void) clipQueryX11TargetsCallback(Widget widget, XtPointer pClient,
     729                                                Atom * /* selection */, Atom *atomType,
     730                                                XtPointer pValue, long unsigned int *pcLen,
     731                                                int *piFormat)
    732732{
    733733    RT_NOREF(piFormat);
     
    797797
    798798/**
    799  * Callback to notify us when the contents of the X11 clipboard change.
     799 * Queries the current formats ("targets") of the X11 clipboard ("CLIPBOARD").
    800800 *
    801801 * @param   pCtx                The X11 clipboard context to use.
    802802 */
    803 SHCL_X11_DECL(void) clipQueryX11Formats(PSHCLX11CTX pCtx)
     803SHCL_X11_DECL(void) clipQueryX11Targets(PSHCLX11CTX pCtx)
    804804{
    805805#ifndef TESTCASE
     
    817817                        clipGetAtom(pCtx, "CLIPBOARD"),
    818818                        clipGetAtom(pCtx, "TARGETS"),
    819                         clipConvertX11TargetsCallback, pCtx,
     819                        clipQueryX11TargetsCallback, pCtx,
    820820                        CurrentTime);
    821821#else
     
    860860            if (   (event.fixes.subtype == 0  /* XFixesSetSelectionOwnerNotify */)
    861861                && (event.fixes.owner != 0))
    862                 clipQueryX11Formats(pCtx);
     862                clipQueryX11Targets(pCtx);
    863863            else
    864864                clipReportEmpty(pCtx);
     
    890890        {
    891891            if (pCtx->fGrabClipboardOnStart)
    892                 clipQueryX11Formats(pCtx);
     892                clipQueryX11Targets(pCtx);
    893893
    894894            pCtx->fThreadStarted = true;
     
    19491949    clipSetXtBusy(pCtx, false);
    19501950    if (clipGetXtNeedsUpdate(pCtx))
    1951         clipQueryX11Formats(pCtx);
     1951        clipQueryX11Targets(pCtx);
    19521952#endif
    19531953
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