4 # gtk-doc - GTK DocBook documentation generator.
5 # Copyright (C) 1998 Damon Chaplin
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 # This gets information about object heirarchies and signals
24 # by compiling a small C program. CFLAGS and LDFLAGS must be
25 # set appropriately before running this script.
27 # NOTE: the lookup_signal_arg_names() function contains the argument names of
28 # standard GTK signal handlers. This may need to be updated for new
29 # GTK signals or Gnome widget signals.
33 unshift @INC, '/usr/share/gtk-doc/data';
34 require "gtkdoc-common.pl";
38 # name of documentation module
44 my $TYPE_INIT_FUNC="g_type_init ()";
46 # --nogtkinit is deprecated, as it is the default now anyway.
47 %optctl = (module => \$MODULE,
49 types => \$TYPES_FILE,
50 nogtkinit => \$NO_GTK_INIT,
51 'type-init-func' => \$TYPE_INIT_FUNC,
52 'output-dir' => \$OUTPUT_DIR,
53 'inspect-dir' => \$INSPECT_DIR,
54 'version' => \$PRINT_VERSION,
55 'help' => \$PRINT_HELP);
57 GetOptions(\%optctl, "module=s", "source=s", "types:s", "output-dir:s", "inspect-dir:s", "nogtkinit", "type-init-func:s", "version", "help");
60 # Do nothing. This just avoids a warning.
73 print "gstdoc-scangobj version 1.5\n";
74 print "\n--module=MODULE_NAME Name of the doc module being parsed";
75 print "\n--source=SOURCE_NAME Name of the source module for plugins";
76 print "\n--types=FILE The name of the file to store the types in";
77 print "\n--type-init-func=FUNC The init function to call instead of g_type_init ()";
78 print "\n--output-dir=DIRNAME The directory where the results are stored";
79 print "\n--inspect-dir=DIRNAME The directory where the plugin inspect data is stored";
80 print "\n--version Print the version of this program";
81 print "\n--help Print this help\n";
85 $OUTPUT_DIR = $OUTPUT_DIR ? $OUTPUT_DIR : ".";
87 $TYPES_FILE = $TYPES_FILE ? $TYPES_FILE : "$OUTPUT_DIR/$MODULE.types";
89 open (TYPES, $TYPES_FILE) || die "Cannot open $TYPES_FILE: $!\n";
90 open (OUTPUT, ">$MODULE-scan.c") || die "Cannot open $MODULE-scan.c: $!\n";
92 my $old_signals_filename = "$OUTPUT_DIR/$MODULE.signals";
93 my $new_signals_filename = "$OUTPUT_DIR/$MODULE.signals.new";
94 my $old_hierarchy_filename = "$OUTPUT_DIR/$MODULE.hierarchy";
95 my $new_hierarchy_filename = "$OUTPUT_DIR/$MODULE.hierarchy.new";
96 my $old_interfaces_filename = "$OUTPUT_DIR/$MODULE.interfaces";
97 my $new_interfaces_filename = "$OUTPUT_DIR/$MODULE.interfaces.new";
98 my $old_prerequisites_filename = "$OUTPUT_DIR/$MODULE.prerequisites";
99 my $new_prerequisites_filename = "$OUTPUT_DIR/$MODULE.prerequisites.new";
100 my $old_args_filename = "$OUTPUT_DIR/$MODULE.args";
101 my $new_args_filename = "$OUTPUT_DIR/$MODULE.args.new";
103 # write a C program to scan the types
116 } elsif (/^type:(.*)$/) {
119 push @impl_types, $t;
126 $ntypes = @types + @impl_types;
136 #ifdef GTK_IS_WIDGET_CLASS
137 #include <gtk/gtkversion.h>
140 static GType *object_types = NULL;
142 static GString *xmlstr = NULL;
145 xmlprint (gint indent, const gchar *tag, const gchar *data)
147 const gchar indent_str[] = " ";
150 g_string_truncate (xmlstr, 0);
151 g_string_append_len (xmlstr, indent_str, MIN (indent, strlen (indent_str)));
152 g_string_append_printf (xmlstr, "<%s>", tag);
157 s = g_markup_escape_text (data, -1);
158 g_string_append (xmlstr, s);
162 g_string_append_printf (xmlstr, "</%s>\\n", tag);
167 gst_feature_sort_compare (gconstpointer a, gconstpointer b)
169 return strcmp (((GstPluginFeature *)a)->name, ((GstPluginFeature *)b)->name);
173 get_object_types (void)
175 GList *plugins = NULL;
176 GList *factories = NULL;
178 GstElementFactory *factory = NULL;
182 /* get a list of features from plugins in our source module */
183 plugins = gst_registry_get_plugin_list (gst_registry_get_default());
185 xmlstr = g_string_new ("");
188 GList *features, *pads;
191 FILE *inspect = NULL;
194 plugin = (GstPlugin *) (plugins->data);
195 plugins = g_list_next (plugins);
196 source = gst_plugin_get_source (plugin);
197 /*g_print ("plugin: %s source: %s\\n", plugin->desc.name, source);*/
198 if (!source || strcmp (source, "$SOURCE") != 0) {
202 /* skip static coreelements plugin with pipeline and bin element factory */
203 if (gst_plugin_get_filename (plugin) == NULL)
206 g_print ("plugin: %s source: %s\\n", plugin->desc.name, source);
208 inspect_name = g_strdup_printf ("$INSPECT_DIR" G_DIR_SEPARATOR_S "plugin-%s.xml",
210 inspect = fopen (inspect_name, "w");
211 if (inspect == NULL) {
212 g_error ("Could not open %s for writing: %s\\n", inspect_name,
215 g_free (inspect_name);
217 /* output plugin data */
218 fputs ("<plugin>\\n",inspect);
219 fputs (xmlprint(2, "name", plugin->desc.name),inspect);
220 fputs (xmlprint(2, "description", plugin->desc.description),inspect);
221 fputs (xmlprint(2, "filename", plugin->filename),inspect);
222 fputs (xmlprint(2, "basename", plugin->basename),inspect);
223 fputs (xmlprint(2, "version", plugin->desc.version),inspect);
224 fputs (xmlprint(2, "license", plugin->desc.license),inspect);
225 fputs (xmlprint(2, "source", plugin->desc.source),inspect);
226 fputs (xmlprint(2, "package", plugin->desc.package),inspect);
227 fputs (xmlprint(2, "origin", plugin->desc.origin),inspect);
228 fputs (" <elements>\\n", inspect);
231 gst_registry_get_feature_list_by_plugin (gst_registry_get_default (),
234 /* sort factories by feature->name */
235 features = g_list_sort (features, gst_feature_sort_compare);
238 GstPluginFeature *feature;
239 feature = GST_PLUGIN_FEATURE (features->data);
240 feature = gst_plugin_feature_load (feature);
242 g_warning ("Could not load plugin feature %s",
243 gst_plugin_feature_get_name (feature));
246 if (GST_IS_ELEMENT_FACTORY (feature)) {
247 GstStaticPadTemplate *pt;
248 const gchar *pad_dir[] = { "unknown","source","sink" };
249 const gchar *pad_pres[] = { "always","sometimes","request" };
251 /*g_print (" feature: %s\\n", feature->name);*/
253 factory = GST_ELEMENT_FACTORY (feature);
254 factories = g_list_prepend (factories, factory);
256 /* output element data */
257 fputs (" <element>\\n", inspect);
258 fputs (xmlprint(6, "name", feature->name),inspect);
259 fputs (xmlprint(6, "longname", factory->details.longname),inspect);
260 fputs (xmlprint(6, "class", factory->details.klass),inspect);
261 fputs (xmlprint(6, "description", factory->details.description),inspect);
262 fputs (xmlprint(6, "author", factory->details.author),inspect);
263 fputs (" <pads>\\n", inspect);
265 /* output pad-template data */
266 pads =(GList *) gst_element_factory_get_static_pad_templates (factory);
268 pt = (GstStaticPadTemplate *)pads->data;
270 fputs (" <caps>\\n", inspect);
271 fputs (xmlprint(10, "name", pt->name_template),inspect);
272 fputs (xmlprint(10, "direction", pad_dir[pt->direction]),inspect);
273 fputs (xmlprint(10, "presence", pad_pres[pt->presence]),inspect);
274 fputs (xmlprint(10, "details", pt->static_caps.string),inspect);
275 fputs (" </caps>\\n", inspect);
277 pads = g_list_next (pads);
279 fputs (" </pads>\\n </element>\\n", inspect);
281 features = g_list_next (features);
284 fputs (" </elements>\\n</plugin>", inspect);
288 g_string_free (xmlstr, TRUE);
290 g_message ("number of element factories: %d", g_list_length (factories));
292 /* allocate the object_types array to hold them */
293 object_types = g_new0 (GType, g_list_length (factories)+$ntypes+1);
300 factory = GST_ELEMENT_FACTORY (l->data);
301 type = gst_element_factory_get_element_type (factory);
303 g_message ("adding type %p for factory %s", (void *) type, gst_element_factory_get_longname (factory));
304 object_types[i++] = type;
306 g_message ("type info for factory %s not found",
307 gst_element_factory_get_longname (factory));
314 # get_type functions:
319 g_message ("$_ () didn't return a valid type");
322 object_types[i++] = type;
327 # Implicit types retrieved from GLib:
330 type = g_type_from_name ("$_");
332 g_message ("Implicit type $_ not found");
335 object_types[i++] = type;
344 /* Need to make sure all the types are loaded in and initialize
345 * their signals and properties.
347 for (i=0; object_types[i]; i++) {
348 if (G_TYPE_IS_CLASSED (object_types[i]))
349 g_type_class_ref (object_types[i]);
351 g_warning ("not reffing type: %s", g_type_name (object_types[i]));
359 * This uses GObject type functions to output signal prototypes and the object
363 /* The output files */
364 const gchar *signals_filename = "$new_signals_filename";
365 const gchar *hierarchy_filename = "$new_hierarchy_filename";
366 const gchar *interfaces_filename = "$new_interfaces_filename";
367 const gchar *prerequisites_filename = "$new_prerequisites_filename";
368 const gchar *args_filename = "$new_args_filename";
371 static void output_signals (void);
372 static void output_object_signals (FILE *fp,
374 static void output_object_signal (FILE *fp,
375 const gchar *object_class_name,
377 static const gchar * get_type_name (GType type,
378 gboolean * is_pointer);
379 static const gchar * get_gdk_event (const gchar * signal_name);
380 static const gchar ** lookup_signal_arg_names (const gchar * type,
381 const gchar * signal_name);
383 static void output_object_hierarchy (void);
384 static void output_hierarchy (FILE *fp,
388 static void output_object_interfaces (void);
389 static void output_interfaces (FILE *fp,
392 static void output_interface_prerequisites (void);
393 static void output_prerequisites (FILE *fp,
396 static void output_args (void);
397 static void output_object_args (FILE *fp, GType object_type);
400 main (int argc, char *argv[])
402 /* Silence the compiler: */
403 if (argv != argv) argc = argc;
410 output_object_hierarchy ();
411 output_object_interfaces ();
412 output_interface_prerequisites ();
420 output_signals (void)
425 fp = fopen (signals_filename, "w");
428 g_warning ("Couldn't open output file: %s : %s", signals_filename, strerror(errno));
432 for (i = 0; object_types[i]; i++)
433 output_object_signals (fp, object_types[i]);
439 compare_signals (const void *a, const void *b)
441 const guint *signal_a = a;
442 const guint *signal_b = b;
444 return strcmp (g_signal_name (*signal_a), g_signal_name (*signal_b));
447 /* This outputs all the signals of one object. */
449 output_object_signals (FILE *fp, GType object_type)
451 const gchar *object_class_name;
452 guint *signals, n_signals;
455 if (G_TYPE_IS_INSTANTIATABLE (object_type) ||
456 G_TYPE_IS_INTERFACE (object_type))
459 object_class_name = g_type_name (object_type);
461 signals = g_signal_list_ids (object_type, &n_signals);
462 qsort (signals, n_signals, sizeof (guint), compare_signals);
464 for (sig = 0; sig < n_signals; sig++)
466 output_object_signal (fp, object_class_name, signals[sig]);
473 /* This outputs one signal. */
475 output_object_signal (FILE *fp,
476 const gchar *object_name,
479 GSignalQuery query_info;
480 const gchar *type_name, *ret_type, *object_arg, *arg_name;
481 gchar *pos, *object_arg_lower;
483 gchar ret_type_buffer[1024], buffer[1024];
485 const gchar **arg_names;
486 gint param_num, widget_num, event_num, callback_num;
488 gchar signal_name[128];
491 /* g_print ("Object: %s Signal: %u\\n", object_name, signal_id);*/
494 widget_num = event_num = callback_num = 0;
496 g_signal_query (signal_id, &query_info);
498 /* Output the return type and function name. */
499 ret_type = get_type_name (query_info.return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE, &is_pointer);
500 sprintf (ret_type_buffer, "%s%s", ret_type, is_pointer ? "*" : "");
502 /* Output the signal object type and the argument name. We assume the
503 type is a pointer - I think that is OK. We remove "Gtk" or "Gnome" and
504 convert to lower case for the argument name. */
506 sprintf (pos, "%s ", object_name);
509 if (!strncmp (object_name, "Gtk", 3))
510 object_arg = object_name + 3;
511 else if (!strncmp (object_name, "Gnome", 5))
512 object_arg = object_name + 5;
514 object_arg = object_name;
516 object_arg_lower = g_ascii_strdown (object_arg, -1);
517 sprintf (pos, "*%s\\n", object_arg_lower);
519 if (!strncmp (object_arg_lower, "widget", 6))
521 g_free(object_arg_lower);
523 /* Convert signal name to use underscores rather than dashes '-'. */
524 strcpy (signal_name, query_info.signal_name);
525 for (i = 0; signal_name[i]; i++)
527 if (signal_name[i] == '-')
528 signal_name[i] = '_';
531 /* Output the signal parameters. */
532 arg_names = lookup_signal_arg_names (object_name, signal_name);
534 for (param = 0; param < query_info.n_params; param++)
538 sprintf (pos, "%s\\n", arg_names[param]);
543 type_name = get_type_name (query_info.param_types[param] & ~G_SIGNAL_TYPE_STATIC_SCOPE, &is_pointer);
545 /* Most arguments to the callback are called "arg1", "arg2", etc.
546 GdkWidgets are called "widget", "widget2", ...
547 GdkEvents are called "event", "event2", ...
548 GtkCallbacks are called "callback", "callback2", ... */
549 if (!strcmp (type_name, "GtkWidget"))
552 arg_num = &widget_num;
554 else if (!strcmp (type_name, "GdkEvent"))
556 type_name = get_gdk_event (signal_name);
558 arg_num = &event_num;
561 else if (!strcmp (type_name, "GtkCallback")
562 || !strcmp (type_name, "GtkCCallback"))
564 arg_name = "callback";
565 arg_num = &callback_num;
570 arg_num = ¶m_num;
572 sprintf (pos, "%s ", type_name);
575 if (!arg_num || *arg_num == 0)
576 sprintf (pos, "%s%s\\n", is_pointer ? "*" : " ", arg_name);
578 sprintf (pos, "%s%s%i\\n", is_pointer ? "*" : " ", arg_name,
593 /* We use one-character flags for simplicity. */
594 if (query_info.signal_flags & G_SIGNAL_RUN_FIRST)
596 if (query_info.signal_flags & G_SIGNAL_RUN_LAST)
598 if (query_info.signal_flags & G_SIGNAL_RUN_CLEANUP)
600 if (query_info.signal_flags & G_SIGNAL_NO_RECURSE)
602 if (query_info.signal_flags & G_SIGNAL_DETAILED)
604 if (query_info.signal_flags & G_SIGNAL_ACTION)
606 if (query_info.signal_flags & G_SIGNAL_NO_HOOKS)
611 "<SIGNAL>\\n<NAME>%s::%s</NAME>\\n<RETURNS>%s</RETURNS>\\n<FLAGS>%s</FLAGS>\\n%s</SIGNAL>\\n\\n",
612 object_name, query_info.signal_name, ret_type_buffer, flags, buffer);
616 /* Returns the type name to use for a signal argument or return value, given
617 the GtkType from the signal info. It also sets is_pointer to TRUE if the
618 argument needs a '*' since it is a pointer. */
620 get_type_name (GType type, gboolean * is_pointer)
622 const gchar *type_name;
625 type_name = g_type_name (type);
639 /* These all have normal C type names so they are OK. */
643 /* A GtkString is really a gchar*. */
649 /* We use a gint for both of these. Hopefully a subtype with a decent
650 name will be registered and used instead, as GTK+ does itself. */
654 /* The boxed type shouldn't be used itself, only subtypes. Though we
655 return 'gpointer' just in case. */
659 /* A GParam is really a GParamSpec*. */
667 /* For all GObject subclasses we can use the class name with a "*",
668 e.g. 'GtkWidget *'. */
669 if (g_type_is_a (type, G_TYPE_OBJECT))
672 if (G_TYPE_IS_CLASSED (type))
675 /* All boxed subtypes will be pointers as well. */
676 if (g_type_is_a (type, G_TYPE_BOXED))
679 /* All pointer subtypes will be pointers as well. */
680 if (g_type_is_a (type, G_TYPE_POINTER))
683 /* But enums are not */
684 if (g_type_is_a (type, G_TYPE_ENUM) ||
685 g_type_is_a (type, G_TYPE_FLAGS))
693 get_gdk_event (const gchar * signal_name)
695 static const gchar *GbGDKEvents[] =
697 "button_press_event", "GdkEventButton",
698 "button_release_event", "GdkEventButton",
699 "motion_notify_event", "GdkEventMotion",
700 "delete_event", "GdkEvent",
701 "destroy_event", "GdkEvent",
702 "expose_event", "GdkEventExpose",
703 "key_press_event", "GdkEventKey",
704 "key_release_event", "GdkEventKey",
705 "enter_notify_event", "GdkEventCrossing",
706 "leave_notify_event", "GdkEventCrossing",
707 "configure_event", "GdkEventConfigure",
708 "focus_in_event", "GdkEventFocus",
709 "focus_out_event", "GdkEventFocus",
710 "map_event", "GdkEvent",
711 "unmap_event", "GdkEvent",
712 "property_notify_event", "GdkEventProperty",
713 "selection_clear_event", "GdkEventSelection",
714 "selection_request_event", "GdkEventSelection",
715 "selection_notify_event", "GdkEventSelection",
716 "proximity_in_event", "GdkEventProximity",
717 "proximity_out_event", "GdkEventProximity",
718 "drag_begin_event", "GdkEventDragBegin",
719 "drag_request_event", "GdkEventDragRequest",
720 "drag_end_event", "GdkEventDragRequest",
721 "drop_enter_event", "GdkEventDropEnter",
722 "drop_leave_event", "GdkEventDropLeave",
723 "drop_data_available_event", "GdkEventDropDataAvailable",
724 "other_event", "GdkEventOther",
725 "client_event", "GdkEventClient",
726 "no_expose_event", "GdkEventNoExpose",
727 "visibility_notify_event", "GdkEventVisibility",
728 "window_state_event", "GdkEventWindowState",
729 "scroll_event", "GdkEventScroll",
735 for (i = 0; GbGDKEvents[i]; i += 2)
737 if (!strcmp (signal_name, GbGDKEvents[i]))
738 return GbGDKEvents[i + 1];
744 /* This returns argument names to use for some known GTK signals.
745 It is passed a widget name, e.g. 'GtkCList' and a signal name, e.g.
746 'select_row' and it returns a pointer to an array of argument types and
748 static const gchar **
749 lookup_signal_arg_names (const gchar * type, const gchar * signal_name)
751 /* Each arg array starts with the object type name and the signal name,
752 and then signal arguments follow. */
753 static const gchar *GbArgTable[][16] =
755 {"GtkCList", "select_row",
758 "GdkEventButton *event"},
759 {"GtkCList", "unselect_row",
762 "GdkEventButton *event"},
763 {"GtkCList", "click_column",
766 {"GtkCList", "resize_column",
770 {"GtkCList", "extend_selection",
771 "GtkScrollType scroll_type",
773 "gboolean auto_start_selection"},
774 {"GtkCList", "scroll_vertical",
775 "GtkScrollType scroll_type",
777 {"GtkCList", "scroll_horizontal",
778 "GtkScrollType scroll_type",
781 {"GtkCTree", "tree_select_row",
782 "GtkCTreeNode *node",
784 {"GtkCTree", "tree_unselect_row",
785 "GtkCTreeNode *node",
787 {"GtkCTree", "tree_expand",
788 "GtkCTreeNode *node"},
789 {"GtkCTree", "tree_collapse",
790 "GtkCTreeNode *node"},
791 {"GtkCTree", "tree_move",
792 "GtkCTreeNode *node",
793 "GtkCTreeNode *new_parent",
794 "GtkCTreeNode *new_sibling"},
795 {"GtkCTree", "change_focus_row_expansion",
796 "GtkCTreeExpansionType expansion"},
798 {"GtkEditable", "insert_text",
800 "gint new_text_length",
802 {"GtkEditable", "delete_text",
805 {"GtkEditable", "set_editable",
806 "gboolean is_editable"},
807 {"GtkEditable", "move_cursor",
810 {"GtkEditable", "move_word",
812 {"GtkEditable", "move_page",
815 {"GtkEditable", "move_to_row",
817 {"GtkEditable", "move_to_column",
820 {"GtkEditable", "kill_char",
822 {"GtkEditable", "kill_word",
824 {"GtkEditable", "kill_line",
828 {"GtkInputDialog", "enable_device",
829 "GdkDevice *deviceid"},
830 {"GtkInputDialog", "disable_device",
831 "GdkDevice *deviceid"},
833 {"GtkListItem", "extend_selection",
834 "GtkScrollType scroll_type",
836 "gboolean auto_start_selection"},
837 {"GtkListItem", "scroll_vertical",
838 "GtkScrollType scroll_type",
840 {"GtkListItem", "scroll_horizontal",
841 "GtkScrollType scroll_type",
844 {"GtkMenuShell", "move_current",
845 "GtkMenuDirectionType direction"},
846 {"GtkMenuShell", "activate_current",
847 "gboolean force_hide"},
850 {"GtkNotebook", "switch_page",
851 "GtkNotebookPage *page",
853 {"GtkStatusbar", "text_pushed",
856 {"GtkStatusbar", "text_popped",
859 {"GtkTipsQuery", "widget_entered",
862 "gchar *tip_private"},
863 {"GtkTipsQuery", "widget_selected",
866 "gchar *tip_private",
867 "GdkEventButton *event"},
868 {"GtkToolbar", "orientation_changed",
869 "GtkOrientation orientation"},
870 {"GtkToolbar", "style_changed",
871 "GtkToolbarStyle style"},
872 {"GtkWidget", "draw",
873 "GdkRectangle *area"},
874 {"GtkWidget", "size_request",
875 "GtkRequisition *requisition"},
876 {"GtkWidget", "size_allocate",
877 "GtkAllocation *allocation"},
878 {"GtkWidget", "state_changed",
879 "GtkStateType state"},
880 {"GtkWidget", "style_set",
881 "GtkStyle *previous_style"},
883 {"GtkWidget", "install_accelerator",
884 "gchar *signal_name",
888 {"GtkWidget", "add_accelerator",
889 "guint accel_signal_id",
890 "GtkAccelGroup *accel_group",
892 "GdkModifierType accel_mods",
893 "GtkAccelFlags accel_flags"},
895 {"GtkWidget", "parent_set",
896 "GtkObject *old_parent"},
898 {"GtkWidget", "remove_accelerator",
899 "GtkAccelGroup *accel_group",
901 "GdkModifierType accel_mods"},
902 {"GtkWidget", "debug_msg",
904 {"GtkWindow", "move_resize",
909 {"GtkWindow", "set_focus",
910 "GtkWidget *widget"},
912 {"GtkWidget", "selection_get",
913 "GtkSelectionData *data",
916 {"GtkWidget", "selection_received",
917 "GtkSelectionData *data",
920 {"GtkWidget", "drag_begin",
921 "GdkDragContext *drag_context"},
922 {"GtkWidget", "drag_end",
923 "GdkDragContext *drag_context"},
924 {"GtkWidget", "drag_data_delete",
925 "GdkDragContext *drag_context"},
926 {"GtkWidget", "drag_leave",
927 "GdkDragContext *drag_context",
929 {"GtkWidget", "drag_motion",
930 "GdkDragContext *drag_context",
934 {"GtkWidget", "drag_drop",
935 "GdkDragContext *drag_context",
939 {"GtkWidget", "drag_data_get",
940 "GdkDragContext *drag_context",
941 "GtkSelectionData *data",
944 {"GtkWidget", "drag_data_received",
945 "GdkDragContext *drag_context",
948 "GtkSelectionData *data",
957 for (i = 0; GbArgTable[i][0]; i++)
960 if (!strcmp (type, GbArgTable[i][0])
961 && !strcmp (signal_name, GbArgTable[i][1]))
962 return &GbArgTable[i][2];
968 /* This outputs the hierarchy of all objects which have been initialized,
969 i.e. by calling their XXX_get_type() initialization function. */
971 output_object_hierarchy (void)
976 fp = fopen (hierarchy_filename, "w");
979 g_warning ("Couldn't open output file: %s : %s", hierarchy_filename, strerror(errno));
982 output_hierarchy (fp, G_TYPE_OBJECT, 0);
983 output_hierarchy (fp, G_TYPE_INTERFACE, 0);
985 for (i=0; object_types[i]; i++) {
986 if (!g_type_parent (object_types[i]) &&
987 (object_types[i] != G_TYPE_NONE) &&
988 (object_types[i] != G_TYPE_OBJECT) &&
989 (object_types[i] != G_TYPE_INTERFACE)
991 g_warning ("printing hierarchy for root type: %s",
992 g_type_name (object_types[i]));
993 output_hierarchy (fp, object_types[i], 0);
997 for (i=0; object_types[i]; i++) {
998 if(object_types[i] != G_TYPE_NONE) {
999 g_print ("type has not been added to hierarchy: %s\\n",
1000 g_type_name (object_types[i]));
1008 /* This is called recursively to output the hierarchy of a widget. */
1010 output_hierarchy (FILE *fp,
1022 for (i=0; object_types[i]; i++) {
1023 if(object_types[i] == type) {
1024 g_print ("added type to hierarchy (level %d): %s\\n",
1025 level, g_type_name (type));
1026 object_types[i] = G_TYPE_NONE;
1032 for (i = 0; i < level; i++)
1034 fprintf (fp, "%s", g_type_name (type));
1035 fprintf (fp, "\\n");
1037 children = g_type_children (type, &n_children);
1039 for (i=0; i < n_children; i++) {
1040 output_hierarchy (fp, children[i], level + 1);
1046 static void output_object_interfaces (void)
1051 fp = fopen (interfaces_filename, "w");
1054 g_warning ("Couldn't open output file: %s : %s", interfaces_filename, strerror(errno));
1057 output_interfaces (fp, G_TYPE_OBJECT);
1059 for (i = 0; object_types[i]; i++)
1061 if (!g_type_parent (object_types[i]) &&
1062 (object_types[i] != G_TYPE_OBJECT) &&
1063 G_TYPE_IS_INSTANTIATABLE (object_types[i]))
1065 output_interfaces (fp, object_types[i]);
1072 output_interfaces (FILE *fp,
1076 GType *children, *interfaces;
1077 guint n_children, n_interfaces;
1082 interfaces = g_type_interfaces (type, &n_interfaces);
1084 if (n_interfaces > 0)
1086 fprintf (fp, "%s", g_type_name (type));
1087 for (i=0; i < n_interfaces; i++)
1088 fprintf (fp, " %s", g_type_name (interfaces[i]));
1089 fprintf (fp, "\\n");
1091 g_free (interfaces);
1093 children = g_type_children (type, &n_children);
1095 for (i=0; i < n_children; i++)
1096 output_interfaces (fp, children[i]);
1101 static void output_interface_prerequisites (void)
1105 fp = fopen (prerequisites_filename, "w");
1108 g_warning ("Couldn't open output file: %s : %s", prerequisites_filename, strerror(errno));
1111 output_prerequisites (fp, G_TYPE_INTERFACE);
1116 output_prerequisites (FILE *fp,
1119 #if GLIB_CHECK_VERSION(2,1,0)
1121 GType *children, *prerequisites;
1122 guint n_children, n_prerequisites;
1127 prerequisites = g_type_interface_prerequisites (type, &n_prerequisites);
1129 if (n_prerequisites > 0)
1131 fprintf (fp, "%s", g_type_name (type));
1132 for (i=0; i < n_prerequisites; i++)
1133 fprintf (fp, " %s", g_type_name (prerequisites[i]));
1134 fprintf (fp, "\\n");
1136 g_free (prerequisites);
1138 children = g_type_children (type, &n_children);
1140 for (i=0; i < n_children; i++)
1141 output_prerequisites (fp, children[i]);
1153 fp = fopen (args_filename, "w");
1156 g_warning ("Couldn't open output file: %s : %s", args_filename, strerror(errno));
1160 for (i = 0; object_types[i]; i++) {
1161 output_object_args (fp, object_types[i]);
1168 compare_param_specs (const void *a, const void *b)
1170 GParamSpec *spec_a = *(GParamSpec **)a;
1171 GParamSpec *spec_b = *(GParamSpec **)b;
1173 return strcmp (g_param_spec_get_name (spec_a), g_param_spec_get_name (spec_b));
1176 /* Its common to have unsigned properties restricted
1177 * to the signed range. Therefore we make this look
1178 * a bit nicer by spelling out the max constants.
1181 /* Don't use "==" with floats, it might trigger a gcc warning. */
1182 #define GTKDOC_COMPARE_FLOAT(x, y) (x <= y && x >= y)
1185 describe_double_constant (gdouble value)
1189 if (GTKDOC_COMPARE_FLOAT (value, G_MAXDOUBLE))
1190 desc = g_strdup ("G_MAXDOUBLE");
1191 else if (GTKDOC_COMPARE_FLOAT (value, G_MINDOUBLE))
1192 desc = g_strdup ("G_MINDOUBLE");
1193 else if (GTKDOC_COMPARE_FLOAT (value, -G_MAXDOUBLE))
1194 desc = g_strdup ("-G_MAXDOUBLE");
1195 else if (GTKDOC_COMPARE_FLOAT (value, G_MAXFLOAT))
1196 desc = g_strdup ("G_MAXFLOAT");
1197 else if (GTKDOC_COMPARE_FLOAT (value, G_MINFLOAT))
1198 desc = g_strdup ("G_MINFLOAT");
1199 else if (GTKDOC_COMPARE_FLOAT (value, -G_MAXFLOAT))
1200 desc = g_strdup ("-G_MAXFLOAT");
1202 desc = g_strdup_printf ("%lg", value);
1208 describe_signed_constant (gint64 value)
1212 if (value == G_MAXINT)
1213 desc = g_strdup ("G_MAXINT");
1214 else if (value == G_MININT)
1215 desc = g_strdup ("G_MININT");
1216 else if (value == G_MAXUINT)
1217 desc = g_strdup ("G_MAXUINT");
1218 else if (value == G_MAXLONG)
1219 desc = g_strdup ("G_MAXLONG");
1220 else if (value == G_MINLONG)
1221 desc = g_strdup ("G_MINLONG");
1222 else if (value == G_MAXULONG)
1223 desc = g_strdup ("G_MAXULONG");
1224 else if (value == G_MAXINT64)
1225 desc = g_strdup ("G_MAXINT64");
1226 else if (value == G_MININT64)
1227 desc = g_strdup ("G_MININT64");
1229 desc = g_strdup_printf ("%" G_GINT64_FORMAT, value);
1235 describe_unsigned_constant (guint64 value)
1239 if (value == G_MAXINT)
1240 desc = g_strdup ("G_MAXINT");
1241 else if (value == G_MININT)
1242 desc = g_strdup ("G_MININT");
1243 else if (value == G_MAXUINT)
1244 desc = g_strdup ("G_MAXUINT");
1245 else if (value == G_MAXLONG)
1246 desc = g_strdup ("G_MAXLONG");
1247 else if (value == G_MINLONG)
1248 desc = g_strdup ("G_MINLONG");
1249 else if (value == G_MAXULONG)
1250 desc = g_strdup ("G_MAXULONG");
1251 else if (value == G_MAXINT64)
1252 desc = g_strdup ("G_MAXINT64");
1253 else if (value == G_MININT64)
1254 desc = g_strdup ("G_MININT64");
1255 else if (value == G_MAXUINT64)
1256 desc = g_strdup ("G_MAXUINT64");
1258 desc = g_strdup_printf ("%" G_GUINT64_FORMAT, value);
1264 describe_type (GParamSpec *spec)
1270 if (G_IS_PARAM_SPEC_CHAR (spec))
1272 GParamSpecChar *pspec = G_PARAM_SPEC_CHAR (spec);
1274 lower = describe_signed_constant (pspec->minimum);
1275 upper = describe_signed_constant (pspec->maximum);
1276 if (pspec->minimum == G_MININT8 && pspec->maximum == G_MAXINT8)
1277 desc = g_strdup ("");
1278 else if (pspec->minimum == G_MININT8)
1279 desc = g_strdup_printf ("<= %s", upper);
1280 else if (pspec->maximum == G_MAXINT8)
1281 desc = g_strdup_printf (">= %s", lower);
1283 desc = g_strdup_printf ("[%s,%s]", lower, upper);
1287 else if (G_IS_PARAM_SPEC_UCHAR (spec))
1289 GParamSpecUChar *pspec = G_PARAM_SPEC_UCHAR (spec);
1291 lower = describe_unsigned_constant (pspec->minimum);
1292 upper = describe_unsigned_constant (pspec->maximum);
1293 if (pspec->minimum == 0 && pspec->maximum == G_MAXUINT8)
1294 desc = g_strdup ("");
1295 else if (pspec->minimum == 0)
1296 desc = g_strdup_printf ("<= %s", upper);
1297 else if (pspec->maximum == G_MAXUINT8)
1298 desc = g_strdup_printf (">= %s", lower);
1300 desc = g_strdup_printf ("[%s,%s]", lower, upper);
1304 else if (G_IS_PARAM_SPEC_INT (spec))
1306 GParamSpecInt *pspec = G_PARAM_SPEC_INT (spec);
1308 lower = describe_signed_constant (pspec->minimum);
1309 upper = describe_signed_constant (pspec->maximum);
1310 if (pspec->minimum == G_MININT && pspec->maximum == G_MAXINT)
1311 desc = g_strdup ("");
1312 else if (pspec->minimum == G_MININT)
1313 desc = g_strdup_printf ("<= %s", upper);
1314 else if (pspec->maximum == G_MAXINT)
1315 desc = g_strdup_printf (">= %s", lower);
1317 desc = g_strdup_printf ("[%s,%s]", lower, upper);
1321 else if (G_IS_PARAM_SPEC_UINT (spec))
1323 GParamSpecUInt *pspec = G_PARAM_SPEC_UINT (spec);
1325 lower = describe_unsigned_constant (pspec->minimum);
1326 upper = describe_unsigned_constant (pspec->maximum);
1327 if (pspec->minimum == 0 && pspec->maximum == G_MAXUINT)
1328 desc = g_strdup ("");
1329 else if (pspec->minimum == 0)
1330 desc = g_strdup_printf ("<= %s", upper);
1331 else if (pspec->maximum == G_MAXUINT)
1332 desc = g_strdup_printf (">= %s", lower);
1334 desc = g_strdup_printf ("[%s,%s]", lower, upper);
1338 else if (G_IS_PARAM_SPEC_LONG (spec))
1340 GParamSpecLong *pspec = G_PARAM_SPEC_LONG (spec);
1342 lower = describe_signed_constant (pspec->minimum);
1343 upper = describe_signed_constant (pspec->maximum);
1344 if (pspec->minimum == G_MINLONG && pspec->maximum == G_MAXLONG)
1345 desc = g_strdup ("");
1346 else if (pspec->minimum == G_MINLONG)
1347 desc = g_strdup_printf ("<= %s", upper);
1348 else if (pspec->maximum == G_MAXLONG)
1349 desc = g_strdup_printf (">= %s", lower);
1351 desc = g_strdup_printf ("[%s,%s]", lower, upper);
1355 else if (G_IS_PARAM_SPEC_ULONG (spec))
1357 GParamSpecULong *pspec = G_PARAM_SPEC_ULONG (spec);
1360 lower = describe_unsigned_constant (pspec->minimum);
1361 upper = describe_unsigned_constant (pspec->maximum);
1362 if (pspec->minimum == 0 && pspec->maximum == G_MAXULONG)
1363 desc = g_strdup ("");
1364 else if (pspec->minimum == 0)
1365 desc = g_strdup_printf ("<= %s", upper);
1366 else if (pspec->maximum == G_MAXULONG)
1367 desc = g_strdup_printf (">= %s", lower);
1369 desc = g_strdup_printf ("[%s,%s]", lower, upper);
1373 else if (G_IS_PARAM_SPEC_INT64 (spec))
1375 GParamSpecInt64 *pspec = G_PARAM_SPEC_INT64 (spec);
1377 lower = describe_signed_constant (pspec->minimum);
1378 upper = describe_signed_constant (pspec->maximum);
1379 if (pspec->minimum == G_MININT64 && pspec->maximum == G_MAXINT64)
1380 desc = g_strdup ("");
1381 else if (pspec->minimum == G_MININT64)
1382 desc = g_strdup_printf ("<= %s", upper);
1383 else if (pspec->maximum == G_MAXINT64)
1384 desc = g_strdup_printf (">= %s", lower);
1386 desc = g_strdup_printf ("[%s,%s]", lower, upper);
1390 else if (G_IS_PARAM_SPEC_UINT64 (spec))
1392 GParamSpecUInt64 *pspec = G_PARAM_SPEC_UINT64 (spec);
1394 lower = describe_unsigned_constant (pspec->minimum);
1395 upper = describe_unsigned_constant (pspec->maximum);
1396 if (pspec->minimum == 0 && pspec->maximum == G_MAXUINT64)
1397 desc = g_strdup ("");
1398 else if (pspec->minimum == 0)
1399 desc = g_strdup_printf ("<= %s", upper);
1400 else if (pspec->maximum == G_MAXUINT64)
1401 desc = g_strdup_printf (">= %s", lower);
1403 desc = g_strdup_printf ("[%s,%s]", lower, upper);
1407 else if (G_IS_PARAM_SPEC_FLOAT (spec))
1409 GParamSpecFloat *pspec = G_PARAM_SPEC_FLOAT (spec);
1411 lower = describe_double_constant (pspec->minimum);
1412 upper = describe_double_constant (pspec->maximum);
1413 if (GTKDOC_COMPARE_FLOAT (pspec->minimum, -G_MAXFLOAT))
1415 if (GTKDOC_COMPARE_FLOAT (pspec->maximum, G_MAXFLOAT))
1416 desc = g_strdup ("");
1418 desc = g_strdup_printf ("<= %s", upper);
1420 else if (GTKDOC_COMPARE_FLOAT (pspec->maximum, G_MAXFLOAT))
1421 desc = g_strdup_printf (">= %s", lower);
1423 desc = g_strdup_printf ("[%s,%s]", lower, upper);
1427 else if (G_IS_PARAM_SPEC_DOUBLE (spec))
1429 GParamSpecDouble *pspec = G_PARAM_SPEC_DOUBLE (spec);
1431 lower = describe_double_constant (pspec->minimum);
1432 upper = describe_double_constant (pspec->maximum);
1433 if (GTKDOC_COMPARE_FLOAT (pspec->minimum, -G_MAXDOUBLE))
1435 if (GTKDOC_COMPARE_FLOAT (pspec->maximum, G_MAXDOUBLE))
1436 desc = g_strdup ("");
1438 desc = g_strdup_printf ("<= %s", upper);
1440 else if (GTKDOC_COMPARE_FLOAT (pspec->maximum, G_MAXDOUBLE))
1441 desc = g_strdup_printf (">= %s", lower);
1443 desc = g_strdup_printf ("[%s,%s]", lower, upper);
1449 desc = g_strdup ("");
1456 describe_default (GParamSpec *spec)
1460 if (G_IS_PARAM_SPEC_CHAR (spec))
1462 GParamSpecChar *pspec = G_PARAM_SPEC_CHAR (spec);
1464 desc = g_strdup_printf ("%d", pspec->default_value);
1466 else if (G_IS_PARAM_SPEC_UCHAR (spec))
1468 GParamSpecUChar *pspec = G_PARAM_SPEC_UCHAR (spec);
1470 desc = g_strdup_printf ("%u", pspec->default_value);
1472 else if (G_IS_PARAM_SPEC_BOOLEAN (spec))
1474 GParamSpecBoolean *pspec = G_PARAM_SPEC_BOOLEAN (spec);
1476 desc = g_strdup_printf ("%s", pspec->default_value ? "TRUE" : "FALSE");
1478 else if (G_IS_PARAM_SPEC_INT (spec))
1480 GParamSpecInt *pspec = G_PARAM_SPEC_INT (spec);
1482 desc = g_strdup_printf ("%d", pspec->default_value);
1484 else if (G_IS_PARAM_SPEC_UINT (spec))
1486 GParamSpecUInt *pspec = G_PARAM_SPEC_UINT (spec);
1488 desc = g_strdup_printf ("%u", pspec->default_value);
1490 else if (G_IS_PARAM_SPEC_LONG (spec))
1492 GParamSpecLong *pspec = G_PARAM_SPEC_LONG (spec);
1494 desc = g_strdup_printf ("%ld", pspec->default_value);
1496 else if (G_IS_PARAM_SPEC_LONG (spec))
1498 GParamSpecULong *pspec = G_PARAM_SPEC_ULONG (spec);
1500 desc = g_strdup_printf ("%lu", pspec->default_value);
1502 else if (G_IS_PARAM_SPEC_INT64 (spec))
1504 GParamSpecInt64 *pspec = G_PARAM_SPEC_INT64 (spec);
1506 desc = g_strdup_printf ("%" G_GINT64_FORMAT, pspec->default_value);
1508 else if (G_IS_PARAM_SPEC_UINT64 (spec))
1510 GParamSpecUInt64 *pspec = G_PARAM_SPEC_UINT64 (spec);
1512 desc = g_strdup_printf ("%" G_GUINT64_FORMAT, pspec->default_value);
1514 else if (G_IS_PARAM_SPEC_UNICHAR (spec))
1516 GParamSpecUnichar *pspec = G_PARAM_SPEC_UNICHAR (spec);
1518 if (g_unichar_isprint (pspec->default_value))
1519 desc = g_strdup_printf ("'%c'", pspec->default_value);
1521 desc = g_strdup_printf ("%u", pspec->default_value);
1523 else if (G_IS_PARAM_SPEC_ENUM (spec))
1525 GParamSpecEnum *pspec = G_PARAM_SPEC_ENUM (spec);
1527 GEnumValue *value = g_enum_get_value (pspec->enum_class, pspec->default_value);
1529 desc = g_strdup_printf ("%s", value->value_name);
1531 desc = g_strdup_printf ("%d", pspec->default_value);
1533 else if (G_IS_PARAM_SPEC_FLAGS (spec))
1535 GParamSpecFlags *pspec = G_PARAM_SPEC_FLAGS (spec);
1536 guint default_value;
1539 default_value = pspec->default_value;
1540 acc = g_string_new ("");
1542 while (default_value)
1544 GFlagsValue *value = g_flags_get_first_value (pspec->flags_class, default_value);
1550 g_string_append (acc, "|");
1551 g_string_append (acc, value->value_name);
1553 default_value &= ~value->value;
1556 if (default_value == 0)
1557 desc = g_string_free (acc, FALSE);
1560 desc = g_strdup_printf ("%d", pspec->default_value);
1561 g_string_free (acc, TRUE);
1564 else if (G_IS_PARAM_SPEC_FLOAT (spec))
1566 GParamSpecFloat *pspec = G_PARAM_SPEC_FLOAT (spec);
1568 desc = g_strdup_printf ("%g", pspec->default_value);
1570 else if (G_IS_PARAM_SPEC_DOUBLE (spec))
1572 GParamSpecDouble *pspec = G_PARAM_SPEC_DOUBLE (spec);
1574 desc = g_strdup_printf ("%lg", pspec->default_value);
1576 else if (G_IS_PARAM_SPEC_STRING (spec))
1578 GParamSpecString *pspec = G_PARAM_SPEC_STRING (spec);
1580 if (pspec->default_value)
1582 gchar *esc = g_strescape (pspec->default_value, NULL);
1584 desc = g_strdup_printf ("\\"%s\\"", esc);
1589 desc = g_strdup_printf ("NULL");
1593 desc = g_strdup ("");
1601 output_object_args (FILE *fp, GType object_type)
1604 const gchar *object_class_name;
1606 gchar flags[16], *pos;
1607 GParamSpec **properties;
1609 gboolean child_prop;
1610 gboolean style_prop;
1611 gboolean is_pointer;
1612 const gchar *type_name;
1614 gchar *default_value;
1616 if (G_TYPE_IS_OBJECT (object_type))
1618 class = g_type_class_peek (object_type);
1622 properties = g_object_class_list_properties (class, &n_properties);
1624 #if GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 3)
1625 else if (G_TYPE_IS_INTERFACE (object_type))
1627 class = g_type_default_interface_ref (object_type);
1632 properties = g_object_interface_list_properties (class, &n_properties);
1638 object_class_name = g_type_name (object_type);
1644 qsort (properties, n_properties, sizeof (GParamSpec *), compare_param_specs);
1645 for (arg = 0; arg < n_properties; arg++)
1647 GParamSpec *spec = properties[arg];
1648 const gchar *nick, *blurb, *dot;
1650 if (spec->owner_type != object_type)
1654 /* We use one-character flags for simplicity. */
1655 if (child_prop && !style_prop)
1659 if (spec->flags & G_PARAM_READABLE)
1661 if (spec->flags & G_PARAM_WRITABLE)
1663 if (spec->flags & G_PARAM_CONSTRUCT)
1665 if (spec->flags & G_PARAM_CONSTRUCT_ONLY)
1669 nick = g_param_spec_get_nick (spec);
1670 blurb = g_param_spec_get_blurb (spec);
1674 int str_len = strlen (blurb);
1675 if (str_len > 0 && blurb[str_len - 1] != '.')
1679 type_desc = describe_type (spec);
1680 default_value = describe_default (spec);
1681 type_name = get_type_name (spec->value_type, &is_pointer);
1682 fprintf (fp, "<ARG>\\n<NAME>%s::%s</NAME>\\n<TYPE>%s%s</TYPE>\\n<RANGE>%s</RANGE>\\n<FLAGS>%s</FLAGS>\\n<NICK>%s</NICK>\\n<BLURB>%s%s</BLURB>\\n<DEFAULT>%s</DEFAULT>\\n</ARG>\\n\\n",
1683 object_class_name, g_param_spec_get_name (spec), type_name, is_pointer ? "*" : "", type_desc, flags, nick ? nick : "(null)", blurb ? blurb : "(null)", dot, default_value);
1685 g_free (default_value);
1688 g_free (properties);
1690 #ifdef GTK_IS_CONTAINER_CLASS
1691 if (!child_prop && GTK_IS_CONTAINER_CLASS (class)) {
1692 properties = gtk_container_class_list_child_properties (class, &n_properties);
1698 #ifdef GTK_IS_WIDGET_CLASS
1699 #if GTK_CHECK_VERSION(2,1,0)
1700 if (!style_prop && GTK_IS_WIDGET_CLASS (class)) {
1701 properties = gtk_widget_class_list_style_properties (GTK_WIDGET_CLASS (class), &n_properties);
1715 # Compile and run our file
1717 $CC = $ENV{CC} ? $ENV{CC} : "gcc";
1718 $LD = $ENV{LD} ? $ENV{LD} : $CC;
1719 $CFLAGS = $ENV{CFLAGS} ? "$ENV{CFLAGS} -Wall -g" : "-Wall -g";
1720 $LDFLAGS = $ENV{LDFLAGS} ? $ENV{LDFLAGS} : "";
1723 if ($CC =~ /libtool/) {
1724 $o_file = "$MODULE-scan.lo"
1726 $o_file = "$MODULE-scan.o"
1729 print "gtk-doc: Compiling scanner\n";
1730 $command = "$CC $CFLAGS -c -o $o_file $MODULE-scan.c";
1731 system($command) == 0 or die "Compilation of scanner failed: $!\n";
1733 print "gtk-doc: Linking scanner\n";
1734 $command = "$LD -o $MODULE-scan $o_file $LDFLAGS";
1735 system($command) == 0 or die "Linking of scanner failed: $!\n";
1737 print "gtk-doc: Running scanner $MODULE-scan\n";
1738 system("sh -c ./$MODULE-scan") == 0 or die "Scan failed: $!\n";
1740 if (!defined($ENV{"GTK_DOC_KEEP_INTERMEDIATE"})) {
1741 unlink "./$MODULE-scan.c", "./$MODULE-scan.o", "./$MODULE-scan.lo", "./$MODULE-scan";
1744 #&UpdateFileIfChanged ($old_signals_filename, $new_signals_filename, 0);
1745 &UpdateFileIfChanged ($old_hierarchy_filename, $new_hierarchy_filename, 0);
1746 &UpdateFileIfChanged ($old_interfaces_filename, $new_interfaces_filename, 0);
1747 &UpdateFileIfChanged ($old_prerequisites_filename, $new_prerequisites_filename, 0);
1748 #&UpdateFileIfChanged ($old_args_filename, $new_args_filename, 0);