diff --git a/ChangeLog b/ChangeLog index 2a7732fcb..78058f415 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,56 @@ +2004-12-21 Dan Winship + + * generator/CallbackGen.cs: + * generator/CodeGenerator.cs: + * generator/ManagedCallString.cs: + * generator/Property.cs: Remove unused vars + + * generator/Method.cs (GetHashCode): have to implement this since + we're overriding Equals. + + * generator/CallbackGen.cs: print a message when generating a + broken struct-returning callback. (Currently affects + GtkSharp.TextSegSplitFuncNative and + GtkSharp.TextSegCleanupFuncNative) + + * gdk/glue/device.c: + * gdk/glue/dragcontext.c: Add missing prototypes + + * gtk/Gtk.metadata: Mark SeparatorToolItem.Draw "new". Re-rename + CheckMenuItem.Toggled to EmitToggled rather than Toggle, since + that's a better description of what it does. + + * gtk/CheckMenuItem.custom: implement a "Toggle" method that does + what the documentation claims it does. + + * gtk/NodeStore.cs: remove unused var + + * gnome/Gnome.metadata: mark DateEdit.Flags, Dialog.Default, and + PropertyBox.State "new". Hide GnomePixmapEntry.GnomeEntry and + GnomePixmapEntry.GtkEntry since they do exactly the same thing as + the methods of the same names inherited from GnomeFileEntry. + + * gnome/glue/canvas-proxy.c: + * gnome/glue/canvas-proxy.h: + * gnome/glue/canvas-proxy-marshal.c: + * gnome/glue/canvas-proxy-marshal.h: + * gnome/glue/canvas-proxy-marshal.list: Remove unused code + + * gnome/glue/Makefile.am (libgnomesharpglue_2_la_SOURCES): update + + * panelapplet/PanelApplet.metadata: mark PanelApplet.Flags "new" + + * sample/CanvasExample.cs: + * sample/CustomCellRenderer.cs: + * sample/CustomNotebook.cs: + * sample/DrawingSample.cs: + * sample/Fifteen.cs: + * sample/GladeTest.cs: + * sample/GtkDemo/DemoHyperText.cs: + * sample/GtkDemo/DemoPixbuf.cs: + * sample/ScribbleXInput.cs: remove unused vars, use + GLib.Timeout.Add rather than the deprecated Gtk.Timeout.Add + 2004-12-21 Jeroen Zwartepoorte * gnomevfs/Async.cs: diff --git a/doc/ChangeLog b/doc/ChangeLog index 346fde62f..1e2f1f88d 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,11 @@ +2004-12-21 Dan Winship + + * en/Gtk/CheckMenuItem.xml (EmitToggled): document + + * en/Gnome/PixmapEntry.xml (GnomeEntry, GtkEntry): gone (sort of) + + * updater/updater.cs: remove unused vars + 2004-12-21 Jeroen Zwartepoorte * en/Gnome.Vfs.xml: diff --git a/doc/en/Gnome/PixmapEntry.xml b/doc/en/Gnome/PixmapEntry.xml index e9e4f2c68..be5c5bed4 100644 --- a/doc/en/Gnome/PixmapEntry.xml +++ b/doc/en/Gnome/PixmapEntry.xml @@ -218,32 +218,6 @@ Chain to this constructor if you have manually registered a native value for your subclass. - - - Method - - Gtk.Widget - - - - To be added - a - To be added - - - - - Method - - Gtk.Widget - - - - To be added - a - To be added - - Method diff --git a/doc/en/Gtk/CheckMenuItem.xml b/doc/en/Gtk/CheckMenuItem.xml index 7e19a24b1..d995e70da 100644 --- a/doc/en/Gtk/CheckMenuItem.xml +++ b/doc/en/Gtk/CheckMenuItem.xml @@ -217,5 +217,17 @@ To be added + + + Method + + System.Void + + + + Emits the "toggle" signal + + + \ No newline at end of file diff --git a/doc/updater/updater.cs b/doc/updater/updater.cs index cf0005782..2573d635c 100644 --- a/doc/updater/updater.cs +++ b/doc/updater/updater.cs @@ -1192,7 +1192,6 @@ class Updater { sb.Append ('('); int i = 0; - string modifier; foreach (ParameterInfo parameter in pi) { bool isPointer = false; if (parameter.ParameterType.IsByRef) { @@ -1214,7 +1213,6 @@ class Updater { string GetParameterModifier (ParameterInfo parameter) { - int a = (int) parameter.Attributes; if (parameter.IsOut) return "out "; diff --git a/gdk/glue/device.c b/gdk/glue/device.c index 22e7f4442..82b362e1d 100644 --- a/gdk/glue/device.c +++ b/gdk/glue/device.c @@ -31,6 +31,8 @@ gint gtksharp_gdk_device_get_num_axes (GdkDevice *device); gint gtksharp_gdk_device_get_num_keys (GdkDevice *device); GdkDeviceAxis* gtksharp_gdk_device_get_axes (GdkDevice *device); GdkDeviceKey* gtksharp_gdk_device_get_keys (GdkDevice *device); +GdkDeviceAxis gtksharp_gdk_device_get_device_axis (GdkDevice *device, guint i); +GdkDeviceKey gtksharp_gdk_device_get_device_key (GdkDevice *device, guint i); /* */ diff --git a/gdk/glue/dragcontext.c b/gdk/glue/dragcontext.c index 8f82e0e39..a47407a62 100644 --- a/gdk/glue/dragcontext.c +++ b/gdk/glue/dragcontext.c @@ -39,6 +39,8 @@ gtksharp_drag_context_get_is_source (GdkDragContext *context) } +GdkWindow *gtksharp_drag_context_get_source_window (GdkDragContext *context); + GdkWindow * gtksharp_drag_context_get_source_window (GdkDragContext *context) { diff --git a/generator/CallbackGen.cs b/generator/CallbackGen.cs index 9bfe02fc2..0add44178 100644 --- a/generator/CallbackGen.cs +++ b/generator/CallbackGen.cs @@ -144,7 +144,6 @@ namespace GtkSharp.Generation { } string cstype = parms[i].CSType; - ClassBase parm_wrapper = table.GetClassGen (ctype); sw.Write("\t\t\t" + cstype + " _arg" + idx); if (parms[i].PassAs == "out") { sw.WriteLine(";"); @@ -174,6 +173,7 @@ namespace GtkSharp.Generation { sw.WriteLine ("(({0}) {1}).Handle;", s_ret, invoke); else if (table.IsStruct (rettype) || table.IsBoxed (rettype)) { // Shoot. I have no idea what to do here. + Console.WriteLine ("Struct return type {0} in callback {1}", rettype, CName); sw.WriteLine ("IntPtr.Zero;"); } else if (table.IsEnum (rettype)) sw.WriteLine ("(int) {0};", invoke); diff --git a/generator/CodeGenerator.cs b/generator/CodeGenerator.cs index 810caf05f..27ab922e3 100644 --- a/generator/CodeGenerator.cs +++ b/generator/CodeGenerator.cs @@ -36,7 +36,6 @@ namespace GtkSharp.Generation { } bool generate = false; - bool include = false; string dir = ""; string custom_dir = ""; string assembly_name = ""; @@ -48,30 +47,28 @@ namespace GtkSharp.Generation { foreach (string arg in args) { if (arg == "--generate") { generate = true; - include = false; continue; } else if (arg == "--include") { generate = false; - include = true; continue; } else if (arg.StartsWith ("--outdir=")) { - include = generate = false; + generate = false; dir = arg.Substring (9); continue; } else if (arg.StartsWith ("--customdir=")) { - include = generate = false; + generate = false; custom_dir = arg.Substring (12); continue; } else if (arg.StartsWith ("--assembly-name=")) { - include = generate = false; + generate = false; assembly_name = arg.Substring (16); continue; } else if (arg.StartsWith ("--glue-filename=")) { - include = generate = false; + generate = false; glue_filename = arg.Substring (16); continue; } else if (arg.StartsWith ("--gluelib-name=")) { - include = generate = false; + generate = false; gluelib_name = arg.Substring (15); continue; } diff --git a/generator/ManagedCallString.cs b/generator/ManagedCallString.cs index 90be9febc..025df45f7 100644 --- a/generator/ManagedCallString.cs +++ b/generator/ManagedCallString.cs @@ -57,7 +57,6 @@ namespace GtkSharp.Generation { Parameter p = parms [i] as Parameter; IGeneratable igen = p.Generatable; - string pass_as = igen is StructGen ? "ref" : p.PassAs; ret += indent + igen.QualifiedName + " my" + p.Name; if (igen is StructGen || p.PassAs == "ref") diff --git a/generator/Method.cs b/generator/Method.cs index 5ecc2ee2b..7c255678d 100644 --- a/generator/Method.cs +++ b/generator/Method.cs @@ -158,6 +158,11 @@ namespace GtkSharp.Generation { return (a.Signature.Types == b.Signature.Types); } + public override int GetHashCode () + { + return Name.GetHashCode () ^ (Signature == null ? 0 : Signature.Types.GetHashCode ()); + } + private bool Initialize () { if (initialized) diff --git a/generator/Property.cs b/generator/Property.cs index 140681a8a..736776de0 100644 --- a/generator/Property.cs +++ b/generator/Property.cs @@ -83,7 +83,6 @@ namespace GtkSharp.Generation { if (elem.HasAttribute("new_flag") || (container_type.Parent != null && container_type.Parent.GetPropertyRecursively (Name) != null)) modifiers = "new "; - XmlElement parent = (XmlElement) elem.ParentNode; string name = Name; if (name == container_type.Name) { name += "Prop"; diff --git a/generator/Signal.cs b/generator/Signal.cs index 1ed4c2275..76a4dc763 100644 --- a/generator/Signal.cs +++ b/generator/Signal.cs @@ -145,6 +145,13 @@ namespace GtkSharp.Generation { } } + private bool NeedNew (ClassBase implementor) + { + return elem.HasAttribute ("new_flag") || + (container_type != null && container_type.GetSignalRecursively (Name) != null) || + (implementor != null && implementor.GetSignalRecursively (Name) != null); + } + public void GenEventHandler (GenerationInfo gen_info) { if (EventHandlerName == "EventHandler") @@ -188,7 +195,10 @@ namespace GtkSharp.Generation { { VMSignature vmsig = new VMSignature (parms); sw.WriteLine ("\t\t[GLib.DefaultSignalHandler(Type=typeof(" + (implementor != null ? implementor.QualifiedName : container_type.QualifiedName) + "), ConnectionMethod=\"Override" + Name +"\")]"); - sw.WriteLine ("\t\tprotected virtual {0} {1} ({2})", retval.CSType, "On" + Name, vmsig.ToString ()); + sw.WriteLine ("\t\tprotected "); + if (NeedNew (implementor)) + sw.WriteLine ("new "); + sw.WriteLine ("virtual {0} {1} ({2})", retval.CSType, "On" + Name, vmsig.ToString ()); sw.WriteLine ("\t\t{"); if (IsVoid) sw.WriteLine ("\t\t\tGLib.Value ret = GLib.Value.Empty;"); @@ -261,7 +271,7 @@ namespace GtkSharp.Generation { sw.WriteLine("\t\t[GLib.Signal("+ cname + ")]"); sw.Write("\t\tpublic "); - if (elem.HasAttribute("new_flag") || (container_type != null && container_type.GetSignalRecursively (Name) != null) || (implementor != null && implementor.GetSignalRecursively (Name) != null)) + if (NeedNew (implementor)) sw.Write("new "); sw.WriteLine("event " + EventHandlerQualifiedName + " " + Name + " {"); sw.WriteLine("\t\t\tadd {"); diff --git a/gnome/Gnome.metadata b/gnome/Gnome.metadata index 353a40611..5f61deb48 100644 --- a/gnome/Gnome.metadata +++ b/gnome/Gnome.metadata @@ -4,6 +4,7 @@ dateedit_flags time 1 + 1 1 const-gchar* const-gchar* @@ -54,6 +55,7 @@ Disconnected 1 1 + 1 1 out 1 @@ -99,6 +101,8 @@ IconSelected IconUnselected 1 + 1 + 1 const-gchar* gchar* const-gchar* @@ -108,6 +112,7 @@ const-gchar* GObject GObject + 1 const-gchar* CurveTo LineTo diff --git a/gnome/glue/Makefile.am b/gnome/glue/Makefile.am index 23546bc1d..4bda78a20 100644 --- a/gnome/glue/Makefile.am +++ b/gnome/glue/Makefile.am @@ -12,10 +12,6 @@ libgnomesharpglue_2_la_SOURCES = \ canvas.c \ canvasitem.c \ canvaspoints.c \ - canvas-proxy.c \ - canvas-proxy.h \ - canvas-proxy-marshal.c \ - canvas-proxy-marshal.h \ program.c \ # diff --git a/gnome/glue/canvas-proxy-marshal.c b/gnome/glue/canvas-proxy-marshal.c deleted file mode 100644 index 878c175b9..000000000 --- a/gnome/glue/canvas-proxy-marshal.c +++ /dev/null @@ -1,264 +0,0 @@ - -#include - - -#ifdef G_ENABLE_DEBUG -#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) -#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) -#define g_marshal_value_peek_int(v) g_value_get_int (v) -#define g_marshal_value_peek_uint(v) g_value_get_uint (v) -#define g_marshal_value_peek_long(v) g_value_get_long (v) -#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) -#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) -#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) -#define g_marshal_value_peek_enum(v) g_value_get_enum (v) -#define g_marshal_value_peek_flags(v) g_value_get_flags (v) -#define g_marshal_value_peek_float(v) g_value_get_float (v) -#define g_marshal_value_peek_double(v) g_value_get_double (v) -#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) -#define g_marshal_value_peek_param(v) g_value_get_param (v) -#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) -#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) -#define g_marshal_value_peek_object(v) g_value_get_object (v) -#else /* !G_ENABLE_DEBUG */ -/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. - * Do not access GValues directly in your code. Instead, use the - * g_value_get_*() functions - */ -#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int -#define g_marshal_value_peek_char(v) (v)->data[0].v_int -#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint -#define g_marshal_value_peek_int(v) (v)->data[0].v_int -#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint -#define g_marshal_value_peek_long(v) (v)->data[0].v_long -#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong -#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 -#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 -#define g_marshal_value_peek_enum(v) (v)->data[0].v_int -#define g_marshal_value_peek_flags(v) (v)->data[0].v_uint -#define g_marshal_value_peek_float(v) (v)->data[0].v_float -#define g_marshal_value_peek_double(v) (v)->data[0].v_double -#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer -#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer -#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer -#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer -#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer -#endif /* !G_ENABLE_DEBUG */ - - -/* VOID:OBJECT,POINTER,POINTER,INT (canvas-proxy-marshal.list:1) */ -void -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_POINTER_POINTER_INT) (gpointer data1, - gpointer arg_1, - gpointer arg_2, - gpointer arg_3, - gint arg_4, - gpointer data2); - register GMarshalFunc_VOID__OBJECT_POINTER_POINTER_INT callback; - register GCClosure *cc = (GCClosure*) closure; - register gpointer data1, data2; - - g_return_if_fail (n_param_values == 5); - - if (G_CCLOSURE_SWAP_DATA (closure)) - { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } - else - { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - 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_pointer (param_values + 2), - g_marshal_value_peek_pointer (param_values + 3), - g_marshal_value_peek_int (param_values + 4), - data2); -} - -/* DOUBLE:OBJECT,DOUBLE,DOUBLE,INT,INT,POINTER (canvas-proxy-marshal.list:2) */ -void -g_cclosure_user_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_INT_INT_POINTER (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef gdouble (*GMarshalFunc_DOUBLE__OBJECT_DOUBLE_DOUBLE_INT_INT_POINTER) (gpointer data1, - gpointer arg_1, - gdouble arg_2, - gdouble arg_3, - gint arg_4, - gint arg_5, - gpointer arg_6, - gpointer data2); - register GMarshalFunc_DOUBLE__OBJECT_DOUBLE_DOUBLE_INT_INT_POINTER callback; - register GCClosure *cc = (GCClosure*) closure; - register gpointer data1, data2; - gdouble v_return; - - g_return_if_fail (return_value != NULL); - g_return_if_fail (n_param_values == 7); - - if (G_CCLOSURE_SWAP_DATA (closure)) - { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } - else - { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - callback = (GMarshalFunc_DOUBLE__OBJECT_DOUBLE_DOUBLE_INT_INT_POINTER) (marshal_data ? marshal_data : cc->callback); - - v_return = callback (data1, - g_marshal_value_peek_object (param_values + 1), - g_marshal_value_peek_double (param_values + 2), - g_marshal_value_peek_double (param_values + 3), - g_marshal_value_peek_int (param_values + 4), - g_marshal_value_peek_int (param_values + 5), - g_marshal_value_peek_pointer (param_values + 6), - data2); - - g_value_set_double (return_value, v_return); -} - -/* VOID:OBJECT,POINTER,POINTER,POINTER,POINTER (canvas-proxy-marshal.list:3) */ -void -g_cclosure_user_marshal_VOID__OBJECT_POINTER_POINTER_POINTER_POINTER (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__OBJECT_POINTER_POINTER_POINTER_POINTER) (gpointer data1, - gpointer arg_1, - gpointer arg_2, - gpointer arg_3, - gpointer arg_4, - gpointer arg_5, - gpointer data2); - register GMarshalFunc_VOID__OBJECT_POINTER_POINTER_POINTER_POINTER callback; - register GCClosure *cc = (GCClosure*) closure; - register gpointer data1, data2; - - g_return_if_fail (n_param_values == 6); - - if (G_CCLOSURE_SWAP_DATA (closure)) - { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } - else - { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__OBJECT_POINTER_POINTER_POINTER_POINTER) (marshal_data ? marshal_data : cc->callback); - - callback (data1, - g_marshal_value_peek_object (param_values + 1), - g_marshal_value_peek_pointer (param_values + 2), - g_marshal_value_peek_pointer (param_values + 3), - g_marshal_value_peek_pointer (param_values + 4), - g_marshal_value_peek_pointer (param_values + 5), - data2); -} - -/* VOID:OBJECT,INT,INT,INT,INT (canvas-proxy-marshal.list:4) */ -void -g_cclosure_user_marshal_VOID__OBJECT_INT_INT_INT_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_INT_INT_INT_INT) (gpointer data1, - gpointer arg_1, - gint arg_2, - gint arg_3, - gint arg_4, - gint arg_5, - gpointer data2); - register GMarshalFunc_VOID__OBJECT_INT_INT_INT_INT callback; - register GCClosure *cc = (GCClosure*) closure; - register gpointer data1, data2; - - g_return_if_fail (n_param_values == 6); - - if (G_CCLOSURE_SWAP_DATA (closure)) - { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } - else - { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__OBJECT_INT_INT_INT_INT) (marshal_data ? marshal_data : cc->callback); - - callback (data1, - g_marshal_value_peek_object (param_values + 1), - g_marshal_value_peek_int (param_values + 2), - g_marshal_value_peek_int (param_values + 3), - g_marshal_value_peek_int (param_values + 4), - g_marshal_value_peek_int (param_values + 5), - data2); -} - -/* POINTER:OBJECT (canvas-proxy-marshal.list:5) */ -void -g_cclosure_user_marshal_POINTER__OBJECT (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef gpointer (*GMarshalFunc_POINTER__OBJECT) (gpointer data1, - gpointer arg_1, - gpointer data2); - register GMarshalFunc_POINTER__OBJECT callback; - register GCClosure *cc = (GCClosure*) closure; - register gpointer data1, data2; - gpointer v_return; - - g_return_if_fail (return_value != NULL); - g_return_if_fail (n_param_values == 2); - - if (G_CCLOSURE_SWAP_DATA (closure)) - { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } - else - { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - callback = (GMarshalFunc_POINTER__OBJECT) (marshal_data ? marshal_data : cc->callback); - - v_return = callback (data1, - g_marshal_value_peek_object (param_values + 1), - data2); - - g_value_set_pointer (return_value, v_return); -} - diff --git a/gnome/glue/canvas-proxy-marshal.h b/gnome/glue/canvas-proxy-marshal.h deleted file mode 100644 index 21d6a2976..000000000 --- a/gnome/glue/canvas-proxy-marshal.h +++ /dev/null @@ -1,52 +0,0 @@ - -#ifndef __g_cclosure_user_marshal_MARSHAL_H__ -#define __g_cclosure_user_marshal_MARSHAL_H__ - -#include - -G_BEGIN_DECLS - -/* 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, - gpointer invocation_hint, - gpointer marshal_data); - -/* DOUBLE:OBJECT,DOUBLE,DOUBLE,INT,INT,POINTER (canvas-proxy-marshal.list:2) */ -extern void g_cclosure_user_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_INT_INT_POINTER (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); - -/* VOID:OBJECT,POINTER,POINTER,POINTER,POINTER (canvas-proxy-marshal.list:3) */ -extern void g_cclosure_user_marshal_VOID__OBJECT_POINTER_POINTER_POINTER_POINTER (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); - -/* VOID:OBJECT,INT,INT,INT,INT (canvas-proxy-marshal.list:4) */ -extern void g_cclosure_user_marshal_VOID__OBJECT_INT_INT_INT_INT (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); - -/* POINTER:OBJECT (canvas-proxy-marshal.list:5) */ -extern void g_cclosure_user_marshal_POINTER__OBJECT (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); - -G_END_DECLS - -#endif /* __g_cclosure_user_marshal_MARSHAL_H__ */ - diff --git a/gnome/glue/canvas-proxy-marshal.list b/gnome/glue/canvas-proxy-marshal.list deleted file mode 100644 index 63757c8f4..000000000 --- a/gnome/glue/canvas-proxy-marshal.list +++ /dev/null @@ -1,5 +0,0 @@ -VOID:OBJECT,POINTER,POINTER,INT -DOUBLE:OBJECT,DOUBLE,DOUBLE,INT,INT,POINTER -VOID:OBJECT,POINTER,POINTER,POINTER,POINTER -VOID:OBJECT,INT,INT,INT,INT -POINTER:OBJECT diff --git a/gnome/glue/canvas-proxy.c b/gnome/glue/canvas-proxy.c deleted file mode 100644 index b5c3ed840..000000000 --- a/gnome/glue/canvas-proxy.c +++ /dev/null @@ -1,156 +0,0 @@ -/* - * canvasproxy.c - glue functions for creating C# CanvasItems - * - * Author: Duncan Mak (duncan@ximian.com) - * - * Copyright (C), 2002. Ximian, Inc. - * - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the Lesser GNU General - * Public License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -#include "canvas-proxy.h" -#include "canvas-proxy-marshal.h" - -enum { - UPDATE, - REALIZE, - UNREALIZE, - MAP, - UNMAP, - COVERAGE, - DRAW, - RENDER, - POINT, - BOUNDS, - LAST_SIGNAL, -}; - -static GnomeCanvasItemClass *parent_class; - -static guint proxy_signals [LAST_SIGNAL]; - -/* Class initialization */ -static void -gtksharp_canvas_proxy_class_init (CanvasProxyClass *class) -{ - GObjectClass *gobject_class; - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - gobject_class = (GObjectClass *) class; - object_class = (GtkObjectClass *) class; - item_class = (GnomeCanvasItemClass *) class; - - parent_class = g_type_class_peek_parent (class); - - /* void (* update) (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags); */ - proxy_signals [UPDATE] = g_signal_new ("update", - G_TYPE_FROM_CLASS (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GnomeCanvasItemClass, update), - NULL, NULL, - 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); */ - proxy_signals [REALIZE] = g_signal_new ("realize", - G_TYPE_FROM_CLASS (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GnomeCanvasItemClass, realize), - NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, 0); - - /* void (* unrealize) (GnomeCanvasItem *item); */ - proxy_signals [UNREALIZE] = g_signal_new ("unrealize", - G_TYPE_FROM_CLASS (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GnomeCanvasItemClass, unrealize), - NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, 0); - - /* void (* map) (GnomeCanvasItem *item); */ - proxy_signals [MAP] = g_signal_new ("map", - G_TYPE_FROM_CLASS (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GnomeCanvasItemClass, map), - NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, 0); - - /* void (* unmap) (GnomeCanvasItem *item); */ - proxy_signals [UNMAP] = g_signal_new ("unmap", - G_TYPE_FROM_CLASS (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GnomeCanvasItemClass, unmap), - NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, 0); - - /* ArtUta *(* coverage) (GnomeCanvasItem *item); */ - proxy_signals [COVERAGE] = g_signal_new ("coverage", - G_TYPE_FROM_CLASS (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GnomeCanvasItemClass, coverage), - NULL, NULL, - g_cclosure_user_marshal_POINTER__OBJECT, - G_TYPE_POINTER, 0); - - /* void (* draw) (GnomeCanvasItem *item, GdkDrawable *drawable, */ - /* int x, int y, int width, int height); */ - proxy_signals [DRAW] = g_signal_new ("draw", - G_TYPE_FROM_CLASS (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GnomeCanvasItemClass, draw), - NULL, NULL, - g_cclosure_user_marshal_VOID__OBJECT_INT_INT_INT_INT, - G_TYPE_NONE, 5, GDK_TYPE_DRAWABLE, - G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT); - - /* void (* render) (GnomeCanvasItem *item, GnomeCanvasBuf *buf); */ - proxy_signals [RENDER] = g_signal_new ("render", - G_TYPE_FROM_CLASS (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GnomeCanvasItemClass, render), - NULL, NULL, - g_cclosure_marshal_VOID__POINTER, - G_TYPE_NONE, 1, G_TYPE_POINTER); - - /* double (* point) (GnomeCanvasItem *item, double x, double y, int cx, int cy, */ - /* GnomeCanvasItem **actual_item); */ - proxy_signals [POINT] = g_signal_new ("point", - G_TYPE_FROM_CLASS (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GnomeCanvasItemClass, point), - NULL, NULL, - g_cclosure_user_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_INT_INT_POINTER, - G_TYPE_DOUBLE, 5, G_TYPE_DOUBLE, G_TYPE_DOUBLE, - G_TYPE_INT, G_TYPE_INT, G_TYPE_POINTER); - - /* void (* bounds) (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2); */ - proxy_signals [BOUNDS] = g_signal_new ("bounds", - G_TYPE_FROM_CLASS (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GnomeCanvasItemClass, bounds), - NULL, NULL, - g_cclosure_user_marshal_VOID__OBJECT_POINTER_POINTER_POINTER_POINTER, - G_TYPE_NONE, 4, G_TYPE_POINTER, G_TYPE_POINTER, - G_TYPE_POINTER, G_TYPE_POINTER); -} diff --git a/gnome/glue/canvas-proxy.h b/gnome/glue/canvas-proxy.h deleted file mode 100644 index d7c486d2c..000000000 --- a/gnome/glue/canvas-proxy.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * canvasproxy.h - * - * Author: Duncan Mak (duncan@ximian.com) - * - * Copyright (C), 2002. Ximian, Inc. - * - */ - -#ifndef CANVAS_PROXY_H -#define CANVAS_PROXY_H - -#include - -G_BEGIN_DECLS - -typedef struct _CanvasProxy CanvasProxy; -typedef struct _CanvasProxyClass CanvasProxyClass; - -struct _CanvasProxy { - GnomeCanvasItem item; -}; - -struct _CanvasProxyClass { - GnomeCanvasItemClass parent; -}; - -G_END_DECLS - -#endif diff --git a/gtk/CheckMenuItem.custom b/gtk/CheckMenuItem.custom index 953807139..9a9088a20 100644 --- a/gtk/CheckMenuItem.custom +++ b/gtk/CheckMenuItem.custom @@ -38,3 +38,8 @@ Raw = gtk_check_menu_item_new_with_mnemonic (label); } + + public new void Toggle() { + Active = !Active; + } + diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index f29e81109..b99fc2deb 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -126,7 +126,7 @@ 1 1 1 - Toggle + EmitToggled 1 1 out @@ -256,6 +256,7 @@ 1 1 out + 1 1 1 1 diff --git a/gtk/NodeStore.cs b/gtk/NodeStore.cs index fd343729c..7bc99ec3b 100644 --- a/gtk/NodeStore.cs +++ b/gtk/NodeStore.cs @@ -281,7 +281,6 @@ namespace Gtk { void ScanType (Type type) { - object[] attrs = type.GetCustomAttributes (false); foreach (TreeNodeAttribute attr in type.GetCustomAttributes (typeof (TreeNodeAttribute), false)) n_cols = attr.ColumnCount; diff --git a/panelapplet/PanelApplet.metadata b/panelapplet/PanelApplet.metadata index dd5c2c996..3f1df03f2 100644 --- a/panelapplet/PanelApplet.metadata +++ b/panelapplet/PanelApplet.metadata @@ -3,5 +3,7 @@ 1 1 1 + 1 + 1 1 diff --git a/sample/CanvasExample.cs b/sample/CanvasExample.cs index 2fe09f42e..32cee759a 100644 --- a/sample/CanvasExample.cs +++ b/sample/CanvasExample.cs @@ -158,7 +158,7 @@ namespace GtkSamples { { Application.Init (); - CanvasExample example = new CanvasExample (); + new CanvasExample (); Application.Run (); return 0; diff --git a/sample/CustomCellRenderer.cs b/sample/CustomCellRenderer.cs index 06c5e64dd..d261c33df 100644 --- a/sample/CustomCellRenderer.cs +++ b/sample/CustomCellRenderer.cs @@ -110,7 +110,7 @@ public class Driver : Gtk.Window this.Add (view); this.ShowAll (); - Gtk.Timeout.Add (50, new Gtk.Function (update_percent)); + GLib.Timeout.Add (50, new GLib.TimeoutHandler (update_percent)); } bool increasing = true; diff --git a/sample/CustomNotebook.cs b/sample/CustomNotebook.cs index dde92e34e..c0e2a5892 100644 --- a/sample/CustomNotebook.cs +++ b/sample/CustomNotebook.cs @@ -502,7 +502,6 @@ class CustomNotebook : Container { int count = pages.Count; foreach (CustomNotebookPage page in pages) { - Gdk.Rectangle pageAlloc = page.Allocation; if (page.Requisition.Width <= avgWidth) { count--; tabWidth -= page.Requisition.Width; diff --git a/sample/DrawingSample.cs b/sample/DrawingSample.cs index c2d213524..6560ce5bb 100644 --- a/sample/DrawingSample.cs +++ b/sample/DrawingSample.cs @@ -75,9 +75,6 @@ class PrettyGraphic : DrawingArea { protected override bool OnExposeEvent (Gdk.EventExpose args) { - Gdk.Window win = args.Window; - Gdk.Rectangle area = args.Area; - using (Graphics g = Gdk.Graphics.FromDrawable (args.Window)){ Pen p = new Pen (Color.Blue, 1.0f); @@ -95,7 +92,7 @@ class MovingText : DrawingArea { public MovingText () { - Gtk.Timeout.Add (20, new Function (Forever)); + GLib.Timeout.Add (20, new GLib.TimeoutHandler (Forever)); SetSizeRequest (300, 200); f = new Font ("Times", 20); } @@ -108,9 +105,6 @@ class MovingText : DrawingArea { protected override bool OnExposeEvent (Gdk.EventExpose args) { - Gdk.Window win = args.Window; - Gdk.Rectangle area = args.Area; - using (Graphics g = Gdk.Graphics.FromDrawable (args.Window)){ using (Brush back = new SolidBrush (Color.White), fore = new SolidBrush (Color.Red)){ diff --git a/sample/Fifteen.cs b/sample/Fifteen.cs index a71155b65..cde861557 100644 --- a/sample/Fifteen.cs +++ b/sample/Fifteen.cs @@ -134,7 +134,6 @@ public class Fifteen static void Scramble (object o, EventArgs args) { Random rand = new Random (); - int blank; int position; // find blank spot diff --git a/sample/GladeTest.cs b/sample/GladeTest.cs index 761a9c742..062fe9a8a 100644 --- a/sample/GladeTest.cs +++ b/sample/GladeTest.cs @@ -19,7 +19,7 @@ namespace GladeSamples { { Application.Init (); - GladeTest gt = new GladeTest (); + new GladeTest (); Application.Run (); } diff --git a/sample/GtkDemo/DemoHyperText.cs b/sample/GtkDemo/DemoHyperText.cs index d48cf2dbd..e791e799d 100644 --- a/sample/GtkDemo/DemoHyperText.cs +++ b/sample/GtkDemo/DemoHyperText.cs @@ -39,9 +39,6 @@ namespace GtkDemo TextView CreateTextView () { - TextTagTable ttt = new TextTagTable (); - TextBuffer buffer = new TextBuffer (ttt); - TextView view = new TextView (); view.WrapMode = WrapMode.Word; view.KeyPressEvent += new KeyPressEventHandler (OnKeyPress); diff --git a/sample/GtkDemo/DemoPixbuf.cs b/sample/GtkDemo/DemoPixbuf.cs index 96d297ea8..cba0bc8d9 100644 --- a/sample/GtkDemo/DemoPixbuf.cs +++ b/sample/GtkDemo/DemoPixbuf.cs @@ -77,9 +77,7 @@ namespace GtkDemo // Expose callback for the drawing area void Expose (object o, ExposeEventArgs args) { - EventExpose ev = args.Event; Widget widget = (Widget) o; - Gdk.Rectangle area = ev.Area; frame.RenderToDrawableAlpha( widget.GdkWindow, diff --git a/sample/ScribbleXInput.cs b/sample/ScribbleXInput.cs index d975426af..9b21ea6e4 100644 --- a/sample/ScribbleXInput.cs +++ b/sample/ScribbleXInput.cs @@ -153,7 +153,7 @@ namespace GtkSamples { Gdk.EventMotion ev = args.Event; Widget widget = (Widget) obj; if ((ev.State & Gdk.ModifierType.Button1Mask) != 0 && pixmap != null) { - double x,y,pressure; + double pressure; if (!ev.Device.GetAxis (ev.Axes, AxisUse.Pressure, out pressure)) { pressure = 0.5; }