* generator/Parameters.cs (Parameters.Validate): If the parameters

end with "callback, gpointer, GDestroyNotify", then mark the
	callback as having "notified" Scope.
	(Parameters.IsHidden): Hide user_data and GDestroyNotify after a
	callback.
	(Parameter.Scope): make this settable
	(Parameter.IsDestroyNotify): new test

	* generator/MethodBody.cs (Initialize): Handle "notified" callback
	scope (using a GCHandle and GLib.DestroyHelper.NotifyHandler)

	* generator/CallbackGen.cs (GenWrapper): Add a static
	"GetManagedDelegate" method to the wrapper type, to translate a
	native delegate back to its corresponding managed delegate.
	(FromNative): use GetManagedDelegate.

	* generator/ReturnValue.cs (Validate): We handle callback return
	values now

	* generator/SymbolTable.cs: marshal GDestroyNotify as
	GLib.DestroyNotify

	* glib/DestroyNotify.cs: Moved from gtk

	* gtk/Gtk.metadata: globally change GtkDestroyNotify to
	GDestroyNotify, but then change back the ones that are exposed in
	the API. Un-hide lots of methods we can correctly autogenerate
	now.

	* gtk/DestroyHelper.cs: moved to glib

	* gtk/*.custom: remove methods that are autogenerated now, add
	Obsolete wrappers where needed, replace Gtk.DestroyHelper usage
	with GLib.DestroyHelper.

	* gdk/Gdk.metadata: 
	* gnome/Gnome.metadata: Turn Gdk.Drawable.SetData and
	Gnome.IconList.SetIconDataFull's GDestroyNotify args into
	gpointers so the generated API stays the same as it used to be.

	* rsvg/Handle.custom: implement deprecated SetSizeCallback

	* sample/GtkDemo/DemoIconView.cs (CreateSort): update for API
	changes

svn path=/trunk/gtk-sharp/; revision=44020
This commit is contained in:
Dan Winship 2005-05-04 11:47:25 +00:00
commit a7d8b64f7a
53 changed files with 502 additions and 672 deletions

View file

@ -1,3 +1,50 @@
2005-05-04 Dan Winship <danw@novell.com>
* generator/Parameters.cs (Parameters.Validate): If the parameters
end with "callback, gpointer, GDestroyNotify", then mark the
callback as having "notified" Scope.
(Parameters.IsHidden): Hide user_data and GDestroyNotify after a
callback.
(Parameter.Scope): make this settable
(Parameter.IsDestroyNotify): new test
* generator/MethodBody.cs (Initialize): Handle "notified" callback
scope (using a GCHandle and GLib.DestroyHelper.NotifyHandler)
* generator/CallbackGen.cs (GenWrapper): Add a static
"GetManagedDelegate" method to the wrapper type, to translate a
native delegate back to its corresponding managed delegate.
(FromNative): use GetManagedDelegate.
* generator/ReturnValue.cs (Validate): We handle callback return
values now
* generator/SymbolTable.cs: marshal GDestroyNotify as
GLib.DestroyNotify
* glib/DestroyNotify.cs: Moved from gtk
* gtk/Gtk.metadata: globally change GtkDestroyNotify to
GDestroyNotify, but then change back the ones that are exposed in
the API. Un-hide lots of methods we can correctly autogenerate
now.
* gtk/DestroyHelper.cs: moved to glib
* gtk/*.custom: remove methods that are autogenerated now, add
Obsolete wrappers where needed, replace Gtk.DestroyHelper usage
with GLib.DestroyHelper.
* gdk/Gdk.metadata:
* gnome/Gnome.metadata: Turn Gdk.Drawable.SetData and
Gnome.IconList.SetIconDataFull's GDestroyNotify args into
gpointers so the generated API stays the same as it used to be.
* rsvg/Handle.custom: implement deprecated SetSizeCallback
* sample/GtkDemo/DemoIconView.cs (CreateSort): update for API
changes
2005-05-03 Mike Kestner <mkestner@novell.com> 2005-05-03 Mike Kestner <mkestner@novell.com>
* parser/gapi2xml.pl : parse const * const * Foo () properly. * parser/gapi2xml.pl : parse const * const * Foo () properly.

View file

@ -1,3 +1,12 @@
2005-05-03 Dan Winship <danw@novell.com>
* document new callback properties / deprecate some old
callback-setting methods
* updater/updater.cs (Update): close the writer when we're done.
(Compare): don't write "updates" to a file if its FullName is
wrong.
2005-04-24 Dan Winship <danw@novell.com> 2005-04-24 Dan Winship <danw@novell.com>
* en/Pango/Attribute.xml, etc: document new Attribute stuff. * en/Pango/Attribute.xml, etc: document new Attribute stuff.

View file

@ -0,0 +1,35 @@
<Type Name="DestroyHelper" FullName="GLib.DestroyHelper">
<TypeSignature Language="C#" Value="public class DestroyHelper" Maintainer="auto" />
<AssemblyInfo>
<AssemblyName>glib-sharp</AssemblyName>
<AssemblyPublicKey>[00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 71 EB 6C 55 75 52 9C BF 72 44 F7 A6 EA 05 62 84 F9 EA E0 3B CF F2 CC 13 2C 9C 49 0A B3 09 EA B0 B5 6B CE 44 9D F5 03 D9 C0 A8 1E 52 05 85 CD BE 70 E2 FB 90 43 4B AC 04 FA 62 22 A8 00 98 B7 A1 A7 B3 AF 99 1A 41 23 24 BB 43 25 F6 B8 65 BB 64 EB F6 D1 C2 06 D5 73 2D DF BC 70 A7 38 9E E5 3E 0C 24 6E 32 79 74 1A D0 05 03 E4 98 42 E1 9B F3 7B 19 8B 40 21 26 CB 36 89 C2 EA 64 96 A4 7C B4]</AssemblyPublicKey>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyCulture>neutral</AssemblyCulture>
<Attributes />
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Docs>
<summary>Helper methods for unmanaged memory</summary>
<remarks />
</Docs>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes />
<Members>
<Member MemberName="NotifyHandler">
<MemberSignature Language="C#" Value="public static GLib.DestroyNotify NotifyHandler { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>GLib.DestroyNotify</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>A <see cref="T:GLib.DestroyNotify" /> that frees a <see cref="T:System.Runtime.InteropServices.GCHandle" />.</summary>
<returns>a <see cref="T:GLib.DestroyNotify" /></returns>
<remarks />
</Docs>
</Member>
</Members>
</Type>

View file

@ -0,0 +1,34 @@
<Type Name="DestroyNotify" FullName="GLib.DestroyNotify">
<TypeSignature Language="C#" Maintainer="auto" Value="public sealed delegate void DestroyNotify (IntPtr data);" />
<AssemblyInfo>
<AssemblyName>glib-sharp</AssemblyName>
<AssemblyPublicKey>[00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 71 EB 6C 55 75 52 9C BF 72 44 F7 A6 EA 05 62 84 F9 EA E0 3B CF F2 CC 13 2C 9C 49 0A B3 09 EA B0 B5 6B CE 44 9D F5 03 D9 C0 A8 1E 52 05 85 CD BE 70 E2 FB 90 43 4B AC 04 FA 62 22 A8 00 98 B7 A1 A7 B3 AF 99 1A 41 23 24 BB 43 25 F6 B8 65 BB 64 EB F6 D1 C2 06 D5 73 2D DF BC 70 A7 38 9E E5 3E 0C 24 6E 32 79 74 1A D0 05 03 E4 98 42 E1 9B F3 7B 19 8B 40 21 26 CB 36 89 C2 EA 64 96 A4 7C B4]</AssemblyPublicKey>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyCulture>neutral</AssemblyCulture>
<Attributes />
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Docs>
<summary>A callback invoked to free user-provided data.</summary>
<remarks>This is mostly for internal use. You should not need to use it unless you are binding additional unmanaged API.</remarks>
</Docs>
<Base>
<BaseTypeName>System.Delegate</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.ICloneable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Runtime.Serialization.ISerializable</InterfaceName>
</Interface>
</Interfaces>
<Attributes />
<Members />
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="data" Type="System.IntPtr" />
</Parameters>
</Type>

View file

@ -226,5 +226,37 @@
<remarks>To be added</remarks> <remarks>To be added</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetEmailHook">
<MemberSignature Language="C#" Value="public static Gtk.AboutDialogActivateLinkFunc SetEmailHook (Gtk.AboutDialogActivateLinkFunc func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.AboutDialogActivateLinkFunc</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="func" Type="Gtk.AboutDialogActivateLinkFunc" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="func">a <see cref="T:Gtk.AboutDialogActivateLinkFunc" /></param>
<returns>a <see cref="T:Gtk.AboutDialogActivateLinkFunc" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="SetUrlHook">
<MemberSignature Language="C#" Value="public static Gtk.AboutDialogActivateLinkFunc SetUrlHook (Gtk.AboutDialogActivateLinkFunc func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.AboutDialogActivateLinkFunc</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="func" Type="Gtk.AboutDialogActivateLinkFunc" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="func">a <see cref="T:Gtk.AboutDialogActivateLinkFunc" /></param>
<returns>a <see cref="T:Gtk.AboutDialogActivateLinkFunc" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
</Members> </Members>
</Type> </Type>

View file

@ -422,18 +422,15 @@ Therefore you must either set the accel path yourself with <see cref="P:Gtk.Acti
<remarks>Override this method in a subclass to provide a default handler for the <see cref="M:Gtk.ActionGroup.PostActivate" /> event.</remarks> <remarks>Override this method in a subclass to provide a default handler for the <see cref="M:Gtk.ActionGroup.PostActivate" /> event.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetTranslateFunc"> <Member MemberName="TranslateFunc">
<MemberSignature Language="C#" Value="public void SetTranslateFunc (Gtk.TranslateFunc func);" /> <MemberSignature Language="C#" Value="public Gtk.TranslateFunc TranslateFunc { set; };" />
<MemberType>Method</MemberType> <MemberType>Property</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>Gtk.TranslateFunc</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters>
<Parameter Name="func" Type="Gtk.TranslateFunc" />
</Parameters>
<Docs> <Docs>
<summary>Sets a function to be used for translating the label and tooltip of GtkActionGroupEntrys added by <see cref="M:Gtk.ActionGroup.AddActions()" />.</summary> <summary>Function to be used for translating the label and tooltip of GtkActionGroupEntrys added by <see cref="M:Gtk.ActionGroup.AddActions()" />.</summary>
<param name="func">a <see cref="T:Gtk.TranslateFunc" /></param> <returns>a <see cref="T:Gtk.TranslateFunc" /></returns>
<remarks>If you are using gettext(), it is enough to set the translation domain with <see cref="P:Gtk.ActionGroup.TranslationDomain" />.</remarks> <remarks>If you are using gettext(), it is enough to set the translation domain with <see cref="P:Gtk.ActionGroup.TranslationDomain" />.</remarks>
</Docs> </Docs>
</Member> </Member>

View file

@ -144,18 +144,18 @@
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetCellDataFunc"> <Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func);" /> <MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters>
<Parameter Name="renderer" Type="Gtk.CellRenderer" /> <Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" /> <Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>Sets up a data function for this layout.</summary> <summary>Sets up a data function for this layout.</summary>
<param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param> <param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param> <param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<remarks> <remarks>
The data function is used instead of the standard attributes mapping for setting the The data function is used instead of the standard attributes mapping for setting the
@ -178,7 +178,7 @@
<summary>Sets the attribute to model column bindings for a renderer.</summary> <summary>Sets the attribute to model column bindings for a renderer.</summary>
<param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param> <param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="attrs">a <see cref="T:System.Object" /></param> <param name="attrs">a <see cref="T:System.Object" /></param>
<remarks>The <paramref name="attrs"/> array should consist of pairs of attribute names and column indices.</remarks> <remarks>The <paramref name="attrs" /> array should consist of pairs of attribute names and column indices.</remarks>
</Docs> </Docs>
</Member> </Member>
</Members> </Members>

View file

@ -322,18 +322,18 @@
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetCellDataFunc"> <Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func);" /> <MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters>
<Parameter Name="renderer" Type="Gtk.CellRenderer" /> <Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" /> <Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>Sets a data function to use for the cell layout.</summary> <summary>Sets a data function to use for the cell layout.</summary>
<param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param> <param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param> <param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<remarks> <remarks>
The data function The data function

View file

@ -377,18 +377,18 @@ class ComboBoxSample
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetCellDataFunc"> <Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func);" /> <MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters>
<Parameter Name="renderer" Type="Gtk.CellRenderer" /> <Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" /> <Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>Sets a data function to use for the combo box.</summary> <summary>Sets a data function to use for the combo box.</summary>
<param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param> <param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param> <param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<remarks> <remarks>
The data function The data function
@ -660,23 +660,17 @@ Default value: 0
<remarks>To be added</remarks> <remarks>To be added</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetRowSeparatorFunc"> <Member MemberName="RowSeparatorFunc">
<MemberSignature Language="C#" Value="public void SetRowSeparatorFunc (Gtk.TreeViewRowSeparatorFunc func, IntPtr data, Gtk.DestroyNotify destroy);" /> <MemberSignature Language="C#" Value="public Gtk.TreeViewRowSeparatorFunc RowSeparatorFunc { set; get; };" />
<MemberType>Method</MemberType> <MemberType>Property</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>Gtk.TreeViewRowSeparatorFunc</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters />
<Parameter Name="func" Type="Gtk.TreeViewRowSeparatorFunc" />
<Parameter Name="data" Type="System.IntPtr" />
<Parameter Name="destroy" Type="Gtk.DestroyNotify" />
</Parameters>
<Docs> <Docs>
<summary>To be added</summary> <summary>Callback function to indicate whether or not a given row of the combo box should be rendered as a separator.</summary>
<param name="func">a <see cref="T:Gtk.TreeViewRowSeparatorFunc" /></param> <returns>a <see cref="T:Gtk.TreeViewRowSeparatorFunc" /></returns>
<param name="data">a <see cref="T:System.IntPtr" /></param> <remarks />
<param name="destroy">a <see cref="T:Gtk.DestroyNotify" /></param>
<remarks>To be added</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="RemoveWidget"> <Member MemberName="RemoveWidget">

View file

@ -452,18 +452,18 @@ public class DemoEntryCompletion : Window
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetCellDataFunc"> <Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func);" /> <MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters>
<Parameter Name="renderer" Type="Gtk.CellRenderer" /> <Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" /> <Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>Sets up a data function for this layout.</summary> <summary>Sets up a data function for this layout.</summary>
<param name="renderer">a <see cref="T:Gtk.CellRenderer" /></param> <param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param> <param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<remarks> <remarks>
The data function is used instead of the standard attributes mapping for setting the The data function is used instead of the standard attributes mapping for setting the
@ -502,18 +502,15 @@ public class DemoEntryCompletion : Window
<remarks>The <paramref name="attrs" /> array should be pairs of attribute names and column indexes.</remarks> <remarks>The <paramref name="attrs" /> array should be pairs of attribute names and column indexes.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetMatchFunc"> <Member MemberName="MatchFunc">
<MemberSignature Language="C#" Value="public void SetMatchFunc (Gtk.EntryCompletionMatchFunc func);" /> <MemberSignature Language="C#" Value="public Gtk.EntryCompletionMatchFunc MatchFunc { set; };" />
<MemberType>Method</MemberType> <MemberType>Property</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>Gtk.EntryCompletionMatchFunc</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters>
<Parameter Name="func" Type="Gtk.EntryCompletionMatchFunc" />
</Parameters>
<Docs> <Docs>
<summary>Sets the matching function.</summary> <summary>The matching function</summary>
<param name="func">a <see cref="T:Gtk.EntryCompletionMatchFunc" /></param> <returns>a <see cref="T:Gtk.EntryCompletionMatchFunc" /></returns>
<remarks>The match function is used to determine if a row should or should not be in the completion list.</remarks> <remarks>The match function is used to determine if a row should or should not be in the completion list.</remarks>
</Docs> </Docs>
</Member> </Member>

View file

@ -290,7 +290,7 @@
</remarks> </remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetTranslateFunc"> <Member MemberName="SetTranslateFunc" Deprecated="true">
<MemberSignature Language="C#" Value="public void SetTranslateFunc (Gtk.TranslateFunc func, IntPtr data, Gtk.DestroyNotify notify);" /> <MemberSignature Language="C#" Value="public void SetTranslateFunc (Gtk.TranslateFunc func, IntPtr data, Gtk.DestroyNotify notify);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
@ -306,7 +306,19 @@
<param name="func">The <see cref="T:Gtk.TraslateFunc" /> delegate to be used to traslate path elements.</param> <param name="func">The <see cref="T:Gtk.TraslateFunc" /> delegate to be used to traslate path elements.</param>
<param name="data">ignored</param> <param name="data">ignored</param>
<param name="notify">ignored</param> <param name="notify">ignored</param>
<remarks>This overload is obsolete. New code should use the single parameter overload instead. </remarks> <remarks>This method is obsolete. New code should use the <see cref="M:Gtk.ItemFactory.TranslateFunc" /> property instead.</remarks>
</Docs>
</Member>
<Member MemberName="TranslateFunc">
<MemberSignature Language="C#" Value="public Gtk.TranslateFunc TranslateFunc { set; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.TranslateFunc</ReturnType>
</ReturnValue>
<Docs>
<summary>The method to be used for translating the path elements before they are displayed.</summary>
<returns>a <see cref="T:Gtk.TranslateFunc" /></returns>
<remarks />
</Docs> </Docs>
</Member> </Member>
<Member MemberName="Finalize"> <Member MemberName="Finalize">
@ -541,20 +553,5 @@
<remarks>FIXME: See bugzilla 70887.</remarks> <remarks>FIXME: See bugzilla 70887.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetTranslateFunc">
<MemberSignature Language="C#" Value="public void SetTranslateFunc (Gtk.TranslateFunc func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="func" Type="Gtk.TranslateFunc" />
</Parameters>
<Docs>
<summary>Sets a method to be used for translating the path elements before they are displayed.</summary>
<param name="func">The <see cref="T:Gtk.TraslateFunc" /> delegate to be used to translate path elements.</param>
<remarks />
</Docs>
</Member>
</Members> </Members>
</Type> </Type>

View file

@ -136,7 +136,7 @@
<remarks>This overload is obsolete. The two parameter overload is preferred for new code. </remarks> <remarks>This overload is obsolete. The two parameter overload is preferred for new code. </remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetDefaultSortFunc"> <Member MemberName="SetDefaultSortFunc" Deprecated="true">
<MemberSignature Language="C#" Value="public virtual void SetDefaultSortFunc (Gtk.TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);" /> <MemberSignature Language="C#" Value="public virtual void SetDefaultSortFunc (Gtk.TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
@ -152,7 +152,19 @@
<param name="sort_func">A <see cref="T:Gtk.TreeIterCompareFunc" /></param> <param name="sort_func">A <see cref="T:Gtk.TreeIterCompareFunc" /></param>
<param name="user_data">ignored</param> <param name="user_data">ignored</param>
<param name="destroy">ignored</param> <param name="destroy">ignored</param>
<remarks>This overload is obsolete. The single parameter overload is preferred for new code. </remarks> <remarks>This method is obsolete. The <see cref="M:Gtk.ListStore.DefaultSortFunc" /> property is preferred for new code. </remarks>
</Docs>
</Member>
<Member MemberName="DefaultSortFunc">
<MemberSignature Language="C#" Value="public virtual Gtk.TreeIterCompareFunc DefaultSortFunc { set; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIterCompareFunc</ReturnType>
</ReturnValue>
<Docs>
<summary>The function that will be used by default to sort columns.</summary>
<returns>a <see cref="T:Gtk.TreeIterCompareFunc" /></returns>
<remarks />
</Docs> </Docs>
</Member> </Member>
<Member MemberName="RowDropPossible"> <Member MemberName="RowDropPossible">
@ -1062,7 +1074,7 @@ The above example creates a new three columns list store. The types of the colum
<summary>Find out whether this ListStore has a default sort function.</summary> <summary>Find out whether this ListStore has a default sort function.</summary>
<returns>a <see cref="T:System.Boolean" />, true if there is a default <returns>a <see cref="T:System.Boolean" />, true if there is a default
sort function.</returns> sort function.</returns>
<remarks>To set a default sort function, use <see cref="M:Gtk.ListStore.SetDefaultSortFunc" />.</remarks> <remarks>To set a default sort function, use the <see cref="M:Gtk.ListStore.DefaultSortFunc" /> property.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="GType"> <Member MemberName="GType">
@ -1090,10 +1102,8 @@ The above example creates a new three columns list store. The types of the colum
<remarks> <remarks>
This property is meant primarily for classes that This property is meant primarily for classes that
inherit from <see cref="T:Gtk.ListStore" />, and should inherit from <see cref="T:Gtk.ListStore" />, and should
only be used when constructing a new <see only be used when constructing a new <see cref="T:Gtk.ListStore" />. It will not function after a
cref="T:Gtk.ListStore" />. It will not function after a row has been added or after a method on the <see cref="T:Gtk.TreeModel" /> interface has been called.
row has been added or after a method on the <see
cref="T:Gtk.TreeModel" /> interface has been called.
</remarks> </remarks>
</Docs> </Docs>
</Member> </Member>
@ -1465,21 +1475,6 @@ The above example creates a new three columns list store. The types of the colum
<remarks /> <remarks />
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetDefaultSortFunc">
<MemberSignature Language="C#" Value="public virtual void SetDefaultSortFunc (Gtk.TreeIterCompareFunc sort_func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sort_func" Type="Gtk.TreeIterCompareFunc" />
</Parameters>
<Docs>
<summary>Set the function that will be used by default to sort columns.</summary>
<param name="sort_func">A <see cref="T:Gtk.TreeIterCompareFunc" /></param>
<remarks />
</Docs>
</Member>
<Member MemberName="InsertWithValuesv"> <Member MemberName="InsertWithValuesv">
<MemberSignature Language="C#" Value="public int InsertWithValuesv (Gtk.TreeIter iter, int position, GLib.Value values, int n_values);" /> <MemberSignature Language="C#" Value="public int InsertWithValuesv (Gtk.TreeIter iter, int position, GLib.Value values, int n_values);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>

View file

@ -92,31 +92,6 @@ in a <see cref="T:Gtk.TreeModel" /> for display.</summary>
</remarks> </remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetVisibleFunc">
<MemberSignature Language="C#" Value="public void SetVisibleFunc (Gtk.TreeModelFilterVisibleFunc func, IntPtr data, Gtk.DestroyNotify destroy);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="func" Type="Gtk.TreeModelFilterVisibleFunc" />
<Parameter Name="data" Type="System.IntPtr" />
<Parameter Name="destroy" Type="Gtk.DestroyNotify" />
</Parameters>
<Docs>
<summary>Sets the visible function used when filtering to be <paramref name="func" />.</summary>
<param name="func">a <see cref="T:Gtk.TreeModelFilterVisibleFunc" /></param>
<param name="data">a <see cref="T:System.IntPtr" /></param>
<param name="destroy">a <see cref="T:Gtk.DestroyNotify" /></param>
<remarks>
Note: this overload of the function is obsolete and requires you to manage the persistence
of func manually so it isn't garbage collected. The method has been replaced by a single parameter
overload which manages delegate persistence internally.
The function should return TRUE if the given row should be visible and
FALSE otherwise.
</remarks>
</Docs>
</Member>
<Member MemberName="ConvertIterToChildIter"> <Member MemberName="ConvertIterToChildIter">
<MemberSignature Language="C#" Value="public Gtk.TreeIter ConvertIterToChildIter (Gtk.TreeIter filter_iter);" /> <MemberSignature Language="C#" Value="public Gtk.TreeIter ConvertIterToChildIter (Gtk.TreeIter filter_iter);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
@ -1081,21 +1056,16 @@ in a <see cref="T:Gtk.TreeModel" /> for display.</summary>
<remarks /> <remarks />
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetVisibleFunc"> <Member MemberName="VisibleFunc">
<MemberSignature Language="C#" Value="public void SetVisibleFunc (Gtk.TreeModelFilterVisibleFunc func);" /> <MemberSignature Language="C#" Value="public Gtk.TreeModelFilterVisibleFunc VisibleFunc { set; };" />
<MemberType>Method</MemberType> <MemberType>Property</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>Gtk.TreeModelFilterVisibleFunc</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters>
<Parameter Name="func" Type="Gtk.TreeModelFilterVisibleFunc" />
</Parameters>
<Docs> <Docs>
<summary>Sets the visible function used when filtering to be <paramref name="func" />.</summary> <summary>The function used to determine whether or not a row should be visible</summary>
<param name="func">a <see cref="T:Gtk.TreeModelFilterVisibleFunc" /></param> <returns>a <see cref="T:Gtk.TreeModelFilterVisibleFunc" /></returns>
<remarks> <remarks />
The function should return <see langword="true" /> if the given row should be visible.
</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetModifyFunc"> <Member MemberName="SetModifyFunc">

View file

@ -115,7 +115,7 @@ node is always the parent.</remarks>
<remarks>This overload is obsolete. The two parameter overload is preferred for new code.</remarks> <remarks>This overload is obsolete. The two parameter overload is preferred for new code.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetDefaultSortFunc"> <Member MemberName="SetDefaultSortFunc" Deprecated="true">
<MemberSignature Language="C#" Value="public virtual void SetDefaultSortFunc (Gtk.TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);" /> <MemberSignature Language="C#" Value="public virtual void SetDefaultSortFunc (Gtk.TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
@ -131,7 +131,19 @@ node is always the parent.</remarks>
<param name="sort_func">A <see cref="TGtk.TreeIterCompareFunc" />, the function to use for sorting</param> <param name="sort_func">A <see cref="TGtk.TreeIterCompareFunc" />, the function to use for sorting</param>
<param name="user_data">ignored</param> <param name="user_data">ignored</param>
<param name="destroy">ignored</param> <param name="destroy">ignored</param>
<remarks>This overload is obsolete. The single parameter overload is preferred for new code.</remarks> <remarks>This method is obsolete. The <see cref="M:Gtk.TreeModelSort.DefaultSortFunc" /> property is preferred for new code.</remarks>
</Docs>
</Member>
<Member MemberName="DefaultSortFunc">
<MemberSignature Language="C#" Value="public virtual Gtk.TreeIterCompareFunc DefaultSortFunc { set; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIterCompareFunc</ReturnType>
</ReturnValue>
<Docs>
<summary>The function to sort columns not otherwise specified by <see cref="T:Gtk.TreeModelSort.SetSortFunc" />.</summary>
<returns>a <see cref="T:Gtk.TreeIterCompareFunc" /></returns>
<remarks>This property is meant to be used together with <see cref="T:Gtk.TreeModelSort.ChangeSortColumn" />.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="EmitRowChanged"> <Member MemberName="EmitRowChanged">
@ -865,7 +877,7 @@ node is always the parent.</remarks>
<Docs> <Docs>
<summary>Return whether this TreeModel has a default sort function or not.</summary> <summary>Return whether this TreeModel has a default sort function or not.</summary>
<returns>a <see cref="T:System.Boolean" />, true if a default sort function exists.</returns> <returns>a <see cref="T:System.Boolean" />, true if a default sort function exists.</returns>
<remarks>See <see cref="M:Gtk.TreeModelSort.SetDefaultSortFunc" /> to set a default sort function.</remarks> <remarks>See <see cref="M:Gtk.TreeModelSort.DefaultSortFunc" /> to set a default sort function.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="GType"> <Member MemberName="GType">
@ -1173,20 +1185,5 @@ node is always the parent.</remarks>
<remarks>This method is meant to be used together with <see cref="T:Gtk.TreeModelSort.ChangeSortColumn" />.</remarks> <remarks>This method is meant to be used together with <see cref="T:Gtk.TreeModelSort.ChangeSortColumn" />.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetDefaultSortFunc">
<MemberSignature Language="C#" Value="public virtual void SetDefaultSortFunc (Gtk.TreeIterCompareFunc sort_func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sort_func" Type="Gtk.TreeIterCompareFunc" />
</Parameters>
<Docs>
<summary>Sets a function to sort columns by default if not otherwise specified by <see cref="T:Gtk.TreeModelSort.SetSortFunc" />.</summary>
<param name="sort_func">A <see cref="TGtk.TreeIterCompareFunc" />, the function to use for sorting</param>
<remarks>This method is meant to be used together with <see cref="T:Gtk.TreeModelSort.ChangeSortColumn" />.</remarks>
</Docs>
</Member>
</Members> </Members>
</Type> </Type>

View file

@ -285,7 +285,7 @@ class TreeSelectionSample
</remarks> </remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetSelectFunction"> <Member MemberName="SetSelectFunction" Deprecated="true">
<MemberSignature Language="C#" Value="public void SetSelectFunction (Gtk.TreeSelectionFunc func, IntPtr data, Gtk.DestroyNotify destroy);" /> <MemberSignature Language="C#" Value="public void SetSelectFunction (Gtk.TreeSelectionFunc func, IntPtr data, Gtk.DestroyNotify destroy);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
@ -301,7 +301,21 @@ class TreeSelectionSample
<param name="func">A delegate to invoke before a node is (un)selected.</param> <param name="func">A delegate to invoke before a node is (un)selected.</param>
<param name="data">ignored</param> <param name="data">ignored</param>
<param name="destroy">ignored</param> <param name="destroy">ignored</param>
<remarks>This overload is obsolete. New code should use the single parameter overload.</remarks> <remarks>This method is obsolete. New code should use the <see cref="M:Gtk.TreeSelection.SelectFunction" /> property.</remarks>
</Docs>
</Member>
<Member MemberName="SelectFunction">
<MemberSignature Language="C#" Value="public Gtk.TreeSelectionFunc SelectFunction { set; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeSelectionFunc</ReturnType>
</ReturnValue>
<Docs>
<summary>A hook into selection and unselection</summary>
<returns>a <see cref="T:Gtk.TreeSelectionFunc" /></returns>
<remarks>
<para>If set, <paramref name="func" /> is called before any node is selected or unselected, giving some control over which nodes are selected. The select function should return <see langword="true" /> if the state of the node may be toggled, and <see langword="false" /> if the state of the node should be left unchanged.</para>
</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SelectIter"> <Member MemberName="SelectIter">
@ -538,22 +552,5 @@ class TreeSelectionSample
<remarks /> <remarks />
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetSelectFunction">
<MemberSignature Language="C#" Value="public void SetSelectFunction (Gtk.TreeSelectionFunc func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="func" Type="Gtk.TreeSelectionFunc" />
</Parameters>
<Docs>
<summary>Add a hook into selection and unselection.</summary>
<param name="func">A delegate to invoke before a node is (un)selected.</param>
<remarks>
<para> If set, <paramref name="func" /> is called before any node is selected or unselected, giving some control over which nodes are selected. The select function should return <see langword="true" /> if the state of the node may be toggled, and <see langword="false" /> if the state of the node should be left unchanged.</para>
</remarks>
</Docs>
</Member>
</Members> </Members>
</Type> </Type>

View file

@ -71,7 +71,7 @@
<remarks>This overloaded method is obsolete. It is replaced by the SetSortFunc (int, TreeIterCompareFunc) overload." /&gt;.</remarks> <remarks>This overloaded method is obsolete. It is replaced by the SetSortFunc (int, TreeIterCompareFunc) overload." /&gt;.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetDefaultSortFunc"> <Member MemberName="SetDefaultSortFunc" Deprecated="true">
<MemberSignature Language="C#" Value="public virtual void SetDefaultSortFunc (Gtk.TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);" /> <MemberSignature Language="C#" Value="public virtual void SetDefaultSortFunc (Gtk.TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
@ -87,7 +87,19 @@
<param name="sort_func">A <see cref="TGtk.TreeIterCompareFunc" />, the function to use for sorting</param> <param name="sort_func">A <see cref="TGtk.TreeIterCompareFunc" />, the function to use for sorting</param>
<param name="user_data">ignored</param> <param name="user_data">ignored</param>
<param name="destroy">ignored</param> <param name="destroy">ignored</param>
<remarks>This overload of SetDefaultSortFunc is obsolete. The replacement is a single parameter overload. The <paramref name="data" /> and <paramref name="destroy" /> paramaters to this method are ignored. </remarks> <remarks>This method is obsolete. It is replaced by the <see cref="M:Gtk.TreeSortable.DefaultSoftFunc" /> property.</remarks>
</Docs>
</Member>
<Member MemberName="DefaultSortFunc">
<MemberSignature Language="C#" Value="public virtual Gtk.TreeIterCompareFunc DefaultSortFunc { set; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIterCompareFunc</ReturnType>
</ReturnValue>
<Docs>
<summary>Function to sort columns by default if not otherwise specified by <see cref="T:Gtk.TreeModelSort.SetSortFunc" />.</summary>
<returns>a <see cref="T:Gtk.TreeIterCompareFunc" /></returns>
<remarks>This method is meant to be used together with <see cref="T:Gtk.TreeModelSort.ChangeSortColumn" /></remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SortColumnChanged"> <Member MemberName="SortColumnChanged">
@ -133,21 +145,6 @@
<remarks>See <see cref="M:Gtk.TreeModelSort.SetDefaultSortFunc" /> to set a default sort function.</remarks> <remarks>See <see cref="M:Gtk.TreeModelSort.SetDefaultSortFunc" /> to set a default sort function.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetDefaultSortFunc">
<MemberSignature Language="C#" Value="public virtual void SetDefaultSortFunc (Gtk.TreeIterCompareFunc sort_func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sort_func" Type="Gtk.TreeIterCompareFunc" />
</Parameters>
<Docs>
<summary>Sets a function to sort columns by default if not otherwise specified by <see cref="T:Gtk.TreeModelSort.SetSortFunc" />.</summary>
<param name="sort_func">A <see cref="TGtk.TreeIterCompareFunc" />, the function to use for sorting</param>
<remarks>This method is meant to be used together with <see cref="T:Gtk.TreeModelSort.ChangeSortColumn" /></remarks>
</Docs>
</Member>
<Member MemberName="SetSortFunc"> <Member MemberName="SetSortFunc">
<MemberSignature Language="C#" Value="public virtual void SetSortFunc (int sort_column_id, Gtk.TreeIterCompareFunc sort_func);" /> <MemberSignature Language="C#" Value="public virtual void SetSortFunc (int sort_column_id, Gtk.TreeIterCompareFunc sort_func);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>

View file

@ -154,7 +154,7 @@
<remarks>This overload is obsolete. The two parameter is preferred for new code.</remarks> <remarks>This overload is obsolete. The two parameter is preferred for new code.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetDefaultSortFunc"> <Member MemberName="SetDefaultSortFunc" Deprecated="true">
<MemberSignature Language="C#" Value="public virtual void SetDefaultSortFunc (Gtk.TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);" /> <MemberSignature Language="C#" Value="public virtual void SetDefaultSortFunc (Gtk.TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
@ -170,7 +170,19 @@
<param name="sort_func">A <see cref="TGtk.TreeIterCompareFunc" />, the function to use for sorting</param> <param name="sort_func">A <see cref="TGtk.TreeIterCompareFunc" />, the function to use for sorting</param>
<param name="user_data">ignored</param> <param name="user_data">ignored</param>
<param name="destroy">ignored</param> <param name="destroy">ignored</param>
<remarks>This overload is obsolete. The single parameter overload is preferred for new code.</remarks> <remarks>This method is obsolete. The <see cref="M:Gtk.TreeStore.DefaultSortFunc" /> property is preferred for new code.</remarks>
</Docs>
</Member>
<Member MemberName="DefaultSortFunc">
<MemberSignature Language="C#" Value="public virtual Gtk.TreeIterCompareFunc DefaultSortFunc { set; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIterCompareFunc</ReturnType>
</ReturnValue>
<Docs>
<summary>The function that should be used to be sort columns by default if not otherwise specified by <see cref="T:Gtk.TreeModelSort.SetSortFunc" />.</summary>
<returns>a <see cref="T:Gtk.TreeIterCompareFunc" /></returns>
<remarks>This property is meant to be used together with <see cref="T:Gtk.TreeModelSort.ChangeSortColumn" />.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="RowDropPossible"> <Member MemberName="RowDropPossible">
@ -1205,7 +1217,7 @@ store = new TreeStore (typeof (int), typeof (string));
<summary>Find out whether this TreeStore has a default sort function.</summary> <summary>Find out whether this TreeStore has a default sort function.</summary>
<returns>a <see cref="T:System.Boolean" />, true if there is a default <returns>a <see cref="T:System.Boolean" />, true if there is a default
sort function.</returns> sort function.</returns>
<remarks>To set a default sort function, use <see cref="M:Gtk.TreeStore.SetDefaultSortFunc" />.</remarks> <remarks>To set a default sort function, use <see cref="M:Gtk.TreeStore.DefaultSortFunc" />.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="GType"> <Member MemberName="GType">
@ -1785,20 +1797,5 @@ store = new TreeStore (typeof (int), typeof (string));
<remarks>This method is meant to be used together with <see cref="T:Gtk.TreeModelSort.ChangeSortColumn" /></remarks> <remarks>This method is meant to be used together with <see cref="T:Gtk.TreeModelSort.ChangeSortColumn" /></remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetDefaultSortFunc">
<MemberSignature Language="C#" Value="public virtual void SetDefaultSortFunc (Gtk.TreeIterCompareFunc sort_func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sort_func" Type="Gtk.TreeIterCompareFunc" />
</Parameters>
<Docs>
<summary>Sets a function that should be used to be sort columns by default if not otherwise specified by <see cref="T:Gtk.TreeModelSort.SetSortFunc" />.</summary>
<param name="sort_func">A <see cref="TGtk.TreeIterCompareFunc" />, the function to use for sorting</param>
<remarks>This method is meant to be used together with <see cref="T:Gtk.TreeModelSort.ChangeSortColumn" />.</remarks>
</Docs>
</Member>
</Members> </Members>
</Type> </Type>

View file

@ -261,7 +261,7 @@ For a example how to handle selection events see <see cref="T:Gtk.TreeSelection"
</remarks> </remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetColumnDragFunction"> <Member MemberName="SetColumnDragFunction" Deprecated="true">
<MemberSignature Language="C#" Value="public void SetColumnDragFunction (Gtk.TreeViewColumnDropFunc func, IntPtr user_data, Gtk.DestroyNotify destroy);" /> <MemberSignature Language="C#" Value="public void SetColumnDragFunction (Gtk.TreeViewColumnDropFunc func, IntPtr user_data, Gtk.DestroyNotify destroy);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
@ -277,7 +277,19 @@ For a example how to handle selection events see <see cref="T:Gtk.TreeSelection"
<param name="func">an object of type <see cref="T:Gtk.TreeViewColumnDropFunc" /></param> <param name="func">an object of type <see cref="T:Gtk.TreeViewColumnDropFunc" /></param>
<param name="user_data">ignored</param> <param name="user_data">ignored</param>
<param name="destroy">ignored</param> <param name="destroy">ignored</param>
<remarks>This overload is obsolete. New code should use the single parameter overload.</remarks> <remarks>This method is obsolete. New code should use the <see cref="M:Gtk.TreeView.ColumnDragFunction" /> property.</remarks>
</Docs>
</Member>
<Member MemberName="ColumnDragFunction">
<MemberSignature Language="C#" Value="public Gtk.TreeViewColumnDropFunc ColumnDragFunction { set; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeViewColumnDropFunc</ReturnType>
</ReturnValue>
<Docs>
<summary>The function for determining where a column may be dropped when dragged.</summary>
<returns>a <see cref="T:Gtk.TreeViewColumnDropFunc" /></returns>
<remarks>This function is called on every column pair in turn at the beginning of a column drag to determine where a drop can take place. If the property is set to be <see langword="null" />, then <see cref="Gtk.TreeView" /> reverts to the default behavior of allowing all columns to be dropped everywhere.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="ScrollToCell"> <Member MemberName="ScrollToCell">
@ -446,7 +458,7 @@ For a example how to handle selection events see <see cref="T:Gtk.TreeSelection"
</remarks> </remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetDestroyCountFunc"> <Member MemberName="SetDestroyCountFunc" Deprecated="true">
<MemberSignature Language="C#" Value="public void SetDestroyCountFunc (Gtk.TreeDestroyCountFunc func, IntPtr data, Gtk.DestroyNotify destroy);" /> <MemberSignature Language="C#" Value="public void SetDestroyCountFunc (Gtk.TreeDestroyCountFunc func, IntPtr data, Gtk.DestroyNotify destroy);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
@ -465,7 +477,19 @@ For a example how to handle selection events see <see cref="T:Gtk.TreeSelection"
<remarks>It is meant for private use by Atk for determining the number of visible children that are removed when the user collapses a row, or a row is deleted.</remarks> <remarks>It is meant for private use by Atk for determining the number of visible children that are removed when the user collapses a row, or a row is deleted.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetSearchEqualFunc"> <Member MemberName="DestroyCountFunc">
<MemberSignature Language="C#" Value="public Gtk.TreeDestroyCountFunc DestroyCountFunc { set; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeDestroyCountFunc</ReturnType>
</ReturnValue>
<Docs>
<summary>This property should almost never be used. It is meant for private use by ATK for determining the number of visible children that are removed when the user collapses a row, or a row is deleted.</summary>
<returns>a <see cref="T:Gtk.TreeDestroyCountFunc" /></returns>
<remarks>It is meant for private use by Atk for determining the number of visible children that are removed when the user collapses a row, or a row is deleted.</remarks>
</Docs>
</Member>
<Member MemberName="SetSearchEqualFunc" Deprecated="true">
<MemberSignature Language="C#" Value="public void SetSearchEqualFunc (Gtk.TreeViewSearchEqualFunc search_equal_func, IntPtr search_user_data, Gtk.DestroyNotify search_destroy);" /> <MemberSignature Language="C#" Value="public void SetSearchEqualFunc (Gtk.TreeViewSearchEqualFunc search_equal_func, IntPtr search_user_data, Gtk.DestroyNotify search_destroy);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
@ -481,7 +505,20 @@ For a example how to handle selection events see <see cref="T:Gtk.TreeSelection"
<param name="search_equal_func">The <see cref="T:Gtk.TreeViewSearchEqualFunc" /> to invoke.</param> <param name="search_equal_func">The <see cref="T:Gtk.TreeViewSearchEqualFunc" /> to invoke.</param>
<param name="search_user_data">ignored</param> <param name="search_user_data">ignored</param>
<param name="search_destroy">ignored</param> <param name="search_destroy">ignored</param>
<remarks>This overload is obsolete. New code should use the single parameter overload.</remarks> <remarks>This method is obsolete. New code should use the <see cref="M:Gtk.TreeView.SearchEqualFunc" /> property.</remarks>
</Docs>
</Member>
<Member MemberName="SearchEqualFunc">
<MemberSignature Language="C#" Value="public Gtk.TreeViewSearchEqualFunc SearchEqualFunc { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeViewSearchEqualFunc</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>The compare function for the interactive search capabilities.</summary>
<returns>a <see cref="T:Gtk.TreeViewSearchEqualFunc" /></returns>
<remarks />
</Docs> </Docs>
</Member> </Member>
<Member MemberName="UnsetRowsDragDest"> <Member MemberName="UnsetRowsDragDest">
@ -1826,53 +1863,6 @@ tree_view.AppendColumn ("title", text, "text", 0);
<remarks>This method actually creates the column, rather than relying on a column object to be passed in. There's an alternate invokation form if you'd like to pass in an existing column object.</remarks> <remarks>This method actually creates the column, rather than relying on a column object to be passed in. There's an alternate invokation form if you'd like to pass in an existing column object.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetSearchEqualFunc">
<MemberSignature Language="C#" Value="public void SetSearchEqualFunc (Gtk.TreeViewSearchEqualFunc search_equal_func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="search_equal_func" Type="Gtk.TreeViewSearchEqualFunc" />
</Parameters>
<Docs>
<summary>Sets the compare function for the interactive search capabilities.</summary>
<param name="search_equal_func">The <see cref="T:Gtk.TreeViewSearchEqualFunc" /> to invoke.</param>
<remarks />
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="SetDestroyCountFunc">
<MemberSignature Language="C#" Value="public void SetDestroyCountFunc (Gtk.TreeDestroyCountFunc func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="func" Type="Gtk.TreeDestroyCountFunc" />
</Parameters>
<Docs>
<summary>This function should almost never be used. It is meant for private use by ATK for determining the number of visible children that are removed when the user collapses a row, or a row is deleted.</summary>
<param name="func">an object of type <see cref="T:Gtk.TreeDestroyCountFunc" /></param>
<remarks>It is meant for private use by Atk for determining the number of visible children that are removed when the user collapses a row, or a row is deleted.</remarks>
</Docs>
</Member>
<Member MemberName="SetColumnDragFunction">
<MemberSignature Language="C#" Value="public void SetColumnDragFunction (Gtk.TreeViewColumnDropFunc func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="func" Type="Gtk.TreeViewColumnDropFunc" />
</Parameters>
<Docs>
<summary>Sets a user function for determining where a column may be dropped when dragged.</summary>
<param name="func">an object of type <see cref="T:Gtk.TreeViewColumnDropFunc" /></param>
<remarks>This function is called on every column pair in turn at the beginning of a column drag to determine where a drop can take place. If <paramref name="func" /> is set to be <see langword="null" />, then <see cref="Gtk.TreeView" /> reverts to the default behavior of allowing all columns to be dropped everywhere.</remarks>
</Docs>
</Member>
<Member MemberName="HoverExpand"> <Member MemberName="HoverExpand">
<MemberSignature Language="C#" Value="public bool HoverExpand { set; get; };" /> <MemberSignature Language="C#" Value="public bool HoverExpand { set; get; };" />
<MemberType>Property</MemberType> <MemberType>Property</MemberType>
@ -1899,23 +1889,17 @@ tree_view.AppendColumn ("title", text, "text", 0);
<remarks>To be added</remarks> <remarks>To be added</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetRowSeparatorFunc"> <Member MemberName="RowSeparatorFunc">
<MemberSignature Language="C#" Value="public void SetRowSeparatorFunc (Gtk.TreeViewRowSeparatorFunc func, IntPtr data, Gtk.DestroyNotify destroy);" /> <MemberSignature Language="C#" Value="public Gtk.TreeViewRowSeparatorFunc RowSeparatorFunc { set; get; };" />
<MemberType>Method</MemberType> <MemberType>Property</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>Gtk.TreeViewRowSeparatorFunc</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters />
<Parameter Name="func" Type="Gtk.TreeViewRowSeparatorFunc" />
<Parameter Name="data" Type="System.IntPtr" />
<Parameter Name="destroy" Type="Gtk.DestroyNotify" />
</Parameters>
<Docs> <Docs>
<summary>To be added</summary> <summary>Callback function to indicate whether or not a given row of the tree view should be rendered as a separator.</summary>
<param name="func">a <see cref="T:Gtk.TreeViewRowSeparatorFunc" /></param> <returns>a <see cref="T:Gtk.TreeViewRowSeparatorFunc" /></returns>
<param name="data">a <see cref="T:System.IntPtr" /></param> <remarks />
<param name="destroy">a <see cref="T:Gtk.DestroyNotify" /></param>
<remarks>To be added</remarks>
</Docs> </Docs>
</Member> </Member>
</Members> </Members>

View file

@ -403,20 +403,20 @@
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetCellDataFunc"> <Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell_renderer, Gtk.CellLayoutDataFunc func);" /> <MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters>
<Parameter Name="cell_renderer" Type="Gtk.CellRenderer" /> <Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" /> <Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>Sets the <see cref="T:Gtk.CellLayoutDataFunc" /> to use for a renderer.</summary> <summary>Sets the <see cref="T:Gtk.CellLayoutDataFunc" /> to use for a renderer.</summary>
<param name="cell_renderer">a <see cref="T:Gtk.CellRenderer" /></param> <param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param> <param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" /></param>
<remarks>This function is used instead of the standard attributes mapping for setting the column value, and should set the value of the <see cref="T:Gtk.TreeViewColumn" /><paramref name="cell_renderer" /> as appropriate. <paramref name="func" /> may be <see langword="null" /> to remove an older one.</remarks> <remarks>This function is used instead of the standard attributes mapping for setting the column value, and should set the value of the <see cref="T:Gtk.TreeViewColumn" /><paramref name="cell" /> as appropriate. <paramref name="func" /> may be <see langword="null" /> to remove an older one.</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="FocusCell"> <Member MemberName="FocusCell">

View file

@ -91,21 +91,17 @@
</Docs> </Docs>
</Member> </Member>
<Member MemberName="AddDecoderFindFunc"> <Member MemberName="AddDecoderFindFunc">
<MemberSignature Language="C#" Value="public void AddDecoderFindFunc (Pango.FcDecoderFindFunc findfunc, IntPtr user_data, IntPtr dnotify);" /> <MemberSignature Language="C#" Value="public void AddDecoderFindFunc (Pango.FcDecoderFindFunc findfunc);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
<ReturnType>System.Void</ReturnType> <ReturnType>System.Void</ReturnType>
</ReturnValue> </ReturnValue>
<Parameters> <Parameters>
<Parameter Name="findfunc" Type="Pango.FcDecoderFindFunc" /> <Parameter Name="findfunc" Type="Pango.FcDecoderFindFunc" />
<Parameter Name="user_data" Type="System.IntPtr" />
<Parameter Name="dnotify" Type="System.IntPtr" />
</Parameters> </Parameters>
<Docs> <Docs>
<summary>To be added</summary> <summary>To be added</summary>
<param name="findfunc">a <see cref="T:Pango.FcDecoderFindFunc" /></param> <param name="findfunc">a <see cref="T:Pango.FcDecoderFindFunc" /></param>
<param name="user_data">a <see cref="T:System.IntPtr" /></param>
<param name="dnotify">a <see cref="T:System.IntPtr" /></param>
<remarks>To be added</remarks> <remarks>To be added</remarks>
</Docs> </Docs>
</Member> </Member>

View file

@ -173,7 +173,7 @@
<remarks>To be added</remarks> <remarks>To be added</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SetSizeCallback"> <Member MemberName="SetSizeCallback" Deprecated="true">
<MemberSignature Language="C#" Value="public void SetSizeCallback (Rsvg.SizeFunc size_func, IntPtr user_data, IntPtr user_data_destroy);" /> <MemberSignature Language="C#" Value="public void SetSizeCallback (Rsvg.SizeFunc size_func, IntPtr user_data, IntPtr user_data_destroy);" />
<MemberType>Method</MemberType> <MemberType>Method</MemberType>
<ReturnValue> <ReturnValue>
@ -192,5 +192,17 @@
<remarks>To be added</remarks> <remarks>To be added</remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName="SizeCallback">
<MemberSignature Language="C#" Value="public Rsvg.SizeFunc SizeCallback { set; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Rsvg.SizeFunc</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added</summary>
<returns>a <see cref="T:Rsvg.SizeFunc" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
</Members> </Members>
</Type> </Type>

View file

@ -141,7 +141,7 @@ class Updater {
XmlTextWriter writer = new XmlTextWriter (filename, Encoding.ASCII); XmlTextWriter writer = new XmlTextWriter (filename, Encoding.ASCII);
writer.Formatting = Formatting.Indented; writer.Formatting = Formatting.Indented;
doc.WriteContentTo (writer); doc.WriteContentTo (writer);
writer.Flush (); writer.Close ();
Console.WriteLine (type.FullName); Console.WriteLine (type.FullName);
return true; return true;
} }
@ -150,6 +150,10 @@ class Updater {
{ {
bool changed = false; bool changed = false;
XmlNode node = doc.SelectSingleNode ("/Type/@FullName");
if (node == null || node.InnerText != t.FullName)
return false;
if (!t.IsAbstract && typeof (System.Delegate).IsAssignableFrom (t)) if (!t.IsAbstract && typeof (System.Delegate).IsAssignableFrom (t))
return CompareDelegate (t, doc); return CompareDelegate (t, doc);

View file

@ -65,6 +65,7 @@
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawLines']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawLines']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawPolygon']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='DrawPolygon']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='GetSize']/*/*[@type='gint*']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='GetSize']/*/*[@type='gint*']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GdkDrawable']/method[@name='SetData']/*/*[@name='destroy_func']" name="type">gpointer</attr>
<attr path="/api/namespace/object[@cname='GdkKeymap']/method[@name='GetEntriesForKeycode']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GdkKeymap']/method[@name='GetEntriesForKeycode']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GdkKeymap']/method[@name='GetEntriesForKeyval']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GdkKeymap']/method[@name='GetEntriesForKeyval']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GdkPixbuf']/constructor[@cname='gdk_pixbuf_new_from_data']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GdkPixbuf']/constructor[@cname='gdk_pixbuf_new_from_data']" name="hidden">1</attr>

