source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/d3dx9xof.h@ 1167

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

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

File size: 7.6 KB
Line 
1#undef INTERFACE
2/*
3 * Copyright 2011 Dylan Smith
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#ifndef __WINE_D3DX9XOF_H
21#define __WINE_D3DX9XOF_H
22
23#include "d3dx9.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29typedef DWORD D3DXF_FILEFORMAT;
30#define D3DXF_FILEFORMAT_BINARY 0
31#define D3DXF_FILEFORMAT_TEXT 1
32#define D3DXF_FILEFORMAT_COMPRESSED 2
33
34typedef DWORD D3DXF_FILESAVEOPTIONS;
35#define D3DXF_FILESAVE_TOFILE 0x00
36#define D3DXF_FILESAVE_TOWFILE 0x01
37
38typedef DWORD D3DXF_FILELOADOPTIONS;
39#define D3DXF_FILELOAD_FROMFILE 0x00
40#define D3DXF_FILELOAD_FROMWFILE 0x01
41#define D3DXF_FILELOAD_FROMRESOURCE 0x02
42#define D3DXF_FILELOAD_FROMMEMORY 0x03
43
44typedef struct _D3DXF_FILELOADRESOURCE
45{
46 HMODULE hModule;
47 const char *lpName;
48 const char *lpType;
49} D3DXF_FILELOADRESOURCE;
50
51typedef struct _D3DXF_FILELOADMEMORY
52{
53 const void *lpMemory;
54 SIZE_T dSize;
55} D3DXF_FILELOADMEMORY;
56
57
58#ifndef _NO_COM
59DEFINE_GUID(IID_ID3DXFile, 0xcef08cf9, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
60DEFINE_GUID(IID_ID3DXFileSaveObject, 0xcef08cfa, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
61DEFINE_GUID(IID_ID3DXFileSaveData, 0xcef08cfb, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
62DEFINE_GUID(IID_ID3DXFileEnumObject, 0xcef08cfc, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
63DEFINE_GUID(IID_ID3DXFileData, 0xcef08cfd, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
64#endif /* _NO_COM */
65
66typedef interface ID3DXFile *LPD3DXFILE, **LPLPD3DXFILE;
67typedef interface ID3DXFileSaveObject *LPD3DXFILESAVEOBJECT, **LPLPD3DXFILESAVEOBJECT;
68typedef interface ID3DXFileSaveData *LPD3DXFILESAVEDATA, **LPLPD3DXFILESAVEDATA;
69typedef interface ID3DXFileEnumObject *LPD3DXFILEENUMOBJECT, **LPLPD3DXFILEENUMOBJECT;
70typedef interface ID3DXFileData *LPD3DXFILEDATA, **LPLPD3DXFILEDATA;
71
72STDAPI D3DXFileCreate(struct ID3DXFile **file);
73
74#define INTERFACE ID3DXFile
75DECLARE_INTERFACE_IID_(ID3DXFile,IUnknown,"cef08cf9-7b4f-4429-9624-2a690a933201")
76{
77 /*** IUnknown methods ***/
78 STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
79 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
80 STDMETHOD_(ULONG,Release)(THIS) PURE;
81 /*** ID3DXFile methods ***/
82 STDMETHOD(CreateEnumObject)(THIS_ const void *src, D3DXF_FILELOADOPTIONS type,
83 struct ID3DXFileEnumObject **enum_obj) PURE;
84 STDMETHOD(CreateSaveObject)(THIS_ const void *data, D3DXF_FILESAVEOPTIONS flags,
85 D3DXF_FILEFORMAT format, struct ID3DXFileSaveObject **save_obj) PURE;
86 STDMETHOD(RegisterTemplates)(THIS_ const void *data, SIZE_T data_size) PURE;
87 STDMETHOD(RegisterEnumTemplates)(THIS_ struct ID3DXFileEnumObject *enum_obj) PURE;
88};
89#undef INTERFACE
90
91#define INTERFACE ID3DXFileSaveObject
92DECLARE_INTERFACE_IID_(ID3DXFileSaveObject,IUnknown,"cef08cfa-7b4f-4429-9624-2a690a933201")
93{
94 /*** IUnknown methods ***/
95 STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
96 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
97 STDMETHOD_(ULONG,Release)(THIS) PURE;
98 /*** ID3DXFileSaveObject methods ***/
99 STDMETHOD(GetFile)(THIS_ ID3DXFile **file) PURE;
100 STDMETHOD(AddDataObject)(THIS_ REFGUID template_guid, const char *name, const GUID *guid,
101 SIZE_T data_size, const void *data, struct ID3DXFileSaveData **obj) PURE;
102 STDMETHOD(Save)(THIS) PURE;
103};
104#undef INTERFACE
105
106#define INTERFACE ID3DXFileSaveData
107DECLARE_INTERFACE_IID_(ID3DXFileSaveData,IUnknown,"cef08cfb-7b4f-4429-9624-2a690a933201")
108{
109 /*** IUnknown methods ***/
110 STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
111 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
112 STDMETHOD_(ULONG,Release)(THIS) PURE;
113 /*** ID3DXFileSaveObject methods ***/
114 STDMETHOD(GetSave)(THIS_ ID3DXFileSaveObject **save_obj) PURE;
115 STDMETHOD(GetName)(THIS_ char *name, SIZE_T *size) PURE;
116 STDMETHOD(GetId)(THIS_ LPGUID) PURE;
117 STDMETHOD(GetType)(THIS_ GUID*) PURE;
118 STDMETHOD(AddDataObject)(THIS_ REFGUID template_guid, const char *name, const GUID *guid,
119 SIZE_T data_size, const void *data, ID3DXFileSaveData **obj) PURE;
120 STDMETHOD(AddDataReference)(THIS_ const char *name, const GUID *id) PURE;
121};
122#undef INTERFACE
123
124
125#define INTERFACE ID3DXFileEnumObject
126DECLARE_INTERFACE_IID_(ID3DXFileEnumObject,IUnknown,"cef08cfc-7b4f-4429-9624-2a690a933201")
127{
128 /*** IUnknown methods ***/
129 STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
130 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
131 STDMETHOD_(ULONG,Release)(THIS) PURE;
132 /*** ID3DXFileEnumObject methods ***/
133 STDMETHOD(GetFile)(THIS_ ID3DXFile **file) PURE;
134 STDMETHOD(GetChildren)(THIS_ SIZE_T*) PURE;
135 STDMETHOD(GetChild)(THIS_ SIZE_T id, struct ID3DXFileData **child) PURE;
136 STDMETHOD(GetDataObjectById)(THIS_ REFGUID guid, struct ID3DXFileData **obj) PURE;
137 STDMETHOD(GetDataObjectByName)(THIS_ const char *name, struct ID3DXFileData **obj) PURE;
138};
139#undef INTERFACE
140
141#define INTERFACE ID3DXFileData
142DECLARE_INTERFACE_IID_(ID3DXFileData,IUnknown,"cef08cfd-7b4f-4429-9624-2a690a933201")
143{
144 /*** IUnknown methods ***/
145 STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
146 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
147 STDMETHOD_(ULONG,Release)(THIS) PURE;
148 /*** ID3DXFileData methods ***/
149 STDMETHOD(GetEnum)(THIS_ ID3DXFileEnumObject **enum_obj) PURE;
150 STDMETHOD(GetName)(THIS_ char *name, SIZE_T *size) PURE;
151 STDMETHOD(GetId)(THIS_ LPGUID) PURE;
152 STDMETHOD(Lock)(THIS_ SIZE_T *data_size, const void **data) PURE;
153 STDMETHOD(Unlock)(THIS) PURE;
154 STDMETHOD(GetType)(THIS_ GUID*) PURE;
155 STDMETHOD_(WINBOOL,IsReference)(THIS) PURE;
156 STDMETHOD(GetChildren)(THIS_ SIZE_T*) PURE;
157 STDMETHOD(GetChild)(THIS_ SIZE_T id, ID3DXFileData **child) PURE;
158};
159#undef INTERFACE
160
161/* D3DX File errors */
162#define _FACD3DXF 0x876
163
164#define D3DXFERR_BADOBJECT MAKE_HRESULT(1,_FACD3DXF,900)
165#define D3DXFERR_BADVALUE MAKE_HRESULT(1,_FACD3DXF,901)
166#define D3DXFERR_BADTYPE MAKE_HRESULT(1,_FACD3DXF,902)
167#define D3DXFERR_NOTFOUND MAKE_HRESULT(1,_FACD3DXF,903)
168#define D3DXFERR_NOTDONEYET MAKE_HRESULT(1,_FACD3DXF,904)
169#define D3DXFERR_FILENOTFOUND MAKE_HRESULT(1,_FACD3DXF,905)
170#define D3DXFERR_RESOURCENOTFOUND MAKE_HRESULT(1,_FACD3DXF,906)
171#define D3DXFERR_BADRESOURCE MAKE_HRESULT(1,_FACD3DXF,907)
172#define D3DXFERR_BADFILETYPE MAKE_HRESULT(1,_FACD3DXF,908)
173#define D3DXFERR_BADFILEVERSION MAKE_HRESULT(1,_FACD3DXF,909)
174#define D3DXFERR_BADFILEFLOATSIZE MAKE_HRESULT(1,_FACD3DXF,910)
175#define D3DXFERR_BADFILE MAKE_HRESULT(1,_FACD3DXF,911)
176#define D3DXFERR_PARSEERROR MAKE_HRESULT(1,_FACD3DXF,912)
177#define D3DXFERR_BADARRAYSIZE MAKE_HRESULT(1,_FACD3DXF,913)
178#define D3DXFERR_BADDATAREFERENCE MAKE_HRESULT(1,_FACD3DXF,914)
179#define D3DXFERR_NOMOREOBJECTS MAKE_HRESULT(1,_FACD3DXF,915)
180#define D3DXFERR_NOMOREDATA MAKE_HRESULT(1,_FACD3DXF,916)
181#define D3DXFERR_BADCACHEFILE MAKE_HRESULT(1,_FACD3DXF,917)
182
183#ifdef __cplusplus
184}
185#endif
186
187#endif /* __WINE_D3DX9XOF_H */
Note: See TracBrowser for help on using the repository browser.