The rest of the first pass.

*.*: Stubbing and tweaking and cajoling and disabling to get
the first successful build of 3.0 bindings.
This commit is contained in:
Mike Kestner 2011-02-08 22:15:37 -06:00
parent 7d70a4313a
commit 34c0ecbcf7
47 changed files with 7237 additions and 5770 deletions

View file

@ -1,4 +1,4 @@
SUBDIRS = sources generator parser glib gio cairo pango atk gdk gtk gtkdotnet sample doc
SUBDIRS = sources generator parser glib gio cairo pango atk gdk gtk gtkdotnet doc
EXTRA_DIST = \
gtk-sharp.snk \

View file

@ -232,5 +232,12 @@ namespace Gdk {
{
return gdk_rectangle_intersect (ref this, ref src, out dest);
}
public static Rectangle New (IntPtr raw)
{
return (Gdk.Rectangle) Marshal.PtrToStructure (raw, typeof (Gdk.Rectangle));
}
public static Rectangle Zero;
}
}

View file

@ -3,6 +3,7 @@
<add-node path="/api"><symbol type="simple" cname="GSeekType" name="GLib.SeekType"/></add-node>
<attr path="/api/namespace" name="name">GLib</attr>
<attr path="/api/namespace/boxed[@cname='GFileAttributeInfoList']/field" name="access">private</attr>
<attr path="/api/namespace/class[@name='Global']" name="name">GioGlobal</attr>
<attr path="/api/namespace/interface/method/*/*[@type='GAsyncReadyCallback']" name="scope">async</attr>
<attr path="/api/namespace/interface[@cname='GAppInfo']" name="consume_only">1</attr>
<attr path="/api/namespace/interface[@cname='GAppInfo']/method[@name='CanRemoveSupportsType']" name="name">GetCanRemoveSupportsType</attr>

View file

@ -25,14 +25,7 @@ namespace Gtk {
using System.Runtime.InteropServices;
using Gdk;
public class Application {
//
// Disables creation of instances.
//
private Application ()
{
}
public partial class Application {
const int WS_EX_TOOLWINDOW = 0x00000080;
const int WS_OVERLAPPEDWINDOW = 0x00CF0000;

View file

@ -1,10 +1,4 @@
// Gtk.TreeSortable.Custom - Gtk TreeSortable interface customizations
//
// Author: Mike Kestner <mkestner@novell.com>
//
// Copyright (c) 2005 Novell, Inc.
//
// This code is inserted after the automatically generated code.
// Copyright (c) 2011 Novell, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
@ -20,9 +14,23 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[Obsolete ("Replaced by SetDefaultSortFunc (TreeIterCompareFunc) overload.")]
void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);
[Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")]
void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);
using System;
namespace Gtk {
public partial class CellAreaBox {
public void SetAttributes (CellRenderer cell, params object[] attrs)
{
if (attrs.Length % 2 != 0)
throw new ArgumentException ("attrs should contain pairs of attribute/col");
ClearAttributes (cell);
for (int i = 0; i < attrs.Length - 1; i += 2) {
AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]);
}
}
}
}

View file

@ -39,9 +39,9 @@
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_cell_renderer_render (IntPtr handle, IntPtr drawable, IntPtr widget, ref Gdk.Rectangle bg_area, ref Gdk.Rectangle cell_area, ref Gdk.Rectangle expose_area, int flags);
public void Render (Widget widget, Gdk.Drawable window, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, CellRendererState flags)
public void Render (Cairo.Context context, Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, CellRendererState flags)
{
gtk_cell_renderer_render (Handle, window == null ? IntPtr.Zero : window.Handle, widget == null ? IntPtr.Zero : widget.Handle, ref background_area, ref cell_area, ref expose_area, (int) flags);
gtk_cell_renderer_render (Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, ref background_area, ref cell_area, ref expose_area, (int) flags);
}
// We have to implement this VM manually because x_offset, y_offset, width and height params may be NULL and therefore cannot be treated as "out int"
@ -99,93 +99,3 @@
Marshal.FreeHGlobal (native_cell_area);
}
// Compatibility code for old GetSize(..) virtual method
static void ObsoleteGetSize_cb (IntPtr item, IntPtr widget, IntPtr cell_area_ptr, IntPtr x_offset, IntPtr y_offset, IntPtr width, IntPtr height)
{
try {
CellRenderer obj = GLib.Object.GetObject (item, false) as CellRenderer;
Gtk.Widget widg = GLib.Object.GetObject (widget, false) as Gtk.Widget;
Gdk.Rectangle cell_area = Gdk.Rectangle.New (cell_area_ptr);
int a, b, c, d;
obj.GetSize (widg, ref cell_area, out a, out b, out c, out d);
if (x_offset != IntPtr.Zero)
Marshal.WriteInt32 (x_offset, a);
if (y_offset != IntPtr.Zero)
Marshal.WriteInt32 (y_offset, b);
if (width != IntPtr.Zero)
Marshal.WriteInt32 (width, c);
if (height != IntPtr.Zero)
Marshal.WriteInt32 (height, d);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
static void OverrideObsoleteGetSize (GLib.GType gtype)
{
if (OnGetSizeCallback == null)
OnGetSizeCallback = new OnGetSizeDelegate (ObsoleteGetSize_cb);
gtksharp_cellrenderer_override_get_size (gtype.Val, OnGetSizeCallback);
}
[Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")]
[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellRenderer), ConnectionMethod="OverrideObsoleteGetSize")]
public virtual void GetSize(Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
{
InternalOnGetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height);
}
// Compatibility code for old Render(..) virtual method
static void ObsoleteRender_cb (IntPtr cell, IntPtr window, IntPtr widget, IntPtr background_area, IntPtr cell_area, IntPtr expose_area, int flags)
{
try {
Gtk.CellRenderer __obj = GLib.Object.GetObject (cell, false) as Gtk.CellRenderer;
__obj.Render (GLib.Object.GetObject(window) as Gdk.Drawable, GLib.Object.GetObject(widget) as Gtk.Widget, Gdk.Rectangle.New (background_area), Gdk.Rectangle.New (cell_area), Gdk.Rectangle.New (expose_area), (Gtk.CellRendererState) flags);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
static RenderNativeDelegate ObsoleteRenderVMCallback;
static void OverrideObsoleteRender (GLib.GType gtype)
{
if (ObsoleteRenderVMCallback == null)
ObsoleteRenderVMCallback = new RenderNativeDelegate (ObsoleteRender_cb);
OverrideRender (gtype, ObsoleteRenderVMCallback); // -> autogenerated method
}
[Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")]
[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellRenderer), ConnectionMethod="OverrideObsoleteRender")]
protected virtual void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags)
{
InternalRender (window, widget, background_area, cell_area, expose_area, flags);
}
// Compatibility code for old StartEditing(..) virtual method
static IntPtr ObsoleteStartEditing_cb (IntPtr cell, IntPtr evnt, IntPtr widget, IntPtr path, IntPtr background_area, IntPtr cell_area, int flags)
{
try {
Gtk.CellRenderer __obj = GLib.Object.GetObject (cell, false) as Gtk.CellRenderer;
Gtk.CellEditable __result = __obj.StartEditing (Gdk.Event.GetEvent (evnt), GLib.Object.GetObject(widget) as Gtk.Widget, GLib.Marshaller.Utf8PtrToString (path), Gdk.Rectangle.New (background_area), Gdk.Rectangle.New (cell_area), (Gtk.CellRendererState) flags);
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
static StartEditingNativeDelegate ObsoleteStartEditingVMCallback;
static void OverrideObsoleteStartEditing (GLib.GType gtype)
{
if (ObsoleteStartEditingVMCallback == null)
ObsoleteStartEditingVMCallback = new StartEditingNativeDelegate (ObsoleteStartEditing_cb);
OverrideStartEditing (gtype, ObsoleteStartEditingVMCallback);
}
[Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")]
[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellRenderer), ConnectionMethod="OverrideObsoleteStartEditing")]
public virtual Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags) {
return InternalStartEditing (evnt, widget, path, background_area, cell_area, flags);
}

View file

@ -1,41 +0,0 @@
//
// CellRendererAccel.custom - Gtk CellRendererAccel class customizations
//
// Author: Peter Johanson <peter@peterjohanson.com>
//
// Copyright (C) 2007 Peter Johanson
//
// This code is inserted after the automatically generated code.
//
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")]
public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
{
base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height);
}
[Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")]
protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags)
{
base.Render (window, widget, background_area, cell_area, expose_area, flags);
}
[Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")]
public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags)
{
return base.StartEditing (evnt, widget, path, background_area, cell_area, flags);
}

View file

@ -1,41 +0,0 @@
//
// CellRendererCombo.custom - Gtk CellRendererCombo class customizations
//
// Author: Peter Johanson <peter@peterjohanson.com>
//
// Copyright (C) 2007 Peter Johanson
//
// This code is inserted after the automatically generated code.
//
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")]
public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
{
base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height);
}
[Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")]
protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags)
{
base.Render (window, widget, background_area, cell_area, expose_area, flags);
}
[Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")]
public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags)
{
return base.StartEditing (evnt, widget, path, background_area, cell_area, flags);
}

View file

@ -1,41 +0,0 @@
//
// CellRendererPixbuf.custom - Gtk CellRendererPixbuf class customizations
//
// Author: Peter Johanson <peter@peterjohanson.com>
//
// Copyright (C) 2007 Peter Johanson
//
// This code is inserted after the automatically generated code.
//
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")]
public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
{
base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height);
}
[Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")]
protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags)
{
base.Render (window, widget, background_area, cell_area, expose_area, flags);
}
[Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")]
public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags)
{
return base.StartEditing (evnt, widget, path, background_area, cell_area, flags);
}

View file

@ -1,41 +0,0 @@
//
// CellRendererProgress.custom - Gtk CellRendererProgress class customizations
//
// Author: Peter Johanson <peter@peterjohanson.com>
//
// Copyright (C) 2007 Peter Johanson
//
// This code is inserted after the automatically generated code.
//
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")]
public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
{
base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height);
}
[Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")]
protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags)
{
base.Render (window, widget, background_area, cell_area, expose_area, flags);
}
[Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")]
public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags)
{
return base.StartEditing (evnt, widget, path, background_area, cell_area, flags);
}

