Author: mkestner
Date: 2005-04-06 11:47:17 -0400 (Wed, 06 Apr 2005)
New Revision: 42611
Added:
trunk/gtk-sharp/gtk/FileFilter.custom
Modified:
trunk/gtk-sharp/ChangeLog
trunk/gtk-sharp/doc/en/Gtk/FileFilter.xml
trunk/gtk-sharp/gtk/Gtk.metadata
trunk/gtk-sharp/gtk/Makefile.am
Log:
2005-04-06 Mike Kestner <[EMAIL PROTECTED]>
* gtk/FileFilter.custom : AddCustom delegate is destroy notified.
* gtk/Gtk.metadata : hide FileFilter.AddCustom. hide
gtk_object_get|set.
Modified: trunk/gtk-sharp/ChangeLog
===================================================================
--- trunk/gtk-sharp/ChangeLog 2005-04-06 14:53:03 UTC (rev 42610)
+++ trunk/gtk-sharp/ChangeLog 2005-04-06 15:47:17 UTC (rev 42611)
@@ -1,3 +1,8 @@
+2005-04-06 Mike Kestner <[EMAIL PROTECTED]>
+
+ * gtk/FileFilter.custom : AddCustom delegate is destroy notified.
+ * gtk/Gtk.metadata : hide FileFilter.AddCustom. hide
gtk_object_get|set.
+
2005-04-05 Mike Kestner <[EMAIL PROTECTED]>
* gtk/*.custom : persistent delegates for most of the remaining
Modified: trunk/gtk-sharp/doc/en/Gtk/FileFilter.xml
===================================================================
--- trunk/gtk-sharp/doc/en/Gtk/FileFilter.xml 2005-04-06 14:53:03 UTC (rev
42610)
+++ trunk/gtk-sharp/doc/en/Gtk/FileFilter.xml 2005-04-06 15:47:17 UTC (rev
42611)
@@ -186,7 +186,7 @@
</Docs>
</Member>
<Member MemberName="AddCustom">
- <MemberSignature Language="C#" Value="public void AddCustom
(Gtk.FileFilterFlags needed, Gtk.FileFilterFunc func, IntPtr data, IntPtr
notify);" />
+ <MemberSignature Language="C#" Value="public void AddCustom
(Gtk.FileFilterFlags needed, Gtk.FileFilterFunc func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
@@ -194,17 +194,11 @@
<Parameters>
<Parameter Name="needed" Type="Gtk.FileFilterFlags" />
<Parameter Name="func" Type="Gtk.FileFilterFunc" />
- <Parameter Name="data" Type="System.IntPtr" />
- <Parameter Name="notify" Type="System.IntPtr" />
</Parameters>
<Docs>
- <summary>
- Adds a rule to a filter that allows files based on a custom callback
function.
- </summary>
+ <summary>Adds a rule to a filter that allows files based on a custom
callback function.</summary>
<param name="needed">a <see cref="T:System.Int32" /></param>
<param name="func">a <see cref="T:Gtk.FileFilterFunc" /></param>
- <param name="data">a <see cref="T:System.IntPtr" /></param>
- <param name="notify">a <see cref="T:System.IntPtr" /></param>
<remarks>
The bitfield <paramref name="needed" /> which is passed in provides
information
about what sorts of information that the filter function needs;
@@ -214,4 +208,4 @@
</Docs>
</Member>
</Members>
-</Type>
\ No newline at end of file
+</Type>
Added: trunk/gtk-sharp/gtk/FileFilter.custom
===================================================================
--- trunk/gtk-sharp/gtk/FileFilter.custom 2005-04-06 14:53:03 UTC (rev
42610)
+++ trunk/gtk-sharp/gtk/FileFilter.custom 2005-04-06 15:47:17 UTC (rev
42611)
@@ -0,0 +1,35 @@
+// Gtk.FileFilter.custom - Gtk FileFilter class customizations
+//
+// Author: Mike Kestner <[EMAIL PROTECTED]>
+//
+// 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);
+ }
+
Modified: trunk/gtk-sharp/gtk/Gtk.metadata
===================================================================
--- trunk/gtk-sharp/gtk/Gtk.metadata 2005-04-06 14:53:03 UTC (rev 42610)
+++ trunk/gtk-sharp/gtk/Gtk.metadata 2005-04-06 15:47:17 UTC (rev 42611)
@@ -204,6 +204,7 @@
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkExpander']/[EMAIL
PROTECTED]'gtk_expander_new_with_mnemonic']" name="preferred">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkFileChooserDialog']/[EMAIL
PROTECTED]'gtk_file_chooser_dialog_new']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkFileChooserDialog']/[EMAIL
PROTECTED]'gtk_file_chooser_dialog_new_with_backend']" name="hidden">1</attr>
+ <attr path="/api/namespace/[EMAIL PROTECTED]'GtkFileFilter']/[EMAIL
PROTECTED]'AddCustom']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkFileSelection']/[EMAIL
PROTECTED]'GetSelections']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkFilePath']"
name="parent">GObject</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkExpander']/[EMAIL
PROTECTED]'Activate']" name="name">Activated</attr>
@@ -270,6 +271,8 @@
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkMessageDialog']/[EMAIL
PROTECTED]'gtk_message_dialog_new_with_markup']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkObject']/[EMAIL
PROTECTED]'gtk_object_new']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkObject']/[EMAIL
PROTECTED]'Destroy']" name="hidden">1</attr>
+ <attr path="/api/namespace/[EMAIL PROTECTED]'GtkObject']/[EMAIL
PROTECTED]'Get']" name="hidden">1</attr>
+ <attr path="/api/namespace/[EMAIL PROTECTED]'GtkObject']/[EMAIL
PROTECTED]'Set']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkObject']/[EMAIL
PROTECTED]'Destroy']" name="name">Destroyed</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkPlug']/[EMAIL
PROTECTED]'gtk_plug_new']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkPlug']/[EMAIL
PROTECTED]'gtk_plug_new_for_display']" name="hidden">1</attr>
Modified: trunk/gtk-sharp/gtk/Makefile.am
===================================================================
--- trunk/gtk-sharp/gtk/Makefile.am 2005-04-06 14:53:03 UTC (rev 42610)
+++ trunk/gtk-sharp/gtk/Makefile.am 2005-04-06 15:47:17 UTC (rev 42611)
@@ -53,6 +53,7 @@
EntryCompletion.custom \
FileChooserDialog.custom \
FileChooserWidget.custom \
+ FileFilter.custom \
FileSelection.custom \
FileSystemModel.custom \
Frame.custom \
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches