[Gtk-sharp-list] gdk_colormap_alloc_colors.

Miguel de Icaza miguel@ximian.com
28 Feb 2003 01:19:52 -0500


Hey guys!

    There is an API in Gdk that allocates an array of colors, this is
the prototype:

gint        gdk_colormap_alloc_colors       (GdkColormap *colormap,
                                             GdkColor *colors,
                                             gint ncolors,
                                             gboolean writeable,
                                             gboolean best_match,
                                             gboolean *success);

    The number of "GdkColor" structures is provided in `ncolors', and
what makes this harder is that results are written back into the
"colors" array (the `pixel' field is filled in with the data from the
server).  

    My feeling is that this is going to be a hard one, and that we might
be better off just providing a workaround in the .custom file, and
having some way of "hiding" this API call.

Miguel