Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/tools/widl/widl.h
4388 views
1
/*
2
* IDL Compiler
3
*
4
* Copyright 2002 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19
*/
20
21
#ifndef __WIDL_WIDL_H
22
#define __WIDL_WIDL_H
23
24
#include "../tools.h"
25
#include "widltypes.h"
26
27
#include <time.h>
28
29
extern int debuglevel;
30
#define DEBUGLEVEL_NONE 0x0000
31
#define DEBUGLEVEL_CHAT 0x0001
32
#define DEBUGLEVEL_DUMP 0x0002
33
#define DEBUGLEVEL_TRACE 0x0004
34
#define DEBUGLEVEL_PPMSG 0x0008
35
#define DEBUGLEVEL_PPLEX 0x0010
36
#define DEBUGLEVEL_PPTRACE 0x0020
37
38
extern int pedantic;
39
extern int do_everything;
40
extern int do_header;
41
extern int do_typelib;
42
extern int do_metadata;
43
extern int do_proxies;
44
extern int do_client;
45
extern int do_server;
46
extern int do_regscript;
47
extern int do_idfile;
48
extern int do_dlldata;
49
extern int old_names;
50
extern int old_typelib;
51
extern int winrt_mode;
52
extern int interpreted_mode;
53
extern int use_abi_namespace;
54
55
extern char *input_name;
56
extern char *idl_name;
57
extern char *acf_name;
58
extern char *header_name;
59
extern char *header_token;
60
extern char *local_stubs_name;
61
extern char *typelib_name;
62
extern char *metadata_name;
63
extern char *dlldata_name;
64
extern char *proxy_name;
65
extern char *proxy_token;
66
extern char *client_name;
67
extern char *client_token;
68
extern char *server_name;
69
extern char *server_token;
70
extern char *regscript_name;
71
extern char *regscript_token;
72
extern const char *prefix_client;
73
extern const char *prefix_server;
74
extern unsigned int packing;
75
extern unsigned int pointer_size;
76
extern struct target target;
77
extern time_t now;
78
79
extern int open_typelib( const char *name );
80
81
extern void write_header(const statement_list_t *stmts);
82
extern void write_id_data(const statement_list_t *stmts);
83
extern void write_proxies(const statement_list_t *stmts);
84
extern void write_client(const statement_list_t *stmts);
85
extern void write_server(const statement_list_t *stmts);
86
extern void write_regscript(const statement_list_t *stmts);
87
extern void write_typelib_regscript(const statement_list_t *stmts);
88
extern void output_typelib_regscript( const typelib_t *typelib );
89
extern void write_local_stubs(const statement_list_t *stmts);
90
extern void write_dlldata(const statement_list_t *stmts);
91
extern void write_metadata(const statement_list_t *stmts);
92
93
extern void start_cplusplus_guard(FILE *fp);
94
extern void end_cplusplus_guard(FILE *fp);
95
96
extern bool is_size_param( const var_t *param, const var_list_t *args );
97
98
/* attribute.c */
99
100
extern attr_t *attr_int( struct location where, enum attr_type attr_type, unsigned int val );
101
extern attr_t *attr_ptr( struct location where, enum attr_type attr_type, void *val );
102
103
extern int is_attr( const attr_list_t *list, enum attr_type attr_type );
104
extern int is_ptrchain_attr( const var_t *var, enum attr_type attr_type );
105
extern int is_aliaschain_attr( const type_t *type, enum attr_type attr_type );
106
107
extern unsigned int get_attrv( const attr_list_t *list, enum attr_type attr_type );
108
extern void *get_attrp( const attr_list_t *list, enum attr_type attr_type );
109
extern void *get_aliaschain_attrp( const type_t *type, enum attr_type attr_type );
110
extern void get_version( const attr_list_t *list, unsigned short *major, unsigned short *minor );
111
112
typedef int (*map_attrs_filter_t)( attr_list_t *, const attr_t * );
113
extern attr_list_t *append_attr( attr_list_t *list, attr_t *attr );
114
extern attr_list_t *append_attr_list( attr_list_t *new_list, attr_list_t *old_list );
115
extern attr_list_t *append_attribs( attr_list_t *, attr_list_t * );
116
extern attr_list_t *map_attrs( const attr_list_t *list, map_attrs_filter_t filter );
117
extern attr_list_t *move_attr( attr_list_t *dst, attr_list_t *src, enum attr_type type );
118
119
extern attr_list_t *check_apicontract_attrs( const char *name, attr_list_t *attrs );
120
extern attr_list_t *check_coclass_attrs( const char *name, attr_list_t *attrs );
121
extern attr_list_t *check_dispiface_attrs( const char *name, attr_list_t *attrs );
122
extern attr_list_t *check_enum_attrs( attr_list_t *attrs );
123
extern attr_list_t *check_enum_member_attrs( attr_list_t *attrs );
124
extern attr_list_t *check_field_attrs( const char *name, attr_list_t *attrs );
125
extern attr_list_t *check_function_attrs( const char *name, attr_list_t *attrs );
126
extern attr_list_t *check_interface_attrs( const char *name, attr_list_t *attrs );
127
extern attr_list_t *check_library_attrs( const char *name, attr_list_t *attrs );
128
extern attr_list_t *check_module_attrs( const char *name, attr_list_t *attrs );
129
extern attr_list_t *check_runtimeclass_attrs( const char *name, attr_list_t *attrs );
130
extern attr_list_t *check_struct_attrs( attr_list_t *attrs );
131
extern attr_list_t *check_typedef_attrs( attr_list_t *attrs );
132
extern attr_list_t *check_union_attrs( attr_list_t *attrs );
133
extern void check_arg_attrs( const var_t *arg );
134
135
#endif
136
137