STATIC_GIRSOURCES = \
gir/DBus-1.0.gir \
- gir/DBusGLib-1.0.gir \
+ gir/DBusGLib-1.0.gir \
gir/fontconfig-2.0.gir \
gir/freetype2-2.0.gir \
gir/GL-1.0.gir \
GLIB_LIBRARY=glib-2.0
endif
-GLib_2_0_gir_LIBS = $(GLIB_LIBRARY)
+GLib_2_0_gir_LIBS = $(GLIB_LIBRARY) $(GOBJECT_LIBRARY)
GLib_2_0_gir_SCANNERFLAGS = \
--external-library \
--reparse-validate \
-D__G_I18N_LIB_H__
GLib_2_0_gir_FILES = \
$(GLIB_LIBDIR)/glib-2.0/include/glibconfig.h \
- $(GLIB_INCLUDEDIR)/glib/*.h \
+ $(GLIB_INCLUDEDIR)/glib/*.h \
+ $(GLIB_INCLUDEDIR)/gobject/glib-types.h \
gir/glib-2.0.c
BUILT_GIRSOURCES += GLib-2.0.gir
endif
GObject-2.0.gir: GLib-2.0.gir
-
GObject_2_0_gir_LIBS = $(GOBJECT_LIBRARY)
GObject_2_0_gir_SCANNERFLAGS = \
--external-library \
GObject_2_0_gir_INCLUDES = GLib-2.0
GObject_2_0_gir_CFLAGS = \
-DGOBJECT_COMPILATION \
- -I$(GOBJECT_INCLUDEDIR) \
+ -I$(GOBJECT_INCLUDEDIR) \
-I$(GOBJECT_LIBDIR)/glib-2.0/include
-GObject_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gobject/*.h gir/gobject-2.0.c
+GObject_2_0_gir_FILES = \
+ $(filter-out $(GOBJECT_INCLUDEDIR)/gobject/glib-types.h, $(wildcard $(GOBJECT_INCLUDEDIR)/gobject/*.h)) \
+ gir/gobject-2.0.c
BUILT_GIRSOURCES += GObject-2.0.gir
for node in to_remove:
self._namespace.remove(node)
- if self._namespace.name == 'GLib':
- variant = self._namespace.get('Variant')
- assert variant is not None
- variant.add_gtype('GVariant', 'g_variant_get_gtype')
- variant.c_symbol_prefix = 'variant'
- # Work around scanner bug
- variant.disguised = False
-
# Helper functions
def _execute_binary_get_tree(self):
self._initparse_get_type_function(func)
def _initparse_get_type_function(self, func):
- if self._namespace.name == 'GLib':
- # No GObjects in GLib
- return False
if (self._namespace.name == 'GObject' and
func.symbol in ('g_object_get_type', 'g_initially_unowned_get_type')):
# We handle these internally, see _create_gobject
node.parent_chain = parent_types
def _introspect_fundamental(self, xmlnode):
- # We only care about types that can be instantiatable, other
- # fundamental types such as the Clutter.Fixed/CoglFixed registers
- # are not yet interesting from an introspection perspective and
- # are ignored
- if not xmlnode.attrib.get('instantiatable', False):
+ type_name = xmlnode.attrib['name']
+ if type_name == 'GVariant':
+ # HACK: make GVariant a boxed to avoid looking up GInitiallyUnowned
+ # when computing the default transfer ownership
+ self._introspect_boxed(xmlnode)
return
- type_name = xmlnode.attrib['name']
is_abstract = bool(xmlnode.attrib.get('abstract', False))
(get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
try: