aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2013-12-30 14:04:57 +0200
committerKai Huuhko <kai.huuhko@gmail.com>2013-12-30 14:08:39 +0200
commit33b6053987c4f05abce242fa5ae774a02e56957e (patch)
tree754821fc6b94b77c59c5d24a5d1a448c8b5ef368
parentTests: Removed expected failure from a test that now works (diff)
downloadpython-efl-33b6053987c4f05abce242fa5ae774a02e56957e.tar.gz
Edje: Re-enable edje-edit.
-rw-r--r--doc/edje/class-edje.rst1
-rw-r--r--doc/edje/class-edje_edit.rst7
-rw-r--r--doc/edje/edje.rst1
-rw-r--r--efl/edje/efl.edje_edit.pyx16
-rw-r--r--include/efl.edje_edit.pxd126
-rwxr-xr-xsetup.py14
-rw-r--r--tests/edje/test_04_edit.py (renamed from tests/edje/disabled_test_04_edit.py)31
7 files changed, 107 insertions, 89 deletions
diff --git a/doc/edje/class-edje.rst b/doc/edje/class-edje.rst
index 3f322ae..2bca040 100644
--- a/doc/edje/class-edje.rst
+++ b/doc/edje/class-edje.rst
@@ -4,3 +4,4 @@
==============================
.. autoclass:: efl.edje.Edje
+
diff --git a/doc/edje/class-edje_edit.rst b/doc/edje/class-edje_edit.rst
new file mode 100644
index 0000000..ede8f6b
--- /dev/null
+++ b/doc/edje/class-edje_edit.rst
@@ -0,0 +1,7 @@
+.. currentmodule:: efl.edje_edit
+
+:class:`efl.edje_edit.EdjeEdit` Class
+=======================================
+
+.. autoclass:: efl.edje_edit.EdjeEdit
+ :undoc-members:
diff --git a/doc/edje/edje.rst b/doc/edje/edje.rst
index ac3f056..011a8d1 100644
--- a/doc/edje/edje.rst
+++ b/doc/edje/edje.rst
@@ -72,6 +72,7 @@ Reference
:maxdepth: 4
class-edje
+ class-edje_edit
Inheritance diagram
diff --git a/efl/edje/efl.edje_edit.pyx b/efl/edje/efl.edje_edit.pyx
index 4fcb041..77ed68a 100644
--- a/efl/edje/efl.edje_edit.pyx
+++ b/efl/edje/efl.edje_edit.pyx
@@ -17,6 +17,7 @@
from efl.utils.conversions cimport _touni, _ctouni, \
eina_list_strings_to_python_list
+from efl.eo cimport _register_decorated_callbacks
from efl.edje cimport Edje_Part_Type
from efl.edje import EDJE_PART_TYPE_EXTERNAL
@@ -30,9 +31,20 @@ EDJE_EDIT_IMAGE_COMP_LOSSY = 3
cdef class EdjeEdit(Edje):
- def __init__(self, Canvas canvas not None, **kargs):
+ def __init__(self, Canvas canvas not None, file=None, group=None, size=None,
+ geometry=None, **kwargs):
+
self._set_obj(edje_edit_object_add(canvas.obj))
- self._set_common_params(**kargs)
+ _register_decorated_callbacks(self)
+
+ if file:
+ self.file_set(file, group)
+
+ self._set_properties_from_keyword_args(kwargs)
+
+ if not size and not geometry:
+ w, h = self.size_min_get()
+ self.size_set(w, h)
# General
def compiler_get(self):
diff --git a/include/efl.edje_edit.pxd b/include/efl.edje_edit.pxd
index b9b4fc0..4bd697e 100644
--- a/include/efl.edje_edit.pxd
+++ b/include/efl.edje_edit.pxd
@@ -52,18 +52,18 @@ cdef extern from "Edje_Edit.h":
void edje_edit_print_internal_status(Evas_Object *obj)
# group
- Eina_Bool edje_edit_group_add(Evas_Object *obj, char *name)
- Eina_Bool edje_edit_group_del(Evas_Object *obj, char *group_name)
- Eina_Bool edje_edit_group_exist(Evas_Object *obj, char *group)
+ Eina_Bool edje_edit_group_add(Evas_Object *obj, const_char *name)
+ Eina_Bool edje_edit_group_del(Evas_Object *obj, const_char *group_name)
+ Eina_Bool edje_edit_group_exist(Evas_Object *obj, const_char *group)
Eina_Bool edje_edit_group_name_set(Evas_Object *obj, char *new_name)
int edje_edit_group_min_w_get(Evas_Object *obj)
- void edje_edit_group_min_w_set(Evas_Object *obj, int w)
+ Eina_Bool edje_edit_group_min_w_set(Evas_Object *obj, int w)
int edje_edit_group_min_h_get(Evas_Object *obj)
- void edje_edit_group_min_h_set(Evas_Object *obj, int h)
+ Eina_Bool edje_edit_group_min_h_set(Evas_Object *obj, int h)
int edje_edit_group_max_w_get(Evas_Object *obj)
- void edje_edit_group_max_w_set(Evas_Object *obj, int w)
+ Eina_Bool edje_edit_group_max_w_set(Evas_Object *obj, int w)
int edje_edit_group_max_h_get(Evas_Object *obj)
- void edje_edit_group_max_h_set(Evas_Object *obj, int h)
+ Eina_Bool edje_edit_group_max_h_set(Evas_Object *obj, int h)
# data
Eina_List *edje_edit_data_list_get(Evas_Object *obj)
@@ -83,13 +83,13 @@ cdef extern from "Edje_Edit.h":
# text styles
Eina_List *edje_edit_styles_list_get(Evas_Object *obj)
Eina_Bool edje_edit_style_add(Evas_Object *obj, const_char *style)
- void edje_edit_style_del(Evas_Object *obj, const_char *style)
+ Eina_Bool edje_edit_style_del(Evas_Object *obj, const_char *style)
Eina_List *edje_edit_style_tags_list_get(Evas_Object *obj, const_char *style)
const_char *edje_edit_style_tag_value_get(Evas_Object *obj, const_char *style, const_char *tag)
- void edje_edit_style_tag_value_set(Evas_Object *obj, const_char *style, const_char *tag, const_char *new_value)
- void edje_edit_style_tag_name_set(Evas_Object *obj, const_char *style, const_char *tag, const_char *new_name)
+ Eina_Bool edje_edit_style_tag_value_set(Evas_Object *obj, const_char *style, const_char *tag, const_char *new_value)
+ Eina_Bool edje_edit_style_tag_name_set(Evas_Object *obj, const_char *style, const_char *tag, const_char *new_name)
Eina_Bool edje_edit_style_tag_add(Evas_Object *obj, const_char *style, const_char *tag_name)
- void edje_edit_style_tag_del(Evas_Object *obj, const_char *style, const_char *tag)
+ Eina_Bool edje_edit_style_tag_del(Evas_Object *obj, const_char *style, const_char *tag)
# fonts
Eina_List *edje_edit_fonts_list_get(Evas_Object *obj)
@@ -115,14 +115,14 @@ cdef extern from "Edje_Edit.h":
Eina_Bool edje_edit_image_del(Evas_Object *obj, const_char *name)
Eina_Bool edje_edit_image_data_add(Evas_Object *obj, const_char *name, int id)
const_char *edje_edit_state_image_get(Evas_Object *obj, const_char *part, const_char *state, double value)
- void edje_edit_state_image_set(Evas_Object *obj, const_char *part, const_char *state, double value, const_char *image)
+ Eina_Bool edje_edit_state_image_set(Evas_Object *obj, const_char *part, const_char *state, double value, const_char *image)
int edje_edit_image_id_get(Evas_Object *obj, const_char *image_name)
Edje_Edit_Image_Comp edje_edit_image_compression_type_get(Evas_Object *obj, const_char *image)
int edje_edit_image_compression_rate_get(Evas_Object *obj, const_char *image)
void edje_edit_state_image_border_get(Evas_Object *obj, const_char *part, const_char *state, double value, int *l, int *r, int *t, int *b)
- void edje_edit_state_image_border_set(Evas_Object *obj, const_char *part, const_char *state, double value, int l, int r, int t, int b)
+ Eina_Bool edje_edit_state_image_border_set(Evas_Object *obj, const_char *part, const_char *state, double value, int l, int r, int t, int b)
unsigned char edje_edit_state_image_border_fill_get(Evas_Object *obj, const_char *part, const_char *state, double value)
- void edje_edit_state_image_border_fill_set(Evas_Object *obj, const_char *part, const_char *state, double value, unsigned char fill)
+ Eina_Bool edje_edit_state_image_border_fill_set(Evas_Object *obj, const_char *part, const_char *state, double value, unsigned char fill)
Eina_List *edje_edit_state_tweens_list_get(Evas_Object *obj, const_char *part, const_char *state, double value)
Eina_Bool edje_edit_state_tween_add(Evas_Object *obj, const_char *part, const_char *state, double value, const_char *tween)
Eina_Bool edje_edit_state_tween_del(Evas_Object *obj, const_char *part, const_char *state, double value, const_char *tween)
@@ -144,33 +144,33 @@ cdef extern from "Edje_Edit.h":
const_char *edje_edit_part_source_get(Evas_Object *obj, const_char *part)
Eina_Bool edje_edit_part_source_set(Evas_Object *obj, const_char *part, const_char *source)
Edje_Text_Effect edje_edit_part_effect_get(Evas_Object *obj, const_char *part)
- void edje_edit_part_effect_set(Evas_Object *obj, const_char *part, Edje_Text_Effect effect)
+ Eina_Bool edje_edit_part_effect_set(Evas_Object *obj, const_char *part, Edje_Text_Effect effect)
const_char *edje_edit_part_selected_state_get(Evas_Object *obj, const_char *part, double *value)
Eina_Bool edje_edit_part_selected_state_set(Evas_Object *obj, const_char *part, const_char *state, double value)
Eina_Bool edje_edit_part_mouse_events_get(Evas_Object *obj, const_char *part)
- void edje_edit_part_mouse_events_set(Evas_Object *obj, const_char *part, Eina_Bool mouse_events)
+ Eina_Bool edje_edit_part_mouse_events_set(Evas_Object *obj, const_char *part, Eina_Bool mouse_events)
Eina_Bool edje_edit_part_repeat_events_get(Evas_Object *obj, const_char *part)
- void edje_edit_part_repeat_events_set(Evas_Object *obj, const_char *part, Eina_Bool repeat_events)
+ Eina_Bool edje_edit_part_repeat_events_set(Evas_Object *obj, const_char *part, Eina_Bool repeat_events)
Evas_Event_Flags edje_edit_part_ignore_flags_get(Evas_Object *obj, const_char *part)
- void edje_edit_part_ignore_flags_set(Evas_Object *obj, const_char *part, Evas_Event_Flags ignore_flags)
- void edje_edit_part_scale_set(Evas_Object *obj, const_char *part, Eina_Bool scale)
+ Eina_Bool edje_edit_part_ignore_flags_set(Evas_Object *obj, const_char *part, Evas_Event_Flags ignore_flags)
+ Eina_Bool edje_edit_part_scale_set(Evas_Object *obj, const_char *part, Eina_Bool scale)
Eina_Bool edje_edit_part_scale_get(Evas_Object *obju, const_char *part)
int edje_edit_part_drag_x_get(Evas_Object *obj, const_char *part)
- void edje_edit_part_drag_x_set(Evas_Object *obj, const_char *part, int drag)
+ Eina_Bool edje_edit_part_drag_x_set(Evas_Object *obj, const_char *part, int drag)
int edje_edit_part_drag_y_get(Evas_Object *obj, const_char *part)
- void edje_edit_part_drag_y_set(Evas_Object *obj, const_char *part, int drag)
+ Eina_Bool edje_edit_part_drag_y_set(Evas_Object *obj, const_char *part, int drag)
int edje_edit_part_drag_step_x_get(Evas_Object *obj, const_char *part)
- void edje_edit_part_drag_step_x_set(Evas_Object *obj, const_char *part, int step)
+ Eina_Bool edje_edit_part_drag_step_x_set(Evas_Object *obj, const_char *part, int step)
int edje_edit_part_drag_step_y_get(Evas_Object *obj, const_char *part)
- void edje_edit_part_drag_step_y_set(Evas_Object *obj, const_char *part, int step)
+ Eina_Bool edje_edit_part_drag_step_y_set(Evas_Object *obj, const_char *part, int step)
int edje_edit_part_drag_count_x_get(Evas_Object *obj, const_char *part)
- void edje_edit_part_drag_count_x_set(Evas_Object *obj, const_char *part, int count)
+ Eina_Bool edje_edit_part_drag_count_x_set(Evas_Object *obj, const_char *part, int count)
int edje_edit_part_drag_count_y_get(Evas_Object *obj, const_char *part)
- void edje_edit_part_drag_count_y_set(Evas_Object *obj, const_char *part, int count)
+ Eina_Bool edje_edit_part_drag_count_y_set(Evas_Object *obj, const_char *part, int count)
const_char *edje_edit_part_drag_confine_get(Evas_Object *obj, const_char *part)
- void edje_edit_part_drag_confine_set(Evas_Object *obj, const_char *part, const_char *confine)
+ Eina_Bool edje_edit_part_drag_confine_set(Evas_Object *obj, const_char *part, const_char *confine)
const_char *edje_edit_part_drag_event_get(Evas_Object *obj, const_char *part)
- void edje_edit_part_drag_event_set(Evas_Object *obj, const_char *part, const_char *event)
+ Eina_Bool edje_edit_part_drag_event_set(Evas_Object *obj, const_char *part, const_char *event)
const_char *edje_edit_part_api_name_get(Evas_Object *obj, const_char *part)
const_char *edje_edit_part_api_description_get(Evas_Object *obj, const_char *part)
Eina_Bool edje_edit_part_api_name_set(Evas_Object *obj, const_char *part, const_char *name)
@@ -191,70 +191,70 @@ cdef extern from "Edje_Edit.h":
double edje_edit_state_rel1_relative_y_get(Evas_Object *obj, char *part, char *state, double value)
double edje_edit_state_rel2_relative_x_get(Evas_Object *obj, char *part, char *state, double value)
double edje_edit_state_rel2_relative_y_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_rel1_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
- void edje_edit_state_rel1_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double y)
- void edje_edit_state_rel2_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
- void edje_edit_state_rel2_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double y)
+ Eina_Bool edje_edit_state_rel1_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
+ Eina_Bool edje_edit_state_rel1_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double y)
+ Eina_Bool edje_edit_state_rel2_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
+ Eina_Bool edje_edit_state_rel2_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double y)
int edje_edit_state_rel1_offset_x_get(Evas_Object *obj, char *part, char *state, double value)
int edje_edit_state_rel1_offset_y_get(Evas_Object *obj, char *part, char *state, double value)
int edje_edit_state_rel2_offset_x_get(Evas_Object *obj, char *part, char *state, double value)
int edje_edit_state_rel2_offset_y_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_rel1_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
- void edje_edit_state_rel1_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y)
- void edje_edit_state_rel2_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
- void edje_edit_state_rel2_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y)
+ Eina_Bool edje_edit_state_rel1_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
+ Eina_Bool edje_edit_state_rel1_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y)
+ Eina_Bool edje_edit_state_rel2_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
+ Eina_Bool edje_edit_state_rel2_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y)
char *edje_edit_state_rel1_to_x_get(Evas_Object *obj, char *part, char *state, double value)
char *edje_edit_state_rel1_to_y_get(Evas_Object *obj, char *part, char *state, double value)
char *edje_edit_state_rel2_to_x_get(Evas_Object *obj, char *part, char *state, double value)
char *edje_edit_state_rel2_to_y_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_rel1_to_x_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to)
- void edje_edit_state_rel1_to_y_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to)
- void edje_edit_state_rel2_to_x_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to)
- void edje_edit_state_rel2_to_y_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to)
+ Eina_Bool edje_edit_state_rel1_to_x_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to)
+ Eina_Bool edje_edit_state_rel1_to_y_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to)
+ Eina_Bool edje_edit_state_rel2_to_x_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to)
+ Eina_Bool edje_edit_state_rel2_to_y_set(Evas_Object *obj, char *part, char *state, double value, char *rel_to)
void edje_edit_state_color_get(Evas_Object *obj, char *part, char *state, double value, int *r, int *g, int *b, int *a)
void edje_edit_state_color2_get(Evas_Object *obj, char *part, char *state, double value, int *r, int *g, int *b, int *a)
void edje_edit_state_color3_get(Evas_Object *obj, char *part, char *state, double value, int *r, int *g, int *b, int *a)
- void edje_edit_state_color_set(Evas_Object *obj, char *part, char *state, double value, int r, int g, int b, int a)
- void edje_edit_state_color2_set(Evas_Object *obj, char *part, char *state, double value, int r, int g, int b, int a)
- void edje_edit_state_color3_set(Evas_Object *obj, char *part, char *state, double value, int r, int g, int b, int a)
+ Eina_Bool edje_edit_state_color_set(Evas_Object *obj, char *part, char *state, double value, int r, int g, int b, int a)
+ Eina_Bool edje_edit_state_color2_set(Evas_Object *obj, char *part, char *state, double value, int r, int g, int b, int a)
+ Eina_Bool edje_edit_state_color3_set(Evas_Object *obj, char *part, char *state, double value, int r, int g, int b, int a)
double edje_edit_state_align_x_get(Evas_Object *obj, char *part, char *state, double value)
double edje_edit_state_align_y_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_align_x_set(Evas_Object *obj, char *part, char *state, double value, double align)
- void edje_edit_state_align_y_set(Evas_Object *obj, char *part, char *state, double value, double align)
+ Eina_Bool edje_edit_state_align_x_set(Evas_Object *obj, char *part, char *state, double value, double align)
+ Eina_Bool edje_edit_state_align_y_set(Evas_Object *obj, char *part, char *state, double value, double align)
int edje_edit_state_min_w_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_min_w_set(Evas_Object *obj, char *part, char *state, double value, int min_w)
+ Eina_Bool edje_edit_state_min_w_set(Evas_Object *obj, char *part, char *state, double value, int min_w)
int edje_edit_state_min_h_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_min_h_set(Evas_Object *obj, char *part, char *state, double value, int min_h)
+ Eina_Bool edje_edit_state_min_h_set(Evas_Object *obj, char *part, char *state, double value, int min_h)
int edje_edit_state_max_w_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_max_w_set(Evas_Object *obj, char *part, char *state, double value, int max_w)
+ Eina_Bool edje_edit_state_max_w_set(Evas_Object *obj, char *part, char *state, double value, int max_w)
int edje_edit_state_max_h_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_max_h_set(Evas_Object *obj, char *part, char *state, double value, int max_h)
+ Eina_Bool edje_edit_state_max_h_set(Evas_Object *obj, char *part, char *state, double value, int max_h)
double edje_edit_state_aspect_min_get(Evas_Object *obj, char *part, char *state, double value)
double edje_edit_state_aspect_max_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_aspect_min_set(Evas_Object *obj, char *part, char *state, double value, double aspect)
- void edje_edit_state_aspect_max_set(Evas_Object *obj, char *part, char *state, double value, double aspect)
+ Eina_Bool edje_edit_state_aspect_min_set(Evas_Object *obj, char *part, char *state, double value, double aspect)
+ Eina_Bool edje_edit_state_aspect_max_set(Evas_Object *obj, char *part, char *state, double value, double aspect)
unsigned char edje_edit_state_aspect_pref_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_aspect_pref_set(Evas_Object *obj, char *part, char *state, double value, unsigned char pref)
+ Eina_Bool edje_edit_state_aspect_pref_set(Evas_Object *obj, char *part, char *state, double value, unsigned char pref)
double edje_edit_state_fill_origin_relative_x_get(Evas_Object *obj, char *part, char *state, double value)
double edje_edit_state_fill_origin_relative_y_get(Evas_Object *obj, char *part, char *state, double value)
int edje_edit_state_fill_origin_offset_x_get(Evas_Object *obj, char *part, char *state, double value)
int edje_edit_state_fill_origin_offset_y_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_fill_origin_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
- void edje_edit_state_fill_origin_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double x)
- void edje_edit_state_fill_origin_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
- void edje_edit_state_fill_origin_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y)
+ Eina_Bool edje_edit_state_fill_origin_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
+ Eina_Bool edje_edit_state_fill_origin_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double x)
+ Eina_Bool edje_edit_state_fill_origin_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
+ Eina_Bool edje_edit_state_fill_origin_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y)
double edje_edit_state_fill_size_relative_x_get(Evas_Object *obj, char *part, char *state, double value)
double edje_edit_state_fill_size_relative_y_get(Evas_Object *obj, char *part, char *state, double value)
int edje_edit_state_fill_size_offset_x_get(Evas_Object *obj, char *part, char *state, double value)
int edje_edit_state_fill_size_offset_y_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_fill_size_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
- void edje_edit_state_fill_size_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double x)
- void edje_edit_state_fill_size_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
- void edje_edit_state_fill_size_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y)
+ Eina_Bool edje_edit_state_fill_size_relative_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
+ Eina_Bool edje_edit_state_fill_size_relative_y_set(Evas_Object *obj, char *part, char *state, double value, double x)
+ Eina_Bool edje_edit_state_fill_size_offset_x_set(Evas_Object *obj, char *part, char *state, double value, double x)
+ Eina_Bool edje_edit_state_fill_size_offset_y_set(Evas_Object *obj, char *part, char *state, double value, double y)
Eina_Bool edje_edit_state_visible_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_visible_set(Evas_Object *obj, char *part, char *state, double value, Eina_Bool visible)
+ Eina_Bool edje_edit_state_visible_set(Evas_Object *obj, char *part, char *state, double value, Eina_Bool visible)
char *edje_edit_state_color_class_get(Evas_Object *obj, char *part, char *state, double value)
- void edje_edit_state_color_class_set(Evas_Object *obj, char *part, char *state, double value, char *color_class)
+ Eina_Bool edje_edit_state_color_class_set(Evas_Object *obj, char *part, char *state, double value, char *color_class)
# Eina_List * edje_edit_state_external_params_list_get(Evas_Object *obj, char *part, char *state, double value)
# Eina_Bool edje_edit_state_external_param_get(Evas_Object *obj, char *part, char *state, double value, char *param, edje.c_edje.Edje_External_Param_Type *type, void **val)
@@ -313,9 +313,9 @@ cdef extern from "Edje_Edit.h":
# scripts
char* edje_edit_script_get(Evas_Object *obj)
- void edje_edit_script_set(Evas_Object *obj, const_char *code)
+ Eina_Bool edje_edit_script_set(Evas_Object *obj, const_char *code)
char* edje_edit_script_program_get(Evas_Object *obj, const_char *prog)
- void edje_edit_script_program_set(Evas_Object *obj, const_char *prog, const_char *code)
+ Eina_Bool edje_edit_script_program_set(Evas_Object *obj, const_char *prog, const_char *code)
Eina_Bool edje_edit_script_compile(Evas_Object *obj)
const_Eina_List *edje_edit_script_error_list_get(Evas_Object *obj)
diff --git a/setup.py b/setup.py
index d6f71ac..bb9b58b 100755
--- a/setup.py
+++ b/setup.py
@@ -210,13 +210,13 @@ if set(("build", "build_ext", "install", "bdist", "sdist")) & set(sys.argv):
packages.append("edje")
package_dirs["edje"] = "compat/edje"
- # === Edje_Edit ===
- # edje_edit_ext = Extension("edje_edit", ["efl/edje/efl.edje_edit"+module_suffix],
- # define_macros = [('EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT', None)],
- # include_dirs = ['include/'],
- # extra_compile_args = edje_cflags,
- # extra_link_args = edje_libs + eina_libs + evas_libs)
- # modules.append(edje_edit_ext)
+ # --- Edje_Edit ---
+ edje_edit_ext = Extension("edje_edit", ["efl/edje/efl.edje_edit"+module_suffix],
+ define_macros = [('EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT', None)],
+ include_dirs = ['include/'],
+ extra_compile_args = edje_cflags,
+ extra_link_args = edje_libs + eina_libs + evas_libs)
+ modules.append(edje_edit_ext)
# Emotion
diff --git a/tests/edje/disabled_test_04_edit.py b/tests/edje/test_04_edit.py
index 7ee2543..ce89d5b 100644
--- a/tests/edje/disabled_test_04_edit.py
+++ b/tests/edje/test_04_edit.py
@@ -78,7 +78,7 @@ class TestEdjeEditGeneral(unittest.TestCase):
def testGroupDel(self):
self.o.group_add("test_new_group2")
self.o.group_del("test_new_group2")
- self.assertFalse(o.group_exist("test_new_group2"))
+ self.assertFalse(self.o.group_exist("test_new_group2"))
def testData(self):
self.assertIn("key1", self.o.data)
@@ -98,8 +98,8 @@ class TestEdjeEditGeneral(unittest.TestCase):
self.o.data_rename("key5", "key55")
self.assertEqual(self.o.data_get("key55"), "value5")
- # self.o.data_del("key44") # FIXME this crash badly
- # self.assertNotIn("key44", self.o.data)
+ self.o.data_del("key44") # FIXME this crash badly
+ self.assertNotIn("key44", self.o.data)
def testGroupData(self):
self.assertIn("key3", self.o.group_data)
@@ -218,7 +218,6 @@ class TestEdjeEditParts(unittest.TestCase):
p.rename("rect")
self.assertEqual(p.name, "rect")
- @unittest.skip("segfault") # FIXME
def testPartAdd(self):
self.o.part_add("new_part", EDJE_PART_TYPE_RECTANGLE)
self.assertTrue(self.o.part_exist("new_part"))
@@ -227,13 +226,11 @@ class TestEdjeEditParts(unittest.TestCase):
p = self.o.part_get("new_part")
self.assertIsInstance(p, Part)
- @unittest.skip("part_del() crash") # TODO FIXME
def testPartDel(self):
self.assertTrue(self.o.part_exist("rect"))
self.o.part_del("rect")
self.assertFalse(self.o.part_exist("rect"))
- @unittest.skip("cause segfault") # TODO FIXME
def testPartStacking(self):
# print(self.o.parts)
p = self.o.part_get("rect")
@@ -245,7 +242,6 @@ class TestEdjeEditParts(unittest.TestCase):
self.assertEqual(p.below_get(), "bg")
self.assertEqual(p.above_get(), "label")
- @unittest.skip("cause segfault") # TODO FIXME
def testPartClip(self):
p = self.o.part_get("edit_test")
self.assertEqual(p.clip_to, "test_clip")
@@ -268,6 +264,7 @@ class TestEdjeEditParts(unittest.TestCase):
p.repeat_events = True
self.assertEqual(p.repeat_events, True)
+ @unittest.expectedFailure
def testPartEffect(self):
p = self.o.part_get("edit_test")
self.assertEqual(p.effect, 18)
@@ -403,7 +400,7 @@ class TestEdjeEditPrograms(unittest.TestCase):
p.targets_clear()
self.assertEqual(p.targets_get(), [])
- @unittest.skip("Program.after_add() does not work")
+ #@unittest.skip("Program.after_add() does not work")
def testProgramAfters(self):
p = self.o.program_get("prog1")
self.assertEqual(p.afters_get(), ["prog2", "prog3"])
@@ -429,7 +426,7 @@ class TestEdjeEditPrograms(unittest.TestCase):
p.api = ("new_name", "new_desc")
self.assertEqual(p.api, ("new_name", "new_desc"))
- @unittest.skip("Program.script does not work")
+ #@unittest.skip("Program.script does not work")
def testProgramScript(self):
p = self.o.program_get("emit_back_message")
print(p.script)
@@ -449,7 +446,7 @@ class TestEdjeEditPartStates(unittest.TestCase):
self.canvas.delete()
os.remove(theme_file)
- @unittest.skip("segfault") # FIXME
+ #@unittest.skip("segfault") # FIXME
def testPartStates(self):
p = self.o.part_get("edit_test")
self.assertEqual(p.states, ["default 0.00","state1 0.00","state2 0.00","state2 0.10"])
@@ -459,24 +456,24 @@ class TestEdjeEditPartStates(unittest.TestCase):
self.assertEqual(p.states, ["default 0.00","state1 0.00","state2 0.00","state2 0.10","state9 0.10"])
# state_selected TODO FIXME state_selected_set does not work
- # self.assertEqual(p.state_selected_get(), ("default", 0.0))
- # p.state_selected_set("state2", 0.1)
- # self.assertEqual(p.state_selected_get(), ("state2", 0.1))
+ self.assertEqual(p.state_selected_get(), ("default", 0.0))
+ p.state_selected_set("state2", 0.1)
+ self.assertEqual(p.state_selected_get(), ("state2", 0.1))
# state del() TODO FIXME state_del does not work
- # p.state_del("state9", 0.1)
- # self.assertEqual(p.states, ["default 0.00","state1 0.00","state2 0.00","state2 0.10"])
+ p.state_del("state9", 0.1)
+ self.assertEqual(p.states, ["default 0.00","state1 0.00","state2 0.00","state2 0.10"])
# TODO test state_copy
- @unittest.skip("state_exist does not work") # TODO FIXME
+ #@unittest.skip("state_exist does not work") # TODO FIXME
def testPartStateExist(self):
p = self.o.part_get("edit_test")
self.assertFalse(p.state_exist("stateNOTEXISTS", 0.1))
self.assertTrue(p.state_exist("state1", 0.0))
self.assertTrue(p.state_exist("state2", 0.1))
- @unittest.skip("PartState does not work") # TODO FIXME
+ #@unittest.skip("PartState does not work") # TODO FIXME
def testPartStateProps(self):
p = self.o.part_get("edit_test")
s = p.state_get("state1", 0.0)