[g-ir-compiler] Slightly less lame error messages
[gnome.gobject-introspection] / girepository / girmodule.h
1 /* GObject introspection: Parsed IDL
2  *
3  * Copyright (C) 2005 Matthias Clasen
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20
21 #ifndef __G_IR_MODULE_H__
22 #define __G_IR_MODULE_H__
23
24 #include <glib.h>
25 #include "gtypelib.h"
26
27 G_BEGIN_DECLS
28
29
30 typedef struct _GIrModule GIrModule;
31
32 struct _GIrModule
33
34   gchar *name;
35   gchar *version;
36   gchar *shared_library;
37   gchar *c_prefix;
38   GList *dependencies;
39   GList *entries;
40
41   /* All modules that are included directly or indirectly */
42   GList *include_modules;
43
44   /* Aliases defined in the module or in included modules */
45   GHashTable *aliases;
46
47   /* Structures with the 'disguised' flag (typedef struct _X *X)
48   * in the module or in included modules */
49   GHashTable *disguised_structures;
50 };
51
52 GIrModule *g_ir_module_new            (const gchar *name,
53                                        const gchar *nsversion,
54                                        const gchar *module_filename,
55                                        const gchar *c_prefix);
56 void       g_ir_module_free           (GIrModule  *module);
57
58 void       g_ir_module_add_include_module (GIrModule  *module,
59                                            GIrModule  *include_module);
60
61 GTypelib * g_ir_module_build_typelib  (GIrModule  *module,
62                                        GList       *modules);
63
64 void       g_ir_module_fatal (GIrModule  *module, guint line, const char *msg, ...) G_GNUC_PRINTF (3, 4) G_GNUC_NORETURN;
65
66 void _g_irnode_init_stats (void);
67 void _g_irnode_dump_stats (void);
68
69 G_END_DECLS
70
71 #endif  /* __G_IR_MODULE_H__ */