ReactOS  0.4.15-dev-985-gd905dd5
d3dx9xof.h
Go to the documentation of this file.
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 #ifndef __WINE_D3DX9XOF_H
20 #define __WINE_D3DX9XOF_H
21 
22 #include "d3dx9.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
29 #define D3DXF_FILEFORMAT_BINARY 0
30 #define D3DXF_FILEFORMAT_TEXT 1
31 #define D3DXF_FILEFORMAT_COMPRESSED 2
32 
34 #define D3DXF_FILESAVE_TOFILE 0x00
35 #define D3DXF_FILESAVE_TOWFILE 0x01
36 
38 #define D3DXF_FILELOAD_FROMFILE 0x00
39 #define D3DXF_FILELOAD_FROMWFILE 0x01
40 #define D3DXF_FILELOAD_FROMRESOURCE 0x02
41 #define D3DXF_FILELOAD_FROMMEMORY 0x03
42 
44 {
46  const char *lpName;
47  const char *lpType;
49 
50 typedef struct _D3DXF_FILELOADMEMORY
51 {
52  void *lpMemory;
55 
56 
57 #ifndef _NO_COM
58 DEFINE_GUID(IID_ID3DXFile, 0xcef08cf9, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
59 DEFINE_GUID(IID_ID3DXFileSaveObject, 0xcef08cfa, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
60 DEFINE_GUID(IID_ID3DXFileSaveData, 0xcef08cfb, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
61 DEFINE_GUID(IID_ID3DXFileEnumObject, 0xcef08cfc, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
62 DEFINE_GUID(IID_ID3DXFileData, 0xcef08cfd, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01);
63 #endif /* _NO_COM */
64 
65 typedef interface ID3DXFile *LPD3DXFILE, **LPLPD3DXFILE;
66 typedef interface ID3DXFileSaveObject *LPD3DXFILESAVEOBJECT, **LPLPD3DXFILESAVEOBJECT;
67 typedef interface ID3DXFileSaveData *LPD3DXFILESAVEDATA, **LPLPD3DXFILESAVEDATA;
68 typedef interface ID3DXFileEnumObject *LPD3DXFILEENUMOBJECT, **LPLPD3DXFILEENUMOBJECT;
69 typedef interface ID3DXFileData *LPD3DXFILEDATA, **LPLPD3DXFILEDATA;
70 
71 STDAPI D3DXFileCreate(struct ID3DXFile **file);
72 
73 #define INTERFACE ID3DXFile
74 DECLARE_INTERFACE_IID_(ID3DXFile,IUnknown,"cef08cf9-7b4f-4429-9624-2a690a933201")
75 {
76  /*** IUnknown methods ***/
80  /*** ID3DXFile methods ***/
81  STDMETHOD(CreateEnumObject)(THIS_ const void *src, D3DXF_FILELOADOPTIONS type,
82  struct ID3DXFileEnumObject **enum_obj) PURE;
83  STDMETHOD(CreateSaveObject)(THIS_ const void *data, D3DXF_FILESAVEOPTIONS flags,
84  D3DXF_FILEFORMAT format, struct ID3DXFileSaveObject **save_obj) PURE;
85  STDMETHOD(RegisterTemplates)(THIS_ const void *data, SIZE_T data_size) PURE;
86  STDMETHOD(RegisterEnumTemplates)(THIS_ struct ID3DXFileEnumObject *enum_obj) PURE;
87 };
88 #undef INTERFACE
89 
90 #define INTERFACE ID3DXFileSaveObject
91 DECLARE_INTERFACE_IID_(ID3DXFileSaveObject,IUnknown,"cef08cfa-7b4f-4429-9624-2a690a933201")
92 {
93  /*** IUnknown methods ***/
97  /*** ID3DXFileSaveObject methods ***/
98  STDMETHOD(GetFile)(THIS_ ID3DXFile **file) PURE;
99  STDMETHOD(AddDataObject)(THIS_ REFGUID template_guid, const char *name, const GUID *guid,
100  SIZE_T data_size, const void *data, struct ID3DXFileSaveData **obj) PURE;
102 };
103 #undef INTERFACE
104 
105 #define INTERFACE ID3DXFileSaveData
106 DECLARE_INTERFACE_IID_(ID3DXFileSaveData,IUnknown,"cef08cfb-7b4f-4429-9624-2a690a933201")
107 {
108  /*** IUnknown methods ***/
112  /*** ID3DXFileSaveObject methods ***/
113  STDMETHOD(GetSave)(THIS_ ID3DXFileSaveObject **save_obj) PURE;
115  STDMETHOD(GetId)(THIS_ LPGUID) PURE;
117  STDMETHOD(AddDataObject)(THIS_ REFGUID template_guid, const char *name, const GUID *guid,
118  SIZE_T data_size, const void *data, ID3DXFileSaveData **obj) PURE;
119  STDMETHOD(AddDataReference)(THIS_ const char *name, const GUID *id) PURE;
120 };
121 #undef INTERFACE
122 
123 
124 #define INTERFACE ID3DXFileEnumObject
125 DECLARE_INTERFACE_IID_(ID3DXFileEnumObject,IUnknown,"cef08cfc-7b4f-4429-9624-2a690a933201")
126 {
127  /*** IUnknown methods ***/
131  /*** ID3DXFileEnumObject methods ***/
132  STDMETHOD(GetFile)(THIS_ ID3DXFile **file) PURE;
133  STDMETHOD(GetChildren)(THIS_ SIZE_T*) PURE;
134  STDMETHOD(GetChild)(THIS_ SIZE_T id, struct ID3DXFileData **child) PURE;
135  STDMETHOD(GetDataObjectById)(THIS_ REFGUID guid, struct ID3DXFileData **obj) PURE;
136  STDMETHOD(GetDataObjectByName)(THIS_ const char *name, struct ID3DXFileData **obj) PURE;
137 };
138 #undef INTERFACE
139 
140 #define INTERFACE ID3DXFileData
141 DECLARE_INTERFACE_IID_(ID3DXFileData,IUnknown,"cef08cfd-7b4f-4429-9624-2a690a933201")
142 {
143  /*** IUnknown methods ***/
147  /*** ID3DXFileData methods ***/
148  STDMETHOD(GetEnum)(THIS_ ID3DXFileEnumObject **enum_obj) PURE;
150  STDMETHOD(GetId)(THIS_ LPGUID) PURE;
151  STDMETHOD(Lock)(THIS_ SIZE_T *data_size, const void **data) PURE;
154  STDMETHOD_(BOOL,IsReference)(THIS) PURE;
155  STDMETHOD(GetChildren)(THIS_ SIZE_T*) PURE;
156  STDMETHOD(GetChild)(THIS_ SIZE_T id, ID3DXFileData **child) PURE;
157 };
158 #undef INTERFACE
159 
160 /* D3DX File errors */
161 #define _FACD3DXF 0x876
162 
163 #define D3DXFERR_BADOBJECT MAKE_HRESULT(1,_FACD3DXF,900)
164 #define D3DXFERR_BADVALUE MAKE_HRESULT(1,_FACD3DXF,901)
165 #define D3DXFERR_BADTYPE MAKE_HRESULT(1,_FACD3DXF,902)
166 #define D3DXFERR_NOTFOUND MAKE_HRESULT(1,_FACD3DXF,903)
167 #define D3DXFERR_NOTDONEYET MAKE_HRESULT(1,_FACD3DXF,904)
168 #define D3DXFERR_FILENOTFOUND MAKE_HRESULT(1,_FACD3DXF,905)
169 #define D3DXFERR_RESOURCENOTFOUND MAKE_HRESULT(1,_FACD3DXF,906)
170 #define D3DXFERR_BADRESOURCE MAKE_HRESULT(1,_FACD3DXF,907)
171 #define D3DXFERR_BADFILETYPE MAKE_HRESULT(1,_FACD3DXF,908)
172 #define D3DXFERR_BADFILEVERSION MAKE_HRESULT(1,_FACD3DXF,909)
173 #define D3DXFERR_BADFILEFLOATSIZE MAKE_HRESULT(1,_FACD3DXF,910)
174 #define D3DXFERR_BADFILE MAKE_HRESULT(1,_FACD3DXF,911)
175 #define D3DXFERR_PARSEERROR MAKE_HRESULT(1,_FACD3DXF,912)
176 #define D3DXFERR_BADARRAYSIZE MAKE_HRESULT(1,_FACD3DXF,913)
177 #define D3DXFERR_BADDATAREFERENCE MAKE_HRESULT(1,_FACD3DXF,914)
178 #define D3DXFERR_NOMOREOBJECTS MAKE_HRESULT(1,_FACD3DXF,915)
179 #define D3DXFERR_NOMOREDATA MAKE_HRESULT(1,_FACD3DXF,916)
180 #define D3DXFERR_BADCACHEFILE MAKE_HRESULT(1,_FACD3DXF,917)
181 
182 #ifdef __cplusplus
183 }
184 #endif
185 
186 #endif /* __WINE_D3DX9XOF_H */
#define STDAPI
Definition: basetyps.h:41
#define REFIID
Definition: guiddef.h:118
STDAPI D3DXFileCreate(struct ID3DXFile **file)
Definition: xfile.c:715
#define THIS_
Definition: basetyps.h:65
Definition: scsiwmi.h:51
_In_ BOOLEAN Release
Definition: classpnp.h:1122
#define THIS
Definition: basetyps.h:66
interface ID3DXFileSaveData * LPD3DXFILESAVEDATA
Definition: d3dx9xof.h:67
interface ID3DXFileSaveData ** LPLPD3DXFILESAVEDATA
Definition: d3dx9xof.h:67
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
interface ID3DXFileEnumObject ** LPLPD3DXFILEENUMOBJECT
Definition: d3dx9xof.h:68
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
interface ID3DXFile ** LPLPD3DXFILE
Definition: d3dx9xof.h:65
interface ID3DXFile * LPD3DXFILE
Definition: d3dx9xof.h:65
struct _D3DXF_FILELOADMEMORY D3DXF_FILELOADMEMORY
static HWND child
Definition: cursoricon.c:298
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
struct _D3DXF_FILELOADRESOURCE D3DXF_FILELOADRESOURCE
#define STDMETHOD(m)
Definition: basetyps.h:62
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
const GUID * guid
unsigned int BOOL
Definition: ntddk_ex.h:94
static int Save(const char **args)
Definition: vfdcmd.c:1851
interface ID3DXFileEnumObject * LPD3DXFILEENUMOBJECT
Definition: d3dx9xof.h:68
interface ID3DXFileSaveObject ** LPLPD3DXFILESAVEOBJECT
Definition: d3dx9xof.h:66
GLsizeiptr size
Definition: glext.h:5919
DEFINE_GUID(IID_ID3DXFile, 0xcef08cf9, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01)
interface ID3DXFileData ** LPLPD3DXFILEDATA
Definition: d3dx9xof.h:69
const char file[]
Definition: icontest.c:11
static FILE * out
Definition: regtests2xml.c:44
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
interface ID3DXFileData * LPD3DXFILEDATA
Definition: d3dx9xof.h:69
GLbitfield flags
Definition: glext.h:7161
INT GetType(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
Definition: gettype.c:129
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
GLenum src
Definition: glext.h:6340
const char * lpName
Definition: d3dx9xof.h:46
ULONG_PTR SIZE_T
Definition: typedefs.h:80
DWORD D3DXF_FILELOADOPTIONS
Definition: d3dx9xof.h:37
DWORD D3DXF_FILESAVEOPTIONS
Definition: d3dx9xof.h:33
DWORD D3DXF_FILEFORMAT
Definition: d3dx9xof.h:28
#define PURE
Definition: basetyps.h:64
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
unsigned int ULONG
Definition: retypes.h:1
GLenum GLuint id
Definition: glext.h:5579
const char * lpType
Definition: d3dx9xof.h:47
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
interface ID3DXFileSaveObject * LPD3DXFILESAVEOBJECT
Definition: d3dx9xof.h:66
DECLARE_INTERFACE_IID_(ID3DXFile, IUnknown,"cef08cf9-7b4f-4429-9624-2a690a933201")
Definition: d3dx9xof.h:74
GUID * LPGUID
Definition: guiddef.h:81
Definition: fci.c:126
GLuint const GLchar * name
Definition: glext.h:6031