Graphic Contexts


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:

GdkGC*      gtk_gc_get (gint depth,
                                              GdkColormap *colormap,
                                              GdkGCValues *values,

GdkGC*      gdk_gc_new_with_values (GdkWindow *window,
                                              GdkGCValues *values,

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 |
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 Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany     Tel: +49/731/501-8690           FAX: +49/731/501-999

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]