Author: miguel
Date: 2007-06-04 01:58:18 -0400 (Mon, 04 Jun 2007)
New Revision: 78529
Added:
trunk/moon/test/
trunk/moon/test/Makefile
trunk/moon/test/demo.cs
Log:
Sample test bed for starting the C# binding
Added: trunk/moon/test/Makefile
===================================================================
--- trunk/moon/test/Makefile 2007-06-04 05:21:45 UTC (rev 78528)
+++ trunk/moon/test/Makefile 2007-06-04 05:58:18 UTC (rev 78529)
@@ -0,0 +1,2 @@
+demo.exe: demo.cs
+ gmcs demo.cs -pkg:gtk-sharp-2.0
\ No newline at end of file
Property changes on: trunk/moon/test/Makefile
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/moon/test/demo.cs
===================================================================
--- trunk/moon/test/demo.cs 2007-06-04 05:21:45 UTC (rev 78528)
+++ trunk/moon/test/demo.cs 2007-06-04 05:58:18 UTC (rev 78529)
@@ -0,0 +1,26 @@
+using System;
+using System.Runtime.InteropServices;
+using Gtk;
+
+class X {
+ [DllImport ("moon")]
+ extern static IntPtr surface_new (int w, int h);
+
+ [DllImport ("moon")]
+ extern static IntPtr surface_get_drawing_area (IntPtr surface);
+
+ static void Main ()
+ {
+ Application.Init ();
+
+ IntPtr surface = surface_new (400, 400);
+
+ Window w = new Window ("Top");
+ DrawingArea da = new DrawingArea (surface_get_drawing_area
(surface));
+
+ w.Add (da);
+ w.ShowAll ();
+
+ Application.Run ();
+ }
+}
Property changes on: trunk/moon/test/demo.cs
___________________________________________________________________
Name: svn:eol-style
+ native
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches