From 18d96029d2a1ebabaa3627e09dacd8fd7aa2cdd0 Mon Sep 17 00:00:00 2001
From: Bertrand Lorentz <bertrand.lorentz@gmail.com>
Date: Sun, 3 Jul 2011 16:10:47 +0200
Subject: [PATCH 1/5] build: Include cairo-api.xml in the tarball

---
 cairo/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cairo/Makefile.am b/cairo/Makefile.am
index 65d49638e..40b0d4a6d 100644
--- a/cairo/Makefile.am
+++ b/cairo/Makefile.am
@@ -79,5 +79,5 @@ uninstall-local:
 	  $(GACUTIL) -u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1;			\
 	fi
 
-EXTRA_DIST = $(sources) mono.snk
+EXTRA_DIST = $(sources) cairo-api.xml mono.snk
 

From 5c98eee787a191ee7389768a3cf39a71fadde90a Mon Sep 17 00:00:00 2001
From: Bertrand Lorentz <bertrand.lorentz@gmail.com>
Date: Sun, 3 Jul 2011 16:20:21 +0200
Subject: [PATCH 2/5] build: add missing sample source in the tarball

---
 sample/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sample/Makefile.am b/sample/Makefile.am
index 0e8aa4040..cbf01c3b8 100755
--- a/sample/Makefile.am
+++ b/sample/Makefile.am
@@ -110,6 +110,7 @@ EXTRA_DIST = 				\
 	TreeModelDemo.cs		\
 	TreeViewDemo.cs			\
 	ManagedTreeViewDemo.cs		\
+	NativeInstantiationTest.cs	\
 	NodeViewDemo.cs			\
 	GExceptionTest.cs		\
 	CairoSample.cs			\

From e108bf59d46cd7a667154bc8656f644cc82160e2 Mon Sep 17 00:00:00 2001
From: Bertrand Lorentz <bertrand.lorentz@gmail.com>
Date: Sun, 3 Jul 2011 16:23:03 +0200
Subject: [PATCH 3/5] gtk: Re-enable NodeView.CreateRowDragIcon method

---
 gtk/NodeView.cs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gtk/NodeView.cs b/gtk/NodeView.cs
index cff52de07..1127a890b 100644
--- a/gtk/NodeView.cs
+++ b/gtk/NodeView.cs
@@ -74,11 +74,9 @@ namespace Gtk {
 			return CollapseRow (store.GetPath (node));
 		}
 		
