summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_embryo.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-06-08 14:43:00 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-06-08 14:43:00 -0400
commit172a0ccf0cd609dac4a3c0b48965c96afd3e1b01 (patch)
treef04c61fc19fdb17727f31cddb9b4dae3cdbbb29b /src/lib/edje/edje_embryo.c
parent86e5a1a27c41b07a8eee74f6a7d90f534dab13c8 (diff)
edje: reformat all C files
this has been unreadable for years due to the french tabber.
Diffstat (limited to 'src/lib/edje/edje_embryo.c')
-rw-r--r--src/lib/edje/edje_embryo.c2084
1 files changed, 1110 insertions, 974 deletions
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index 72480a8d89..f3a740057b 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -284,7 +284,7 @@ _edje_embryo_fn_get_str(Embryo_Program *ep, Embryo_Cell *params)
284 s = (char *)_edje_var_str_get(ed, (int)params[1]); 284 s = (char *)_edje_var_str_get(ed, (int)params[1]);
285 if (s) 285 if (s)
286 { 286 {
287 if ((int) strlen(s) < params[3]) 287 if ((int)strlen(s) < params[3])
288 { 288 {
289 SETSTR(s, params[2]); 289 SETSTR(s, params[2]);
290 } 290 }
@@ -347,7 +347,7 @@ _edje_embryo_fn_count(Embryo_Program *ep, Embryo_Cell *params)
347 347
348 CHKPARAM(1); 348 CHKPARAM(1);
349 349
350 return (Embryo_Cell)_edje_var_list_count_get(ed, (int) params[1]); 350 return (Embryo_Cell)_edje_var_list_count_get(ed, (int)params[1]);
351} 351}
352 352
353/* remove(id, n) */ 353/* remove(id, n) */
@@ -358,7 +358,7 @@ _edje_embryo_fn_remove(Embryo_Program *ep, Embryo_Cell *params)
358 358
359 CHKPARAM(2); 359 CHKPARAM(2);
360 360
361 _edje_var_list_remove_nth(ed, (int) params[1], (int) params[2]); 361 _edje_var_list_remove_nth(ed, (int)params[1], (int)params[2]);
362 362
363 return 0; 363 return 0;
364} 364}
@@ -371,7 +371,7 @@ _edje_embryo_fn_append_int(Embryo_Program *ep, Embryo_Cell *params)
371 371
372 CHKPARAM(2); 372 CHKPARAM(2);
373 373
374 _edje_var_list_int_append(ed, (int) params[1], (int) params[2]); 374 _edje_var_list_int_append(ed, (int)params[1], (int)params[2]);
375 375
376 return 0; 376 return 0;
377} 377}
@@ -384,7 +384,7 @@ _edje_embryo_fn_prepend_int(Embryo_Program *ep, Embryo_Cell *params)
384 384
385 CHKPARAM(2); 385 CHKPARAM(2);
386 386
387 _edje_var_list_int_prepend(ed, (int) params[1], (int) params[2]); 387 _edje_var_list_int_prepend(ed, (int)params[1], (int)params[2]);
388 388
389 return 0; 389 return 0;
390} 390}
@@ -397,8 +397,8 @@ _edje_embryo_fn_insert_int(Embryo_Program *ep, Embryo_Cell *params)
397 397
398 CHKPARAM(3); 398 CHKPARAM(3);
399 399
400 _edje_var_list_int_insert(ed, (int) params[1], (int) params[2], 400 _edje_var_list_int_insert(ed, (int)params[1], (int)params[2],
401 (int) params[3]); 401 (int)params[3]);
402 402
403 return 0; 403 return 0;
404} 404}
@@ -411,8 +411,8 @@ _edje_embryo_fn_replace_int(Embryo_Program *ep, Embryo_Cell *params)
411 411
412 CHKPARAM(3); 412 CHKPARAM(3);
413 413
414 _edje_var_list_nth_int_set(ed, (int) params[1], (int) params[2], 414 _edje_var_list_nth_int_set(ed, (int)params[1], (int)params[2],
415 (int) params[3]); 415 (int)params[3]);
416 416
417 return 0; 417 return 0;
418} 418}
@@ -425,8 +425,8 @@ _edje_embryo_fn_fetch_int(Embryo_Program *ep, Embryo_Cell *params)
425 425
426 CHKPARAM(2); 426 CHKPARAM(2);
427 427
428 return _edje_var_list_nth_int_get(ed, (int) params[1], 428 return _edje_var_list_nth_int_get(ed, (int)params[1],
429 (int) params[2]); 429 (int)params[2]);
430} 430}
431 431
432/* append_str(id, str[]) */ 432/* append_str(id, str[]) */
@@ -440,7 +440,7 @@ _edje_embryo_fn_append_str(Embryo_Program *ep, Embryo_Cell *params)
440 440
441 GETSTR(s, params[2]); 441 GETSTR(s, params[2]);
442 if (s) 442 if (s)
443 _edje_var_list_str_append(ed, (int) params[1], s); 443 _edje_var_list_str_append(ed, (int)params[1], s);
444 444
445 return 0; 445 return 0;
446} 446}
@@ -456,7 +456,7 @@ _edje_embryo_fn_prepend_str(Embryo_Program *ep, Embryo_Cell *params)
456 456
457 GETSTR(s, params[2]); 457 GETSTR(s, params[2]);
458 if (s) 458 if (s)
459 _edje_var_list_str_prepend(ed, (int) params[1], s); 459 _edje_var_list_str_prepend(ed, (int)params[1], s);
460 460
461 return 0; 461 return 0;
462} 462}
@@ -472,7 +472,7 @@ _edje_embryo_fn_insert_str(Embryo_Program *ep, Embryo_Cell *params)
472 472
473 GETSTR(s, params[3]); 473 GETSTR(s, params[3]);
474 if (s) 474 if (s)
475 _edje_var_list_str_insert(ed, (int) params[1], (int) params[2], s); 475 _edje_var_list_str_insert(ed, (int)params[1], (int)params[2], s);
476 476
477 return 0; 477 return 0;
478} 478}
@@ -488,12 +488,11 @@ _edje_embryo_fn_replace_str(Embryo_Program *ep, Embryo_Cell *params)
488 488
489 GETSTR(s, params[3]); 489 GETSTR(s, params[3]);
490 if (s) 490 if (s)
491 _edje_var_list_nth_str_set(ed, (int) params[1], (int) params[2], s); 491 _edje_var_list_nth_str_set(ed, (int)params[1], (int)params[2], s);
492 492
493 return 0; 493 return 0;
494} 494}
495 495
496
497/* fetch_str(id, pos, dst[], maxlen) */ 496/* fetch_str(id, pos, dst[], maxlen) */
498static Embryo_Cell 497static Embryo_Cell
499_edje_embryo_fn_fetch_str(Embryo_Program *ep, Embryo_Cell *params) 498_edje_embryo_fn_fetch_str(Embryo_Program *ep, Embryo_Cell *params)
@@ -503,11 +502,11 @@ _edje_embryo_fn_fetch_str(Embryo_Program *ep, Embryo_Cell *params)
503 502
504 CHKPARAM(4); 503 CHKPARAM(4);
505 504
506 s = (char *) _edje_var_list_nth_str_get(ed, (int) params[1], 505 s = (char *)_edje_var_list_nth_str_get(ed, (int)params[1],
507 (int) params[2]); 506 (int)params[2]);
508 if (s) 507 if (s)
509 { 508 {
510 if ((int) strlen(s) < params[4]) 509 if ((int)strlen(s) < params[4])
511 { 510 {
512 SETSTR(s, params[3]); 511 SETSTR(s, params[3]);
513 } 512 }
@@ -539,7 +538,7 @@ _edje_embryo_fn_append_float(Embryo_Program *ep, Embryo_Cell *params)
539 CHKPARAM(2); 538 CHKPARAM(2);
540 539
541 f = EMBRYO_CELL_TO_FLOAT(params[2]); 540 f = EMBRYO_CELL_TO_FLOAT(params[2]);
542 _edje_var_list_float_append(ed, (int) params[1], f); 541 _edje_var_list_float_append(ed, (int)params[1], f);
543 542
544 return 0; 543 return 0;
545} 544}
@@ -554,7 +553,7 @@ _edje_embryo_fn_prepend_float(Embryo_Program *ep, Embryo_Cell *params)
554 CHKPARAM(2); 553 CHKPARAM(2);
555 554
556 f = EMBRYO_CELL_TO_FLOAT(params[2]); 555 f = EMBRYO_CELL_TO_FLOAT(params[2]);
557 _edje_var_list_float_prepend(ed, (int) params[1], f); 556 _edje_var_list_float_prepend(ed, (int)params[1], f);
558 557
559 return 0; 558 return 0;
560} 559}
@@ -569,7 +568,7 @@ _edje_embryo_fn_insert_float(Embryo_Program *ep, Embryo_Cell *params)
569 CHKPARAM(3); 568 CHKPARAM(3);
570 569
571 f = EMBRYO_CELL_TO_FLOAT(params[3]); 570 f = EMBRYO_CELL_TO_FLOAT(params[3]);
572 _edje_var_list_float_insert(ed, (int) params[1], (int) params[2], f); 571 _edje_var_list_float_insert(ed, (int)params[1], (int)params[2], f);
573 572
574 return 0; 573 return 0;
575} 574}
@@ -582,7 +581,7 @@ _edje_embryo_fn_replace_float(Embryo_Program *ep, Embryo_Cell *params)
582 581
583 CHKPARAM(3); 582 CHKPARAM(3);
584 583
585 _edje_var_list_nth_float_set(ed, (int) params[1], (int) params[2], 584 _edje_var_list_nth_float_set(ed, (int)params[1], (int)params[2],
586 EMBRYO_CELL_TO_FLOAT(params[3])); 585 EMBRYO_CELL_TO_FLOAT(params[3]));
587 586
588 return 0; 587 return 0;
@@ -597,7 +596,7 @@ _edje_embryo_fn_fetch_float(Embryo_Program *ep, Embryo_Cell *params)
597 596
598 CHKPARAM(2); 597 CHKPARAM(2);
599 598
600 f = _edje_var_list_nth_float_get(ed, (int) params[1], (int) params[2]); 599 f = _edje_var_list_nth_float_get(ed, (int)params[1], (int)params[2]);
601 600
602 return EMBRYO_FLOAT_TO_CELL(f); 601 return EMBRYO_FLOAT_TO_CELL(f);
603} 602}
@@ -701,7 +700,7 @@ _edje_embryo_fn_get_anim_pos_map(Embryo_Program *ep, Embryo_Cell *params)
701 v1 = EMBRYO_CELL_TO_FLOAT(params[3]); 700 v1 = EMBRYO_CELL_TO_FLOAT(params[3]);
702 v2 = EMBRYO_CELL_TO_FLOAT(params[4]); 701 v2 = EMBRYO_CELL_TO_FLOAT(params[4]);
703 702
704 switch(tween) 703 switch (tween)
705 { 704 {
706 case ECORE_POS_MAP_LINEAR: 705 case ECORE_POS_MAP_LINEAR:
707 case ECORE_POS_MAP_ACCELERATE: 706 case ECORE_POS_MAP_ACCELERATE:
@@ -709,23 +708,28 @@ _edje_embryo_fn_get_anim_pos_map(Embryo_Program *ep, Embryo_Cell *params)
709 case ECORE_POS_MAP_SINUSOIDAL: 708 case ECORE_POS_MAP_SINUSOIDAL:
710 pos = ecore_animator_pos_map(pos, tween, 0, 0); 709 pos = ecore_animator_pos_map(pos, tween, 0, 0);
711 break; 710 break;
711
712 case ECORE_POS_MAP_ACCELERATE_FACTOR: 712 case ECORE_POS_MAP_ACCELERATE_FACTOR:
713 pos = ecore_animator_pos_map(pos, ECORE_POS_MAP_ACCELERATE_FACTOR, 713 pos = ecore_animator_pos_map(pos, ECORE_POS_MAP_ACCELERATE_FACTOR,
714 v1, 0); 714 v1, 0);
715 break; 715 break;
716
716 case ECORE_POS_MAP_DECELERATE_FACTOR: 717 case ECORE_POS_MAP_DECELERATE_FACTOR:
717 pos = ecore_animator_pos_map(pos, ECORE_POS_MAP_DECELERATE_FACTOR, 718 pos = ecore_animator_pos_map(pos, ECORE_POS_MAP_DECELERATE_FACTOR,
718 v1, 0); 719 v1, 0);
719 break; 720 break;
721
720 case ECORE_POS_MAP_SINUSOIDAL_FACTOR: 722 case ECORE_POS_MAP_SINUSOIDAL_FACTOR:
721 pos = ecore_animator_pos_map(pos, ECORE_POS_MAP_SINUSOIDAL_FACTOR, 723 pos = ecore_animator_pos_map(pos, ECORE_POS_MAP_SINUSOIDAL_FACTOR,
722 v1, 0); 724 v1, 0);
723 break; 725 break;
726
724 case ECORE_POS_MAP_DIVISOR_INTERP: 727 case ECORE_POS_MAP_DIVISOR_INTERP:
725 case ECORE_POS_MAP_BOUNCE: 728 case ECORE_POS_MAP_BOUNCE:
726 case ECORE_POS_MAP_SPRING: 729 case ECORE_POS_MAP_SPRING:
727 pos = ecore_animator_pos_map(pos, tween, v1, v2); 730 pos = ecore_animator_pos_map(pos, tween, v1, v2);
728 break; 731 break;
732
729 default: 733 default:
730 break; 734 break;
731 } 735 }
@@ -739,7 +743,7 @@ _edje_embryo_fn_get_anim_pos_map(Embryo_Program *ep, Embryo_Cell *params)
739static Embryo_Cell 743static Embryo_Cell
740_edje_embryo_fn_set_min_size(Embryo_Program *ep, Embryo_Cell *params) 744_edje_embryo_fn_set_min_size(Embryo_Program *ep, Embryo_Cell *params)
741{ 745{
742 Edje *ed; 746 Edje *ed;
743 float f = 0.0; 747 float f = 0.0;
744 double w = 0.0, h = 0.0; 748 double w = 0.0, h = 0.0;
745 749
@@ -974,13 +978,13 @@ _edje_embryo_fn_play_sample(Embryo_Program *ep, Embryo_Cell *params)
974 float speed = 1.0; 978 float speed = 1.0;
975 int channel = 0; 979 int channel = 0;
976 980
977 if (params[0] < (int) (sizeof(Embryo_Cell) * 2)) 981 if (params[0] < (int)(sizeof(Embryo_Cell) * 2))
978 return 0; 982 return 0;
979 ed = embryo_program_data_get(ep); 983 ed = embryo_program_data_get(ep);
980 GETSTR(sample_name, params[1]); 984 GETSTR(sample_name, params[1]);
981 if ((!sample_name)) return 0; 985 if ((!sample_name)) return 0;
982 speed = EMBRYO_CELL_TO_FLOAT(params[2]); 986 speed = EMBRYO_CELL_TO_FLOAT(params[2]);
983 if (params[0] == (int) (sizeof(Embryo_Cell) * 3)) 987 if (params[0] == (int)(sizeof(Embryo_Cell) * 3))
984 GETINT(channel, params[3]); 988 GETINT(channel, params[3]);
985 _edje_multisense_internal_sound_sample_play(ed, sample_name, 989 _edje_multisense_internal_sound_sample_play(ed, sample_name,
986 (double)speed, channel); 990 (double)speed, channel);
@@ -995,13 +999,13 @@ _edje_embryo_fn_play_tone(Embryo_Program *ep, Embryo_Cell *params)
995 float duration = 0.1; 999 float duration = 0.1;
996 int channel = 0; 1000 int channel = 0;
997 1001
998 if (params[0] < (int) (sizeof(Embryo_Cell) * 2)) 1002 if (params[0] < (int)(sizeof(Embryo_Cell) * 2))
999 return 0; 1003 return 0;
1000 ed = embryo_program_data_get(ep); 1004 ed = embryo_program_data_get(ep);
1001 GETSTR(tone_name, params[1]); 1005 GETSTR(tone_name, params[1]);
1002 if ((!tone_name)) return 0; 1006 if ((!tone_name)) return 0;
1003 duration = EMBRYO_CELL_TO_FLOAT(params[2]); 1007 duration = EMBRYO_CELL_TO_FLOAT(params[2]);
1004 if (params[0] == (int) (sizeof(Embryo_Cell) * 3)) 1008 if (params[0] == (int)(sizeof(Embryo_Cell) * 3))
1005 GETINT(channel, params[3]); 1009 GETINT(channel, params[3]);
1006 _edje_multisense_internal_sound_tone_play(ed, tone_name, 1010 _edje_multisense_internal_sound_tone_play(ed, tone_name,
1007 (double)duration, channel); 1011 (double)duration, channel);
@@ -1015,13 +1019,13 @@ _edje_embryo_fn_play_vibration(Embryo_Program *ep, Embryo_Cell *params)
1015 char *sample_name = NULL; 1019 char *sample_name = NULL;
1016 int repeat = 10; 1020 int repeat = 10;
1017 1021
1018 if (params[0] < (int) (sizeof(Embryo_Cell) * 2)) return 0; 1022 if (params[0] < (int)(sizeof(Embryo_Cell) * 2)) return 0;
1019 ed = embryo_program_data_get(ep); 1023 ed = embryo_program_data_get(ep);
1020 GETSTR(sample_name, params[1]); 1024 GETSTR(sample_name, params[1]);
1021 if ((!sample_name)) return 0; 1025 if ((!sample_name)) return 0;
1022 1026
1023 if (params[0] == (int) (sizeof(Embryo_Cell) * 2)) 1027 if (params[0] == (int)(sizeof(Embryo_Cell) * 2))
1024 GETINT(repeat, params[2]); 1028 GETINT(repeat, params[2]);
1025 1029
1026 _edje_multisense_internal_vibration_sample_play(ed, sample_name, 1030 _edje_multisense_internal_vibration_sample_play(ed, sample_name,
1027 repeat); 1031 repeat);
@@ -1159,13 +1163,13 @@ _edje_embryo_fn_set_state_anim(Embryo_Program *ep, Embryo_Cell *params)
1159 GETFLOAT_T(v2, params[7]); 1163 GETFLOAT_T(v2, params[7]);
1160 GETFLOAT_T(v3, params[8]); 1164 GETFLOAT_T(v3, params[8]);
1161 GETFLOAT_T(v4, params[9]); 1165 GETFLOAT_T(v4, params[9]);
1162 } 1166 }
1163 } 1167 }
1164 rp = ed->table_parts[part_id % ed->table_parts_size]; 1168 rp = ed->table_parts[part_id % ed->table_parts_size];
1165 if (!rp) return 0; 1169 if (!rp) return 0;
1166 _edje_part_description_apply(ed, rp, NULL, 0.0, state, value); 1170 _edje_part_description_apply(ed, rp, NULL, 0.0, state, value);
1167 _edje_part_pos_set(ed, rp, anim_type, FROM_DOUBLE(tween), v1, v2, 1171 _edje_part_pos_set(ed, rp, anim_type, FROM_DOUBLE(tween), v1, v2,
1168 v3, v4); 1172 v3, v4);
1169 _edje_recalc(ed); 1173 _edje_recalc(ed);
1170 return 0; 1174 return 0;
1171} 1175}
@@ -1190,7 +1194,7 @@ _edje_embryo_fn_get_state(Embryo_Program *ep, Embryo_Cell *params)
1190 s = rp->chosen_description->state.name; 1194 s = rp->chosen_description->state.name;
1191 if (s) 1195 if (s)
1192 { 1196 {
1193 if ((int) strlen(s) < params[3]) 1197 if ((int)strlen(s) < params[3])
1194 { 1198 {
1195 SETSTR(s, params[2]); 1199 SETSTR(s, params[2]);
1196 } 1200 }
@@ -1348,7 +1352,7 @@ _edje_embryo_fn_set_tween_state_anim(Embryo_Program *ep, Embryo_Cell *params)
1348 GETFLOAT_T(v2, params[9]); 1352 GETFLOAT_T(v2, params[9]);
1349 GETFLOAT_T(v3, params[10]); 1353 GETFLOAT_T(v3, params[10]);
1350 GETFLOAT_T(v4, params[11]); 1354 GETFLOAT_T(v4, params[11]);
1351 } 1355 }
1352 } 1356 }
1353 rp = ed->table_parts[part_id % ed->table_parts_size]; 1357 rp = ed->table_parts[part_id % ed->table_parts_size];
1354 if (!rp) return 0; 1358 if (!rp) return 0;
@@ -1434,7 +1438,7 @@ _edje_embryo_fn_set_drag(Embryo_Program *ep, Embryo_Cell *params)
1434 edje_object_part_drag_value_set(ed->obj, rp->part->name, 1438 edje_object_part_drag_value_set(ed->obj, rp->part->name,
1435 (double)EMBRYO_CELL_TO_FLOAT(params[2]), 1439 (double)EMBRYO_CELL_TO_FLOAT(params[2]),
1436 (double)EMBRYO_CELL_TO_FLOAT(params[3])); 1440 (double)EMBRYO_CELL_TO_FLOAT(params[3]));
1437 return(0); 1441 return 0;
1438} 1442}
1439 1443
1440/* get_drag_size(part_id, &Float:dx, &Float:dy) */ 1444/* get_drag_size(part_id, &Float:dx, &Float:dy) */
@@ -1474,7 +1478,7 @@ _edje_embryo_fn_set_drag_size(Embryo_Program *ep, Embryo_Cell *params)
1474 edje_object_part_drag_size_set(ed->obj, rp->part->name, 1478 edje_object_part_drag_size_set(ed->obj, rp->part->name,
1475 (double)EMBRYO_CELL_TO_FLOAT(params[2]), 1479 (double)EMBRYO_CELL_TO_FLOAT(params[2]),
1476 (double)EMBRYO_CELL_TO_FLOAT(params[3])); 1480 (double)EMBRYO_CELL_TO_FLOAT(params[3]));
1477 return(0); 1481 return 0;
1478} 1482}
1479 1483
1480/* set_text(part_id, str[]) */ 1484/* set_text(part_id, str[]) */
@@ -1492,10 +1496,11 @@ _edje_embryo_fn_set_text(Embryo_Program *ep, Embryo_Cell *params)
1492 if (part_id < 0) return 0; 1496 if (part_id < 0) return 0;
1493 rp = ed->table_parts[part_id % ed->table_parts_size]; 1497 rp = ed->table_parts[part_id % ed->table_parts_size];
1494 GETSTR(s, params[2]); 1498 GETSTR(s, params[2]);
1495 if (s){ 1499 if (s)
1496 edje_object_part_text_set(ed->obj, rp->part->name, s); 1500 {
1497 } 1501 edje_object_part_text_set(ed->obj, rp->part->name, s);
1498 return(0); 1502 }
1503 return 0;
1499} 1504}
1500 1505
1501/* get_text(part_id, dst[], maxlen) */ 1506/* get_text(part_id, dst[], maxlen) */
@@ -1515,7 +1520,7 @@ _edje_embryo_fn_get_text(Embryo_Program *ep, Embryo_Cell *params)
1515 s = (char *)edje_object_part_text_get(ed->obj, rp->part->name); 1520 s = (char *)edje_object_part_text_get(ed->obj, rp->part->name);
1516 if (s) 1521 if (s)
1517 { 1522 {
1518 if ((int) strlen(s) < params[3]) 1523 if ((int)strlen(s) < params[3])
1519 { 1524 {
1520 SETSTR(s, params[2]); 1525 SETSTR(s, params[2]);
1521 } 1526 }
@@ -1564,7 +1569,6 @@ _edje_embryo_fn_get_max_size(Embryo_Program *ep, Embryo_Cell *params)
1564 SETINT(w, params[1]); 1569 SETINT(w, params[1]);
1565 SETINT(h, params[2]); 1570 SETINT(h, params[2]);
1566 return 0; 1571 return 0;
1567
1568} 1572}
1569 1573
1570/* get_color_class(class[], &r, &g, &b, &a) */ 1574/* get_color_class(class[], &r, &g, &b, &a) */
@@ -1618,8 +1622,8 @@ _edje_embryo_fn_set_text_class(Embryo_Program *ep, Embryo_Cell *params)
1618 ed = embryo_program_data_get(ep); 1622 ed = embryo_program_data_get(ep);
1619 GETSTR(class, params[1]); 1623 GETSTR(class, params[1]);
1620 GETSTR(font, params[2]); 1624 GETSTR(font, params[2]);
1621 if( !class || !font ) return 0; 1625 if ( !class || !font ) return 0;
1622 fsize = (Evas_Font_Size) EMBRYO_CELL_TO_FLOAT(params[3]); 1626 fsize = (Evas_Font_Size)EMBRYO_CELL_TO_FLOAT(params[3]);
1623 edje_object_text_class_set(ed->obj, class, font, fsize); 1627 edje_object_text_class_set(ed->obj, class, font, fsize);
1624 return 0; 1628 return 0;
1625} 1629}
@@ -1680,7 +1684,7 @@ _edje_embryo_fn_set_drag_step(Embryo_Program *ep, Embryo_Cell *params)
1680 edje_object_part_drag_step_set(ed->obj, rp->part->name, 1684 edje_object_part_drag_step_set(ed->obj, rp->part->name,
1681 (double)EMBRYO_CELL_TO_FLOAT(params[2]), 1685 (double)EMBRYO_CELL_TO_FLOAT(params[2]),
1682 (double)EMBRYO_CELL_TO_FLOAT(params[3])); 1686 (double)EMBRYO_CELL_TO_FLOAT(params[3]));
1683 return(0); 1687 return 0;
1684} 1688}
1685 1689
1686/* get_drag_page(part_id, &Float:dx, &Float:&dy) */ 1690/* get_drag_page(part_id, &Float:dx, &Float:&dy) */
@@ -1743,7 +1747,7 @@ _edje_embryo_fn_set_drag_page(Embryo_Program *ep, Embryo_Cell *params)
1743 edje_object_part_drag_page_set(ed->obj, rp->part->name, 1747 edje_object_part_drag_page_set(ed->obj, rp->part->name,
1744 (double)EMBRYO_CELL_TO_FLOAT(params[2]), 1748 (double)EMBRYO_CELL_TO_FLOAT(params[2]),
1745 (double)EMBRYO_CELL_TO_FLOAT(params[3])); 1749 (double)EMBRYO_CELL_TO_FLOAT(params[3]));
1746 return(0); 1750 return 0;
1747} 1751}
1748 1752
1749/* send_message(Msg_Type:type, id,...); */ 1753/* send_message(Msg_Type:type, id,...); */
@@ -1755,25 +1759,85 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
1755 int id, i, n; 1759 int id, i, n;
1756 Embryo_Cell *ptr; 1760 Embryo_Cell *ptr;
1757 1761
1758 if (params[0] < (int) (sizeof(Embryo_Cell) * (2))) return 0; 1762 if (params[0] < (int)(sizeof(Embryo_Cell) * (2))) return 0;
1759 ed = embryo_program_data_get(ep); 1763 ed = embryo_program_data_get(ep);
1760 type = params[1]; 1764 type = params[1];
1761 id = params[2]; 1765 id = params[2];
1762 switch (type) 1766 switch (type)
1763 { 1767 {
1764 case EDJE_MESSAGE_NONE: 1768 case EDJE_MESSAGE_NONE:
1765 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, NULL); 1769 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, NULL);
1766 break; 1770 break;
1771
1767 case EDJE_MESSAGE_SIGNAL: 1772 case EDJE_MESSAGE_SIGNAL:
1768 break; 1773 break;
1774
1769 case EDJE_MESSAGE_STRING: 1775 case EDJE_MESSAGE_STRING:
1776 {
1777 Embryo_Cell *cptr;
1778
1779 cptr = embryo_data_address_get(ep, params[3]);
1780 if (cptr)
1781 {
1782 Edje_Message_String *emsg;
1783 int l;
1784 char *s;
1785
1786 l = embryo_data_string_length_get(ep, cptr);
1787 s = alloca(l + 1);
1788 s[0] = 0;
1789 embryo_data_string_get(ep, cptr, s);
1790 emsg = alloca(sizeof(Edje_Message_String));
1791 emsg->str = s;
1792 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1793 }
1794 }
1795 break;
1796
1797 case EDJE_MESSAGE_INT:
1798 {
1799 Edje_Message_Int *emsg;
1800
1801 emsg = alloca(sizeof(Edje_Message_Int));
1802 ptr = embryo_data_address_get(ep, params[3]);
1803 if (ptr) emsg->val = (int)*ptr;
1804 else emsg->val = 0;
1805 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1806 }
1807 break;
1808
1809 case EDJE_MESSAGE_FLOAT:
1810 {
1811 Edje_Message_Float *emsg;
1812 float f;
1813
1814 emsg = alloca(sizeof(Edje_Message_Float));
1815 ptr = embryo_data_address_get(ep, params[3]);
1816 if (ptr)
1817 {
1818 f = EMBRYO_CELL_TO_FLOAT(*ptr);
1819 emsg->val = (double)f;
1820 }
1821 else
1822 emsg->val = 0.0;
1823 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1824 }
1825 break;
1826
1827 case EDJE_MESSAGE_STRING_SET:
1828 {
1829 Edje_Message_String_Set *emsg;
1830
1831 n = (params[0] / sizeof(Embryo_Cell)) + 1;
1832 emsg = alloca(sizeof(Edje_Message_String_Set) + ((n - 3 - 1) * sizeof(char *)));
1833 emsg->count = n - 3;
1834 for (i = 3; i < n; i++)
1770 { 1835 {
1771 Embryo_Cell *cptr; 1836 Embryo_Cell *cptr;
1772 1837
1773 cptr = embryo_data_address_get(ep, params[3]); 1838 cptr = embryo_data_address_get(ep, params[i]);
1774 if (cptr) 1839 if (cptr)
1775 { 1840 {
1776 Edje_Message_String *emsg;
1777 int l; 1841 int l;
1778 char *s; 1842 char *s;
1779 1843
@@ -1781,229 +1845,181 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
1781 s = alloca(l + 1); 1845 s = alloca(l + 1);
1782 s[0] = 0; 1846 s[0] = 0;
1783 embryo_data_string_get(ep, cptr, s); 1847 embryo_data_string_get(ep, cptr, s);
1784 emsg = alloca(sizeof(Edje_Message_String)); 1848 emsg->str[i - 3] = s;
1785 emsg->str = s;
1786 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1787 } 1849 }
1788 } 1850 }
1789 break; 1851 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1790 case EDJE_MESSAGE_INT: 1852 }
1791 { 1853 break;
1792 Edje_Message_Int *emsg;
1793 1854
1794 emsg = alloca(sizeof(Edje_Message_Int)); 1855 case EDJE_MESSAGE_INT_SET:
1795 ptr = embryo_data_address_get(ep, params[3]); 1856 {
1796 if (ptr) emsg->val = (int)*ptr; 1857 Edje_Message_Int_Set *emsg;
1797 else emsg->val = 0; 1858
1798 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg); 1859 n = (params[0] / sizeof(Embryo_Cell)) + 1;
1860 emsg = alloca(sizeof(Edje_Message_Int_Set) + ((n - 3 - 1) * sizeof(int)));
1861 emsg->count = n - 3;
1862 for (i = 3; i < n; i++)
1863 {
1864 ptr = embryo_data_address_get(ep, params[i]);
1865 if (ptr) emsg->val[i - 3] = (int)*ptr;
1866 else emsg->val[i - 3] = 0;
1799 } 1867 }
1800 break; 1868 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1801 case EDJE_MESSAGE_FLOAT: 1869 }
1870 break;
1871
1872 case EDJE_MESSAGE_FLOAT_SET:
1873 {
1874 Edje_Message_Float_Set *emsg;
1875
1876 n = (params[0] / sizeof(Embryo_Cell)) + 1;
1877 emsg = alloca(sizeof(Edje_Message_Float_Set) + ((n - 3 - 1) * sizeof(double)));
1878 emsg->count = n - 3;
1879 for (i = 3; i < n; i++)
1802 { 1880 {
1803 Edje_Message_Float *emsg;
1804 float f; 1881 float f;
1805 1882
1806 emsg = alloca(sizeof(Edje_Message_Float)); 1883 ptr = embryo_data_address_get(ep, params[i]);
1807 ptr = embryo_data_address_get(ep, params[3]);
1808 if (ptr) 1884 if (ptr)
1809 { 1885 {
1810 f = EMBRYO_CELL_TO_FLOAT(*ptr); 1886 f = EMBRYO_CELL_TO_FLOAT(*ptr);
1811 emsg->val = (double)f; 1887 emsg->val[i - 3] = (double)f;
1812 } 1888 }
1813 else 1889 else
1814 emsg->val = 0.0; 1890 emsg->val[i - 3] = 0.0;
1815 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1816 } 1891 }
1817 break; 1892 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1818 case EDJE_MESSAGE_STRING_SET: 1893 }
1819 { 1894 break;
1820 Edje_Message_String_Set *emsg;
1821 1895
1822 n = (params[0] / sizeof(Embryo_Cell)) + 1; 1896 case EDJE_MESSAGE_STRING_INT:
1823 emsg = alloca(sizeof(Edje_Message_String_Set) + ((n - 3 - 1) * sizeof(char *))); 1897 {
1824 emsg->count = n - 3; 1898 Edje_Message_String_Int *emsg;
1825 for (i = 3; i < n; i++) 1899 Embryo_Cell *cptr;
1826 {
1827 Embryo_Cell *cptr;
1828 1900
1829 cptr = embryo_data_address_get(ep, params[i]); 1901 cptr = embryo_data_address_get(ep, params[3]);
1830 if (cptr) 1902 if (cptr)
1831 { 1903 {
1832 int l; 1904 int l;
1833 char *s; 1905 char *s;
1834 1906
1835 l = embryo_data_string_length_get(ep, cptr); 1907 l = embryo_data_string_length_get(ep, cptr);
1836 s = alloca(l + 1); 1908 s = alloca(l + 1);
1837 s[0] = 0; 1909 s[0] = 0;
1838 embryo_data_string_get(ep, cptr, s); 1910 embryo_data_string_get(ep, cptr, s);
1839 emsg->str[i - 3] = s; 1911 emsg = alloca(sizeof(Edje_Message_String_Int));
1840 } 1912 emsg->str = s;
1841 } 1913 ptr = embryo_data_address_get(ep, params[4]);
1914 if (ptr) emsg->val = (int)*ptr;
1915 else emsg->val = 0;
1842 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg); 1916 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1843 } 1917 }
1844 break; 1918 }
1845 case EDJE_MESSAGE_INT_SET: 1919 break;
1920
1921 case EDJE_MESSAGE_STRING_FLOAT:
1922 {
1923 Edje_Message_String_Float *emsg;
1924 Embryo_Cell *cptr;
1925
1926 cptr = embryo_data_address_get(ep, params[3]);
1927 if (cptr)
1846 { 1928 {
1847 Edje_Message_Int_Set *emsg; 1929 int l;
1930 char *s;
1931 float f;
1848 1932
1849 n = (params[0] / sizeof(Embryo_Cell)) + 1; 1933 l = embryo_data_string_length_get(ep, cptr);
1850 emsg = alloca(sizeof(Edje_Message_Int_Set) + ((n - 3 - 1) * sizeof(int))); 1934 s = alloca(l + 1);
1851 emsg->count = n - 3; 1935 s[0] = 0;
1852 for (i = 3; i < n; i++) 1936 embryo_data_string_get(ep, cptr, s);
1937 emsg = alloca(sizeof(Edje_Message_String_Float));
1938 emsg->str = s;
1939 ptr = embryo_data_address_get(ep, params[4]);
1940 if (ptr)
1853 { 1941 {
1854 ptr = embryo_data_address_get(ep, params[i]); 1942 f = EMBRYO_CELL_TO_FLOAT(*ptr);
1855 if (ptr) emsg->val[i - 3] = (int)*ptr; 1943 emsg->val = (double)f;
1856 else emsg->val[i - 3] = 0;
1857 } 1944 }
1945 else
1946 emsg->val = 0.0;
1858 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg); 1947 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1859 } 1948 }
1860 break; 1949 }
1861 case EDJE_MESSAGE_FLOAT_SET: 1950 break;
1951
1952 case EDJE_MESSAGE_STRING_INT_SET:
1953 {
1954 Edje_Message_String_Int_Set *emsg;
1955 Embryo_Cell *cptr;
1956
1957 cptr = embryo_data_address_get(ep, params[3]);
1958 if (cptr)
1862 { 1959 {
1863 Edje_Message_Float_Set *emsg; 1960 int l;
1961 char *s;
1864 1962
1963 l = embryo_data_string_length_get(ep, cptr);
1964 s = alloca(l + 1);
1965 s[0] = 0;
1966 embryo_data_string_get(ep, cptr, s);
1865 n = (params[0] / sizeof(Embryo_Cell)) + 1; 1967 n = (params[0] / sizeof(Embryo_Cell)) + 1;
1866 emsg = alloca(sizeof(Edje_Message_Float_Set) + ((n - 3 - 1) * sizeof(double))); 1968 emsg = alloca(sizeof(Edje_Message_String_Int_Set) + ((n - 4 - 1) * sizeof(int)));
1867 emsg->count = n - 3; 1969 emsg->str = s;
1868 for (i = 3; i < n; i++) 1970 emsg->count = n - 4;
1971 for (i = 4; i < n; i++)
1869 { 1972 {
1870 float f;
1871
1872 ptr = embryo_data_address_get(ep, params[i]); 1973 ptr = embryo_data_address_get(ep, params[i]);
1873 if (ptr) 1974 if (ptr) emsg->val[i - 4] = (int)*ptr;
1874 { 1975 else emsg->val[i - 4] = 0;
1875 f = EMBRYO_CELL_TO_FLOAT(*ptr);
1876 emsg->val[i - 3] = (double)f;
1877 }
1878 else
1879 emsg->val[i - 3] = 0.0;
1880 } 1976 }
1881 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg); 1977 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1882 } 1978 }
1883 break; 1979 }
1884 case EDJE_MESSAGE_STRING_INT: 1980 break;
1885 {
1886 Edje_Message_String_Int *emsg;
1887 Embryo_Cell *cptr;
1888 1981
1889 cptr = embryo_data_address_get(ep, params[3]); 1982 case EDJE_MESSAGE_STRING_FLOAT_SET:
1890 if (cptr) 1983 {
1891 { 1984 Edje_Message_String_Float_Set *emsg;
1892 int l; 1985 Embryo_Cell *cptr;
1893 char *s;
1894 1986
1895 l = embryo_data_string_length_get(ep, cptr); 1987 cptr = embryo_data_address_get(ep, params[3]);
1896 s = alloca(l + 1); 1988 if (cptr)
1897 s[0] = 0;
1898 embryo_data_string_get(ep, cptr, s);
1899 emsg = alloca(sizeof(Edje_Message_String_Int));
1900 emsg->str = s;
1901 ptr = embryo_data_address_get(ep, params[4]);
1902 if (ptr) emsg->val = (int)*ptr;
1903 else emsg->val = 0;
1904 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1905 }
1906 }
1907 break;
1908 case EDJE_MESSAGE_STRING_FLOAT:
1909 { 1989 {
1910 Edje_Message_String_Float *emsg; 1990 int l;
1911 Embryo_Cell *cptr; 1991 char *s;
1912 1992
1913 cptr = embryo_data_address_get(ep, params[3]); 1993 l = embryo_data_string_length_get(ep, cptr);
1914 if (cptr) 1994 s = alloca(l + 1);
1995 s[0] = 0;
1996 embryo_data_string_get(ep, cptr, s);
1997 n = (params[0] / sizeof(Embryo_Cell)) + 1;
1998 emsg = alloca(sizeof(Edje_Message_String_Float_Set) + ((n - 4 - 1) * sizeof(double)));
1999 emsg->str = s;
2000 emsg->count = n - 4;
2001 for (i = 4; i < n; i++)
1915 { 2002 {
1916 int l;
1917 char *s;
1918 float f; 2003 float f;
1919 2004
1920 l = embryo_data_string_length_get(ep, cptr); 2005 ptr = embryo_data_address_get(ep, params[i]);
1921 s = alloca(l + 1);
1922 s[0] = 0;
1923 embryo_data_string_get(ep, cptr, s);
1924 emsg = alloca(sizeof(Edje_Message_String_Float));
1925 emsg->str = s;
1926 ptr = embryo_data_address_get(ep, params[4]);
1927 if (ptr) 2006 if (ptr)
1928 { 2007 {
1929 f = EMBRYO_CELL_TO_FLOAT(*ptr); 2008 f = EMBRYO_CELL_TO_FLOAT(*ptr);
1930 emsg->val = (double)f; 2009 emsg->val[i - 4] = (double)f;
1931 } 2010 }
1932 else 2011 else
1933 emsg->val = 0.0; 2012 emsg->val[i - 4] = 0.0;
1934 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1935 }
1936 }
1937 break;
1938 case EDJE_MESSAGE_STRING_INT_SET:
1939 {
1940 Edje_Message_String_Int_Set *emsg;
1941 Embryo_Cell *cptr;
1942
1943 cptr = embryo_data_address_get(ep, params[3]);
1944 if (cptr)
1945 {
1946 int l;
1947 char *s;
1948
1949 l = embryo_data_string_length_get(ep, cptr);
1950 s = alloca(l + 1);
1951 s[0] = 0;
1952 embryo_data_string_get(ep, cptr, s);
1953 n = (params[0] / sizeof(Embryo_Cell)) + 1;
1954 emsg = alloca(sizeof(Edje_Message_String_Int_Set) + ((n - 4 - 1) * sizeof(int)));
1955 emsg->str = s;
1956 emsg->count = n - 4;
1957 for (i = 4; i < n; i++)
1958 {
1959 ptr = embryo_data_address_get(ep, params[i]);
1960 if (ptr) emsg->val[i - 4] = (int)*ptr;
1961 else emsg->val[i - 4] = 0;
1962 }
1963 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1964 } 2013 }
2014 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
1965 } 2015 }
1966 break; 2016 }
1967 case EDJE_MESSAGE_STRING_FLOAT_SET: 2017 break;
1968 {
1969 Edje_Message_String_Float_Set *emsg;
1970 Embryo_Cell *cptr;
1971
1972 cptr = embryo_data_address_get(ep, params[3]);
1973 if (cptr)
1974 {
1975 int l;
1976 char *s;
1977 2018
1978 l = embryo_data_string_length_get(ep, cptr);
1979 s = alloca(l + 1);
1980 s[0] = 0;
1981 embryo_data_string_get(ep, cptr, s);
1982 n = (params[0] / sizeof(Embryo_Cell)) + 1;
1983 emsg = alloca(sizeof(Edje_Message_String_Float_Set) + ((n - 4 - 1) * sizeof(double)));
1984 emsg->str = s;
1985 emsg->count = n - 4;
1986 for (i = 4; i < n; i++)
1987 {
1988 float f;
1989
1990 ptr = embryo_data_address_get(ep, params[i]);
1991 if (ptr)
1992 {
1993 f = EMBRYO_CELL_TO_FLOAT(*ptr);
1994 emsg->val[i - 4] = (double)f;
1995 }
1996 else
1997 emsg->val[i - 4] = 0.0;
1998 }
1999 _edje_util_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
2000 }
2001 }
2002 break;
2003 default: 2019 default:
2004 break; 2020 break;
2005 } 2021 }
2006 return(0); 2022 return 0;
2007} 2023}
2008 2024
2009/* custom_state(part_id, state[], Float:state_val = 0.0) */ 2025/* custom_state(part_id, state[], Float:state_val = 0.0) */
@@ -2041,19 +2057,19 @@ _edje_embryo_fn_custom_state(Embryo_Program *ep, Embryo_Cell *params)
2041 switch (rp->part->type) 2057 switch (rp->part->type)
2042 { 2058 {
2043#define ALLOC_DESC(Short, Type, To) \ 2059#define ALLOC_DESC(Short, Type, To) \
2044 case EDJE_PART_TYPE_##Short: To = calloc(1, sizeof (Edje_Part_Description_##Type)); break; 2060case EDJE_PART_TYPE_##Short: To = calloc(1, sizeof (Edje_Part_Description_##Type)); break;
2045 2061
2046#define ALLOC_COPY_DESC(Short, Type, To, Spec) \ 2062#define ALLOC_COPY_DESC(Short, Type, To, Spec) \
2047 case EDJE_PART_TYPE_##Short: \ 2063case EDJE_PART_TYPE_##Short: \
2048 { \ 2064{ \
2049 Edje_Part_Description_##Type *tmp; \ 2065 Edje_Part_Description_##Type * tmp; \
2050 Edje_Part_Description_##Type *new; \ 2066 Edje_Part_Description_##Type * new; \
2051 tmp = (Edje_Part_Description_##Type *) parent; \ 2067 tmp = (Edje_Part_Description_##Type *)parent; \
2052 new = calloc(1, sizeof (Edje_Part_Description_##Type)); \ 2068 new = calloc(1, sizeof (Edje_Part_Description_##Type)); \
2053 new->Spec = tmp->Spec; \ 2069 new->Spec = tmp->Spec; \
2054 d = &new->common; \ 2070 d = &new->common; \
2055 break; \ 2071 break; \
2056 } 2072}
2057 2073
2058 ALLOC_DESC(RECTANGLE, Common, d); 2074 ALLOC_DESC(RECTANGLE, Common, d);
2059 ALLOC_DESC(SPACER, Common, d); 2075 ALLOC_DESC(SPACER, Common, d);
@@ -2098,12 +2114,12 @@ _edje_embryo_fn_custom_state(Embryo_Program *ep, Embryo_Cell *params)
2098 Edje_Part_Description_Image *img_desc; 2114 Edje_Part_Description_Image *img_desc;
2099 Edje_Part_Description_Image *parent_img_desc; 2115 Edje_Part_Description_Image *parent_img_desc;
2100 2116
2101 img_desc = (Edje_Part_Description_Image*) d; 2117 img_desc = (Edje_Part_Description_Image *)d;
2102 parent_img_desc = (Edje_Part_Description_Image*) parent; 2118 parent_img_desc = (Edje_Part_Description_Image *)parent;
2103 2119
2104 img_desc->image.tweens_count = parent_img_desc->image.tweens_count; 2120 img_desc->image.tweens_count = parent_img_desc->image.tweens_count;
2105 img_desc->image.tweens = calloc(img_desc->image.tweens_count, 2121 img_desc->image.tweens = calloc(img_desc->image.tweens_count,
2106 sizeof(Edje_Part_Image_Id*)); 2122 sizeof(Edje_Part_Image_Id *));
2107 if (img_desc->image.tweens) 2123 if (img_desc->image.tweens)
2108 { 2124 {
2109 unsigned int i; 2125 unsigned int i;
@@ -2130,7 +2146,7 @@ _edje_embryo_fn_custom_state(Embryo_Program *ep, Embryo_Cell *params)
2130 { 2146 {
2131 Edje_Part_Description_Text *text_desc; 2147 Edje_Part_Description_Text *text_desc;
2132 2148
2133 text_desc = (Edje_Part_Description_Text*) d; 2149 text_desc = (Edje_Part_Description_Text *)d;
2134 2150
2135 text_desc->text.text_class = DUP(text_desc->text.text_class); 2151 text_desc->text.text_class = DUP(text_desc->text.text_class);
2136 text_desc->text.text.str = DUP(edje_string_get(&text_desc->text.text)); 2152 text_desc->text.text.str = DUP(edje_string_get(&text_desc->text.text));
@@ -2158,7 +2174,7 @@ _edje_embryo_fn_set_state_val(Embryo_Program *ep, Embryo_Cell *params)
2158 char *s; 2174 char *s;
2159 2175
2160 /* we need at least 3 arguments */ 2176 /* we need at least 3 arguments */
2161 if (params[0] < (int) (sizeof(Embryo_Cell) * 3)) 2177 if (params[0] < (int)(sizeof(Embryo_Cell) * 3))
2162 return 0; 2178 return 0;
2163 2179
2164 if (params[1] < 0) 2180 if (params[1] < 0)
@@ -2174,557 +2190,616 @@ _edje_embryo_fn_set_state_val(Embryo_Program *ep, Embryo_Cell *params)
2174 switch (params[2]) 2190 switch (params[2])
2175 { 2191 {
2176 case EDJE_STATE_PARAM_ALIGNMENT: 2192 case EDJE_STATE_PARAM_ALIGNMENT:
2177 CHKPARAM(4); 2193 CHKPARAM(4);
2178 2194
2179 GETFLOAT_T(rp->custom->description->align.x, params[3]); 2195 GETFLOAT_T(rp->custom->description->align.x, params[3]);
2180 GETFLOAT_T(rp->custom->description->align.y, params[4]); 2196 GETFLOAT_T(rp->custom->description->align.y, params[4]);
2197
2198 break;
2181 2199
2182 break;
2183 case EDJE_STATE_PARAM_MIN: 2200 case EDJE_STATE_PARAM_MIN:
2184 CHKPARAM(4); 2201 CHKPARAM(4);
2185 2202
2186 GETINT(rp->custom->description->min.w, params[3]); 2203 GETINT(rp->custom->description->min.w, params[3]);
2187 GETINT(rp->custom->description->min.h, params[4]); 2204 GETINT(rp->custom->description->min.h, params[4]);
2205
2206 break;
2188 2207
2189 break;
2190 case EDJE_STATE_PARAM_MAX: 2208 case EDJE_STATE_PARAM_MAX:
2191 CHKPARAM(4); 2209 CHKPARAM(4);
2192 2210
2193 GETINT(rp->custom->description->max.w, params[3]); 2211 GETINT(rp->custom->description->max.w, params[3]);
2194 GETINT(rp->custom->description->max.h, params[4]); 2212 GETINT(rp->custom->description->max.h, params[4]);
2213
2214 break;
2195 2215
2196 break;
2197 case EDJE_STATE_PARAM_STEP: 2216 case EDJE_STATE_PARAM_STEP:
2198 CHKPARAM(4); 2217 CHKPARAM(4);
2199 2218
2200 GETINT(rp->custom->description->step.x, params[3]); 2219 GETINT(rp->custom->description->step.x, params[3]);
2201 GETINT(rp->custom->description->step.y, params[4]); 2220 GETINT(rp->custom->description->step.y, params[4]);
2221
2222 break;
2202 2223
2203 break;
2204 case EDJE_STATE_PARAM_ASPECT: 2224 case EDJE_STATE_PARAM_ASPECT:
2205 CHKPARAM(4); 2225 CHKPARAM(4);
2206 2226
2207 GETFLOAT_T(rp->custom->description->aspect.min, params[3]); 2227 GETFLOAT_T(rp->custom->description->aspect.min, params[3]);
2208 GETFLOAT_T(rp->custom->description->aspect.max, params[4]); 2228 GETFLOAT_T(rp->custom->description->aspect.max, params[4]);
2229
2230 break;
2209 2231
2210 break;
2211 case EDJE_STATE_PARAM_ASPECT_PREF: 2232 case EDJE_STATE_PARAM_ASPECT_PREF:
2212 CHKPARAM(3); 2233 CHKPARAM(3);
2213 2234
2214 GETINT(rp->custom->description->aspect.prefer, params[3]); 2235 GETINT(rp->custom->description->aspect.prefer, params[3]);
2236
2237 break;
2215 2238
2216 break;
2217 case EDJE_STATE_PARAM_COLOR: 2239 case EDJE_STATE_PARAM_COLOR:
2218 CHKPARAM(6); 2240 CHKPARAM(6);
2219 2241
2220 GETINT(rp->custom->description->color.r, params[3]); 2242 GETINT(rp->custom->description->color.r, params[3]);
2221 GETINT(rp->custom->description->color.g, params[4]); 2243 GETINT(rp->custom->description->color.g, params[4]);
2222 GETINT(rp->custom->description->color.b, params[5]); 2244 GETINT(rp->custom->description->color.b, params[5]);
2223 GETINT(rp->custom->description->color.a, params[6]); 2245 GETINT(rp->custom->description->color.a, params[6]);
2246
2247 break;
2224 2248
2225 break;
2226 case EDJE_STATE_PARAM_COLOR2: 2249 case EDJE_STATE_PARAM_COLOR2:
2227 CHKPARAM(6); 2250 CHKPARAM(6);
2228 2251
2229 GETINT(rp->custom->description->color2.r, params[3]); 2252 GETINT(rp->custom->description->color2.r, params[3]);
2230 GETINT(rp->custom->description->color2.g, params[4]); 2253 GETINT(rp->custom->description->color2.g, params[4]);
2231 GETINT(rp->custom->description->color2.b, params[5]); 2254 GETINT(rp->custom->description->color2.b, params[5]);
2232 GETINT(rp->custom->description->color2.a, params[6]); 2255 GETINT(rp->custom->description->color2.a, params[6]);
2256
2257 break;
2233 2258
2234 break;
2235 case EDJE_STATE_PARAM_COLOR3: 2259 case EDJE_STATE_PARAM_COLOR3:
2236 { 2260 {
2237 Edje_Part_Description_Text *text; 2261 Edje_Part_Description_Text *text;
2238 2262
2239 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) && 2263 if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
2240 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) 2264 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
2241 return 0; 2265 return 0;
2242 2266
2243 CHKPARAM(6); 2267 CHKPARAM(6);
2244 2268
2245 text = (Edje_Part_Description_Text*) rp->custom->description; 2269 text = (Edje_Part_Description_Text *)rp->custom->description;
2270
2271 GETINT(text->text.color3.r, params[3]);
2272 GETINT(text->text.color3.g, params[4]);
2273 GETINT(text->text.color3.b, params[5]);
2274 GETINT(text->text.color3.a, params[6]);
2275 break;
2276 }
2246 2277
2247 GETINT(text->text.color3.r, params[3]);
2248 GETINT(text->text.color3.g, params[4]);
2249 GETINT(text->text.color3.b, params[5]);
2250 GETINT(text->text.color3.a, params[6]);
2251 break;
2252 }
2253 case EDJE_STATE_PARAM_COLOR_CLASS: 2278 case EDJE_STATE_PARAM_COLOR_CLASS:
2254 CHKPARAM(3); 2279 CHKPARAM(3);
2255 2280
2256 GETSTR(s, params[3]); 2281 GETSTR(s, params[3]);
2257 GETSTREVAS(s, rp->custom->description->color_class); 2282 GETSTREVAS(s, rp->custom->description->color_class);
2283
2284 break;
2258 2285
2259 break;
2260 case EDJE_STATE_PARAM_REL1: 2286 case EDJE_STATE_PARAM_REL1:
2261 CHKPARAM(4); 2287 CHKPARAM(4);
2262 2288
2263 GETFLOAT_T(rp->custom->description->rel1.relative_x, params[3]); 2289 GETFLOAT_T(rp->custom->description->rel1.relative_x, params[3]);
2264 GETFLOAT_T(rp->custom->description->rel1.relative_y, params[4]); 2290 GETFLOAT_T(rp->custom->description->rel1.relative_y, params[4]);
2291
2292 break;
2265 2293
2266 break;
2267 case EDJE_STATE_PARAM_REL1_TO: 2294 case EDJE_STATE_PARAM_REL1_TO:
2268 CHKPARAM(4); 2295 CHKPARAM(4);
2269 2296
2270 GETINT(rp->custom->description->rel1.id_x, params[3]); 2297 GETINT(rp->custom->description->rel1.id_x, params[3]);
2271 GETINT(rp->custom->description->rel1.id_y, params[4]); 2298 GETINT(rp->custom->description->rel1.id_y, params[4]);
2299
2300 break;
2272 2301
2273 break;
2274 case EDJE_STATE_PARAM_REL1_OFFSET: 2302 case EDJE_STATE_PARAM_REL1_OFFSET:
2275 CHKPARAM(4); 2303 CHKPARAM(4);
2276 2304
2277 GETINT(rp->custom->description->rel1.offset_x, params[3]); 2305 GETINT(rp->custom->description->rel1.offset_x, params[3]);
2278 GETINT(rp->custom->description->rel1.offset_y, params[4]); 2306 GETINT(rp->custom->description->rel1.offset_y, params[4]);
2307
2308 break;
2279 2309
2280 break;
2281 case EDJE_STATE_PARAM_REL2: 2310 case EDJE_STATE_PARAM_REL2:
2282 CHKPARAM(4); 2311 CHKPARAM(4);
2283 2312
2284 GETFLOAT_T(rp->custom->description->rel2.relative_x, params[3]); 2313 GETFLOAT_T(rp->custom->description->rel2.relative_x, params[3]);
2285 GETFLOAT_T(rp->custom->description->rel2.relative_y, params[4]); 2314 GETFLOAT_T(rp->custom->description->rel2.relative_y, params[4]);
2315
2316 break;
2286 2317
2287 break;
2288 case EDJE_STATE_PARAM_REL2_TO: 2318 case EDJE_STATE_PARAM_REL2_TO:
2289 CHKPARAM(4); 2319 CHKPARAM(4);
2290 2320
2291 GETINT(rp->custom->description->rel2.id_x, params[3]); 2321 GETINT(rp->custom->description->rel2.id_x, params[3]);
2292 GETINT(rp->custom->description->rel2.id_y, params[4]); 2322 GETINT(rp->custom->description->rel2.id_y, params[4]);
2323
2324 break;
2293 2325
2294 break;
2295 case EDJE_STATE_PARAM_REL2_OFFSET: 2326 case EDJE_STATE_PARAM_REL2_OFFSET:
2296 CHKPARAM(4); 2327 CHKPARAM(4);
2297 2328
2298 GETINT(rp->custom->description->rel2.offset_x, params[3]); 2329 GETINT(rp->custom->description->rel2.offset_x, params[3]);
2299 GETINT(rp->custom->description->rel2.offset_y, params[4]); 2330 GETINT(rp->custom->description->rel2.offset_y, params[4]);
2331
2332 break;
2300 2333
2301 break;
2302 case EDJE_STATE_PARAM_IMAGE: 2334 case EDJE_STATE_PARAM_IMAGE:
2303 { 2335 {
2304 Edje_Part_Description_Image *img; 2336 Edje_Part_Description_Image *img;
2305 2337
2306 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0; 2338 if ((rp->part->type != EDJE_PART_TYPE_IMAGE)) return 0;
2307 CHKPARAM(3); 2339 CHKPARAM(3);
2308 2340
2309 img = (Edje_Part_Description_Image*) rp->custom->description; 2341 img = (Edje_Part_Description_Image *)rp->custom->description;
2310 GETINT(img->image.id, params[3]); 2342 GETINT(img->image.id, params[3]);
2311 2343
2312 break; 2344 break;
2313 } 2345 }
2314 case EDJE_STATE_PARAM_BORDER:
2315 {
2316 Edje_Part_Description_Image *img;
2317
2318 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
2319 CHKPARAM(6);
2320 2346
2321 img = (Edje_Part_Description_Image*) rp->custom->description; 2347 case EDJE_STATE_PARAM_BORDER:
2348 {
2349 Edje_Part_Description_Image *img;
2322 2350
2323 GETINT(img->image.border.l, params[3]); 2351 if ((rp->part->type != EDJE_PART_TYPE_IMAGE)) return 0;
2324 GETINT(img->image.border.r, params[4]); 2352 CHKPARAM(6);
2325 GETINT(img->image.border.t, params[5]);
2326 GETINT(img->image.border.b, params[6]);
2327 2353
2328 break; 2354 img = (Edje_Part_Description_Image *)rp->custom->description;
2329 }
2330 case EDJE_STATE_PARAM_FILL_SMOOTH:
2331 {
2332 Edje_Part_Description_Image *img;
2333 Edje_Part_Description_Proxy *proxy;
2334 2355
2335 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) && (rp->part->type != EDJE_PART_TYPE_PROXY) ) return 0; 2356 GETINT(img->image.border.l, params[3]);
2336 CHKPARAM(3); 2357 GETINT(img->image.border.r, params[4]);
2358 GETINT(img->image.border.t, params[5]);
2359 GETINT(img->image.border.b, params[6]);
2337 2360
2338 if (rp->part->type == EDJE_PART_TYPE_IMAGE) 2361 break;
2339 {
2340 img = (Edje_Part_Description_Image*) rp->custom->description;
2341 GETINT(img->image.fill.smooth, params[3]);
2342 } 2362 }
2343 else 2363
2364 case EDJE_STATE_PARAM_FILL_SMOOTH:
2344 { 2365 {
2345 proxy = (Edje_Part_Description_Proxy*) rp->custom->description; 2366 Edje_Part_Description_Image *img;
2346 GETINT(proxy->proxy.fill.smooth, params[3]); 2367 Edje_Part_Description_Proxy *proxy;
2347 }
2348 2368
2349 break; 2369 if ((rp->part->type != EDJE_PART_TYPE_IMAGE) && (rp->part->type != EDJE_PART_TYPE_PROXY)) return 0;
2370 CHKPARAM(3);
2371
2372 if (rp->part->type == EDJE_PART_TYPE_IMAGE)
2373 {
2374 img = (Edje_Part_Description_Image *)rp->custom->description;
2375 GETINT(img->image.fill.smooth, params[3]);
2350 } 2376 }
2351 case EDJE_STATE_PARAM_FILL_POS: 2377 else
2352 { 2378 {
2353 Edje_Part_Description_Image *img; 2379 proxy = (Edje_Part_Description_Proxy *)rp->custom->description;
2354 Edje_Part_Description_Proxy *proxy; 2380 GETINT(proxy->proxy.fill.smooth, params[3]);
2381 }
2355 2382
2356 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) && (rp->part->type != EDJE_PART_TYPE_PROXY) ) return 0; 2383 break;
2357 CHKPARAM(6); 2384 }
2358 2385
2359 if (rp->part->type == EDJE_PART_TYPE_IMAGE) 2386 case EDJE_STATE_PARAM_FILL_POS:
2360 { 2387 {
2361 img = (Edje_Part_Description_Image*) rp->custom->description; 2388 Edje_Part_Description_Image *img;
2389 Edje_Part_Description_Proxy *proxy;
2362 2390
2363 GETFLOAT_T(img->image.fill.pos_rel_x, params[3]); 2391 if ((rp->part->type != EDJE_PART_TYPE_IMAGE) && (rp->part->type != EDJE_PART_TYPE_PROXY)) return 0;
2364 GETFLOAT_T(img->image.fill.pos_rel_y, params[4]); 2392 CHKPARAM(6);
2365 GETINT(img->image.fill.pos_abs_x, params[5]);
2366 GETINT(img->image.fill.pos_abs_y, params[6]);
2367 }
2368 else
2369 {
2370 proxy = (Edje_Part_Description_Proxy*) rp->custom->description;
2371 2393
2372 GETFLOAT_T(proxy->proxy.fill.pos_rel_x, params[3]); 2394 if (rp->part->type == EDJE_PART_TYPE_IMAGE)
2373 GETFLOAT_T(proxy->proxy.fill.pos_rel_y, params[4]); 2395 {
2374 GETINT(proxy->proxy.fill.pos_abs_x, params[5]); 2396 img = (Edje_Part_Description_Image *)rp->custom->description;
2375 GETINT(proxy->proxy.fill.pos_abs_y, params[6]);
2376 }
2377 2397
2378 break; 2398 GETFLOAT_T(img->image.fill.pos_rel_x, params[3]);
2399 GETFLOAT_T(img->image.fill.pos_rel_y, params[4]);
2400 GETINT(img->image.fill.pos_abs_x, params[5]);
2401 GETINT(img->image.fill.pos_abs_y, params[6]);
2379 } 2402 }
2380 case EDJE_STATE_PARAM_FILL_SIZE: 2403 else
2381 { 2404 {
2382 Edje_Part_Description_Image *img; 2405 proxy = (Edje_Part_Description_Proxy *)rp->custom->description;
2383 Edje_Part_Description_Proxy *proxy;
2384 2406
2385 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) && (rp->part->type != EDJE_PART_TYPE_PROXY) ) return 0; 2407 GETFLOAT_T(proxy->proxy.fill.pos_rel_x, params[3]);
2386 CHKPARAM(6); 2408 GETFLOAT_T(proxy->proxy.fill.pos_rel_y, params[4]);
2409 GETINT(proxy->proxy.fill.pos_abs_x, params[5]);
2410 GETINT(proxy->proxy.fill.pos_abs_y, params[6]);
2411 }
2387 2412
2388 if (rp->part->type == EDJE_PART_TYPE_IMAGE) 2413 break;
2389 { 2414 }
2390 img = (Edje_Part_Description_Image*) rp->custom->description;
2391 2415
2392 GETFLOAT_T(img->image.fill.rel_x, params[3]); 2416 case EDJE_STATE_PARAM_FILL_SIZE:
2393 GETFLOAT_T(img->image.fill.rel_y, params[4]); 2417 {
2394 GETINT(img->image.fill.abs_x, params[5]); 2418 Edje_Part_Description_Image *img;
2395 GETINT(img->image.fill.abs_y, params[6]); 2419 Edje_Part_Description_Proxy *proxy;
2396 }
2397 else
2398 {
2399 proxy = (Edje_Part_Description_Proxy*) rp->custom->description;
2400 2420
2401 GETFLOAT_T(proxy->proxy.fill.rel_x, params[3]); 2421 if ((rp->part->type != EDJE_PART_TYPE_IMAGE) && (rp->part->type != EDJE_PART_TYPE_PROXY)) return 0;
2402 GETFLOAT_T(proxy->proxy.fill.rel_y, params[4]); 2422 CHKPARAM(6);
2403 GETINT(proxy->proxy.fill.abs_x, params[5]);
2404 GETINT(proxy->proxy.fill.abs_y, params[6]);
2405 }
2406 2423
2407 break; 2424 if (rp->part->type == EDJE_PART_TYPE_IMAGE)
2425 {
2426 img = (Edje_Part_Description_Image *)rp->custom->description;
2427
2428 GETFLOAT_T(img->image.fill.rel_x, params[3]);
2429 GETFLOAT_T(img->image.fill.rel_y, params[4]);
2430 GETINT(img->image.fill.abs_x, params[5]);
2431 GETINT(img->image.fill.abs_y, params[6]);
2408 } 2432 }
2409 case EDJE_STATE_PARAM_TEXT: 2433 else
2410 { 2434 {
2411 Edje_Part_Description_Text *text; 2435 proxy = (Edje_Part_Description_Proxy *)rp->custom->description;
2436
2437 GETFLOAT_T(proxy->proxy.fill.rel_x, params[3]);
2438 GETFLOAT_T(proxy->proxy.fill.rel_y, params[4]);
2439 GETINT(proxy->proxy.fill.abs_x, params[5]);
2440 GETINT(proxy->proxy.fill.abs_y, params[6]);
2441 }
2442
2443 break;
2444 }
2412 2445
2413 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) && 2446 case EDJE_STATE_PARAM_TEXT:
2414 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) 2447 {
2415 return 0; 2448 Edje_Part_Description_Text *text;
2416 CHKPARAM(3);
2417 2449
2418 GETSTR(s, params[3]); 2450 if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
2451 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
2452 return 0;
2453 CHKPARAM(3);
2419 2454
2420 text = (Edje_Part_Description_Text*) rp->custom->description; 2455 GETSTR(s, params[3]);
2421 GETSTREVAS(s, text->text.text.str); 2456
2457 text = (Edje_Part_Description_Text *)rp->custom->description;
2458 GETSTREVAS(s, text->text.text.str);
2459
2460 break;
2461 }
2422 2462
2423 break;
2424 }
2425 case EDJE_STATE_PARAM_TEXT_CLASS: 2463 case EDJE_STATE_PARAM_TEXT_CLASS:
2426 { 2464 {
2427 Edje_Part_Description_Text *text; 2465 Edje_Part_Description_Text *text;
2428 2466
2429 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) && 2467 if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
2430 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) 2468 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
2431 return 0; 2469 return 0;
2432 CHKPARAM(3); 2470 CHKPARAM(3);
2433 2471
2434 GETSTR(s, params[3]); 2472 GETSTR(s, params[3]);
2435 2473
2436 text = (Edje_Part_Description_Text*) rp->custom->description; 2474 text = (Edje_Part_Description_Text *)rp->custom->description;
2437 GETSTREVAS(s, text->text.text_class); 2475 GETSTREVAS(s, text->text.text_class);
2476
2477 break;
2478 }
2438 2479
2439 break;
2440 }
2441 case EDJE_STATE_PARAM_TEXT_FONT: 2480 case EDJE_STATE_PARAM_TEXT_FONT:
2442 { 2481 {
2443 Edje_Part_Description_Text *text; 2482 Edje_Part_Description_Text *text;
2444 2483
2445 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0; 2484 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
2446 CHKPARAM(3); 2485 CHKPARAM(3);
2447 2486
2448 GETSTR(s, params[3]); 2487 GETSTR(s, params[3]);
2449 2488
2450 text = (Edje_Part_Description_Text*) rp->custom->description; 2489 text = (Edje_Part_Description_Text *)rp->custom->description;
2451 GETSTREVAS(s, text->text.font.str); 2490 GETSTREVAS(s, text->text.font.str);
2491
2492 break;
2493 }
2452 2494
2453 break;
2454 }
2455 case EDJE_STATE_PARAM_TEXT_STYLE: 2495 case EDJE_STATE_PARAM_TEXT_STYLE:
2456 { 2496 {
2457 Edje_Part_Description_Text *text; 2497 Edje_Part_Description_Text *text;
2458 2498
2459 if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return 0; 2499 if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return 0;
2460 CHKPARAM(3); 2500 CHKPARAM(3);
2461 2501
2462 GETSTR(s, params[3]); 2502 GETSTR(s, params[3]);
2463 2503
2464 text = (Edje_Part_Description_Text*) rp->custom->description; 2504 text = (Edje_Part_Description_Text *)rp->custom->description;
2465 GETSTREVAS(s, text->text.style.str); 2505 GETSTREVAS(s, text->text.style.str);
2506
2507 break;
2508 }
2466 2509
2467 break;
2468 }
2469 case EDJE_STATE_PARAM_TEXT_SIZE: 2510 case EDJE_STATE_PARAM_TEXT_SIZE:
2470 { 2511 {
2471 Edje_Part_Description_Text *text; 2512 Edje_Part_Description_Text *text;
2472 2513
2473 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0; 2514 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
2474 CHKPARAM(3); 2515 CHKPARAM(3);
2475 2516
2476 text = (Edje_Part_Description_Text*) rp->custom->description; 2517 text = (Edje_Part_Description_Text *)rp->custom->description;
2477 GETINT(text->text.size, params[3]); 2518 GETINT(text->text.size, params[3]);
2519
2520 break;
2521 }
2478 2522
2479 break;
2480 }
2481 case EDJE_STATE_PARAM_TEXT_FIT: 2523 case EDJE_STATE_PARAM_TEXT_FIT:
2482 { 2524 {
2483 Edje_Part_Description_Text *text; 2525 Edje_Part_Description_Text *text;
2526
2527 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
2528 CHKPARAM(4);
2484 2529
2485 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0; 2530 text = (Edje_Part_Description_Text *)rp->custom->description;
2486 CHKPARAM(4);
2487 2531
2488 text = (Edje_Part_Description_Text*) rp->custom->description; 2532 GETINT(text->text.fit_x, params[3]);
2533 GETINT(text->text.fit_y, params[4]);
2489 2534
2490 GETINT(text->text.fit_x, params[3]); 2535 break;
2491 GETINT(text->text.fit_y, params[4]); 2536 }
2492 2537
2493 break;
2494 }
2495 case EDJE_STATE_PARAM_TEXT_MIN: 2538 case EDJE_STATE_PARAM_TEXT_MIN:
2496 { 2539 {
2497 Edje_Part_Description_Text *text; 2540 Edje_Part_Description_Text *text;
2498 2541
2499 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) && 2542 if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
2500 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) 2543 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
2501 return 0; 2544 return 0;
2502 CHKPARAM(4); 2545 CHKPARAM(4);
2503 2546
2504 text = (Edje_Part_Description_Text*) rp->custom->description; 2547 text = (Edje_Part_Description_Text *)rp->custom->description;
2505 2548
2506 GETINT(text->text.min_x, params[3]); 2549 GETINT(text->text.min_x, params[3]);
2507 GETINT(text->text.min_y, params[4]); 2550 GETINT(text->text.min_y, params[4]);
2551
2552 break;
2553 }
2508 2554
2509 break;
2510 }
2511 case EDJE_STATE_PARAM_TEXT_MAX: 2555 case EDJE_STATE_PARAM_TEXT_MAX:
2512 { 2556 {
2513 Edje_Part_Description_Text *text; 2557 Edje_Part_Description_Text *text;
2514 2558
2515 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) && 2559 if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
2516 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) 2560 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
2517 return 0; 2561 return 0;
2518 CHKPARAM(4); 2562 CHKPARAM(4);
2519 2563
2520 text = (Edje_Part_Description_Text*) rp->custom->description; 2564 text = (Edje_Part_Description_Text *)rp->custom->description;
2521 2565
2522 GETINT(text->text.max_x, params[3]); 2566 GETINT(text->text.max_x, params[3]);
2523 GETINT(text->text.max_y, params[4]); 2567 GETINT(text->text.max_y, params[4]);
2568
2569 break;
2570 }
2524 2571
2525 break;
2526 }
2527 case EDJE_STATE_PARAM_TEXT_ALIGN: 2572 case EDJE_STATE_PARAM_TEXT_ALIGN:
2528 { 2573 {
2529 Edje_Part_Description_Text *text; 2574 Edje_Part_Description_Text *text;
2530 2575
2531 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0; 2576 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
2532 CHKPARAM(4); 2577 CHKPARAM(4);
2533 2578
2534 text = (Edje_Part_Description_Text*) rp->custom->description; 2579 text = (Edje_Part_Description_Text *)rp->custom->description;
2535 2580
2536 GETFLOAT_T(text->text.align.x, params[3]); 2581 GETFLOAT_T(text->text.align.x, params[3]);
2537 GETFLOAT_T(text->text.align.y, params[4]); 2582 GETFLOAT_T(text->text.align.y, params[4]);
2583
2584 break;
2585 }
2538 2586
2539 break;
2540 }
2541 case EDJE_STATE_PARAM_VISIBLE: 2587 case EDJE_STATE_PARAM_VISIBLE:
2542 CHKPARAM(3); 2588 CHKPARAM(3);
2543 2589
2544 GETINT(rp->custom->description->visible, params[3]); 2590 GETINT(rp->custom->description->visible, params[3]);
2591
2592 break;
2545 2593
2546 break;
2547 case EDJE_STATE_PARAM_MAP_ON: 2594 case EDJE_STATE_PARAM_MAP_ON:
2548 CHKPARAM(3); 2595 CHKPARAM(3);
2549 2596
2550 GETINT(rp->custom->description->map.on, params[3]); 2597 GETINT(rp->custom->description->map.on, params[3]);
2598
2599 break;
2551 2600
2552 break;
2553 case EDJE_STATE_PARAM_MAP_PERSP: 2601 case EDJE_STATE_PARAM_MAP_PERSP:
2554 CHKPARAM(3); 2602 CHKPARAM(3);
2555 2603
2556 GETINT(rp->custom->description->map.id_persp, params[3]); 2604 GETINT(rp->custom->description->map.id_persp, params[3]);
2605
2606 break;
2557 2607
2558 break;
2559 case EDJE_STATE_PARAM_MAP_LIGHT: 2608 case EDJE_STATE_PARAM_MAP_LIGHT:
2560 CHKPARAM(3); 2609 CHKPARAM(3);
2561 2610
2562 GETINT(rp->custom->description->map.id_light, params[3]); 2611 GETINT(rp->custom->description->map.id_light, params[3]);
2612
2613 break;
2563 2614
2564 break;
2565 case EDJE_STATE_PARAM_MAP_ROT_CENTER: 2615 case EDJE_STATE_PARAM_MAP_ROT_CENTER:
2566 CHKPARAM(3); 2616 CHKPARAM(3);
2567 2617
2568 GETINT(rp->custom->description->map.rot.id_center, params[3]); 2618 GETINT(rp->custom->description->map.rot.id_center, params[3]);
2619
2620 break;
2569 2621
2570 break;
2571 case EDJE_STATE_PARAM_MAP_ROT_X: 2622 case EDJE_STATE_PARAM_MAP_ROT_X:
2572 CHKPARAM(3); 2623 CHKPARAM(3);
2573 2624
2574 GETFLOAT_T(rp->custom->description->map.rot.x, params[3]); 2625 GETFLOAT_T(rp->custom->description->map.rot.x, params[3]);
2626
2627 break;
2575 2628
2576 break;
2577 case EDJE_STATE_PARAM_MAP_ROT_Y: 2629 case EDJE_STATE_PARAM_MAP_ROT_Y:
2578 CHKPARAM(3); 2630 CHKPARAM(3);
2579 2631
2580 GETFLOAT_T(rp->custom->description->map.rot.y, params[3]); 2632 GETFLOAT_T(rp->custom->description->map.rot.y, params[3]);
2633
2634 break;
2581 2635
2582 break;
2583 case EDJE_STATE_PARAM_MAP_ROT_Z: 2636 case EDJE_STATE_PARAM_MAP_ROT_Z:
2584 CHKPARAM(3); 2637 CHKPARAM(3);
2585 2638
2586 GETFLOAT_T(rp->custom->description->map.rot.z, params[3]); 2639 GETFLOAT_T(rp->custom->description->map.rot.z, params[3]);
2640
2641 break;
2587 2642
2588 break;
2589 case EDJE_STATE_PARAM_MAP_BACK_CULL: 2643 case EDJE_STATE_PARAM_MAP_BACK_CULL:
2590 CHKPARAM(3); 2644 CHKPARAM(3);
2591 2645
2592 GETINT(rp->custom->description->map.backcull, params[3]); 2646 GETINT(rp->custom->description->map.backcull, params[3]);
2647
2648 break;
2593 2649
2594 break;
2595 case EDJE_STATE_PARAM_MAP_PERSP_ON: 2650 case EDJE_STATE_PARAM_MAP_PERSP_ON:
2596 CHKPARAM(3); 2651 CHKPARAM(3);
2597 2652
2598 GETINT(rp->custom->description->map.persp_on, params[3]); 2653 GETINT(rp->custom->description->map.persp_on, params[3]);
2654
2655 break;
2599 2656
2600 break;
2601 case EDJE_STATE_PARAM_PERSP_ZPLANE: 2657 case EDJE_STATE_PARAM_PERSP_ZPLANE:
2602 CHKPARAM(3); 2658 CHKPARAM(3);
2603 2659
2604 GETINT(rp->custom->description->persp.zplane, params[3]); 2660 GETINT(rp->custom->description->persp.zplane, params[3]);
2661
2662 break;
2605 2663
2606 break;
2607 case EDJE_STATE_PARAM_PERSP_FOCAL: 2664 case EDJE_STATE_PARAM_PERSP_FOCAL:
2608 CHKPARAM(3); 2665 CHKPARAM(3);
2609 2666
2610 GETINT(rp->custom->description->persp.focal, params[3]); 2667 GETINT(rp->custom->description->persp.focal, params[3]);
2668
2669 break;
2611 2670
2612 break;
2613 case EDJE_STATE_PARAM_PROXY_SRC_CLIP: 2671 case EDJE_STATE_PARAM_PROXY_SRC_CLIP:
2614 { 2672 {
2615 Edje_Part_Description_Proxy *proxy; 2673 Edje_Part_Description_Proxy *proxy;
2616 2674
2617 if ((rp->part->type != EDJE_PART_TYPE_PROXY)) return 0; 2675 if ((rp->part->type != EDJE_PART_TYPE_PROXY)) return 0;
2618 CHKPARAM(3); 2676 CHKPARAM(3);
2619 2677
2620 proxy = (Edje_Part_Description_Proxy*) rp->custom->description; 2678 proxy = (Edje_Part_Description_Proxy *)rp->custom->description;
2621 GETINT(proxy->proxy.source_clip, params[3]); 2679 GETINT(proxy->proxy.source_clip, params[3]);
2680
2681 break;
2682 }
2622 2683
2623 break;
2624 }
2625 case EDJE_STATE_PARAM_PROXY_SRC_VISIBLE: 2684 case EDJE_STATE_PARAM_PROXY_SRC_VISIBLE:
2626 { 2685 {
2627 Edje_Part_Description_Proxy *proxy; 2686 Edje_Part_Description_Proxy *proxy;
2628 2687
2629 if ((rp->part->type != EDJE_PART_TYPE_PROXY)) return 0; 2688 if ((rp->part->type != EDJE_PART_TYPE_PROXY)) return 0;
2630 CHKPARAM(3); 2689 CHKPARAM(3);
2631 2690
2632 proxy = (Edje_Part_Description_Proxy*) rp->custom->description; 2691 proxy = (Edje_Part_Description_Proxy *)rp->custom->description;
2633 GETINT(proxy->proxy.source_visible, params[3]); 2692 GETINT(proxy->proxy.source_visible, params[3]);
2693
2694 break;
2695 }
2634 2696
2635 break;
2636 }
2637#ifdef HAVE_EPHYSICS 2697#ifdef HAVE_EPHYSICS
2638 case EDJE_STATE_PARAM_PHYSICS_MASS: 2698 case EDJE_STATE_PARAM_PHYSICS_MASS:
2639 CHKPARAM(3); 2699 CHKPARAM(3);
2640 2700
2641 GETFLOAT_T(rp->custom->description->physics.mass, params[3]); 2701 GETFLOAT_T(rp->custom->description->physics.mass, params[3]);
2702
2703 break;
2642 2704
2643 break;
2644 case EDJE_STATE_PARAM_PHYSICS_RESTITUTION: 2705 case EDJE_STATE_PARAM_PHYSICS_RESTITUTION:
2645 CHKPARAM(3); 2706 CHKPARAM(3);
2646 2707
2647 GETFLOAT_T(rp->custom->description->physics.restitution, params[3]); 2708 GETFLOAT_T(rp->custom->description->physics.restitution, params[3]);
2709
2710 break;
2648 2711
2649 break;
2650 case EDJE_STATE_PARAM_PHYSICS_FRICTION: 2712 case EDJE_STATE_PARAM_PHYSICS_FRICTION:
2651 CHKPARAM(3); 2713 CHKPARAM(3);
2652 2714
2653 GETFLOAT_T(rp->custom->description->physics.friction, params[3]); 2715 GETFLOAT_T(rp->custom->description->physics.friction, params[3]);
2716
2717 break;
2654 2718
2655 break;
2656 case EDJE_STATE_PARAM_PHYSICS_DAMPING: 2719 case EDJE_STATE_PARAM_PHYSICS_DAMPING:
2657 CHKPARAM(4); 2720 CHKPARAM(4);
2658 2721
2659 GETFLOAT_T(rp->custom->description->physics.damping.linear, params[3]); 2722 GETFLOAT_T(rp->custom->description->physics.damping.linear, params[3]);
2660 GETFLOAT_T(rp->custom->description->physics.damping.angular, 2723 GETFLOAT_T(rp->custom->description->physics.damping.angular,
2661 params[4]); 2724 params[4]);
2725
2726 break;
2662 2727
2663 break;
2664 case EDJE_STATE_PARAM_PHYSICS_SLEEP: 2728 case EDJE_STATE_PARAM_PHYSICS_SLEEP:
2665 CHKPARAM(4); 2729 CHKPARAM(4);
2666 2730
2667 GETFLOAT_T(rp->custom->description->physics.sleep.linear, params[3]); 2731 GETFLOAT_T(rp->custom->description->physics.sleep.linear, params[3]);
2668 GETFLOAT_T(rp->custom->description->physics.sleep.angular, params[4]); 2732 GETFLOAT_T(rp->custom->description->physics.sleep.angular, params[4]);
2733
2734 break;
2669 2735
2670 break;
2671 case EDJE_STATE_PARAM_PHYSICS_MATERIAL: 2736 case EDJE_STATE_PARAM_PHYSICS_MATERIAL:
2672 CHKPARAM(3); 2737 CHKPARAM(3);
2738
2739 GETINT(rp->custom->description->physics.material, params[3]);
2740 break;
2673 2741
2674 GETINT(rp->custom->description->physics.material, params[3]);
2675 break;
2676 case EDJE_STATE_PARAM_PHYSICS_DENSITY: 2742 case EDJE_STATE_PARAM_PHYSICS_DENSITY:
2677 CHKPARAM(3); 2743 CHKPARAM(3);
2744
2745 GETFLOAT_T(rp->custom->description->physics.density, params[3]);
2746 break;
2678 2747
2679 GETFLOAT_T(rp->custom->description->physics.density, params[3]);
2680 break;
2681 case EDJE_STATE_PARAM_PHYSICS_HARDNESS: 2748 case EDJE_STATE_PARAM_PHYSICS_HARDNESS:
2682 CHKPARAM(3); 2749 CHKPARAM(3);
2750
2751 GETFLOAT_T(rp->custom->description->physics.hardness, params[3]);
2752 break;
2683 2753
2684 GETFLOAT_T(rp->custom->description->physics.hardness, params[3]);
2685 break;
2686 case EDJE_STATE_PARAM_PHYSICS_IGNORE_PART_POS: 2754 case EDJE_STATE_PARAM_PHYSICS_IGNORE_PART_POS:
2687 CHKPARAM(3); 2755 CHKPARAM(3);
2756
2757 GETINT(rp->custom->description->physics.ignore_part_pos, params[3]);
2758 break;
2688 2759
2689 GETINT(rp->custom->description->physics.ignore_part_pos, params[3]);
2690 break;
2691 case EDJE_STATE_PARAM_PHYSICS_LIGHT_ON: 2760 case EDJE_STATE_PARAM_PHYSICS_LIGHT_ON:
2692 CHKPARAM(3); 2761 CHKPARAM(3);
2762
2763 GETINT(rp->custom->description->physics.light_on, params[3]);
2764 break;
2693 2765
2694 GETINT(rp->custom->description->physics.light_on, params[3]);
2695 break;
2696 case EDJE_STATE_PARAM_PHYSICS_MOV_FREEDOM_LIN: 2766 case EDJE_STATE_PARAM_PHYSICS_MOV_FREEDOM_LIN:
2697 CHKPARAM(5); 2767 CHKPARAM(5);
2768
2769 GETINT(rp->custom->description->physics.mov_freedom.lin.x, params[3]);
2770 GETINT(rp->custom->description->physics.mov_freedom.lin.y, params[4]);
2771 GETINT(rp->custom->description->physics.mov_freedom.lin.z, params[5]);
2772 break;
2698 2773
2699 GETINT(rp->custom->description->physics.mov_freedom.lin.x, params[3]);
2700 GETINT(rp->custom->description->physics.mov_freedom.lin.y, params[4]);
2701 GETINT(rp->custom->description->physics.mov_freedom.lin.z, params[5]);
2702 break;
2703 case EDJE_STATE_PARAM_PHYSICS_MOV_FREEDOM_ANG: 2774 case EDJE_STATE_PARAM_PHYSICS_MOV_FREEDOM_ANG:
2704 CHKPARAM(5); 2775 CHKPARAM(5);
2776
2777 GETINT(rp->custom->description->physics.mov_freedom.ang.x, params[3]);
2778 GETINT(rp->custom->description->physics.mov_freedom.ang.y, params[4]);
2779 GETINT(rp->custom->description->physics.mov_freedom.ang.z, params[5]);
2780 break;
2705 2781
2706 GETINT(rp->custom->description->physics.mov_freedom.ang.x, params[3]);
2707 GETINT(rp->custom->description->physics.mov_freedom.ang.y, params[4]);
2708 GETINT(rp->custom->description->physics.mov_freedom.ang.z, params[5]);
2709 break;
2710 case EDJE_STATE_PARAM_PHYSICS_BACK_CULL: 2782 case EDJE_STATE_PARAM_PHYSICS_BACK_CULL:
2711 CHKPARAM(3); 2783 CHKPARAM(3);
2784
2785 GETINT(rp->custom->description->physics.backcull, params[3]);
2786 break;
2712 2787
2713 GETINT(rp->custom->description->physics.backcull, params[3]);
2714 break;
2715 case EDJE_STATE_PARAM_PHYSICS_Z: 2788 case EDJE_STATE_PARAM_PHYSICS_Z:
2716 CHKPARAM(3); 2789 CHKPARAM(3);
2790
2791 GETINT(rp->custom->description->physics.z, params[3]);
2792 break;
2717 2793
2718 GETINT(rp->custom->description->physics.z, params[3]);
2719 break;
2720 case EDJE_STATE_PARAM_PHYSICS_DEPTH: 2794 case EDJE_STATE_PARAM_PHYSICS_DEPTH:
2721 CHKPARAM(3); 2795 CHKPARAM(3);
2796
2797 GETINT(rp->custom->description->physics.depth, params[3]);
2798 break;
2722 2799
2723 GETINT(rp->custom->description->physics.depth, params[3]);
2724 break;
2725#endif 2800#endif
2726 default: 2801 default:
2727 break; 2802 break;
2728 } 2803 }
2729 2804
2730#ifdef EDJE_CALC_CACHE 2805#ifdef EDJE_CALC_CACHE
@@ -2743,7 +2818,7 @@ _edje_embryo_fn_get_state_val(Embryo_Program *ep, Embryo_Cell *params)
2743 char *s; 2818 char *s;
2744 2819
2745 /* we need at least 3 arguments */ 2820 /* we need at least 3 arguments */
2746 if (params[0] < (int) (sizeof(Embryo_Cell) * 3)) 2821 if (params[0] < (int)(sizeof(Embryo_Cell) * 3))
2747 return 0; 2822 return 0;
2748 2823
2749 if (params[1] < 0) 2824 if (params[1] < 0)
@@ -2759,570 +2834,629 @@ _edje_embryo_fn_get_state_val(Embryo_Program *ep, Embryo_Cell *params)
2759 switch (params[2]) 2834 switch (params[2])
2760 { 2835 {
2761 case EDJE_STATE_PARAM_ALIGNMENT: 2836 case EDJE_STATE_PARAM_ALIGNMENT:
2762 CHKPARAM(4); 2837 CHKPARAM(4);
2763 2838
2764 SETFLOAT_T(rp->custom->description->align.x, params[3]); 2839 SETFLOAT_T(rp->custom->description->align.x, params[3]);
2765 SETFLOAT_T(rp->custom->description->align.y, params[4]); 2840 SETFLOAT_T(rp->custom->description->align.y, params[4]);
2841
2842 break;
2766 2843
2767 break;
2768 case EDJE_STATE_PARAM_MIN: 2844 case EDJE_STATE_PARAM_MIN:
2769 CHKPARAM(4); 2845 CHKPARAM(4);
2770 2846
2771 SETINT(rp->custom->description->min.w, params[3]); 2847 SETINT(rp->custom->description->min.w, params[3]);
2772 SETINT(rp->custom->description->min.h, params[4]); 2848 SETINT(rp->custom->description->min.h, params[4]);
2849
2850 break;
2773 2851
2774 break;
2775 case EDJE_STATE_PARAM_MAX: 2852 case EDJE_STATE_PARAM_MAX:
2776 CHKPARAM(4); 2853 CHKPARAM(4);
2777 2854
2778 SETINT(rp->custom->description->max.w, params[3]); 2855 SETINT(rp->custom->description->max.w, params[3]);
2779 SETINT(rp->custom->description->max.h, params[4]); 2856 SETINT(rp->custom->description->max.h, params[4]);
2857
2858 break;
2780 2859
2781 break;
2782 case EDJE_STATE_PARAM_STEP: 2860 case EDJE_STATE_PARAM_STEP:
2783 CHKPARAM(4); 2861 CHKPARAM(4);
2784 2862
2785 SETINT(rp->custom->description->step.x, params[3]); 2863 SETINT(rp->custom->description->step.x, params[3]);
2786 SETINT(rp->custom->description->step.y, params[4]); 2864 SETINT(rp->custom->description->step.y, params[4]);
2865
2866 break;
2787 2867
2788 break;
2789 case EDJE_STATE_PARAM_ASPECT: 2868 case EDJE_STATE_PARAM_ASPECT:
2790 CHKPARAM(4); 2869 CHKPARAM(4);
2791 2870
2792 SETFLOAT_T(rp->custom->description->aspect.min, params[3]); 2871 SETFLOAT_T(rp->custom->description->aspect.min, params[3]);
2793 SETFLOAT_T(rp->custom->description->aspect.max, params[4]); 2872 SETFLOAT_T(rp->custom->description->aspect.max, params[4]);
2873
2874 break;
2794 2875
2795 break;
2796 case EDJE_STATE_PARAM_ASPECT_PREF: 2876 case EDJE_STATE_PARAM_ASPECT_PREF:
2797 CHKPARAM(3); 2877 CHKPARAM(3);
2798 2878
2799 SETINT(rp->custom->description->aspect.prefer, params[3]); 2879 SETINT(rp->custom->description->aspect.prefer, params[3]);
2880
2881 break;
2800 2882
2801 break;
2802 case EDJE_STATE_PARAM_COLOR: 2883 case EDJE_STATE_PARAM_COLOR:
2803 CHKPARAM(6); 2884 CHKPARAM(6);
2804 2885
2805 SETINT(rp->custom->description->color.r, params[3]); 2886 SETINT(rp->custom->description->color.r, params[3]);
2806 SETINT(rp->custom->description->color.g, params[4]); 2887 SETINT(rp->custom->description->color.g, params[4]);
2807 SETINT(rp->custom->description->color.b, params[5]); 2888 SETINT(rp->custom->description->color.b, params[5]);
2808 SETINT(rp->custom->description->color.a, params[6]); 2889 SETINT(rp->custom->description->color.a, params[6]);
2890
2891 break;
2809 2892
2810 break;
2811 case EDJE_STATE_PARAM_COLOR2: 2893 case EDJE_STATE_PARAM_COLOR2:
2812 CHKPARAM(6); 2894 CHKPARAM(6);
2813 2895
2814 SETINT(rp->custom->description->color2.r, params[3]); 2896 SETINT(rp->custom->description->color2.r, params[3]);
2815 SETINT(rp->custom->description->color2.g, params[4]); 2897 SETINT(rp->custom->description->color2.g, params[4]);
2816 SETINT(rp->custom->description->color2.b, params[5]); 2898 SETINT(rp->custom->description->color2.b, params[5]);
2817 SETINT(rp->custom->description->color2.a, params[6]); 2899 SETINT(rp->custom->description->color2.a, params[6]);
2900
2901 break;
2818 2902
2819 break;
2820 case EDJE_STATE_PARAM_COLOR3: 2903 case EDJE_STATE_PARAM_COLOR3:
2821 { 2904 {
2822 Edje_Part_Description_Text *text; 2905 Edje_Part_Description_Text *text;
2823 2906
2824 if (rp->part->type == EDJE_PART_TYPE_TEXT 2907 if (rp->part->type == EDJE_PART_TYPE_TEXT
2825 || rp->part->type == EDJE_PART_TYPE_TEXTBLOCK) 2908 || rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)
2826 return 0; 2909 return 0;
2827 2910
2828 CHKPARAM(6); 2911 CHKPARAM(6);
2829 2912
2830 text = (Edje_Part_Description_Text*) rp->custom->description; 2913 text = (Edje_Part_Description_Text *)rp->custom->description;
2831 2914
2832 SETINT(text->text.color3.r, params[3]); 2915 SETINT(text->text.color3.r, params[3]);
2833 SETINT(text->text.color3.g, params[4]); 2916 SETINT(text->text.color3.g, params[4]);
2834 SETINT(text->text.color3.b, params[5]); 2917 SETINT(text->text.color3.b, params[5]);
2835 SETINT(text->text.color3.a, params[6]); 2918 SETINT(text->text.color3.a, params[6]);
2919
2920 break;
2921 }
2836 2922
2837 break;
2838 }
2839 case EDJE_STATE_PARAM_COLOR_CLASS: 2923 case EDJE_STATE_PARAM_COLOR_CLASS:
2840 CHKPARAM(4); 2924 CHKPARAM(4);
2841 2925
2842 s = rp->custom->description->color_class; 2926 s = rp->custom->description->color_class;
2843 SETSTRALLOCATE(s); 2927 SETSTRALLOCATE(s);
2928
2929 break;
2844 2930
2845 break;
2846 case EDJE_STATE_PARAM_REL1: 2931 case EDJE_STATE_PARAM_REL1:
2847 CHKPARAM(4); 2932 CHKPARAM(4);
2848 2933
2849 SETFLOAT_T(rp->custom->description->rel1.relative_x, params[3]); 2934 SETFLOAT_T(rp->custom->description->rel1.relative_x, params[3]);
2850 SETFLOAT_T(rp->custom->description->rel1.relative_y, params[4]); 2935 SETFLOAT_T(rp->custom->description->rel1.relative_y, params[4]);
2936
2937 break;
2851 2938
2852 break;
2853 case EDJE_STATE_PARAM_REL1_TO: 2939 case EDJE_STATE_PARAM_REL1_TO:
2854 CHKPARAM(4); 2940 CHKPARAM(4);
2855 2941
2856 SETINT(rp->custom->description->rel1.id_x, params[3]); 2942 SETINT(rp->custom->description->rel1.id_x, params[3]);
2857 SETINT(rp->custom->description->rel1.id_y, params[4]); 2943 SETINT(rp->custom->description->rel1.id_y, params[4]);
2944
2945 break;
2858 2946
2859 break;
2860 case EDJE_STATE_PARAM_REL1_OFFSET: 2947 case EDJE_STATE_PARAM_REL1_OFFSET:
2861 CHKPARAM(4); 2948 CHKPARAM(4);
2862 2949
2863 SETINT(rp->custom->description->rel1.offset_x, params[3]); 2950 SETINT(rp->custom->description->rel1.offset_x, params[3]);
2864 SETINT(rp->custom->description->rel1.offset_y, params[4]); 2951 SETINT(rp->custom->description->rel1.offset_y, params[4]);
2952
2953 break;
2865 2954
2866 break;
2867 case EDJE_STATE_PARAM_REL2: 2955 case EDJE_STATE_PARAM_REL2:
2868 CHKPARAM(4); 2956 CHKPARAM(4);
2869 2957
2870 SETFLOAT_T(rp->custom->description->rel2.relative_x, params[3]); 2958 SETFLOAT_T(rp->custom->description->rel2.relative_x, params[3]);
2871 SETFLOAT_T(rp->custom->description->rel2.relative_y, params[4]); 2959 SETFLOAT_T(rp->custom->description->rel2.relative_y, params[4]);
2960
2961 break;
2872 2962
2873 break;
2874 case EDJE_STATE_PARAM_REL2_TO: 2963 case EDJE_STATE_PARAM_REL2_TO:
2875 CHKPARAM(4); 2964 CHKPARAM(4);
2876 2965
2877 SETINT(rp->custom->description->rel2.id_x, params[3]); 2966 SETINT(rp->custom->description->rel2.id_x, params[3]);
2878 SETINT(rp->custom->description->rel2.id_y, params[4]); 2967 SETINT(rp->custom->description->rel2.id_y, params[4]);
2968
2969 break;
2879 2970
2880 break;
2881 case EDJE_STATE_PARAM_REL2_OFFSET: 2971 case EDJE_STATE_PARAM_REL2_OFFSET:
2882 CHKPARAM(4); 2972 CHKPARAM(4);
2883 2973
2884 SETINT(rp->custom->description->rel2.offset_x, params[3]); 2974 SETINT(rp->custom->description->rel2.offset_x, params[3]);
2885 SETINT(rp->custom->description->rel2.offset_y, params[4]); 2975 SETINT(rp->custom->description->rel2.offset_y, params[4]);
2976
2977 break;
2886 2978
2887 break;
2888 case EDJE_STATE_PARAM_IMAGE: 2979 case EDJE_STATE_PARAM_IMAGE:
2889 { 2980 {
2890 Edje_Part_Description_Image *img; 2981 Edje_Part_Description_Image *img;
2891 2982
2892 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0; 2983 if ((rp->part->type != EDJE_PART_TYPE_IMAGE)) return 0;
2893 CHKPARAM(3); 2984 CHKPARAM(3);
2894 2985
2895 img = (Edje_Part_Description_Image*) rp->custom->description; 2986 img = (Edje_Part_Description_Image *)rp->custom->description;
2896 2987
2897 SETINT(img->image.id, params[3]); 2988 SETINT(img->image.id, params[3]);
2898 2989
2899 break; 2990 break;
2900 } 2991 }
2901 case EDJE_STATE_PARAM_BORDER:
2902 {
2903 Edje_Part_Description_Image *img;
2904 2992
2905 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0; 2993 case EDJE_STATE_PARAM_BORDER:
2906 CHKPARAM(6); 2994 {
2995 Edje_Part_Description_Image *img;
2907 2996
2908 img = (Edje_Part_Description_Image*) rp->custom->description; 2997 if ((rp->part->type != EDJE_PART_TYPE_IMAGE)) return 0;
2998 CHKPARAM(6);
2909 2999
2910 SETINT(img->image.border.l, params[3]); 3000 img = (Edje_Part_Description_Image *)rp->custom->description;
2911 SETINT(img->image.border.r, params[4]);
2912 SETINT(img->image.border.t, params[5]);
2913 SETINT(img->image.border.b, params[6]);
2914 3001
2915 break; 3002 SETINT(img->image.border.l, params[3]);
2916 } 3003 SETINT(img->image.border.r, params[4]);
2917 case EDJE_STATE_PARAM_FILL_SMOOTH: 3004 SETINT(img->image.border.t, params[5]);
2918 { 3005 SETINT(img->image.border.b, params[6]);
2919 Edje_Part_Description_Image *img;
2920 Edje_Part_Description_Proxy *proxy;
2921 3006
2922 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) && (rp->part->type != EDJE_PART_TYPE_PROXY) ) return 0; 3007 break;
2923 CHKPARAM(3); 3008 }
2924 3009
2925 if (rp->part->type == EDJE_PART_TYPE_IMAGE) 3010 case EDJE_STATE_PARAM_FILL_SMOOTH:
2926 { 3011 {
2927 img = (Edje_Part_Description_Image*) rp->custom->description; 3012 Edje_Part_Description_Image *img;
3013 Edje_Part_Description_Proxy *proxy;
2928 3014
2929 SETINT(img->image.fill.smooth, params[3]); 3015 if ((rp->part->type != EDJE_PART_TYPE_IMAGE) && (rp->part->type != EDJE_PART_TYPE_PROXY)) return 0;
2930 } 3016 CHKPARAM(3);
2931 else
2932 {
2933 proxy = (Edje_Part_Description_Proxy*) rp->custom->description;
2934 3017
2935 SETINT(proxy->proxy.fill.smooth, params[3]); 3018 if (rp->part->type == EDJE_PART_TYPE_IMAGE)
2936 } 3019 {
3020 img = (Edje_Part_Description_Image *)rp->custom->description;
2937 3021
2938 break; 3022 SETINT(img->image.fill.smooth, params[3]);
2939 } 3023 }
2940 case EDJE_STATE_PARAM_FILL_POS: 3024 else
2941 { 3025 {
2942 Edje_Part_Description_Image *img; 3026 proxy = (Edje_Part_Description_Proxy *)rp->custom->description;
2943 Edje_Part_Description_Proxy *proxy;
2944 3027
2945 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) && (rp->part->type != EDJE_PART_TYPE_PROXY) ) return 0; 3028 SETINT(proxy->proxy.fill.smooth, params[3]);
2946 CHKPARAM(6); 3029 }
2947 3030
2948 if (rp->part->type == EDJE_PART_TYPE_IMAGE) 3031 break;
2949 { 3032 }
2950 img = (Edje_Part_Description_Image*) rp->custom->description;
2951 3033
2952 SETFLOAT_T(img->image.fill.pos_rel_x, params[3]); 3034 case EDJE_STATE_PARAM_FILL_POS:
2953 SETFLOAT_T(img->image.fill.pos_rel_y, params[4]); 3035 {
2954 SETINT(img->image.fill.pos_abs_x, params[5]); 3036 Edje_Part_Description_Image *img;
2955 SETINT(img->image.fill.pos_abs_y, params[6]); 3037 Edje_Part_Description_Proxy *proxy;
2956 }
2957 else
2958 {
2959 proxy = (Edje_Part_Description_Proxy*) rp->custom->description;
2960 3038
2961 SETFLOAT_T(proxy->proxy.fill.pos_rel_x, params[3]); 3039 if ((rp->part->type != EDJE_PART_TYPE_IMAGE) && (rp->part->type != EDJE_PART_TYPE_PROXY)) return 0;
2962 SETFLOAT_T(proxy->proxy.fill.pos_rel_y, params[4]); 3040 CHKPARAM(6);
2963 SETINT(proxy->proxy.fill.pos_abs_x, params[5]); 3041
2964 SETINT(proxy->proxy.fill.pos_abs_y, params[6]); 3042 if (rp->part->type == EDJE_PART_TYPE_IMAGE)
2965 } 3043 {
3044 img = (Edje_Part_Description_Image *)rp->custom->description;
2966 3045
2967 break; 3046 SETFLOAT_T(img->image.fill.pos_rel_x, params[3]);
3047 SETFLOAT_T(img->image.fill.pos_rel_y, params[4]);
3048 SETINT(img->image.fill.pos_abs_x, params[5]);
3049 SETINT(img->image.fill.pos_abs_y, params[6]);
2968 } 3050 }
2969 case EDJE_STATE_PARAM_FILL_SIZE: 3051 else
2970 { 3052 {
2971 Edje_Part_Description_Image *img; 3053 proxy = (Edje_Part_Description_Proxy *)rp->custom->description;
2972 Edje_Part_Description_Proxy *proxy;
2973 3054
2974 if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) && (rp->part->type != EDJE_PART_TYPE_PROXY) ) return 0; 3055 SETFLOAT_T(proxy->proxy.fill.pos_rel_x, params[3]);
2975 CHKPARAM(6); 3056 SETFLOAT_T(proxy->proxy.fill.pos_rel_y, params[4]);
3057 SETINT(proxy->proxy.fill.pos_abs_x, params[5]);
3058 SETINT(proxy->proxy.fill.pos_abs_y, params[6]);
3059 }
2976 3060
2977 if (rp->part->type == EDJE_PART_TYPE_IMAGE) 3061 break;
2978 { 3062 }
2979 img = (Edje_Part_Description_Image*) rp->custom->description;
2980 3063
2981 SETFLOAT_T(img->image.fill.rel_x, params[3]); 3064 case EDJE_STATE_PARAM_FILL_SIZE:
2982 SETFLOAT_T(img->image.fill.rel_y, params[4]); 3065 {
2983 SETINT(img->image.fill.abs_x, params[5]); 3066 Edje_Part_Description_Image *img;
2984 SETINT(img->image.fill.abs_y, params[6]); 3067 Edje_Part_Description_Proxy *proxy;
2985 }
2986 else
2987 {
2988 proxy = (Edje_Part_Description_Proxy*) rp->custom->description;
2989 3068
2990 SETFLOAT_T(proxy->proxy.fill.rel_x, params[3]); 3069 if ((rp->part->type != EDJE_PART_TYPE_IMAGE) && (rp->part->type != EDJE_PART_TYPE_PROXY)) return 0;
2991 SETFLOAT_T(proxy->proxy.fill.rel_y, params[4]); 3070 CHKPARAM(6);
2992 SETINT(proxy->proxy.fill.abs_x, params[5]);
2993 SETINT(proxy->proxy.fill.abs_y, params[6]);
2994 }
2995 3071
2996 break; 3072 if (rp->part->type == EDJE_PART_TYPE_IMAGE)
3073 {
3074 img = (Edje_Part_Description_Image *)rp->custom->description;
3075
3076 SETFLOAT_T(img->image.fill.rel_x, params[3]);
3077 SETFLOAT_T(img->image.fill.rel_y, params[4]);
3078 SETINT(img->image.fill.abs_x, params[5]);
3079 SETINT(img->image.fill.abs_y, params[6]);
2997 } 3080 }
2998 case EDJE_STATE_PARAM_TEXT: 3081 else
2999 { 3082 {
3000 Edje_Part_Description_Text *text; 3083 proxy = (Edje_Part_Description_Proxy *)rp->custom->description;
3001 3084
3002 if ((rp->part->type != EDJE_PART_TYPE_TEXT) && 3085 SETFLOAT_T(proxy->proxy.fill.rel_x, params[3]);
3003 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) 3086 SETFLOAT_T(proxy->proxy.fill.rel_y, params[4]);
3004 return 0; 3087 SETINT(proxy->proxy.fill.abs_x, params[5]);
3088 SETINT(proxy->proxy.fill.abs_y, params[6]);
3089 }
3005 3090
3006 CHKPARAM(4); 3091 break;
3092 }
3007 3093
3008 text = (Edje_Part_Description_Text*) rp->custom->description; 3094 case EDJE_STATE_PARAM_TEXT:
3095 {
3096 Edje_Part_Description_Text *text;
3009 3097
3010 s = (char *)text->text.text.str; 3098 if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
3011 SETSTRALLOCATE(s); 3099 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
3100 return 0;
3101
3102 CHKPARAM(4);
3103
3104 text = (Edje_Part_Description_Text *)rp->custom->description;
3105
3106 s = (char *)text->text.text.str;
3107 SETSTRALLOCATE(s);
3108
3109 break;
3110 }
3012 3111
3013 break;
3014 }
3015 case EDJE_STATE_PARAM_TEXT_CLASS: 3112 case EDJE_STATE_PARAM_TEXT_CLASS:
3016 { 3113 {
3017 Edje_Part_Description_Text *text; 3114 Edje_Part_Description_Text *text;
3018 3115
3019 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) && 3116 if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
3020 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) 3117 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
3021 return 0; 3118 return 0;
3022 3119
3023 CHKPARAM(4); 3120 CHKPARAM(4);
3024 3121
3025 text = (Edje_Part_Description_Text*) rp->custom->description; 3122 text = (Edje_Part_Description_Text *)rp->custom->description;
3026 3123
3027 s = text->text.text_class; 3124 s = text->text.text_class;
3028 SETSTRALLOCATE(s); 3125 SETSTRALLOCATE(s);
3126
3127 break;
3128 }
3029 3129
3030 break;
3031 }
3032 case EDJE_STATE_PARAM_TEXT_FONT: 3130 case EDJE_STATE_PARAM_TEXT_FONT:
3033 { 3131 {
3034 Edje_Part_Description_Text *text; 3132 Edje_Part_Description_Text *text;
3035 3133
3036 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0; 3134 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
3037 3135
3038 CHKPARAM(4); 3136 CHKPARAM(4);
3039 3137
3040 text = (Edje_Part_Description_Text*) rp->custom->description; 3138 text = (Edje_Part_Description_Text *)rp->custom->description;
3041 3139
3042 s = (char *)text->text.font.str; 3140 s = (char *)text->text.font.str;
3043 SETSTRALLOCATE(s); 3141 SETSTRALLOCATE(s);
3142
3143 break;
3144 }
3044 3145
3045 break;
3046 }
3047 case EDJE_STATE_PARAM_TEXT_STYLE: 3146 case EDJE_STATE_PARAM_TEXT_STYLE:
3048 { 3147 {
3049 Edje_Part_Description_Text *text; 3148 Edje_Part_Description_Text *text;
3050 3149
3051 if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return 0; 3150 if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return 0;
3052 3151
3053 CHKPARAM(4); 3152 CHKPARAM(4);
3054 3153
3055 text = (Edje_Part_Description_Text*) rp->custom->description; 3154 text = (Edje_Part_Description_Text *)rp->custom->description;
3056 3155
3057 s = (char *)text->text.style.str; 3156 s = (char *)text->text.style.str;
3058 SETSTRALLOCATE(s); 3157 SETSTRALLOCATE(s);
3158
3159 break;
3160 }
3059 3161
3060 break;
3061 }
3062 case EDJE_STATE_PARAM_TEXT_SIZE: 3162 case EDJE_STATE_PARAM_TEXT_SIZE:
3063 { 3163 {
3064 Edje_Part_Description_Text *text; 3164 Edje_Part_Description_Text *text;
3065 3165
3066 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0; 3166 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
3067 3167
3068 CHKPARAM(3); 3168 CHKPARAM(3);
3069 3169
3070 text = (Edje_Part_Description_Text*) rp->custom->description; 3170 text = (Edje_Part_Description_Text *)rp->custom->description;
3071 3171
3072 SETINT(text->text.size, params[3]); 3172 SETINT(text->text.size, params[3]);
3173
3174 break;
3175 }
3073 3176
3074 break;
3075 }
3076 case EDJE_STATE_PARAM_TEXT_FIT: 3177 case EDJE_STATE_PARAM_TEXT_FIT:
3077 { 3178 {
3078 Edje_Part_Description_Text *text; 3179 Edje_Part_Description_Text *text;
3079 3180
3080 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0; 3181 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
3081 CHKPARAM(4); 3182 CHKPARAM(4);
3082 3183
3083 text = (Edje_Part_Description_Text*) rp->custom->description; 3184 text = (Edje_Part_Description_Text *)rp->custom->description;
3084 3185
3085 SETINT(text->text.fit_x, params[3]); 3186 SETINT(text->text.fit_x, params[3]);
3086 SETINT(text->text.fit_y, params[4]); 3187 SETINT(text->text.fit_y, params[4]);
3188
3189 break;
3190 }
3087 3191
3088 break;
3089 }
3090 case EDJE_STATE_PARAM_TEXT_MIN: 3192 case EDJE_STATE_PARAM_TEXT_MIN:
3091 { 3193 {
3092 Edje_Part_Description_Text *text; 3194 Edje_Part_Description_Text *text;
3093 3195
3094 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) && 3196 if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
3095 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) 3197 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
3096 return 0; 3198 return 0;
3097 3199
3098 CHKPARAM(4); 3200 CHKPARAM(4);
3099 3201
3100 text = (Edje_Part_Description_Text*) rp->custom->description; 3202 text = (Edje_Part_Description_Text *)rp->custom->description;
3101 3203
3102 SETINT(text->text.min_x, params[3]); 3204 SETINT(text->text.min_x, params[3]);
3103 SETINT(text->text.min_y, params[4]); 3205 SETINT(text->text.min_y, params[4]);
3206
3207 break;
3208 }
3104 3209
3105 break;
3106 }
3107 case EDJE_STATE_PARAM_TEXT_MAX: 3210 case EDJE_STATE_PARAM_TEXT_MAX:
3108 { 3211 {
3109 Edje_Part_Description_Text *text; 3212 Edje_Part_Description_Text *text;
3110 3213
3111 if ( (rp->part->type != EDJE_PART_TYPE_TEXT) && 3214 if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
3112 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) 3215 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
3113 return 0; 3216 return 0;
3114 3217
3115 CHKPARAM(4); 3218 CHKPARAM(4);
3116 3219
3117 text = (Edje_Part_Description_Text*) rp->custom->description; 3220 text = (Edje_Part_Description_Text *)rp->custom->description;
3118 3221
3119 SETINT(text->text.max_x, params[3]); 3222 SETINT(text->text.max_x, params[3]);
3120 SETINT(text->text.max_y, params[4]); 3223 SETINT(text->text.max_y, params[4]);
3224
3225 break;
3226 }
3121 3227
3122 break;
3123 }
3124 case EDJE_STATE_PARAM_TEXT_ALIGN: 3228 case EDJE_STATE_PARAM_TEXT_ALIGN:
3125 { 3229 {
3126 Edje_Part_Description_Text *text; 3230 Edje_Part_Description_Text *text;
3231
3232 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0;
3127 3233
3128 if ((rp->part->type != EDJE_PART_TYPE_TEXT)) return 0; 3234 CHKPARAM(4);
3129 3235
3130 CHKPARAM(4); 3236 text = (Edje_Part_Description_Text *)rp->custom->description;
3131 3237
3132 text = (Edje_Part_Description_Text*) rp->custom->description; 3238 SETFLOAT_T(text->text.align.x, params[3]);
3239 SETFLOAT_T(text->text.align.y, params[4]);
3133 3240
3134 SETFLOAT_T(text->text.align.x, params[3]); 3241 break;
3135 SETFLOAT_T(text->text.align.y, params[4]); 3242 }
3136 3243
3137 break;
3138 }
3139 case EDJE_STATE_PARAM_VISIBLE: 3244 case EDJE_STATE_PARAM_VISIBLE:
3140 CHKPARAM(3); 3245 CHKPARAM(3);
3141 3246
3142 SETINT(rp->custom->description->visible, params[3]); 3247 SETINT(rp->custom->description->visible, params[3]);
3248
3249 break;
3143 3250
3144 break;
3145 case EDJE_STATE_PARAM_MAP_ON: 3251 case EDJE_STATE_PARAM_MAP_ON:
3146 CHKPARAM(3); 3252 CHKPARAM(3);
3147 3253
3148 SETINT(rp->custom->description->map.on, params[3]); 3254 SETINT(rp->custom->description->map.on, params[3]);
3255
3256 break;
3149 3257
3150 break;
3151 case EDJE_STATE_PARAM_MAP_PERSP: 3258 case EDJE_STATE_PARAM_MAP_PERSP:
3152 CHKPARAM(3); 3259 CHKPARAM(3);
3153 3260
3154 SETINT(rp->custom->description->map.id_persp, params[3]); 3261 SETINT(rp->custom->description->map.id_persp, params[3]);
3262
3263 break;
3155 3264
3156 break;
3157 case EDJE_STATE_PARAM_MAP_LIGHT: 3265 case EDJE_STATE_PARAM_MAP_LIGHT:
3158 CHKPARAM(3); 3266 CHKPARAM(3);
3159 3267
3160 SETINT(rp->custom->description->map.id_light, params[3]); 3268 SETINT(rp->custom->description->map.id_light, params[3]);
3269
3270 break;
3161 3271
3162 break;
3163 case EDJE_STATE_PARAM_MAP_ROT_CENTER: 3272 case EDJE_STATE_PARAM_MAP_ROT_CENTER:
3164 CHKPARAM(3); 3273 CHKPARAM(3);
3165 3274
3166 SETINT(rp->custom->description->map.rot.id_center, params[3]); 3275 SETINT(rp->custom->description->map.rot.id_center, params[3]);
3276
3277 break;
3167 3278
3168 break;
3169 case EDJE_STATE_PARAM_MAP_ROT_X: 3279 case EDJE_STATE_PARAM_MAP_ROT_X:
3170 CHKPARAM(3); 3280 CHKPARAM(3);
3171 3281
3172 SETFLOAT_T(rp->custom->description->map.rot.x, params[3]); 3282 SETFLOAT_T(rp->custom->description->map.rot.x, params[3]);
3283
3284 break;
3173 3285
3174 break;
3175 case EDJE_STATE_PARAM_MAP_ROT_Y: 3286 case EDJE_STATE_PARAM_MAP_ROT_Y:
3176 CHKPARAM(3); 3287 CHKPARAM(3);
3177 3288
3178 SETFLOAT_T(rp->custom->description->map.rot.y, params[3]); 3289 SETFLOAT_T(rp->custom->description->map.rot.y, params[3]);
3290
3291 break;
3179 3292
3180 break;
3181 case EDJE_STATE_PARAM_MAP_ROT_Z: 3293 case EDJE_STATE_PARAM_MAP_ROT_Z:
3182 CHKPARAM(3); 3294 CHKPARAM(3);
3183 3295
3184 SETFLOAT_T(rp->custom->description->map.rot.z, params[3]); 3296 SETFLOAT_T(rp->custom->description->map.rot.z, params[3]);
3297
3298 break;
3185 3299
3186 break;
3187 case EDJE_STATE_PARAM_MAP_BACK_CULL: 3300 case EDJE_STATE_PARAM_MAP_BACK_CULL:
3188 CHKPARAM(3); 3301 CHKPARAM(3);
3189 3302
3190 SETINT(rp->custom->description->map.backcull, params[3]); 3303 SETINT(rp->custom->description->map.backcull, params[3]);
3304
3305 break;
3191 3306
3192 break;
3193 case EDJE_STATE_PARAM_MAP_PERSP_ON: 3307 case EDJE_STATE_PARAM_MAP_PERSP_ON:
3194 CHKPARAM(3); 3308 CHKPARAM(3);
3195 3309
3196 SETINT(rp->custom->description->map.persp_on, params[3]); 3310 SETINT(rp->custom->description->map.persp_on, params[3]);
3311
3312 break;
3197 3313
3198 break;
3199 case EDJE_STATE_PARAM_PERSP_ZPLANE: 3314 case EDJE_STATE_PARAM_PERSP_ZPLANE:
3200 CHKPARAM(3); 3315 CHKPARAM(3);
3201 3316
3202 SETINT(rp->custom->description->persp.zplane, params[3]); 3317 SETINT(rp->custom->description->persp.zplane, params[3]);
3318
3319 break;
3203 3320
3204 break;
3205 case EDJE_STATE_PARAM_PERSP_FOCAL: 3321 case EDJE_STATE_PARAM_PERSP_FOCAL:
3206 CHKPARAM(3); 3322 CHKPARAM(3);
3207 3323
3208 SETINT(rp->custom->description->persp.focal, params[3]); 3324 SETINT(rp->custom->description->persp.focal, params[3]);
3325
3326 break;
3209 3327
3210 break;
3211 case EDJE_STATE_PARAM_PROXY_SRC_CLIP: 3328 case EDJE_STATE_PARAM_PROXY_SRC_CLIP:
3212 { 3329 {
3213 Edje_Part_Description_Proxy *proxy; 3330 Edje_Part_Description_Proxy *proxy;
3214 3331
3215 if ((rp->part->type != EDJE_PART_TYPE_PROXY)) return 0; 3332 if ((rp->part->type != EDJE_PART_TYPE_PROXY)) return 0;
3216 CHKPARAM(3); 3333 CHKPARAM(3);
3217 3334
3218 proxy = (Edje_Part_Description_Proxy*) rp->custom->description; 3335 proxy = (Edje_Part_Description_Proxy *)rp->custom->description;
3219 SETINT(proxy->proxy.source_clip, params[3]); 3336 SETINT(proxy->proxy.source_clip, params[3]);
3337
3338 break;
3339 }
3220 3340
3221 break;
3222 }
3223 case EDJE_STATE_PARAM_PROXY_SRC_VISIBLE: 3341 case EDJE_STATE_PARAM_PROXY_SRC_VISIBLE:
3224 { 3342 {
3225 Edje_Part_Description_Proxy *proxy; 3343 Edje_Part_Description_Proxy *proxy;
3344
3345 if ((rp->part->type != EDJE_PART_TYPE_PROXY)) return 0;
3346 CHKPARAM(3);
3226 3347
3227 if ((rp->part->type != EDJE_PART_TYPE_PROXY)) return 0; 3348 proxy = (Edje_Part_Description_Proxy *)rp->custom->description;
3228 CHKPARAM(3); 3349 SETINT(proxy->proxy.source_visible, params[3]);
3229 3350
3230 proxy = (Edje_Part_Description_Proxy*) rp->custom->description; 3351 break;
3231 SETINT(proxy->proxy.source_visible, params[3]); 3352 }
3232 3353
3233 break;
3234 }
3235#ifdef HAVE_EPHYSICS 3354#ifdef HAVE_EPHYSICS
3236 case EDJE_STATE_PARAM_PHYSICS_MASS: 3355 case EDJE_STATE_PARAM_PHYSICS_MASS:
3237 CHKPARAM(3); 3356 CHKPARAM(3);
3238 3357
3239 SETFLOAT_T(rp->custom->description->physics.mass, params[3]); 3358 SETFLOAT_T(rp->custom->description->physics.mass, params[3]);
3359
3360 break;
3240 3361
3241 break;
3242 case EDJE_STATE_PARAM_PHYSICS_RESTITUTION: 3362 case EDJE_STATE_PARAM_PHYSICS_RESTITUTION:
3243 CHKPARAM(3); 3363 CHKPARAM(3);
3244 3364
3245 SETFLOAT_T(rp->custom->description->physics.restitution, params[3]); 3365 SETFLOAT_T(rp->custom->description->physics.restitution, params[3]);
3366
3367 break;
3246 3368
3247 break;
3248 case EDJE_STATE_PARAM_PHYSICS_FRICTION: 3369 case EDJE_STATE_PARAM_PHYSICS_FRICTION:
3249 CHKPARAM(3); 3370 CHKPARAM(3);
3250 3371
3251 SETFLOAT_T(rp->custom->description->physics.friction, params[3]); 3372 SETFLOAT_T(rp->custom->description->physics.friction, params[3]);
3373
3374 break;
3252 3375
3253 break;
3254 case EDJE_STATE_PARAM_PHYSICS_DAMPING: 3376 case EDJE_STATE_PARAM_PHYSICS_DAMPING:
3255 CHKPARAM(4); 3377 CHKPARAM(4);
3256 3378
3257 SETFLOAT_T(rp->custom->description->physics.damping.linear, params[3]); 3379 SETFLOAT_T(rp->custom->description->physics.damping.linear, params[3]);
3258 SETFLOAT_T(rp->custom->description->physics.damping.angular, 3380 SETFLOAT_T(rp->custom->description->physics.damping.angular,
3259 params[4]); 3381 params[4]);
3382
3383 break;
3260 3384
3261 break;
3262 case EDJE_STATE_PARAM_PHYSICS_SLEEP: 3385 case EDJE_STATE_PARAM_PHYSICS_SLEEP:
3263 CHKPARAM(4); 3386 CHKPARAM(4);
3264 3387
3265 SETFLOAT_T(rp->custom->description->physics.sleep.linear, params[3]); 3388 SETFLOAT_T(rp->custom->description->physics.sleep.linear, params[3]);
3266 SETFLOAT_T(rp->custom->description->physics.sleep.angular, params[4]); 3389 SETFLOAT_T(rp->custom->description->physics.sleep.angular, params[4]);
3390
3391 break;
3267 3392
3268 break;
3269 case EDJE_STATE_PARAM_PHYSICS_MATERIAL: 3393 case EDJE_STATE_PARAM_PHYSICS_MATERIAL:
3270 CHKPARAM(3); 3394 CHKPARAM(3);
3395
3396 SETINT(rp->custom->description->physics.material, params[3]);
3397 break;
3271 3398
3272 SETINT(rp->custom->description->physics.material, params[3]);
3273 break;
3274 case EDJE_STATE_PARAM_PHYSICS_DENSITY: 3399 case EDJE_STATE_PARAM_PHYSICS_DENSITY:
3275 CHKPARAM(3); 3400 CHKPARAM(3);
3401
3402 SETFLOAT_T(rp->custom->description->physics.density, params[3]);
3403 break;
3276 3404
3277 SETFLOAT_T(rp->custom->description->physics.density, params[3]);
3278 break;
3279 case EDJE_STATE_PARAM_PHYSICS_HARDNESS: 3405 case EDJE_STATE_PARAM_PHYSICS_HARDNESS:
3280 CHKPARAM(3); 3406 CHKPARAM(3);
3407
3408 SETFLOAT_T(rp->custom->description->physics.hardness, params[3]);
3409 break;
3281 3410
3282 SETFLOAT_T(rp->custom->description->physics.hardness, params[3]);
3283 break;
3284 case EDJE_STATE_PARAM_PHYSICS_IGNORE_PART_POS: 3411 case EDJE_STATE_PARAM_PHYSICS_IGNORE_PART_POS:
3285 CHKPARAM(3); 3412 CHKPARAM(3);
3413
3414 SETINT(rp->custom->description->physics.ignore_part_pos, params[3]);
3415 break;
3286 3416
3287 SETINT(rp->custom->description->physics.ignore_part_pos, params[3]);
3288 break;
3289 case EDJE_STATE_PARAM_PHYSICS_LIGHT_ON: 3417 case EDJE_STATE_PARAM_PHYSICS_LIGHT_ON:
3290 CHKPARAM(3); 3418 CHKPARAM(3);
3419
3420 SETINT(rp->custom->description->physics.light_on, params[3]);
3421 break;
3291 3422
3292 SETINT(rp->custom->description->physics.light_on, params[3]);
3293 break;
3294 case EDJE_STATE_PARAM_PHYSICS_MOV_FREEDOM_LIN: 3423 case EDJE_STATE_PARAM_PHYSICS_MOV_FREEDOM_LIN:
3295 CHKPARAM(5); 3424 CHKPARAM(5);
3425
3426 SETINT(rp->custom->description->physics.mov_freedom.lin.x, params[3]);
3427 SETINT(rp->custom->description->physics.mov_freedom.lin.y, params[4]);
3428 SETINT(rp->custom->description->physics.mov_freedom.lin.z, params[5]);
3429 break;
3296 3430
3297 SETINT(rp->custom->description->physics.mov_freedom.lin.x, params[3]);
3298 SETINT(rp->custom->description->physics.mov_freedom.lin.y, params[4]);
3299 SETINT(rp->custom->description->physics.mov_freedom.lin.z, params[5]);
3300 break;
3301 case EDJE_STATE_PARAM_PHYSICS_MOV_FREEDOM_ANG: 3431 case EDJE_STATE_PARAM_PHYSICS_MOV_FREEDOM_ANG:
3302 CHKPARAM(5); 3432 CHKPARAM(5);
3433
3434 SETINT(rp->custom->description->physics.mov_freedom.ang.x, params[3]);
3435 SETINT(rp->custom->description->physics.mov_freedom.ang.y, params[4]);
3436 SETINT(rp->custom->description->physics.mov_freedom.ang.z, params[5]);
3437 break;
3303 3438
3304 SETINT(rp->custom->description->physics.mov_freedom.ang.x, params[3]);
3305 SETINT(rp->custom->description->physics.mov_freedom.ang.y, params[4]);
3306 SETINT(rp->custom->description->physics.mov_freedom.ang.z, params[5]);
3307 break;
3308 case EDJE_STATE_PARAM_PHYSICS_BACK_CULL: 3439 case EDJE_STATE_PARAM_PHYSICS_BACK_CULL:
3309 CHKPARAM(3); 3440 CHKPARAM(3);
3441
3442 SETINT(rp->custom->description->physics.backcull, params[3]);
3443 break;
3310 3444
3311 SETINT(rp->custom->description->physics.backcull, params[3]);
3312 break;
3313 case EDJE_STATE_PARAM_PHYSICS_Z: 3445 case EDJE_STATE_PARAM_PHYSICS_Z:
3314 CHKPARAM(3); 3446 CHKPARAM(3);
3447
3448 SETINT(rp->custom->description->physics.z, params[3]);
3449 break;
3315 3450
3316 SETINT(rp->custom->description->physics.z, params[3]);
3317 break;
3318 case EDJE_STATE_PARAM_PHYSICS_DEPTH: 3451 case EDJE_STATE_PARAM_PHYSICS_DEPTH:
3319 CHKPARAM(3); 3452 CHKPARAM(3);
3453
3454 SETINT(rp->custom->description->physics.depth, params[3]);
3455 break;
3320 3456
3321 SETINT(rp->custom->description->physics.depth, params[3]);
3322 break;
3323#endif 3457#endif
3324 default: 3458 default:
3325 break; 3459 break;
3326 } 3460 }
3327 3461
3328 return 0; 3462 return 0;
@@ -3333,7 +3467,7 @@ static Embryo_Cell
3333_edje_embryo_fn_part_swallow(Embryo_Program *ep, Embryo_Cell *params) 3467_edje_embryo_fn_part_swallow(Embryo_Program *ep, Embryo_Cell *params)
3334{ 3468{
3335 int part_id = 0; 3469 int part_id = 0;
3336 char* group_name = 0; 3470 char *group_name = 0;
3337 Edje *ed; 3471 Edje *ed;
3338 Edje_Real_Part *rp; 3472 Edje_Real_Part *rp;
3339 Evas_Object *new_obj; 3473 Evas_Object *new_obj;
@@ -3351,10 +3485,10 @@ _edje_embryo_fn_part_swallow(Embryo_Program *ep, Embryo_Cell *params)
3351 rp = ed->table_parts[part_id % ed->table_parts_size]; 3485 rp = ed->table_parts[part_id % ed->table_parts_size];
3352 if (!rp) return 0; 3486 if (!rp) return 0;
3353 3487
3354 new_obj = edje_object_add(ed->base->evas); 3488 new_obj = edje_object_add(ed->base->evas);
3355 if (!new_obj) return 0; 3489 if (!new_obj) return 0;
3356 3490
3357 if (!edje_object_file_set(new_obj, ed->file->path, group_name)) 3491 if (!edje_object_file_set(new_obj, ed->file->path, group_name))
3358 { 3492 {
3359 evas_object_del(new_obj); 3493 evas_object_del(new_obj);
3360 return 0; 3494 return 0;
@@ -3533,12 +3667,12 @@ _edje_embryo_fn_external_param_get_str(Embryo_Program *ep, Embryo_Cell *params)
3533 { 3667 {
3534 char *tmp = alloca(dst_len); 3668 char *tmp = alloca(dst_len);
3535 memcpy(tmp, eep.s, dst_len - 1); 3669 memcpy(tmp, eep.s, dst_len - 1);
3536 tmp[dst_len-1] = '\0'; 3670 tmp[dst_len - 1] = '\0';
3537 SETSTR(tmp, params[3]); 3671 SETSTR(tmp, params[3]);
3538 } 3672 }
3539 return 1; 3673 return 1;
3540 3674
3541 error: 3675error:
3542 SETSTR("", params[3]); 3676 SETSTR("", params[3]);
3543 return 0; 3677 return 0;
3544} 3678}
@@ -3634,12 +3768,12 @@ _edje_embryo_fn_external_param_get_choice(Embryo_Program *ep, Embryo_Cell *param
3634 { 3768 {
3635 char *tmp = alloca(dst_len); 3769 char *tmp = alloca(dst_len);
3636 memcpy(tmp, eep.s, dst_len - 1); 3770 memcpy(tmp, eep.s, dst_len - 1);
3637 tmp[dst_len-1] = '\0'; 3771 tmp[dst_len - 1] = '\0';
3638 SETSTR(tmp, params[3]); 3772 SETSTR(tmp, params[3]);
3639 } 3773 }
3640 return 1; 3774 return 1;
3641 3775
3642 error: 3776error:
3643 SETSTR("", params[3]); 3777 SETSTR("", params[3]);
3644 return 0; 3778 return 0;
3645} 3779}
@@ -3724,8 +3858,8 @@ _edje_embryo_fn_external_param_set_bool(Embryo_Program *ep, Embryo_Cell *params)
3724 3858
3725#ifdef HAVE_EPHYSICS 3859#ifdef HAVE_EPHYSICS
3726/* Generic function to call ephysics functions that apply an action to 3860/* Generic function to call ephysics functions that apply an action to
3727 * a body using 3 double values. 3861* a body using 3 double values.
3728 * To be used by the other functions only avoiding code duplication. */ 3862* To be used by the other functions only avoiding code duplication. */
3729static Embryo_Cell 3863static Embryo_Cell
3730_edje_embryo_fn_physics_components_set(Embryo_Program *ep, Embryo_Cell *params, void (*func)(EPhysics_Body *body, double x, double y, double z)) 3864_edje_embryo_fn_physics_components_set(Embryo_Program *ep, Embryo_Cell *params, void (*func)(EPhysics_Body *body, double x, double y, double z))
3731{ 3865{
@@ -3744,9 +3878,9 @@ _edje_embryo_fn_physics_components_set(Embryo_Program *ep, Embryo_Cell *params,
3744 { 3878 {
3745 double x, y, z; 3879 double x, y, z;
3746 3880
3747 x = (double) EMBRYO_CELL_TO_FLOAT(params[2]); 3881 x = (double)EMBRYO_CELL_TO_FLOAT(params[2]);
3748 y = (double) EMBRYO_CELL_TO_FLOAT(params[3]); 3882 y = (double)EMBRYO_CELL_TO_FLOAT(params[3]);
3749 z = (double) EMBRYO_CELL_TO_FLOAT(params[4]); 3883 z = (double)EMBRYO_CELL_TO_FLOAT(params[4]);
3750 3884
3751 func(rp->body, x, y, z); 3885 func(rp->body, x, y, z);
3752 } 3886 }
@@ -3788,7 +3922,7 @@ static Embryo_Cell
3788_edje_embryo_fn_physics_impulse(Embryo_Program *ep, Embryo_Cell *params) 3922_edje_embryo_fn_physics_impulse(Embryo_Program *ep, Embryo_Cell *params)
3789{ 3923{
3790 return _edje_embryo_fn_physics_components_set( 3924 return _edje_embryo_fn_physics_components_set(
3791 ep, params, ephysics_body_central_impulse_apply); 3925 ep, params, ephysics_body_central_impulse_apply);
3792} 3926}
3793 3927
3794/* physics_torque_impulse(part_id, Float:x, Float:y, Float:z) */ 3928/* physics_torque_impulse(part_id, Float:x, Float:y, Float:z) */
@@ -3796,7 +3930,7 @@ static Embryo_Cell
3796_edje_embryo_fn_physics_torque_impulse(Embryo_Program *ep, Embryo_Cell *params) 3930_edje_embryo_fn_physics_torque_impulse(Embryo_Program *ep, Embryo_Cell *params)
3797{ 3931{
3798 return _edje_embryo_fn_physics_components_set( 3932 return _edje_embryo_fn_physics_components_set(
3799 ep, params, ephysics_body_torque_impulse_apply); 3933 ep, params, ephysics_body_torque_impulse_apply);
3800} 3934}
3801 3935
3802/* physics_force(part_id, Float:x, Float:y, Float:z) */ 3936/* physics_force(part_id, Float:x, Float:y, Float:z) */
@@ -3804,7 +3938,7 @@ static Embryo_Cell
3804_edje_embryo_fn_physics_force(Embryo_Program *ep, Embryo_Cell *params) 3938_edje_embryo_fn_physics_force(Embryo_Program *ep, Embryo_Cell *params)
3805{ 3939{
3806 return _edje_embryo_fn_physics_components_set( 3940 return _edje_embryo_fn_physics_components_set(
3807 ep, params, ephysics_body_central_force_apply); 3941 ep, params, ephysics_body_central_force_apply);
3808} 3942}
3809 3943
3810/* physics_torque(part_id, Float:x, Float:y, Float:z) */ 3944/* physics_torque(part_id, Float:x, Float:y, Float:z) */
@@ -3812,7 +3946,7 @@ static Embryo_Cell
3812_edje_embryo_fn_physics_torque(Embryo_Program *ep, Embryo_Cell *params) 3946_edje_embryo_fn_physics_torque(Embryo_Program *ep, Embryo_Cell *params)
3813{ 3947{
3814 return _edje_embryo_fn_physics_components_set( 3948 return _edje_embryo_fn_physics_components_set(
3815 ep, params, ephysics_body_torque_apply); 3949 ep, params, ephysics_body_torque_apply);
3816} 3950}
3817 3951
3818/* physics_clear_forces(part_id) */ 3952/* physics_clear_forces(part_id) */
@@ -3841,7 +3975,7 @@ static Embryo_Cell
3841_edje_embryo_fn_physics_get_forces(Embryo_Program *ep, Embryo_Cell *params) 3975_edje_embryo_fn_physics_get_forces(Embryo_Program *ep, Embryo_Cell *params)
3842{ 3976{
3843 return _edje_embryo_fn_physics_components_get( 3977 return _edje_embryo_fn_physics_components_get(
3844 ep, params, ephysics_body_forces_get); 3978 ep, params, ephysics_body_forces_get);
3845} 3979}
3846 3980
3847/* physics_get_torques(part_id, &Float:x, &Float:y, &Float:z) */ 3981/* physics_get_torques(part_id, &Float:x, &Float:y, &Float:z) */
@@ -3849,7 +3983,7 @@ static Embryo_Cell
3849_edje_embryo_fn_physics_get_torques(Embryo_Program *ep, Embryo_Cell *params) 3983_edje_embryo_fn_physics_get_torques(Embryo_Program *ep, Embryo_Cell *params)
3850{ 3984{
3851 return _edje_embryo_fn_physics_components_get( 3985 return _edje_embryo_fn_physics_components_get(
3852 ep, params, ephysics_body_torques_get); 3986 ep, params, ephysics_body_torques_get);
3853} 3987}
3854 3988
3855/* physics_set_velocity(part_id, Float:x, Float:y, Float:z) */ 3989/* physics_set_velocity(part_id, Float:x, Float:y, Float:z) */
@@ -3857,7 +3991,7 @@ static Embryo_Cell
3857_edje_embryo_fn_physics_set_velocity(Embryo_Program *ep, Embryo_Cell *params) 3991_edje_embryo_fn_physics_set_velocity(Embryo_Program *ep, Embryo_Cell *params)
3858{ 3992{
3859 return _edje_embryo_fn_physics_components_set( 3993 return _edje_embryo_fn_physics_components_set(
3860 ep, params, ephysics_body_linear_velocity_set); 3994 ep, params, ephysics_body_linear_velocity_set);
3861} 3995}
3862 3996
3863/* physics_get_velocity(part_id, &Float:x, &Float:y, &Float:z) */ 3997/* physics_get_velocity(part_id, &Float:x, &Float:y, &Float:z) */
@@ -3865,7 +3999,7 @@ static Embryo_Cell
3865_edje_embryo_fn_physics_get_velocity(Embryo_Program *ep, Embryo_Cell *params) 3999_edje_embryo_fn_physics_get_velocity(Embryo_Program *ep, Embryo_Cell *params)
3866{ 4000{
3867 return _edje_embryo_fn_physics_components_get( 4001 return _edje_embryo_fn_physics_components_get(
3868 ep, params, ephysics_body_linear_velocity_get); 4002 ep, params, ephysics_body_linear_velocity_get);
3869} 4003}
3870 4004
3871/* physics_set_ang_velocity(part_id, Float:x, Float:y, Float:z) */ 4005/* physics_set_ang_velocity(part_id, Float:x, Float:y, Float:z) */
@@ -3873,7 +4007,7 @@ static Embryo_Cell
3873_edje_embryo_fn_physics_set_ang_velocity(Embryo_Program *ep, Embryo_Cell *params) 4007_edje_embryo_fn_physics_set_ang_velocity(Embryo_Program *ep, Embryo_Cell *params)
3874{ 4008{
3875 return _edje_embryo_fn_physics_components_set( 4009 return _edje_embryo_fn_physics_components_set(
3876 ep, params, ephysics_body_angular_velocity_set); 4010 ep, params, ephysics_body_angular_velocity_set);
3877} 4011}
3878 4012
3879/* physics_get_ang_velocity(part_id, &Float:x, &Float:y, &Float:z) */ 4013/* physics_get_ang_velocity(part_id, &Float:x, &Float:y, &Float:z) */
@@ -3881,7 +4015,7 @@ static Embryo_Cell
3881_edje_embryo_fn_physics_get_ang_velocity(Embryo_Program *ep, Embryo_Cell *params) 4015_edje_embryo_fn_physics_get_ang_velocity(Embryo_Program *ep, Embryo_Cell *params)
3882{ 4016{
3883 return _edje_embryo_fn_physics_components_get( 4017 return _edje_embryo_fn_physics_components_get(
3884 ep, params, ephysics_body_angular_velocity_get); 4018 ep, params, ephysics_body_angular_velocity_get);
3885} 4019}
3886 4020
3887/* physics_stop(part_id) */ 4021/* physics_stop(part_id) */
@@ -3925,10 +4059,10 @@ _edje_embryo_fn_physics_set_rotation(Embryo_Program *ep, Embryo_Cell *params)
3925 EPhysics_Quaternion quat; 4059 EPhysics_Quaternion quat;
3926 double w, x, y, z; 4060 double w, x, y, z;
3927 4061
3928 w = (double) EMBRYO_CELL_TO_FLOAT(params[2]); 4062 w = (double)EMBRYO_CELL_TO_FLOAT(params[2]);
3929 x = (double) EMBRYO_CELL_TO_FLOAT(params[3]); 4063 x = (double)EMBRYO_CELL_TO_FLOAT(params[3]);
3930 y = (double) EMBRYO_CELL_TO_FLOAT(params[4]); 4064 y = (double)EMBRYO_CELL_TO_FLOAT(params[4]);
3931 z = (double) EMBRYO_CELL_TO_FLOAT(params[5]); 4065 z = (double)EMBRYO_CELL_TO_FLOAT(params[5]);
3932 4066
3933 ephysics_quaternion_set(&quat, x, y, z, w); 4067 ephysics_quaternion_set(&quat, x, y, z, w);
3934 ephysics_quaternion_normalize(&quat); 4068 ephysics_quaternion_normalize(&quat);
@@ -3969,6 +4103,7 @@ _edje_embryo_fn_physics_get_rotation(Embryo_Program *ep, Embryo_Cell *params)
3969 4103
3970 return 0; 4104 return 0;
3971} 4105}
4106
3972#endif 4107#endif
3973 4108
3974void 4109void
@@ -4203,3 +4338,4 @@ _edje_embryo_globals_init(Edje *ed)
4203 } 4338 }
4204 } 4339 }
4205} 4340}
4341