Reorder the virtual table definition so it's defined before it is used
[wine] / tools / widl / typelib.h
1 /*
2  * IDL Compiler
3  *
4  * Copyright 2004 Ove Kaaven
5  *
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.
10  *
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.
15  *
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WIDL_TYPELIB_H
22 #define __WIDL_TYPELIB_H
23
24 extern int in_typelib;
25 extern void start_typelib(char *name, attr_t *attrs);
26 extern void end_typelib(void);
27 extern void add_interface(type_t *iface);
28 extern void add_coclass(class_t *cls);
29 extern void add_module(type_t *module);
30 extern void add_struct(type_t *structure);
31 extern void add_enum(type_t *enumeration);
32 extern void add_typedef(type_t *tdef, var_t *name);
33
34 /* Copied from wtypes.h. Not included directly because that would create a
35  * circular dependency (after all, wtypes.h is generated by widl...) */
36
37 enum VARENUM {
38     VT_EMPTY = 0,
39     VT_NULL = 1,
40     VT_I2 = 2,
41     VT_I4 = 3,
42     VT_R4 = 4,
43     VT_R8 = 5,
44     VT_CY = 6,
45     VT_DATE = 7,
46     VT_BSTR = 8,
47     VT_DISPATCH = 9,
48     VT_ERROR = 10,
49     VT_BOOL = 11,
50     VT_VARIANT = 12,
51     VT_UNKNOWN = 13,
52     VT_DECIMAL = 14,
53     VT_I1 = 16,
54     VT_UI1 = 17,
55     VT_UI2 = 18,
56     VT_UI4 = 19,
57     VT_I8 = 20,
58     VT_UI8 = 21,
59     VT_INT = 22,
60     VT_UINT = 23,
61     VT_VOID = 24,
62     VT_HRESULT = 25,
63     VT_PTR = 26,
64     VT_SAFEARRAY = 27,
65     VT_CARRAY = 28,
66     VT_USERDEFINED = 29,
67     VT_LPSTR = 30,
68     VT_LPWSTR = 31,
69     VT_RECORD = 36,
70     VT_FILETIME = 64,
71     VT_BLOB = 65,
72     VT_STREAM = 66,
73     VT_STORAGE = 67,
74     VT_STREAMED_OBJECT = 68,
75     VT_STORED_OBJECT = 69,
76     VT_BLOB_OBJECT = 70,
77     VT_CF = 71,
78     VT_CLSID = 72,
79     VT_BSTR_BLOB = 0xfff,
80     VT_VECTOR = 0x1000,
81     VT_ARRAY = 0x2000,
82     VT_BYREF = 0x4000,
83     VT_RESERVED = 0x8000,
84     VT_ILLEGAL = 0xffff,
85     VT_ILLEGALMASKED = 0xfff,
86     VT_TYPEMASK = 0xfff
87 };
88 extern unsigned short get_type_vt(type_t *t);
89 extern unsigned short get_var_vt(var_t *v);
90
91 extern int create_msft_typelib(typelib_t *typelib);
92 #endif