summaryrefslogtreecommitdiff
path: root/src/bindings/mono/ecore_evas_mono/ecore_evas.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/mono/ecore_evas_mono/ecore_evas.cs')
-rw-r--r--src/bindings/mono/ecore_evas_mono/ecore_evas.cs38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/bindings/mono/ecore_evas_mono/ecore_evas.cs b/src/bindings/mono/ecore_evas_mono/ecore_evas.cs
deleted file mode 100644
index 68993fb..0000000
--- a/src/bindings/mono/ecore_evas_mono/ecore_evas.cs
+++ /dev/null
@@ -1,38 +0,0 @@
1#pragma warning disable 1591
2
3using System;
4using System.Runtime.InteropServices;
5using System.Threading;
6
7public class EcoreEvas
8{
9 [DllImport(efl.Libs.EcoreEvas)] static extern void ecore_evas_init();
10 // [DllImport(efl.Libs.EcoreEvas)] static extern IntPtr ecore_evas_new([MarshalAs(UnmanagedType.LPStr)] String engine_name, int x, int y, int w, int h
11 // , [MarshalAs(UnmanagedType.LPStr)] String extra_options);
12 [DllImport(efl.Libs.EcoreEvas)] static extern IntPtr ecore_evas_new(IntPtr engine_name, int x, int y, int w, int h
13 , IntPtr extra_options);
14 [DllImport(efl.Libs.EcoreEvas)] static extern IntPtr ecore_evas_get(IntPtr ecore_evas);
15 [DllImport(efl.Libs.EcoreEvas)] static extern IntPtr ecore_evas_show(IntPtr ecore_evas);
16
17 IntPtr handle;
18 public EcoreEvas()
19 {
20#if WIN32 // Not a native define, we define it in our build system
21 // Ecore_Win32 uses OleInitialize, which requires single thread apartments
22 if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA)
23 throw new InvalidOperationException("UI Applications require STAThreadAttribute in Main()");
24#endif
25 ecore_evas_init();
26 handle = ecore_evas_new(IntPtr.Zero, 0, 0, 640, 480, IntPtr.Zero);
27 if(handle == IntPtr.Zero)
28 Eina.Log.Error("Couldn't create a ecore evas");
29 ecore_evas_show(handle);
30 }
31
32 public Efl.Canvas.Object canvas
33 {
34 get { return new Efl.Canvas.Object(ecore_evas_get(handle)); }
35 }
36
37}
38