1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
|
/*
* Copyright 2019 Alistair Leslie-Hughes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
import "oaidl.idl";
import "shtypes.idl";
import "shobjidl.idl";
typedef [v1_enum] enum WTS_FLAGS
{
WTS_NONE = 0x00000000,
WTS_EXTRACT = 0x00000000,
WTS_INCACHEONLY = 0x00000001,
WTS_FASTEXTRACT = 0x00000002,
WTS_FORCEEXTRACTION = 0x00000004,
WTS_SLOWRECLAIM = 0x00000008,
WTS_EXTRACTDONOTCACHE = 0x00000020,
WTS_SCALETOREQUESTEDSIZE = 0x00000040,
WTS_SKIPFASTEXTRACT = 0x00000080,
WTS_EXTRACTINPROC = 0x00000100,
WTS_CROPTOSQUARE = 0x00000200,
WTS_INSTANCESURROGATE = 0x00000400,
WTS_REQUIRESURROGATE = 0x00000800,
WTS_APPSTYLE = 0x00002000,
WTS_WIDETHUMBNAILS = 0x00004000,
WTS_IDEALCACHESIZEONLY = 0x00008000,
WTS_SCALEUP = 0x00010000,
} WTS_FLAGS;
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(WTS_FLAGS)")
typedef [v1_enum] enum WTS_CACHEFLAGS
{
WTS_DEFAULT = 0x00000000,
WTS_LOWQUALITY = 0x00000001,
WTS_CACHED = 0x00000002,
} WTS_CACHEFLAGS;
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(WTS_CACHEFLAGS)")
typedef [v1_enum] enum WTS_CONTEXTFLAGS
{
WTSCF_DEFAULT = 0x00000000,
WTSCF_APPSTYLE = 0x00000001,
WTSCF_SQUARE = 0x00000002,
WTSCF_WIDE = 0x00000004,
WTSCF_FAST = 0x00000008,
} WTS_CONTEXTFLAGS;
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(WTS_CONTEXTFLAGS)")
typedef [v1_enum] enum WTS_ALPHATYPE
{
WTSAT_UNKNOWN = 0,
WTSAT_RGB = 1,
WTSAT_ARGB = 2
} WTS_ALPHATYPE;
typedef struct WTS_THUMBNAILID
{
BYTE rgbKey[16];
} WTS_THUMBNAILID;
cpp_quote("#define WTS_E_FAILEDEXTRACTION MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb200)")
cpp_quote("#define WTS_E_EXTRACTIONTIMEDOUT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb201)")
cpp_quote("#define WTS_E_SURROGATEUNAVAILABLE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb202)")
cpp_quote("#define WTS_E_FASTEXTRACTIONNOTSUPPORTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb203)")
cpp_quote("#define WTS_E_DATAFILEUNAVAILABLE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb204)")
cpp_quote("#define WTS_E_EXTRACTIONPENDING MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb205)")
cpp_quote("#define WTS_E_EXTRACTIONBLOCKED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb206)")
[
uuid(091162a4-bc96-411f-aae8-c5122cd03363),
pointer_default(unique),
]
interface ISharedBitmap : IUnknown
{
HRESULT GetSharedBitmap([out] HBITMAP *phbm);
HRESULT GetSize([out] SIZE *pSize);
HRESULT GetFormat([out] WTS_ALPHATYPE *pat);
HRESULT InitializeBitmap([in] HBITMAP hbm, [in] WTS_ALPHATYPE wtsAT);
HRESULT Detach([out] HBITMAP *phbm);
}
[
object,
uuid(f676c15d-596a-4ce2-8234-33996f445db1),
]
interface IThumbnailCache : IUnknown
{
[local]
HRESULT GetThumbnail([in] IShellItem *pShellItem,
[in] UINT cxyRequestedThumbSize,
[in] WTS_FLAGS flags,
[out, unique] ISharedBitmap **ppvThumb,
[out, unique] WTS_CACHEFLAGS *pOutFlags,
[out, unique] WTS_THUMBNAILID *pThumbnailID);
[call_as(GetThumbnail)]
HRESULT RemoteGetThumbnail([in] IShellItem *pShellItem,
[in] UINT cxyRequestedThumbSize,
[in] WTS_FLAGS flags,
[out] ISharedBitmap **ppvThumb,
[out] WTS_CACHEFLAGS *pOutFlags,
[out] WTS_THUMBNAILID *pThumbnailID);
[local]
HRESULT GetThumbnailByID([in] WTS_THUMBNAILID thumbnailID,
[in] UINT cxyRequestedThumbSize,
[out, unique] ISharedBitmap **ppvThumb,
[out, unique] WTS_CACHEFLAGS *pOutFlags);
[call_as(GetThumbnailByID)]
HRESULT RemoteGetThumbnailByID([in] WTS_THUMBNAILID thumbnailID,
[in] UINT cxyRequestedThumbSize,
[out] ISharedBitmap **ppvThumb,
[out] WTS_CACHEFLAGS *pOutFlags);
}
[
uuid(e357fccd-a995-4576-b01f-234630154e96),
]
interface IThumbnailProvider : IUnknown
{
HRESULT GetThumbnail([in] UINT cx,
[out] HBITMAP *phbmp,
[out] WTS_ALPHATYPE *pdwAlpha);
}
[
uuid(f4376f00-bef5-4d45-80f3-1e023bbf1209),
]
interface IThumbnailSettings : IUnknown
{
HRESULT SetContext([in] WTS_CONTEXTFLAGS dwContext);
}
[
uuid(0f03f8fe-2b26-46f0-965a-212aa8d66b76),
object,
pointer_default(unique)
]
interface IThumbnailCachePrimer : IUnknown
{
HRESULT PageInThumbnail([in] IShellItem *psi,
[in] WTS_FLAGS wtsFlags,
[in] UINT cxyRequestedThumbSize);
}
[
uuid(4c857096-0514-4d4d-abd5-dfaaa3c326d2)
]
library ThumbCacheLib
{
[
uuid(50ef4544-ac9f-4a8e-b21b-8a26180db13f)
]
coclass LocalThumbnailCache
{
interface IThumbnailCache;
}
[
uuid(4db26476-6787-4046-b836-e8412a9e8a27)
]
coclass SharedBitmap
{
interface ISharedBitmap;
}
}
|