diff --git a/ChangeLog b/ChangeLog index 90139030c..25c3da055 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2005-07-02 Mike Kestner + + * generator/CallbackGen.cs : implement new IAccessor iface so that + callback fields on structs can now be accessed. + * generator/ClassBase.cs : remove/abstract some methods incorrectly + located here. + * generator/ClassGen.cs : implement methods previously inherited from + ClassBase incorrectly. + * generator/HandleBase.cs : new base class for native ptr wrappers. + Implements new IAccessor interface and code moved from ClassBase. + * generator/IAccessor.cs : new iface to generate field/prop accessors. + * generator/InterfaceGen.cs : derive from new ObjectBase. + * generator/LPGen.cs : implement IAccessor. + * generator/LPUGen.cs : implement IAccessor. + * generator/ObjectBase.cs : new base class for Object/Iface types. + * generator/ObjectGen.cs : derive from new ObjectBase. + * generator/OpaqueGen.cs : derive from HandleBase. + * generator/StructField.cs : refactor Generate method using new + IAccessor interface. + * */*.custom : add obsolete impls for some existing c_cased struct + field accessors that are now StudlyNamed. + 2005-07-02 Mike Kestner * generator/CallbackGen.cs : remove an old workaround that put diff --git a/doc/en/Art/PixBuf.xml b/doc/en/Art/PixBuf.xml index fcb92cfeb..f13b5bbfa 100644 --- a/doc/en/Art/PixBuf.xml +++ b/doc/en/Art/PixBuf.xml @@ -313,5 +313,17 @@ To be added + + + Property + + Art.DestroyNotify + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gda/Field.xml b/doc/en/Gda/Field.xml index c18982af1..6e2790f27 100644 --- a/doc/en/Gda/Field.xml +++ b/doc/en/Gda/Field.xml @@ -57,30 +57,30 @@ To be added - - + + + + Property Gda.Value - - To be added - a - To be added + To be added. + To be added. + To be added. - - + + Property Gda.FieldAttributes - - To be added - a - To be added + To be added. + To be added. + To be added. diff --git a/doc/en/Gdk/EdgeTable.xml b/doc/en/Gdk/EdgeTable.xml index 3e6e4bbea..1f8336c41 100644 --- a/doc/en/Gdk/EdgeTable.xml +++ b/doc/en/Gdk/EdgeTable.xml @@ -82,6 +82,22 @@ a To be added + + + System.Obsolete(Message="Replaced by Scanlines property.", IsError=False) + + + + + Property + + Gdk.ScanLineList + + + To be added. + To be added. + To be added. + diff --git a/doc/en/Gdk/EventOwnerChange.xml b/doc/en/Gdk/EventOwnerChange.xml index 0872e9416..5e31df691 100644 --- a/doc/en/Gdk/EventOwnerChange.xml +++ b/doc/en/Gdk/EventOwnerChange.xml @@ -123,30 +123,30 @@ To be added - - + + + + Property Gdk.Window - - To be added - a - To be added + To be added. + To be added. + To be added. - - + + Property Gdk.Atom - - To be added - a - To be added + To be added. + To be added. + To be added. diff --git a/doc/en/Gdk/GCValues.xml b/doc/en/Gdk/GCValues.xml index 38160e5ba..64dbca89f 100644 --- a/doc/en/Gdk/GCValues.xml +++ b/doc/en/Gdk/GCValues.xml @@ -57,7 +57,11 @@ To be added: an object of type 'Gdk.Pixmap' To be added - + + + System.Obsolete(Message="Replaced by ClipMask property.", IsError=False) + + Property @@ -71,7 +75,11 @@ To be added: an object of type 'Gdk.Pixmap' To be added - + + + System.Obsolete(Message="Replaced by Stipple property.", IsError=False) + + Property @@ -85,7 +93,11 @@ To be added: an object of type 'Gdk.Pixmap' To be added - + + + System.Obsolete(Message="Replaced by Tile property.", IsError=False) + + Field @@ -282,5 +294,41 @@ + + + Property + + Gdk.Pixmap + + + To be added. + To be added. + To be added. + + + + + Property + + Gdk.Pixmap + + + To be added. + To be added. + To be added. + + + + + Property + + Gdk.Pixmap + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gdk/PangoAttrStipple.xml b/doc/en/Gdk/PangoAttrStipple.xml index 9320462be..3d7e16d55 100644 --- a/doc/en/Gdk/PangoAttrStipple.xml +++ b/doc/en/Gdk/PangoAttrStipple.xml @@ -75,7 +75,11 @@ To be added - + + + System.Obsolete(Message="Replaced by Stipple property.", IsError=False) + + Field @@ -89,5 +93,17 @@ To be added + + + Property + + Gdk.Pixmap + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gdk/PixbufFrame.xml b/doc/en/Gdk/PixbufFrame.xml index 0c17027ce..b101f0f5e 100644 --- a/doc/en/Gdk/PixbufFrame.xml +++ b/doc/en/Gdk/PixbufFrame.xml @@ -57,7 +57,11 @@ A - + + + System.Obsolete(Message="Replaced by Revert property.", IsError=False) + + Property @@ -71,7 +75,11 @@ A - + + + System.Obsolete(Message="Replaced by Composited property.", IsError=False) + + Property @@ -85,7 +93,11 @@ A - + + + System.Obsolete(Message="Replaced by Pixbuf property.", IsError=False) + + Field @@ -177,5 +189,41 @@ + + + Property + + Gdk.Pixbuf + + + To be added. + To be added. + To be added. + + + + + Property + + Gdk.Pixbuf + + + To be added. + To be added. + To be added. + + + + + Property + + Gdk.Pixbuf + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gdk/WindowAttr.xml b/doc/en/Gdk/WindowAttr.xml index 7fad4b2ce..241bdfc80 100644 --- a/doc/en/Gdk/WindowAttr.xml +++ b/doc/en/Gdk/WindowAttr.xml @@ -55,9 +55,13 @@ Colormap for the window. To be added: an object of type 'Gdk.Colormap' - None. + Replaced by . - + + + System.Obsolete(Message="Replaced by Colormap property.", IsError=False) + + Property @@ -67,13 +71,15 @@ - - for the window. - - for the window. - None. + The for the window. + a for the window. + Replaced by . - + + + System.Obsolete(Message="Replaced by Visual property.", IsError=False) + + Property @@ -84,9 +90,13 @@ Cursor for the window (see ). Cursor for the window. (see ). - None. + Replaced by . - + + + System.Obsolete(Message="Replaced by Cursor property.", IsError=False) + + Field @@ -244,5 +254,41 @@ + + + Property + + Gdk.Visual + + + The for the window. + a for the window. + + + + + + Property + + Gdk.Colormap + + + Colormap for the window. + an object of type 'Gdk.Colormap' + + + + + + Property + + Gdk.Cursor + + + Cursor for the window (see ). + Cursor for the window. (see ). + + + diff --git a/doc/en/Gnome/GPFontEntry.xml b/doc/en/Gnome/GPFontEntry.xml index 4dac98a66..4faf66c16 100644 --- a/doc/en/Gnome/GPFontEntry.xml +++ b/doc/en/Gnome/GPFontEntry.xml @@ -94,7 +94,11 @@ a To be added - + + + System.Obsolete(Message="Replaced by Face property.", IsError=False) + + Field @@ -227,5 +231,17 @@ + + + Property + + Gnome.FontFace + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gnome/ModuleInfo.xml b/doc/en/Gnome/ModuleInfo.xml index eb74d4591..2389870b5 100644 --- a/doc/en/Gnome/ModuleInfo.xml +++ b/doc/en/Gnome/ModuleInfo.xml @@ -153,5 +153,65 @@ To be added. + + + Property + + Gnome.ModuleHook + + + To be added. + To be added. + To be added. + + + + + Property + + Gnome.ModuleHook + + + To be added. + To be added. + To be added. + + + + + Property + + Gnome.ModuleHook + + + To be added. + To be added. + To be added. + + + + + Property + + Gnome.ModuleInitHook + + + To be added. + To be added. + To be added. + + + + + Property + + Gnome.ModuleClassInitHook + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gnome/Trigger.xml b/doc/en/Gnome/Trigger.xml index 9eba2bd20..6b6868c45 100644 --- a/doc/en/Gnome/Trigger.xml +++ b/doc/en/Gnome/Trigger.xml @@ -70,5 +70,17 @@ To be added + + + Property + + Gnome.TriggerActionFunction + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gnome/UIBuilderData.xml b/doc/en/Gnome/UIBuilderData.xml index 69088ca98..19420805d 100644 --- a/doc/en/Gnome/UIBuilderData.xml +++ b/doc/en/Gnome/UIBuilderData.xml @@ -57,5 +57,41 @@ To be added + + + Property + + Gnome.UISignalConnectFunc + + + To be added. + To be added. + To be added. + + + + + Property + + Gtk.CallbackMarshal + + + To be added. + To be added. + To be added. + + + + + Property + + Gtk.DestroyNotify + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gnome/UIInfo.xml b/doc/en/Gnome/UIInfo.xml index ecb22b18b..200eed5af 100644 --- a/doc/en/Gnome/UIInfo.xml +++ b/doc/en/Gnome/UIInfo.xml @@ -57,7 +57,11 @@ To be added: an object of type 'Gtk.Widget' To be added - + + + System.Obsolete(Message="Replaced by Widget property.", IsError=False) + + Field @@ -136,5 +140,17 @@ To be added + + + Property + + Gtk.Widget + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/GnomeDb/ComponentInfo.xml b/doc/en/GnomeDb/ComponentInfo.xml index fc7137cfa..234e1922d 100644 --- a/doc/en/GnomeDb/ComponentInfo.xml +++ b/doc/en/GnomeDb/ComponentInfo.xml @@ -45,19 +45,7 @@ To be added - - - Property - - Gda.ParameterList - - - - To be added - a - To be added - - + Field @@ -149,5 +137,17 @@ To be added + + + Property + + Gda.ParameterList + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gtk/ImageIconNameData.xml b/doc/en/Gtk/ImageIconNameData.xml index a5e3f5589..23117ec14 100644 --- a/doc/en/Gtk/ImageIconNameData.xml +++ b/doc/en/Gtk/ImageIconNameData.xml @@ -71,17 +71,17 @@ To be added - - + + + Property Gdk.Pixbuf - - To be added - a - To be added + To be added. + To be added. + To be added. diff --git a/doc/en/Gtk/ItemFactoryEntry.xml b/doc/en/Gtk/ItemFactoryEntry.xml index 9b67b2290..420d1b2ba 100644 --- a/doc/en/Gtk/ItemFactoryEntry.xml +++ b/doc/en/Gtk/ItemFactoryEntry.xml @@ -108,5 +108,17 @@ "<LastBranch>" creates a right justified item to hold sub items. + + + Property + + Gtk.ItemFactoryCallback + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gtk/MenuEntry.xml b/doc/en/Gtk/MenuEntry.xml index 0255cd524..7fb1b67ef 100644 --- a/doc/en/Gtk/MenuEntry.xml +++ b/doc/en/Gtk/MenuEntry.xml @@ -77,18 +77,29 @@ - - + + + Property Gtk.Widget - - The widget related to this menu entry. - a - - + To be added. + To be added. + To be added. + + + + + Property + + Gtk.MenuCallback + + + To be added. + To be added. + To be added. diff --git a/doc/en/Gtk/TargetPair.xml b/doc/en/Gtk/TargetPair.xml index 5c0aff4b6..bf5ff9b78 100644 --- a/doc/en/Gtk/TargetPair.xml +++ b/doc/en/Gtk/TargetPair.xml @@ -57,7 +57,11 @@ a - + + + System.Obsolete(Message="Replaced by Target property.", IsError=False) + + Field @@ -84,5 +88,17 @@ + + + Property + + Gdk.Atom + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gtk/TextAppearance.xml b/doc/en/Gtk/TextAppearance.xml index 854683905..74f29ccaa 100644 --- a/doc/en/Gtk/TextAppearance.xml +++ b/doc/en/Gtk/TextAppearance.xml @@ -58,7 +58,11 @@ - + + + System.Obsolete(Message="Replaced by FgStipple property.", IsError=False) + + Property @@ -73,7 +77,11 @@ - + + + System.Obsolete(Message="Replaced by BgStipple property.", IsError=False) + + Field @@ -142,5 +150,29 @@ + + + Property + + Gdk.Pixmap + + + To be added. + To be added. + To be added. + + + + + Property + + Gdk.Pixmap + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gtk/TextAttributes.xml b/doc/en/Gtk/TextAttributes.xml index fe38a6cfc..414b2b919 100644 --- a/doc/en/Gtk/TextAttributes.xml +++ b/doc/en/Gtk/TextAttributes.xml @@ -122,7 +122,11 @@ a - + + + System.Obsolete(Message="Replaced by Language property.", IsError=False) + + Property @@ -136,7 +140,11 @@ a - + + + System.Obsolete(Message="Replaced by Tabs property.", IsError=False) + + Property @@ -150,7 +158,11 @@ a - + + + System.Obsolete(Message="Replaced by Font property.", IsError=False) + + Property @@ -395,5 +407,41 @@ To be added. + + + Property + + Pango.FontDescription + + + To be added. + To be added. + To be added. + + + + + Property + + Pango.TabArray + + + To be added. + To be added. + To be added. + + + + + Property + + Pango.Language + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Gtk/TooltipsData.xml b/doc/en/Gtk/TooltipsData.xml index 43694ac43..3c1e04b18 100644 --- a/doc/en/Gtk/TooltipsData.xml +++ b/doc/en/Gtk/TooltipsData.xml @@ -77,7 +77,11 @@ - + + + System.Obsolete(Message="Replaced by Widget property.", IsError=False) + + Property @@ -91,7 +95,11 @@ an object of type To be added. - + + + System.Obsolete(Message="Replaced by Tooltips property.", IsError=False) + + Field @@ -122,5 +130,29 @@ + + + Property + + Gtk.Tooltips + + + To be added. + To be added. + To be added. + + + + + Property + + Gtk.Widget + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Pango/Analysis.xml b/doc/en/Pango/Analysis.xml index c1717bc34..600ce0961 100644 --- a/doc/en/Pango/Analysis.xml +++ b/doc/en/Pango/Analysis.xml @@ -55,9 +55,13 @@ The an object of type - + Replaced by . - + + + System.Obsolete(Message="Replaced by Language property", IsError=False) + + Property @@ -69,9 +73,13 @@ the an object of type - + Replaced by . - + + + System.Obsolete(Message="Replaced by Font property", IsError=False) + + Field @@ -96,8 +104,13 @@ The engine for doing rendering-system-dependent processing. a + Replaced by . - + + + System.Obsolete(Message="Replaced by ShapeEngine property", IsError=False) + + Property @@ -108,9 +121,13 @@ The engine for doing rendering-system-independent processing. a - + Replaced by . - + + + System.Obsolete(Message="Replaced by LangEngine property", IsError=False) + + Property @@ -124,5 +141,53 @@ + + + Property + + Pango.EngineShape + + + The engine for doing rendering-system-dependent processing. + a + + + + + + Property + + Pango.EngineLang + + + The engine for doing rendering-system-independent processing. + a + + + + + + Property + + Pango.Font + + + the + an object of type + + + + + + Property + + Pango.Language + + + The + an object of type + + + diff --git a/doc/en/Rsvg/State.xml b/doc/en/Rsvg/State.xml index 9136d34dc..ab2d082f3 100644 --- a/doc/en/Rsvg/State.xml +++ b/doc/en/Rsvg/State.xml @@ -96,7 +96,11 @@ a To be added - + + + System.Obsolete(Message="Replaced by Fill property.", IsError=False) + + Property @@ -109,7 +113,11 @@ a To be added - + + + System.Obsolete(Message="Replaced by Stroke property.", IsError=False) + + Property @@ -122,7 +130,11 @@ a To be added - + + + System.Obsolete(Message="Replaced by Dash property.", IsError=False) + + Property @@ -135,7 +147,11 @@ a To be added - + + + System.Obsolete(Message="Replaced by SavePixbuf property.", IsError=False) + + Field @@ -456,5 +472,53 @@ + + + Property + + Rsvg.PaintServer + + + To be added. + To be added. + To be added. + + + + + Property + + Rsvg.PaintServer + + + To be added. + To be added. + To be added. + + + + + Property + + Art.VpathDash + + + To be added. + To be added. + To be added. + + + + + Property + + Gdk.Pixbuf + + + To be added. + To be added. + To be added. + + diff --git a/doc/en/Vte/Ring.xml b/doc/en/Vte/Ring.xml index f86146435..9a6e3b20a 100644 --- a/doc/en/Vte/Ring.xml +++ b/doc/en/Vte/Ring.xml @@ -84,5 +84,17 @@ To be added + + + Property + + Vte.RingFreeFunc + + + To be added. + To be added. + To be added. + + diff --git a/gdk/EdgeTable.custom b/gdk/EdgeTable.custom new file mode 100644 index 000000000..3e2910dec --- /dev/null +++ b/gdk/EdgeTable.custom @@ -0,0 +1,33 @@ +// Gdk.EdgeTable.custom - Gdk EdgeTable 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 Scanlines property.")] + public Gdk.ScanLineList scanlines { + get { + Gdk.ScanLineList ret = new Gdk.ScanLineList(_scanlines); + if (ret == null) ret = new Gdk.ScanLineList(_scanlines); + return ret; + } + set { _scanlines = value.Handle; } + } + diff --git a/gdk/GCValues.custom b/gdk/GCValues.custom new file mode 100644 index 000000000..9073a38cb --- /dev/null +++ b/gdk/GCValues.custom @@ -0,0 +1,50 @@ +// Gdk.GCValues.custom - Gdk GCValues 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 Tile property.")] + public Gdk.Pixmap tile { + get { + Gdk.Pixmap ret = (Gdk.Pixmap) GLib.Object.GetObject(_tile); + return ret; + } + set { _tile = value.Handle; } + } + + [Obsolete ("Replaced by Stipple property.")] + public Gdk.Pixmap stipple { + get { + Gdk.Pixmap ret = (Gdk.Pixmap) GLib.Object.GetObject(_stipple); + return ret; + } + set { _stipple = value.Handle; } + } + + [Obsolete ("Replaced by ClipMask property.")] + public Gdk.Pixmap clip_mask { + get { + Gdk.Pixmap ret = (Gdk.Pixmap) GLib.Object.GetObject(_clip_mask); + return ret; + } + set { _clip_mask = value.Handle; } + } + diff --git a/gdk/Makefile.am b/gdk/Makefile.am index 047e84727..f1d37ac36 100644 --- a/gdk/Makefile.am +++ b/gdk/Makefile.am @@ -38,12 +38,16 @@ customs = \ DisplayManager.custom \ DragContext.custom \ Drawable.custom \ + EdgeTable.custom \ + GCValues.custom \ Global.custom \ Input.custom \ Keymap.custom \ + PangoAttrStipple.custom \ Pixmap.custom \ Pixbuf.custom \ PixbufAnimation.custom \ + PixbufFrame.custom \ PixbufLoader.custom \ Pixdata.custom \ Point.custom \ diff --git a/gdk/PangoAttrStipple.custom b/gdk/PangoAttrStipple.custom new file mode 100644 index 000000000..4577e91c2 --- /dev/null +++ b/gdk/PangoAttrStipple.custom @@ -0,0 +1,32 @@ +// Gdk.PangoAttrStipple.custom - Gdk PangoAttrStipple 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 Stipple property.")] + public Gdk.Pixmap stipple { + get { + Gdk.Pixmap ret = GLib.Object.GetObject(_stipple) as Gdk.Pixmap; + return ret; + } + set { _stipple = value.Handle; } + } + diff --git a/gdk/PixbufFrame.custom b/gdk/PixbufFrame.custom new file mode 100644 index 000000000..6c6a99b73 --- /dev/null +++ b/gdk/PixbufFrame.custom @@ -0,0 +1,49 @@ +// Gdk.PixbufFrame.custom - Gdk PixbufFrame 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 Pixbuf property.")] + public Gdk.Pixbuf pixbuf { + get { + Gdk.Pixbuf ret = (Gdk.Pixbuf) GLib.Object.GetObject(_pixbuf); + return ret; + } + set { _pixbuf = value.Handle; } + } + + [Obsolete ("Replaced by Composited property.")] + public Gdk.Pixbuf composited { + get { + Gdk.Pixbuf ret = (Gdk.Pixbuf) GLib.Object.GetObject(_composited); + return ret; + } + set { _composited = value.Handle; } + } + + [Obsolete ("Replaced by Revert property.")] + public Gdk.Pixbuf revert { + get { + Gdk.Pixbuf ret = (Gdk.Pixbuf) GLib.Object.GetObject(_revert); + return ret; + } + set { _revert = value.Handle; } + } + diff --git a/gdk/WindowAttr.custom b/gdk/WindowAttr.custom index 49134c426..724142793 100644 --- a/gdk/WindowAttr.custom +++ b/gdk/WindowAttr.custom @@ -29,3 +29,31 @@ } } + [Obsolete ("Replaced by Visual property.")] + public Gdk.Visual visual { + get { + Gdk.Visual ret = (Gdk.Visual) GLib.Object.GetObject(_visual); + return ret; + } + set { _visual = value.Handle; } + } + + [Obsolete ("Replaced by Colormap property.")] + public Gdk.Colormap colormap { + get { + Gdk.Colormap ret = (Gdk.Colormap) GLib.Object.GetObject(_colormap); + return ret; + } + set { _colormap = value.Handle; } + } + + [Obsolete ("Replaced by Cursor property.")] + public Gdk.Cursor cursor { + get { + Gdk.Cursor ret = new Gdk.Cursor(_cursor); + if (ret == null) ret = new Gdk.Cursor(_cursor); + return ret; + } + set { _cursor = value.Handle; } + } + diff --git a/generator/CallbackGen.cs b/generator/CallbackGen.cs index b9740409b..d0ef2d935 100644 --- a/generator/CallbackGen.cs +++ b/generator/CallbackGen.cs @@ -25,7 +25,7 @@ namespace GtkSharp.Generation { using System.IO; using System.Xml; - public class CallbackGen : GenBase { + public class CallbackGen : GenBase, IAccessor { private Parameters parms; private Signature sig = null; @@ -55,6 +55,13 @@ namespace GtkSharp.Generation { return NS + "Sharp." + Name + "Wrapper.GetManagedDelegate (" + var + ")"; } + public void WriteAccessors (StreamWriter sw, string indent, string var) + { + sw.WriteLine (indent + "get {"); + sw.WriteLine (indent + "\treturn " + FromNative (var) + ";"); + sw.WriteLine (indent + "}"); + } + public string GenWrapper (GenerationInfo gen_info) { string wrapper = Name + "Native"; diff --git a/generator/ClassBase.cs b/generator/ClassBase.cs index 0fa7d24a9..37b7d21e5 100644 --- a/generator/ClassBase.cs +++ b/generator/ClassBase.cs @@ -135,6 +135,10 @@ namespace GtkSharp.Generation { } } + public abstract string AssignToName { get; } + + public abstract string CallByName (); + protected bool IsNodeNameHandled (string name) { switch (name) { @@ -152,31 +156,6 @@ namespace GtkSharp.Generation { } } - public override string MarshalType { - get { - return "IntPtr"; - } - } - - public override string CallByName (string name) - { - return name + " == null ? IntPtr.Zero : " + name + ".Handle"; - } - - public virtual string CallByName () - { - return "Handle"; - } - - public virtual string AssignToName { - get { return "Raw"; } - } - - public override string FromNative(string var) - { - return "GLib.Object.GetObject(" + var + ") as " + QualifiedName; - } - protected void GenProperties (GenerationInfo gen_info) { if (props.Count == 0) diff --git a/generator/ClassGen.cs b/generator/ClassGen.cs index 4e347309d..4076eaa60 100644 --- a/generator/ClassGen.cs +++ b/generator/ClassGen.cs @@ -31,6 +31,33 @@ namespace GtkSharp.Generation { public ClassGen (XmlElement ns, XmlElement elem) : base (ns, elem) {} + public override string AssignToName { + get { + return String.Empty; + } + } + + public override string MarshalType { + get { + return String.Empty; + } + } + + public override string CallByName () + { + return String.Empty; + } + + public override string CallByName (string var) + { + return String.Empty; + } + + public override string FromNative (string var) + { + return String.Empty; + } + public override void Generate (GenerationInfo gen_info) { gen_info.CurrentType = Name; diff --git a/generator/DESIGN b/generator/DESIGN index be36f3d21..43bd01964 100644 --- a/generator/DESIGN +++ b/generator/DESIGN @@ -19,22 +19,36 @@ represent types. GenBase: Abstract base class for any api.xml element that will have its own generated .cs file + CallbackGen: Handles elements by creating a public delegate type for the public API (in NAME.cs), and an internal type that wraps that delegate, to be passed as the actual unmanaged callback (in NAMESPACESharp.NAMENative.cs) + ClassBase: Abstract base class for types that will be converted to C# classes, structs, or interfaces + ClassGen: Handles elements (static classes) - InterfaceGen: Handles elements - ObjectGen: Handles elements - OpaqueGen: Handles and elements with the - "opaque" flag (by creating C# classes) + + HandleBase: base class for wrapped IntPtr reference types. + + OpaqueGen: Handles and elements with the + "opaque" flag (by creating C# classes) + + ObjectBase: base class for GObject/GInterface types + + InterfaceGen: Handles elements + + ObjectGen: Handles elements + StructBase: Abstract base class for types that will be translated to C# structs. + BoxedGen: Handles non-opaque elements + StructGen: Handles non-opaque elements + EnumGen: Handles elements. SimpleBase: Abstract base class for types which aren't generated from diff --git a/generator/HandleBase.cs b/generator/HandleBase.cs new file mode 100644 index 000000000..31a2b7eed --- /dev/null +++ b/generator/HandleBase.cs @@ -0,0 +1,64 @@ +// HandleBase.cs - Base class for Handle types +// +// Authors: Mike Kestner +// +// Copyright (c) 2005 Novell, Inc. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2 of the 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 +// General Public License for more details. +// +// You should have received a copy of the GNU 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 GtkSharp.Generation { + + using System; + using System.IO; + using System.Xml; + + public abstract class HandleBase : ClassBase, IAccessor { + + protected HandleBase (XmlElement ns, XmlElement elem) : base (ns, elem) {} + + public override string AssignToName { + get { + return "Raw"; + } + } + + public override string MarshalType { + get { + return "IntPtr"; + } + } + + public override string CallByName (string name) + { + return name + " == null ? IntPtr.Zero : " + name + ".Handle"; + } + + public override string CallByName () + { + return "Handle"; + } + + public void WriteAccessors (StreamWriter sw, string indent, string var) + { + sw.WriteLine (indent + "get {"); + sw.WriteLine (indent + "\treturn " + FromNative (var) + ";"); + sw.WriteLine (indent + "}"); + sw.WriteLine (indent + "set {"); + sw.WriteLine (indent + "\t" + var + " = " + CallByName ("value") + ";"); + sw.WriteLine (indent + "}"); + } + } +} diff --git a/generator/IAccessor.cs b/generator/IAccessor.cs new file mode 100644 index 000000000..3cfcfc05d --- /dev/null +++ b/generator/IAccessor.cs @@ -0,0 +1,29 @@ +// IAccessor.cs - Interface to generate property accessors. +// +// Author: Mike Kestner +// +// Copyright (c) 2005 Novell, Inc. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2 of the 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 +// General Public License for more details. +// +// You should have received a copy of the GNU 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 GtkSharp.Generation { + + public interface IAccessor { + + void WriteAccessors (System.IO.StreamWriter sw, string indentation, string field_name); + + } +} diff --git a/generator/InterfaceGen.cs b/generator/InterfaceGen.cs index 8f3ade4a1..76443a396 100644 --- a/generator/InterfaceGen.cs +++ b/generator/InterfaceGen.cs @@ -27,7 +27,7 @@ namespace GtkSharp.Generation { using System.IO; using System.Xml; - public class InterfaceGen : ClassBase { + public class InterfaceGen : ObjectBase { ArrayList vms = new ArrayList (); ArrayList members = new ArrayList (); diff --git a/generator/LPGen.cs b/generator/LPGen.cs index 4b76efb50..0a68615b6 100644 --- a/generator/LPGen.cs +++ b/generator/LPGen.cs @@ -22,8 +22,9 @@ namespace GtkSharp.Generation { using System; + using System.IO; - public class LPGen : SimpleGen { + public class LPGen : SimpleGen, IAccessor { public LPGen (string ctype) : base (ctype, "long") {} @@ -42,6 +43,16 @@ namespace GtkSharp.Generation { { return "(long) " + var; } + + public void WriteAccessors (StreamWriter sw, string indent, string var) + { + sw.WriteLine (indent + "get {"); + sw.WriteLine (indent + "\treturn " + FromNative (var) + ";"); + sw.WriteLine (indent + "}"); + sw.WriteLine (indent + "set {"); + sw.WriteLine (indent + "\t" + var + " = " + CallByName ("value") + ";"); + sw.WriteLine (indent + "}"); + } } } diff --git a/generator/LPUGen.cs b/generator/LPUGen.cs index bae32204e..063e4f982 100644 --- a/generator/LPUGen.cs +++ b/generator/LPUGen.cs @@ -22,8 +22,9 @@ namespace GtkSharp.Generation { using System; + using System.IO; - public class LPUGen : SimpleGen { + public class LPUGen : SimpleGen, IAccessor { public LPUGen (string ctype) : base (ctype, "ulong") {} @@ -42,6 +43,16 @@ namespace GtkSharp.Generation { { return "(ulong) " + var; } + + public void WriteAccessors (StreamWriter sw, string indent, string var) + { + sw.WriteLine (indent + "get {"); + sw.WriteLine (indent + "\treturn " + FromNative (var) + ";"); + sw.WriteLine (indent + "}"); + sw.WriteLine (indent + "set {"); + sw.WriteLine (indent + "\t" + var + " = " + CallByName ("value") + ";"); + sw.WriteLine (indent + "}"); + } } } diff --git a/generator/Makefile.am b/generator/Makefile.am index 2714f9432..a753ff065 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -22,6 +22,8 @@ sources = \ FieldBase.cs \ GenBase.cs \ GenerationInfo.cs \ + HandleBase.cs \ + IAccessor.cs \ IGeneratable.cs \ IManualMarshaler.cs \ ImportSignature.cs \ @@ -35,6 +37,7 @@ sources = \ MethodBody.cs \ Method.cs \ ObjectField.cs \ + ObjectBase.cs \ ObjectGen.cs \ OpaqueGen.cs \ Parameters.cs \ diff --git a/generator/ObjectBase.cs b/generator/ObjectBase.cs new file mode 100644 index 000000000..2e5db5d3e --- /dev/null +++ b/generator/ObjectBase.cs @@ -0,0 +1,36 @@ +// ObjectBase.cs - Base class for Object types +// +// Authors: Mike Kestner +// +// Copyright (c) 2005 Novell, Inc. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2 of the 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 +// General Public License for more details. +// +// You should have received a copy of the GNU 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 GtkSharp.Generation { + + using System; + using System.Xml; + + public abstract class ObjectBase : HandleBase { + + protected ObjectBase (XmlElement ns, XmlElement elem) : base (ns, elem) {} + + public override string FromNative(string var) + { + return "GLib.Object.GetObject(" + var + ") as " + QualifiedName; + } + } +} diff --git a/generator/ObjectGen.cs b/generator/ObjectGen.cs index c8b51f9cb..9e73ee295 100644 --- a/generator/ObjectGen.cs +++ b/generator/ObjectGen.cs @@ -28,7 +28,7 @@ namespace GtkSharp.Generation { using System.Text; using System.Xml; - public class ObjectGen : ClassBase { + public class ObjectGen : ObjectBase { private ArrayList strings = new ArrayList(); private ArrayList vm_nodes = new ArrayList(); diff --git a/generator/OpaqueGen.cs b/generator/OpaqueGen.cs index fb8e19e56..2003144dd 100644 --- a/generator/OpaqueGen.cs +++ b/generator/OpaqueGen.cs @@ -26,7 +26,7 @@ namespace GtkSharp.Generation { using System.IO; using System.Xml; - public class OpaqueGen : ClassBase { + public class OpaqueGen : HandleBase { public OpaqueGen (XmlElement ns, XmlElement elem) : base (ns, elem) {} diff --git a/generator/StructField.cs b/generator/StructField.cs index b84bf897e..59a4f6b44 100644 --- a/generator/StructField.cs +++ b/generator/StructField.cs @@ -3,7 +3,7 @@ // // Author: Mike Kestner // -// Copyright (c) 2004 Novell, Inc. +// Copyright (c) 2004-2005 Novell, Inc. // // This program is free software; you can redistribute it and/or // modify it under the terms of version 2 of the GNU General Public @@ -34,6 +34,9 @@ namespace GtkSharp.Generation { protected override string DefaultAccess { get { + if (IsPadding) + return "private"; + return "public"; } } @@ -46,7 +49,7 @@ namespace GtkSharp.Generation { int result; try { result = Int32.Parse (elem.GetAttribute("array_len")); - } catch (Exception e) { + } catch (Exception) { Console.Write ("Non-numeric array_len: " + elem.GetAttribute("array_len")); Console.WriteLine (" warning: array field {0} incorrectly generated", Name); result = 0; @@ -62,14 +65,12 @@ namespace GtkSharp.Generation { type += "[]"; else if ((IsPointer || SymbolTable.Table.IsOpaque (CType)) && type != "string") type = "IntPtr"; - else if (SymbolTable.Table.IsCallback (CType)) - type = "IntPtr"; return type; } } - public bool IsPadding { + bool IsPadding { get { return (CName.StartsWith ("dummy") || CName.StartsWith ("padding")); } @@ -92,7 +93,7 @@ namespace GtkSharp.Generation { } } - public string StudlyName { + string StudlyName { get { string studly = base.Name; if (studly != "") @@ -120,45 +121,25 @@ namespace GtkSharp.Generation { StreamWriter sw = gen_info.Writer; SymbolTable table = SymbolTable.Table; - if (IsArray) - sw.WriteLine (indent + "[MarshalAs (UnmanagedType.ByValArray, SizeConst=" + ArrayLength + ")]"); - string wrapped = table.GetCSType (CType); string wrapped_name = SymbolTable.Table.MangleName (CName); IGeneratable gen = table [CType]; if (IsArray) { + sw.WriteLine (indent + "[MarshalAs (UnmanagedType.ByValArray, SizeConst=" + ArrayLength + ")]"); sw.WriteLine (indent + "{0} {1} {2};", Access, CSType, StudlyName); - } else if (IsPadding) { - sw.WriteLine (indent + "private {0} {1};", CSType, Name); } else if (IsBitfield) { base.Generate (gen_info, indent); - } else if (table.IsCallback (CType)) { - // FIXME - sw.WriteLine (indent + "private {0} {1};", CSType, Name); - } else if (gen is LPGen || gen is LPUGen) { - sw.WriteLine (indent + "private " + gen.MarshalType + " " + Name + ";"); - sw.WriteLine (indent + "public " + CSType + " " + StudlyName + " {"); - sw.WriteLine (indent + "\tget {"); - sw.WriteLine (indent + "\t\treturn " + gen.FromNative (Name) + ";"); - sw.WriteLine (indent + "\t}"); - sw.WriteLine (indent + "\tset {"); - sw.WriteLine (indent + "\t\t" + Name + " = " + gen.CallByName ("value") + ";"); - sw.WriteLine (indent + "\t}"); - sw.WriteLine (indent + "}"); - } else if (table.IsObject (CType) || table.IsOpaque (CType)) { - sw.WriteLine (indent + "private {0} {1};", CSType, Name); + } else if (table [CType] is IAccessor) { + sw.WriteLine (indent + "private {0} {1};", gen.MarshalType, Name); if (Access != "private") { - sw.WriteLine (indent + Access + " " + wrapped + " " + wrapped_name + " {"); - sw.WriteLine (indent + "\tget { "); - sw.WriteLine (indent + "\t\treturn " + table.FromNativeReturn(CType, Name) + ";"); - sw.WriteLine (indent + "\t}"); - - sw.WriteLine (indent + "\tset { " + Name + " = " + table.CallByName (CType, "value") + "; }"); + IAccessor acc = table [CType] as IAccessor; + sw.WriteLine (indent + Access + " " + wrapped + " " + StudlyName + " {"); + acc.WriteAccessors (sw, indent + "\t", Name); sw.WriteLine (indent + "}"); } - } else if (IsPointer && (table.IsStruct (CType) || table.IsBoxed (CType))) { + } else if (IsPointer && (gen is StructGen || gen is BoxedGen)) { sw.WriteLine (indent + "private {0} {1};", CSType, Name); sw.WriteLine (); if (Access != "private") { @@ -169,10 +150,8 @@ namespace GtkSharp.Generation { } else if (IsPointer && CSType != "string") { // FIXME: probably some fields here which should be visible. sw.WriteLine (indent + "private {0} {1};", CSType, Name); - } else if (Access != "public") { - sw.WriteLine (indent + "{0} {1} {2};", Access, CSType, Name); } else { - sw.WriteLine (indent + "public {0} {1};", CSType, StudlyName); + sw.WriteLine (indent + "{0} {1} {2};", Access, CSType, Access == "public" ? StudlyName : Name); } } } diff --git a/gnome/GPFontEntry.custom b/gnome/GPFontEntry.custom new file mode 100644 index 000000000..c1d0a8e92 --- /dev/null +++ b/gnome/GPFontEntry.custom @@ -0,0 +1,26 @@ +// GPFontEntry.custom - Gnome.GPFontEntry customizations +// +// 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 Face property.")] + public Gnome.FontFace face { + get { + Gnome.FontFace ret = (Gnome.FontFace) GLib.Object.GetObject(_face); + return ret; + } + set { _face = value.Handle; } + } + diff --git a/gnome/Makefile.am b/gnome/Makefile.am index 006ab5a12..4c152cf38 100644 --- a/gnome/Makefile.am +++ b/gnome/Makefile.am @@ -46,6 +46,7 @@ customs = \ DruidPageEdge.custom \ Font.custom \ FontFamily.custom \ + GPFontEntry.custom \ IconList.custom \ IconTextItem.custom \ PanelApplet.custom \ @@ -54,7 +55,8 @@ customs = \ PrintDialog.custom \ PrintJob.custom \ Program.custom \ - Scores.custom + Scores.custom \ + UIInfo.custom add_dist = gnome-sharp-2.0.pc.in diff --git a/gnome/UIInfo.custom b/gnome/UIInfo.custom new file mode 100644 index 000000000..fc22b41f5 --- /dev/null +++ b/gnome/UIInfo.custom @@ -0,0 +1,26 @@ +// UIInfo.custom - Gnome.UIInfo customizations +// +// 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 Widget property.")] + public Gtk.Widget widget { + get { + Gtk.Widget ret = (Gtk.Widget) GLib.Object.GetObject(_widget); + return ret; + } + set { _widget = value.Handle; } + } + diff --git a/gtk/Makefile.am b/gtk/Makefile.am index a1b0e730c..d518edcae 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -90,12 +90,16 @@ customs = \ Table.custom \ TargetEntry.custom \ TargetList.custom \ + TargetPair.custom \ + TextAttributes.custom \ + TextAppearance.custom \ TextBuffer.custom \ TextChildAnchor.custom \ TextIter.custom \ TextTag.custom \ TextView.custom \ Toolbar.custom \ + TooltipsData.custom \ TreeIter.custom \ TreeModel.custom \ TreeModelFilter.custom \ diff --git a/gtk/TargetPair.custom b/gtk/TargetPair.custom new file mode 100644 index 000000000..32ef5f6cd --- /dev/null +++ b/gtk/TargetPair.custom @@ -0,0 +1,33 @@ +// 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/TextAppearance.custom b/gtk/TextAppearance.custom new file mode 100644 index 000000000..995b7f91b --- /dev/null +++ b/gtk/TextAppearance.custom @@ -0,0 +1,41 @@ +// Gtk.TextAppearance.custom - Gtk TextAppearance class customizations +// +// Authors: Mike Kestner +// +// Copyright (c) 2005 Novell, Inc. +// +// This code is inserted after the automatically generated code. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2 of the Lesser GNU General +// Public License as published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + + + [Obsolete ("Replaced by BgStipple property.")] + public Gdk.Pixmap bg_stipple { + get { + Gdk.Pixmap ret = GLib.Object.GetObject(_bg_stipple) as Gdk.Pixmap; + return ret; + } + set { _bg_stipple = value.Handle; } + } + + [Obsolete ("Replaced by FgStipple property.")] + public Gdk.Pixmap fg_stipple { + get { + Gdk.Pixmap ret = GLib.Object.GetObject(_fg_stipple) as Gdk.Pixmap; + return ret; + } + set { _fg_stipple = value.Handle; } + } + diff --git a/gtk/TextAttributes.custom b/gtk/TextAttributes.custom new file mode 100644 index 000000000..cbd0be187 --- /dev/null +++ b/gtk/TextAttributes.custom @@ -0,0 +1,53 @@ +// Gtk.TextAttributes.custom - Gtk TextAttributes 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 Font property.")] + public Pango.FontDescription font { + get { + Pango.FontDescription ret = new Pango.FontDescription(_font); + if (ret == null) ret = new Pango.FontDescription(_font); + return ret; + } + set { _font = value.Handle; } + } + + [Obsolete ("Replaced by Tabs property.")] + public Pango.TabArray tabs { + get { + Pango.TabArray ret = new Pango.TabArray(_tabs); + if (ret == null) ret = new Pango.TabArray(_tabs); + return ret; + } + set { _tabs = value.Handle; } + } + + [Obsolete ("Replaced by Language property.")] + public Pango.Language language { + get { + Pango.Language ret = new Pango.Language(_language); + if (ret == null) ret = new Pango.Language(_language); + return ret; + } + set { _language = value.Handle; } + } + diff --git a/gtk/TooltipsData.custom b/gtk/TooltipsData.custom new file mode 100644 index 000000000..b666818de --- /dev/null +++ b/gtk/TooltipsData.custom @@ -0,0 +1,39 @@ +// 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/pango/Analysis.custom b/pango/Analysis.custom index 324111b59..3a44c58f7 100644 --- a/pango/Analysis.custom +++ b/pango/Analysis.custom @@ -30,3 +30,36 @@ return result; } } + + [Obsolete ("Replaced by ShapeEngine property")] + public Pango.EngineShape shape_engine { + get { + return _shape_engine == IntPtr.Zero ? null : new Pango.EngineShape(_shape_engine); + } + set { _shape_engine = value == null ? IntPtr.Zero : value.Handle; } + } + + [Obsolete ("Replaced by LangEngine property")] + public Pango.EngineLang lang_engine { + get { + return _lang_engine == IntPtr.Zero ? null : new Pango.EngineLang(_lang_engine); + } + set { _lang_engine = value == null ? IntPtr.Zero : value.Handle; } + } + + [Obsolete ("Replaced by Font property")] + public Pango.Font font { + get { + return GLib.Object.GetObject(_font) as Pango.Font; + } + set { _font = value == null ? IntPtr.Zero : value.Handle; } + } + + [Obsolete ("Replaced by Language property")] + public Pango.Language language { + get { + return _language == IntPtr.Zero ? null : new Pango.Language(_language); + } + set { _language = value == null ? IntPtr.Zero : value.Handle; } + } + diff --git a/rsvg/Makefile.am b/rsvg/Makefile.am index 90d412659..e7d40d3cf 100644 --- a/rsvg/Makefile.am +++ b/rsvg/Makefile.am @@ -16,7 +16,8 @@ sources = \ customs = \ Handle.custom \ - Pixbuf.custom + Pixbuf.custom \ + State.custom add_dist = rsvg-sharp-2.0.pc.in diff --git a/rsvg/State.custom b/rsvg/State.custom new file mode 100644 index 000000000..c9240dedb --- /dev/null +++ b/rsvg/State.custom @@ -0,0 +1,55 @@ +// Rsvg.State.custom - Rsvg State 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 Fill property.")] + public Rsvg.PaintServer fill { + get { + return _fill == IntPtr.Zero ? null : new Rsvg.PaintServer(_fill); + } + set { _fill = value == null ? IntPtr.Zero : value.Handle; } + } + + [Obsolete ("Replaced by Stroke property.")] + public Rsvg.PaintServer stroke { + get { + return _stroke == IntPtr.Zero ? null : new Rsvg.PaintServer(_stroke); + } + set { _stroke = value == null ? IntPtr.Zero : value.Handle; } + } + + [Obsolete ("Replaced by Dash property.")] + public Art.VpathDash dash { + get { + return _dash == IntPtr.Zero ? null : new Art.VpathDash(_dash); + } + set { _dash = value == null ? IntPtr.Zero : value.Handle; } + } + + [Obsolete ("Replaced by SavePixbuf property.")] + public Gdk.Pixbuf save_pixbuf { + get { + return GLib.Object.GetObject(_save_pixbuf) as Gdk.Pixbuf; + } + set { _save_pixbuf = value == null ? IntPtr.Zero : value.Handle; } + } +