Branch and submit for IVI panda
[profile/ivi/gobject-introspection.git] / girepository / girmodule.h
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2  * GObject introspection: Parsed IDL
3  *
4  * Copyright (C) 2005 Matthias Clasen
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 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
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __G_IR_MODULE_H__
23 #define __G_IR_MODULE_H__
24
25 #include <glib.h>
26 #include "gitypelib-internal.h"
27
28 G_BEGIN_DECLS
29
30 typedef struct _GIrTypelibBuild GIrTypelibBuild;
31 typedef struct _GIrModule GIrModule;
32
33 struct _GIrTypelibBuild {
34   GIrModule  *module;
35   GHashTable  *strings;
36   GHashTable  *types;
37   GList       *nodes_with_attributes;
38   guint32      n_attributes;
39   guchar      *data;
40   GList       *stack; 
41 };
42
43 struct _GIrModule
44 {
45   gchar *name;
46   gchar *version;
47   gchar *shared_library;
48   gchar *c_prefix;
49   GList *dependencies;
50   GList *entries;
51
52   /* All modules that are included directly or indirectly */
53   GList *include_modules;
54
55   /* Aliases defined in the module or in included modules */
56   GHashTable *aliases;
57
58   /* Structures with the 'disguised' flag (typedef struct _X *X)
59   * in the module or in included modules */
60   GHashTable *disguised_structures;
61 };
62
63 GIrModule *_g_ir_module_new            (const gchar *name,
64                                         const gchar *nsversion,
65                                         const gchar *module_filename,
66                                         const gchar *c_prefix);
67 void       _g_ir_module_free           (GIrModule  *module);
68
69 void       _g_ir_module_add_include_module (GIrModule  *module,
70                                            GIrModule  *include_module);
71
72 GITypelib * _g_ir_module_build_typelib  (GIrModule  *module);
73
74 void       _g_ir_module_fatal (GIrTypelibBuild  *build, guint line, const char *msg, ...) G_GNUC_PRINTF (3, 4) G_GNUC_NORETURN;
75
76 void _g_irnode_init_stats (void);
77 void _g_irnode_dump_stats (void);
78
79 G_END_DECLS
80
81 #endif  /* __G_IR_MODULE_H__ */