VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dxfile.h@ 33252

Last change on this file since 33252 was 16477, checked in by vboxsync, 16 years ago

LGPL disclaimer by filemuncher

  • Property svn:eol-style set to native
File size: 13.8 KB
Line 
1/*
2 * Copyright 2004 Christian Costa
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
19/*
20 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28#ifndef __WINE_DXFILE_H
29#define __WINE_DXFILE_H
30
31#include <objbase.h>
32#include <winnt.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif /* defined(__cplusplus) */
37
38typedef DWORD DXFILEFORMAT;
39
40#define DXFILEFORMAT_BINARY 0
41#define DXFILEFORMAT_TEXT 1
42#define DXFILEFORMAT_COMPRESSED 2
43
44typedef DWORD DXFILELOADOPTIONS;
45
46#define DXFILELOAD_FROMFILE 0x00L
47#define DXFILELOAD_FROMRESOURCE 0x01L
48#define DXFILELOAD_FROMMEMORY 0x02L
49#define DXFILELOAD_FROMSTREAM 0x04L
50#define DXFILELOAD_FROMURL 0x08L
51
52typedef struct _DXFILELOADRESOURCE {
53 HMODULE hModule;
54 LPCSTR /*LPCTSTR*/ lpName;
55 LPCSTR /*LPCTSTR*/ lpType;
56} DXFILELOADRESOURCE, *LPDXFILELOADRESOURCE;
57
58typedef struct _DXFILELOADMEMORY {
59 LPVOID lpMemory;
60 DWORD dSize;
61} DXFILELOADMEMORY, *LPDXFILELOADMEMORY;
62
63typedef struct IDirectXFile *LPDIRECTXFILE;
64typedef struct IDirectXFileEnumObject *LPDIRECTXFILEENUMOBJECT;
65typedef struct IDirectXFileSaveObject *LPDIRECTXFILESAVEOBJECT;
66typedef struct IDirectXFileObject *LPDIRECTXFILEOBJECT;
67typedef struct IDirectXFileData *LPDIRECTXFILEDATA;
68typedef struct IDirectXFileDataReference *LPDIRECTXFILEDATAREFERENCE;
69typedef struct IDirectXFileBinary *LPDIRECTXFILEBINARY;
70
71STDAPI DirectXFileCreate(LPDIRECTXFILE *lplpDirectXFile);
72
73#define INTERFACE IDirectXFile
74DECLARE_INTERFACE_(IDirectXFile,IUnknown)
75{
76 /*** IUnknown methods ***/
77 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
78 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
79 STDMETHOD_(ULONG,Release)(THIS) PURE;
80 /*** IDirectXFile methods ***/
81 STDMETHOD(CreateEnumObject) (THIS_ LPVOID, DXFILELOADOPTIONS, LPDIRECTXFILEENUMOBJECT *) PURE;
82 STDMETHOD(CreateSaveObject) (THIS_ LPCSTR, DXFILEFORMAT, LPDIRECTXFILESAVEOBJECT *) PURE;
83 STDMETHOD(RegisterTemplates) (THIS_ LPVOID, DWORD) PURE;
84};
85#undef INTERFACE
86
87#if !defined(__cplusplus) || defined(CINTERFACE)
88 /*** IUnknown methods ***/
89#define IDirectXFile_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
90#define IDirectXFile_AddRef(p) (p)->lpVtbl->AddRef(p)
91#define IDirectXFile_Release(p) (p)->lpVtbl->Release(p)
92 /*** IDirectXFile methods ***/
93#define IDirectXFile_CreateEnumObject(p,a,b,c) (p)->lpVtbl->CreateEnumObject(p,a,b,c)
94#define IDirectXFile_CreateSaveObject(p,a,b,c) (p)->lpVtbl->CreateSaveObject(p,a,b,c)
95#define IDirectXFile_RegisterTemplates(p,a,b) (p)->lpVtbl->RegisterTemplates(p,a,b)
96#endif
97
98#define INTERFACE IDirectXFileEnumObject
99DECLARE_INTERFACE_(IDirectXFileEnumObject,IUnknown)
100{
101 /*** IUnknown methods ***/
102 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
103 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
104 STDMETHOD_(ULONG,Release)(THIS) PURE;
105 /*** IDirectXFileEnumObject methods ***/
106 STDMETHOD(GetNextDataObject) (THIS_ LPDIRECTXFILEDATA *) PURE;
107 STDMETHOD(GetDataObjectById) (THIS_ REFGUID, LPDIRECTXFILEDATA *) PURE;
108 STDMETHOD(GetDataObjectByName) (THIS_ LPCSTR, LPDIRECTXFILEDATA *) PURE;
109};
110#undef INTERFACE
111
112#if !defined(__cplusplus) || defined(CINTERFACE)
113 /*** IUnknown methods ***/
114#define IDirectXFileEnumObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
115#define IDirectXFileEnumObject_AddRef(p) (p)->lpVtbl->AddRef(p)
116#define IDirectXFileEnumObject_Release(p) (p)->lpVtbl->Release(p)
117 /*** IDirectXFileEnumObject methods ***/
118#define IDirectXFileEnumObject_GetNextDataObject(p,a) (p)->lpVtbl->GetNextDataObject(p,a)
119#define IDirectXFileEnumObject_GetDataObjectById(p,a,b) (p)->lpVtbl->GetDataObjectById(p,a,b)
120#define IDirectXFileEnumObject_GetDataObjectByName(p,a,b) (p)->lpVtbl->GetDataObjectByName(p,a,b)
121#endif
122
123#define INTERFACE IDirectXFileSaveObject
124DECLARE_INTERFACE_(IDirectXFileSaveObject,IUnknown)
125{
126 /*** IUnknown methods ***/
127 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
128 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
129 STDMETHOD_(ULONG,Release)(THIS) PURE;
130 /*** IDirectXFileSaveObject methods ***/
131 STDMETHOD(SaveTemplates) (THIS_ DWORD, const GUID **) PURE;
132 STDMETHOD(CreateDataObject) (THIS_ REFGUID, LPCSTR, const GUID *, DWORD, LPVOID, LPDIRECTXFILEDATA *) PURE;
133 STDMETHOD(SaveData) (THIS_ LPDIRECTXFILEDATA) PURE;
134};
135#undef INTERFACE
136
137#if !defined(__cplusplus) || defined(CINTERFACE)
138 /*** IUnknown methods ***/
139#define IDirectXFileSaveObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
140#define IDirectXFileSaveObject_AddRef(p) (p)->lpVtbl->AddRef(p)
141#define IDirectXFileSaveObject_Release(p) (p)->lpVtbl->Release(p)
142 /*** IDirectXFileSaveObject methods ***/
143#define IDirectXFileSaveObject_SaveTemplates(p,a,b) (p)->lpVtbl->SaveTemplates(p,a,b)
144#define IDirectXFileSaveObject_CreateDataObject(p,a,b,c,d,e,f) (p)->lpVtbl->CreateDataObject(p,a,b,c,d,e,f)
145#define IDirectXFileSaveObject_SaveData(p,a) (p)->lpVtbl->SaveData(p,a)
146#endif
147
148#define IUNKNOWN_METHODS(kind) \
149 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) kind; \
150 STDMETHOD_(ULONG,AddRef)(THIS) kind; \
151 STDMETHOD_(ULONG,Release)(THIS) kind
152
153#define IDIRECTXFILEOBJECT_METHODS(kind) \
154 STDMETHOD(GetName) (THIS_ LPSTR, LPDWORD) kind; \
155 STDMETHOD(GetId) (THIS_ LPGUID) kind
156
157#define INTERFACE IDirectXFileObject
158DECLARE_INTERFACE_(IDirectXFileObject,IUnknown)
159{
160 IUNKNOWN_METHODS(PURE);
161 IDIRECTXFILEOBJECT_METHODS(PURE);
162};
163#undef INTERFACE
164
165#if !defined(__cplusplus) || defined(CINTERFACE)
166 /*** IUnknown methods ***/
167#define IDirectXFileObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
168#define IDirectXFileObject_AddRef(p) (p)->lpVtbl->AddRef(p)
169#define IDirectXFileObject_Release(p) (p)->lpVtbl->Release(p)
170 /*** IDirectXFileObject methods ***/
171#define IDirectXFileObject_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
172#define IDirectXFileObject_GetId(p,a) (p)->lpVtbl->GetId(p,a)
173#endif
174
175#define INTERFACE IDirectXFileData
176DECLARE_INTERFACE_(IDirectXFileData,IDirectXFileObject)
177{
178 IUNKNOWN_METHODS(PURE);
179 IDIRECTXFILEOBJECT_METHODS(PURE);
180 /*** IDirectXFileData methods ***/
181 STDMETHOD(GetData) (THIS_ LPCSTR, DWORD *, void **) PURE;
182 STDMETHOD(GetType) (THIS_ const GUID **) PURE;
183 STDMETHOD(GetNextObject) (THIS_ LPDIRECTXFILEOBJECT *) PURE;
184 STDMETHOD(AddDataObject) (THIS_ LPDIRECTXFILEDATA) PURE;
185 STDMETHOD(AddDataReference) (THIS_ LPCSTR, const GUID *) PURE;
186 STDMETHOD(AddBinaryObject) (THIS_ LPCSTR, const GUID *, LPCSTR, LPVOID, DWORD) PURE;
187};
188#undef INTERFACE
189
190#if !defined(__cplusplus) || defined(CINTERFACE)
191 /*** IUnknown methods ***/
192#define IDirectXFileData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
193#define IDirectXFileData_AddRef(p) (p)->lpVtbl->AddRef(p)
194#define IDirectXFileData_Release(p) (p)->lpVtbl->Release(p)
195 /*** IDirectXFileObject methods ***/
196#define IDirectXFileData_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
197#define IDirectXFileData_GetId(p,a) (p)->lpVtbl->GetId(p,a)
198 /*** IDirectXFileData methods ***/
199#define IDirectXFileData_GetData(p,a,b,c) (p)->lpVtbl->GetData(p,a,b,c)
200#define IDirectXFileData_GetType(p,a) (p)->lpVtbl->GetType(p,a)
201#define IDirectXFileData_GetNextObject(p,a) (p)->lpVtbl->GetNextObject(p,a)
202#define IDirectXFileData_AddDataObject(p,a) (p)->lpVtbl->AddDataObject(p,a)
203#define IDirectXFileData_AddDataReference(p,a,b) (p)->lpVtbl->AddDataReference(p,a,b)
204#define IDirectXFileData_AddBinaryObject(p,a,b,c,d,e) (p)->lpVtbl->AddBinaryObject(p,a,b,c,d,e)
205#endif
206
207#define INTERFACE IDirectXFileDataReference
208DECLARE_INTERFACE_(IDirectXFileDataReference,IDirectXFileObject)
209{
210 IUNKNOWN_METHODS(PURE);
211 IDIRECTXFILEOBJECT_METHODS(PURE);
212 /*** IDirectXFileDataReference methods ***/
213 STDMETHOD(Resolve) (THIS_ LPDIRECTXFILEDATA *) PURE;
214};
215#undef INTERFACE
216
217#if !defined(__cplusplus) || defined(CINTERFACE)
218 /*** IUnknown methods ***/
219#define IDirectXFileDataReference_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
220#define IDirectXFileDataReference_AddRef(p) (p)->lpVtbl->AddRef(p)
221#define IDirectXFileDataReference_Release(p) (p)->lpVtbl->Release(p)
222 /*** IDirectXFileObject methods ***/
223#define IDirectXFileDataReference_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
224#define IDirectXFileDataReference_GetId(p,a) (p)->lpVtbl->GetId(p,a)
225 /*** IDirectXFileDataReference methods ***/
226#define IDirectXFileDataReference_Resolve(p,a) (p)->lpVtbl->Resolve(p,a)
227#endif
228
229#define INTERFACE IDirectXFileBinary
230DECLARE_INTERFACE_(IDirectXFileBinary,IDirectXFileObject)
231{
232 IUNKNOWN_METHODS(PURE);
233 IDIRECTXFILEOBJECT_METHODS(PURE);
234 /*** IDirectXFileBinary methods ***/
235 STDMETHOD(GetSize) (THIS_ DWORD *) PURE;
236 STDMETHOD(GetMimeType) (THIS_ LPCSTR *) PURE;
237 STDMETHOD(Read) (THIS_ LPVOID, DWORD, LPDWORD) PURE;
238};
239#undef INTERFACE
240
241#if !defined(__cplusplus) || defined(CINTERFACE)
242 /*** IUnknown methods ***/
243#define IDirectXFileBinary_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
244#define IDirectXFileBinary_AddRef(p) (p)->lpVtbl->AddRef(p)
245#define IDirectXFileBinary_Release(p) (p)->lpVtbl->Release(p)
246 /*** IDirectXFileObject methods ***/
247#define IDirectXFileBinary_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
248#define IDirectXFileBinary_GetId(p,a) (p)->lpVtbl->GetId(p,a)
249 /*** IDirectXFileBinary methods ***/
250#define IDirectXFileBinary_GetSize(p,a) (p)->lpVtbl->GetSize(p,a)
251#define IDirectXFileBinary_GetMimeType(p,a) (p)->lpVtbl->GetMimeType(p,a)
252#define IDirectXFileBinary_Read(p,a,b,c) (p)->lpVtbl->Read(p,a,b,c)
253#endif
254
255/* DirectXFile Object CLSID */
256DEFINE_GUID(CLSID_CDirectXFile, 0x4516ec43, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
257
258/* DirectX File Interface GUIDs */
259DEFINE_GUID(IID_IDirectXFile, 0x3d82ab40, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
260DEFINE_GUID(IID_IDirectXFileEnumObject, 0x3d82ab41, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
261DEFINE_GUID(IID_IDirectXFileSaveObject, 0x3d82ab42, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
262DEFINE_GUID(IID_IDirectXFileObject, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
263DEFINE_GUID(IID_IDirectXFileData, 0x3d82ab44, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
264DEFINE_GUID(IID_IDirectXFileDataReference, 0x3d82ab45, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
265DEFINE_GUID(IID_IDirectXFileBinary, 0x3d82ab46, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
266
267/* DirectX File Header template's GUID */
268DEFINE_GUID(TID_DXFILEHeader, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
269
270/* DirectX File errors */
271#define _FACDD 0x876
272#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
273
274#define DXFILE_OK 0
275
276#define DXFILEERR_BADOBJECT MAKE_DDHRESULT(850)
277#define DXFILEERR_BADVALUE MAKE_DDHRESULT(851)
278#define DXFILEERR_BADTYPE MAKE_DDHRESULT(852)
279#define DXFILEERR_BADSTREAMHANDLE MAKE_DDHRESULT(853)
280#define DXFILEERR_BADALLOC MAKE_DDHRESULT(854)
281#define DXFILEERR_NOTFOUND MAKE_DDHRESULT(855)
282#define DXFILEERR_NOTDONEYET MAKE_DDHRESULT(856)
283#define DXFILEERR_FILENOTFOUND MAKE_DDHRESULT(857)
284#define DXFILEERR_RESOURCENOTFOUND MAKE_DDHRESULT(858)
285#define DXFILEERR_URLNOTFOUND MAKE_DDHRESULT(859)
286#define DXFILEERR_BADRESOURCE MAKE_DDHRESULT(860)
287#define DXFILEERR_BADFILETYPE MAKE_DDHRESULT(861)
288#define DXFILEERR_BADFILEVERSION MAKE_DDHRESULT(862)
289#define DXFILEERR_BADFILEFLOATSIZE MAKE_DDHRESULT(863)
290#define DXFILEERR_BADFILECOMPRESSIONTYPE MAKE_DDHRESULT(864)
291#define DXFILEERR_BADFILE MAKE_DDHRESULT(865)
292#define DXFILEERR_PARSEERROR MAKE_DDHRESULT(866)
293#define DXFILEERR_NOTEMPLATE MAKE_DDHRESULT(867)
294#define DXFILEERR_BADARRAYSIZE MAKE_DDHRESULT(868)
295#define DXFILEERR_BADDATAREFERENCE MAKE_DDHRESULT(869)
296#define DXFILEERR_INTERNALERROR MAKE_DDHRESULT(870)
297#define DXFILEERR_NOMOREOBJECTS MAKE_DDHRESULT(871)
298#define DXFILEERR_BADINTRINSICS MAKE_DDHRESULT(872)
299#define DXFILEERR_NOMORESTREAMHANDLES MAKE_DDHRESULT(873)
300#define DXFILEERR_NOMOREDATA MAKE_DDHRESULT(874)
301#define DXFILEERR_BADCACHEFILE MAKE_DDHRESULT(875)
302#define DXFILEERR_NOINTERNET MAKE_DDHRESULT(876)
303
304#ifdef __cplusplus
305} /* extern "C" */
306#endif /* defined(__cplusplus) */
307
308#endif /* __WINE_DXFILE_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette