From a410d4297501f302f173420b009ea71db70c25bb Mon Sep 17 00:00:00 2001 From: Bertrand Lorentz Date: Sun, 5 Aug 2012 16:32:41 +0200 Subject: [PATCH] gtk: Move all .custom files to partial classes There are no real code changes in this commit, just a lot of file renaming and boilerplate additions. A few .custom files are just removed, because the corresponding class in GTK is gone, so they were not really used anymore. Some files need to be re-indented, but that will be done in a separate commit, so that git can track the renamed files correctly and not be confused by all the changes. --- gtk/{Accel.custom => Accel.cs} | 12 +- gtk/{AccelKey.custom => AccelKey.cs} | 8 + gtk/{Action.custom => Action.cs} | 13 +- gtk/{ActionGroup.custom => ActionGroup.cs} | 11 +- gtk/{Adjustment.custom => Adjustment.cs} | 13 +- gtk/{Bin.custom => Bin.cs} | 13 +- gtk/{Builder.custom => Builder.cs} | 11 +- gtk/{Button.custom => Button.cs} | 12 +- gtk/{Calendar.custom => Calendar.cs} | 11 +- gtk/{CellLayout.custom => CellLayout.cs} | 9 +- ...outAdapter.custom => CellLayoutAdapter.cs} | 9 +- gtk/{CellRenderer.custom => CellRenderer.cs} | 15 +- gtk/{EntryCompletion.custom => CellView.cs} | 9 +- ...{CheckMenuItem.custom => CheckMenuItem.cs} | 15 +- gtk/{Clipboard.custom => Clipboard.cs} | 11 +- ...olorSelection.custom => ColorSelection.cs} | 11 +- ...nDialog.custom => ColorSelectionDialog.cs} | 12 +- gtk/{ComboBox.custom => ComboBox.cs} | 10 +- gtk/{Container.custom => Container.cs} | 11 +- gtk/{Dialog.custom => Dialog.cs} | 12 +- gtk/{Drag.custom => Drag.cs} | 14 +- gtk/{Entry.custom => Entry.cs} | 11 +- gtk/{CellView.custom => EntryCompletion.cs} | 9 +- ...oserDialog.custom => FileChooserDialog.cs} | 11 +- gtk/Frame.cs | 34 ++++ gtk/Frame.custom | 25 --- gtk/{HBox.custom => HBox.cs} | 8 + gtk/{HScale.custom => HScale.cs} | 15 +- gtk/{IconFactory.custom => IconFactory.cs} | 10 +- gtk/{IconSet.custom => IconSet.cs} | 9 + gtk/{IconTheme.custom => IconTheme.cs} | 12 +- gtk/{IconView.custom => IconView.cs} | 12 +- gtk/{Image.custom => Image.cs} | 14 +- ...{ImageMenuItem.custom => ImageMenuItem.cs} | 15 +- gtk/{Init.custom => Init.cs} | 11 +- gtk/ItemFactory.custom | 43 ----- gtk/{Label.custom => Label.cs} | 12 +- gtk/{ListStore.custom => ListStore.cs} | 14 +- gtk/Makefile.am | 173 +++++++++--------- gtk/{Menu.custom => Menu.cs} | 14 +- gtk/{MenuItem.custom => MenuItem.cs} | 12 +- ...{MessageDialog.custom => MessageDialog.cs} | 10 + gtk/{Notebook.custom => Notebook.cs} | 10 +- gtk/{PaperSize.custom => PaperSize.cs} | 13 +- gtk/{Plug.custom => Plug.cs} | 16 +- gtk/{Printer.custom => Printer.cs} | 12 +- gtk/{RadioButton.custom => RadioButton.cs} | 10 +- ...{RadioMenuItem.custom => RadioMenuItem.cs} | 11 +- ...ioToolButton.custom => RadioToolButton.cs} | 15 +- ...{RecentManager.custom => RecentManager.cs} | 11 +- ...crolledWindow.custom => ScrolledWindow.cs} | 23 ++- ...{SelectionData.custom => SelectionData.cs} | 11 +- gtk/{Settings.custom => Settings.cs} | 11 +- gtk/{SpinButton.custom => SpinButton.cs} | 14 +- gtk/{StatusIcon.custom => StatusIcon.cs} | 12 +- gtk/{Stock.custom => Stock.cs} | 11 +- gtk/{StockItem.custom => StockItem.cs} | 10 +- gtk/{Style.custom => Style.cs} | 16 +- gtk/{Table.custom => Table.cs} | 0 gtk/{Target.custom => Target.cs} | 13 +- gtk/{TargetEntry.custom => TargetEntry.cs} | 11 +- gtk/{TargetList.custom => TargetList.cs} | 11 +- gtk/TargetPair.custom | 33 ---- ...extAttributes.custom => TextAttributes.cs} | 9 +- gtk/{TextBuffer.custom => TextBuffer.cs} | 11 +- ...tChildAnchor.custom => TextChildAnchor.cs} | 11 +- gtk/{TextIter.custom => TextIter.cs} | 10 +- gtk/{TextMark.custom => TextMark.cs} | 14 +- gtk/{TextTag.custom => TextTag.cs} | 9 +- gtk/{TextView.custom => TextView.cs} | 16 +- gtk/TooltipsData.custom | 39 ---- gtk/{TreeIter.custom => TreeIter.cs} | 9 +- gtk/{TreeModel.custom => TreeModel.cs} | 11 +- ...odelAdapter.custom => TreeModelAdapter.cs} | 11 +- ...eModelFilter.custom => TreeModelFilter.cs} | 10 +- ...{TreeModelSort.custom => TreeModelSort.cs} | 13 +- gtk/{TreePath.custom => TreePath.cs} | 10 +- ...{TreeSelection.custom => TreeSelection.cs} | 10 +- gtk/{TreeStore.custom => TreeStore.cs} | 14 +- gtk/{TreeView.custom => TreeView.cs} | 13 +- ...reeViewColumn.custom => TreeViewColumn.cs} | 13 +- gtk/{UIManager.custom => UIManager.cs} | 13 +- gtk/{VBox.custom => VBox.cs} | 8 + gtk/{VScale.custom => VScale.cs} | 15 +- gtk/{Viewport.custom => Viewport.cs} | 7 + gtk/{Widget.custom => Widget.cs} | 16 +- gtk/{Window.custom => Window.cs} | 14 +- 87 files changed, 855 insertions(+), 441 deletions(-) rename gtk/{Accel.custom => Accel.cs} (97%) rename gtk/{AccelKey.custom => AccelKey.cs} (92%) rename gtk/{Action.custom => Action.cs} (88%) rename gtk/{ActionGroup.custom => ActionGroup.cs} (94%) rename gtk/{Adjustment.custom => Adjustment.cs} (92%) rename gtk/{Bin.custom => Bin.cs} (89%) rename gtk/{Builder.custom => Builder.cs} (98%) rename gtk/{Button.custom => Button.cs} (90%) rename gtk/{Calendar.custom => Calendar.cs} (93%) rename gtk/{CellLayout.custom => CellLayout.cs} (86%) rename gtk/{CellLayoutAdapter.custom => CellLayoutAdapter.cs} (88%) rename gtk/{CellRenderer.custom => CellRenderer.cs} (96%) rename gtk/{EntryCompletion.custom => CellView.cs} (90%) rename gtk/{CheckMenuItem.custom => CheckMenuItem.cs} (89%) rename gtk/{Clipboard.custom => Clipboard.cs} (97%) rename gtk/{ColorSelection.custom => ColorSelection.cs} (93%) rename gtk/{ColorSelectionDialog.custom => ColorSelectionDialog.cs} (87%) rename gtk/{ComboBox.custom => ComboBox.cs} (94%) rename gtk/{Container.custom => Container.cs} (97%) rename gtk/{Dialog.custom => Dialog.cs} (93%) rename gtk/{Drag.custom => Drag.cs} (89%) rename gtk/{Entry.custom => Entry.cs} (87%) rename gtk/{CellView.custom => EntryCompletion.cs} (89%) rename gtk/{FileChooserDialog.custom => FileChooserDialog.cs} (94%) create mode 100644 gtk/Frame.cs delete mode 100644 gtk/Frame.custom rename gtk/{HBox.custom => HBox.cs} (91%) rename gtk/{HScale.custom => HScale.cs} (90%) rename gtk/{IconFactory.custom => IconFactory.cs} (91%) rename gtk/{IconSet.custom => IconSet.cs} (94%) rename gtk/{IconTheme.custom => IconTheme.cs} (96%) rename gtk/{IconView.custom => IconView.cs} (91%) rename gtk/{Image.custom => Image.cs} (95%) rename gtk/{ImageMenuItem.custom => ImageMenuItem.cs} (88%) rename gtk/{Init.custom => Init.cs} (88%) delete mode 100644 gtk/ItemFactory.custom rename gtk/{Label.custom => Label.cs} (89%) rename gtk/{ListStore.custom => ListStore.cs} (97%) rename gtk/{Menu.custom => Menu.cs} (91%) rename gtk/{MenuItem.custom => MenuItem.cs} (89%) rename gtk/{MessageDialog.custom => MessageDialog.cs} (94%) rename gtk/{Notebook.custom => Notebook.cs} (88%) rename gtk/{PaperSize.custom => PaperSize.cs} (92%) rename gtk/{Plug.custom => Plug.cs} (91%) rename gtk/{Printer.custom => Printer.cs} (90%) rename gtk/{RadioButton.custom => RadioButton.cs} (89%) rename gtk/{RadioMenuItem.custom => RadioMenuItem.cs} (92%) rename gtk/{RadioToolButton.custom => RadioToolButton.cs} (91%) rename gtk/{RecentManager.custom => RecentManager.cs} (88%) rename gtk/{ScrolledWindow.custom => ScrolledWindow.cs} (76%) rename gtk/{SelectionData.custom => SelectionData.cs} (94%) rename gtk/{Settings.custom => Settings.cs} (87%) rename gtk/{SpinButton.custom => SpinButton.cs} (89%) rename gtk/{StatusIcon.custom => StatusIcon.cs} (96%) rename gtk/{Stock.custom => Stock.cs} (94%) rename gtk/{StockItem.custom => StockItem.cs} (89%) rename gtk/{Style.custom => Style.cs} (98%) rename gtk/{Table.custom => Table.cs} (100%) rename gtk/{Target.custom => Target.cs} (89%) rename gtk/{TargetEntry.custom => TargetEntry.cs} (87%) rename gtk/{TargetList.custom => TargetList.cs} (90%) delete mode 100644 gtk/TargetPair.custom rename gtk/{TextAttributes.custom => TextAttributes.cs} (89%) rename gtk/{TextBuffer.custom => TextBuffer.cs} (97%) rename gtk/{TextChildAnchor.custom => TextChildAnchor.cs} (87%) rename gtk/{TextIter.custom => TextIter.cs} (95%) rename gtk/{TextMark.custom => TextMark.cs} (87%) rename gtk/{TextTag.custom => TextTag.cs} (89%) rename gtk/{TextView.custom => TextView.cs} (87%) delete mode 100644 gtk/TooltipsData.custom rename gtk/{TreeIter.custom => TreeIter.cs} (92%) rename gtk/{TreeModel.custom => TreeModel.cs} (92%) rename gtk/{TreeModelAdapter.custom => TreeModelAdapter.cs} (97%) rename gtk/{TreeModelFilter.custom => TreeModelFilter.cs} (98%) rename gtk/{TreeModelSort.custom => TreeModelSort.cs} (97%) rename gtk/{TreePath.custom => TreePath.cs} (92%) rename gtk/{TreeSelection.custom => TreeSelection.cs} (90%) rename gtk/{TreeStore.custom => TreeStore.cs} (98%) rename gtk/{TreeView.custom => TreeView.cs} (96%) rename gtk/{TreeViewColumn.custom => TreeViewColumn.cs} (94%) rename gtk/{UIManager.custom => UIManager.cs} (93%) rename gtk/{VBox.custom => VBox.cs} (91%) rename gtk/{VScale.custom => VScale.cs} (89%) rename gtk/{Viewport.custom => Viewport.cs} (92%) rename gtk/{Widget.custom => Widget.cs} (98%) rename gtk/{Window.custom => Window.cs} (94%) diff --git a/gtk/Accel.custom b/gtk/Accel.cs similarity index 97% rename from gtk/Accel.custom rename to gtk/Accel.cs index cb667cd64..2e7ec8ef7 100644 --- a/gtk/Accel.custom +++ b/gtk/Accel.cs @@ -1,4 +1,4 @@ -// Accel.custom - customizations to Gtk.Accel +// Accel.cs - customizations to Gtk.Accel // // Authors: Mike Kestner // @@ -18,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Accel { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_save(IntPtr file_name); @@ -128,4 +135,5 @@ result [i] = list [i] as AccelGroup; return result; } - + } +} diff --git a/gtk/AccelKey.custom b/gtk/AccelKey.cs similarity index 92% rename from gtk/AccelKey.custom rename to gtk/AccelKey.cs index 59a83994d..a264f7be2 100644 --- a/gtk/AccelKey.custom +++ b/gtk/AccelKey.cs @@ -13,10 +13,18 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial struct AccelKey { + public AccelKey (Gdk.Key key, Gdk.ModifierType mods, Gtk.AccelFlags flags) { this.Key = key; this.AccelMods = mods; this._bitfield0 = 0; this.AccelFlags = flags; +} + } } diff --git a/gtk/Action.custom b/gtk/Action.cs similarity index 88% rename from gtk/Action.custom rename to gtk/Action.cs index a92ceef34..a9c79c627 100644 --- a/gtk/Action.custom +++ b/gtk/Action.cs @@ -1,11 +1,9 @@ -// Gtk.Action.custom - Gtk Action class customizations +// Gtk.Action.cs - Gtk Action class customizations // // Author: John Luke // // Copyright (C) 2004 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. @@ -20,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Action { + public Action (string name, string label) : this (name, label, null, null) { } @@ -37,3 +42,5 @@ return result; } } + } +} diff --git a/gtk/ActionGroup.custom b/gtk/ActionGroup.cs similarity index 94% rename from gtk/ActionGroup.custom rename to gtk/ActionGroup.cs index 485fa7846..39d1b6f02 100644 --- a/gtk/ActionGroup.custom +++ b/gtk/ActionGroup.cs @@ -1,4 +1,4 @@ -// ActionGroup.custom - Syntactic C# sugar for easily defining Actions. +// ActionGroup.cs - Syntactic C# sugar for easily defining Actions. // // Authors: Jeroen Zwartepoorte // @@ -18,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class ActionGroup { + public Action this[string name] { get { return GetAction (name); @@ -84,3 +91,5 @@ result [i] = list [i] as Gtk.Action; return result; } + } +} diff --git a/gtk/Adjustment.custom b/gtk/Adjustment.cs similarity index 92% rename from gtk/Adjustment.custom rename to gtk/Adjustment.cs index bdf7c64b4..ab2cfee30 100644 --- a/gtk/Adjustment.custom +++ b/gtk/Adjustment.cs @@ -1,7 +1,5 @@ // -// Gtk.Adjustment.custom - Allow customization of values in the GtkAdjustment -// -// This code is inserted after the automatically generated code. +// Gtk.Adjustment.cs - Allow customization of values in the GtkAdjustment // // This program is free software; you can redistribute it and/or // modify it under the terms of version 2 of the Lesser GNU General @@ -18,6 +16,13 @@ // Boston, MA 02111-1307, USA. // +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Adjustment { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_adjustment_new(double value, double lower, double upper, double step_increment, double page_increment, double page_size); @@ -55,4 +60,6 @@ public void SetBounds (double lower, double upper, double step_increment, double PageSize = page_size; g_object_thaw_notify (this.Handle); +} + } } diff --git a/gtk/Bin.custom b/gtk/Bin.cs similarity index 89% rename from gtk/Bin.custom rename to gtk/Bin.cs index 4502d87d5..61349c324 100644 --- a/gtk/Bin.custom +++ b/gtk/Bin.cs @@ -1,11 +1,9 @@ -// Gtk.Bin.custom - Gtk Bin class customizations +// Gtk.Bin.cs - Gtk Bin class customizations // // Author: Mike Kestner // // Copyright (C) 2004 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. @@ -20,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Bin { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_bin_get_child(IntPtr raw); @@ -40,4 +44,5 @@ val.Dispose (); } } - + } +} diff --git a/gtk/Builder.custom b/gtk/Builder.cs similarity index 98% rename from gtk/Builder.custom rename to gtk/Builder.cs index 7a9fc2d5d..d4c652eb4 100644 --- a/gtk/Builder.custom +++ b/gtk/Builder.cs @@ -1,4 +1,4 @@ -// Builder.custom - customizations to Gtk.Builder +// Builder.cs - customizations to Gtk.Builder // // Authors: Stephane Delcroix // The biggest part of this code is adapted from glade#, by @@ -23,6 +23,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Builder { [System.Serializable] public class HandlerNotFoundException : SystemException @@ -410,4 +416,5 @@ void BindFields (object target, Type type) } while (type != typeof(object) && type != null); } - + } +} diff --git a/gtk/Button.custom b/gtk/Button.cs similarity index 90% rename from gtk/Button.custom rename to gtk/Button.cs index f11c6bca2..570375206 100644 --- a/gtk/Button.custom +++ b/gtk/Button.cs @@ -1,11 +1,9 @@ -// Gtk.Button.custom - Gtk Button class customizations +// Gtk.Button.cs - Gtk Button class customizations // // Author: Mike Kestner // // Copyright (C) 2004 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. @@ -20,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Button { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_button_new_from_stock(IntPtr stock_id); @@ -44,4 +48,6 @@ public Button (string stock_id) : base (IntPtr.Zero) public Button (Widget widget) : this () { Add (widget); +} + } } diff --git a/gtk/Calendar.custom b/gtk/Calendar.cs similarity index 93% rename from gtk/Calendar.custom rename to gtk/Calendar.cs index a4ca0ab4a..7b49221ea 100644 --- a/gtk/Calendar.custom +++ b/gtk/Calendar.cs @@ -1,12 +1,10 @@ -// Gtk.Calendar.Custom - Gtk Calendar class customizations +// Gtk.Calendar.cs - Gtk Calendar class customizations // // Author: // Gonzalo Paniagua Javier (gonzalo@ximian.com) // // Copyright (c) 2003 Ximian, Inc. (http://www.ximian.com) // -// 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. @@ -21,6 +19,11 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial class Calendar { public DateTime GetDate () { @@ -54,4 +57,6 @@ public DateTime Date SelectMonth(month,year); SelectDay(day); } +} + } } diff --git a/gtk/CellLayout.custom b/gtk/CellLayout.cs similarity index 86% rename from gtk/CellLayout.custom rename to gtk/CellLayout.cs index f3b5f75f4..d419d8f59 100644 --- a/gtk/CellLayout.custom +++ b/gtk/CellLayout.cs @@ -1,4 +1,4 @@ -// Gtk.CellLayout.custom - Gtk CellLayout customizations +// Gtk.CellLayout.cs - Gtk CellLayout customizations // // Author: Mike Kestner // @@ -18,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial interface CellLayout { void SetAttributes (CellRenderer renderer, object[] attrs); + } +} diff --git a/gtk/CellLayoutAdapter.custom b/gtk/CellLayoutAdapter.cs similarity index 88% rename from gtk/CellLayoutAdapter.custom rename to gtk/CellLayoutAdapter.cs index e420f18d4..c2b42e913 100644 --- a/gtk/CellLayoutAdapter.custom +++ b/gtk/CellLayoutAdapter.cs @@ -1,4 +1,4 @@ -// Gtk.CellLayoutAdaptor.custom - Gtk CellLayoutAdaptor customizations +// Gtk.CellLayoutAdaptor.cs - Gtk CellLayoutAdaptor customizations // // Authors: Mike Kestner // @@ -18,6 +18,11 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial class CellLayoutAdapter { public void SetAttributes (CellRenderer cell, params object[] attrs) { @@ -29,3 +34,5 @@ AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]); } } + } +} diff --git a/gtk/CellRenderer.custom b/gtk/CellRenderer.cs similarity index 96% rename from gtk/CellRenderer.custom rename to gtk/CellRenderer.cs index 17e8f1d1b..0ce96c1a4 100644 --- a/gtk/CellRenderer.custom +++ b/gtk/CellRenderer.cs @@ -1,5 +1,5 @@ // -// CellRenderer.custom - Gtk CellRenderer class customizations +// CellRenderer.cs - Gtk CellRenderer class customizations // // Author: Todd Berman , // Peter Johanson @@ -7,9 +7,6 @@ // Copyright (C) 2004 Todd Berman // 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. @@ -24,6 +21,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class CellRenderer { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_cell_renderer_start_editing (IntPtr handle, IntPtr evnt, IntPtr widget, IntPtr path, ref Gdk.Rectangle bg_area, ref Gdk.Rectangle cell_area, int flags); @@ -100,4 +104,5 @@ cell_area = Gdk.Rectangle.New (native_cell_area); Marshal.FreeHGlobal (native_cell_area); } - + } +} diff --git a/gtk/EntryCompletion.custom b/gtk/CellView.cs similarity index 90% rename from gtk/EntryCompletion.custom rename to gtk/CellView.cs index 1352800ed..298b47f20 100644 --- a/gtk/EntryCompletion.custom +++ b/gtk/CellView.cs @@ -1,4 +1,4 @@ -// Gtk.EntryCompletion.custom - Gtk EntryCompletion customizations +// Gtk.CellView.cs - Gtk CellView customizations // // Authors: Todd Berman // Mike Kestner @@ -20,6 +20,11 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial class CellView { public void SetAttributes (CellRenderer cell, params object[] attrs) { @@ -31,3 +36,5 @@ AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]); } } + } +} diff --git a/gtk/CheckMenuItem.custom b/gtk/CheckMenuItem.cs similarity index 89% rename from gtk/CheckMenuItem.custom rename to gtk/CheckMenuItem.cs index bc3c90b9b..6794aee39 100644 --- a/gtk/CheckMenuItem.custom +++ b/gtk/CheckMenuItem.cs @@ -1,11 +1,9 @@ -// Gtk.CheckMenuItem.custom - Gtk CheckMenuItem class customizations +// Gtk.CheckMenuItem.cs - Gtk CheckMenuItem class customizations // // Author: Mike Kestner // // Copyright (C) 2004 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. @@ -20,7 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class CheckMenuItem { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_check_menu_item_new_with_mnemonic (IntPtr label); @@ -44,4 +48,5 @@ public void Toggle() { Active = !Active; } - + } +} diff --git a/gtk/Clipboard.custom b/gtk/Clipboard.cs similarity index 97% rename from gtk/Clipboard.custom rename to gtk/Clipboard.cs index f63e9026c..93766d4f6 100644 --- a/gtk/Clipboard.custom +++ b/gtk/Clipboard.cs @@ -1,4 +1,4 @@ -// Gtk.Clipboard.custom - Customizations for the Clipboard class +// Gtk.Clipboard.cs - Customizations for the Clipboard class // // Authors: Mike Kestner // @@ -18,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Clipboard { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_clipboard_set_with_data(IntPtr raw, TargetEntry[] targets, int n_targets, GtkSharp.ClipboardGetFuncNative get_func, GtkSharp.ClipboardClearFuncNative clear_func, IntPtr data); @@ -118,4 +124,5 @@ rt_rcvd_marshaler = new RichTextReceivedFuncNative (RichTextReceivedCallback); gtk_clipboard_request_rich_text (Handle, buffer == null ? IntPtr.Zero : buffer.Handle, rt_rcvd_marshaler, (IntPtr) GCHandle.Alloc (cb)); } - + } +} diff --git a/gtk/ColorSelection.custom b/gtk/ColorSelection.cs similarity index 93% rename from gtk/ColorSelection.custom rename to gtk/ColorSelection.cs index 2466a644e..9e7e323dd 100644 --- a/gtk/ColorSelection.custom +++ b/gtk/ColorSelection.cs @@ -1,4 +1,4 @@ -// Gtk.ColorSelection.custom - customizations and corrections for ColorSelection +// Gtk.ColorSelection.cs - customizations and corrections for ColorSelection // Author: Lee Mallabone // Author: Justin Malcolm // @@ -16,6 +16,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class ColorSelection { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_color_selection_palette_to_string(Gdk.Color[] colors, int n_colors); @@ -73,4 +79,5 @@ gtk_color_selection_set_previous_color(Handle, ref value); } } - + } +} diff --git a/gtk/ColorSelectionDialog.custom b/gtk/ColorSelectionDialog.cs similarity index 87% rename from gtk/ColorSelectionDialog.custom rename to gtk/ColorSelectionDialog.cs index 76450ca4d..3f448be54 100644 --- a/gtk/ColorSelectionDialog.custom +++ b/gtk/ColorSelectionDialog.cs @@ -1,12 +1,9 @@ -// Gtk.ColorSelectionDialog.custom - Gtk ColorSelectionDialog class customizations +// Gtk.ColorSelectionDialog.cs - Gtk ColorSelectionDialog class customizations // // Author: Duncan Mak (duncan@ximian.com) // // Copyright (C) 2002 Ximian, 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. @@ -21,7 +18,11 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + using System; + + public partial class ColorSelectionDialog { [Obsolete ("Do not use this class. It will cause your app to crash in mysterious ways.")] public class ColorSelectionButton : Gtk.Button { private ColorSelectionDialog color_sel; @@ -34,4 +35,5 @@ public class ColorSelectionButton : Gtk.Button { color_sel = cs; } } - + } +} diff --git a/gtk/ComboBox.custom b/gtk/ComboBox.cs similarity index 94% rename from gtk/ComboBox.custom rename to gtk/ComboBox.cs index cf5ccbce0..1a9049c7e 100644 --- a/gtk/ComboBox.custom +++ b/gtk/ComboBox.cs @@ -1,4 +1,4 @@ -// Gtk.ComboBox.custom - Gtk ComboBox customizations +// Gtk.ComboBox.cs - Gtk ComboBox customizations // // Authors: Todd Berman // Mike Kestner @@ -20,6 +20,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial class ComboBox { + public ComboBox (string[] entries) : this (new ListStore (typeof (string))) { ListStore store = Model as ListStore; @@ -60,3 +66,5 @@ AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]); } } + } +} diff --git a/gtk/Container.custom b/gtk/Container.cs similarity index 97% rename from gtk/Container.custom rename to gtk/Container.cs index b0eae90da..3dcf23bb6 100644 --- a/gtk/Container.custom +++ b/gtk/Container.cs @@ -1,4 +1,4 @@ -// Container.custom - customizations to Gtk.Container +// Container.cs - customizations to Gtk.Container // // Authors: Mike Kestner // @@ -18,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + + public partial class Container { [DllImport("gtksharpglue-3")] static extern void gtksharp_container_child_get_property (IntPtr container, IntPtr child, IntPtr property, ref GLib.Value value); @@ -235,4 +242,6 @@ public virtual ContainerChild this [Widget w] { get { return new ContainerChild (this, w); } +} + } } diff --git a/gtk/Dialog.custom b/gtk/Dialog.cs similarity index 93% rename from gtk/Dialog.custom rename to gtk/Dialog.cs index 13a76fe95..08c4c2400 100644 --- a/gtk/Dialog.custom +++ b/gtk/Dialog.cs @@ -1,14 +1,11 @@ // -// Gtk.Dialog.custom - Gtk Dialog class customizations +// Gtk.Dialog.cs - Gtk Dialog class customizations // // Author: Duncan Mak (duncan@ximian.com) // Mike Kestner (mkestner@speakeasy.net) // // Copyright (C) 2002 Ximian, Inc. and Mike Kestner // -// 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. @@ -23,7 +20,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + using System; + using System.Runtime.InteropServices; + + public partial class Dialog { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_dialog_new_with_buttons (IntPtr title, IntPtr i, int flags, IntPtr dummy); public Dialog (string title, Gtk.Window parent, Gtk.DialogFlags flags, params object[] button_data) : base(IntPtr.Zero) @@ -68,4 +70,6 @@ public void Respond (ResponseType response) public int SetAlternativeButtonOrderFromArray (int n_params) { return -1; +} + } } diff --git a/gtk/Drag.custom b/gtk/Drag.cs similarity index 89% rename from gtk/Drag.custom rename to gtk/Drag.cs index 724a594d4..787b62a42 100644 --- a/gtk/Drag.custom +++ b/gtk/Drag.cs @@ -1,9 +1,7 @@ -// Drag.custom - Gtk.Drag class customizations +// Drag.cs - Gtk.Drag class customizations // // 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. @@ -18,6 +16,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Drag { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_drag_set_icon_default(IntPtr context); @@ -32,4 +37,5 @@ gtk_drag_set_icon_default(value == null ? IntPtr.Zero : value.Handle); } } - + } +} diff --git a/gtk/Entry.custom b/gtk/Entry.cs similarity index 87% rename from gtk/Entry.custom rename to gtk/Entry.cs index f2f46304d..969b659fb 100644 --- a/gtk/Entry.custom +++ b/gtk/Entry.cs @@ -1,8 +1,5 @@ // -// Gtk.Entry.custom - Allow customization of values in the GtkEntry -// -// This code is inserted after the automatically generated code. -// +// Gtk.Entry.cs - Allow customization of values in the GtkEntry // // This program is free software; you can redistribute it and/or // modify it under the terms of version 2 of the Lesser GNU General @@ -18,7 +15,11 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + using System; + + public partial class Entry { public int InsertText (string new_text) { int position = 0; @@ -37,4 +38,6 @@ public Entry(string initialText): this() public bool Editable { get { return IsEditable; } set { IsEditable = value; } +} + } } diff --git a/gtk/CellView.custom b/gtk/EntryCompletion.cs similarity index 89% rename from gtk/CellView.custom rename to gtk/EntryCompletion.cs index c86f1a84e..306c7f86e 100644 --- a/gtk/CellView.custom +++ b/gtk/EntryCompletion.cs @@ -1,4 +1,4 @@ -// Gtk.CellView.custom - Gtk CellView customizations +// Gtk.EntryCompletion.cs - Gtk EntryCompletion customizations // // Authors: Todd Berman // Mike Kestner @@ -20,6 +20,11 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial class EntryCompletion { public void SetAttributes (CellRenderer cell, params object[] attrs) { @@ -31,3 +36,5 @@ AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]); } } + } +} diff --git a/gtk/FileChooserDialog.custom b/gtk/FileChooserDialog.cs similarity index 94% rename from gtk/FileChooserDialog.custom rename to gtk/FileChooserDialog.cs index d0600ddfc..f05d1b6e1 100644 --- a/gtk/FileChooserDialog.custom +++ b/gtk/FileChooserDialog.cs @@ -1,4 +1,4 @@ -// Gtk.FileChooserDialog.custom - Gtk FileChooserDialog customizations +// Gtk.FileChooserDialog.cs - Gtk FileChooserDialog customizations // // Authors: Todd Berman // Jeroen Zwartepoorte @@ -21,6 +21,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class FileChooserDialog { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_file_chooser_dialog_new(IntPtr title, IntPtr parent, int action, IntPtr nil); @@ -65,4 +71,5 @@ for (int i = 0; i < button_data.Length - 1; i += 2) AddButton ((string) button_data [i], (int) button_data [i + 1]); } - + } +} diff --git a/gtk/Frame.cs b/gtk/Frame.cs new file mode 100644 index 000000000..88578ca2f --- /dev/null +++ b/gtk/Frame.cs @@ -0,0 +1,34 @@ +// +// Gtk.Frame.cs - Gtk Frame class customizations +// +// Author: Radek Doulik (rodo@ximian.com) +// +// Copyright (C) 2002 Ximian, 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. + +namespace Gtk { + + using System; + + public partial class Frame { + + public Frame() : this (null) {} + + } +} diff --git a/gtk/Frame.custom b/gtk/Frame.custom deleted file mode 100644 index 49e07809d..000000000 --- a/gtk/Frame.custom +++ /dev/null @@ -1,25 +0,0 @@ - // - // Gtk.ScrolledWindow.custom - Gtk ScrolledWindow class customizations - // - // Author: Radek Doulik (rodo@ximian.com) - // - // Copyright (C) 2002 Ximian, 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. - - public Frame() : this (null) {} diff --git a/gtk/HBox.custom b/gtk/HBox.cs similarity index 91% rename from gtk/HBox.custom rename to gtk/HBox.cs index b371bcfd5..3eae6aaf3 100644 --- a/gtk/HBox.custom +++ b/gtk/HBox.cs @@ -13,5 +13,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial class HBox { public HBox () : this (false, 0) {} + + } +} diff --git a/gtk/HScale.custom b/gtk/HScale.cs similarity index 90% rename from gtk/HScale.custom rename to gtk/HScale.cs index 90d5de73a..e1cefd08b 100644 --- a/gtk/HScale.custom +++ b/gtk/HScale.cs @@ -1,11 +1,9 @@ -// Gtk.HScale.custom - Gtk HScale class customizations +// Gtk.HScale.cs - Gtk HScale class customizations // // Author: Mike Kestner // // Copyright (C) 2004 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. @@ -20,7 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class HScale { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_hscale_new_with_range (double min, double max, double step); @@ -39,4 +43,5 @@ Raw = gtk_hscale_new_with_range (min, max, step); } - + } +} diff --git a/gtk/IconFactory.custom b/gtk/IconFactory.cs similarity index 91% rename from gtk/IconFactory.custom rename to gtk/IconFactory.cs index 4668ea0b2..9f0fe9cfc 100644 --- a/gtk/IconFactory.custom +++ b/gtk/IconFactory.cs @@ -13,6 +13,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class IconFactory { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] extern static void gtk_icon_size_lookup (IconSize size, out int width, out int height); @@ -22,4 +29,5 @@ { gtk_icon_size_lookup (size, out width, out height); } - + } +} diff --git a/gtk/IconSet.custom b/gtk/IconSet.cs similarity index 94% rename from gtk/IconSet.custom rename to gtk/IconSet.cs index 89891505f..c68eac4e5 100644 --- a/gtk/IconSet.custom +++ b/gtk/IconSet.cs @@ -13,6 +13,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class IconSet { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] unsafe static extern void gtk_icon_set_get_sizes ( IntPtr raw, out int *pointer_to_enum, out int n_sizes); @@ -41,3 +48,5 @@ return retval; } } + } +} diff --git a/gtk/IconTheme.custom b/gtk/IconTheme.cs similarity index 96% rename from gtk/IconTheme.custom rename to gtk/IconTheme.cs index 918ede616..5d58f96bb 100644 --- a/gtk/IconTheme.custom +++ b/gtk/IconTheme.cs @@ -1,4 +1,4 @@ -// IconTheme.custom - customizations to Gtk.IconTheme +// IconTheme.cs - customizations to Gtk.IconTheme // // Authors: Mike Kestner // Jeroen Zwartepoorte @@ -20,6 +20,13 @@ // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + + public partial class IconTheme { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_icon_theme_list_icons (IntPtr raw, IntPtr context); @@ -134,4 +141,5 @@ GLib.Marshaller.Free (raw_ret); return (int[]) result.ToArray (typeof (int)); } - + } +} diff --git a/gtk/IconView.custom b/gtk/IconView.cs similarity index 91% rename from gtk/IconView.custom rename to gtk/IconView.cs index 78debeeb1..f7dde9293 100644 --- a/gtk/IconView.custom +++ b/gtk/IconView.cs @@ -1,4 +1,4 @@ -// IconView.custom - customizations to Gtk.IconView +// IconView.cs - customizations to Gtk.IconView // // Authors: Mike Kestner // @@ -18,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class IconView { + public void SetAttributes (CellRenderer cell, params object[] attrs) { if (attrs.Length % 2 != 0) @@ -41,4 +48,5 @@ { gtk_icon_view_scroll_to_path(Handle, path == null ? IntPtr.Zero : path.Handle, true, row_align, col_align); } - + } +} diff --git a/gtk/Image.custom b/gtk/Image.cs similarity index 95% rename from gtk/Image.custom rename to gtk/Image.cs index febf326bc..8c85ae905 100644 --- a/gtk/Image.custom +++ b/gtk/Image.cs @@ -1,4 +1,4 @@ -// Image.custom - Customizations to Gtk.Image +// Image.cs - Customizations to Gtk.Image // // Authors: Mike Kestner // Authors: Stephane Delcroix @@ -19,6 +19,14 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + + public partial class Image { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_image_new_from_icon_set(IntPtr icon_set, int size); @@ -114,5 +122,5 @@ gtk_image_set_from_pixbuf(Handle, value == null ? IntPtr.Zero : value.Handle); } } - - + } +} diff --git a/gtk/ImageMenuItem.custom b/gtk/ImageMenuItem.cs similarity index 88% rename from gtk/ImageMenuItem.custom rename to gtk/ImageMenuItem.cs index edee97058..46eb5c689 100644 --- a/gtk/ImageMenuItem.custom +++ b/gtk/ImageMenuItem.cs @@ -1,11 +1,9 @@ -// Gtk.ImageMenuItem.custom - Gtk ImageMenuItem class customizations +// Gtk.ImageMenuItem.cs - Gtk ImageMenuItem class customizations // // Author: Mike Kestner // // Copyright (C) 2004 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. @@ -20,7 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class ImageMenuItem { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_image_menu_item_new_with_mnemonic (IntPtr label); @@ -40,4 +44,5 @@ Raw = gtk_image_menu_item_new_with_mnemonic (native); GLib.Marshaller.Free (native); } - + } +} diff --git a/gtk/Init.custom b/gtk/Init.cs similarity index 88% rename from gtk/Init.custom rename to gtk/Init.cs index 8b36a607f..8cbf73768 100644 --- a/gtk/Init.custom +++ b/gtk/Init.cs @@ -1,11 +1,9 @@ -// Gtk.Init.custom - Gtk Init class customizations +// Gtk.Init.cs - Gtk Init class customizations // // Author: Mike Kestner // // Copyright (C) 2004 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. @@ -20,9 +18,16 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial class Init { public static bool Check (ref string[] argv) { return Application.InitCheck (Environment.CommandLine, ref argv); } + } +} diff --git a/gtk/ItemFactory.custom b/gtk/ItemFactory.custom deleted file mode 100644 index 4ab3b8446..000000000 --- a/gtk/ItemFactory.custom +++ /dev/null @@ -1,43 +0,0 @@ -// Gtk.ItemFactory.custom - Gtk ItemFactory class customizations -// -// Author: Mike Kestner -// -// Copyright (C) 2004 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 ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_item_factory_new(IntPtr container_type, IntPtr path, IntPtr accel_group); - - public ItemFactory (GLib.GType container_type, string path, Gtk.AccelGroup accel_group) : base (IntPtr.Zero) - { - if (GetType () != typeof (ItemFactory)) { - CreateNativeObject (new string [0], new GLib.Value [0]); - Construct (container_type, path, accel_group); - return; - } - IntPtr native = GLib.Marshaller.StringToPtrGStrdup (path); - Raw = gtk_item_factory_new(container_type.Val, native, (accel_group != null) ? accel_group.Handle : IntPtr.Zero); - GLib.Marshaller.Free (native); - } - - [Obsolete ("Replaced by TranslateFunc property.")] - public void SetTranslateFunc (TranslateFunc func, IntPtr data, DestroyNotify notify) - { - TranslateFunc = func; - } diff --git a/gtk/Label.custom b/gtk/Label.cs similarity index 89% rename from gtk/Label.custom rename to gtk/Label.cs index f8b4a7f48..92e3a0683 100644 --- a/gtk/Label.custom +++ b/gtk/Label.cs @@ -1,7 +1,5 @@ // -// Gtk.Label.custom -// -// This code is inserted after the automatically generated code. +// Gtk.Label.cs // // Author: John Luke // @@ -20,5 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial class Label { public Label () : this (null) {} + + } +} diff --git a/gtk/ListStore.custom b/gtk/ListStore.cs similarity index 97% rename from gtk/ListStore.custom rename to gtk/ListStore.cs index d46a2279e..757ebe6c9 100644 --- a/gtk/ListStore.custom +++ b/gtk/ListStore.cs @@ -1,11 +1,9 @@ -// Gtk.ListStore.Custom - Gtk ListStore class customizations +// Gtk.ListStore.cs - Gtk ListStore class customizations // // Author: Kristian Rietveld // // (c) 2002 Kristian Rietveld // -// 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. @@ -20,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + + public partial class ListStore { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); @@ -287,4 +292,5 @@ RemoveSignalHandler ("rows_reordered", value); } } - + } +} diff --git a/gtk/Makefile.am b/gtk/Makefile.am index d1ab23aa1..96b5d0876 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -11,117 +11,112 @@ references = $(top_builddir)/glib/glib-sharp.dll $(top_builddir)/cairo/cairo-sha glue_includes = gtk/gtk.h sources = \ + Accel.cs \ + AccelKey.cs \ + Action.cs \ ActionEntry.cs \ + ActionGroup.cs \ + Adjustment.cs \ Application.cs \ + Bin.cs \ BindingAttribute.cs \ + Builder.cs \ + Button.cs \ + Calendar.cs \ CellAreaBox.cs \ + CellLayout.cs \ + CellLayoutAdapter.cs \ + CellRenderer.cs \ + CellView.cs \ + CheckMenuItem.cs \ ChildPropertyAttribute.cs \ + Clipboard.cs \ + ColorSelection.cs \ + ColorSelectionDialog.cs \ + ComboBox.cs \ ComboBoxText.cs \ + Container.cs \ + Dialog.cs \ + Drag.cs \ + Entry.cs \ + EntryCompletion.cs \ + FileChooserDialog.cs \ + Frame.cs \ Global.cs \ + HBox.cs \ + HScale.cs \ + IconFactory.cs \ + IconSet.cs \ + IconTheme.cs \ + IconView.cs \ + Image.cs \ + ImageMenuItem.cs \ + Init.cs \ ITreeNode.cs \ Key.cs \ + Label.cs \ + ListStore.cs \ + Menu.cs \ + MenuItem.cs \ + MessageDialog.cs \ NodeCellDataFunc.cs \ NodeSelection.cs \ NodeStore.cs \ NodeView.cs \ + Notebook.cs \ + PaperSize.cs \ + Plug.cs \ + Printer.cs \ RadioActionEntry.cs \ + RadioButton.cs \ + RadioMenuItem.cs \ + RadioToolButton.cs \ + RecentManager.cs \ RowsReorderedHandler.cs \ + ScrolledWindow.cs \ + SelectionData.cs \ + Settings.cs \ + SpinButton.cs \ + StatusIcon.cs \ + Stock.cs \ + StockItem.cs \ StockManager.cs \ + Style.cs \ StyleContext.cs \ + Table.cs \ + Target.cs \ + TargetEntry.cs \ + TargetList.cs \ + TextAttributes.cs \ + TextBuffer.cs \ + TextChildAnchor.cs \ + TextIter.cs \ + TextMark.cs \ + TextTag.cs \ + TextView.cs \ ThreadNotify.cs \ ToggleActionEntry.cs \ TreeEnumerator.cs \ + TreeIter.cs \ TreeMenu.cs \ - TreeNodeAttribute.cs \ + TreeModel.cs \ + TreeModelAdapter.cs \ + TreeModelFilter.cs \ + TreeModelSort.cs \ TreeNode.cs \ - TreeNodeValueAttribute.cs - -customs = \ - Accel.custom \ - AccelKey.custom \ - Action.custom \ - ActionGroup.custom \ - Adjustment.custom \ - Bin.custom \ - Builder.custom \ - Button.custom \ - Calendar.custom \ - CellRenderer.custom \ - CellLayout.custom \ - CellLayoutAdapter.custom \ - CellView.custom \ - CheckMenuItem.custom \ - Clipboard.custom \ - ColorSelection.custom \ - ColorSelectionDialog.custom \ - ComboBox.custom \ - Container.custom \ - Dialog.custom \ - Drag.custom \ - Entry.custom \ - EntryCompletion.custom \ - FileChooserDialog.custom \ - Frame.custom \ - HBox.custom \ - HScale.custom \ - IconFactory.custom \ - IconSet.custom \ - IconTheme.custom \ - IconView.custom \ - Image.custom \ - ImageMenuItem.custom \ - Init.custom \ - ItemFactory.custom \ - Label.custom \ - ListStore.custom \ - MessageDialog.custom \ - Menu.custom \ - MenuItem.custom \ - Notebook.custom \ - PaperSize.custom \ - Plug.custom \ - Printer.custom \ - RadioButton.custom \ - RadioMenuItem.custom \ - RadioToolButton.custom \ - RecentManager.custom \ - ScrolledWindow.custom \ - SelectionData.custom \ - Settings.custom \ - SpinButton.custom \ - StatusIcon.custom \ - Stock.custom \ - StockItem.custom \ - Style.custom \ - Table.custom \ - Target.custom \ - TargetEntry.custom \ - TargetList.custom \ - TargetPair.custom \ - TextAttributes.custom \ - TextBuffer.custom \ - TextChildAnchor.custom \ - TextIter.custom \ - TextMark.custom \ - TextTag.custom \ - TextView.custom \ - TooltipsData.custom \ - TreeIter.custom \ - TreeModel.custom \ - TreeModelAdapter.custom \ - TreeModelFilter.custom \ - TreeModelSort.custom \ - TreePath.custom \ - TreeSelection.custom \ - TreeStore.custom \ - TreeViewColumn.custom \ - TreeView.custom \ - UIManager.custom \ - VBox.custom \ - VScale.custom \ - Viewport.custom \ - Widget.custom \ - Window.custom + TreeNodeAttribute.cs \ + TreeNodeValueAttribute.cs \ + TreePath.cs \ + TreeSelection.cs \ + TreeStore.cs \ + TreeView.cs \ + TreeViewColumn.cs \ + UIManager.cs \ + VBox.cs \ + Viewport.cs \ + VScale.cs \ + Widget.cs \ + Window.cs add_dist = gtk-sharp-3.0.pc.in diff --git a/gtk/Menu.custom b/gtk/Menu.cs similarity index 91% rename from gtk/Menu.custom rename to gtk/Menu.cs index dcd6017e6..0afbd7bee 100644 --- a/gtk/Menu.custom +++ b/gtk/Menu.cs @@ -1,11 +1,9 @@ -// Gtk.Menu.custom - Gtk Menu class customizations +// Gtk.Menu.cs - Gtk Menu class customizations // // Author: John Luke // // Copyright (C) 2004 John Luke // -// 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. @@ -20,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Menu { + [Obsolete("Replaced by overload without IntPtr argument")] public void Popup (Gtk.Widget parent_menu_shell, Gtk.Widget parent_menu_item, Gtk.MenuPositionFunc func, IntPtr data, uint button, uint activate_time) { Popup (parent_menu_shell, parent_menu_item, func, button, activate_time); @@ -49,4 +54,5 @@ { gtk_menu_set_active (Handle, index_); } - + } +} diff --git a/gtk/MenuItem.custom b/gtk/MenuItem.cs similarity index 89% rename from gtk/MenuItem.custom rename to gtk/MenuItem.cs index 86411356c..1151ace0a 100644 --- a/gtk/MenuItem.custom +++ b/gtk/MenuItem.cs @@ -1,11 +1,9 @@ -// Gtk.MenuItem.custom - Gtk MenuItem class customizations +// Gtk.MenuItem.cs - Gtk MenuItem class customizations // // Author: Mike Kestner // // Copyright (C) 2004 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. @@ -20,7 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + using System; + using System.Runtime.InteropServices; + + public partial class MenuItem { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_menu_item_new_with_mnemonic (IntPtr label); @@ -40,3 +44,5 @@ Raw = gtk_menu_item_new_with_mnemonic (native); GLib.Marshaller.Free (native); } + } +} diff --git a/gtk/MessageDialog.custom b/gtk/MessageDialog.cs similarity index 94% rename from gtk/MessageDialog.custom rename to gtk/MessageDialog.cs index 6cdc1d7a9..121ee0f18 100644 --- a/gtk/MessageDialog.custom +++ b/gtk/MessageDialog.cs @@ -13,6 +13,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class MessageDialog { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_message_dialog_new (IntPtr parent_window, DialogFlags flags, MessageType type, ButtonsType bt, IntPtr msg, IntPtr args); @@ -37,3 +44,6 @@ public MessageDialog (Gtk.Window parent_window, DialogFlags flags, MessageType t } public MessageDialog (Gtk.Window parent_window, DialogFlags flags, MessageType type, ButtonsType bt, string format, params object[] args) : this (parent_window, flags, type, bt, true, format, args) {} + + } +} diff --git a/gtk/Notebook.custom b/gtk/Notebook.cs similarity index 88% rename from gtk/Notebook.custom rename to gtk/Notebook.cs index c0b5df57f..10cff1418 100644 --- a/gtk/Notebook.custom +++ b/gtk/Notebook.cs @@ -1,4 +1,4 @@ -// Notebook.custom - customization for Gtk.Notebook +// Notebook.cs - customization for Gtk.Notebook // // Authors: Xavier Amado (xavier@blackbloodstudios.com) // Mike Kestner (mkestner@ximian.com) @@ -19,6 +19,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Notebook { public Widget CurrentPageWidget { get { @@ -32,4 +38,6 @@ static extern int gtk_notebook_page_num (IntPtr handle, IntPtr child); public int PageNum (Widget child) { return gtk_notebook_page_num (Handle, child.Handle); +} + } } diff --git a/gtk/PaperSize.custom b/gtk/PaperSize.cs similarity index 92% rename from gtk/PaperSize.custom rename to gtk/PaperSize.cs index 656be6bd5..80c38daad 100644 --- a/gtk/PaperSize.custom +++ b/gtk/PaperSize.cs @@ -1,6 +1,4 @@ -// Gtk.PaperSize.custom - Allow customization of values in the GtkPaperSize -// -// This code is inserted after the automatically generated code. +// Gtk.PaperSize.cs - Allow customization of values in the GtkPaperSize // // This program is free software; you can redistribute it and/or // modify it under the terms of version 2 of the Lesser GNU General @@ -17,6 +15,12 @@ // Boston, MA 02111-1307, USA. // +namespace Gtk { + + using System; + + public partial class PaperSize { + static PaperSize letter; public static PaperSize Letter { get { @@ -79,4 +83,5 @@ return b5; } } - + } +} diff --git a/gtk/Plug.custom b/gtk/Plug.cs similarity index 91% rename from gtk/Plug.custom rename to gtk/Plug.cs index 460dff7ca..97ab156d3 100644 --- a/gtk/Plug.custom +++ b/gtk/Plug.cs @@ -1,11 +1,9 @@ -// Gtk.Plug.custom - Gtk Plug class customizations +// Gtk.Plug.cs - Gtk Plug class customizations // // Author: Mike Kestner // // Copyright (C) 2004 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. @@ -20,7 +18,14 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - + +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Plug { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_plug_new(UIntPtr socket_id); @@ -46,4 +51,5 @@ } Raw = gtk_plug_new_for_display (display.Handle, new UIntPtr (socket_id)); } - + } +} diff --git a/gtk/Printer.custom b/gtk/Printer.cs similarity index 90% rename from gtk/Printer.custom rename to gtk/Printer.cs index 89953bde0..22a59d04d 100644 --- a/gtk/Printer.custom +++ b/gtk/Printer.cs @@ -1,4 +1,4 @@ -// Printer.custom - customizations to Gtk.Printer +// Printer.cs - customizations to Gtk.Printer // // Authors: Mike Kestner // @@ -18,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Printer { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_enumerate_printers (GtkSharp.PrinterFuncNative func, IntPtr func_data, GLib.DestroyNotify destroy, bool wait); @@ -37,4 +44,5 @@ } gtk_enumerate_printers (func_wrapper.NativeDelegate, func_data, destroy, wait); } - + } +} diff --git a/gtk/RadioButton.custom b/gtk/RadioButton.cs similarity index 89% rename from gtk/RadioButton.custom rename to gtk/RadioButton.cs index af563b7c4..b9be8ea69 100644 --- a/gtk/RadioButton.custom +++ b/gtk/RadioButton.cs @@ -1,5 +1,5 @@ // -// RadioButton.custom +// RadioButton.cs // // Author: John Luke // @@ -18,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class RadioButton { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_button_new_with_mnemonic (IntPtr group, IntPtr label); @@ -29,3 +35,5 @@ Raw = gtk_radio_button_new_with_mnemonic (IntPtr.Zero, native); GLib.Marshaller.Free (native); } + } +} diff --git a/gtk/RadioMenuItem.custom b/gtk/RadioMenuItem.cs similarity index 92% rename from gtk/RadioMenuItem.custom rename to gtk/RadioMenuItem.cs index 58be5aa1e..a4ef2aceb 100644 --- a/gtk/RadioMenuItem.custom +++ b/gtk/RadioMenuItem.cs @@ -1,4 +1,4 @@ -// Gtk.RadioMenuItem.custom - Gtk RadioMenuItem customizations +// Gtk.RadioMenuItem.cs - Gtk RadioMenuItem customizations // // Authors: John Luke // Mike Kestner @@ -19,6 +19,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class RadioMenuItem { public RadioMenuItem (string label) : base (IntPtr.Zero) { @@ -57,4 +63,5 @@ Raw = gtk_radio_menu_item_new_with_mnemonic(group == null ? IntPtr.Zero : group.Handle, native_label); GLib.Marshaller.Free (native_label); } - + } +} diff --git a/gtk/RadioToolButton.custom b/gtk/RadioToolButton.cs similarity index 91% rename from gtk/RadioToolButton.custom rename to gtk/RadioToolButton.cs index 3b1250d46..56c314fd5 100644 --- a/gtk/RadioToolButton.custom +++ b/gtk/RadioToolButton.cs @@ -1,12 +1,9 @@ -// Gtk.RadioToolButton.custom - Gtk RadioToolButton class customizations +// Gtk.RadioToolButton.cs - Gtk RadioToolButton class customizations // // Author: Mike Kestner // // Copyright (c) 2006 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. @@ -21,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class RadioToolButton { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_tool_button_new (IntPtr group); @@ -51,4 +55,5 @@ Raw = gtk_radio_tool_button_new_from_stock(group == null ? IntPtr.Zero : group.Handle, stock_id_as_native); GLib.Marshaller.Free (stock_id_as_native); } - + } +} diff --git a/gtk/RecentManager.custom b/gtk/RecentManager.cs similarity index 88% rename from gtk/RecentManager.custom rename to gtk/RecentManager.cs index b6912582d..b2be26e00 100644 --- a/gtk/RecentManager.custom +++ b/gtk/RecentManager.cs @@ -1,4 +1,4 @@ -// RecentManager.custom - customizations to Gtk.RecentManager +// RecentManager.cs - customizations to Gtk.RecentManager // // Authors: Mike Kestner // @@ -18,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial class RecentManager { + [Obsolete("Replaced by RecentItems property")] public GLib.List Items { get { @@ -26,4 +32,5 @@ return ret; } } - + } +} diff --git a/gtk/ScrolledWindow.custom b/gtk/ScrolledWindow.cs similarity index 76% rename from gtk/ScrolledWindow.custom rename to gtk/ScrolledWindow.cs index f18ede44f..e61f2e8d9 100644 --- a/gtk/ScrolledWindow.custom +++ b/gtk/ScrolledWindow.cs @@ -1,12 +1,10 @@ - // - // Gtk.ScrolledWindow.custom - Gtk ScrolledWindow class customizations - // - // Author: Radek Doulik (rodo@ximian.com) - // - // Copyright (C) 2002 Ximian, Inc. - // - // This code is inserted after the automatically generated code. - // +// +// Gtk.ScrolledWindow.cs - Gtk ScrolledWindow class customizations +// +// Author: Radek Doulik (rodo@ximian.com) +// +// Copyright (C) 2002 Ximian, Inc. +// // // This program is free software; you can redistribute it and/or // modify it under the terms of version 2 of the Lesser GNU General @@ -22,7 +20,14 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + using System; + + public partial class ScrolledWindow { + public ScrolledWindow () : this (null, null) { SetPolicy (PolicyType.Automatic, PolicyType.Automatic); } + } +} diff --git a/gtk/SelectionData.custom b/gtk/SelectionData.cs similarity index 94% rename from gtk/SelectionData.custom rename to gtk/SelectionData.cs index 7e45367d4..f5693deaf 100644 --- a/gtk/SelectionData.custom +++ b/gtk/SelectionData.cs @@ -1,4 +1,4 @@ -// SelectionData.custom - customizations for Gtk.SelectionData +// SelectionData.cs - customizations for Gtk.SelectionData // // Authors: Mike Kestner // @@ -18,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class SelectionData { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr gtk_selection_data_get_text (IntPtr selection_data); @@ -76,3 +83,5 @@ return new Gdk.Atom [0]; } } + } +} diff --git a/gtk/Settings.custom b/gtk/Settings.cs similarity index 87% rename from gtk/Settings.custom rename to gtk/Settings.cs index 877b22569..377cf84a0 100644 --- a/gtk/Settings.custom +++ b/gtk/Settings.cs @@ -1,11 +1,9 @@ -// Gtk.Settings.custom - Gtk Settings class customizations +// Gtk.Settings.cs - Gtk Settings class customizations // // Author: Mike Kestner // // Copyright (C) 2004 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. @@ -20,6 +18,11 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial class Settings { [Obsolete ("Removed from C API, returns IntPtr.Zero")] public IntPtr ColorHash { @@ -27,3 +30,5 @@ return IntPtr.Zero; } } + } +} diff --git a/gtk/SpinButton.custom b/gtk/SpinButton.cs similarity index 89% rename from gtk/SpinButton.custom rename to gtk/SpinButton.cs index 05019674d..280145c66 100644 --- a/gtk/SpinButton.custom +++ b/gtk/SpinButton.cs @@ -1,11 +1,9 @@ -// Gtk.SpinButton.custom - Gtk SpinButton class customizations +// Gtk.SpinButton.cs - Gtk SpinButton class customizations // // Author: Mike Kestner // // Copyright (C) 2004 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. @@ -20,7 +18,14 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. + +namespace Gtk { + using System; + using System.Runtime.InteropServices; + + public partial class SpinButton { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_spin_button_new_with_range (double min, double max, double step); @@ -39,4 +44,5 @@ Raw = gtk_spin_button_new_with_range (min, max, step); } - + } +} diff --git a/gtk/StatusIcon.custom b/gtk/StatusIcon.cs similarity index 96% rename from gtk/StatusIcon.custom rename to gtk/StatusIcon.cs index 1d930c7e8..5422b1773 100644 --- a/gtk/StatusIcon.custom +++ b/gtk/StatusIcon.cs @@ -1,4 +1,4 @@ -// StatusIcon.custom - customizations to Gtk.StatusIcon +// StatusIcon.cs - customizations to Gtk.StatusIcon // // Authors: Mike Kestner // Authors: Stephane Delcroix @@ -19,6 +19,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class StatusIcon { + [Obsolete ("Replaced by (out Screen, out Rectangle, out Orientation) overload")] public bool GetGeometry (Gdk.Screen screen, Gdk.Rectangle area, out Orientation orientation) { @@ -98,4 +105,5 @@ Marshal.FreeHGlobal (native_area); return ret; } - + } +} diff --git a/gtk/Stock.custom b/gtk/Stock.cs similarity index 94% rename from gtk/Stock.custom rename to gtk/Stock.cs index 70b36ae37..a5b7f3495 100644 --- a/gtk/Stock.custom +++ b/gtk/Stock.cs @@ -1,4 +1,4 @@ -// Stock.custom - customizations to Gtk.Stock +// Stock.cs - customizations to Gtk.Stock // // Authors: Mike Kestner // @@ -18,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Stock { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_stock_list_ids (); @@ -63,4 +69,5 @@ item.TranslationDomain = GLib.Marshaller.Utf8PtrToString (const_item.TranslationDomain); return item; } - + } +} diff --git a/gtk/StockItem.custom b/gtk/StockItem.cs similarity index 89% rename from gtk/StockItem.custom rename to gtk/StockItem.cs index 34d44f9a8..36797b719 100644 --- a/gtk/StockItem.custom +++ b/gtk/StockItem.cs @@ -1,4 +1,4 @@ -// Stock.custom - customizations to Gtk.Stock +// StockItem.cs - customizations to Gtk.StockItem // // Authors: Larry Ewing // @@ -18,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial struct StockItem { + public StockItem (string stock_id, string label, uint keyval, Gdk.ModifierType modifier, string domain) { this.StockId = stock_id; @@ -26,3 +32,5 @@ this.Modifier = modifier; this.TranslationDomain = domain; } + } +} diff --git a/gtk/Style.custom b/gtk/Style.cs similarity index 98% rename from gtk/Style.custom rename to gtk/Style.cs index 63a89f549..e3319080d 100644 --- a/gtk/Style.custom +++ b/gtk/Style.cs @@ -1,5 +1,5 @@ // -// Gtk.Style.custom - Gtk Style class customizations +// Gtk.Style.cs - Gtk Style class customizations // // Authors: Rachel Hestilow // Radek Doulik @@ -8,9 +8,6 @@ // Copyright (C) 2002, 2003 Rachel Hestilow, Radek Doulik // 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. @@ -25,7 +22,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Style { + #if FIXME30 static Gdk.GC EnsureGC (IntPtr raw) { if (raw == IntPtr.Zero) @@ -371,4 +374,5 @@ public Pango.FontDescription FontDescription { return ret; } } - + } +} diff --git a/gtk/Table.custom b/gtk/Table.cs similarity index 100% rename from gtk/Table.custom rename to gtk/Table.cs diff --git a/gtk/Target.custom b/gtk/Target.cs similarity index 89% rename from gtk/Target.custom rename to gtk/Target.cs index 472e234d5..90e516440 100644 --- a/gtk/Target.custom +++ b/gtk/Target.cs @@ -1,11 +1,9 @@ -// Gtk.Target.custom - Gtk.Target class customizations +// Gtk.Target.cs - Gtk.Target class customizations // // Author: Christian Hoff // // Copyright (c) 2009 Christian Hoff // -// 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. @@ -20,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Target { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_target_table_new_from_list(IntPtr list, out int n_targets); @@ -34,3 +39,5 @@ } return ret; } + } +} diff --git a/gtk/TargetEntry.custom b/gtk/TargetEntry.cs similarity index 87% rename from gtk/TargetEntry.custom rename to gtk/TargetEntry.cs index 744ccc312..d89d50b11 100644 --- a/gtk/TargetEntry.custom +++ b/gtk/TargetEntry.cs @@ -1,11 +1,9 @@ -// Gtk.Window.custom - Gtk Window class customizations +// Gtk.TargetEntry.cs - Gtk TargetEntry class customizations // // Author: Ettore Perazzoli // // Copyright (c) 2003 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. @@ -21,6 +19,11 @@ // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial struct TargetEntry { public TargetEntry (string target, Gtk.TargetFlags flags, uint info) { @@ -28,3 +31,5 @@ this.Flags = flags; this.Info = info; } + } +} diff --git a/gtk/TargetList.custom b/gtk/TargetList.cs similarity index 90% rename from gtk/TargetList.custom rename to gtk/TargetList.cs index b96157764..511a2b3a5 100644 --- a/gtk/TargetList.custom +++ b/gtk/TargetList.cs @@ -1,4 +1,4 @@ -// TargetList.custom - customizations for Gtk.TargetList +// TargetList.cs - customizations for Gtk.TargetList // // Copyright (c) 2004 Novell, Inc. // @@ -16,6 +16,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TargetList { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_target_list_new(Gtk.TargetEntry[] targets, uint n_targets); @@ -39,3 +46,5 @@ { return Target.TableNewFromList (list); } + } +} diff --git a/gtk/TargetPair.custom b/gtk/TargetPair.custom deleted file mode 100644 index 32ef5f6cd..000000000 --- a/gtk/TargetPair.custom +++ /dev/null @@ -1,33 +0,0 @@ -// Gtk.TargetPair.custom - Gtk TargetPair 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 Target property.")] - public Gdk.Atom target { - get { - Gdk.Atom ret = new Gdk.Atom(_target); - if (ret == null) ret = new Gdk.Atom(_target); - return ret; - } - set { _target = value.Handle; } - } - diff --git a/gtk/TextAttributes.custom b/gtk/TextAttributes.cs similarity index 89% rename from gtk/TextAttributes.custom rename to gtk/TextAttributes.cs index 4ec6f4f90..ee248fc22 100644 --- a/gtk/TextAttributes.custom +++ b/gtk/TextAttributes.cs @@ -14,9 +14,16 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TextAttributes { 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/TextBuffer.custom b/gtk/TextBuffer.cs similarity index 97% rename from gtk/TextBuffer.custom rename to gtk/TextBuffer.cs index 78762e506..20c852c81 100644 --- a/gtk/TextBuffer.custom +++ b/gtk/TextBuffer.cs @@ -1,4 +1,4 @@ -// TextBuffer.custom - customizations to Gtk.TextBuffer. +// TextBuffer.cs - customizations to Gtk.TextBuffer. // // Authors: Mike Kestner // @@ -18,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TextBuffer { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_text_buffer_set_text (IntPtr raw, IntPtr text, int len); @@ -181,4 +187,5 @@ public Gdk.Atom[] SerializeFormats { return result; } } - + } +} diff --git a/gtk/TextChildAnchor.custom b/gtk/TextChildAnchor.cs similarity index 87% rename from gtk/TextChildAnchor.custom rename to gtk/TextChildAnchor.cs index 70a6fd273..419333d97 100644 --- a/gtk/TextChildAnchor.custom +++ b/gtk/TextChildAnchor.cs @@ -1,4 +1,4 @@ -// TextChildAnchor.custom - customizations to Gtk.TextChildAnchor +// TextChildAnchor.cs - customizations to Gtk.TextChildAnchor // // Authors: Mike Kestner // @@ -18,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TextChildAnchor { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_child_anchor_get_widgets (IntPtr raw); @@ -34,4 +40,5 @@ return result; } } - + } +} diff --git a/gtk/TextIter.custom b/gtk/TextIter.cs similarity index 95% rename from gtk/TextIter.custom rename to gtk/TextIter.cs index ce11a8997..346543db7 100755 --- a/gtk/TextIter.custom +++ b/gtk/TextIter.cs @@ -1,4 +1,4 @@ -// TextIter.custom - customizations to Gtk.TextIter +// TextIter.cs - customizations to Gtk.TextIter // // Authors: Mike Kestner // @@ -18,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial struct TextIter { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gtk_text_iter_get_char(ref Gtk.TextIter raw); @@ -84,3 +90,5 @@ public bool BackwardFindChar (Gtk.TextCharPredicate pred, IntPtr user_data, Gtk.TextIter limit) { return BackwardFindChar (pred, limit); } + } +} diff --git a/gtk/TextMark.custom b/gtk/TextMark.cs similarity index 87% rename from gtk/TextMark.custom rename to gtk/TextMark.cs index fbd221485..b5943f298 100644 --- a/gtk/TextMark.custom +++ b/gtk/TextMark.cs @@ -1,11 +1,9 @@ -// Gtk.TextMark.custom - Gtk TextMark class customizations +// Gtk.TextMark.cs - Gtk TextMark class customizations // // Author: Mike Kestner (mkestner@novell.com) // // 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. @@ -20,9 +18,15 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - +namespace Gtk { + + using System; + + public partial class TextMark { + protected TextMark () : base (IntPtr.Zero) { CreateNativeObject (new string [0], new GLib.Value [0]); } - + } +} diff --git a/gtk/TextTag.custom b/gtk/TextTag.cs similarity index 89% rename from gtk/TextTag.custom rename to gtk/TextTag.cs index 7b2f5bb87..e48b3d73f 100644 --- a/gtk/TextTag.custom +++ b/gtk/TextTag.cs @@ -1,5 +1,5 @@ // - // Gtk.TextTag.custom - Gtk TextTag class customizations + // Gtk.TextTag.cs - Gtk TextTag class customizations // // Author: Radek Doulik (rodo@ximian.com) // @@ -22,7 +22,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + using System; + + public partial class TextTag { + public Pango.Weight Weight { get { GLib.Value val = GetProperty ("weight"); @@ -36,3 +41,5 @@ val.Dispose (); } } + } +} diff --git a/gtk/TextView.custom b/gtk/TextView.cs similarity index 87% rename from gtk/TextView.custom rename to gtk/TextView.cs index 98318d043..736dde309 100644 --- a/gtk/TextView.custom +++ b/gtk/TextView.cs @@ -1,11 +1,9 @@ -// Gtk.TextView.custom - Gtk TextView class customizations +// Gtk.TextView.cs - Gtk TextView class customizations // // Author: Mike Kestner // // Copyright (C) 2004 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. @@ -20,7 +18,14 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - + +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TextView { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_view_new_with_buffer (IntPtr buffer); @@ -34,4 +39,5 @@ Raw = gtk_text_view_new_with_buffer (buffer.Handle); } - + } +} diff --git a/gtk/TooltipsData.custom b/gtk/TooltipsData.custom deleted file mode 100644 index b666818de..000000000 --- a/gtk/TooltipsData.custom +++ /dev/null @@ -1,39 +0,0 @@ -// Gtk.TooltipsData.custom - Gtk TooltipsData 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. - - - [Obsolete ("Replaced by Tooltips property.")] - public Gtk.Tooltips tooltips { - get { - return GLib.Object.GetObject(_tooltips) as Gtk.Tooltips; - } - set { _tooltips = value == null ? IntPtr.Zero : value.Handle; } - } - - [Obsolete ("Replaced by Widget property.")] - public Gtk.Widget widget { - get { - return GLib.Object.GetObject(_widget) as Gtk.Widget; - } - set { _widget = value == null ? IntPtr.Zero : value.Handle; } - } - diff --git a/gtk/TreeIter.custom b/gtk/TreeIter.cs similarity index 92% rename from gtk/TreeIter.custom rename to gtk/TreeIter.cs index 3a7e9accc..a42db1113 100644 --- a/gtk/TreeIter.custom +++ b/gtk/TreeIter.cs @@ -16,6 +16,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial struct TreeIter { + public IntPtr UserData { get { return _user_data; @@ -24,4 +30,5 @@ _user_data = value; } } - + } +} diff --git a/gtk/TreeModel.custom b/gtk/TreeModel.cs similarity index 92% rename from gtk/TreeModel.custom rename to gtk/TreeModel.cs index 0c4419603..9bcf41c81 100644 --- a/gtk/TreeModel.custom +++ b/gtk/TreeModel.cs @@ -1,11 +1,9 @@ -// Gtk.TreeModel.Custom - Gtk TreeModel interface customizations +// Gtk.TreeModel.cs - Gtk TreeModel interface customizations // // Author: Kristian Rietveld // // Copyright (c) 2002 Kristian Rietveld // -// 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. @@ -20,6 +18,11 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial interface TreeModel { /// IterChildren Method /// To be completed @@ -43,3 +46,5 @@ object GetValue(Gtk.TreeIter iter, int column); event RowsReorderedHandler RowsReordered; + } +} diff --git a/gtk/TreeModelAdapter.custom b/gtk/TreeModelAdapter.cs similarity index 97% rename from gtk/TreeModelAdapter.custom rename to gtk/TreeModelAdapter.cs index d28772e34..2a461425c 100644 --- a/gtk/TreeModelAdapter.custom +++ b/gtk/TreeModelAdapter.cs @@ -1,4 +1,4 @@ -// Gtk.TreeModelAdapter.custom - Gtk TreeModelAdapter customizations +// Gtk.TreeModelAdapter.cs - Gtk TreeModelAdapter customizations // // Author: Mike Kestner // @@ -18,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TreeModelAdapter { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); @@ -176,4 +182,5 @@ GLib.Object.GetObject (Handle).RemoveSignalHandler ("rows_reordered", value); } } - + } +} diff --git a/gtk/TreeModelFilter.custom b/gtk/TreeModelFilter.cs similarity index 98% rename from gtk/TreeModelFilter.custom rename to gtk/TreeModelFilter.cs index eebafc8b0..03636f1ad 100644 --- a/gtk/TreeModelFilter.custom +++ b/gtk/TreeModelFilter.cs @@ -1,3 +1,10 @@ +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TreeModelFilter { + [DllImport ("libgtk-win32-3.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) { @@ -178,4 +185,5 @@ RemoveSignalHandler ("rows_reordered", value); } } - + } +} diff --git a/gtk/TreeModelSort.custom b/gtk/TreeModelSort.cs similarity index 97% rename from gtk/TreeModelSort.custom rename to gtk/TreeModelSort.cs index 14b051a32..19eb4066e 100644 --- a/gtk/TreeModelSort.custom +++ b/gtk/TreeModelSort.cs @@ -1,11 +1,9 @@ -// Gtk.TreeModelSort.Custom - Gtk TreeModelSort class customizations +// Gtk.TreeModelSort.cs - Gtk TreeModelSort class customizations // // Author: Kristian Rietveld // // Copyright (c) 2002 Kristian Rietveld // -// 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. @@ -20,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TreeModelSort { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); @@ -181,4 +185,5 @@ RemoveSignalHandler ("rows_reordered", value); } } - + } +} diff --git a/gtk/TreePath.custom b/gtk/TreePath.cs similarity index 92% rename from gtk/TreePath.custom rename to gtk/TreePath.cs index 5d44531ba..28a98eb65 100644 --- a/gtk/TreePath.custom +++ b/gtk/TreePath.cs @@ -13,6 +13,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TreePath { + // Patch submitted by malte on bug #49518 [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_tree_path_get_indices(IntPtr raw); @@ -44,4 +51,5 @@ { return ToString ().GetHashCode (); } - + } +} diff --git a/gtk/TreeSelection.custom b/gtk/TreeSelection.cs similarity index 90% rename from gtk/TreeSelection.custom rename to gtk/TreeSelection.cs index e90e98a36..2910dae35 100644 --- a/gtk/TreeSelection.custom +++ b/gtk/TreeSelection.cs @@ -1,4 +1,4 @@ -// TreeSelection.custom - customizations to Gtk.TreeSelection +// TreeSelection.cs - customizations to Gtk.TreeSelection // // Authors: Mike Kestner // @@ -18,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TreeSelection { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_tree_selection_get_selected_rows (IntPtr raw, IntPtr model); @@ -39,3 +45,5 @@ { return gtk_tree_selection_get_selected_without_model (Handle, IntPtr.Zero, out iter); } + } +} diff --git a/gtk/TreeStore.custom b/gtk/TreeStore.cs similarity index 98% rename from gtk/TreeStore.custom rename to gtk/TreeStore.cs index 70c455ab0..d2b52c40f 100644 --- a/gtk/TreeStore.custom +++ b/gtk/TreeStore.cs @@ -1,4 +1,4 @@ -// Gtk.TreeStore.Custom - Gtk TreeStore class customizations +// Gtk.TreeStore.cs - Gtk TreeStore class customizations // // Authors: Kristian Rietveld // Mike Kestner @@ -6,8 +6,6 @@ // Copyright (c) 2002 Kristian Rietveld // Copyright (c) 2004 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. @@ -22,6 +20,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TreeStore { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_append (IntPtr raw, out TreeIter iter, ref TreeIter parent); @@ -403,5 +407,5 @@ RemoveSignalHandler ("rows_reordered", value); } } - - + } +} diff --git a/gtk/TreeView.custom b/gtk/TreeView.cs similarity index 96% rename from gtk/TreeView.custom rename to gtk/TreeView.cs index ac5743398..11aa49ae5 100644 --- a/gtk/TreeView.custom +++ b/gtk/TreeView.cs @@ -1,4 +1,4 @@ -// Gtk.TreeView.Custom - Gtk TreeView class customizations +// Gtk.TreeView.cs - Gtk TreeView class customizations // // Authors: // Kristian Rietveld @@ -7,8 +7,6 @@ // Copyright (c) 2002 Kristian Rietveld // Copyright (c) 2003 Ximian, Inc. (http://www.ximian.com) // -// 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. @@ -23,6 +21,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TreeView { public Gdk.Color OddRowColor { get { @@ -147,4 +151,5 @@ TreeViewColumn col = new TreeViewColumn (title, cell, attrs); return InsertColumn (col, pos); } - + } +} diff --git a/gtk/TreeViewColumn.custom b/gtk/TreeViewColumn.cs similarity index 94% rename from gtk/TreeViewColumn.custom rename to gtk/TreeViewColumn.cs index 7e4689bf3..b4bc2e668 100644 --- a/gtk/TreeViewColumn.custom +++ b/gtk/TreeViewColumn.cs @@ -1,11 +1,9 @@ -// Gtk.TreeViewColumn.Custom - Gtk TreeViewColumn class customizations +// Gtk.TreeViewColumn.cs - Gtk TreeViewColumn class customizations // // Author: Rachel Hestilow // // Copyright (c) 2003 Rachel Hestilow // -// 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. @@ -20,6 +18,12 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class TreeViewColumn { public void SetAttributes (CellRenderer cell, params object[] attrs) { @@ -77,4 +81,5 @@ GCHandle gch = GCHandle.Alloc (func_wrapper); gtk_cell_layout_set_cell_data_func (Handle, cell_renderer == null ? IntPtr.Zero : cell_renderer.Handle, func_wrapper.NativeDelegate, (IntPtr) gch, GLib.DestroyHelper.NotifyHandler); } - + } +} diff --git a/gtk/UIManager.custom b/gtk/UIManager.cs similarity index 93% rename from gtk/UIManager.custom rename to gtk/UIManager.cs index cf56bb5f9..c2589c8ed 100644 --- a/gtk/UIManager.custom +++ b/gtk/UIManager.cs @@ -1,11 +1,9 @@ -// Gtk.UiManager.custom - Gtk UiManager class customizations +// Gtk.UiManager.cs - Gtk UiManager class customizations // // Author: John Luke // // Copyright (C) 2004 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. @@ -20,6 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class UIManager { + public uint AddUiFromResource (string resource) { if (resource == null) @@ -65,3 +70,5 @@ return result; } } + } +} diff --git a/gtk/VBox.custom b/gtk/VBox.cs similarity index 91% rename from gtk/VBox.custom rename to gtk/VBox.cs index 5b7d2e0dd..bb2723bd0 100644 --- a/gtk/VBox.custom +++ b/gtk/VBox.cs @@ -13,5 +13,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial class VBox { public VBox () : this (false, 0) {} + + } +} diff --git a/gtk/VScale.custom b/gtk/VScale.cs similarity index 89% rename from gtk/VScale.custom rename to gtk/VScale.cs index e0abfd3e2..ddff11347 100644 --- a/gtk/VScale.custom +++ b/gtk/VScale.cs @@ -1,11 +1,9 @@ -// Gtk.VScale.custom - Gtk VScale class customizations +// Gtk.VScale.cs - Gtk VScale class customizations // // Author: Mike Kestner // // Copyright (C) 2004 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. @@ -20,7 +18,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class VScale { + [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_vscale_new_with_range (double min, double max, double step); @@ -39,4 +43,5 @@ Raw = gtk_vscale_new_with_range (min, max, step); } - + } +} diff --git a/gtk/Viewport.custom b/gtk/Viewport.cs similarity index 92% rename from gtk/Viewport.custom rename to gtk/Viewport.cs index b0ac4a6fa..a784db055 100644 --- a/gtk/Viewport.custom +++ b/gtk/Viewport.cs @@ -15,7 +15,14 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + + public partial class Viewport { // Make a default constructor that wraps typical usage. public Viewport (): this (null, null) { } + } +} diff --git a/gtk/Widget.custom b/gtk/Widget.cs similarity index 98% rename from gtk/Widget.custom rename to gtk/Widget.cs index 28dd96b6c..9063e5e75 100644 --- a/gtk/Widget.custom +++ b/gtk/Widget.cs @@ -1,5 +1,5 @@ // -// Gtk.Widget.custom - Gtk Widget class customizations +// Gtk.Widget.cs - Gtk Widget class customizations // // Authors: Rachel Hestilow , // Brad Taylor @@ -7,9 +7,6 @@ // Copyright (C) 2007 Brad Taylor // Copyright (C) 2002 Rachel Hestilow // -// 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. @@ -24,6 +21,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + + public partial class Widget { [Obsolete ("Replaced by Window property.")] public Gdk.Window GdkWindow { get { return Window; } @@ -293,7 +297,7 @@ public void Path (out string path, out string path_reversed) } -// Code from Object.custom in 2.x +// Code from custom code for Gtk.Object in 2.x // Object is gone in 3.x static Hashtable destroy_handlers; @@ -399,3 +403,5 @@ public void Path (out string path, out string path_reversed) gtk_widget_destroy (Handle); InternalDestroyed -= NativeDestroyHandler; } + } +} \ No newline at end of file diff --git a/gtk/Window.custom b/gtk/Window.cs similarity index 94% rename from gtk/Window.custom rename to gtk/Window.cs index 49f4d8cfe..61b5c9627 100755 --- a/gtk/Window.custom +++ b/gtk/Window.cs @@ -1,12 +1,10 @@ -// Gtk.Window.custom - Gtk Window class customizations +// Gtk.Window.cs - Gtk Window class customizations // // Author: Mike Kestner // // Copyright (c) 2001 Mike Kestner // Copyright (c) 2004 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. @@ -21,6 +19,13 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. +namespace Gtk { + + using System; + using System.Runtime.InteropServices; + + public partial class Window { + public Window (String title) : this (WindowType.Toplevel) { this.Title = title; @@ -85,4 +90,5 @@ DefaultHeight = value.Height; } } - + } +}