4 * Copyright 2002 Ove Kaaven
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WIDL_WIDLTYPES_H
22 #define __WIDL_WIDLTYPES_H
26 #include "wine/rpcfc.h"
36 typedef struct _attr_t attr_t;
37 typedef struct _expr_t expr_t;
38 typedef struct _type_t type_t;
39 typedef struct _typeref_t typeref_t;
40 typedef struct _var_t var_t;
41 typedef struct _func_t func_t;
42 typedef struct _ifref_t ifref_t;
43 typedef struct _typelib_entry_t typelib_entry_t;
44 typedef struct _importlib_t importlib_t;
45 typedef struct _importinfo_t importinfo_t;
46 typedef struct _typelib_t typelib_t;
48 #define DECL_LINK(type) \
52 #define LINK(x,y) do { x->l_next = y; x->l_prev = NULL; if (y) y->l_prev = x; } while (0)
54 #define INIT_LINK(x) do { x->l_next = NULL; x->l_prev = NULL; } while (0)
55 #define NEXT_LINK(x) ((x)->l_next)
56 #define PREV_LINK(x) ((x)->l_prev)
58 #define END_OF_LIST(list) \
61 while (NEXT_LINK(list)) \
62 list = NEXT_LINK(list); \
79 ATTR_DEFAULTVALUE_EXPR,
80 ATTR_DEFAULTVALUE_STRING,
94 ATTR_HELPSTRINGCONTEXT,
101 ATTR_IMPLICIT_HANDLE,
163 TKIND_PRIMITIVE = -1,
181 /* parser-internal */
192 const typeref_t *tref;
197 /* parser-internal */
207 func_t *funcs; /* interfaces and modules */
208 var_t *fields; /* interfaces, structures and enumerations */
209 ifref_t *ifaces; /* coclasses */
210 type_t *orig; /* dup'd types */
211 int ignore, is_const, sign;
212 int defined, written, user_types_registered;
214 /* parser-internal */
229 var_t *args; /* for function pointers */
234 /* parser-internal */
243 /* parser-internal */
251 /* parser-internal */
255 struct _typelib_entry_t {
257 DECL_LINK(typelib_entry_t);
260 struct _importinfo_t {
268 importlib_t *importlib;
271 struct _importlib_t {
277 importinfo_t *importinfos;
282 DECL_LINK(importlib_t);
289 typelib_entry_t *entry;
290 importlib_t *importlibs;
293 void init_types(void);
295 type_t *duptype(type_t *t, int dupname);
296 type_t *alias(type_t *t, const char *name);
298 int is_ptr(const type_t *t);
299 int is_var_ptr(var_t *v);
300 int cant_be_null(var_t *v);