source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/thumbcache.idl@ 1172

Last change on this file since 1172 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

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