VirtualBox

Changeset 85427 in vbox


Ignore:
Timestamp:
Jul 23, 2020 10:58:15 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139470
Message:

DnD: Added DnDDroppedFilesInit() / DnDDroppedFilesInitEx().

Location:
trunk
Files:
2 edited

Legend:

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

    r85422 r85427  
    7676typedef DNDDROPPEDFILES *PDNDDROPPEDFILES;
    7777
    78 int DnDDroppedFilesInit(PDNDDROPPEDFILES pDF, const char *pszPath, DNDURIDROPPEDFILEFLAGS fFlags);
     78int DnDDroppedFilesInit(PDNDDROPPEDFILES pDF);
     79int DnDDroppedFilesInitEx(PDNDDROPPEDFILES pDF, const char *pszPath, DNDURIDROPPEDFILEFLAGS fFlags);
    7980void DnDDroppedFilesDestroy(PDNDDROPPEDFILES pDF);
    8081int DnDDroppedFilesAddFile(PDNDDROPPEDFILES pDF, const char *pszFile);
  • trunk/src/VBox/GuestHost/DragAndDrop/DnDDroppedFiles.cpp

    r85371 r85427  
    4040
    4141
    42 int DnDDroppedFilesInit(PDNDDROPPEDFILES pDF,
    43                         const char *pszPath, DNDURIDROPPEDFILEFLAGS fFlags /* = DNDURIDROPPEDFILE_FLAGS_NONE */)
     42static int dndDroppedFilesInitInternal(PDNDDROPPEDFILES pDF)
    4443{
    4544    pDF->m_fOpen = 0;
    4645    pDF->m_hDir  = NIL_RTDIR;
    4746
     47    RTListInit(&pDF->m_lstFiles);
     48
     49    return VINF_SUCCESS;
     50}
     51
     52int DnDDroppedFilesInitEx(PDNDDROPPEDFILES pDF,
     53                          const char *pszPath, DNDURIDROPPEDFILEFLAGS fFlags /* = DNDURIDROPPEDFILE_FLAGS_NONE */)
     54{
     55    int rc = dndDroppedFilesInitInternal(pDF);
     56    if (RT_FAILURE(rc))
     57        return rc;
     58
    4859    return DnDDroppedFilesOpenEx(pDF, pszPath, fFlags);
     60}
     61
     62int DnDDroppedFilesInit(PDNDDROPPEDFILES pDF)
     63{
     64    return dndDroppedFilesInitInternal(pDF);
    4965}
    5066
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