ABI rules on accessing colormap->colors?
- From: Peter Zelezny <pzel dodo com au>
- To: gtk-app-devel-list gnome org
- Subject: ABI rules on accessing colormap->colors?
- Date: Mon, 15 Sep 2003 14:45:16 +1000
Hi All,
I want to use the "colors" field of a GdkColormap object. The current docs say:
gint size For pseudo-color colormaps, the number of colors in the colormap.
GdkColor *colors An array containing the current values in the colormap. This
can be used to map from pixel values back to RGB values. This is only
meaningful for pseudo-color colormaps.
On a TrueColor visual, I'm getting a size of 64 and colors of NULL (I'm not
sure if this is uninitialized or a proper NULL). On a 8bit PseudoColor server,
I get a size of 256 and ->colors are a valid array.
Before I try to access cmap->colors, what should I be checking?
a) if cmap->colors is NULL
b) if visual->type == PseudoColor
c) if cmap->size == 0
d) something else?
Thanks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]