summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ElmSharp/ElmSharp.Net45.csproj1
-rw-r--r--ElmSharp/ElmSharp.csproj1
-rw-r--r--ElmSharp/ElmSharp/EcoreMainloop.cs3
-rw-r--r--ElmSharp/Interop/Interop.Eina.cs19
-rw-r--r--packaging/elm-sharp.spec2
5 files changed, 24 insertions, 2 deletions
diff --git a/ElmSharp/ElmSharp.Net45.csproj b/ElmSharp/ElmSharp.Net45.csproj
index 4da7745..6bc1650 100644
--- a/ElmSharp/ElmSharp.Net45.csproj
+++ b/ElmSharp/ElmSharp.Net45.csproj
@@ -113,6 +113,7 @@
<Compile Include="ElmSharp\Window.cs" />
<Compile Include="ElmSharp\WrapType.cs" />
<Compile Include="Interop\Interop.Ecore.cs" />
+ <Compile Include="Interop\Interop.Eina.cs" />
<Compile Include="Interop\Interop.Elementary.Bg.cs" />
<Compile Include="Interop\Interop.Elementary.Box.cs" />
<Compile Include="Interop\Interop.Elementary.Button.cs" />
diff --git a/ElmSharp/ElmSharp.csproj b/ElmSharp/ElmSharp.csproj
index 848a2e1..df61891 100644
--- a/ElmSharp/ElmSharp.csproj
+++ b/ElmSharp/ElmSharp.csproj
@@ -109,6 +109,7 @@
<Compile Include="ElmSharp\Widget.cs" />
<Compile Include="ElmSharp\Window.cs" />
<Compile Include="ElmSharp\WrapType.cs" />
+ <Compile Include="Interop\Interop.Eina.cs" />
<Compile Include="Interop\Interop.Eo.cs" />
<Compile Include="Interop\Interop.Ecore.cs" />
<Compile Include="Interop\Interop.Elementary.Bg.cs" />
diff --git a/ElmSharp/ElmSharp/EcoreMainloop.cs b/ElmSharp/ElmSharp/EcoreMainloop.cs
index 048442d..1aabdcb 100644
--- a/ElmSharp/ElmSharp/EcoreMainloop.cs
+++ b/ElmSharp/ElmSharp/EcoreMainloop.cs
@@ -9,7 +9,6 @@ namespace ElmSharp
static readonly Object _taskLock = new Object();
static int _newTaskId = 0;
-
static Interop.Ecore.EcoreTaskCallback _nativeHandler;
static EcoreMainloop()
@@ -19,6 +18,8 @@ namespace ElmSharp
_nativeHandler = NativeHandler;
}
+ public static bool IsMainThread => Interop.Eina.eina_main_loop_is();
+
public static void Begin()
{
Interop.Ecore.ecore_main_loop_begin();
diff --git a/ElmSharp/Interop/Interop.Eina.cs b/ElmSharp/Interop/Interop.Eina.cs
new file mode 100644
index 0000000..107d4c3
--- /dev/null
+++ b/ElmSharp/Interop/Interop.Eina.cs
@@ -0,0 +1,19 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+using System.Runtime.InteropServices;
+
+internal static partial class Interop
+{
+ internal static partial class Eina
+ {
+ [DllImport(Libraries.Eina)]
+ internal static extern bool eina_main_loop_is();
+ }
+}
diff --git a/packaging/elm-sharp.spec b/packaging/elm-sharp.spec
index 34587e6..e05a391 100644
--- a/packaging/elm-sharp.spec
+++ b/packaging/elm-sharp.spec
@@ -8,7 +8,7 @@
Name: elm-sharp
Summary: C# Binding for Elementary
-Version: 1.0.9
+Version: 1.0.10
Release: 1
Group: Development/Libraries
License: Apache-2.0