*.csproj.user
*.lock.json
.vs/
+*.edj
+*.sln
BuildRequires: mono-devel
BuildRequires: dotnet-build-tools
+BuildRequires: edje-tools
%description
C# Binding for Elementary
nuget pack $ASM/$ASM.nuspec -Version %{version} -Properties Configuration=%{BUILDCONF}
done
+edje_cc ElmSharp/theme/%{profile}/elm-sharp-theme-%{profile}.edc ElmSharp/theme/elm-sharp-theme.edj
+
%install
# Runtime Binary
mkdir -p %{buildroot}%{dotnet_assembly_path}
# NuGet
mkdir -p %{buildroot}/nuget
install -p -m 644 *.nupkg %{buildroot}/nuget
+# Theme
+mkdir %{buildroot}%{_datadir}/edje/elm-sharp -p
+install -m 644 ElmSharp/theme/elm-sharp-theme.edj %{buildroot}%{_datadir}/edje/elm-sharp/
%files
%manifest %{name}.manifest
%license LICENSE
%attr(644,root,root) %{dotnet_assembly_path}/*.dll
+%attr(644,root,root) %{_datadir}/edje/elm-sharp/*.edj
%package nuget
Summary: NuGet package for %{name}
using System;
+using System.IO;
namespace ElmSharp
{
public static class Elementary
{
+ private static readonly string _themeFilePath = "/usr/share/edje/elm-sharp/elm-sharp-theme.edj";
+
public static void Initialize()
{
Interop.Elementary.elm_init(0, null);
+ if (File.Exists(_themeFilePath))
+ {
+ Interop.Elementary.elm_theme_overlay_add(IntPtr.Zero, _themeFilePath);
+ }
}
public static void Shutdown()
internal static extern void elm_object_focus_set(IntPtr obj, bool focus);
[DllImport(Libraries.Elementary)]
- internal static extern void elm_theme_extension_add(IntPtr obj, string path);
+ internal static extern void elm_theme_extension_add(IntPtr theme, string path);
+
+ [DllImport(Libraries.Elementary)]
+ internal static extern void elm_theme_overlay_add(IntPtr theme, string path);
[DllImport(Libraries.Elementary)]
internal static extern IntPtr elm_theme_new();
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+//****************************************************************************//
+// This file defines the width, height (not color!) for each widgets
+// We can define different INC file by Resolution (HD, qHD, WVGA, HVGA)
+//
+// ************* Naming Rule ************ //
+// {WIDGET}_{GROUP}_{PART}_{STATE}_{TYPE}
+// WIDGET: NAVIFRAME, LIST, DATETIME, POPUP, etc.
+// GROUP: INDEX
+// PART: TEXT, ICON, BG, PADDING, DIVIDER, ICON, etc.
+// STATE: LEFT, RIGHT, TOP, BOTTOM, MIN, MAX,
+// TYPE: HEIGHT, WIDTH, SIZE
+// e.g. LIST_PADDING_LEFT_HEIGHT
+//****************************************************************************//
+
+#define BASE_SCALE_INC 2.6
+
+//****************************************************************************//
+// Colorselector
+//****************************************************************************//
+#define COLORSELECTOR_PALETTE_COLORPLANE_HEIGHT_INC 238
+#define COLORSELECTOR_PALETTE_COLORPLANE_WIDTH_INC 678
+#define COLORSELECTOR_PORTRAIT_HOR_PAD_COLORPLANE_INC "8"
+#define COLORSELECTOR_PORTRAIT_VER_PAD_COLORPLANE_INC "8"
+#define COLORSELECTOR_PALETTE_COLORBG_MIN_COLORPLANE_INC 90 90
+#define COLORSELECTOR_TOPBOTTOM_PAD_COLORPLANE_INC 24
--- /dev/null
+color_classes {
+ color_class {
+ name: "elm/widget/colorselector/default/bg-default";
+ color: 250 250 250 255;
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// LICENSE NOTE:
+// This file (and only this one) is licenses under public-domain. The reason
+// is that this is meant to serve as a template for making your own themes and
+// Elementary's LGPL license is not intended to follow. The images used do come
+// under LGPL, but this file specifically for the structure of your theme is
+// public-domain. This means you can take, use, re-license and otherwise
+// have zero restrictions on using this file as a base for your theme.
+
+//****************************************************************************************//
+// This is theme body including all widget bodys
+// Define shared descriptions (e.g. sound samples, color classes, textblock styles) in here
+// Do not define size(width, height) in here!!!!
+//****************************************************************************************//
+
+// Include INC (e.g. HD-inc.edc, HVGA-inc.edc for each resolution) file
+#include "HD-inc.edc"
+
+externals {
+ external: "elm";
+}
+
+// BUILD_FIX: Add version to edc as 110.
+data.item: "version" "110";
+//
+
+collections {
+ base_scale: BASE_SCALE_INC;
+
+#include "color_classes.edc"
+
+#include "widgets/colorselector.edc"
+
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+group {
+ name: "elm/colorselector/palette/colorplane";
+ alias: "elm/colorselector/palette/default";
+ data.item: "horizontal_pad" COLORSELECTOR_PORTRAIT_HOR_PAD_COLORPLANE_INC;
+ data.item: "vertical_pad" COLORSELECTOR_PORTRAIT_VER_PAD_COLORPLANE_INC;
+
+ parts {
+ part { name: "base";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: COLORSELECTOR_PALETTE_COLORPLANE_WIDTH_INC COLORSELECTOR_PALETTE_COLORPLANE_HEIGHT_INC;
+ max: -1 -1;
+ }
+ }
+ part { name: "bg";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "base";
+ rel2.to: "base";
+ color_class: "elm/widget/colorselector/default/bg-default"; /// for C#
+ }
+ }
+ part { name: "top_padding";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 0 COLORSELECTOR_TOPBOTTOM_PAD_COLORPLANE_INC;
+ fixed: 0 1;
+ rel1 {
+ relative: 0.0 0.0;
+ to: "base";
+ }
+ rel2 {
+ relative: 1.0 0.0;
+ to: "base";
+ }
+ align: 0.0 0.0;
+ }
+ }
+ part { name: "palette";
+ type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ align: 0.5 0.0;
+ fixed: 0 1;
+ rel1 {
+ relative: 0.0 1.0;
+ to_y: "top_padding";
+ }
+ rel2.to_y: "top_padding";
+ }
+ }
+ part{ name: "palette_bottom_padding";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 0 COLORSELECTOR_TOPBOTTOM_PAD_COLORPLANE_INC;
+ fixed: 0 1;
+ rel1 {
+ relative: 0.0 1.0;
+ to: "palette";
+ }
+ rel2.to: "palette";
+ align: 0.0 0.0;
+ }
+ }
+ }
+}