elm: Remove custom layout signal APIs

Desktop / Enlightenment / EFL Core Libraries - Jean-Philippe Andre [samsung.com] - 3 August 2017 22:52 UTC

This merges them with the now standard interface: Efl.Canvas.Layout_Signal

Some wrapping work was required for legacy API which takes no user_data in del() but instead returns it. The new EO function, while harder to use, is more correct (you can't delete the invalid callback by accident, and this follows EO events design).

Another crazy wrapping was done in entry/text in order to add the callbacks to 2 objects instead of just one, and still return the user data.

As for Naviframe and Popup, those two widgets override signal_emit to forward the call to another object than the resize object, but not callback_add/del. So they are definitely broken.

Ref T5315

3e5cfb8 elm: Remove custom layout signal APIs
src/lib/elementary/efl_ui_image.c | 2 +-
src/lib/elementary/efl_ui_image.eo | 2 +-
src/lib/elementary/efl_ui_text.c | 64 ++++---------
src/lib/elementary/efl_ui_text.eo | 6 +-
src/lib/elementary/elc_naviframe.c | 4 +-
src/lib/elementary/elc_popup.c | 2 +-
src/lib/elementary/elm_entry.c | 76 ++++++++-------
src/lib/elementary/elm_entry.eo | 6 +-
src/lib/elementary/elm_layout.c | 169 +++++++++++++++++++++++----------
src/lib/elementary/elm_layout.eo | 69 ++------------
src/lib/elementary/elm_layout_legacy.h | 54 +++++++++++
src/lib/elementary/elm_naviframe.eo | 2 +-
src/lib/elementary/elm_popup.eo | 2 +-
src/lib/elementary/elm_priv.h | 7 ++
src/lib/elementary/elm_widget_entry.h | 1 +
src/tests/elementary/elm_test_entry.c | 48 ++++++++++
16 files changed, 306 insertions(+), 208 deletions(-)

Upstream: git.enlightenment.org


  • Share