Re: [E-devel] [EGIT] [core/elementary] master 01/01: map: Add missing legacy API into legacy header
Hi Tae-Hwan, I don't think it is the good fix. The .eo file should describe this function, so Eolian could generate the legacy header for free. Well, I have to admit I may have forgot this function during the porting :-) D2, alias me. On 07/22/2014 08:35 AM, Tae-Hwan Kim wrote: raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=cfdaffb8cf65ab0a934de2efb513e66989b4bad6 commit cfdaffb8cf65ab0a934de2efb513e66989b4bad6 Author: Tae-Hwan Kim the81@samsung.com Date: Tue Jul 22 14:14:34 2014 +0900 map: Add missing legacy API into legacy header Summary: @fix Reviewers: raster Reviewed By: raster Differential Revision: https://phab.enlightenment.org/D1164 --- src/lib/elm_map_legacy.h | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_map_legacy.h b/src/lib/elm_map_legacy.h index ca34589..4c7aff2 100644 --- a/src/lib/elm_map_legacy.h +++ b/src/lib/elm_map_legacy.h @@ -10,4 +10,22 @@ */ EAPI Evas_Object *elm_map_add(Evas_Object *parent); -#include elm_map.eo.legacy.h \ No newline at end of file +/** + * @internal + * + * @brief Requests a list of addresses corresponding to a given name. + * + * @since 1.8 + * + * @remarks This is used if you want to search the address from a name. + * + * @param obj The map object + * @param address The address + * @param name_cb The callback function + * @param data The user callback data + * + * @ingroup Map + */ +EAPI void elm_map_name_search(const Evas_Object *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data); + +#include elm_map.eo.legacy.h -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/elementary] master 01/01: genlist : Add item looping on flag.
raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=658138ff2bd7b7a6b3147105639789809ea8a71b commit 658138ff2bd7b7a6b3147105639789809ea8a71b Author: Hosang Kim hosang12@samsung.com Date: Tue Jul 22 15:11:17 2014 +0900 genlist : Add item looping on flag. Summary: When item looping feature is on and press up or down key, screen seems to be frozen. Test Plan: elementary_test -to genlist focus - click item looing enable - move list up and down Reviewers: anand.km, seoz, woohyun Subscribers: singh.amitesh Differential Revision: https://phab.enlightenment.org/D1193 --- src/lib/elm_genlist.c| 22 +++--- src/lib/elm_list.c | 40 +++- src/lib/elm_widget_genlist.h | 1 + src/lib/elm_widget_list.h| 1 + 4 files changed, 56 insertions(+), 8 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 7857d37..e874dc7 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -2636,14 +2636,20 @@ _key_action_move_dir(Evas_Object *obj, Elm_Focus_Direction dir, Eina_Bool multi) focus_only = _elm_config-item_select_on_focus_disable elm_widget_focus_highlight_enabled_get(obj); // handle item loop feature - if (sd-item_loop_enable) + if (sd-item_loop_enable !sd-item_looping_on) { if (min v) { if (dir == ELM_FOCUS_UP) - elm_layout_signal_emit(obj, elm,action,looping,up, elm); + { + elm_layout_signal_emit(obj, elm,action,looping,up, elm); + sd-item_looping_on = EINA_TRUE; + } else if (dir == ELM_FOCUS_DOWN) - elm_layout_signal_emit(obj, elm,action,looping,down, elm); + { + elm_layout_signal_emit(obj, elm,action,looping,down, elm); + sd-item_looping_on = EINA_TRUE; + } } else { @@ -2659,6 +2665,8 @@ _key_action_move_dir(Evas_Object *obj, Elm_Focus_Direction dir, Eina_Bool multi) } return EINA_TRUE; } + else if (sd-item_looping_on) + return EINA_TRUE; return EINA_FALSE; } @@ -5185,12 +5193,16 @@ _elm_genlist_looping_up_cb(void *data, const char *source EINA_UNUSED) { Evas_Object *genlist = data; + + ELM_GENLIST_DATA_GET(genlist, sd); + Elm_Object_Item *it = elm_genlist_last_item_get(genlist); if (!_elm_config-item_select_on_focus_disable) elm_genlist_item_selected_set(it, EINA_TRUE); else elm_object_item_focus_set(it, EINA_TRUE); elm_layout_signal_emit(genlist, elm,action,looping,up,end, elm); + sd-item_looping_on = EINA_FALSE; } static void @@ -5200,12 +5212,16 @@ _elm_genlist_looping_down_cb(void *data, const char *source EINA_UNUSED) { Evas_Object *genlist = data; + + ELM_GENLIST_DATA_GET(genlist, sd); + Elm_Object_Item *it = elm_genlist_first_item_get(genlist); if (!_elm_config-item_select_on_focus_disable) elm_genlist_item_selected_set(it, EINA_TRUE); else elm_object_item_focus_set(it, EINA_TRUE); elm_layout_signal_emit(genlist, elm,action,looping,down,end, elm); + sd-item_looping_on = EINA_FALSE; } diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index fa9c03a..bf20b91 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -392,18 +392,30 @@ _elm_list_elm_widget_event_direction(Evas_Object *obj, Elm_Focus_Direction dir, return EINA_TRUE; // handle item loop feature - if (sd-item_loop_enable) + if (sd-item_loop_enable !sd-item_looping_on) { if (min v) { if (dir == ELM_FOCUS_LEFT) - elm_layout_signal_emit(obj, elm,action,looping,left, elm); + { + elm_layout_signal_emit(obj, elm,action,looping,left, elm); + sd-item_looping_on = EINA_TRUE; + } else if (dir == ELM_FOCUS_RIGHT) - elm_layout_signal_emit(obj, elm,action,looping,right, elm); + { + elm_layout_signal_emit(obj, elm,action,looping,right, elm); + sd-item_looping_on = EINA_TRUE; + } else if (dir == ELM_FOCUS_UP) - elm_layout_signal_emit(obj, elm,action,looping,up, elm); + { + elm_layout_signal_emit(obj, elm,action,looping,up, elm); + sd-item_looping_on = EINA_TRUE; + } else if (dir == ELM_FOCUS_DOWN) - elm_layout_signal_emit(obj, elm,action,looping,down, elm); + { + elm_layout_signal_emit(obj, elm,action,looping,down, elm); + sd-item_looping_on = EINA_TRUE; + } } else { @@ -419,6 +431,8 @@
[EGIT] [core/elementary] master 01/01: add ignore for generated .hh eo files
raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0d014c0dd42d65a5e72eb31b2a53f8fe270d38ed commit 0d014c0dd42d65a5e72eb31b2a53f8fe270d38ed Author: Carsten Haitzler (Rasterman) ras...@rasterman.com Date: Tue Jul 22 15:54:44 2014 +0900 add ignore for generated .hh eo files --- src/lib/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/.gitignore b/src/lib/.gitignore index df1edf6..a7d7449 100644 --- a/src/lib/.gitignore +++ b/src/lib/.gitignore @@ -3,3 +3,4 @@ /*.eo.c /*.eo.h /*.eo.legacy.h +/*.eo.hh --
[EGIT] [core/elementary] master 01/01: genlist: Focus highlight when loop is enable
raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=91282a22cba66ee5e7799018d3abe8957fb1b1fa commit 91282a22cba66ee5e7799018d3abe8957fb1b1fa Author: Anand anand...@samsung.com Date: Tue Jul 22 15:56:16 2014 +0900 genlist: Focus highlight when loop is enable Summary: This patch is dependent on D1193 and D1136. It will be pushed after D1193 and D1136 patch. Reviewers: singh.amitesh Differential Revision: https://phab.enlightenment.org/D1168 Conflicts: src/lib/elm_genlist.c --- data/themes/edc/elm/focus.edc | 105 -- src/lib/elm_genlist.c | 69 +-- 2 files changed, 145 insertions(+), 29 deletions(-) diff --git a/data/themes/edc/elm/focus.edc b/data/themes/edc/elm/focus.edc index 19d78cd..37a08b2 100644 --- a/data/themes/edc/elm/focus.edc +++ b/data/themes/edc/elm/focus.edc @@ -5,7 +5,7 @@ group { name: elm/focus_highlight/top/default; script { public s_x, s_y, s_w, s_h; /* source */ public difx, dify, difw, difh; - + public animator1(val, Float:pos) { new x, y, w, h, dx, dy, dw, dh, Float:p; p = 1.0 - ((1.0 - pos) * (1.0 - pos) * (1.0 - pos)); @@ -19,16 +19,16 @@ group { name: elm/focus_highlight/top/default; h = get_int(s_h) + dh; update_offset(x, y, w, h); } - + public update_offset(x, y, w, h) { set_state_val(PART:base, STATE_REL1_OFFSET, x, y); set_state_val(PART:base, STATE_REL2_OFFSET, x + w, y + h); } - + public message(Msg_Type:type, id, ...) { if ((type == MSG_INT_SET) (id == 1)) { new x1, y1, w1, h1, x2, y2, w2, h2; - + x1 = getarg(2); y1 = getarg(3); w1 = getarg(4); @@ -37,7 +37,7 @@ group { name: elm/focus_highlight/top/default; y2 = getarg(7); w2 = getarg(8); h2 = getarg(9); - + set_int(s_x, x1); set_int(s_y, y1); set_int(s_w, w1); @@ -46,31 +46,56 @@ group { name: elm/focus_highlight/top/default; set_int(dify, y2 - y1); set_int(difw, w2 - w1); set_int(difh, h2 - h1); - + custom_state(PART:base, default, 0.0); set_state_val(PART:base, STATE_REL1, 0.0, 0.0); set_state_val(PART:base, STATE_REL2, 0.0, 0.0); update_offset(x1, y1, w1, h1); set_state(PART:base, custom, 0.0); - + anim(0.2, animator1, 1); } } } parts { - part { name: base; type: SPACER; + part { name: base; type: RECT; + clip_to: clip; description { state: default 0.0; +visible: 0; + } + description { state: move_down 0.0; +inherit: default 0.0; +rel1.relative: 0 1; +rel2.relative: 1 2; + } + description { state: move_up 0.0; +inherit: default 0.0; +rel1.relative: 0 -1; +rel2.relative: 1 0; } } part { name: clip; type: RECT; - description { state: default 0.0; -rel1.to: glow; -rel2.to: glow; -color: 255 255 255 0; + scale: 1; + description { +state: default 0.0; +color: 255 255 255 255; +rel1.relative: -1 -1; +rel2.relative: 2 2; + } + description { state: move_down 0.0; +inherit: default 0.0; +color: 0 0 0 0; + } + description { state: move_up 0.0; +inherit: default 0.0; +color: 0 0 0 0 ; } description { state: visible 0.0; inherit: default 0.0; -color: 255 255 255 255; + } + description { state: invisible 0.0; +inherit: default 0.0; +color: 255 255 255 0; } } part { name: glow; mouse_events: 0; @@ -121,7 +146,7 @@ group { name: elm/focus_highlight/top/default; } program { signal: elm,action,focus,hide; source: elm; - action: STATE_SET default 0.0; + action: STATE_SET invisible 0.0; transition: DECELERATE 0.4; target: clip; after: stop2; @@ -153,5 +178,57 @@ group { name: elm/focus_highlight/top/default; action: STATE_SET default 0.0; target: base; } + program { name: move_down; + signal: elm,action,focus,move,down; + source: elm; + transition: LIN 0.3; + action: STATE_SET move_down 0.0; + target: base; + target: clip; + after: move_down_end; + } + program { name: move_down_end; + action: SIGNAL_EMIT elm,focus,move,down,end elm; + } + program { name: move_up; +
[EGIT] [core/elementary] master 01/01: autotools: Fixed 'make check' for elm++ example.
savio pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=72ac26c1dacbc4ea32edd45406e3605951ef61ad commit 72ac26c1dacbc4ea32edd45406e3605951ef61ad Author: Savio Sena savio.s...@acm.org Date: Tue Jul 22 04:40:22 2014 -0300 autotools: Fixed 'make check' for elm++ example. Shouldn't pass -fPIC explicitly. Autoconf should be able to determine that. --- src/examples/Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am index 5088341..020f334 100644 --- a/src/examples/Makefile.am +++ b/src/examples/Makefile.am @@ -303,7 +303,7 @@ efl_thread_4_SOURCES = efl_thread_4.c endif box_cxx_example_02_SOURCES = box_cxx_example_02.cc -box_cxx_example_02_CXXFLAGS = -fPIC \ +box_cxx_example_02_CXXFLAGS = \ @ELEMENTARY_ELOCATION_CFLAGS@ \ @ELEMENTARY_EWEATHER_CFLAGS@ \ @ELEMENTARY_EMAP_CFLAGS@ \ @@ -311,8 +311,6 @@ box_cxx_example_02_CXXFLAGS = -fPIC \ @ELEMENTARY_CFLAGS@ \ @ELEMENTARY_CXX_CFLAGS@ -box_cxx_example_02_LDFLAGS = -fPIC - # This variable will hold the list of screenshots that will be made # by make screenshots. Each item in the list is of the form: # example executable:screenshot filename:delay in seconds --
[E-devel] Elm build break with enabled c++ bindings
Hi, I'm getting following errors when trying to build elementary with default configure options. With '--disable-c++11' it builds well. Could someone take a look? BR, LS CC libelementary_la-els_box.lo CC libelementary_la-els_cursor.lo CC libelementary_la-els_tooltip.lo CC libelementary_la-elu_ews_wm.lo EOLCXX elm_widget.eo.hh ERR24659:eo_lexer /usr/local/share/eolian/include/edje-1/edje.eo:183 () '(' expected at column 19 near 'char' const char *file; /*@ The path to the EDJ file to load @p from */ ^ ERR24659:blackeolian_cxx bin/eolian_cxx/eolian_cxx.cc:217 database_load() Eolian failed parsing input files eolian_cxx: bin/eolian_cxx/eolian_cxx.cc:219: void eolian_cxx::database_load(const eolian_cxx::options_type): Assertion `false Error parsing input files' failed. EOLCXX elm_container.eo.hh ERR24666:eo_lexer /usr/local/share/eolian/include/edje-1/edje.eo:183 () '(' expected at column 19 near 'char' const char *file; /*@ The path to the EDJ file to load @p from */ ^ ERR24666:blackeolian_cxx bin/eolian_cxx/eolian_cxx.cc:217 database_load() Eolian failed parsing input files eolian_cxx: bin/eolian_cxx/eolian_cxx.cc:219: void eolian_cxx::database_load(const eolian_cxx::options_type): Assertion `false Error parsing input files' failed. EOLCXX elm_layout.eo.hh EOLCXX elm_interface_scrollable.eo.hh /bin/bash: line 1: 24659 Przerwane (core dumped) /usr/local/bin/eolian_cxx -I/usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1 -I/usr/local/share/eolian/include/ecore-1 -I../../src/lib -o elm_widget.eo.hh elm_widget.eo make[4]: *** [elm_widget.eo.hh] Błąd 134 make[4]: *** Oczekiwanie na niezakończone zadania ERR24673:eo_lexer /usr/local/share/eolian/include/edje-1/edje.eo:183 () '(' expected at column 19 near 'char' const char *file; /*@ The path to the EDJ file to load @p from */ ^ ERR24673:blackeolian_cxx bin/eolian_cxx/eolian_cxx.cc:217 database_load() Eolian failed parsing input files eolian_cxx: bin/eolian_cxx/eolian_cxx.cc:219: void eolian_cxx::database_load(const eolian_cxx::options_type): Assertion `false Error parsing input files' failed. ERR24678:eo_lexer /usr/local/share/eolian/include/edje-1/edje.eo:183 () '(' expected at column 19 near 'char' const char *file; /*@ The path to the EDJ file to load @p from */ ^ ERR24678:blackeolian_cxx bin/eolian_cxx/eolian_cxx.cc:217 database_load() Eolian failed parsing input files eolian_cxx: bin/eolian_cxx/eolian_cxx.cc:219: void eolian_cxx::database_load(const eolian_cxx::options_type): Assertion `false Error parsing input files' failed. /bin/bash: line 1: 24666 Przerwane (core dumped) /usr/local/bin/eolian_cxx -I/usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1 -I/usr/local/share/eolian/include/ecore-1 -I../../src/lib -o elm_container.eo.hh elm_container.eo make[4]: *** [elm_container.eo.hh] Błąd 134 /bin/bash: line 1: 24673 Przerwane (core dumped) /usr/local/bin/eolian_cxx -I/usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1 -I/usr/local/share/eolian/include/ecore-1 -I../../src/lib -o elm_layout.eo.hh elm_layout.eo make[4]: *** [elm_layout.eo.hh] Błąd 134 /bin/bash: line 1: 24678 Przerwane (core dumped) /usr/local/bin/eolian_cxx -I/usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1 -I/usr/local/share/eolian/include/ecore-1 -I../../src/lib -o elm_interface_scrollable.eo.hh elm_interface_scrollable.eo -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Elm build break with enabled c++ bindings
Hi Lukasz, edje.eo is an old file stayed in your install directory. The syntax has changed so the parser fails on the previous format. You may try to remove the .eo files from there and recompile. D2, alias JackDanielZ On 07/22/2014 11:06 AM, Lukasz Stanislawski wrote: Hi, I'm getting following errors when trying to build elementary with default configure options. With '--disable-c++11' it builds well. Could someone take a look? BR, LS CC libelementary_la-els_box.lo CC libelementary_la-els_cursor.lo CC libelementary_la-els_tooltip.lo CC libelementary_la-elu_ews_wm.lo EOLCXX elm_widget.eo.hh ERR24659:eo_lexer /usr/local/share/eolian/include/edje-1/edje.eo:183 () '(' expected at column 19 near 'char' const char *file; /*@ The path to the EDJ file to load @p from */ ^ ERR24659:blackeolian_cxx bin/eolian_cxx/eolian_cxx.cc:217 database_load() Eolian failed parsing input files eolian_cxx: bin/eolian_cxx/eolian_cxx.cc:219: void eolian_cxx::database_load(const eolian_cxx::options_type): Assertion `false Error parsing input files' failed. EOLCXX elm_container.eo.hh ERR24666:eo_lexer /usr/local/share/eolian/include/edje-1/edje.eo:183 () '(' expected at column 19 near 'char' const char *file; /*@ The path to the EDJ file to load @p from */ ^ ERR24666:blackeolian_cxx bin/eolian_cxx/eolian_cxx.cc:217 database_load() Eolian failed parsing input files eolian_cxx: bin/eolian_cxx/eolian_cxx.cc:219: void eolian_cxx::database_load(const eolian_cxx::options_type): Assertion `false Error parsing input files' failed. EOLCXX elm_layout.eo.hh EOLCXX elm_interface_scrollable.eo.hh /bin/bash: line 1: 24659 Przerwane (core dumped) /usr/local/bin/eolian_cxx -I/usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1 -I/usr/local/share/eolian/include/ecore-1 -I../../src/lib -o elm_widget.eo.hh elm_widget.eo make[4]: *** [elm_widget.eo.hh] Błąd 134 make[4]: *** Oczekiwanie na niezakończone zadania ERR24673:eo_lexer /usr/local/share/eolian/include/edje-1/edje.eo:183 () '(' expected at column 19 near 'char' const char *file; /*@ The path to the EDJ file to load @p from */ ^ ERR24673:blackeolian_cxx bin/eolian_cxx/eolian_cxx.cc:217 database_load() Eolian failed parsing input files eolian_cxx: bin/eolian_cxx/eolian_cxx.cc:219: void eolian_cxx::database_load(const eolian_cxx::options_type): Assertion `false Error parsing input files' failed. ERR24678:eo_lexer /usr/local/share/eolian/include/edje-1/edje.eo:183 () '(' expected at column 19 near 'char' const char *file; /*@ The path to the EDJ file to load @p from */ ^ ERR24678:blackeolian_cxx bin/eolian_cxx/eolian_cxx.cc:217 database_load() Eolian failed parsing input files eolian_cxx: bin/eolian_cxx/eolian_cxx.cc:219: void eolian_cxx::database_load(const eolian_cxx::options_type): Assertion `false Error parsing input files' failed. /bin/bash: line 1: 24666 Przerwane (core dumped) /usr/local/bin/eolian_cxx -I/usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1 -I/usr/local/share/eolian/include/ecore-1 -I../../src/lib -o elm_container.eo.hh elm_container.eo make[4]: *** [elm_container.eo.hh] Błąd 134 /bin/bash: line 1: 24673 Przerwane (core dumped) /usr/local/bin/eolian_cxx -I/usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1 -I/usr/local/share/eolian/include/ecore-1 -I../../src/lib -o elm_layout.eo.hh elm_layout.eo make[4]: *** [elm_layout.eo.hh] Błąd 134 /bin/bash: line 1: 24678 Przerwane (core dumped) /usr/local/bin/eolian_cxx -I/usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1 -I/usr/local/share/eolian/include/ecore-1 -I../../src/lib -o elm_interface_scrollable.eo.hh elm_interface_scrollable.eo -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black
Re: [E-devel] [EGIT] [core/elementary] master 01/01: map: Add missing legacy API into legacy header
On Tue, 22 Jul 2014 09:14:15 +0300 Daniel Zaoui daniel.za...@samsung.com said: Hi Tae-Hwan, I don't think it is the good fix. The .eo file should describe this function, so Eolian could generate the legacy header for free. Well, I have to admit I may have forgot this function during the porting :-) for now this will do.. until it goes into the eo file. :) D2, alias me. On 07/22/2014 08:35 AM, Tae-Hwan Kim wrote: raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=cfdaffb8cf65ab0a934de2efb513e66989b4bad6 commit cfdaffb8cf65ab0a934de2efb513e66989b4bad6 Author: Tae-Hwan Kim the81@samsung.com Date: Tue Jul 22 14:14:34 2014 +0900 map: Add missing legacy API into legacy header Summary: @fix Reviewers: raster Reviewed By: raster Differential Revision: https://phab.enlightenment.org/D1164 --- src/lib/elm_map_legacy.h | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_map_legacy.h b/src/lib/elm_map_legacy.h index ca34589..4c7aff2 100644 --- a/src/lib/elm_map_legacy.h +++ b/src/lib/elm_map_legacy.h @@ -10,4 +10,22 @@ */ EAPI Evas_Object *elm_map_add(Evas_Object *parent); -#include elm_map.eo.legacy.h \ No newline at end of file +/** + * @internal + * + * @brief Requests a list of addresses corresponding to a given name. + * + * @since 1.8 + * + * @remarks This is used if you want to search the address from a name. + * + * @param obj The map object + * @param address The address + * @param name_cb The callback function + * @param data The user callback data + * + * @ingroup Map + */ +EAPI void elm_map_name_search(const Evas_Object *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data); + +#include elm_map.eo.legacy.h -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Elm build break with enabled c++ bindings
On Tue, 22 Jul 2014 10:06:43 +0200 Lukasz Stanislawski l.stanisl...@samsung.com said: i hit the exact same thing. it's actually old .eo files in PREFIX/share/eolian/include/ just rm -rf that and make install on efl again. Hi, I'm getting following errors when trying to build elementary with default configure options. With '--disable-c++11' it builds well. Could someone take a look? BR, LS CC libelementary_la-els_box.lo CC libelementary_la-els_cursor.lo CC libelementary_la-els_tooltip.lo CC libelementary_la-elu_ews_wm.lo EOLCXX elm_widget.eo.hh ERR24659:eo_lexer /usr/local/share/eolian/include/edje-1/edje.eo:183 () '(' expected at column 19 near 'char' const char *file; /*@ The path to the EDJ file to load @p from */ ^ ERR24659:blackeolian_cxx bin/eolian_cxx/eolian_cxx.cc:217 database_load() Eolian failed parsing input files eolian_cxx: bin/eolian_cxx/eolian_cxx.cc:219: void eolian_cxx::database_load(const eolian_cxx::options_type): Assertion `false Error parsing input files' failed. EOLCXX elm_container.eo.hh ERR24666:eo_lexer /usr/local/share/eolian/include/edje-1/edje.eo:183 () '(' expected at column 19 near 'char' const char *file; /*@ The path to the EDJ file to load @p from */ ^ ERR24666:blackeolian_cxx bin/eolian_cxx/eolian_cxx.cc:217 database_load() Eolian failed parsing input files eolian_cxx: bin/eolian_cxx/eolian_cxx.cc:219: void eolian_cxx::database_load(const eolian_cxx::options_type): Assertion `false Error parsing input files' failed. EOLCXX elm_layout.eo.hh EOLCXX elm_interface_scrollable.eo.hh /bin/bash: line 1: 24659 Przerwane (core dumped) /usr/local/bin/eolian_cxx -I/usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1 -I/usr/local/share/eolian/include/ecore-1 -I../../src/lib -o elm_widget.eo.hh elm_widget.eo make[4]: *** [elm_widget.eo.hh] Błąd 134 make[4]: *** Oczekiwanie na niezakończone zadania ERR24673:eo_lexer /usr/local/share/eolian/include/edje-1/edje.eo:183 () '(' expected at column 19 near 'char' const char *file; /*@ The path to the EDJ file to load @p from */ ^ ERR24673:blackeolian_cxx bin/eolian_cxx/eolian_cxx.cc:217 database_load() Eolian failed parsing input files eolian_cxx: bin/eolian_cxx/eolian_cxx.cc:219: void eolian_cxx::database_load(const eolian_cxx::options_type): Assertion `false Error parsing input files' failed. ERR24678:eo_lexer /usr/local/share/eolian/include/edje-1/edje.eo:183 () '(' expected at column 19 near 'char' const char *file; /*@ The path to the EDJ file to load @p from */ ^ ERR24678:blackeolian_cxx bin/eolian_cxx/eolian_cxx.cc:217 database_load() Eolian failed parsing input files eolian_cxx: bin/eolian_cxx/eolian_cxx.cc:219: void eolian_cxx::database_load(const eolian_cxx::options_type): Assertion `false Error parsing input files' failed. /bin/bash: line 1: 24666 Przerwane (core dumped) /usr/local/bin/eolian_cxx -I/usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1 -I/usr/local/share/eolian/include/ecore-1 -I../../src/lib -o elm_container.eo.hh elm_container.eo make[4]: *** [elm_container.eo.hh] Błąd 134 /bin/bash: line 1: 24673 Przerwane (core dumped) /usr/local/bin/eolian_cxx -I/usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1 -I/usr/local/share/eolian/include/ecore-1 -I../../src/lib -o elm_layout.eo.hh elm_layout.eo make[4]: *** [elm_layout.eo.hh] Błąd 134 /bin/bash: line 1: 24678 Przerwane (core dumped) /usr/local/bin/eolian_cxx -I/usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1 -I/usr/local/share/eolian/include/ecore-1 -I../../src/lib -o elm_interface_scrollable.eo.hh elm_interface_scrollable.eo -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Want fast and easy access to all the code
[EGIT] [core/efl] master 01/01: modules/evas/gl_common: Distribute rgb_a_pair_*.{h,shd}.
savio pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b1df4791d5144503fd72b18d54b7630536e76615 commit b1df4791d5144503fd72b18d54b7630536e76615 Author: Savio Sena savio.s...@acm.org Date: Tue Jul 22 05:12:28 2014 -0300 modules/evas/gl_common: Distribute rgb_a_pair_*.{h,shd}. Added missing files to the list of distributed files. --- src/Makefile_Evas.am | 8 1 file changed, 8 insertions(+) diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index 3372143..4a019be 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -720,6 +720,10 @@ modules/evas/engines/gl_common/shader/nv12_nomul_vert.h \ modules/evas/engines/gl_common/shader/nv12_vert.h \ modules/evas/engines/gl_common/shader/rect_frag.h \ modules/evas/engines/gl_common/shader/rect_vert.h \ +modules/evas/engines/gl_common/shader/rgb_a_pair_frag.h \ +modules/evas/engines/gl_common/shader/rgb_a_pair_nomul_frag.h \ +modules/evas/engines/gl_common/shader/rgb_a_pair_nomul_vert.h \ +modules/evas/engines/gl_common/shader/rgb_a_pair_vert.h \ modules/evas/engines/gl_common/shader/tex_12_frag.h \ modules/evas/engines/gl_common/shader/tex_12_nomul_frag.h \ modules/evas/engines/gl_common/shader/tex_12_nomul_vert.h \ @@ -812,6 +816,10 @@ modules/evas/engines/gl_common/shader/nv12_nomul_vert.shd \ modules/evas/engines/gl_common/shader/nv12_vert.shd \ modules/evas/engines/gl_common/shader/rect_frag.shd \ modules/evas/engines/gl_common/shader/rect_vert.shd \ +modules/evas/engines/gl_common/shader/rgb_a_pair_frag.shd \ +modules/evas/engines/gl_common/shader/rgb_a_pair_nomul_frag.shd \ +modules/evas/engines/gl_common/shader/rgb_a_pair_nomul_vert.shd \ +modules/evas/engines/gl_common/shader/rgb_a_pair_vert.shd \ modules/evas/engines/gl_common/shader/tex_12_frag.shd \ modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd \ modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd \ --
[EGIT] [apps/econnman] master 01/01: Move pnac config back to main script
kuuko pushed a commit to branch master. http://git.enlightenment.org/apps/econnman.git/commit/?id=975ec2d4d5d88af9756e1aa618f03ccfefe45fba commit 975ec2d4d5d88af9756e1aa618f03ccfefe45fba Author: Kai Huuhko kai.huu...@gmail.com Date: Tue Jul 22 10:58:31 2014 +0300 Move pnac config back to main script --- econnman-bin.in | 127 +++- pnac.py | 114 -- 2 files changed, 125 insertions(+), 116 deletions(-) diff --git a/econnman-bin.in b/econnman-bin.in index 0593ba8..019c9c1 100755 --- a/econnman-bin.in +++ b/econnman-bin.in @@ -8,6 +8,7 @@ #gateway is not updated. +import sys import dbus import dbus.service import logging @@ -53,8 +54,6 @@ except: ELM_WIN_DIALOG_BASIC, ELM_POLICY_QUIT, ELM_SCROLLER_POLICY_OFF, \ ELM_SCROLLER_POLICY_AUTO, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED -from pnac import PNACConfig - dbus_ml = DBusEcoreMainLoop() bus = dbus.SystemBus(mainloop=dbus_ml) log = logging.getLogger(econnman) @@ -73,6 +72,125 @@ EXPAND_HORIZ = (evas.EVAS_HINT_EXPAND, 0.0) FILL_BOTH = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) +# python2 backwards compatibility +try: +from configparser import SafeConfigParser +except ImportError: +from ConfigParser import SafeConfigParser + + +class PNACConfig(SafeConfigParser): + +A custom config parser for IEEE802.1x (PNAC) + +Section names are prefixed with service_ + + + +CONF_FILE = /var/lib/connman/econnman.config + +def __init__(self): +SafeConfigParser.__init__(self) +self.optionxform = str + +def read(self): +args = self.CONF_FILE, 'r' +kwargs = {} +if sys.hexversion = 0x0300: +kwargs[encoding] = 'utf8' +try: +with open(*args, **kwargs) as fd: +self.readfp(fd) +except IOError: +log.error( +Econnman cannot read the configuration file \%s\ used by +connman to configure your ieee802.1x networks. Make sure the +user running econnman is able to read/write it., +self.CONF_FILE +) +#raise + +# defaults() +# sections() + +def add_section(self, service_name): +secname = 'service_' + service_name +SafeConfigParser.add_section(self, secname) +self.set(service_name, 'Type', 'wifi') +self.set(service_name, 'Name', service_name) +#self.write() + +def has_section(self, service_name): # config_exists +return bool(self.section_get(service_name)) + +# options() + +def has_option(self, service_name, key): +secname = self.section_get(service_name) +return SafeConfigParser.has_option(secname, key) + +# read() +# readfp() + +def get(self, service_name, key): # config_option_get +secname = self.section_get(service_name) +if self.has_option(service_name, key): +return SafeConfigParser.get(self, secname, key) +return None + +# getint() +# getfloat() +# getboolean() +# items() + +def set(self, service_name, key, value): # config_set +secname = self.section_get(service_name) +if not self.has_section(service_name): +self.add_section(service_name) +if value is not None: +SafeConfigParser.set(self, secname, key, value) +elif self.has_option(secname, key): +self.remove_option(secname, key) +#self.write() + +def write(self): +# TODO: Copy owner and mask from existing config file, write to a temp +# file and request overwriting with sudo or polkit, then set the +# owner and mask like it was before. This is to avoid the +# requirement of running the entire econnman instance with root +# rights. +try: +with open(self.CONF_FILE, 'w', encoding='utf8') as configfile: +SafeConfigParser.write(self, configfile) +except IOError: +log.error( +Econnman cannot write to the configuration file \%s\ used +by connman to configure your ieee802.1x networks. Make sure +the user running econnman is able to read/write it., +self.CONF_FILE +) + +def remove_option(self, service_name, key): +secname = self.section_get(service_name) +SafeConfigParser.remove_option(self, secname, key) +#self.write() + +def remove_section(self, service_name): # config_del +secname = self.section_get(service_name) +ret = SafeConfigParser.remove_section(self, secname) +#self.write() +return ret + +def section_get(self, service_name): # config_get +#secname = 'service_' + service_name +for sec in self.sections(): +if
[EGIT] [apps/econnman] master 01/01: Move pnac config read() earlier
kuuko pushed a commit to branch master. http://git.enlightenment.org/apps/econnman.git/commit/?id=176f5dcd182b40b4e4bcc39ea22901ea8c98265c commit 176f5dcd182b40b4e4bcc39ea22901ea8c98265c Author: Kai Huuhko kai.huu...@gmail.com Date: Tue Jul 22 11:34:46 2014 +0300 Move pnac config read() earlier --- econnman-bin.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/econnman-bin.in b/econnman-bin.in index 019c9c1..2715f1d 100755 --- a/econnman-bin.in +++ b/econnman-bin.in @@ -981,6 +981,7 @@ class ServiceView(ObjectView): self.forget = self.add_button(self.box, Forget Network, self._forget) elif self.type == wifi and ieee8021x in self.security_mode: +pnac_conf.read() self.forget = self.add_button(self.box, Forget Network, self._forget) if not pnac_conf.has_section(self.name): @@ -1060,7 +1061,6 @@ class ServiceView(ObjectView): # section: Two Phase Authentication if (self.type == wifi) and (ieee8021x in self.security_mode): -pnac_conf.read() fr, bx = self.add_frame_and_box(self.box, ieee8021x) self.ieee8021x_frame = fr #cfg_sec = pnac_conf.section_get(self.name) --
[EGIT] [core/efl] master 01/01: eolian: memory leak fix
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c03a0a2a3989356e1384fbd2a756836665a33f12 commit c03a0a2a3989356e1384fbd2a756836665a33f12 Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 10:15:56 2014 +0100 eolian: memory leak fix --- src/lib/eolian/eo_parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 597ea9c..5d892c9 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -126,9 +126,11 @@ append_node(Eo_Lexer *ls, int type, void *def) static const char * get_filename(Eo_Lexer *ls) { - Eina_Array *arr = eina_file_split(strdup(ls-source)); + char *s = strdup(ls-source); + Eina_Array *arr = eina_file_split(s); const char *file = eina_stringshare_add(eina_array_data_get(arr, eina_array_count_get(arr) - 1)); + free(s); eina_array_free(arr); return file; } --
[EGIT] [core/efl] master 01/01: eolian: another leak fix
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=71ae2f2c2e362746475d28e0511b92d8b7c2463a commit 71ae2f2c2e362746475d28e0511b92d8b7c2463a Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 10:22:21 2014 +0100 eolian: another leak fix --- src/lib/eolian/eo_parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 5d892c9..60c8bc3 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -265,6 +265,7 @@ _struct_field_free(Eolian_Struct_Field *def) { database_type_del(def-type); if (def-comment) eina_stringshare_del(def-comment); + free(def); } static Eolian_Type * --
Re: [E-devel] [EGIT] [apps/econnman] master 01/01: Refactor pnac config into a class and separate module
Fix is in git. 2014-07-21 19:16 GMT+03:00 Leif Middelschulte leif.middelschu...@gmail.com: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 16.07.2014 10:53, schrieb Kai Huuhko: kuuko pushed a commit to branch master. http://git.enlightenment.org/apps/econnman.git/commit/?id=80b83a2e2805ebedce3a710d79dde511d5dbc0d2 commit 80b83a2e2805ebedce3a710d79dde511d5dbc0d2 Author: Kai Huuhko kai.huu...@gmail.com Date: Wed Jul 16 11:46:47 2014 +0300 Refactor pnac config into a class and separate module This breaks econnman-bin. The module isn't installed and therefore not found :-/ Regards, Leif This will make it easier to add proper authorization for it in the future. --- .gitignore | 1 + econnman-bin.in | 155 ++-- pnac.py | 114 + 3 files changed, 141 insertions(+), 129 deletions(-) diff --git a/.gitignore b/.gitignore index a29def7..5cdde3b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.py[oc] INSTALL Makefile Makefile.in diff --git a/econnman-bin.in b/econnman-bin.in index 67f7454..0593ba8 100755 --- a/econnman-bin.in +++ b/econnman-bin.in @@ -14,16 +14,10 @@ import logging import argparse import os.path -# For python2 backwards compatibility -try: -import configparser -except ImportError: -import ConfigParser as configparser - try: import efl.evas as evas import efl.ecore as ecore -import efl.edje +import efl.edje as edje # Class resolve hack for edje_get from efl.dbus_mainloop import DBusEcoreMainLoop import efl.elementary as elm from efl.elementary import ELM_POLICY_QUIT, \ @@ -51,7 +45,7 @@ except: import elementary as elm import evas import ecore -import edje + import edje # Class resolve hack for edje_get from e_dbus import DBusEcoreMainLoop from elementary import Window, Background, Box, Label, Naviframe, Popup, \ Button, Scroller, Check, Progressbar, Genlist, GenlistItemClass, \ @@ -59,6 +53,7 @@ except: ELM_WIN_DIALOG_BASIC, ELM_POLICY_QUIT, ELM_SCROLLER_POLICY_OFF, \ ELM_SCROLLER_POLICY_AUTO, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED +from pnac import PNACConfig dbus_ml = DBusEcoreMainLoop() bus = dbus.SystemBus(mainloop=dbus_ml) @@ -72,9 +67,6 @@ log.addHandler(log_handler) manager = None -CONF_FILE = /var/lib/connman/econnman.config -configs = None - EXPAND_BOTH = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) EXPAND_HORIZ = (evas.EVAS_HINT_EXPAND, 0.0) @@ -268,103 +260,6 @@ class ObjectView(object): return lb, en -### - -# Config Files Helper: -def config_file_setup(): -global configs -configs = configparser.RawConfigParser() -configs.optionxform = str - try: -fd = open(CONF_FILE, 'r', encoding='utf8') - configs.readfp(fd) -fd.close() -except IOError: - popup_error( -win, -Cannot read configuration file, -Econnman cannot read the coniguration file \ + CONF_FILE + -\, used by connman to configure your ieee802.1x networks. -Make sure the user running connman is able to read/write it. - ) -configs = None -raise IOError - - -def config_del(name): -global configs -secname = 'service_' + name -if configs is None: -try: - config_file_setup() -except IOError: -return - if configs.has_section(secname): - configs.remove_section(secname) -config_write(name) - - -def config_set(name, key, value): -global configs -secname = 'service_' + name -if configs is None: -try: - config_file_setup() -except IOError: -return - if not configs.has_section(secname): - configs.add_section(secname) -configs.set(secname, 'Type', 'wifi') -configs.set(secname, 'Name', name) -if value is not None: -configs.set(secname, key, value) -elif configs.has_option(secname, key): - configs.remove_option(secname, key) -config_write(name) - - -def config_get(name): -global configs -if configs is None: -try: -config_file_setup() - except IOError: -return None -for sec in configs.sections(): -if configs.has_option(sec, 'Name') and \ -configs.get(sec, 'Name') == name: - return sec -else: -return None - - -def config_option_get(secname, key): -if configs.has_option(secname, key): -return configs.get(secname, key) -return None - - -def config_exists(name): -if config_get(name): -return True -else: -return False - - -def config_write(name): -global configs -try: -with open(CONF_FILE, 'w', encoding='utf8') as configfile: - configs.write(configfile) -except IOError: - popup_error( -win, -Cannot write configuration file, -Econnman cannot write the
[EGIT] [core/efl] master 01/01: eolian: prevent freeing of full named structures that are inside of typedefs and fix a memory leak
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ccf157aa574151ca488d027fe5d38b2bdd7d4e91 commit ccf157aa574151ca488d027fe5d38b2bdd7d4e91 Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 10:39:34 2014 +0100 eolian: prevent freeing of full named structures that are inside of typedefs and fix a memory leak --- src/lib/eolian/database_type.c | 43 ++-- src/lib/eolian/eolian_database.c | 2 +- src/lib/eolian/eolian_database.h | 5 +++-- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c index 60353df..20f4d60 100644 --- a/src/lib/eolian/database_type.c +++ b/src/lib/eolian/database_type.c @@ -6,28 +6,33 @@ void database_type_del(Eolian_Type *tp) { if (!tp) return; - if (tp-type == EOLIAN_TYPE_POINTER || tp-type == EOLIAN_TYPE_FUNCTION) - { -Eolian_Type *stp; -if (tp-subtypes) EINA_LIST_FREE(tp-subtypes, stp) - database_type_del(stp); -if (tp-base_type) - database_type_del(tp-base_type); - } - else - { -const char *sp; -if (tp-name) eina_stringshare_del(tp-name); -if (tp-full_name) eina_stringshare_del(tp-full_name); -if (tp-fields) eina_hash_free(tp-fields); -if (tp-namespaces) EINA_LIST_FREE(tp-namespaces, sp) - eina_stringshare_del(sp); -if (tp-comment) eina_stringshare_del(tp-comment); -if (tp-file) eina_stringshare_del(tp-file); - } + const char *sp; + Eolian_Type *stp; + if (tp-subtypes) EINA_LIST_FREE(tp-subtypes, stp) + database_type_del(stp); + if (tp-base_type) + database_type_del(tp-base_type); + if (tp-name) eina_stringshare_del(tp-name); + if (tp-full_name) eina_stringshare_del(tp-full_name); + if (tp-fields) eina_hash_free(tp-fields); + if (tp-namespaces) EINA_LIST_FREE(tp-namespaces, sp) + eina_stringshare_del(sp); + if (tp-comment) eina_stringshare_del(tp-comment); + if (tp-file) eina_stringshare_del(tp-file); free(tp); } +void +database_typedef_del(Eolian_Type *tp) +{ + if (!tp) return; + Eolian_Type *btp = tp-base_type; + /* prevent deletion of named structs as they're deleted later on */ + if (btp btp-type == EOLIAN_TYPE_STRUCT btp-name) + tp-base_type = NULL; + database_type_del(tp); +} + Eina_Bool database_type_add(Eolian_Type *def) { diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index 081e5fc..958c5f1 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -15,7 +15,7 @@ database_init() { if (_database_init_count 0) return ++_database_init_count; eina_init(); - _aliases = eina_hash_stringshared_new(EINA_FREE_CB(database_type_del)); + _aliases = eina_hash_stringshared_new(EINA_FREE_CB(database_typedef_del)); _structs = eina_hash_stringshared_new(EINA_FREE_CB(database_type_del)); _filenames = eina_hash_string_small_new(free); _tfilenames = eina_hash_string_small_new(free); diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index 13c5125..ac379a8 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -146,8 +146,9 @@ int database_shutdown(); /* types */ Eina_Bool database_type_add(Eolian_Type *def); -Eina_Bool database_struct_add(Eolian_Type *type); -void database_type_del(Eolian_Type *type); +Eina_Bool database_struct_add(Eolian_Type *tp); +void database_type_del(Eolian_Type *tp); +void database_typedef_del(Eolian_Type *tp); void database_type_print(Eolian_Type *type); void database_type_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name); --
Re: [E-devel] [EGIT] [core/efl] master 01/01: eolian: prevent freeing of full named structures that are inside of typedefs and fix a memory leak
Hi D5, Your commit message is not enough long :P. D2 On 07/22/2014 12:46 PM, Daniel Kolesa wrote: q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ccf157aa574151ca488d027fe5d38b2bdd7d4e91 commit ccf157aa574151ca488d027fe5d38b2bdd7d4e91 Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 10:39:34 2014 +0100 eolian: prevent freeing of full named structures that are inside of typedefs and fix a memory leak --- src/lib/eolian/database_type.c | 43 ++-- src/lib/eolian/eolian_database.c | 2 +- src/lib/eolian/eolian_database.h | 5 +++-- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c index 60353df..20f4d60 100644 --- a/src/lib/eolian/database_type.c +++ b/src/lib/eolian/database_type.c @@ -6,28 +6,33 @@ void database_type_del(Eolian_Type *tp) { if (!tp) return; - if (tp-type == EOLIAN_TYPE_POINTER || tp-type == EOLIAN_TYPE_FUNCTION) - { -Eolian_Type *stp; -if (tp-subtypes) EINA_LIST_FREE(tp-subtypes, stp) - database_type_del(stp); -if (tp-base_type) - database_type_del(tp-base_type); - } - else - { -const char *sp; -if (tp-name) eina_stringshare_del(tp-name); -if (tp-full_name) eina_stringshare_del(tp-full_name); -if (tp-fields) eina_hash_free(tp-fields); -if (tp-namespaces) EINA_LIST_FREE(tp-namespaces, sp) - eina_stringshare_del(sp); -if (tp-comment) eina_stringshare_del(tp-comment); -if (tp-file) eina_stringshare_del(tp-file); - } + const char *sp; + Eolian_Type *stp; + if (tp-subtypes) EINA_LIST_FREE(tp-subtypes, stp) + database_type_del(stp); + if (tp-base_type) + database_type_del(tp-base_type); + if (tp-name) eina_stringshare_del(tp-name); + if (tp-full_name) eina_stringshare_del(tp-full_name); + if (tp-fields) eina_hash_free(tp-fields); + if (tp-namespaces) EINA_LIST_FREE(tp-namespaces, sp) + eina_stringshare_del(sp); + if (tp-comment) eina_stringshare_del(tp-comment); + if (tp-file) eina_stringshare_del(tp-file); free(tp); } +void +database_typedef_del(Eolian_Type *tp) +{ + if (!tp) return; + Eolian_Type *btp = tp-base_type; + /* prevent deletion of named structs as they're deleted later on */ + if (btp btp-type == EOLIAN_TYPE_STRUCT btp-name) + tp-base_type = NULL; + database_type_del(tp); +} + Eina_Bool database_type_add(Eolian_Type *def) { diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index 081e5fc..958c5f1 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -15,7 +15,7 @@ database_init() { if (_database_init_count 0) return ++_database_init_count; eina_init(); - _aliases = eina_hash_stringshared_new(EINA_FREE_CB(database_type_del)); + _aliases = eina_hash_stringshared_new(EINA_FREE_CB(database_typedef_del)); _structs = eina_hash_stringshared_new(EINA_FREE_CB(database_type_del)); _filenames = eina_hash_string_small_new(free); _tfilenames = eina_hash_string_small_new(free); diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index 13c5125..ac379a8 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -146,8 +146,9 @@ int database_shutdown(); /* types */ Eina_Bool database_type_add(Eolian_Type *def); -Eina_Bool database_struct_add(Eolian_Type *type); -void database_type_del(Eolian_Type *type); +Eina_Bool database_struct_add(Eolian_Type *tp); +void database_type_del(Eolian_Type *tp); +void database_typedef_del(Eolian_Type *tp); void database_type_print(Eolian_Type *type); void database_type_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name); -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/elementary] master 01/01: autotools: Fixed C++ build globally.
savio pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=69e67deb34e9070ff29546f743b07ceaf313b81b commit 69e67deb34e9070ff29546f743b07ceaf313b81b Author: Savio Sena savio.s...@acm.org Date: Tue Jul 22 06:56:04 2014 -0300 autotools: Fixed C++ build globally. Previously I removed -fPIC from example LDFLAGS and CXXFLAGS. Now I'm adding -fPIC -DPIC to configure.ac conditioned to HAVE_CXX11. This commit fixes 'make check'. --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index 697bbd7..8900eb1 100644 --- a/configure.ac +++ b/configure.ac @@ -251,6 +251,8 @@ if test x${HAVE_CXX11} = x1 -a x${want_cxx11} = xyes; then ) fi AM_CONDITIONAL([HAVE_CXX11], [test x${have_cxx11} = xyes]) +AM_CONDITIONAL([HAVE_CXX11], [LDFLAGS=${LDFLAGS} -shared -fPIC -DPIC]) +AM_CONDITIONAL([HAVE_CXX11], [CXXFLAGS=${CXXFLAGS} -fPIC -DPIC]) have_elementary_x=no want_elementary_x=auto --
[EGIT] [core/elementary] master 01/01: autotools: we actually do want portability warning.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=9947bf77aaeaeac7a9bd0db0cfb34b61e807af11 commit 9947bf77aaeaeac7a9bd0db0cfb34b61e807af11 Author: Cedric BAIL c.b...@partner.samsung.com Date: Tue Jul 22 12:19:05 2014 +0200 autotools: we actually do want portability warning. This tell people that are running our autogen they need to use gnu make and not report issue if they don't. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8900eb1..5e6248e 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ AH_BOTTOM([ AC_USE_SYSTEM_EXTENSIONS -AM_INIT_AUTOMAKE([1.6 dist-bzip2 dist-xz -Wall -Wno-portability]) +AM_INIT_AUTOMAKE([1.6 dist-bzip2 dist-xz -Wall]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # pkg-config --
[EGIT] [core/efl] master 01/01: autotools: we actually do want portability warning.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=64dccac59c50400913994c6ea0f812414d8f7b97 commit 64dccac59c50400913994c6ea0f812414d8f7b97 Author: Cedric BAIL c.b...@partner.samsung.com Date: Tue Jul 22 12:20:03 2014 +0200 autotools: we actually do want portability warning. This is to avoid people not using gnu stuff to report issue. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1df6022..56fe587 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ AH_BOTTOM([ AC_USE_SYSTEM_EXTENSIONS -AM_INIT_AUTOMAKE([1.6 dist-bzip2 dist-xz -Wall -Wno-portability color-tests]) +AM_INIT_AUTOMAKE([1.6 dist-bzip2 dist-xz -Wall color-tests]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) CFOPT_WARNING= --
[EGIT] [core/efl] master 01/01: ecore_audio: fix crash on OSX when using Ecore_Audio with PulseAudio
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6844a702dcb78bc0f44b8a5c557a077bd1582436 commit 6844a702dcb78bc0f44b8a5c557a077bd1582436 Author: Jean Guyomarc'h jean.guyoma...@gmail.com Date: Tue Jul 22 12:39:30 2014 +0200 ecore_audio: fix crash on OSX when using Ecore_Audio with PulseAudio Summary: Fix implicit function declaration of basename() which led to a violent crash when used. Reviewers: cedric, naguirre, raoulh, raster Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1162 Signed-off-by: Cedric BAIL c.b...@partner.samsung.com --- src/lib/ecore_audio/ecore_audio_obj_out_pulse.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c index 4b5986f..276e835 100644 --- a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c +++ b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c @@ -6,6 +6,10 @@ #include stdio.h #include string.h +#if defined (__MacOSX__) || (defined (__MACH__) defined (__APPLE__)) +# include libgen.h +#endif + #ifdef HAVE_FEATURES_H #include features.h #endif --
[EGIT] [core/efl] master 01/01: Eolian/Generator: simplify eo_do invocation.
jackdanielz pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=48d0570786ea406854724fb05b74c57696443b62 commit 48d0570786ea406854724fb05b74c57696443b62 Author: Daniel Zaoui daniel.za...@samsung.com Date: Tue Jul 22 13:26:16 2014 +0300 Eolian/Generator: simplify eo_do invocation. Since eo_do returns the Eo operation result, we can generate: { return eo_do(obj, ...); } instead of: { int ret; eo_do(obj, ret = ...); return ret; } --- src/bin/eolian/legacy_generator.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/bin/eolian/legacy_generator.c b/src/bin/eolian/legacy_generator.c index e886b80..c2429f0 100644 --- a/src/bin/eolian/legacy_generator.c +++ b/src/bin/eolian/legacy_generator.c @@ -26,9 +26,7 @@ tmpl_eapi_body[] =\ EAPI @#ret_type\n\ @#eapi_func(@#is_constEo *obj@#full_params)\n\ {\n\ -@#ret_init_val\ - eo_do((Eo *) obj, @#eo_ret_assign@#eo_func(@#eo_params));\n\ - return @#ret_val;\n\ + return eo_do((Eo *) obj, @#eo_func(@#eo_params));\n\ }\n\ ; static const char @@ -300,9 +298,6 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo eina_strbuf_replace_all(fbody, @#ret_type, tmp_ret_str); eina_strbuf_replace_all(fbody, @#ret_init_val, tmpstr); - tmp_ret_str[0] = '\0'; - if (rettype !ret_is_void) sprintf(tmp_ret_str, %s = , retname); - eina_strbuf_replace_all(fbody, @#eo_ret_assign, tmp_ret_str); } eina_strbuf_replace_all(fbody, @#full_params, eina_strbuf_string_get(fparam)); --
[EGIT] [core/efl] master 01/01: autotools: missing files for make check in a make dist tarball.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a95f4657b2418c66463474e368c534a01b51c249 commit a95f4657b2418c66463474e368c534a01b51c249 Author: Cedric BAIL c.b...@partner.samsung.com Date: Tue Jul 22 12:51:08 2014 +0200 autotools: missing files for make check in a make dist tarball. --- src/Makefile_Evas.am | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index 4a019be..1687444 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -2009,4 +2009,13 @@ tests/evas/images/Temple3-10.tgv \ tests/evas/images/Temple3.jpg \ tests/evas/images/Train-10.tgv \ tests/evas/images/Train.jpg \ -tests/evas/images/mars_rover_panorama_half-size.jpg +tests/evas/images/mars_rover_panorama_half-size.jpg \ +tests/evas/images/Light_exif.jpg \ +tests/evas/images/Light_exif_flip_h.jpg \ +tests/evas/images/Light_exif_180.jpg \ +tests/evas/images/Light_exif_flip_v.jpg \ +tests/evas/images/Light_exif_transpose.jpg \ +tests/evas/images/Light_exif_90.jpg \ +tests/evas/images/Light_exif_transverse.jpg \ +tests/evas/images/Light_exif_270.jpg + --
[EGIT] [core/efl] master 01/01: eolian: include newly added test files in dist
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2942d4bdfaad920e4743dda4d6004e08ec1cc2e8 commit 2942d4bdfaad920e4743dda4d6004e08ec1cc2e8 Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 11:53:59 2014 +0100 eolian: include newly added test files in dist --- src/Makefile_Eolian.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Makefile_Eolian.am b/src/Makefile_Eolian.am index 29c5e72..790d9f5 100644 --- a/src/Makefile_Eolian.am +++ b/src/Makefile_Eolian.am @@ -100,5 +100,7 @@ tests/eolian/data/object_impl_add_ref.c \ tests/eolian/data/consts.eo \ tests/eolian/data/override.eo \ tests/eolian/data/events.eo \ -tests/eolian/data/namespace.eo +tests/eolian/data/namespace.eo \ +tests/eolian/data/extern.eo \ +tests/eolian/data/struct.eo --
[EGIT] [core/elementary] master 01/01: Elm_Map: port API to eo file.
jackdanielz pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=3c3323716dfd6bfce17a9848f310584b8bc5f5bf commit 3c3323716dfd6bfce17a9848f310584b8bc5f5bf Author: Daniel Zaoui daniel.za...@samsung.com Date: Tue Jul 22 13:59:41 2014 +0300 Elm_Map: port API to eo file. This function has to be described in elm_map.eo so Eolian can generate the legacy and Eo APIs. --- src/lib/elm_map.c| 8 ++-- src/lib/elm_map.eo | 17 + src/lib/elm_map_legacy.h | 18 -- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c index d6f3a48..4541279 100644 --- a/src/lib/elm_map.c +++ b/src/lib/elm_map.c @@ -4612,13 +4612,9 @@ _elm_map_name_add(Eo *obj, Elm_Map_Data *_pd EINA_UNUSED, const char *address, d name_cb, data); } -EAPI void -elm_map_name_search(const Evas_Object *obj, - const char *address, - Elm_Map_Name_List_Cb name_cb, - void *data) +EOLIAN static void +_elm_map_name_search(Eo *obj, Elm_Map_Data *_pd EINA_UNUSED, const char *address, Elm_Map_Name_List_Cb name_cb, void *data) { - ELM_MAP_CHECK(obj); if (address) _name_list_request(obj, ELM_MAP_NAME_METHOD_SEARCH, address, 0, 0, name_cb, data); diff --git a/src/lib/elm_map.eo b/src/lib/elm_map.eo index 8cce265..0c6757c 100644 --- a/src/lib/elm_map.eo +++ b/src/lib/elm_map.eo @@ -613,6 +613,23 @@ class Elm_Map (Elm_Widget, Elm_Interface_Scrollable) @in void *data; /*@ The user callback data. */ } } + name_search { + /*@ + @brief Requests a list of addresses corresponding to a given name. + + @since 1.8 + + @remarks This is used if you want to search the address from a name. + + @internal + @ingroup Map */ + const; + params { +@in const(char)* address; /*@ The address. */ +@in Elm_Map_Name_List_Cb name_cb; /*@ The callback function. */ +@in void *data; /*@ The user callback data. */ + } + } region_bring_in { /*@ Animatedly bring in given coordinates to the center of the map. diff --git a/src/lib/elm_map_legacy.h b/src/lib/elm_map_legacy.h index 4c7aff2..6176522 100644 --- a/src/lib/elm_map_legacy.h +++ b/src/lib/elm_map_legacy.h @@ -10,22 +10,4 @@ */ EAPI Evas_Object *elm_map_add(Evas_Object *parent); -/** - * @internal - * - * @brief Requests a list of addresses corresponding to a given name. - * - * @since 1.8 - * - * @remarks This is used if you want to search the address from a name. - * - * @param obj The map object - * @param address The address - * @param name_cb The callback function - * @param data The user callback data - * - * @ingroup Map - */ -EAPI void elm_map_name_search(const Evas_Object *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data); - #include elm_map.eo.legacy.h --
Re: [E-devel] [EGIT] [core/efl] master 01/01: eolian: prevent freeing of full named structures that are inside of typedefs and fix a memory leak
2014-07-22 10:52 GMT+01:00 Daniel Zaoui daniel.za...@samsung.com: Hi D5, Your commit message is not enough long :P. I thought it was pretty sufficient :) D2 On 07/22/2014 12:46 PM, Daniel Kolesa wrote: q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ccf157aa574151ca488d027fe5d38b2bdd7d4e91 commit ccf157aa574151ca488d027fe5d38b2bdd7d4e91 Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 10:39:34 2014 +0100 eolian: prevent freeing of full named structures that are inside of typedefs and fix a memory leak --- src/lib/eolian/database_type.c | 43 ++-- src/lib/eolian/eolian_database.c | 2 +- src/lib/eolian/eolian_database.h | 5 +++-- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c index 60353df..20f4d60 100644 --- a/src/lib/eolian/database_type.c +++ b/src/lib/eolian/database_type.c @@ -6,28 +6,33 @@ void database_type_del(Eolian_Type *tp) { if (!tp) return; - if (tp-type == EOLIAN_TYPE_POINTER || tp-type == EOLIAN_TYPE_FUNCTION) - { -Eolian_Type *stp; -if (tp-subtypes) EINA_LIST_FREE(tp-subtypes, stp) - database_type_del(stp); -if (tp-base_type) - database_type_del(tp-base_type); - } - else - { -const char *sp; -if (tp-name) eina_stringshare_del(tp-name); -if (tp-full_name) eina_stringshare_del(tp-full_name); -if (tp-fields) eina_hash_free(tp-fields); -if (tp-namespaces) EINA_LIST_FREE(tp-namespaces, sp) - eina_stringshare_del(sp); -if (tp-comment) eina_stringshare_del(tp-comment); -if (tp-file) eina_stringshare_del(tp-file); - } + const char *sp; + Eolian_Type *stp; + if (tp-subtypes) EINA_LIST_FREE(tp-subtypes, stp) + database_type_del(stp); + if (tp-base_type) + database_type_del(tp-base_type); + if (tp-name) eina_stringshare_del(tp-name); + if (tp-full_name) eina_stringshare_del(tp-full_name); + if (tp-fields) eina_hash_free(tp-fields); + if (tp-namespaces) EINA_LIST_FREE(tp-namespaces, sp) + eina_stringshare_del(sp); + if (tp-comment) eina_stringshare_del(tp-comment); + if (tp-file) eina_stringshare_del(tp-file); free(tp); } +void +database_typedef_del(Eolian_Type *tp) +{ + if (!tp) return; + Eolian_Type *btp = tp-base_type; + /* prevent deletion of named structs as they're deleted later on */ + if (btp btp-type == EOLIAN_TYPE_STRUCT btp-name) + tp-base_type = NULL; + database_type_del(tp); +} + Eina_Bool database_type_add(Eolian_Type *def) { diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index 081e5fc..958c5f1 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -15,7 +15,7 @@ database_init() { if (_database_init_count 0) return ++_database_init_count; eina_init(); - _aliases = eina_hash_stringshared_new(EINA_FREE_CB(database_type_del)); + _aliases = eina_hash_stringshared_new(EINA_FREE_CB(database_typedef_del)); _structs = eina_hash_stringshared_new(EINA_FREE_CB(database_type_del)); _filenames = eina_hash_string_small_new(free); _tfilenames = eina_hash_string_small_new(free); diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index 13c5125..ac379a8 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -146,8 +146,9 @@ int database_shutdown(); /* types */ Eina_Bool database_type_add(Eolian_Type *def); -Eina_Bool database_struct_add(Eolian_Type *type); -void database_type_del(Eolian_Type *type); +Eina_Bool database_struct_add(Eolian_Type *tp); +void database_type_del(Eolian_Type *tp); +void database_typedef_del(Eolian_Type *tp); void database_type_print(Eolian_Type *type); void database_type_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name); -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel D5 -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same
[EGIT] [core/efl] master 01/01: eolian: support for typedefs in c_type_get
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b0788a546b9149dd03e9f250b4a28f2b948ffd7b commit b0788a546b9149dd03e9f250b4a28f2b948ffd7b Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 12:11:06 2014 +0100 eolian: support for typedefs in c_type_get --- src/lib/eolian/Eolian.h | 3 ++- src/lib/eolian/database_type.c| 43 --- src/tests/eolian/eolian_parsing.c | 3 +++ 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 8f9d63b..270847b 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -928,7 +928,8 @@ EAPI Eina_Bool eolian_type_is_extern(const Eolian_Type *tp); * Providing the name is useful for function types, as in C a function * pointer type alone is not valid syntax. For non-function types, the * name is simply appended to the type (with a space). C type names do - * not include subtypes as C doesn't support them. + * not include subtypes as C doesn't support them. Name is ignored for + * alias types. Alias types are turned into C typedefs. * * Keep in mind that if @c name is NULL, the name won't be included. * diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c index 20f4d60..932af02 100644 --- a/src/lib/eolian/database_type.c +++ b/src/lib/eolian/database_type.c @@ -105,10 +105,35 @@ _stype_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name) } } +static void +_atype_to_str(const Eolian_Type *tp, Eina_Strbuf *buf) +{ + Eina_Strbuf *fulln = eina_strbuf_new(); + Eina_List *l; + const char *sp; + + eina_strbuf_append(buf, typedef ); + + EINA_LIST_FOREACH(tp-namespaces, l, sp) + { +eina_strbuf_append(fulln, sp); +eina_strbuf_append_char(fulln, '_'); + } + eina_strbuf_append(fulln, tp-name); + + database_type_to_str(tp-base_type, buf, eina_strbuf_string_get(fulln)); + eina_strbuf_free(fulln); +} + void database_type_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name) { - if (tp-type == EOLIAN_TYPE_FUNCTION) + if (tp-type == EOLIAN_TYPE_ALIAS) + { +_atype_to_str(tp, buf); +return; + } + else if (tp-type == EOLIAN_TYPE_FUNCTION) { _ftype_to_str(tp, buf, name); return; @@ -169,21 +194,33 @@ _print_field(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, return EINA_TRUE; } +static void +_typedef_print(Eolian_Type *tp) +{ + printf(type %s: , tp-full_name); + database_type_print(tp-base_type); +} + void database_type_print(Eolian_Type *tp) { Eina_List *l; Eolian_Type *stp; + if (tp-type == EOLIAN_TYPE_ALIAS) + { +_typedef_print(tp); +return; + } if (tp-is_own) printf(own(); if (tp-is_const) printf(const(); if (tp-type == EOLIAN_TYPE_REGULAR) - printf(%s, tp-name); + printf(%s, tp-full_name); else if (tp-type == EOLIAN_TYPE_VOID) printf(void); else if (tp-type == EOLIAN_TYPE_REGULAR_STRUCT) - printf(struct %s, tp-name); + printf(struct %s, tp-full_name); else if (tp-type == EOLIAN_TYPE_POINTER) { database_type_print(tp-base_type); diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index 69ae557..2325a74 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -241,6 +241,9 @@ START_TEST(eolian_typedef) fail_if(!(type_name = eolian_type_name_get(atype))); fail_if(strcmp(type_name, Coord)); eina_stringshare_del(type_name); + fail_if(!(type_name = eolian_type_c_type_get(atype))); + fail_if(strcmp(type_name, typedef int Evas_Coord)); + eina_stringshare_del(type_name); fail_if(!(type = eolian_type_base_type_get(atype))); fail_if(!(type_name = eolian_type_name_get(type))); fail_if(eolian_type_is_own(type)); --
[EGIT] [core/efl] master 01/01: eolian: new API: eolian_type_structs/aliases_get_by_file
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=89ca97aceb632afc3c09c2a1fc6d72ebcd01f57d commit 89ca97aceb632afc3c09c2a1fc6d72ebcd01f57d Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 13:14:44 2014 +0100 eolian: new API: eolian_type_structs/aliases_get_by_file --- src/lib/eolian/Eolian.h| 24 src/lib/eolian/database_type.c | 4 src/lib/eolian/database_type_api.c | 22 ++ src/lib/eolian/eolian_database.c | 12 src/lib/eolian/eolian_database.h | 2 ++ src/tests/eolian/eolian_parsing.c | 12 6 files changed, 76 insertions(+) diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 270847b..3a1e9d6 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -781,6 +781,30 @@ EAPI const Eolian_Type *eolian_type_alias_find_by_name(const char *name); EAPI const Eolian_Type *eolian_type_struct_find_by_name(const char *name); /* + * @brief Get an iterator to all aliases contained in a file. + * + * @param[in] fname the file name without full path + * @return the iterator or NULL + * + * Thanks to internal caching, this is an O(1) operation. + * + * @ingroup Eolian + */ +EAPI Eina_Iterator *eolian_type_aliases_get_by_file(const char *fname); + +/* + * @brief Get an iterator to all named structs contained in a file. + * + * @param[in] fname the file name without full path + * @return the iterator or NULL + * + * Thanks to internal caching, this is an O(1) operation. + * + * @ingroup Eolian + */ +EAPI Eina_Iterator *eolian_type_structs_get_by_file(const char *fname); + +/* * @brief Get the type of a type (regular, function, pointer) * * @param[in] tp the type. diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c index 932af02..a0ea20e 100644 --- a/src/lib/eolian/database_type.c +++ b/src/lib/eolian/database_type.c @@ -38,6 +38,8 @@ database_type_add(Eolian_Type *def) { if (!_aliases) return EINA_FALSE; eina_hash_set(_aliases, def-full_name, def); + eina_hash_set(_aliasesf, def-file, eina_list_append +((Eina_List*)eina_hash_find(_aliasesf, def-file), def)); return EINA_TRUE; } @@ -45,6 +47,8 @@ Eina_Bool database_struct_add(Eolian_Type *tp) { if (!_structs) return EINA_FALSE; eina_hash_set(_structs, tp-full_name, tp); + eina_hash_set(_structsf, tp-file, eina_list_append +((Eina_List*)eina_hash_find(_structsf, tp-file), tp)); return EINA_TRUE; } diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c index ba9cd47..308c728 100644 --- a/src/lib/eolian/database_type_api.c +++ b/src/lib/eolian/database_type_api.c @@ -22,6 +22,28 @@ eolian_type_struct_find_by_name(const char *name) return tp; } +EAPI Eina_Iterator * +eolian_type_aliases_get_by_file(const char *fname) +{ + if (!_aliasesf) return NULL; + Eina_Stringshare *shr = eina_stringshare_add(fname); + Eina_List *l = eina_hash_find(_aliasesf, shr); + eina_stringshare_del(shr); + if (!l) return NULL; + return eina_list_iterator_new(l); +} + +EAPI Eina_Iterator * +eolian_type_structs_get_by_file(const char *fname) +{ + if (!_structsf) return NULL; + Eina_Stringshare *shr = eina_stringshare_add(fname); + Eina_List *l = eina_hash_find(_structsf, shr); + eina_stringshare_del(shr); + if (!l) return NULL; + return eina_list_iterator_new(l); +} + EAPI Eolian_Type_Type eolian_type_type_get(const Eolian_Type *tp) { diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index 958c5f1..9938ed4 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -5,11 +5,19 @@ Eina_List *_classes = NULL; Eina_Hash *_aliases = NULL; Eina_Hash *_structs = NULL; +Eina_Hash *_aliasesf = NULL; +Eina_Hash *_structsf = NULL; Eina_Hash *_filenames = NULL; Eina_Hash *_tfilenames = NULL; static int _database_init_count = 0; +static void +_hashlist_free(void *data) +{ + eina_list_free((Eina_List*)data); +} + int database_init() { @@ -17,6 +25,8 @@ database_init() eina_init(); _aliases = eina_hash_stringshared_new(EINA_FREE_CB(database_typedef_del)); _structs = eina_hash_stringshared_new(EINA_FREE_CB(database_type_del)); + _aliasesf = eina_hash_stringshared_new(_hashlist_free); + _structsf = eina_hash_stringshared_new(_hashlist_free); _filenames = eina_hash_string_small_new(free); _tfilenames = eina_hash_string_small_new(free); return ++_database_init_count; @@ -39,6 +49,8 @@ database_shutdown() database_class_del(class); eina_hash_free(_aliases); eina_hash_free(_structs); +eina_hash_free(_aliasesf); +eina_hash_free(_structsf); eina_hash_free(_filenames); eina_hash_free(_tfilenames); eina_shutdown(); diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index
Re: [E-devel] [EGIT] [core/efl] master 01/01: eolian: prevent freeing of full named structures that are inside of typedefs and fix a memory leak
Too long of a summary line. Please keep them short. -- Tom. On 22/07/14 10:52, Daniel Zaoui wrote: Hi D5, Your commit message is not enough long :P. D2 On 07/22/2014 12:46 PM, Daniel Kolesa wrote: q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ccf157aa574151ca488d027fe5d38b2bdd7d4e91 commit ccf157aa574151ca488d027fe5d38b2bdd7d4e91 Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 10:39:34 2014 +0100 eolian: prevent freeing of full named structures that are inside of typedefs and fix a memory leak --- src/lib/eolian/database_type.c | 43 ++-- src/lib/eolian/eolian_database.c | 2 +- src/lib/eolian/eolian_database.h | 5 +++-- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c index 60353df..20f4d60 100644 --- a/src/lib/eolian/database_type.c +++ b/src/lib/eolian/database_type.c @@ -6,28 +6,33 @@ void database_type_del(Eolian_Type *tp) { if (!tp) return; - if (tp-type == EOLIAN_TYPE_POINTER || tp-type == EOLIAN_TYPE_FUNCTION) - { -Eolian_Type *stp; -if (tp-subtypes) EINA_LIST_FREE(tp-subtypes, stp) - database_type_del(stp); -if (tp-base_type) - database_type_del(tp-base_type); - } - else - { -const char *sp; -if (tp-name) eina_stringshare_del(tp-name); -if (tp-full_name) eina_stringshare_del(tp-full_name); -if (tp-fields) eina_hash_free(tp-fields); -if (tp-namespaces) EINA_LIST_FREE(tp-namespaces, sp) - eina_stringshare_del(sp); -if (tp-comment) eina_stringshare_del(tp-comment); -if (tp-file) eina_stringshare_del(tp-file); - } + const char *sp; + Eolian_Type *stp; + if (tp-subtypes) EINA_LIST_FREE(tp-subtypes, stp) + database_type_del(stp); + if (tp-base_type) + database_type_del(tp-base_type); + if (tp-name) eina_stringshare_del(tp-name); + if (tp-full_name) eina_stringshare_del(tp-full_name); + if (tp-fields) eina_hash_free(tp-fields); + if (tp-namespaces) EINA_LIST_FREE(tp-namespaces, sp) + eina_stringshare_del(sp); + if (tp-comment) eina_stringshare_del(tp-comment); + if (tp-file) eina_stringshare_del(tp-file); free(tp); } +void +database_typedef_del(Eolian_Type *tp) +{ + if (!tp) return; + Eolian_Type *btp = tp-base_type; + /* prevent deletion of named structs as they're deleted later on */ + if (btp btp-type == EOLIAN_TYPE_STRUCT btp-name) + tp-base_type = NULL; + database_type_del(tp); +} + Eina_Bool database_type_add(Eolian_Type *def) { diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index 081e5fc..958c5f1 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -15,7 +15,7 @@ database_init() { if (_database_init_count 0) return ++_database_init_count; eina_init(); - _aliases = eina_hash_stringshared_new(EINA_FREE_CB(database_type_del)); + _aliases = eina_hash_stringshared_new(EINA_FREE_CB(database_typedef_del)); _structs = eina_hash_stringshared_new(EINA_FREE_CB(database_type_del)); _filenames = eina_hash_string_small_new(free); _tfilenames = eina_hash_string_small_new(free); diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index 13c5125..ac379a8 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -146,8 +146,9 @@ int database_shutdown(); /* types */ Eina_Bool database_type_add(Eolian_Type *def); -Eina_Bool database_struct_add(Eolian_Type *type); -void database_type_del(Eolian_Type *type); +Eina_Bool database_struct_add(Eolian_Type *tp); +void database_type_del(Eolian_Type *tp); +void database_typedef_del(Eolian_Type *tp); void database_type_print(Eolian_Type *type); void database_type_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name); -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it
[EGIT] [core/efl] master 01/01: eolian: structs and aliases now contain line/column info for better error messages
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f487d44011ef581b6dd571ef11774247f3ebdafb commit f487d44011ef581b6dd571ef11774247f3ebdafb Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 14:48:08 2014 +0100 eolian: structs and aliases now contain line/column info for better error messages --- src/lib/eolian/eo_parser.c | 57 +++- src/lib/eolian/eolian_database.h | 1 + 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 60c8bc3..1bf3bac 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -84,6 +84,17 @@ check_match(Eo_Lexer *ls, int what, int who, int where, int col) } } +static void +redef_error(Eo_Lexer *ls, const char *type, const char *name, int line, +int column) +{ + char buf[256]; + snprintf(buf, sizeof(buf), +%s '%s' redefined (originally at line %d at column %d), +type, name, line, column); + eo_lexer_syntax_error(ls, buf); +} + static Eina_Strbuf * push_strbuf(Eo_Lexer *ls) { @@ -269,9 +280,10 @@ _struct_field_free(Eolian_Struct_Field *def) } static Eolian_Type * -parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool is_extern) +parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool is_extern, + int line, int column) { - int line = ls-line_number, column = ls-column; + int bline = ls-line_number, bcolumn = ls-column; Eolian_Type *def = push_type(ls); def-is_extern = is_extern; def-file = get_filename(ls); @@ -308,7 +320,9 @@ parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool is_extern) eo_lexer_get(ls); } } - check_match(ls, '}', '{', line, column); + check_match(ls, '}', '{', bline, bcolumn); + def-line = line; + def-column = column; if (name) database_struct_add(def); return def; } @@ -367,7 +381,7 @@ parse_type_struct(Eo_Lexer *ls, Eina_Bool allow_struct, Eina_Bool allow_anon) { if (is_extern) eo_lexer_syntax_error(ls, extern anonymous struct); - return parse_struct(ls, NULL, EINA_FALSE); + return parse_struct(ls, NULL, EINA_FALSE, 0, 0); } /* todo: see typedef */ buf = push_strbuf(ls); @@ -378,13 +392,16 @@ parse_type_struct(Eo_Lexer *ls, Eina_Bool allow_struct, Eina_Bool allow_anon) pop_strbuf(ls); if (ls-t.token == '{') { - if (eina_hash_find(_structs, sname)) + Eolian_Type *tp = (Eolian_Type*)eina_hash_find(_structs, + sname); + if (tp) { ls-line_number = line; ls-column = col; - eo_lexer_syntax_error(ls, struct redefinition); + eina_stringshare_del(sname); + redef_error(ls, struct, sname, tp-line, tp-column); } - return parse_struct(ls, sname, is_extern); + return parse_struct(ls, sname, is_extern, line, col); } } else @@ -467,7 +484,6 @@ parse_typedef(Eo_Lexer *ls) Eolian_Type *def = push_type(ls); Eina_Bool is_extern = EINA_FALSE; Eina_Strbuf *buf; - int line, col; eo_lexer_get(ls); if (ls-t.kw == KW_at_extern) { @@ -477,16 +493,17 @@ parse_typedef(Eo_Lexer *ls) def-type = EOLIAN_TYPE_ALIAS; def-is_extern = is_extern; buf = push_strbuf(ls); - line = ls-line_number; - col = ls-column; + def-line = ls-line_number; + def-column = ls-column; parse_name(ls, buf); _fill_type_name(def, eina_stringshare_add(eina_strbuf_string_get(buf))); /* todo: store info about the previous definition and mention it here */ - if (eina_hash_find(_aliases, eina_strbuf_string_get(buf))) + Eolian_Type *tp = (Eolian_Type*)eina_hash_find(_aliases, def-full_name); + if (tp) { -ls-line_number = line; -ls-column = col; -eo_lexer_syntax_error(ls, type alias redefinition); +ls-line_number = def-line; +ls-column = def-column; +redef_error(ls, type alias, def-full_name, tp-line, tp-column); } def-file = get_filename(ls); (void)!!test_next(ls, ':'); @@ -1141,6 +1158,7 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot) { int line, col; const char *name; + Eolian_Type *tp; Eina_Bool is_extern = EINA_FALSE; Eina_Strbuf *buf; eo_lexer_get(ls); @@ -1153,16 +1171,19 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot) line = ls-line_number; col = ls-column; parse_name(ls, buf); + name = eina_stringshare_add(eina_strbuf_string_get(buf));
[EGIT] [core/efl] master 01/01: eolian: include file info in redef errors when different file
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cbd54f4de042bbd2928fea516cb8bbb92d667a1b commit cbd54f4de042bbd2928fea516cb8bbb92d667a1b Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 15:01:09 2014 +0100 eolian: include file info in redef errors when different file --- src/lib/eolian/eo_parser.c | 36 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 1bf3bac..35e753c 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -77,24 +77,13 @@ check_match(Eo_Lexer *ls, int what, int who, int where, int col) eo_lexer_token_to_str(what, tbuf); eo_lexer_token_to_str(who , vbuf); snprintf(buf, sizeof(buf), - '%s' expected (to close '%s' at line %d at column %d), + '%s' expected (to close '%s' at line %d, column %d), tbuf, vbuf, where, col); eo_lexer_syntax_error(ls, buf); } } } -static void -redef_error(Eo_Lexer *ls, const char *type, const char *name, int line, -int column) -{ - char buf[256]; - snprintf(buf, sizeof(buf), -%s '%s' redefined (originally at line %d at column %d), -type, name, line, column); - eo_lexer_syntax_error(ls, buf); -} - static Eina_Strbuf * push_strbuf(Eo_Lexer *ls) { @@ -146,6 +135,22 @@ get_filename(Eo_Lexer *ls) return file; } +static void +redef_error(Eo_Lexer *ls, Eolian_Type_Type type, Eolian_Type *old) +{ + char buf[256]; + char fbuf[256] = { '\0' }; + const char *file = get_filename(ls); + if (file != old-file) + snprintf(fbuf, sizeof(fbuf), in file '%s', old-file); + eina_stringshare_del(file); + snprintf(buf, sizeof(buf), +%s '%s' redefined (originally at line %d, column %d%s), +(type == EOLIAN_TYPE_STRUCT) ? struct : type alias, +old-full_name, old-line, old-column, fbuf); + eo_lexer_syntax_error(ls, buf); +} + static Eina_Strbuf * parse_name(Eo_Lexer *ls, Eina_Strbuf *buf) { @@ -399,7 +404,7 @@ parse_type_struct(Eo_Lexer *ls, Eina_Bool allow_struct, Eina_Bool allow_anon) ls-line_number = line; ls-column = col; eina_stringshare_del(sname); - redef_error(ls, struct, sname, tp-line, tp-column); + redef_error(ls, EOLIAN_TYPE_STRUCT, tp); } return parse_struct(ls, sname, is_extern, line, col); } @@ -503,7 +508,7 @@ parse_typedef(Eo_Lexer *ls) { ls-line_number = def-line; ls-column = def-column; -redef_error(ls, type alias, def-full_name, tp-line, tp-column); +redef_error(ls, EOLIAN_TYPE_ALIAS, tp); } def-file = get_filename(ls); (void)!!test_next(ls, ':'); @@ -1179,8 +1184,7 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot) ls-line_number = line; ls-column = col; eina_stringshare_del(name); -redef_error(ls, struct, eina_strbuf_string_get(buf), -tp-line, tp-column); +redef_error(ls, EOLIAN_TYPE_STRUCT, tp); } pop_strbuf(ls); parse_struct(ls, name, is_extern, line, col); --
[EGIT] [core/efl] master 01/01: evas: do check visibility flag early to not propagate show/hide when not needed.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0daff5e524372003f4c0b6f05db284fccfb8ea3a commit 0daff5e524372003f4c0b6f05db284fccfb8ea3a Author: Cedric BAIL c.b...@partner.samsung.com Date: Tue Jul 22 16:10:19 2014 +0200 evas: do check visibility flag early to not propagate show/hide when not needed. This should be a proper fix instead of D1217 --- src/lib/evas/canvas/evas_object_main.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index e8975c8..97d6bec 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -1148,15 +1148,15 @@ _show(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { if (!obj-layer) return; if (obj-delete_me) return; + if (obj-cur-visible) + { +return; + } if (evas_object_intercept_call_show(eo_obj, obj)) return; if (obj-is_smart) { eo_do(eo_obj, evas_obj_smart_show()); } - if (obj-cur-visible) - { -return; - } EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur) { state_write-visible = 1; @@ -1197,16 +1197,16 @@ _hide(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) MAGIC_CHECK_END(); if (!obj-layer) return; if (obj-delete_me) return; - if (evas_object_intercept_call_hide(eo_obj, obj)) return; - if (obj-is_smart) - { -eo_do(eo_obj, evas_obj_smart_hide()); - } if (!obj-cur-visible) { return; } - + if (evas_object_intercept_call_hide(eo_obj, obj)) return; + if (obj-is_smart) + { +eo_do(eo_obj, evas_obj_smart_hide()); + } + EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur) { state_write-visible = 0; --
[EGIT] [apps/terminology] master 01/01: Don't show the miniview by default
sachiel pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=f08f457697a41014ae7d61bff671d1750579be27 commit f08f457697a41014ae7d61bff671d1750579be27 Author: Iván Briano ivan.bri...@intel.com Date: Tue Jul 22 11:18:05 2014 -0300 Don't show the miniview by default This object will be swallowed into the theme and that's how its visibility should be controlled. But in the case that the user's theme doesn't have the right part, we are left with a dangling object floating in a corner and visible when it shouldn't be. --- src/bin/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/bin/main.c b/src/bin/main.c index b9b5f43..f6f099c 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -2262,7 +2262,6 @@ main_term_new(Win *wn, Config *config, const char *cmd, term-miniview = o = miniview_add(wn-win, term-term); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_fill_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_show(o); o = term-term; --
[EGIT] [core/efl] master 01/01: eolian: lexer line context push/pop/restore/clear
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4f1f182a89a605b1e8df3293ffb416ba5c105233 commit 4f1f182a89a605b1e8df3293ffb416ba5c105233 Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 15:27:11 2014 +0100 eolian: lexer line context push/pop/restore/clear --- src/lib/eolian/eo_lexer.c | 43 ++- src/lib/eolian/eo_lexer.h | 14 ++ src/lib/eolian/eo_parser.c | 43 +-- 3 files changed, 81 insertions(+), 19 deletions(-) diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c index 341d2c0..995fce1 100644 --- a/src/lib/eolian/eo_lexer.c +++ b/src/lib/eolian/eo_lexer.c @@ -600,6 +600,8 @@ eo_lexer_free(Eo_Lexer *ls) if (ls-buff ) eina_strbuf_free(ls-buff); if (ls-handle) eina_file_close (ls-handle); + eo_lexer_context_clear(ls); + EINA_LIST_FREE(ls-nodes, nd) { switch (nd-type) @@ -661,7 +663,11 @@ eo_lexer_lookahead(Eo_Lexer *ls) { assert (ls-lookahead.token 0); ls-lookahead.kw = 0; - return (ls-lookahead.token = lex(ls, ls-lookahead)); + eo_lexer_context_push(ls); + ls-lookahead.token = lex(ls, ls-lookahead); + eo_lexer_context_restore(ls); + eo_lexer_context_pop(ls); + return ls-lookahead.token; } void @@ -753,3 +759,38 @@ eo_lexer_shutdown() } return _init_counter; } + +void +eo_lexer_context_push(Eo_Lexer *ls) +{ + Lexer_Ctx *ctx = malloc(sizeof(Lexer_Ctx)); + ctx-line = ls-line_number; + ctx-column = ls-column; + ctx-linestr = ls-stream_line; + ls-saved_ctxs = eina_list_prepend(ls-saved_ctxs, ctx); +} + +void +eo_lexer_context_pop(Eo_Lexer *ls) +{ + Lexer_Ctx *ctx = (Lexer_Ctx*)eina_list_data_get(ls-saved_ctxs); + free(ctx); + ls-saved_ctxs = eina_list_remove_list(ls-saved_ctxs, ls-saved_ctxs); +} + +void +eo_lexer_context_restore(Eo_Lexer *ls) +{ + if (!eina_list_count(ls-saved_ctxs)) return; + Lexer_Ctx *ctx = (Lexer_Ctx*)eina_list_data_get(ls-saved_ctxs); + ls-line_number = ctx-line; + ls-column = ctx-column; + ls-stream_line = ctx-linestr; +} + +void +eo_lexer_context_clear(Eo_Lexer *ls) +{ + Lexer_Ctx *ctx; + EINA_LIST_FREE(ls-saved_ctxs, ctx) free(ctx); +} diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h index c3941a6..90b6d65 100644 --- a/src/lib/eolian/eo_lexer.h +++ b/src/lib/eolian/eo_lexer.h @@ -110,6 +110,12 @@ typedef struct _Eo_Node }; } Eo_Node; +typedef struct _Lexer_Ctx +{ + int line, column; + const char *linestr; +} Lexer_Ctx; + /* keeps all lexer state */ typedef struct _Eo_Lexer { @@ -147,6 +153,9 @@ typedef struct _Eo_Lexer /* this is jumped to when an error happens */ jmp_buf err_jmp; + /* saved context info */ + Eina_List *saved_ctxs; + /* represents the results of parsing */ Eina_List *nodes; /* represents the temporaries, every object that is allocated by the @@ -180,6 +189,11 @@ const char *eo_lexer_keyword_str_get(int kw); Eina_Bool eo_lexer_is_type_keyword(int kw); /* gets the C type name for a builtin type name - e.g. uchar - unsigned char */ const char *eo_lexer_get_c_type (int kw); +/* save, restore and clear context (line, column, line string) */ +void eo_lexer_context_push (Eo_Lexer *ls); +void eo_lexer_context_pop(Eo_Lexer *ls); +void eo_lexer_context_restore(Eo_Lexer *ls); +void eo_lexer_context_clear (Eo_Lexer *ls); extern int _eo_lexer_log_dom; #ifdef CRITICAL diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 35e753c..7af32c6 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -220,14 +220,15 @@ static Eolian_Type *parse_type_struct(Eo_Lexer *ls, Eina_Bool allow_struct, static Eolian_Type * parse_type(Eo_Lexer *ls) { - int line = ls-line_number, column = ls-column; - Eolian_Type *ret = parse_type_void(ls); + Eolian_Type *ret; + eo_lexer_context_push(ls); + ret = parse_type_void(ls); if (ret-type == EOLIAN_TYPE_VOID) { -ls-line_number = line; -ls-column = column; +eo_lexer_context_restore(ls); eo_lexer_syntax_error(ls, non-void type expected); } + eo_lexer_context_pop(ls); return ret; } @@ -235,14 +236,15 @@ static Eolian_Type * parse_type_struct_nonvoid(Eo_Lexer *ls, Eina_Bool allow_struct, Eina_Bool allow_anon) { - int line = ls-line_number, column = ls-column; - Eolian_Type *ret = parse_type_struct(ls, allow_struct, allow_anon); + Eolian_Type *ret; + eo_lexer_context_push(ls); + ret = parse_type_struct(ls, allow_struct, allow_anon); if (ret-type == EOLIAN_TYPE_VOID) { -ls-line_number = line; -ls-column = column; +eo_lexer_context_restore(ls); eo_lexer_syntax_error(ls, non-void type expected); } + eo_lexer_context_pop(ls); return ret; } @@ -355,18 +357,19 @@ parse_type_struct(Eo_Lexer *ls,
Re: [E-devel] [EGIT] [core/elementary] master 01/01: map: Add missing legacy API into legacy header
OK, it's temporary fix. I will add it into EO class ASAP. :) 2014-07-22 17:14 GMT+09:00 Carsten Haitzler ras...@rasterman.com: On Tue, 22 Jul 2014 09:14:15 +0300 Daniel Zaoui daniel.za...@samsung.com said: Hi Tae-Hwan, I don't think it is the good fix. The .eo file should describe this function, so Eolian could generate the legacy header for free. Well, I have to admit I may have forgot this function during the porting :-) for now this will do.. until it goes into the eo file. :) D2, alias me. On 07/22/2014 08:35 AM, Tae-Hwan Kim wrote: raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=cfdaffb8cf65ab0a934de2efb513e66989b4bad6 commit cfdaffb8cf65ab0a934de2efb513e66989b4bad6 Author: Tae-Hwan Kim the81@samsung.com Date: Tue Jul 22 14:14:34 2014 +0900 map: Add missing legacy API into legacy header Summary: @fix Reviewers: raster Reviewed By: raster Differential Revision: https://phab.enlightenment.org/D1164 --- src/lib/elm_map_legacy.h | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_map_legacy.h b/src/lib/elm_map_legacy.h index ca34589..4c7aff2 100644 --- a/src/lib/elm_map_legacy.h +++ b/src/lib/elm_map_legacy.h @@ -10,4 +10,22 @@ */ EAPI Evas_Object *elm_map_add(Evas_Object *parent); -#include elm_map.eo.legacy.h \ No newline at end of file +/** + * @internal + * + * @brief Requests a list of addresses corresponding to a given name. + * + * @since 1.8 + * + * @remarks This is used if you want to search the address from a name. + * + * @param obj The map object + * @param address The address + * @param name_cb The callback function + * @param data The user callback data + * + * @ingroup Map + */ +EAPI void elm_map_name_search(const Evas_Object *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data); + +#include elm_map.eo.legacy.h -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- BRs, Kim. -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 01/01: eolian: use @protected syntax as per wiki
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ab8fe63afa5f28649295d78e4ce1c428e1135211 commit ab8fe63afa5f28649295d78e4ce1c428e1135211 Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 16:35:54 2014 +0100 eolian: use @protected syntax as per wiki --- src/lib/eolian/eo_lexer.h | 8 src/lib/eolian/eo_parser.c | 15 --- src/tests/eolian/data/scope.eo | 4 ++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h index 90b6d65..f9607d7 100644 --- a/src/lib/eolian/eo_lexer.h +++ b/src/lib/eolian/eo_lexer.h @@ -18,15 +18,15 @@ enum Tokens /* all keywords in eolian, they can still be used as names (they're TOK_VALUE) * they just fill in the kw field of the token */ -#define KEYWORDS KW(class), KW(const), KW(private), KW(protected), \ -KW(return), KW(signed), KW(struct), KW(unsigned), KW(virtual), \ +#define KEYWORDS KW(class), KW(const), KW(private), KW(return), KW(signed), \ +KW(struct), KW(unsigned), KW(virtual), \ \ KW(abstract), KW(constructor), KW(constructors), KW(data), \ KW(destructor), KW(eo_prefix), KW(events), KW(func), KW(get), \ KW(implements), KW(interface), KW(keys), KW(legacy), KW(legacy_prefix), \ KW(methods), KW(mixin), KW(own), KW(params), KW(properties), KW(set), \ -KW(type), KW(values), KWAT(extern), KWAT(in), KWAT(inout), KWAT(nonull), \ -KWAT(out), KWAT(warn_unused), \ +KW(type), KW(values), KWAT(const), KWAT(extern), KWAT(in), KWAT(inout), \ +KWAT(nonull), KWAT(out), KWAT(protected), KWAT(warn_unused), \ \ KW(byte), KW(ubyte), KW(char), KW(short), KW(ushort), KW(int), KW(uint), \ KW(long), KW(ulong), KW(llong), KW(ullong), \ diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 7af32c6..21ec998 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -715,13 +715,14 @@ parse_property(Eo_Lexer *ls) has_keys = EINA_FALSE, has_values = EINA_FALSE; prop = calloc(1, sizeof(Eo_Property_Def)); ls-tmp.prop = prop; - if (ls-t.kw == KW_protected) + check(ls, TOK_VALUE); + prop-name = eina_stringshare_ref(ls-t.value); + eo_lexer_get(ls); + if (ls-t.kw == KW_at_protected) { prop-scope = EOLIAN_SCOPE_PROTECTED; eo_lexer_get(ls); } - prop-name = eina_stringshare_ref(ls-t.value); - eo_lexer_get(ls); line = ls-line_number; col = ls-column; check_next(ls, '{'); @@ -778,14 +779,14 @@ parse_method(Eo_Lexer *ls, Eina_Bool ctor) } else { -if (ls-t.kw == KW_protected) +check(ls, TOK_VALUE); +meth-name = eina_stringshare_ref(ls-t.value); +eo_lexer_get(ls); +if (ls-t.kw == KW_at_protected) { meth-scope = EOLIAN_SCOPE_PROTECTED; eo_lexer_get(ls); } -check(ls, TOK_VALUE); -meth-name = eina_stringshare_ref(ls-t.value); -eo_lexer_get(ls); } line = ls-line_number; col = ls-column; diff --git a/src/tests/eolian/data/scope.eo b/src/tests/eolian/data/scope.eo index 40dfed4..fe5045c 100644 --- a/src/tests/eolian/data/scope.eo +++ b/src/tests/eolian/data/scope.eo @@ -1,6 +1,6 @@ class Simple { properties { - protected a { + a @protected { get { } } @@ -16,7 +16,7 @@ class Simple { methods { foo { } - protected bar { + bar @protected { } foobar { } --
[EGIT] [core/elementary] master 01/01: update according to EFL
q66 pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=5031c8f20fc0a3a1a2b9f547816030fa41be5556 commit 5031c8f20fc0a3a1a2b9f547816030fa41be5556 Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 16:36:29 2014 +0100 update according to EFL --- src/lib/elm_interface_atspi_accessible.eo| 20 - src/lib/elm_interface_atspi_action.eo| 12 +-- src/lib/elm_interface_atspi_component.eo | 16 +++--- src/lib/elm_interface_atspi_editable_text.eo | 14 ++-- src/lib/elm_interface_atspi_image.eo | 4 ++-- src/lib/elm_interface_atspi_selection.eo | 16 +++--- src/lib/elm_interface_atspi_text.eo | 32 ++-- src/lib/elm_interface_atspi_value.eo | 6 +++--- src/lib/elm_interface_atspi_widget_action.eo | 2 +- 9 files changed, 61 insertions(+), 61 deletions(-) diff --git a/src/lib/elm_interface_atspi_accessible.eo b/src/lib/elm_interface_atspi_accessible.eo index f7e3a2b..1bd61ba 100644 --- a/src/lib/elm_interface_atspi_accessible.eo +++ b/src/lib/elm_interface_atspi_accessible.eo @@ -4,7 +4,7 @@ mixin Elm_Interface_Atspi_Accessible () eo_prefix: elm_interface_atspi_accessible; data: null; properties { - protected localized_role_name { + localized_role_name @protected { get { /*@ Gets an localized string describing ATSPI widget role name. */ } @@ -12,7 +12,7 @@ mixin Elm_Interface_Atspi_Accessible () const(char)* localized_name; } } - protected name { + name @protected { get { /*@ Gets an string describing ATSPI widget role name. */ } @@ -22,7 +22,7 @@ mixin Elm_Interface_Atspi_Accessible () const(char)* name; /*@ obj name */ } } - protected relation_set { + relation_set @protected { get { /*@ Gets an string describing ATSPI widget role name. Lists and elements Should be free by a user. */ @@ -31,7 +31,7 @@ mixin Elm_Interface_Atspi_Accessible () Eina_List *relations; } } - protected role { + role @protected { get { /*@ Gets the role of the widget in ATSPI Accessibility domain. */ } @@ -41,7 +41,7 @@ mixin Elm_Interface_Atspi_Accessible () Elm_Atspi_Role role; } } - protected children { + children @protected { get { /*@ Gets widget's accessible children. */ } @@ -49,7 +49,7 @@ mixin Elm_Interface_Atspi_Accessible () Eina_List *children; } } - protected role_name { + role_name @protected { get { /*@ Gets human-readable string indentifying widget accessibility role. */ @@ -58,7 +58,7 @@ mixin Elm_Interface_Atspi_Accessible () const(char)* role_name; } } - protected attributes { + attributes @protected { get { /*@ Gets key-value pairs indentifying widget extra attributes. Must be free by a user. */ @@ -67,7 +67,7 @@ mixin Elm_Interface_Atspi_Accessible () Eina_List *attributes; } } - protected index_in_parent { + index_in_parent @protected { get { /*@ Gets index of the child in parent's children list. */ } @@ -86,7 +86,7 @@ mixin Elm_Interface_Atspi_Accessible () const(char)* description; } } - protected parent { + parent @protected { get { /*@ Gets widget accessible parent. */ } @@ -97,7 +97,7 @@ mixin Elm_Interface_Atspi_Accessible () Eo *parent; } } - protected state_set { + state_set @protected { get { /*@ Gets set describing widget accessible states. */ } diff --git a/src/lib/elm_interface_atspi_action.eo b/src/lib/elm_interface_atspi_action.eo index b1b4354..0f876e7 100644 --- a/src/lib/elm_interface_atspi_action.eo +++ b/src/lib/elm_interface_atspi_action.eo @@ -4,7 +4,7 @@ mixin Elm_Interface_Atspi_Action () eo_prefix: elm_interface_atspi_action; data: null; properties { - protected name { + name @protected { get { /*@ Gets action name for given id */ } @@ -15,7 +15,7 @@ mixin Elm_Interface_Atspi_Action () int id; } } - protected localized_name { + localized_name @protected { get { /*@ Gets localized action name for given id */ } @@ -26,7 +26,7 @@ mixin Elm_Interface_Atspi_Action () int id; } } - protected description { + description @protected { get { /*@ Gets action description for given id */ } @@ -41,7 +41,7 @@ mixin
[EGIT] [apps/terminology] master 01/01: theme: align transparency msg formatting with default theme
huchi pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=508fad6a85b0307466919f204d0d0228e532a7cb commit 508fad6a85b0307466919f204d0d0228e532a7cb Author: Wonguk Jeong wonguk.je...@samsung.com Date: Wed Jul 23 00:49:43 2014 +0900 theme: align transparency msg formatting with default theme --- data/themes/mild.edc| 6 +++--- data/themes/nyanology/default.edc | 4 ++-- data/themes/nyanology/nyanology.edc | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/themes/mild.edc b/data/themes/mild.edc index c976b34..43e31c8 100644 --- a/data/themes/mild.edc +++ b/data/themes/mild.edc @@ -43,9 +43,9 @@ collections { public message(Msg_Type:type, id, ...) { new r, g, b, a, v; -if (type != MSG_INT || id != 1) return; +if ((type != MSG_INT) || (id != 1)) return; -v = getarg(2) * 255 / 100; +v = (getarg(2) * 255) / 100; custom_state(PART:base, default, 0.0); get_state_val(PART:base, STATE_COLOR, r, g, b, a); @@ -1276,7 +1276,7 @@ collections { } script { public message(Msg_Type:type, id, ...) { - if (type != MSG_INT || id != 1) return; + if ((type != MSG_INT) || (id != 1)) return; if (getarg(2) 100) set_state(PART:fill, translucent, 0.0); diff --git a/data/themes/nyanology/default.edc b/data/themes/nyanology/default.edc index 8515657..cb04970 100644 --- a/data/themes/nyanology/default.edc +++ b/data/themes/nyanology/default.edc @@ -20,9 +20,9 @@ collections { public message(Msg_Type:type, id, ...) { new r, g, b, a, v; -if (type != MSG_INT || id != 1) return; +if ((type != MSG_INT) || (id != 1)) return; -v = getarg(2) * 255 / 100; +v = (getarg(2) * 255) / 100; custom_state(PART:shadow, default, 0.0); get_state_val(PART:shadow, STATE_COLOR, r, g, b, a); diff --git a/data/themes/nyanology/nyanology.edc b/data/themes/nyanology/nyanology.edc index bbbe90e..9c63bdd 100644 --- a/data/themes/nyanology/nyanology.edc +++ b/data/themes/nyanology/nyanology.edc @@ -16,9 +16,9 @@ collections { public message(Msg_Type:type, id, ...) { new r, g, b, a, v; -if (type != MSG_INT || id != 1) return; +if ((type != MSG_INT) || (id != 1)) return; -v = getarg(2) * 255 / 100; +v = (getarg(2) * 255) / 100; custom_state(PART:base, default, 0.0); get_state_val(PART:base, STATE_COLOR, r, g, b, a); --
[EGIT] [core/elementary] master 01/01: update according to eolian changes
q66 pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=1eb9c4f87dc534fd92aebc15731078a691bdf805 commit 1eb9c4f87dc534fd92aebc15731078a691bdf805 Author: Daniel Kolesa d.kol...@samsung.com Date: Tue Jul 22 17:13:52 2014 +0100 update according to eolian changes --- src/lib/elm_calendar.eo| 8 ++-- src/lib/elm_datetime.eo| 20 +--- src/lib/elm_dayselector.eo | 8 ++-- src/lib/elm_entry.eo | 12 +++- src/lib/elm_gengrid.eo | 8 ++-- src/lib/elm_genlist.eo | 8 ++-- src/lib/elm_hover.eo | 4 +--- src/lib/elm_index.eo | 4 +--- src/lib/elm_layout.eo | 20 +--- src/lib/elm_list.eo| 4 +--- src/lib/elm_map.eo | 23 ++- src/lib/elm_photo.eo | 3 +-- src/lib/elm_prefs.eo | 16 src/lib/elm_progressbar.eo | 4 +--- src/lib/elm_scroller.eo| 8 ++-- src/lib/elm_segment_control.eo | 12 +++- src/lib/elm_slideshow.eo | 4 +--- src/lib/elm_table.eo | 4 +--- src/lib/elm_toolbar.eo | 8 ++-- src/lib/elm_web.eo | 4 +--- src/lib/elm_widget.eo | 33 +++-- 21 files changed, 57 insertions(+), 158 deletions(-) diff --git a/src/lib/elm_calendar.eo b/src/lib/elm_calendar.eo index 0612484..0d30bca 100644 --- a/src/lib/elm_calendar.eo +++ b/src/lib/elm_calendar.eo @@ -268,7 +268,7 @@ class Elm_Calendar (Elm_Layout) @in struct tm *selected_time; /*@ A @b tm struct to represent the selected date. */ } } - selected_time_get { + selected_time_get @const { /*@ Get selected date. @@ -285,8 +285,6 @@ class Elm_Calendar (Elm_Layout) @ref calendar_example_05 @ingroup Calendar */ - - const; return bool; params { @inout struct tm selected_time; /*@ A @b tm struct to point to selected date */ @@ -376,7 +374,7 @@ class Elm_Calendar (Elm_Layout) @ingroup Calendar */ } - displayed_time_get { + displayed_time_get @const { /*@ Get the current time displayed in the widget @@ -385,8 +383,6 @@ class Elm_Calendar (Elm_Layout) @ingroup Calendar @since 1.8 */ - - const; return bool; params { @inout struct tm displayed_time; /*@ A @b tm struct to point to displayed date */ diff --git a/src/lib/elm_datetime.eo b/src/lib/elm_datetime.eo index 4f44c2f..c3dd022 100644 --- a/src/lib/elm_datetime.eo +++ b/src/lib/elm_datetime.eo @@ -107,7 +107,7 @@ class Elm_Datetime (Elm_Layout) @in int max; /*@ Reference to field's maximum value */ } } - field_limit_get { + field_limit_get @const { /*@ @brief Get the field limits of a field. @@ -120,8 +120,6 @@ class Elm_Datetime (Elm_Layout) @see elm_datetime_field_limit_set() @ingroup Datetime */ - - const; params { @in Elm_Datetime_Field_Type fieldtype; /*@ Type of the field. ELM_DATETIME_YEAR etc. */ @out int min; /*@ Reference to field's minimum value */ @@ -153,7 +151,7 @@ class Elm_Datetime (Elm_Layout) @in const(struct tm)* mintime; /*@ Time structure containing the minimum time value. */ } } - value_min_get { + value_min_get @const { /*@ @brief Get the lower boundary of a field. @@ -172,8 +170,6 @@ class Elm_Datetime (Elm_Layout) @see elm_datetime_value_min_set() @ingroup Datepicker */ - - const; return bool; params { @inout struct tm mintime; /*@ Time structure. */ @@ -205,7 +201,7 @@ class Elm_Datetime (Elm_Layout) @in const(struct tm)* newtime; /*@ Time structure filled with values to be set. */ } } - value_get { + value_get @const { /*@ @brief Get the current value of a Datetime object. @@ -224,8 +220,6 @@ class Elm_Datetime (Elm_Layout) @see elm_datetime_value_set() @ingroup Datetime */ - - const; return bool; params { @inout struct tm currtime; /*@ Time structure. */ @@ -251,7 +245,7 @@ class Elm_Datetime (Elm_Layout) @in bool visible; /*@ @c EINA_TRUE field can be visible, @c EINA_FALSE otherwise. */ } } - field_visible_get { + field_visible_get @const { /*@ @brief Get whether a field can be visible/not @@ -259,8 +253,6 @@ class Elm_Datetime (Elm_Layout) @see elm_datetime_field_visible_set() @ingroup Datetime */ - - const; return bool; params { @in Elm_Datetime_Field_Type fieldtype; /*@ Type of the
[EGIT] [misc/polkit-efl] master 01/01: Try to make helper path detection saner
kuuko pushed a commit to branch master. http://git.enlightenment.org/misc/polkit-efl.git/commit/?id=d7551384fa52218881f9b3b087afa56fe279b1f6 commit d7551384fa52218881f9b3b087afa56fe279b1f6 Author: Kai Huuhko kai.huu...@gmail.com Date: Tue Jul 22 21:37:52 2014 +0300 Try to make helper path detection saner --- polkit-efl-authentication-agent-1 | 47 +++ 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/polkit-efl-authentication-agent-1 b/polkit-efl-authentication-agent-1 index 5874192..9c75ab8 100755 --- a/polkit-efl-authentication-agent-1 +++ b/polkit-efl-authentication-agent-1 @@ -19,8 +19,6 @@ AGENT_DBUS_PATH = /org/enlightenment/polkit/Agent AGENT_DBUS_NAME = org.enlightenment.polkit -POLKIT_HELPER_PREFIX = /usr/lib - import sys from datetime import datetime import logging @@ -79,28 +77,47 @@ FILL_HORIZ = EVAS_HINT_FILL, 0.5 pk_path_error = False +POLKIT_HELPER_PREFIX = +POLKIT_HELPER_LIBDIR = + -def data_cb(obj, ev): +def prefix_data_cb(obj, ev): global POLKIT_HELPER_PREFIX POLKIT_HELPER_PREFIX = ev.data.rstrip() +def libdir_data_cb(obj, ev): +global POLKIT_HELPER_LIBDIR +POLKIT_HELPER_LIBDIR = ev.data.rstrip() + + def error_cb(obj, ev): global pk_path_error log.error(Error: + ev.data) pk_path_error = True -call = Exe( +prefix_call = Exe( +pkg-config --variable prefix polkit-agent-1, +ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_WRITE | ECORE_EXE_PIPE_ERROR +) +prefix_call.on_data_event_add(prefix_data_cb) +prefix_call.on_error_event_add(error_cb) +prefix_call.on_del_event_add(lambda x, y: elementary.exit()) + +elementary.run() + +libdir_call = Exe( pkg-config --variable libdir polkit-agent-1, ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_WRITE | ECORE_EXE_PIPE_ERROR ) -call.on_data_event_add(data_cb) -call.on_error_event_add(error_cb) -call.on_del_event_add(lambda x, y: elementary.exit()) +libdir_call.on_data_event_add(libdir_data_cb) +libdir_call.on_error_event_add(error_cb) +libdir_call.on_del_event_add(lambda x, y: elementary.exit()) elementary.run() + if pk_path_error: -raise SystemExit +raise SystemExit(Error when getting prefix for agent helper binary) import os @@ -108,15 +125,17 @@ POLKIT_HELPER_PATH = for pk_name in polkit-1, policykit-1: path = os.path.join( -POLKIT_HELPER_PREFIX, pk_name, polkit-agent-helper-1 +POLKIT_HELPER_PREFIX, lib, pk_name, polkit-agent-helper-1 +) +if os.path.exists(path): +POLKIT_HELPER_PATH = path +break +path = os.path.join( +POLKIT_HELPER_LIBDIR, pk_name, polkit-agent-helper-1 ) if os.path.exists(path): POLKIT_HELPER_PATH = path -# XXX: Crappy hack for Fedora -elif POLKIT_HELPER_PREFIX.endswith(64): -path = path.replace(64, ) -if os.path.exists(path): -POLKIT_HELPER_PATH = path +break if not POLKIT_HELPER_PATH: raise SystemExit(Could not determine polkit helper path.) --
Re: [E-devel] [EGIT] [core/elementary] master 03/11: Added part_text_get/part_text_set and text_get/text_set to elm_button
2014-07-22 3:57 GMT+02:00 Felipe Magno de Almeida fel...@expertisesolutions.com.br: savio pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=a1f0348e68a683408e8d36067bc717006bb21eb7 commit a1f0348e68a683408e8d36067bc717006bb21eb7 Author: Felipe Magno de Almeida fel...@expertisesolutions.com.br Date: Wed Jul 16 17:34:05 2014 -0300 Added part_text_get/part_text_set and text_get/text_set to elm_button Added part_text_get/part_text_set and text_get/text_set to elm_button to eolianized API. ok, there are to options to choose from: 1. I did no understand nothing about how Eo works 2. This commit is totally wrong I'm quite sure the correct choose is the first one, but please explain me why. Shouldn't text_get/set functions be implemented in Layout? Why Buttton need to reimplement this? is not enough to put the function in the implement part of the .eo file? ...I'm quite confused davemds --- src/lib/elm_button.c | 20 src/lib/elm_button.eo | 66 +++ 2 files changed, 86 insertions(+) diff --git a/src/lib/elm_button.c b/src/lib/elm_button.c index d9376c08..6db3487 100644 --- a/src/lib/elm_button.c +++ b/src/lib/elm_button.c @@ -433,6 +433,26 @@ _elm_button_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSE return key_actions[0]; } +EOLIAN const char* _elm_button_part_text_get(Eo* obj, Elm_Button_Data* pd EINA_UNUSED, const char* part) +{ + return elm_object_part_text_get(obj, part); +} + +EOLIAN void _elm_button_part_text_set(Eo* obj, Elm_Button_Data* pd EINA_UNUSED, const char* part, const char* text) +{ + return elm_object_part_text_set(obj, part, text); +} + +EOLIAN const char* _elm_button_text_get(Eo* obj, Elm_Button_Data* pd EINA_UNUSED) +{ + return _elm_button_part_text_get(obj, pd, NULL); +} + +EOLIAN void _elm_button_text_set(Eo* obj, Elm_Button_Data* pd EINA_UNUSED, const char* text) +{ + return _elm_button_part_text_set(obj, pd, NULL, text); +} + static void _elm_button_class_constructor(Eo_Class *klass) { diff --git a/src/lib/elm_button.eo b/src/lib/elm_button.eo index 4e0d567..1b40c2d 100644 --- a/src/lib/elm_button.eo +++ b/src/lib/elm_button.eo @@ -96,6 +96,72 @@ class Elm_Button (Elm_Layout, Evas.Clickable_Interface, } } } + methods { + part_text_set { + /** +* Set a text of an object +* +* @param obj The Elementary object +* @param part The text part name to set (NULL for the default part) +* @param text The new text of the part +* +* @note Elementary objects may have many text parts (e.g. Action Slider) +* +* @ingroup General +*/ +params { + @in const(char)* part; + @in const(char)* text; +} + } + part_text_get { +/** + * Get a text of an object + * + * @param obj The Elementary object + * @param part The text part name to get (NULL for the default part) + * @return text of the part or NULL for any error + * + * @note Elementary objects may have many text parts (e.g. Action Slider) + * + * @ingroup General + */ +params { + @in const(char)* part; +} +return const(char)*; + } + text_set { + /** +* Set a text of an object +* +* @param obj The Elementary object +* @param part The text part name to set (NULL for the default part) +* @param text The new text of the part +* +* @note Elementary objects may have many text parts (e.g. Action Slider) +* +* @ingroup General +*/ +params { + @in const(char)* text; +} + } + text_get { +/** + * Get a text of an object + * + * @param obj The Elementary object + * @param part The text part name to get (NULL for the default part) + * @return text of the part or NULL for any error + * + * @note Elementary objects may have many text parts (e.g. Action Slider) + * + * @ingroup General + */ +return const(char)*; + } + } implements { class.constructor; Eo.Base.constructor; -- -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ enlightenment-devel mailing list
[EGIT] [apps/terminology] master 01/01: themes: remove edje_cc warning by adding ellipsis: -1;
billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=922940005a2faeb1dde2d16088f67f2bf08fa58d commit 922940005a2faeb1dde2d16088f67f2bf08fa58d Author: godfath3r galatsan...@gmail.com Date: Tue Jul 22 21:13:49 2014 +0200 themes: remove edje_cc warning by adding ellipsis: -1; Reviewers: billiob, Sachiel, raster Differential Revision: https://phab.enlightenment.org/D1218 --- data/themes/default.edc | 2 ++ data/themes/mild.edc| 2 ++ data/themes/nyanology/nyanology.edc | 2 ++ 3 files changed, 6 insertions(+) diff --git a/data/themes/default.edc b/data/themes/default.edc index e758974..cc40979 100644 --- a/data/themes/default.edc +++ b/data/themes/default.edc @@ -288,6 +288,7 @@ collections { text { font: Sans; size: 8; align: 1.0 0.5; min: 1 1; + ellipsis: -1; } } description { state: over 0.0; @@ -314,6 +315,7 @@ collections { text { font: Sans; size: 8; align: 1.0 0.5; min: 1 1; + ellipsis: -1; } } description { state: over 0.0; diff --git a/data/themes/mild.edc b/data/themes/mild.edc index 43e31c8..6021c0b 100644 --- a/data/themes/mild.edc +++ b/data/themes/mild.edc @@ -279,6 +279,7 @@ collections { text { font: Sans; size: 8; align: 1.0 0.5; min: 1 1; + ellipsis: -1; } } description { state: over 0.0; @@ -300,6 +301,7 @@ collections { text { font: Sans; size: 8; align: 1.0 0.5; min: 1 1; + ellipsis: -1; } } description { state: over 0.0; diff --git a/data/themes/nyanology/nyanology.edc b/data/themes/nyanology/nyanology.edc index 9c63bdd..1147999 100644 --- a/data/themes/nyanology/nyanology.edc +++ b/data/themes/nyanology/nyanology.edc @@ -148,6 +148,7 @@ collections { text { font: Sans; size: 8; align: 1.0 0.5; min: 1 1; + ellipsis: -1; } } description { state: over 0.0; @@ -174,6 +175,7 @@ collections { text { font: Sans; size: 8; align: 1.0 0.5; min: 1 1; + ellipsis: -1; } } description { state: over 0.0; --
[EGIT] [apps/epour] master 01/01: Fix logging when torrent cannot be opened
kuuko pushed a commit to branch master. http://git.enlightenment.org/apps/epour.git/commit/?id=2ef8bc3cf50819e9c7d12753457c3c32ee52e9f9 commit 2ef8bc3cf50819e9c7d12753457c3c32ee52e9f9 Author: Kai Huuhko kai.huu...@gmail.com Date: Tue Jul 22 22:44:08 2014 +0300 Fix logging when torrent cannot be opened --- epour/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epour/session.py b/epour/session.py index 37df9ff..a8e12b3 100644 --- a/epour/session.py +++ b/epour/session.py @@ -201,7 +201,7 @@ class Session(lt.session): # with open(rp, rb) as f: # t[resume_data] = f.read() except Exception: -self.log.exception(Opening torrent file %s failed, v) +self.log.exception(Opening torrent %s failed, i) continue self.async_add_torrent(t) --
[EGIT] [apps/terminology] master 01/01: media: improve media control pos/vol slider
huchi pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=b14042aa498bff1f1fe791d9014e403e769219ae commit b14042aa498bff1f1fe791d9014e403e769219ae Author: Wonguk Jeong wonguk.je...@samsung.com Date: Wed Jul 23 07:07:01 2014 +0900 media: improve media control pos/vol slider Summary: currently, pos/vol could be changed by using only knob not slider area. use slider area as event source, and control knob internally. Fixes T1440 Test Plan: terminology - tycat video file - try to control pos/vol by clicking slider area Reviewers: billiob Subscribers: seoz Maniphest Tasks: T1440 Differential Revision: https://phab.enlightenment.org/D1219 --- data/themes/default.edc | 76 +++-- data/themes/nyanology/default.edc | 76 +++-- data/themes/nyanology/nyanology.edc | 76 +++-- src/bin/media.c | 32 +++- 4 files changed, 246 insertions(+), 14 deletions(-) diff --git a/data/themes/default.edc b/data/themes/default.edc index cc40979..fe153f5 100644 --- a/data/themes/default.edc +++ b/data/themes/default.edc @@ -3346,7 +3346,7 @@ target: 0.clip; target: 1.clip; target: 2.clip; target: 3.clip; target: } } part { name: posline; -mouse_events: 0; +mouse_events: 1; repeat_events: 1; clip_to: media_clip; description { state: default 0.0; @@ -3361,7 +3361,7 @@ target: 0.clip; target: 1.clip; target: 2.clip; target: 3.clip; target: } } part { name: terminology.posdrag; -mouse_events: 1; +mouse_events: 0; repeat_events: 1; clip_to: media_clip; dragable { @@ -3379,7 +3379,7 @@ target: 0.clip; target: 1.clip; target: 2.clip; target: 3.clip; target: } } part { name: volline; -mouse_events: 0; +mouse_events: 1; repeat_events: 1; clip_to: media_clip; description { state: default 0.0; @@ -3399,7 +3399,7 @@ target: 0.clip; target: 1.clip; target: 2.clip; target: 3.clip; target: } } part { name: terminology.voldrag; type: IMAGE; -mouse_events: 1; +mouse_events: 0; repeat_events: 1; clip_to: media_clip; dragable { @@ -3464,6 +3464,74 @@ target: 0.clip; target: 1.clip; target: 2.clip; target: 3.clip; target: action: STATE_SET default 0.0; target: terminology.voldrag; } + program { +signal: mouse,down,1; source: posline; +filter: terminology.posdrag default; +script { + new x, y, w, h, m_x, m_y; + new Float:pos; + + get_geometry(PART:posline, x, y, w, h); + get_mouse(m_x, m_y); + pos = m_x - x; + pos = pos / w; + set_drag(PART:terminology.posdrag, pos, 0.0); + emit(pos,drag,start, ); + +} + } + program { +signal: mouse,up,1; source: posline; +action: SIGNAL_EMIT pos,drag,stop ; + } + program { +signal: mouse,move; source: posline; +script { + new x, y, w, h, m_x, m_y; + new Float:pos; + + if (!get_mouse_buttons()) return; + + get_geometry(PART:posline, x, y, w, h); + get_mouse(m_x, m_y); + pos = m_x - x; + pos = pos / w; + set_drag(PART:terminology.posdrag, pos, 0.0); + emit(pos,drag, ); +} + } + program { +signal: mouse,down,1; source: volline; +filter: terminology.voldrag default; +script { + new x, y, w, h, m_x, m_y; + new Float:pos; + + get_geometry(PART:volline, x, y, w, h); + get_mouse(m_x, m_y); + pos = m_x - x; + pos = pos / w; + set_drag(PART:terminology.voldrag, pos, 0.0); + emit(vol,drag, ); + +} + } + program { +signal: mouse,move; source: volline; +script { + new x, y, w, h, m_x, m_y; + new Float:pos; + + if (!get_mouse_buttons()) return; + + get_geometry(PART:volline, x, y, w, h); + get_mouse(m_x, m_y); + pos = m_x - x; + pos = pos / w; + set_drag(PART:terminology.voldrag, pos, 0.0); + emit(vol,drag, ); +} + } } } diff --git a/data/themes/nyanology/default.edc b/data/themes/nyanology/default.edc index
[EGIT] [core/efl] master 01/01: eolian: fix coverity defects
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=77ad5e329734a3a3ee9694b8bd52964047cb23e4 commit 77ad5e329734a3a3ee9694b8bd52964047cb23e4 Author: Daniel Kolesa d.kol...@samsung.com Date: Wed Jul 23 00:47:26 2014 +0100 eolian: fix coverity defects Fixes CID 1228630 and 1228631. --- src/lib/eolian/eo_lexer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c index 995fce1..2b61017 100644 --- a/src/lib/eolian/eo_lexer.c +++ b/src/lib/eolian/eo_lexer.c @@ -303,7 +303,7 @@ skip: eina_strbuf_append_char(ls-buff, ls-current); next_char(ls); tok-value = eina_stringshare_add_length(eina_strbuf_string_get(ls-buff) + 1, -eina_strbuf_length_get(ls-buff) - 2); + (unsigned int)eina_strbuf_length_get(ls-buff) - 2); } static int @@ -443,7 +443,7 @@ read_number(Eo_Lexer *ls, Eo_Token *tok) if (ls-current == '.') is_float = EINA_TRUE; next_char(ls); } - if (ls-current == 'e' || ls-current == 'e') + if (ls-current == 'e' || ls-current == 'E') { is_float = EINA_TRUE; write_exp(ls); --
[EGIT] [core/elementary] master 01/01: test_sys_notify: Refactoring to solve weird behavior when tested with more then two instances
ryuan pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=b933cfcad0ee5e37f5001692c36297ae8497118c commit b933cfcad0ee5e37f5001692c36297ae8497118c Author: Ryuan Choi ryuan.c...@samsung.com Date: Wed Jul 23 11:01:41 2014 +0900 test_sys_notify: Refactoring to solve weird behavior when tested with more then two instances - _ev_handler can't know whether elm_win still exists, so changed log style from notify to printf. In addition, release the callbacks when elm_win is destroyed. - use elm_sys_notify_send instead of elm_sys_notify_simple_send to show more functionality. - remove static variables not to print warnings when with more than two test_sys_notify pannel. --- src/bin/test_sys_notify.c | 86 --- 1 file changed, 58 insertions(+), 28 deletions(-) diff --git a/src/bin/test_sys_notify.c b/src/bin/test_sys_notify.c index 0a6dacc..92cbdd1 100644 --- a/src/bin/test_sys_notify.c +++ b/src/bin/test_sys_notify.c @@ -6,49 +6,72 @@ #define WIDTH 320 #define HEIGHT 160 -static Evas_Object *s = NULL; -static Evas_Object *b = NULL; -static Evas_Object *l = NULL; -static Evas_Object *n = NULL; +struct _Sys_Notify_Data { +Evas_Object *l; +Evas_Object *n; +Ecore_Event_Handler *handlers[2]; +}; +typedef struct _Sys_Notify_Data Sys_Notify_Data; static Eina_Bool _ev_handler(void *data EINA_UNUSED, int type, void *event) { - char msg[256]; - Elm_Sys_Notify_Notification_Closed *closed; Elm_Sys_Notify_Action_Invoked *action; if (type == ELM_EVENT_SYS_NOTIFY_NOTIFICATION_CLOSED) { closed = event; -sprintf(msg, Notification Closed Event: %u %d., +printf(Notification Closed Event: %u %d.\n, closed-id, closed-reason); } else if (type == ELM_EVENT_SYS_NOTIFY_ACTION_INVOKED) { action = event; -sprintf(msg, Notification Action Event: %u %s., +printf(Notification Action Event: %u %s.\n, action-id, action-action_key); } else return ECORE_CALLBACK_PASS_ON; - elm_object_text_set(l, msg); - evas_object_show(n); - return ECORE_CALLBACK_DONE; } +static void _sys_notify_cb(void *data, unsigned int id EINA_UNUSED) +{ + Sys_Notify_Data *notify_data = data; + + elm_object_text_set(notify_data-l, notify is done); + evas_object_show(notify_data-n); +} + static void -_bt_clicked(void *data EINA_UNUSED, -Evas_Object *obj EINA_UNUSED, +_bt_clicked(void *data, +Evas_Object *obj, void *event_info EINA_UNUSED) { - elm_sys_notify_simple_send - (, elm_entry_entry_get(s), elm_entry_entry_get(b)); + Evas_Object *s, *b; + s = evas_object_data_get(obj, summary); + b = evas_object_data_get(obj, body); + + elm_sys_notify_send(0, , elm_entry_entry_get(s), elm_entry_entry_get(b), + ELM_SYS_NOTIFY_URGENCY_NORMAL, + -1, _sys_notify_cb, data); +} + +static void +_test_sys_notify_win_del_cb(void *data, +Evas *e EINA_UNUSED, +Evas_Object *obj EINA_UNUSED, +void *event_info EINA_UNUSED) +{ + Sys_Notify_Data *notify_data = data; + ecore_event_handler_del(notify_data-handlers[0]); + ecore_event_handler_del(notify_data-handlers[1]); + + free(notify_data); } void @@ -56,20 +79,20 @@ test_sys_notify(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - Evas_Object *win, *bx, *it; + Evas_Object *win, *bx, *it, *btn; + Evas_Object *s, *b, *n, *l; + Sys_Notify_Data *notify_data; elm_need_sys_notify(); - ecore_event_handler_add(ELM_EVENT_SYS_NOTIFY_NOTIFICATION_CLOSED, - _ev_handler, NULL); - - ecore_event_handler_add(ELM_EVENT_SYS_NOTIFY_ACTION_INVOKED, - _ev_handler, NULL); + notify_data = malloc(sizeof(Sys_Notify_Data)); win = elm_win_add(NULL, Sys Notify, ELM_WIN_BASIC); elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); elm_win_title_set(win, System Notification); elm_win_autodel_set(win, EINA_TRUE); + evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, + _test_sys_notify_win_del_cb, notify_data); it = elm_bg_add(win); elm_win_resize_object_add(win, it); @@ -77,12 +100,12 @@ test_sys_notify(void *data EINA_UNUSED, evas_object_size_hint_max_set(it, WIDTH, HEIGHT); evas_object_show(it); - n = elm_notify_add(win); + notify_data-n = n = elm_notify_add(win); evas_object_size_hint_weight_set(n, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_notify_align_set(n, 0.5, 0.0); elm_notify_timeout_set(n, 2.0); - l = elm_label_add(win); + notify_data-l = l = elm_label_add(win); elm_object_content_set(n, l);
[EGIT] [core/elementary] master 02/02: gengrid: Add function to search item by string.
raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=cb10e929f20cfa2f971e2bee80e8b82b9989ad65 commit cb10e929f20cfa2f971e2bee80e8b82b9989ad65 Author: Jyotiprakash Sahoo jp.sa...@samsung.com Date: Wed Jul 23 11:35:20 2014 +0900 gengrid: Add function to search item by string. Summary: This function allows user to search for item in Gengrid. Test Plan: elementary_test -to Gengrid Item Search By Text Reviewers: seoz, singh.amitesh, Hermet, raster Differential Revision: https://phab.enlightenment.org/D1178 --- src/bin/test.c | 4 +- src/bin/test_gengrid.c | 198 + src/lib/elm_gengrid.c | 25 +++ src/lib/elm_gengrid.eo | 10 +++ 4 files changed, 236 insertions(+), 1 deletion(-) diff --git a/src/bin/test.c b/src/bin/test.c index ae3976c..11045a1 100644 --- a/src/bin/test.c +++ b/src/bin/test.c @@ -130,8 +130,9 @@ void test_table7(void *data, Evas_Object *obj, void *event_info); void test_gengrid(void *data, Evas_Object *obj, void *event_info); void test_gengrid2(void *data, Evas_Object *obj, void *event_info); void test_gengrid3(void *data, Evas_Object *obj, void *event_info); -void test_gengrid_item_styles(void *data, Evas_Object *obj, void *event_info); void test_gengrid4(void *data, Evas_Object *obj, void *event_info); +void test_gengrid5(void *data, Evas_Object *obj, void *event_info); +void test_gengrid_item_styles(void *data, Evas_Object *obj, void *event_info); void test_gengrid_speed(void *data, Evas_Object *obj, void *event_info); void test_gengrid_focus(void *data, Evas_Object *obj, void *event_info); void test_win_state(void *data, Evas_Object *obj, void *event_info); @@ -666,6 +667,7 @@ add_tests: ADD_TEST(NULL, Lists - Gengrid, GenGrid 2, test_gengrid2); ADD_TEST(NULL, Lists - Gengrid, GenGrid Group, test_gengrid3); ADD_TEST(NULL, Lists - Gengrid, GenGrid Show/Bring_in, test_gengrid4); + ADD_TEST(NULL, Lists - Gengrid, GenGrid Item Search by Text, test_gengrid5); ADD_TEST(NULL, Lists - Gengrid, GenGrid Item Styles, test_gengrid_item_styles); ADD_TEST(NULL, Lists - Gengrid, Gengrid Update Speed, test_gengrid_speed); ADD_TEST(NULL, Lists - Gengrid, GenGrid Focus, test_gengrid_focus); diff --git a/src/bin/test_gengrid.c b/src/bin/test_gengrid.c index 71b3ba6..a2ca6a0 100644 --- a/src/bin/test_gengrid.c +++ b/src/bin/test_gengrid.c @@ -1344,6 +1344,204 @@ test_gengrid4(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ evas_object_show(win); } +typedef struct _grid5_Event_Data grid5_Event_Data; +struct _grid5_Event_Data +{ + Evas_Object *grid_obj; + Evas_Object *en_obj; + Elm_Object_Item *last_item_found; +}; + +static const char *_grid5_items_text[] = { + Albany, Annapolis, + Atlanta, Augusta, + Austin, Baton Rouge, + Bismarck, Boise, + Boston, Carson City, + Charleston, Cheyenne, + Columbia, Columbus, + Concord, Denver, + Des Moines, Dover, + Frankfort, Harrisburg, + Hartford, Helena, + Honolulu, Indianapolis, + Jackson, Jefferson City, + Juneau, Lansing, + Lincoln, Little Rock, + Madison, Montgomery, + Montpelier, Nashville, + Oklahoma City, Olympia, + Phoenix, Pierre, + Providence, Raleigh, + Richmond, Sacramento, + Saint Paul, Salem, + Salt Lake City, Santa Fe, + Springfield, Tallahassee, + Topeka, Trenton +}; + +static char * +_grid5_search_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) +{ + char buf[32]; + Item_Data *id = data; + + snprintf(buf, sizeof(buf), %s, _grid5_items_text[id-mode]); + return strdup(buf); +} + +static char * +_grid5_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) +{ + char buf[64]; + snprintf(buf, sizeof(buf), %s, _grid5_search_text_get(data, NULL, NULL)); + return strdup(buf); +} + +static void +_grid5_search_item(grid5_Event_Data *event_data, Elm_Object_Item * it) +{ + const char *str = elm_entry_entry_get(event_data-en_obj); + if (!str || !strlen(str)) return; + + printf(Looking for \%s\. , str); + event_data-last_item_found = elm_gengrid_search_by_text_item_get(event_data-grid_obj, it, _grid5_search_text_get, NULL, str, 0); + + if (event_data-last_item_found) + { +printf(Found.\n); +elm_gengrid_item_selected_set(event_data-last_item_found, EINA_TRUE); +elm_gengrid_item_bring_in(event_data-last_item_found, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); +elm_object_focus_set(event_data-en_obj, EINA_TRUE); + } + else + printf(Not Found.\n); +} + +static void +_grid5_search_settings_changed_cb(void *data, Evas_Object *obj EINA_UNUSED, void *einfo EINA_UNUSED) +{ + _grid5_search_item(data, NULL); +} + +static void +_grid5_on_keydown(void *data, Evas *evas EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *event_info) +{ + Evas_Event_Key_Down *ev = event_info; +
[EGIT] [core/efl] master 01/01: edje embryo: Now supports get_anim_pos_map
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=17e2c4bc0677d3d0e20caa69570f94afd4022e2b commit 17e2c4bc0677d3d0e20caa69570f94afd4022e2b Author: Amitesh Singh amitesh...@samsung.com Date: Wed Jul 23 14:31:52 2014 +0900 edje embryo: Now supports get_anim_pos_map Summary: works just like ecore_animator_pos_map(). @feature Reviewers: seoz, Hermet, cedric, raster Subscribers: cedric, seoz Differential Revision: https://phab.enlightenment.org/D1211 --- data/edje/include/edje.inc | 16 +++ src/lib/edje/edje_embryo.c | 49 ++ 2 files changed, 65 insertions(+) diff --git a/data/edje/include/edje.inc b/data/edje/include/edje.inc index 0d29c0b..5758cc3 100644 --- a/data/edje/include/edje.inc +++ b/data/edje/include/edje.inc @@ -68,6 +68,22 @@ native reset_timer(id); native anim (Float:len, fname[], val); native cancel_anim(id); +enum Tween_Mode_Type +{ + TWEEN_MODE_LINEAR, + TWEEN_MODE_ACCELERATE, + TWEEN_MODE_DECELERATE, + TWEEN_MODE_SINUSOIDAL, + TWEEN_MODE_ACCELERATE_FACTOR, + TWEEN_MODE_DECELERATE_FACTOR, + TWEEN_MODE_SINUSOIDAL_FACTOR, + TWEEN_MODE_DIVISOR_INTERP, + TWEEN_MODE_BOUNCE, + TWEEN_MODE_SPRING +}; + +native get_anim_pos_map(Float:pos, Tween_Mode_Type:tween, Float:v1, Float:v2, Float:ret); + /***/ /* Edje utility calls for dealing with edjes/programs etc. */ /***/ diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c index 2f03c6b..7924771 100644 --- a/src/lib/edje/edje_embryo.c +++ b/src/lib/edje/edje_embryo.c @@ -687,6 +687,54 @@ _edje_embryo_fn_cancel_anim(Embryo_Program *ep, Embryo_Cell *params) return 0; } +/* get_anim_pos_map(Float:pos, Tween_Mode_Type:tween, Float:v1, Float:v2, Float:ret) */ +static Embryo_Cell +_edje_embryo_fn_get_anim_pos_map(Embryo_Program *ep, Embryo_Cell *params) +{ + double pos; + Ecore_Pos_Map tween; + double v1, v2; + + CHKPARAM(5); + pos = EMBRYO_CELL_TO_FLOAT(params[1]); + tween = params[2]; + v1 = EMBRYO_CELL_TO_FLOAT(params[3]); + v2 = EMBRYO_CELL_TO_FLOAT(params[4]); + + switch(tween) + { + case ECORE_POS_MAP_LINEAR: + case ECORE_POS_MAP_ACCELERATE: + case ECORE_POS_MAP_DECELERATE: + case ECORE_POS_MAP_SINUSOIDAL: +pos = ecore_animator_pos_map(pos, tween, 0, 0); +break; + case ECORE_POS_MAP_ACCELERATE_FACTOR: +pos = ecore_animator_pos_map(pos, ECORE_POS_MAP_ACCELERATE_FACTOR, + v1, 0); +break; + case ECORE_POS_MAP_DECELERATE_FACTOR: +pos = ecore_animator_pos_map(pos, ECORE_POS_MAP_DECELERATE_FACTOR, + v1, 0); +break; + case ECORE_POS_MAP_SINUSOIDAL_FACTOR: +pos = ecore_animator_pos_map(pos, ECORE_POS_MAP_SINUSOIDAL_FACTOR, + v1, 0); +break; + case ECORE_POS_MAP_DIVISOR_INTERP: + case ECORE_POS_MAP_BOUNCE: + case ECORE_POS_MAP_SPRING: +pos = ecore_animator_pos_map(pos, tween, v1, v2); +break; + default: +break; + } + + SETFLOAT(pos, params[5]); + + return 0; +} + /* set_min_size(Float:w, Float:h) */ static Embryo_Cell _edje_embryo_fn_set_min_size(Embryo_Program *ep, Embryo_Cell *params) @@ -3741,6 +3789,7 @@ _edje_embryo_script_init(Edje_Part_Collection *edc) embryo_program_native_call_add(ep, anim, _edje_embryo_fn_anim); embryo_program_native_call_add(ep, cancel_anim, _edje_embryo_fn_cancel_anim); + embryo_program_native_call_add(ep, get_anim_pos_map, _edje_embryo_fn_get_anim_pos_map); embryo_program_native_call_add(ep, emit, _edje_embryo_fn_emit); embryo_program_native_call_add(ep, get_part_id, _edje_embryo_fn_get_part_id); --