summaryrefslogtreecommitdiff
path: root/data/edc
diff options
context:
space:
mode:
Diffstat (limited to 'data/edc')
-rw-r--r--data/edc/Makefile.am14
-rw-r--r--data/edc/button.edc319
-rwxr-xr-xdata/edc/layout.edc221
3 files changed, 554 insertions, 0 deletions
diff --git a/data/edc/Makefile.am b/data/edc/Makefile.am
new file mode 100644
index 0000000..c1a85b2
--- /dev/null
+++ b/data/edc/Makefile.am
@@ -0,0 +1,14 @@
+EDJE_FLAGS = \
+-id $(top_srcdir)/data/images/ \
+-fd $(top_srcdir)/data/fonts/
+TARGET = layout.edj button.edj
+all: $(TARGET)
+$(TARGET):
+ edje_cc layout.edc $(EDJE_FLAGS)
+ edje_cc button.edc $(EDJE_FLAGS)
+install:
+ mkdir -p $(DESTDIR)$(prefix)/data/edc
+ $(INSTALL) $(TARGET) $(DESTDIR)$(prefix)/data/edc
+clean:
+ rm -rf *.edj
+
diff --git a/data/edc/button.edc b/data/edc/button.edc
new file mode 100644
index 0000000..31eb6b4
--- /dev/null
+++ b/data/edc/button.edc
@@ -0,0 +1,319 @@
+collections {
+group { name: "elm/button/base/simple_button";
+ data.item: "focus_highlight" "on";
+
+ parts {
+ part { name: "click_rect";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ align: 0.5 0.5;
+ }
+ }
+ }
+ programs {
+ program { name: "button_click";
+ signal: "mouse,down,1";
+ source: "click_rect";
+ action: SIGNAL_EMIT "elm,action,press" "";
+ }
+ program { name: "focus_on";
+ signal: "elm,action,focus";
+ source: "elm";
+ action: SIGNAL_EMIT "elm,action,press" "";
+ }
+ program { name: "button_unclick";
+ signal: "mouse,up,1";
+ source: "click_rect";
+ action: SIGNAL_EMIT "elm,action,unpress" "";
+ }
+ program { name: "focus_out";
+ signal: "elm,action,unfocus";
+ source: "elm";
+ action: SIGNAL_EMIT "elm,action,unpress" "";
+ }
+ program { name: "button_unclick3";
+ signal: "mouse,clicked,1";
+ source: "click_rect";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ }
+}
+
+group { name: "elm/button/base/menu_button";
+ data.item: "focus_highlight" "on";
+ inherit: "elm/button/base/simple_button";
+ images {
+ image: "glow_line.png" COMP;
+ image: "glow_line2.png" COMP;
+ }
+ parts {
+
+ part { name: "elm.padding.left";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ min: 50 10;
+ max: 50 10;
+ fixed: 1 0;
+ }
+ }
+ part { name: "elm.padding.center";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ align: 0.7 0.0;
+ min: 10 10;
+ max: 10 10;
+ fixed: 1 0;
+ }
+ }
+ part { name: "elm.padding.right";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ align: 1.0 0.0;
+ min: 40 10;
+ max: 40 10;
+ fixed: 1 0;
+ }
+ }
+ part{ name: "line";
+ description { state: "default" 0.0;
+ rel1 { relative: 0.0 0.9; offset: 0 -10; }
+ rel2 { relative: 1.0 1.0; offset: 0 -10; }
+ align: 0.5 1;
+ image.normal: "glow_line2.png";
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ rel1 { relative: 0.0 0.85; offset: 0 -5; }
+ rel2 { relative: 1.0 1.0; offset: 0 -5; }
+ image.normal: "glow_line.png";
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ align: 0.0 0.5;
+ rel1.offset: 0 6;
+ rel2.relative: 0.2 1.0;
+ rel2.offset: 0 6;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXT;
+ effect: SOFT_SHADOW;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to_x: "elm.padding.left";
+ rel1.relative: 1.0 0.0;
+ rel2.to_x: "elm.padding.center";
+ rel2.relative: 0.0 1.0;
+ color: 224 224 224 255;
+ color2: 235 248 248 200;
+ color3: 100 100 100 200;
+ text {
+ size: 30;
+ font: "VAGRounded_BT";
+ min: 1 1;
+ align: 0.0 0.5;
+ text_class: "button";
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ text.min: 1 1;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 128;
+ color3: 0 0 0 0;
+ text.min: 1 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ color3: 0 83 166 200;
+ text.size: 35;
+ }
+ }
+ part { name: "end";
+ type: TEXT;
+ effect : SOFT_SHADOW;
+ description { state: "default" 0.0;
+ rel1.to_x: "elm.padding.center";
+ rel1.relative: 1.0 0.0;
+ rel2.to_x: "elm.padding.right";
+ rel2.relative: 0.0 1.0;
+ color: 255 255 255 255;
+ color2: 0 83 166 200;
+ color3: 100 100 100 200;
+ min:80 80;
+ text {
+ size: 30;
+ font: "VAGRounded_BT";
+ text: "";
+ align: 0.5 0.5;
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 128;
+ color3: 0 0 0 0;
+ text.min: 1 1;
+ }
+ }
+ }
+ programs {
+ program { name: "button_click";
+ signal: "mouse,down,1";
+ source: "click_rect";
+ action: SIGNAL_EMIT "elm,action,press" "";
+ after: "button_click_anim";
+ }
+ program { name: "focus_on";
+ signal: "elm,action,focus";
+ source: "elm";
+ action: SIGNAL_EMIT "elm,action,press" "";
+ after: "button_click_anim";
+ }
+ program { name: "button_click_anim";
+ action: STATE_SET "clicked" 0.0;
+ target: "line";
+ target: "elm.text";
+ transition: SIN 0.2;
+ }
+ program { name: "button_unclick";
+ signal: "mouse,up,1";
+ source: "click_rect";
+ action: SIGNAL_EMIT "elm,action,unpress" "";
+ after: "button_unclick_anim";
+ }
+ program { name: "focus_out";
+ signal: "elm,action,unfocus";
+ source: "elm";
+ action: SIGNAL_EMIT "elm,action,unpress" "";
+ after: "button_unclick_anim";
+ }
+ program { name: "button_unclick_anim";
+ action: STATE_SET "default" 0.0;
+ target: "line";
+ target: "elm.text";
+ }
+ program { name: "button_unclick3";
+ signal: "mouse,clicked,1";
+ source: "click_rect";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible") || !strcmp(st, "disabled_visible"))
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ else
+ set_state(PART:"elm.text", "disabled", 0.0);
+ }
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible") || !strcmp(st, "disabled_visible"))
+ set_state(PART:"elm.text", "visible", 0.0);
+ else
+ set_state(PART:"elm.text", "default", 0.0);
+ }
+ }
+ }
+}
+
+group { name: "elm/button/base/arrow_button";
+ inherit: "elm/button/base/simple_button";
+
+ data.item: "focus_highlight" "on";
+
+ parts {
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ rel1.relative: 0.1 0.1;
+ rel2.relative: 0.9 0.9;
+ }
+ description { state: "clicked" 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 1.0;
+ }
+ }
+ }
+ programs {
+ program { name: "button_click";
+ signal: "mouse,down,1";
+ source: "click_rect";
+ action: SIGNAL_EMIT "elm,action,press" "";
+ after: "button_click_anim";
+ }
+ program { name: "focus_on";
+ signal: "elm,action,focus";
+ source: "elm";
+ action: SIGNAL_EMIT "elm,action,press" "";
+ after: "button_click_anim";
+ }
+ program { name: "button_click_anim";
+ action: STATE_SET "clicked" 0.0;
+ target: "elm.swallow.content";
+ transition: SIN 0.3;
+ after: "after_button_click_anim";
+ }
+ program { name: "after_button_click_anim";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ transition: SIN 0.3;
+ after: "button_click_anim";
+ }
+ program { name: "button_unclick";
+ signal: "mouse,up,1";
+ source: "click_rect";
+ action: SIGNAL_EMIT "elm,action,unpress" "";
+ after: "button_unclick_anim";
+ }
+ program { name: "focus_out";
+ signal: "elm,action,unfocus";
+ source: "elm";
+ action: SIGNAL_EMIT "elm,action,unpress" "";
+ after: "button_unclick_anim";
+ }
+ program { name: "button_unclick_anim";
+ action: ACTION_STOP;
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ }
+ program { name: "button_unclick3";
+ signal: "mouse,clicked,1";
+ source: "click_rect";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ }
+}
diff --git a/data/edc/layout.edc b/data/edc/layout.edc
new file mode 100755
index 0000000..d966589
--- /dev/null
+++ b/data/edc/layout.edc
@@ -0,0 +1,221 @@
+#define COLOR 2 61 132 255
+
+collections {
+ group { name: "elm_demo/main";
+ parts {
+ part { name: "bg"; type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ color: 100 100 100 100;
+ }
+ }
+ part { name: "widget.style.text.pad"; type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel2.relative: 0.0 0.0;
+ align: 0.0 0.0;
+ min: 50 30;
+ }
+ }
+ part { name: "widget.style.text"; type: TEXT;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "widget.style.text.pad";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "widget.style.text.pad";
+ }
+ align: 0.0 0.0;
+ text {
+ size: 30;
+ font: "SVD_Medium";
+ min: 1 1;
+ text: "Widget Style";
+ }
+ color: COLOR;
+ }
+ }
+ part { name: "widget.style.pad"; type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1 {
+ relative: 1.0 0.0;
+ to: "widget.style.text";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "widget.style.text";
+ }
+ align: 0.0 0.0;
+ min: 30 0;
+ }
+ }
+ part { name: "widget.style"; type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1 {
+ relative: 1.0 0.0;
+ to: "widget.style.pad";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "widget.style.pad";
+ }
+ align: 0.0 0.5;
+ min: 360 50;
+ }
+ }
+ part { name: "item.style.text.pad"; type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1 {
+ relative: 0.0 1.0;
+ to_y: "widget.style";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_y: "widget.style";
+ }
+ align: 0.0 0.0;
+ min: 50 30;
+ }
+ }
+ part { name: "item.style.text"; type: TEXT;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "item.style.text.pad";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "item.style.text.pad";
+ }
+ align: 0.0 0.0;
+ text {
+ size: 30;
+ font: "SVD_Medium";
+ min: 1 1;
+ text: "Item Style";
+ }
+ color: COLOR;
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "item.style.pad"; type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1 {
+ relative: 1.0 0.0;
+ to: "item.style.text";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to_x: "widget.style.pad";
+ to_y: "item.style.text";
+ }
+ align: 0.0 0.5;
+ min: 30 0;
+ }
+ }
+ part { name: "item.style"; type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1 {
+ relative: 1.0 0.0;
+ to: "item.style.pad";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "item.style.pad";
+ }
+ align: 0.0 0.5;
+ min: 360 50;
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "option"; type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 0.0 1.0;
+ to_y: "widget.style";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to_y: "widget.style";
+ }
+ align: 0.5 0.0;
+ min: 0 120;
+ fixed: 1 1;
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ rel1.to_y: "item.style";
+ rel2.to_y: "item.style";
+ }
+ }
+ part { name: "widget.pad"; type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 0.0 1.0;
+ to_y: "widget.style";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to_y: "widget.style";
+ }
+ align: 0.5 0.0;
+ min: 0 30;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ rel1.to_y: "item.style";
+ rel2.to_y: "item.style";
+ }
+ }
+ part { name: "widget"; type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 0.0 1.0;
+ to_y: "widget.pad";
+ //to_y: "option";
+ }
+ }
+ }
+ }
+ programs {
+ program { name: "item.style.show";
+ signal: "item,style,show";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "item.style.text";
+ target: "item.style";
+ target: "option";
+ target: "widget.pad";
+ }
+ }
+ }
+}