Re: [gtk-list] GdkMagick: Advice needed
- From: Havoc Pennington <hp redhat com>
- To: gtk-list redhat com
- cc: magick wizards dupont com, bfriesen simple dallas tx us
- Subject: Re: [gtk-list] GdkMagick: Advice needed
- Date: Tue, 19 Oct 1999 22:07:39 -0400 (EDT)
On Tue, 19 Oct 1999, Arthur Jerijian wrote:
> command. However, it has been brought to my attention that this scheme may
> cause problems, particularly since gdkmagick-config specifies the options for
> ALL libraries, including ImageMagick and GTK+. What I decided to do, since
> gdkmagick-config is all-inclusive, is to make the gdk_magick.h header file and
> the gdk_magick_init functions all-inclusive too. This brings up several points:
>
> 1. A program that uses GdkMagick must only include <gdk_magick.h> and possibly
> <gtk/gtk.h>, *without* including <magick/api.h> or <gdk/gdk.h>.
>
I don't understand this problem - aren't there include guards on the
headers?
> If I use this approach, gdk_magick.h will not automatically include <gtk/gtk.h>
> or <magick/api.h>, and the programmer must call gdk_init and/or gdk_rgb_init
> explicitly before calling gdk_magick_init.
>
> Which approach is better? Do any of you have any suggestions?
>
You need to require the explicit init calls, because otherwise it creates
real problems with libraries working together; for example gtk_init()
calls gdk_init() so if you also call gdk_init() that's a problem. Or
gnome_init() calls gtk_init(). The devel branch of gnome-libs has an
extensible init mechanism to work around this sort of thing, but failing a
complex scheme like that you need to let people do the init themselves.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]