tizen 2.4 release
[framework/uifw/efl-theme-tizen.git] / tv / widgets / colorselector.edc
1 /*
2  * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  *   1. Redistributions of source code must retain the above copyright notice, this
10  *      list of conditions and the following disclaimer.
11  *   2. Redistributions in binary form must reproduce the above copyright notice,
12  *      this list of conditions and the following disclaimer in the documentation
13  *      and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
19  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  */
26
27 group {
28    name: "elm/colorselector/palette/colorplane";
29    alias: "elm/colorselector/palette/default";
30    data.item: "horizontal_pad" COLORSELECTOR_PORTRAIT_HOR_PAD_COLORPLANE_INC;
31    data.item: "vertical_pad" COLORSELECTOR_PORTRAIT_VER_PAD_COLORPLANE_INC;
32
33    parts {
34       part { name: "base";
35          type: SPACER;
36          description { state: "default" 0.0;
37             align: 0.0 0.0;
38             min: COLORSELECTOR_PALETTE_COLORPLANE_WIDTH_INC COLORSELECTOR_PALETTE_COLORPLANE_HEIGHT_INC;
39             max: -1 -1;
40          }
41       }
42       part { name: "top_padding";
43          type: SPACER;
44          scale: 1;
45          description { state: "default" 0.0;
46             min: 0 COLORSELECTOR_TOPBOTTOM_PAD_COLORPLANE_INC;
47             fixed: 0 1;
48             rel1 {
49                relative: 0.0 0.0;
50                to: "base";
51             }
52             rel2 {
53                relative: 1.0 0.0;
54                to: "base";
55             }
56             align: 0.0 0.0;
57          }
58       }
59       part { name: "palette";
60          type: SWALLOW;
61          description { state: "default" 0.0;
62             align: 0.0 0.0;
63             fixed: 0 1;
64             rel1 {
65                relative: 0.0 1.0;
66                to_y: "top_padding";
67             }
68             rel2.to_y: "top_padding";
69          }
70       }
71       part{ name: "palette_bottom_padding";
72          type: SPACER;
73          scale: 1;
74          description { state: "default" 0.0;
75             min: 0 COLORSELECTOR_TOPBOTTOM_PAD_COLORPLANE_INC;
76             fixed: 0 1;
77             rel1 {
78                relative: 0.0 1.0;
79                to: "palette";
80             }
81             rel2.to: "palette";
82             align: 0.0 0.0;
83          }
84       }
85    }
86 }
87
88 group {
89    name: "elm/colorselector/item/colorplane";
90    alias: "elm/colorselector/item/default";
91    images {
92       set {
93          name: "core_color_picker_palette_selected";
94          image {
95             image: SMALL"images/Controls/core_color_picker_palette_selected.png" COMP;
96          }
97          image {
98             image: MEDIUM"images/Controls/core_color_picker_palette_selected.png" COMP;
99          }
100       }
101       set {
102          name: "core_color_picker_palette_selected_bg";
103          image {
104             image: SMALL"images/Controls/core_color_picker_palette_selected_bg.png" COMP;
105          }
106          image {
107             image: MEDIUM"images/Controls/core_color_picker_palette_selected_bg.png" COMP;
108          }
109       }
110       set {
111          name: "core_color_picker_color_shadow";
112          image {
113             image: SMALL"images/Controls/core_color_picker_color_shadow.png" COMP;
114          }
115          image {
116             image: MEDIUM"images/Controls/core_color_picker_color_shadow.png" COMP;
117          }
118       }
119       set {
120          name: "core_color_picker_palette_focused";
121          image {
122             image: SMALL"images/Controls/core_color_picker_palette_focused.png" COMP;
123          }
124          image {
125             image: MEDIUM"images/Controls/core_color_picker_palette_focused.png" COMP;
126          }
127       }
128    }
129    parts {
130       part {
131          name: "color_bg";
132          type: SPACER;
133          mouse_events:1;
134          scale: 1;
135          description {
136             state: "default" 0.0;
137             min: COLORSELECTOR_PALETTE_COLORBG_MIN_COLORPLANE_INC;
138          }
139       }
140       part { name: "color_obj";
141          type: SWALLOW;
142          description { state: "default" 0.0;
143             rel1.to: "color_bg";
144             rel2.to: "color_bg";
145          }
146       }
147       part {
148          name: "color_shadow";
149          type: IMAGE;
150          mouse_events: 0;
151          description{
152             state: "default" 0.0;
153             image.normal: "core_color_picker_color_shadow";
154             rel1.to: "color_obj";
155             rel2.to: "color_obj";
156          }
157       }
158       part {
159          name: "selected_bg_image";
160          type: IMAGE;
161          mouse_events: 0;
162          description{
163             state: "default" 0.0;
164             visible: 0;
165             rel1.to: "color_bg";
166             rel2.to: "color_bg";
167             image.normal: "core_color_picker_palette_selected_bg";
168          }
169          description {
170             state: "selected" 0.0;
171             inherit: "default" 0.0;
172             visible: 1;
173             color: 0 0 0 128;
174          }
175       }
176       part {
177          name: "selected_image";
178          description {
179             state: "default" 0.0;
180             visible: 0;
181             rel1 {
182                to: "color_bg";
183                offset: -1 -1;
184             }
185             rel2 {
186                to: "color_bg";
187                offset: 0 0;
188             }
189             image.normal: "core_color_picker_palette_selected";
190          }
191          description {
192             state: "selected" 0.0;
193             inherit: "default" 0.0;
194             visible: 1;
195             color: 255 255 255 255;
196          }
197       }
198       part { name: "over1";
199          type: RECT;
200          repeat_events: 1;
201          description {
202             state: "default" 0.0;
203             rel1.to: "color_bg";
204             rel2.to: "color_bg";
205             color: 0 0 0 0;
206          }
207       }
208       part { name: "highlight";
209          type: IMAGE;
210          scale: 1;
211          description { state: "default" 0.0;
212             visible: 0;
213             image.normal: "core_color_picker_palette_focused";
214             color: 61 185 204 255;
215          }
216          description { state: "highlighted" 0.0;
217             inherit: "default" 0.0;
218             visible: 1;
219          }
220       }
221    }
222    programs {
223       program { name: "item_select";
224          source: "elm";
225          signal: "elm,state,selected";
226          script {
227             set_state(PART:"selected_image", "selected", 0.0);
228             set_state(PART:"selected_bg_image", "selected", 0.0);
229             emit("elm,state,up", "");
230          }
231       }
232       program { name: "item_unselect";
233          source: "elm";
234          signal: "elm,state,unselected";
235          script {
236             set_state(PART:"selected_image", "default", 0.0);
237             set_state(PART:"selected_bg_image", "default", 0.0);
238          }
239       }
240       program { name: "item_down";
241          signal: "mouse,down,1";
242          source: "over1";
243          script {
244             emit("elm,state,down", "");
245          }
246       }
247       program { name: "item_clicked";
248          signal: "mouse,clicked,1";
249          source: "over1";
250          script {
251             set_state(PART:"selected_image", "selected", 0.0);
252             set_state(PART:"selected_bg_image", "selected", 0.0);
253             emit("elm,state,up", "");
254          }
255       }
256       program { name: "item_unfocus_all";
257          source: "elm";
258          signal: "elm,state,unhighlight";
259          script {
260             set_state(PART:"selected_image", "default", 0.0);
261             set_state(PART:"selected_bg_image", "default", 0.0);
262          }
263       }
264       program { name: "highlight_on";
265          signal: "elm,highlight,on";
266          source: "elm";
267          action: STATE_SET "highlighted" 0.0;
268          target: "highlight";
269       }
270       program { name: "highlight_off";
271          signal: "elm,highlight,off";
272          source: "elm";
273          action: STATE_SET "default" 0.0;
274          target: "highlight";
275       }
276       program { name: "touch_sound_over1";
277         signal: "mouse,clicked,1";
278         source: "over1";
279         action: RUN_PLUGIN "touch_sound";
280       }
281    }
282 }
283
284 group {
285    name: "elm/colorselector/item/color/colorplane";
286    alias: "elm/colorselector/item/color/colorplane_landscape";
287    alias: "elm/colorselector/item/color/default";
288    images {
289       set {
290          name: "core_color_picker_palette";
291          image {
292             image: SMALL"images/Controls/core_color_picker_palette.png" COMP;
293          }
294          image {
295             image: MEDIUM"images/Controls/core_color_picker_palette.png" COMP;
296          }
297       }
298    }
299    parts {
300       part {
301          name: "color_image";
302          type: IMAGE;
303          mouse_events: 1;
304          scale: 1;
305          description{
306             state: "default" 0.0;
307             image.normal: "core_color_picker_palette";
308          }
309       }
310    }
311 }
312