mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-02-02 14:20:58 +00:00
2005-04-05 Mike Kestner <mkestner@novell.com>
* gtk/*.custom : persistent delegates for most of the remaining "interesting" methods. svn path=/trunk/gtk-sharp/; revision=42581
This commit is contained in:
parent
249a13fc82
commit
f695e74bd6
|
@ -1,3 +1,8 @@
|
|||
2005-04-05 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gtk/*.custom : persistent delegates for most of the remaining
|
||||
"interesting" methods.
|
||||
|
||||
2005-04-05 Dan Winship <danw@novell.com>
|
||||
|
||||
* gdk/PixbufLoader.custom: Fix the new constructors to make sure
|
||||
|
|
|
@ -50,25 +50,6 @@ Accelerators are handled by the Gtk accelerator map. All actions are assigned an
|
|||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="SetTranslateFunc">
|
||||
<MemberSignature Language="C#" Value="public void SetTranslateFunc (Gtk.TranslateFunc func, IntPtr data, Gtk.DestroyNotify notify);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Void</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="func" Type="Gtk.TranslateFunc" />
|
||||
<Parameter Name="data" Type="System.IntPtr" />
|
||||
<Parameter Name="notify" Type="Gtk.DestroyNotify" />
|
||||
</Parameters>
|
||||
<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>
|
||||
<param name="func">a <see cref="T:Gtk.TranslateFunc" /></param>
|
||||
<param name="data">a <see cref="T:System.IntPtr" /></param>
|
||||
<param name="notify">a <see cref="T:Gtk.DestroyNotify" /></param>
|
||||
<remarks>If you are using gettext(), it is enough to set the translation domain with <see cref="P:Gtk.ActionGroup.TranslationDomain" />.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Remove">
|
||||
<MemberSignature Language="C#" Value="public void Remove (Gtk.Action action);" />
|
||||
<MemberType>Method</MemberType>
|
||||
|
@ -441,5 +422,20 @@ 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>
|
||||
</Docs>
|
||||
</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 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>
|
||||
<remarks>If you are using gettext(), it is enough to set the translation domain with <see cref="P:Gtk.ActionGroup.TranslationDomain" />.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
</Type>
|
||||
|
|
|
@ -451,30 +451,6 @@ public class DemoEntryCompletion : Window
|
|||
<remarks />
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="SetMatchFunc">
|
||||
<MemberSignature Language="C#" Value="public void SetMatchFunc (Gtk.EntryCompletionMatchFunc func, IntPtr func_data, IntPtr func_notify);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Void</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="func" Type="Gtk.EntryCompletionMatchFunc" />
|
||||
<Parameter Name="func_data" Type="System.IntPtr" />
|
||||
<Parameter Name="func_notify" Type="System.IntPtr" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>
|
||||
Sets the match function for this entry completion to be <paramref name="func" />.
|
||||
</summary>
|
||||
<param name="func">a <see cref="T:Gtk.EntryCompletionMatchFunc" /></param>
|
||||
<param name="func_data">a <see cref="T:System.IntPtr" /></param>
|
||||
<param name="func_notify">a <see cref="T:System.IntPtr" /></param>
|
||||
<remarks>
|
||||
The match function is used to determine if a row should or
|
||||
should not be in the completion list.
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="SetCellDataFunc">
|
||||
<MemberSignature Language="C#" Value="public virtual void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func);" />
|
||||
<MemberType>Method</MemberType>
|
||||
|
@ -523,7 +499,22 @@ public class DemoEntryCompletion : Window
|
|||
<summary>Sets the attribute to model column bindings for a renderer.</summary>
|
||||
<param name="cell">a <see cref="T:Gtk.CellRenderer" /></param>
|
||||
<param name="attrs">a <see cref="T:System.Object" /></param>
|
||||
<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>
|
||||
</Member>
|
||||
<Member MemberName="SetMatchFunc">
|
||||
<MemberSignature Language="C#" Value="public void SetMatchFunc (Gtk.EntryCompletionMatchFunc func);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Void</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="func" Type="Gtk.EntryCompletionMatchFunc" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Sets the matching function.</summary>
|
||||
<param name="func">a <see cref="T:Gtk.EntryCompletionMatchFunc" /></param>
|
||||
<remarks>The match function is used to determine if a row should or should not be in the completion list.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
<summary>A factory for menus.</summary>
|
||||
<remarks>
|
||||
To use this class, make an array of
|
||||
<see cref="T:Gtk.MenuEntry"/> objects which describe a menu, then invoke
|
||||
<see cref="M:Gtk.ItemFactory.CreateMenuEntries"/> to generate the menu.
|
||||
<see cref="T:Gtk.MenuEntry" /> objects which describe a menu, then invoke
|
||||
<see cref="M:Gtk.ItemFactory.CreateMenuEntries" /> to generate the menu.
|
||||
</remarks>
|
||||
</Docs>
|
||||
<Base>
|
||||
|
@ -304,9 +304,9 @@
|
|||
<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 traslate path elements.</param>
|
||||
<param name="data">Data to pass to <paramref name="func" /> and <paramref name="notify" />.</param>
|
||||
<param name="notify">A <see cref="T:Gtk.DestroyNotify" /> delegate to be called when the <see cref="T:Gtk.ItemFactory" /> object is destroyed and when the translation is changed again.</param>
|
||||
<remarks />
|
||||
<param name="data">ignored</param>
|
||||
<param name="notify">ignored</param>
|
||||
<remarks>This overload is obsolete. New code should use the single parameter overload instead. </remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Finalize">
|
||||
|
@ -492,12 +492,13 @@
|
|||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Finds an item factory which has been constructed using the
|
||||
"<name>" prefix of <paramref name="path"/> as the path argument
|
||||
"<name>" prefix of <paramref name="path" /> as the path argument
|
||||
building a new item factory.
|
||||
</summary>
|
||||
<param name="path">a <see cref="T:System.String" /></param>
|
||||
<returns>a <see cref="T:Gtk.ItemFactory" />, or <see langword="null"/></returns>
|
||||
<remarks></remarks>
|
||||
<returns>a <see cref="T:Gtk.ItemFactory" />, or <see langword="null" /></returns>
|
||||
<remarks>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="CreateMenuEntries">
|
||||
|
@ -514,7 +515,8 @@
|
|||
<summary>Creates menu items from a set of entries.</summary>
|
||||
<param name="n_entries">a <see cref="T:System.UInt32" />, the number of entries</param>
|
||||
<param name="entries">an array of <see cref="T:Gtk.MenuEntry" /> objects</param>
|
||||
<remarks></remarks>
|
||||
<remarks>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="CreateItemsAc">
|
||||
|
@ -539,5 +541,20 @@
|
|||
<remarks>FIXME: See bugzilla 70887.</remarks>
|
||||
</Docs>
|
||||
</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>
|
||||
</Type>
|
||||
|
|
|
@ -299,11 +299,9 @@ class TreeSelectionSample
|
|||
<Docs>
|
||||
<summary>Add a hook into selection and unselection.</summary>
|
||||
<param name="func">A delegate to invoke before a node is (un)selected.</param>
|
||||
<param name="data">Raw data to pass to <paramref name="func" /> when it is called.</param>
|
||||
<param name="destroy">A delegate to be notified when <paramref name="data" /> should be destroyed. Can be <see langword="null" />.</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>
|
||||
<param name="data">ignored</param>
|
||||
<param name="destroy">ignored</param>
|
||||
<remarks>This overload is obsolete. New code should use the single parameter overload.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="SelectIter">
|
||||
|
@ -540,5 +538,22 @@ class TreeSelectionSample
|
|||
<remarks />
|
||||
</Docs>
|
||||
</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>
|
||||
</Type>
|
||||
|
|
|
@ -275,9 +275,9 @@ For a example how to handle selection events see <see cref="T:Gtk.TreeSelection"
|
|||
<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>
|
||||
<param name="user_data">an object of type <see cref="T:System.IntPtr" /></param>
|
||||
<param name="destroy">an object of type <see cref="T:Gtk.DestroyNotify" /></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>
|
||||
<param name="user_data">ignored</param>
|
||||
<param name="destroy">ignored</param>
|
||||
<remarks>This overload is obsolete. New code should use the single parameter overload.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="ScrollToCell">
|
||||
|
@ -460,8 +460,8 @@ For a example how to handle selection events see <see cref="T:Gtk.TreeSelection"
|
|||
<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>
|
||||
<param name="data">an object of type <see cref="T:System.IntPtr" /></param>
|
||||
<param name="destroy">an object of type <see cref="T:Gtk.DestroyNotify" /></param>
|
||||
<param name="data">ignored</param>
|
||||
<param name="destroy">ignored</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>
|
||||
|
@ -478,11 +478,10 @@ For a example how to handle selection events see <see cref="T:Gtk.TreeSelection"
|
|||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Sets the compare function for the interactive search capabilities.</summary>
|
||||
<param name="path">The <see cref="T:Gtk.TreePath" /> representing the node</param>
|
||||
<param name="search_user_data">an object of type <see cref="T:System.IntPtr" /></param>
|
||||
<param name="search_destroy">an object of type <see cref="T:Gtk.DestroyNotify" /></param>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="search_equal_func">The <see cref="T:Gtk.TreeViewSearchEqualFunc" /> to invoke.</param>
|
||||
<param name="search_user_data">ignored</param>
|
||||
<param name="search_destroy">ignored</param>
|
||||
<remarks>This overload is obsolete. New code should use the single parameter overload.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="UnsetRowsDragDest">
|
||||
|
@ -1830,5 +1829,52 @@ 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>
|
||||
</Docs>
|
||||
</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>
|
||||
</Members>
|
||||
</Type>
|
||||
</Type>
|
||||
|
|
|
@ -84,3 +84,17 @@
|
|||
result [i] = list [i] as Gtk.Action;
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
}
|
||||
|
||||
[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);
|
||||
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)
|
||||
{
|
||||
|
@ -47,3 +47,18 @@
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,8 +49,10 @@
|
|||
<attr path="/api/namespace/class[@cname='GtkInit_']/method[@name='Check']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GtkInit_']/method[@name='CheckAbiCheck']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GtkInit_']/method[@name='AbiCheck']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GtkInput_']/method[@name='AddFull']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GtkSignal_']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GtkStock_']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GtkTimeout_']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GtkTree_']/method[@name='GetRowDragData']/*/*[@name='tree_model']" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/class[@cname='GtkTree_']/method[@name='GetRowDragData']/*/*[@name='path']" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/class[@cname='GtkType_']" name="hidden">1</attr>
|
||||
|
@ -122,6 +124,7 @@
|
|||
<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='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='p0']" name="name">action</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkActionGroup']/signal[@name='ConnectProxy']/*/*[@name='p1']" name="name">proxy</attr>
|
||||
|
@ -197,6 +200,7 @@
|
|||
<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='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='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_with_backend']" name="hidden">1</attr>
|
||||
|
@ -229,6 +233,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']/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='SetTranslateFunc']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkItem']/signal[@name='Deselect']" name="name">Deselected</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkItem']/signal[@name='Select']" name="name">Selected</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkItem']/signal[@name='Toggle']" name="name">Toggled</attr>
|
||||
|
@ -243,6 +248,7 @@
|
|||
<attr path="/api/namespace/object[@cname='GtkListStore']/method[@name='Insert']/*/*[@name='iter']" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkListStore']/method[@name='Prepend']/*/*[@name='iter']" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkListStore']/method[@name='Remove']/*/*[@name='iter']" name="pass_as">ref</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkListStore']/method[@name='Set']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkListStore']/method[@name='SetColumnTypes']/*/*[@name='types']" name="array">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkMenuItem']/constructor[@cname='gtk_menu_item_new_with_mnemonic']" name="preferred">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkMenuItem']/constructor[@cname='gtk_menu_item_new_with_mnemonic']" name="hidden">1</attr>
|
||||
|
@ -359,6 +365,7 @@
|
|||
<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='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_newv']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Append']" name="hidden">1</attr>
|
||||
|
@ -367,6 +374,7 @@
|
|||
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Insert']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Prepend']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Remove']/*/*[@name='iter']" name="pass_as">ref</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Set']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='SetColumnTypes']/*/*[@name='types']" name="array">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/constructor[@cname='gtk_tree_view_column_new_with_attributes']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/method[@name='AddAttribute']" name="hidden">1</attr>
|
||||
|
@ -396,6 +404,9 @@
|
|||
<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='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='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>
|
||||
|
|
90
gtk/Input.custom
Normal file
90
gtk/Input.custom
Normal file
|
@ -0,0 +1,90 @@
|
|||
// Gtk.Input.custom - Gtk Input 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 uint gtk_input_add_full(int source, int condition, InputFunctionNative function, GtkSharp.CallbackMarshalNative marshal, IntPtr data, NativeDestroyNotify destroy);
|
||||
|
||||
[GLib.CDeclCallback]
|
||||
delegate void InputFunctionNative(IntPtr data, int source, int condition);
|
||||
|
||||
class InputFunctionWrapper {
|
||||
|
||||
public void NativeCallback (IntPtr data, int source, int condition)
|
||||
{
|
||||
IntPtr _arg0 = data;
|
||||
int _arg1 = source;
|
||||
Gdk.InputCondition _arg2 = (Gdk.InputCondition) condition;
|
||||
managed ( _arg0, _arg1, _arg2);
|
||||
}
|
||||
|
||||
internal InputFunctionNative NativeDelegate;
|
||||
Gdk.InputFunction managed;
|
||||
|
||||
public InputFunctionWrapper (Gdk.InputFunction managed)
|
||||
{
|
||||
this.managed = managed;
|
||||
if (managed != null)
|
||||
NativeDelegate = new InputFunctionNative (NativeCallback);
|
||||
}
|
||||
}
|
||||
|
||||
class InputProxy {
|
||||
|
||||
InputFunctionWrapper function;
|
||||
GtkSharp.CallbackMarshalWrapper marshal;
|
||||
IntPtr data;
|
||||
DestroyNotify destroy;
|
||||
NativeDestroyNotify handler;
|
||||
|
||||
public InputProxy (InputFunctionWrapper function, GtkSharp.CallbackMarshalWrapper marshal, IntPtr data, DestroyNotify destroy)
|
||||
{
|
||||
this.marshal = marshal;
|
||||
this.function = function;
|
||||
this.destroy = destroy;
|
||||
this.data = data;
|
||||
handler = new NativeDestroyNotify (OnDestroy);
|
||||
}
|
||||
|
||||
void OnDestroy (IntPtr data)
|
||||
{
|
||||
if (destroy != null)
|
||||
destroy ();
|
||||
|
||||
GCHandle gch = (GCHandle) data;
|
||||
gch.Free ();
|
||||
}
|
||||
|
||||
public NativeDestroyNotify Handler {
|
||||
get {
|
||||
return handler;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public static uint AddFull(int source, Gdk.InputCondition condition, Gdk.InputFunction function, Gtk.CallbackMarshal marshal, IntPtr data, Gtk.DestroyNotify destroy) {
|
||||
InputFunctionWrapper function_wrapper = new InputFunctionWrapper (function);
|
||||
GtkSharp.CallbackMarshalWrapper marshal_wrapper = new GtkSharp.CallbackMarshalWrapper (marshal);
|
||||
InputProxy proxy = new InputProxy (function_wrapper, marshal_wrapper, data, destroy);
|
||||
GCHandle gch = GCHandle.Alloc (proxy);
|
||||
return gtk_input_add_full (source, (int) condition, function_wrapper.NativeDelegate, marshal_wrapper.NativeDelegate, (IntPtr) gch, proxy.Handler);
|
||||
}
|
||||
|
|
@ -36,3 +36,23 @@
|
|||
GLib.Marshaller.Free (native);
|
||||
}
|
||||
|
||||
[DllImport ("libgtk-win32-2.0-0.dll")]
|
||||
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)
|
||||
{
|
||||
SetTranslateFunc (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);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ sources = \
|
|||
StockManager.cs \
|
||||
ThreadNotify.cs \
|
||||
ToggleActionEntry.cs \
|
||||
Timeout.cs \
|
||||
TreeNodeAttribute.cs \
|
||||
TreeNode.cs \
|
||||
TreeNodeValueAttribute.cs
|
||||
|
@ -63,6 +64,7 @@ customs = \
|
|||
Image.custom \
|
||||
ImageMenuItem.custom \
|
||||
Init.custom \
|
||||
Input.custom \
|
||||
InputDialog.custom \
|
||||
ItemFactory.custom \
|
||||
Label.custom \
|
||||
|
|
74
gtk/Timeout.cs
Normal file
74
gtk/Timeout.cs
Normal file
|
@ -0,0 +1,74 @@
|
|||
// Gtk.Timeout.cs - Gtk Timeout implementation.
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2005 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the Lesser GNU General
|
||||
// Public License as published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this program; if not, write to the
|
||||
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
// Boston, MA 02111-1307, USA.
|
||||
|
||||
namespace Gtk {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[Obsolete ("Replaced by GLib.Timeout")]
|
||||
public class Timeout {
|
||||
|
||||
[Obsolete ("Replaced by GLib.Source.Remove")]
|
||||
public static void Remove (uint timeout_handler_id)
|
||||
{
|
||||
GLib.Source.Remove (timeout_handler_id);
|
||||
}
|
||||
|
||||
[Obsolete ("Replaced by GLib.Timeout.Add")]
|
||||
public static uint AddFull (uint interval, Gtk.Function function, Gtk.CallbackMarshal marshal, IntPtr data, Gtk.DestroyNotify destroy)
|
||||
{
|
||||
if (marshal != null || destroy != null)
|
||||
Console.WriteLine ("marshal, data, and destroy parameters ignored by Gtk.Timeout.AddFull ().");
|
||||
return Add (interval, function);
|
||||
}
|
||||
|
||||
class GTimeoutProxy {
|
||||
|
||||
GLib.TimeoutHandler handler;
|
||||
Function function;
|
||||
|
||||
public GTimeoutProxy (Gtk.Function function)
|
||||
{
|
||||
this.function = function;
|
||||
handler = new GLib.TimeoutHandler (Invoke);
|
||||
}
|
||||
|
||||
public GLib.TimeoutHandler Handler {
|
||||
get {
|
||||
return handler;
|
||||
}
|
||||
}
|
||||
|
||||
bool Invoke ()
|
||||
{
|
||||
return function ();
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete ("Replaced by GLib.Timeout.Add")]
|
||||
public static uint Add (uint interval, Gtk.Function function)
|
||||
{
|
||||
GTimeoutProxy proxy = new GTimeoutProxy (function);
|
||||
return GLib.Timeout.Add (interval, proxy.Handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -53,3 +53,23 @@
|
|||
return result;
|
||||
}
|
||||
|
||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||
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)
|
||||
{
|
||||
SetSelectFunction (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);
|
||||
}
|
||||
|
||||
|
|
|
@ -162,3 +162,63 @@
|
|||
return InsertColumn (col, pos);
|
||||
}
|
||||
|
||||
[DllImport ("libgtk-win32-2.0-0.dll")]
|
||||
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)
|
||||
{
|
||||
SetSearchEqualFunc (search_equal_func);
|
||||
}
|
||||
|
||||
public void SetSearchEqualFunc (TreeViewSearchEqualFunc search_equal_func)
|
||||
{
|
||||
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)
|
||||
{
|
||||
SetDestroyCountFunc (func);
|
||||
}
|
||||
|
||||
public void SetDestroyCountFunc (TreeDestroyCountFunc func)
|
||||
{
|
||||
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)
|
||||
{
|
||||
SetColumnDragFunction (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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue