Enumerations can be negative
[gnome.gobject-introspection] / girepository / girnode.h
index fad6799..427f8e9 100644 (file)
@@ -27,6 +27,7 @@
 
 G_BEGIN_DECLS
 
+typedef struct _GIrTypelibBuild GIrTypelibBuild;
 typedef struct _GIrNode GIrNode; 
 typedef struct _GIrNodeFunction GIrNodeFunction;
 typedef struct _GIrNodeParam GIrNodeParam;
@@ -45,6 +46,16 @@ typedef struct _GIrNodeErrorDomain GIrNodeErrorDomain;
 typedef struct _GIrNodeXRef GIrNodeXRef;
 typedef struct _GIrNodeUnion GIrNodeUnion;
 
+struct _GIrTypelibBuild {
+  GIrModule  *module;
+  GList       *modules;
+  GHashTable  *strings;
+  GHashTable  *types;
+  GList       *offset_ordered_nodes;
+  guint32      n_attributes;
+  guchar      *data; 
+};
+
 typedef enum 
 {
   G_IR_NODE_INVALID      =  0,
@@ -73,6 +84,10 @@ struct _GIrNode
 {
   GIrNodeTypeId type;
   gchar *name;
+
+  guint32 offset; /* Assigned as we build the typelib */
+
+  GHashTable *attributes;
 };
 
 struct _GIrNodeXRef
@@ -199,6 +214,8 @@ struct _GIrNodeVFunc
   gboolean must_not_be_implemented;
   gboolean is_class_closure;
   
+  char *invoker;
+
   GList *parameters;
   GIrNodeParam *result;      
 
@@ -213,6 +230,7 @@ struct _GIrNodeField
   gboolean writable;
   gint bits;
   gint offset;
+  GIrNodeFunction *callback;
   
   GIrNodeType *type;
 };
@@ -228,7 +246,7 @@ struct _GIrNodeInterface
   gchar *gtype_init;
 
   gchar *parent;
-  gchar *class_struct; /* Only applies to classes */
+  gchar *glib_type_struct;
   
   GList *interfaces;
   GList *prerequisites;
@@ -245,7 +263,7 @@ struct _GIrNodeValue
 
   gboolean deprecated;
 
-  guint32 value;
+  gint32 value;
 };
 
 struct _GIrNodeConstant
@@ -293,7 +311,7 @@ struct _GIrNodeStruct
 
   gboolean deprecated;
   gboolean disguised;
-  gboolean is_gclass_struct;
+  gboolean is_gtype_struct;
 
   gchar *gtype_name;
   gchar *gtype_init;
@@ -340,14 +358,12 @@ GIrNode * g_ir_node_new             (GIrNodeTypeId type);
 void      g_ir_node_free            (GIrNode    *node);
 guint32   g_ir_node_get_size        (GIrNode    *node);
 guint32   g_ir_node_get_full_size   (GIrNode    *node);
-void      g_ir_node_build_typelib   (GIrNode    *node,
-                                    GIrModule  *module,
-                                    GList       *modules,
-                                    GHashTable  *strings,
-                                    GHashTable  *types,
-                                    guchar      *data,
-                                    guint32     *offset,
-                                    guint32     *offset2);
+guint32   g_ir_node_get_attribute_size (GIrNode *node);
+void      g_ir_node_build_typelib   (GIrNode         *node,
+                                     GIrNode         *parent,
+                                     GIrTypelibBuild *build,
+                                     guint32         *offset,
+                                     guint32         *offset2);
 int       g_ir_node_cmp             (GIrNode    *node,
                                     GIrNode    *other);
 gboolean  g_ir_node_can_have_member (GIrNode    *node);