Author: mkestner
Date: 2005-04-11 13:15:38 -0400 (Mon, 11 Apr 2005)
New Revision: 42793
Added:
trunk/gtk-sharp/gtk/Quit.custom
Modified:
trunk/gtk-sharp/ChangeLog
trunk/gtk-sharp/gtk/Gtk.metadata
trunk/gtk-sharp/gtk/TreePath.custom
Log:
2005-04-11 Mike Kestner <[EMAIL PROTECTED]>
* gtk/Quit.custom : obsolete AddFull and implement Add properly.
* gtk/TreePath.custom : add ctor (int[] indices).
* gtk/Gtk.metadata : hide Quit.Add* and some ellipsis methods that are
implemented manually already.
Modified: trunk/gtk-sharp/ChangeLog
===================================================================
--- trunk/gtk-sharp/ChangeLog 2005-04-11 16:47:54 UTC (rev 42792)
+++ trunk/gtk-sharp/ChangeLog 2005-04-11 17:15:38 UTC (rev 42793)
@@ -1,3 +1,10 @@
+2005-04-11 Mike Kestner <[EMAIL PROTECTED]>
+
+ * gtk/Quit.custom : obsolete AddFull and implement Add properly.
+ * gtk/TreePath.custom : add ctor (int[] indices).
+ * gtk/Gtk.metadata : hide Quit.Add* and some ellipsis methods that are
+ implemented manually already.
+
2005-04-08 Dan Winship <[EMAIL PROTECTED]>
* configure.in: Add an --enable-debug flag, to build .mdb files
Modified: trunk/gtk-sharp/gtk/Gtk.metadata
===================================================================
--- trunk/gtk-sharp/gtk/Gtk.metadata 2005-04-11 16:47:54 UTC (rev 42792)
+++ trunk/gtk-sharp/gtk/Gtk.metadata 2005-04-11 17:15:38 UTC (rev 42793)
@@ -24,6 +24,7 @@
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkTextIter']/[EMAIL
PROTECTED]'GetMarks']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkTextIter']/[EMAIL
PROTECTED]'GetTags']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkTextIter']/[EMAIL
PROTECTED]'GetToggledTags']" name="hidden">1</attr>
+ <attr path="/api/namespace/[EMAIL PROTECTED]'GtkTreePath']/[EMAIL
PROTECTED]'gtk_tree_path_new_from_indices']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkTreePath']/[EMAIL
PROTECTED]'GetIndices']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkItemFactoryCallback2']"
name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkModuleInitFunc']/*/[EMAIL
PROTECTED]'argv']" name="array">1</attr>
@@ -50,6 +51,8 @@
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkInit_']/[EMAIL
PROTECTED]'CheckAbiCheck']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkInit_']/[EMAIL
PROTECTED]'AbiCheck']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkInput_']/[EMAIL
PROTECTED]'AddFull']" name="hidden">1</attr>
+ <attr path="/api/namespace/[EMAIL PROTECTED]'GtkQuit_']/[EMAIL
PROTECTED]'Add']" name="hidden">1</attr>
+ <attr path="/api/namespace/[EMAIL PROTECTED]'GtkQuit_']/[EMAIL
PROTECTED]'AddFull']" name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkSignal_']"
name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkStock_']"
name="hidden">1</attr>
<attr path="/api/namespace/[EMAIL PROTECTED]'GtkTimeout_']"
name="hidden">1</attr>
Added: trunk/gtk-sharp/gtk/Quit.custom
===================================================================
--- trunk/gtk-sharp/gtk/Quit.custom 2005-04-11 16:47:54 UTC (rev 42792)
+++ trunk/gtk-sharp/gtk/Quit.custom 2005-04-11 17:15:38 UTC (rev 42793)
@@ -0,0 +1,74 @@
+// Gtk.Quit.custom - Gtk Quit 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.
+
+
+ class QuitProxy {
+
+ GtkSharp.FunctionWrapper function;
+ GtkSharp.CallbackMarshalWrapper marshal;
+ IntPtr data;
+ DestroyNotify destroy;
+ NativeDestroyNotify handler;
+
+ public QuitProxy (GtkSharp.FunctionWrapper 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;
+ }
+ }
+ }
+
+ [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);
+
+ [Obsolete ("Replaced by Add method")]
+ public static uint AddFull (uint main_level, Function function,
CallbackMarshal marshal, IntPtr data, DestroyNotify destroy)
+ {
+ GtkSharp.FunctionWrapper function_wrapper = new
GtkSharp.FunctionWrapper (function);
+ GtkSharp.CallbackMarshalWrapper marshal_wrapper = new
GtkSharp.CallbackMarshalWrapper (marshal);
+ QuitProxy proxy = new QuitProxy (function_wrapper,
marshal_wrapper, data, destroy);
+ GCHandle gch = GCHandle.Alloc (proxy);
+ return gtk_quit_add_full (main_level,
function_wrapper.NativeDelegate, marshal_wrapper.NativeDelegate, (IntPtr) gch,
proxy.Handler);
+ }
+
+ public static uint Add (uint main_level, Function function)
+ {
+ GtkSharp.FunctionWrapper function_wrapper = new
GtkSharp.FunctionWrapper (function);
+ GCHandle gch = GCHandle.Alloc (function_wrapper);
+ return gtk_quit_add_full (main_level,
function_wrapper.NativeDelegate, null, (IntPtr) gch,
DestroyHelper.NotifyHandler);
+ }
+
Modified: trunk/gtk-sharp/gtk/TreePath.custom
===================================================================
--- trunk/gtk-sharp/gtk/TreePath.custom 2005-04-11 16:47:54 UTC (rev 42792)
+++ trunk/gtk-sharp/gtk/TreePath.custom 2005-04-11 17:15:38 UTC (rev 42793)
@@ -28,3 +28,9 @@
return arr;
}
}
+
+ public TreePath (int[] indices) : this ()
+ {
+ foreach (int i in indices)
+ AppendIndex (i);
+ }
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches