1 | /*
|
---|
2 | * Copyright 2011 Dylan Smith
|
---|
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 | * Oracle 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, Oracle 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_D3DX9XOF_H
|
---|
29 | #define __WINE_D3DX9XOF_H
|
---|
30 |
|
---|
31 | #include "d3dx9.h"
|
---|
32 |
|
---|
33 | #ifdef __cplusplus
|
---|
34 | extern "C" {
|
---|
35 | #endif
|
---|
36 |
|
---|
37 | typedef DWORD D3DXF_FILEFORMAT;
|
---|
38 | #define D3DXF_FILEFORMAT_BINARY 0
|
---|
39 | #define D3DXF_FILEFORMAT_TEXT 1
|
---|
40 | #define D3DXF_FILEFORMAT_COMPRESSED 2
|
---|
41 |
|
---|
42 | typedef DWORD D3DXF_FILESAVEOPTIONS;
|
---|
43 | #define D3DXF_FILESAVE_TOFILE 0x00
|
---|
44 | #define D3DXF_FILESAVE_TOWFILE 0x01
|
---|
45 |
|
---|
46 | typedef DWORD D3DXF_FILELOADOPTIONS;
|
---|
47 | #define D3DXF_FILELOAD_FROMFILE 0x00
|
---|
48 | #define D3DXF_FILELOAD_FROMWFILE 0x01
|
---|
49 | #define D3DXF_FILELOAD_FROMRESOURCE 0x02
|
---|
50 | #define D3DXF_FILELOAD_FROMMEMORY 0x03
|
---|
51 |
|
---|
52 | typedef struct _D3DXF_FILELOADRESOURCE
|
---|
53 | {
|
---|
54 | HMODULE hModule;
|
---|
55 | const char *lpName;
|
---|
56 | const char *lpType;
|
---|
57 | } D3DXF_FILELOADRESOURCE;
|
---|
58 |
|
---|
59 | typedef struct _D3DXF_FILELOADMEMORY
|
---|
60 | {
|
---|
61 | void *lpMemory;
|
---|
62 | SIZE_T dSize;
|
---|
63 | } D3DXF_FILELOADMEMORY;
|
---|
64 |
|
---|
65 |
|
---|
66 | #ifndef _NO_COM
|
---|
67 | DEFINE_GUID(IID_ID3DXFile, 0xcef08cf9, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
|
---|
68 | DEFINE_GUID(IID_ID3DXFileSaveObject, 0xcef08cfa, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
|
---|
69 | DEFINE_GUID(IID_ID3DXFileSaveData, 0xcef08cfb, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
|
---|
70 | DEFINE_GUID(IID_ID3DXFileEnumObject, 0xcef08cfc, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
|
---|
71 | DEFINE_GUID(IID_ID3DXFileData, 0xcef08cfd, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
|
---|
72 | #endif /* _NO_COM */
|
---|
73 |
|
---|
74 | typedef interface ID3DXFile *LPD3DXFILE, **LPLPD3DXFILE;
|
---|
75 | typedef interface ID3DXFileSaveObject *LPD3DXFILESAVEOBJECT, **LPLPD3DXFILESAVEOBJECT;
|
---|
76 | typedef interface ID3DXFileSaveData *LPD3DXFILESAVEDATA, **LPLPD3DXFILESAVEDATA;
|
---|
77 | typedef interface ID3DXFileEnumObject *LPD3DXFILEENUMOBJECT, **LPLPD3DXFILEENUMOBJECT;
|
---|
78 | typedef interface ID3DXFileData *LPD3DXFILEDATA, **LPLPD3DXFILEDATA;
|
---|
79 |
|
---|
80 | STDAPI D3DXFileCreate(struct ID3DXFile **file);
|
---|
81 |
|
---|
82 | #define INTERFACE ID3DXFile
|
---|
83 | DECLARE_INTERFACE_IID_(ID3DXFile,IUnknown,"cef08cf9-7b4f-4429-9624-2a690a933201")
|
---|
84 | {
|
---|
85 | /*** IUnknown methods ***/
|
---|
86 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
|
---|
87 | STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
---|
88 | STDMETHOD_(ULONG,Release)(THIS) PURE;
|
---|
89 | /*** ID3DXFile methods ***/
|
---|
90 | STDMETHOD(CreateEnumObject)(THIS_ const void *src, D3DXF_FILELOADOPTIONS type,
|
---|
91 | struct ID3DXFileEnumObject **enum_obj) PURE;
|
---|
92 | STDMETHOD(CreateSaveObject)(THIS_ const void *data, D3DXF_FILESAVEOPTIONS flags,
|
---|
93 | D3DXF_FILEFORMAT format, struct ID3DXFileSaveObject **save_obj) PURE;
|
---|
94 | STDMETHOD(RegisterTemplates)(THIS_ const void *data, SIZE_T data_size) PURE;
|
---|
95 | STDMETHOD(RegisterEnumTemplates)(THIS_ struct ID3DXFileEnumObject *enum_obj) PURE;
|
---|
96 | };
|
---|
97 | #undef INTERFACE
|
---|
98 |
|
---|
99 | #define INTERFACE ID3DXFileSaveObject
|
---|
100 | DECLARE_INTERFACE_IID_(ID3DXFileSaveObject,IUnknown,"cef08cfa-7b4f-4429-9624-2a690a933201")
|
---|
101 | {
|
---|
102 | /*** IUnknown methods ***/
|
---|
103 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
|
---|
104 | STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
---|
105 | STDMETHOD_(ULONG,Release)(THIS) PURE;
|
---|
106 | /*** ID3DXFileSaveObject methods ***/
|
---|
107 | STDMETHOD(GetFile)(THIS_ ID3DXFile **file) PURE;
|
---|
108 | STDMETHOD(AddDataObject)(THIS_ REFGUID template_guid, const char *name, const GUID *guid,
|
---|
109 | SIZE_T data_size, const void *data, struct ID3DXFileSaveData **obj) PURE;
|
---|
110 | STDMETHOD(Save)(THIS) PURE;
|
---|
111 | };
|
---|
112 | #undef INTERFACE
|
---|
113 |
|
---|
114 | #define INTERFACE ID3DXFileSaveData
|
---|
115 | DECLARE_INTERFACE_IID_(ID3DXFileSaveData,IUnknown,"cef08cfb-7b4f-4429-9624-2a690a933201")
|
---|
116 | {
|
---|
117 | /*** IUnknown methods ***/
|
---|
118 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
|
---|
119 | STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
---|
120 | STDMETHOD_(ULONG,Release)(THIS) PURE;
|
---|
121 | /*** ID3DXFileSaveObject methods ***/
|
---|
122 | STDMETHOD(GetSave)(THIS_ ID3DXFileSaveObject **save_obj) PURE;
|
---|
123 | STDMETHOD(GetName)(THIS_ char *name, SIZE_T *size) PURE;
|
---|
124 | STDMETHOD(GetId)(THIS_ LPGUID) PURE;
|
---|
125 | STDMETHOD(GetType)(THIS_ GUID*) PURE;
|
---|
126 | STDMETHOD(AddDataObject)(THIS_ REFGUID template_guid, const char *name, const GUID *guid,
|
---|
127 | SIZE_T data_size, const void *data, ID3DXFileSaveData **obj) PURE;
|
---|
128 | STDMETHOD(AddDataReference)(THIS_ const char *name, const GUID *id) PURE;
|
---|
129 | };
|
---|
130 | #undef INTERFACE
|
---|
131 |
|
---|
132 |
|
---|
133 | #define INTERFACE ID3DXFileEnumObject
|
---|
134 | DECLARE_INTERFACE_IID_(ID3DXFileEnumObject,IUnknown,"cef08cfc-7b4f-4429-9624-2a690a933201")
|
---|
135 | {
|
---|
136 | /*** IUnknown methods ***/
|
---|
137 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
|
---|
138 | STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
---|
139 | STDMETHOD_(ULONG,Release)(THIS) PURE;
|
---|
140 | /*** ID3DXFileEnumObject methods ***/
|
---|
141 | STDMETHOD(GetFile)(THIS_ ID3DXFile **file) PURE;
|
---|
142 | STDMETHOD(GetChildren)(THIS_ SIZE_T*) PURE;
|
---|
143 | STDMETHOD(GetChild)(THIS_ SIZE_T id, struct ID3DXFileData **child) PURE;
|
---|
144 | STDMETHOD(GetDataObjectById)(THIS_ REFGUID guid, struct ID3DXFileData **obj) PURE;
|
---|
145 | STDMETHOD(GetDataObjectByName)(THIS_ const char *name, struct ID3DXFileData **obj) PURE;
|
---|
146 | };
|
---|
147 | #undef INTERFACE
|
---|
148 |
|
---|
149 | #define INTERFACE ID3DXFileData
|
---|
150 | DECLARE_INTERFACE_IID_(ID3DXFileData,IUnknown,"cef08cfd-7b4f-4429-9624-2a690a933201")
|
---|
151 | {
|
---|
152 | /*** IUnknown methods ***/
|
---|
153 | STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
|
---|
154 | STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
---|
155 | STDMETHOD_(ULONG,Release)(THIS) PURE;
|
---|
156 | /*** ID3DXFileData methods ***/
|
---|
157 | STDMETHOD(GetEnum)(THIS_ ID3DXFileEnumObject **enum_obj) PURE;
|
---|
158 | STDMETHOD(GetName)(THIS_ char *name, SIZE_T *size) PURE;
|
---|
159 | STDMETHOD(GetId)(THIS_ LPGUID) PURE;
|
---|
160 | STDMETHOD(Lock)(THIS_ SIZE_T *data_size, const void **data) PURE;
|
---|
161 | STDMETHOD(Unlock)(THIS) PURE;
|
---|
162 | STDMETHOD(GetType)(THIS_ GUID*) PURE;
|
---|
163 | STDMETHOD_(BOOL,IsReference)(THIS) PURE;
|
---|
164 | STDMETHOD(GetChildren)(THIS_ SIZE_T*) PURE;
|
---|
165 | STDMETHOD(GetChild)(THIS_ SIZE_T id, ID3DXFileData **child) PURE;
|
---|
166 | };
|
---|
167 | #undef INTERFACE
|
---|
168 |
|
---|
169 | /* D3DX File errors */
|
---|
170 | #define _FACD3DXF 0x876
|
---|
171 |
|
---|
172 | #define D3DXFERR_BADOBJECT MAKE_HRESULT(1,_FACD3DXF,900)
|
---|
173 | #define D3DXFERR_BADVALUE MAKE_HRESULT(1,_FACD3DXF,901)
|
---|
174 | #define D3DXFERR_BADTYPE MAKE_HRESULT(1,_FACD3DXF,902)
|
---|
175 | #define D3DXFERR_NOTFOUND MAKE_HRESULT(1,_FACD3DXF,903)
|
---|
176 | #define D3DXFERR_NOTDONEYET MAKE_HRESULT(1,_FACD3DXF,904)
|
---|
177 | #define D3DXFERR_FILENOTFOUND MAKE_HRESULT(1,_FACD3DXF,905)
|
---|
178 | #define D3DXFERR_RESOURCENOTFOUND MAKE_HRESULT(1,_FACD3DXF,906)
|
---|
179 | #define D3DXFERR_BADRESOURCE MAKE_HRESULT(1,_FACD3DXF,907)
|
---|
180 | #define D3DXFERR_BADFILETYPE MAKE_HRESULT(1,_FACD3DXF,908)
|
---|
181 | #define D3DXFERR_BADFILEVERSION MAKE_HRESULT(1,_FACD3DXF,909)
|
---|
182 | #define D3DXFERR_BADFILEFLOATSIZE MAKE_HRESULT(1,_FACD3DXF,910)
|
---|
183 | #define D3DXFERR_BADFILE MAKE_HRESULT(1,_FACD3DXF,911)
|
---|
184 | #define D3DXFERR_PARSEERROR MAKE_HRESULT(1,_FACD3DXF,912)
|
---|
185 | #define D3DXFERR_BADARRAYSIZE MAKE_HRESULT(1,_FACD3DXF,913)
|
---|
186 | #define D3DXFERR_BADDATAREFERENCE MAKE_HRESULT(1,_FACD3DXF,914)
|
---|
187 | #define D3DXFERR_NOMOREOBJECTS MAKE_HRESULT(1,_FACD3DXF,915)
|
---|
188 | #define D3DXFERR_NOMOREDATA MAKE_HRESULT(1,_FACD3DXF,916)
|
---|
189 | #define D3DXFERR_BADCACHEFILE MAKE_HRESULT(1,_FACD3DXF,917)
|
---|
190 |
|
---|
191 | #ifdef __cplusplus
|
---|
192 | }
|
---|
193 | #endif
|
---|
194 |
|
---|
195 | #endif /* __WINE_D3DX9XOF_H */
|
---|