mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-10 20:07:05 -06:00
3.13
This commit is contained in:
57
7zip/FileManager/SysIconUtils.h
Executable file
57
7zip/FileManager/SysIconUtils.h
Executable file
@@ -0,0 +1,57 @@
|
||||
// SysIconUtils.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SYSICONUTILS_H
|
||||
#define __SYSICONUTILS_H
|
||||
|
||||
#include "Common/String.h"
|
||||
|
||||
struct CExtIconPair
|
||||
{
|
||||
CSysString Ext;
|
||||
int IconIndex;
|
||||
CSysString 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;
|
||||
CSysString _dirTypeName;
|
||||
int _noExtIconIndex;
|
||||
CSysString _noExtTypeName;
|
||||
CObjectVector<CExtIconPair> _map;
|
||||
public:
|
||||
CExtToIconMap(): _dirIconIndex(-1), _noExtIconIndex(-1) {}
|
||||
void Clear()
|
||||
{
|
||||
_dirIconIndex = -1;
|
||||
_noExtIconIndex = -1;
|
||||
_map.Clear();
|
||||
}
|
||||
int GetIconIndex(UINT32 attributes, const CSysString &fileName,
|
||||
CSysString &typeName);
|
||||
int GetIconIndex(UINT32 attributes, const CSysString &fileName);
|
||||
};
|
||||
|
||||
DWORD_PTR GetRealIconIndex(LPCTSTR path, UINT32 attributes, int &iconIndex);
|
||||
#ifndef _UNICODE
|
||||
// DWORD_PTR GetRealIconIndex(LPCWSTR path, UINT32 attributes, int &iconIndex);
|
||||
#endif
|
||||
DWORD_PTR GetRealIconIndex(const CSysString &fileName, UINT32 attributes, int &iconIndex, CSysString &typeName);
|
||||
int GetIconIndexForCSIDL(int aCSIDL);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user