Graphic Contexts
- From: Ralf Corsepius <corsepiu faw uni-ulm de>
- To: gtk-list redhat com
- Subject: Graphic Contexts
- Date: Mon, 13 Mar 2000 19:45:04 +0100
Hi,
How is one supposed to get graphic contexts with multiple bits being set
in values_mask ?
AFAIS, gtk/gdk only provide functions to get graphic contexts with one
single bit set for values_mask:
Eg.:
GdkGC* gtk_gc_get (gint depth,
GdkColormap *colormap,
GdkGCValues *values,
GdkGCValuesMask
values_mask);
GdkGC* gdk_gc_new_with_values (GdkWindow *window,
GdkGCValues *values,
GdkGCValuesMask
values_mask);
GdkValuesMask an enum, i.e. unlike X11, gtk/gdk does not seem not to
allow setting multiple bits in values_mask simultaneously
(Eg. when trying to set values_mask = GDK_GC_FOREGROUND |
GDK_GC_BACKGROUND,
values_mask is not of type GdkGCValuesMask).
This style of declaration also prevents using empty values_masks when
trying to getting a GC with one of the functions above.
=> The only proper way to get GCs with multiple bits set in gtk seems to
be to apply gtk_gc_get with one single bit set and then to subsequently
to apply *gc_set_*() functions.
Am I misunderstanding something here? Otherwise, this API seems somewhat
suspectable or even broken to me.
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]