oleaut32: Implement OleLoadPictureFile.
[wine.git] / include / thumbcache.idl
blob38cf23da175879cdc6dff71a1d61371704161058
1 /*
2 * Copyright 2019 Alistair Leslie-Hughes
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.
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.
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
19 import "oaidl.idl";
20 import "shtypes.idl";
21 import "shobjidl.idl";
23 typedef [v1_enum] enum WTS_FLAGS
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;
44 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(WTS_FLAGS)")
46 typedef [v1_enum] enum WTS_CACHEFLAGS
48 WTS_DEFAULT = 0x00000000,
49 WTS_LOWQUALITY = 0x00000001,
50 WTS_CACHED = 0x00000002,
51 } WTS_CACHEFLAGS;
53 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(WTS_CACHEFLAGS)")
55 typedef [v1_enum] enum WTS_CONTEXTFLAGS
57 WTSCF_DEFAULT = 0x00000000,
58 WTSCF_APPSTYLE = 0x00000001,
59 WTSCF_SQUARE = 0x00000002,
60 WTSCF_WIDE = 0x00000004,
61 WTSCF_FAST = 0x00000008,
62 } WTS_CONTEXTFLAGS;
64 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(WTS_CONTEXTFLAGS)")
66 typedef [v1_enum] enum WTS_ALPHATYPE
68 WTSAT_UNKNOWN = 0,
69 WTSAT_RGB = 1,
70 WTSAT_ARGB = 2
71 } WTS_ALPHATYPE;
73 typedef struct WTS_THUMBNAILID
75 BYTE rgbKey[16];
76 } WTS_THUMBNAILID;
79 cpp_quote("#define WTS_E_FAILEDEXTRACTION MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb200)")
80 cpp_quote("#define WTS_E_EXTRACTIONTIMEDOUT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb201)")
81 cpp_quote("#define WTS_E_SURROGATEUNAVAILABLE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb202)")
82 cpp_quote("#define WTS_E_FASTEXTRACTIONNOTSUPPORTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb203)")
83 cpp_quote("#define WTS_E_DATAFILEUNAVAILABLE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb204)")
84 cpp_quote("#define WTS_E_EXTRACTIONPENDING MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb205)")
85 cpp_quote("#define WTS_E_EXTRACTIONBLOCKED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xb206)")
88 uuid(091162a4-bc96-411f-aae8-c5122cd03363),
89 pointer_default(unique),
91 interface ISharedBitmap : IUnknown
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);
101 object,
102 uuid(f676c15d-596a-4ce2-8234-33996f445db1),
104 interface IThumbnailCache : IUnknown
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);
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);
122 [local]
123 HRESULT GetThumbnailByID([in] WTS_THUMBNAILID thumbnailID,
124 [in] UINT cxyRequestedThumbSize,
125 [out, unique] ISharedBitmap **ppvThumb,
126 [out, unique] WTS_CACHEFLAGS *pOutFlags);
128 [call_as(GetThumbnailByID)]
129 HRESULT RemoteGetThumbnailByID([in] WTS_THUMBNAILID thumbnailID,
130 [in] UINT cxyRequestedThumbSize,
131 [out] ISharedBitmap **ppvThumb,
132 [out] WTS_CACHEFLAGS *pOutFlags);
136 uuid(e357fccd-a995-4576-b01f-234630154e96),
138 interface IThumbnailProvider : IUnknown
140 HRESULT GetThumbnail([in] UINT cx,
141 [out] HBITMAP *phbmp,
142 [out] WTS_ALPHATYPE *pdwAlpha);
146 uuid(f4376f00-bef5-4d45-80f3-1e023bbf1209),
148 interface IThumbnailSettings : IUnknown
150 HRESULT SetContext([in] WTS_CONTEXTFLAGS dwContext);
154 uuid(0f03f8fe-2b26-46f0-965a-212aa8d66b76),
155 object,
156 pointer_default(unique)
158 interface IThumbnailCachePrimer : IUnknown
160 HRESULT PageInThumbnail([in] IShellItem *psi,
161 [in] WTS_FLAGS wtsFlags,
162 [in] UINT cxyRequestedThumbSize);
166 uuid(4c857096-0514-4d4d-abd5-dfaaa3c326d2)
168 library ThumbCacheLib
171 uuid(50ef4544-ac9f-4a8e-b21b-8a26180db13f)
173 coclass LocalThumbnailCache
175 interface IThumbnailCache;
179 uuid(4db26476-6787-4046-b836-e8412a9e8a27)
181 coclass SharedBitmap
183 interface ISharedBitmap;