summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-07-13 10:28:43 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-07-14 15:22:54 +0900
commitacb1414d50dc18d7c926ccf0794fa4e8b6710420 (patch)
treeefd470b21f5898eb964f9501e659e67cdde3832e
parente8c396a6e2aae0f9da189930d0c55cd3d2500d58 (diff)
elm: try to use lambdapp for a filedevs/jpeg/lambdapp
It works, but not perfectly. GCC's CPP will remove all newlines whenever it encounters a function call. So, it can not be possible to apply a GDB breakpoint inside a lambda. Also, no line step by step is possible inside a lambda (instruction step & step in should work fine).
-rw-r--r--src/Makefile_Elementary.am22
-rw-r--r--src/lib/elementary/efl_ui_box.c15
2 files changed, 22 insertions, 15 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index c999455e32..4dcac91ceb 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -689,7 +689,6 @@ lib_elementary_libelementary_la_SOURCES = \
689 lib/elementary/els_cursor.c \ 689 lib/elementary/els_cursor.c \
690 lib/elementary/els_tooltip.c \ 690 lib/elementary/els_tooltip.c \
691 lib/elementary/elu_ews_wm.c \ 691 lib/elementary/elu_ews_wm.c \
692 lib/elementary/efl_ui_box.c \
693 lib/elementary/efl_ui_box_flow.c \ 692 lib/elementary/efl_ui_box_flow.c \
694 lib/elementary/efl_ui_box_layout.c \ 693 lib/elementary/efl_ui_box_layout.c \
695 lib/elementary/efl_ui_box_private.h \ 694 lib/elementary/efl_ui_box_private.h \
@@ -701,12 +700,8 @@ lib_elementary_libelementary_la_SOURCES = \
701 700
702 701
703lib_elementary_libelementary_la_CFLAGS = @ELEMENTARY_CFLAGS@ 702lib_elementary_libelementary_la_CFLAGS = @ELEMENTARY_CFLAGS@
704lib_elementary_libelementary_la_LIBADD = \
705@ELEMENTARY_LIBS@ \
706@LTLIBINTL@
707lib_elementary_libelementary_la_DEPENDENCIES = @ELEMENTARY_INTERNAL_LIBS@ 703lib_elementary_libelementary_la_DEPENDENCIES = @ELEMENTARY_INTERNAL_LIBS@
708lib_elementary_libelementary_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@ 704lib_elementary_libelementary_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
709
710lib_elementary_libelementary_la_CPPFLAGS = \ 705lib_elementary_libelementary_la_CPPFLAGS = \
711-DELM_INTERNAL_API_ARGESFSDFEFC=1 \ 706-DELM_INTERNAL_API_ARGESFSDFEFC=1 \
712-DMODULES_PATH=\"$(pkglibdir)/modules\" \ 707-DMODULES_PATH=\"$(pkglibdir)/modules\" \
@@ -726,6 +721,23 @@ lib_elementary_libelementary_la_CPPFLAGS = \
726-DELEMENTARY_BUILD \ 721-DELEMENTARY_BUILD \
727@ELEMENTARY_CFLAGS@ 722@ELEMENTARY_CFLAGS@
728 723
724# FIXME: I have no idea how to create a helper here
725LAMBDAPP_CFLAGS = $(lib_elementary_libelementary_la_CFLAGS)
726LAMBDAPP_CPPFLAGS = $(lib_elementary_libelementary_la_CPPFLAGS)
727
728%.lambdapp.lo: %.c
729 @echo " LAMBDACC" $@;
730 @$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) -E $(CPPFLAGS) $(LAMBDAPP_CPPFLAGS) '$<' -o $(@:.lambdapp.lo=.tmp.i)
731 @lambda-pp -x $(@:.lambdapp.lo=.tmp.i) | $(LTCOMPILE) -x cpp-output -c -o $@ -MT $@ $(LAMBDAPP_CFLAGS) $(LAMBDAPP_CPPFLAGS) -
732
733elm_lambdapp_files = lib/elementary/efl_ui_box.c
734elm_lambdapp_ltobjects = $(elm_lambdapp_files:%.c=%.lambdapp.lo)
735EXTRA_lib_elementary_libelementary_la_DEPENDENCIES = $(elm_lambdapp_ltobjects) $(elm_lambdapp_files)
736
737lib_elementary_libelementary_la_LIBADD = $(elm_lambdapp_ltobjects) \
738@ELEMENTARY_LIBS@ \
739@LTLIBINTL@
740
729if HAVE_WINDOWS 741if HAVE_WINDOWS
730lib_elementary_libelementary_la_CPPFLAGS += \ 742lib_elementary_libelementary_la_CPPFLAGS += \
731-I$(top_srcdir)/src/lib/evil \ 743-I$(top_srcdir)/src/lib/evil \
diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c
index 98b4daa6c3..ab0c99398b 100644
--- a/src/lib/elementary/efl_ui_box.c
+++ b/src/lib/elementary/efl_ui_box.c
@@ -24,15 +24,6 @@ _efl_ui_box_list_data_get(const Eina_List *list)
24} 24}
25 25
26static void 26static void
27_child_added_cb_proxy(void *data, const Eo_Event *event)
28{
29 Evas_Object *box = data;
30 Evas_Object_Box_Option *opt = event->info;
31
32 eo_event_callback_call(box, EFL_CONTAINER_EVENT_CONTENT_ADDED, opt->obj);
33}
34
35static void
36_child_removed_cb_proxy(void *data, const Eo_Event *event) 27_child_removed_cb_proxy(void *data, const Eo_Event *event)
37{ 28{
38 Evas_Object *box = data; 29 Evas_Object *box = data;
@@ -211,7 +202,11 @@ _efl_ui_box_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED
211 efl_canvas_group_add(eo_super(obj, MY_CLASS)); 202 efl_canvas_group_add(eo_super(obj, MY_CLASS));
212 elm_widget_sub_object_parent_add(obj); 203 elm_widget_sub_object_parent_add(obj);
213 204
214 eo_event_callback_add(wd->resize_obj, EVAS_BOX_EVENT_CHILD_ADDED, _child_added_cb_proxy, obj); 205#define EO_EV_LAMBDA lambda void(void *data EINA_UNUSED, const Eo_Event *ev EINA_UNUSED)
206
207 eo_event_callback_add(wd->resize_obj, EVAS_BOX_EVENT_CHILD_ADDED, EO_EV_LAMBDA {
208 eo_event_callback_call(data, EFL_CONTAINER_EVENT_CONTENT_ADDED, ((Evas_Object_Box_Option *) ev->info)->obj);
209 } , obj);
215 eo_event_callback_add(wd->resize_obj, EVAS_BOX_EVENT_CHILD_REMOVED, _child_removed_cb_proxy, obj); 210 eo_event_callback_add(wd->resize_obj, EVAS_BOX_EVENT_CHILD_REMOVED, _child_removed_cb_proxy, obj);
216 211
217 elm_widget_can_focus_set(obj, EINA_FALSE); 212 elm_widget_can_focus_set(obj, EINA_FALSE);