+2008-05-16 Jan Schmidt <jan.schmidt@sun.com>
+
+ * gstdoc-scangobj:
+ Add a mechanism for adding 'implicitly created' GTypes into the
+ scan, allowing for documenting plugin-private base classes that
+ provide signals or properties for public elements.
+
+ * gtk-doc-plugins.mak:
+ Use $(builddir) instead of $(top_builddir) in a few places - there's
+ no need to hard code 'docs/plugins' as the only useable path.
+
2008-05-14 Peter Kjellerstedt <pkj@axis.com>
* m4/gst-feature.m4:
$OUTPUT_DIR = $OUTPUT_DIR ? $OUTPUT_DIR : ".";
-# THOMAS: dynamic types; only use types file for headers
- $TYPES_FILE = $TYPES_FILE ? $TYPES_FILE : "$OUTPUT_DIR/$MODULE.types";
+$TYPES_FILE = $TYPES_FILE ? $TYPES_FILE : "$OUTPUT_DIR/$MODULE.types";
open (TYPES, $TYPES_FILE) || die "Cannot open $TYPES_FILE: $!\n";
open (OUTPUT, ">$MODULE-scan.c") || die "Cannot open $MODULE-scan.c: $!\n";
# write a C program to scan the types
$includes = "";
-#@types = ();
+@types = ();
+@impl_types = ();
for (<TYPES>) {
if (/^#include/) {
$includes .= $_;
-# } elsif (/^%/) {
-# next;
-# } elsif (/^\s*$/) {
-# next;
-# } else {
-# chomp;
-# push @types, $_;
+ } elsif (/^%/) {
+ next;
+ } elsif (/^\s*$/) {
+ next;
+ } elsif (/^type:(.*)$/) {
+ $t = $1;
+ chomp $t;
+ push @impl_types, $t;
+ } else {
+ chomp;
+ push @types, $_;
}
}
-#$ntypes = @types + 1;
+$ntypes = @types + @impl_types;
print OUTPUT <<EOT;
#include <string.h>
#include <errno.h>
$includes
+
#ifdef GTK_IS_WIDGET_CLASS
#include <gtk/gtkversion.h>
#endif
g_message ("number of element factories: %d", g_list_length (factories));
/* allocate the object_types array to hold them */
- object_types = g_new0 (GType, g_list_length (factories)+1);
+ object_types = g_new0 (GType, g_list_length (factories)+$ntypes+1);
l = factories;
i = 0;
factory = GST_ELEMENT_FACTORY (l->data);
type = gst_element_factory_get_element_type (factory);
g_message ("adding type %p for factory %s", (void *) type, gst_element_factory_get_longname (factory));
- object_types[i] = type;
- i++;
+ object_types[i++] = type;
l = g_list_next (l);
}
- object_types[i] = 0;
+
EOT
+# get_type functions:
+for (@types) {
+ print OUTPUT " object_types[i++] = $_ ();\n";
+}
+
+# Implicit types retrieved from GLib:
+for (@impl_types) {
+ print OUTPUT " object_types[i++] = g_type_from_name (\"$_\");\n";
+}
+
print OUTPUT <<EOT;
+ object_types[i] = 0;
+
/* Need to make sure all the types are loaded in and initialize
* their signals and properties.
*/
### inspect GStreamer plug-ins; done by documentation maintainer ###
# only look at the plugins in this module when building inspect .xml stuff
-INSPECT_REGISTRY=$(top_builddir)/docs/plugins/inspect-registry.xml
+INSPECT_REGISTRY=$(builddir)/inspect-registry.xml
INSPECT_ENVIRONMENT=\
GST_PLUGIN_SYSTEM_PATH= \
- GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(top_builddir)/plugins:$(top_builddir)/src \
+ GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(top_builddir)/plugins:$(top_builddir)/src:$(top_builddir)/gnl \
GST_REGISTRY=$(INSPECT_REGISTRY)
# update the element and plugin XML descriptions; store in inspect/
check: check-hierarchy
# wildcard is apparently not portable to other makes, hence the use of find
-inspect_files = $(shell find $(top_srcdir)/docs/plugins/inspect -name '*.xml')
+inspect_files = $(shell find $(srcdir)/inspect -name '*.xml')
check-inspected-versions:
@echo Checking plugin versions of inspected plugin data ...; \