We convert the gdk.defs, gtk.defs and gnome.defs files into the C and Java files using the Java code in the src/tools directory. The whole process starts when Parser is called with the arguments defs Gdk, defs Gtk or defs Gnome from the src/Makefile.
Everything in the defs files are first parsed into Vectors. Each define-* gets converted into a Vector. These Vectors are then parsed into type specific Vectors according to its category. The Vectors involved here are:
classnames Holds all the class names methodnames Holds all the method names constantnames Holds all the constructor names enumsnames Holds all the enum and flag names typesnames Holds all the different types |
Finally the lists are rebuild adding the appropriate constructors, methods and the enums/flags to the correct ClassDefinition (class name). The information in each of these ClassDefinitions is then written to the files. Finally all the methods and enums/flags that is not part of any other class is written to the base class.