ntdll: Do not report non-reserved memory areas as free since we don't know what's...
[wine/multimedia.git] / dlls / d3dxof / d3dxof_private.h
blobba403dffa4543b75a806b645e834fa7f11083cf7
1 /*
2 * DirectX File private interfaces (D3DXOF.DLL)
4 * Copyright 2004, 2008 Christian Costa
6 * This file contains the (internal) driver registration functions,
7 * driver enumeration APIs and DirectDraw creation functions.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #ifndef __D3DXOF_PRIVATE_INCLUDED__
25 #define __D3DXOF_PRIVATE_INCLUDED__
27 #include <stdarg.h>
29 #include "windef.h"
30 #include "winbase.h"
31 #include "wtypes.h"
32 #include "wingdi.h"
33 #include "winuser.h"
34 #include "dxfile.h"
36 #define MAX_NAME_LEN 32
37 #define MAX_ARRAY_DIM 1
38 #define MAX_MEMBERS 50
39 #define MAX_CHILDS 10
40 #define MAX_TEMPLATES 200
41 #define MAX_OBJECTS 200
42 #define MAX_SUBOBJECTS 20
44 typedef struct {
45 DWORD type;
46 LONG idx_template;
47 char name[MAX_NAME_LEN];
48 ULONG nb_dims;
49 BOOL dim_fixed[MAX_ARRAY_DIM]; /* fixed or variable */
50 ULONG dim_value[MAX_ARRAY_DIM]; /* fixed value or member index */
51 } member;
53 typedef struct {
54 char name[MAX_NAME_LEN];
55 GUID class_id;
56 BOOL open;
57 ULONG nb_childs;
58 char childs[MAX_CHILDS][MAX_NAME_LEN];
59 ULONG nb_members;
60 member members[MAX_MEMBERS];
61 } xtemplate;
63 typedef struct {
64 char name[MAX_NAME_LEN];
65 LPBYTE start;
66 ULONG size;
67 } xobject_member;
69 struct _xobject {
70 struct _xobject* ptarget;
71 char name[MAX_NAME_LEN];
72 GUID class_id;
73 GUID type;
74 LPBYTE pdata;
75 DWORD size;
76 ULONG nb_members;
77 xobject_member members[MAX_MEMBERS];
78 ULONG nb_childs;
79 ULONG nb_subobjects;
80 struct _xobject * childs[MAX_CHILDS];
83 typedef struct _xobject xobject;
85 typedef struct {
86 IDirectXFile lpVtbl;
87 LONG ref;
88 ULONG nb_xtemplates;
89 xtemplate xtemplates[MAX_TEMPLATES];
90 } IDirectXFileImpl;
92 typedef struct {
93 IDirectXFileBinary lpVtbl;
94 LONG ref;
95 } IDirectXFileBinaryImpl;
97 typedef struct {
98 IDirectXFileData lpVtbl;
99 LONG ref;
100 xobject* pobj;
101 int cur_enum_object;
102 BOOL from_ref;
103 ULONG level;
104 } IDirectXFileDataImpl;
106 typedef struct {
107 IDirectXFileDataReference lpVtbl;
108 LONG ref;
109 xobject* ptarget;
110 } IDirectXFileDataReferenceImpl;
112 typedef struct {
113 IDirectXFileObject lpVtbl;
114 LONG ref;
115 } IDirectXFileObjectImpl;
117 typedef struct {
118 /* Buffer to parse */
119 LPBYTE buffer;
120 DWORD rem_bytes;
121 /* Misc info */
122 WORD current_token;
123 BOOL token_present;
124 BOOL txt;
125 ULONG cur_subobject;
126 LPBYTE cur_pdata;
127 BYTE value[100];
128 xobject* pxo_globals;
129 ULONG nb_pxo_globals;
130 xobject* pxo_tab;
131 IDirectXFileImpl* pdxf;
132 xobject* pxo;
133 xtemplate* pxt[MAX_SUBOBJECTS];
134 ULONG level;
135 } parse_buffer;
137 typedef struct {
138 IDirectXFileEnumObject lpVtbl;
139 LONG ref;
140 DXFILELOADOPTIONS source;
141 HANDLE hFile;
142 parse_buffer buf;
143 IDirectXFileImpl* pDirectXFile;
144 ULONG nb_xobjects;
145 xobject xobjects[MAX_OBJECTS][MAX_SUBOBJECTS];
146 } IDirectXFileEnumObjectImpl;
148 typedef struct {
149 IDirectXFileSaveObject lpVtbl;
150 LONG ref;
151 } IDirectXFileSaveObjectImpl;
153 HRESULT IDirectXFileImpl_Create(IUnknown *pUnkOuter, LPVOID *ppObj);
154 HRESULT IDirectXFileBinaryImpl_Create(IDirectXFileBinaryImpl** ppObj);
155 HRESULT IDirectXFileDataImpl_Create(IDirectXFileDataImpl** ppObj);
156 HRESULT IDirectXFileDataReferenceImpl_Create(IDirectXFileDataReferenceImpl** ppObj);
157 HRESULT IDirectXFileEnumObjectImpl_Create(IDirectXFileEnumObjectImpl** ppObj);
158 HRESULT IDirectXFileFileObjectImpl_Create(IDirectXFileObjectImpl** ppObj);
159 HRESULT IDirectXFileFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl** ppObj);
161 #endif /* __D3DXOF_PRIVATE_INCLUDED__ */