f-spot r4031 - trunk/src/Utils



Author: sdelcroix
Date: Tue Jun  3 11:29:55 2008
New Revision: 4031
URL: http://svn.gnome.org/viewvc/f-spot?rev=4031&view=rev

Log:
some more cleanup

Modified:
   trunk/src/Utils/CairoUtils.cs
   trunk/src/Utils/GdkUtils.cs

Modified: trunk/src/Utils/CairoUtils.cs
==============================================================================
--- trunk/src/Utils/CairoUtils.cs	(original)
+++ trunk/src/Utils/CairoUtils.cs	Tue Jun  3 11:29:55 2008
@@ -16,19 +16,10 @@
 	public class CairoUtils {
 		static class NativeMethods
 		{
-//	                [DllImport ("libcairo-2.dll")]
-//			public static extern void cairo_user_to_device (IntPtr cr, ref double x, ref double y);
-
 			[DllImport("libgdk-2.0-0.dll")]
 			public static extern IntPtr gdk_cairo_create (IntPtr raw);	
 		}
 		
-//		[Obsolete ("use Cairo.Context.UserToDevice instead")]
-//		static void UserToDevice (Context ctx, ref double x, ref double y)
-//		{
-//			NativeMethods.cairo_user_to_device (ctx.Handle, ref x, ref y);
-//		}
-		
 		[Obsolete ("use Gdk.CairoHelper.Create instead")]
 		public static Cairo.Context CreateContext (Gdk.Drawable drawable)
 		{

Modified: trunk/src/Utils/GdkUtils.cs
==============================================================================
--- trunk/src/Utils/GdkUtils.cs	(original)
+++ trunk/src/Utils/GdkUtils.cs	Tue Jun  3 11:29:55 2008
@@ -5,46 +5,48 @@
 namespace FSpot.Utils {
 	public class GdkUtils {
 
-		[DllImport("libgdk-2.0-0.dll")]
-		static extern uint gdk_x11_drawable_get_xid (IntPtr d);
-
-		[DllImport("libgdk-2.0-0.dll")]
-		static extern IntPtr gdk_x11_display_get_xdisplay (IntPtr d);
-
-		[DllImport("libgdk-2.0-0.dll")]
-		static extern IntPtr gdk_x11_visual_get_xvisual (IntPtr d);
-
-		[DllImport("X11")]
-		internal static extern uint XVisualIDFromVisual(IntPtr visual);
-
-		[DllImport("libgdk-2.0-0.dll")]
-		static extern IntPtr gdk_x11_screen_lookup_visual (IntPtr screen,
-								   uint   xvisualid);
-
+		class NativeMethods
+		{
+			[DllImport("libgdk-2.0-0.dll")]
+			public static extern uint gdk_x11_drawable_get_xid (IntPtr d);
+	
+			[DllImport("libgdk-2.0-0.dll")]
+			public static extern IntPtr gdk_x11_display_get_xdisplay (IntPtr d);
+	
+			[DllImport("libgdk-2.0-0.dll")]
+			public static extern IntPtr gdk_x11_visual_get_xvisual (IntPtr d);
+	
+			[DllImport("X11")]
+			public static extern uint XVisualIDFromVisual(IntPtr visual);
+	
+			[DllImport("libgdk-2.0-0.dll")]
+			public static extern IntPtr gdk_x11_screen_lookup_visual (IntPtr screen,
+									   uint   xvisualid);
+		}
 
 		public static uint GetXid (Drawable d)
 		{
-			return gdk_x11_drawable_get_xid (d.Handle);
+			return NativeMethods.gdk_x11_drawable_get_xid (d.Handle);
 		}
 
 		public static uint GetXVisualId (Visual visual)
 		{
-			return XVisualIDFromVisual (GetXVisual (visual));
+			return NativeMethods.XVisualIDFromVisual (GetXVisual (visual));
 		}
 		
 		public static IntPtr GetXDisplay (Display display)
 		{
-			return gdk_x11_display_get_xdisplay (display.Handle);
+			return NativeMethods.gdk_x11_display_get_xdisplay (display.Handle);
 		}
 		
 		public static IntPtr GetXVisual (Visual v)
 		{
-			return gdk_x11_visual_get_xvisual (v.Handle);
+			return NativeMethods.gdk_x11_visual_get_xvisual (v.Handle);
 		}
 
 		public static Visual LookupVisual (Screen screen, uint visualid)
 		{
-			return (Gdk.Visual) GLib.Object.GetObject (gdk_x11_screen_lookup_visual (screen.Handle, visualid));
+			return (Gdk.Visual) GLib.Object.GetObject (NativeMethods.gdk_x11_screen_lookup_visual (screen.Handle, visualid));
 		}
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]