VirtualBox

Ignore:
Timestamp:
Sep 21, 2018 3:36:16 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
125245
Message:

DnD: Renamed action names, added typedefs for DnD actions.

File:
1 edited

Legend:

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

    r74409 r74411  
    951951#endif
    952952
    953                 uint32_t uAction = DND_IGNORE_ACTION; /* Default is ignoring. */
     953                uint32_t uAction = VBOX_DND_ACTION_IGNORE; /* Default is ignoring. */
    954954                /** @todo Compare this with the allowed actions. */
    955955                if (fAcceptDrop)
     
    11111111
    11121112                /** @todo Handle default action! */
    1113                 m.data.l[XdndStatusAction]  = fAcceptDrop ? toAtomAction(DND_COPY_ACTION) : None;
     1113                m.data.l[XdndStatusAction]  = fAcceptDrop ? toAtomAction(VBOX_DND_ACTION_COPY) : None;
    11141114
    11151115                int xRc = XSendEvent(m_pDisplay, e.xclient.data.l[XdndPositionWindow],
     
    11391139
    11401140                    /* Let the source know. */
    1141                     rc = m_wndProxy.sendFinished(m_wndCur, DND_IGNORE_ACTION);
     1141                    rc = m_wndProxy.sendFinished(m_wndCur, VBOX_DND_ACTION_IGNORE);
    11421142
    11431143                    /* Start over. */
     
    11541154
    11551155                /* Let the source know. */
    1156                 rc = m_wndProxy.sendFinished(m_wndCur, DND_IGNORE_ACTION);
     1156                rc = m_wndProxy.sendFinished(m_wndCur, VBOX_DND_ACTION_IGNORE);
    11571157
    11581158                /* Start over. */
     
    18431843    {
    18441844        /* No window to process, so send a ignore ack event to the host. */
    1845         rc = VbglR3DnDHGSendAckOp(&m_dndCtx, DND_IGNORE_ACTION);
     1845        rc = VbglR3DnDHGSendAckOp(&m_dndCtx, VBOX_DND_ACTION_IGNORE);
    18461846    }
    18471847    else
     
    19951995
    19961996    RTCString strFormats = "\r\n"; /** @todo If empty, IOCTL fails with VERR_ACCESS_DENIED. */
    1997     uint32_t uDefAction  = DND_IGNORE_ACTION;
    1998     uint32_t uAllActions = DND_IGNORE_ACTION;
     1997    uint32_t uDefAction  = VBOX_DND_ACTION_IGNORE;
     1998    uint32_t uAllActions = VBOX_DND_ACTION_IGNORE;
    19991999
    20002000    /* Currently in wrong mode? Bail out. */
     
    20972097        {
    20982098            strFormats   = strFormatsCur;
    2099             uDefAction   = DND_COPY_ACTION; /** @todo Handle default action! */
    2100             uAllActions  = DND_COPY_ACTION; /** @todo Ditto. */
     2099            uDefAction   = VBOX_DND_ACTION_COPY; /** @todo Handle default action! */
     2100            uAllActions  = VBOX_DND_ACTION_COPY; /** @todo Ditto. */
    21012101            uAllActions |= toHGCMActions(m_lstActions);
    21022102        }
     
    22952295                    /* Cancel the operation -- inform the source window by
    22962296                     * sending a XdndFinished message so that the source can toss the required data. */
    2297                     rc = m_wndProxy.sendFinished(wndSource, DND_IGNORE_ACTION);
     2297                    rc = m_wndProxy.sendFinished(wndSource, VBOX_DND_ACTION_IGNORE);
    22982298                }
    22992299
     
    28632863uint32_t DragInstance::toHGCMAction(Atom atom)
    28642864{
    2865     uint32_t uAction = DND_IGNORE_ACTION;
     2865    uint32_t uAction = VBOX_DND_ACTION_IGNORE;
    28662866
    28672867    if (atom == xAtom(XA_XdndActionCopy))
    2868         uAction = DND_COPY_ACTION;
     2868        uAction = VBOX_DND_ACTION_COPY;
    28692869    else if (atom == xAtom(XA_XdndActionMove))
    2870         uAction = DND_MOVE_ACTION;
     2870        uAction = VBOX_DND_ACTION_MOVE;
    28712871    else if (atom == xAtom(XA_XdndActionLink))
    2872         uAction = DND_LINK_ACTION;
     2872        uAction = VBOX_DND_ACTION_LINK;
    28732873
    28742874    return uAction;
     
    28842884uint32_t DragInstance::toHGCMActions(const VBoxDnDAtomList &lstActions)
    28852885{
    2886     uint32_t uActions = DND_IGNORE_ACTION;
     2886    uint32_t uActions = VBOX_DND_ACTION_IGNORE;
    28872887
    28882888    for (size_t i = 0; i < lstActions.size(); i++)
     
    29322932{
    29332933    /* Was the drop accepted by the host? That is, anything than ignoring. */
    2934     bool fDropAccepted = uAction > DND_IGNORE_ACTION;
     2934    bool fDropAccepted = uAction > VBOX_DND_ACTION_IGNORE;
    29352935
    29362936    LogFlowFunc(("uAction=%RU32\n", uAction));
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