mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-26 02:28:17 +08:00
37 lines
772 B
C
37 lines
772 B
C
|
#pragma once
|
||
|
|
||
|
#include "pch.h"
|
||
|
|
||
|
#include <ShlObj.h>
|
||
|
#include <string>
|
||
|
#include <thumbcache.h>
|
||
|
|
||
|
class SvgThumbnailProvider :
|
||
|
public IInitializeWithStream,
|
||
|
public IThumbnailProvider
|
||
|
{
|
||
|
public:
|
||
|
// IUnknown
|
||
|
IFACEMETHODIMP QueryInterface(REFIID riid, void** ppv);
|
||
|
IFACEMETHODIMP_(ULONG) AddRef();
|
||
|
IFACEMETHODIMP_(ULONG) Release();
|
||
|
|
||
|
// IInitializeWithStream
|
||
|
IFACEMETHODIMP Initialize(IStream* pstream, DWORD grfMode);
|
||
|
|
||
|
// IPreviewHandler
|
||
|
IFACEMETHODIMP GetThumbnail(UINT cx, HBITMAP* phbmp, WTS_ALPHATYPE* pdwAlpha);
|
||
|
|
||
|
SvgThumbnailProvider();
|
||
|
protected:
|
||
|
~SvgThumbnailProvider();
|
||
|
|
||
|
private:
|
||
|
// Reference count of component.
|
||
|
long m_cRef;
|
||
|
|
||
|
// Provided during initialization.
|
||
|
IStream* m_pStream;
|
||
|
|
||
|
HANDLE m_process;
|
||
|
};
|