diff --git a/.gitignore b/.gitignore
index 44e674b..2168e3c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,7 @@ BROWSE
*.fodt
*.test
*.example
+dali-builder
*.a
*.apk
*.ap_
diff --git a/build/tizen/demo/Makefile.am b/build/tizen/demo/Makefile.am
index dc0abe5..a1713fe 100644
--- a/build/tizen/demo/Makefile.am
+++ b/build/tizen/demo/Makefile.am
@@ -25,8 +25,17 @@ dalidemoimages_DATA = $(demo_image_files)
dalidemomodelsdir = $(appdatadir)/models/
dalidemomodels_DATA = $(demo_model_files)
+dalidemoshadersdir = $(appdatadir)/shaders/
+dalidemoshaders_DATA = $(demo_shader_files)
+
+dalidemoscriptsdir = $(appdatadir)/scripts/
+dalidemoscripts_DATA = $(demo_script_files)
+
+
DEMO_CXXFLAGS = -DDALI_IMAGE_DIR="\"$(dalidemoimagesdir)\"" \
-DDALI_MODEL_DIR="\"$(dalidemomodelsdir)\"" \
+ -DDALI_SCRIPT_DIR="\"$(dalidemoscriptsdir)\"" \
+ -DDALI_SHADER_DIR="\"$(dalidemoshadersdir)\"" \
-DDALI_EXAMPLE_BIN="\"$(exedir)\"" \
-I../../../demo -I../../.. \
$(DALIDEMO_CFLAGS) \
diff --git a/build/tizen/examples/Makefile.am b/build/tizen/examples/Makefile.am
index a5fc698..cdae333 100644
--- a/build/tizen/examples/Makefile.am
+++ b/build/tizen/examples/Makefile.am
@@ -29,14 +29,19 @@ bin_PROGRAMS = \
page-turn-view.example \
radial-menu.example \
scroll-view.example \
- shadow-bone-lighting.example
+ shadow-bone-lighting.example \
+ dali-builder \
+ builder.example
+
daliimagedir = $(appdatadir)/images/
dalimodeldir = $(appdatadir)/models/
+daliscriptdir = $(appdatadir)/scripts/
BASE_CXXFLAGS = -I../../../examples \
-DDALI_IMAGE_DIR="\"${daliimagedir}\"" \
-DDALI_MODEL_DIR="\"${dalimodeldir}\"" \
+ -DDALI_SCRIPT_DIR="\"${daliscriptdir}\"" \
$(DALIDEMO_CFLAGS) \
$(ECORE_X_CFLAGS) \
$(CAPI_MEDIA_PLAYER_CFLAGS) \
@@ -125,3 +130,13 @@ shadow_bone_lighting_example_SOURCES = $(examples_src_dir)/shadows/shadow-bone-l
shadow_bone_lighting_example_CXXFLAGS = $(EXAMPLE_CXXFLAGS)
shadow_bone_lighting_example_DEPENDENCIES = $(EXAMPLE_DEPS)
shadow_bone_lighting_example_LDADD = $(EXAMPLE_LDADD)
+
+dali_builder_SOURCES = $(examples_src_dir)/builder/dali-builder.cpp
+dali_builder_CXXFLAGS = $(EXAMPLE_CXXFLAGS)
+dali_builder_DEPENDENCIES = $(EXAMPLE_DEPS)
+dali_builder_LDADD = $(EXAMPLE_LDADD)
+
+builder_example_SOURCES = $(examples_src_dir)/builder/examples.cpp
+builder_example_CXXFLAGS = $(EXAMPLE_CXXFLAGS)
+builder_example_DEPENDENCIES = $(EXAMPLE_DEPS)
+builder_example_LDADD = $(EXAMPLE_LDADD)
diff --git a/demo/dali-demo.cpp b/demo/dali-demo.cpp
index fa43081..0dfc11c 100644
--- a/demo/dali-demo.cpp
+++ b/demo/dali-demo.cpp
@@ -38,6 +38,7 @@ int main(int argc, char **argv)
demo.AddExample(Example("radial-menu.example", "Radial Menu"));
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"));
app.MainLoop();
return 0;
diff --git a/demo/file.list b/demo/file.list
index 2c9f10f..e661847 100644
--- a/demo/file.list
+++ b/demo/file.list
@@ -15,3 +15,6 @@ demo_image_files = \
demo_model_files = \
$(demo_src_dir)/models/*
+
+demo_script_files = \
+ $(demo_src_dir)/scripts/*
diff --git a/demo/scripts/animation.json b/demo/scripts/animation.json
new file mode 100644
index 0000000..906648c
--- /dev/null
+++ b/demo/scripts/animation.json
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
+{
+ // library of styles
+ "styles": {
+ "red-theme": {
+ "color": [1, 0, 0, 1]
+ },
+ "basic-text": {
+ "parent-origin": "CENTER"
+ }
+ },
+ // library of animations
+ "animations": {
+ "animate": {
+ "duration": 10.0,
+ "properties": [{
+ "actor": "greeting", // referenced actors must exist on stage
+ "property": "position",
+ "value": [300, 300, -1000],
+ "alpha-function": "EASE_IN_OUT",
+ "time-period": {
+ "delay": 0,
+ "duration": 3
+ }
+ }, {
+ "actor": "greeting", // referenced actors must exist on stage
+ "property": "scale",
+ "value": [5, 5, 1],
+ "time-period": {
+ "delay": 2,
+ "duration": 3
+ }
+ }]
+ },
+ "rotate": {
+ "duration": 10.0,
+ "properties": [{
+ "actor": "image", // referenced actors must exist on stage
+ "property": "rotation",
+ "value": [0, 0, -45],
+ "alpha-function": "EASE_IN_OUT",
+ "time-period": {
+ "delay": 0,
+ "duration": 3
+ }
+ }]
+ }
+ },
+ // a tree of actors
+ "stage": [{
+ "name": "greeting",
+ "type": "TextView",
+ "text": "Touch me",
+ "styles": ["basic-text"],
+ "position": [0, -120, 0],
+ "size": [200, 200, 1],
+ "rotation": [0, 0, 30],
+ "signals": [{
+ "name": "touched",
+ "action": "play",
+ "animation": "animate"
+ }]
+ }, {
+ "type": "TextView", // styles can be additive
+ "parent-origin": "CENTER",
+ "anchor-point": "CENTER",
+ "size": [200, 200, 1],
+ "text": "or the image.."
+ }, {
+ "name": "image",
+ "type": "ImageActor",
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}gallery-large-21.jpg"
+ },
+ "position": [0, 200, 0],
+ "size": [200, 200, 1],
+ "signals": [{
+ "name": "touched",
+ "action": "play",
+ "animation": "rotate"
+ }],
+ "position-inheritance": "DONT_INHERIT_POSITION"
+ }]
+}
diff --git a/demo/scripts/background-color.json b/demo/scripts/background-color.json
new file mode 100644
index 0000000..d8d97b8
--- /dev/null
+++ b/demo/scripts/background-color.json
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
+{
+ "stage": [
+ // A TextView with a red background
+ {
+ "type": "TextView",
+ "text": "Hello World",
+ "parent-origin": "TOP_CENTER",
+ "anchor-point": "TOP_CENTER",
+ "background-color": [1, 0, 0, 1],
+ "size": [400, 150, 1]
+ },
+
+ // A container with a yellow background
+ {
+ "type": "Control",
+ "parent-origin": "CENTER",
+ "anchor-point": "BOTTOM_CENTER",
+ "background-color": [1, 1, 0, 1],
+ "size": [400, 150, 1]
+ },
+
+ // A container with an image
+ {
+ "type": "Control",
+ "parent-origin": "CENTER",
+ "anchor-point": "TOP_CENTER",
+ "size": [400, 150, 1],
+ "background": {
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}button-background.png"
+ }
+ }
+ },
+
+ // A container with the same image blended in with a blue background
+ {
+ "type": "Control",
+ "parent-origin": "BOTTOM_CENTER",
+ "anchor-point": "BOTTOM_CENTER",
+ "size": [400, 150, 1],
+ "background-color": [0, 0, 1, 1],
+ "background": {
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}button-background.png"
+ }
+ }
+ }
+ ]
+}
diff --git a/demo/scripts/button.json b/demo/scripts/button.json
new file mode 100644
index 0000000..4a010cd
--- /dev/null
+++ b/demo/scripts/button.json
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
+{
+ "constants": {
+ "CONFIG_SCRIPT_LOG_LEVEL": "Verbose"
+ },
+ "stage": [
+ // First Button
+ {
+ "type": "PushButton",
+ "parent-origin": "TOP_CENTER",
+ "anchor-point": "TOP_CENTER",
+ "position": [0, 0, 0],
+ "size": [0, 200, 0],
+ "normal-state-actor": {
+ "type": "ImageActor",
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}blocks-brick-1.png"
+ }
+ },
+ "pressed-state-actor": {
+ "type": "ImageActor",
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}blocks-brick-2.png"
+ }
+ },
+ "label-actor": {
+ "type": "TextView",
+ "text": "Normal"
+ }
+ },
+
+ // Second Button
+ {
+ "type": "PushButton",
+ "parent-origin": "CENTER",
+ "anchor-point": "CENTER",
+ "position": [0, 0, 0],
+ "size": [0, 200, 0],
+ "label-actor": {
+ "type": "TextView",
+ "text": "Dimmed"
+ },
+ "dimmed": true,
+ "normal-state-actor": {
+ "type": "ImageActor",
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}blocks-brick-1.png"
+ }
+ },
+ "pressed-state-actor": {
+ "type": "ImageActor",
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}blocks-brick-2.png"
+ }
+ },
+ "dimmed-state-actor": {
+ "type": "ImageActor",
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}blocks-brick-3.png"
+ }
+ }
+ },
+
+ // Third Button
+ {
+ "type": "PushButton",
+ "name": "toggle-button",
+ "parent-origin": "BOTTOM_CENTER",
+ "anchor-point": "BOTTOM_CENTER",
+ "position": [0, 0, 0],
+ "size": [0, 200, 0],
+ "label-actor": {
+ "type": "TextView",
+ "text": "Toggle"
+ },
+ "togglable": true,
+ "normal-state-actor": {
+ "type": "ImageActor",
+ "style": "STYLE_NINE_PATCH",
+ "border": [26, 24, 26, 23],
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}blocks-brick-1.png"
+ }
+ },
+ "pressed-state-actor": {
+ "type": "ImageActor",
+ "style": "STYLE_NINE_PATCH",
+ "border": [26, 24, 26, 23],
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}blocks-paddle.png"
+ }
+ },
+ "signals": [{
+ "name": "toggled",
+ "action": "set",
+ "actor": "toggle-button",
+ "property": "label-actor",
+ "value": {
+ "type": "TextView",
+ "text": "Using a 9-patch image"
+ }
+ }]
+ }
+ ]
+}
diff --git a/demo/scripts/formatted-text.json b/demo/scripts/formatted-text.json
new file mode 100644
index 0000000..82dac7c
--- /dev/null
+++ b/demo/scripts/formatted-text.json
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
+{
+ // a tree of actors
+ "stage": [{
+ "type": "Actor",
+ "size": [400, 400, 1],
+ "parent-origin": "CENTER",
+ "actors": [{
+ "type": "TextView",
+ "size": [400, 400, 1],
+ "text": "",
+ "markup-enabled": true,
+ "multiline-policy": "SplitByNewLineChar",
+ "horizontal-alignment": "HorizontalCenter",
+ "vertical-alignment": "VerticalBottom",
+ "width-exceed-policy": "Fade",
+ "line-justification": "Center",
+ "fade-boundary": [50, 50, 0, 0],
+ "line-height-offset": 25.0,
+ "parent-origin": "TOP_CENTER"
+ }, {
+ "type": "TextView",
+ "size": [400, 400, 1],
+ "text": "Text with\n'markup-enabled':false",
+ "markup-enabled": false,
+ "multiline-policy": "SplitByWord",
+ "horizontal-alignment": "HorizontalLeft",
+ "vertical-alignment": "VerticalTop",
+ "width-exceed-policy": "ShrinkToFit",
+ "height-exceed-policy": "Original",
+ "line-justification": "Right",
+ "line-height-offset": 5.0,
+ "parent-origin": "BOTTOM_CENTER"
+ }]
+ }]
+}
diff --git a/demo/scripts/hello-world.json b/demo/scripts/hello-world.json
new file mode 100644
index 0000000..abbeb5e
--- /dev/null
+++ b/demo/scripts/hello-world.json
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
+{
+ // a tree of actors
+ "stage": [{
+ "type": "TextView",
+ "text": "Hello World",
+ "parent-origin": "CENTER"
+ }]
+}
diff --git a/demo/scripts/navigation.json b/demo/scripts/navigation.json
new file mode 100644
index 0000000..f54a71b
--- /dev/null
+++ b/demo/scripts/navigation.json
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
+{
+ "stage": [{
+ "type": "NavigationControl",
+ "name": "navigation",
+ "parent-origin": "CENTER",
+ "signals": [{
+ "name": "on-stage",
+ "actor": "navigation",
+ "action": "push",
+ "parameters": ["page1"]
+ }],
+ "actors": [{
+ "type": "Page",
+ "name": "page1",
+ "title": "title",
+ "sub-title": "sub title",
+ "actors": [{
+ "type": "TextView", // styles can be additive
+ "parent-origin": [0.5, 0.5, 0],
+ "anchor-point": [0.5, 0.5, 0],
+ "size": [200, 200, 1],
+ "text": "Touch to push new item!",
+ "signals": [{
+ "name": "touched",
+ "actor": "navigation",
+ "action": "push",
+ "parameters": ["page2"]
+ }]
+ }]
+ }, {
+ "type": "Page",
+ "name": "page2",
+ "actors": [{
+ "type": "TextView", // styles can be additive
+ "parent-origin": [0.5, 0.5, 0.5],
+ "anchor-point": [0.5, 0.5, 0.5],
+ "size": [200, 200, 1],
+ "text": "Hello World!"
+ }, {
+ "type": "TextView", // styles can be additive
+ "parent-origin": [0.0, 0.0, 0.5],
+ "anchor-point": [0.0, 0.0, 0.5],
+ "size": [200, 200, 1],
+ "text": "Back",
+ "signals": [{
+ "name": "touched",
+ "actor": "navigation",
+ "action": "pop"
+ }]
+ }, {
+ "type": "TextView", // styles can be additive
+ "parent-origin": [1.0, 1.0, 0.5],
+ "anchor-point": [1.0, 1.0, 0.5],
+ "size": [200, 200, 1],
+ "text": "Quit",
+ "signals": [{
+ "name": "touched",
+ "action": "quit"
+ }]
+ }]
+ }]
+ }]
+}
diff --git a/demo/scripts/slider-test-style.json b/demo/scripts/slider-test-style.json
new file mode 100644
index 0000000..e08ceb0
--- /dev/null
+++ b/demo/scripts/slider-test-style.json
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
+//******************************************************************************
+//
+// Default style theme for Tizen Light theme, The values should come from
+// UX design document.
+//
+//******************************************************************************
+{
+ "styles": {
+ "slider": {
+ "anchor-point": [0.5, 0.0, 0.0],
+ "parent-origin": [0.5, 0.0, 0.0],
+ "position": [0, 300, 0],
+ "size": [480, 72, 1],
+ "lower-bound": 0,
+ "upper-bound": 10,
+ "show-popup": true,
+ "show-value": true,
+ "value-precision": 2,
+ "value": 0.0,
+ "popup-text-color": [0.0, 1.0, 1.0, 1.0]
+ }
+ }
+}
diff --git a/demo/scripts/slider.json b/demo/scripts/slider.json
new file mode 100644
index 0000000..8d4a4a7
--- /dev/null
+++ b/demo/scripts/slider.json
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
+{
+ "stage": [{
+ "type": "Slider",
+ "parent-origin": "TOP_CENTER",
+ "position": [0, 144, 0],
+ "size": [480, 72, 1],
+ "lower-bound": 0,
+ "upper-bound": 1,
+ "show-popup": true,
+ "show-value": true,
+ "value-precision": 2,
+ "value": 0.0
+ }, {
+ "type": "Slider",
+ "parent-origin": "TOP_CENTER",
+ "position": [0, 224, 0],
+ "size": [300, 72, 1],
+ "lower-bound": 1,
+ "upper-bound": 10,
+ "show-popup": false,
+ "show-value": true,
+ "value-precision": 0,
+ "value": 5.0
+ }, {
+ "type": "Slider",
+ "parent-origin": "TOP_CENTER",
+ "position": [0, 304, 0],
+ "size": [300, 72, 1],
+ "lower-bound": 0,
+ "upper-bound": 5,
+ "show-popup": false,
+ "show-value": false,
+ "value": 0.0,
+ "mark-tolerance": 0.1,
+ "marks": [0, 1, 2, 3, 4, 5]
+ }, {
+ "type": "Slider",
+ "parent-origin": "TOP_CENTER",
+ "position": [0, 384, 0],
+ "size": [480, 72, 1],
+ "lower-bound": 0,
+ "upper-bound": 5,
+ "show-popup": false,
+ "show-value": false,
+ "value": 0.0,
+ "mark-tolerance": 0.1,
+ "snap-to-marks": true,
+ "marks": [0, 1, 2, 3, 4, 5]
+ }, {
+ "type": "Slider",
+ "parent-origin": "TOP_CENTER",
+ "position": [0, 464, 0],
+ "size": [480, 72, 1],
+ "lower-bound": 5,
+ "upper-bound": 100,
+ "show-popup": true,
+ "show-value": true,
+ "value-precision": 0,
+ "value": 50.0,
+ "popup-text-color": [1, 0, 0, 1],
+ "hit-region": [0, 48],
+ "backing-region": [0, 10],
+ "handle-region": [48, 48]
+ }, {
+ "type": "Slider",
+ "parent-origin": "TOP_CENTER",
+ "position": [0, 544, 0],
+ "size": [480, 72, 1],
+ "lower-bound": 10,
+ "upper-bound": 100,
+ "show-popup": true,
+ "show-value": true,
+ "value-prescision": 0,
+ "value": 100.0,
+ "hit-region": [0, 48],
+ "backing-region": [0, 10],
+ "handle-region": [48, 48],
+ "backing-image-name": "{DALI_IMAGE_DIR}circle_point_32x32.png",
+ "handle-image-name": "{DALI_IMAGE_DIR}circle_point_shadow_32x32.png",
+ "progress-image-name": "{DALI_IMAGE_DIR}circle_point.png",
+ "backing-scale9-border": [16, 0, 16, 0],
+ "progress-scale9-border": [16, 0, 16, 0]
+ }, {
+ "type": "Slider",
+ "parent-origin": "TOP_CENTER",
+ "position": [0, 624, 0],
+ "size": [480, 72, 1],
+ "lower-bound": 10,
+ "upper-bound": 100,
+ "show-popup": true,
+ "show-value": true,
+ "value-precision": 0,
+ "value": 50.0,
+ "hit-region": [0, 48],
+ "backing-region": [0, 10],
+ "handle-region": [48, 48],
+ "enabled": false
+ }, {
+ "type": "Slider",
+ "parent-origin": "TOP_CENTER",
+ "position": [0, 704, 0],
+ "size": [480, 72, 1],
+ "lower-bound": 10,
+ "upper-bound": 100,
+ "show-popup": true,
+ "show-value": true,
+ "value-precision": 0,
+ "value": 50.0,
+ "hit-region": [0, 48],
+ "backing-region": [0, 10],
+ "handle-region": [48, 48],
+ "enabled": false,
+ "disable-color": [1, 0, 0, 1]
+ }]
+}
diff --git a/demo/scripts/super-blur-view.json b/demo/scripts/super-blur-view.json
new file mode 100644
index 0000000..873af00
--- /dev/null
+++ b/demo/scripts/super-blur-view.json
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
+{
+ "constants": {
+ "TEXT_VIEW_SIZE": [200, 150, 1]
+ },
+ "animations": {
+ "blur": {
+ "duration": 1,
+ "properties": [{
+ "actor": "super-blur",
+ "property": "blur-strength",
+ "value": 1,
+ "time-period": {
+ "delay": 0,
+ "duration": 1
+ }
+ }]
+ },
+ "clear": {
+ "duration": 1,
+ "properties": [{
+ "actor": "super-blur",
+ "property": "blur-strength",
+ "value": 0,
+ "time-period": {
+ "delay": 0,
+ "duration": 1
+ }
+ }]
+ }
+ },
+ "stage": [
+ // SuperBlurView
+ {
+ "type": "SuperBlurView",
+ "name": "super-blur",
+ "parent-origin": "TOP_CENTER",
+ "anchor-point": "TOP_CENTER",
+ "position": [0, 10, 0],
+ "size": [460, 600, 0],
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}background-4.jpg"
+ }
+ },
+
+ // Button to blur/clear
+ {
+ "type": "PushButton",
+ "name": "toggle-button",
+ "parent-origin": "BOTTOM_CENTER",
+ "anchor-point": "BOTTOM_CENTER",
+ "position": [0, 0, 0],
+ "size": [0, 100, 0],
+ "label-actor": {
+ "type": "TextView",
+ "text": "Blur"
+ },
+ "normal-state-actor": {
+ "type": "ImageActor",
+ "style": "STYLE_NINE_PATCH",
+ "border": [26, 24, 26, 23],
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}button-background.png"
+ }
+ },
+ "pressed-state-actor": {
+ "type": "ImageActor",
+ "style": "STYLE_NINE_PATCH",
+ "border": [26, 24, 26, 23],
+ "image": {
+ "filename": "{DALI_IMAGE_DIR}button-background.png"
+ }
+ },
+ "signals": [{
+ "name": "pressed",
+ "action": "play",
+ "animation": "blur"
+ }, {
+ "name": "released",
+ "action": "play",
+ "animation": "clear"
+ }]
+ }
+ ]
+}
diff --git a/examples/builder/dali-builder.cpp b/examples/builder/dali-builder.cpp
new file mode 100644
index 0000000..29f5134
--- /dev/null
+++ b/examples/builder/dali-builder.cpp
@@ -0,0 +1,312 @@
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
+//------------------------------------------------------------------------------
+//
+// Run a json script layout file
+//
+// - watches an named file and reloads actor tree if the file changes
+// ie run
+// builder-run layout.json
+//
+// and edit layout.json in a text editor saving to trigger the reload
+//
+//------------------------------------------------------------------------------
+
+#include
+#include
+#include
+#include
+#include