2002-07-16 03:20:45 +00:00
|
|
|
/*
|
|
|
|
* IDL Compiler
|
|
|
|
*
|
|
|
|
* Copyright 2002 Ove Kaaven
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2002-07-16 03:20:45 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WIDL_WIDL_H
|
|
|
|
#define __WIDL_WIDL_H
|
|
|
|
|
2021-09-28 08:08:06 +00:00
|
|
|
#include "../tools.h"
|
2002-07-16 03:20:45 +00:00
|
|
|
#include "widltypes.h"
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
extern int debuglevel;
|
|
|
|
#define DEBUGLEVEL_NONE 0x0000
|
|
|
|
#define DEBUGLEVEL_CHAT 0x0001
|
|
|
|
#define DEBUGLEVEL_DUMP 0x0002
|
|
|
|
#define DEBUGLEVEL_TRACE 0x0004
|
|
|
|
#define DEBUGLEVEL_PPMSG 0x0008
|
|
|
|
#define DEBUGLEVEL_PPLEX 0x0010
|
|
|
|
#define DEBUGLEVEL_PPTRACE 0x0020
|
|
|
|
|
|
|
|
extern int pedantic;
|
2007-01-19 11:46:19 +00:00
|
|
|
extern int do_everything;
|
2005-01-26 19:40:47 +00:00
|
|
|
extern int do_header;
|
|
|
|
extern int do_typelib;
|
|
|
|
extern int do_proxies;
|
2005-02-23 20:31:07 +00:00
|
|
|
extern int do_client;
|
|
|
|
extern int do_server;
|
2010-11-27 12:24:49 +00:00
|
|
|
extern int do_regscript;
|
2006-08-04 00:48:45 +00:00
|
|
|
extern int do_idfile;
|
2007-10-18 01:03:57 +00:00
|
|
|
extern int do_dlldata;
|
2006-04-22 19:52:51 +00:00
|
|
|
extern int old_names;
|
2015-07-30 12:14:57 +00:00
|
|
|
extern int winrt_mode;
|
2015-08-05 10:52:15 +00:00
|
|
|
extern int use_abi_namespace;
|
2002-07-16 03:20:45 +00:00
|
|
|
|
|
|
|
extern char *input_name;
|
2023-08-18 07:35:41 +00:00
|
|
|
extern char *idl_name;
|
2018-11-09 13:16:51 +00:00
|
|
|
extern char *acf_name;
|
2002-07-16 03:20:45 +00:00
|
|
|
extern char *header_name;
|
2008-12-29 12:06:35 +00:00
|
|
|
extern char *header_token;
|
2007-10-31 02:07:36 +00:00
|
|
|
extern char *local_stubs_name;
|
2004-01-07 04:21:27 +00:00
|
|
|
extern char *typelib_name;
|
2007-10-18 01:03:57 +00:00
|
|
|
extern char *dlldata_name;
|
2002-07-16 03:20:45 +00:00
|
|
|
extern char *proxy_name;
|
2002-12-03 19:12:07 +00:00
|
|
|
extern char *proxy_token;
|
2005-02-23 20:31:07 +00:00
|
|
|
extern char *client_name;
|
|
|
|
extern char *client_token;
|
|
|
|
extern char *server_name;
|
|
|
|
extern char *server_token;
|
2010-11-27 12:24:49 +00:00
|
|
|
extern char *regscript_name;
|
|
|
|
extern char *regscript_token;
|
2007-04-26 01:17:31 +00:00
|
|
|
extern const char *prefix_client;
|
|
|
|
extern const char *prefix_server;
|
2023-11-10 10:06:38 +00:00
|
|
|
extern unsigned int packing;
|
2011-05-26 19:34:51 +00:00
|
|
|
extern unsigned int pointer_size;
|
2002-07-16 03:20:45 +00:00
|
|
|
extern time_t now;
|
|
|
|
|
2011-06-01 19:00:56 +00:00
|
|
|
enum stub_mode
|
|
|
|
{
|
|
|
|
MODE_Os, /* inline stubs */
|
|
|
|
MODE_Oi, /* old-style interpreted stubs */
|
|
|
|
MODE_Oif /* new-style fully interpreted stubs */
|
|
|
|
};
|
2011-06-08 10:14:47 +00:00
|
|
|
extern enum stub_mode get_stub_mode(void);
|
2021-11-12 11:40:56 +00:00
|
|
|
extern int open_typelib( const char *name );
|
2011-06-01 19:00:56 +00:00
|
|
|
|
2008-12-29 12:06:35 +00:00
|
|
|
extern void write_header(const statement_list_t *stmts);
|
2008-12-29 12:06:12 +00:00
|
|
|
extern void write_id_data(const statement_list_t *stmts);
|
2008-04-24 18:06:28 +00:00
|
|
|
extern void write_proxies(const statement_list_t *stmts);
|
|
|
|
extern void write_client(const statement_list_t *stmts);
|
|
|
|
extern void write_server(const statement_list_t *stmts);
|
2010-11-27 12:24:49 +00:00
|
|
|
extern void write_regscript(const statement_list_t *stmts);
|
2018-10-16 11:47:54 +00:00
|
|
|
extern void write_typelib_regscript(const statement_list_t *stmts);
|
2011-08-02 13:15:55 +00:00
|
|
|
extern void output_typelib_regscript( const typelib_t *typelib );
|
2008-12-29 12:06:24 +00:00
|
|
|
extern void write_local_stubs(const statement_list_t *stmts);
|
2008-04-24 18:06:28 +00:00
|
|
|
extern void write_dlldata(const statement_list_t *stmts);
|
2005-02-23 20:31:07 +00:00
|
|
|
|
2008-12-29 12:06:35 +00:00
|
|
|
extern void start_cplusplus_guard(FILE *fp);
|
|
|
|
extern void end_cplusplus_guard(FILE *fp);
|
|
|
|
|
2023-01-24 21:19:45 +00:00
|
|
|
/* attribute.c */
|
|
|
|
|
2023-01-24 21:19:45 +00:00
|
|
|
extern attr_t *attr_int( struct location where, enum attr_type attr_type, unsigned int val );
|
|
|
|
extern attr_t *attr_ptr( struct location where, enum attr_type attr_type, void *val );
|
2023-01-24 21:19:45 +00:00
|
|
|
|
|
|
|
extern int is_attr( const attr_list_t *list, enum attr_type attr_type );
|
|
|
|
extern int is_ptrchain_attr( const var_t *var, enum attr_type attr_type );
|
|
|
|
extern int is_aliaschain_attr( const type_t *type, enum attr_type attr_type );
|
|
|
|
|
|
|
|
extern unsigned int get_attrv( const attr_list_t *list, enum attr_type attr_type );
|
|
|
|
extern void *get_attrp( const attr_list_t *list, enum attr_type attr_type );
|
|
|
|
extern void *get_aliaschain_attrp( const type_t *type, enum attr_type attr_type );
|
|
|
|
|
|
|
|
typedef int (*map_attrs_filter_t)( attr_list_t *, const attr_t * );
|
|
|
|
extern attr_list_t *append_attr( attr_list_t *list, attr_t *attr );
|
|
|
|
extern attr_list_t *append_attr_list( attr_list_t *new_list, attr_list_t *old_list );
|
|
|
|
extern attr_list_t *append_attribs( attr_list_t *, attr_list_t * );
|
|
|
|
extern attr_list_t *map_attrs( const attr_list_t *list, map_attrs_filter_t filter );
|
|
|
|
extern attr_list_t *move_attr( attr_list_t *dst, attr_list_t *src, enum attr_type type );
|
|
|
|
|
|
|
|
extern attr_list_t *check_apicontract_attrs( const char *name, attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_coclass_attrs( const char *name, attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_dispiface_attrs( const char *name, attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_enum_attrs( attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_enum_member_attrs( attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_field_attrs( const char *name, attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_function_attrs( const char *name, attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_interface_attrs( const char *name, attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_library_attrs( const char *name, attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_module_attrs( const char *name, attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_runtimeclass_attrs( const char *name, attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_struct_attrs( attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_typedef_attrs( attr_list_t *attrs );
|
|
|
|
extern attr_list_t *check_union_attrs( attr_list_t *attrs );
|
|
|
|
extern void check_arg_attrs( const var_t *arg );
|
|
|
|
|
2002-07-16 03:20:45 +00:00
|
|
|
#endif
|