GtkSharp/gtk/GtkSharp.GtkClipboardGetFuncNative.cs
Rachel Hestilow 69e51261af 2003-09-17 Rachel Hestilow <rachel@nullenvoid.com>
* glib/DelegateWrapper.cs: Remove 'RemoveIfNotAlive'
	and revamp the memory management to use destroy
	notification.

	* generator/CallbackGen.cs: Do not generate the call to
	RemoveIfNotAlive.

	* gtk/GtkSharp.GtkClipboardGetFuncNative,
	GtkSharp.GtkClipboardClearFuncNative: Do not call
	RemoveIfNotAlive.

svn path=/trunk/gtk-sharp/; revision=18163
2003-09-18 03:49:18 +00:00

34 lines
1 KiB
C#

namespace GtkSharp {
using System;
using System.Collections;
public delegate void GtkClipboardGetFuncNative(IntPtr clipboard, ref Gtk.SelectionData selection_data, uint info, uint obj_id);
public class GtkClipboardGetFuncWrapper : GLib.DelegateWrapper {
public void NativeCallback (IntPtr clipboard, ref Gtk.SelectionData selection_data, uint info, uint obj_id)
{
object[] _args = new object[4];
_args[0] = (Gtk.Clipboard) GLib.Object.GetObject(clipboard, false);
if (_args[0] == null)
_args[0] = new Gtk.Clipboard(clipboard);
_args[1] = selection_data;
_args[2] = info;
_args[3] = Gtk.Clipboard.clipboard_objects[obj_id];
_managed ((Gtk.Clipboard) _args[0], ref selection_data, (uint) _args[2], _args[3]);
}
public GtkClipboardGetFuncNative NativeDelegate;
protected Gtk.ClipboardGetFunc _managed;
public GtkClipboardGetFuncWrapper (Gtk.ClipboardGetFunc managed, object o) : base (o)
{
NativeDelegate = new GtkClipboardGetFuncNative (NativeCallback);
_managed = managed;
}
}
}