View file

@ -1,41 +0,0 @@
//
// CellRendererSpin.custom - Gtk CellRendererSpin class customizations
//
// Author: Peter Johanson <peter@peterjohanson.com>
//
// Copyright (C) 2007 Peter Johanson
//
// This code is inserted after the automatically generated code.
//
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")]
public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
{
base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height);
}
[Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")]
protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags)
{
base.Render (window, widget, background_area, cell_area, expose_area, flags);
}
[Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")]
public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags)
{
return base.StartEditing (evnt, widget, path, background_area, cell_area, flags);
}

View file

@ -1,41 +0,0 @@
//
// CellRendererText.custom - Gtk CellRendererText class customizations
//
// Author: Peter Johanson <peter@peterjohanson.com>
//
// Copyright (C) 2007 Peter Johanson
//
// This code is inserted after the automatically generated code.
//
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")]
public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
{
base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height);
}
[Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")]
protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags)
{
base.Render (window, widget, background_area, cell_area, expose_area, flags);
}
[Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")]
public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags)
{
return base.StartEditing (evnt, widget, path, background_area, cell_area, flags);
}

View file

@ -1,41 +0,0 @@
//
// CellRendererToggle.custom - Gtk CellRendererToggle class customizations
//
// Author: Peter Johanson <peter@peterjohanson.com>
//
// Copyright (C) 2007 Peter Johanson
//
// This code is inserted after the automatically generated code.
//
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[Obsolete ("Replaced by OnGetSize for implementations and GetSize(..., out Gdk.Rectangle bounds) for callers.")]
public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
{
base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height);
}
[Obsolete ("Replaced by OnRender for subclass overrides and Render (Widget ...) for callers.")]
protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags)
{
base.Render (window, widget, background_area, cell_area, expose_area, flags);
}
[Obsolete ("Replaced by OnStartEditing for subclass overrides and StartEditing (Gtk.Widget ...) for callers.")]
public override Gtk.CellEditable StartEditing(Gdk.Event evnt, Gtk.Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags)
{
return base.StartEditing (evnt, widget, path, background_area, cell_area, flags);
}

View file

@ -22,11 +22,12 @@
public ComboBox (string[] entries) : this (new ListStore (typeof (string)))
{
ListStore store = Model as ListStore;
CellRendererText cell = new CellRendererText ();
PackStart (cell, true);
SetAttributes (cell, "text", 0);
foreach (string entry in entries)
AppendText (entry);
store.AppendValues (entry);
}
public void SetAttributes (CellRenderer cell, params object[] attrs)

View file

@ -39,8 +39,6 @@ public Dialog (string title, Gtk.Window parent, Gtk.DialogFlags flags, params ob
Modal = true;
if ((flags & DialogFlags.DestroyWithParent) > 0)
DestroyWithParent = true;
if ((flags & DialogFlags.NoSeparator) > 0)
HasSeparator = false;
} else {
IntPtr native = GLib.Marshaller.StringToPtrGStrdup (title);
Raw = gtk_dialog_new_with_buttons (native, parent == null ? IntPtr.Zero : parent.Handle, (int) flags, IntPtr.Zero);

View file

@ -40,6 +40,9 @@
<attr path="/api/namespace/boxed[@cname='GtkSelectionData']/method[@name='SetText']" name="hidden">1</attr>
<attr path="/api/namespace/boxed[@cname='GtkSelectionData']/method[@name='Set']/*/*[@name='data']" name="type">guchar</attr>
<attr path="/api/namespace/boxed[@cname='GtkSelectionData']/method[@name='Set']/*/*[@name='data']" name="array">1</attr>
<attr path="/api/namespace/boxed[@cname='GtkTargetEntry']" name="opaque">false</attr>
<attr path="/api/namespace/boxed[@cname='GtkTargetEntry']/field[@cname='flags']" name="type">GtkTargetFlags</attr>
<attr path="/api/namespace/boxed[@cname='GtkTextAttributes']/field[@cname='appearance']" name="hidden">1</attr>
<attr path="/api/namespace/boxed[@cname='GtkTextIter']/method[@name='BackwardFindChar']/*/*[@name='pred']" name="scope">call</attr>
<attr path="/api/namespace/boxed[@cname='GtkTextIter']/method[@name='BackwardSearch']/*/*[@type='GtkTextIter*']" name="pass_as">out</attr>
<attr path="/api/namespace/boxed[@cname='GtkTextIter']/method[@name='Copy']" name="deprecated">1</attr>
@ -64,6 +67,7 @@
<attr path="/api/namespace/class[@cname='GtkAccel_']/method[@name='GroupsFromObject']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GtkAccelerator_']/method[@name='GetDefaultModMask']/return-type" name="type">GdkModifierType</attr>
<attr path="/api/namespace/class[@cname='GtkBindings_']/method[@name='Activate']" name="name">BindingsActivate</attr>
<attr path="/api/namespace/class[@cname='GtkCairo_']" name="name">CairoHelper</attr>
<attr path="/api/namespace/class[@cname='GtkCtree_']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GtkDrag_']/method[@name='DestSet']/*/*[@name='targets']" name="array">1</attr>
<attr path="/api/namespace/class[@cname='GtkDrag_']/method[@name='SetIconDefault']" name="hidden">1</attr>
@ -125,6 +129,14 @@
<attr path="/api/namespace/enum[@cname='GtkDebugFlag']" name="hidden">1</attr>
<attr path="/api/namespace/enum[@cname='GtkIMPreeditStyle']" name="hidden">1</attr>
<attr path="/api/namespace/enum[@cname='GtkIMStatusStyle']" name="hidden">1</attr>
<attr path="/api/namespace/enum[@cname='GtkJunctionSides']/member[@name='CornerTopleft']" name="name">CornerTopLeft</attr>
<attr path="/api/namespace/enum[@cname='GtkJunctionSides']/member[@name='CornerTopright']" name="name">CornerTopRight</attr>
<attr path="/api/namespace/enum[@cname='GtkJunctionSides']/member[@name='CornerBottomleft']" name="name">CornerBottomLeft</attr>
<attr path="/api/namespace/enum[@cname='GtkJunctionSides']/member[@name='CornerBottomright']" name="name">CornerBottomRight</attr>
<attr path="/api/namespace/enum[@cname='GtkJunctionSides']/member[@name='Top']" name="value">CornerTopLeft | CornerTopRight</attr>
<attr path="/api/namespace/enum[@cname='GtkJunctionSides']/member[@name='Bottom']" name="value">CornerBottomLeft | CornerBottomRight</attr>
<attr path="/api/namespace/enum[@cname='GtkJunctionSides']/member[@name='Left']" name="value">CornerTopLeft | CornerBottomLeft</attr>
<attr path="/api/namespace/enum[@cname='GtkJunctionSides']/member[@name='Right']" name="value">CornerTopRight | CornerBottomRight</attr>
<attr path="/api/namespace/enum[@cname='GtkObjectFlags']" name="hidden">1</attr>
<attr path="/api/namespace/enum[@cname='OperationMode']" name="hidden">1</attr>
<attr path="/api/namespace/enum[@cname='GtkPathPriorityType']" name="hidden">1</attr>
@ -219,6 +231,7 @@
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/*[@name='IterNext']/*/*[@name='iter']" name="pass_as">ref</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/*[@name='IterNthChild']/*/*[@name='iter']" name="pass_as">out</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/*[@name='IterParent']/*/*[@name='iter']" name="pass_as">out</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/*[@name='IterPrevious']/*/*[@name='iter']" name="pass_as">ref</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowChanged']" name="name">EmitRowChanged</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowDeleted']" name="name">EmitRowDeleted</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowHasChildToggled']" name="name">EmitRowHasChildToggled</attr>
@ -294,6 +307,7 @@
<attr path="/api/namespace/object[@cname='GtkButton']/signal[@name='Enter']" name="name">Entered</attr>
<attr path="/api/namespace/object[@cname='GtkButton']/signal[@name='Leave']" name="name">Left</attr>
<attr path="/api/namespace/object[@cname='GtkCalendar']/method[@name='DisplayOptions']" name="name">SetDisplayOptions</attr>
<attr path="/api/namespace/object[@cname='GtkCellArea']/signal[@name='ApplyAttributes']" name="name">AttributesApplied</attr>
<attr path="/api/namespace/object[@cname='GtkCellRenderer']/method[@name='EditingCanceled']" name="name">CancelEditing</attr>
<attr path="/api/namespace/object[@cname='GtkCellRenderer']/method[@name='StartEditing']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkCellRenderer']/method[@name='GetSize']" name="hidden">1</attr>
@ -500,6 +514,7 @@
<attr path="/api/namespace/object[@cname='GtkIMContext']/method[@name='GetPreeditString']/*/*[@name='str']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkIMContext']/method[@name='GetPreeditString']/*/*[@name='attrs']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkIMContext']/method[@name='GetSurrounding']/*/*[@name='text']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkInfoBar']/signal[@name='Response']" name="name">Respond</attr>
<attr path="/api/namespace/object[@cname='GtkInputDialog']/field[@name='CloseButton']" name="type">GtkButton*</attr>
<attr path="/api/namespace/object[@cname='GtkInputDialog']/field[@name='CloseButton']" name="access">public</attr>
<attr path="/api/namespace/object[@cname='GtkInputDialog']/field[@name='SaveButton']" name="type">GtkButton*</attr>
@ -509,9 +524,6 @@
<attr path="/api/namespace/object[@cname='GtkItemFactory']/method[@name='GetItemByAction']" name="name">GetItem</attr>
<attr path="/api/namespace/object[@cname='GtkItemFactory']/method[@name='GetWidgetByAction']" name="name">GetWidget</attr>
<attr path="/api/namespace/object[@cname='GtkItemFactory']/method[@name='PopupWithData']/*/*[@name='destroy']" name="type">GtkDestroyNotify</attr>
<attr path="/api/namespace/object[@cname='GtkItem']/signal[@name='Deselect']" name="name">Deselected</attr>
<attr path="/api/namespace/object[@cname='GtkItem']/signal[@name='Select']" name="name">Selected</attr>
<attr path="/api/namespace/object[@cname='GtkItem']/signal[@name='Toggle']" name="name">Toggled</attr>
<attr path="/api/namespace/object[@cname='GtkLabel']/constructor[@cname='gtk_label_new_with_mnemonic']" name="preferred">1</attr>
<attr path="/api/namespace/object[@cname='GtkLabel']/constructor[@cname='gtk_label_new_with_mnemonic']/*/*[@name='str']" name="property_name">label</attr>
<attr path="/api/namespace/object[@cname='GtkLabel']/property[@name='WrapMode']" name="name">LineWrapMode</attr>
@ -535,6 +547,9 @@
<attr path="/api/namespace/object[@cname='GtkMenuItem']/constructor[@cname='gtk_menu_item_new_with_mnemonic']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkMenuItem']/constructor[@cname='gtk_menu_item_new_with_label']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkMenuItem']/signal[@name='Activate']" name="name">Activated</attr>
<attr path="/api/namespace/object[@cname='GtkMenuItem']/signal[@name='Deselect']" name="name">Deselected</attr>
<attr path="/api/namespace/object[@cname='GtkMenuItem']/signal[@name='Select']" name="name">Selected</attr>
<attr path="/api/namespace/object[@cname='GtkMenuItem']/signal[@name='Toggle']" name="name">Toggled</attr>
<attr path="/api/namespace/object[@cname='GtkMenuItem']/signal[@name='ToggleSizeAllocate']" name="name">ToggleSizeAllocated</attr>
<attr path="/api/namespace/object[@cname='GtkMenuItem']/signal[@name='ToggleSizeRequest']" name="name">ToggleSizeRequested</attr>
<attr path="/api/namespace/object[@cname='GtkMenu']/method[@name='AttachToWidget']/*/*[@name='detacher']" name="scope">async</attr>
@ -548,15 +563,6 @@
<attr path="/api/namespace/object[@cname='GtkNotebook']/property[@name='Homogeneous']" name="deprecated">1</attr>
<attr path="/api/namespace/object[@cname='GtkNotebook']/signal[@name='ChangeCurrentPage']/return-type" name="type">void</attr>
<attr path="/api/namespace/object[@cname='GtkNotebook']/signal[@name='ReorderTab']/return-type" name="type">void</attr>
<attr path="/api/namespace/object[@cname='GtkObject']/constructor[@cname='gtk_object_new']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkObject']/method[@name='Destroy']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkObject']/method[@name='Get']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkObject']/method[@name='Set']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkObject']/method[@name='SetDataFull']/*/*[@name='destroy']" name="type">GtkDestroyNotify</attr>
<attr path="/api/namespace/object[@cname='GtkObject']/method[@name='SetDataByIdFull']/*/*[@name='destroy']" name="type">GtkDestroyNotify</attr>
<attr path="/api/namespace/object[@cname='GtkObject']/method[@name='Weakref']/*/*[@name='notify']" name="type">GtkDestroyNotify</attr>
<attr path="/api/namespace/object[@cname='GtkObject']/method[@name='Weakunref']/*/*[@name='notify']" name="type">GtkDestroyNotify</attr>
<attr path="/api/namespace/object[@cname='GtkObject']/signal[@name='Destroy']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkPageSetup']/constructor[@cname='gtk_page_setup_new_from_file']/*/*[@name='file_name']" name="type">const-gfilename*</attr>
<attr path="/api/namespace/object[@cname='GtkPageSetup']/method[@name='ToFile']/*/*[@name='file_name']" name="type">const-gfilename*</attr>
<attr path="/api/namespace/object[@cname='GtkPlug']/constructor[@cname='gtk_plug_new']" name="hidden">1</attr>
@ -821,16 +827,22 @@
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Destroy']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Destroyed']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Event']" name="name">ProcessEvent</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetAllocation']/parameters/parameter[@name='allocation']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetChildRequisition']/*/*[@name='requisition']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetColormap']" name="needs_ref">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetDefaultColormap']" name="needs_ref">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetDefaultStyle']" name="needs_ref">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetDefaultVisual']" name="needs_ref">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetEvents']/return-type" name="type">GdkEventMask</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetMapped']" name="name">GetIsMapped</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetModifierStyle']" name="needs_ref">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetParentWindow']" name="needs_ref">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetPath']" name="name">GetWidgetPath</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetRealized']" name="name">GetIsRealized</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetStyle']" name="needs_ref">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='GetVisual']" name="needs_ref">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='HasDefault']" name="name">GetHasDefault</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='HasFocus']" name="name">GetHasFocus</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Intersect']/*/*[@name='intersection']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='IsFocus']" name="name">GetIsFocus</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='ListAccelClosures']" name="hidden">1</attr>
@ -839,6 +851,8 @@
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Ref']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='SetEvents']/*/*[@type='gint']" name="type">GdkEventMask</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Set']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='SetMapped']" name="name">SetIsMapped</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='SetRealized']" name="name">SetIsRealized</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='SetState']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='SizeRequest']/*/*[@name='requisition']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='StyleGet']" name="hidden">1</attr>
@ -849,6 +863,8 @@
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='ChildNotify']" name="name">ChildNotified</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='DragFailed']/*/*[@name='p0']" name="name">drag_context</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='DragFailed']/*/*[@name='p1']" name="name">drag_result</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='Destroy']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='Draw']" name="name">Drawn</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='Event']" name="name">WidgetEvent</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='EventAfter']/*/*[@name='p0']" name="name">event</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='EventAfter']" name="name">WidgetEventAfter</attr>
@ -911,7 +927,6 @@
<attr path="/api/namespace/struct[@cname='GtkRcContext']" name="hidden">1</attr>
<attr path="/api/namespace/struct[@cname='GtkTableChild']" name="hidden">1</attr>
<attr path="/api/namespace/struct[@cname='GtkTableRowCol']" name="hidden">1</attr>
<attr path="/api/namespace/struct[@cname='GtkTargetEntry']/field[@cname='flags']" name="type">GtkTargetFlags</attr>
<attr path="/api/namespace/*[@cname='GtkTargetList']/constructor[@cname='gtk_target_list_new']" name="hidden">1</attr>
<attr path="/api/namespace/*[@cname='GtkTargetList']/field" name="access">private</attr>
<attr path="/api/namespace/*[@cname='GtkTargetList']/method[@name='AddTable']/*/*[@name='targets']" name="array">1</attr>
@ -947,4 +962,7 @@
<move-node path="/api/namespace/class[@cname='GtkGlobal']/method[@name='PaintSlider']">/api/namespace/object[@cname='GtkStyle']</move-node>
<move-node path="/api/namespace/class[@cname='GtkGlobal']/method[@name='PaintTab']">/api/namespace/object[@cname='GtkStyle']</move-node>
<move-node path="/api/namespace/class[@cname='GtkGlobal']/method[@name='PaintVline']">/api/namespace/object[@cname='GtkStyle']</move-node>
<remove-node path="/api/namespace/boxed[@cname='Gtk9Slice']" />
<remove-node path="/api/namespace/struct[@cname='IconSize']" />
<remove-node path="/api/namespace/struct[@cname='Range']" />
</metadata>

