Spliting dali-demo into examples-reel and demo 44/114044/3
authorAgnelo Vaz <agnelo.vaz@samsung.com>
Wed, 8 Feb 2017 17:10:38 +0000 (17:10 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 10 Feb 2017 18:59:27 +0000 (18:59 +0000)
Change-Id: I5c1c52ee969ac04a46412f8f6326a655fc7e63d5

12 files changed:
build/tizen/.gitignore
build/tizen/CMakeLists.txt
build/tizen/demo/CMakeLists.txt
build/tizen/examples-reel/CMakeLists.txt [new file with mode: 0644]
com.samsung.dali-demo.manifest-smack
com.samsung.dali-demo.xml
demo/dali-demo.cpp
examples-reel/dali-examples-reel.cpp [new file with mode: 0644]
packaging/com.samsung.dali-demo.spec
resources/images/dali-examples.png [new file with mode: 0644]
shared/dali-table-view.cpp [moved from demo/dali-table-view.cpp with 100% similarity]
shared/dali-table-view.h [moved from demo/dali-table-view.h with 99% similarity]

index d9f6684..72b1aaa 100644 (file)
@@ -2,6 +2,7 @@ CMakeCache.txt
 CMakeFiles/
 cmake_install.cmake
 demo/dali-demo
+examples-reel/dali-examples
 install_manifest.txt
 /demo/dali-demo
 /demo/dali-examples
index 66b1dc3..5a394e3 100644 (file)
@@ -172,8 +172,8 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${REQUIRED_CFLAGS} ${DALI_DEMO_CFLAGS} -Werr
 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}")
 
 INCLUDE_DIRECTORIES(${ROOT_SRC_DIR})
-#INCLUDE_DIRECTORIES(${DEMO_SRC_DIR})
 
 ADD_SUBDIRECTORY(demo)
 ADD_SUBDIRECTORY(examples)
+ADD_SUBDIRECTORY(examples-reel)
 ADD_SUBDIRECTORY(builder)
index 205f3a1..aae6103 100644 (file)
@@ -2,7 +2,11 @@ SET(DEMO_SRC_DIR ${ROOT_SRC_DIR}/demo)
 
 AUX_SOURCE_DIRECTORY(${DEMO_SRC_DIR} DEMO_SRCS)
 
