mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-26 05:35:40 +00:00
9ad6d1b6a4
use when the IntPtr is NULL. * generator/SignalHandler.cs, generator/CallbackGen.cs: removed call to Initialize for structs * gtk/Clipboard.custom, gtk/ClipboardClearFunc.cs, gtk/ClipboardGetFunc.cs, gtk/GtkSharp.GtkClipboardClearFuncNative.cs, gtk/GtkSharp.ClipboardGetFuncNative.cs, SelectionData.custom: Hand-wrapped selection handling stuff, along with relevant signals and the like. * gnome/voidObjectAffineSVPintSignal.cs: removed Initialize for hand-wrapped signal * sample/GnomeHelloWorld.cs, sample/Size.cs: compare against .Zero instead of using IsNull * api/gtk-api.xml, sources/Gtk.metadata: metadata updates for hiding some manually-wrapped stuff svn path=/trunk/gtk-sharp/; revision=8912
32 lines
938 B
C#
32 lines
938 B
C#
|
|
namespace GtkSharp {
|
|
|
|
using System;
|
|
using System.Collections;
|
|
public delegate void GtkClipboardClearFuncNative(IntPtr clipboard, uint objid);
|
|
|
|
public class GtkClipboardClearFuncWrapper : GLib.DelegateWrapper {
|
|
|
|
public void NativeCallback (IntPtr clipboard, uint objid)
|
|
{
|
|
object[] _args = new object[2];
|
|
_args[0] = (Gtk.Clipboard) GLib.Opaque.GetOpaque(clipboard);
|
|
if (_args[0] == null)
|
|
_args[0] = new Gtk.Clipboard(clipboard);
|
|
_args[1] = Gtk.Clipboard.clipboard_objects[objid];
|
|
_managed ((Gtk.Clipboard) _args[0], _args[1]);
|
|
Gtk.Clipboard.clipboard_objects.Remove (objid);
|
|
}
|
|
|
|
public GtkClipboardClearFuncNative NativeDelegate;
|
|
protected Gtk.ClipboardClearFunc _managed;
|
|
|
|
public GtkClipboardClearFuncWrapper (Gtk.ClipboardClearFunc managed) : base ()
|
|
{
|
|
NativeDelegate = new GtkClipboardClearFuncNative (NativeCallback);
|
|
_managed = managed;
|
|
}
|
|
}
|
|
|
|
}
|