2002-09-29 Rachel Hestilow <hestilow@ximian.com>
* glue/canvas-proxy.c (update), glue/canvas-proxy-marshal.list: Marshal the array as a pointer for now. * gnome/voidObjectAffineSVPintSignal.cs: Added. * gnome/CanvasProxy.cs (Update): Use a custom signal handler. svn path=/trunk/gtk-sharp/; revision=7892
This commit is contained in:
parent
aa0ae0c644
commit
801634a502
7 changed files with 96 additions and 27 deletions
|
@ -1,3 +1,11 @@
|
|||
2002-09-29 Rachel Hestilow <hestilow@ximian.com>
|
||||
|
||||
* glue/canvas-proxy.c (update), glue/canvas-proxy-marshal.list:
|
||||
Marshal the array as a pointer for now.
|
||||
|
||||
* gnome/voidObjectAffineSVPintSignal.cs: Added.
|
||||
* gnome/CanvasProxy.cs (Update): Use a custom signal handler.
|
||||
|
||||
2002-09-23 Miguel de Icaza <miguel@ximian.com>
|
||||
|
||||
* gtk/Style.custom: bind it.
|
||||
|
|
|
@ -47,22 +47,22 @@
|
|||
#endif /* !G_ENABLE_DEBUG */
|
||||
|
||||
|
||||
/* VOID:OBJECT,DOUBLE,POINTER,INT (canvas-proxy-marshal.list:1) */
|
||||
/* VOID:OBJECT,POINTER,POINTER,INT (canvas-proxy-marshal.list:1) */
|
||||
void
|
||||
g_cclosure_user_marshal_VOID__OBJECT_DOUBLE_POINTER_INT (GClosure *closure,
|
||||
g_cclosure_user_marshal_VOID__OBJECT_POINTER_POINTER_INT (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data)
|
||||
{
|
||||
typedef void (*GMarshalFunc_VOID__OBJECT_DOUBLE_POINTER_INT) (gpointer data1,
|
||||
typedef void (*GMarshalFunc_VOID__OBJECT_POINTER_POINTER_INT) (gpointer data1,
|
||||
gpointer arg_1,
|
||||
gdouble arg_2,
|
||||
gpointer arg_2,
|
||||
gpointer arg_3,
|
||||
gint arg_4,
|
||||
gpointer data2);
|
||||
register GMarshalFunc_VOID__OBJECT_DOUBLE_POINTER_INT callback;
|
||||
register GMarshalFunc_VOID__OBJECT_POINTER_POINTER_INT callback;
|
||||
register GCClosure *cc = (GCClosure*) closure;
|
||||
register gpointer data1, data2;
|
||||
|
||||
|
@ -78,11 +78,11 @@ g_cclosure_user_marshal_VOID__OBJECT_DOUBLE_POINTER_INT (GClosure *closure,
|
|||
data1 = g_value_peek_pointer (param_values + 0);
|
||||
data2 = closure->data;
|
||||
}
|
||||
callback = (GMarshalFunc_VOID__OBJECT_DOUBLE_POINTER_INT) (marshal_data ? marshal_data : cc->callback);
|
||||
callback = (GMarshalFunc_VOID__OBJECT_POINTER_POINTER_INT) (marshal_data ? marshal_data : cc->callback);
|
||||
|
||||
callback (data1,
|
||||
g_marshal_value_peek_object (param_values + 1),
|
||||
g_marshal_value_peek_double (param_values + 2),
|
||||
g_marshal_value_peek_pointer (param_values + 2),
|
||||
g_marshal_value_peek_pointer (param_values + 3),
|
||||
g_marshal_value_peek_int (param_values + 4),
|
||||
data2);
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* VOID:OBJECT,DOUBLE,POINTER,INT (canvas-proxy-marshal.list:1) */
|
||||
extern void g_cclosure_user_marshal_VOID__OBJECT_DOUBLE_POINTER_INT (GClosure *closure,
|
||||
/* VOID:OBJECT,POINTER,POINTER,INT (canvas-proxy-marshal.list:1) */
|
||||
extern void g_cclosure_user_marshal_VOID__OBJECT_POINTER_POINTER_INT (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
VOID:OBJECT,DOUBLE,POINTER,INT
|
||||
VOID:OBJECT,POINTER,POINTER,INT
|
||||
DOUBLE:OBJECT,DOUBLE,DOUBLE,INT,INT,POINTER
|
||||
VOID:OBJECT,POINTER,POINTER,POINTER,POINTER
|
||||
VOID:OBJECT,INT,INT,INT,INT
|
||||
|
|
|
@ -50,8 +50,8 @@ gtksharp_canvas_proxy_class_init (CanvasProxyClass *class)
|
|||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GnomeCanvasItemClass, update),
|
||||
NULL, NULL,
|
||||
g_cclosure_user_marshal_VOID__OBJECT_DOUBLE_POINTER_INT,
|
||||
G_TYPE_NONE, 3, G_TYPE_DOUBLE,
|
||||
g_cclosure_user_marshal_VOID__OBJECT_POINTER_POINTER_INT,
|
||||
G_TYPE_NONE, 3, G_TYPE_POINTER,
|
||||
G_TYPE_POINTER, G_TYPE_INT);
|
||||
|
||||
/* void (* realize) (GnomeCanvasItem *item); */
|
||||
|
|
|
@ -26,7 +26,9 @@ namespace Gnome {
|
|||
|
||||
public event GtkSharp.UpdateHandler Update {
|
||||
add {
|
||||
throw new NotImplementedException ();
|
||||
if (EventList["update"] == null)
|
||||
Signals["update"] = new GtkSharp.Gnome.voidObjectAffineSVPintSignal(this, Handle, "update", value, System.Type.GetType("EventArgs"));
|
||||
EventList.AddHandler("update", value);
|
||||
}
|
||||
|
||||
remove {
|
||||
|
|
59
gnome/voidObjectAffineSVPintSignal.cs
Normal file
59
gnome/voidObjectAffineSVPintSignal.cs
Normal file
|
@ -0,0 +1,59 @@
|
|||
// Generated File. Do not modify.
|
||||
// <c> 2001-2002 Mike Kestner
|
||||
|
||||
namespace GtkSharp {
|
||||
namespace Gnome {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public delegate void voidObjectAffineSVPintDelegate(IntPtr arg0, IntPtr arg1, ref Art.SVP arg2, int arg3, int key);
|
||||
|
||||
public class voidObjectAffineSVPintSignal : 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];
|
||||
SignalArgs args = (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;
|
||||
}
|
||||
arg2._Initialize ();
|
||||
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("gobject-2.0")] static extern void g_signal_connect_data(IntPtr obj, String name, voidObjectAffineSVPintDelegate cb, int key, IntPtr p, int flags);
|
||||
|
||||
public voidObjectAffineSVPintSignal(GLib.Object obj, IntPtr raw, String name, MulticastDelegate eh, Type argstype) : base(obj, eh, argstype)
|
||||
{
|
||||
if (_Delegate == null) {
|
||||
_Delegate = new voidObjectAffineSVPintDelegate(voidObjectAffineSVPintCallback);
|
||||
}
|
||||
g_signal_connect_data(raw, name, _Delegate, _key, new IntPtr(0), 0);
|
||||
}
|
||||
|
||||
~voidObjectAffineSVPintSignal()
|
||||
{
|
||||
_Instances.Remove(_key);
|
||||
if(_Instances.Count == 0) {
|
||||
_Delegate = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue