add keyboard-easeout style and use configed value 62/147762/2
authorJuyeon Lee <juyeonne.lee@samsung.com>
Tue, 5 Sep 2017 12:10:05 +0000 (21:10 +0900)
committerJuyeon Lee <juyeonne.lee@samsung.com>
Tue, 5 Sep 2017 12:11:52 +0000 (21:11 +0900)
Change-Id: I3266114d0983774b1ed6cab140cc59af56757798

data/effect.edc
data/group/keyboard-easeout.edc [new file with mode: 0644]
src/e_mod_effect.c

index c050f9b..f1b8c37 100644 (file)
@@ -34,6 +34,11 @@ collections {
    #include "group/keyboard.edc"
 
    /*-----------------------------------------------------*/
+   /* group "e/comp/effects/keyboard-easeout"             */
+   /*-----------------------------------------------------*/
+   #include "group/keyboard-easeout.edc"
+
+   /*-----------------------------------------------------*/
    /* group "e/comp/effects/background-zoom"              */
    /*-----------------------------------------------------*/
    #include "group/background-zoom.edc"
diff --git a/data/group/keyboard-easeout.edc b/data/group/keyboard-easeout.edc
new file mode 100644 (file)
index 0000000..a3d3881
--- /dev/null
@@ -0,0 +1,238 @@
+#define KEYBOARD_EFFECT_DURATION 0.35
+group { name: "e/comp/effects/keyboard-easeout";
+     script {
+          public ang;
+          public message(Msg_Type:type, id, ...) {
+             if ((type == MSG_INT_SET) && (id == 0)) {
+                  /*set state */
+                  new st;
+                  new rot;
+                  new buf[32];
+
+                  st = getarg(2);
+                  rot = getarg(3);
+
+                  set_int(ang, rot);
+
+                  if (st == 0)
+                    {
+                       snprintf(buf, sizeof(buf), "default,%d", rot);
+                       set_state(PART:"clipper", "default", 0.0);
+                       set_state(PART:"shower", buf, 0.0);
+                    }
+                  else if (st == 1)
+                    {
+                       set_state(PART:"clipper", "visible", 0.0);
+                       set_state(PART:"shower", "visible", 0.0);
+                    }
+                  else if (st == 2)
+                    {
+                       snprintf(buf, sizeof(buf), "restack_hidden,%d", rot);
+                       set_state(PART:"clipper", "restack_hidden", 0.0);
+                       set_state(PART:"shower", buf, 0.0);
+                    }
+                  else if (st == 3)
+                    {
+                       set_state(PART:"clipper", "restack_visible", 0.0);
+                       set_state(PART:"shower", "restack_visible", 0.0);
+                    }
+                  else if (st == 4)
+                    {
+                       set_state(PART:"clipper", "restack_done", 0.0);
+                       set_state(PART:"shower", "restack_done", 0.0);
+                    }
+             } else if ((type == MSG_INT_SET) && (id == 1))
+               {
+               }
+          }
+          public hide_state(val, Float:pos)
+          {
+             new rot;
+             new buf[32];
+
+             rot = get_int(ang);
+             snprintf(buf, sizeof(buf), "hide,%d", rot);
+
+             set_tween_state_anim(PART:"shower", "visible", 0.0, buf, 0.0, CUBIC_BEZIER, pos, 0.25, 0.46, 0.45, 1.0);
+             set_tween_state_anim(PART:"clipper", "visible", 0.0, buf, 0.0, CUBIC_BEZIER, pos, 0.25, 0.46, 0.45, 1.0);
+
+             if (pos == 1.0)
+               {
+                  if (get_int(val) == 1)
+                    run_program(PROGRAM:"hide2");
+                  else
+                    run_program(PROGRAM:"done");
+               }
+          }
+     }
+   parts {
+        part { name: "clipper";
+        type: RECT;
+        mouse_events: 0;
+        description { state: "default" 0.0;
+           color: 255 255 255 255;
+           rel1.relative: -1.0  -1.0;
+           rel1.offset:  -9999 -9999;
+           rel2.relative:  2.0   2.0;
+           rel2.offset:   9999  9999;
+           visible: 1;
+        }
+        description { state: "visible" 0.0;
+           inherit: "default" 0.0;
+           color: 255 255 255 255;
+        }
+        description { state: "hide" 0.0;
+           inherit: "default" 0.0;
+           color: 255 255 255 255;
+        }
+        description { state: "restack_visible" 0.0;
+           inherit: "visible" 0.0;
+        }
+        description { state: "restack_hidden" 0.0;
+           inherit: "default" 0.0;
+        }
+        description { state: "restack_done" 0.0;
+           inherit: "visible" 0.0;
+        }
+        }
+        part { name: "shower";
+        type: SPACER;
+        description { state: "default" 0.0;
+           rel1.relative: 0 1;
+           rel2.relative: 1 2;
+        }
+        description { state: "default,0" 0.0;
+           inherit: "default" 0.0;
+        }
+        description { state: "default,90" 0.0;
+           rel1.relative: 1 0;
+           rel2.relative: 2 1;
+        }
+        description { state: "default,180" 0.0;
+           rel1.relative: 0 -1;
+           rel2.relative: 1 0;
+        }
+        description { state: "default,270" 0.0;
+           rel1.relative: -1 0;
+           rel2.relative: 0 1;
+        }
+        description { state: "visible" 0.0;
+           inherit: "default" 0.0;
+           rel1.relative: 0 0;
+           rel1.offset:   0 0;
+           rel2.relative: 1 1;
+        }
+        description { state: "hide" 0.0;
+           inherit: "default" 0.0;
+        }
+        description { state: "hide,0" 0.0;
+           inherit: "hide" 0.0;
+        }
+        description { state: "hide,90" 0.0;
+           inherit: "default,90" 0.0;
+        }
+        description { state: "hide,180" 0.0;
+           inherit: "default,180" 0.0;
+        }
+        description { state: "hide,270" 0.0;
+           inherit: "default,270" 0.0;
+        }
+        description { state: "restack_visible" 0.0;
+           inherit: "visible" 0.0;
+        }
+        description { state: "restack_hidden" 0.0;
+           inherit: "default" 0.0;
+        }
+        description { state: "restack_hidden,0" 0.0;
+           inherit: "restack_hidden" 0.0;
+        }
+        description { state: "restack_hidden,90" 0.0;
+           inherit: "default,90" 0.0;
+        }
+        description { state: "restack_hidden,180" 0.0;
+           inherit: "default,180" 0.0;
+        }
+        description { state: "restack_hidden,270" 0.0;
+           inherit: "default,270" 0.0;
+        }
+        description { state: "restack_done" 0.0;
+           inherit: "visible" 0.0;
+        }
+     }
+      part { name: "e.swallow.content"; type: SWALLOW;
+        type: SWALLOW;
+        clip_to: "clipper";
+        description { state: "default" 0.0;
+           rel1.to: "shower";
+           rel2.to: "shower";
+        }
+        description { state: "visible" 0.0;
+           rel1.to: "shower";
+           rel2.to: "shower";
+        }
+        description { state: "hide" 0.0;
+           rel1.to: "shower";
+           rel2.to: "shower";
+        }
+      }
+   }
+    programs {
+     program { name: "show1";
+        signal: "e,action,go";
+        source: "e";
+        filter: "clipper" "default";
+        action: STATE_SET "visible" 0.0;
+        transition: CUBIC_BEZIER KEYBOARD_EFFECT_DURATION 0.25 0.46 0.45 1.0;
+        target: "shower";
+        target: "clipper";
+        target: "e.swallow.content";
+        after: "done";
+     }
+     program { name: "hide1";
+        signal: "e,action,go";
+        source: "e";
+        filter: "clipper" "visible";
+        script{
+             anim(KEYBOARD_EFFECT_DURATION, "hide_state", 1);
+        }
+     }
+     program { name: "hide2";
+        action: STATE_SET "default" 0.0;
+        target: "shower";
+        target: "clipper";
+        after: "done";
+     }
+     program { name: "restack,hide";
+        signal: "e,action,go";
+        source: "e";
+        filter: "clipper" "restack_visible";
+        script{
+             anim(KEYBOARD_EFFECT_DURATION, "hide_state", 0);
+        }
+     }
+     program { name: "restack,show";
+        signal: "e,action,go";
+        source: "e";
+        filter: "clipper" "restack_hidden";
+        action: STATE_SET "visible" 0.0;
+        transition: CUBIC_BEZIER KEYBOARD_EFFECT_DURATION 0.25 0.46 0.45 1.0;
+        target: "shower";
+        target: "clipper";
+        target: "e.swallow.content";
+        after: "done";
+     }
+     program { name: "restack,finish";
+        signal: "e,action,go";
+        source: "e";
+        filter: "clipper" "restack_done";
+        action: STATE_SET "visible" 0.0;
+        target: "shower";
+        target: "clipper";
+        target: "e.swallow.content";
+        after: "done";
+     }
+     program { name: "done";
+        action: SIGNAL_EMIT "e,action,done" "e";
+     }
+    }
+}
index 0f8fa31..5e6fd99 100644 (file)
@@ -336,7 +336,7 @@ _eff_object_setup(E_Client *ec, E_Effect_Group group)
    if (!ec) return;
 
    if (group == E_EFFECT_GROUP_KEYBOARD)
-     e_comp_object_effect_set(ec->frame, "keyboard");
+     e_comp_object_effect_set(ec->frame, cfg->kbd_effect_style);
    else if (group == E_EFFECT_GROUP_BACKGROUND)
      e_comp_object_effect_set(ec->frame, cfg->bg_effect_style);
    else