diff --git a/Makefile.am b/Makefile.am index ed42497db..decd152d7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = sources generator parser glib gio cairo pango atk gdk gtk gtkdotnet sample doc +SUBDIRS = sources generator parser glib gio cairo pango atk gdk gtk gtkdotnet doc EXTRA_DIST = \ gtk-sharp.snk \ diff --git a/gdk/Rectangle.cs b/gdk/Rectangle.cs index af88cd530..7620f9907 100644 --- a/gdk/Rectangle.cs +++ b/gdk/Rectangle.cs @@ -232,5 +232,12 @@ namespace Gdk { { return gdk_rectangle_intersect (ref this, ref src, out dest); } + + public static Rectangle New (IntPtr raw) + { + return (Gdk.Rectangle) Marshal.PtrToStructure (raw, typeof (Gdk.Rectangle)); + } + + public static Rectangle Zero; } } diff --git a/gio/Gio.metadata b/gio/Gio.metadata index a97dfe586..b2624075f 100644 --- a/gio/Gio.metadata +++ b/gio/Gio.metadata @@ -3,6 +3,7 @@ GLib private + GioGlobal async 1 GetCanRemoveSupportsType diff --git a/gtk/Application.cs b/gtk/Application.cs index 97e4287ca..a73abf44c 100755 --- a/gtk/Application.cs +++ b/gtk/Application.cs @@ -25,14 +25,7 @@ namespace Gtk { using System.Runtime.InteropServices; using Gdk; - public class Application { - - // - // Disables creation of instances. - // - private Application () - { - } + public partial class Application { const int WS_EX_TOOLWINDOW = 0x00000080; const int WS_OVERLAPPEDWINDOW = 0x00CF0000; diff --git a/gtk/TreeSortable.custom b/gtk/CellAreaBox.cs similarity index 52% rename from gtk/TreeSortable.custom rename to gtk/CellAreaBox.cs index d476da7fd..bd9aa6141 100644 --- a/gtk/TreeSortable.custom +++ b/gtk/CellAreaBox.cs @@ -1,13 +1,7 @@ -// Gtk.TreeSortable.Custom - Gtk TreeSortable interface customizations -// -// Author: Mike Kestner -// -// Copyright (c) 2005 Novell, Inc. -// -// This code is inserted after the automatically generated code. +// Copyright (c) 2011 Novell, 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 +// 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, @@ -20,9 +14,23 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [Obsolete ("Replaced by SetDefaultSortFunc (TreeIterCompareFunc) overload.")] - void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy); - [Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")] - void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy); +using System; + +namespace Gtk { + + public partial class CellAreaBox { + + public void SetAttributes (CellRenderer cell, params object[] attrs) + { + if (attrs.Length % 2 != 0) + throw new ArgumentException ("attrs should contain pairs of attribute/col"); + + ClearAttributes (cell); + for (int i = 0; i < attrs.Length - 1; i += 2) { + AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]); + } + } + } +} diff --git a/gtk/CellRenderer.custom b/gtk/CellRenderer.custom index 0e85e8110..2837b4960 100644 --- a/gtk/CellRenderer.custom +++ b/gtk/CellRenderer.custom @@ -39,9 +39,9 @@ [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_cell_renderer_render (IntPtr handle, IntPtr drawable, IntPtr widget, ref Gdk.Rectangle bg_area, ref Gdk.Rectangle cell_area, ref Gdk.Rectangle expose_area, int flags); - public void Render (Widget widget, Gdk.Drawable window, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, CellRendererState flags) + public void Render (Cairo.Context context, Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, CellRendererState flags) { - gtk_cell_renderer_render (Handle, window == null ? IntPtr.Zero : window.Handle, widget == null ? IntPtr.Zero : widget.Handle, ref background_area, ref cell_area, ref expose_area, (int) flags); + gtk_cell_renderer_render (Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, ref background_area, ref cell_area, ref expose_area, (int) flags); } // We have to implement this VM manually because x_offset, y_offset, width and height params may be NULL and therefore cannot be treated as "out int" @@ -99,93 +99,3 @@ Marshal.FreeHGlobal (native_cell_area); } - // Compatibility code for old GetSize(..) virtual method - static void ObsoleteGetSize_cb (IntPtr item, IntPtr widget, IntPtr cell_area_ptr, IntPtr x_offset, IntPtr y_offset, IntPtr width, IntPtr height) - { - try { - CellRenderer obj = GLib.Object.GetObject (item, false) as CellRenderer; - Gtk.Widget widg = GLib.Object.GetObject (widget, false) as Gtk.Widget; - Gdk.Rectangle cell_area = Gdk.Rectangle.New (cell_area_ptr); - int a, b, c, d; - - obj.GetSize (widg, ref cell_area, out a, out b, out c, out d); - if (x_offset != IntPtr.Zero) - Marshal.WriteInt32 (x_offset, a); - if (y_offset != IntPtr.Zero) - Marshal.WriteInt32 (y_offset, b); - if (width != IntPtr.Zero) - Marshal.WriteInt32 (width, c); - if (height != IntPtr.Zero) - Marshal.WriteInt32 (height, d); - } catch (Exception e) { - GLib.ExceptionManager.RaiseUnhandledException (e, false); - } - } - - static void OverrideObsoleteGetSize (GLib.GType gtype) - { - if (OnGetSizeCallback == null) - OnGetSizeCallback = new OnGetSizeDelegate (ObsoleteGetSize_cb); - gtksharp_cellrenderer_override_get_size (gtype.Val, OnGetSizeCallback); - } - - [Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")] - [GLib.DefaultSignalHandler(Type=typeof(Gtk.CellRenderer), ConnectionMethod="OverrideObsoleteGetSize")] - public virtual void GetSize(Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height) - { - InternalOnGetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height); - } - - // Compatibility code for old Render(..) virtual method - static void ObsoleteRender_cb (IntPtr cell, IntPtr window, IntPtr widget, IntPtr background_area, IntPtr cell_area, IntPtr expose_area, int flags) - { - try { - Gtk.CellRenderer __obj = GLib.Object.GetObject (cell, false) as Gtk.CellRenderer; - __obj.Render (GLib.Object.GetObject(window) as Gdk.Drawable, GLib.Object.GetObject(widget) as Gtk.Widget, Gdk.Rectangle.New (background_area), Gdk.Rectangle.New (cell_area), Gdk.Rectangle.New (expose_area), (Gtk.CellRendererState) flags); - } catch (Exception e) { - GLib.ExceptionManager.RaiseUnhandledException (e, false); - } - } - - static RenderNativeDelegate ObsoleteRenderVMCallback; - static void OverrideObsoleteRender (GLib.GType gtype) - { - if (ObsoleteRenderVMCallback == null) - ObsoleteRenderVMCallback = new RenderNativeDelegate (ObsoleteRender_cb); - OverrideRender (gtype, ObsoleteRenderVMCallback); // -> autogenerated method - } - - [Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")] - [GLib.DefaultSignalHandler(Type=typeof(Gtk.CellRenderer), ConnectionMethod="OverrideObsoleteRender")] - protected virtual void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags) - { - InternalRender (window, widget, background_area, cell_area, expose_area, flags); - } - - // Compatibility code for old StartEditing(..) virtual method - static IntPtr ObsoleteStartEditing_cb (IntPtr cell, IntPtr evnt, IntPtr widget, IntPtr path, IntPtr background_area, IntPtr cell_area, int flags) - { - try { - Gtk.CellRenderer __obj = GLib.Object.GetObject (cell, false) as Gtk.CellRenderer; - Gtk.CellEditable __result = __obj.StartEditing (Gdk.Event.GetEvent (evnt), GLib.Object.GetObject(widget) as Gtk.Widget, GLib.Marshaller.Utf8PtrToString (path), Gdk.Rectangle.New (background_area), Gdk.Rectangle.New (cell_area), (Gtk.CellRendererState) flags); - return __result == null ? IntPtr.Zero : __result.Handle; - } catch (Exception e) { - GLib.ExceptionManager.RaiseUnhandledException (e, true); - // NOTREACHED: above call does not return. - throw e; - } - } - - static StartEditingNativeDelegate ObsoleteStartEditingVMCallback; - static void OverrideObsoleteStartEditing (GLib.GType gtype) - { - if (ObsoleteStartEditingVMCallback == null) - ObsoleteStartEditingVMCallback = new StartEditingNativeDelegate (ObsoleteStartEditing_cb); - OverrideStartEditing (gtype, ObsoleteStartEditingVMCallback); - } - - [Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")] - [GLib.DefaultSignalHandler(Type=typeof(Gtk.CellRenderer), ConnectionMethod="OverrideObsoleteStartEditing")] - public virtual Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags) { - return InternalStartEditing (evnt, widget, path, background_area, cell_area, flags); - } diff --git a/gtk/CellRendererAccel.custom b/gtk/CellRendererAccel.custom deleted file mode 100644 index bba9b932c..000000000 --- a/gtk/CellRendererAccel.custom +++ /dev/null @@ -1,41 +0,0 @@ -// -// CellRendererAccel.custom - Gtk CellRendererAccel class customizations -// -// Author: Peter Johanson -// -// Copyright (C) 2007 Peter Johanson -// -// This code is inserted after the automatically generated code. -// -// -// 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. - - [Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")] - public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height) - { - base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height); - } - - [Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")] - protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags) - { - base.Render (window, widget, background_area, cell_area, expose_area, flags); - } - - [Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")] - public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags) - { - return base.StartEditing (evnt, widget, path, background_area, cell_area, flags); - } diff --git a/gtk/CellRendererCombo.custom b/gtk/CellRendererCombo.custom deleted file mode 100644 index 02893657d..000000000 --- a/gtk/CellRendererCombo.custom +++ /dev/null @@ -1,41 +0,0 @@ -// -// CellRendererCombo.custom - Gtk CellRendererCombo class customizations -// -// Author: Peter Johanson -// -// Copyright (C) 2007 Peter Johanson -// -// This code is inserted after the automatically generated code. -// -// -// 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. - - [Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")] - public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height) - { - base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height); - } - - [Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")] - protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags) - { - base.Render (window, widget, background_area, cell_area, expose_area, flags); - } - - [Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")] - public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags) - { - return base.StartEditing (evnt, widget, path, background_area, cell_area, flags); - } diff --git a/gtk/CellRendererPixbuf.custom b/gtk/CellRendererPixbuf.custom deleted file mode 100644 index e2ea3ee89..000000000 --- a/gtk/CellRendererPixbuf.custom +++ /dev/null @@ -1,41 +0,0 @@ -// -// CellRendererPixbuf.custom - Gtk CellRendererPixbuf class customizations -// -// Author: Peter Johanson -// -// Copyright (C) 2007 Peter Johanson -// -// This code is inserted after the automatically generated code. -// -// -// 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. - - [Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")] - public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height) - { - base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height); - } - - [Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")] - protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags) - { - base.Render (window, widget, background_area, cell_area, expose_area, flags); - } - - [Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")] - public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags) - { - return base.StartEditing (evnt, widget, path, background_area, cell_area, flags); - } diff --git a/gtk/CellRendererProgress.custom b/gtk/CellRendererProgress.custom deleted file mode 100644 index 53eca7f45..000000000 --- a/gtk/CellRendererProgress.custom +++ /dev/null @@ -1,41 +0,0 @@ -// -// CellRendererProgress.custom - Gtk CellRendererProgress class customizations -// -// Author: Peter Johanson -// -// Copyright (C) 2007 Peter Johanson -// -// This code is inserted after the automatically generated code. -// -// -// 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. - - [Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")] - public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height) - { - base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height); - } - - [Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")] - protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags) - { - base.Render (window, widget, background_area, cell_area, expose_area, flags); - } - - [Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")] - public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags) - { - return base.StartEditing (evnt, widget, path, background_area, cell_area, flags); - } diff --git a/gtk/CellRendererSpin.custom b/gtk/CellRendererSpin.custom deleted file mode 100644 index aa636ecee..000000000 --- a/gtk/CellRendererSpin.custom +++ /dev/null @@ -1,41 +0,0 @@ -// -// CellRendererSpin.custom - Gtk CellRendererSpin class customizations -// -// Author: Peter Johanson -// -// Copyright (C) 2007 Peter Johanson -// -// This code is inserted after the automatically generated code. -// -// -// 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. - - [Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")] - public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height) - { - base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height); - } - - [Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")] - protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags) - { - base.Render (window, widget, background_area, cell_area, expose_area, flags); - } - - [Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")] - public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags) - { - return base.StartEditing (evnt, widget, path, background_area, cell_area, flags); - } diff --git a/gtk/CellRendererText.custom b/gtk/CellRendererText.custom deleted file mode 100644 index 6374edf87..000000000 --- a/gtk/CellRendererText.custom +++ /dev/null @@ -1,41 +0,0 @@ -// -// CellRendererText.custom - Gtk CellRendererText class customizations -// -// Author: Peter Johanson -// -// Copyright (C) 2007 Peter Johanson -// -// This code is inserted after the automatically generated code. -// -// -// 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. - - [Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")] - public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height) - { - base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height); - } - - [Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")] - protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags) - { - base.Render (window, widget, background_area, cell_area, expose_area, flags); - } - - [Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")] - public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags) - { - return base.StartEditing (evnt, widget, path, background_area, cell_area, flags); - } diff --git a/gtk/CellRendererToggle.custom b/gtk/CellRendererToggle.custom deleted file mode 100644 index ab5d4bb8a..000000000 --- a/gtk/CellRendererToggle.custom +++ /dev/null @@ -1,41 +0,0 @@ -// -// CellRendererToggle.custom - Gtk CellRendererToggle class customizations -// -// Author: Peter Johanson -// -// Copyright (C) 2007 Peter Johanson -// -// This code is inserted after the automatically generated code. -// -// -// 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. - - [Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")] - public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height) - { - base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height); - } - - [Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")] - protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags) - { - base.Render (window, widget, background_area, cell_area, expose_area, flags); - } - - [Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")] - public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags) - { - return base.StartEditing (evnt, widget, path, background_area, cell_area, flags); - } diff --git a/gtk/ComboBox.custom b/gtk/ComboBox.custom index d7b8f7b2e..c41b473de 100644 --- a/gtk/ComboBox.custom +++ b/gtk/ComboBox.custom @@ -22,11 +22,12 @@ public ComboBox (string[] entries) : this (new ListStore (typeof (string))) { + ListStore store = Model as ListStore; CellRendererText cell = new CellRendererText (); PackStart (cell, true); SetAttributes (cell, "text", 0); foreach (string entry in entries) - AppendText (entry); + store.AppendValues (entry); } public void SetAttributes (CellRenderer cell, params object[] attrs) diff --git a/gtk/Dialog.custom b/gtk/Dialog.custom index 7bc96463c..9400c2cc7 100644 --- a/gtk/Dialog.custom +++ b/gtk/Dialog.custom @@ -39,8 +39,6 @@ public Dialog (string title, Gtk.Window parent, Gtk.DialogFlags flags, params ob Modal = true; if ((flags & DialogFlags.DestroyWithParent) > 0) DestroyWithParent = true; - if ((flags & DialogFlags.NoSeparator) > 0) - HasSeparator = false; } else { IntPtr native = GLib.Marshaller.StringToPtrGStrdup (title); Raw = gtk_dialog_new_with_buttons (native, parent == null ? IntPtr.Zero : parent.Handle, (int) flags, IntPtr.Zero); diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index 5348a736c..cca830279 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -40,6 +40,9 @@ 1 guchar 1 + false + GtkTargetFlags + 1 call out 1 @@ -64,6 +67,7 @@ 1 GdkModifierType BindingsActivate + CairoHelper 1 1 1 @@ -125,6 +129,14 @@ 1 1 1 + CornerTopLeft + CornerTopRight + CornerBottomLeft + CornerBottomRight + CornerTopLeft | CornerTopRight + CornerBottomLeft | CornerBottomRight + CornerTopLeft | CornerBottomLeft + CornerTopRight | CornerBottomRight 1 1 1 @@ -219,6 +231,7 @@ ref out out + ref EmitRowChanged EmitRowDeleted EmitRowHasChildToggled @@ -294,6 +307,7 @@ Entered Left SetDisplayOptions + AttributesApplied CancelEditing 1 1 @@ -500,6 +514,7 @@ out out out + Respond GtkButton* public GtkButton* @@ -509,9 +524,6 @@ GetItem GetWidget GtkDestroyNotify - Deselected - Selected - Toggled 1 label LineWrapMode @@ -535,6 +547,9 @@ 1 1 Activated + Deselected + Selected + Toggled ToggleSizeAllocated ToggleSizeRequested async @@ -548,15 +563,6 @@ 1 void void - 1 - 1 - 1 - 1 - GtkDestroyNotify - GtkDestroyNotify - GtkDestroyNotify - GtkDestroyNotify - 1 const-gfilename* const-gfilename* 1 @@ -821,16 +827,22 @@ 1 1 ProcessEvent + out out 1 1 1 1 GdkEventMask + GetIsMapped 1 1 + GetWidgetPath + GetIsRealized 1 1 + GetHasDefault + GetHasFocus out GetIsFocus 1 @@ -839,6 +851,8 @@ 1 GdkEventMask 1 + SetIsMapped + SetIsRealized 1 out 1 @@ -849,6 +863,8 @@ ChildNotified drag_context drag_result + 1 + Drawn WidgetEvent event WidgetEventAfter @@ -911,7 +927,6 @@ 1 1 1 - GtkTargetFlags 1 private 1 @@ -947,4 +962,7 @@ /api/namespace/object[@cname='GtkStyle'] /api/namespace/object[@cname='GtkStyle'] /api/namespace/object[@cname='GtkStyle'] + + + diff --git a/gtk/ListStore.custom b/gtk/ListStore.custom index d873a95c7..67c7220cd 100644 --- a/gtk/ListStore.custom +++ b/gtk/ListStore.custom @@ -21,12 +21,6 @@ // Boston, MA 02111-1307, USA. - [Obsolete ("Replaced by Reorder (int[]) overload")] - public int Reorder () - { - return -1; - } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); public bool IterChildren (out Gtk.TreeIter iter) @@ -191,12 +185,6 @@ ColumnTypes = gtypes; } - [Obsolete ("Replaced by ColumnTypes property.")] - public void SetColumnTypes (GLib.GType[] types) - { - ColumnTypes = types; - } - public object GetValue(Gtk.TreeIter iter, int column) { GLib.Value val = GLib.Value.Empty; @@ -206,18 +194,6 @@ return ret; } - [Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")] - public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) - { - SetSortFunc (sort_column_id, sort_func); - } - - [Obsolete ("Replaced by DefaultSortFunc property.")] - public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) - { - DefaultSortFunc = sort_func; - } - public IEnumerator GetEnumerator() { return new TreeEnumerator(this); @@ -278,18 +254,9 @@ OverrideVirtualMethod (gtype, "rows_reordered", RowsReorderedVMCallback); } - [Obsolete ("Replaced by int[] new_order overload.")] - [GLib.DefaultSignalHandler(Type=typeof(Gtk.ListStore), ConnectionMethod="OverrideRowsReordered")] - protected virtual void OnRowsReordered (Gtk.TreePath path, Gtk.TreeIter iter, out int new_order) - { - new_order = -1; - } - [GLib.DefaultSignalHandler(Type=typeof(Gtk.ListStore), ConnectionMethod="OverrideRowsReordered")] protected virtual void OnRowsReordered (Gtk.TreePath path, Gtk.TreeIter iter, int[] new_order) { - int dummy; - OnRowsReordered (path, iter, out dummy); GLib.Value ret = GLib.Value.Empty; GLib.ValueArray inst_and_params = new GLib.ValueArray (4); GLib.Value[] vals = new GLib.Value [4]; diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 96dd908fd..a70e06159 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -14,6 +14,7 @@ sources = \ ActionEntry.cs \ Application.cs \ BindingAttribute.cs \ + CellAreaBox.cs \ ChildPropertyAttribute.cs \ ITreeNode.cs \ Key.cs \ @@ -26,14 +27,13 @@ sources = \ StockManager.cs \ ThreadNotify.cs \ ToggleActionEntry.cs \ - Timeout.cs \ TreeEnumerator.cs \ + TreeMenu.cs \ TreeNodeAttribute.cs \ TreeNode.cs \ TreeNodeValueAttribute.cs customs = \ - AboutDialog.custom \ Accel.custom \ AccelKey.custom \ Action.custom \ @@ -44,13 +44,6 @@ customs = \ Button.custom \ Calendar.custom \ CellRenderer.custom \ - CellRendererAccel.custom \ - CellRendererCombo.custom \ - CellRendererPixbuf.custom \ - CellRendererProgress.custom \ - CellRendererSpin.custom \ - CellRendererText.custom \ - CellRendererToggle.custom \ CellLayout.custom \ CellLayoutAdapter.custom \ CellView.custom \ @@ -109,14 +102,12 @@ customs = \ TargetList.custom \ TargetPair.custom \ TextAttributes.custom \ - TextAppearance.custom \ TextBuffer.custom \ TextChildAnchor.custom \ TextIter.custom \ TextMark.custom \ TextTag.custom \ TextView.custom \ - Toolbar.custom \ TooltipsData.custom \ TreeIter.custom \ TreeModel.custom \ @@ -125,8 +116,6 @@ customs = \ TreeModelSort.custom \ TreePath.custom \ TreeSelection.custom \ - TreeSortable.custom \ - TreeSortableAdapter.custom \ TreeStore.custom \ TreeViewColumn.custom \ TreeView.custom \ diff --git a/gtk/NodeStore.cs b/gtk/NodeStore.cs index 9c9c4ad34..7e71abbf4 100644 --- a/gtk/NodeStore.cs +++ b/gtk/NodeStore.cs @@ -302,6 +302,23 @@ namespace Gtk { return true; } + public bool IterPrevious (ref TreeIter iter) + { + ITreeNode node = GetNode (iter); + + int idx; + if (node.Parent == null) + idx = Nodes.IndexOf (node); + else + idx = node.Parent.IndexOf (node); + + if (idx < 0) throw new Exception ("Node not found in Nodes list"); + else if (idx == 0) return false; + node = node.Parent == null ? Nodes [idx - 1] as ITreeNode : node.Parent [idx - 1]; + GetIter (node, ref iter); + return true; + } + public bool IterChildren (out Gtk.TreeIter first_child, Gtk.TreeIter parent) { first_child = Gtk.TreeIter.Zero; diff --git a/gtk/NodeView.cs b/gtk/NodeView.cs index 2aab11aff..cff52de07 100644 --- a/gtk/NodeView.cs +++ b/gtk/NodeView.cs @@ -74,9 +74,11 @@ namespace Gtk { return CollapseRow (store.GetPath (node)); } +#if FIXME30 public Gdk.Pixmap CreateRowDragIcon (ITreeNode node) { return CreateRowDragIcon (store.GetPath (node)); } +#endif public Gdk.Rectangle GetBackgroundArea (ITreeNode node, Gtk.TreeViewColumn column) { return GetBackgroundArea (store.GetPath (node), column); diff --git a/gtk/Style.custom b/gtk/Style.custom index af0671363..63a89f549 100644 --- a/gtk/Style.custom +++ b/gtk/Style.custom @@ -26,6 +26,7 @@ // Boston, MA 02111-1307, USA. +#if FIXME30 static Gdk.GC EnsureGC (IntPtr raw) { if (raw == IntPtr.Zero) return null; @@ -202,6 +203,7 @@ public void SetMidGC (StateType state, Gdk.GC gc) { gtksharp_gtk_style_set_mid_gc (Handle, (int) state, gc.Handle); } +#endif [DllImport("gtksharpglue-3")] static extern IntPtr gtksharp_gtk_style_get_bg (IntPtr style, int i); @@ -370,29 +372,3 @@ public Pango.FontDescription FontDescription { } } -[DllImport ("gtksharpglue-3")] -static extern IntPtr gtksharp_gtk_style_get_bg_pixmap (IntPtr style, int state); - -[DllImport ("gtksharpglue-3")] -static extern void gtksharp_gtk_style_set_bg_pixmap (IntPtr style, int state, IntPtr pixmap); - -public Gdk.Pixmap BgPixmap (StateType state) -{ - IntPtr raw = gtksharp_gtk_style_get_bg_pixmap (Handle, (int) state); - return GLib.Object.GetObject (raw) as Gdk.Pixmap; -} - -public Gdk.Pixmap[] BgPixmaps { - get { - Gdk.Pixmap[] ret = new Gdk.Pixmap [5]; - for (int i = 0; i < 5; i++) - ret [i] = GLib.Object.GetObject (gtksharp_gtk_style_get_dark (Handle, i)) as Gdk.Pixmap; - return ret; - } -} - -public void SetBgPixmap (StateType state, Gdk.Pixmap pixmap) -{ - gtksharp_gtk_style_set_bg_pixmap (Handle, (int) state, pixmap == null ? IntPtr.Zero : pixmap.Handle); -} - diff --git a/gtk/TextAppearance.custom b/gtk/TextAppearance.custom deleted file mode 100644 index 995b7f91b..000000000 --- a/gtk/TextAppearance.custom +++ /dev/null @@ -1,41 +0,0 @@ -// Gtk.TextAppearance.custom - Gtk TextAppearance class customizations -// -// Authors: Mike Kestner -// -// Copyright (c) 2005 Novell, Inc. -// -// This code is inserted after the automatically generated code. -// -// 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. - - - [Obsolete ("Replaced by BgStipple property.")] - public Gdk.Pixmap bg_stipple { - get { - Gdk.Pixmap ret = GLib.Object.GetObject(_bg_stipple) as Gdk.Pixmap; - return ret; - } - set { _bg_stipple = value.Handle; } - } - - [Obsolete ("Replaced by FgStipple property.")] - public Gdk.Pixmap fg_stipple { - get { - Gdk.Pixmap ret = GLib.Object.GetObject(_fg_stipple) as Gdk.Pixmap; - return ret; - } - set { _fg_stipple = value.Handle; } - } - diff --git a/gtk/TextAttributes.custom b/gtk/TextAttributes.custom index 790302b4a..4ec6f4f90 100644 --- a/gtk/TextAttributes.custom +++ b/gtk/TextAttributes.custom @@ -1,10 +1,4 @@ -// Gtk.TextAttributes.custom - Gtk TextAttributes class customizations -// -// Authors: Mike Kestner -// -// Copyright (c) 2005 Novell, Inc. -// -// This code is inserted after the automatically generated code. +// Copyright (c) 2011 Novell, 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 @@ -21,36 +15,8 @@ // Boston, MA 02111-1307, USA. - [Obsolete("Gtk.TextAttributes is a reference type now, use null")] - public static TextAttributes Zero = null; - - [Obsolete("Replaced by TextAttributes(IntPtr) constructor")] - public static TextAttributes New (IntPtr raw) - { - return new TextAttributes (raw); - } - - [Obsolete("Replaced by TextAttributes() constructor")] - public static TextAttributes New () - { - return new TextAttributes (); - } - - [Obsolete ("Replaced by Font property.")] - public Pango.FontDescription font { - get { return Font; } - set { Font = value; } - } - - [Obsolete ("Replaced by Tabs property.")] - public Pango.TabArray tabs { - get { return Tabs; } - set { Tabs = value; } - } - - [Obsolete ("Replaced by Language property.")] - public Pango.Language language { - get { return Language; } - set { Language = value; } + public TextAppearance Appearance { + get { return (TextAppearance) Marshal.PtrToStructure (new IntPtr (Handle.ToInt64 () + 4), typeof (TextAppearance)); } + set { Marshal.StructureToPtr (value, new IntPtr (Handle.ToInt64 () + 4), false); } } diff --git a/gtk/Timeout.cs b/gtk/Timeout.cs deleted file mode 100644 index 6c5d84f96..000000000 --- a/gtk/Timeout.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Gtk.Timeout.cs - Gtk Timeout implementation. -// -// Author: Mike Kestner -// -// Copyright (c) 2005 Novell, 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. - -namespace Gtk { - - using System; - using System.Runtime.InteropServices; - - [Obsolete ("Replaced by GLib.Timeout")] - public class Timeout { - - [Obsolete ("Replaced by GLib.Source.Remove")] - public static void Remove (uint timeout_handler_id) - { - GLib.Source.Remove (timeout_handler_id); - } - - [Obsolete ("Replaced by GLib.Timeout.Add")] - public static uint AddFull (uint interval, Gtk.Function function, Gtk.CallbackMarshal marshal, IntPtr data, Gtk.DestroyNotify destroy) - { - if (marshal != null || destroy != null) - Console.WriteLine ("marshal, data, and destroy parameters ignored by Gtk.Timeout.AddFull ()."); - return Add (interval, function); - } - - class GTimeoutProxy { - - GLib.TimeoutHandler handler; - Function function; - - public GTimeoutProxy (Gtk.Function function) - { - this.function = function; - handler = new GLib.TimeoutHandler (Invoke); - } - - public GLib.TimeoutHandler Handler { - get { - return handler; - } - } - - bool Invoke () - { - return function (); - } - } - - [Obsolete ("Replaced by GLib.Timeout.Add")] - public static uint Add (uint interval, Gtk.Function function) - { - GTimeoutProxy proxy = new GTimeoutProxy (function); - return GLib.Timeout.Add (interval, proxy.Handler); - } - } -} - diff --git a/gtk/Toolbar.custom b/gtk/Toolbar.custom deleted file mode 100644 index 6bae38d87..000000000 --- a/gtk/Toolbar.custom +++ /dev/null @@ -1,217 +0,0 @@ -// Gtk.Toolbar.custom - Gtk Toolbar class customizations -// -// Author: Mike Kestner -// -// Copyright (C) 2005 Novell, Inc. -// -// This code is inserted after the automatically generated code. -// -// 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. - - [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_weak_ref (IntPtr raw, WeakNotify cb, IntPtr data); - - delegate void WeakNotify (IntPtr handle, IntPtr obj); - - static void ReleaseDelegateCB (IntPtr handle, IntPtr obj) - { - GCHandle gch = (GCHandle) handle; - gch.Free (); - } - - static WeakNotify on_weak_notify; - static WeakNotify OnWeakNotify { - get { - if (on_weak_notify == null) - on_weak_notify = new WeakNotify (ReleaseDelegateCB); - return on_weak_notify; - } - } - - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_toolbar_append_element (IntPtr raw, int type, IntPtr widget, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data); - - [Obsolete ("Replaced by ToolItem API")] - public Gtk.Widget AppendElement (Gtk.ToolbarChildType type, Gtk.Widget widget, string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb) - { - GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb); - IntPtr ntext = GLib.Marshaller.StringToPtrGStrdup (text); - IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text); - IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text); - IntPtr raw_ret = gtk_toolbar_append_element (Handle, (int) type, widget == null ? IntPtr.Zero : widget.Handle, ntext, ntiptext, ntipprivtext, icon == null ? IntPtr.Zero : icon.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); - GLib.Marshaller.Free (ntext); - GLib.Marshaller.Free (ntiptext); - GLib.Marshaller.Free (ntipprivtext); - Gtk.Widget ret; - if (raw_ret == IntPtr.Zero) - ret = null; - else { - ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret); - g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper)); - } - return ret; - } - - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_toolbar_insert_element (IntPtr raw, int type, IntPtr widget, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data, int position); - - [Obsolete ("Replaced by ToolItem API")] - public Gtk.Widget InsertElement (Gtk.ToolbarChildType type, Gtk.Widget widget, string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb, IntPtr user_data, int position) - { - GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb); - IntPtr ntext = GLib.Marshaller.StringToPtrGStrdup (text); - IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text); - IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text); - IntPtr raw_ret = gtk_toolbar_insert_element (Handle, (int) type, widget == null ? IntPtr.Zero : widget.Handle, ntext, ntiptext, ntipprivtext, icon == null ? IntPtr.Zero : icon.Handle, cb_wrapper.NativeDelegate, user_data, position); - GLib.Marshaller.Free (ntext); - GLib.Marshaller.Free (ntiptext); - GLib.Marshaller.Free (ntipprivtext); - Gtk.Widget ret; - if (raw_ret == IntPtr.Zero) - ret = null; - else { - ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret); - g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper)); - } - - return ret; - } - - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_toolbar_prepend_element (IntPtr raw, int type, IntPtr widget, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data); - - [Obsolete ("Replaced by ToolItem API")] - public Gtk.Widget PrependElement (Gtk.ToolbarChildType type, Gtk.Widget widget, string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb) - { - GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb); - IntPtr ntext = GLib.Marshaller.StringToPtrGStrdup (text); - IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text); - IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text); - IntPtr raw_ret = gtk_toolbar_prepend_element (Handle, (int) type, widget == null ? IntPtr.Zero : widget.Handle, ntext, ntiptext, ntipprivtext, icon == null ? IntPtr.Zero : icon.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); - GLib.Marshaller.Free (ntext); - GLib.Marshaller.Free (ntiptext); - GLib.Marshaller.Free (ntipprivtext); - Gtk.Widget ret; - if (raw_ret == IntPtr.Zero) - ret = null; - else { - ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret); - g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper)); - } - return ret; - } - - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_toolbar_append_item (IntPtr raw, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data); - - [Obsolete ("Replaced by ToolItem API")] - public Gtk.Widget AppendItem (string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb) - { - GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb); - IntPtr ntext = GLib.Marshaller.StringToPtrGStrdup (text); - IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text); - IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text); - IntPtr raw_ret = gtk_toolbar_append_item (Handle, ntext, ntiptext, ntipprivtext, icon == null ? IntPtr.Zero : icon.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); - GLib.Marshaller.Free (ntext); - GLib.Marshaller.Free (ntiptext); - GLib.Marshaller.Free (ntipprivtext); - Gtk.Widget ret; - if (raw_ret == IntPtr.Zero) - ret = null; - else { - ret = (Gtk.Widget) GLib.Object.GetObject(raw_ret); - g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper)); - } - return ret; - } - - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_toolbar_insert_item (IntPtr raw, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data, int position); - - [Obsolete ("Replaced by ToolItem API")] - public Gtk.Widget InsertItem (string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb, IntPtr user_data, int position) - { - GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb); - IntPtr ntext = GLib.Marshaller.StringToPtrGStrdup (text); - IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text); - IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text); - IntPtr raw_ret = gtk_toolbar_insert_item (Handle, ntext, ntiptext, ntipprivtext, icon == null ? IntPtr.Zero : icon.Handle, cb_wrapper.NativeDelegate, user_data, position); - GLib.Marshaller.Free (ntext); - GLib.Marshaller.Free (ntiptext); - GLib.Marshaller.Free (ntipprivtext); - Gtk.Widget ret; - if (raw_ret == IntPtr.Zero) - ret = null; - else { - ret = (Gtk.Widget) GLib.Object.GetObject(raw_ret); - g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper)); - } - return ret; - } - - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_toolbar_prepend_item (IntPtr raw, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data); - - [Obsolete ("Replaced by ToolItem API")] - public Gtk.Widget PrependItem (string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb) - { - GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb); - IntPtr ntext = GLib.Marshaller.StringToPtrGStrdup (text); - IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text); - IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text); - IntPtr raw_ret = gtk_toolbar_prepend_item (Handle, ntext, ntiptext, ntipprivtext, icon == null ? IntPtr.Zero : icon.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); - GLib.Marshaller.Free (ntext); - GLib.Marshaller.Free (ntiptext); - GLib.Marshaller.Free (ntipprivtext); - Gtk.Widget ret; - if (raw_ret == IntPtr.Zero) - ret = null; - else { - ret = (Gtk.Widget) GLib.Object.GetObject(raw_ret); - g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper)); - } - return ret; - } - - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_toolbar_insert_stock (IntPtr raw, IntPtr stock_id, IntPtr tooltip_text, IntPtr tooltip_private_text, GtkSharp.SignalFuncNative cb, IntPtr user_data, int position); - - [Obsolete ("Replaced by ToolItem API")] - public Gtk.Widget InsertStock (string stock_id, string tooltip_text, string tooltip_private_text, Gtk.SignalFunc cb, int position) - { - return InsertStock (stock_id, tooltip_text, tooltip_private_text, cb, IntPtr.Zero, position); - } - - [Obsolete ("Replaced by ToolItem API")] - public Gtk.Widget InsertStock (string stock_id, string tooltip_text, string tooltip_private_text, Gtk.SignalFunc cb, IntPtr user_data, int position) - { - GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb); - IntPtr nstock = GLib.Marshaller.StringToPtrGStrdup (stock_id); - IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text); - IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text); - IntPtr raw_ret = gtk_toolbar_insert_stock (Handle, nstock, ntiptext, ntipprivtext, cb_wrapper.NativeDelegate, user_data, position); - GLib.Marshaller.Free (nstock); - GLib.Marshaller.Free (ntiptext); - GLib.Marshaller.Free (ntipprivtext); - Gtk.Widget ret; - if (raw_ret == IntPtr.Zero) - ret = null; - else { - ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret); - g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper)); - } - return ret; - } - diff --git a/gtk/AboutDialog.custom b/gtk/TreeMenu.cs similarity index 60% rename from gtk/AboutDialog.custom rename to gtk/TreeMenu.cs index 87a6684e5..d2bf153eb 100644 --- a/gtk/AboutDialog.custom +++ b/gtk/TreeMenu.cs @@ -1,11 +1,7 @@ -// AboutDialog.custom - customizations to Gtk.AboutDialog -// -// Authors: Mike Kestner -// -// Copyright (c) 2007 Novell, Inc. +// Copyright (c) 2011 Novell, 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 +// 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, @@ -18,14 +14,23 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [Obsolete("Use ProgramName instead")] - [GLib.Property ("program-name")] - public string Name { - get { - return ProgramName; - } - set { - ProgramName = value; + +using System; + +namespace Gtk { + + public partial class TreeMenu { + + public void SetAttributes (CellRenderer cell, params object[] attrs) + { + if (attrs.Length % 2 != 0) + throw new ArgumentException ("attrs should contain pairs of attribute/col"); + + ClearAttributes (cell); + for (int i = 0; i < attrs.Length - 1; i += 2) { + AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]); } } + } +} diff --git a/gtk/TreeModelSort.custom b/gtk/TreeModelSort.custom index 9e98ec3d6..d66755b16 100644 --- a/gtk/TreeModelSort.custom +++ b/gtk/TreeModelSort.custom @@ -93,18 +93,6 @@ return ret; } - [Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")] - public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) - { - SetSortFunc (sort_column_id, sort_func); - } - - [Obsolete ("Replaced by DefaultSortFunc property.")] - public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) - { - DefaultSortFunc = sort_func; - } - [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch); @@ -160,18 +148,9 @@ OverrideVirtualMethod (gtype, "rows_reordered", RowsReorderedVMCallback); } - [Obsolete ("Replaced by int[] new_order overload.")] - [GLib.DefaultSignalHandler(Type=typeof(Gtk.TreeModelSort), ConnectionMethod="OverrideRowsReordered")] - protected virtual void OnRowsReordered (Gtk.TreePath path, Gtk.TreeIter iter, out int new_order) - { - new_order = -1; - } - [GLib.DefaultSignalHandler(Type=typeof(Gtk.TreeModelSort), ConnectionMethod="OverrideRowsReordered")] protected virtual void OnRowsReordered (Gtk.TreePath path, Gtk.TreeIter iter, int[] new_order) { - int dummy; - OnRowsReordered (path, iter, out dummy); GLib.Value ret = GLib.Value.Empty; GLib.ValueArray inst_and_params = new GLib.ValueArray (4); GLib.Value[] vals = new GLib.Value [4]; diff --git a/gtk/TreeSelection.custom b/gtk/TreeSelection.custom index b85d0ec83..eb23beba4 100644 --- a/gtk/TreeSelection.custom +++ b/gtk/TreeSelection.custom @@ -32,12 +32,6 @@ return (TreePath[]) GLib.Marshaller.ListToArray (list, typeof (Gtk.TreePath)); } - [Obsolete ("Replaced by SelectFunction property.")] - public void SetSelectFunction (Gtk.TreeSelectionFunc func, IntPtr data, Gtk.DestroyNotify destroy) - { - SelectFunction = func; - } - [DllImport ("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_selection_get_selected", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_selection_get_selected_without_model (IntPtr raw, IntPtr model, out Gtk.TreeIter iter); diff --git a/gtk/TreeSortableAdapter.custom b/gtk/TreeSortableAdapter.custom deleted file mode 100644 index f133a4e84..000000000 --- a/gtk/TreeSortableAdapter.custom +++ /dev/null @@ -1,36 +0,0 @@ -// Gtk.TreeSortableAdapter.Custom - Gtk TreeSortableAdapter class customizations -// -// Author: Mike Kestner -// -// Copyright (c) 2007 Novell, Inc. -// -// This code is inserted after the automatically generated code. -// -// 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. - - - [Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")] - public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) - { - SetSortFunc (sort_column_id, sort_func); - } - - [Obsolete ("Replaced by DefaultSortFunc property.")] - public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) - { - DefaultSortFunc = sort_func; - } - - diff --git a/gtk/TreeStore.custom b/gtk/TreeStore.custom index 486a3c401..57d4cfb64 100644 --- a/gtk/TreeStore.custom +++ b/gtk/TreeStore.custom @@ -29,20 +29,6 @@ [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_append (IntPtr raw, out TreeIter iter, IntPtr parent); - [Obsolete ("Replaced by AppendNode")] - public TreeIter Append (TreeIter parent) - { - TreeIter iter; - gtk_tree_store_append (Handle, out iter, ref parent); - return iter; - } - - [Obsolete ("Replaced by AppendNode")] - public void Append (out TreeIter iter) - { - gtk_tree_store_append (Handle, out iter, IntPtr.Zero); - } - public TreeIter AppendNode () { TreeIter iter; @@ -63,20 +49,6 @@ [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert (IntPtr raw, out TreeIter iter, IntPtr parent, int position); - [Obsolete ("Replaced by InsertNode")] - public TreeIter Insert (TreeIter parent, int position) - { - TreeIter iter; - gtk_tree_store_insert (Handle, out iter, ref parent, position); - return iter; - } - - [Obsolete ("Replaced by InsertNode")] - public void Insert (out TreeIter iter, int position) - { - gtk_tree_store_insert (Handle, out iter, IntPtr.Zero, position); - } - public TreeIter InsertNode (TreeIter parent, int position) { TreeIter iter; @@ -97,20 +69,6 @@ [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_prepend (IntPtr raw, out TreeIter iter, IntPtr parent); - [Obsolete ("Replaced by PrependNode")] - public TreeIter Prepend(TreeIter parent) - { - TreeIter iter; - gtk_tree_store_prepend (Handle, out iter, ref parent); - return iter; - } - - [Obsolete ("Replaced by PrependNode")] - public void Prepend (out TreeIter iter) - { - gtk_tree_store_append (Handle, out iter, IntPtr.Zero); - } - public TreeIter PrependNode (TreeIter parent) { TreeIter iter; @@ -131,20 +89,6 @@ [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert_before (IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling); - [Obsolete ("Replaced by InsertNodeBefore")] - public TreeIter InsertBefore (TreeIter parent, TreeIter sibling) - { - TreeIter iter; - gtk_tree_store_insert_before (Handle, out iter, ref parent, ref sibling); - return iter; - } - - [Obsolete ("Replaced by InsertNodeBefore")] - public void InsertBefore (out TreeIter iter, TreeIter sibling) - { - gtk_tree_store_insert_before (Handle, out iter, IntPtr.Zero, ref sibling); - } - public TreeIter InsertNodeBefore (TreeIter sibling) { TreeIter iter; @@ -165,20 +109,6 @@ [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert_after (IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling); - [Obsolete ("Replaced by InsertNodeAfter")] - public TreeIter InsertAfter (TreeIter parent, TreeIter sibling) - { - TreeIter iter; - gtk_tree_store_insert_after (Handle, out iter, ref parent, ref sibling); - return iter; - } - - [Obsolete ("Replaced by InsertNodeAfter")] - public void InsertAfter (out TreeIter iter, TreeIter sibling) - { - gtk_tree_store_insert_after (Handle, out iter, IntPtr.Zero, ref sibling); - } - public TreeIter InsertNodeAfter (TreeIter sibling) { TreeIter iter; @@ -377,12 +307,6 @@ ColumnTypes = gtypes; } - [Obsolete ("Replaced by ColumnTypes property.")] - public void SetColumnTypes (GLib.GType[] types) - { - ColumnTypes = types; - } - public object GetValue (Gtk.TreeIter iter, int column) { GLib.Value val = GLib.Value.Empty; GetValue (iter, column, ref val); @@ -391,18 +315,6 @@ return ret; } - [Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")] - public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) - { - SetSortFunc (sort_column_id, sort_func); - } - - [Obsolete ("Replaced by DefaultSortFunc property.")] - public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) - { - DefaultSortFunc = sort_func; - } - [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch); @@ -458,18 +370,9 @@ OverrideVirtualMethod (gtype, "rows_reordered", RowsReorderedVMCallback); } - [Obsolete ("Replaced by int[] new_order overload.")] - [GLib.DefaultSignalHandler(Type=typeof(Gtk.TreeStore), ConnectionMethod="OverrideRowsReordered")] - protected virtual void OnRowsReordered (Gtk.TreePath path, Gtk.TreeIter iter, out int new_order) - { - new_order = -1; - } - [GLib.DefaultSignalHandler(Type=typeof(Gtk.TreeStore), ConnectionMethod="OverrideRowsReordered")] protected virtual void OnRowsReordered (Gtk.TreePath path, Gtk.TreeIter iter, int[] new_order) { - int dummy; - OnRowsReordered (path, iter, out dummy); GLib.Value ret = GLib.Value.Empty; GLib.ValueArray inst_and_params = new GLib.ValueArray (4); GLib.Value[] vals = new GLib.Value [4]; diff --git a/gtk/TreeView.custom b/gtk/TreeView.custom index a971cab58..a57774fa4 100644 --- a/gtk/TreeView.custom +++ b/gtk/TreeView.custom @@ -24,9 +24,6 @@ // Boston, MA 02111-1307, USA. - [Obsolete ("Use NodeView with NodeStores")] - public TreeView (NodeStore store) : this (store == null ? null : store.Adapter) {} - public Gdk.Color OddRowColor { get { GLib.Value value = StyleGetPropertyValue ("odd-row-color"); @@ -151,25 +148,3 @@ return InsertColumn (col, pos); } - [Obsolete ("Replaced by SearchEqualFunc property.")] - public void SetSearchEqualFunc (TreeViewSearchEqualFunc search_equal_func, IntPtr search_user_data, DestroyNotify search_destroy) - { - SearchEqualFunc = search_equal_func; - } - - [Obsolete ("Replaced by DestroyCountFunc property.")] - public void SetDestroyCountFunc (TreeDestroyCountFunc func, IntPtr data, DestroyNotify destroy) - { - DestroyCountFunc = func; - } - - [Obsolete ("Replaced by ColumnDragFunction property.")] - public void SetColumnDragFunction (TreeViewColumnDropFunc func, IntPtr user_data, DestroyNotify destroy) - { - ColumnDragFunction = func; - } - - [Obsolete ("Replaced by VisibleRect property.")] - public void GetVisibleRect(Gdk.Rectangle visible_rect) { - ; - } diff --git a/gtk/TreeViewColumn.custom b/gtk/TreeViewColumn.custom index a5acfa1a6..990246e2c 100644 --- a/gtk/TreeViewColumn.custom +++ b/gtk/TreeViewColumn.custom @@ -78,9 +78,3 @@ gtk_cell_layout_set_cell_data_func (Handle, cell_renderer == null ? IntPtr.Zero : cell_renderer.Handle, func_wrapper.NativeDelegate, (IntPtr) gch, GLib.DestroyHelper.NotifyHandler); } - [Obsolete ("Replaced by SetCellDataFunc (CellRenderer, TreeCellDataFunc) overload")] - public void SetCellDataFunc (Gtk.CellRenderer cell_renderer, Gtk.TreeCellDataFunc func, IntPtr func_data, Gtk.DestroyNotify destroy) - { - SetCellDataFunc (cell_renderer, func); - } - diff --git a/gtk/Widget.custom b/gtk/Widget.custom index e2433bcf6..6f23fce90 100644 --- a/gtk/Widget.custom +++ b/gtk/Widget.custom @@ -24,24 +24,6 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. -public override void Destroy () -{ - base.Destroy (); -} - -protected override void CreateNativeObject (string[] names, GLib.Value[] vals) -{ - base.CreateNativeObject (names, vals); -} - -[DllImport("gtksharpglue-3")] -static extern IntPtr gtksharp_gtk_widget_get_allocation (IntPtr style); - -public Gdk.Rectangle Allocation { - get { return Gdk.Rectangle.New (gtksharp_gtk_widget_get_allocation (Handle)); } - set { SizeAllocate (value); } -} - [DllImport ("gtksharpglue-3")] static extern void gtksharp_gtk_widget_set_window (IntPtr widget, IntPtr window); public Gdk.Window GdkWindow { @@ -60,111 +42,6 @@ public void AddAccelerator (string accel_signal, AccelGroup accel_group, AccelKe } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] -static extern void gtk_widget_set_state (IntPtr raw, int state); - -[DllImport("gtksharpglue-3")] -static extern int gtksharp_gtk_widget_get_state (IntPtr raw); - -public Gtk.StateType State { - set { - gtk_widget_set_state (Handle, (int) value); - } - get { - return (Gtk.StateType) gtksharp_gtk_widget_get_state (Handle); - } -} - -[DllImport("gtksharpglue-3")] -static extern int gtksharp_gtk_widget_get_flags (IntPtr raw); - -[DllImport("gtksharpglue-3")] -static extern void gtksharp_gtk_widget_set_flags (IntPtr raw, int flags); - -[Obsolete] -public int Flags { - get { - return gtksharp_gtk_widget_get_flags (Handle); - } - set { - gtksharp_gtk_widget_set_flags (Handle, (int) value); - } -} - -public WidgetFlags WidgetFlags { - get { - return (WidgetFlags) gtksharp_gtk_widget_get_flags (Handle); - } - set { - gtksharp_gtk_widget_set_flags (Handle, (int) value); - } -} - -public void SetFlag (WidgetFlags flag) -{ - Flags |= (int)flag; -} - -public void ClearFlag (WidgetFlags flag) -{ - Flags &= ~((int)flag); -} - -public bool IsMapped { - get { - return ((Flags & (int)Gtk.WidgetFlags.Mapped) != 0); - } -} - -public bool IsRealized { - get { - return ((Flags & (int)Gtk.WidgetFlags.Realized) != 0); - } -} - -public bool IsNoWindow { - get { - return ((Flags & (int)Gtk.WidgetFlags.NoWindow) != 0); - } -} - -public bool IsTopLevel { - get { - return ((Flags & (int)Gtk.WidgetFlags.Toplevel) != 0); - } -} - -public bool HasGrab { - get { - return ((Flags & (int)Gtk.WidgetFlags.HasGrab) != 0); - } -} - -public bool IsCompositeChild { - get { - return ((Flags & (int)Gtk.WidgetFlags.CompositeChild) != 0); - } -} - -public bool IsAppPaintable { - get { - return ((Flags & (int)Gtk.WidgetFlags.AppPaintable) != 0); - } -} - -public bool IsDoubleBuffered { - get { - return ((Flags & (int)Gtk.WidgetFlags.DoubleBuffered) != 0); - } -} - - -public bool IsDrawable { - get { - return (Visible && IsMapped); - } -} - public int FocusLineWidth { get { return (int) StyleGetProperty ("focus-line-width"); @@ -210,45 +87,6 @@ static uint RegisterSignal (string signal_name, GLib.GType gtype, GLib.Signal.Fl } } -static void SetScrollAdjustmentsMarshal_cb (IntPtr closure, IntPtr return_val, uint n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) -{ - try { - GLib.Value[] inst_and_params = new GLib.Value [n_param_vals]; - int gvalue_size = Marshal.SizeOf (typeof (GLib.Value)); - for (int idx = 0; idx < n_param_vals; idx++) - inst_and_params [idx] = (GLib.Value) Marshal.PtrToStructure (new IntPtr (param_values.ToInt64 () + idx * gvalue_size), typeof (GLib.Value)); - - Widget inst; - try { - inst = inst_and_params [0].Val as Widget; - } catch (GLib.MissingIntPtrCtorException) { - return; - } - Gtk.Adjustment h = inst_and_params [1].Val as Gtk.Adjustment; - Gtk.Adjustment v = inst_and_params [2].Val as Gtk.Adjustment; - inst.OnSetScrollAdjustments (h, v); - } catch (Exception e) { - GLib.ExceptionManager.RaiseUnhandledException (e, false); - } -} - -static ClosureMarshal SetScrollAdjustmentsMarshalCallback; - -static void ConnectSetScrollAdjustments (GLib.GType gtype) -{ - if (SetScrollAdjustmentsMarshalCallback == null) - SetScrollAdjustmentsMarshalCallback = new ClosureMarshal (SetScrollAdjustmentsMarshal_cb); - - GtkWidgetClass klass = GetClassStruct (gtype, false); - klass.SetScrollAdjustmentsSignal = RegisterSignal ("set_scroll_adjustments", gtype, GLib.Signal.Flags.RunLast, GLib.GType.None, new GLib.GType [] {Adjustment.GType, Adjustment.GType}, SetScrollAdjustmentsMarshalCallback); - OverrideClassStruct (gtype, klass); -} - -[GLib.DefaultSignalHandler (Type=typeof (Gtk.Widget), ConnectionMethod="ConnectSetScrollAdjustments")] -protected virtual void OnSetScrollAdjustments (Gtk.Adjustment hadj, Gtk.Adjustment vadj) -{ -} - static void ActivateMarshal_cb (IntPtr raw_closure, IntPtr return_val, uint n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) { try { @@ -460,3 +298,141 @@ public void Path (out string path, out string path_reversed) Path (out len, out path, out path_reversed); } + +// Code from Object.custom in 2.x +// Object is gone in 3.x + + static Hashtable destroy_handlers; + static Hashtable DestroyHandlers { + get { + if (destroy_handlers == null) + destroy_handlers = new Hashtable (); + return destroy_handlers; + } + } + + private static void OverrideDestroyed (GLib.GType gtype) + { + // Do Nothing. We don't want to hook into the native vtable. + // We will manually invoke the VM on signal invocation. The signal + // always raises before the default handler because this signal + // is RUN_CLEANUP. + } + + [GLib.DefaultSignalHandler(Type=typeof(Gtk.Widget), ConnectionMethod="OverrideDestroyed")] + protected virtual void OnDestroyed () + { + if (DestroyHandlers.Contains (Handle)) { + EventHandler handler = (EventHandler) DestroyHandlers [Handle]; + handler (this, EventArgs.Empty); + DestroyHandlers.Remove (Handle); + } + } + + [GLib.Signal("destroy")] + public event EventHandler Destroyed { + add { + EventHandler handler = (EventHandler) DestroyHandlers [Handle]; + DestroyHandlers [Handle] = Delegate.Combine (handler, value); + } + remove { + EventHandler handler = (EventHandler) DestroyHandlers [Handle]; + handler = (EventHandler) Delegate.Remove (handler, value); + if (handler != null) + DestroyHandlers [Handle] = handler; + else + DestroyHandlers.Remove (Handle); + } + } + + event EventHandler InternalDestroyed { + add { + GLib.Signal sig = GLib.Signal.Lookup (this, "destroy"); + sig.AddDelegate (value); + } + remove { + GLib.Signal sig = GLib.Signal.Lookup (this, "destroy"); + sig.RemoveDelegate (value); + } + } + + static void NativeDestroy (object o, EventArgs args) + { + Gtk.Widget widget = o as Gtk.Widget; + if (widget == null) + return; + widget.OnDestroyed (); + } + + static EventHandler native_destroy_handler; + static EventHandler NativeDestroyHandler { + get { + if (native_destroy_handler == null) + native_destroy_handler = new EventHandler (NativeDestroy); + return native_destroy_handler; + } + } + + protected override void CreateNativeObject (string[] names, GLib.Value[] vals) + { + base.CreateNativeObject (names, vals); + } + + public override void Dispose () + { + if (Handle == IntPtr.Zero) + return; + InternalDestroyed -= NativeDestroyHandler; + base.Dispose (); + } + + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + private static extern void g_object_ref_sink (IntPtr raw); + + protected override IntPtr Raw { + get { + return base.Raw; + } + set { + if (value != IntPtr.Zero) + g_object_ref_sink (value); + base.Raw = value; + if (value != IntPtr.Zero) + InternalDestroyed += NativeDestroyHandler; + } + } + + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + private static extern void gtk_widget_destroy (IntPtr raw); + + public virtual void Destroy () + { + if (Handle == IntPtr.Zero) + return; + gtk_widget_destroy (Handle); + InternalDestroyed -= NativeDestroyHandler; + } + + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool g_object_is_floating (IntPtr raw); + + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void g_object_force_floating (IntPtr raw); + + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void g_object_unref (IntPtr raw); + + public bool IsFloating { + get { + return g_object_is_floating (Handle); + } + set { + if (value == true) { + if (!IsFloating) + g_object_force_floating (Handle); + } else { + g_object_ref_sink (Handle); + g_object_unref (Handle); + } + } + } diff --git a/gtk/glue/cellrenderer.c b/gtk/glue/cellrenderer.c index 623c11c18..b63bf46a1 100644 --- a/gtk/glue/cellrenderer.c +++ b/gtk/glue/cellrenderer.c @@ -21,7 +21,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include const gchar *__gtype_prefix = "__gtksharp_"; #define HAS_PREFIX(a) (*((guint64 *)(a)) == *((guint64 *) __gtype_prefix)) diff --git a/gtk/glue/container.c b/gtk/glue/container.c index dac5e0f56..b9c7b75b2 100644 --- a/gtk/glue/container.c +++ b/gtk/glue/container.c @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include void gtksharp_container_base_forall (GtkContainer *container, gboolean include_internals, GtkCallback cb, gpointer data); diff --git a/gtk/glue/style.c b/gtk/glue/style.c index d62e062d0..c3ff48fb7 100644 --- a/gtk/glue/style.c +++ b/gtk/glue/style.c @@ -20,45 +20,9 @@ * Boston, MA 02111-1307, USA. */ -#include +#include /* Forward declarations */ -GdkGC *gtksharp_gtk_style_get_white_gc (GtkStyle *style); - -GdkGC *gtksharp_gtk_style_get_black_gc (GtkStyle *style); - -GdkGC *gtksharp_gtk_style_get_fg_gc (GtkStyle *style, int i); - -GdkGC *gtksharp_gtk_style_get_bg_gc (GtkStyle *style, int i); - -GdkGC *gtksharp_gtk_style_get_base_gc (GtkStyle *style, int i); - -GdkGC *gtksharp_gtk_style_get_text_gc (GtkStyle *style, int i); - -GdkGC *gtksharp_gtk_style_get_text_aa_gc (GtkStyle *style, int i); - -GdkGC *gtksharp_gtk_style_get_light_gc (GtkStyle *style, int i); - -GdkGC *gtksharp_gtk_style_get_dark_gc (GtkStyle *style, int i); - -GdkGC *gtksharp_gtk_style_get_mid_gc (GtkStyle *style, int i); - -void gtksharp_gtk_style_set_fg_gc (GtkStyle *style, int i, GdkGC *gc); - -void gtksharp_gtk_style_set_bg_gc (GtkStyle *style, int i, GdkGC *gc); - -void gtksharp_gtk_style_set_base_gc (GtkStyle *style, int i, GdkGC *gc); - -void gtksharp_gtk_style_set_text_gc (GtkStyle *style, int i, GdkGC *gc); - -void gtksharp_gtk_style_set_text_aa_gc (GtkStyle *style, int i, GdkGC *gc); - -void gtksharp_gtk_style_set_light_gc (GtkStyle *style, int i, GdkGC *gc); - -void gtksharp_gtk_style_set_dark_gc (GtkStyle *style, int i, GdkGC *gc); - -void gtksharp_gtk_style_set_mid_gc (GtkStyle *style, int i, GdkGC *gc); - GdkColor *gtksharp_gtk_style_get_fg (GtkStyle *style, int i); GdkColor *gtksharp_gtk_style_get_bg (GtkStyle *style, int i); @@ -79,133 +43,8 @@ int gtksharp_gtk_style_get_thickness (GtkStyle *style, int x); void gtksharp_gtk_style_set_thickness (GtkStyle *style, int thickness); -GdkPixmap *gtksharp_gtk_style_get_bg_pixmap (GtkStyle *style, int i); - -void gtksharp_gtk_style_set_bg_pixmap (GtkStyle *style, int i, GdkPixmap *pixmap); - /* */ -/* FIXME: include all fields */ - -GdkGC* -gtksharp_gtk_style_get_white_gc (GtkStyle *style) -{ - g_object_ref (G_OBJECT (style->white_gc)); - return style->white_gc; -} - -GdkGC* -gtksharp_gtk_style_get_black_gc (GtkStyle *style) -{ - g_object_ref (G_OBJECT (style->black_gc)); - return style->black_gc; -} - -GdkGC* -gtksharp_gtk_style_get_fg_gc (GtkStyle *style, int i) -{ - g_object_ref (G_OBJECT (style->fg_gc[i])); - return style->fg_gc[i]; -} - -GdkGC* -gtksharp_gtk_style_get_bg_gc (GtkStyle *style, int i) -{ - g_object_ref (G_OBJECT (style->bg_gc[i])); - return style->bg_gc[i]; -} - -GdkGC* -gtksharp_gtk_style_get_base_gc (GtkStyle *style, int i) -{ - g_object_ref (G_OBJECT (style->base_gc[i])); - return style->base_gc[i]; -} - -GdkGC* -gtksharp_gtk_style_get_text_gc (GtkStyle *style, int i) -{ - g_object_ref (G_OBJECT (style->text_gc[i])); - return style->text_gc[i]; -} - -GdkGC* -gtksharp_gtk_style_get_text_aa_gc (GtkStyle *style, int i) -{ - g_object_ref (G_OBJECT (style->text_aa_gc[i])); - return style->text_aa_gc[i]; -} - -GdkGC* -gtksharp_gtk_style_get_light_gc (GtkStyle *style, int i) -{ - g_object_ref (G_OBJECT (style->light_gc[i])); - return style->light_gc[i]; -} - -GdkGC* -gtksharp_gtk_style_get_dark_gc (GtkStyle *style, int i) -{ - g_object_ref (G_OBJECT (style->dark_gc[i])); - return style->dark_gc[i]; -} - -GdkGC* -gtksharp_gtk_style_get_mid_gc (GtkStyle *style, int i) -{ - g_object_ref (G_OBJECT (style->mid_gc[i])); - return style->mid_gc[i]; -} - -void -gtksharp_gtk_style_set_fg_gc (GtkStyle *style, int i, GdkGC *gc) -{ - g_object_ref (G_OBJECT (gc)); - style->fg_gc[i] = gc; -} - -void -gtksharp_gtk_style_set_bg_gc (GtkStyle *style, int i, GdkGC *gc) -{ - g_object_ref (G_OBJECT (gc)); - style->bg_gc[i] = gc; -} - -void -gtksharp_gtk_style_set_base_gc (GtkStyle *style, int i, GdkGC *gc) -{ - g_object_ref (G_OBJECT (gc)); - style->base_gc[i] = gc; -} - -void -gtksharp_gtk_style_set_text_gc (GtkStyle *style, int i, GdkGC *gc) -{ - g_object_ref (G_OBJECT (gc)); - style->text_gc[i] = gc; -} - -void -gtksharp_gtk_style_set_text_aa_gc (GtkStyle *style, int i, GdkGC *gc) -{ - g_object_ref (G_OBJECT (gc)); - style->text_aa_gc[i] = gc; -} - -void -gtksharp_gtk_style_set_light_gc (GtkStyle *style, int i, GdkGC *gc) -{ - g_object_ref (G_OBJECT (gc)); - style->light_gc[i] = gc; -} - -void -gtksharp_gtk_style_set_dark_gc (GtkStyle *style, int i, GdkGC *gc) -{ - g_object_ref (G_OBJECT (gc)); - style->dark_gc[i] = gc; -} - GdkColor* gtksharp_gtk_style_get_fg (GtkStyle *style, int i) { @@ -272,15 +111,4 @@ gtksharp_gtk_style_set_thickness (GtkStyle *style, int thickness) style->ythickness = -thickness; } -GdkPixmap * -gtksharp_gtk_style_get_bg_pixmap (GtkStyle *style, int i) -{ - return style->bg_pixmap[i]; -} - -void gtksharp_gtk_style_set_bg_pixmap (GtkStyle *style, int i, GdkPixmap *pixmap) -{ - g_object_ref (G_OBJECT (pixmap)); - style->bg_pixmap[i] = pixmap; -} diff --git a/gtk/glue/widget.c b/gtk/glue/widget.c index 19066400c..2ea950fe4 100644 --- a/gtk/glue/widget.c +++ b/gtk/glue/widget.c @@ -21,46 +21,7 @@ * Boston, MA 02111-1307, USA. */ -#include -#include +#include /* Forward declarations */ -GdkRectangle *gtksharp_gtk_widget_get_allocation (GtkWidget *widget); -void gtksharp_gtk_widget_set_window (GtkWidget *widget, GdkWindow *window); -int gtksharp_gtk_widget_get_state (GtkWidget *widget); -int gtksharp_gtk_widget_get_flags (GtkWidget *widget); -void gtksharp_gtk_widget_set_flags (GtkWidget *widget, int flags); -/* */ - -GdkRectangle* -gtksharp_gtk_widget_get_allocation (GtkWidget *widget) -{ - return &widget->allocation; -} - -void -gtksharp_gtk_widget_set_window (GtkWidget *widget, GdkWindow *window) -{ - if (widget->window) - g_object_unref (widget->window); - widget->window = g_object_ref (window); -} - -int -gtksharp_gtk_widget_get_state (GtkWidget *widget) -{ - return GTK_WIDGET_STATE (widget); -} - -int -gtksharp_gtk_widget_get_flags (GtkWidget *widget) -{ - return GTK_WIDGET_FLAGS (widget); -} - -void -gtksharp_gtk_widget_set_flags (GtkWidget *widget, int flags) -{ - GTK_OBJECT(widget)->flags = flags; -} diff --git a/gtk/gtk-api.raw b/gtk/gtk-api.raw index d0be18c43..524eb6ccc 100644 --- a/gtk/gtk-api.raw +++ b/gtk/gtk-api.raw @@ -6,37 +6,22 @@ Please DO NOT MODIFY THIS FILE, modify .metadata files instead. --> - + - - - - - - - - - - - - - - - - - - + + + + + - - - - - - + + + + @@ -51,12 +36,19 @@ + + + + + + + @@ -66,10 +58,10 @@ + - - + @@ -88,7 +80,6 @@ - @@ -113,10 +104,8 @@ - - - - + + @@ -131,6 +120,7 @@ + @@ -151,7 +141,6 @@ - @@ -169,6 +158,10 @@ + + + + @@ -190,6 +183,7 @@ + @@ -237,8 +231,6 @@ - - @@ -246,19 +238,33 @@ + + + + + + + + + + + - - - - - - - + + + + + + + + + + @@ -273,11 +279,6 @@ - - - - - @@ -304,12 +305,6 @@ - - - - - - @@ -359,10 +354,6 @@ - - - - @@ -402,6 +393,7 @@ + @@ -420,23 +412,13 @@ - - - - - - - - - - - + @@ -519,6 +501,13 @@ + + + + + + + @@ -568,12 +557,15 @@ + + + + - @@ -587,26 +579,20 @@ - - - - - - - - - - - - - - + + + + + + + + @@ -624,20 +610,23 @@ + + + + + + + + + - - - - - - - - + + @@ -658,6 +647,7 @@ + @@ -668,12 +658,20 @@ - - - - - - + + + + + + + + + + + + + + @@ -717,6 +715,7 @@ + @@ -724,37 +723,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -811,16 +779,7 @@ - - - - - - - - - @@ -884,13 +843,20 @@ - - + + - + + + + + + + + + + - - @@ -985,12 +951,6 @@ - - - - - - @@ -1007,12 +967,6 @@ - - - - - - @@ -1021,25 +975,6 @@ - - - - - - - - - - - - - - - - - - - @@ -1048,21 +983,6 @@ - - - - - - - - - - - - - - - @@ -1101,16 +1021,6 @@ - - - - - - - - - - @@ -1118,19 +1028,12 @@ - - - - - - - - + @@ -1171,8 +1074,13 @@ - - + + + + + + + @@ -1247,6 +1155,14 @@ + + + + + + + + @@ -1337,16 +1253,73 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1515,18 +1488,18 @@ - - + + - + - - + + - + @@ -1560,6 +1533,7 @@ + @@ -1613,6 +1587,10 @@ + + + + @@ -1630,6 +1608,9 @@ + + + @@ -1675,7 +1656,7 @@ - + @@ -1785,8 +1766,8 @@ - - + + @@ -1806,8 +1787,8 @@ - - + + @@ -1842,43 +1823,12 @@ - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1963,6 +1913,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -1989,6 +1959,9 @@ + + + @@ -2112,6 +2085,12 @@ + + + + + + @@ -2232,6 +2211,23 @@ + + + + + + + + + + + + + + + + + @@ -2247,6 +2243,7 @@ + @@ -2298,6 +2295,9 @@ + + + @@ -2332,27 +2332,9 @@ - - + + - - - - - - - - - - - - - - - - - - @@ -2413,10 +2395,18 @@ - - + + + + + + + + + + @@ -2453,9 +2443,6 @@ - - - @@ -2536,12 +2523,6 @@ - - - - - - @@ -2578,6 +2559,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2586,6 +2664,10 @@ + + + + @@ -2607,6 +2689,25 @@ + + + + + + + + + + + + + + + + + + + @@ -2619,6 +2720,15 @@ + + + + + + + + + @@ -2728,6 +2838,7 @@ + @@ -2812,6 +2923,12 @@ + + + + + + @@ -2974,6 +3091,12 @@ + + + + + + @@ -3054,16 +3177,16 @@ - - + + - - + + @@ -3115,17 +3238,25 @@ + - + + + + + + + + @@ -3165,15 +3296,15 @@ + + + - - - @@ -3226,20 +3357,18 @@ - - - - - - - - + + + + + + @@ -3252,12 +3381,6 @@ - - - - - - @@ -3270,14 +3393,6 @@ - - - - - - - - @@ -3312,11 +3427,7 @@ - - - - - + @@ -3432,20 +3543,12 @@ - - - - - - - - - + @@ -3604,7 +3707,7 @@ - + @@ -3627,6 +3730,15 @@ + + + + + + + + + @@ -3639,6 +3751,7 @@ + @@ -3649,6 +3762,7 @@ + @@ -3658,6 +3772,7 @@ + @@ -3686,6 +3801,9 @@ + + + @@ -3701,21 +3819,12 @@ - + - - - - - - - - - @@ -3734,18 +3843,27 @@ - - - - - - + + + + + + + + + + + + + + + @@ -3755,12 +3873,27 @@ + + + + + + + + + + + + + + + @@ -3787,24 +3920,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -3815,7 +4005,7 @@ - + @@ -3999,9 +4189,9 @@ - + - + @@ -4009,12 +4199,7 @@ - - - - - - + @@ -4137,10 +4322,7 @@ - - - - + @@ -4188,12 +4370,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + @@ -4217,11 +4622,7 @@ - - - - - + @@ -4261,12 +4662,6 @@ - - - - - - @@ -4306,6 +4701,9 @@ + + + @@ -4318,6 +4716,9 @@ + + + @@ -4371,12 +4772,18 @@ + + + + + + @@ -4440,7 +4847,7 @@ - + @@ -4451,10 +4858,12 @@ + + + + - - - + @@ -4462,6 +4871,21 @@ + + + + + + + + + + + + + + + @@ -4471,6 +4895,12 @@ + + + + + + @@ -4480,12 +4910,6 @@ - - - - - - @@ -4495,12 +4919,6 @@ - - - - - - @@ -4695,18 +5113,7 @@ - - - - - - - - - - - - + @@ -4752,13 +5159,13 @@ - - - + + + - + @@ -4768,6 +5175,9 @@ + + + @@ -4792,7 +5202,7 @@ - + @@ -4811,10 +5221,10 @@ - + - + @@ -4871,46 +5281,26 @@ - - - - - + - - - - - - - - - - - - - - - - + - - + - + @@ -4918,13 +5308,6 @@ - - - - - - - @@ -4942,50 +5325,12 @@ + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -5024,18 +5369,21 @@ + + + + + + + + + + + + - - - - - - - - - @@ -5044,6 +5392,12 @@ + + + + + + @@ -5057,7 +5411,7 @@ - + @@ -5070,7 +5424,7 @@ - + @@ -5102,19 +5456,900 @@ - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + @@ -5123,20 +6358,10 @@ + + - - - - - - - - - - - - - + @@ -5161,12 +6386,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -5176,11 +6449,10 @@ - + - - - + + @@ -5190,8 +6462,8 @@ - - + + @@ -5201,8 +6473,8 @@ - - + + @@ -5212,6 +6484,12 @@ + + + + + + @@ -5223,8 +6501,21 @@ - + + + + + + + + + + + + + + @@ -5233,7 +6524,62 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5247,17 +6593,29 @@ + + + + + + - + - + + + + + + + @@ -5265,6 +6623,25 @@ + + + + + + + + + + + + + + + + + + + @@ -5294,13 +6671,7 @@ - - - - - - - + @@ -5343,11 +6714,12 @@ + + + + - - - - + @@ -5358,6 +6730,18 @@ + + + + + + + + + + + + @@ -5371,9 +6755,7 @@ - - - + @@ -5414,7 +6796,7 @@ - + @@ -5427,6 +6809,9 @@ + + + @@ -5435,15 +6820,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5453,33 +6884,17 @@ - - - - - - - - - - - - - - - - - - - + + + @@ -5497,6 +6912,7 @@ + @@ -5539,9 +6955,7 @@ - - - + @@ -5565,6 +6979,9 @@ + + + @@ -5575,6 +6992,12 @@ + + + + + + @@ -5591,22 +7014,50 @@ + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + @@ -5617,6 +7068,12 @@ + + + + + + @@ -5638,12 +7095,30 @@ + + + + + + + + + + + + + + + + + + @@ -5663,7 +7138,7 @@ - + @@ -5703,10 +7178,7 @@ - - - - + @@ -5717,7 +7189,7 @@ - + @@ -5732,6 +7204,9 @@ + + + @@ -5773,12 +7248,6 @@ - - - - - - @@ -5972,6 +7441,7 @@ + @@ -5997,6 +7467,12 @@ + + + + + + @@ -6012,6 +7488,11 @@ + + + + + @@ -6024,6 +7505,12 @@ + + + + + + @@ -6046,11 +7533,12 @@ - + + @@ -6067,12 +7555,6 @@ - - - - - - @@ -6082,6 +7564,12 @@ + + + + + + @@ -6097,6 +7585,12 @@ + + + + + + @@ -6119,24 +7613,12 @@ - - - - - - - - - - - - @@ -6149,6 +7631,12 @@ + + + + + + @@ -6173,10 +7661,10 @@ - + - + @@ -6188,10 +7676,7 @@ - - - - + @@ -6223,99 +7708,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -6347,42 +7747,41 @@ - - - - - - - + + + + + + + + + + + + - - - - - - + + + - - - @@ -6392,15 +7791,27 @@ + + + + + + + + + + + + @@ -6416,36 +7827,38 @@ - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - - - - + @@ -6454,6 +7867,12 @@ + + + + + + @@ -6478,18 +7897,36 @@ + + + + + + + + + + + + + + + + + + @@ -6517,19 +7954,15 @@ - - + + - + - - - - - + @@ -6539,33 +7972,72 @@ - - - - - - - - - - - - - - - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6575,17 +8047,17 @@ + + + + + - - - - - - + @@ -6647,6 +8119,12 @@ + + + + + + @@ -6659,6 +8137,18 @@ + + + + + + + + + + + + @@ -6737,6 +8227,12 @@ + + + + + + @@ -6766,15 +8262,6 @@ - - - - - - - - - @@ -6796,17 +8283,23 @@ + + + + + + - + - + @@ -6864,38 +8357,60 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + @@ -6908,48 +8423,9 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -6961,10 +8437,7 @@ - - - - + @@ -7017,9 +8490,6 @@ - - - @@ -7029,6 +8499,12 @@ + + + + + + @@ -7068,12 +8544,6 @@ - - - - - - @@ -7090,7 +8560,7 @@ - + @@ -7107,13 +8577,6 @@ - - - - - - - @@ -7129,50 +8592,17 @@ + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -7190,6 +8620,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -7241,6 +8694,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -7250,37 +8723,123 @@ + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7303,9 +8862,21 @@ + + + + + + + + + + + + @@ -7318,6 +8889,12 @@ + + + + + + @@ -7325,23 +8902,16 @@ - + - + - + - - - - + - - - - @@ -7355,6 +8925,12 @@ + + + + + + @@ -7367,18 +8943,76 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7403,10 +9037,16 @@ - + - + + + + + + + @@ -7433,6 +9073,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7443,6 +9237,8 @@ + + @@ -7479,12 +9275,19 @@ + + + + + + + @@ -7549,6 +9352,11 @@ + + + + + @@ -7609,9 +9417,26 @@ + + + + + + + + + + + + + + + + + @@ -7639,6 +9464,10 @@ + + + + @@ -7647,10 +9476,23 @@ + + + + + + + + + + + + + @@ -7660,6 +9502,9 @@ + + + @@ -7697,6 +9542,12 @@ + + + + + + @@ -7730,9 +9581,6 @@ - - - @@ -7755,15 +9603,6 @@ - - - - - - - - - @@ -7785,13 +9624,6 @@ - - - - - - - @@ -7819,8 +9651,24 @@ + + + + + + + + + + + + + + + + @@ -7836,22 +9684,28 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -7864,14 +9718,11 @@ - - - - - - - + + + + @@ -7919,103 +9770,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - @@ -8036,12 +9797,6 @@ - - - - - - @@ -8147,22 +9902,8 @@ - - - - - - - - - - - - - - + - @@ -8188,9 +9929,6 @@ - - - @@ -8234,14 +9972,7 @@ - - - - - - - - + @@ -8257,18 +9988,15 @@ - - - - - - + + + @@ -8300,16 +10028,15 @@ + + + + - - - - - + - @@ -8318,6 +10045,18 @@ + + + + + + + + + + + + @@ -8371,20 +10110,27 @@ - - - + + + + + + + - - - - - - + + + + + + + + + @@ -8397,10 +10143,81 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8412,20 +10229,7 @@ - - - - - - - - - - - - - - + @@ -8508,28 +10312,10 @@ - - - - - - - - - - - - - - - - - - @@ -8540,15 +10326,6 @@ - - - - - - - - - @@ -8601,7 +10378,7 @@ - + @@ -8681,7 +10458,7 @@ - + @@ -8863,7 +10640,6 @@ - @@ -8872,6 +10648,10 @@ + + + + @@ -8885,16 +10665,11 @@ - + - - - - - - - + + @@ -8932,9 +10707,22 @@ + + + + + + + + + + + + + @@ -8946,7 +10734,7 @@ - + @@ -9006,6 +10794,24 @@ + + + + + + + + + + + + + + + + + + @@ -9018,9 +10824,6 @@ - - - @@ -9073,13 +10876,12 @@ - - - - - - + + + + + @@ -9143,6 +10945,18 @@ + + + + + + + + + + + + @@ -9167,12 +10981,6 @@ - - - - - - @@ -9254,22 +11062,8 @@ - - - - - - - - - - - - + - - - @@ -9294,13 +11088,6 @@ - - - - - - - @@ -9325,26 +11112,12 @@ - - - - - - - - - - - - - - @@ -9387,36 +11160,17 @@ - - - - - - - - - - - - - - - - - - - @@ -9450,26 +11204,12 @@ - - - - - - - - - - - - - - @@ -9487,15 +11227,43 @@ + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9513,16 +11281,34 @@ + + + + + + + + + + + + + + + + + + - + @@ -9723,12 +11509,7 @@ - - - - - - + @@ -9750,9 +11531,7 @@ - - @@ -9771,41 +11550,41 @@ + + + + + + + + + - - - - - + + + + + - - - - - - - - - - + + + - + - + - - - + @@ -9819,10 +11598,74 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9832,8 +11675,7 @@ - - + @@ -9866,278 +11708,23 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - + @@ -10156,6 +11743,16 @@ + + + + + + + + + + @@ -10174,6 +11771,7 @@ + @@ -10186,21 +11784,30 @@ + + + + + + + + + + + + - - - - - - + + + @@ -10251,6 +11858,9 @@ + + + @@ -10273,12 +11883,6 @@ - - - - - - @@ -10382,6 +11986,12 @@ + + + + + + @@ -10404,35 +12014,16 @@ - - - - - - - - - - - + - - - - - - - - - @@ -10445,13 +12036,13 @@ - - - + + + - + @@ -10464,7 +12055,7 @@ - + @@ -10489,7 +12080,7 @@ - + @@ -10502,19 +12093,17 @@ - + - - - + @@ -10523,6 +12112,10 @@ + + + + @@ -10561,14 +12154,6 @@ - - - - - - - - @@ -10584,19 +12169,7 @@ - - - - - - - - - - - - - + @@ -10771,34 +12344,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -10812,6 +12358,7 @@ + @@ -10869,6 +12416,9 @@ + + + @@ -10893,6 +12443,19 @@ + + + + + + + + + + + + + @@ -10927,6 +12490,12 @@ + + + + + + @@ -10954,6 +12523,7 @@ + @@ -10991,31 +12561,24 @@ - + - + + + + + - - - - - - - - - - - - + @@ -11036,9 +12599,29 @@ + + + + + + + + + + + + + + + + + + + + @@ -11051,6 +12634,10 @@ + + + + @@ -11060,6 +12647,12 @@ + + + + + + @@ -11069,6 +12662,9 @@ + + + @@ -11080,9 +12676,6 @@ - - - @@ -11092,6 +12685,18 @@ + + + + + + + + + + + + @@ -11104,6 +12709,12 @@ + + + + + + @@ -11132,18 +12743,10 @@ + + - - - - - - - - - - - + @@ -11204,6 +12807,12 @@ + + + + + + @@ -11226,6 +12835,12 @@ + + + + + + @@ -11308,14 +12923,6 @@ - - - - - - - - @@ -11343,8 +12950,7 @@ - - + @@ -11352,6 +12958,7 @@ + @@ -11364,6 +12971,9 @@ + + + @@ -11381,6 +12991,9 @@ + + + @@ -11421,10 +13034,7 @@ - - - - + @@ -11461,6 +13071,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11472,7 +13131,7 @@ - + @@ -11526,57 +13185,37 @@ + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - + - + @@ -11611,25 +13250,25 @@ - + - - + + - + - - + + - + - - + + @@ -11652,6 +13291,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -11670,14 +13330,17 @@ + + + + + + - - - - - + + @@ -11715,6 +13378,9 @@ + + + @@ -11736,6 +13402,9 @@ + + + @@ -11784,15 +13453,6 @@ - - - - - - - - - @@ -11806,28 +13466,23 @@ + + + + + + + - + - - - - - - - - - - - - - + @@ -11862,12 +13517,6 @@ - - - - - - @@ -11875,12 +13524,6 @@ - - - - - - @@ -11888,15 +13531,6 @@ - - - - - - - - - @@ -11917,201 +13551,82 @@ - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - + + - - - - - - + + - - - - - + + - - - - - + + - + - - - - + - - - + - - - - + + + + + + + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + + + - - - - - - - - - @@ -12124,33 +13639,21 @@ - - + + - - + + - + - - - - - - - - - - - - - - - - + + + + @@ -12308,9 +13811,6 @@ - - - @@ -12325,15 +13825,6 @@ - - - - - - - - - @@ -12376,30 +13867,7 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -12448,6 +13916,9 @@ + + + @@ -12460,26 +13931,26 @@ - - - - - - - - + + + + + + + + @@ -12512,11 +13983,7 @@ - - - - - + @@ -12583,6 +14050,7 @@ + @@ -12623,6 +14091,9 @@ + + + @@ -12647,6 +14118,15 @@ + + + + + + + + + @@ -12698,6 +14178,9 @@ + + + @@ -12713,6 +14196,15 @@ + + + + + + + + + @@ -12745,20 +14237,8 @@ - - - - - - - - - - - - @@ -12780,18 +14260,42 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12829,6 +14333,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12856,6 +14421,7 @@ + @@ -12863,6 +14429,7 @@ + @@ -12912,6 +14479,14 @@ + + + + + + + + @@ -12940,6 +14515,10 @@ + + + + @@ -12961,21 +14540,36 @@ + + + + + + + + + + + + + + + @@ -12985,6 +14579,9 @@ + + + @@ -13024,12 +14621,27 @@ + + + + + + + + + + + + + + + @@ -13054,6 +14666,12 @@ + + + + + + @@ -13074,6 +14692,9 @@ + + + @@ -13192,12 +14813,21 @@ + + + + + + + + + @@ -13392,6 +15022,12 @@ + + + + + + @@ -13404,6 +15040,13 @@ + + + + + + + @@ -13450,15 +15093,16 @@ - - - + + + + @@ -13471,15 +15115,6 @@ - - - - - - - - - @@ -13493,15 +15128,30 @@ + + + + + + + + + + + + + + + @@ -13517,6 +15167,18 @@ + + + + + + + + + + + + @@ -13535,35 +15197,27 @@ + + + + + + - + - + - - - - - - - - - - - - - - - - - + + + @@ -13577,18 +15231,24 @@ + + + - - + + + + + @@ -13596,38 +15256,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -13640,10 +15271,10 @@ - + - + @@ -13652,18 +15283,18 @@ + + + + + + - - - - - - @@ -13705,6 +15336,12 @@ + + + + + + @@ -13731,16 +15368,20 @@ + - + + + + @@ -13756,6 +15397,12 @@ + + + + + + @@ -13801,16 +15448,20 @@ + - + + + + @@ -13936,31 +15587,9 @@ + - - - - - - - - - - - - - - - - - - - - - - - - + @@ -13984,7 +15613,6 @@ - @@ -14007,30 +15635,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + - - - @@ -14049,6 +15699,12 @@ + + + + + + @@ -14068,6 +15724,12 @@ + + + + + + @@ -14087,10 +15749,10 @@ - + - + @@ -14165,26 +15827,36 @@ - + - + - - - - - - - + + + + + + + + + + + + + + + + + @@ -14221,13 +15893,30 @@ + + + + + + + + + + + + + + + + + @@ -14276,6 +15965,7 @@ + @@ -14299,8 +15989,24 @@ + + + + + + + + + + + + + + + + @@ -14314,7 +16020,10 @@ - + + + + @@ -14391,7 +16100,6 @@ - @@ -14428,18 +16136,9 @@ - - - - - - - - - @@ -14478,100 +16177,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -14579,13 +16184,12 @@ + - - - + @@ -14606,6 +16210,9 @@ + + + @@ -14615,6 +16222,20 @@ + + + + + + + + + + + + + + @@ -14637,6 +16258,20 @@ + + + + + + + + + + + + + + @@ -14665,10 +16300,7 @@ - - - @@ -14699,15 +16331,15 @@ + + + - - - @@ -14741,12 +16373,6 @@ - - - - - - @@ -14777,6 +16403,12 @@ + + + + + + @@ -14789,15 +16421,7 @@ - - - - - - - - - + @@ -14805,6 +16429,8 @@ + + @@ -14842,6 +16468,12 @@ + + + + + + @@ -14876,6 +16508,18 @@ + + + + + + + + + + + + @@ -14908,15 +16552,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14961,11 +16646,24 @@ + + + + - - - - + + + + + + + + + + + + + @@ -15031,12 +16729,7 @@ - - - - - - + @@ -15106,21 +16799,7 @@ - - - - - - - - - - - - - - - + @@ -15157,11 +16836,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - @@ -15175,22 +16881,9 @@ + - - - - - - - - - - - - - - - + @@ -15232,6 +16925,9 @@ + + + @@ -15376,15 +17072,7 @@ - - - - - - - - - + @@ -15411,14 +17099,17 @@ + + + - - + + @@ -15444,10 +17135,10 @@ - + - + @@ -15457,12 +17148,12 @@ + + + + - - - - @@ -15473,10 +17164,13 @@ - + + + + @@ -15494,27 +17188,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - @@ -15526,6 +17232,9 @@ + + + @@ -15544,6 +17253,15 @@ + + + + + + + + + @@ -15592,12 +17310,6 @@ - - - - - - @@ -15628,16 +17340,40 @@ + + + + + + + + + + + + - + - + + + + + + + + + + + + + @@ -15660,10 +17396,8 @@ - - @@ -15678,6 +17412,7 @@ + @@ -15689,7 +17424,6 @@ - @@ -15704,26 +17438,15 @@ - - - - - - - - - - - + - - - + + @@ -15769,9 +17492,8 @@ - + - @@ -15782,9 +17504,8 @@ - + - @@ -15795,10 +17516,9 @@ - + - @@ -15807,27 +17527,12 @@ - - - - - - - - - - - - - - - + - @@ -15841,10 +17546,9 @@ - + - @@ -15853,26 +17557,12 @@ - - - - - - - - - - - - - - + - @@ -15884,10 +17574,9 @@ - + - @@ -15899,10 +17588,9 @@ - + - @@ -15914,10 +17602,9 @@ - + - @@ -15929,10 +17616,9 @@ - + - @@ -15944,10 +17630,9 @@ - + - @@ -15962,10 +17647,9 @@ - + - @@ -15980,10 +17664,9 @@ - + - @@ -15996,9 +17679,8 @@ - + - @@ -16010,10 +17692,9 @@ - + - @@ -16026,10 +17707,9 @@ - + - @@ -16042,9 +17722,8 @@ - + - @@ -16055,10 +17734,9 @@ - + - @@ -16069,9 +17747,8 @@ - + - @@ -16081,6 +17758,20 @@ + + + + + + + + + + + + + + @@ -16114,58 +17805,75 @@ - - - - + + - - - + - + - + - - + + + + + + + - + + + + + + + + + - + + + + + + + + + + + + - + - - - - - + + @@ -16176,35 +17884,455 @@ - + - + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + @@ -16218,6 +18346,18 @@ + + + + + + + + + + + + @@ -16263,6 +18403,13 @@ + + + + + + + @@ -16321,7 +18468,7 @@ - + @@ -16354,21 +18501,13 @@ + - - - - - - - - - - + @@ -16449,6 +18588,12 @@ + + + + + + @@ -16461,12 +18606,6 @@ - - - - - - @@ -17050,42 +19189,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - @@ -17172,10 +19282,7 @@ - - - - + @@ -17243,10 +19350,8 @@ - - @@ -17255,7 +19360,6 @@ - @@ -17263,54 +19367,9 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -17325,6 +19384,7 @@ + @@ -17333,13 +19393,6 @@ - - - - - - - @@ -17384,13 +19437,6 @@ - - - - - - - @@ -17407,12 +19453,12 @@ - + - + - + @@ -17434,6 +19480,12 @@ + + + + + + @@ -17505,6 +19557,9 @@ + + + @@ -17575,6 +19630,9 @@ + + + @@ -17596,6 +19654,12 @@ + + + + + + @@ -17626,6 +19690,9 @@ + + + @@ -17760,6 +19827,375 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17830,9 +20266,7 @@ - - - + @@ -17852,6 +20286,9 @@ + + + @@ -17924,6 +20361,9 @@ + + + @@ -17952,20 +20392,9 @@ + - - - - - - - - - - - - - + @@ -17992,11 +20421,9 @@ - - - + @@ -18009,44 +20436,13 @@ + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -18072,9 +20468,6 @@ - - - @@ -18084,9 +20477,6 @@ - - - @@ -18097,100 +20487,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -18204,12 +20501,6 @@ - - - - - - @@ -18222,12 +20513,6 @@ - - - - - - @@ -18236,6 +20521,9 @@ + + + @@ -18251,6 +20539,13 @@ + + + + + + + @@ -18290,72 +20585,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -18389,6 +20618,9 @@ + + + @@ -18463,8 +20695,6 @@ - - @@ -18482,14 +20712,6 @@ - - - - - - - - @@ -18502,6 +20724,12 @@ + + + + + + @@ -18526,6 +20754,15 @@ + + + + + + + + + @@ -18573,14 +20810,6 @@ - - - - - - - - @@ -18615,53 +20844,380 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + - + + + + + + - + - + - - - - - - - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + @@ -18672,6 +21228,9 @@ + + + @@ -18753,22 +21312,7 @@ - - - - - - - - - - - - - - - - + @@ -18846,11 +21390,7 @@ - - - - - + @@ -18984,18 +21524,7 @@ - - - - - - - - - - - - + @@ -19186,7 +21715,6 @@ - @@ -19202,16 +21730,17 @@ - + + + + - - @@ -19228,13 +21757,6 @@ - - - - - - - @@ -19319,9 +21841,6 @@ - - - @@ -19334,8 +21853,21 @@ + + + + + + + + + + + + + @@ -19410,7 +21942,7 @@ - + @@ -19514,7 +22046,7 @@ - + @@ -19593,7 +22125,7 @@ - + @@ -19646,9 +22178,6 @@ - - - @@ -19768,7 +22297,7 @@ - + @@ -19892,81 +22421,29 @@ - + - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -19987,6 +22464,8 @@ + + @@ -20015,7 +22494,7 @@ - + @@ -20062,8 +22541,8 @@ - - + + @@ -20120,6 +22599,11 @@ + + + + + @@ -20270,6 +22754,8 @@ + + @@ -20328,6 +22814,12 @@ + + + + + + @@ -20403,7 +22895,7 @@ - + @@ -20443,50 +22935,40 @@ - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - + - + - - - - - - + + + + + + + + + + + + + + + + + @@ -20495,16 +22977,19 @@ - + + + + - + @@ -20516,7 +23001,7 @@ - + @@ -20524,6 +23009,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -20538,15 +23043,6 @@ - - - - - - - - - @@ -20589,32 +23085,39 @@ - + - + - + - - + + + + + + + + + @@ -20622,7 +23125,6 @@ - @@ -20640,8 +23142,9 @@ - + + @@ -20652,27 +23155,28 @@ + - + + + + + + + + + - - - - - - - - - + @@ -20689,12 +23193,28 @@ - + + + + + + + + + + + + + + + + + @@ -20719,12 +23239,6 @@ - - - - - - @@ -20737,6 +23251,12 @@ + + + + + + @@ -20755,6 +23275,10 @@ + + + + @@ -20773,6 +23297,12 @@ + + + + + + @@ -20789,10 +23319,16 @@ - + - + + + + + + + @@ -20835,12 +23371,6 @@ - - - - - - @@ -20853,12 +23383,6 @@ - - - - - - @@ -20989,11 +23513,11 @@ - + - - + + @@ -21046,22 +23570,16 @@ - - - - - - - + - + @@ -21116,14 +23634,81 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -21133,6 +23718,9 @@ + + + @@ -21150,6 +23738,13 @@ + + + + + + + @@ -21209,7 +23804,7 @@ - + @@ -21217,6 +23812,12 @@ + + + + + + @@ -21235,13 +23836,19 @@ - - + + - + - + + + + + + + @@ -21259,8 +23866,17 @@ - - + + + + + + + + + + + @@ -21268,7 +23884,16 @@ - + + + + + + + + + + @@ -21283,23 +23908,20 @@ - - - - - - - + - - + + + + + @@ -21307,16 +23929,43 @@ + + + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -21334,6 +23983,9 @@ + + + @@ -21341,12 +23993,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -21357,15 +24064,21 @@ - - - - - + + - + + + + + + + + + + @@ -21381,6 +24094,18 @@ + + + + + + + + + + + + @@ -21393,24 +24118,34 @@ + + + + + + + + + + + + - - - - + + + + - - - + @@ -21429,9 +24164,18 @@ + + + + + + + + + @@ -21453,47 +24197,47 @@ - + - + - + - + - + - + - + @@ -21507,7 +24251,41 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -21515,33 +24293,15 @@ - - - - - - - - - - + - - - - - - - - - @@ -21554,6 +24314,12 @@ + + + + + + @@ -21563,13 +24329,10 @@ - - - - + - + @@ -21586,7 +24349,7 @@ - + @@ -21594,16 +24357,23 @@ + + + + + + + - + - + @@ -21612,11 +24382,10 @@ - - + + - - + @@ -21626,42 +24395,55 @@ + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + @@ -21680,10 +24462,10 @@ - + - + @@ -21692,6 +24474,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -21716,19 +24546,24 @@ + + + + + + + + + + + + - - - - - - - @@ -21748,12 +24583,25 @@ - + + + + + + + + + + + + + + @@ -21772,26 +24620,46 @@ - + - - + - + - - + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -21809,12 +24677,15 @@ - + + + + @@ -21861,8 +24732,11 @@ - + + + + @@ -21895,60 +24769,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - @@ -21956,6 +24789,7 @@ + @@ -21968,21 +24802,18 @@ + + + - - - - - - @@ -21995,12 +24826,6 @@ - - - - - - @@ -22034,12 +24859,6 @@ - - - - - - @@ -22075,12 +24894,18 @@ + + + + + + @@ -22103,22 +24928,13 @@ - - - - - - - - - - + @@ -22133,6 +24949,9 @@ + + + @@ -22149,6 +24968,12 @@ + + + + + + @@ -22183,6 +25008,12 @@ + + + + + + @@ -22244,12 +25075,6 @@ - - - - - - @@ -22267,12 +25092,28 @@ + + + + + + + + + + + + + + + + @@ -22291,6 +25132,13 @@ + + + + + + + @@ -22347,15 +25195,6 @@ - - - - - - - - - @@ -22370,10 +25209,10 @@ - + - + @@ -22419,6 +25258,12 @@ + + + + + + @@ -22431,14 +25276,6 @@ - - - - - - - - @@ -22533,7 +25370,7 @@ - + @@ -22552,6 +25389,15 @@ + + + + + + + + + @@ -22566,24 +25412,19 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -22603,11 +25444,11 @@ - - - - - + + + + + @@ -22633,7 +25474,7 @@ - + @@ -22643,14 +25484,6 @@ - - - - - - - - @@ -22682,7 +25515,7 @@ - + @@ -22718,10 +25551,10 @@ - - - - + + + + @@ -22733,16 +25566,23 @@ - - - - - - - + + + + + - - + + + + + + + + + + + @@ -22750,13 +25590,62 @@ + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -22764,6 +25653,8 @@ + + @@ -22805,6 +25696,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -22847,7 +25766,7 @@ - + @@ -22855,7 +25774,14 @@ - + + + + + + + + @@ -22955,6 +25881,16 @@ + + + + + + + + + + @@ -22973,40 +25909,24 @@ - - - - - - - - - - - - - - - - - - + + + + - - - - - - - + + + + + @@ -23016,7 +25936,6 @@ - @@ -23139,7 +26058,10 @@ + + + @@ -23178,7 +26100,6 @@ - @@ -23246,6 +26167,13 @@ + + + + + + + @@ -23259,7 +26187,7 @@ - + @@ -23276,6 +26204,9 @@ + + + @@ -23343,9 +26274,15 @@ - - - + + + + + + + + + @@ -23355,22 +26292,11 @@ + - - - - - - - - - - - - - - - + + + @@ -23383,6 +26309,12 @@ + + + + + + @@ -23395,6 +26327,9 @@ + + + @@ -23461,12 +26396,16 @@ + + - + + + @@ -23480,6 +26419,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -23505,11 +26496,27 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -23592,20 +26599,15 @@ - - - - - - - + + @@ -23614,8 +26616,8 @@ - + @@ -23626,11 +26628,7 @@ - - - - - + @@ -23652,6 +26650,9 @@ + + + @@ -24086,10 +27087,32 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -24099,24 +27122,9 @@ - - - - - - - - - - - - - - - - - - + + + @@ -24160,6 +27168,12 @@ + + + + + + @@ -24263,60 +27277,219 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -24335,7 +27508,7 @@ - + @@ -24380,15 +27553,6 @@ - - - - - - - - - @@ -24397,12 +27561,28 @@ - - - + + + + + + + + + + + + + + + + + + + @@ -24415,9 +27595,15 @@ + + + + + + @@ -24427,6 +27613,9 @@ + + + @@ -24436,23 +27625,31 @@ + + + + + + + + + + + + - - - - + - + - @@ -24463,14 +27660,13 @@ - + - + - @@ -24479,14 +27675,13 @@ - + - + - @@ -24498,14 +27693,13 @@ - + - + - @@ -24514,14 +27708,13 @@ - + - + - @@ -24530,13 +27723,12 @@ - + - + - @@ -24544,14 +27736,13 @@ - + - + - @@ -24561,14 +27752,13 @@ - + - + - @@ -24577,13 +27767,12 @@ - + - + - @@ -24592,14 +27781,13 @@ - + - + - @@ -24609,13 +27797,12 @@ - + - + - @@ -24623,14 +27810,13 @@ - + - + - @@ -24638,14 +27824,13 @@ - + - + - @@ -24654,28 +27839,12 @@ - + - + - - - - - - - - - - - - - - - - @@ -24685,14 +27854,13 @@ - + - + - @@ -24701,14 +27869,13 @@ - + - + - @@ -24720,14 +27887,13 @@ - + - + - @@ -24737,28 +27903,28 @@ - + - + - + - + + - + - + - @@ -24767,13 +27933,12 @@ - + - + - @@ -24788,9 +27953,6 @@ - - - @@ -24809,8 +27971,11 @@ - - + + + + + @@ -24829,28 +27994,12 @@ - - - - - - - - - - - - - - - - - + @@ -24858,23 +28007,43 @@ - + - - - + + + + + + + - - + + + + + + + - - + + + + + + + + + - - + + + + + + @@ -25005,16 +28174,6 @@ - - - - - - - - - - @@ -25039,17 +28198,6 @@ - - - - - - - - - - - @@ -25059,6 +28207,13 @@ + + + + + + + @@ -25102,15 +28257,6 @@ - - - - - - - - - @@ -25152,309 +28298,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -25518,45 +28361,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -25568,13 +28372,6 @@ - - - - - - - @@ -25595,34 +28392,15 @@ - - - - - + + + + + - - - - - - - - - - - - - - - - - - - @@ -25684,80 +28462,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - + - + @@ -25765,25 +28483,25 @@ - + - + - + - + - + - + @@ -25792,23 +28510,23 @@ - + - + - + - + @@ -25816,52 +28534,220 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -25881,13 +28767,6 @@ - - - - - - - @@ -25928,115 +28807,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -26120,32 +28890,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -26164,65 +28908,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/gtkdotnet/Graphics.cs b/gtkdotnet/Graphics.cs index d27275d82..84634e230 100644 --- a/gtkdotnet/Graphics.cs +++ b/gtkdotnet/Graphics.cs @@ -48,13 +48,14 @@ namespace Gtk.DotNet { [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr gdk_x11_drawable_get_xid (IntPtr raw); - public static System.Drawing.Graphics FromDrawable (Gdk.Drawable drawable) + public static System.Drawing.Graphics FromDrawable (Gdk.Window drawable) { return FromDrawable (drawable, true); } - public static System.Drawing.Graphics FromDrawable(Gdk.Drawable drawable, bool double_buffered) + public static System.Drawing.Graphics FromDrawable(Gdk.Window drawable, bool double_buffered) { +#if FIXME30 IntPtr x_drawable; int x_off = 0, y_off = 0; @@ -65,7 +66,7 @@ namespace Gtk.DotNet { if (drawable is Gdk.Window && double_buffered) ((Gdk.Window)drawable).GetInternalPaintInfo(out drawable, out x_off, out y_off); - Gdk.GC gcc = new Gdk.GC(drawable); + Cairo.Context gcc = new Gdk.GC(drawable); IntPtr windc = gdk_win32_hdc_get(drawable.Handle, gcc.Handle, 0); @@ -98,6 +99,9 @@ namespace Gtk.DotNet { return g; } +#else + throw new NotSupportedException (); +#endif } } diff --git a/gtkdotnet/Makefile.am b/gtkdotnet/Makefile.am index a60d3f2f1..1a5458762 100644 --- a/gtkdotnet/Makefile.am +++ b/gtkdotnet/Makefile.am @@ -16,7 +16,7 @@ DISTCLEANFILES = $(ASSEMBLY).config POLICY_ASSEMBLIES = $(addsuffix .$(ASSEMBLY), $(addprefix policy., $(POLICY_VERSIONS))) POLICY_CONFIGS = $(addsuffix .config, $(addprefix policy., $(POLICY_VERSIONS))) -references = ../glib/glib-sharp.dll ../gio/gio-sharp.dll ../pango/pango-sharp.dll ../gdk/gdk-sharp.dll +references = ../glib/glib-sharp.dll ../gio/gio-sharp.dll ../cairo/cairo-sharp.dll ../pango/pango-sharp.dll ../gdk/gdk-sharp.dll build_references = $(addprefix -r:, $(references)) -r:System.Drawing.dll sources = \ diff --git a/parser/gapi2xml.pl b/parser/gapi2xml.pl index fcfcd21ac..1f91af824 100755 --- a/parser/gapi2xml.pl +++ b/parser/gapi2xml.pl @@ -165,6 +165,13 @@ while ($line = ) { $typefuncs{lc($1)} = $line; } elsif ($line =~ /^G_DEFINE_BOXED_TYPE\s*\(\s*(\w+)/) { $boxdefs{$1} = $line; + } elsif ($line =~ /^G_DEFINE_INTERFACE\s*\(\s*(\w+)\s*,\s*(\w+)/) { + if (exists($get_types{"$2_get_type"})) { + $typedef = $get_types{"$2_get_type"}; + if (!exists($ifaces{$typedef})) { + $ifaces{$typedef} = "$1Interface"; + } + } } elsif ($line =~ /^(deprecated)?(const|G_CONST_RETURN)?\s*(struct\s+)?\w+\s*\**(\s*(const|G_CONST_RETURN)\s*\**)?\s*(\w+)\s*\(/) { $fname = $6; $fdef = ""; @@ -211,12 +218,14 @@ while ($line = ) { $boxdefs{$1} = $line; } elsif ($line =~ /^BUILTIN\s*\{\s*\"(\w+)\".*GTK_TYPE_(ENUM|FLAGS)/) { # ignoring these for now. - } elsif ($line =~ /^(deprecated)?\#define/) { + } elsif ($line =~ /^(deprecated)?\#\s*define/) { my $test_ns = uc ($ns); - if ($line =~ /^deprecated\#define\s+(\w+)\s+\"(.*)\"/) { + if ($line =~ /^deprecated\#\s*define\s+(\w+)\s+\"(.*)\"/) { $defines{"deprecated$1"} = $2; - } elsif ($line =~ /\#define\s+(\w+)\s+\"(.*)\"/) { + } elsif ($line =~ /\#\s*define\s+(\w+)\s+\"(.*)\"/) { $defines{$1} = $2; + } elsif ($line =~ /\#\s*define\s+(\w+)\s+\(?\s*(\w+_get_type)/) { + $get_types{$2} = $1; } } elsif ($line !~ /\/\*/) { print $line; @@ -324,16 +333,24 @@ foreach $type (sort(keys(%ifaces))) { $elem_table{lc($inst)} = $iface_el; - $classdef = $sdefs{$1} if ($ifacetype =~ /struct\s+(\w+)/); - my @signal_vms; - if ($initfunc) { - @signal_vms = parseInitFunc($iface_el, $initfunc, $classdef); + if ($ifacetype =~ /struct\s+(\w+)/) { + $classdef = $sdefs{$1}; } else { - warn "Don't have an init func for $inst.\n" if $debug; - # my @signal_vms; + $classdef = 0; } - addClassElem ($iface_el, $classdef, @signal_vms) if ($classdef); + if ($classdef) { + my @signal_vms; + if ($initfunc) { + @signal_vms = parseInitFunc($iface_el, $initfunc, $classdef); + } else { + warn "Don't have an init func for $inst.\n" if $debug; + # my @signal_vms; + } + addClassElem ($iface_el, $classdef, @signal_vms); + } else { + $iface_el->setAttribute("consume_only", "1"); + } } diff --git a/parser/gapi_pp.pl b/parser/gapi_pp.pl index c07b94acc..d570b229c 100755 --- a/parser/gapi_pp.pl +++ b/parser/gapi_pp.pl @@ -72,6 +72,8 @@ foreach $fname (@hdrs) { $def = $line; while ($def !~ /\".*\"/) {$def .= ($line = );} print $def; + } elsif ($line =~ /#\s*define\s+\w+\s*\(\s*\w+_get_type\s*\(\)\)/) { + print $line; } elsif ($line =~ /#\s*define\s+\w+\s*\D+/) { $def = $line; while ($line =~ /\\\n/) {$def .= ($line = );} @@ -205,9 +207,9 @@ foreach $fname (@srcs, @privhdrs) { } while ($line = ) { - next if ($line !~ /^(struct|typedef struct.*;|\w+_class_init|\w+_base_init|\w+_get_type\b|G_DEFINE_TYPE_WITH_CODE|G_DEFINE_BOXED_TYPE)/); + next if ($line !~ /^(struct|typedef struct.*;|\w+_class_init|\w+_base_init|\w+_get_type\b|G_DEFINE_TYPE_WITH_CODE|G_DEFINE_BOXED_TYPE|G_DEFINE_INTERFACE)/); - if ($line =~ /^G_DEFINE_(TYPE_WITH_CODE|BOXED_TYPE)/) { + if ($line =~ /^G_DEFINE_(TYPE_WITH_CODE|BOXED_TYPE|INTERFACE)/) { my $macro; my $parens = 0; do { diff --git a/sample/GtkDemo/Makefile.am b/sample/GtkDemo/Makefile.am index 57fca2e15..89f25c486 100644 --- a/sample/GtkDemo/Makefile.am +++ b/sample/GtkDemo/Makefile.am @@ -7,7 +7,7 @@ assemblies = \ $(top_builddir)/gdk/gdk-sharp.dll \ $(top_builddir)/gtk/gtk-sharp.dll -references = $(addprefix -r:, $(assemblies) +references = $(addprefix -r:, $(assemblies)) TARGETS = GtkDemo.exe DEBUGS = $(addsuffix .mdb, $(TARGETS)) CLEANFILES = $(TARGETS) $(DEBUGS) diff --git a/sample/Makefile.am b/sample/Makefile.am index 02dd84a55..ff3f63790 100755 --- a/sample/Makefile.am +++ b/sample/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = test GtkDemo pixmaps valtest opaquetest gio gtk-gio +SUBDIRS = GtkDemo pixmaps valtest opaquetest gio gtk-gio if ENABLE_DOTNET DOTNET_TARGETS=drawing-sample.exe diff --git a/sample/test/Makefile.am b/sample/test/Makefile.am index 9e962e7a8..9bf18dadf 100644 --- a/sample/test/Makefile.am +++ b/sample/test/Makefile.am @@ -1,6 +1,14 @@ TARGETS = WidgetViewer.exe -assemblies=../../glib/glib-sharp.dll ../../pango/pango-sharp.dll ../../atk/atk-sharp.dll ../../gdk/gdk-sharp.dll ../../gtk/gtk-sharp.dll +assemblies= \ + $(top_builddir)/glib/glib-sharp.dll \ + $(top_builddir)/gio/gio-sharp.dll \ + $(top_builddir)/cairo/cairo-sharp.dll \ + $(top_builddir)/pango/pango-sharp.dll \ + $(top_builddir)/atk/atk-sharp.dll \ + $(top_builddir)/gdk/gdk-sharp.dll \ + $(top_builddir)/gtk/gtk-sharp.dll + references = $(addprefix -r:, $(assemblies)) noinst_SCRIPTS = $(TARGETS) @@ -17,7 +25,6 @@ sources = \ TestDialog.cs \ TestFlipping.cs \ TestSizeGroup.cs \ - TestCombo.cs \ TestComboBox.cs \ WidgetViewer.cs diff --git a/sample/test/TestCombo.cs b/sample/test/TestCombo.cs deleted file mode 100644 index a5cb147d7..000000000 --- a/sample/test/TestCombo.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// TestCombo.cs -// -// Author: Duncan Mak (duncan@ximian.com) -// -// Copyright (C) 2003, Duncan Mak, Ximian Inc. -// - -using System; - -using Gtk; - -namespace WidgetViewer { - public class TestCombo - { - static Window window = null; - static Gtk.Combo combo = null; - - public static Gtk.Window Create () - { - window = new Window ("GtkCombo"); - window.SetDefaultSize (200, 100); - - VBox box1 = new VBox (false, 0); - window.Add (box1); - - VBox box2 = new VBox (false, 10); - box2.BorderWidth = 10; - box1.PackStart (box2, true, true, 0); - - combo = new Gtk.Combo (); - string[] pop = {"Foo", "Bar"}; - combo.PopdownStrings = pop; - combo.Entry.Activated += new EventHandler (OnComboActivated); - box2.PackStart (combo, true, true, 0); - - HSeparator separator = new HSeparator (); - - box1.PackStart (separator, false, false, 0); - - box2 = new VBox (false, 10); - box2.BorderWidth = 10; - box1.PackStart (box2, false, false, 0); - - Button button = new Button (Stock.Close); - button.Clicked += new EventHandler (OnCloseClicked); - button.CanDefault = true; - - box2.PackStart (button, true, true, 0); - button.GrabDefault (); - return window; - } - - static void OnCloseClicked (object o, EventArgs args) - { - window.Destroy (); - } - - static void OnComboActivated (object o, EventArgs args) - { - string text = ((Gtk.Entry) o).Text; - - // combo.AppendString (text); - // combo.SetPopdownStrings (text); - } - } -} - - diff --git a/sources/sources.xml b/sources/sources.xml index fd5d244e3..11be899f6 100644 --- a/sources/sources.xml +++ b/sources/sources.xml @@ -114,6 +114,7 @@ gtkalias.h + gtkappchooseronline.h gtkbuiltincache.h gtkdndcursors.h gtkfilechooserdefault.c