View file

@ -21,12 +21,6 @@
// Boston, MA 02111-1307, USA.
[Obsolete ("Replaced by Reorder (int[]) overload")]
public int Reorder ()
{
return -1;
}
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent);
public bool IterChildren (out Gtk.TreeIter iter)
@ -191,12 +185,6 @@
ColumnTypes = gtypes;
}
[Obsolete ("Replaced by ColumnTypes property.")]
public void SetColumnTypes (GLib.GType[] types)
{
ColumnTypes = types;
}
public object GetValue(Gtk.TreeIter iter, int column)
{
GLib.Value val = GLib.Value.Empty;
@ -206,18 +194,6 @@
return ret;
}
[Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")]
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{
SetSortFunc (sort_column_id, sort_func);
}
[Obsolete ("Replaced by DefaultSortFunc property.")]
public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{
DefaultSortFunc = sort_func;
}
public IEnumerator GetEnumerator()
{
return new TreeEnumerator(this);
@ -278,18 +254,9 @@
OverrideVirtualMethod (gtype, "rows_reordered", RowsReorderedVMCallback);
}
[Obsolete ("Replaced by int[] new_order overload.")]
[GLib.DefaultSignalHandler(Type=typeof(Gtk.ListStore), ConnectionMethod="OverrideRowsReordered")]
protected virtual void OnRowsReordered (Gtk.TreePath path, Gtk.TreeIter iter, out int new_order)
{
new_order = -1;
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.ListStore), ConnectionMethod="OverrideRowsReordered")]
protected virtual void OnRowsReordered (Gtk.TreePath path, Gtk.TreeIter iter, int[] new_order)
{
int dummy;
OnRowsReordered (path, iter, out dummy);
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (4);
GLib.Value[] vals = new GLib.Value [4];

View file

@ -14,6 +14,7 @@ sources = \
ActionEntry.cs \
Application.cs \
BindingAttribute.cs \
CellAreaBox.cs \
ChildPropertyAttribute.cs \
ITreeNode.cs \
Key.cs \
@ -26,14 +27,13 @@ sources = \
StockManager.cs \
ThreadNotify.cs \
ToggleActionEntry.cs \
Timeout.cs \
TreeEnumerator.cs \
TreeMenu.cs \
TreeNodeAttribute.cs \
TreeNode.cs \
TreeNodeValueAttribute.cs
customs = \
AboutDialog.custom \
Accel.custom \
AccelKey.custom \
Action.custom \
@ -44,13 +44,6 @@ customs = \
Button.custom \
Calendar.custom \
CellRenderer.custom \
CellRendererAccel.custom \
CellRendererCombo.custom \
CellRendererPixbuf.custom \
CellRendererProgress.custom \
CellRendererSpin.custom \
CellRendererText.custom \
CellRendererToggle.custom \
CellLayout.custom \
CellLayoutAdapter.custom \
CellView.custom \
@ -109,14 +102,12 @@ customs = \
TargetList.custom \
TargetPair.custom \
TextAttributes.custom \
TextAppearance.custom \
TextBuffer.custom \
TextChildAnchor.custom \
TextIter.custom \
TextMark.custom \
TextTag.custom \
TextView.custom \
Toolbar.custom \
TooltipsData.custom \
TreeIter.custom \
TreeModel.custom \
@ -125,8 +116,6 @@ customs = \
TreeModelSort.custom \
TreePath.custom \
TreeSelection.custom \
TreeSortable.custom \
TreeSortableAdapter.custom \
TreeStore.custom \
TreeViewColumn.custom \
TreeView.custom \

View file

@ -302,6 +302,23 @@ namespace Gtk {
return true;
}
public bool IterPrevious (ref TreeIter iter)
{
ITreeNode node = GetNode (iter);
int idx;
if (node.Parent == null)
idx = Nodes.IndexOf (node);
else
idx = node.Parent.IndexOf (node);
if (idx < 0) throw new Exception ("Node not found in Nodes list");
else if (idx == 0) return false;
node = node.Parent == null ? Nodes [idx - 1] as ITreeNode : node.Parent [idx - 1];
GetIter (node, ref iter);
return true;
}
public bool IterChildren (out Gtk.TreeIter first_child, Gtk.TreeIter parent)
{
first_child = Gtk.TreeIter.Zero;

View file

@ -74,9 +74,11 @@ namespace Gtk {
return CollapseRow (store.GetPath (node));
}
#if FIXME30
public Gdk.Pixmap CreateRowDragIcon (ITreeNode node) {
return CreateRowDragIcon (store.GetPath (node));
}
#endif
public Gdk.Rectangle GetBackgroundArea (ITreeNode node, Gtk.TreeViewColumn column) {
return GetBackgroundArea (store.GetPath (node), column);

View file

@ -26,6 +26,7 @@
// Boston, MA 02111-1307, USA.
#if FIXME30
static Gdk.GC EnsureGC (IntPtr raw) {
if (raw == IntPtr.Zero)
return null;
@ -202,6 +203,7 @@ public void SetMidGC (StateType state, Gdk.GC gc)
{
gtksharp_gtk_style_set_mid_gc (Handle, (int) state, gc.Handle);
}
#endif
[DllImport("gtksharpglue-3")]
static extern IntPtr gtksharp_gtk_style_get_bg (IntPtr style, int i);
@ -370,29 +372,3 @@ public Pango.FontDescription FontDescription {
}
}
[DllImport ("gtksharpglue-3")]
static extern IntPtr gtksharp_gtk_style_get_bg_pixmap (IntPtr style, int state);
[DllImport ("gtksharpglue-3")]
static extern void gtksharp_gtk_style_set_bg_pixmap (IntPtr style, int state, IntPtr pixmap);
public Gdk.Pixmap BgPixmap (StateType state)
{
IntPtr raw = gtksharp_gtk_style_get_bg_pixmap (Handle, (int) state);
return GLib.Object.GetObject (raw) as Gdk.Pixmap;
}
public Gdk.Pixmap[] BgPixmaps {
get {
Gdk.Pixmap[] ret = new Gdk.Pixmap [5];
for (int i = 0; i < 5; i++)
ret [i] = GLib.Object.GetObject (gtksharp_gtk_style_get_dark (Handle, i)) as Gdk.Pixmap;
return ret;
}
}
public void SetBgPixmap (StateType state, Gdk.Pixmap pixmap)
{
gtksharp_gtk_style_set_bg_pixmap (Handle, (int) state, pixmap == null ? IntPtr.Zero : pixmap.Handle);
}

View file

@ -1,41 +0,0 @@
// Gtk.TextAppearance.custom - Gtk TextAppearance class customizations
//
// Authors: Mike Kestner <mkestner@novell.com>
//
// 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; }
}

View file

@ -1,10 +1,4 @@
// Gtk.TextAttributes.custom - Gtk TextAttributes class customizations
//
// Authors: Mike Kestner <mkestner@novell.com>
//
// Copyright (c) 2005 Novell, Inc.
//
// This code is inserted after the automatically generated code.
// Copyright (c) 2011 Novell, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
@ -21,36 +15,8 @@
// Boston, MA 02111-1307, USA.
[Obsolete("Gtk.TextAttributes is a reference type now, use null")]
public static TextAttributes Zero = null;
[Obsolete("Replaced by TextAttributes(IntPtr) constructor")]
public static TextAttributes New (IntPtr raw)
{
return new TextAttributes (raw);
}
[Obsolete("Replaced by TextAttributes() constructor")]
public static TextAttributes New ()
{
return new TextAttributes ();
}
[Obsolete ("Replaced by Font property.")]
public Pango.FontDescription font {
get { return Font; }
set { Font = value; }
}
[Obsolete ("Replaced by Tabs property.")]
public Pango.TabArray tabs {
get { return Tabs; }
set { Tabs = value; }
}
[Obsolete ("Replaced by Language property.")]
public Pango.Language language {
get { return Language; }
set { Language = value; }
public TextAppearance Appearance {
get { return (TextAppearance) Marshal.PtrToStructure (new IntPtr (Handle.ToInt64 () + 4), typeof (TextAppearance)); }
set { Marshal.StructureToPtr (value, new IntPtr (Handle.ToInt64 () + 4), false); }
}

View file

@ -1,74 +0,0 @@
// Gtk.Timeout.cs - Gtk Timeout implementation.
//
// Author: Mike Kestner <mkestner@novell.com>
//
// Copyright (c) 2005 Novell, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Gtk {
using System;
using System.Runtime.InteropServices;
[Obsolete ("Replaced by GLib.Timeout")]
public class Timeout {
[Obsolete ("Replaced by GLib.Source.Remove")]
public static void Remove (uint timeout_handler_id)
{
GLib.Source.Remove (timeout_handler_id);
}
[Obsolete ("Replaced by GLib.Timeout.Add")]
public static uint AddFull (uint interval, Gtk.Function function, Gtk.CallbackMarshal marshal, IntPtr data, Gtk.DestroyNotify destroy)
{
if (marshal != null || destroy != null)
Console.WriteLine ("marshal, data, and destroy parameters ignored by Gtk.Timeout.AddFull ().");
return Add (interval, function);
}
class GTimeoutProxy {
GLib.TimeoutHandler handler;
Function function;
public GTimeoutProxy (Gtk.Function function)
{
this.function = function;
handler = new GLib.TimeoutHandler (Invoke);
}
public GLib.TimeoutHandler Handler {
get {
return handler;
}
}
bool Invoke ()
{
return function ();
}
}
[Obsolete ("Replaced by GLib.Timeout.Add")]
public static uint Add (uint interval, Gtk.Function function)
{
GTimeoutProxy proxy = new GTimeoutProxy (function);
return GLib.Timeout.Add (interval, proxy.Handler);
}
}
}

View file

@ -1,217 +0,0 @@
// Gtk.Toolbar.custom - Gtk Toolbar class customizations
//
// Author: Mike Kestner <mkestner@novell.com>
//
// Copyright (C) 2005 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_weak_ref (IntPtr raw, WeakNotify cb, IntPtr data);
delegate void WeakNotify (IntPtr handle, IntPtr obj);
static void ReleaseDelegateCB (IntPtr handle, IntPtr obj)
{
GCHandle gch = (GCHandle) handle;
gch.Free ();
}
static WeakNotify on_weak_notify;
static WeakNotify OnWeakNotify {
get {
if (on_weak_notify == null)
on_weak_notify = new WeakNotify (ReleaseDelegateCB);
return on_weak_notify;
}
}
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_toolbar_append_element (IntPtr raw, int type, IntPtr widget, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data);
[Obsolete ("Replaced by ToolItem API")]
public Gtk.Widget AppendElement (Gtk.ToolbarChildType type, Gtk.Widget widget, string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb)
{
GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb);
IntPtr ntext = GLib.Marshaller.StringToPtrGStrdup (text);
IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text);
IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text);
IntPtr raw_ret = gtk_toolbar_append_element (Handle, (int) type, widget == null ? IntPtr.Zero : widget.Handle, ntext, ntiptext, ntipprivtext, icon == null ? IntPtr.Zero : icon.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
GLib.Marshaller.Free (ntext);
GLib.Marshaller.Free (ntiptext);
GLib.Marshaller.Free (ntipprivtext);
Gtk.Widget ret;
if (raw_ret == IntPtr.Zero)
ret = null;
else {
ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret);
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
}
return ret;
}
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_toolbar_insert_element (IntPtr raw, int type, IntPtr widget, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data, int position);
[Obsolete ("Replaced by ToolItem API")]
public Gtk.Widget InsertElement (Gtk.ToolbarChildType type, Gtk.Widget widget, string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb, IntPtr user_data, int position)
{
GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb);
IntPtr ntext = GLib.Marshaller.StringToPtrGStrdup (text);
IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text);
IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text);
IntPtr raw_ret = gtk_toolbar_insert_element (Handle, (int) type, widget == null ? IntPtr.Zero : widget.Handle, ntext, ntiptext, ntipprivtext, icon == null ? IntPtr.Zero : icon.Handle, cb_wrapper.NativeDelegate, user_data, position);
GLib.Marshaller.Free (ntext);
GLib.Marshaller.Free (ntiptext);
GLib.Marshaller.Free (ntipprivtext);
Gtk.Widget ret;
if (raw_ret == IntPtr.Zero)
ret = null;
else {
ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret);
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
}
return ret;
}
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_toolbar_prepend_element (IntPtr raw, int type, IntPtr widget, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data);
[Obsolete ("Replaced by ToolItem API")]
public Gtk.Widget PrependElement (Gtk.ToolbarChildType type, Gtk.Widget widget, string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb)
{
GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb);
IntPtr ntext = GLib.Marshaller.StringToPtrGStrdup (text);
IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text);
IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text);
IntPtr raw_ret = gtk_toolbar_prepend_element (Handle, (int) type, widget == null ? IntPtr.Zero : widget.Handle, ntext, ntiptext, ntipprivtext, icon == null ? IntPtr.Zero : icon.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
GLib.Marshaller.Free (ntext);
GLib.Marshaller.Free (ntiptext);
GLib.Marshaller.Free (ntipprivtext);
Gtk.Widget ret;
if (raw_ret == IntPtr.Zero)
ret = null;
else {
ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret);
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
}
return ret;
}
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_toolbar_append_item (IntPtr raw, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data);
[Obsolete ("Replaced by ToolItem API")]
public Gtk.Widget AppendItem (string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb)
{
GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb);
IntPtr ntext = GLib.Marshaller.StringToPtrGStrdup (text);
IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text);
IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text);
IntPtr raw_ret = gtk_toolbar_append_item (Handle, ntext, ntiptext, ntipprivtext, icon == null ? IntPtr.Zero : icon.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
GLib.Marshaller.Free (ntext);
GLib.Marshaller.Free (ntiptext);
GLib.Marshaller.Free (ntipprivtext);
Gtk.Widget ret;
if (raw_ret == IntPtr.Zero)
ret = null;
else {
ret = (Gtk.Widget) GLib.Object.GetObject(raw_ret);
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
}
return ret;
}
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_toolbar_insert_item (IntPtr raw, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data, int position);
[Obsolete ("Replaced by ToolItem API")]
public Gtk.Widget InsertItem (string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb, IntPtr user_data, int position)
{
GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb);
IntPtr ntext = GLib.Marshaller.StringToPtrGStrdup (text);
IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text);
IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text);
IntPtr raw_ret = gtk_toolbar_insert_item (Handle, ntext, ntiptext, ntipprivtext, icon == null ? IntPtr.Zero : icon.Handle, cb_wrapper.NativeDelegate, user_data, position);
GLib.Marshaller.Free (ntext);
GLib.Marshaller.Free (ntiptext);
GLib.Marshaller.Free (ntipprivtext);
Gtk.Widget ret;
if (raw_ret == IntPtr.Zero)
ret = null;
else {
ret = (Gtk.Widget) GLib.Object.GetObject(raw_ret);
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
}
return ret;
}
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_toolbar_prepend_item (IntPtr raw, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data);
[Obsolete ("Replaced by ToolItem API")]
public Gtk.Widget PrependItem (string text, string tooltip_text, string tooltip_private_text, Gtk.Widget icon, Gtk.SignalFunc cb)
{
GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb);
IntPtr ntext = GLib.Marshaller.StringToPtrGStrdup (text);
IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text);
IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text);
IntPtr raw_ret = gtk_toolbar_prepend_item (Handle, ntext, ntiptext, ntipprivtext, icon == null ? IntPtr.Zero : icon.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
GLib.Marshaller.Free (ntext);
GLib.Marshaller.Free (ntiptext);
GLib.Marshaller.Free (ntipprivtext);
Gtk.Widget ret;
if (raw_ret == IntPtr.Zero)
ret = null;
else {
ret = (Gtk.Widget) GLib.Object.GetObject(raw_ret);
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
}
return ret;
}
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_toolbar_insert_stock (IntPtr raw, IntPtr stock_id, IntPtr tooltip_text, IntPtr tooltip_private_text, GtkSharp.SignalFuncNative cb, IntPtr user_data, int position);
[Obsolete ("Replaced by ToolItem API")]
public Gtk.Widget InsertStock (string stock_id, string tooltip_text, string tooltip_private_text, Gtk.SignalFunc cb, int position)
{
return InsertStock (stock_id, tooltip_text, tooltip_private_text, cb, IntPtr.Zero, position);
}
[Obsolete ("Replaced by ToolItem API")]
public Gtk.Widget InsertStock (string stock_id, string tooltip_text, string tooltip_private_text, Gtk.SignalFunc cb, IntPtr user_data, int position)
{
GtkSharp.SignalFuncWrapper cb_wrapper = new GtkSharp.SignalFuncWrapper (cb);
IntPtr nstock = GLib.Marshaller.StringToPtrGStrdup (stock_id);
IntPtr ntiptext = GLib.Marshaller.StringToPtrGStrdup (tooltip_text);
IntPtr ntipprivtext = GLib.Marshaller.StringToPtrGStrdup (tooltip_private_text);
IntPtr raw_ret = gtk_toolbar_insert_stock (Handle, nstock, ntiptext, ntipprivtext, cb_wrapper.NativeDelegate, user_data, position);
GLib.Marshaller.Free (nstock);
GLib.Marshaller.Free (ntiptext);
GLib.Marshaller.Free (ntipprivtext);
Gtk.Widget ret;
if (raw_ret == IntPtr.Zero)
ret = null;
else {
ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret);
g_object_weak_ref (raw_ret, OnWeakNotify, (IntPtr) GCHandle.Alloc (cb_wrapper));
}
return ret;
}

