support enums from evas

This commit is contained in:
Davide Andreoli 2015-02-01 13:13:08 +01:00
parent 2e7ae199ad
commit 3c76ede01e
2 changed files with 8 additions and 3 deletions

View File

@ -233,10 +233,14 @@ def _params_list_parse(mod, params):
def _param_parse(mod, p_value):
if isinstance(p_value, basestring):
enum_val = None
if p_value.startswith('ELM_'):
enum_val = getattr(mod, p_value, None)
if enum_val is not None:
return enum_val
elif p_value.startswith('EVAS_'):
from efl import evas
enum_val = getattr(evas, p_value, None)
if enum_val is not None:
return enum_val
return p_value

View File

@ -509,7 +509,8 @@
"Evas.Object.size_hint_weight":[1, 1],
"Evas.Object.visibility":[true],
"Evas.Object.size":[73, 30],
"Elm_Widget.part_text":[null, "<- pyefl"]
"Elm_Widget.part_text":[null, "<- pyefl"],
"Evas.Object.size_hint_aspect":["EVAS_ASPECT_CONTROL_BOTH", 1, 1]
},
"Callbacks":
{