edje: Return "" as state for invalid parts

Instead of "default". This is consistent with legacy, and allows for
some kind of error checking. Not returning NULL helps avoiding crashes.
This commit is contained in:
Jean-Philippe Andre 2018-01-18 13:54:56 +09:00
parent 4d32334f21
commit 8abf43b373
2 changed files with 5 additions and 4 deletions

View File

@ -27,7 +27,7 @@ _edje_part_invalid_call(Eo *proxy, const char *function)
EOLIAN static void
_efl_canvas_layout_part_invalid_efl_canvas_layout_part_state_get(Eo *proxy, void *_pd EINA_UNUSED, const char **state, double *val)
{
if (state) *state = "default";
if (state) *state = "";
if (val) *val = 0.0;
}

View File

@ -17,12 +17,13 @@ class Efl.Canvas.Layout.Part (Efl.Object, Efl.Gfx, Efl.Ui.Drag)
This is the state name as it appears in EDC description blocks. A
state has both a name and a value (double). The default state is
"default" 0.0.
"default" 0.0, but this function will return "" if the part is
invalid.
]]
get {}
values {
state: string("default"); [[The name of the state.]]
val: double; [[The value of the state.]]
state: string(""); [[The name of the state.]]
val: double(0.0); [[The value of the state.]]
}
}
@property part_type {