[Gtk-sharp-list] Patch for gdk/Pixbuf.custom

Martin Willemoes Hansen mwh@sysrq.dk
Tue, 26 Aug 2003 23:36:31 +0200


--=-Kz+NOspfIBRV2o7vy6bU
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi!

I noticed that I could not compile the gdk assembly, the cause was a
missing DllImport.

Okay to commit?
-- 
Martin Willemoes Hansen

--------------------------------------------------------
E-Mail	mwh@sysrq.dk	Website	mwh.sysrq.dk
IRC     MWH, freenode.net
--------------------------------------------------------               


--=-Kz+NOspfIBRV2o7vy6bU
Content-Disposition: attachment; filename=Pixbuf.custom.diff
Content-Type: text/plain; name=Pixbuf.custom.diff; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

? Pixbuf.custom.diff
Index: Pixbuf.custom
===================================================================
RCS file: /cvs/public/gtk-sharp/gdk/Pixbuf.custom,v
retrieving revision 1.6
diff -u -r1.6 Pixbuf.custom
--- Pixbuf.custom	23 Jul 2003 17:19:18 -0000	1.6
+++ Pixbuf.custom	26 Aug 2003 21:37:00 -0000
@@ -117,6 +117,11 @@
 
 		/// <summary> GetFromDrawable Method </summary>
 		/// <remarks> To be completed </remarks>
+		[DllImport("libgdk_pixbuf-2.0-0.dll")]
+		static extern IntPtr gdk_pixbuf_get_from_drawable (IntPtr nullpointer, IntPtr src, IntPtr cmap, 
+								   int src_x, int src_y, int dest_x, int dest_y, 
+								   int width, int height);
+
 		public Gdk.Pixbuf CreateFromDrawable (Gdk.Drawable src, Gdk.Colormap cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height) {
 			IntPtr raw_ret = gdk_pixbuf_get_from_drawable((IntPtr) 0, src.Handle, cmap.Handle, src_x, src_y, dest_x, dest_y, width, height);
 			return new Pixbuf (raw_ret);

--=-Kz+NOspfIBRV2o7vy6bU--