Merge remote-tracking branch 'origin/tizen' into new_text
[platform/core/uifw/dali-demo.git] / resources / scripts / super-blur-view.json
1 /*
2  * Copyright (c) 2014 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   "constants": {
19     "TEXT_VIEW_SIZE": [200, 150, 1]
20   },
21   "animations": {
22     "blur": {
23       "duration": 1,
24       "properties": [{
25         "actor": "super-blur",
26         "property": "blur-strength",
27         "value": 1,
28         "time-period": {
29           "delay": 0,
30           "duration": 1
31         }
32       }]
33     },
34     "clear": {
35       "duration": 1,
36       "properties": [{
37         "actor": "super-blur",
38         "property": "blur-strength",
39         "value": 0,
40         "time-period": {
41           "delay": 0,
42           "duration": 1
43         }
44       }]
45     }
46   },
47   "stage": [
48     // SuperBlurView
49     {
50       "type": "SuperBlurView",
51       "name": "super-blur",
52       "parent-origin": "TOP_CENTER",
53       "anchor-point": "TOP_CENTER",
54       "position": [0, 10, 0],
55       "size": [460, 600, 0],
56       "image": {
57         "filename": "{DALI_IMAGE_DIR}background-4.jpg"
58       }
59     },
60
61     // Button to blur/clear
62     {
63       "type": "PushButton",
64       "name": "toggle-button",
65       "parent-origin": "BOTTOM_CENTER",
66       "anchor-point": "BOTTOM_CENTER",
67       "position": [0, 0, 0],
68       "size": [0, 100, 0],
69       "label-actor": {
70         "type": "TextView",
71         "text": "Blur"
72       },
73       "normal-state-actor": {
74         "type": "ImageActor",
75         "style": "STYLE_NINE_PATCH",
76         "border": [26, 24, 26, 23],
77         "image": {
78           "filename": "{DALI_IMAGE_DIR}button-background.png"
79         }
80       },
81       "selected-state-actor": {
82         "type": "ImageActor",
83         "style": "STYLE_NINE_PATCH",
84         "border": [26, 24, 26, 23],
85         "image": {
86           "filename": "{DALI_IMAGE_DIR}button-background.png"
87         }
88       },
89       "signals": [{
90         "name": "pressed",
91         "action": "play",
92         "animation": "blur"
93       }, {
94         "name": "released",
95         "action": "play",
96         "animation": "clear"
97       }]
98     }
99   ]
100 }