Re: Top-level include files
Am Wed, 17 Dec 2008 15:01:55 -0500 schrieb Morten Welinder mort...@gnome.org: Its supposed to be documented in the api docs, at the top of the synopsis for each section. Of course, the documentation may be outdated. This is a farce. Why try to enforce something that does not seem to have ever been documented? At least not correctly. [...] Humble suggestion: Hey Morten, please try to actually be humble and don't make it look more dramatic than it is. The exceptions were documented before already, arguably a more central explanation might be nice. You survived it before, the new policy doesn't change anything about those special cases. :) I would agree if you have an idea of how to document this more intuitively, please make a suggestion. Just my 2 pfennig, Christian ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Top-level include files
On Wed, Dec 17, 2008 at 9:17 AM, Morten Welinder mort...@gnome.org wrote: Someone is pushing changes to the way Gnome modules include header files, see http://live.gnome.org/GnomeGoals/CleanupGTKIncludes GTK+ is moving toward a model where it is only allowed to include the 'toplevel' headers. Only glib.h, gdk/gdk.h, gdk-pixbuf/gdk-pixbuf.h and gtk/gtk.h can be directly included. This would be nice advice were it not for the fact that it is wrong and it is being spread far and wide. One exception is gdk/gdkkeysyms.h and it is not alone. So: what header files are meant to be included by applications? Where is this information documented? Its supposed to be documented in the api docs, at the top of the synopsis for each section. Of course, the documentation may be outdated. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Top-level include files
Cosimo Cecchi wrote: On Wed, 2008-12-17 at 09:17 -0500, Morten Welinder wrote: So: what header files are meant to be included by applications? Where is this information documented? AFAIK it's not clearly documented anywhere, but in addition to the toplevel headers, you should always include gdk/gdkkeysyms.h, glib/gi18n.h, glib/gi18n-lib.h and glib/gstdio.h if the function contained in these headers are required by the application/library including them. I don't know the reason why these are not included in the toplevel header though I believe gi18n.h and gi18n-lib.h are mutually exclusive and shouldn't both be included. I think a couple headers (maybe gstrfuncs.h and gstdio.h) require the app developer to (possibly) include some system headers, like string.h or fcntl.h, so they aren't included in the main glib.h header. -brian (and I'm also not sure whether there are more headers that should be included separately). Cheers, Cosimo ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Top-level include files
Its supposed to be documented in the api docs, at the top of the synopsis for each section. Of course, the documentation may be outdated. This is a farce. Why try to enforce something that does not seem to have ever been documented? At least not correctly. On http://library.gnome.org/devel/glib/stable/glib-compiling.html we have: The recommended way of using GLib has always been to only include the toplevel headers glib.h, glib-object.h, gio.h. Starting with 2.17, GLib enforces this by generating an error when individual headers are directly included. That's wrong. http://library.gnome.org/devel/gdk/stable/ has nothing similar that I can find. The synopsis for Key Values lists only gdk/gdk.h. In the body there is a note about gdk/gdkkeysyms.h Humble suggestion: 1. Correctly document which header files can be included by applications. Then worry about enforcement. 2. Make sure tests and demos subdirectories follow the policy. 3. Then worry about enforcement. In that order. Morten ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Top-level include files
Someone is pushing changes to the way Gnome modules include header files, see http://live.gnome.org/GnomeGoals/CleanupGTKIncludes GTK+ is moving toward a model where it is only allowed to include the 'toplevel' headers. Only glib.h, gdk/gdk.h, gdk-pixbuf/gdk-pixbuf.h and gtk/gtk.h can be directly included. This would be nice advice were it not for the fact that it is wrong and it is being spread far and wide. One exception is gdk/gdkkeysyms.h and it is not alone. So: what header files are meant to be included by applications? Where is this information documented? I have been trying to get this information via bugzilla, wiki, irc and not the mailing list. The best answer, so far, is see if it compiles which is a sad, sad statement about the API. Morten ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Top-level include files
On Wed, 2008-12-17 at 09:17 -0500, Morten Welinder wrote: So: what header files are meant to be included by applications? Where is this information documented? AFAIK it's not clearly documented anywhere, but in addition to the toplevel headers, you should always include gdk/gdkkeysyms.h, glib/gi18n.h, glib/gi18n-lib.h and glib/gstdio.h if the function contained in these headers are required by the application/library including them. I don't know the reason why these are not included in the toplevel header though (and I'm also not sure whether there are more headers that should be included separately). Cheers, Cosimo ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Top-level include files
On Wed, Dec 17, 2008 at 3:01 PM, Morten Welinder mort...@gnome.org wrote: Humble suggestion: 1. Correctly document which header files can be included by applications. Then worry about enforcement. 2. Make sure tests and demos subdirectories follow the policy. 3. Then worry about enforcement. In that order. Morten Feel free to send a patch. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list