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

Re: [BUG] gdk_rgb_find_color() is lacking



"muppet" <scott asofyet org> writes:

> > but now, i lacks gdk_rgb_find_color() for mcc (from gdk/gdk.h)
> 
> the attached file implements several of the functions in gdk-rgb, in
> addition to gdk_rgb_find_color.  drop it into the xs/ subdir, rerun
> Makefile.PL (to pick it up), and rebuild.
> 
> note that these versions of gdk_draw_rgb_image and friends allow the
> rgb_buf to be passed either as a scalar containing all the pixel
> data or as an unsigned integer which will be treated at the binding
> level as a C pointer to the image data.  this is handy when binding
> together various C libraries with perl glue, because it avoids
> copying potentially several kilo or even megabytes of image data
> through perl for virtually no reason... but it's an evil hack, which
> is why i haven't committed it to CVS.
> 
> disclaimer:  i haven't actually tested the bindings for
> $colormap->rgb_find_color, $gc->set_rgb_foreground, or
> $gc->set_rgb_background.

ok, i only did the one i needed:
--- ./xs/GdkColor.xs.tv2	2003-07-07 14:34:52.000000000 +0200
+++ ./xs/GdkColor.xs	2003-07-07 14:43:33.000000000 +0200
@@ -49,6 +49,12 @@
     C_ARGS:
 
 
+ ## void gdk_rgb_find_color (GdkColormap *colormap, GdkColor *color)
+void
+gdk_rgb_find_color (GdkColormap *cmap, GdkColor *color)
+     ALIAS:
+	rgb_find_color = 1
+
  ## deprecated
  ## gint gdk_colormap_get_system_size (void)
 


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