GtkSharp/gnome/voidObjectAffineSVPintSignal.cs
Mike Kestner 01acd7f576 2004-05-05 Mike Kestner <mkestner@ximian.com>
* generator/Signal.cs : rmv Handle param to SignalCallback ctor calls.
	s/GtkSharp.Signal*/GLib.Signal*.
	* generator/SignalHandler.cs : rmv Handle param to ctors as it's
	redundant.  s/GtkSharp.Signal*/GLib.Signal*. Use new Connect/Disconnect
	instead of generating DllImports into libgobject directly.
	* glib/SignalArgs.cs : move the the GLib namespace.
	* glib/SignalCallback.cs : expose Connect and Disconnect methods to
	hide some pinvokes that were previously generated. Also move to the
	GLib namespace.
	gnome/*Handler.cs : update to new SignalHandler API.
	gnome/CanvasProxy.cs : ditto
	gnome/void*Signal.cs : ditto

svn path=/trunk/gtk-sharp/; revision=26778
2004-05-05 18:24:04 +00:00

57 lines
1.8 KiB
C#

// Generated File. Do not modify.
// <c> 2001-2002 Mike Kestner
namespace GtkSharp {
using System;
using System.Runtime.InteropServices;
internal delegate void voidObjectAffineSVPintDelegate(IntPtr arg0, IntPtr arg1, ref Art.SVP arg2, int arg3, int key);
internal class voidObjectAffineSVPintSignal : GLib.SignalCallback {
private static voidObjectAffineSVPintDelegate _Delegate;
private static void voidObjectAffineSVPintCallback(IntPtr arg0, IntPtr arg1, ref Art.SVP arg2, int arg3, int key)
{
if (!_Instances.Contains(key))
throw new Exception("Unexpected signal key " + key);
voidObjectAffineSVPintSignal inst = (voidObjectAffineSVPintSignal) _Instances[key];
GLib.SignalArgs args = (GLib.SignalArgs) Activator.CreateInstance (inst._argstype);
args.Args = new object[3];
if (arg1 != IntPtr.Zero) {
double[] affine = new double[6];
Marshal.Copy (arg1, affine, 0, 6);
args.Args[0] = affine;
} else {
args.Args[0] = null;
}
args.Args[1] = arg2;
args.Args[2] = arg3;
object[] argv = new object[2];
argv[0] = inst._obj;
argv[1] = args;
inst._handler.DynamicInvoke(argv);
}
[DllImport("libgobject-2.0-0.dll")] static extern void g_signal_connect_data(IntPtr obj, String name, voidObjectAffineSVPintDelegate cb, int key, IntPtr p, int flags);
public voidObjectAffineSVPintSignal(GLib.Object obj, String name, MulticastDelegate eh, Type argstype) : base(obj, eh, argstype)
{
if (_Delegate == null) {
_Delegate = new voidObjectAffineSVPintDelegate(voidObjectAffineSVPintCallback);
}
g_signal_connect_data(_obj.Handle, name, _Delegate, _key, new IntPtr(0), 0);
}
~voidObjectAffineSVPintSignal()
{
_Instances.Remove(_key);
if(_Instances.Count == 0) {
_Delegate = null;
}
}
}
}