Re: [gtk-list] Re: Graphic Contexts
- From: Ralf Corsepius <corsepiu faw uni-ulm de>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Graphic Contexts
- Date: Tue, 14 Mar 2000 02:43:46 +0100
Havoc Pennington wrote:
> Ralf Corsepius <corsepiu@faw.uni-ulm.de> writes:
> > Am I misunderstanding something here? Otherwise, this API seems somewhat
> > suspectable or even broken to me.
> >
>
> A mask of multiple values will work fine.
>
> The GTK convention (which may be a bit broken) is to specify the enum
> type instead of "int", when a logical | of several flags is the
> expected argument. This helps humans know what the argument is
> supposed to be.
>
Well, X11 seems to have reasons to use unsigned longs for this kind of masks
(cf. XCreateGC etc.). One of them apparently is C++ compatibilty ;)
>
> C++ compilers don't like this at all, so you typically have to insert
> a cast to the enum type.
Yes, I am using C++, applying gtk/gdk's C-API.
> Gtk-- probably maps these Mask enums to ints,
> if it doesn't it's a good suggestion.
I am not using Gtk--, but AFAIS,
* gtk-- don't seem to support getting GCs at all (at least I can't find any GC
related wrapper in gtk--'s headers).
* gdk-- does not seem to support setting multiple bits for value_masks (cf.
gdk--/gc.h).
Thanks,
Ralf
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu@faw.uni-ulm.de FAX: +49/731/501-999
http://www.faw.uni-ulm.de
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]