From f3de6f07dd4c655dcc475a29efaeb26ff1177f0d Mon Sep 17 00:00:00 2001 From: Hobum Kwon Date: Thu, 19 Jan 2017 07:47:54 +0900 Subject: [PATCH] Add native FloatingButton for floating button enabled content page Change-Id: I9e904ae0677457885d693b90865316ae1dc206a6 --- ElmSharp/ElmSharp.csproj | 2 ++ ElmSharp/ElmSharp/FloatingButton.cs | 32 ++++++++++++++++++++++ .../Interop/Interop.Elementary.FloatingButton.cs | 27 ++++++++++++++++++ ElmSharp/Interop/Interop.Libraries.cs | 1 + 4 files changed, 62 insertions(+) mode change 100644 => 100755 ElmSharp/ElmSharp.csproj create mode 100755 ElmSharp/ElmSharp/FloatingButton.cs create mode 100755 ElmSharp/Interop/Interop.Elementary.FloatingButton.cs mode change 100644 => 100755 ElmSharp/Interop/Interop.Libraries.cs diff --git a/ElmSharp/ElmSharp.csproj b/ElmSharp/ElmSharp.csproj old mode 100644 new mode 100755 index f11e9a8..463f68a --- a/ElmSharp/ElmSharp.csproj +++ b/ElmSharp/ElmSharp.csproj @@ -71,6 +71,7 @@ + @@ -123,6 +124,7 @@ + diff --git a/ElmSharp/ElmSharp/FloatingButton.cs b/ElmSharp/ElmSharp/FloatingButton.cs new file mode 100755 index 0000000..cd76e36 --- /dev/null +++ b/ElmSharp/ElmSharp/FloatingButton.cs @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; + +namespace ElmSharp +{ + public class FloatingButton : Layout + { + public FloatingButton(EvasObject parent) : base(parent) + { + } + + protected override IntPtr CreateHandle(EvasObject parent) + { + return Interop.Eext.eext_floatingbutton_add(parent.Handle); + } + } +} diff --git a/ElmSharp/Interop/Interop.Elementary.FloatingButton.cs b/ElmSharp/Interop/Interop.Elementary.FloatingButton.cs new file mode 100755 index 0000000..e65dafc --- /dev/null +++ b/ElmSharp/Interop/Interop.Elementary.FloatingButton.cs @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Runtime.InteropServices; + +internal static partial class Interop +{ + internal static partial class Eext + { + [DllImport(Libraries.Eext)] + internal static extern IntPtr eext_floatingbutton_add(IntPtr obj); + } +} diff --git a/ElmSharp/Interop/Interop.Libraries.cs b/ElmSharp/Interop/Interop.Libraries.cs old mode 100644 new mode 100755 index f7f9423..fe6ae2e --- a/ElmSharp/Interop/Interop.Libraries.cs +++ b/ElmSharp/Interop/Interop.Libraries.cs @@ -24,5 +24,6 @@ internal static partial class Interop internal const string Eina = "libeina.so.1"; internal const string Ecore = "libecore.so.1"; internal const string Eo = "libeo.so.1"; + internal const string Eext = "libefl-extension.so.0"; } } -- 2.7.4