comdlg32: Sign-compare warnings fix.
[wine/wine64.git] / dlls / d3dxof / d3dxof_private.h
blob5a77e56020446964363ff2a7e840e8e45d26dd8f
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 char name[MAX_NAME_LEN];
71 GUID class_id;
72 GUID type;
73 LPBYTE pdata;
74 DWORD size;
75 ULONG nb_members;
76 xobject_member members[MAX_MEMBERS];
77 ULONG nb_childs;
78 struct _xobject * childs[MAX_CHILDS];
81 typedef struct _xobject xobject;
83 typedef struct {
84 IDirectXFile lpVtbl;
85 LONG ref;
86 ULONG nb_xtemplates;
87 xtemplate xtemplates[MAX_TEMPLATES];
88 } IDirectXFileImpl;
90 typedef struct {
91 IDirectXFileBinary lpVtbl;
92 LONG ref;
93 } IDirectXFileBinaryImpl;
95 typedef struct {
96 IDirectXFileData lpVtbl;
97 LONG ref;
98 xobject* pobj;
99 int cur_enum_object;
100 } IDirectXFileDataImpl;
102 typedef struct {
103 IDirectXFileDataReference lpVtbl;
104 LONG ref;
105 } IDirectXFileDataReferenceImpl;
107 typedef struct {
108 IDirectXFileObject lpVtbl;
109 LONG ref;
110 } IDirectXFileObjectImpl;
112 typedef struct {
113 /* Buffer to parse */
114 LPBYTE buffer;
115 DWORD rem_bytes;
116 /* Misc info */
117 WORD current_token;
118 BOOL token_present;
119 BOOL txt;
120 ULONG cur_subobject;
121 LPBYTE cur_pdata;
122 BYTE value[100];
123 IDirectXFileImpl* pdxf;
124 xobject* pxo;
125 xtemplate* pxt[MAX_SUBOBJECTS];
126 ULONG level;
127 } parse_buffer;
129 typedef struct {
130 IDirectXFileEnumObject lpVtbl;
131 LONG ref;
132 DXFILELOADOPTIONS source;
133 HANDLE hFile;
134 parse_buffer buf;
135 IDirectXFileImpl* pDirectXFile;
136 ULONG nb_xobjects;
137 xobject xobjects[MAX_OBJECTS][MAX_SUBOBJECTS];
138 } IDirectXFileEnumObjectImpl;
140 typedef struct {
141 IDirectXFileSaveObject lpVtbl;
142 LONG ref;
143 } IDirectXFileSaveObjectImpl;
145 HRESULT IDirectXFileImpl_Create(IUnknown *pUnkOuter, LPVOID *ppObj);
146 HRESULT IDirectXFileBinaryImpl_Create(IDirectXFileBinaryImpl** ppObj);
147 HRESULT IDirectXFileDataImpl_Create(IDirectXFileDataImpl** ppObj);
148 HRESULT IDirectXFileDataReferenceImpl_Create(IDirectXFileDataReferenceImpl** ppObj);
149 HRESULT IDirectXFileEnumObjectImpl_Create(IDirectXFileEnumObjectImpl** ppObj);
150 HRESULT IDirectXFileFileObjectImpl_Create(IDirectXFileObjectImpl** ppObj);
151 HRESULT IDirectXFileFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl** ppObj);
153 #endif /* __D3DXOF_PRIVATE_INCLUDED__ */