Currently in gtkD when you want to use the enums of gtkD (which you have to do all the time), you'll have to import the C functions definition files e.g. gtkc.gtktypes. That creates a bit unclean looking code. And people really do expect the enums to be usable at all times.
Suggestion to fix it:
The enums should be automatically public imported by all files. And the enums should propably be in a file of their own then called something like /src/gtk/gtkEnums.d or /src/gtkc/gtkenums.d. And then that file should be imported by all /src/gtk/ files. (And the same for all other packages gdk, glib, gstreamer etc.)
You shouldn't need to import gtkc.gtktypes to get the enums. That would be a lot cleaner.
Another issue is that should the C type enum names be allowed too.
In C you'd have for example a positiontype enum which has the following defined:
GTK_POS_LEFT
GTK_POS_RIGHT
GTK_POS_TOP
GTK_POS_BOTTOM
In gtkD we have:
public enum GtkPositionType?
{
LEFT,
RIGHT,
TOP,
BOTTOM
}
Should the C versions be defined in /src/gtkc/gtkc.d (Or in a file called gtkcenums.d that would be imported by /src/gtkc/gtkc.d which doesn't yet exist.)
And then the D versions (named enums) could be defined in /src/gtk/gtkEnums.d and imported by all files in /src/gtk/ like suggested above. That way we could again have the direct C wrapper in /src/gtkc/ and the D object oriented wrapper in /src/gtk/ like people have suggested before.
Another option would be to only have the named enums (current situation) which is not bad, but if somebody would want to use the direct C functions then they propably expect the C enums to work too.
Whichever path is chosen with the C enums, the D enums should be fixed quickly to be imported by all files, as that will simplify all the examples (take out one ugly line) and make the conversion of GTK examples from other languages easier.