diff options
Diffstat (limited to '3rdparty/lzma/CPP/Windows/Shell.h')
-rw-r--r-- | 3rdparty/lzma/CPP/Windows/Shell.h | 64 |
1 files changed, 50 insertions, 14 deletions
diff --git a/3rdparty/lzma/CPP/Windows/Shell.h b/3rdparty/lzma/CPP/Windows/Shell.h index 4bff18cf99a..b4cdb3048e1 100644 --- a/3rdparty/lzma/CPP/Windows/Shell.h +++ b/3rdparty/lzma/CPP/Windows/Shell.h @@ -1,17 +1,22 @@ // Windows/Shell.h -#ifndef __WINDOWS_SHELL_H -#define __WINDOWS_SHELL_H +#ifndef ZIP7_WINDOWS_SHELL_H +#define ZIP7_WINDOWS_SHELL_H -#include <windows.h> +#include "../Common/Common.h" +#include "../Common/MyWindows.h" +#if defined(__MINGW32__) || defined(__MINGW64__) #include <shlobj.h> +#else +#include <ShlObj.h> +#endif #include "../Common/MyString.h" #include "Defs.h" -namespace NWindows{ -namespace NShell{ +namespace NWindows { +namespace NShell { ///////////////////////// // CItemIDList @@ -20,6 +25,7 @@ namespace NShell{ class CItemIDList { LPITEMIDLIST m_Object; + Z7_CLASS_NO_COPY(CItemIDList) public: CItemIDList(): m_Object(NULL) {} // CItemIDList(LPCITEMIDLIST itemIDList); @@ -49,6 +55,7 @@ public: ///////////////////////////// // CDrop +/* class CDrop { HDROP m_Object; @@ -63,22 +70,51 @@ public: operator HDROP() { return m_Object;} bool QueryPoint(LPPOINT point) { return BOOLToBool(::DragQueryPoint(m_Object, point)); } - void Finish() { ::DragFinish(m_Object); } - UINT QueryFile(UINT fileIndex, LPTSTR fileName, UINT fileNameSize) - { return ::DragQueryFile(m_Object, fileIndex, fileName, fileNameSize); } + void Finish() + { + ::DragFinish(m_Object); + } + UINT QueryFile(UINT fileIndex, LPTSTR fileName, UINT bufSize) + { return ::DragQueryFile(m_Object, fileIndex, fileName, bufSize); } #ifndef _UNICODE - UINT QueryFile(UINT fileIndex, LPWSTR fileName, UINT fileNameSize) - { return ::DragQueryFileW(m_Object, fileIndex, fileName, fileNameSize); } + UINT QueryFile(UINT fileIndex, LPWSTR fileName, UINT bufSize) + { return ::DragQueryFileW(m_Object, fileIndex, fileName, bufSize); } #endif UINT QueryCountOfFiles(); - UString QueryFileName(UINT fileIndex); + void QueryFileName(UINT fileIndex, UString &fileName); void QueryFileNames(UStringVector &fileNames); }; - +*/ #endif -///////////////////////////// -// Functions +struct CFileAttribs +{ + int FirstDirIndex; + // DWORD Sum; + // DWORD Product; + // CRecordVector<DWORD> Vals; + // CRecordVector<bool> IsDirVector; + + CFileAttribs() + { + Clear(); + } + + void Clear() + { + FirstDirIndex = -1; + // Sum = 0; + // Product = 0; + // IsDirVector.Clear(); + } +}; + + +/* read pathnames from HDROP or SHELLIDLIST. + The parser can return E_INVALIDARG, if there is some unexpected data in dataObject */ +HRESULT DataObject_GetData_HDROP_or_IDLIST_Names(IDataObject *dataObject, UStringVector &names); + +HRESULT DataObject_GetData_FILE_ATTRS(IDataObject *dataObject, CFileAttribs &attribs); bool GetPathFromIDList(LPCITEMIDLIST itemIDList, CSysString &path); bool BrowseForFolder(LPBROWSEINFO lpbi, CSysString &resultPath); |