summaryrefslogtreecommitdiff
path: root/data/themes/edc/comp_effects.edc
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-06-15 13:49:18 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-06-15 13:55:34 -0400
commit67eb9db938ca1d05502f96a66f70cd1160d3cb05 (patch)
treec8bc627a8dd6a1bb10bee18b853bd96f48199451 /data/themes/edc/comp_effects.edc
parentc25987a2d50ec80094e3eb666dbc556f7ee54f1d (diff)
comp effects: add tooltip visibility effect
Diffstat (limited to '')
-rw-r--r--data/themes/edc/comp_effects.edc94
1 files changed, 94 insertions, 0 deletions
diff --git a/data/themes/edc/comp_effects.edc b/data/themes/edc/comp_effects.edc
index dfc459a..e7227df 100644
--- a/data/themes/edc/comp_effects.edc
+++ b/data/themes/edc/comp_effects.edc
@@ -482,6 +482,100 @@ group { name: "e/comp/effects/visibility/vertical";
482 } 482 }
483} 483}
484 484
485group { name: "e/comp/effects/visibility/tooltip";
486 data.item: "need_pointer" "1";
487 script {
488 public message(Msg_Type:type, id, ...) {
489 if ((type == MSG_INT_SET) && (id == 0)) {
490 /* set state */
491 new st;
492
493 st = getarg(2);
494 if (st == 1)
495 set_state(PART:"mover", "custom", 0.0);
496 else
497 set_state(PART:"mover", "default", 0.0);
498 } else if ((type == MSG_INT_SET) && (id == 1)) {
499 /* absolute object geom[4] / screen size[2] / relative pointer xy[2] */
500 new x, y;
501 new ow, oh;
502 new sx2, sy2;
503 new Float:rx1 = 0.0, Float:rx2 = 1.0, Float:ry1 = 0.0, Float:ry2 = 1.0;
504
505 x = getarg(8);
506 y = getarg(9);
507
508 ow = getarg(4);
509 oh = getarg(5);
510 sx2 = x;
511 sy2 = y;
512 custom_state(PART:"mover", "default", 0.0);
513 if (x <= 0) {
514 rx2 = 0.0;
515 } else {
516 if (x < ow)
517 sx2 = x - ow;
518 else
519 rx1 = 1.0;
520 }
521 if (y <= 0) {
522 ry2 = 0.0;
523 } else {
524 if (y < oh)
525 sy2 = y - oh;
526 else
527 ry1 = 1.0;
528 }
529 set_state_val(PART:"mover", STATE_ALIGNMENT, 0, 0);
530 set_state_val(PART:"mover", STATE_REL1, rx1, ry1);
531 set_state_val(PART:"mover", STATE_REL2, rx2, ry2);
532 set_state_val(PART:"mover", STATE_REL1_OFFSET, x, y);
533 set_state_val(PART:"mover", STATE_REL2_OFFSET, sx2, sy2);
534 }
535 }
536 }
537 parts {
538 spacer { "mover"; }
539 swallow { "e.swallow.content";
540 desc { rel.to: "mover"; }
541 }
542 }
543 programs {
544 program {
545 name: "hide";
546 signal: "e,action,go";
547 source: "e";
548 filter: "mover" "default";
549 action: STATE_SET "custom" 0.0;
550 transition: DECELERATE COMP_EFFECT_DURATION CURRENT;
551 target: "mover";
552 after: "done";
553 }
554 program {
555 name: "show";
556 signal: "e,action,go";
557 source: "e";
558 filter: "mover" "custom";
559 action: STATE_SET "default" 0.0;
560 transition: DECELERATE COMP_EFFECT_DURATION CURRENT;
561 target: "mover";
562 after: "done";
563 }
564 program {
565 name: "stop";
566 signal: "e,action,stop";
567 source: "e";
568 action: ACTION_STOP;
569 target: "show";
570 target: "hide";
571 }
572 program {
573 name: "done";
574 action: SIGNAL_EMIT "e,action,done" "e";
575 }
576 }
577}
578
485group { name: "e/comp/effects/iconify/default"; 579group { name: "e/comp/effects/iconify/default";
486 alias: "e/comp/effects/iconify/ibar"; 580 alias: "e/comp/effects/iconify/ibar";
487 alias: "e/comp/effects/iconify/ibox"; 581 alias: "e/comp/effects/iconify/ibox";