View file

@ -1,8 +1,4 @@
// AboutDialog.custom - customizations to Gtk.AboutDialog
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2007 Novell, Inc.
// Copyright (c) 2011 Novell, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
@ -18,14 +14,23 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[Obsolete("Use ProgramName instead")]
[GLib.Property ("program-name")]
public string Name {
get {
return ProgramName;
}
set {
ProgramName = value;
}
}
using System;
namespace Gtk {
public partial class TreeMenu {
public void SetAttributes (CellRenderer cell, params object[] attrs)
{
if (attrs.Length % 2 != 0)
throw new ArgumentException ("attrs should contain pairs of attribute/col");
ClearAttributes (cell);
for (int i = 0; i < attrs.Length - 1; i += 2) {
AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]);
}
}
}
}

View file

@ -93,18 +93,6 @@
return ret;
}
[Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")]
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{
SetSortFunc (sort_column_id, sort_func);
}
[Obsolete ("Replaced by DefaultSortFunc property.")]
public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{
DefaultSortFunc = sort_func;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void RowsReorderedSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch);
@ -160,18 +148,9 @@
OverrideVirtualMethod (gtype, "rows_reordered", RowsReorderedVMCallback);
}
[Obsolete ("Replaced by int[] new_order overload.")]
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TreeModelSort), ConnectionMethod="OverrideRowsReordered")]
protected virtual void OnRowsReordered (Gtk.TreePath path, Gtk.TreeIter iter, out int new_order)
{
new_order = -1;
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TreeModelSort), ConnectionMethod="OverrideRowsReordered")]
protected virtual void OnRowsReordered (Gtk.TreePath path, Gtk.TreeIter iter, int[] new_order)
{
int dummy;
OnRowsReordered (path, iter, out dummy);
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (4);
GLib.Value[] vals = new GLib.Value [4];

View file

@ -32,12 +32,6 @@
return (TreePath[]) GLib.Marshaller.ListToArray (list, typeof (Gtk.TreePath));
}
[Obsolete ("Replaced by SelectFunction property.")]
public void SetSelectFunction (Gtk.TreeSelectionFunc func, IntPtr data, Gtk.DestroyNotify destroy)
{
SelectFunction = func;
}
[DllImport ("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_selection_get_selected", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_tree_selection_get_selected_without_model (IntPtr raw, IntPtr model, out Gtk.TreeIter iter);

View file

@ -1,36 +0,0 @@
// Gtk.TreeSortableAdapter.Custom - Gtk TreeSortableAdapter 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.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
[Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")]
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{
SetSortFunc (sort_column_id, sort_func);
}
[Obsolete ("Replaced by DefaultSortFunc property.")]
public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{
DefaultSortFunc = sort_func;
}

View file

@ -29,20 +29,6 @@
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_tree_store_append (IntPtr raw, out TreeIter iter, IntPtr parent);
[Obsolete ("Replaced by AppendNode")]
public TreeIter Append (TreeIter parent)
{
TreeIter iter;
gtk_tree_store_append (Handle, out iter, ref parent);
return iter;
}
[Obsolete ("Replaced by AppendNode")]
public void Append (out TreeIter iter)
{
gtk_tree_store_append (Handle, out iter, IntPtr.Zero);
}
public TreeIter AppendNode ()
{
TreeIter iter;
@ -63,20 +49,6 @@
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_tree_store_insert (IntPtr raw, out TreeIter iter, IntPtr parent, int position);
[Obsolete ("Replaced by InsertNode")]
public TreeIter Insert (TreeIter parent, int position)
{
TreeIter iter;
gtk_tree_store_insert (Handle, out iter, ref parent, position);
return iter;
}
[Obsolete ("Replaced by InsertNode")]
public void Insert (out TreeIter iter, int position)
{
gtk_tree_store_insert (Handle, out iter, IntPtr.Zero, position);
}
public TreeIter InsertNode (TreeIter parent, int position)
{
TreeIter iter;
@ -97,20 +69,6 @@
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_tree_store_prepend (IntPtr raw, out TreeIter iter, IntPtr parent);
[Obsolete ("Replaced by PrependNode")]
public TreeIter Prepend(TreeIter parent)
{
TreeIter iter;
gtk_tree_store_prepend (Handle, out iter, ref parent);
return iter;
}
[Obsolete ("Replaced by PrependNode")]
public void Prepend (out TreeIter iter)
{
gtk_tree_store_append (Handle, out iter, IntPtr.Zero);
}
public TreeIter PrependNode (TreeIter parent)
{
TreeIter iter;
@ -131,20 +89,6 @@
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_tree_store_insert_before (IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling);
[Obsolete ("Replaced by InsertNodeBefore")]
public TreeIter InsertBefore (TreeIter parent, TreeIter sibling)
{
TreeIter iter;
gtk_tree_store_insert_before (Handle, out iter, ref parent, ref sibling);
return iter;
}
[Obsolete ("Replaced by InsertNodeBefore")]
public void InsertBefore (out TreeIter iter, TreeIter sibling)
{
gtk_tree_store_insert_before (Handle, out iter, IntPtr.Zero, ref sibling);
}
public TreeIter InsertNodeBefore (TreeIter sibling)
{
TreeIter iter;
@ -165,20 +109,6 @@
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_tree_store_insert_after (IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling);
[Obsolete ("Replaced by InsertNodeAfter")]
public TreeIter InsertAfter (TreeIter parent, TreeIter sibling)
{
TreeIter iter;
gtk_tree_store_insert_after (Handle, out iter, ref parent, ref sibling);
return iter;
}
[Obsolete ("Replaced by InsertNodeAfter")]
public void InsertAfter (out TreeIter iter, TreeIter sibling)
{
gtk_tree_store_insert_after (Handle, out iter, IntPtr.Zero, ref sibling);
}
public TreeIter InsertNodeAfter (TreeIter sibling)
{
TreeIter iter;
@ -377,12 +307,6 @@
ColumnTypes = gtypes;
}
[Obsolete ("Replaced by ColumnTypes property.")]
public void SetColumnTypes (GLib.GType[] types)
{
ColumnTypes = types;
}
public object GetValue (Gtk.TreeIter iter, int column) {
GLib.Value val = GLib.Value.Empty;
GetValue (iter, column, ref val);
@ -391,18 +315,6 @@
return ret;
}
[Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")]
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{
SetSortFunc (sort_column_id, sort_func);
}
[Obsolete ("Replaced by DefaultSortFunc property.")]
public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{
DefaultSortFunc = sort_func;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void RowsReorderedSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch);
@ -458,18 +370,9 @@
OverrideVirtualMethod (gtype, "rows_reordered", RowsReorderedVMCallback);
}
[Obsolete ("Replaced by int[] new_order overload.")]
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TreeStore), ConnectionMethod="OverrideRowsReordered")]
protected virtual void OnRowsReordered (Gtk.TreePath path, Gtk.TreeIter iter, out int new_order)
{
new_order = -1;
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.TreeStore), ConnectionMethod="OverrideRowsReordered")]
protected virtual void OnRowsReordered (Gtk.TreePath path, Gtk.TreeIter iter, int[] new_order)
{
int dummy;
OnRowsReordered (path, iter, out dummy);
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (4);
GLib.Value[] vals = new GLib.Value [4];

View file

@ -24,9 +24,6 @@
// Boston, MA 02111-1307, USA.
[Obsolete ("Use NodeView with NodeStores")]
public TreeView (NodeStore store) : this (store == null ? null : store.Adapter) {}
public Gdk.Color OddRowColor {
get {
GLib.Value value = StyleGetPropertyValue ("odd-row-color");
@ -151,25 +148,3 @@
return InsertColumn (col, pos);
}
[Obsolete ("Replaced by SearchEqualFunc property.")]
public void SetSearchEqualFunc (TreeViewSearchEqualFunc search_equal_func, IntPtr search_user_data, DestroyNotify search_destroy)
{
SearchEqualFunc = search_equal_func;
}
[Obsolete ("Replaced by DestroyCountFunc property.")]
public void SetDestroyCountFunc (TreeDestroyCountFunc func, IntPtr data, DestroyNotify destroy)
{
DestroyCountFunc = func;
}
[Obsolete ("Replaced by ColumnDragFunction property.")]
public void SetColumnDragFunction (TreeViewColumnDropFunc func, IntPtr user_data, DestroyNotify destroy)
{
ColumnDragFunction = func;
}
[Obsolete ("Replaced by VisibleRect property.")]
public void GetVisibleRect(Gdk.Rectangle visible_rect) {
;
}

View file

@ -78,9 +78,3 @@
gtk_cell_layout_set_cell_data_func (Handle, cell_renderer == null ? IntPtr.Zero : cell_renderer.Handle, func_wrapper.NativeDelegate, (IntPtr) gch, GLib.DestroyHelper.NotifyHandler);
}
[Obsolete ("Replaced by SetCellDataFunc (CellRenderer, TreeCellDataFunc) overload")]
public void SetCellDataFunc (Gtk.CellRenderer cell_renderer, Gtk.TreeCellDataFunc func, IntPtr func_data, Gtk.DestroyNotify destroy)
{
SetCellDataFunc (cell_renderer, func);
}

View file

@ -24,24 +24,6 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
public override void Destroy ()
{
base.Destroy ();
}
protected override void CreateNativeObject (string[] names, GLib.Value[] vals)
{
base.CreateNativeObject (names, vals);
}
[DllImport("gtksharpglue-3")]
static extern IntPtr gtksharp_gtk_widget_get_allocation (IntPtr style);
public Gdk.Rectangle Allocation {
get { return Gdk.Rectangle.New (gtksharp_gtk_widget_get_allocation (Handle)); }
set { SizeAllocate (value); }
}
[DllImport ("gtksharpglue-3")]
static extern void gtksharp_gtk_widget_set_window (IntPtr widget, IntPtr window);
public Gdk.Window GdkWindow {
@ -60,111 +42,6 @@ public void AddAccelerator (string accel_signal, AccelGroup accel_group, AccelKe
}
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_widget_set_state (IntPtr raw, int state);
[DllImport("gtksharpglue-3")]
static extern int gtksharp_gtk_widget_get_state (IntPtr raw);
public Gtk.StateType State {
set {
gtk_widget_set_state (Handle, (int) value);
}
get {
return (Gtk.StateType) gtksharp_gtk_widget_get_state (Handle);
}
}
[DllImport("gtksharpglue-3")]
static extern int gtksharp_gtk_widget_get_flags (IntPtr raw);
[DllImport("gtksharpglue-3")]
static extern void gtksharp_gtk_widget_set_flags (IntPtr raw, int flags);
[Obsolete]
public int Flags {
get {
return gtksharp_gtk_widget_get_flags (Handle);
}
set {
gtksharp_gtk_widget_set_flags (Handle, (int) value);
}
}
public WidgetFlags WidgetFlags {
get {
return (WidgetFlags) gtksharp_gtk_widget_get_flags (Handle);
}
set {
gtksharp_gtk_widget_set_flags (Handle, (int) value);
}
}
public void SetFlag (WidgetFlags flag)
{
Flags |= (int)flag;
}
public void ClearFlag (WidgetFlags flag)
{
Flags &= ~((int)flag);
}
public bool IsMapped {
get {
return ((Flags & (int)Gtk.WidgetFlags.Mapped) != 0);
}
}
public bool IsRealized {
get {
return ((Flags & (int)Gtk.WidgetFlags.Realized) != 0);
}
}
public bool IsNoWindow {
get {
return ((Flags & (int)Gtk.WidgetFlags.NoWindow) != 0);
}
}
public bool IsTopLevel {
get {
return ((Flags & (int)Gtk.WidgetFlags.Toplevel) != 0);
}
}
public bool HasGrab {
get {
return ((Flags & (int)Gtk.WidgetFlags.HasGrab) != 0);
}
}
public bool IsCompositeChild {
get {
return ((Flags & (int)Gtk.WidgetFlags.CompositeChild) != 0);
}
}
public bool IsAppPaintable {
get {
return ((Flags & (int)Gtk.WidgetFlags.AppPaintable) != 0);
}
}
public bool IsDoubleBuffered {
get {
return ((Flags & (int)Gtk.WidgetFlags.DoubleBuffered) != 0);
}
}
public bool IsDrawable {
get {
return (Visible && IsMapped);
}
}
public int FocusLineWidth {
get {
return (int) StyleGetProperty ("focus-line-width");
@ -210,45 +87,6 @@ static uint RegisterSignal (string signal_name, GLib.GType gtype, GLib.Signal.Fl
}
}
static void SetScrollAdjustmentsMarshal_cb (IntPtr closure, IntPtr return_val, uint n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
{
try {
GLib.Value[] inst_and_params = new GLib.Value [n_param_vals];
int gvalue_size = Marshal.SizeOf (typeof (GLib.Value));
for (int idx = 0; idx < n_param_vals; idx++)
inst_and_params [idx] = (GLib.Value) Marshal.PtrToStructure (new IntPtr (param_values.ToInt64 () + idx * gvalue_size), typeof (GLib.Value));
Widget inst;
try {
inst = inst_and_params [0].Val as Widget;
} catch (GLib.MissingIntPtrCtorException) {
return;
}
Gtk.Adjustment h = inst_and_params [1].Val as Gtk.Adjustment;
Gtk.Adjustment v = inst_and_params [2].Val as Gtk.Adjustment;
inst.OnSetScrollAdjustments (h, v);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
static ClosureMarshal SetScrollAdjustmentsMarshalCallback;
static void ConnectSetScrollAdjustments (GLib.GType gtype)
{
if (SetScrollAdjustmentsMarshalCallback == null)
SetScrollAdjustmentsMarshalCallback = new ClosureMarshal (SetScrollAdjustmentsMarshal_cb);
GtkWidgetClass klass = GetClassStruct (gtype, false);
klass.SetScrollAdjustmentsSignal = RegisterSignal ("set_scroll_adjustments", gtype, GLib.Signal.Flags.RunLast, GLib.GType.None, new GLib.GType [] {Adjustment.GType, Adjustment.GType}, SetScrollAdjustmentsMarshalCallback);
OverrideClassStruct (gtype, klass);
}
[GLib.DefaultSignalHandler (Type=typeof (Gtk.Widget), ConnectionMethod="ConnectSetScrollAdjustments")]
protected virtual void OnSetScrollAdjustments (Gtk.Adjustment hadj, Gtk.Adjustment vadj)
{
}
static void ActivateMarshal_cb (IntPtr raw_closure, IntPtr return_val, uint n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
{
try {
@ -460,3 +298,141 @@ public void Path (out string path, out string path_reversed)
Path (out len, out path, out path_reversed);
}
// Code from Object.custom in 2.x
// Object is gone in 3.x
static Hashtable destroy_handlers;
static Hashtable DestroyHandlers {
get {
if (destroy_handlers == null)
destroy_handlers = new Hashtable ();
return destroy_handlers;
}
}
private static void OverrideDestroyed (GLib.GType gtype)
{
// Do Nothing. We don't want to hook into the native vtable.
// We will manually invoke the VM on signal invocation. The signal
// always raises before the default handler because this signal
// is RUN_CLEANUP.
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.Widget), ConnectionMethod="OverrideDestroyed")]
protected virtual void OnDestroyed ()
{
if (DestroyHandlers.Contains (Handle)) {
EventHandler handler = (EventHandler) DestroyHandlers [Handle];
handler (this, EventArgs.Empty);
DestroyHandlers.Remove (Handle);
}
}
[GLib.Signal("destroy")]
public event EventHandler Destroyed {
add {
EventHandler handler = (EventHandler) DestroyHandlers [Handle];
DestroyHandlers [Handle] = Delegate.Combine (handler, value);
}
remove {
EventHandler handler = (EventHandler) DestroyHandlers [Handle];
handler = (EventHandler) Delegate.Remove (handler, value);
if (handler != null)
DestroyHandlers [Handle] = handler;
else
DestroyHandlers.Remove (Handle);
}
}
event EventHandler InternalDestroyed {
add {
GLib.Signal sig = GLib.Signal.Lookup (this, "destroy");
sig.AddDelegate (value);
}
remove {
GLib.Signal sig = GLib.Signal.Lookup (this, "destroy");
sig.RemoveDelegate (value);
}
}
static void NativeDestroy (object o, EventArgs args)
{
Gtk.Widget widget = o as Gtk.Widget;
if (widget == null)
return;
widget.OnDestroyed ();
}
static EventHandler native_destroy_handler;
static EventHandler NativeDestroyHandler {
get {
if (native_destroy_handler == null)
native_destroy_handler = new EventHandler (NativeDestroy);
return native_destroy_handler;
}
}
protected override void CreateNativeObject (string[] names, GLib.Value[] vals)
{
base.CreateNativeObject (names, vals);
}
public override void Dispose ()
{
if (Handle == IntPtr.Zero)
return;
InternalDestroyed -= NativeDestroyHandler;
base.Dispose ();
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern void g_object_ref_sink (IntPtr raw);
protected override IntPtr Raw {
get {
return base.Raw;
}
set {
if (value != IntPtr.Zero)
g_object_ref_sink (value);
base.Raw = value;
if (value != IntPtr.Zero)
InternalDestroyed += NativeDestroyHandler;
}
}
[DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern void gtk_widget_destroy (IntPtr raw);
public virtual void Destroy ()
{
if (Handle == IntPtr.Zero)
return;
gtk_widget_destroy (Handle);
InternalDestroyed -= NativeDestroyHandler;
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool g_object_is_floating (IntPtr raw);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_force_floating (IntPtr raw);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_unref (IntPtr raw);
public bool IsFloating {
get {
return g_object_is_floating (Handle);
}
set {
if (value == true) {
if (!IsFloating)
g_object_force_floating (Handle);
} else {
g_object_ref_sink (Handle);
g_object_unref (Handle);
}
}
}

View file

@ -21,7 +21,7 @@
* Boston, MA 02111-1307, USA.
*/
#include <gtk/gtkcellrenderer.h>
#include <gtk/gtk.h>
const gchar *__gtype_prefix = "__gtksharp_";
#define HAS_PREFIX(a) (*((guint64 *)(a)) == *((guint64 *) __gtype_prefix))

View file

@ -19,7 +19,7 @@
* Boston, MA 02111-1307, USA.
*/
#include <gtk/gtkcontainer.h>
#include <gtk/gtk.h>
void gtksharp_container_base_forall (GtkContainer *container, gboolean include_internals, GtkCallback cb, gpointer data);

View file

@ -20,45 +20,9 @@
* Boston, MA 02111-1307, USA.
*/
#include <gtk/gtkstyle.h>
#include <gtk/gtk.h>
/* Forward declarations */
GdkGC *gtksharp_gtk_style_get_white_gc (GtkStyle *style);
GdkGC *gtksharp_gtk_style_get_black_gc (GtkStyle *style);
GdkGC *gtksharp_gtk_style_get_fg_gc (GtkStyle *style, int i);
GdkGC *gtksharp_gtk_style_get_bg_gc (GtkStyle *style, int i);
GdkGC *gtksharp_gtk_style_get_base_gc (GtkStyle *style, int i);
GdkGC *gtksharp_gtk_style_get_text_gc (GtkStyle *style, int i);
GdkGC *gtksharp_gtk_style_get_text_aa_gc (GtkStyle *style, int i);
GdkGC *gtksharp_gtk_style_get_light_gc (GtkStyle *style, int i);
GdkGC *gtksharp_gtk_style_get_dark_gc (GtkStyle *style, int i);
GdkGC *gtksharp_gtk_style_get_mid_gc (GtkStyle *style, int i);
void gtksharp_gtk_style_set_fg_gc (GtkStyle *style, int i, GdkGC *gc);
void gtksharp_gtk_style_set_bg_gc (GtkStyle *style, int i, GdkGC *gc);
void gtksharp_gtk_style_set_base_gc (GtkStyle *style, int i, GdkGC *gc);
void gtksharp_gtk_style_set_text_gc (GtkStyle *style, int i, GdkGC *gc);
void gtksharp_gtk_style_set_text_aa_gc (GtkStyle *style, int i, GdkGC *gc);
void gtksharp_gtk_style_set_light_gc (GtkStyle *style, int i, GdkGC *gc);
void gtksharp_gtk_style_set_dark_gc (GtkStyle *style, int i, GdkGC *gc);
void gtksharp_gtk_style_set_mid_gc (GtkStyle *style, int i, GdkGC *gc);
GdkColor *gtksharp_gtk_style_get_fg (GtkStyle *style, int i);
GdkColor *gtksharp_gtk_style_get_bg (GtkStyle *style, int i);
@ -79,133 +43,8 @@ int gtksharp_gtk_style_get_thickness (GtkStyle *style, int x);
void gtksharp_gtk_style_set_thickness (GtkStyle *style, int thickness);
GdkPixmap *gtksharp_gtk_style_get_bg_pixmap (GtkStyle *style, int i);
void gtksharp_gtk_style_set_bg_pixmap (GtkStyle *style, int i, GdkPixmap *pixmap);
/* */
/* FIXME: include all fields */
GdkGC*
gtksharp_gtk_style_get_white_gc (GtkStyle *style)
{
g_object_ref (G_OBJECT (style->white_gc));
return style->white_gc;
}
GdkGC*
gtksharp_gtk_style_get_black_gc (GtkStyle *style)
{
g_object_ref (G_OBJECT (style->black_gc));
return style->black_gc;
}
GdkGC*
gtksharp_gtk_style_get_fg_gc (GtkStyle *style, int i)
{
g_object_ref (G_OBJECT (style->fg_gc[i]));
return style->fg_gc[i];
}
GdkGC*
gtksharp_gtk_style_get_bg_gc (GtkStyle *style, int i)
{
g_object_ref (G_OBJECT (style->bg_gc[i]));
return style->bg_gc[i];
}
GdkGC*
gtksharp_gtk_style_get_base_gc (GtkStyle *style, int i)
{
g_object_ref (G_OBJECT (style->base_gc[i]));
return style->base_gc[i];
}
GdkGC*
gtksharp_gtk_style_get_text_gc (GtkStyle *style, int i)
{
g_object_ref (G_OBJECT (style->text_gc[i]));
return style->text_gc[i];
}
GdkGC*
gtksharp_gtk_style_get_text_aa_gc (GtkStyle *style, int i)
{
g_object_ref (G_OBJECT (style->text_aa_gc[i]));
return style->text_aa_gc[i];
}
GdkGC*
gtksharp_gtk_style_get_light_gc (GtkStyle *style, int i)
{
g_object_ref (G_OBJECT (style->light_gc[i]));
return style->light_gc[i];
}
GdkGC*
gtksharp_gtk_style_get_dark_gc (GtkStyle *style, int i)
{
g_object_ref (G_OBJECT (style->dark_gc[i]));
return style->dark_gc[i];
}
GdkGC*
gtksharp_gtk_style_get_mid_gc (GtkStyle *style, int i)
{
g_object_ref (G_OBJECT (style->mid_gc[i]));
return style->mid_gc[i];
}
void
gtksharp_gtk_style_set_fg_gc (GtkStyle *style, int i, GdkGC *gc)
{
g_object_ref (G_OBJECT (gc));
style->fg_gc[i] = gc;
}
void
gtksharp_gtk_style_set_bg_gc (GtkStyle *style, int i, GdkGC *gc)
{
g_object_ref (G_OBJECT (gc));
style->bg_gc[i] = gc;
}
void
gtksharp_gtk_style_set_base_gc (GtkStyle *style, int i, GdkGC *gc)
{
g_object_ref (G_OBJECT (gc));
style->base_gc[i] = gc;
}
void
gtksharp_gtk_style_set_text_gc (GtkStyle *style, int i, GdkGC *gc)
{
g_object_ref (G_OBJECT (gc));
style->text_gc[i] = gc;
}
void
gtksharp_gtk_style_set_text_aa_gc (GtkStyle *style, int i, GdkGC *gc)
{
g_object_ref (G_OBJECT (gc));
style->text_aa_gc[i] = gc;
}
void
gtksharp_gtk_style_set_light_gc (GtkStyle *style, int i, GdkGC *gc)
{
g_object_ref (G_OBJECT (gc));
style->light_gc[i] = gc;
}
void
gtksharp_gtk_style_set_dark_gc (GtkStyle *style, int i, GdkGC *gc)
{
g_object_ref (G_OBJECT (gc));
style->dark_gc[i] = gc;
}
GdkColor*
gtksharp_gtk_style_get_fg (GtkStyle *style, int i)
{
@ -272,15 +111,4 @@ gtksharp_gtk_style_set_thickness (GtkStyle *style, int thickness)
style->ythickness = -thickness;
}
GdkPixmap *
gtksharp_gtk_style_get_bg_pixmap (GtkStyle *style, int i)
{
return style->bg_pixmap[i];
}
void gtksharp_gtk_style_set_bg_pixmap (GtkStyle *style, int i, GdkPixmap *pixmap)
{
g_object_ref (G_OBJECT (pixmap));
style->bg_pixmap[i] = pixmap;
}

View file

@ -21,46 +21,7 @@
* Boston, MA 02111-1307, USA.
*/
#include <gtk/gtkbindings.h>
#include <gtk/gtkwidget.h>
#include <gtk/gtk.h>
/* Forward declarations */
GdkRectangle *gtksharp_gtk_widget_get_allocation (GtkWidget *widget);
void gtksharp_gtk_widget_set_window (GtkWidget *widget, GdkWindow *window);
int gtksharp_gtk_widget_get_state (GtkWidget *widget);
int gtksharp_gtk_widget_get_flags (GtkWidget *widget);
void gtksharp_gtk_widget_set_flags (GtkWidget *widget, int flags);
/* */
GdkRectangle*
gtksharp_gtk_widget_get_allocation (GtkWidget *widget)
{
return &widget->allocation;
}
void
gtksharp_gtk_widget_set_window (GtkWidget *widget, GdkWindow *window)
{
if (widget->window)
g_object_unref (widget->window);
widget->window = g_object_ref (window);
}
int
gtksharp_gtk_widget_get_state (GtkWidget *widget)
{
return GTK_WIDGET_STATE (widget);
}
int
gtksharp_gtk_widget_get_flags (GtkWidget *widget)
{
return GTK_WIDGET_FLAGS (widget);
}
void
gtksharp_gtk_widget_set_flags (GtkWidget *widget, int flags)
{
GTK_OBJECT(widget)->flags = flags;
}

File diff suppressed because it is too large Load diff

View file

@ -48,13 +48,14 @@ namespace Gtk.DotNet {
[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr gdk_x11_drawable_get_xid (IntPtr raw);
public static System.Drawing.Graphics FromDrawable (Gdk.Drawable drawable)
public static System.Drawing.Graphics FromDrawable (Gdk.Window drawable)
{
return FromDrawable (drawable, true);
}
public static System.Drawing.Graphics FromDrawable(Gdk.Drawable drawable, bool double_buffered)
public static System.Drawing.Graphics FromDrawable(Gdk.Window drawable, bool double_buffered)
{
#if FIXME30
IntPtr x_drawable;
int x_off = 0, y_off = 0;
@ -65,7 +66,7 @@ namespace Gtk.DotNet {
if (drawable is Gdk.Window && double_buffered)
((Gdk.Window)drawable).GetInternalPaintInfo(out drawable, out x_off, out y_off);
Gdk.GC gcc = new Gdk.GC(drawable);
Cairo.Context gcc = new Gdk.GC(drawable);
IntPtr windc = gdk_win32_hdc_get(drawable.Handle, gcc.Handle, 0);
@ -98,6 +99,9 @@ namespace Gtk.DotNet {
return g;
}
#else
throw new NotSupportedException ();
#endif
}
}

View file

@ -16,7 +16,7 @@ DISTCLEANFILES = $(ASSEMBLY).config
POLICY_ASSEMBLIES = $(addsuffix .$(ASSEMBLY), $(addprefix policy., $(POLICY_VERSIONS)))
POLICY_CONFIGS = $(addsuffix .config, $(addprefix policy., $(POLICY_VERSIONS)))
references = ../glib/glib-sharp.dll ../gio/gio-sharp.dll ../pango/pango-sharp.dll ../gdk/gdk-sharp.dll
references = ../glib/glib-sharp.dll ../gio/gio-sharp.dll ../cairo/cairo-sharp.dll ../pango/pango-sharp.dll ../gdk/gdk-sharp.dll
build_references = $(addprefix -r:, $(references)) -r:System.Drawing.dll
sources = \

View file

@ -165,6 +165,13 @@ while ($line = <STDIN>) {
$typefuncs{lc($1)} = $line;
} elsif ($line =~ /^G_DEFINE_BOXED_TYPE\s*\(\s*(\w+)/) {
$boxdefs{$1} = $line;
} elsif ($line =~ /^G_DEFINE_INTERFACE\s*\(\s*(\w+)\s*,\s*(\w+)/) {
if (exists($get_types{"$2_get_type"})) {
$typedef = $get_types{"$2_get_type"};
if (!exists($ifaces{$typedef})) {
$ifaces{$typedef} = "$1Interface";
}
}
} elsif ($line =~ /^(deprecated)?(const|G_CONST_RETURN)?\s*(struct\s+)?\w+\s*\**(\s*(const|G_CONST_RETURN)\s*\**)?\s*(\w+)\s*\(/) {
$fname = $6;
$fdef = "";
@ -211,12 +218,14 @@ while ($line = <STDIN>) {
$boxdefs{$1} = $line;
} elsif ($line =~ /^BUILTIN\s*\{\s*\"(\w+)\".*GTK_TYPE_(ENUM|FLAGS)/) {
# ignoring these for now.
} elsif ($line =~ /^(deprecated)?\#define/) {
} elsif ($line =~ /^(deprecated)?\#\s*define/) {
my $test_ns = uc ($ns);
if ($line =~ /^deprecated\#define\s+(\w+)\s+\"(.*)\"/) {
if ($line =~ /^deprecated\#\s*define\s+(\w+)\s+\"(.*)\"/) {
$defines{"deprecated$1"} = $2;
} elsif ($line =~ /\#define\s+(\w+)\s+\"(.*)\"/) {
} elsif ($line =~ /\#\s*define\s+(\w+)\s+\"(.*)\"/) {
$defines{$1} = $2;
} elsif ($line =~ /\#\s*define\s+(\w+)\s+\(?\s*(\w+_get_type)/) {
$get_types{$2} = $1;
}
} elsif ($line !~ /\/\*/) {
print $line;
@ -324,7 +333,13 @@ foreach $type (sort(keys(%ifaces))) {
$elem_table{lc($inst)} = $iface_el;
$classdef = $sdefs{$1} if ($ifacetype =~ /struct\s+(\w+)/);
if ($ifacetype =~ /struct\s+(\w+)/) {
$classdef = $sdefs{$1};
} else {
$classdef = 0;
}
if ($classdef) {
my @signal_vms;
if ($initfunc) {
@signal_vms = parseInitFunc($iface_el, $initfunc, $classdef);
@ -332,8 +347,10 @@ foreach $type (sort(keys(%ifaces))) {
warn "Don't have an init func for $inst.\n" if $debug;
# my @signal_vms;
}
addClassElem ($iface_el, $classdef, @signal_vms) if ($classdef);
addClassElem ($iface_el, $classdef, @signal_vms);
} else {
$iface_el->setAttribute("consume_only", "1");
}
}

View file

@ -72,6 +72,8 @@ foreach $fname (@hdrs) {
$def = $line;
while ($def !~ /\".*\"/) {$def .= ($line = <INFILE>);}
print $def;
} elsif ($line =~ /#\s*define\s+\w+\s*\(\s*\w+_get_type\s*\(\)\)/) {
print $line;
} elsif ($line =~ /#\s*define\s+\w+\s*\D+/) {
$def = $line;
while ($line =~ /\\\n/) {$def .= ($line = <INFILE>);}
@ -205,9 +207,9 @@ foreach $fname (@srcs, @privhdrs) {
}
while ($line = <INFILE>) {
next if ($line !~ /^(struct|typedef struct.*;|\w+_class_init|\w+_base_init|\w+_get_type\b|G_DEFINE_TYPE_WITH_CODE|G_DEFINE_BOXED_TYPE)/);
next if ($line !~ /^(struct|typedef struct.*;|\w+_class_init|\w+_base_init|\w+_get_type\b|G_DEFINE_TYPE_WITH_CODE|G_DEFINE_BOXED_TYPE|G_DEFINE_INTERFACE)/);
if ($line =~ /^G_DEFINE_(TYPE_WITH_CODE|BOXED_TYPE)/) {
if ($line =~ /^G_DEFINE_(TYPE_WITH_CODE|BOXED_TYPE|INTERFACE)/) {
my $macro;
my $parens = 0;
do {

View file

@ -7,7 +7,7 @@ assemblies = \
$(top_builddir)/gdk/gdk-sharp.dll \
$(top_builddir)/gtk/gtk-sharp.dll
references = $(addprefix -r:, $(assemblies)
references = $(addprefix -r:, $(assemblies))
TARGETS = GtkDemo.exe
DEBUGS = $(addsuffix .mdb, $(TARGETS))
CLEANFILES = $(TARGETS) $(DEBUGS)

View file

@ -1,4 +1,4 @@
SUBDIRS = test GtkDemo pixmaps valtest opaquetest gio gtk-gio
SUBDIRS = GtkDemo pixmaps valtest opaquetest gio gtk-gio
if ENABLE_DOTNET
DOTNET_TARGETS=drawing-sample.exe

View file

@ -1,6 +1,14 @@
TARGETS = WidgetViewer.exe
assemblies=../../glib/glib-sharp.dll ../../pango/pango-sharp.dll ../../atk/atk-sharp.dll ../../gdk/gdk-sharp.dll ../../gtk/gtk-sharp.dll
assemblies= \
$(top_builddir)/glib/glib-sharp.dll \
$(top_builddir)/gio/gio-sharp.dll \
$(top_builddir)/cairo/cairo-sharp.dll \
$(top_builddir)/pango/pango-sharp.dll \
$(top_builddir)/atk/atk-sharp.dll \
$(top_builddir)/gdk/gdk-sharp.dll \
$(top_builddir)/gtk/gtk-sharp.dll
references = $(addprefix -r:, $(assemblies))
noinst_SCRIPTS = $(TARGETS)
@ -17,7 +25,6 @@ sources = \
TestDialog.cs \
TestFlipping.cs \
TestSizeGroup.cs \
TestCombo.cs \
TestComboBox.cs \
WidgetViewer.cs

View file

@ -1,69 +0,0 @@
//
// TestCombo.cs
//
// Author: Duncan Mak (duncan@ximian.com)
//
// Copyright (C) 2003, Duncan Mak, Ximian Inc.
//
using System;
using Gtk;
namespace WidgetViewer {
public class TestCombo
{
static Window window = null;
static Gtk.Combo combo = null;
public static Gtk.Window Create ()
{
window = new Window ("GtkCombo");
window.SetDefaultSize (200, 100);
VBox box1 = new VBox (false, 0);
window.Add (box1);
VBox box2 = new VBox (false, 10);
box2.BorderWidth = 10;
box1.PackStart (box2, true, true, 0);
combo = new Gtk.Combo ();
string[] pop = {"Foo", "Bar"};
combo.PopdownStrings = pop;
combo.Entry.Activated += new EventHandler (OnComboActivated);
box2.PackStart (combo, true, true, 0);
HSeparator separator = new HSeparator ();
box1.PackStart (separator, false, false, 0);
box2 = new VBox (false, 10);
box2.BorderWidth = 10;
box1.PackStart (box2, false, false, 0);
Button button = new Button (Stock.Close);
button.Clicked += new EventHandler (OnCloseClicked);
button.CanDefault = true;
box2.PackStart (button, true, true, 0);
button.GrabDefault ();
return window;
}
static void OnCloseClicked (object o, EventArgs args)
{
window.Destroy ();
}
static void OnComboActivated (object o, EventArgs args)
{
string text = ((Gtk.Entry) o).Text;
// combo.AppendString (text);
// combo.SetPopdownStrings (text);
}
}
}

View file

@ -114,6 +114,7 @@
<directory path="gtk+-2.99.0/gtk">
<!-- Internal stuff -->
<exclude>gtkalias.h</exclude>
<exclude>gtkappchooseronline.h</exclude>
<exclude>gtkbuiltincache.h</exclude>
<exclude>gtkdndcursors.h</exclude>
<exclude>gtkfilechooserdefault.c</exclude>