View file

@ -50,9 +50,9 @@ namespace GtkSharp.Generation {
return var_name + ".NativeDelegate"; return var_name + ".NativeDelegate";
} }
public override string FromNative(string var) public override string FromNative (string var)
{ {
return var; return NS + "Sharp." + Name + "Wrapper.GetManagedDelegate (" + var + ")";
} }
public string GenWrapper (string ns, GenerationInfo gen_info) public string GenWrapper (string ns, GenerationInfo gen_info)
@ -146,6 +146,16 @@ namespace GtkSharp.Generation {
sw.WriteLine ("\t\t\tif (managed != null)"); sw.WriteLine ("\t\t\tif (managed != null)");
sw.WriteLine ("\t\t\t\tNativeDelegate = new " + wrapper + " (NativeCallback);"); sw.WriteLine ("\t\t\t\tNativeDelegate = new " + wrapper + " (NativeCallback);");
sw.WriteLine ("\t\t}"); sw.WriteLine ("\t\t}");
sw.WriteLine ();
sw.WriteLine ("\t\tpublic static " + NS + "." + Name + " GetManagedDelegate (" + wrapper + " native)");
sw.WriteLine ("\t\t{");
sw.WriteLine ("\t\t\tif (native == null)");
sw.WriteLine ("\t\t\t\treturn null;");
sw.WriteLine ("\t\t\t" + Name + "Wrapper wrapper = (" + Name + "Wrapper) native.Target;");
sw.WriteLine ("\t\t\tif (wrapper == null)");
sw.WriteLine ("\t\t\t\treturn null;");
sw.WriteLine ("\t\t\treturn wrapper.managed;");
sw.WriteLine ("\t\t}");
sw.WriteLine ("\t}"); sw.WriteLine ("\t}");
sw.WriteLine ("#endregion"); sw.WriteLine ("#endregion");
sw.WriteLine ("}"); sw.WriteLine ("}");

View file

@ -140,6 +140,22 @@ namespace GtkSharp.Generation {
CallbackGen cbgen = gen as CallbackGen; CallbackGen cbgen = gen as CallbackGen;
string wrapper = cbgen.GenWrapper(impl_ns, gen_info); string wrapper = cbgen.GenWrapper(impl_ns, gen_info);
switch (p.Scope) { switch (p.Scope) {
case "notified":
sw.WriteLine (indent + "\t\t\t{0} {1}_wrapper;", wrapper, name);
sw.WriteLine (indent + "\t\t\tIntPtr {0};", parameters [i + 1].Name);
sw.WriteLine (indent + "\t\t\t{0} {1};", parameters [i + 2].CSType, parameters [i + 2].Name);
sw.WriteLine (indent + "\t\t\tif ({0} == null) {{", name);
sw.WriteLine (indent + "\t\t\t\t{0}_wrapper = null;", name);
sw.WriteLine (indent + "\t\t\t\t{0} = IntPtr.Zero;", parameters [i + 1].Name);
sw.WriteLine (indent + "\t\t\t\t{0} = null;", parameters [i + 2].Name);
sw.WriteLine (indent + "\t\t\t} else {");
sw.WriteLine (indent + "\t\t\t\t{0}_wrapper = new {1} ({0});", name, wrapper);
sw.WriteLine (indent + "\t\t\t\t{0} = (IntPtr) GCHandle.Alloc ({1}_wrapper);", parameters [i + 1].Name, name);
sw.WriteLine (indent + "\t\t\t\t{0} = new {1} (GLib.DestroyHelper.NotifyHandler);", parameters [i + 2].Name, parameters [i + 2].CSType);
sw.WriteLine (indent + "\t\t\t}");
break;
case "call": case "call":
default: default:
if (p.Scope == String.Empty) if (p.Scope == String.Empty)

View file

@ -98,6 +98,12 @@ namespace GtkSharp.Generation {
} }
} }
public bool IsDestroyNotify {
get {
return CType == "GDestroyNotify";
}
}
public bool IsLength { public bool IsLength {
get { get {
@ -176,9 +182,15 @@ namespace GtkSharp.Generation {
} }
} }
string scope;
public string Scope { public string Scope {
get { get {
return elem.GetAttribute ("scope"); if (scope == null)
scope = elem.GetAttribute ("scope");
return scope;
}
set {
scope = value;
} }
} }
@ -269,6 +281,12 @@ namespace GtkSharp.Generation {
if (HasCB || HideData) { if (HasCB || HideData) {
if (p.IsUserData && (idx == Count - 1)) if (p.IsUserData && (idx == Count - 1))
return true; return true;
if (p.IsUserData && (idx == Count - 2) &&
this [idx + 1].IsDestroyNotify)
return true;
if (p.IsDestroyNotify && (idx == Count - 1) &&
this [idx - 1].IsUserData)
return true;
} }
return false; return false;
@ -309,7 +327,8 @@ namespace GtkSharp.Generation {
if (cleared) if (cleared)
return false; return false;
foreach (Parameter p in param_list) { for (int i = 0; i < param_list.Count; i++) {
Parameter p = this [i];
if (p.IsEllipsis) { if (p.IsEllipsis) {
Console.Write("Ellipsis parameter "); Console.Write("Ellipsis parameter ");
@ -325,8 +344,13 @@ namespace GtkSharp.Generation {
return false; return false;
} }
if (p.Generatable is CallbackGen) if (p.Generatable is CallbackGen) {
has_cb = true; has_cb = true;
if (i == Count - 3 &&
this [i + 1].IsUserData &&
this [i + 2].IsDestroyNotify)
p.Scope = "notified";
}
} }
return true; return true;

View file

@ -109,11 +109,6 @@ namespace GtkSharp.Generation {
public bool Validate () public bool Validate ()
{ {
// FIXME: implement callback return values.
if (IGen is CallbackGen) {
Console.Write ("Callback rettype " + CSType);
return false;
}
if (MarshalType == "" || CSType == "") { if (MarshalType == "" || CSType == "") {
Console.Write("rettype: " + CType); Console.Write("rettype: " + CType);
return false; return false;

View file

@ -102,6 +102,7 @@ namespace GtkSharp.Generation {
AddType (new MarshalGen ("GString", "string", "IntPtr", "new GLib.GString ({0}).Handle", "GLib.GString.PtrToString ({0})")); AddType (new MarshalGen ("GString", "string", "IntPtr", "new GLib.GString ({0}).Handle", "GLib.GString.PtrToString ({0})"));
AddType (new MarshalGen ("GType", "GLib.GType", "IntPtr", "{0}.Val", "new GLib.GType({0})")); AddType (new MarshalGen ("GType", "GLib.GType", "IntPtr", "{0}.Val", "new GLib.GType({0})"));
AddType (new ByRefGen ("GValue", "GLib.Value")); AddType (new ByRefGen ("GValue", "GLib.Value"));
AddType (new SimpleGen ("GDestroyNotify", "GLib.DestroyNotify"));
// FIXME: These ought to be handled properly. // FIXME: These ought to be handled properly.
AddType (new SimpleGen ("GC", "IntPtr")); AddType (new SimpleGen ("GC", "IntPtr"));
@ -113,14 +114,12 @@ namespace GtkSharp.Generation {
AddType (new SimpleGen ("GArray", "IntPtr")); AddType (new SimpleGen ("GArray", "IntPtr"));
AddType (new SimpleGen ("GByteArray", "IntPtr")); AddType (new SimpleGen ("GByteArray", "IntPtr"));
AddType (new SimpleGen ("GData", "IntPtr")); AddType (new SimpleGen ("GData", "IntPtr"));
AddType (new SimpleGen ("GDestroyNotify", "IntPtr"));
AddType (new SimpleGen ("GIOChannel", "IntPtr")); AddType (new SimpleGen ("GIOChannel", "IntPtr"));
AddType (new SimpleGen ("GTypeModule", "GLib.Object")); AddType (new SimpleGen ("GTypeModule", "GLib.Object"));
AddType (new SimpleGen ("GHashTable", "System.IntPtr")); AddType (new SimpleGen ("GHashTable", "System.IntPtr"));
AddType (new SimpleGen ("va_list", "IntPtr")); AddType (new SimpleGen ("va_list", "IntPtr"));
AddType (new SimpleGen ("GParamSpec", "IntPtr")); AddType (new SimpleGen ("GParamSpec", "IntPtr"));
AddType (new SimpleGen ("gconstpointer", "IntPtr")); AddType (new SimpleGen ("gconstpointer", "IntPtr"));
AddType (new SimpleGen ("GDestroyNotify", "IntPtr"));
} }
public void AddType (IGeneratable gen) public void AddType (IGeneratable gen)

View file

@ -1,4 +1,4 @@
// Gtk.DestroyHelper.cs - internal DestroyNotify helper // GLib.DestroyNotify.cs - internal DestroyNotify helper
// //
// Author: Mike Kestner <mkestner@novell.com> // Author: Mike Kestner <mkestner@novell.com>
// //
@ -18,14 +18,14 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
namespace Gtk { namespace GLib {
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
internal delegate void NativeDestroyNotify (IntPtr data); public delegate void DestroyNotify (IntPtr data);
internal class DestroyHelper { public class DestroyHelper {
private DestroyHelper () {} private DestroyHelper () {}
@ -37,12 +37,12 @@ namespace Gtk {
gch.Free (); gch.Free ();
} }
static NativeDestroyNotify release_gchandle; static DestroyNotify release_gchandle;
internal static NativeDestroyNotify NotifyHandler { public static DestroyNotify NotifyHandler {
get { get {
if (release_gchandle == null) if (release_gchandle == null)
release_gchandle = new NativeDestroyNotify (ReleaseGCHandle); release_gchandle = new DestroyNotify (ReleaseGCHandle);
return release_gchandle; return release_gchandle;
} }
} }

View file

@ -17,6 +17,7 @@ sources = \
ConnectBeforeAttribute.cs \ ConnectBeforeAttribute.cs \
DefaultSignalHandlerAttribute.cs \ DefaultSignalHandlerAttribute.cs \
DelegateWrapper.cs \ DelegateWrapper.cs \
DestroyNotify.cs \
EnumWrapper.cs \ EnumWrapper.cs \
FileUtils.cs \ FileUtils.cs \
GException.cs \ GException.cs \

View file

@ -92,6 +92,7 @@
<attr path="/api/namespace/object[@cname='GnomeIconEntry']/method[@name='PickDialog']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GnomeIconEntry']/method[@name='PickDialog']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/constructor[@cname='gnome_icon_list_new']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GnomeIconList']/constructor[@cname='gnome_icon_list_new']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/method[@name='GetSelection']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GnomeIconList']/method[@name='GetSelection']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/method[@name='SetIconDataFull']/*/*[@name='destroy']" name="type">gpointer</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/signal[@name='FocusIcon']" name="name">IconFocused</attr> <attr path="/api/namespace/object[@cname='GnomeIconList']/signal[@name='FocusIcon']" name="name">IconFocused</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/signal[@name='SelectIcon']" name="name">IconSelected</attr> <attr path="/api/namespace/object[@cname='GnomeIconList']/signal[@name='SelectIcon']" name="name">IconSelected</attr>
<attr path="/api/namespace/object[@cname='GnomeIconList']/signal[@name='UnselectIcon']" name="name">IconUnselected</attr> <attr path="/api/namespace/object[@cname='GnomeIconList']/signal[@name='UnselectIcon']" name="name">IconUnselected</attr>

View file

@ -84,17 +84,3 @@
result [i] = list [i] as Gtk.Action; result [i] = list [i] as Gtk.Action;
return result; return result;
} }
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_action_group_set_translate_func (IntPtr raw, GtkSharp.TranslateFuncNative func, IntPtr data, NativeDestroyNotify notify);
public void SetTranslateFunc (Gtk.TranslateFunc func)
{
if (func == null) {
gtk_action_group_set_translate_func (Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.TranslateFuncWrapper func_wrapper = new GtkSharp.TranslateFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (func_wrapper);
gtk_action_group_set_translate_func (Handle, func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}

View file

@ -19,6 +19,5 @@
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
void SetCellDataFunc (CellRenderer renderer, CellLayoutDataFunc func);
void SetAttributes (CellRenderer renderer, object[] attrs); void SetAttributes (CellRenderer renderer, object[] attrs);

View file

@ -31,19 +31,3 @@
AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]); AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]);
} }
} }
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_cell_layout_set_cell_data_func(IntPtr raw, IntPtr cell_renderer, GtkSharp.CellLayoutDataFuncNative func, IntPtr func_data, NativeDestroyNotify destroy);
public void SetCellDataFunc (CellRenderer renderer, CellLayoutDataFunc func)
{
if (func == null) {
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.CellLayoutDataFuncWrapper func_wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (func_wrapper);
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}

View file

@ -31,19 +31,3 @@
AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]); AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]);
} }
} }
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_cell_layout_set_cell_data_func(IntPtr raw, IntPtr cell_renderer, GtkSharp.CellLayoutDataFuncNative func, IntPtr func_data, NativeDestroyNotify destroy);
public void SetCellDataFunc (CellRenderer renderer, CellLayoutDataFunc func)
{
if (func == null) {
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.CellLayoutDataFuncWrapper func_wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (func_wrapper);
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}

View file

@ -31,34 +31,3 @@
AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]); AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]);
} }
} }
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_cell_layout_set_cell_data_func (IntPtr raw, IntPtr cell_renderer, GtkSharp.CellLayoutDataFuncNative func, IntPtr func_data, NativeDestroyNotify destroy);
public void SetCellDataFunc (CellRenderer renderer, CellLayoutDataFunc func)
{
if (func == null) {
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.CellLayoutDataFuncWrapper func_wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (func_wrapper);
gtk_cell_layout_set_cell_data_func (Handle, renderer.Handle, func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_entry_completion_set_match_func (IntPtr raw, GtkSharp.EntryCompletionMatchFuncNative func, IntPtr func_data, NativeDestroyNotify func_notify);
public void SetMatchFunc (EntryCompletionMatchFunc func)
{
if (func == null) {
gtk_entry_completion_set_match_func (Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.EntryCompletionMatchFuncWrapper func_wrapper = new GtkSharp.EntryCompletionMatchFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (func_wrapper);
gtk_entry_completion_set_match_func (Handle, func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}

View file

@ -1,35 +0,0 @@
// Gtk.FileFilter.custom - Gtk FileFilter class customizations
//
// 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.
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_file_filter_add_custom(IntPtr raw, int needed, GtkSharp.FileFilterFuncNative func, IntPtr data, NativeDestroyNotify notify);
public void AddCustom (Gtk.FileFilterFlags needed, Gtk.FileFilterFunc func)
{
if (func == null) {
gtk_file_filter_add_custom (Handle, (int) needed, null, IntPtr.Zero, null);
return;
}
GtkSharp.FileFilterFuncWrapper func_wrapper = new GtkSharp.FileFilterFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (func_wrapper);
gtk_file_filter_add_custom(Handle, (int) needed, func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}

View file

@ -1,5 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<metadata> <metadata>
<attr path="/api/namespace/*/method/*/*[@type='GtkDestroyNotify']" name="type">GDestroyNotify</attr>
<attr path="/api/namespace/struct[@cname='GtkAccelKey']/field[@cname='accel_key']" name="type">GdkKey</attr> <attr path="/api/namespace/struct[@cname='GtkAccelKey']/field[@cname='accel_key']" name="type">GdkKey</attr>
<attr path="/api/namespace/struct[@cname='GtkAccelKey']/field[@cname='accel_key']" name="name">Key</attr> <attr path="/api/namespace/struct[@cname='GtkAccelKey']/field[@cname='accel_key']" name="name">Key</attr>
<attr path="/api/namespace/struct[@cname='GtkAccelKey']/field[@cname='accel_mods']" name="type">GdkModifierType</attr> <attr path="/api/namespace/struct[@cname='GtkAccelKey']/field[@cname='accel_mods']" name="type">GdkModifierType</attr>
@ -73,7 +74,6 @@
<attr path="/api/namespace/interface[@cname='GtkCellEditable']/method[@name='EditingDone']" name="name">FinishEditing</attr> <attr path="/api/namespace/interface[@cname='GtkCellEditable']/method[@name='EditingDone']" name="name">FinishEditing</attr>
<attr path="/api/namespace/interface[@cname='GtkCellEditable']/signal[@name='RemoveWidget']" name="name">WidgetRemoved</attr> <attr path="/api/namespace/interface[@cname='GtkCellEditable']/signal[@name='RemoveWidget']" name="name">WidgetRemoved</attr>
<attr path="/api/namespace/interface[@cname='GtkCellLayout']/method[@name='SetAttributes']" name="hidden">1</attr> <attr path="/api/namespace/interface[@cname='GtkCellLayout']/method[@name='SetAttributes']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GtkCellLayout']/method[@name='SetCellDataFunc']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GtkEditable']/method[@name='GetEditable']" name="name">GetIsEditable</attr> <attr path="/api/namespace/interface[@cname='GtkEditable']/method[@name='GetEditable']" name="name">GetIsEditable</attr>
<attr path="/api/namespace/interface[@cname='GtkEditable']/method[@name='InsertText']/*/*[@name='position']" name="pass_as">ref</attr> <attr path="/api/namespace/interface[@cname='GtkEditable']/method[@name='InsertText']/*/*[@name='position']" name="pass_as">ref</attr>
<attr path="/api/namespace/interface[@cname='GtkEditable']/method[@name='SetEditable']" name="name">SetIsEditable</attr> <attr path="/api/namespace/interface[@cname='GtkEditable']/method[@name='SetEditable']" name="name">SetIsEditable</attr>
@ -100,8 +100,6 @@
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowHasChildToggled']" name="name">EmitRowHasChildToggled</attr> <attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowHasChildToggled']" name="name">EmitRowHasChildToggled</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowInserted']" name="name">EmitRowInserted</attr> <attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowInserted']" name="name">EmitRowInserted</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowsReordered']" name="name">EmitRowsReordered</attr> <attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowsReordered']" name="name">EmitRowsReordered</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeSortable']/method[@name='SetDefaultSortFunc']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeSortable']/method[@name='SetSortFunc']" name="hidden">1</attr>
<attr path="/api/namespace/interface[@cname='GtkTreeSortable']/method[@name='SortColumnChanged']" name="name">ChangeSortColumn</attr> <attr path="/api/namespace/interface[@cname='GtkTreeSortable']/method[@name='SortColumnChanged']" name="name">ChangeSortColumn</attr>
<attr path="/api/namespace/object[@cname='GtkAccelLabel']/constructor[@cname='gtk_accel_label_new']/*/*[@name='string']" name="property_name">label</attr> <attr path="/api/namespace/object[@cname='GtkAccelLabel']/constructor[@cname='gtk_accel_label_new']/*/*[@name='string']" name="property_name">label</attr>
<attr path="/api/namespace/object[@cname='GtkAction']/signal[@name='Activate']" name="name">Activated</attr> <attr path="/api/namespace/object[@cname='GtkAction']/signal[@name='Activate']" name="name">Activated</attr>
@ -128,7 +126,6 @@
<attr path="/api/namespace/object[@cname='GtkActionGroup']/method[@name='AddToggleActionsFull']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkActionGroup']/method[@name='AddToggleActionsFull']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkActionGroup']/method[@name='ListActions']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkActionGroup']/method[@name='ListActions']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkActionGroup']/method[@name='RemoveAction']" name="name">Remove</attr> <attr path="/api/namespace/object[@cname='GtkActionGroup']/method[@name='RemoveAction']" name="name">Remove</attr>
<attr path="/api/namespace/object[@cname='GtkActionGroup']/method[@name='SetTranslateFunc']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkActionGroup']/signal[@name='ConnectProxy']/*/*[@name='inst']" name="name">action_group</attr> <attr path="/api/namespace/object[@cname='GtkActionGroup']/signal[@name='ConnectProxy']/*/*[@name='inst']" name="name">action_group</attr>
<attr path="/api/namespace/object[@cname='GtkActionGroup']/signal[@name='ConnectProxy']/*/*[@name='p0']" name="name">action</attr> <attr path="/api/namespace/object[@cname='GtkActionGroup']/signal[@name='ConnectProxy']/*/*[@name='p0']" name="name">action</attr>
<attr path="/api/namespace/object[@cname='GtkActionGroup']/signal[@name='ConnectProxy']/*/*[@name='p1']" name="name">proxy</attr> <attr path="/api/namespace/object[@cname='GtkActionGroup']/signal[@name='ConnectProxy']/*/*[@name='p1']" name="name">proxy</attr>
@ -177,7 +174,7 @@
<attr path="/api/namespace/object[@cname='GtkColorSelection']/method[@name='SetColor']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkColorSelection']/method[@name='SetColor']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkColorSelection']/method[@name='SetPreviousColor']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkColorSelection']/method[@name='SetPreviousColor']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkCombo']/method[@name='SetPopdownStrings']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkCombo']/method[@name='SetPopdownStrings']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkComboBox']/method[@cname='gtk_combo_box_get_active_iter']/*/*[@type='GtkTreeIter*']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GtkComboBox']/method[@name='GetActiveIter']/*/*[@type='GtkTreeIter*']" name="pass_as">out</attr>
<add-node path="/api/namespace/object[@cname='GtkContainer']"><implements><interface name="IEnumerable" /></implements></add-node> <add-node path="/api/namespace/object[@cname='GtkContainer']"><implements><interface name="IEnumerable" /></implements></add-node>
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='ChildGetProperty']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='ChildGetProperty']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='Forall']/*/*[@name='callback']" name="scope">call</attr> <attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='Forall']/*/*[@name='callback']" name="scope">call</attr>
@ -185,6 +182,7 @@
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='ForeachFull']/*/*[@name='callback']" name="scope">call</attr> <attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='ForeachFull']/*/*[@name='callback']" name="scope">call</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='ForeachFull']/*/*[@name='marshal']" name="scope">call</attr> <attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='ForeachFull']/*/*[@name='marshal']" name="scope">call</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='ForeachFull']/*/*[@name='notify']" name="scope">call</attr> <attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='ForeachFull']/*/*[@name='notify']" name="scope">call</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='ForeachFull']/*/*[@name='notify']" name="type">GtkDestroyNotify</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='GetChildren']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='GetChildren']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='GetFocusChain']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='GetFocusChain']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='SetFocusChain']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='SetFocusChain']" name="hidden">1</attr>
@ -205,12 +203,10 @@
<attr path="/api/namespace/object[@cname='GtkEntry']/signal[@name='CopyClipboard']" name="name">ClipboardCopied</attr> <attr path="/api/namespace/object[@cname='GtkEntry']/signal[@name='CopyClipboard']" name="name">ClipboardCopied</attr>
<attr path="/api/namespace/object[@cname='GtkEntry']/signal[@name='CutClipboard']" name="name">ClipboardCut</attr> <attr path="/api/namespace/object[@cname='GtkEntry']/signal[@name='CutClipboard']" name="name">ClipboardCut</attr>
<attr path="/api/namespace/object[@cname='GtkEntry']/signal[@name='PasteClipboard']" name="name">ClipboardPasted</attr> <attr path="/api/namespace/object[@cname='GtkEntry']/signal[@name='PasteClipboard']" name="name">ClipboardPasted</attr>
<attr path="/api/namespace/object[@cname='GtkEntryCompletion']/method[@name='SetMatchFunc']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkEntryCompletion']/signal[@name='InsertPrefix']" name="name">PrefixInserted</attr> <attr path="/api/namespace/object[@cname='GtkEntryCompletion']/signal[@name='InsertPrefix']" name="name">PrefixInserted</attr>
<attr path="/api/namespace/object[@cname='GtkExpander']/constructor[@cname='gtk_expander_new_with_mnemonic']" name="preferred">1</attr> <attr path="/api/namespace/object[@cname='GtkExpander']/constructor[@cname='gtk_expander_new_with_mnemonic']" name="preferred">1</attr>
<attr path="/api/namespace/object[@cname='GtkFileChooserDialog']/constructor[@cname='gtk_file_chooser_dialog_new']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkFileChooserDialog']/constructor[@cname='gtk_file_chooser_dialog_new']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkFileChooserDialog']/constructor[@cname='gtk_file_chooser_dialog_new_with_backend']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkFileChooserDialog']/constructor[@cname='gtk_file_chooser_dialog_new_with_backend']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkFileFilter']/method[@name='AddCustom']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkFileSelection']/method[@name='GetSelections']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkFileSelection']/method[@name='GetSelections']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkFilePath']" name="parent">GObject</attr> <attr path="/api/namespace/object[@cname='GtkFilePath']" name="parent">GObject</attr>
<attr path="/api/namespace/object[@cname='GtkExpander']/signal[@name='Activate']" name="name">Activated</attr> <attr path="/api/namespace/object[@cname='GtkExpander']/signal[@name='Activate']" name="name">Activated</attr>
@ -246,7 +242,7 @@
<attr path="/api/namespace/object[@cname='GtkItemFactory']/constructor[@cname='gtk_item_factory_new']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkItemFactory']/constructor[@cname='gtk_item_factory_new']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkItemFactory']/method[@name='GetItemByAction']" name="name">GetItem</attr> <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='GetWidgetByAction']" name="name">GetWidget</attr>
<attr path="/api/namespace/object[@cname='GtkItemFactory']/method[@name='SetTranslateFunc']" name="hidden">1</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='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='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='GtkItem']/signal[@name='Toggle']" name="name">Toggled</attr>
@ -285,6 +281,10 @@
<attr path="/api/namespace/object[@cname='GtkObject']/method[@name='Destroy']" 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='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='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="name">Destroyed</attr> <attr path="/api/namespace/object[@cname='GtkObject']/signal[@name='Destroy']" name="name">Destroyed</attr>
<attr path="/api/namespace/object[@cname='GtkPlug']/constructor[@cname='gtk_plug_new']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkPlug']/constructor[@cname='gtk_plug_new']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkPlug']/constructor[@cname='gtk_plug_new_for_display']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkPlug']/constructor[@cname='gtk_plug_new_for_display']" name="hidden">1</attr>
@ -372,7 +372,6 @@
<attr path="/api/namespace/object[@cname='GtkToolItem']/signal[@name='SetTooltip']" name="name">TooltipSet</attr> <attr path="/api/namespace/object[@cname='GtkToolItem']/signal[@name='SetTooltip']" name="name">TooltipSet</attr>
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='ConvertIterToChildIter']/*/*[@name='child_iter']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='ConvertIterToChildIter']/*/*[@name='child_iter']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='ConvertChildIterToIter']/*/*[@name='filter_iter']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='ConvertChildIterToIter']/*/*[@name='filter_iter']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='SetVisibleFunc']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='SetModifyFunc']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='SetModifyFunc']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeModelSort']/constructor[@cname='gtk_tree_model_sort_new_with_model']/*/*[@name='child_model']" name="property_name">model</attr> <attr path="/api/namespace/object[@cname='GtkTreeModelSort']/constructor[@cname='gtk_tree_model_sort_new_with_model']/*/*[@name='child_model']" name="property_name">model</attr>
<attr path="/api/namespace/object[@cname='GtkTreeModelSort']/method[@name='ConvertChildIterToIter']/*/*[@name='sort_iter']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GtkTreeModelSort']/method[@name='ConvertChildIterToIter']/*/*[@name='sort_iter']" name="pass_as">out</attr>
@ -380,7 +379,6 @@
<attr path="/api/namespace/object[@cname='GtkTreeSelection']/method[@name='GetSelected']/*/*" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GtkTreeSelection']/method[@name='GetSelected']/*/*" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkTreeSelection']/method[@name='GetSelectedRows']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeSelection']/method[@name='GetSelectedRows']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeSelection']/method[@name='SelectedForeach']/*/*[@name='func']" name="scope">call</attr> <attr path="/api/namespace/object[@cname='GtkTreeSelection']/method[@name='SelectedForeach']/*/*[@name='func']" name="scope">call</attr>
<attr path="/api/namespace/object[@cname='GtkTreeSelection']/method[@name='SetSelectFunction']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/constructor[@cname='gtk_tree_store_new']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeStore']/constructor[@cname='gtk_tree_store_new']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/constructor[@cname='gtk_tree_store_newv']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeStore']/constructor[@cname='gtk_tree_store_newv']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Append']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Append']" name="hidden">1</attr>
@ -400,7 +398,6 @@
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='PackEnd']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='PackEnd']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='PackStart']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='PackStart']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='SetAttributes']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='SetAttributes']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='SetCellDataFunc']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='EnableModelDragDest']/*/*[@name='targets']" name="array">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='EnableModelDragDest']/*/*[@name='targets']" name="array">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='EnableModelDragSource']/*/*[@name='targets']" name="array">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='EnableModelDragSource']/*/*[@name='targets']" name="array">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='GetCellArea']/*/*[@name='rect']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='GetCellArea']/*/*[@name='rect']" name="pass_as">out</attr>
@ -413,15 +410,11 @@
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='GetDragDestRow']/*/*[@name='pos']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='GetDragDestRow']/*/*[@name='pos']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='GetBackgroundArea']/*/*[@name='rect']" name="pass_as">out</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='GetBackgroundArea']/*/*[@name='rect']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='GetPathAtPos']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='GetPathAtPos']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='GetSearchEqualFunc']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='InsertColumnWithAttributes']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='InsertColumnWithAttributes']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='InsertColumnWithDataFunc']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='InsertColumnWithDataFunc']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='MapExpandedRows']/*/*[@name='func']" name="scope">call</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='MapExpandedRows']/*/*[@name='func']" name="scope">call</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='RowActivated']" name="name">ActivateRow</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='RowActivated']" name="name">ActivateRow</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='RowExpanded']" name="name">GetRowExpanded</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='RowExpanded']" name="name">GetRowExpanded</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='SetDestroyCountFunc']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='SetSearchEqualFunc']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='SetColumnDragFunction']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeView']/signal[@name='SetScrollAdjustments']" name="name">ScrollAdjustmentsSet</attr> <attr path="/api/namespace/object[@cname='GtkTreeView']/signal[@name='SetScrollAdjustments']" name="name">ScrollAdjustmentsSet</attr>
<attr path="/api/namespace/object[@cname='GtkUIManager']/constructor[@cname='gtk_ui_manager_new_merge_id']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkUIManager']/constructor[@cname='gtk_ui_manager_new_merge_id']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkUIManager']/method[@cname='gtk_ui_manager_get_action_groups']" name="hidden">1</attr> <attr path="/api/namespace/object[@cname='GtkUIManager']/method[@cname='gtk_ui_manager_get_action_groups']" name="hidden">1</attr>

View file

@ -20,7 +20,7 @@
[DllImport("libgtk-win32-2.0-0.dll")] [DllImport("libgtk-win32-2.0-0.dll")]
static extern uint gtk_input_add_full(int source, int condition, InputFunctionNative function, GtkSharp.CallbackMarshalNative marshal, IntPtr data, NativeDestroyNotify destroy); static extern uint gtk_input_add_full(int source, int condition, InputFunctionNative function, GtkSharp.CallbackMarshalNative marshal, IntPtr data, GLib.DestroyNotify destroy);
[GLib.CDeclCallback] [GLib.CDeclCallback]
delegate void InputFunctionNative(IntPtr data, int source, int condition); delegate void InputFunctionNative(IntPtr data, int source, int condition);
@ -52,7 +52,7 @@
GtkSharp.CallbackMarshalWrapper marshal; GtkSharp.CallbackMarshalWrapper marshal;
IntPtr data; IntPtr data;
DestroyNotify destroy; DestroyNotify destroy;
NativeDestroyNotify handler; GLib.DestroyNotify handler;
public InputProxy (InputFunctionWrapper function, GtkSharp.CallbackMarshalWrapper marshal, IntPtr data, DestroyNotify destroy) public InputProxy (InputFunctionWrapper function, GtkSharp.CallbackMarshalWrapper marshal, IntPtr data, DestroyNotify destroy)
{ {
@ -60,7 +60,7 @@
this.function = function; this.function = function;
this.destroy = destroy; this.destroy = destroy;
this.data = data; this.data = data;
handler = new NativeDestroyNotify (OnDestroy); handler = new GLib.DestroyNotify (OnDestroy);
} }
void OnDestroy (IntPtr data) void OnDestroy (IntPtr data)
@ -72,7 +72,7 @@
gch.Free (); gch.Free ();
} }
public NativeDestroyNotify Handler { public GLib.DestroyNotify Handler {
get { get {
return handler; return handler;
} }

View file

@ -36,23 +36,8 @@
GLib.Marshaller.Free (native); GLib.Marshaller.Free (native);
} }
[DllImport ("libgtk-win32-2.0-0.dll")] [Obsolete ("Replaced by TranslateFunc property.")]
static extern void gtk_item_factory_set_translate_func (IntPtr raw, GtkSharp.TranslateFuncNative func, IntPtr data, NativeDestroyNotify notify);
[Obsolete ("Replaced by SetTranslateFunc (TranslateFunc) overload.")]
public void SetTranslateFunc (TranslateFunc func, IntPtr data, DestroyNotify notify) public void SetTranslateFunc (TranslateFunc func, IntPtr data, DestroyNotify notify)
{ {
SetTranslateFunc (func); TranslateFunc = func;
} }
public void SetTranslateFunc (TranslateFunc func)
{
if (func == null) {
gtk_item_factory_set_translate_func (Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.TranslateFuncWrapper func_wrapper = new GtkSharp.TranslateFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (func_wrapper);
gtk_item_factory_set_translate_func (Handle, func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}

View file

@ -156,45 +156,14 @@
return ret; return ret;
} }
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_sortable_set_sort_func(IntPtr raw, int col_id, GtkSharp.TreeIterCompareFuncNative sort_func, IntPtr user_data, NativeDestroyNotify destroy);
[Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")] [Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")]
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{ {
SetSortFunc (sort_column_id, sort_func); SetSortFunc (sort_column_id, sort_func);
} }
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func) [Obsolete ("Replaced by DefaultSortFunc property.")]
{
if (sort_func == null) {
gtk_tree_sortable_set_sort_func (Handle, sort_column_id, null, IntPtr.Zero, null);
return;
}
GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper (sort_func);
GCHandle gch = GCHandle.Alloc (sort_func_wrapper);
gtk_tree_sortable_set_sort_func(Handle, sort_column_id, sort_func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_sortable_set_default_sort_func(IntPtr raw, GtkSharp.TreeIterCompareFuncNative sort_func, IntPtr user_data, NativeDestroyNotify destroy);
[Obsolete ("Replaced by SetDefaultSortFunc (TreeIterCompareFunc) overload.")]
public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{ {
SetDefaultSortFunc (sort_func); DefaultSortFunc = sort_func;
} }
public void SetDefaultSortFunc (TreeIterCompareFunc sort_func)
{
if (sort_func == null) {
gtk_tree_sortable_set_default_sort_func (Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper (sort_func);
GCHandle gch = GCHandle.Alloc (sort_func_wrapper);
gtk_tree_sortable_set_default_sort_func(Handle, sort_func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}

View file

@ -14,7 +14,6 @@ sources = \
Application.cs \ Application.cs \
BindingAttribute.cs \ BindingAttribute.cs \
ChildPropertyAttribute.cs \ ChildPropertyAttribute.cs \
DestroyHelper.cs \
ITreeNode.cs \ ITreeNode.cs \
NodeCellDataFunc.cs \ NodeCellDataFunc.cs \
NodeSelection.cs \ NodeSelection.cs \
@ -53,7 +52,6 @@ customs = \
EntryCompletion.custom \ EntryCompletion.custom \
FileChooserDialog.custom \ FileChooserDialog.custom \
FileChooserWidget.custom \ FileChooserWidget.custom \
FileFilter.custom \
FileSelection.custom \ FileSelection.custom \
FileSystemModel.custom \ FileSystemModel.custom \
Frame.custom \ Frame.custom \

View file

@ -25,7 +25,7 @@
GtkSharp.CallbackMarshalWrapper marshal; GtkSharp.CallbackMarshalWrapper marshal;
IntPtr data; IntPtr data;
DestroyNotify destroy; DestroyNotify destroy;
NativeDestroyNotify handler; GLib.DestroyNotify handler;
public QuitProxy (GtkSharp.FunctionWrapper function, GtkSharp.CallbackMarshalWrapper marshal, IntPtr data, DestroyNotify destroy) public QuitProxy (GtkSharp.FunctionWrapper function, GtkSharp.CallbackMarshalWrapper marshal, IntPtr data, DestroyNotify destroy)
{ {
@ -33,7 +33,7 @@
this.function = function; this.function = function;
this.destroy = destroy; this.destroy = destroy;
this.data = data; this.data = data;
handler = new NativeDestroyNotify (OnDestroy); handler = new GLib.DestroyNotify (OnDestroy);
} }
void OnDestroy (IntPtr data) void OnDestroy (IntPtr data)
@ -45,7 +45,7 @@
gch.Free (); gch.Free ();
} }
public NativeDestroyNotify Handler { public GLib.DestroyNotify Handler {
get { get {
return handler; return handler;
} }
@ -53,7 +53,7 @@
} }
[DllImport("libgtk-win32-2.0-0.dll")] [DllImport("libgtk-win32-2.0-0.dll")]
static extern uint gtk_quit_add_full(uint main_level, GtkSharp.FunctionNative function, GtkSharp.CallbackMarshalNative marshal, IntPtr data, NativeDestroyNotify destroy); static extern uint gtk_quit_add_full(uint main_level, GtkSharp.FunctionNative function, GtkSharp.CallbackMarshalNative marshal, IntPtr data, GLib.DestroyNotify destroy);
[Obsolete ("Replaced by Add method")] [Obsolete ("Replaced by Add method")]
public static uint AddFull (uint main_level, Function function, CallbackMarshal marshal, IntPtr data, DestroyNotify destroy) public static uint AddFull (uint main_level, Function function, CallbackMarshal marshal, IntPtr data, DestroyNotify destroy)
@ -69,6 +69,6 @@
{ {
GtkSharp.FunctionWrapper function_wrapper = new GtkSharp.FunctionWrapper (function); GtkSharp.FunctionWrapper function_wrapper = new GtkSharp.FunctionWrapper (function);
GCHandle gch = GCHandle.Alloc (function_wrapper); GCHandle gch = GCHandle.Alloc (function_wrapper);
return gtk_quit_add_full (main_level, function_wrapper.NativeDelegate, null, (IntPtr) gch, DestroyHelper.NotifyHandler); return gtk_quit_add_full (main_level, function_wrapper.NativeDelegate, null, (IntPtr) gch, new GLib.DestroyNotify (GLib.DestroyHelper.NotifyHandler));
} }

View file

@ -58,27 +58,14 @@
return ret; return ret;
} }
[Obsolete ("Replaced by SetVisibleFunc (TreeModelFilterVisibleFunc) overload.")] [Obsolete ("Replaced by VisibleFunc property.")]
public void SetVisibleFunc (TreeModelFilterVisibleFunc func, IntPtr data, Gtk.DestroyNotify destroy) public void SetVisibleFunc (TreeModelFilterVisibleFunc func, IntPtr data, Gtk.DestroyNotify destroy)
{ {
SetVisibleFunc (func); VisibleFunc = func;
} }
[DllImport("libgtk-win32-2.0-0.dll")] [DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_model_filter_set_visible_func (IntPtr raw, GtkSharp.TreeModelFilterVisibleFuncNative func, IntPtr data, NativeDestroyNotify destroy); static extern void gtk_tree_model_filter_set_modify_func(IntPtr raw, int n_columns, IntPtr[] types, GtkSharp.TreeModelFilterModifyFuncNative func, IntPtr data, GLib.DestroyNotify destroy);
public void SetVisibleFunc (TreeModelFilterVisibleFunc func)
{
if (func == null) {
gtk_tree_model_filter_set_visible_func (Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.TreeModelFilterVisibleFuncWrapper func_wrapper = new GtkSharp.TreeModelFilterVisibleFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (func_wrapper);
gtk_tree_model_filter_set_visible_func (Handle, func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_model_filter_set_modify_func(IntPtr raw, int n_columns, IntPtr[] types, GtkSharp.TreeModelFilterModifyFuncNative func, IntPtr data, NativeDestroyNotify destroy);
public void SetModifyFunc (int n_columns, GLib.GType[] types, TreeModelFilterModifyFunc func) public void SetModifyFunc (int n_columns, GLib.GType[] types, TreeModelFilterModifyFunc func)
{ {
@ -87,6 +74,6 @@
for (int i = 0; i < types.Length; i++) for (int i = 0; i < types.Length; i++)
native_types [i] = types [i].Val; native_types [i] = types [i].Val;
GCHandle gch = GCHandle.Alloc (func_wrapper); GCHandle gch = GCHandle.Alloc (func_wrapper);
gtk_tree_model_filter_set_modify_func (Handle, n_columns, native_types, func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler); gtk_tree_model_filter_set_modify_func (Handle, n_columns, native_types, func_wrapper.NativeDelegate, (IntPtr) gch, new GLib.DestroyNotify (GLib.DestroyHelper.NotifyHandler));
} }

View file

@ -85,45 +85,14 @@
return ret; return ret;
} }
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_sortable_set_sort_func(IntPtr raw, int col_id, GtkSharp.TreeIterCompareFuncNative sort_func, IntPtr user_data, NativeDestroyNotify destroy);
[Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")] [Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")]
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{ {
SetSortFunc (sort_column_id, sort_func); SetSortFunc (sort_column_id, sort_func);
} }
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func) [Obsolete ("Replaced by DefaultSortFunc property.")]
{
if (sort_func == null) {
gtk_tree_sortable_set_sort_func (Handle, sort_column_id, null, IntPtr.Zero, null);
return;
}
GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper (sort_func);
GCHandle gch = GCHandle.Alloc (sort_func_wrapper);
gtk_tree_sortable_set_sort_func(Handle, sort_column_id, sort_func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_sortable_set_default_sort_func(IntPtr raw, GtkSharp.TreeIterCompareFuncNative sort_func, IntPtr user_data, NativeDestroyNotify destroy);
[Obsolete ("Replaced by SetDefaultSortFunc (TreeIterCompareFunc) overload.")]
public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{ {
SetDefaultSortFunc (sort_func); DefaultSortFunc = sort_func;
} }
public void SetDefaultSortFunc (TreeIterCompareFunc sort_func)
{
if (sort_func == null) {
gtk_tree_sortable_set_default_sort_func (Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper (sort_func);
GCHandle gch = GCHandle.Alloc (sort_func_wrapper);
gtk_tree_sortable_set_default_sort_func(Handle, sort_func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}

View file

@ -53,23 +53,8 @@
return result; return result;
} }
[DllImport("libgtk-win32-2.0-0.dll")] [Obsolete ("Replaced by SelectFunction property.")]
static extern void gtk_tree_selection_set_select_function (IntPtr raw, GtkSharp.TreeSelectionFuncNative func, IntPtr data, NativeDestroyNotify destroy);
[Obsolete ("Replaced by SetSelectFunction (TreeSelectionFunc) overload.")]
public void SetSelectFunction (Gtk.TreeSelectionFunc func, IntPtr data, Gtk.DestroyNotify destroy) public void SetSelectFunction (Gtk.TreeSelectionFunc func, IntPtr data, Gtk.DestroyNotify destroy)
{ {
SetSelectFunction (func); SelectFunction = func;
} }
public void SetSelectFunction (Gtk.TreeSelectionFunc func)
{
if (func == null) {
gtk_tree_selection_set_select_function(Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.TreeSelectionFuncWrapper func_wrapper = new GtkSharp.TreeSelectionFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (func_wrapper);
gtk_tree_selection_set_select_function(Handle, func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}

View file

@ -23,10 +23,6 @@
[Obsolete ("Replaced by SetDefaultSortFunc (TreeIterCompareFunc) overload.")] [Obsolete ("Replaced by SetDefaultSortFunc (TreeIterCompareFunc) overload.")]
void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy); void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);
void SetDefaultSortFunc (TreeIterCompareFunc sort_func);
[Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")] [Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")]
void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy); void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);
void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func);

View file

@ -331,45 +331,14 @@
return ret; return ret;
} }
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_sortable_set_sort_func(IntPtr raw, int col_id, GtkSharp.TreeIterCompareFuncNative sort_func, IntPtr user_data, NativeDestroyNotify destroy);
[Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")] [Obsolete ("Replaced by SetSortFunc (int, TreeIterCompareFunc) overload.")]
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{ {
SetSortFunc (sort_column_id, sort_func); SetSortFunc (sort_column_id, sort_func);
} }
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func) [Obsolete ("Replaced by DefaultSortFunc property.")]
{
if (sort_func == null) {
gtk_tree_sortable_set_sort_func (Handle, sort_column_id, null, IntPtr.Zero, null);
return;
}
GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper (sort_func);
GCHandle gch = GCHandle.Alloc (sort_func_wrapper);
gtk_tree_sortable_set_sort_func(Handle, sort_column_id, sort_func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_sortable_set_default_sort_func(IntPtr raw, GtkSharp.TreeIterCompareFuncNative sort_func, IntPtr user_data, NativeDestroyNotify destroy);
[Obsolete ("Replaced by SetDefaultSortFunc (TreeIterCompareFunc) overload.")]
public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy) public void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
{ {
SetDefaultSortFunc (sort_func); DefaultSortFunc = sort_func;
} }
public void SetDefaultSortFunc (TreeIterCompareFunc sort_func)
{
if (sort_func == null) {
gtk_tree_sortable_set_default_sort_func (Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper (sort_func);
GCHandle gch = GCHandle.Alloc (sort_func_wrapper);
gtk_tree_sortable_set_default_sort_func(Handle, sort_func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}

View file

@ -162,63 +162,20 @@
return InsertColumn (col, pos); return InsertColumn (col, pos);
} }
[DllImport ("libgtk-win32-2.0-0.dll")] [Obsolete ("Replaced by SearchEqualFunc property.")]
static extern void gtk_tree_view_set_search_equal_func (IntPtr raw, GtkSharp.TreeViewSearchEqualFuncNative search_equal_func, IntPtr search_user_data, NativeDestroyNotify search_destroy);
[Obsolete ("Replaced by SetSearchEqualFunc (TreeViewSearchEqualFunc) overload.")]
public void SetSearchEqualFunc (TreeViewSearchEqualFunc search_equal_func, IntPtr search_user_data, DestroyNotify search_destroy) public void SetSearchEqualFunc (TreeViewSearchEqualFunc search_equal_func, IntPtr search_user_data, DestroyNotify search_destroy)
{ {
SetSearchEqualFunc (search_equal_func); SearchEqualFunc = search_equal_func;
} }
public void SetSearchEqualFunc (TreeViewSearchEqualFunc search_equal_func) [Obsolete ("Replaced by DestroyCountFunc property.")]
{
if (search_equal_func == null) {
gtk_tree_view_set_search_equal_func (Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.TreeViewSearchEqualFuncWrapper wrapper = new GtkSharp.TreeViewSearchEqualFuncWrapper (search_equal_func);
GCHandle gch = GCHandle.Alloc (wrapper);
gtk_tree_view_set_search_equal_func (Handle, wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}
[DllImport ("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_view_set_destroy_count_func (IntPtr raw, GtkSharp.TreeDestroyCountFuncNative func, IntPtr data, NativeDestroyNotify destroy);
[Obsolete ("Replaced by SetDestroyCountFunc (TreeDestroyCountFunc) overload.")]
public void SetDestroyCountFunc (TreeDestroyCountFunc func, IntPtr data, DestroyNotify destroy) public void SetDestroyCountFunc (TreeDestroyCountFunc func, IntPtr data, DestroyNotify destroy)
{ {
SetDestroyCountFunc (func); DestroyCountFunc = func;
} }
public void SetDestroyCountFunc (TreeDestroyCountFunc func) [Obsolete ("Replaced by ColumnDragFunction property.")]
{
if (func == null) {
gtk_tree_view_set_destroy_count_func (Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.TreeDestroyCountFuncWrapper wrapper = new GtkSharp.TreeDestroyCountFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (wrapper);
gtk_tree_view_set_destroy_count_func (Handle, wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}
[DllImport ("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_view_set_column_drag_function (IntPtr raw, GtkSharp.TreeViewColumnDropFuncNative func, IntPtr user_data, NativeDestroyNotify destroy);
[Obsolete ("Replaced by SetColumnDragFunction (TreeViewColumnDropFunc) overload.")]
public void SetColumnDragFunction (TreeViewColumnDropFunc func, IntPtr user_data, DestroyNotify destroy) public void SetColumnDragFunction (TreeViewColumnDropFunc func, IntPtr user_data, DestroyNotify destroy)
{ {
SetColumnDragFunction (func); ColumnDragFunction = func;
} }
public void SetColumnDragFunction (TreeViewColumnDropFunc func)
{
if (func == null) {
gtk_tree_view_set_column_drag_function (Handle, null, IntPtr.Zero, null);
return;
}
GtkSharp.TreeViewColumnDropFuncWrapper wrapper = new GtkSharp.TreeViewColumnDropFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (wrapper);
gtk_tree_view_set_column_drag_function (Handle, wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}

View file

@ -66,36 +66,6 @@
} }
} }
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_view_column_set_cell_data_func (IntPtr raw, IntPtr cell_renderer, GtkSharp.TreeCellDataFuncNative func, IntPtr func_data, NativeDestroyNotify destroy);
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_view_column_set_cell_data_func (IntPtr raw, IntPtr cell_renderer, GtkSharp.CellLayoutDataFuncNative func, IntPtr func_data, NativeDestroyNotify destroy);
public void SetCellDataFunc (CellRenderer cell_renderer, TreeCellDataFunc func)
{
if (func == null) {
gtk_tree_view_column_set_cell_data_func (Handle, cell_renderer == null ? IntPtr.Zero : cell_renderer.Handle, (GtkSharp.TreeCellDataFuncNative) null, IntPtr.Zero, null);
return;
}
GtkSharp.TreeCellDataFuncWrapper wrapper = new GtkSharp.TreeCellDataFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (wrapper);
gtk_tree_view_column_set_cell_data_func (Handle, cell_renderer == null ? IntPtr.Zero : cell_renderer.Handle, wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}
public void SetCellDataFunc (CellRenderer cell_renderer, CellLayoutDataFunc func)
{
if (func == null) {
gtk_tree_view_column_set_cell_data_func (Handle, cell_renderer == null ? IntPtr.Zero : cell_renderer.Handle, (GtkSharp.TreeCellDataFuncNative) null, IntPtr.Zero, null);
return;
}
GtkSharp.CellLayoutDataFuncWrapper func_wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (func_wrapper);
gtk_tree_view_column_set_cell_data_func (Handle, cell_renderer == null ? IntPtr.Zero : cell_renderer.Handle, func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler);
}
public void SetCellDataFunc (CellRenderer cell_renderer, NodeCellDataFunc func) public void SetCellDataFunc (CellRenderer cell_renderer, NodeCellDataFunc func)
{ {
if (func == null) { if (func == null) {
@ -105,7 +75,7 @@
NodeCellDataFuncWrapper func_wrapper = new NodeCellDataFuncWrapper (func); NodeCellDataFuncWrapper func_wrapper = new NodeCellDataFuncWrapper (func);
GCHandle gch = GCHandle.Alloc (func_wrapper); GCHandle gch = GCHandle.Alloc (func_wrapper);
gtk_tree_view_column_set_cell_data_func (Handle, cell_renderer == null ? IntPtr.Zero : cell_renderer.Handle, func_wrapper.NativeDelegate, (IntPtr) gch, DestroyHelper.NotifyHandler); gtk_cell_layout_set_cell_data_func (Handle, cell_renderer == null ? IntPtr.Zero : cell_renderer.Handle, func_wrapper.NativeDelegate, (IntPtr) gch, new GLib.DestroyNotify (GLib.DestroyHelper.NotifyHandler));
} }
[Obsolete ("Replaced by SetCellDataFunc (CellRenderer, TreeCellDataFunc) overload")] [Obsolete ("Replaced by SetCellDataFunc (CellRenderer, TreeCellDataFunc) overload")]

25
rsvg/Handle.custom Normal file
View file

@ -0,0 +1,25 @@
// Rsvg.Handle.custom - Rsvg Handle class customizations
//
// Copyright (C) 2005 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
//
// 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 SizeCallback property")]
public void SetSizeCallback (Rsvg.SizeFunc size_func, IntPtr user_data, IntPtr user_data_destroy)
{
SizeCallback = size_func;
}

View file

@ -14,7 +14,9 @@ references = ../glib/glib-sharp.dll ../pango/pango-sharp.dll ../atk/atk-sharp.dl
sources = \ sources = \
Tool.cs Tool.cs
customs = Pixbuf.custom customs = \
Handle.custom \
Pixbuf.custom
add_dist = rsvg-sharp-2.0.pc.in add_dist = rsvg-sharp-2.0.pc.in

View file

@ -76,7 +76,7 @@ namespace GtkDemo
ListStore store = new ListStore (GLib.GType.String, GLib.GType.String, Gdk.Pixbuf.GType, GLib.GType.Boolean); ListStore store = new ListStore (GLib.GType.String, GLib.GType.String, Gdk.Pixbuf.GType, GLib.GType.Boolean);
// Set sort column and function // Set sort column and function
store.SetDefaultSortFunc (SortFunc); store.DefaultSortFunc = SortFunc;
store.SetSortColumnId (COL_DISPLAY_NAME, SortType.Ascending); store.SetSortColumnId (COL_DISPLAY_NAME, SortType.Ascending);
return store; return store;