summaryrefslogtreecommitdiff
path: root/efl/edje/efl.edje_object.pxi
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2013-04-18 19:43:32 +0000
committerKai Huuhko <kai.huuhko@gmail.com>2013-04-22 20:20:20 +0300
commit898f32371a2d41ec444828ac79c94316bb9bf5c0 (patch)
tree6c487e2553cac2fe4dc73638a6ec61ef7ac44101 /efl/edje/efl.edje_object.pxi
parent2f0c2dc6d7677843f292c0ca20a25bb7ca37bf5c (diff)
Sed to the rescue.
Diffstat (limited to '')
-rw-r--r--efl/edje/efl.edje_object.pxi129
1 files changed, 64 insertions, 65 deletions
diff --git a/efl/edje/efl.edje_object.pxi b/efl/edje/efl.edje_object.pxi
index f80fc8f..bbd165a 100644
--- a/efl/edje/efl.edje_object.pxi
+++ b/efl/edje/efl.edje_object.pxi
@@ -15,7 +15,6 @@
15# You should have received a copy of the GNU Lesser General Public License 15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. 16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17 17
18
19cdef void text_change_cb(void *data, 18cdef void text_change_cb(void *data,
20 Evas_Object *obj, 19 Evas_Object *obj,
21 const_char *part) with gil: 20 const_char *part) with gil:
@@ -192,7 +191,7 @@ cdef class Edje(Object):
192 *data* section inside the *group* that defines this object. 191 *data* section inside the *group* that defines this object.
193 192
194 """ 193 """
195 if isinstance(key, unicode): key = key.encode("UTF-8") 194 if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key)
196 return _ctouni(edje_object_data_get(self.obj, 195 return _ctouni(edje_object_data_get(self.obj,
197 <const_char *>key if key is not None else NULL)) 196 <const_char *>key if key is not None else NULL))
198 197
@@ -205,8 +204,8 @@ cdef class Edje(Object):
205 :raise EdjeLoadError: if error occurred during load. 204 :raise EdjeLoadError: if error occurred during load.
206 205
207 """ 206 """
208 if isinstance(file, unicode): file = file.encode("UTF-8") 207 if isinstance(file, unicode): file = PyUnicode_AsUTF8String(file)
209 if isinstance(group, unicode): group = group.encode("UTF-8") 208 if isinstance(group, unicode): group = PyUnicode_AsUTF8String(group)
210 if edje_object_file_set(self.obj, 209 if edje_object_file_set(self.obj,
211 <const_char *>file if file is not None else NULL, 210 <const_char *>file if file is not None else NULL,
212 <const_char *>group if group is not None else NULL) == 0: 211 <const_char *>group if group is not None else NULL) == 0:
@@ -297,7 +296,7 @@ cdef class Edje(Object):
297 296
298 """ 297 """
299 if isinstance(color_class, unicode): 298 if isinstance(color_class, unicode):
300 color_class = color_class.encode("UTF-8") 299 color_class = PyUnicode_AsUTF8String(color_class)
301 edje_object_color_class_set(self.obj, 300 edje_object_color_class_set(self.obj,
302 <const_char *>color_class if color_class is not None else NULL, 301 <const_char *>color_class if color_class is not None else NULL,
303 r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3) 302 r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3)
@@ -314,7 +313,7 @@ cdef class Edje(Object):
314 cdef int r2, g2, b2, a2 313 cdef int r2, g2, b2, a2
315 cdef int r3, g3, b3, a3 314 cdef int r3, g3, b3, a3
316 if isinstance(color_class, unicode): 315 if isinstance(color_class, unicode):
317 color_class = color_class.encode("UTF-8") 316 color_class = PyUnicode_AsUTF8String(color_class)
318 edje_object_color_class_get(self.obj, 317 edje_object_color_class_get(self.obj,
319 <const_char *>color_class if color_class is not None else NULL, 318 <const_char *>color_class if color_class is not None else NULL,
320 &r, &g, &b, &a, &r2, &g2, &b2, &a2, &r3, &g3, &b3, &a3) 319 &r, &g, &b, &a, &r2, &g2, &b2, &a2, &r3, &g3, &b3, &a3)
@@ -323,7 +322,7 @@ cdef class Edje(Object):
323 def color_class_del(self, color_class): 322 def color_class_del(self, color_class):
324 "Delete a specific color class." 323 "Delete a specific color class."
325 if isinstance(color_class, unicode): 324 if isinstance(color_class, unicode):
326 color_class = color_class.encode("UTF-8") 325 color_class = PyUnicode_AsUTF8String(color_class)
327 edje_object_color_class_del(self.obj, 326 edje_object_color_class_del(self.obj,
328 <const_char *>color_class if color_class is not None else NULL) 327 <const_char *>color_class if color_class is not None else NULL)
329 328
@@ -335,9 +334,9 @@ cdef class Edje(Object):
335 :param size: the font size 334 :param size: the font size
336 """ 335 """
337 if isinstance(text_class, unicode): 336 if isinstance(text_class, unicode):
338 text_class = text_class.encode("UTF-8") 337 text_class = PyUnicode_AsUTF8String(text_class)
339 if isinstance(font, unicode): 338 if isinstance(font, unicode):
340 font = font.encode("UTF-8") 339 font = PyUnicode_AsUTF8String(font)
341 edje_object_text_class_set(self.obj, 340 edje_object_text_class_set(self.obj,
342 <const_char *>text_class if text_class is not None else NULL, 341 <const_char *>text_class if text_class is not None else NULL,
343 <const_char *>font if font is not None else NULL, 342 <const_char *>font if font is not None else NULL,
@@ -380,7 +379,7 @@ cdef class Edje(Object):
380 379
381 def part_exists(self, part): 380 def part_exists(self, part):
382 ":rtype: bool" 381 ":rtype: bool"
383 if isinstance(part, unicode): part = part.encode("UTF-8") 382 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
384 return bool(edje_object_part_exists(self.obj, 383 return bool(edje_object_part_exists(self.obj,
385 <const_char *>part if part is not None else NULL)) 384 <const_char *>part if part is not None else NULL))
386 385
@@ -396,7 +395,7 @@ cdef class Edje(Object):
396 395
397 """ 396 """
398 cdef Evas_Object *obj 397 cdef Evas_Object *obj
399 if isinstance(part, unicode): part = part.encode("UTF-8") 398 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
400 obj = <Evas_Object*>edje_object_part_object_get(self.obj, 399 obj = <Evas_Object*>edje_object_part_object_get(self.obj,
401 <const_char *>part if part is not None else NULL) 400 <const_char *>part if part is not None else NULL)
402 return object_from_instance(obj) 401 return object_from_instance(obj)
@@ -404,7 +403,7 @@ cdef class Edje(Object):
404 def part_geometry_get(self, part): 403 def part_geometry_get(self, part):
405 ":rtype: tuple of int" 404 ":rtype: tuple of int"
406 cdef int x, y, w, h 405 cdef int x, y, w, h
407 if isinstance(part, unicode): part = part.encode("UTF-8") 406 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
408 edje_object_part_geometry_get(self.obj, 407 edje_object_part_geometry_get(self.obj,
409 <const_char *>part if part is not None else NULL, 408 <const_char *>part if part is not None else NULL,
410 &x, &y, &w, &h) 409 &x, &y, &w, &h)
@@ -413,7 +412,7 @@ cdef class Edje(Object):
413 def part_size_get(self, part): 412 def part_size_get(self, part):
414 ":rtype: tuple of int" 413 ":rtype: tuple of int"
415 cdef int w, h 414 cdef int w, h
416 if isinstance(part, unicode): part = part.encode("UTF-8") 415 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
417 edje_object_part_geometry_get(self.obj, 416 edje_object_part_geometry_get(self.obj,
418 <const_char *>part if part is not None else NULL, 417 <const_char *>part if part is not None else NULL,
419 NULL, NULL, &w, &h) 418 NULL, NULL, &w, &h)
@@ -422,7 +421,7 @@ cdef class Edje(Object):
422 def part_pos_get(self, part): 421 def part_pos_get(self, part):
423 ":rtype: tuple of int" 422 ":rtype: tuple of int"
424 cdef int x, y 423 cdef int x, y
425 if isinstance(part, unicode): part = part.encode("UTF-8") 424 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
426 edje_object_part_geometry_get(self.obj, 425 edje_object_part_geometry_get(self.obj,
427 <const_char *>part if part is not None else NULL, 426 <const_char *>part if part is not None else NULL,
428 &x, &y, NULL, NULL) 427 &x, &y, NULL, NULL)
@@ -454,8 +453,8 @@ cdef class Edje(Object):
454 :param text: the new text to set 453 :param text: the new text to set
455 454
456 """ 455 """
457 if isinstance(part, unicode): part = part.encode("UTF-8") 456 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
458 if isinstance(text, unicode): text = text.encode("UTF-8") 457 if isinstance(text, unicode): text = PyUnicode_AsUTF8String(text)
459 edje_object_part_text_set(self.obj, 458 edje_object_part_text_set(self.obj,
460 <const_char *>part if part is not None else NULL, 459 <const_char *>part if part is not None else NULL,
461 <const_char *>text if text is not None else NULL) 460 <const_char *>text if text is not None else NULL)
@@ -468,20 +467,20 @@ cdef class Edje(Object):
468 467
469 """ 468 """
470 cdef const_char *s 469 cdef const_char *s
471 if isinstance(part, unicode): part = part.encode("UTF-8") 470 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
472 return _ctouni(edje_object_part_text_get(self.obj, 471 return _ctouni(edje_object_part_text_get(self.obj,
473 <const_char *>part if part is not None else NULL)) 472 <const_char *>part if part is not None else NULL))
474 473
475 474
476 def part_text_select_all(self, part): 475 def part_text_select_all(self, part):
477 "Select all the text of the given TEXT or TEXTBLOCK part" 476 "Select all the text of the given TEXT or TEXTBLOCK part"
478 if isinstance(part, unicode): part = part.encode("UTF-8") 477 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
479 edje_object_part_text_select_all(self.obj, 478 edje_object_part_text_select_all(self.obj,
480 <const_char *>part if part is not None else NULL) 479 <const_char *>part if part is not None else NULL)
481 480
482 def part_text_select_none(self, part): 481 def part_text_select_none(self, part):
483 "Deselect all the text of the given TEXT or TEXTBLOCK part" 482 "Deselect all the text of the given TEXT or TEXTBLOCK part"
484 if isinstance(part, unicode): part = part.encode("UTF-8") 483 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
485 edje_object_part_text_select_none(self.obj, 484 edje_object_part_text_select_none(self.obj,
486 <const_char *>part if part is not None else NULL) 485 <const_char *>part if part is not None else NULL)
487 486
@@ -495,9 +494,9 @@ cdef class Edje(Object):
495 :see: part_text_set() 494 :see: part_text_set()
496 :see: part_text_unescaped_get() 495 :see: part_text_unescaped_get()
497 """ 496 """
498 if isinstance(part, unicode): part = part.encode("UTF-8") 497 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
499 if isinstance(text_to_escape, unicode): 498 if isinstance(text_to_escape, unicode):
500 text_to_escape = text_to_escape.encode("UTF-8") 499 text_to_escape = PyUnicode_AsUTF8String(text_to_escape)
501 edje_object_part_text_unescaped_set(self.obj, 500 edje_object_part_text_unescaped_set(self.obj,
502 <const_char *>part if part is not None else NULL, 501 <const_char *>part if part is not None else NULL,
503 <const_char *>text_to_escape if text_to_escape is not None else NULL) 502 <const_char *>text_to_escape if text_to_escape is not None else NULL)
@@ -512,7 +511,7 @@ cdef class Edje(Object):
512 :see: part_text_unescaped_set() 511 :see: part_text_unescaped_set()
513 """ 512 """
514 cdef char *s 513 cdef char *s
515 if isinstance(part, unicode): part = part.encode("UTF-8") 514 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
516 s = edje_object_part_text_unescaped_get(self.obj, 515 s = edje_object_part_text_unescaped_get(self.obj,
517 <const_char *>part if part is not None else NULL) 516 <const_char *>part if part is not None else NULL)
518 if s == NULL: 517 if s == NULL:
@@ -538,7 +537,7 @@ cdef class Edje(Object):
538 :type obj: efl.evas.Object 537 :type obj: efl.evas.Object
539 538
540 """ 539 """
541 if isinstance(part, unicode): part = part.encode("UTF-8") 540 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
542 edje_object_part_swallow(self.obj, 541 edje_object_part_swallow(self.obj,
543 <const_char *>part if part is not None else NULL, obj.obj) 542 <const_char *>part if part is not None else NULL, obj.obj)
544 543
@@ -548,13 +547,13 @@ cdef class Edje(Object):
548 547
549 def part_swallow_get(self, part): 548 def part_swallow_get(self, part):
550 ":rtype: efl.evas.Object" 549 ":rtype: efl.evas.Object"
551 if isinstance(part, unicode): part = part.encode("UTF-8") 550 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
552 return object_from_instance(edje_object_part_swallow_get( 551 return object_from_instance(edje_object_part_swallow_get(
553 self.obj, <const_char *>part if part is not None else NULL)) 552 self.obj, <const_char *>part if part is not None else NULL))
554 553
555 def part_external_object_get(self, part): 554 def part_external_object_get(self, part):
556 ":rtype: efl.evas.Object" 555 ":rtype: efl.evas.Object"
557 if isinstance(part, unicode): part = part.encode("UTF-8") 556 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
558 return object_from_instance(edje_object_part_external_object_get( 557 return object_from_instance(edje_object_part_external_object_get(
559 self.obj, <const_char *>part if part is not None else NULL)) 558 self.obj, <const_char *>part if part is not None else NULL))
560 559
@@ -572,7 +571,7 @@ cdef class Edje(Object):
572 cdef const_char *c_param 571 cdef const_char *c_param
573 572
574 if isinstance(part, unicode): 573 if isinstance(part, unicode):
575 str1 = part.encode('UTF-8') 574 str1 = PyUnicode_AsUTF8String(part)
576 c_part = str1 575 c_part = str1
577 elif isinstance(part, str): 576 elif isinstance(part, str):
578 c_part = part 577 c_part = part
@@ -581,7 +580,7 @@ cdef class Edje(Object):
581 type(part).__name__) 580 type(part).__name__)
582 581
583 if isinstance(param, unicode): 582 if isinstance(param, unicode):
584 str2 = param.encode('UTF-8') 583 str2 = PyUnicode_AsUTF8String(param)
585 c_param = str2 584 c_param = str2
586 elif isinstance(param, str): 585 elif isinstance(param, str):
587 c_param = param 586 c_param = param
@@ -604,7 +603,7 @@ cdef class Edje(Object):
604 p.type = edje_object_part_external_param_type_get( 603 p.type = edje_object_part_external_param_type_get(
605 self.obj, c_part, c_param) 604 self.obj, c_part, c_param)
606 if isinstance(value, unicode): 605 if isinstance(value, unicode):
607 value = value.encode("UTF-8") 606 value = PyUnicode_AsUTF8String(value)
608 p.s = value 607 p.s = value
609 else: 608 else:
610 raise TypeError("unsupported type %s" % type(value).__name__) 609 raise TypeError("unsupported type %s" % type(value).__name__)
@@ -624,7 +623,7 @@ cdef class Edje(Object):
624 cdef const_char *c_param 623 cdef const_char *c_param
625 624
626 if isinstance(part, unicode): 625 if isinstance(part, unicode):
627 str1 = part.encode('UTF-8') 626 str1 = PyUnicode_AsUTF8String(part)
628 c_part = str1 627 c_part = str1
629 elif isinstance(part, str): 628 elif isinstance(part, str):
630 c_part = part 629 c_part = part
@@ -633,7 +632,7 @@ cdef class Edje(Object):
633 type(part).__name__) 632 type(part).__name__)
634 633
635 if isinstance(param, unicode): 634 if isinstance(param, unicode):
636 str2 = param.encode('UTF-8') 635 str2 = PyUnicode_AsUTF8String(param)
637 c_param = str2 636 c_param = str2
638 elif isinstance(param, str): 637 elif isinstance(param, str):
639 c_param = param 638 c_param = param
@@ -669,7 +668,7 @@ cdef class Edje(Object):
669 :param obj: the efl.evas.Object to append 668 :param obj: the efl.evas.Object to append
670 :rtype: bool 669 :rtype: bool
671 """ 670 """
672 if isinstance(part, unicode): part = part.encode("UTF-8") 671 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
673 return bool(edje_object_part_box_append(self.obj, 672 return bool(edje_object_part_box_append(self.obj,
674 <const_char *>part if part is not None else NULL, obj.obj)) 673 <const_char *>part if part is not None else NULL, obj.obj))
675 674
@@ -684,7 +683,7 @@ cdef class Edje(Object):
684 :param obj: the efl.evas.Object to append 683 :param obj: the efl.evas.Object to append
685 :rtype: bool 684 :rtype: bool
686 """ 685 """
687 if isinstance(part, unicode): part = part.encode("UTF-8") 686 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
688 return bool(edje_object_part_box_prepend(self.obj, 687 return bool(edje_object_part_box_prepend(self.obj,
689 <const_char *>part if part is not None else NULL, obj.obj)) 688 <const_char *>part if part is not None else NULL, obj.obj))
690 689
@@ -697,7 +696,7 @@ cdef class Edje(Object):
697 :param pos: the position to append the object 696 :param pos: the position to append the object
698 :rtype: bool 697 :rtype: bool
699 """ 698 """
700 if isinstance(part, unicode): part = part.encode("UTF-8") 699 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
701 return bool(edje_object_part_box_insert_at(self.obj, 700 return bool(edje_object_part_box_insert_at(self.obj,
702 <const_char *>part if part is not None else NULL, obj.obj, pos)) 701 <const_char *>part if part is not None else NULL, obj.obj, pos))
703 702
@@ -709,7 +708,7 @@ cdef class Edje(Object):
709 :param reference: the efl.evas.Object used as reference 708 :param reference: the efl.evas.Object used as reference
710 :rtype: bool 709 :rtype: bool
711 """ 710 """
712 if isinstance(part, unicode): part = part.encode("UTF-8") 711 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
713 return bool(edje_object_part_box_insert_before(self.obj, 712 return bool(edje_object_part_box_insert_before(self.obj,
714 <const_char *>part if part is not None else NULL, 713 <const_char *>part if part is not None else NULL,
715 obj.obj, reference.obj)) 714 obj.obj, reference.obj))
@@ -726,7 +725,7 @@ cdef class Edje(Object):
726 :rtype: efl.evas.Object or *None* 725 :rtype: efl.evas.Object or *None*
727 726
728 """ 727 """
729 if isinstance(part, unicode): part = part.encode("UTF-8") 728 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
730 return object_from_instance(edje_object_part_box_remove(self.obj, 729 return object_from_instance(edje_object_part_box_remove(self.obj,
731 <const_char *>part if part is not None else NULL, obj.obj)) 730 <const_char *>part if part is not None else NULL, obj.obj))
732 731
@@ -741,7 +740,7 @@ cdef class Edje(Object):
741 :return: the removed object 740 :return: the removed object
742 :rtype: efl.evas.Object or None 741 :rtype: efl.evas.Object or None
743 """ 742 """
744 if isinstance(part, unicode): part = part.encode("UTF-8") 743 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
745 return object_from_instance(edje_object_part_box_remove_at(self.obj, 744 return object_from_instance(edje_object_part_box_remove_at(self.obj,
746 <const_char *>part if part is not None else NULL, pos)) 745 <const_char *>part if part is not None else NULL, pos))
747 746
@@ -755,7 +754,7 @@ cdef class Edje(Object):
755 754
756 :rtype: bool 755 :rtype: bool
757 """ 756 """
758 if isinstance(part, unicode): part = part.encode("UTF-8") 757 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
759 return bool(edje_object_part_box_remove_all(self.obj, 758 return bool(edje_object_part_box_remove_all(self.obj,
760 <const_char *>part if part is not None else NULL, clear)) 759 <const_char *>part if part is not None else NULL, clear))
761 760
@@ -771,7 +770,7 @@ cdef class Edje(Object):
771 770
772 :rtype: bool 771 :rtype: bool
773 """ 772 """
774 if isinstance(part, unicode): part = part.encode("UTF-8") 773 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
775 return bool(edje_object_part_table_pack(self.obj, 774 return bool(edje_object_part_table_pack(self.obj,
776 <const_char *>part if part is not None else NULL, 775 <const_char *>part if part is not None else NULL,
777 child.obj, col, row, colspan, rowspan)) 776 child.obj, col, row, colspan, rowspan))
@@ -784,7 +783,7 @@ cdef class Edje(Object):
784 783
785 :rtype: bool 784 :rtype: bool
786 """ 785 """
787 if isinstance(part, unicode): part = part.encode("UTF-8") 786 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
788 return bool(edje_object_part_table_unpack(self.obj, 787 return bool(edje_object_part_table_unpack(self.obj,
789 <const_char *>part if part is not None else NULL, 788 <const_char *>part if part is not None else NULL,
790 child.obj)) 789 child.obj))
@@ -797,7 +796,7 @@ cdef class Edje(Object):
797 :rtype: tuple of int 796 :rtype: tuple of int
798 """ 797 """
799 cdef int c, r 798 cdef int c, r
800 if isinstance(part, unicode): part = part.encode("UTF-8") 799 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
801 edje_object_part_table_col_row_size_get(self.obj, 800 edje_object_part_table_col_row_size_get(self.obj,
802 <const_char *>part if part is not None else NULL, &c, &r) 801 <const_char *>part if part is not None else NULL, &c, &r)
803 return (c, r) 802 return (c, r)
@@ -812,7 +811,7 @@ cdef class Edje(Object):
812 811
813 :rtype: bool 812 :rtype: bool
814 """ 813 """
815 if isinstance(part, unicode): part = part.encode("UTF-8") 814 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
816 return bool(edje_object_part_table_clear(self.obj, 815 return bool(edje_object_part_table_clear(self.obj,
817 <const_char *>part if part is not None else NULL, clear)) 816 <const_char *>part if part is not None else NULL, clear))
818 817
@@ -826,7 +825,7 @@ cdef class Edje(Object):
826 :return: the object ath the given position 825 :return: the object ath the given position
827 :rtype: efl.evas.Object 826 :rtype: efl.evas.Object
828 """ 827 """
829 if isinstance(part, unicode): part = part.encode("UTF-8") 828 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
830 return object_from_instance(edje_object_part_table_child_get(self.obj, 829 return object_from_instance(edje_object_part_table_child_get(self.obj,
831 <const_char *>part if part is not None else NULL, row, column)) 830 <const_char *>part if part is not None else NULL, row, column))
832 831
@@ -834,14 +833,14 @@ cdef class Edje(Object):
834 ":rtype: (name, value)" 833 ":rtype: (name, value)"
835 cdef double sv 834 cdef double sv
836 cdef const_char *sn 835 cdef const_char *sn
837 if isinstance(part, unicode): part = part.encode("UTF-8") 836 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
838 sn = edje_object_part_state_get(self.obj, 837 sn = edje_object_part_state_get(self.obj,
839 <const_char *>part if part is not None else NULL, &sv) 838 <const_char *>part if part is not None else NULL, &sv)
840 return (_ctouni(sn), sv) 839 return (_ctouni(sn), sv)
841 840
842 def part_drag_dir_get(self, part): 841 def part_drag_dir_get(self, part):
843 ":rtype: int" 842 ":rtype: int"
844 if isinstance(part, unicode): part = part.encode("UTF-8") 843 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
845 return edje_object_part_drag_dir_get(self.obj, 844 return edje_object_part_drag_dir_get(self.obj,
846 <const_char *>part if part is not None else NULL) 845 <const_char *>part if part is not None else NULL)
847 846
@@ -850,14 +849,14 @@ cdef class Edje(Object):
850 :param dx: 849 :param dx:
851 :param dy: 850 :param dy:
852 """ 851 """
853 if isinstance(part, unicode): part = part.encode("UTF-8") 852 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
854 edje_object_part_drag_value_set(self.obj, 853 edje_object_part_drag_value_set(self.obj,
855 <const_char *>part if part is not None else NULL, dx, dy) 854 <const_char *>part if part is not None else NULL, dx, dy)
856 855
857 def part_drag_value_get(self, part): 856 def part_drag_value_get(self, part):
858 ":rtype: tuple of float" 857 ":rtype: tuple of float"
859 cdef double dx, dy 858 cdef double dx, dy
860 if isinstance(part, unicode): part = part.encode("UTF-8") 859 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
861 edje_object_part_drag_value_get(self.obj, 860 edje_object_part_drag_value_get(self.obj,
862 <const_char *>part if part is not None else NULL, &dx, &dy) 861 <const_char *>part if part is not None else NULL, &dx, &dy)
863 return (dx, dy) 862 return (dx, dy)
@@ -867,14 +866,14 @@ cdef class Edje(Object):
867 :param dw: 866 :param dw:
868 :param dh: 867 :param dh:
869 """ 868 """
870 if isinstance(part, unicode): part = part.encode("UTF-8") 869 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
871 edje_object_part_drag_size_set(self.obj, 870 edje_object_part_drag_size_set(self.obj,
872 <const_char *>part if part is not None else NULL, dw, dh) 871 <const_char *>part if part is not None else NULL, dw, dh)
873 872
874 def part_drag_size_get(self, part): 873 def part_drag_size_get(self, part):
875 ":rtype: tuple of float" 874 ":rtype: tuple of float"
876 cdef double dw, dh 875 cdef double dw, dh
877 if isinstance(part, unicode): part = part.encode("UTF-8") 876 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
878 edje_object_part_drag_size_get(self.obj, 877 edje_object_part_drag_size_get(self.obj,
879 <const_char *>part if part is not None else NULL, &dw, &dh) 878 <const_char *>part if part is not None else NULL, &dw, &dh)
880 return (dw, dh) 879 return (dw, dh)
@@ -884,38 +883,38 @@ cdef class Edje(Object):
884 :param dx: 883 :param dx:
885 :param dy: 884 :param dy:
886 """ 885 """
887 if isinstance(part, unicode): part = part.encode("UTF-8") 886 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
888 edje_object_part_drag_step_set(self.obj, 887 edje_object_part_drag_step_set(self.obj,
889 <const_char *>part if part is not None else NULL, dx, dy) 888 <const_char *>part if part is not None else NULL, dx, dy)
890 889
891 def part_drag_step_get(self, part): 890 def part_drag_step_get(self, part):
892 ":rtype: tuple of float" 891 ":rtype: tuple of float"
893 cdef double dx, dy 892 cdef double dx, dy
894 if isinstance(part, unicode): part = part.encode("UTF-8") 893 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
895 edje_object_part_drag_step_get(self.obj, 894 edje_object_part_drag_step_get(self.obj,
896 <const_char *>part if part is not None else NULL, &dx, &dy) 895 <const_char *>part if part is not None else NULL, &dx, &dy)
897 return (dx, dy) 896 return (dx, dy)
898 897
899 def part_drag_step(self, part, double dx, double dy): 898 def part_drag_step(self, part, double dx, double dy):
900 if isinstance(part, unicode): part = part.encode("UTF-8") 899 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
901 edje_object_part_drag_step(self.obj, 900 edje_object_part_drag_step(self.obj,
902 <const_char *>part if part is not None else NULL, dx, dy) 901 <const_char *>part if part is not None else NULL, dx, dy)
903 902
904 def part_drag_page_set(self, part, double dx, double dy): 903 def part_drag_page_set(self, part, double dx, double dy):
905 if isinstance(part, unicode): part = part.encode("UTF-8") 904 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
906 edje_object_part_drag_page_set(self.obj, 905 edje_object_part_drag_page_set(self.obj,
907 <const_char *>part if part is not None else NULL, dx, dy) 906 <const_char *>part if part is not None else NULL, dx, dy)
908 907
909 def part_drag_page_get(self, part): 908 def part_drag_page_get(self, part):
910 "@rtype: tuple of float" 909 "@rtype: tuple of float"
911 cdef double dx, dy 910 cdef double dx, dy
912 if isinstance(part, unicode): part = part.encode("UTF-8") 911 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
913 edje_object_part_drag_page_get(self.obj, 912 edje_object_part_drag_page_get(self.obj,
914 <const_char *>part if part is not None else NULL, &dx, &dy) 913 <const_char *>part if part is not None else NULL, &dx, &dy)
915 return (dx, dy) 914 return (dx, dy)
916 915
917 def part_drag_page(self, part, double dx, double dy): 916 def part_drag_page(self, part, double dx, double dy):
918 if isinstance(part, unicode): part = part.encode("UTF-8") 917 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
919 edje_object_part_drag_page(self.obj, 918 edje_object_part_drag_page(self.obj,
920 <const_char *>part if part is not None else NULL, dx, dy) 919 <const_char *>part if part is not None else NULL, dx, dy)
921 920
@@ -931,7 +930,7 @@ cdef class Edje(Object):
931 930
932 cdef void message_send_str(self, int id, data): 931 cdef void message_send_str(self, int id, data):
933 cdef Edje_Message_String m 932 cdef Edje_Message_String m
934 if isinstance(data, unicode): data = data.encode("UTF-8") 933 if isinstance(data, unicode): data = PyUnicode_AsUTF8String(data)
935 m.str = <char *>data if data is not None else NULL 934 m.str = <char *>data if data is not None else NULL
936 edje_object_message_send(self.obj, EDJE_MESSAGE_STRING, id, <void*>&m) 935 edje_object_message_send(self.obj, EDJE_MESSAGE_STRING, id, <void*>&m)
937 936
@@ -955,7 +954,7 @@ cdef class Edje(Object):
955 954
956 cdef void message_send_str_int(self, int id, s, int i): 955 cdef void message_send_str_int(self, int id, s, int i):
957 cdef Edje_Message_String_Int m 956 cdef Edje_Message_String_Int m
958 if isinstance(s, unicode): s = s.encode("UTF-8") 957 if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s)
959 m.str = <char *>s if s is not None else NULL 958 m.str = <char *>s if s is not None else NULL
960 m.val = i 959 m.val = i
961 edje_object_message_send(self.obj, EDJE_MESSAGE_STRING_INT, id, 960 edje_object_message_send(self.obj, EDJE_MESSAGE_STRING_INT, id,
@@ -963,7 +962,7 @@ cdef class Edje(Object):
963 962
964 cdef void message_send_str_float(self, int id, s, float f): 963 cdef void message_send_str_float(self, int id, s, float f):
965 cdef Edje_Message_String_Float m 964 cdef Edje_Message_String_Float m
966 if isinstance(s, unicode): s = s.encode("UTF-8") 965 if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s)
967 m.str = <char *>s if s is not None else NULL 966 m.str = <char *>s if s is not None else NULL
968 m.val = f 967 m.val = f
969 edje_object_message_send(self.obj, EDJE_MESSAGE_STRING_FLOAT, id, 968 edje_object_message_send(self.obj, EDJE_MESSAGE_STRING_FLOAT, id,
@@ -977,7 +976,7 @@ cdef class Edje(Object):
977 m = <Edje_Message_String_Int_Set*>PyMem_Malloc( 976 m = <Edje_Message_String_Int_Set*>PyMem_Malloc(
978 sizeof(Edje_Message_String_Int_Set) + (count - 1) * sizeof(int)) 977 sizeof(Edje_Message_String_Int_Set) + (count - 1) * sizeof(int))
979 978
980 if isinstance(s, unicode): s = s.encode("UTF-8") 979 if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s)
981 m.str = <char *>s if s is not None else NULL 980 m.str = <char *>s if s is not None else NULL
982 m.count = count 981 m.count = count
983 i = 0 982 i = 0
@@ -998,7 +997,7 @@ cdef class Edje(Object):
998 sizeof(Edje_Message_String_Float_Set) + 997 sizeof(Edje_Message_String_Float_Set) +
999 (count - 1) * sizeof(double)) 998 (count - 1) * sizeof(double))
1000 999
1001 if isinstance(s, unicode): s = s.encode("UTF-8") 1000 if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s)
1002 m.str = <char *>s if s is not None else NULL 1001 m.str = <char *>s if s is not None else NULL
1003 m.count = count 1002 m.count = count
1004 i = 0 1003 i = 0
@@ -1158,8 +1157,8 @@ cdef class Edje(Object):
1158 d = self._signal_callbacks.setdefault(emission, {}) 1157 d = self._signal_callbacks.setdefault(emission, {})
1159 lst = d.setdefault(source, []) 1158 lst = d.setdefault(source, [])
1160 if not lst: 1159 if not lst:
1161 if isinstance(emission, unicode): emission = emission.encode("UTF-8") 1160 if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
1162 if isinstance(source, unicode): source = source.encode("UTF-8") 1161 if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
1163 edje_object_signal_callback_add(self.obj, 1162 edje_object_signal_callback_add(self.obj,
1164 <const_char *>emission if emission is not None else NULL, 1163 <const_char *>emission if emission is not None else NULL,
1165 <const_char *>source if source is not None else NULL, 1164 <const_char *>source if source is not None else NULL,
@@ -1191,8 +1190,8 @@ cdef class Edje(Object):
1191 d.pop(source) 1190 d.pop(source)
1192 if not d: 1191 if not d:
1193 self._signal_callbacks.pop(emission) 1192 self._signal_callbacks.pop(emission)
1194 if isinstance(emission, unicode): emission = emission.encode("UTF-8") 1193 if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
1195 if isinstance(source, unicode): source = source.encode("UTF-8") 1194 if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
1196 edje_object_signal_callback_del(self.obj, 1195 edje_object_signal_callback_del(self.obj,
1197 <const_char *>emission if emission is not None else NULL, 1196 <const_char *>emission if emission is not None else NULL,
1198 <const_char *>source if source is not None else NULL, 1197 <const_char *>source if source is not None else NULL,
@@ -1200,8 +1199,8 @@ cdef class Edje(Object):
1200 1199
1201 def signal_emit(self, emission, source): 1200 def signal_emit(self, emission, source):
1202 "Emit signal with ``emission`` and ``source``" 1201 "Emit signal with ``emission`` and ``source``"
1203 if isinstance(emission, unicode): emission = emission.encode("UTF-8") 1202 if isinstance(emission, unicode): emission = PyUnicode_AsUTF8String(emission)
1204 if isinstance(source, unicode): source = source.encode("UTF-8") 1203 if isinstance(source, unicode): source = PyUnicode_AsUTF8String(source)
1205 edje_object_signal_emit(self.obj, 1204 edje_object_signal_emit(self.obj,
1206 <const_char *>emission if emission is not None else NULL, 1205 <const_char *>emission if emission is not None else NULL,
1207 <const_char *>source if source is not None else NULL) 1206 <const_char *>source if source is not None else NULL)