summaryrefslogtreecommitdiffstats
path: root/installerbuilder/libinstaller/3rdparty/p7zip_9.04/unix/CPP/7zip/UI/FileManager/SysIconUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'installerbuilder/libinstaller/3rdparty/p7zip_9.04/unix/CPP/7zip/UI/FileManager/SysIconUtils.h')
-rw-r--r--installerbuilder/libinstaller/3rdparty/p7zip_9.04/unix/CPP/7zip/UI/FileManager/SysIconUtils.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/installerbuilder/libinstaller/3rdparty/p7zip_9.04/unix/CPP/7zip/UI/FileManager/SysIconUtils.h b/installerbuilder/libinstaller/3rdparty/p7zip_9.04/unix/CPP/7zip/UI/FileManager/SysIconUtils.h
new file mode 100644
index 000000000..a90d28bc2
--- /dev/null
+++ b/installerbuilder/libinstaller/3rdparty/p7zip_9.04/unix/CPP/7zip/UI/FileManager/SysIconUtils.h
@@ -0,0 +1,51 @@
+// SysIconUtils.h
+
+#ifndef __SYSICONUTILS_H
+#define __SYSICONUTILS_H
+
+#include "Common/MyString.h"
+
+struct CExtIconPair
+{
+ UString Ext;
+ int IconIndex;
+ UString TypeName;
+
+};
+
+inline bool operator==(const CExtIconPair &a1, const CExtIconPair &a2)
+{
+ return (a1.Ext == a2.Ext);
+}
+
+inline bool operator<(const CExtIconPair &a1, const CExtIconPair &a2)
+{
+ return (a1.Ext < a2.Ext);
+}
+
+class CExtToIconMap
+{
+ int _dirIconIndex;
+ UString _dirTypeName;
+ int _noExtIconIndex;
+ UString _noExtTypeName;
+ CObjectVector<CExtIconPair> _map;
+public:
+ CExtToIconMap(): _dirIconIndex(-1), _noExtIconIndex(-1) {}
+ void Clear()
+ {
+ _dirIconIndex = -1;
+ _noExtIconIndex = -1;
+ _map.Clear();
+ }
+ int GetIconIndex(UINT32 attributes, const UString &fileName, UString &typeName);
+ int GetIconIndex(UINT32 attributes, const UString &fileName);
+};
+
+DWORD_PTR GetRealIconIndex(LPCTSTR path, DWORD attributes, int &iconIndex);
+#ifndef _UNICODE
+DWORD_PTR GetRealIconIndex(LPCWSTR path, DWORD attributes, int &iconIndex);
+#endif
+int GetIconIndexForCSIDL(int csidl);
+
+#endif