[Gtk-sharp-list] Small patch to gdk/Drawable.custom

Randy J. Ray rjray@blackperl.com
Mon, 18 Aug 2003 23:01:04 -0700

Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

While building monodoc 0.6, along with mono 0.26, I got an error in list.cs 
when it was unable to find a prototype for Gdk.Drawable.DrawRectangle(). The 
args set for the call in question was (Gdk.GC, bool, Gdk.Rectangle). There's a 
version in gdk/Drawable.custom that has an int in the second place. More than 
likely, it would be just as right (or more so) to patch list.cs to pass an int 
instead of the bool (in fact, it's a constant "true" in that case). But since 
it does kind of make sense to permit a boolean in that place (the int is 
pretty much a bool in disguise), I offer the attached patch to gdk/Drawable.
custom, patch against gtk-sharp 0.10.

Randy J. Ray        Campbell, CA    http://www.rjray.org   rjray@blackperl.com

Silicon Valley Scale Modelers: http://www.svsm.org
Content-Type: text/x-patch; charset=us-ascii
Content-Disposition: attachment; filename="drawable.custom.patch"

*** gdk/Drawable.custom.orig	Mon Aug 18 22:31:48 2003
--- gdk/Drawable.custom	Mon Aug 18 22:32:34 2003
*** 20,25 ****
--- 20,30 ----
  	gdk_draw_rectangle(Handle, gc.Handle, filled, area.x, area.y, area.width, area.height);
+ public void DrawRectangle(Gdk.GC gc, bool filled, Gdk.Rectangle area)
+ {
+ 	gdk_draw_rectangle(Handle, gc.Handle, (filled) ? 1 : 0, area.x, area.y, area.width, area.height);
+ }
  static extern void gdk_draw_polygon(IntPtr raw, IntPtr gc, int filled, Gdk.Point[] points, int npoints);