-#if FIXME30
-		public Gdk.Pixmap CreateRowDragIcon (ITreeNode node) {
+		public Cairo.Surface CreateRowDragIcon (ITreeNode node) {
 			return CreateRowDragIcon (store.GetPath (node));
 		}
-#endif
 		
 		public Gdk.Rectangle GetBackgroundArea (ITreeNode node, Gtk.TreeViewColumn column) {
 			return GetBackgroundArea (store.GetPath (node), column);

From d17d94f07e915ab166122c77c8e4d30e04db2bc0 Mon Sep 17 00:00:00 2001
From: Bertrand Lorentz <bertrand.lorentz@gmail.com>
Date: Sun, 3 Jul 2011 16:28:31 +0200
Subject: [PATCH 4/5] gdk: Kill libgdksharpglue

The only remaining bits in gdk/glue were 2 obsolete functions, which
were not really used.

Also clean up Device.custom to remove obsolete bits, including
references to libgdksharpglue.
---
 configure.ac             |  1 -
 gdk/Device.custom        | 20 --------------------
 gdk/glue/Makefile.am     | 22 ----------------------
 gdk/glue/device.c        | 40 ----------------------------------------
 gdk/glue/vmglueheaders.h |  4 ----
 gdk/glue/win32dll.c      | 16 ----------------
 6 files changed, 103 deletions(-)
 delete mode 100644 gdk/glue/Makefile.am
 delete mode 100644 gdk/glue/device.c
 delete mode 100644 gdk/glue/vmglueheaders.h
 delete mode 100755 gdk/glue/win32dll.c

diff --git a/configure.ac b/configure.ac
index d84ea9f8a..0335446da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -233,7 +233,6 @@ atk/atk-sharp.dll.config
 atk/glue/Makefile
 gdk/Makefile
 gdk/gdk-sharp.dll.config
-gdk/glue/Makefile
 gtk/Makefile
 gtk/gtk-sharp-3.0.pc
 gtk/gtk-sharp.dll.config
diff --git a/gdk/Device.custom b/gdk/Device.custom
index f67891980..14de14cb3 100644
--- a/gdk/Device.custom
+++ b/gdk/Device.custom
@@ -19,26 +19,6 @@
 // Boston, MA 02111-1307, USA.
 
 
-		[DllImport("gdksharpglue-3")]
-		static extern DeviceKey gtksharp_gdk_device_get_device_key (IntPtr device, uint axis);
-
-		[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
-                static extern void gdk_device_get_state(IntPtr device, IntPtr window, double [] axes, out int maskAsInt);
-
-		
-#if FIXME30
-		public void GetState(Gdk.Window window, out double [] axes, out Gdk.ModifierType mask) {
-			int maskAsInt;
-			axes = new double [this.NumAxes];
-			gdk_device_get_state(Handle, window.Handle, axes, out maskAsInt);
- 			mask = (Gdk.ModifierType) maskAsInt;
-		}
-#endif
-
-		public Gdk.DeviceKey GetDeviceKey (uint axis) {
-			return gtksharp_gdk_device_get_device_key (Handle, axis);
-		}
-
 		[DllImport ("libgdk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
                 static extern void gdk_device_free_history(IntPtr events, int n_events);
 
diff --git a/gdk/glue/Makefile.am b/gdk/glue/Makefile.am
deleted file mode 100644
index 14e5ce971..000000000
--- a/gdk/glue/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-lib_LTLIBRARIES = libgdksharpglue-3.la
-
-libgdksharpglue_3_la_SOURCES =	\
-	device.c		\
-	vmglueheaders.h
-
-nodist_libgdksharpglue_3_la_SOURCES = generated.c
-
-# Adding a new glue file?
-
-libgdksharpglue_3_la_LDFLAGS = -module -avoid-version -no-undefined
-
-libgdksharpglue_3_la_LIBADD = $(GTK_LIBS)
-
-INCLUDES = $(GTK_CFLAGS) $(GTK_SHARP_VERSION_CFLAGS) -I$(top_srcdir)
-
-libgdksharpglue.dll: $(libgdksharpglue_3_la_OBJECTS) libgdksharpglue.rc libgdksharpglue.def
-	./build-dll libgdksharpglue-3 $(VERSION)
-
-CLEANFILES = lib*.a lib*.dll
-
-EXTRA_DIST = win32dll.c
diff --git a/gdk/glue/device.c b/gdk/glue/device.c
deleted file mode 100644
index b3de6635c..000000000
--- a/gdk/glue/device.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* device.c : Glue to access fields in GdkDevice.
- *
- * Author: Manuel V. Santos  <mvsl@telefonica.net>
- *
- * Copyright (c) Manuel V. Santos
- *
- * 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.
- */
-
-
-#include <gdk/gdk.h>
-
-/* Forward declarations */
-GdkDeviceAxis gtksharp_gdk_device_get_device_axis (GdkDevice *device, guint i);
-GdkDeviceKey gtksharp_gdk_device_get_device_key (GdkDevice *device, guint i);
-
-GdkDeviceAxis
-gtksharp_gdk_device_get_device_axis (GdkDevice *device, guint i)
-{
-	return device->axes[i];
-}
-
-GdkDeviceKey
-gtksharp_gdk_device_get_device_key (GdkDevice *device, guint i)
-{
-	return device->keys[i];
-}
-
diff --git a/gdk/glue/vmglueheaders.h b/gdk/glue/vmglueheaders.h
deleted file mode 100644
index f935e44b3..000000000
--- a/gdk/glue/vmglueheaders.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* Headers for virtual method glue compilation */
-
-#include <gdk/gdk.h>
-
diff --git a/gdk/glue/win32dll.c b/gdk/glue/win32dll.c
deleted file mode 100755
index a57c07683..000000000
--- a/gdk/glue/win32dll.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#include <stdio.h>
-
-BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-{
-	return TRUE;
-}
-
-/*
-BOOL APIENTRY DllMainCRTStartup (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-{
-	return TRUE;
-}
-*/

From 6e3ad5f7e3f4e29d631bf6bfd777f7d482f15c1b Mon Sep 17 00:00:00 2001
From: Bertrand Lorentz <bertrand.lorentz@gmail.com>
Date: Sun, 3 Jul 2011 16:35:27 +0200
Subject: [PATCH 5/5] gdk: Various fixups in Gdk.metadata

Unhide GdkDevice.GetState and hide the GdkColorInfo and GdkDeviceKey
private structs.

Specify the return types for several methods in GdkScreen, GdkDevice and
GdkDeviceManager.
---
 gdk/Gdk.metadata | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gdk/Gdk.metadata b/gdk/Gdk.metadata
index de2c0e7d9..5a96a1041 100644
--- a/gdk/Gdk.metadata
+++ b/gdk/Gdk.metadata
@@ -41,7 +41,18 @@
   <attr path="/api/namespace/object[@cname='GdkDevice']/method[@name='GetAxis']/*/*[@name='axes']" name="array">1</attr>
   <attr path="/api/namespace/object[@cname='GdkDevice']/method[@name='FreeHistory']" name="hidden">1</attr>
   <attr path="/api/namespace/object[@cname='GdkDevice']/method[@name='GetHistory']" name="hidden">1</attr>
-  <attr path="/api/namespace/object[@cname='GdkDevice']/method[@name='GetState']" name="hidden">1</attr>
+  <attr path="/api/namespace/object[@cname='GdkDevice']/method[@name='ListAxes']/return-type" name="element_type">GdkAtom*</attr>
+  <attr path="/api/namespace/object[@cname='GdkDevice']/method[@name='ListAxes']/return-type" name="owned">true</attr>
+  <attr path="/api/namespace/object[@cname='GdkDevice']/method[@name='ListAxes']/return-type" name="elements_owned">false</attr>
+  <attr path="/api/namespace/object[@cname='GdkDevice']/method[@name='ListSlaveDevices']/return-type" name="element_type">GdkDevice*</attr>
+  <attr path="/api/namespace/object[@cname='GdkDevice']/method[@name='ListSlaveDevices']/return-type" name="owned">true</attr>
+  <attr path="/api/namespace/object[@cname='GdkDevice']/method[@name='ListSlaveDevices']/return-type" name="elements_owned">false</attr>
+  <attr path="/api/namespace/object[@cname='GdkDeviceManager']/method[@name='ListDevices']/return-type" name="element_type">GdkDevice*</attr>
+  <attr path="/api/namespace/object[@cname='GdkDeviceManager']/method[@name='ListDevices']/return-type" name="owned">true</attr>
+  <attr path="/api/namespace/object[@cname='GdkDeviceManager']/method[@name='ListDevices']/return-type" name="elements_owned">false</attr>
+  <attr path="/api/namespace/object[@cname='GdkDeviceManager']/virtual_method[@name='ListDevices']/return-type" name="element_type">GdkDevice*</attr>
+  <attr path="/api/namespace/object[@cname='GdkDeviceManager']/virtual_method[@name='ListDevices']/return-type" name="owned">true</attr>
+  <attr path="/api/namespace/object[@cname='GdkDeviceManager']/virtual_method[@name='ListDevices']/return-type" name="elements_owned">false</attr>
   <attr path="/api/namespace/object[@cname='GdkDisplay']/method[@name='GetPointer']" name="hidden">1</attr>
   <attr path="/api/namespace/object[@cname='GdkDisplay']/method[@name='ListDevices']" name="hidden">1</attr>
   <attr path="/api/namespace/object[@cname='GdkDisplay']/method[@name='SupportsComposite']" name="name">GetSupportsComposite</attr>
@@ -87,6 +98,9 @@
   <attr path="/api/namespace/object[@cname='GdkScreen']/method[@name='GetWindowStack']/return-type" name="owned">true</attr>
   <attr path="/api/namespace/object[@cname='GdkScreen']/method[@name='GetWindowStack']/return-type" name="elements_owned">true</attr>
   <attr path="/api/namespace/object[@cname='GdkScreen']/property[@name='FontOptions']" name="hidden">1</attr>
+  <attr path="/api/namespace/object[@cname='GdkScreen']/virtual_method[@name='GetWindowStack']/return-type" name="element_type">GdkWindow*</attr>
+  <attr path="/api/namespace/object[@cname='GdkScreen']/virtual_method[@name='GetWindowStack']/return-type" name="owned">true</attr>
+  <attr path="/api/namespace/object[@cname='GdkScreen']/virtual_method[@name='GetWindowStack']/return-type" name="elements_owned">true</attr>
   <attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='AddFilter']" name="hidden">1</attr>
   <attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='Destroy']" name="hidden">1</attr>
   <attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='FreezeToplevelUpdatesLibgtkOnly']" name="hidden">1</attr>
@@ -104,6 +118,8 @@
   <attr path="/api/namespace/object[@cname='GdkWindow']/method[@cname='gdk_window_set_user_data']" name="hidden">1</attr>
   <attr path="/api/namespace/struct[@cname='GdkAtom']/method[@name='Name']" name="name">GetName</attr>
   <attr path="/api/namespace/struct[@cname='GdkAtom']/method[@name='InternStaticString']" name="hidden">1</attr>
+  <attr path="/api/namespace/struct[@cname='GdkColorInfo']" name="hidden">1</attr>
+  <attr path="/api/namespace/struct[@cname='GdkDeviceKey']" name="hidden">1</attr>
   <attr path="/api/namespace/struct[@cname='GdkEventAny']" name="hidden">1</attr>
   <attr path="/api/namespace/struct[@cname='GdkEventButton']" name="hidden">1</attr>
   <attr path="/api/namespace/struct[@cname='GdkEventConfigure']" name="hidden">1</attr>