[Gtk-sharp-list] gtk_text_buffer_paste_clipboard () -related
patch
Philip Van Hoof
spamfrommailing@freax.org
24 May 2003 14:01:02 +0200
--=-xx9tTvv+2mp1gD92OTH7
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Looks like this patch works, but I suggest testing it first
On Sat, 2003-05-24 at 13:48, Philip Van Hoof wrote:
> It looks like that is not working :-\
>
> Well, the Gtk-Api tells me to pass NULL to paste at the current cursors
> position .. but how can I cast (null) to (ref Gtk.TextIter) ?
--
Philip Van Hoof a.k.a. freax
me at freax dot org
http://www.freax.be -- http://www.freax.eu.org -- http://www.freax.org
--=-xx9tTvv+2mp1gD92OTH7
Content-Disposition: attachment; filename=TextBuffer.custom.diff
Content-Type: text/x-patch; name=TextBuffer.custom.diff; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Index: TextBuffer.custom
===================================================================
RCS file: /mono/gtk-sharp/gtk/TextBuffer.custom,v
retrieving revision 1.6
diff -u -r1.6 TextBuffer.custom
--- TextBuffer.custom 16 Mar 2003 00:08:18 -0000 1.6
+++ TextBuffer.custom 24 May 2003 12:00:10 -0000
@@ -22,3 +22,13 @@
return iter;
}
+
+[DllImport("libgtk-win32-2.0-0.dll")]
+static extern void gtk_text_buffer_paste_clipboard(IntPtr raw, IntPtr clipboard, IntPtr override_location, bool default_editable);
+
+
+/// <summary> PasteClipboard Method </summary>
+/// <remarks> Pastes the contents of a clipboard at the cursor </remarks>
+public void PasteClipboard(Gtk.Clipboard clipboard, bool default_editable) {
+ gtk_text_buffer_paste_clipboard(Handle, clipboard.Handle, IntPtr.Zero, default_editable);
+}
--=-xx9tTvv+2mp1gD92OTH7--