summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorMike Blumenkrantz <m.blumenkran@samsung.com>2013-02-28 15:20:32 +0000
committerMike Blumenkrantz <m.blumenkran@samsung.com>2013-04-15 08:39:16 +0100
commit718dfef61d0fe2e5e1e5bd34e690a83b2d43d273 (patch)
tree2b9bd647613b69e2703a425dc4961c844d385555 /data
parent505cec1d91dde9f8bb5e3e4ebe6c0b0942183486 (diff)
giant comp rejiggering commit #6:
* border->fx REMOVED, related border api REMOVED * comp edc has new class of groups: e/comp/effects[/auto] ** these are effects which can be applied to any compositor object through the e_comp_win_effect* api and are written in embryo *** two types - base and auto - base = manual, for use with animators; auto are "trigger and forget", for use as actual effects * desk flip transition animations moved to comp effects and FIXED(ish) * "zoom" effect renamed to "diagonal" for slightly less misleading name since it never did any zooming * actual "zoom" effect added * border hierarchy now as follows: cw->effect_obj swallows cw->shobj, cw->shobj swallows cw->bd->bg_object ?: cw->obj, if (cw->bd->bg_object) cw->bd->bg_object swallows cw->obj ** cw->effect_obj now used for all positioning and comp logic ** cw->effect_obj ONLY used for object transformation effects (moving, zooming, fading, etc) ** cw->shobj ONLY for comp visual/non-movement effects (focus effect, unfocus opacity, legacy shadows); this is a candidate for removal/rewrite in E19 * even more comp shape rewrites * desk flip animation time now controlled by theme since edje doesn't support setting transition time in C; related config value removed * desk flip transitions (in e_desk.c) rewritten * various modules (evry/illume2) updated to use comp effects instead of fx offset * desk flip configuration BROKEN(ish)
Diffstat (limited to 'data')
-rw-r--r--data/themes/edc/comp.edc309
-rw-r--r--data/themes/edc/illume.edc2
2 files changed, 311 insertions, 0 deletions
diff --git a/data/themes/edc/comp.edc b/data/themes/edc/comp.edc
index 7f0831d7b..4bdd0601f 100644
--- a/data/themes/edc/comp.edc
+++ b/data/themes/edc/comp.edc
@@ -241,6 +241,315 @@ group { name: "e/comp/screen/overlay/noeffects";
241 } 241 }
242} 242}
243 243
244group { name: "e/comp/effects/none";
245 parts {
246 part { name: "e.swallow.content"; type: SWALLOW;
247 description { state: "default" 0.0;
248 }
249 }
250 }
251}
252
253/* non-auto effects are assumed to be run frame by frame by an animator */
254group { name: "e/comp/effects/move";
255 script {
256 public message(Msg_Type:type, id, ...) {
257 if ((type == MSG_INT_SET) && (id == 0)) {
258 /* set state */
259 new st;
260
261 st = getarg(2);
262 if (st == 1)
263 set_state(PART:"mover", "custom", 0.0);
264 else
265 set_state(PART:"mover", "default", 0.0);
266 } else if ((type == MSG_INT_SET) && (id == 1)) {
267 /* x,y coords to move to */
268 new x, y;
269
270 x = getarg(2);
271 y = getarg(3);
272
273 custom_state(PART:"mover", "default", 0.0);
274 set_state_val(PART:"mover", STATE_REL1_OFFSET, x, y);
275 set_state_val(PART:"mover", STATE_REL2_OFFSET, x, y);
276 }
277 }
278 }
279 parts {
280 part { name: "mover"; type: SPACER;
281 description { state: "default" 0.0;
282 }
283 }
284 part { name: "e.swallow.content"; type: SWALLOW;
285 description { state: "default" 0.0;
286 rel1.to: "mover";
287 rel2.to: "mover";
288 }
289 }
290 }
291 programs {
292 program {
293 name: "show";
294 signal: "e,action,go";
295 source: "e";
296 filter: "mover" "default";
297 action: STATE_SET "custom" 0.0;
298 transition: DECELERATE 0.4 CURRENT;
299 target: "mover";
300 after: "done";
301 }
302 program {
303 name: "hide";
304 signal: "e,action,go";
305 source: "e";
306 filter: "mover" "custom";
307 action: STATE_SET "default" 0.0;
308 transition: DECELERATE 0.4 CURRENT;
309 target: "mover";
310 after: "done";
311 }
312 program {
313 name: "stop";
314 signal: "e,action,stop";
315 source: "e";
316 action: ACTION_STOP;
317 target: "show";
318 target: "hide";
319 }
320 program {
321 name: "done";
322 action: SIGNAL_EMIT "e,action,done" "e";
323 }
324 }
325}
326
327/* auto effects are "start and forget" */
328group { name: "e/comp/effects/auto/pane";
329 //data.item: "noclip" "1"; //setting this prevents object from being clipped to its zone during effect
330 script {
331 public message(Msg_Type:type, id, ...) {
332 if ((type == MSG_INT_SET) && (id == 0)) {
333 /* set state */
334 new st;
335
336 st = getarg(2);
337 if (st == 1)
338 set_state(PART:"mover", "custom", 0.0);
339 else
340 set_state(PART:"mover", "default", 0.0);
341 } else if ((type == MSG_INT_SET) && (id == 1)) {
342 /* border geom[4] / screen size[2] / desk change direction[2] */
343 new x, y, sw, sh, dx, dy;
344
345 sw = getarg(6);
346 sh = getarg(7);
347 dx = getarg(8);
348 dy = getarg(9);
349
350 x = round(sw*dx*1.5);
351 y = round(sh*dy*1.5);
352
353 custom_state(PART:"mover", "default", 0.0);
354 set_state_val(PART:"mover", STATE_REL1_OFFSET, x, y);
355 set_state_val(PART:"mover", STATE_REL2_OFFSET, x, y);
356 }
357 }
358 }
359 parts {
360 part { name: "mover"; type: SPACER;
361 description { state: "default" 0.0;
362 }
363 }
364 part { name: "e.swallow.content"; type: SWALLOW;
365 description { state: "default" 0.0;
366 rel1.to: "mover";
367 rel2.to: "mover";
368 }
369 }
370 }
371 programs {
372 program {
373 name: "show";
374 signal: "e,action,go";
375 source: "e";
376 filter: "mover" "default";
377 action: STATE_SET "custom" 0.0;
378 transition: DECELERATE 0.4 CURRENT;
379 target: "mover";
380 after: "done";
381 }
382 program {
383 name: "hide";
384 signal: "e,action,go";
385 source: "e";
386 filter: "mover" "custom";
387 action: STATE_SET "default" 0.0;
388 transition: DECELERATE 0.4 CURRENT;
389 target: "mover";
390 after: "done";
391 }
392 program {
393 name: "stop";
394 signal: "e,action,stop";
395 source: "e";
396 action: ACTION_STOP;
397 target: "show";
398 target: "hide";
399 }
400 program {
401 name: "done";
402 action: SIGNAL_EMIT "e,action,done" "e";
403 }
404 }
405}
406
407group { name: "e/comp/effects/auto/diagonal";
408 inherit: "e/comp/effects/auto/pane";
409 script {
410 public message(Msg_Type:type, id, ...) {
411 if ((type == MSG_INT_SET) && (id == 0)) {
412 /* set state */
413 new st;
414
415 st = getarg(2);
416
417 if (st == 1)
418 set_state(PART:"mover", "custom", 0.0);
419 else
420 set_state(PART:"mover", "default", 0.0);
421 } else if ((type == MSG_INT_SET) && (id == 1)) {
422 /* border geom / screen size / desk change direction */
423 new x, y, w, h, sw, sh, mx, my, bx, by;
424 new Float:fx, Float:fy, Float:ang, Float:len, Float:lmax, Float:rad;
425
426 x = getarg(2);
427 y = getarg(3);
428 w = getarg(4);
429 h = getarg(5);
430 sw = getarg(6);
431 sh = getarg(7);
432 custom_state(PART:"mover", "default", 0.0);
433
434 mx = sw/2;
435 my = sh/2;
436
437 bx = x+(w/2)-mx;
438 by = y+(h/2)-my;
439 if (bx == 0) bx = 1;
440 if (by == 0) by = 1;
441 fx = bx/(w/2);
442 fy = by/(h/2);
443 ang = atan(fy/fx);
444 if (fx < 0.0)
445 ang = PI+ang;
446 len = sqrt((bx*bx)+(by*by));
447 lmax = sqrt(((sw/2)*(sw/2))+((sh/2)*(sh/2)));
448 rad = sqrt((w*w)+(h*h))/2.0;
449 x = round(cos(ang)*(lmax-len+rad));
450 y = round(sin(ang)*(lmax-len+rad));
451 set_state_val(PART:"mover", STATE_REL1_OFFSET, x, y);
452 set_state_val(PART:"mover", STATE_REL2_OFFSET, x, y);
453 }
454 }
455 }
456}
457
458group { name: "e/comp/effects/auto/zoom";
459 inherit: "e/comp/effects/auto/diagonal";
460 script {
461 public message(Msg_Type:type, id, ...) {
462 if ((type == MSG_INT_SET) && (id == 0)) {
463 /* set state */
464 new st;
465
466 st = getarg(2);
467 if (st == 1) {
468 /* starting from offscreen */
469 set_state_val(PART:"mover", STATE_REL1, 0.3, 0.3);
470 set_state_val(PART:"mover", STATE_REL2, 0.7, 0.7);
471 set_state(PART:"mover", "custom", 0.0);
472 set_state(PART:"clip", "hidden", 0.0);
473 } else {
474 /* starting from normal position */
475 set_state_val(PART:"mover", STATE_REL1, -1.7, -1.7);
476 set_state_val(PART:"mover", STATE_REL2, 1.7, 1.7);
477 set_state(PART:"mover", "default", 0.0);
478 set_state(PART:"clip", "default", 0.0);
479 }
480 } else if ((type == MSG_INT_SET) && (id == 1)) {
481 /* border geom / screen size / desk change direction */
482 new x, y, w, h, sw, sh, mx, my, bx, by;
483 new Float:fx, Float:fy, Float:ang, Float:len, Float:lmax, Float:rad;
484
485 x = getarg(2);
486 y = getarg(3);
487 w = getarg(4);
488 h = getarg(5);
489 sw = getarg(6);
490 sh = getarg(7);
491 custom_state(PART:"mover", "default", 0.0);
492
493 mx = sw/2;
494 my = sh/2;
495
496 bx = x+(w/2)-mx;
497 by = y+(h/2)-my;
498 if (bx == 0) bx = 1;
499 if (by == 0) by = 1;
500 fx = bx/(w/2);
501 fy = by/(h/2);
502 ang = atan(fy/fx);
503 if (fx < 0.0)
504 ang = PI+ang;
505 len = sqrt((bx*bx)+(by*by));
506 lmax = sqrt(((sw/2)*(sw/2))+((sh/2)*(sh/2)));
507 rad = sqrt((w*w)+(h*h))/2.0;
508 x = round(cos(ang)*(lmax-len+rad));
509 y = round(sin(ang)*(lmax-len+rad));
510 set_state_val(PART:"mover", STATE_REL1_OFFSET, x, y);
511 set_state_val(PART:"mover", STATE_REL2_OFFSET, x, y);
512 }
513 }
514 }
515 parts {
516 part { name: "clip"; type: RECT; insert_after: "mover";
517 description { state: "default";
518 rel1.to: "mover";
519 rel2.to: "mover";
520 color: 255 255 255 255;
521 }
522 description { state: "hidden";
523 rel1.to: "mover";
524 rel2.to: "mover";
525 color: 255 255 255 0;
526 }
527 }
528 part { name: "e.swallow.content"; clip_to: "clip";
529 }
530 }
531 programs {
532 program {
533 name: "show2";
534 signal: "e,action,go";
535 source: "e";
536 filter: "mover" "default";
537 action: STATE_SET "hidden" 0.0;
538 transition: ACCELERATE 0.4 CURRENT;
539 target: "clip";
540 }
541 program {
542 name: "hide2";
543 signal: "e,action,go";
544 source: "e";
545 filter: "mover" "custom";
546 action: STATE_SET "default" 0.0;
547 transition: ACCELERATE 0.4 CURRENT;
548 target: "clip";
549 }
550 }
551}
552
244group { name: "e/comp/default"; 553group { name: "e/comp/default";
245 images.image: "win_shadow.png" COMP; 554 images.image: "win_shadow.png" COMP;
246 images.image: "win_glow.png" COMP; 555 images.image: "win_glow.png" COMP;
diff --git a/data/themes/edc/illume.edc b/data/themes/edc/illume.edc
index 7f55025f4..54d8818d5 100644
--- a/data/themes/edc/illume.edc
+++ b/data/themes/edc/illume.edc
@@ -636,6 +636,7 @@ group { name: "modules/illume-softkey/window";
636 rel2.to_x: "dots_start"; 636 rel2.to_x: "dots_start";
637 rel2.relative: 1.0 1.0; 637 rel2.relative: 1.0 1.0;
638 align: 0.0 0.5; 638 align: 0.0 0.5;
639 fixed: 0 1;
639 box { layout: "horizontal"; 640 box { layout: "horizontal";
640 padding: 4 0; 641 padding: 4 0;
641 align: 0.0 0.5; 642 align: 0.0 0.5;
@@ -652,6 +653,7 @@ group { name: "modules/illume-softkey/window";
652 rel2.to_x: "dots_end"; 653 rel2.to_x: "dots_end";
653 rel2.relative: 0.0 1.0; 654 rel2.relative: 0.0 1.0;
654 align: 1.0 0.5; 655 align: 1.0 0.5;
656 fixed: 0 1;
655 box { layout: "horizontal"; 657 box { layout: "horizontal";
656 padding: 4 0; 658 padding: 4 0;
657 align: 1.0 0.5; 659 align: 1.0 0.5;