-SET(DEMO_SRCS ${DEMO_SRCS} "${ROOT_SRC_DIR}/shared/resources-location.cpp")
+SET(DEMO_SRCS
+  ${DEMO_SRCS}
+  "${ROOT_SRC_DIR}/shared/resources-location.cpp"
+  "${ROOT_SRC_DIR}/shared/dali-table-view.cpp"
+)
 
 ADD_EXECUTABLE(${PROJECT_NAME} ${DEMO_SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${REQUIRED_PKGS_LDFLAGS} -pie)
diff --git a/build/tizen/examples-reel/CMakeLists.txt b/build/tizen/examples-reel/CMakeLists.txt
new file mode 100644 (file)
index 0000000..e12fa99
--- /dev/null
@@ -0,0 +1,15 @@
+SET(EXAMPLES_REEL_SRC_DIR ${ROOT_SRC_DIR}/examples-reel)
+
+AUX_SOURCE_DIRECTORY(${EXAMPLES_REEL_SRC_DIR} EXAMPLES_REEL_SRCS)
+
+SET(EXAMPLES_REEL_SRCS
+  ${EXAMPLES_REEL_SRCS}
+  "${ROOT_SRC_DIR}/shared/resources-location.cpp"
+  "${ROOT_SRC_DIR}/shared/dali-table-view.cpp"
+)
+
+ADD_EXECUTABLE(dali-examples ${EXAMPLES_REEL_SRCS})
+TARGET_LINK_LIBRARIES(dali-examples ${REQUIRED_PKGS_LDFLAGS} -pie)
+
+INSTALL(TARGETS dali-examples DESTINATION ${BINDIR})
+
index dac648a..e8c2eea 100644 (file)
@@ -8,6 +8,9 @@
        <assign>
                <filesystem path="/usr/share/icons/com.samsung.dali-demo.png" label="_" />
        </assign>
+       <assign>
+               <filesystem path="/usr/share/icons/dali-examples.png" label="_" />
+       </assign>
        <request>
                <domain name="com.samsung.dali-demo" />
        </request>
index 056fa48..4511e54 100644 (file)
                <icon>/usr/share/icons/com.samsung.dali-demo.png</icon>
                <label>DALi demo</label>
        </ui-application>
+       <ui-application appid="com.samsung.dali-examples" exec="/usr/apps/com.samsung.dali-demo/bin/dali-examples" nodisplay="false" multiple="false" type="c++app" taskmanage="true">
+               <icon>/usr/share/icons/dali-examples.png</icon>
+               <label>DALi Examples</label>
+       </ui-application>
        <ui-application appid="hello-world.example" exec="/usr/apps/com.samsung.dali-demo/bin/hello-world.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">
                <label>Hello World</label>
        </ui-application>
index 60c8501..b26291e 100644 (file)
@@ -19,7 +19,7 @@
 #include <dali/dali.h>
 
 // INTERNAL INCLUDES
-#include "dali-table-view.h"
+#include "shared/dali-table-view.h"
 #include "shared/dali-demo-strings.h"
 
 using namespace Dali;
@@ -36,60 +36,20 @@ int DALI_EXPORT_API main(int argc, char **argv)
   // Create the demo launcher
   DaliTableView demo(app);
 
-  demo.AddExample(Example("animated-images.example", DALI_DEMO_STR_TITLE_ANIMATED_IMAGES));
-  demo.AddExample(Example("animated-shapes.example", DALI_DEMO_STR_TITLE_ANIMATED_SHAPES));
-  demo.AddExample(Example("bubble-effect.example", DALI_DEMO_STR_TITLE_BUBBLES));
   demo.AddExample(Example("blocks.example", DALI_DEMO_STR_TITLE_BLOCKS));
+  demo.AddExample(Example("bubble-effect.example", DALI_DEMO_STR_TITLE_BUBBLES));
+  demo.AddExample(Example("contact-cards.example", DALI_DEMO_STR_TITLE_CONTACT_CARDS));
   demo.AddExample(Example("cube-transition-effect.example", DALI_DEMO_STR_TITLE_CUBE_TRANSITION));
-  demo.AddExample(Example("dissolve-effect.example", DALI_DEMO_STR_TITLE_DISSOLVE_TRANSITION));
+  demo.AddExample(Example("fpp-game.example", DALI_DEMO_STR_TITLE_FPP_GAME));
   demo.AddExample(Example("item-view.example", DALI_DEMO_STR_TITLE_ITEM_VIEW));
-  demo.AddExample(Example("renderer-stencil.example", DALI_DEMO_STR_TITLE_RENDERER_STENCIL));
-  demo.AddExample(Example("magnifier.example", DALI_DEMO_STR_TITLE_MAGNIFIER));
+  demo.AddExample(Example("mesh-visual.example", DALI_DEMO_STR_TITLE_MESH_VISUAL));
+  demo.AddExample(Example("metaball-explosion.example", DALI_DEMO_STR_TITLE_METABALL_EXPLOSION));
+  demo.AddExample(Example("metaball-refrac.example", DALI_DEMO_STR_TITLE_METABALL_REFRAC));
   demo.AddExample(Example("motion-blur.example", DALI_DEMO_STR_TITLE_MOTION_BLUR));
-  demo.AddExample(Example("motion-stretch.example", DALI_DEMO_STR_TITLE_MOTION_STRETCH));
-  demo.AddExample(Example("page-turn-view.example", DALI_DEMO_STR_TITLE_PAGE_TURN_VIEW));
   demo.AddExample(Example("refraction-effect.example", DALI_DEMO_STR_TITLE_REFRACTION));
-  demo.AddExample(Example("scroll-view.example", DALI_DEMO_STR_TITLE_SCROLL_VIEW));
+  demo.AddExample(Example("renderer-stencil.example", DALI_DEMO_STR_TITLE_RENDERER_STENCIL));
   demo.AddExample(Example("shadows-and-lights.example", DALI_DEMO_STR_TITLE_LIGHTS_AND_SHADOWS));
-  demo.AddExample(Example("builder.example", DALI_DEMO_STR_TITLE_SCRIPT_BASED_UI));
-  demo.AddExample(Example("image-scaling-and-filtering.example", DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING));
-  demo.AddExample(Example("image-scaling-irregular-grid.example", DALI_DEMO_STR_TITLE_IMAGE_SCALING));
-  demo.AddExample(Example("text-field.example", DALI_DEMO_STR_TITLE_TEXT_FIELD));
-  demo.AddExample(Example("text-label.example", DALI_DEMO_STR_TITLE_TEXT_LABEL));
-  demo.AddExample(Example("text-label-multi-language.example", DALI_DEMO_STR_TITLE_TEXT_LABEL_MULTI_LANGUAGE));
-  demo.AddExample(Example("text-label-emojis.example", DALI_DEMO_STR_TITLE_EMOJI_TEXT));
-  demo.AddExample(Example("text-scrolling.example", DALI_DEMO_STR_TITLE_TEXT_SCROLLING));
-  demo.AddExample(Example("text-editor.example", DALI_DEMO_STR_TITLE_TEXT_EDITOR));
-  demo.AddExample(Example("size-negotiation.example", DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE));
-  demo.AddExample(Example("popup.example", DALI_DEMO_STR_TITLE_POPUP));
-  demo.AddExample(Example("buttons.example", DALI_DEMO_STR_TITLE_BUTTONS));
-  demo.AddExample(Example("logging.example", DALI_DEMO_STR_TITLE_LOGGING));
-  demo.AddExample(Example("mesh-morph.example", DALI_DEMO_STR_TITLE_MESH_MORPH));
-  demo.AddExample(Example("mesh-sorting.example", DALI_DEMO_STR_TITLE_MESH_SORTING));
-  demo.AddExample(Example("metaball-explosion.example", DALI_DEMO_STR_TITLE_METABALL_EXPLOSION));
-  demo.AddExample(Example("metaball-refrac.example", DALI_DEMO_STR_TITLE_METABALL_REFRAC));
-  demo.AddExample(Example("textured-mesh.example", DALI_DEMO_STR_TITLE_TEXTURED_MESH));
-  demo.AddExample(Example("line-mesh.example", DALI_DEMO_STR_TITLE_LINE_MESH));
-  demo.AddExample(Example("gradients.example", DALI_DEMO_STR_TITLE_COLOR_GRADIENT));
-  demo.AddExample(Example("image-view.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW));
-  demo.AddExample(Example("image-view-pixel-area.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW_PIXEL_AREA));
-  demo.AddExample(Example("image-view-alpha-blending.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW_ALPHA_BLENDING));
-  demo.AddExample(Example("image-view-svg.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW_SVG));
-  demo.AddExample(Example("super-blur-bloom.example", DALI_DEMO_STR_TITLE_SUPER_BLUR_BLOOM));
-  demo.AddExample(Example("tilt.example", DALI_DEMO_STR_TITLE_TILT_SENSOR));
-  demo.AddExample(Example("effects-view.example", DALI_DEMO_STR_TITLE_EFFECTS_VIEW));
-  demo.AddExample(Example("native-image-source.example", DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE));
-  demo.AddExample(Example("mesh-visual.example", DALI_DEMO_STR_TITLE_MESH_VISUAL));
-  demo.AddExample(Example("primitive-shapes.example", DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES));
-  demo.AddExample(Example("styling.example", DALI_DEMO_STR_TITLE_STYLING));
   demo.AddExample(Example("sparkle.example", DALI_DEMO_STR_TITLE_SPARKLE));
-  demo.AddExample(Example("transitions.example", DALI_DEMO_STR_TITLE_VISUAL_TRANSITIONS));
-  demo.AddExample(Example("progress-bar.example", DALI_DEMO_STR_TITLE_PROGRESS_BAR));
-  demo.AddExample(Example("contact-cards.example", DALI_DEMO_STR_TITLE_CONTACT_CARDS));
-  demo.AddExample(Example("flex-container.example", DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND));
-  demo.AddExample(Example("fpp-game.example", DALI_DEMO_STR_TITLE_FPP_GAME));
-  demo.AddExample(Example("tooltip.example", DALI_DEMO_STR_TITLE_TOOLTIP));
-  demo.AddExample(Example("clipping.example", DALI_DEMO_STR_TITLE_CLIPPING));
 
   demo.SortAlphabetically( true );
 
diff --git a/examples-reel/dali-examples-reel.cpp b/examples-reel/dali-examples-reel.cpp
new file mode 100644 (file)
index 0000000..3824596
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/dali.h>
+
+// INTERNAL INCLUDES
+#include "shared/dali-table-view.h"
+#include "shared/dali-demo-strings.h"
+
+using namespace Dali;
+
+int DALI_EXPORT_API main(int argc, char **argv)
+{
+  // Configure gettext for internalization
+  bindtextdomain(DALI_DEMO_DOMAIN_LOCAL, DEMO_LOCALE_DIR);
+  textdomain(DALI_DEMO_DOMAIN_LOCAL);
+  setlocale(LC_ALL, DEMO_LANG);
+
+  Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
+
+  // Create the demo launcher
+  DaliTableView demo(app);
+
+  demo.AddExample(Example("animated-images.example", DALI_DEMO_STR_TITLE_ANIMATED_IMAGES));
+  demo.AddExample(Example("animated-shapes.example", DALI_DEMO_STR_TITLE_ANIMATED_SHAPES));
+  demo.AddExample(Example("builder.example", DALI_DEMO_STR_TITLE_SCRIPT_BASED_UI));
+  demo.AddExample(Example("buttons.example", DALI_DEMO_STR_TITLE_BUTTONS));
+  demo.AddExample(Example("clipping.example", DALI_DEMO_STR_TITLE_CLIPPING));
+  demo.AddExample(Example("dissolve-effect.example", DALI_DEMO_STR_TITLE_DISSOLVE_TRANSITION));
+  demo.AddExample(Example("effects-view.example", DALI_DEMO_STR_TITLE_EFFECTS_VIEW));
+  demo.AddExample(Example("flex-container.example", DALI_DEMO_STR_TITLE_FLEXBOX_PLAYGROUND));
+  demo.AddExample(Example("gradients.example", DALI_DEMO_STR_TITLE_COLOR_GRADIENT));
+  demo.AddExample(Example("image-scaling-and-filtering.example", DALI_DEMO_STR_TITLE_IMAGE_FITTING_SAMPLING));
+  demo.AddExample(Example("image-scaling-irregular-grid.example", DALI_DEMO_STR_TITLE_IMAGE_SCALING));
+  demo.AddExample(Example("image-view.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW));
+  demo.AddExample(Example("image-view-alpha-blending.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW_ALPHA_BLENDING));
+  demo.AddExample(Example("image-view-pixel-area.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW_PIXEL_AREA));
+  demo.AddExample(Example("image-view-svg.example", DALI_DEMO_STR_TITLE_IMAGE_VIEW_SVG));
+  demo.AddExample(Example("line-mesh.example", DALI_DEMO_STR_TITLE_LINE_MESH));
+  demo.AddExample(Example("logging.example", DALI_DEMO_STR_TITLE_LOGGING));
+  demo.AddExample(Example("magnifier.example", DALI_DEMO_STR_TITLE_MAGNIFIER));
+  demo.AddExample(Example("mesh-morph.example", DALI_DEMO_STR_TITLE_MESH_MORPH));
+  demo.AddExample(Example("mesh-sorting.example", DALI_DEMO_STR_TITLE_MESH_SORTING));
+  demo.AddExample(Example("motion-stretch.example", DALI_DEMO_STR_TITLE_MOTION_STRETCH));
+  demo.AddExample(Example("native-image-source.example", DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE));
+  demo.AddExample(Example("page-turn-view.example", DALI_DEMO_STR_TITLE_PAGE_TURN_VIEW));
+  demo.AddExample(Example("popup.example", DALI_DEMO_STR_TITLE_POPUP));
+  demo.AddExample(Example("primitive-shapes.example", DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES));
+  demo.AddExample(Example("progress-bar.example", DALI_DEMO_STR_TITLE_PROGRESS_BAR));
+  demo.AddExample(Example("scroll-view.example", DALI_DEMO_STR_TITLE_SCROLL_VIEW));
+  demo.AddExample(Example("size-negotiation.example", DALI_DEMO_STR_TITLE_NEGOTIATE_SIZE));
+  demo.AddExample(Example("styling.example", DALI_DEMO_STR_TITLE_STYLING));
+  demo.AddExample(Example("super-blur-bloom.example", DALI_DEMO_STR_TITLE_SUPER_BLUR_BLOOM));
+  demo.AddExample(Example("text-editor.example", DALI_DEMO_STR_TITLE_TEXT_EDITOR));
+  demo.AddExample(Example("text-field.example", DALI_DEMO_STR_TITLE_TEXT_FIELD));
+  demo.AddExample(Example("text-label.example", DALI_DEMO_STR_TITLE_TEXT_LABEL));
+  demo.AddExample(Example("text-label-multi-language.example", DALI_DEMO_STR_TITLE_TEXT_LABEL_MULTI_LANGUAGE));
+  demo.AddExample(Example("text-label-emojis.example", DALI_DEMO_STR_TITLE_EMOJI_TEXT));
+  demo.AddExample(Example("text-scrolling.example", DALI_DEMO_STR_TITLE_TEXT_SCROLLING));
+  demo.AddExample(Example("textured-mesh.example", DALI_DEMO_STR_TITLE_TEXTURED_MESH));
+  demo.AddExample(Example("tilt.example", DALI_DEMO_STR_TITLE_TILT_SENSOR));
+  demo.AddExample(Example("tooltip.example", DALI_DEMO_STR_TITLE_TOOLTIP));
+  demo.AddExample(Example("transitions.example", DALI_DEMO_STR_TITLE_VISUAL_TRANSITIONS));
+
+  demo.SortAlphabetically( true );
+
+  // Start the event loop
+  app.MainLoop();
+
+  return 0;
+}
index 2e94c29..fd7c0d2 100755 (executable)
@@ -98,6 +98,7 @@ cp -f %{_builddir}/%{name}-%{version}/%{name}.xml %{buildroot}%{dali_xml_file_di
 
 mkdir -p %{buildroot}%{dali_icon_dir}
 mv %{buildroot}/%{dali_app_res_dir}/images/%{name}.png %{buildroot}%{dali_icon_dir}
+mv %{buildroot}/%{dali_app_res_dir}/images/dali-examples.png %{buildroot}%{dali_icon_dir}
 
 %if 0%{?enable_dali_smack_rules} && !%{with wayland}
 mkdir -p %{buildroot}%{smack_rule_dir}
@@ -134,6 +135,7 @@ exit 0
 %endif
 %defattr(-,root,root,-)
 %{dali_app_exe_dir}/dali-demo
+%{dali_app_exe_dir}/dali-examples
 %{dali_app_exe_dir}/*.example
 %{dali_app_exe_dir}/dali-builder
 %{dali_app_res_dir}/images/*
diff --git a/resources/images/dali-examples.png b/resources/images/dali-examples.png
new file mode 100644 (file)
index 0000000..349b175
Binary files /dev/null and b/resources/images/dali-examples.png differ
similarity index 99%
rename from demo/dali-table-view.h
rename to shared/dali-table-view.h
index 099636c..8c0cf61 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef DALI_DEMO_H
-#define DALI_DEMO_H
+#ifndef DALI_DEMO_TABLEVIEW_H
+#define DALI_DEMO_TABLEVIEW_H
 
 /*
  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
@@ -375,4 +375,4 @@ private:
 
 };
 
-#endif // DALI_DEMO_H
+#endif // DALI_DEMO_TABLEVIEW_H