DALi Version 1.2.30
[platform/core/uifw/dali-demo.git] / demo / dali-demo.cpp
index 281fe63..566c57e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * 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.
  *
  */
 
-#include "dali-table-view.h"
+// EXTERNAL INCLUDES
+#include <dali/dali.h>
+
+// INTERNAL INCLUDES
+#include "shared/dali-table-view.h"
+#include "shared/dali-demo-strings.h"
 
 using namespace Dali;
 
-int main(int argc, char **argv)
+int DALI_EXPORT_API main(int argc, char **argv)
 {
-  Application app = Application::New(&argc, &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("bubble-effect.example", "Bubbles"));
-  demo.AddExample(Example("blocks.example", "Blocks"));
-  demo.AddExample(Example("cluster.example", "Cluster control"));
-  demo.AddExample(Example("cube-transition-effect.example", "Cube Transition"));
-  demo.AddExample(Example("dissolve-effect.example", "Dissolve Transition"));
-  demo.AddExample(Example("item-view.example", "Item View"));
-  demo.AddExample(Example("magnifier.example", "Magnifier"));
-  demo.AddExample(Example("motion-blur.example", "Motion Blur"));
-  demo.AddExample(Example("motion-stretch.example", "Motion Stretch"));
-  demo.AddExample(Example("page-turn-view.example", "Page Turn View"));
-  demo.AddExample(Example("radial-menu.example", "Radial Menu"));
-  demo.AddExample(Example("refraction-effect.example", "Refraction"));
-  demo.AddExample(Example("scroll-view.example", "Scroll View"));
-  demo.AddExample(Example("shadow-bone-lighting.example", "Lights and shadows"));
-  demo.AddExample(Example("builder.example", "Script Based UI"));
-  demo.AddExample(Example("image-scaling-irregular-grid.example", "Image Scaling Modes"));
-  demo.AddExample(Example("text-view.example", "Text View"));
-  demo.AddExample(Example("animated-shapes.example", "Animated Shapes"));
+  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("fpp-game.example", DALI_DEMO_STR_TITLE_FPP_GAME));
+  demo.AddExample(Example("item-view.example", DALI_DEMO_STR_TITLE_ITEM_VIEW));
+  demo.AddExample(Example("mesh-visual.example", DALI_DEMO_STR_TITLE_MESH_VISUAL));
+  demo.AddExample(Example("motion-blur.example", DALI_DEMO_STR_TITLE_MOTION_BLUR));
+  demo.AddExample(Example("refraction-effect.example", DALI_DEMO_STR_TITLE_REFRACTION));
+  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("sparkle.example", DALI_DEMO_STR_TITLE_SPARKLE));
+
+  demo.SortAlphabetically( true );
+
+  // Start the event loop
   app.MainLoop();
 
   return 0;