summaryrefslogtreecommitdiff
path: root/legacy/edje/src/lib/edje_util.c
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2012-10-21 10:46:58 +0000
committerDaniel Zaoui <daniel.zaoui@yahoo.com>2012-10-21 10:46:58 +0000
commitfdd87314b2aa210f1b4c89fc99757bfd454b2df7 (patch)
tree5f605e78631b4ce442680c59c6478f3560dbb629 /legacy/edje/src/lib/edje_util.c
parent9eb2d0e68583e09855f49b432c6f5ba73b864dcd (diff)
Edje porting to Eo
Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com> SVN revision: 78305
Diffstat (limited to '')
-rw-r--r--legacy/edje/src/lib/edje_util.c2431
1 files changed, 1848 insertions, 583 deletions
diff --git a/legacy/edje/src/lib/edje_util.c b/legacy/edje/src/lib/edje_util.c
index ad4525ee3b..1ff9de733e 100644
--- a/legacy/edje/src/lib/edje_util.c
+++ b/legacy/edje/src/lib/edje_util.c
@@ -349,46 +349,72 @@ edje_password_show_last_timeout_set(double password_show_last_timeout)
349EAPI Eina_Bool 349EAPI Eina_Bool
350edje_object_scale_set(Evas_Object *obj, double scale) 350edje_object_scale_set(Evas_Object *obj, double scale)
351{ 351{
352 if (!eo_isa(obj, EDJE_OBJ_CLASS)) return EINA_FALSE;
353 if (!obj) return EINA_FALSE;
354 Eina_Bool ret = EINA_FALSE;
355 eo_do(obj, edje_obj_scale_set(scale, &ret));
356 return ret;
357}
358
359void
360_scale_set(Eo *obj, void *_pd, va_list *list)
361{
362 double scale = va_arg(*list, double);
363 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
364 if (ret) *ret = EINA_TRUE;
365
352 Edje *ed, *ged; 366 Edje *ed, *ged;
353 Evas_Object *o; 367 Evas_Object *o;
354 Eina_List *l; 368 Eina_List *l;
355 369
356 ed = _edje_fetch(obj); 370 ed = _pd;
357 if (!ed) return EINA_FALSE; 371 if (ed->scale == scale) return;
358 if (ed->scale == scale) return EINA_TRUE;
359 ed->scale = FROM_DOUBLE(scale); 372 ed->scale = FROM_DOUBLE(scale);
360 EINA_LIST_FOREACH(ed->groups, l, ged) 373 EINA_LIST_FOREACH(ed->groups, l, ged)
361 ged->scale = ed->scale; 374 ged->scale = ed->scale;
362 EINA_LIST_FOREACH(ed->subobjs, l, o) 375 EINA_LIST_FOREACH(ed->subobjs, l, o)
363 edje_object_calc_force(o); 376 edje_object_calc_force(o);
364 edje_object_calc_force(obj); 377 edje_object_calc_force(obj);
365 return EINA_TRUE;
366} 378}
367 379
368EAPI double 380EAPI double
369edje_object_scale_get(const Evas_Object *obj) 381edje_object_scale_get(const Evas_Object *obj)
370{ 382{
371 Edje *ed; 383 if (!obj) return 0.0;
384 double ret = 0.0;
385 eo_do((Eo *)obj, edje_obj_scale_get(&ret));
386 return ret;
387}
372 388
373 ed = _edje_fetch(obj); 389void
374 if (!ed) return 0.0; 390_scale_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
375 return TO_DOUBLE(ed->scale); 391{
392 double *ret = va_arg(*list, double *);
393 const Edje *ed = _pd;
394 *ret = TO_DOUBLE(ed->scale);
376} 395}
377 396
378EAPI Eina_Bool 397EAPI Eina_Bool
379edje_object_mirrored_get(const Evas_Object *obj) 398edje_object_mirrored_get(const Evas_Object *obj)
380{ 399{
381 Edje *ed; 400 if (!obj) return EINA_FALSE;
382 401 Eina_Bool ret = EINA_FALSE;
383 ed = _edje_fetch(obj); 402 eo_do((Eo *)obj, edje_obj_mirrored_get(&ret));
384 if (!ed) return EINA_FALSE; 403 return ret;
404}
385 405
386 return ed->is_rtl; 406void
407_mirrored_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
408{
409 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
410 const Edje *ed = _pd;
411 *ret = ed->is_rtl;
387} 412}
388 413
389void 414void
390_edje_object_orientation_inform(Evas_Object *obj) 415_edje_object_orientation_inform(Evas_Object *obj)
391{ 416{
417 if (!obj) return;
392 if (edje_object_mirrored_get(obj)) 418 if (edje_object_mirrored_get(obj))
393 edje_object_signal_emit(obj, "edje,state,rtl", "edje"); 419 edje_object_signal_emit(obj, "edje,state,rtl", "edje");
394 else 420 else
@@ -398,11 +424,18 @@ _edje_object_orientation_inform(Evas_Object *obj)
398EAPI void 424EAPI void
399edje_object_mirrored_set(Evas_Object *obj, Eina_Bool rtl) 425edje_object_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
400{ 426{
401 Edje *ed; 427 if (!obj) return;
428 eo_do(obj, edje_obj_mirrored_set(rtl));
429}
430
431void
432_mirrored_set(Eo *obj, void *_pd, va_list *list)
433{
434 Eina_Bool rtl = va_arg(*list, int);
435
436 Edje *ed = _pd;
402 unsigned int i; 437 unsigned int i;
403 438
404 ed = _edje_fetch(obj);
405 if (!ed) return;
406 if (ed->is_rtl == rtl) return; 439 if (ed->is_rtl == rtl) return;
407 440
408 ed->is_rtl = rtl; 441 ed->is_rtl = rtl;
@@ -429,24 +462,46 @@ edje_object_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
429EAPI const char * 462EAPI const char *
430edje_object_data_get(const Evas_Object *obj, const char *key) 463edje_object_data_get(const Evas_Object *obj, const char *key)
431{ 464{
432 Edje *ed; 465 if (!obj) return NULL;
466 const char *ret = NULL;
467 eo_do((Eo *)obj, edje_obj_data_get(key, &ret));
468 return ret;
469}
470
471void
472_data_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
473{
474 const char *key = va_arg(*list, const char *);
475 const char **ret = va_arg(*list, const char **);
476 *ret = NULL;
477
478 const Edje *ed = _pd;
433 479
434 ed = _edje_fetch(obj);
435 if ((!ed) || (!key)) 480 if ((!ed) || (!key))
436 return NULL; 481 return;
437 if (!ed->collection) return NULL; 482 if (!ed->collection) return;
438 if (!ed->collection->data) return NULL; 483 if (!ed->collection->data) return;
439 return edje_string_get(eina_hash_find(ed->collection->data, key)); 484 *ret = edje_string_get(eina_hash_find(ed->collection->data, key));
440} 485}
441 486
442EAPI int 487EAPI int
443edje_object_freeze(Evas_Object *obj) 488edje_object_freeze(Evas_Object *obj)
444{ 489{
445 Edje *ed; 490 if (!obj) return 0;
491 int ret = 0;
492 eo_do(obj, edje_obj_freeze(&ret));
493 return ret;
494}
495
496void
497_freeze(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
498{
499 int *ret = va_arg(*list, int *);
500
501 Edje *ed = _pd;
446 unsigned int i; 502 unsigned int i;
447 503
448 ed = _edje_fetch(obj); 504 if (ret) *ret = 0;
449 if (!ed) return 0;
450 for (i = 0; i < ed->table_parts_size; i++) 505 for (i = 0; i < ed->table_parts_size; i++)
451 { 506 {
452 Edje_Real_Part *rp; 507 Edje_Real_Part *rp;
@@ -457,17 +512,27 @@ edje_object_freeze(Evas_Object *obj)
457 (rp->typedata.swallow->swallowed_object)) 512 (rp->typedata.swallow->swallowed_object))
458 edje_object_freeze(rp->typedata.swallow->swallowed_object); 513 edje_object_freeze(rp->typedata.swallow->swallowed_object);
459 } 514 }
460 return _edje_freeze(ed); 515 int int_ret = _edje_freeze(ed);
516 if (ret) *ret = int_ret;
461} 517}
462 518
463EAPI int 519EAPI int
464edje_object_thaw(Evas_Object *obj) 520edje_object_thaw(Evas_Object *obj)
465{ 521{
466 Edje *ed; 522 if (!obj) return 0;
523 int ret;
524 eo_do(obj, edje_obj_thaw(&ret));
525 return ret;
526}
527
528void
529_thaw(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
530{
531 int *ret = va_arg(*list, int *);
532 Edje *ed = _pd;
467 unsigned int i; 533 unsigned int i;
468 534
469 ed = _edje_fetch(obj); 535 if (ret) *ret = 0;
470 if (!ed) return 0;
471 for (i = 0; i < ed->table_parts_size; i++) 536 for (i = 0; i < ed->table_parts_size; i++)
472 { 537 {
473 Edje_Real_Part *rp; 538 Edje_Real_Part *rp;
@@ -479,7 +544,8 @@ edje_object_thaw(Evas_Object *obj)
479 (rp->typedata.swallow->swallowed_object)) 544 (rp->typedata.swallow->swallowed_object))
480 edje_object_thaw(rp->typedata.swallow->swallowed_object); 545 edje_object_thaw(rp->typedata.swallow->swallowed_object);
481 } 546 }
482 return _edje_thaw(ed); 547 int int_ret = _edje_thaw(ed);
548 if (ret) *ret = int_ret;
483} 549}
484 550
485EAPI Eina_Bool 551EAPI Eina_Bool
@@ -645,12 +711,36 @@ _edje_color_class_list_foreach(const Eina_Hash *hash __UNUSED__, const void *key
645EAPI Eina_Bool 711EAPI Eina_Bool
646edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3) 712edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
647{ 713{
648 Edje *ed; 714 if (!obj) return EINA_FALSE;
715 Eina_Bool ret = EINA_FALSE;
716 eo_do(obj, edje_obj_color_class_set(color_class, r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3, &ret));
717 return ret;
718}
719
720void
721_color_class_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
722{
723 const char *color_class = va_arg(*list, const char *);
724 int r = va_arg(*list, int);
725 int g = va_arg(*list, int);
726 int b = va_arg(*list, int);
727 int a = va_arg(*list, int);
728 int r2 = va_arg(*list, int);
729 int g2 = va_arg(*list, int);
730 int b2 = va_arg(*list, int);
731 int a2 = va_arg(*list, int);
732 int r3 = va_arg(*list, int);
733 int g3 = va_arg(*list, int);
734 int b3 = va_arg(*list, int);
735 int a3 = va_arg(*list, int);
736 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
737 if (ret) *ret = EINA_FALSE;
738
739 Edje *ed = _pd;
649 Edje_Color_Class *cc; 740 Edje_Color_Class *cc;
650 unsigned int i; 741 unsigned int i;
651 742
652 ed = _edje_fetch(obj); 743 if ((!ed) || (!color_class)) return;
653 if ((!ed) || (!color_class)) return EINA_FALSE;
654 if (r < 0) r = 0; 744 if (r < 0) r = 0;
655 else if (r > 255) r = 255; 745 else if (r > 255) r = 255;
656 if (g < 0) g = 0; 746 if (g < 0) g = 0;
@@ -668,7 +758,10 @@ edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, in
668 (cc->b2 == b2) && (cc->a2 == a2) && 758 (cc->b2 == b2) && (cc->a2 == a2) &&
669 (cc->r3 == r3) && (cc->g3 == g3) && 759 (cc->r3 == r3) && (cc->g3 == g3) &&
670 (cc->b3 == b3) && (cc->a3 == a3)) 760 (cc->b3 == b3) && (cc->a3 == a3))
671 return EINA_TRUE; 761 {
762 if (ret) *ret = EINA_TRUE;
763 return;
764 }
672 cc->r = r; 765 cc->r = r;
673 cc->g = g; 766 cc->g = g;
674 cc->b = b; 767 cc->b = b;
@@ -687,16 +780,17 @@ edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, in
687 ed->all_part_change = EINA_TRUE; 780 ed->all_part_change = EINA_TRUE;
688#endif 781#endif
689 _edje_recalc(ed); 782 _edje_recalc(ed);
690 return EINA_TRUE; 783 if (ret) *ret = EINA_TRUE;
784 return;
691 } 785 }
692 786
693 color_class = eina_stringshare_add(color_class); 787 color_class = eina_stringshare_add(color_class);
694 if (!color_class) return EINA_FALSE; 788 if (!color_class) return;
695 cc = malloc(sizeof(Edje_Color_Class)); 789 cc = malloc(sizeof(Edje_Color_Class));
696 if (!cc) 790 if (!cc)
697 { 791 {
698 eina_stringshare_del(color_class); 792 eina_stringshare_del(color_class);
699 return EINA_FALSE; 793 return;
700 } 794 }
701 cc->name = color_class; 795 cc->name = color_class;
702 cc->r = r; 796 cc->r = r;
@@ -735,13 +829,38 @@ edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, in
735 829
736 _edje_recalc(ed); 830 _edje_recalc(ed);
737 _edje_emit(ed, "color_class,set", color_class); 831 _edje_emit(ed, "color_class,set", color_class);
738 return EINA_TRUE; 832 if (ret) *ret = EINA_TRUE;
739} 833}
740 834
741EAPI Eina_Bool 835EAPI Eina_Bool
742edje_object_color_class_get(const Evas_Object *obj, const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3) 836edje_object_color_class_get(const Evas_Object *obj, const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3)
743{ 837{
744 Edje *ed = _edje_fetch(obj); 838 if (!obj) return EINA_FALSE;
839 Eina_Bool ret = EINA_FALSE;
840 eo_do((Eo *)obj, edje_obj_color_class_get(color_class, r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3, &ret));
841 return ret;
842}
843
844void
845_color_class_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
846{
847 const char *color_class = va_arg(*list, const char *);
848 int *r = va_arg(*list, int *);
849 int *g = va_arg(*list, int *);
850 int *b = va_arg(*list, int *);
851 int *a = va_arg(*list, int *);
852 int *r2 = va_arg(*list, int *);
853 int *g2 = va_arg(*list, int *);
854 int *b2 = va_arg(*list, int *);
855 int *a2 = va_arg(*list, int *);
856 int *r3 = va_arg(*list, int *);
857 int *g3 = va_arg(*list, int *);
858 int *b3 = va_arg(*list, int *);
859 int *a3 = va_arg(*list, int *);
860 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
861 if (ret) *ret = EINA_FALSE;
862
863 const Edje *ed = _pd;
745 Edje_Color_Class *cc = _edje_color_class_find(ed, color_class); 864 Edje_Color_Class *cc = _edje_color_class_find(ed, color_class);
746 865
747 if (cc) 866 if (cc)
@@ -753,7 +872,8 @@ edje_object_color_class_get(const Evas_Object *obj, const char *color_class, int
753 S(r3, g3, b3, a3); 872 S(r3, g3, b3, a3);
754#undef S 873#undef S
755#undef X 874#undef X
756 return EINA_TRUE; 875 if (ret) *ret = EINA_TRUE;
876 return;
757 } 877 }
758 else 878 else
759 { 879 {
@@ -764,7 +884,7 @@ edje_object_color_class_get(const Evas_Object *obj, const char *color_class, int
764 S(r3, g3, b3, a3); 884 S(r3, g3, b3, a3);
765#undef S 885#undef S
766#undef X 886#undef X
767 return EINA_FALSE; 887 return;
768 } 888 }
769} 889}
770 890
@@ -917,13 +1037,27 @@ _edje_text_class_list_foreach(const Eina_Hash *hash __UNUSED__, const void *key,
917EAPI Eina_Bool 1037EAPI Eina_Bool
918edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size) 1038edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size)
919{ 1039{
920 Edje *ed; 1040 if (!obj) return EINA_FALSE;
1041 Eina_Bool ret = EINA_FALSE;
1042 eo_do(obj, edje_obj_text_class_set(text_class, font, size, &ret));
1043 return ret;
1044}
1045
1046void
1047_text_class_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1048{
1049 const char *text_class = va_arg(*list, const char *);
1050 const char *font = va_arg(*list, const char *);
1051 Evas_Font_Size size = va_arg(*list, Evas_Font_Size);
1052 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1053
1054 Edje *ed = _pd;
921 Eina_List *l; 1055 Eina_List *l;
922 Edje_Text_Class *tc = NULL; 1056 Edje_Text_Class *tc = NULL;
923 unsigned int i; 1057 unsigned int i;
1058 if (ret) *ret = EINA_FALSE;
924 1059
925 ed = _edje_fetch(obj); 1060 if ((!ed) || (!text_class)) return;
926 if ((!ed) || (!text_class)) return EINA_FALSE;
927 1061
928 /* for each text_class in the edje */ 1062 /* for each text_class in the edje */
929 EINA_LIST_FOREACH(ed->text_classes, l, tc) 1063 EINA_LIST_FOREACH(ed->text_classes, l, tc)
@@ -934,7 +1068,10 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
934 if ((tc->size == size) && 1068 if ((tc->size == size) &&
935 ((tc->font == font) || 1069 ((tc->font == font) ||
936 (tc->font && font && !strcmp(tc->font, font)))) 1070 (tc->font && font && !strcmp(tc->font, font))))
937 return EINA_TRUE; 1071 {
1072 if (ret) *ret = EINA_TRUE;
1073 return;
1074 }
938 1075
939 /* Update new text class properties */ 1076 /* Update new text class properties */
940 eina_stringshare_replace(&tc->font, font); 1077 eina_stringshare_replace(&tc->font, font);
@@ -947,12 +1084,12 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
947 { 1084 {
948 /* No matches, create a new text class */ 1085 /* No matches, create a new text class */
949 tc = calloc(1, sizeof(Edje_Text_Class)); 1086 tc = calloc(1, sizeof(Edje_Text_Class));
950 if (!tc) return EINA_FALSE; 1087 if (!tc) return;
951 tc->name = eina_stringshare_add(text_class); 1088 tc->name = eina_stringshare_add(text_class);
952 if (!tc->name) 1089 if (!tc->name)
953 { 1090 {
954 free(tc); 1091 free(tc);
955 return EINA_FALSE; 1092 return;
956 } 1093 }
957 tc->font = eina_stringshare_add(font); 1094 tc->font = eina_stringshare_add(font);
958 tc->size = size; 1095 tc->size = size;
@@ -980,53 +1117,92 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
980#endif 1117#endif
981 _edje_textblock_style_all_update(ed); 1118 _edje_textblock_style_all_update(ed);
982 _edje_recalc(ed); 1119 _edje_recalc(ed);
983 return EINA_TRUE; 1120 if (ret) *ret = EINA_TRUE;
984} 1121}
985 1122
986EAPI Eina_Bool 1123EAPI Eina_Bool
987edje_object_part_exists(const Evas_Object *obj, const char *part) 1124edje_object_part_exists(const Evas_Object *obj, const char *part)
988{ 1125{
989 Edje *ed; 1126 if (!obj) return EINA_FALSE;
1127 Eina_Bool ret = EINA_FALSE;
1128 eo_do((Eo *)obj, edje_obj_part_exists(part, &ret));
1129 return ret;
1130}
1131
1132void
1133_part_exists(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1134{
1135 const char *part = va_arg(*list, const char *);
1136 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1137 *ret = EINA_FALSE;
1138
1139 const Edje *ed = _pd;
990 Edje_Real_Part *rp; 1140 Edje_Real_Part *rp;
991 1141
992 ed = _edje_fetch(obj); 1142 if ((!ed) || (!part)) return;
993 if ((!ed) || (!part)) return EINA_FALSE;
994 rp = _edje_real_part_recursive_get(ed, part); 1143 rp = _edje_real_part_recursive_get(ed, part);
995 if (!rp) return EINA_FALSE; 1144 if (!rp) return;
996 return EINA_TRUE; 1145 *ret = EINA_TRUE;
997} 1146}
998 1147
999EAPI const Evas_Object * 1148EAPI const Evas_Object *
1000edje_object_part_object_get(const Evas_Object *obj, const char *part) 1149edje_object_part_object_get(const Evas_Object *obj, const char *part)
1001{ 1150{
1002 Edje *ed; 1151 if (!obj) return NULL;
1152 const Evas_Object *ret = NULL;
1153 eo_do((Eo *)obj, edje_obj_part_object_get(part, &ret));
1154 return ret;
1155}
1156
1157void
1158_part_object_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1159{
1160 const char *part = va_arg(*list, const char *);
1161 const Evas_Object **ret = va_arg(*list, const Evas_Object **);
1162 *ret = NULL;
1163 Edje *ed = (Edje *)_pd;
1003 Edje_Real_Part *rp; 1164 Edje_Real_Part *rp;
1004 1165
1005 ed = _edje_fetch(obj); 1166 if ((!ed) || (!part)) return;
1006 if ((!ed) || (!part)) return NULL;
1007 1167
1008 /* Need to recalc before providing the object. */ 1168 /* Need to recalc before providing the object. */
1009 _edje_recalc_do(ed); 1169 _edje_recalc_do(ed);
1010 1170
1011 rp = _edje_real_part_recursive_get(ed, part); 1171 rp = _edje_real_part_recursive_get(ed, part);
1012 if (!rp) return NULL; 1172 if (!rp) return;
1013 return rp->object; 1173 *ret = rp->object;
1014} 1174}
1015 1175
1016EAPI Eina_Bool 1176EAPI Eina_Bool
1017edje_object_part_geometry_get(const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h ) 1177edje_object_part_geometry_get(const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h )
1018{ 1178{
1019 Edje *ed; 1179 if (!obj) return EINA_FALSE;
1180 Eina_Bool ret = EINA_FALSE;
1181 eo_do((Eo *)obj, edje_obj_part_geometry_get(part, x, y, w, h, &ret));
1182 return ret;
1183}
1184
1185void
1186_part_geometry_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1187{
1188 const char *part = va_arg(*list, const char *);
1189 Evas_Coord *x = va_arg(*list, Evas_Coord *);
1190 Evas_Coord *y = va_arg(*list, Evas_Coord *);
1191 Evas_Coord *w = va_arg(*list, Evas_Coord *);
1192 Evas_Coord *h = va_arg(*list, Evas_Coord *);
1193 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1194 if (ret) *ret = EINA_FALSE;
1195
1196 Edje *ed = (Edje *)_pd;
1020 Edje_Real_Part *rp; 1197 Edje_Real_Part *rp;
1021 1198
1022 ed = _edje_fetch(obj);
1023 if ((!ed) || (!part)) 1199 if ((!ed) || (!part))
1024 { 1200 {
1025 if (x) *x = 0; 1201 if (x) *x = 0;
1026 if (y) *y = 0; 1202 if (y) *y = 0;
1027 if (w) *w = 0; 1203 if (w) *w = 0;
1028 if (h) *h = 0; 1204 if (h) *h = 0;
1029 return EINA_FALSE; 1205 return;
1030 } 1206 }
1031 1207
1032 /* Need to recalc before providing the object. */ 1208 /* Need to recalc before providing the object. */
@@ -1039,22 +1215,28 @@ edje_object_part_geometry_get(const Evas_Object *obj, const char *part, Evas_Coo
1039 if (y) *y = 0; 1215 if (y) *y = 0;
1040 if (w) *w = 0; 1216 if (w) *w = 0;
1041 if (h) *h = 0; 1217 if (h) *h = 0;
1042 return EINA_FALSE; 1218 return;
1043 } 1219 }
1044 if (x) *x = rp->x; 1220 if (x) *x = rp->x;
1045 if (y) *y = rp->y; 1221 if (y) *y = rp->y;
1046 if (w) *w = rp->w; 1222 if (w) *w = rp->w;
1047 if (h) *h = rp->h; 1223 if (h) *h = rp->h;
1048 return EINA_TRUE; 1224 if (ret) *ret = EINA_TRUE;
1049} 1225}
1050 1226
1051EAPI void 1227EAPI void
1052edje_object_item_provider_set(Evas_Object *obj, Edje_Item_Provider_Cb func, void *data) 1228edje_object_item_provider_set(Evas_Object *obj, Edje_Item_Provider_Cb func, void *data)
1053{ 1229{
1054 Edje *ed; 1230 if (!obj) return;
1231 eo_do(obj, edje_obj_item_provider_set(func, data));
1232}
1055 1233
1056 ed = _edje_fetch(obj); 1234void
1057 if (!ed) return; 1235_item_provider_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1236{
1237 Edje_Item_Provider_Cb func = va_arg(*list, Edje_Item_Provider_Cb);
1238 void *data = va_arg(*list, void *);
1239 Edje *ed = _pd;
1058 ed->item_provider.func = func; 1240 ed->item_provider.func = func;
1059 ed->item_provider.data = data; 1241 ed->item_provider.data = data;
1060} 1242}
@@ -1063,11 +1245,18 @@ edje_object_item_provider_set(Evas_Object *obj, Edje_Item_Provider_Cb func, void
1063EAPI void 1245EAPI void
1064edje_object_text_change_cb_set(Evas_Object *obj, Edje_Text_Change_Cb func, void *data) 1246edje_object_text_change_cb_set(Evas_Object *obj, Edje_Text_Change_Cb func, void *data)
1065{ 1247{
1066 Edje *ed; 1248 if (!obj) return;
1249 eo_do(obj, edje_obj_text_change_cb_set(func, data));
1250}
1251
1252void
1253_text_change_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1254{
1255 Edje_Text_Change_Cb func = va_arg(*list, Edje_Text_Change_Cb);
1256 void *data = va_arg(*list, void *);
1257 Edje *ed = _pd;
1067 unsigned int i; 1258 unsigned int i;
1068 1259
1069 ed = _edje_fetch(obj);
1070 if (!ed) return;
1071 ed->text_change.func = func; 1260 ed->text_change.func = func;
1072 ed->text_change.data = data; 1261 ed->text_change.data = data;
1073 1262
@@ -1156,11 +1345,19 @@ EAPI void
1156edje_object_part_text_style_user_push(Evas_Object *obj, const char *part, 1345edje_object_part_text_style_user_push(Evas_Object *obj, const char *part,
1157 const char *style) 1346 const char *style)
1158{ 1347{
1159 Edje *ed; 1348 if (!obj) return;
1349 eo_do(obj, edje_obj_part_text_style_user_push(part, style));
1350}
1351
1352void
1353_part_text_style_user_push(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1354{
1355 const char *part = va_arg(*list, const char *);
1356 const char *style = va_arg(*list, const char *);
1357 Edje *ed = _pd;
1160 Edje_Real_Part *rp; 1358 Edje_Real_Part *rp;
1161 Evas_Textblock_Style *ts; 1359 Evas_Textblock_Style *ts;
1162 1360
1163 ed = _edje_fetch(obj);
1164 if ((!ed) || (!part) || (!style)) return; 1361 if ((!ed) || (!part) || (!style)) return;
1165 rp = _edje_real_part_recursive_get(ed, part); 1362 rp = _edje_real_part_recursive_get(ed, part);
1166 if (!rp) return; 1363 if (!rp) return;
@@ -1180,10 +1377,17 @@ edje_object_part_text_style_user_push(Evas_Object *obj, const char *part,
1180EAPI void 1377EAPI void
1181edje_object_part_text_style_user_pop(Evas_Object *obj, const char *part) 1378edje_object_part_text_style_user_pop(Evas_Object *obj, const char *part)
1182{ 1379{
1183 Edje *ed; 1380 if (!obj) return;
1381 eo_do(obj, edje_obj_part_text_style_user_pop(part));
1382}
1383
1384void
1385_part_text_style_user_pop(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1386{
1387 const char *part = va_arg(*list, const char *);
1388 Edje *ed = _pd;
1184 Edje_Real_Part *rp; 1389 Edje_Real_Part *rp;
1185 1390
1186 ed = _edje_fetch(obj);
1187 if ((!ed) || (!part)) return; 1391 if ((!ed) || (!part)) return;
1188 rp = _edje_real_part_recursive_get(ed, part); 1392 rp = _edje_real_part_recursive_get(ed, part);
1189 if (!rp) return; 1393 if (!rp) return;
@@ -1200,21 +1404,30 @@ edje_object_part_text_style_user_pop(Evas_Object *obj, const char *part)
1200EAPI const char * 1404EAPI const char *
1201edje_object_part_text_style_user_peek(const Evas_Object *obj, const char *part) 1405edje_object_part_text_style_user_peek(const Evas_Object *obj, const char *part)
1202{ 1406{
1203 Edje *ed; 1407 if (!obj) return NULL;
1408 const char *ret = NULL;
1409 eo_do((Eo *)obj, edje_obj_part_text_style_user_peek(part, &ret));
1410 return ret;
1411}
1412
1413void
1414_part_text_style_user_peek(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1415{
1416 const char *part = va_arg(*list, const char *);
1417 const char **ret = va_arg(*list, const char **);
1418 if (ret) *ret = NULL;
1419 const Edje *ed = _pd;
1204 Edje_Real_Part *rp; 1420 Edje_Real_Part *rp;
1205 const Evas_Textblock_Style *ts; 1421 const Evas_Textblock_Style *ts;
1206 1422
1207 ed = _edje_fetch(obj); 1423 if ((!ed) || (!part)) return;
1208 if ((!ed) || (!part)) return NULL;
1209 rp = _edje_real_part_recursive_get(ed, part); 1424 rp = _edje_real_part_recursive_get(ed, part);
1210 if (!rp) return NULL; 1425 if (!rp) return;
1211 if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) return NULL; 1426 if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) return;
1212 1427
1213 ts = evas_object_textblock_style_user_peek(rp->object); 1428 ts = evas_object_textblock_style_user_peek(rp->object);
1214 if (ts) 1429 if (ts)
1215 return evas_textblock_style_get(ts); 1430 if (ret) *ret = evas_textblock_style_get(ts);
1216 else
1217 return NULL;
1218} 1431}
1219 1432
1220static void 1433static void
@@ -1246,64 +1459,111 @@ _edje_user_define_string(Edje *ed, const char *part, const char *raw_text)
1246EAPI Eina_Bool 1459EAPI Eina_Bool
1247edje_object_part_text_set(Evas_Object *obj, const char *part, const char *text) 1460edje_object_part_text_set(Evas_Object *obj, const char *part, const char *text)
1248{ 1461{
1249 Edje *ed; 1462 if (!obj) return EINA_FALSE;
1463 Eina_Bool ret = EINA_FALSE;
1464 eo_do(obj, edje_obj_part_text_set(part, text, &ret));
1465 return ret;
1466}
1467
1468void
1469_part_text_set(Eo *obj, void *_pd, va_list *list)
1470{
1471 const char *part = va_arg(*list, const char *);
1472 const char *text = va_arg(*list, const char *);
1473 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1474 if (ret) *ret = EINA_FALSE;
1475 Edje *ed = _pd;
1250 Edje_Real_Part *rp; 1476 Edje_Real_Part *rp;
1251 Eina_Bool r; 1477 Eina_Bool r;
1252 1478
1253 ed = _edje_fetch(obj); 1479 if ((!ed) || (!part)) return;
1254 if ((!ed) || (!part)) return EINA_FALSE;
1255 rp = _edje_real_part_recursive_get(ed, part); 1480 rp = _edje_real_part_recursive_get(ed, part);
1256 if (!rp) return EINA_FALSE; 1481 if (!rp) return;
1257 if ((rp->part->type != EDJE_PART_TYPE_TEXT) && 1482 if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
1258 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return EINA_FALSE; 1483 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return;
1259 if ((rp->type != EDJE_RP_TYPE_TEXT) || 1484 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
1260 (!rp->typedata.text)) return EINA_TRUE; 1485 (!rp->typedata.text))
1486 {
1487 if (ret) *ret = EINA_TRUE;
1488 return;
1489 }
1261 r = _edje_object_part_text_raw_set(obj, rp, part, text); 1490 r = _edje_object_part_text_raw_set(obj, rp, part, text);
1262 _edje_user_define_string(ed, part, rp->typedata.text->text); 1491 _edje_user_define_string(ed, part, rp->typedata.text->text);
1263 return r; 1492 if (ret) *ret = r;
1264} 1493}
1265 1494
1266EAPI const char * 1495EAPI const char *
1267edje_object_part_text_get(const Evas_Object *obj, const char *part) 1496edje_object_part_text_get(const Evas_Object *obj, const char *part)
1268{ 1497{
1269 Edje *ed; 1498 if (!obj) return NULL;
1499 const char *ret = NULL;
1500 eo_do((Eo *)obj, edje_obj_part_text_get(part, &ret));
1501 return ret;
1502}
1503
1504void
1505_part_text_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1506{
1507 const char *part = va_arg(*list, const char *);
1508 const char **ret = va_arg(*list, const char **);
1509 *ret = NULL;
1510 Edje *ed = (Edje *)_pd;
1270 Edje_Real_Part *rp; 1511 Edje_Real_Part *rp;
1271 1512
1272 ed = _edje_fetch(obj); 1513 if ((!ed) || (!part)) return;
1273 if ((!ed) || (!part)) return NULL;
1274 1514
1275 /* Need to recalc before providing the object. */ 1515 /* Need to recalc before providing the object. */
1276 _edje_recalc_do(ed); 1516 _edje_recalc_do(ed);
1277 1517
1278 rp = _edje_real_part_recursive_get(ed, part); 1518 rp = _edje_real_part_recursive_get(ed, part);
1279 if (!rp) return NULL; 1519 if (!rp) return;
1280 if ((rp->type != EDJE_RP_TYPE_TEXT) || 1520 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
1281 (!rp->typedata.text)) return NULL; 1521 (!rp->typedata.text)) return;
1282 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 1522 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1283 return _edje_entry_text_get(rp); 1523 {
1524 *ret = _edje_entry_text_get(rp);
1525 return;
1526 }
1284 else 1527 else
1285 { 1528 {
1286 if (rp->part->type == EDJE_PART_TYPE_TEXT) 1529 if (rp->part->type == EDJE_PART_TYPE_TEXT)
1287 return rp->typedata.text->text; 1530 {
1531 *ret = rp->typedata.text->text;
1532 return;
1533 }
1288 if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK) 1534 if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)
1289 return evas_object_textblock_text_markup_get(rp->object); 1535 {
1536 *ret = evas_object_textblock_text_markup_get(rp->object);
1537 return;
1538 }
1290 } 1539 }
1291 return NULL;
1292} 1540}
1293 1541
1294EAPI Eina_Bool 1542EAPI Eina_Bool
1295edje_object_part_text_escaped_set(Evas_Object *obj, const char *part, const char *text) 1543edje_object_part_text_escaped_set(Evas_Object *obj, const char *part, const char *text)
1296{ 1544{
1297 Edje *ed; 1545 if (!obj) return EINA_FALSE;
1546 Eina_Bool ret = EINA_FALSE;
1547 eo_do(obj, edje_obj_part_text_escaped_set(part, text, &ret));
1548 return ret;
1549}
1550
1551void
1552_part_text_escaped_set(Eo *obj, void *_pd, va_list *list)
1553{
1554 const char *part = va_arg(*list, const char *);
1555 const char *text = va_arg(*list, const char *);
1556 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1557 if (ret) *ret = EINA_FALSE;
1558 Edje *ed = _pd;
1298 Edje_Real_Part *rp; 1559 Edje_Real_Part *rp;
1299 Eina_Bool ret; 1560 Eina_Bool int_ret;
1300 1561
1301 ed = _edje_fetch(obj); 1562 if ((!ed) || (!part)) return;
1302 if ((!ed) || (!part)) return EINA_FALSE;
1303 rp = _edje_real_part_recursive_get(ed, part); 1563 rp = _edje_real_part_recursive_get(ed, part);
1304 if (!rp) return EINA_FALSE; 1564 if (!rp) return;
1305 if ((rp->type != EDJE_RP_TYPE_TEXT) || 1565 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
1306 (!rp->typedata.text)) return EINA_FALSE; 1566 (!rp->typedata.text)) return;
1307 if ((rp->part->type == EDJE_PART_TYPE_TEXT) && (text)) 1567 if ((rp->part->type == EDJE_PART_TYPE_TEXT) && (text))
1308 { 1568 {
1309 Eina_Strbuf *sbuf; 1569 Eina_Strbuf *sbuf;
@@ -1354,16 +1614,17 @@ edje_object_part_text_escaped_set(Evas_Object *obj, const char *part, const char
1354 } 1614 }
1355 p++; 1615 p++;
1356 } 1616 }
1357 ret = _edje_object_part_text_raw_set 1617 int_ret = _edje_object_part_text_raw_set
1358 (obj, rp, part, eina_strbuf_string_get(sbuf)); 1618 (obj, rp, part, eina_strbuf_string_get(sbuf));
1359 _edje_user_define_string(ed, part, rp->typedata.text->text); 1619 _edje_user_define_string(ed, part, rp->typedata.text->text);
1360 eina_strbuf_free(sbuf); 1620 eina_strbuf_free(sbuf);
1361 return ret; 1621 if (ret) *ret = int_ret;
1622 return;
1362 } 1623 }
1363 if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) return EINA_FALSE; 1624 if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) return;
1364 ret = _edje_object_part_text_raw_set(obj, rp, part, text); 1625 int_ret = _edje_object_part_text_raw_set(obj, rp, part, text);
1365 _edje_user_define_string(ed, part, rp->typedata.text->text); 1626 _edje_user_define_string(ed, part, rp->typedata.text->text);
1366 return ret; 1627 if (ret) *ret = int_ret;
1367} 1628}
1368 1629
1369 1630
@@ -1478,84 +1739,129 @@ _edje_text_unescape(const char *text)
1478EAPI Eina_Bool 1739EAPI Eina_Bool
1479edje_object_part_text_unescaped_set(Evas_Object *obj, const char *part, const char *text_to_escape) 1740edje_object_part_text_unescaped_set(Evas_Object *obj, const char *part, const char *text_to_escape)
1480{ 1741{
1481 Edje *ed; 1742 if (!obj) return EINA_FALSE;
1482 Edje_Real_Part *rp;
1483 Eina_Bool ret = EINA_FALSE; 1743 Eina_Bool ret = EINA_FALSE;
1744 eo_do(obj, edje_obj_part_text_unescaped_set(part, text_to_escape, &ret));
1745 return ret;
1746}
1484 1747
1485 ed = _edje_fetch(obj); 1748void
1486 if ((!ed) || (!part)) return ret; 1749_part_text_unescaped_set(Eo *obj, void *_pd, va_list *list)
1750{
1751 const char *part = va_arg(*list, const char *);
1752 const char *text_to_escape = va_arg(*list, const char *);
1753 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1754 Edje *ed = _pd;
1755 Edje_Real_Part *rp;
1756 Eina_Bool int_ret;
1757 if (ret) *ret = EINA_FALSE;
1758
1759 if ((!ed) || (!part)) return;
1487 rp = _edje_real_part_recursive_get(ed, part); 1760 rp = _edje_real_part_recursive_get(ed, part);
1488 if (!rp) return ret; 1761 if (!rp) return;
1489 if ((rp->type != EDJE_RP_TYPE_TEXT) || 1762 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
1490 (!rp->typedata.text)) return EINA_FALSE; 1763 (!rp->typedata.text)) return;
1491 if (rp->part->type == EDJE_PART_TYPE_TEXT) 1764 if (rp->part->type == EDJE_PART_TYPE_TEXT)
1492 ret = _edje_object_part_text_raw_set(obj, rp, part, text_to_escape); 1765 int_ret = _edje_object_part_text_raw_set(obj, rp, part, text_to_escape);
1493 else if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK) 1766 else if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)
1494 { 1767 {
1495 char *text = _edje_text_escape(text_to_escape); 1768 char *text = _edje_text_escape(text_to_escape);
1496 1769
1497 ret = _edje_object_part_text_raw_set(obj, rp, part, text); 1770 int_ret = _edje_object_part_text_raw_set(obj, rp, part, text);
1498 free(text); 1771 free(text);
1499 } 1772 }
1500 _edje_user_define_string(ed, part, rp->typedata.text->text); 1773 _edje_user_define_string(ed, part, rp->typedata.text->text);
1501 return ret; 1774 if (ret) *ret = int_ret;
1502} 1775}
1503 1776
1504EAPI char * 1777EAPI char *
1505edje_object_part_text_unescaped_get(const Evas_Object *obj, const char *part) 1778edje_object_part_text_unescaped_get(const Evas_Object *obj, const char *part)
1506{ 1779{
1507 Edje *ed; 1780 if (!obj) return NULL;
1781 char *ret = NULL;
1782 eo_do((Eo *)obj, edje_obj_part_text_unescaped_get(part, &ret));
1783 return ret;
1784}
1785
1786void
1787_part_text_unescaped_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1788{
1789 const char *part = va_arg(*list, const char *);
1790 char **ret = va_arg(*list, char **);
1791 Edje *ed = (Edje *)_pd;
1508 Edje_Real_Part *rp; 1792 Edje_Real_Part *rp;
1793 *ret = NULL;
1509 1794
1510 ed = _edje_fetch(obj); 1795 if ((!ed) || (!part)) return;
1511 if ((!ed) || (!part)) return NULL;
1512 1796
1513 /* Need to recalc before providing the object. */ 1797 /* Need to recalc before providing the object. */
1514 _edje_recalc_do(ed); 1798 _edje_recalc_do(ed);
1515 1799
1516 rp = _edje_real_part_recursive_get(ed, part); 1800 rp = _edje_real_part_recursive_get(ed, part);
1517 if (!rp) return NULL; 1801 if (!rp) return;
1518 if ((rp->type != EDJE_RP_TYPE_TEXT) || 1802 if ((rp->type != EDJE_RP_TYPE_TEXT) ||
1519 (!rp->typedata.text)) return NULL; 1803 (!rp->typedata.text)) return;
1520 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 1804 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1521 { 1805 {
1522 const char *t = _edje_entry_text_get(rp); 1806 const char *t = _edje_entry_text_get(rp);
1523 return _edje_text_unescape(t); 1807 *ret = _edje_text_unescape(t);
1808 return;
1524 } 1809 }
1525 else 1810 else
1526 { 1811 {
1527 if (rp->part->type == EDJE_PART_TYPE_TEXT) return strdup(rp->typedata.text->text); 1812 if (rp->part->type == EDJE_PART_TYPE_TEXT)
1813 {
1814 *ret = strdup(rp->typedata.text->text);
1815 return;
1816 }
1528 if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK) 1817 if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)
1529 { 1818 {
1530 const char *t = evas_object_textblock_text_markup_get(rp->object); 1819 const char *t = evas_object_textblock_text_markup_get(rp->object);
1531 return _edje_text_unescape(t); 1820 *ret = _edje_text_unescape(t);
1821 return;
1532 } 1822 }
1533 } 1823 }
1534 return NULL;
1535} 1824}
1536 1825
1537EAPI const char * 1826EAPI const char *
1538edje_object_part_text_selection_get(const Evas_Object *obj, const char *part) 1827edje_object_part_text_selection_get(const Evas_Object *obj, const char *part)
1539{ 1828{
1540 Edje *ed; 1829 if (!obj) return NULL;
1830 const char* ret = NULL;
1831 eo_do((Eo *)obj, edje_obj_part_text_selection_get(part, &ret));
1832 return ret;
1833}
1834
1835void
1836_part_text_selection_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1837{
1838 const char *part = va_arg(*list, const char *);
1839 const char **ret = va_arg(*list, const char **);
1840 const Edje *ed = _pd;
1541 Edje_Real_Part *rp; 1841 Edje_Real_Part *rp;
1842 *ret = NULL;
1542 1843
1543 ed = _edje_fetch(obj); 1844 if ((!ed) || (!part)) return;
1544 if ((!ed) || (!part)) return NULL;
1545 rp = _edje_real_part_recursive_get(ed, part); 1845 rp = _edje_real_part_recursive_get(ed, part);
1546 if (!rp) return NULL; 1846 if (!rp) return;
1547 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 1847 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1548 return _edje_entry_selection_get(rp); 1848 *ret = _edje_entry_selection_get(rp);
1549 return NULL;
1550} 1849}
1551 1850
1552EAPI void 1851EAPI void
1553edje_object_part_text_select_none(const Evas_Object *obj, const char *part) 1852edje_object_part_text_select_none(const Evas_Object *obj, const char *part)
1554{ 1853{
1555 Edje *ed; 1854 if (!obj) return;
1855 eo_do((Eo *)obj, edje_obj_part_text_select_none(part));
1856}
1857
1858void
1859_part_text_select_none(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1860{
1861 const char *part = va_arg(*list, const char *);
1862 Edje *ed = _pd;
1556 Edje_Real_Part *rp; 1863 Edje_Real_Part *rp;
1557 1864
1558 ed = _edje_fetch(obj);
1559 if ((!ed) || (!part)) return; 1865 if ((!ed) || (!part)) return;
1560 rp = _edje_real_part_recursive_get(ed, part); 1866 rp = _edje_real_part_recursive_get(ed, part);
1561 if (!rp) return; 1867 if (!rp) return;
@@ -1566,10 +1872,17 @@ edje_object_part_text_select_none(const Evas_Object *obj, const char *part)
1566EAPI void 1872EAPI void
1567edje_object_part_text_select_all(const Evas_Object *obj, const char *part) 1873edje_object_part_text_select_all(const Evas_Object *obj, const char *part)
1568{ 1874{
1569 Edje *ed; 1875 if (!obj) return;
1876 eo_do((Eo *)obj, edje_obj_part_text_select_all(part));
1877}
1878
1879void
1880_part_text_select_all(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1881{
1882 const char *part = va_arg(*list, const char *);
1883 Edje *ed = _pd;
1570 Edje_Real_Part *rp; 1884 Edje_Real_Part *rp;
1571 1885
1572 ed = _edje_fetch(obj);
1573 if ((!ed) || (!part)) return; 1886 if ((!ed) || (!part)) return;
1574 rp = _edje_real_part_recursive_get(ed, part); 1887 rp = _edje_real_part_recursive_get(ed, part);
1575 if (!rp) return; 1888 if (!rp) return;
@@ -1580,10 +1893,18 @@ edje_object_part_text_select_all(const Evas_Object *obj, const char *part)
1580EAPI void 1893EAPI void
1581edje_object_part_text_insert(Evas_Object *obj, const char *part, const char *text) 1894edje_object_part_text_insert(Evas_Object *obj, const char *part, const char *text)
1582{ 1895{
1583 Edje *ed; 1896 if (!obj) return;
1897 eo_do(obj, edje_obj_part_text_insert(part, text));
1898}
1899
1900void
1901_part_text_insert(Eo *obj, void *_pd, va_list *list)
1902{
1903 const char *part = va_arg(*list, const char *);
1904 const char *text = va_arg(*list, const char *);
1905 Edje *ed = _pd;
1584 Edje_Real_Part *rp; 1906 Edje_Real_Part *rp;
1585 1907
1586 ed = _edje_fetch(obj);
1587 if ((!ed) || (!part)) return; 1908 if ((!ed) || (!part)) return;
1588 rp = _edje_real_part_recursive_get(ed, part); 1909 rp = _edje_real_part_recursive_get(ed, part);
1589 if (!rp) return; 1910 if (!rp) return;
@@ -1604,10 +1925,18 @@ edje_object_part_text_insert(Evas_Object *obj, const char *part, const char *tex
1604EAPI void 1925EAPI void
1605edje_object_part_text_append(Evas_Object *obj, const char *part, const char *text) 1926edje_object_part_text_append(Evas_Object *obj, const char *part, const char *text)
1606{ 1927{
1607 Edje *ed; 1928 if (!obj) return;
1929 eo_do(obj, edje_obj_part_text_append(part, text));
1930}
1931
1932void
1933_part_text_append(Eo *obj, void *_pd, va_list *list)
1934{
1935 const char *part = va_arg(*list, const char *);
1936 const char *text = va_arg(*list, const char *);
1937 Edje *ed = _pd;
1608 Edje_Real_Part *rp; 1938 Edje_Real_Part *rp;
1609 1939
1610 ed = _edje_fetch(obj);
1611 if ((!ed) || (!part)) return; 1940 if ((!ed) || (!part)) return;
1612 rp = _edje_real_part_recursive_get(ed, part); 1941 rp = _edje_real_part_recursive_get(ed, part);
1613 if (!rp) return; 1942 if (!rp) return;
@@ -1627,70 +1956,130 @@ edje_object_part_text_append(Evas_Object *obj, const char *part, const char *tex
1627EAPI const Eina_List * 1956EAPI const Eina_List *
1628edje_object_part_text_anchor_list_get(const Evas_Object *obj, const char *part) 1957edje_object_part_text_anchor_list_get(const Evas_Object *obj, const char *part)
1629{ 1958{
1630 Edje *ed; 1959 if (!obj) return NULL;
1960 const Eina_List *ret = NULL;
1961 eo_do((Eo *)obj, edje_obj_part_text_anchor_list_get(part, &ret));
1962 return ret;
1963}
1964
1965void
1966_part_text_anchor_list_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1967{
1968 const char *part = va_arg(*list, const char *);
1969 const Eina_List **ret = va_arg(*list, const Eina_List **);
1970 const Edje *ed = _pd;
1631 Edje_Real_Part *rp; 1971 Edje_Real_Part *rp;
1972 *ret = NULL;
1632 1973
1633 ed = _edje_fetch(obj); 1974 if ((!ed) || (!part)) return;
1634 if ((!ed) || (!part)) return NULL;
1635 rp = _edje_real_part_recursive_get(ed, part); 1975 rp = _edje_real_part_recursive_get(ed, part);
1636 if (!rp) return NULL; 1976 if (!rp) return;
1637 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 1977 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1638 return _edje_entry_anchors_list(rp); 1978 *ret = _edje_entry_anchors_list(rp);
1639 return NULL;
1640} 1979}
1641 1980
1642EAPI const Eina_List * 1981EAPI const Eina_List *
1643edje_object_part_text_anchor_geometry_get(const Evas_Object *obj, const char *part, const char *anchor) 1982edje_object_part_text_anchor_geometry_get(const Evas_Object *obj, const char *part, const char *anchor)
1644{ 1983{
1645 Edje *ed; 1984 if (!obj) return NULL;
1985 const Eina_List *ret = NULL;
1986 eo_do((Eo *)obj, edje_obj_part_text_anchor_geometry_get(part, anchor, &ret));
1987 return ret;
1988}
1989
1990void
1991_part_text_anchor_geometry_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1992{
1993 const char *part = va_arg(*list, const char *);
1994 const char *anchor = va_arg(*list, const char *);
1995 const Eina_List **ret = va_arg(*list, const Eina_List **);
1996 const Edje *ed = _pd;
1646 Edje_Real_Part *rp; 1997 Edje_Real_Part *rp;
1998 *ret = NULL;
1647 1999
1648 ed = _edje_fetch(obj); 2000 if ((!ed) || (!part)) return;
1649 if ((!ed) || (!part)) return NULL;
1650 rp = _edje_real_part_recursive_get(ed, part); 2001 rp = _edje_real_part_recursive_get(ed, part);
1651 if (!rp) return NULL; 2002 if (!rp) return;
1652 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2003 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1653 return _edje_entry_anchor_geometry_get(rp, anchor); 2004 *ret = _edje_entry_anchor_geometry_get(rp, anchor);
1654 return NULL;
1655} 2005}
1656 2006
1657EAPI const Eina_List * 2007EAPI const Eina_List *
1658edje_object_part_text_item_list_get(const Evas_Object *obj, const char *part) 2008edje_object_part_text_item_list_get(const Evas_Object *obj, const char *part)
1659{ 2009{
1660 Edje *ed; 2010 if (!obj) return NULL;
2011 const Eina_List *ret = NULL;
2012 eo_do((Eo *)obj, edje_obj_part_text_item_list_get(part, &ret));
2013 return ret;
2014}
2015
2016void
2017_part_text_item_list_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2018{
2019 const char *part = va_arg(*list, const char *);
2020 const Eina_List **ret = va_arg(*list, const Eina_List **);
2021 const Edje *ed = _pd;
1661 Edje_Real_Part *rp; 2022 Edje_Real_Part *rp;
2023 *ret = NULL;
1662 2024
1663 ed = _edje_fetch(obj); 2025 if ((!ed) || (!part)) return;
1664 if ((!ed) || (!part)) return NULL;
1665 rp = _edje_real_part_recursive_get(ed, part); 2026 rp = _edje_real_part_recursive_get(ed, part);
1666 if (!rp) return NULL; 2027 if (!rp) return;
1667 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2028 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1668 return _edje_entry_items_list(rp); 2029 *ret = _edje_entry_items_list(rp);
1669 return NULL;
1670} 2030}
1671 2031
1672EAPI Eina_Bool 2032EAPI Eina_Bool
1673edje_object_part_text_item_geometry_get(const Evas_Object *obj, const char *part, const char *item, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) 2033edje_object_part_text_item_geometry_get(const Evas_Object *obj, const char *part, const char *item, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
1674{ 2034{
1675 Edje *ed; 2035 if (!obj) return EINA_FALSE;
2036 Eina_Bool ret = EINA_FALSE;
2037 eo_do((Eo *)obj, edje_obj_part_text_item_geometry_get(part, item, cx, cy, cw, ch, &ret));
2038 return ret;
2039}
2040
2041void
2042_part_text_item_geometry_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2043{
2044 const char *part = va_arg(*list, const char *);
2045 const char *item = va_arg(*list, const char *);
2046 Evas_Coord *cx = va_arg(*list, Evas_Coord *);
2047 Evas_Coord *cy = va_arg(*list, Evas_Coord *);
2048 Evas_Coord *cw = va_arg(*list, Evas_Coord *);
2049 Evas_Coord *ch = va_arg(*list, Evas_Coord *);
2050 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
2051 const Edje *ed = _pd;
1676 Edje_Real_Part *rp; 2052 Edje_Real_Part *rp;
2053 if (ret) *ret = EINA_FALSE;
1677 2054
1678 ed = _edje_fetch(obj); 2055 if ((!ed) || (!part)) return;
1679 if ((!ed) || (!part)) return EINA_FALSE;
1680 rp = _edje_real_part_recursive_get(ed, part); 2056 rp = _edje_real_part_recursive_get(ed, part);
1681 if (!rp) return EINA_FALSE; 2057 if (!rp) return;
1682 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2058 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1683 return _edje_entry_item_geometry_get(rp, item, cx, cy, cw, ch); 2059 {
1684 return EINA_FALSE; 2060 Eina_Bool int_ret = _edje_entry_item_geometry_get(rp, item, cx, cy, cw, ch);
2061 if (ret) *ret = int_ret;
2062 }
1685} 2063}
1686 2064
1687EAPI void 2065EAPI void
1688edje_object_part_text_cursor_geometry_get(const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) 2066edje_object_part_text_cursor_geometry_get(const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
1689{ 2067{
1690 Edje *ed; 2068 if (!obj) return;
2069 eo_do((Eo *)obj, edje_obj_part_text_cursor_geometry_get(part, x, y, w, h));
2070}
2071
2072void
2073_part_text_cursor_geometry_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2074{
2075 const char *part = va_arg(*list, const char *);
2076 Evas_Coord *x = va_arg(*list, Evas_Coord *);
2077 Evas_Coord *y = va_arg(*list, Evas_Coord *);
2078 Evas_Coord *w = va_arg(*list, Evas_Coord *);
2079 Evas_Coord *h = va_arg(*list, Evas_Coord *);
2080 const Edje *ed = _pd;
1691 Edje_Real_Part *rp; 2081 Edje_Real_Part *rp;
1692 2082
1693 ed = _edje_fetch(obj);
1694 if (x) *x = 0; 2083 if (x) *x = 0;
1695 if (y) *y = 0; 2084 if (y) *y = 0;
1696 if (w) *w = 0; 2085 if (w) *w = 0;
@@ -1709,10 +2098,18 @@ edje_object_part_text_cursor_geometry_get(const Evas_Object *obj, const char *pa
1709EAPI void 2098EAPI void
1710edje_object_part_text_user_insert(const Evas_Object *obj, const char *part, const char *text) 2099edje_object_part_text_user_insert(const Evas_Object *obj, const char *part, const char *text)
1711{ 2100{
1712 Edje *ed; 2101 if (!obj) return;
2102 eo_do((Eo *)obj, edje_obj_part_text_user_insert(part, text));
2103}
2104
2105void
2106_part_text_user_insert(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2107{
2108 const char *part = va_arg(*list, const char *);
2109 const char *text = va_arg(*list, const char *);
2110 Edje *ed = _pd;
1713 Edje_Real_Part *rp; 2111 Edje_Real_Part *rp;
1714 2112
1715 ed = _edje_fetch(obj);
1716 if ((!ed) || (!part)) return; 2113 if ((!ed) || (!part)) return;
1717 rp = _edje_real_part_recursive_get(ed, part); 2114 rp = _edje_real_part_recursive_get(ed, part);
1718 if (!rp) return; 2115 if (!rp) return;
@@ -1723,10 +2120,18 @@ edje_object_part_text_user_insert(const Evas_Object *obj, const char *part, cons
1723EAPI void 2120EAPI void
1724edje_object_part_text_select_allow_set(const Evas_Object *obj, const char *part, Eina_Bool allow) 2121edje_object_part_text_select_allow_set(const Evas_Object *obj, const char *part, Eina_Bool allow)
1725{ 2122{
1726 Edje *ed; 2123 if (!obj) return;
2124 eo_do((Eo *)obj, edje_obj_part_text_select_allow_set(part, allow));
2125}
2126
2127void
2128_part_text_select_allow_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2129{
2130 const char *part = va_arg(*list, const char *);
2131 Eina_Bool allow = va_arg(*list, int);
2132 Edje *ed = _pd;
1727 Edje_Real_Part *rp; 2133 Edje_Real_Part *rp;
1728 2134
1729 ed = _edje_fetch(obj);
1730 if ((!ed) || (!part)) return; 2135 if ((!ed) || (!part)) return;
1731 rp = _edje_real_part_recursive_get(ed, part); 2136 rp = _edje_real_part_recursive_get(ed, part);
1732 if (!rp) return; 2137 if (!rp) return;
@@ -1737,10 +2142,17 @@ edje_object_part_text_select_allow_set(const Evas_Object *obj, const char *part,
1737EAPI void 2142EAPI void
1738edje_object_part_text_select_abort(const Evas_Object *obj, const char *part) 2143edje_object_part_text_select_abort(const Evas_Object *obj, const char *part)
1739{ 2144{
1740 Edje *ed; 2145 if (!obj) return;
2146 eo_do((Eo *)obj, edje_obj_part_text_select_abort(part));
2147}
2148
2149void
2150_part_text_select_abort(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2151{
2152 const char *part = va_arg(*list, const char *);
2153 Edje *ed = _pd;
1741 Edje_Real_Part *rp; 2154 Edje_Real_Part *rp;
1742 2155
1743 ed = _edje_fetch(obj);
1744 if ((!ed) || (!part)) return; 2156 if ((!ed) || (!part)) return;
1745 rp = _edje_real_part_recursive_get(ed, part); 2157 rp = _edje_real_part_recursive_get(ed, part);
1746 if (!rp) return; 2158 if (!rp) return;
@@ -1751,10 +2163,17 @@ edje_object_part_text_select_abort(const Evas_Object *obj, const char *part)
1751EAPI void 2163EAPI void
1752edje_object_part_text_select_begin(const Evas_Object *obj, const char *part) 2164edje_object_part_text_select_begin(const Evas_Object *obj, const char *part)
1753{ 2165{
1754 Edje *ed; 2166 if (!obj) return;
2167 eo_do((Eo *)obj, edje_obj_part_text_select_begin(part));
2168}
2169
2170void
2171_part_text_select_begin(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2172{
2173 const char *part = va_arg(*list, const char *);
2174 Edje *ed = _pd;
1755 Edje_Real_Part *rp; 2175 Edje_Real_Part *rp;
1756 2176
1757 ed = _edje_fetch(obj);
1758 if ((!ed) || (!part)) return; 2177 if ((!ed) || (!part)) return;
1759 rp = _edje_real_part_recursive_get(ed, part); 2178 rp = _edje_real_part_recursive_get(ed, part);
1760 if (!rp) return; 2179 if (!rp) return;
@@ -1765,10 +2184,17 @@ edje_object_part_text_select_begin(const Evas_Object *obj, const char *part)
1765EAPI void 2184EAPI void
1766edje_object_part_text_select_extend(const Evas_Object *obj, const char *part) 2185edje_object_part_text_select_extend(const Evas_Object *obj, const char *part)
1767{ 2186{
1768 Edje *ed; 2187 if (!obj) return;
2188 eo_do((Eo *)obj, edje_obj_part_text_select_extend(part));
2189}
2190
2191void
2192_part_text_select_extend(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2193{
2194 const char *part = va_arg(*list, const char *);
2195 Edje *ed = _pd;
1769 Edje_Real_Part *rp; 2196 Edje_Real_Part *rp;
1770 2197
1771 ed = _edje_fetch(obj);
1772 if ((!ed) || (!part)) return; 2198 if ((!ed) || (!part)) return;
1773 rp = _edje_real_part_recursive_get(ed, part); 2199 rp = _edje_real_part_recursive_get(ed, part);
1774 if (!rp) return; 2200 if (!rp) return;
@@ -1779,96 +2205,161 @@ edje_object_part_text_select_extend(const Evas_Object *obj, const char *part)
1779EAPI void * 2205EAPI void *
1780edje_object_part_text_imf_context_get(const Evas_Object *obj, const char *part) 2206edje_object_part_text_imf_context_get(const Evas_Object *obj, const char *part)
1781{ 2207{
1782 Edje *ed; 2208 if (!obj) return NULL;
2209 void *ret = NULL;
2210 eo_do((Eo *)obj, edje_obj_part_text_imf_context_get(part, &ret));
2211 return ret;
2212}
2213
2214void
2215_part_text_imf_context_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2216{
2217 const char *part = va_arg(*list, const char *);
2218 void **ret = va_arg(*list, void **);
2219 const Edje *ed = _pd;
1783 Edje_Real_Part *rp; 2220 Edje_Real_Part *rp;
2221 *ret = NULL;
1784 2222
1785 ed = _edje_fetch(obj); 2223 if ((!ed) || (!part)) return;
1786 if ((!ed) || (!part)) return NULL;
1787 2224
1788 rp = _edje_real_part_recursive_get(ed, (char *)part); 2225 rp = _edje_real_part_recursive_get(ed, (char *)part);
1789 if (!rp) return NULL; 2226 if (!rp) return;
1790 2227
1791 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2228 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1792 return _edje_entry_imf_context_get(rp); 2229 *ret = _edje_entry_imf_context_get(rp);
1793 else
1794 return NULL;
1795} 2230}
1796 2231
1797EAPI Eina_Bool 2232EAPI Eina_Bool
1798edje_object_part_text_cursor_next(Evas_Object *obj, const char *part, Edje_Cursor cur) 2233edje_object_part_text_cursor_next(Evas_Object *obj, const char *part, Edje_Cursor cur)
1799{ 2234{
1800 Edje *ed; 2235 if (!obj) return EINA_FALSE;
2236 Eina_Bool ret = EINA_FALSE;
2237 eo_do(obj, edje_obj_part_text_cursor_next(part, cur, &ret));
2238 return ret;
2239}
2240
2241void
2242_part_text_cursor_next(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2243{
2244 const char *part = va_arg(*list, const char *);
2245 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2246 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
2247 Edje *ed = _pd;
1801 Edje_Real_Part *rp; 2248 Edje_Real_Part *rp;
2249 if (ret) *ret = EINA_FALSE;
1802 2250
1803 ed = _edje_fetch(obj); 2251 if ((!ed) || (!part)) return;
1804 if ((!ed) || (!part)) return EINA_FALSE;
1805 rp = _edje_real_part_recursive_get(ed, part); 2252 rp = _edje_real_part_recursive_get(ed, part);
1806 if (!rp) return EINA_FALSE; 2253 if (!rp) return;
1807 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2254 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1808 { 2255 {
1809 return _edje_entry_cursor_next(rp, cur); 2256 Eina_Bool int_ret = _edje_entry_cursor_next(rp, cur);
2257 if (ret) *ret = int_ret;
1810 } 2258 }
1811 return EINA_FALSE;
1812} 2259}
1813 2260
1814EAPI Eina_Bool 2261EAPI Eina_Bool
1815edje_object_part_text_cursor_prev(Evas_Object *obj, const char *part, Edje_Cursor cur) 2262edje_object_part_text_cursor_prev(Evas_Object *obj, const char *part, Edje_Cursor cur)
1816{ 2263{
1817 Edje *ed; 2264 if (!obj) return EINA_FALSE;
2265 Eina_Bool ret = EINA_FALSE;
2266 eo_do(obj, edje_obj_part_text_cursor_prev(part, cur, &ret));
2267 return ret;
2268}
2269
2270void
2271_part_text_cursor_prev(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2272{
2273 const char *part = va_arg(*list, const char *);
2274 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2275 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
2276 Edje *ed = _pd;
1818 Edje_Real_Part *rp; 2277 Edje_Real_Part *rp;
2278 if (ret) *ret = EINA_FALSE;
1819 2279
1820 ed = _edje_fetch(obj); 2280 if ((!ed) || (!part)) return;
1821 if ((!ed) || (!part)) return EINA_FALSE;
1822 rp = _edje_real_part_recursive_get(ed, part); 2281 rp = _edje_real_part_recursive_get(ed, part);
1823 if (!rp) return EINA_FALSE; 2282 if (!rp) return;
1824 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2283 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1825 { 2284 {
1826 return _edje_entry_cursor_prev(rp, cur); 2285 Eina_Bool int_ret = _edje_entry_cursor_prev(rp, cur);
2286 if (ret) *ret = int_ret;
1827 } 2287 }
1828 return EINA_FALSE;
1829} 2288}
1830 2289
1831EAPI Eina_Bool 2290EAPI Eina_Bool
1832edje_object_part_text_cursor_up(Evas_Object *obj, const char *part, Edje_Cursor cur) 2291edje_object_part_text_cursor_up(Evas_Object *obj, const char *part, Edje_Cursor cur)
1833{ 2292{
1834 Edje *ed; 2293 if (!obj) return EINA_FALSE;
2294 Eina_Bool ret = EINA_FALSE;
2295 eo_do(obj, edje_obj_part_text_cursor_up(part, cur, &ret));
2296 return ret;
2297}
2298
2299void
2300_part_text_cursor_up(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2301{
2302 const char *part = va_arg(*list, const char *);
2303 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2304 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
2305 Edje *ed = _pd;
1835 Edje_Real_Part *rp; 2306 Edje_Real_Part *rp;
2307 if (ret) *ret = EINA_FALSE;
1836 2308
1837 ed = _edje_fetch(obj); 2309 if ((!ed) || (!part)) return;
1838 if ((!ed) || (!part)) return EINA_FALSE;
1839 rp = _edje_real_part_recursive_get(ed, part); 2310 rp = _edje_real_part_recursive_get(ed, part);
1840 if (!rp) return EINA_FALSE; 2311 if (!rp) return;
1841 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2312 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1842 { 2313 {
1843 return _edje_entry_cursor_up(rp, cur); 2314 Eina_Bool int_ret = _edje_entry_cursor_up(rp, cur);
2315 if (ret) *ret = int_ret;
1844 } 2316 }
1845 return EINA_FALSE;
1846} 2317}
1847 2318
1848EAPI Eina_Bool 2319EAPI Eina_Bool
1849edje_object_part_text_cursor_down(Evas_Object *obj, const char *part, Edje_Cursor cur) 2320edje_object_part_text_cursor_down(Evas_Object *obj, const char *part, Edje_Cursor cur)
1850{ 2321{
1851 Edje *ed; 2322 if (!obj) return EINA_FALSE;
2323 Eina_Bool ret = EINA_FALSE;
2324 eo_do(obj, edje_obj_part_text_cursor_down(part, cur, &ret));
2325 return ret;
2326}
2327
2328void
2329_part_text_cursor_down(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2330{
2331 const char *part = va_arg(*list, const char *);
2332 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2333 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
2334 Edje *ed = _pd;
1852 Edje_Real_Part *rp; 2335 Edje_Real_Part *rp;
2336 if (ret) *ret = EINA_FALSE;
1853 2337
1854 ed = _edje_fetch(obj); 2338 if ((!ed) || (!part)) return;
1855 if ((!ed) || (!part)) return EINA_FALSE;
1856 rp = _edje_real_part_recursive_get(ed, part); 2339 rp = _edje_real_part_recursive_get(ed, part);
1857 if (!rp) return EINA_FALSE; 2340 if (!rp) return;
1858 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2341 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1859 { 2342 {
1860 return _edje_entry_cursor_down(rp, cur); 2343 Eina_Bool int_ret = _edje_entry_cursor_down(rp, cur);
2344 if (ret) *ret = int_ret;
1861 } 2345 }
1862 return EINA_FALSE;
1863} 2346}
1864 2347
1865EAPI void 2348EAPI void
1866edje_object_part_text_cursor_begin_set(Evas_Object *obj, const char *part, Edje_Cursor cur) 2349edje_object_part_text_cursor_begin_set(Evas_Object *obj, const char *part, Edje_Cursor cur)
1867{ 2350{
1868 Edje *ed; 2351 if (!obj) return;
2352 eo_do(obj, edje_obj_part_text_cursor_begin_set(part, cur));
2353}
2354
2355void
2356_part_text_cursor_begin_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2357{
2358 const char *part = va_arg(*list, const char *);
2359 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2360 Edje *ed = _pd;
1869 Edje_Real_Part *rp; 2361 Edje_Real_Part *rp;
1870 2362
1871 ed = _edje_fetch(obj);
1872 if ((!ed) || (!part)) return; 2363 if ((!ed) || (!part)) return;
1873 rp = _edje_real_part_recursive_get(ed, part); 2364 rp = _edje_real_part_recursive_get(ed, part);
1874 if (!rp) return; 2365 if (!rp) return;
@@ -1881,10 +2372,18 @@ edje_object_part_text_cursor_begin_set(Evas_Object *obj, const char *part, Edje_
1881EAPI void 2372EAPI void
1882edje_object_part_text_cursor_end_set(Evas_Object *obj, const char *part, Edje_Cursor cur) 2373edje_object_part_text_cursor_end_set(Evas_Object *obj, const char *part, Edje_Cursor cur)
1883{ 2374{
1884 Edje *ed; 2375 if (!obj) return;
2376 eo_do(obj, edje_obj_part_text_cursor_end_set(part, cur));
2377}
2378
2379void
2380_part_text_cursor_end_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2381{
2382 const char *part = va_arg(*list, const char *);
2383 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2384 Edje *ed = _pd;
1885 Edje_Real_Part *rp; 2385 Edje_Real_Part *rp;
1886 2386
1887 ed = _edje_fetch(obj);
1888 if ((!ed) || (!part)) return; 2387 if ((!ed) || (!part)) return;
1889 rp = _edje_real_part_recursive_get(ed, part); 2388 rp = _edje_real_part_recursive_get(ed, part);
1890 if (!rp) return; 2389 if (!rp) return;
@@ -1897,10 +2396,19 @@ edje_object_part_text_cursor_end_set(Evas_Object *obj, const char *part, Edje_Cu
1897EAPI void 2396EAPI void
1898edje_object_part_text_cursor_copy(Evas_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst) 2397edje_object_part_text_cursor_copy(Evas_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst)
1899{ 2398{
1900 Edje *ed; 2399 if (!obj) return;
2400 eo_do(obj, edje_obj_part_text_cursor_copy(part, src, dst));
2401}
2402
2403void
2404_part_text_cursor_copy(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2405{
2406 const char *part = va_arg(*list, const char *);
2407 Edje_Cursor src = va_arg(*list, Edje_Cursor);
2408 Edje_Cursor dst = va_arg(*list, Edje_Cursor);
2409 Edje *ed = _pd;
1901 Edje_Real_Part *rp; 2410 Edje_Real_Part *rp;
1902 2411
1903 ed = _edje_fetch(obj);
1904 if ((!ed) || (!part)) return; 2412 if ((!ed) || (!part)) return;
1905 rp = _edje_real_part_recursive_get(ed, part); 2413 rp = _edje_real_part_recursive_get(ed, part);
1906 if (!rp) return; 2414 if (!rp) return;
@@ -1913,10 +2421,18 @@ edje_object_part_text_cursor_copy(Evas_Object *obj, const char *part, Edje_Curso
1913EAPI void 2421EAPI void
1914edje_object_part_text_cursor_line_begin_set(Evas_Object *obj, const char *part, Edje_Cursor cur) 2422edje_object_part_text_cursor_line_begin_set(Evas_Object *obj, const char *part, Edje_Cursor cur)
1915{ 2423{
1916 Edje *ed; 2424 if (!obj) return;
2425 eo_do(obj, edje_obj_part_text_cursor_line_begin_set(part, cur));
2426}
2427
2428void
2429_part_text_cursor_line_begin_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2430{
2431 const char *part = va_arg(*list, const char *);
2432 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2433 Edje *ed = _pd;
1917 Edje_Real_Part *rp; 2434 Edje_Real_Part *rp;
1918 2435
1919 ed = _edje_fetch(obj);
1920 if ((!ed) || (!part)) return; 2436 if ((!ed) || (!part)) return;
1921 rp = _edje_real_part_recursive_get(ed, part); 2437 rp = _edje_real_part_recursive_get(ed, part);
1922 if (!rp) return; 2438 if (!rp) return;
@@ -1929,10 +2445,18 @@ edje_object_part_text_cursor_line_begin_set(Evas_Object *obj, const char *part,
1929EAPI void 2445EAPI void
1930edje_object_part_text_cursor_line_end_set(Evas_Object *obj, const char *part, Edje_Cursor cur) 2446edje_object_part_text_cursor_line_end_set(Evas_Object *obj, const char *part, Edje_Cursor cur)
1931{ 2447{
1932 Edje *ed; 2448 if (!obj) return;
2449 eo_do(obj, edje_obj_part_text_cursor_line_end_set(part, cur));
2450}
2451
2452void
2453_part_text_cursor_line_end_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2454{
2455 const char *part = va_arg(*list, const char *);
2456 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2457 Edje *ed = _pd;
1933 Edje_Real_Part *rp; 2458 Edje_Real_Part *rp;
1934 2459
1935 ed = _edje_fetch(obj);
1936 if ((!ed) || (!part)) return; 2460 if ((!ed) || (!part)) return;
1937 rp = _edje_real_part_recursive_get(ed, part); 2461 rp = _edje_real_part_recursive_get(ed, part);
1938 if (!rp) return; 2462 if (!rp) return;
@@ -1946,78 +2470,134 @@ EAPI Eina_Bool
1946edje_object_part_text_cursor_coord_set(Evas_Object *obj, const char *part, 2470edje_object_part_text_cursor_coord_set(Evas_Object *obj, const char *part,
1947 Edje_Cursor cur, Evas_Coord x, Evas_Coord y) 2471 Edje_Cursor cur, Evas_Coord x, Evas_Coord y)
1948{ 2472{
1949 Edje *ed; 2473 if (!obj) return EINA_FALSE;
2474 Eina_Bool ret = EINA_FALSE;
2475 eo_do(obj, edje_obj_part_text_cursor_coord_set(part, cur, x, y, &ret));
2476 return ret;
2477}
2478
2479void
2480_part_text_cursor_coord_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2481{
2482 const char *part = va_arg(*list, const char *);
2483 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2484 Evas_Coord x = va_arg(*list, Evas_Coord);
2485 Evas_Coord y = va_arg(*list, Evas_Coord);
2486 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
2487 Edje *ed = _pd;
1950 Edje_Real_Part *rp; 2488 Edje_Real_Part *rp;
1951 2489
1952 ed = _edje_fetch(obj); 2490 if (ret) *ret = EINA_FALSE;
1953 if ((!ed) || (!part)) return EINA_FALSE; 2491 if ((!ed) || (!part)) return;
1954 rp = _edje_real_part_recursive_get(ed, part); 2492 rp = _edje_real_part_recursive_get(ed, part);
1955 if (!rp) return EINA_FALSE; 2493 if (!rp) return;
1956 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2494 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1957 { 2495 {
1958 return _edje_entry_cursor_coord_set(rp, cur, x, y); 2496 Eina_Bool int_ret = _edje_entry_cursor_coord_set(rp, cur, x, y);
2497 if (ret) *ret = int_ret;
1959 } 2498 }
1960 return EINA_FALSE;
1961} 2499}
1962 2500
1963EAPI Eina_Bool 2501EAPI Eina_Bool
1964edje_object_part_text_cursor_is_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur) 2502edje_object_part_text_cursor_is_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
1965{ 2503{
1966 Edje *ed; 2504 if (!obj) return EINA_FALSE;
2505 Eina_Bool ret = EINA_FALSE;
2506 eo_do((Eo *)obj, edje_obj_part_text_cursor_is_format_get(part, cur, &ret));
2507 return ret;
2508}
2509
2510void
2511_part_text_cursor_is_format_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2512{
2513 const char *part = va_arg(*list, const char *);
2514 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2515 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
2516 const Edje *ed = _pd;
1967 Edje_Real_Part *rp; 2517 Edje_Real_Part *rp;
2518 *ret = EINA_FALSE;
1968 2519
1969 ed = _edje_fetch(obj); 2520 if ((!ed) || (!part)) return;
1970 if ((!ed) || (!part)) return EINA_FALSE;
1971 rp = _edje_real_part_recursive_get(ed, part); 2521 rp = _edje_real_part_recursive_get(ed, part);
1972 if (!rp) return EINA_FALSE; 2522 if (!rp) return;
1973 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2523 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1974 { 2524 {
1975 return _edje_entry_cursor_is_format_get(rp, cur); 2525 *ret = _edje_entry_cursor_is_format_get(rp, cur);
1976 } 2526 }
1977 return EINA_FALSE;
1978} 2527}
1979 2528
1980EAPI Eina_Bool 2529EAPI Eina_Bool
1981edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur) 2530edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
1982{ 2531{
1983 Edje *ed; 2532 if (!obj) return EINA_FALSE;
2533 Eina_Bool ret = EINA_FALSE;
2534 eo_do((Eo *)obj, edje_obj_part_text_cursor_is_visible_format_get(part, cur, &ret));
2535 return ret;
2536}
2537
2538void
2539_part_text_cursor_is_visible_format_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2540{
2541 const char *part = va_arg(*list, const char *);
2542 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2543 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
2544 const Edje *ed = _pd;
1984 Edje_Real_Part *rp; 2545 Edje_Real_Part *rp;
2546 *ret = EINA_FALSE;
1985 2547
1986 ed = _edje_fetch(obj); 2548 if ((!ed) || (!part)) return;
1987 if ((!ed) || (!part)) return 0;
1988 rp = _edje_real_part_recursive_get(ed, part); 2549 rp = _edje_real_part_recursive_get(ed, part);
1989 if (!rp) return 0; 2550 if (!rp) return;
1990 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2551 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1991 { 2552 {
1992 return _edje_entry_cursor_is_visible_format_get(rp, cur); 2553 *ret = _edje_entry_cursor_is_visible_format_get(rp, cur);
1993 } 2554 }
1994 return 0;
1995} 2555}
1996 2556
1997EAPI char * 2557EAPI char *
1998edje_object_part_text_cursor_content_get(const Evas_Object *obj, const char *part, Edje_Cursor cur) 2558edje_object_part_text_cursor_content_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
1999{ 2559{
2000 Edje *ed; 2560 if (!obj) return NULL;
2561 char *ret = NULL;
2562 eo_do((Eo *)obj, edje_obj_part_text_cursor_content_get(part, cur, &ret));
2563 return ret;
2564}
2565
2566void
2567_part_text_cursor_content_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2568{
2569 const char *part = va_arg(*list, const char *);
2570 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2571 char **ret = va_arg(*list, char **);
2572 const Edje *ed = _pd;
2001 Edje_Real_Part *rp; 2573 Edje_Real_Part *rp;
2574 *ret = NULL;
2002 2575
2003 ed = _edje_fetch(obj); 2576 if ((!ed) || (!part)) return;
2004 if ((!ed) || (!part)) return NULL;
2005 rp = _edje_real_part_recursive_get(ed, part); 2577 rp = _edje_real_part_recursive_get(ed, part);
2006 if (!rp) return NULL; 2578 if (!rp) return;
2007 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2579 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
2008 { 2580 {
2009 return _edje_entry_cursor_content_get(rp, cur); 2581 *ret = _edje_entry_cursor_content_get(rp, cur);
2010 } 2582 }
2011 return NULL;
2012} 2583}
2013 2584
2014EAPI void 2585EAPI void
2015edje_object_part_text_cursor_pos_set(Evas_Object *obj, const char *part, Edje_Cursor cur, int pos) 2586edje_object_part_text_cursor_pos_set(Evas_Object *obj, const char *part, Edje_Cursor cur, int pos)
2016{ 2587{
2017 Edje *ed; 2588 if (!obj) return;
2589 eo_do(obj, edje_obj_part_text_cursor_pos_set(part, cur, pos));
2590}
2591
2592void
2593_part_text_cursor_pos_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2594{
2595 const char *part = va_arg(*list, const char *);
2596 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2597 int pos = va_arg(*list, int);
2598 Edje *ed = _pd;
2018 Edje_Real_Part *rp; 2599 Edje_Real_Part *rp;
2019 2600
2020 ed = _edje_fetch(obj);
2021 if ((!ed) || (!part)) return; 2601 if ((!ed) || (!part)) return;
2022 rp = _edje_real_part_recursive_get(ed, part); 2602 rp = _edje_real_part_recursive_get(ed, part);
2023 if (!rp) return; 2603 if (!rp) return;
@@ -2030,27 +2610,45 @@ edje_object_part_text_cursor_pos_set(Evas_Object *obj, const char *part, Edje_Cu
2030EAPI int 2610EAPI int
2031edje_object_part_text_cursor_pos_get(const Evas_Object *obj, const char *part, Edje_Cursor cur) 2611edje_object_part_text_cursor_pos_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
2032{ 2612{
2033 Edje *ed; 2613 if (!obj) return 0;
2614 int ret;
2615 eo_do((Eo *)obj, edje_obj_part_text_cursor_pos_get(part, cur, &ret));
2616 return ret;
2617}
2618
2619void
2620_part_text_cursor_pos_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2621{
2622 const char *part = va_arg(*list, const char *);
2623 Edje_Cursor cur = va_arg(*list, Edje_Cursor);
2624 int *ret = va_arg(*list, int *);
2625 const Edje *ed = _pd;
2034 Edje_Real_Part *rp; 2626 Edje_Real_Part *rp;
2627 *ret = 0;
2035 2628
2036 ed = _edje_fetch(obj); 2629 if ((!ed) || (!part)) return;
2037 if ((!ed) || (!part)) return 0;
2038 rp = _edje_real_part_recursive_get(ed, part); 2630 rp = _edje_real_part_recursive_get(ed, part);
2039 if (!rp) return 0; 2631 if (!rp) return;
2040 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2632 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
2041 { 2633 {
2042 return _edje_entry_cursor_pos_get(rp, cur); 2634 *ret = _edje_entry_cursor_pos_get(rp, cur);
2043 } 2635 }
2044 return 0;
2045} 2636}
2046 2637
2047EAPI void 2638EAPI void
2048edje_object_part_text_imf_context_reset(const Evas_Object *obj, const char *part) 2639edje_object_part_text_imf_context_reset(const Evas_Object *obj, const char *part)
2049{ 2640{
2050 Edje *ed; 2641 if (!obj) return;
2642 eo_do((Eo *)obj, edje_obj_part_text_imf_context_reset(part));
2643}
2644
2645void
2646_part_text_imf_context_reset(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2647{
2648 const char *part = va_arg(*list, const char *);
2649 const Edje *ed = _pd;
2051 Edje_Real_Part *rp; 2650 Edje_Real_Part *rp;
2052 2651
2053 ed = _edje_fetch(obj);
2054 if ((!ed) || (!part)) return; 2652 if ((!ed) || (!part)) return;
2055 rp = _edje_real_part_recursive_get(ed, part); 2653 rp = _edje_real_part_recursive_get(ed, part);
2056 if (!rp) return; 2654 if (!rp) return;
@@ -2063,10 +2661,18 @@ edje_object_part_text_imf_context_reset(const Evas_Object *obj, const char *part
2063EAPI void 2661EAPI void
2064edje_object_part_text_input_panel_layout_set(Evas_Object *obj, const char *part, Edje_Input_Panel_Layout layout) 2662edje_object_part_text_input_panel_layout_set(Evas_Object *obj, const char *part, Edje_Input_Panel_Layout layout)
2065{ 2663{
2066 Edje *ed; 2664 if (!obj) return;
2665 eo_do(obj, edje_obj_part_text_input_panel_layout_set(part, layout));
2666}
2667
2668void
2669_part_text_input_panel_layout_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2670{
2671 const char *part = va_arg(*list, const char *);
2672 Edje_Input_Panel_Layout layout = va_arg(*list, Edje_Input_Panel_Layout);
2673 Edje *ed = _pd;
2067 Edje_Real_Part *rp; 2674 Edje_Real_Part *rp;
2068 2675
2069 ed = _edje_fetch(obj);
2070 if ((!ed) || (!part)) return; 2676 if ((!ed) || (!part)) return;
2071 rp = _edje_real_part_recursive_get(ed, part); 2677 rp = _edje_real_part_recursive_get(ed, part);
2072 if (!rp) return; 2678 if (!rp) return;
@@ -2079,27 +2685,45 @@ edje_object_part_text_input_panel_layout_set(Evas_Object *obj, const char *part,
2079EAPI Edje_Input_Panel_Layout 2685EAPI Edje_Input_Panel_Layout
2080edje_object_part_text_input_panel_layout_get(const Evas_Object *obj, const char *part) 2686edje_object_part_text_input_panel_layout_get(const Evas_Object *obj, const char *part)
2081{ 2687{
2082 Edje *ed; 2688 if (!obj) return EDJE_INPUT_PANEL_LAYOUT_INVALID;
2689 Edje_Input_Panel_Layout ret;
2690 eo_do((Eo *)obj, edje_obj_part_text_input_panel_layout_get(part, &ret));
2691 return ret;
2692}
2693
2694void
2695_part_text_input_panel_layout_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2696{
2697 const char *part = va_arg(*list, const char *);
2698 Edje_Input_Panel_Layout *ret = va_arg(*list, Edje_Input_Panel_Layout *);
2699 const Edje *ed = _pd;
2083 Edje_Real_Part *rp; 2700 Edje_Real_Part *rp;
2701 *ret = EDJE_INPUT_PANEL_LAYOUT_INVALID;
2084 2702
2085 ed = _edje_fetch(obj); 2703 if ((!ed) || (!part)) return;
2086 if ((!ed) || (!part)) return EDJE_INPUT_PANEL_LAYOUT_INVALID;
2087 rp = _edje_real_part_recursive_get(ed, part); 2704 rp = _edje_real_part_recursive_get(ed, part);
2088 if (!rp) return EINA_FALSE; 2705 if (!rp) return;
2089 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2706 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
2090 { 2707 {
2091 return _edje_entry_input_panel_layout_get(rp); 2708 *ret = _edje_entry_input_panel_layout_get(rp);
2092 } 2709 }
2093 return EDJE_INPUT_PANEL_LAYOUT_INVALID;
2094} 2710}
2095 2711
2096EAPI void 2712EAPI void
2097edje_object_part_text_autocapital_type_set(Evas_Object *obj, const char *part, Edje_Text_Autocapital_Type autocapital_type) 2713edje_object_part_text_autocapital_type_set(Evas_Object *obj, const char *part, Edje_Text_Autocapital_Type autocapital_type)
2098{ 2714{
2099 Edje *ed; 2715 if (!obj) return;
2716 eo_do(obj, edje_obj_part_text_autocapital_type_set(part, autocapital_type));
2717}
2718
2719void
2720_part_text_autocapital_type_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2721{
2722 const char *part = va_arg(*list, const char *);
2723 Edje_Text_Autocapital_Type autocapital_type = va_arg(*list, Edje_Text_Autocapital_Type);
2724 Edje *ed = _pd;
2100 Edje_Real_Part *rp; 2725 Edje_Real_Part *rp;
2101 2726
2102 ed = _edje_fetch(obj);
2103 if ((!ed) || (!part)) return; 2727 if ((!ed) || (!part)) return;
2104 rp = _edje_real_part_recursive_get(ed, part); 2728 rp = _edje_real_part_recursive_get(ed, part);
2105 if (!rp) return; 2729 if (!rp) return;
@@ -2112,27 +2736,45 @@ edje_object_part_text_autocapital_type_set(Evas_Object *obj, const char *part, E
2112EAPI Edje_Text_Autocapital_Type 2736EAPI Edje_Text_Autocapital_Type
2113edje_object_part_text_autocapital_type_get(const Evas_Object *obj, const char *part) 2737edje_object_part_text_autocapital_type_get(const Evas_Object *obj, const char *part)
2114{ 2738{
2115 Edje *ed; 2739 if (!obj) return EDJE_TEXT_AUTOCAPITAL_TYPE_NONE;
2740 Edje_Text_Autocapital_Type ret;
2741 eo_do((Eo *)obj, edje_obj_part_text_autocapital_type_get(part, &ret));
2742 return ret;
2743}
2744
2745void
2746_part_text_autocapital_type_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2747{
2748 const char *part = va_arg(*list, const char *);
2749 Edje_Text_Autocapital_Type *ret = va_arg(*list, Edje_Text_Autocapital_Type *);
2750 const Edje *ed = _pd;
2116 Edje_Real_Part *rp; 2751 Edje_Real_Part *rp;
2752 *ret = EDJE_TEXT_AUTOCAPITAL_TYPE_NONE;
2117 2753
2118 ed = _edje_fetch(obj); 2754 if ((!ed) || (!part)) return;
2119 if ((!ed) || (!part)) return EDJE_TEXT_AUTOCAPITAL_TYPE_NONE;
2120 rp = _edje_real_part_recursive_get(ed, part); 2755 rp = _edje_real_part_recursive_get(ed, part);
2121 if (!rp) return EDJE_TEXT_AUTOCAPITAL_TYPE_NONE; 2756 if (!rp) return;
2122 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2757 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
2123 { 2758 {
2124 return _edje_entry_autocapital_type_get(rp); 2759 *ret = _edje_entry_autocapital_type_get(rp);
2125 } 2760 }
2126 return EDJE_TEXT_AUTOCAPITAL_TYPE_NONE;
2127} 2761}
2128 2762
2129EAPI void 2763EAPI void
2130edje_object_part_text_prediction_allow_set(Evas_Object *obj, const char *part, Eina_Bool prediction) 2764edje_object_part_text_prediction_allow_set(Evas_Object *obj, const char *part, Eina_Bool prediction)
2131{ 2765{
2132 Edje *ed; 2766 if (!obj) return;
2767 eo_do(obj, edje_obj_part_text_prediction_allow_set(part, prediction));
2768}
2769
2770void
2771_part_text_prediction_allow_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2772{
2773 const char *part = va_arg(*list, const char *);
2774 Eina_Bool prediction = va_arg(*list, int);
2775 Edje *ed = _pd;
2133 Edje_Real_Part *rp; 2776 Edje_Real_Part *rp;
2134 2777
2135 ed = _edje_fetch(obj);
2136 if ((!ed) || (!part)) return; 2778 if ((!ed) || (!part)) return;
2137 rp = _edje_real_part_recursive_get(ed, part); 2779 rp = _edje_real_part_recursive_get(ed, part);
2138 if (!rp) return; 2780 if (!rp) return;
@@ -2145,27 +2787,45 @@ edje_object_part_text_prediction_allow_set(Evas_Object *obj, const char *part, E
2145EAPI Eina_Bool 2787EAPI Eina_Bool
2146edje_object_part_text_prediction_allow_get(const Evas_Object *obj, const char *part) 2788edje_object_part_text_prediction_allow_get(const Evas_Object *obj, const char *part)
2147{ 2789{
2148 Edje *ed; 2790 if (!obj) return EINA_FALSE;
2791 Eina_Bool ret = EINA_FALSE;
2792 eo_do((Eo *)obj, edje_obj_part_text_prediction_allow_get(part, &ret));
2793 return ret;
2794}
2795
2796void
2797_part_text_prediction_allow_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2798{
2799 const char *part = va_arg(*list, const char *);
2800 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
2801 const Edje *ed = _pd;
2149 Edje_Real_Part *rp; 2802 Edje_Real_Part *rp;
2803 *ret = EINA_FALSE;
2150 2804
2151 ed = _edje_fetch(obj); 2805 if ((!ed) || (!part)) return;
2152 if ((!ed) || (!part)) return EINA_FALSE;
2153 rp = _edje_real_part_recursive_get(ed, part); 2806 rp = _edje_real_part_recursive_get(ed, part);
2154 if (!rp) return EINA_FALSE; 2807 if (!rp) return;
2155 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2808 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
2156 { 2809 {
2157 return _edje_entry_prediction_allow_get(rp); 2810 *ret = _edje_entry_prediction_allow_get(rp);
2158 } 2811 }
2159 return EINA_FALSE;
2160} 2812}
2161 2813
2162EAPI void 2814EAPI void
2163edje_object_part_text_input_panel_enabled_set(Evas_Object *obj, const char *part, Eina_Bool enabled) 2815edje_object_part_text_input_panel_enabled_set(Evas_Object *obj, const char *part, Eina_Bool enabled)
2164{ 2816{
2165 Edje *ed; 2817 if (!obj) return;
2818 eo_do(obj, edje_obj_part_text_input_panel_enabled_set(part, enabled));
2819}
2820
2821void
2822_part_text_input_panel_enabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2823{
2824 const char *part = va_arg(*list, const char *);
2825 Eina_Bool enabled = va_arg(*list, int);
2826 Edje *ed = _pd;
2166 Edje_Real_Part *rp; 2827 Edje_Real_Part *rp;
2167 2828
2168 ed = _edje_fetch(obj);
2169 if ((!ed) || (!part)) return; 2829 if ((!ed) || (!part)) return;
2170 rp = _edje_real_part_recursive_get(ed, part); 2830 rp = _edje_real_part_recursive_get(ed, part);
2171 if (!rp) return; 2831 if (!rp) return;
@@ -2178,27 +2838,44 @@ edje_object_part_text_input_panel_enabled_set(Evas_Object *obj, const char *part
2178EAPI Eina_Bool 2838EAPI Eina_Bool
2179edje_object_part_text_input_panel_enabled_get(const Evas_Object *obj, const char *part) 2839edje_object_part_text_input_panel_enabled_get(const Evas_Object *obj, const char *part)
2180{ 2840{
2181 Edje *ed; 2841 if (!obj) return EINA_FALSE;
2842 Eina_Bool ret = EINA_FALSE;
2843 eo_do((Eo *)obj, edje_obj_part_text_input_panel_enabled_get(part, &ret));
2844 return ret;
2845}
2846
2847void
2848_part_text_input_panel_enabled_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2849{
2850 const char *part = va_arg(*list, const char *);
2851 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
2852 const Edje *ed = _pd;
2182 Edje_Real_Part *rp; 2853 Edje_Real_Part *rp;
2854 *ret = EINA_FALSE;
2183 2855
2184 ed = _edje_fetch(obj); 2856 if ((!ed) || (!part)) return;
2185 if ((!ed) || (!part)) return EINA_FALSE;
2186 rp = _edje_real_part_recursive_get(ed, part); 2857 rp = _edje_real_part_recursive_get(ed, part);
2187 if (!rp) return EINA_FALSE; 2858 if (!rp) return;
2188 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2859 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
2189 { 2860 {
2190 return _edje_entry_input_panel_enabled_get(rp); 2861 *ret = _edje_entry_input_panel_enabled_get(rp);
2191 } 2862 }
2192 return EINA_FALSE;
2193} 2863}
2194 2864
2195EAPI void 2865EAPI void
2196edje_object_part_text_input_panel_show(const Evas_Object *obj, const char *part) 2866edje_object_part_text_input_panel_show(const Evas_Object *obj, const char *part)
2197{ 2867{
2198 Edje *ed; 2868 if (!obj) return;
2869 eo_do((Eo *)obj, edje_obj_part_text_input_panel_show(part));
2870}
2871
2872void
2873_part_text_input_panel_show(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2874{
2875 const char *part = va_arg(*list, const char *);
2876 Edje *ed = _pd;
2199 Edje_Real_Part *rp; 2877 Edje_Real_Part *rp;
2200 2878
2201 ed = _edje_fetch(obj);
2202 if ((!ed) || (!part)) return; 2879 if ((!ed) || (!part)) return;
2203 rp = _edje_real_part_recursive_get(ed, part); 2880 rp = _edje_real_part_recursive_get(ed, part);
2204 if (!rp) return; 2881 if (!rp) return;
@@ -2209,10 +2886,17 @@ edje_object_part_text_input_panel_show(const Evas_Object *obj, const char *part)
2209EAPI void 2886EAPI void
2210edje_object_part_text_input_panel_hide(const Evas_Object *obj, const char *part) 2887edje_object_part_text_input_panel_hide(const Evas_Object *obj, const char *part)
2211{ 2888{
2212 Edje *ed; 2889 if (!obj) return;
2890 eo_do((Eo *)obj, edje_obj_part_text_input_panel_hide(part));
2891}
2892
2893void
2894_part_text_input_panel_hide(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2895{
2896 const char *part = va_arg(*list, const char *);
2897 Edje *ed = _pd;
2213 Edje_Real_Part *rp; 2898 Edje_Real_Part *rp;
2214 2899
2215 ed = _edje_fetch(obj);
2216 if ((!ed) || (!part)) return; 2900 if ((!ed) || (!part)) return;
2217 rp = _edje_real_part_recursive_get(ed, part); 2901 rp = _edje_real_part_recursive_get(ed, part);
2218 if (!rp) return; 2902 if (!rp) return;
@@ -2223,10 +2907,18 @@ edje_object_part_text_input_panel_hide(const Evas_Object *obj, const char *part)
2223EAPI void 2907EAPI void
2224edje_object_part_text_input_panel_language_set(Evas_Object *obj, const char *part, Edje_Input_Panel_Lang lang) 2908edje_object_part_text_input_panel_language_set(Evas_Object *obj, const char *part, Edje_Input_Panel_Lang lang)
2225{ 2909{
2226 Edje *ed; 2910 if (!obj) return;
2911 eo_do(obj, edje_obj_part_text_input_panel_language_set(part, lang));
2912}
2913
2914void
2915_part_text_input_panel_language_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2916{
2917 const char *part = va_arg(*list, const char *);
2918 Edje_Input_Panel_Lang lang = va_arg(*list, Edje_Input_Panel_Lang);
2919 Edje *ed = _pd;
2227 Edje_Real_Part *rp; 2920 Edje_Real_Part *rp;
2228 2921
2229 ed = _edje_fetch(obj);
2230 if ((!ed) || (!part)) return; 2922 if ((!ed) || (!part)) return;
2231 rp = _edje_real_part_recursive_get(ed, part); 2923 rp = _edje_real_part_recursive_get(ed, part);
2232 if (!rp) return; 2924 if (!rp) return;
@@ -2239,27 +2931,46 @@ edje_object_part_text_input_panel_language_set(Evas_Object *obj, const char *par
2239EAPI Edje_Input_Panel_Lang 2931EAPI Edje_Input_Panel_Lang
2240edje_object_part_text_input_panel_language_get(const Evas_Object *obj, const char *part) 2932edje_object_part_text_input_panel_language_get(const Evas_Object *obj, const char *part)
2241{ 2933{
2242 Edje *ed; 2934 if (!obj) return EDJE_INPUT_PANEL_LANG_AUTOMATIC;
2935 Edje_Input_Panel_Lang ret;
2936 eo_do((Eo *)obj, edje_obj_part_text_input_panel_language_get(part, &ret));
2937 return ret;
2938}
2939
2940void
2941_part_text_input_panel_language_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2942{
2943 const char *part = va_arg(*list, const char *);
2944 Edje_Input_Panel_Lang *ret = va_arg(*list, Edje_Input_Panel_Lang *);
2945 const Edje *ed = _pd;
2243 Edje_Real_Part *rp; 2946 Edje_Real_Part *rp;
2947 *ret = EDJE_INPUT_PANEL_LANG_AUTOMATIC;
2244 2948
2245 ed = _edje_fetch(obj); 2949 if ((!ed) || (!part)) return;
2246 if ((!ed) || (!part)) return EDJE_INPUT_PANEL_LANG_AUTOMATIC;
2247 rp = _edje_real_part_recursive_get(ed, part); 2950 rp = _edje_real_part_recursive_get(ed, part);
2248 if (!rp) return EDJE_INPUT_PANEL_LANG_AUTOMATIC; 2951 if (!rp) return;
2249 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 2952 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
2250 { 2953 {
2251 return _edje_entry_input_panel_language_get(rp); 2954 *ret = _edje_entry_input_panel_language_get(rp);
2252 } 2955 }
2253 return EDJE_INPUT_PANEL_LANG_AUTOMATIC;
2254} 2956}
2255 2957
2256EAPI void 2958EAPI void
2257edje_object_part_text_input_panel_imdata_set(Evas_Object *obj, const char *part, const void *data, int len) 2959edje_object_part_text_input_panel_imdata_set(Evas_Object *obj, const char *part, const void *data, int len)
2258{ 2960{
2259 Edje *ed; 2961 if (!obj) return;
2962 eo_do(obj, edje_obj_part_text_input_panel_imdata_set(part, data, len));
2963}
2964
2965void
2966_part_text_input_panel_imdata_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2967{
2968 const char *part = va_arg(*list, const char *);
2969 const void *data = va_arg(*list, const void *);
2970 int len = va_arg(*list, int);
2971 Edje *ed = _pd;
2260 Edje_Real_Part *rp; 2972 Edje_Real_Part *rp;
2261 2973
2262 ed = _edje_fetch(obj);
2263 if ((!ed) || (!part)) return; 2974 if ((!ed) || (!part)) return;
2264 rp = _edje_real_part_recursive_get(ed, part); 2975 rp = _edje_real_part_recursive_get(ed, part);
2265 if (!rp) return; 2976 if (!rp) return;
@@ -2272,10 +2983,19 @@ edje_object_part_text_input_panel_imdata_set(Evas_Object *obj, const char *part,
2272EAPI void 2983EAPI void
2273edje_object_part_text_input_panel_imdata_get(const Evas_Object *obj, const char *part, void *data, int *len) 2984edje_object_part_text_input_panel_imdata_get(const Evas_Object *obj, const char *part, void *data, int *len)
2274{ 2985{
2275 Edje *ed; 2986 if (!obj) return;
2987 eo_do((Eo *)obj, edje_obj_part_text_input_panel_imdata_get(part, data, len));
2988}
2989
2990void
2991_part_text_input_panel_imdata_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
2992{
2993 const char *part = va_arg(*list, const char *);
2994 void *data = va_arg(*list, void *);
2995 int *len = va_arg(*list, int *);
2996 const Edje *ed = _pd;
2276 Edje_Real_Part *rp; 2997 Edje_Real_Part *rp;
2277 2998
2278 ed = _edje_fetch(obj);
2279 if ((!ed) || (!part)) return; 2999 if ((!ed) || (!part)) return;
2280 rp = _edje_real_part_recursive_get(ed, part); 3000 rp = _edje_real_part_recursive_get(ed, part);
2281 if (!rp) return; 3001 if (!rp) return;
@@ -2288,10 +3008,18 @@ edje_object_part_text_input_panel_imdata_get(const Evas_Object *obj, const char
2288EAPI void 3008EAPI void
2289edje_object_part_text_input_panel_return_key_type_set(Evas_Object *obj, const char *part, Edje_Input_Panel_Return_Key_Type return_key_type) 3009edje_object_part_text_input_panel_return_key_type_set(Evas_Object *obj, const char *part, Edje_Input_Panel_Return_Key_Type return_key_type)
2290{ 3010{
2291 Edje *ed; 3011 if (!obj) return;
3012 eo_do(obj, edje_obj_part_text_input_panel_return_key_type_set(part, return_key_type));
3013}
3014
3015void
3016_part_text_input_panel_return_key_type_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3017{
3018 const char *part = va_arg(*list, const char *);
3019 Edje_Input_Panel_Return_Key_Type return_key_type = va_arg(*list, Edje_Input_Panel_Return_Key_Type);
3020 Edje *ed = _pd;
2292 Edje_Real_Part *rp; 3021 Edje_Real_Part *rp;
2293 3022
2294 ed = _edje_fetch(obj);
2295 if ((!ed) || (!part)) return; 3023 if ((!ed) || (!part)) return;
2296 rp = _edje_real_part_recursive_get(ed, part); 3024 rp = _edje_real_part_recursive_get(ed, part);
2297 if (!rp) return; 3025 if (!rp) return;
@@ -2304,27 +3032,45 @@ edje_object_part_text_input_panel_return_key_type_set(Evas_Object *obj, const ch
2304EAPI Edje_Input_Panel_Return_Key_Type 3032EAPI Edje_Input_Panel_Return_Key_Type
2305edje_object_part_text_input_panel_return_key_type_get(const Evas_Object *obj, const char *part) 3033edje_object_part_text_input_panel_return_key_type_get(const Evas_Object *obj, const char *part)
2306{ 3034{
2307 Edje *ed; 3035 if (!obj) return EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
3036 Edje_Input_Panel_Return_Key_Type ret;
3037 eo_do((Eo *)obj, edje_obj_part_text_input_panel_return_key_type_get(part, &ret));
3038 return ret;
3039}
3040
3041void
3042_part_text_input_panel_return_key_type_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3043{
3044 const char *part = va_arg(*list, const char *);
3045 Edje_Input_Panel_Return_Key_Type *ret = va_arg(*list, Edje_Input_Panel_Return_Key_Type *);
3046 const Edje *ed = _pd;
2308 Edje_Real_Part *rp; 3047 Edje_Real_Part *rp;
3048 *ret = EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
2309 3049
2310 ed = _edje_fetch(obj); 3050 if ((!ed) || (!part)) return;
2311 if ((!ed) || (!part)) return EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
2312 rp = _edje_real_part_recursive_get(ed, part); 3051 rp = _edje_real_part_recursive_get(ed, part);
2313 if (!rp) return EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT; 3052 if (!rp) return;
2314 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 3053 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
2315 { 3054 {
2316 return _edje_entry_input_panel_return_key_type_get(rp); 3055 *ret = _edje_entry_input_panel_return_key_type_get(rp);
2317 } 3056 }
2318 return EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
2319} 3057}
2320 3058
2321EAPI void 3059EAPI void
2322edje_object_part_text_input_panel_return_key_disabled_set(Evas_Object *obj, const char *part, Eina_Bool disabled) 3060edje_object_part_text_input_panel_return_key_disabled_set(Evas_Object *obj, const char *part, Eina_Bool disabled)
2323{ 3061{
2324 Edje *ed; 3062 if (!obj) return;
3063 eo_do(obj, edje_obj_part_text_input_panel_return_key_disabled_set(part, disabled));
3064}
3065
3066void
3067_part_text_input_panel_return_key_disabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3068{
3069 const char *part = va_arg(*list, const char *);
3070 Eina_Bool disabled = va_arg(*list, int);
3071 Edje *ed = _pd;
2325 Edje_Real_Part *rp; 3072 Edje_Real_Part *rp;
2326 3073
2327 ed = _edje_fetch(obj);
2328 if ((!ed) || (!part)) return; 3074 if ((!ed) || (!part)) return;
2329 rp = _edje_real_part_recursive_get(ed, part); 3075 rp = _edje_real_part_recursive_get(ed, part);
2330 if (!rp) return; 3076 if (!rp) return;
@@ -2337,27 +3083,46 @@ edje_object_part_text_input_panel_return_key_disabled_set(Evas_Object *obj, cons
2337EAPI Eina_Bool 3083EAPI Eina_Bool
2338edje_object_part_text_input_panel_return_key_disabled_get(const Evas_Object *obj, const char *part) 3084edje_object_part_text_input_panel_return_key_disabled_get(const Evas_Object *obj, const char *part)
2339{ 3085{
2340 Edje *ed; 3086 if (!obj) return EINA_FALSE;
3087 Eina_Bool ret = EINA_FALSE;
3088 eo_do((Eo *)obj, edje_obj_part_text_input_panel_return_key_disabled_get(part, &ret));
3089 return ret;
3090}
3091
3092void
3093_part_text_input_panel_return_key_disabled_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3094{
3095 const char *part = va_arg(*list, const char *);
3096 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3097 const Edje *ed = _pd;
2341 Edje_Real_Part *rp; 3098 Edje_Real_Part *rp;
3099 *ret = EINA_FALSE;
2342 3100
2343 ed = _edje_fetch(obj); 3101 if ((!ed) || (!part)) return;
2344 if ((!ed) || (!part)) return EINA_FALSE;
2345 rp = _edje_real_part_recursive_get(ed, part); 3102 rp = _edje_real_part_recursive_get(ed, part);
2346 if (!rp) return EINA_FALSE; 3103 if (!rp) return;
2347 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 3104 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
2348 { 3105 {
2349 return _edje_entry_input_panel_return_key_disabled_get(rp); 3106 *ret = _edje_entry_input_panel_return_key_disabled_get(rp);
2350 } 3107 }
2351 return EINA_FALSE;
2352} 3108}
2353 3109
2354EAPI void 3110EAPI void
2355edje_object_text_insert_filter_callback_add(Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data) 3111edje_object_text_insert_filter_callback_add(Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data)
2356{ 3112{
2357 Edje *ed; 3113 if (!obj) return;
3114 eo_do(obj, edje_obj_text_insert_filter_callback_add(part, func, data));
3115}
3116
3117void
3118_text_insert_filter_callback_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3119{
3120 const char *part = va_arg(*list, const char *);
3121 Edje_Text_Filter_Cb func = va_arg(*list, Edje_Text_Filter_Cb);
3122 void *data = va_arg(*list, void *);
3123 Edje *ed = _pd;
2358 Edje_Text_Insert_Filter_Callback *cb; 3124 Edje_Text_Insert_Filter_Callback *cb;
2359 3125
2360 ed = _edje_fetch(obj);
2361 if ((!ed) || (!part)) return; 3126 if ((!ed) || (!part)) return;
2362 cb = calloc(1, sizeof(Edje_Text_Insert_Filter_Callback)); 3127 cb = calloc(1, sizeof(Edje_Text_Insert_Filter_Callback));
2363 cb->part = eina_stringshare_add(part); 3128 cb->part = eina_stringshare_add(part);
@@ -2370,12 +3135,24 @@ edje_object_text_insert_filter_callback_add(Evas_Object *obj, const char *part,
2370EAPI void * 3135EAPI void *
2371edje_object_text_insert_filter_callback_del(Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func) 3136edje_object_text_insert_filter_callback_del(Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func)
2372{ 3137{
2373 Edje *ed; 3138 if (!obj) return NULL;
3139 void *ret = NULL;
3140 eo_do(obj, edje_obj_text_insert_filter_callback_del(part, func, &ret));
3141 return ret;
3142}
3143
3144void
3145_text_insert_filter_callback_del(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3146{
3147 const char *part = va_arg(*list, const char *);
3148 Edje_Text_Filter_Cb func = va_arg(*list, Edje_Text_Filter_Cb);
3149 void **ret = va_arg(*list, void **);
3150 Edje *ed = _pd;
2374 Edje_Text_Insert_Filter_Callback *cb; 3151 Edje_Text_Insert_Filter_Callback *cb;
2375 Eina_List *l; 3152 Eina_List *l;
3153 if (ret) *ret = NULL;
2376 3154
2377 ed = _edje_fetch(obj); 3155 if ((!ed) || (!part)) return;
2378 if ((!ed) || (!part)) return NULL;
2379 EINA_LIST_FOREACH(ed->text_insert_filter_callbacks, l, cb) 3156 EINA_LIST_FOREACH(ed->text_insert_filter_callbacks, l, cb)
2380 { 3157 {
2381 if ((!strcmp(cb->part, part)) && (cb->func == func)) 3158 if ((!strcmp(cb->part, part)) && (cb->func == func))
@@ -2385,21 +3162,34 @@ edje_object_text_insert_filter_callback_del(Evas_Object *obj, const char *part,
2385 eina_list_remove_list(ed->text_insert_filter_callbacks, l); 3162 eina_list_remove_list(ed->text_insert_filter_callbacks, l);
2386 eina_stringshare_del(cb->part); 3163 eina_stringshare_del(cb->part);
2387 free(cb); 3164 free(cb);
2388 return data; 3165 if (ret) *ret = data;
3166 return;
2389 } 3167 }
2390 } 3168 }
2391 return NULL;
2392} 3169}
2393 3170
2394EAPI void * 3171EAPI void *
2395edje_object_text_insert_filter_callback_del_full(Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data) 3172edje_object_text_insert_filter_callback_del_full(Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data)
2396{ 3173{
2397 Edje *ed; 3174 if (!obj) return NULL;
3175 void *ret = NULL;
3176 eo_do(obj, edje_obj_text_insert_filter_callback_del_full(part, func, data, &ret));
3177 return ret;
3178}
3179
3180void
3181_text_insert_filter_callback_del_full(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3182{
3183 const char *part = va_arg(*list, const char *);
3184 Edje_Text_Filter_Cb func = va_arg(*list, Edje_Text_Filter_Cb);
3185 void *data = va_arg(*list, void *);
3186 void **ret = va_arg(*list, void **);
3187 Edje *ed = _pd;
2398 Edje_Text_Insert_Filter_Callback *cb; 3188 Edje_Text_Insert_Filter_Callback *cb;
2399 Eina_List *l; 3189 Eina_List *l;
3190 if (ret) *ret = NULL;
2400 3191
2401 ed = _edje_fetch(obj); 3192 if ((!ed) || (!part)) return;
2402 if ((!ed) || (!part)) return NULL;
2403 EINA_LIST_FOREACH(ed->text_insert_filter_callbacks, l, cb) 3193 EINA_LIST_FOREACH(ed->text_insert_filter_callbacks, l, cb)
2404 { 3194 {
2405 if ((!strcmp(cb->part, part)) && (cb->func == func) && 3195 if ((!strcmp(cb->part, part)) && (cb->func == func) &&
@@ -2410,19 +3200,28 @@ edje_object_text_insert_filter_callback_del_full(Evas_Object *obj, const char *p
2410 eina_list_remove_list(ed->text_insert_filter_callbacks, l); 3200 eina_list_remove_list(ed->text_insert_filter_callbacks, l);
2411 eina_stringshare_del(cb->part); 3201 eina_stringshare_del(cb->part);
2412 free(cb); 3202 free(cb);
2413 return tmp; 3203 if (ret) *ret = tmp;
3204 return;
2414 } 3205 }
2415 } 3206 }
2416 return NULL;
2417} 3207}
2418 3208
2419EAPI void 3209EAPI void
2420edje_object_text_markup_filter_callback_add(Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func, void *data) 3210edje_object_text_markup_filter_callback_add(Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func, void *data)
2421{ 3211{
2422 Edje *ed; 3212 if (!obj) return;
3213 eo_do(obj, edje_obj_text_markup_filter_callback_add(part, func, data));
3214}
3215
3216void
3217_text_markup_filter_callback_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3218{
3219 const char *part = va_arg(*list, const char *);
3220 Edje_Markup_Filter_Cb func = va_arg(*list, Edje_Markup_Filter_Cb);
3221 void *data = va_arg(*list, void *);
3222 Edje *ed = _pd;
2423 Edje_Markup_Filter_Callback *cb; 3223 Edje_Markup_Filter_Callback *cb;
2424 3224
2425 ed = _edje_fetch(obj);
2426 if ((!ed) || (!part)) return; 3225 if ((!ed) || (!part)) return;
2427 cb = calloc(1, sizeof(Edje_Markup_Filter_Callback)); 3226 cb = calloc(1, sizeof(Edje_Markup_Filter_Callback));
2428 cb->part = eina_stringshare_add(part); 3227 cb->part = eina_stringshare_add(part);
@@ -2435,12 +3234,24 @@ edje_object_text_markup_filter_callback_add(Evas_Object *obj, const char *part,
2435EAPI void * 3234EAPI void *
2436edje_object_text_markup_filter_callback_del(Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func) 3235edje_object_text_markup_filter_callback_del(Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func)
2437{ 3236{
2438 Edje *ed; 3237 if (!obj) return NULL;
3238 void *ret = NULL;
3239 eo_do(obj, edje_obj_text_markup_filter_callback_del(part, func, &ret));
3240 return ret;
3241}
3242
3243void
3244_text_markup_filter_callback_del(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3245{
3246 const char *part = va_arg(*list, const char *);
3247 Edje_Markup_Filter_Cb func = va_arg(*list, Edje_Markup_Filter_Cb);
3248 void **ret = va_arg(*list, void **);
3249 Edje *ed = _pd;
2439 Edje_Markup_Filter_Callback *cb; 3250 Edje_Markup_Filter_Callback *cb;
2440 Eina_List *l; 3251 Eina_List *l;
3252 if (ret) *ret = NULL;
2441 3253
2442 ed = _edje_fetch(obj); 3254 if ((!ed) || (!part)) return;
2443 if ((!ed) || (!part)) return NULL;
2444 EINA_LIST_FOREACH(ed->markup_filter_callbacks, l, cb) 3255 EINA_LIST_FOREACH(ed->markup_filter_callbacks, l, cb)
2445 { 3256 {
2446 if ((!strcmp(cb->part, part)) && (cb->func == func)) 3257 if ((!strcmp(cb->part, part)) && (cb->func == func))
@@ -2450,21 +3261,34 @@ edje_object_text_markup_filter_callback_del(Evas_Object *obj, const char *part,
2450 eina_list_remove_list(ed->markup_filter_callbacks, l); 3261 eina_list_remove_list(ed->markup_filter_callbacks, l);
2451 eina_stringshare_del(cb->part); 3262 eina_stringshare_del(cb->part);
2452 free(cb); 3263 free(cb);
2453 return data; 3264 if (ret) *ret = data;
3265 return;
2454 } 3266 }
2455 } 3267 }
2456 return NULL;
2457} 3268}
2458 3269
2459EAPI void * 3270EAPI void *
2460edje_object_text_markup_filter_callback_del_full(Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func, void *data) 3271edje_object_text_markup_filter_callback_del_full(Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func, void *data)
2461{ 3272{
2462 Edje *ed; 3273 if (!obj) return NULL;
3274 void *ret = NULL;
3275 eo_do(obj, edje_obj_text_markup_filter_callback_del_full(part, func, data, &ret));
3276 return ret;
3277}
3278
3279void
3280_text_markup_filter_callback_del_full(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3281{
3282 const char *part = va_arg(*list, const char *);
3283 Edje_Markup_Filter_Cb func = va_arg(*list, Edje_Markup_Filter_Cb);
3284 void *data = va_arg(*list, void *);
3285 void **ret = va_arg(*list, void **);
3286 Edje *ed = _pd;
2463 Edje_Markup_Filter_Callback *cb; 3287 Edje_Markup_Filter_Callback *cb;
2464 Eina_List *l; 3288 Eina_List *l;
3289 if (ret) *ret = NULL;
2465 3290
2466 ed = _edje_fetch(obj); 3291 if ((!ed) || (!part)) return;
2467 if ((!ed) || (!part)) return NULL;
2468 EINA_LIST_FOREACH(ed->markup_filter_callbacks, l, cb) 3292 EINA_LIST_FOREACH(ed->markup_filter_callbacks, l, cb)
2469 { 3293 {
2470 if ((!strcmp(cb->part, part)) && (cb->func == func) && 3294 if ((!strcmp(cb->part, part)) && (cb->func == func) &&
@@ -2475,21 +3299,33 @@ edje_object_text_markup_filter_callback_del_full(Evas_Object *obj, const char *p
2475 eina_list_remove_list(ed->markup_filter_callbacks, l); 3299 eina_list_remove_list(ed->markup_filter_callbacks, l);
2476 eina_stringshare_del(cb->part); 3300 eina_stringshare_del(cb->part);
2477 free(cb); 3301 free(cb);
2478 return tmp; 3302 if (ret) *ret = tmp;
3303 return;
2479 } 3304 }
2480 } 3305 }
2481 return NULL;
2482} 3306}
2483 3307
2484EAPI Eina_Bool 3308EAPI Eina_Bool
2485edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_swallow) 3309edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_swallow)
2486{ 3310{
2487 Edje *ed; 3311 if (!obj) return EINA_FALSE;
3312 Eina_Bool ret = EINA_FALSE;
3313 eo_do(obj, edje_obj_part_swallow(part, obj_swallow, &ret));
3314 return ret;
3315}
3316
3317void
3318_part_swallow(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3319{
3320 const char *part = va_arg(*list, const char *);
3321 Evas_Object *obj_swallow = va_arg(*list, Evas_Object *);
3322 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3323 Edje *ed = _pd;
2488 Edje_Real_Part *rp; 3324 Edje_Real_Part *rp;
2489 Edje_User_Defined *eud = NULL; 3325 Edje_User_Defined *eud = NULL;
3326 if (ret) *ret = EINA_FALSE;
2490 3327
2491 ed = _edje_fetch(obj); 3328 if ((!ed) || (!part)) return;
2492 if ((!ed) || (!part)) return EINA_FALSE;
2493 3329
2494 /* Need to recalc before providing the object. */ 3330 /* Need to recalc before providing the object. */
2495 // XXX: I guess this is not required, removing for testing purposes 3331 // XXX: I guess this is not required, removing for testing purposes
@@ -2512,15 +3348,15 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw
2512 if (!rp) 3348 if (!rp)
2513 { 3349 {
2514 DBG("cannot swallow part %s: part not exist!", part); 3350 DBG("cannot swallow part %s: part not exist!", part);
2515 return EINA_FALSE; 3351 return;
2516 } 3352 }
2517 if (rp->part->type != EDJE_PART_TYPE_SWALLOW) 3353 if (rp->part->type != EDJE_PART_TYPE_SWALLOW)
2518 { 3354 {
2519 ERR("cannot swallow part %s: not swallow type!", rp->part->name); 3355 ERR("cannot swallow part %s: not swallow type!", rp->part->name);
2520 return EINA_FALSE; 3356 return;
2521 } 3357 }
2522 if ((rp->type != EDJE_RP_TYPE_SWALLOW) || 3358 if ((rp->type != EDJE_RP_TYPE_SWALLOW) ||
2523 (!rp->typedata.swallow)) return EINA_FALSE; 3359 (!rp->typedata.swallow)) return;
2524 _edje_real_part_swallow(rp, obj_swallow, EINA_TRUE); 3360 _edje_real_part_swallow(rp, obj_swallow, EINA_TRUE);
2525 3361
2526 if (rp->typedata.swallow->swallowed_object) 3362 if (rp->typedata.swallow->swallowed_object)
@@ -2538,7 +3374,7 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw
2538 } 3374 }
2539 } 3375 }
2540 3376
2541 return EINA_TRUE; 3377 if (ret) *ret = EINA_TRUE;
2542} 3378}
2543 3379
2544static void 3380static void
@@ -2558,6 +3394,7 @@ _recalc_extern_parent(Evas_Object *obj)
2558EAPI void 3394EAPI void
2559edje_extern_object_min_size_set(Evas_Object *obj, Evas_Coord minw, Evas_Coord minh) 3395edje_extern_object_min_size_set(Evas_Object *obj, Evas_Coord minw, Evas_Coord minh)
2560{ 3396{
3397 if (!obj) return;
2561 Edje_Real_Part *rp; 3398 Edje_Real_Part *rp;
2562 3399
2563 evas_object_size_hint_min_set(obj, minw, minh); 3400 evas_object_size_hint_min_set(obj, minw, minh);
@@ -2576,6 +3413,7 @@ edje_extern_object_min_size_set(Evas_Object *obj, Evas_Coord minw, Evas_Coord mi
2576EAPI void 3413EAPI void
2577edje_extern_object_max_size_set(Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh) 3414edje_extern_object_max_size_set(Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh)
2578{ 3415{
3416 if (!obj) return;
2579 Edje_Real_Part *rp; 3417 Edje_Real_Part *rp;
2580 3418
2581 evas_object_size_hint_max_set(obj, maxw, maxh); 3419 evas_object_size_hint_max_set(obj, maxw, maxh);
@@ -2594,6 +3432,7 @@ edje_extern_object_max_size_set(Evas_Object *obj, Evas_Coord maxw, Evas_Coord ma
2594EAPI void 3432EAPI void
2595edje_extern_object_aspect_set(Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah) 3433edje_extern_object_aspect_set(Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah)
2596{ 3434{
3435 if (!obj) return;
2597 Edje_Real_Part *rp; 3436 Edje_Real_Part *rp;
2598 Evas_Aspect_Control asp; 3437 Evas_Aspect_Control asp;
2599 3438
@@ -2813,6 +3652,14 @@ edje_box_layout_register(const char *name, Evas_Object_Box_Layout func, void *(*
2813EAPI void 3652EAPI void
2814edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow) 3653edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
2815{ 3654{
3655 if (!obj) return;
3656 eo_do(obj, edje_obj_part_unswallow(obj_swallow));
3657}
3658
3659void
3660_part_unswallow(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3661{
3662 Evas_Object *obj_swallow = va_arg(*list, Evas_Object *);
2816 Edje_Real_Part *rp; 3663 Edje_Real_Part *rp;
2817 3664
2818 if (!obj_swallow) return; 3665 if (!obj_swallow) return;
@@ -2836,9 +3683,8 @@ edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
2836 3683
2837 if (obj) 3684 if (obj)
2838 { 3685 {
2839 Edje *ed; 3686 Edje *ed = _pd;
2840 3687
2841 ed = _edje_fetch(obj);
2842 if (!ed && obj) 3688 if (!ed && obj)
2843 { 3689 {
2844 ERR("edje_object_part_unswallow called on a non Edje object ('%s').", 3690 ERR("edje_object_part_unswallow called on a non Edje object ('%s').",
@@ -2874,28 +3720,47 @@ edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
2874EAPI Evas_Object * 3720EAPI Evas_Object *
2875edje_object_part_swallow_get(const Evas_Object *obj, const char *part) 3721edje_object_part_swallow_get(const Evas_Object *obj, const char *part)
2876{ 3722{
2877 Edje *ed; 3723 if (!obj) return NULL;
3724 Evas_Object *ret = NULL;
3725 eo_do((Eo *)obj, edje_obj_part_swallow_get(part, &ret));
3726 return ret;
3727}
3728
3729void
3730_part_swallow_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3731{
3732 const char *part = va_arg(*list, const char *);
3733 Evas_Object **ret = va_arg(*list, Evas_Object **);
3734 Edje *ed = (Edje *)_pd;
2878 Edje_Real_Part *rp; 3735 Edje_Real_Part *rp;
3736 *ret = NULL;
2879 3737
2880 ed = _edje_fetch(obj); 3738 if ((!ed) || (!part)) return;
2881 if ((!ed) || (!part)) return NULL;
2882 3739
2883 /* Need to recalc before providing the object. */ 3740 /* Need to recalc before providing the object. */
2884 _edje_recalc_do(ed); 3741 _edje_recalc_do(ed);
2885 3742
2886 rp = _edje_real_part_recursive_get(ed, part); 3743 rp = _edje_real_part_recursive_get(ed, part);
2887 if (!rp) return NULL; 3744 if (!rp) return;
2888 if ((rp->type != EDJE_RP_TYPE_SWALLOW) || 3745 if ((rp->type != EDJE_RP_TYPE_SWALLOW) ||
2889 (!rp->typedata.swallow)) return NULL; 3746 (!rp->typedata.swallow)) return;
2890 return rp->typedata.swallow->swallowed_object; 3747 *ret = rp->typedata.swallow->swallowed_object;
2891} 3748}
2892 3749
2893EAPI void 3750EAPI void
2894edje_object_size_min_get(const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh) 3751edje_object_size_min_get(const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
2895{ 3752{
2896 Edje *ed; 3753 if (!obj) return;
3754 eo_do((Eo *)obj, edje_obj_size_min_get(minw, minh));
3755}
3756
3757void
3758_size_min_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3759{
3760 Evas_Coord *minw = va_arg(*list, Evas_Coord *);
3761 Evas_Coord *minh = va_arg(*list, Evas_Coord *);
3762 const Edje *ed = _pd;
2897 3763
2898 ed = _edje_fetch(obj);
2899 if ((!ed) || (!ed->collection)) 3764 if ((!ed) || (!ed->collection))
2900 { 3765 {
2901 if (minw) *minw = 0; 3766 if (minw) *minw = 0;
@@ -2909,9 +3774,17 @@ edje_object_size_min_get(const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *m
2909EAPI void 3774EAPI void
2910edje_object_size_max_get(const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh) 3775edje_object_size_max_get(const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh)
2911{ 3776{
2912 Edje *ed; 3777 if (!obj) return;
3778 eo_do((Eo *)obj, edje_obj_size_max_get(maxw, maxh));
3779}
3780
3781void
3782_size_max_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3783{
3784 Evas_Coord *maxw = va_arg(*list, Evas_Coord *);
3785 Evas_Coord *maxh = va_arg(*list, Evas_Coord *);
3786 Edje *ed = (Edje *)_pd;
2913 3787
2914 ed = _edje_fetch(obj);
2915 if ((!ed) || (!ed->collection)) 3788 if ((!ed) || (!ed->collection))
2916 { 3789 {
2917 if (maxw) *maxw = 0; 3790 if (maxw) *maxw = 0;
@@ -2945,10 +3818,16 @@ edje_object_size_max_get(const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *m
2945EAPI void 3818EAPI void
2946edje_object_calc_force(Evas_Object *obj) 3819edje_object_calc_force(Evas_Object *obj)
2947{ 3820{
2948 Edje *ed; 3821 if (!obj) return;
3822 eo_do(obj, edje_obj_calc_force());
3823}
3824
3825void
3826_calc_force(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
3827{
3828 Edje *ed = _pd;
2949 int pf, pf2; 3829 int pf, pf2;
2950 3830
2951 ed = _edje_fetch(obj);
2952 if (!ed) return; 3831 if (!ed) return;
2953 ed->dirty = EINA_TRUE; 3832 ed->dirty = EINA_TRUE;
2954#ifdef EDJE_CALC_CACHE 3833#ifdef EDJE_CALC_CACHE
@@ -2970,25 +3849,48 @@ edje_object_calc_force(Evas_Object *obj)
2970EAPI void 3849EAPI void
2971edje_object_size_min_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh) 3850edje_object_size_min_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
2972{ 3851{
3852 if (!obj) return;
3853 eo_do(obj, edje_obj_size_min_calc(minw, minh));
3854}
3855
3856void
3857_size_min_calc(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
3858{
3859 Evas_Coord *minw = va_arg(*list, Evas_Coord *);
3860 Evas_Coord *minh = va_arg(*list, Evas_Coord *);
2973 edje_object_size_min_restricted_calc(obj, minw, minh, 0, 0); 3861 edje_object_size_min_restricted_calc(obj, minw, minh, 0, 0);
2974} 3862}
2975 3863
2976EAPI Eina_Bool 3864EAPI Eina_Bool
2977edje_object_parts_extends_calc(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) 3865edje_object_parts_extends_calc(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
2978{ 3866{
2979 Edje *ed; 3867 if (!obj) return EINA_FALSE;
3868 Eina_Bool ret = EINA_FALSE;
3869 eo_do(obj, edje_obj_parts_extends_calc(x, y, w, h, &ret));
3870 return ret;
3871}
3872
3873void
3874_parts_extends_calc(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3875{
3876 Evas_Coord *x = va_arg(*list, Evas_Coord *);
3877 Evas_Coord *y = va_arg(*list, Evas_Coord *);
3878 Evas_Coord *w = va_arg(*list, Evas_Coord *);
3879 Evas_Coord *h = va_arg(*list, Evas_Coord *);
3880 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3881 Edje *ed = _pd;
2980 Evas_Coord xx1 = INT_MAX, yy1 = INT_MAX; 3882 Evas_Coord xx1 = INT_MAX, yy1 = INT_MAX;
2981 Evas_Coord xx2 = 0, yy2 = 0; 3883 Evas_Coord xx2 = 0, yy2 = 0;
2982 unsigned int i; 3884 unsigned int i;
3885 if (ret) *ret = EINA_FALSE;
2983 3886
2984 ed = _edje_fetch(obj);
2985 if (!ed) 3887 if (!ed)
2986 { 3888 {
2987 if (x) *x = 0; 3889 if (x) *x = 0;
2988 if (y) *y = 0; 3890 if (y) *y = 0;
2989 if (w) *w = 0; 3891 if (w) *w = 0;
2990 if (h) *h = 0; 3892 if (h) *h = 0;
2991 return EINA_FALSE; 3893 return;
2992 } 3894 }
2993 3895
2994 ed->calc_only = EINA_TRUE; 3896 ed->calc_only = EINA_TRUE;
@@ -3023,13 +3925,24 @@ edje_object_parts_extends_calc(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, E
3023 if (w) *w = xx2 - xx1; 3925 if (w) *w = xx2 - xx1;
3024 if (h) *h = yy2 - yy1; 3926 if (h) *h = yy2 - yy1;
3025 3927
3026 return EINA_TRUE; 3928 if (ret) *ret = EINA_TRUE;
3027} 3929}
3028 3930
3029EAPI void 3931EAPI void
3030edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh) 3932edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh)
3031{ 3933{
3032 Edje *ed; 3934 if (!obj) return;
3935 eo_do(obj, edje_obj_size_min_restricted_calc(minw, minh, restrictedw, restrictedh));
3936}
3937
3938void
3939_size_min_restricted_calc(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3940{
3941 Evas_Coord *minw = va_arg(*list, Evas_Coord *);
3942 Evas_Coord *minh = va_arg(*list, Evas_Coord *);
3943 Evas_Coord restrictedw = va_arg(*list, Evas_Coord);
3944 Evas_Coord restrictedh = va_arg(*list, Evas_Coord);
3945 Edje *ed = _pd;
3033 Evas_Coord pw, ph; 3946 Evas_Coord pw, ph;
3034 int maxw, maxh; 3947 int maxw, maxh;
3035 int okw, okh; 3948 int okw, okh;
@@ -3037,7 +3950,6 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co
3037 Edje_Real_Part *pep = NULL; 3950 Edje_Real_Part *pep = NULL;
3038 Eina_Bool has_non_fixed_tb = EINA_FALSE; 3951 Eina_Bool has_non_fixed_tb = EINA_FALSE;
3039 3952
3040 ed = _edje_fetch(obj);
3041 if ((!ed) || (!ed->collection)) 3953 if ((!ed) || (!ed->collection))
3042 { 3954 {
3043 if (minw) *minw = restrictedw; 3955 if (minw) *minw = restrictedw;
@@ -3181,14 +4093,26 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co
3181EAPI const char * 4093EAPI const char *
3182edje_object_part_state_get(const Evas_Object *obj, const char *part, double *val_ret) 4094edje_object_part_state_get(const Evas_Object *obj, const char *part, double *val_ret)
3183{ 4095{
3184 Edje *ed; 4096 if (!obj) return NULL;
4097 const char *ret = NULL;
4098 eo_do((Eo *)obj, edje_obj_part_state_get(part, val_ret, &ret));
4099 return ret;
4100}
4101
4102void
4103_part_state_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4104{
4105 const char *part = va_arg(*list, const char *);
4106 double *val_ret = va_arg(*list, double *);
4107 const char **ret = va_arg(*list, const char **);
4108 Edje *ed = (Edje *)_pd;
3185 Edje_Real_Part *rp; 4109 Edje_Real_Part *rp;
4110 *ret = "";
3186 4111
3187 ed = _edje_fetch(obj);
3188 if ((!ed) || (!part)) 4112 if ((!ed) || (!part))
3189 { 4113 {
3190 if (val_ret) *val_ret = 0; 4114 if (val_ret) *val_ret = 0;
3191 return ""; 4115 return;
3192 } 4116 }
3193 4117
3194 /* Need to recalc before providing the object. */ 4118 /* Need to recalc before providing the object. */
@@ -3199,14 +4123,16 @@ edje_object_part_state_get(const Evas_Object *obj, const char *part, double *val
3199 { 4123 {
3200 if (val_ret) *val_ret = 0; 4124 if (val_ret) *val_ret = 0;
3201 INF("part not found"); 4125 INF("part not found");
3202 return ""; 4126 return;
3203 } 4127 }
3204 if (rp->chosen_description) 4128 if (rp->chosen_description)
3205 { 4129 {
3206 if (val_ret) *val_ret = rp->chosen_description->state.value; 4130 if (val_ret) *val_ret = rp->chosen_description->state.value;
3207 if (rp->chosen_description->state.name) 4131 if (rp->chosen_description->state.name)
3208 return rp->chosen_description->state.name; 4132 *ret = rp->chosen_description->state.name;
3209 return "default"; 4133 else
4134 *ret = "default";
4135 return;
3210 } 4136 }
3211 else 4137 else
3212 { 4138 {
@@ -3214,48 +4140,72 @@ edje_object_part_state_get(const Evas_Object *obj, const char *part, double *val
3214 { 4140 {
3215 if (val_ret) *val_ret = rp->param1.description->state.value; 4141 if (val_ret) *val_ret = rp->param1.description->state.value;
3216 if (rp->param1.description->state.name) 4142 if (rp->param1.description->state.name)
3217 return rp->param1.description->state.name; 4143 *ret = rp->param1.description->state.name;
3218 return "default"; 4144 else
4145 *ret = "default";
4146 return;
3219 } 4147 }
3220 } 4148 }
3221 if (val_ret) *val_ret = 0; 4149 if (val_ret) *val_ret = 0;
3222 return "";
3223} 4150}
3224 4151
3225EAPI Edje_Drag_Dir 4152EAPI Edje_Drag_Dir
3226edje_object_part_drag_dir_get(const Evas_Object *obj, const char *part) 4153edje_object_part_drag_dir_get(const Evas_Object *obj, const char *part)
3227{ 4154{
3228 Edje *ed; 4155 if (!obj) return EDJE_DRAG_DIR_NONE;
4156 Edje_Drag_Dir ret;
4157 eo_do((Eo *)obj, edje_obj_part_drag_dir_get(part, &ret));
4158 return ret;
4159}
4160
4161void
4162_part_drag_dir_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4163{
4164 const char *part = va_arg(*list, const char *);
4165 Edje_Drag_Dir *ret = va_arg(*list, Edje_Drag_Dir *);
4166 Edje *ed = (Edje *)_pd;
3229 Edje_Real_Part *rp; 4167 Edje_Real_Part *rp;
4168 *ret = EDJE_DRAG_DIR_NONE;
3230 4169
3231 ed = _edje_fetch(obj); 4170 if ((!ed) || (!part)) return;
3232 if ((!ed) || (!part)) return EDJE_DRAG_DIR_NONE;
3233 4171
3234 /* Need to recalc before providing the object. */ 4172 /* Need to recalc before providing the object. */
3235 _edje_recalc_do(ed); 4173 _edje_recalc_do(ed);
3236 4174
3237 rp = _edje_real_part_recursive_get(ed, part); 4175 rp = _edje_real_part_recursive_get(ed, part);
3238 if (!rp) return EDJE_DRAG_DIR_NONE; 4176 if (!rp) return;
3239 if ((rp->part->dragable.x) && (rp->part->dragable.y)) return EDJE_DRAG_DIR_XY; 4177 if ((rp->part->dragable.x) && (rp->part->dragable.y)) *ret = EDJE_DRAG_DIR_XY;
3240 else if (rp->part->dragable.x) return EDJE_DRAG_DIR_X; 4178 else if (rp->part->dragable.x) *ret = EDJE_DRAG_DIR_X;
3241 else if (rp->part->dragable.y) return EDJE_DRAG_DIR_Y; 4179 else if (rp->part->dragable.y) *ret = EDJE_DRAG_DIR_Y;
3242 return EDJE_DRAG_DIR_NONE;
3243} 4180}
3244 4181
3245EAPI Eina_Bool 4182EAPI Eina_Bool
3246edje_object_part_drag_value_set(Evas_Object *obj, const char *part, double dx, double dy) 4183edje_object_part_drag_value_set(Evas_Object *obj, const char *part, double dx, double dy)
3247{ 4184{
3248 Edje *ed; 4185 if (!obj) return EINA_FALSE;
4186 Eina_Bool ret = EINA_FALSE;
4187 eo_do(obj, edje_obj_part_drag_value_set(part, dx, dy, &ret));
4188 return ret;
4189}
4190
4191void
4192_part_drag_value_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4193{
4194 const char *part = va_arg(*list, const char *);
4195 double dx = va_arg(*list, double);
4196 double dy = va_arg(*list, double);
4197 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4198 Edje *ed = _pd;
3249 Edje_Real_Part *rp; 4199 Edje_Real_Part *rp;
3250 Edje_User_Defined *eud; 4200 Edje_User_Defined *eud;
3251 Eina_List *l; 4201 Eina_List *l;
4202 if (ret) *ret = EINA_FALSE;
3252 4203
3253 ed = _edje_fetch(obj); 4204 if ((!ed) || (!part)) return;
3254 if ((!ed) || (!part)) return EINA_FALSE;
3255 rp = _edje_real_part_recursive_get(ed, part); 4205 rp = _edje_real_part_recursive_get(ed, part);
3256 if (!rp) return EINA_FALSE; 4206 if (!rp) return;
3257 if (!rp->drag) return EINA_FALSE; 4207 if (!rp->drag) return;
3258 if (rp->drag->down.count > 0) return EINA_FALSE; 4208 if (rp->drag->down.count > 0) return;
3259 4209
3260 EINA_LIST_FOREACH(ed->user_defined, l, eud) 4210 EINA_LIST_FOREACH(ed->user_defined, l, eud)
3261 if (eud->type == EDJE_USER_DRAG_VALUE && !strcmp(part, eud->part)) 4211 if (eud->type == EDJE_USER_DRAG_VALUE && !strcmp(part, eud->part))
@@ -3281,7 +4231,11 @@ edje_object_part_drag_value_set(Evas_Object *obj, const char *part, double dx, d
3281 } 4231 }
3282 if (rp->part->dragable.x < 0) dx = 1.0 - dx; 4232 if (rp->part->dragable.x < 0) dx = 1.0 - dx;
3283 if (rp->part->dragable.y < 0) dy = 1.0 - dy; 4233 if (rp->part->dragable.y < 0) dy = 1.0 - dy;
3284 if ((rp->drag->val.x == FROM_DOUBLE(dx)) && (rp->drag->val.y == FROM_DOUBLE(dy))) return EINA_TRUE; 4234 if ((rp->drag->val.x == FROM_DOUBLE(dx)) && (rp->drag->val.y == FROM_DOUBLE(dy)))
4235 {
4236 if (ret) *ret = EINA_TRUE;
4237 return;
4238 }
3285 rp->drag->val.x = FROM_DOUBLE(dx); 4239 rp->drag->val.x = FROM_DOUBLE(dx);
3286 rp->drag->val.y = FROM_DOUBLE(dy); 4240 rp->drag->val.y = FROM_DOUBLE(dy);
3287#ifdef EDJE_CALC_CACHE 4241#ifdef EDJE_CALC_CACHE
@@ -3289,23 +4243,36 @@ edje_object_part_drag_value_set(Evas_Object *obj, const char *part, double dx, d
3289#endif 4243#endif
3290 _edje_dragable_pos_set(rp->edje, rp, rp->drag->val.x, rp->drag->val.y); 4244 _edje_dragable_pos_set(rp->edje, rp, rp->drag->val.x, rp->drag->val.y);
3291 _edje_emit(rp->edje, "drag,set", rp->part->name); 4245 _edje_emit(rp->edje, "drag,set", rp->part->name);
3292 return EINA_TRUE; 4246 if (ret) *ret = EINA_TRUE;
3293} 4247}
3294 4248
3295/* FIXME: Should this be x and y instead of dx/dy? */ 4249/* FIXME: Should this be x and y instead of dx/dy? */
3296EAPI Eina_Bool 4250EAPI Eina_Bool
3297edje_object_part_drag_value_get(const Evas_Object *obj, const char *part, double *dx, double *dy) 4251edje_object_part_drag_value_get(const Evas_Object *obj, const char *part, double *dx, double *dy)
3298{ 4252{
3299 Edje *ed; 4253 if (!obj) return EINA_FALSE;
4254 Eina_Bool ret = EINA_FALSE;
4255 eo_do((Eo *)obj, edje_obj_part_drag_value_get(part, dx, dy, &ret));
4256 return ret;
4257}
4258
4259void
4260_part_drag_value_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4261{
4262 const char *part = va_arg(*list, const char *);
4263 double *dx = va_arg(*list, double *);
4264 double *dy = va_arg(*list, double *);
4265 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4266 Edje *ed = (Edje *)_pd;
3300 Edje_Real_Part *rp; 4267 Edje_Real_Part *rp;
3301 double ddx, ddy; 4268 double ddx, ddy;
4269 *ret = EINA_FALSE;
3302 4270
3303 ed = _edje_fetch(obj);
3304 if ((!ed) || (!part)) 4271 if ((!ed) || (!part))
3305 { 4272 {
3306 if (dx) *dx = 0; 4273 if (dx) *dx = 0;
3307 if (dy) *dy = 0; 4274 if (dy) *dy = 0;
3308 return EINA_FALSE; 4275 return;
3309 } 4276 }
3310 4277
3311 /* Need to recalc before providing the object. */ 4278 /* Need to recalc before providing the object. */
@@ -3316,7 +4283,7 @@ edje_object_part_drag_value_get(const Evas_Object *obj, const char *part, double
3316 { 4283 {
3317 if (dx) *dx = 0; 4284 if (dx) *dx = 0;
3318 if (dy) *dy = 0; 4285 if (dy) *dy = 0;
3319 return EINA_FALSE; 4286 return;
3320 } 4287 }
3321 ddx = TO_DOUBLE(rp->drag->val.x); 4288 ddx = TO_DOUBLE(rp->drag->val.x);
3322 ddy = TO_DOUBLE(rp->drag->val.y); 4289 ddy = TO_DOUBLE(rp->drag->val.y);
@@ -3324,22 +4291,35 @@ edje_object_part_drag_value_get(const Evas_Object *obj, const char *part, double
3324 if (rp->part->dragable.y < 0) ddy = 1.0 - ddy; 4291 if (rp->part->dragable.y < 0) ddy = 1.0 - ddy;
3325 if (dx) *dx = ddx; 4292 if (dx) *dx = ddx;
3326 if (dy) *dy = ddy; 4293 if (dy) *dy = ddy;
3327 return EINA_TRUE; 4294 *ret = EINA_TRUE;
3328} 4295}
3329 4296
3330EAPI Eina_Bool 4297EAPI Eina_Bool
3331edje_object_part_drag_size_set(Evas_Object *obj, const char *part, double dw, double dh) 4298edje_object_part_drag_size_set(Evas_Object *obj, const char *part, double dw, double dh)
3332{ 4299{
3333 Edje *ed; 4300 if (!obj) return EINA_FALSE;
4301 Eina_Bool ret = EINA_FALSE;
4302 eo_do(obj, edje_obj_part_drag_size_set(part, dw, dh, &ret));
4303 return ret;
4304}
4305
4306void
4307_part_drag_size_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4308{
4309 const char *part = va_arg(*list, const char *);
4310 double dw = va_arg(*list, double);
4311 double dh = va_arg(*list, double);
4312 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4313 Edje *ed = _pd;
3334 Edje_Real_Part *rp; 4314 Edje_Real_Part *rp;
3335 Edje_User_Defined *eud; 4315 Edje_User_Defined *eud;
3336 Eina_List *l; 4316 Eina_List *l;
4317 if (ret) *ret = EINA_FALSE;
3337 4318
3338 ed = _edje_fetch(obj); 4319 if ((!ed) || (!part)) return;
3339 if ((!ed) || (!part)) return EINA_FALSE;
3340 rp = _edje_real_part_recursive_get(ed, part); 4320 rp = _edje_real_part_recursive_get(ed, part);
3341 if (!rp) return EINA_FALSE; 4321 if (!rp) return;
3342 if (!rp->drag) return EINA_FALSE; 4322 if (!rp->drag) return;
3343 4323
3344 EINA_LIST_FOREACH(ed->user_defined, l, eud) 4324 EINA_LIST_FOREACH(ed->user_defined, l, eud)
3345 if (eud->type == EDJE_USER_DRAG_SIZE && !strcmp(part, eud->part)) 4325 if (eud->type == EDJE_USER_DRAG_SIZE && !strcmp(part, eud->part))
@@ -3362,7 +4342,11 @@ edje_object_part_drag_size_set(Evas_Object *obj, const char *part, double dw, do
3362 else if (dw > 1.0) dw = 1.0; 4342 else if (dw > 1.0) dw = 1.0;
3363 if (dh < 0.0) dh = 0.0; 4343 if (dh < 0.0) dh = 0.0;
3364 else if (dh > 1.0) dh = 1.0; 4344 else if (dh > 1.0) dh = 1.0;
3365 if ((rp->drag->size.x == FROM_DOUBLE(dw)) && (rp->drag->size.y == FROM_DOUBLE(dh))) return EINA_TRUE; 4345 if ((rp->drag->size.x == FROM_DOUBLE(dw)) && (rp->drag->size.y == FROM_DOUBLE(dh)))
4346 {
4347 if (ret) *ret = EINA_TRUE;
4348 return;
4349 }
3366 rp->drag->size.x = FROM_DOUBLE(dw); 4350 rp->drag->size.x = FROM_DOUBLE(dw);
3367 rp->drag->size.y = FROM_DOUBLE(dh); 4351 rp->drag->size.y = FROM_DOUBLE(dh);
3368 rp->edje->dirty = EINA_TRUE; 4352 rp->edje->dirty = EINA_TRUE;
@@ -3371,21 +4355,34 @@ edje_object_part_drag_size_set(Evas_Object *obj, const char *part, double dw, do
3371 rp->invalidate = 1; 4355 rp->invalidate = 1;
3372#endif 4356#endif
3373 _edje_recalc(rp->edje); 4357 _edje_recalc(rp->edje);
3374 return EINA_TRUE; 4358 if (ret) *ret = EINA_TRUE;
3375} 4359}
3376 4360
3377EAPI Eina_Bool 4361EAPI Eina_Bool
3378edje_object_part_drag_size_get(const Evas_Object *obj, const char *part, double *dw, double *dh) 4362edje_object_part_drag_size_get(const Evas_Object *obj, const char *part, double *dw, double *dh)
3379{ 4363{
3380 Edje *ed; 4364 if (!obj) return EINA_FALSE;
4365 Eina_Bool ret = EINA_FALSE;
4366 eo_do((Eo *)obj, edje_obj_part_drag_size_get(part, dw, dh, &ret));
4367 return ret;
4368}
4369
4370void
4371_part_drag_size_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4372{
4373 const char *part = va_arg(*list, const char *);
4374 double *dw = va_arg(*list, double *);
4375 double *dh = va_arg(*list, double *);
4376 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4377 Edje *ed = (Edje *)_pd;
3381 Edje_Real_Part *rp; 4378 Edje_Real_Part *rp;
4379 *ret = EINA_FALSE;
3382 4380
3383 ed = _edje_fetch(obj);
3384 if ((!ed) || (!part)) 4381 if ((!ed) || (!part))
3385 { 4382 {
3386 if (dw) *dw = 0; 4383 if (dw) *dw = 0;
3387 if (dh) *dh = 0; 4384 if (dh) *dh = 0;
3388 return EINA_FALSE; 4385 return;
3389 } 4386 }
3390 4387
3391 /* Need to recalc before providing the object. */ 4388 /* Need to recalc before providing the object. */
@@ -3396,26 +4393,39 @@ edje_object_part_drag_size_get(const Evas_Object *obj, const char *part, double
3396 { 4393 {
3397 if (dw) *dw = 0; 4394 if (dw) *dw = 0;
3398 if (dh) *dh = 0; 4395 if (dh) *dh = 0;
3399 return EINA_FALSE; 4396 return;
3400 } 4397 }
3401 if (dw) *dw = TO_DOUBLE(rp->drag->size.x); 4398 if (dw) *dw = TO_DOUBLE(rp->drag->size.x);
3402 if (dh) *dh = TO_DOUBLE(rp->drag->size.y); 4399 if (dh) *dh = TO_DOUBLE(rp->drag->size.y);
3403 return EINA_TRUE; 4400 *ret = EINA_TRUE;
3404} 4401}
3405 4402
3406EAPI Eina_Bool 4403EAPI Eina_Bool
3407edje_object_part_drag_step_set(Evas_Object *obj, const char *part, double dx, double dy) 4404edje_object_part_drag_step_set(Evas_Object *obj, const char *part, double dx, double dy)
3408{ 4405{
3409 Edje *ed; 4406 if (!obj) return EINA_FALSE;
4407 Eina_Bool ret = EINA_FALSE;
4408 eo_do(obj, edje_obj_part_drag_step_set(part, dx, dy, &ret));
4409 return ret;
4410}
4411
4412void
4413_part_drag_step_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4414{
4415 const char *part = va_arg(*list, const char *);
4416 double dx = va_arg(*list, double);
4417 double dy = va_arg(*list, double);
4418 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4419 Edje *ed = _pd;
3410 Edje_Real_Part *rp; 4420 Edje_Real_Part *rp;
3411 Edje_User_Defined *eud; 4421 Edje_User_Defined *eud;
3412 Eina_List *l; 4422 Eina_List *l;
4423 if (ret) *ret = EINA_FALSE;
3413 4424
3414 ed = _edje_fetch(obj); 4425 if ((!ed) || (!part)) return;
3415 if ((!ed) || (!part)) return EINA_FALSE;
3416 rp = _edje_real_part_recursive_get(ed, part); 4426 rp = _edje_real_part_recursive_get(ed, part);
3417 if (!rp) return EINA_FALSE; 4427 if (!rp) return;
3418 if (!rp->drag) return EINA_FALSE; 4428 if (!rp->drag) return;
3419 4429
3420 EINA_LIST_FOREACH(ed->user_defined, l, eud) 4430 EINA_LIST_FOREACH(ed->user_defined, l, eud)
3421 if (eud->type == EDJE_USER_DRAG_STEP && !strcmp(part, eud->part)) 4431 if (eud->type == EDJE_USER_DRAG_STEP && !strcmp(part, eud->part))
@@ -3443,21 +4453,34 @@ edje_object_part_drag_step_set(Evas_Object *obj, const char *part, double dx, do
3443#ifdef EDJE_CALC_CACHE 4453#ifdef EDJE_CALC_CACHE
3444 rp->invalidate = 1; 4454 rp->invalidate = 1;
3445#endif 4455#endif
3446 return EINA_TRUE; 4456 if (ret) *ret = EINA_TRUE;
3447} 4457}
3448 4458
3449EAPI Eina_Bool 4459EAPI Eina_Bool
3450edje_object_part_drag_step_get(const Evas_Object *obj, const char *part, double *dx, double *dy) 4460edje_object_part_drag_step_get(const Evas_Object *obj, const char *part, double *dx, double *dy)
3451{ 4461{
3452 Edje *ed; 4462 if (!obj) return EINA_FALSE;
4463 Eina_Bool ret = EINA_FALSE;
4464 eo_do((Eo *)obj, edje_obj_part_drag_step_get(part, dx, dy, &ret));
4465 return ret;
4466}
4467
4468void
4469_part_drag_step_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4470{
4471 const char *part = va_arg(*list, const char *);
4472 double *dx = va_arg(*list, double *);
4473 double *dy = va_arg(*list, double *);
4474 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4475 Edje *ed = (Edje *)_pd;
3453 Edje_Real_Part *rp; 4476 Edje_Real_Part *rp;
4477 *ret = EINA_FALSE;
3454 4478
3455 ed = _edje_fetch(obj);
3456 if ((!ed) || (!part)) 4479 if ((!ed) || (!part))
3457 { 4480 {
3458 if (dx) *dx = 0; 4481 if (dx) *dx = 0;
3459 if (dy) *dy = 0; 4482 if (dy) *dy = 0;
3460 return EINA_FALSE; 4483 return;
3461 } 4484 }
3462 4485
3463 /* Need to recalc before providing the object. */ 4486 /* Need to recalc before providing the object. */
@@ -3468,26 +4491,39 @@ edje_object_part_drag_step_get(const Evas_Object *obj, const char *part, double
3468 { 4491 {
3469 if (dx) *dx = 0; 4492 if (dx) *dx = 0;
3470 if (dy) *dy = 0; 4493 if (dy) *dy = 0;
3471 return EINA_FALSE; 4494 return;
3472 } 4495 }
3473 if (dx) *dx = TO_DOUBLE(rp->drag->step.x); 4496 if (dx) *dx = TO_DOUBLE(rp->drag->step.x);
3474 if (dy) *dy = TO_DOUBLE(rp->drag->step.y); 4497 if (dy) *dy = TO_DOUBLE(rp->drag->step.y);
3475 return EINA_TRUE; 4498 *ret = EINA_TRUE;
3476} 4499}
3477 4500
3478EAPI Eina_Bool 4501EAPI Eina_Bool
3479edje_object_part_drag_page_set(Evas_Object *obj, const char *part, double dx, double dy) 4502edje_object_part_drag_page_set(Evas_Object *obj, const char *part, double dx, double dy)
3480{ 4503{
3481 Edje *ed; 4504 if (!obj) return EINA_FALSE;
4505 Eina_Bool ret = EINA_FALSE;
4506 eo_do(obj, edje_obj_part_drag_page_set(part, dx, dy, &ret));
4507 return ret;
4508}
4509
4510void
4511_part_drag_page_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4512{
4513 const char *part = va_arg(*list, const char *);
4514 double dx = va_arg(*list, double);
4515 double dy = va_arg(*list, double);
4516 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4517 Edje *ed = _pd;
3482 Edje_Real_Part *rp; 4518 Edje_Real_Part *rp;
3483 Edje_User_Defined *eud; 4519 Edje_User_Defined *eud;
3484 Eina_List *l; 4520 Eina_List *l;
4521 if (ret) *ret = EINA_FALSE;
3485 4522
3486 ed = _edje_fetch(obj); 4523 if ((!ed) || (!part)) return;
3487 if ((!ed) || (!part)) return EINA_FALSE;
3488 rp = _edje_real_part_recursive_get(ed, part); 4524 rp = _edje_real_part_recursive_get(ed, part);
3489 if (!rp) return EINA_FALSE; 4525 if (!rp) return;
3490 if (!rp->drag) return EINA_FALSE; 4526 if (!rp->drag) return;
3491 4527
3492 EINA_LIST_FOREACH(ed->user_defined, l, eud) 4528 EINA_LIST_FOREACH(ed->user_defined, l, eud)
3493 if (eud->type == EDJE_USER_DRAG_PAGE && !strcmp(part, eud->part)) 4529 if (eud->type == EDJE_USER_DRAG_PAGE && !strcmp(part, eud->part))
@@ -3515,21 +4551,34 @@ edje_object_part_drag_page_set(Evas_Object *obj, const char *part, double dx, do
3515#ifdef EDJE_CALC_CACHE 4551#ifdef EDJE_CALC_CACHE
3516 rp->invalidate = 1; 4552 rp->invalidate = 1;
3517#endif 4553#endif
3518 return EINA_TRUE; 4554 if (ret) *ret = EINA_TRUE;
3519} 4555}
3520 4556
3521EAPI Eina_Bool 4557EAPI Eina_Bool
3522edje_object_part_drag_page_get(const Evas_Object *obj, const char *part, double *dx, double *dy) 4558edje_object_part_drag_page_get(const Evas_Object *obj, const char *part, double *dx, double *dy)
3523{ 4559{
3524 Edje *ed; 4560 if (!obj) return EINA_FALSE;
4561 Eina_Bool ret = EINA_FALSE;
4562 eo_do((Eo *)obj, edje_obj_part_drag_page_get(part, dx, dy, &ret));
4563 return ret;
4564}
4565
4566void
4567_part_drag_page_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4568{
4569 const char *part = va_arg(*list, const char *);
4570 double *dx = va_arg(*list, double *);
4571 double *dy = va_arg(*list, double *);
4572 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
4573 Edje *ed = (Edje *)_pd;
3525 Edje_Real_Part *rp; 4574 Edje_Real_Part *rp;
4575 *ret = EINA_FALSE;
3526 4576
3527 ed = _edje_fetch(obj);
3528 if ((!ed) || (!part)) 4577 if ((!ed) || (!part))
3529 { 4578 {
3530 if (dx) *dx = 0; 4579 if (dx) *dx = 0;
3531 if (dy) *dy = 0; 4580 if (dy) *dy = 0;
3532 return EINA_FALSE; 4581 return;
3533 } 4582 }
3534 4583
3535 /* Need to recalc before providing the object. */ 4584 /* Need to recalc before providing the object. */
@@ -3540,28 +4589,41 @@ edje_object_part_drag_page_get(const Evas_Object *obj, const char *part, double
3540 { 4589 {
3541 if (dx) *dx = 0; 4590 if (dx) *dx = 0;
3542 if (dy) *dy = 0; 4591 if (dy) *dy = 0;
3543 return EINA_FALSE; 4592 return;
3544 } 4593 }
3545 if (dx) *dx = TO_DOUBLE(rp->drag->page.x); 4594 if (dx) *dx = TO_DOUBLE(rp->drag->page.x);
3546 if (dy) *dy = TO_DOUBLE(rp->drag->page.y); 4595 if (dy) *dy = TO_DOUBLE(rp->drag->page.y);
3547 return EINA_TRUE; 4596 *ret = EINA_TRUE;
3548} 4597}
3549 4598
3550EAPI Eina_Bool 4599EAPI Eina_Bool
3551edje_object_part_drag_step(Evas_Object *obj, const char *part, double dx, double dy) 4600edje_object_part_drag_step(Evas_Object *obj, const char *part, double dx, double dy)
3552{ 4601{
3553 Edje *ed; 4602 if (!obj) return EINA_FALSE;
4603 Eina_Bool ret = EINA_FALSE;
4604 eo_do(obj, edje_obj_part_drag_step(part, dx, dy, &ret));
4605 return ret;
4606}
4607
4608void
4609_part_drag_step(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
4610{
4611 const char *part = va_arg(*list, const char *);