VirtualBox

Changeset 85833 in vbox for trunk/src/VBox/GuestHost


Ignore:
Timestamp:
Aug 19, 2020 2:04:04 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139993
Message:

Shared Clipboard/X11: Docs.

File:
1 edited

Legend:

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

    r85831 r85833  
    206206static Atom clipAtomForX11Format(PSHCLX11CTX pCtx, SHCLX11FMTIDX uFmtIdx)
    207207{
    208     LogFlowFunc(("format=%u -> pcszAtom=%s\n", uFmtIdx, g_aFormats[uFmtIdx].pcszAtom));
    209208    AssertReturn(uFmtIdx < RT_ELEMENTS(g_aFormats), 0);
    210209    return clipGetAtom(pCtx, g_aFormats[uFmtIdx].pcszAtom);
     
    246245    for (unsigned i = 0; i < RT_ELEMENTS(g_aFormats); ++i)
    247246        if (clipAtomForX11Format(pCtx, i) == atomFormat)
     247        {
     248            LogFlowFunc(("Returning index %u for atom '%s'\n", i, g_aFormats[i].pcszAtom));
    248249            return i;
     250        }
    249251    return NIL_CLIPX11FORMAT;
    250252}
     
    12261228
    12271229/**
    1228  * Satisfies a request from X11 for clipboard targets supported by VBox.
     1230 * Returns the targets supported by VBox.
     1231 *
     1232 * This will return a list of atoms which tells the caller
     1233 * what kind of clipboard formats we support.
    12291234 *
    12301235 * @returns VBox status code.
     
    12441249                                int *piFormatReturn)
    12451250{
    1246     LogFlowFuncEnter();
    1247 
    12481251    const unsigned cFixedTargets = 3;
    12491252
     
    12711274    *piFormatReturn = 32;
    12721275
     1276    LogFlowFunc(("cTargets=%u\n", cTargets + cFixedTargets));
     1277
    12731278    return VINF_SUCCESS;
    12741279}
     
    12771282 * This is a wrapper around ShClX11RequestDataForX11Callback that will cache the
    12781283 * data returned.
     1284 *
     1285 * @returns VBox status code. VERR_NO_DATA if no data available.
     1286 * @param   pCtx                The X11 clipboard context to use.
     1287 * @param   Format              Clipboard format to read data in.
     1288 * @param   ppv                 Where to store the allocated read data on success.
     1289 *                              Needs to be free'd by the caller.
     1290 * @param   pcb                 Where to return the size (in bytes) of the allocated read data on success.
    12791291 */
    12801292static int clipReadVBoxShCl(PSHCLX11CTX pCtx, SHCLFORMAT Format,
     
    15881600
    15891601    PSHCLX11CTX pCtx = clipLookupContext(widget);
    1590     int rc = VINF_SUCCESS;
    1591 
    15921602    if (!pCtx)
    15931603        return False;
    15941604
     1605    /* Is this the rigt selection (clipboard) we were asked for? */
    15951606    if (!clipIsSupportedSelectionType(pCtx, *atomSelection))
    15961607        return False;
    15971608
     1609    int rc;
    15981610    if (*atomTarget == clipGetAtom(pCtx, "TARGETS"))
    15991611        rc = clipCreateX11Targets(pCtx, atomTypeReturn, pValReturn,
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