566c57e1c78a1f8e745e52976cdcd167bfc8fa2a
[platform/core/uifw/dali-demo.git] / demo / dali-demo.cpp
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // EXTERNAL INCLUDES
19 #include <dali/dali.h>
20
21 // INTERNAL INCLUDES
22 #include "shared/dali-table-view.h"
23 #include "shared/dali-demo-strings.h"
24
25 using namespace Dali;
26
27 int DALI_EXPORT_API main(int argc, char **argv)
28 {
29   // Configure gettext for internalization
30   bindtextdomain(DALI_DEMO_DOMAIN_LOCAL, DEMO_LOCALE_DIR);
31   textdomain(DALI_DEMO_DOMAIN_LOCAL);
32   setlocale(LC_ALL, DEMO_LANG);
33
34   Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
35
36   // Create the demo launcher
37   DaliTableView demo(app);
38
39   demo.AddExample(Example("blocks.example", DALI_DEMO_STR_TITLE_BLOCKS));
40   demo.AddExample(Example("bubble-effect.example", DALI_DEMO_STR_TITLE_BUBBLES));
41   demo.AddExample(Example("contact-cards.example", DALI_DEMO_STR_TITLE_CONTACT_CARDS));
42   demo.AddExample(Example("cube-transition-effect.example", DALI_DEMO_STR_TITLE_CUBE_TRANSITION));
43   demo.AddExample(Example("fpp-game.example", DALI_DEMO_STR_TITLE_FPP_GAME));
44   demo.AddExample(Example("item-view.example", DALI_DEMO_STR_TITLE_ITEM_VIEW));
45   demo.AddExample(Example("mesh-visual.example", DALI_DEMO_STR_TITLE_MESH_VISUAL));
46   demo.AddExample(Example("motion-blur.example", DALI_DEMO_STR_TITLE_MOTION_BLUR));
47   demo.AddExample(Example("refraction-effect.example", DALI_DEMO_STR_TITLE_REFRACTION));
48   demo.AddExample(Example("renderer-stencil.example", DALI_DEMO_STR_TITLE_RENDERER_STENCIL));
49   demo.AddExample(Example("shadows-and-lights.example", DALI_DEMO_STR_TITLE_LIGHTS_AND_SHADOWS));
50   demo.AddExample(Example("sparkle.example", DALI_DEMO_STR_TITLE_SPARKLE));
51
52   demo.SortAlphabetically( true );
53
54   // Start the event loop
55   app.MainLoop();
56
57   return 0;
58 }