// Copyright (C) 2011 Fog Creek Software
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
class CTortoiseHgOverlay :
public CComObjectRootEx<CComMultiThreadModel>,
public IShellIconOverlayIdentifier
{
static CComAutoCriticalSection m_cs;
const char m_chTortoiseClass;
protected:
explicit CTortoiseHgOverlay(char chClass);
BEGIN_COM_MAP(CTortoiseHgOverlay)
COM_INTERFACE_ENTRY(IShellIconOverlayIdentifier)
END_COM_MAP()
// IShellIconOverlayIdentifier
STDMETHOD(GetOverlayInfo)(LPWSTR pwszIconFile, int cchMax, int* pIndex,
DWORD* pdwFlags);
STDMETHOD(GetPriority)(int* pPriority);
STDMETHOD(IsMemberOf)(LPCWSTR pwszPath, DWORD dwAttrib);
};
class CTortoiseHgNormal :
public CTortoiseHgOverlay,
public CComCoClass<CTortoiseHgNormal, &CLSID_TortoiseHgNormal>
{
public:
CTortoiseHgNormal();
DECLARE_REGISTRY_RESOURCEID(IDR_NORMAL)
};
class CTortoiseHgAdded :
public CTortoiseHgOverlay,
public CComCoClass<CTortoiseHgAdded, &CLSID_TortoiseHgAdded>
{
public:
CTortoiseHgAdded();
DECLARE_REGISTRY_RESOURCEID(IDR_ADDED)
};
class CTortoiseHgModified :
public CTortoiseHgOverlay,
public CComCoClass<CTortoiseHgModified, &CLSID_TortoiseHgNormal>
{
public:
CTortoiseHgModified();
DECLARE_REGISTRY_RESOURCEID(IDR_MODIFIED)
};
class CTortoiseHgUnversioned :
public CTortoiseHgOverlay,
public CComCoClass<CTortoiseHgUnversioned, &CLSID_TortoiseHgNormal>
{
public:
CTortoiseHgUnversioned();
DECLARE_REGISTRY_RESOURCEID(IDR_UNVERSIONED)
};
|
Loading...