Re: [E-devel] [EGIT] [core/elementary] master 01/01: elementary: Fix DnD to work again in wayland
I LOVE YOU, Chris Michael! On 01/05/15 19:03, Christopher Michael wrote: devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=9c5be418e5d20cd408a7eeca9ce068eab3099e53 commit 9c5be418e5d20cd408a7eeca9ce068eab3099e53 Author: Chris Michael cp.mich...@samsung.com Date: Mon Jan 5 12:05:50 2015 -0500 elementary: Fix DnD to work again in wayland Summary: In order for ecore_wl to start a drag, we need to send the parent window of the object being dragged. Previous code was not getting the parent window properly. NB: This patch also fixes an issue where the data being sent to the drop callback was being incorrectly sent. @fix Signed-off-by: Chris Michael cp.mich...@samsung.com --- src/lib/elm_cnp.c | 51 +-- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c index 4a9eff8..4ef30e8 100644 --- a/src/lib/elm_cnp.c +++ b/src/lib/elm_cnp.c @@ -2901,6 +2901,7 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format EINA_UNUSED, const ch Evas_Object *icon = NULL; int x, y, x2 = 0, y2 = 0, x3, y3, w = 0, h = 0; const char *types[2] = { text/uri-list, NULL }; + Ecore_Wl_Window *parent = NULL; _wl_elm_dnd_init(); @@ -2974,8 +2975,28 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format EINA_UNUSED, const ch _dragx = x3 - x2; _dragy = y3 - y2; - ecore_wl_dnd_drag_start(ecore_wl_input_get(), - elm_win_wl_window_get(obj), + if (elm_widget_is(obj)) + { +Evas_Object *top; + +top = elm_widget_top_get(obj); +if (!top) top = elm_widget_top_get(elm_widget_parent_widget_get(obj)); +if (top (eo_isa(top, ELM_WIN_CLASS))) + parent = elm_win_wl_window_get(top); + } + if (!parent) + { +Evas *evas; + +if (!(evas = evas_object_evas_get(obj))) + return 0; +if (!(ee = ecore_evas_ecore_evas_get(evas))) + return 0; + +parent = ecore_evas_wayland_window_get(ee); + } + + ecore_wl_dnd_drag_start(ecore_wl_input_get(), parent, elm_win_wl_window_get(dragwin), x3, y3, w, h); @@ -3262,7 +3283,6 @@ _wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data) { Dropable *drop; unsigned int win = 0; - char *p, *s = NULL, *entrytag; Elm_Selection_Data sdata; static const char *tagstring = item absize=240x180 href=file://%s/item; @@ -3270,26 +3290,10 @@ _wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data) win = _wl_elm_widget_window_get(sel-requestwidget); drop = _wl_dropable_find_geom(win, savedtypes.x, savedtypes.y); - p = data; - if ((!strncmp(p, file:/, 6)) || (p[0] == '/')) - { -int len = 0; - -len = sel-buflen; -if (!strncmp(p, file:/, 6)) - { - p += 5; - len -= 5; - } -if (!(s = malloc(len + 1))) return; -memcpy(s, p, len); -s[len] = 0; - } - if (savedtypes.textreq) { savedtypes.textreq = 0; -savedtypes.imgfile = s; +savedtypes.imgfile = data; } sdata.x = savedtypes.x; @@ -3305,13 +3309,8 @@ _wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data) if ((cbs-types ELM_SEL_FORMAT_MARKUP) (cbs-types ELM_SEL_FORMAT_IMAGE)) { - int l = 0; - sdata.format = ELM_SEL_FORMAT_MARKUP; - l = strlen(tagstring) + strlen(savedtypes.imgfile); - entrytag = alloca(l + 1); - snprintf(entrytag, l + 1, tagstring, savedtypes.imgfile); - sdata.data = entrytag; + sdata.data = (char *)savedtypes.imgfile; if (cbs-dropcb) cbs-dropcb(cbs-dropdata, drop-obj, sdata); ecore_wl_dnd_drag_end(ecore_wl_input_get()); } -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/elementary] master 01/01: gelnist: unswallow makes sense. not smart member del.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=e5696a035c4fbbb937cd18a5719e208ae7807863 commit e5696a035c4fbbb937cd18a5719e208ae7807863 Author: ChunEon Park her...@hermet.pe.kr Date: Tue Jan 6 15:46:35 2015 +0900 gelnist: unswallow makes sense. not smart member del. --- src/lib/elm_genlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 3b94efb..73b824c 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -6823,7 +6823,7 @@ _elm_genlist_item_all_contents_unset(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, EINA_LIST_FREE(it-contents, content) { elm_widget_sub_object_del(WIDGET(it), content); -evas_object_smart_member_del(content); +edje_object_part_unswallow(VIEW(it), content); evas_object_hide(content); if (l) *l = eina_list_append(*l, content); } --
[EGIT] [core/elementary] master 01/01: genlist: use macro as possible.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=3bf7123aa8d5ccec83bedfea7798d1deb894e279 commit 3bf7123aa8d5ccec83bedfea7798d1deb894e279 Author: ChunEon Park her...@hermet.pe.kr Date: Tue Jan 6 15:50:30 2015 +0900 genlist: use macro as possible. --- src/lib/elm_genlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 73b824c..f9b4b53 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -6694,7 +6694,7 @@ _elm_genlist_item_expanded_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it) { ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); - return it-item-expanded; + return GL_IT(it)-expanded; } EOLIAN static int @@ -6702,7 +6702,7 @@ _elm_genlist_item_expanded_depth_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it) { ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, 0); - return it-item-expanded_depth; + return GL_IT(it)-expanded_depth; } static Eina_Bool --
Re: [E-devel] [EGIT] [bindings/python/python-efl] master 08/08: Provide the uninstall command for python-efl itself
2015-01-05 9:38 GMT+01:00 Sebastian Dransfeld s...@tango.flipp.net: On 01/04/2015 03:56 PM, Dave Andreoli wrote: -python setup.py install +(sido) python setup.py install sido? Don't you know sido? it's the sudo of 2015 :D fixed, thanks for reporting S. -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 02/02: edje: Edje_Edit - add API for renaming of image.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a5183ee424d65cf37343ea46f7982c74f60d6fbc commit a5183ee424d65cf37343ea46f7982c74f60d6fbc Author: Cedric BAIL ced...@osg.samsung.com Date: Mon Jan 5 10:53:57 2015 +0100 edje: Edje_Edit - add API for renaming of image. Reviewers: Hermet, raster, seoz, cedric @feature Subscribers: reutskiy.v.v Projects: #efl Differential Revision: https://phab.enlightenment.org/D1830 Signed-off-by: Cedric BAIL ced...@osg.samsung.com --- src/lib/edje/Edje_Edit.h | 13 + src/lib/edje/edje_edit.c | 24 2 files changed, 37 insertions(+) diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h index aba67ee..ebc3dc8 100644 --- a/src/lib/edje/Edje_Edit.h +++ b/src/lib/edje/Edje_Edit.h @@ -4666,6 +4666,19 @@ EAPI Eina_Bool edje_edit_image_del(Evas_Object *obj, const char *name); */ EAPI Eina_Bool edje_edit_image_replace(Evas_Object *obj, const char *name, const char *new_name); +/** Rename image + * + * @param obj Object being edited. + * @param name The name of the image to be renamed. + * @param new_name The new_name of the image. + * + * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise.(including the + * case when one of the names is not valid) + * + * @since 1.12 + */ +EAPI Eina_Bool edje_edit_image_rename(Evas_Object *obj, const char *name, const char *new_name); + /** Get list of (Edje_Part_Image_Use *) - group-part-state triplets where given * image is used * diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index bb35f38..f7d8e86 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -7320,6 +7320,30 @@ edje_edit_image_replace(Evas_Object *obj, const char *name, const char *new_name return EINA_TRUE; } +EAPI Eina_Bool +edje_edit_image_rename(Evas_Object *obj, const char *name, const char *new_name) +{ + Edje_Image_Directory_Entry *de = NULL; + unsigned int i; + GET_ED_OR_RETURN(EINA_FALSE); + + // Check if image with 'new_name' already exists + if (edje_edit_image_id_get(obj, new_name) = 0) + return EINA_FALSE; + + for (i = 0; i ed-file-image_dir-entries_count; ++i) + { +de = ed-file-image_dir-entries + i; +if ((de-entry) (!strcmp(name, de-entry))) + break; + } + if (i == ed-file-image_dir-entries_count) return EINA_FALSE; + + _edje_if_string_replace(ed, de-entry, new_name); + + return EINA_TRUE; +} + EAPI Eina_List* edje_edit_image_usage_list_get(Evas_Object *obj, const char *name, Eina_Bool first_only) { --
[EGIT] [core/efl] master 01/02: edje: Edje_Edit - remake deletion and replacing of strings
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=93da127573158536aa866d8102254f8ff8b44c95 commit 93da127573158536aa866d8102254f8ff8b44c95 Author: Cedric BAIL ced...@osg.samsung.com Date: Mon Jan 5 10:52:46 2015 +0100 edje: Edje_Edit - remake deletion and replacing of strings Summary: Add new function for replacing string with using eina_stringshare_replace() and change _edje_if_string_free() to setup passed string to NULL. @fix Reviewers: raster, Hermet, seoz, cedric Reviewed By: cedric Subscribers: reutskiy.v.v Projects: #efl Differential Revision: https://phab.enlightenment.org/D1835 Signed-off-by: Cedric BAIL ced...@osg.samsung.com --- src/lib/edje/edje_edit.c | 195 +-- 1 file changed, 88 insertions(+), 107 deletions(-) diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 18c45b7..bb35f38 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -776,16 +776,30 @@ _edje_fix_parts_id(Edje *ed) } static void -_edje_if_string_free(Edje *ed, const char *str) +_edje_if_string_free(Edje *ed, const char **str) { Eet_Dictionary *dict; if (!ed || !str) return; dict = eet_dictionary_get(ed-file-ef); - if (eet_dictionary_string_check(dict, str)) return; - eina_stringshare_del(str); - str = NULL; + if (eet_dictionary_string_check(dict, *str)) return; + eina_stringshare_del(*str); + *str = NULL; +} + +static void +_edje_if_string_replace(Edje *ed, const char **str, const char *str_new) +{ + Eet_Dictionary *dict; + + if (!ed || !str) return; + + dict = eet_dictionary_get(ed-file-ef); + if (*str eet_dictionary_string_check(dict, *str)) + *str = eina_stringshare_add(str_new); + else + eina_stringshare_replace(str, str_new); } static Edje_Style * @@ -1015,8 +1029,7 @@ _delete_play_actions(Evas_Object *obj, const char* name, int action_type, Eet_Fi { program-speed = 0; program-channel = EDJE_CHANNEL_EFFECT; - _edje_if_string_free(eed, program-sample_name); - program-sample_name = NULL; + _edje_if_string_free(eed, program-sample_name); program-action = EDJE_ACTION_TYPE_NONE; is_collection_changed = EINA_TRUE; } @@ -1024,8 +1037,7 @@ _delete_play_actions(Evas_Object *obj, const char* name, int action_type, Eet_Fi !strcmp(program-tone_name, name)) { program-duration = 0; - _edje_if_string_free(eed, program-tone_name); - program-tone_name = NULL; + _edje_if_string_free(eed, program-tone_name); program-action = EDJE_ACTION_TYPE_NONE; is_collection_changed = EINA_TRUE; } @@ -1173,7 +1185,7 @@ edje_edit_sound_sample_del(Evas_Object *obj, const char* name) return EINA_FALSE; } - _edje_if_string_free(ed, sound_sample-name); + _edje_if_string_free(ed, sound_sample-name); --ed-file-sound_dir-samples_count; sound_sample_last = ed-file-sound_dir-samples + @@ -1287,8 +1299,7 @@ edje_edit_sound_tone_del(Evas_Object *obj, const char* name) return EINA_FALSE; } - - _edje_if_string_free(ed, sound_tone-name); + _edje_if_string_free(ed, sound_tone-name); --ed-file-sound_dir-tones_count; Edje_Sound_Tone *sound_tone_last = ed-file-sound_dir-tones + @@ -1988,7 +1999,7 @@ edje_edit_group_limits_##TYPE##_del(Evas_Object * obj, const char * name, int va if ((ed-collection-limits.TYPE[i]-value == value) \ (!strcmp(ed-collection-limits.TYPE[i]-name, name))) \ { \ - _edje_if_string_free(ed, ed-collection-limits.TYPE[i]-name); \ + _edje_if_string_free(ed, ed-collection-limits.TYPE[i]-name); \ free(ed-collection-limits.TYPE[i]); \ if (i new_count) \ { \ @@ -2289,7 +2300,7 @@ edje_edit_group_data_del(Evas_Object *obj, const char *key) if (!value) return EINA_FALSE; eina_hash_del(ed-collection-data, key, value); - _edje_if_string_free(ed, value-str); + _edje_if_string_free(ed, value-str); free(value); return EINA_TRUE; @@ -2310,7 +2321,7 @@ edje_edit_data_del(Evas_Object *obj, const char *itemname) return EINA_FALSE; eina_hash_del(ed-file-data, itemname, value); - _edje_if_string_free(ed, value-str); + _edje_if_string_free(ed, value-str); free(value); return EINA_TRUE; @@ -2363,10 +2374,9 @@ edje_edit_group_data_value_set(Evas_Object *obj, const char *key, const char *va es = eina_hash_find(ed-collection-data, key); if (es) { -_edje_if_string_free(ed, es-str); -es-str = eina_stringshare_add(value); +
Re: [E-devel] [EGIT] [core/elementary] master 01/01: genlist: exceptional handling.
On Mon, Jan 5, 2015 at 3:53 AM, ChunEon Park her...@naver.com wrote: i don't think it's no much benefit for us in maintainance. it's just exceptional case. hide is enough. we don't need to get bother too much for it. Genlist needs love and care. Pushing under quality patch is not gona help. I have done a closer review of this patch and discovered that in fact this piece of code already leak stringshare and is under performing. It needs a serious care. By fixing things correctly, you will have increased performance and lower peak memory usage. The list should actually be stored relative to the class. Looking at the code, I understand why you are reluctant to do it, as it require some major work to do it, but along the way you are going to start improving genlist in necessary way. -- Cedric BAIL -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ 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 some comment in code.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=a691057f05a98c8bda0916fd4be26006fcd7d1e9 commit a691057f05a98c8bda0916fd4be26006fcd7d1e9 Author: ChunEon Park her...@hermet.pe.kr Date: Mon Jan 5 20:21:26 2015 +0900 genlist: add some comment in code. --- src/lib/elm_genlist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index bfb2417..8d54e94 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -7385,6 +7385,9 @@ _elm_genlist_decorate_mode_set(Eo *obj, Elm_Genlist_Data *sd, Eina_Bool decorate decorated = !!decorated; if (sd-decorate_all_mode == decorated) return; + // decorate_all_mode should be set first + // because content_get func. will be called after this + // and user can check whether decorate_all_mode_ is enabled. sd-decorate_all_mode = decorated; ELM_SAFE_FREE(sd-tree_effect_animator, ecore_animator_del); --
Re: [E-devel] [EGIT] [core/efl] master 01/01: curl usage better accounts for timeouts
Mike, This commit doesn't follow our commit guidelines. -- Tom. On 03/01/15 04:30, Mike Blumenkrantz wrote: discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f55c756c17b9567a643c7f779c65433f3c6eb9ca commit f55c756c17b9567a643c7f779c65433f3c6eb9ca Author: zmike michael.blumenkra...@gmail.com Date: Fri Jan 2 23:21:34 2015 -0500 curl usage better accounts for timeouts curl is dumb. it needs to poll its own fd for data, it gets confused with its own timeouts, and sometimes it forgets that it's supposed to be doing anything. this fixes: * connection timeout processing * connection data processing order also curl_multi_timeout calls are now done from a single function to handle all of this stupidness in one place maybe backport after more testing... --- src/lib/ecore_con/ecore_con_url.c | 49 ++- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c index 2c5dc0c..11a2abc 100644 --- a/src/lib/ecore_con/ecore_con_url.c +++ b/src/lib/ecore_con/ecore_con_url.c @@ -276,6 +276,7 @@ static Eina_List *_fd_hd_list = NULL; static int _init_count = 0; static Ecore_Timer *_curl_timer = NULL; static Eina_Bool pipelining = EINA_FALSE; +static long last_ms = -1; static Ecore_Con_Curl *_c = NULL; static Eina_Bool _c_fail = EINA_FALSE; @@ -343,7 +344,8 @@ _c_init(void) goto error; } _c-curl_multi_timeout(_c-_curlm, ms); - if ((ms = CURL_MIN_TIMEOUT) || (ms = 0)) ms = CURL_MIN_TIMEOUT; + if ((ms = CURL_MIN_TIMEOUT) || (ms 0)) ms = CURL_MIN_TIMEOUT; + last_ms = ms; _curl_timer = ecore_timer_add((double)ms / 1000.0, _ecore_con_url_timer, NULL); ecore_timer_freeze(_curl_timer); @@ -1519,20 +1521,53 @@ _ecore_con_url_curl_clear(void) ecore_main_fd_handler_del(fdh); EINA_LIST_FREE(_url_con_list, url_con) _ecore_con_url_multi_remove(url_con); + last_ms = -1; +} + +static Eina_Bool +_ecore_con_url_do_multi_timeout(long *retms) +{ + long ms = 0; + int ret; + + while (!ms) + { +ret = _c-curl_multi_timeout(_c-_curlm, ms); +*retms = ms; +if ((last_ms 0) (ms 0)) + ERR(curl_multi_perform() timeout); +else if (ms = 0) + { + last_ms = ms; + _ecore_con_url_timer(NULL); + DBG(multiperform is still running: timeout: %ld, ms); + return EINA_TRUE; + } +else if ((ret = 0) (ms 0)) break; +else + ERR(curl_multi_perform() failed: %s, _c-curl_multi_strerror(ret)); +last_ms = ms; +_ecore_con_url_curl_clear(); +ecore_timer_freeze(_curl_timer); +return EINA_FALSE; + } + return EINA_TRUE; } static Eina_Bool _ecore_con_url_fd_handler(void *data EINA_UNUSED, Ecore_Fd_Handler *fd_handler EINA_UNUSED) { Ecore_Fd_Handler *fdh; - long ms; + long ms = 0; if (!_c) return ECORE_CALLBACK_CANCEL; EINA_LIST_FREE(_fd_hd_list, fdh) ecore_main_fd_handler_del(fdh); - _c-curl_multi_timeout(_c-_curlm, ms); + if (!_ecore_con_url_do_multi_timeout(ms)) return EINA_FALSE; + last_ms = ms; if ((ms = CURL_MIN_TIMEOUT) || (ms = 0)) ms = CURL_MIN_TIMEOUT; ecore_timer_interval_set(_curl_timer, (double)ms / 1000.0); + ecore_timer_reset(_curl_timer); _ecore_con_url_timer(NULL); return ECORE_CALLBACK_CANCEL; } @@ -1594,6 +1629,7 @@ _ecore_con_url_timer(void *data EINA_UNUSED) if (ret == CURLM_CALL_MULTI_PERFORM) { DBG(curl_multi_perform() again immediately); +ecore_timer_interval_set(_curl_timer, 0.01); return ECORE_CALLBACK_RENEW; } else if (ret != CURLM_OK) @@ -1604,13 +1640,14 @@ _ecore_con_url_timer(void *data EINA_UNUSED) } if (still_running) { -long ms; +long ms = 0; _ecore_con_url_fdset(); -_c-curl_multi_timeout(_c-_curlm, ms); +if (!_ecore_con_url_do_multi_timeout(ms)) return EINA_FALSE; +last_ms = ms; DBG(multiperform is still running: %d, timeout: %ld, still_running, ms); -if ((ms = CURL_MIN_TIMEOUT) || (ms = 0)) ms = CURL_MIN_TIMEOUT; +if ((ms = CURL_MIN_TIMEOUT) || (ms 0)) ms = CURL_MIN_TIMEOUT; ecore_timer_interval_set(_curl_timer, (double)ms / 1000.0); } else -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies,
Re: [E-devel] [EGIT] [bindings/python/python-efl] master 08/08: Provide the uninstall command for python-efl itself
On 01/04/2015 03:56 PM, Dave Andreoli wrote: -python setup.py install +(sido) python setup.py install sido? S. -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [bindings/python/python-efl] master 03/03: Fix (workaround) the label test
davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=2f8b122110b4128456053a3435949c1e5e602bbb commit 2f8b122110b4128456053a3435949c1e5e602bbb Author: Dave Andreoli d...@gurumeditation.it Date: Mon Jan 5 12:37:15 2015 +0100 Fix (workaround) the label test ELM_WRAP_CHAR make the label expand too much horizontaly, makeing the window super-high, using ELM_WRAP_WORD fix it. --- examples/elementary/test_label.py | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/examples/elementary/test_label.py b/examples/elementary/test_label.py index 4b0e794..58e6c7c 100644 --- a/examples/elementary/test_label.py +++ b/examples/elementary/test_label.py @@ -7,7 +7,7 @@ from efl import elementary from efl.elementary.window import StandardWindow from efl.elementary.box import Box from efl.elementary.grid import Grid -from efl.elementary.label import Label, ELM_WRAP_CHAR, ELM_LABEL_SLIDE_MODE_AUTO +from efl.elementary.label import Label, ELM_WRAP_WORD, ELM_LABEL_SLIDE_MODE_AUTO from efl.elementary.radio import Radio from efl.elementary.separator import Separator from efl.elementary.slider import Slider @@ -43,16 +43,16 @@ def label_clicked(obj): vbox.pack_end(lb) lb.show() -lb = Label(win, size_hint_align=(0.0, 0.5)) +lb = Label(win, size_hint_align=FILL_HORIZ) lb.text = This is a larger label with newlinesbr/ \ - to make it bigger, bit it won't expand or wrapbr/ \ + to make it bigger, but it won't expand or wrapbr/ \ just be a block of text that can't change itsbr/ \ formatting as it's fixed based on textbr/ vbox.pack_end(lb) lb.show() -lb = Label(win, line_wrap=ELM_WRAP_CHAR, size_hint_weight=EXPAND_HORIZ, -size_hint_align=FILL_BOTH) +lb = Label(win, line_wrap=ELM_WRAP_WORD, size_hint_weight=EXPAND_HORIZ, + size_hint_align=FILL_HORIZ) lb.text = bThis is more text designed to line-wrap here as \ This object is resized horizontally. As it is \ resized vertically though, nothing should change. \ @@ -62,7 +62,7 @@ def label_clicked(obj): lb.show() lb = Label(win, text=This small label set to wrap, -size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) + size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH) vbox.pack_end(lb) lb.show() @@ -71,7 +71,7 @@ def label_clicked(obj): sp.show() gd = Grid(win, size=(100, 100), size_hint_weight=EXPAND_BOTH, -size_hint_align=FILL_BOTH) + size_hint_align=FILL_BOTH) vbox.pack_end(gd) gd.show() @@ -101,7 +101,7 @@ def label_clicked(obj): rect.show() lb = Label(win, slide_mode=ELM_LABEL_SLIDE_MODE_AUTO, style=slide_short, -size_hint_align=(0.0, 0.5), slide_duration=15) + size_hint_align=(0.0, 0.5), slide_duration=15) lb.text = This is a label set to slide. \ If set slide to true the text of the label \ will slide/scroll through the length of label. \ @@ -136,15 +136,14 @@ def label_clicked(obj): sl_dur.show() sl_spd = Slider(win, text=Slide Speed, unit_format=%1.1f px/sec, -min_max=(10, 300), value=10, size_hint_align=FILL_HORIZ, -size_hint_weight=EXPAND_HORIZ) +min_max=(10, 300), value=10, size_hint_align=FILL_HORIZ, +size_hint_weight=EXPAND_HORIZ) sl_spd.callback_changed_add(cb_slider_speed, lb) gd.pack(sl_spd, 5, 80, 90, 15) sl_spd.show() lb.data[slider_duration] = sl_dur lb.data[slider_speed] = sl_spd - win.show() --
[EGIT] [bindings/python/python-efl] master 01/03: A little review of the INSTALL file
davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=9b52817069b04fcd5811d2c5d77aa8fd422d44fd commit 9b52817069b04fcd5811d2c5d77aa8fd422d44fd Author: Dave Andreoli d...@gurumeditation.it Date: Mon Jan 5 10:25:33 2015 +0100 A little review of the INSTALL file --- INSTALL | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/INSTALL b/INSTALL index 971cd16..1fca811 100644 --- a/INSTALL +++ b/INSTALL @@ -3,7 +3,7 @@ === * Python 2.6 or higher (http://www.python.org/) - - Tested with Python 2.6 / 2.7 / 3.2 / 3.3 / 3.4 + - Tested with Python 2.7 / 3.2 / 3.3 / 3.4 * Cython 0.21 or higher (http://cython.org/) - Tested with Cython 0.21.2 @@ -59,7 +59,7 @@ python setup.py clean_generated_files WARNING: you will need cython to regenerate the C files, do not use this -command in distribution tarballs, unless you know what are you doing. +in distribution tarballs, unless you know what are you doing. @@ -68,7 +68,7 @@ * For system-wide installation (needs administrator privileges): -(sido) python setup.py install +(sudo) python setup.py install * For user installation: @@ -84,7 +84,7 @@ * You can also uninstall using: - (sudo) python setup.py uninstall +(sudo) python setup.py uninstall 5. DOCUMENTATION @@ -96,7 +96,8 @@ packages: python-sphinx, graphviz, python-pygraphviz, libgv-python To build the docs just run: - python setup.py build_doc + +python setup.py build_doc You will find the generated html docs under the folder: build/sphinx/html --
[EGIT] [bindings/python/python-efl] master 02/03: Evas: better define for EVAS_HINT_FILL/EXPAND
davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=de01f76650c06b40b85444d8c4f75a85362c79f5 commit de01f76650c06b40b85444d8c4f75a85362c79f5 Author: Dave Andreoli d...@gurumeditation.it Date: Mon Jan 5 12:24:19 2015 +0100 Evas: better define for EVAS_HINT_FILL/EXPAND Also added the various tuple we always use, just for convenience. Use the new tuples in the elm examples --- efl/evas/efl.evas.pyx | 12 examples/elementary/test.py| 4 +--- examples/elementary/test_3d.py | 6 ++ examples/elementary/test_access.py | 4 +--- examples/elementary/test_actionslider.py | 6 ++ examples/elementary/test_bg.py | 4 +--- examples/elementary/test_box.py| 4 +--- examples/elementary/test_bubble.py | 4 +--- examples/elementary/test_button.py | 3 +-- examples/elementary/test_calendar.py | 4 +--- examples/elementary/test_check.py | 5 + examples/elementary/test_clock.py | 3 +-- examples/elementary/test_cnp.py| 5 + examples/elementary/test_colorselector.py | 6 ++ examples/elementary/test_config.py | 12 +--- examples/elementary/test_conform.py| 7 ++- examples/elementary/test_core_evas_canvas_callbacks.py | 4 +--- examples/elementary/test_core_evas_object_callbacks.py | 4 +--- examples/elementary/test_core_evas_smart.py| 5 ++--- examples/elementary/test_ctxpopup.py | 5 ++--- examples/elementary/test_cursor.py | 7 ++- examples/elementary/test_datetime.py | 6 ++ examples/elementary/test_dayselector.py| 6 ++ examples/elementary/test_diskselector.py | 6 ++ examples/elementary/test_dnd.py| 4 +--- examples/elementary/test_entry.py | 7 ++- examples/elementary/test_external.py | 4 +--- examples/elementary/test_fileselector.py | 5 + examples/elementary/test_fileselector_button.py| 4 +--- examples/elementary/test_fileselector_entry.py | 5 + examples/elementary/test_flip.py | 6 ++ examples/elementary/test_flipselector.py | 4 +--- examples/elementary/test_floating.py | 4 +--- examples/elementary/test_focus.py | 7 ++- examples/elementary/test_frame.py | 4 +--- examples/elementary/test_gengrid.py| 7 ++- examples/elementary/test_genlist.py| 5 + examples/elementary/test_gesture_layer.py | 5 ++--- examples/elementary/test_grid.py | 3 +-- examples/elementary/test_hover.py | 4 +--- examples/elementary/test_hoversel.py | 3 +-- examples/elementary/test_icon.py | 7 ++- examples/elementary/test_image.py | 4 +--- examples/elementary/test_index.py | 6 ++ examples/elementary/test_input_events.py | 4 +--- examples/elementary/test_label.py | 7 ++- examples/elementary/test_layout.py | 3 +-- examples/elementary/test_list.py | 7 +++ examples/elementary/test_map.py| 8 +++- examples/elementary/test_mapbuf.py | 7 ++- examples/elementary/test_menu.py | 4 ++-- examples/elementary/test_multibuttonentry.py | 7 ++- examples/elementary/test_naviframe.py | 4 +--- examples/elementary/test_notify.py | 4 +--- examples/elementary/test_panel.py | 6 ++ examples/elementary/test_panel_scroll.py | 7 ++- examples/elementary/test_panes.py | 4 +--- examples/elementary/test_photo.py | 7 ++- examples/elementary/test_photocam.py | 5 + examples/elementary/test_popup.py | 5 ++--- examples/elementary/test_progressbar.py| 6 ++ examples/elementary/test_radio.py | 5 + examples/elementary/test_scroller.py | 7 ++- examples/elementary/test_segment_control.py| 7 ++- examples/elementary/test_separator.py | 3 +-- examples/elementary/test_slider.py | 11 --- examples/elementary/test_slideshow.py | 7 ++-
[EGIT] [bindings/python/python-efl] master 01/01: Fix the input_events test
davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=18a334763f950e5d1a438966c04d67f59eb088c2 commit 18a334763f950e5d1a438966c04d67f59eb088c2 Author: Dave Andreoli d...@gurumeditation.it Date: Mon Jan 5 12:42:48 2015 +0100 Fix the input_events test --- examples/elementary/test_input_events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/elementary/test_input_events.py b/examples/elementary/test_input_events.py index a3b19e5..e9b46e8 100644 --- a/examples/elementary/test_input_events.py +++ b/examples/elementary/test_input_events.py @@ -2,12 +2,12 @@ # encoding: utf-8 from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL, EXPAND_BOTH, FILL_BOTH +from efl.evas import EVAS_CALLBACK_KEY_UP from efl import elementary from efl.elementary.box import Box from efl.elementary.button import Button from efl.elementary.entry import Entry, utf8_to_markup -from efl.elementary.object import EVAS_CALLBACK_KEY_UP from efl.elementary.window import StandardWindow --
[EGIT] [core/elementary] master 01/01: genlist: Fix genlist index get bug
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=692e28fe74bed71b34de863f32384f7d2076c9ee commit 692e28fe74bed71b34de863f32384f7d2076c9ee Author: ChunEon Park her...@hermet.pe.kr Date: Mon Jan 5 20:43:58 2015 +0900 genlist: Fix genlist index get bug Because not all item block have max_items_per_block number of items in it's block. So the calculation is not correct when items are added removed in each block. Anyhow, we need more efficient way for this API because genlist uses inlinst. --- src/lib/elm_genlist.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 8d54e94..2c93851 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -7159,12 +7159,16 @@ elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *eo_it) EOLIAN static int _elm_genlist_item_index_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it) { + int cnt = 0; + Elm_Gen_Item *tmp; ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, -1); - if (it-item-block) - return it-position + (it-item-block-position * -GL_IT(it)-wsd-max_items_per_block); - return -1; + EINA_INLIST_FOREACH(GL_IT(it)-wsd-items, tmp) +{ + if (tmp == it) break; + cnt++; +} + return cnt; } EOLIAN static void --
[EGIT] [core/efl] master 01/01: ecore-drm: remove duplicated code from logind and tty.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2db6ed09456e433877c5be191a18c84d216ae3f6 commit 2db6ed09456e433877c5be191a18c84d216ae3f6 Author: Seunghun Lee shiin@samsung.com Date: Mon Jan 5 09:08:27 2015 -0500 ecore-drm: remove duplicated code from logind and tty. Summary: integrates the code used in common. Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1796 --- src/lib/ecore_drm/ecore_drm_launcher.c | 142 ++-- src/lib/ecore_drm/ecore_drm_logind.c | 228 ++--- src/lib/ecore_drm/ecore_drm_private.h | 2 + src/lib/ecore_drm/ecore_drm_tty.c | 119 + 4 files changed, 147 insertions(+), 344 deletions(-) diff --git a/src/lib/ecore_drm/ecore_drm_launcher.c b/src/lib/ecore_drm/ecore_drm_launcher.c index dbe7303..e630932 100644 --- a/src/lib/ecore_drm/ecore_drm_launcher.c +++ b/src/lib/ecore_drm/ecore_drm_launcher.c @@ -3,6 +3,111 @@ static Eina_Bool logind = EINA_FALSE; +static Eina_Bool +_ecore_drm_launcher_cb_vt_switch(void *data, int type EINA_UNUSED, void *event) +{ + Ecore_Drm_Device *dev; + Ecore_Event_Key *ev; + int keycode; + int vt; + + dev = data; + ev = event; + keycode = ev-keycode - 8; + + if ((ev-modifiers ECORE_EVENT_MODIFIER_CTRL) + (ev-modifiers ECORE_EVENT_MODIFIER_ALT) + (keycode = KEY_F1) (keycode = KEY_F8)) + { +vt = (keycode - KEY_F1 + 1); + +if (!_ecore_drm_tty_switch(dev, vt)) + ERR(Failed to activate vt: %m); + } + + return ECORE_CALLBACK_PASS_ON; +} + + +static Eina_Bool +_ecore_drm_launcher_cb_vt_signal(void *data, int type EINA_UNUSED, void *event) +{ + Ecore_Drm_Device *dev; + Ecore_Event_Signal_User *ev; + siginfo_t sigdata; + + dev = data; + ev = event; + + sigdata = ev-data; + if (sigdata.si_code != SI_KERNEL) return ECORE_CALLBACK_RENEW; + + if (ev-number == 1) + { +if (!logind) + { + Ecore_Drm_Input *input; + Ecore_Drm_Output *output; + Ecore_Drm_Sprite *sprite; + Eina_List *l; + + /* disable inputs (suspends) */ + EINA_LIST_FOREACH(dev-inputs, l, input) +ecore_drm_inputs_disable(input); + + /* disable hardware cursor */ + EINA_LIST_FOREACH(dev-outputs, l, output) +ecore_drm_output_cursor_size_set(output, 0, 0, 0); + + /* disable sprites */ + EINA_LIST_FOREACH(dev-sprites, l, sprite) +ecore_drm_sprites_fb_set(sprite, 0, 0); + + /* drop drm master */ + ecore_drm_device_master_drop(dev); + + _ecore_drm_event_activate_send(EINA_FALSE); + } + +/* issue ioctl to release vt */ +if (!ecore_drm_tty_release(dev)) + ERR(Could not release VT: %m); + } + else if (ev-number == 2) + { +if (!logind) + { + Ecore_Drm_Output *output; + Ecore_Drm_Input *input; + Eina_List *l; + + /* set drm master */ + if (!ecore_drm_device_master_set(dev)) + ERR(Could not set drm master: %m); + + /* set output mode */ + EINA_LIST_FOREACH(dev-outputs, l, output) +ecore_drm_output_enable(output); + + /* enable inputs */ + EINA_LIST_FOREACH(dev-inputs, l, input) +ecore_drm_inputs_enable(input); + + if (ecore_drm_tty_acquire(dev)) + _ecore_drm_event_activate_send(EINA_TRUE); + else + ERR(Could not acquire VT: %m); + } +else + { + if (!ecore_drm_tty_acquire(dev)) + ERR(Could not acquire VT: %m); + } + } + + return ECORE_CALLBACK_RENEW; +} + EAPI Eina_Bool ecore_drm_launcher_connect(Ecore_Drm_Device *dev) { @@ -10,20 +115,30 @@ ecore_drm_launcher_connect(Ecore_Drm_Device *dev) { DBG(Launcher: Not Support logind\n); if (geteuid() == 0) - { - DBG(Launcher: Try to keep going with root privilege\n); - if (!ecore_drm_tty_open(dev, NULL)) - { - ERR(Launcher: failed to open tty with root privilege\n); - return EINA_FALSE; - } - } + DBG(Launcher: Try to keep going with root privilege\n); else { ERR(Launcher: Need Root Privilege or logind\n); return EINA_FALSE; } } + + if (!ecore_drm_tty_open(dev, NULL)) + { +ERR(Launcher: failed to open tty\n); +return EINA_FALSE; + } + + /* setup handler for signals */ + dev-tty.event_hdlr = + ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER, +
[EGIT] [core/efl] master 01/01: ecore_evas_wayland: Add null check conditions in ecore evas wayland module
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c5f6c3941ce11a521fbb4dfcb169e431196ca7a1 commit c5f6c3941ce11a521fbb4dfcb169e431196ca7a1 Author: vivek vivek.el...@samsung.com Date: Mon Jan 5 09:09:02 2015 -0500 ecore_evas_wayland: Add null check conditions in ecore evas wayland module Summary: Added null check conditions to check ecore_evas pointer in various places of ecore evas wayland common module Signed-off-by: vivek vivek.el...@samsung.com Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1812 --- src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 568a02c..fa3d961 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -572,6 +572,7 @@ _ecore_evas_wl_common_free(Ecore_Evas *ee) LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (!ee) return; wdata = ee-engine.data; if (wdata-frame_callback) wl_callback_destroy(wdata-frame_callback); wdata-frame_callback = NULL; @@ -595,6 +596,7 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h) LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (!ee) return; if (w 1) w = 1; if (h 1) h = 1; @@ -1162,6 +1164,7 @@ _ecore_evas_wl_common_aspect_set(Ecore_Evas *ee, double aspect) { LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (!ee) return; if (ee-prop.aspect == aspect) return; ee-prop.aspect = aspect; } @@ -1182,6 +1185,7 @@ _ecore_evas_wl_common_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int la Ecore_Evas_Engine_Wl_Data *wdata = ee-engine.data; Evas_Object *old; + if (!ee) return; old = ee-prop.cursor.object; if (obj == NULL) { @@ -1335,6 +1339,7 @@ _ecore_evas_wl_common_pre_render(Ecore_Evas *ee) LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (!ee) return; if (ee-in_async_render) { /* EDBG(ee=%p is rendering asynchronously, skip, ee); */ @@ -1437,6 +1442,7 @@ _ecore_evas_wl_common_render(Ecore_Evas *ee) Ecore_Wl_Window *win = NULL; Ecore_Evas_Engine_Wl_Data *wdata; + if (!ee) return; if (!(wdata = ee-engine.data)) return 0; if (!(win = wdata-win)) return 0; --
[EGIT] [core/enlightenment] master 01/01: wl_drm: Add event handler for session activation signal.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=c61efa7c55d1be23651482b6225afac3ac5c3491 commit c61efa7c55d1be23651482b6225afac3ac5c3491 Author: Seunghun Lee shiin@samsung.com Date: Mon Jan 5 09:09:59 2015 -0500 wl_drm: Add event handler for session activation signal. Summary: Compositor need to change the compositing mode to offscreen or render state depend on session activation state. this patch is for it. Test Plan: (1) Run enlightenment on X. (2) Change another VT. (3) Run enlightenment on wayland and drm. (4) Change the VT to enlightenment which is ran (1). enlightenment on wayland will not render during session deactivation state. Reviewers: zmike, devilhorns Reviewed By: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1816 --- src/modules/wl_drm/e_mod_main.c | 59 - 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c index b1b74c8..6d1d5ec 100644 --- a/src/modules/wl_drm/e_mod_main.c +++ b/src/modules/wl_drm/e_mod_main.c @@ -1,8 +1,57 @@ #include e.h -/* #include Ecore_Drm.h */ +#include Ecore_Drm.h EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, Wl_Drm }; +static Ecore_Event_Handler *activate_handler; +static Eina_Bool session_state = EINA_FALSE; + +static Eina_Bool +_e_mod_drm_cb_activate(void *data, int type EINA_UNUSED, void *event) +{ + Ecore_Drm_Event_Activate *e; + E_Comp *c; + + if ((!event) || (!data)) goto end; + e = event; + c = data; + + if (e-active) + { +E_Client *ec; + +if (session_state) goto end; +session_state = EINA_TRUE; + +ecore_evas_show(c-ee); +E_CLIENT_FOREACH(c, ec) + { + if (ec-visible (!ec-input_only)) + e_comp_object_damage(ec-frame, 0, 0, ec-w, ec-h); + } +e_comp_render_queue(c); +e_comp_shape_queue_block(c, 0); +ecore_event_add(E_EVENT_COMPOSITOR_ENABLE, NULL, NULL, NULL); + } + else + { +session_state = EINA_FALSE; +ecore_evas_hide(c-ee); +edje_file_cache_flush(); +edje_collection_cache_flush(); +evas_image_cache_flush(c-evas); +evas_font_cache_flush(c-evas); +evas_render_dump(c-evas); + +e_comp_render_queue(c); +e_comp_shape_queue_block(c, 1); +ecore_event_add(E_EVENT_COMPOSITOR_DISABLE, NULL, NULL, NULL); + } + +end: + return ECORE_CALLBACK_PASS_ON; +} + EAPI void * e_modapi_init(E_Module *m) { @@ -86,6 +135,11 @@ e_modapi_init(E_Module *m) * happens to jive with what drm does */ e_comp_wl_input_keymap_set(comp-wl_comp_data, NULL, NULL, NULL); + activate_handler = + ecore_event_handler_add(ECORE_DRM_EVENT_ACTIVATE, + _e_mod_drm_cb_activate, comp); + + return m; } @@ -95,5 +149,8 @@ e_modapi_shutdown(E_Module *m EINA_UNUSED) /* shutdown ecore_drm */ /* ecore_drm_shutdown(); */ + if (activate_handler) ecore_event_handler_del(activate_handler); + activate_handler = NULL; + return 1; } --
[EGIT] [core/efl] master 01/01: ecore_evas/wayland_shm: Set alpha of ecore_evas object if parent alpha is set
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c1d805d2b4733a4b426711f9b3f888ea8fe82885 commit c1d805d2b4733a4b426711f9b3f888ea8fe82885 Author: kabeer khan kabeer.k...@samsung.com Date: Mon Jan 5 09:12:30 2015 -0500 ecore_evas/wayland_shm: Set alpha of ecore_evas object if parent alpha is set Summary: Resolved FIXME ecore_evas_wayland_shm_new_internal to set alpha if parent alpha is set Signed-off-by: kabeer khan kabeer.k...@samsung.com Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1842 --- src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c index 09c5616..42e3ec4 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c @@ -177,9 +177,11 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent, fh = 22; } - /* FIXME: Get if parent is alpha, and set */ if (parent) - p = ecore_wl_window_find(parent); + { +p = ecore_wl_window_find(parent); +ee-alpha = ecore_wl_window_alpha_get(p); + } wdata-parent = p; wdata-win = --
Re: [E-devel] PATCH: duplicated XDG_DATA_DIRS fix
As: http://www.enlightenment.org/ss/e-54aa94e4da9742.14698270.jpg Where the real bug happens is where my patch is, but after that there's hardcoded /usr/share and /usr/local/share in the case that we dont have XDG_DATA_DIRS set (which the default dirs are these ones, so having them hardcoded looks correct here for me) 2015-01-03 17:04 GMT+01:00 Sebastian Dransfeld s...@tango.flipp.net: Den Jan 2, 2015 kl. 22:18 skrev Davide Andreoli d...@gurumeditation.it : 2014-12-31 19:31 GMT+01:00 Thanatermesis thanatermesis.e...@gmail.com: Right, there's also the case of /usr/local which i have not considered (only /usr and /usr/local), so this updated patch fixes it: http://pastebin.com/1Nn4rETD by other side these trailing slashes seems like to be made wrongly by your OS creating the XDG_DATA_DIRS variable, they should not include trailing slashes, maybe we should remove the possible trailing slashes from the variable get I still think that harcoding a path is always the wrong solution, looking at that file seems to me that the real problem is some line below, in the else: snprintf(buf, sizeof(buf), %s:/usr/local/share:/usr/share, newpath); Why we are blindly adding /usr/share and /usr/loca/share here ?? plus newpath, that can include the same ?? this seems the real source of the problem, but I'm not in touch with that code, I cannot really understand what was the intention here :/ Lazyness. It is there to make sure we have all needed paths, with no check for duplicates. The right solution is to parse the env var to a list, then add the missing dirs. Sebastian -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/elementary] master 01/01: genlist: keep the item class as given argument.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=527e6468887e92e539c048dd7b9a42f5af871076 commit 527e6468887e92e539c048dd7b9a42f5af871076 Author: ChunEon Park her...@hermet.pe.kr Date: Mon Jan 5 22:17:12 2015 +0900 genlist: keep the item class as given argument. --- src/lib/elm_genlist.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 2c93851..3b94efb 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -6904,11 +6904,10 @@ _elm_genlist_item_item_class_update(Eo *eo_it, Elm_Gen_Item *it, const Elm_Genlist_Item_Class *itc) { ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); - - if (!it-item-block) return; EINA_SAFETY_ON_NULL_RETURN(itc); - if (it-generation GL_IT(it)-wsd-generation) return; it-itc = itc; + if (!it-item-block) return; + if (it-generation GL_IT(it)-wsd-generation) return; it-item-nocache_once = EINA_TRUE; ELM_SAFE_FREE(it-texts, elm_widget_stringlist_free); --
[EGIT] [core/efl] master 01/01: elua: more getopt.lua features
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c78fc161cfd0b952c978781b4410c8266149185e commit c78fc161cfd0b952c978781b4410c8266149185e Author: Daniel Kolesa d.kol...@samsung.com Date: Mon Jan 5 10:48:46 2015 + elua: more getopt.lua features Argument count limit is now supported. The source has been cleaned up and unified so that less code repeating is done. The module is now environment safe, not depending on specific metatable being set on strings. More callbacks have been added and error messages are now more descriptive. --- src/scripts/elua/modules/getopt.lua | 196 1 file changed, 109 insertions(+), 87 deletions(-) diff --git a/src/scripts/elua/modules/getopt.lua b/src/scripts/elua/modules/getopt.lua index 3a04ed6..b5261a2c 100644 --- a/src/scripts/elua/modules/getopt.lua +++ b/src/scripts/elua/modules/getopt.lua @@ -4,8 +4,7 @@ documentation. TODO: -- arguments that can only be specified once (for now you can check - that manually by going over array values of opts) +- mutually exclusive groups - i18n support Copyright (c) 2014 Daniel q66 Kolesa quake...@gmail.com @@ -29,10 +28,20 @@ DEALINGS IN THE SOFTWARE. ]] +local arg = _G.arg -- Capture global 'arg' + local M = {} local prefixes = { -, -- } +local ssub, sfind, sgsub, sformat, smatch = string.sub, string.find, +string.gsub, string.format, +string.match + +local slower, supper, srep = string.lower, string.upper, string.rep + +local unpack = table.unpack or unpack + local ac_process_name = function(np, nm) if not nm or #nm 2 then return @@ -44,7 +53,7 @@ local ac_process_name = function(np, nm) np[nm] = { nm } end for i = 1, #nm do -local pnm = nm:sub(1, i - 1) .. nm:sub(i + 1) +local pnm = ssub(nm, 1, i - 1) .. ssub(nm, i + 1) local t = np[pnm] if not t then t = {} @@ -67,7 +76,7 @@ local get_autocorrect = function(descs, wrong, vi) end for i = 1, #wrong do -local nm = wrong:sub(1, i - 1) .. wrong:sub(i + 1) +local nm = ssub(wrong, 1, i - 1) .. ssub(wrong, i + 1) local inp = np[nm] if inp then if inp == true then @@ -114,34 +123,24 @@ local is_arg = function(opt, j, descs) return false end -local parse_l = function(opts, opt, descs, args, parser) -local optval -local i = opt:find(=) -if i then -opt, optval = opt:sub(1, i - 1), opt:sub(i + 1) -end - -local desc = get_desc(opt, 2, descs) -local argr = desc[3] -if argr or argr == nil then -if not optval then -if #args == 0 then -if argr then -error(option -- .. opt .. requires an argument, 0) -end -elseif argr or not is_arg(args[1], 2, descs) then -optval = table.remove(args, 1) -end -end -elseif optval then -error(option -- .. opt .. cannot have an argument, 0) -end +local write_arg = function(desc, j, opts, opt, optval, parser, argcounts) local rets if desc.callback then rets = { desc:callback(parser, optval, opts) } end if not rets or #rets == 0 then rets = { optval } end local optn = desc.alias or desc[1] or desc[2] +local cnt = desc.max_count or (desc.list and -1 or 1) +local acnt = argcounts[optn] +if acnt then +if cnt = 0 and acnt = cnt then +error(option .. prefixes[j] .. opt +.. can be specified at most .. cnt .. times, 0) +end +argcounts[optn] = acnt + 1 +else +argcounts[optn] = 1 +end opts[#opts + 1] = { optn, short = desc[1], long = desc[2], alias = desc.alias, val = optval, unpack(rets) } local optret = #rets 1 and rets or rets[1] @@ -160,62 +159,67 @@ local parse_l = function(opts, opt, descs, args, parser) end end -local parse_s = function(opts, optstr, descs, args, parser) -while optstr ~= do -local optval -local opt = optstr:sub(1, 1) -optstr = optstr:sub(2) -local desc = get_desc(opt, 1, descs) -local argr = desc[3] -if argr or argr == nil then -if optstr == then -optstr = nil -if #args == 0 then -if argr then -error(option - .. opt .. requires an argument, 0) -end -elseif argr or not is_arg(args[1], 1, descs) then -optstr = table.remove(args, 1) +local parse_l = function(opts, opt, descs, args, parser, argcounts) +local optval +local i = sfind(opt, =) +if i then +opt, optval = ssub(opt, 1, i - 1), ssub(opt, i + 1) +end + +
[EGIT] [core/efl] master 01/01: ecore-evas: Fix compiler warnings about inproper returns
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7f824944597f7a820bb4096293a849842fc31d37 commit 7f824944597f7a820bb4096293a849842fc31d37 Author: Chris Michael cp.mich...@samsung.com Date: Mon Jan 5 12:13:43 2015 -0500 ecore-evas: Fix compiler warnings about inproper returns Summary: This fixes missing return values in functions that return non-void @fix Signed-off-by: Chris Michael cp.mich...@samsung.com --- src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index fa3d961..1c89f75 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -1339,7 +1339,7 @@ _ecore_evas_wl_common_pre_render(Ecore_Evas *ee) LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!ee) return; + if (!ee) return 0; if (ee-in_async_render) { /* EDBG(ee=%p is rendering asynchronously, skip, ee); */ @@ -1442,7 +1442,7 @@ _ecore_evas_wl_common_render(Ecore_Evas *ee) Ecore_Wl_Window *win = NULL; Ecore_Evas_Engine_Wl_Data *wdata; - if (!ee) return; + if (!ee) return 0; if (!(wdata = ee-engine.data)) return 0; if (!(win = wdata-win)) return 0; --
[EGIT] [core/elementary] master 01/01: elementary: Fix DnD to work again in wayland
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=9c5be418e5d20cd408a7eeca9ce068eab3099e53 commit 9c5be418e5d20cd408a7eeca9ce068eab3099e53 Author: Chris Michael cp.mich...@samsung.com Date: Mon Jan 5 12:05:50 2015 -0500 elementary: Fix DnD to work again in wayland Summary: In order for ecore_wl to start a drag, we need to send the parent window of the object being dragged. Previous code was not getting the parent window properly. NB: This patch also fixes an issue where the data being sent to the drop callback was being incorrectly sent. @fix Signed-off-by: Chris Michael cp.mich...@samsung.com --- src/lib/elm_cnp.c | 51 +-- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c index 4a9eff8..4ef30e8 100644 --- a/src/lib/elm_cnp.c +++ b/src/lib/elm_cnp.c @@ -2901,6 +2901,7 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format EINA_UNUSED, const ch Evas_Object *icon = NULL; int x, y, x2 = 0, y2 = 0, x3, y3, w = 0, h = 0; const char *types[2] = { text/uri-list, NULL }; + Ecore_Wl_Window *parent = NULL; _wl_elm_dnd_init(); @@ -2974,8 +2975,28 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format EINA_UNUSED, const ch _dragx = x3 - x2; _dragy = y3 - y2; - ecore_wl_dnd_drag_start(ecore_wl_input_get(), - elm_win_wl_window_get(obj), + if (elm_widget_is(obj)) + { +Evas_Object *top; + +top = elm_widget_top_get(obj); +if (!top) top = elm_widget_top_get(elm_widget_parent_widget_get(obj)); +if (top (eo_isa(top, ELM_WIN_CLASS))) + parent = elm_win_wl_window_get(top); + } + if (!parent) + { +Evas *evas; + +if (!(evas = evas_object_evas_get(obj))) + return 0; +if (!(ee = ecore_evas_ecore_evas_get(evas))) + return 0; + +parent = ecore_evas_wayland_window_get(ee); + } + + ecore_wl_dnd_drag_start(ecore_wl_input_get(), parent, elm_win_wl_window_get(dragwin), x3, y3, w, h); @@ -3262,7 +3283,6 @@ _wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data) { Dropable *drop; unsigned int win = 0; - char *p, *s = NULL, *entrytag; Elm_Selection_Data sdata; static const char *tagstring = item absize=240x180 href=file://%s/item; @@ -3270,26 +3290,10 @@ _wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data) win = _wl_elm_widget_window_get(sel-requestwidget); drop = _wl_dropable_find_geom(win, savedtypes.x, savedtypes.y); - p = data; - if ((!strncmp(p, file:/, 6)) || (p[0] == '/')) - { -int len = 0; - -len = sel-buflen; -if (!strncmp(p, file:/, 6)) - { - p += 5; - len -= 5; - } -if (!(s = malloc(len + 1))) return; -memcpy(s, p, len); -s[len] = 0; - } - if (savedtypes.textreq) { savedtypes.textreq = 0; -savedtypes.imgfile = s; +savedtypes.imgfile = data; } sdata.x = savedtypes.x; @@ -3305,13 +3309,8 @@ _wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data) if ((cbs-types ELM_SEL_FORMAT_MARKUP) (cbs-types ELM_SEL_FORMAT_IMAGE)) { - int l = 0; - sdata.format = ELM_SEL_FORMAT_MARKUP; - l = strlen(tagstring) + strlen(savedtypes.imgfile); - entrytag = alloca(l + 1); - snprintf(entrytag, l + 1, tagstring, savedtypes.imgfile); - sdata.data = entrytag; + sdata.data = (char *)savedtypes.imgfile; if (cbs-dropcb) cbs-dropcb(cbs-dropdata, drop-obj, sdata); ecore_wl_dnd_drag_end(ecore_wl_input_get()); } --
[EGIT] [core/elementary] master 01/01: elementary: Fix return values to use Eina_Bool
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=a019579fc0b43d97340653e5d16cc13bfe3f758d commit a019579fc0b43d97340653e5d16cc13bfe3f758d Author: Chris Michael cp.mich...@samsung.com Date: Mon Jan 5 12:17:03 2015 -0500 elementary: Fix return values to use Eina_Bool Summary: This function is expecting Eina_Bool as the return value, not ints so let's use EINA_FALSE here. NB: this just fixes a copy/paste issue @fix Signed-off-by: Chris Michael cp.mich...@samsung.com --- src/lib/elm_cnp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c index 4ef30e8..1957418 100644 --- a/src/lib/elm_cnp.c +++ b/src/lib/elm_cnp.c @@ -2989,9 +2989,9 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format EINA_UNUSED, const ch Evas *evas; if (!(evas = evas_object_evas_get(obj))) - return 0; + return EINA_FALSE; if (!(ee = ecore_evas_ecore_evas_get(evas))) - return 0; + return EINA_FALSE; parent = ecore_evas_wayland_window_get(ee); } --
[EGIT] [core/efl] master 05/20: eolian_cxx: Fix Eolian C++ generated wrapper inconsistencies
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=132abc353454a2653b5b2b40d6de5f1689323a37 commit 132abc353454a2653b5b2b40d6de5f1689323a37 Author: Vitor Sousa vitorsousasi...@gmail.com Date: Tue Nov 11 20:37:47 2014 -0200 eolian_cxx: Fix Eolian C++ generated wrapper inconsistencies In convert.cc: Reading functions instead of implements to convert the Eolian_Class. It avoids creation of methods that do not belong to the class, in special it avoids calling the default constructor twice in the generated code. No longer generating one constructor in the C++ wrapper for each eolian class constructor, since the correct behavior demands that all constructor should be called. Now the wrappers have constructor methods that must be called when creating a new object. Updated test cases and examples to match the new interface. Some class constructors and some test cases have to be removed since they were based on the wrong assumption that constructors are mutually exclusive. Created new generators for forwarding parameters and for looping over the relevant parameters to the C++ wrapper executing a generic lambda. Added a TODO comment regarding the call of constructor methods of all base classes. Currently there is no base type with constructors, so this situation should be discussed more. Added a TODO comment regarding the way callback parameters are being processed. --- src/bin/eolian_cxx/convert.cc | 72 --- src/examples/eolian_cxx/colourable.c | 18 -- src/examples/eolian_cxx/colourable.eo | 10 - src/examples/eolian_cxx/colourable_cxx.cc | 12 -- src/examples/eolian_cxx/colourable_stub.h | 1 - src/examples/eolian_cxx/eolian_cxx_callbacks_01.cc | 27 +-- src/examples/eolian_cxx/eolian_cxx_inherit_01.cc | 7 +- src/examples/eolian_cxx/eolian_cxx_simple_01.cc| 8 +- .../eolian_cxx/eolian_cxx_simple_01_cxx_impl.cc| 8 +- .../grammar/eo_class_constructors_generator.hh | 222 + src/lib/eolian_cxx/grammar/eo_class_generator.hh | 6 +- src/lib/eolian_cxx/grammar/parameters_generator.hh | 154 ++ src/tests/eolian_cxx/callback.c| 23 +-- src/tests/eolian_cxx/callback.eo | 25 +-- src/tests/eolian_cxx/eolian_cxx_test_callback.cc | 13 -- 15 files changed, 452 insertions(+), 154 deletions(-) diff --git a/src/bin/eolian_cxx/convert.cc b/src/bin/eolian_cxx/convert.cc index 4e68b87..acb2c78 100644 --- a/src/bin/eolian_cxx/convert.cc +++ b/src/bin/eolian_cxx/convert.cc @@ -205,45 +205,23 @@ convert_eolian_class_new(Eolian_Class const klass) } void -convert_eolian_implements(efl::eolian::eo_class cls, Eolian_Class const klass) +convert_eolian_functions(efl::eolian::eo_class cls, Eolian_Class const klass) { - efl::eina::iteratorconst Eolian_Implement itr = implements_get(klass); - efl::eina::iteratorconst Eolian_Implement end; - - while (itr != end) + for(efl::eina::iteratorconst Eolian_Function first ( ::eolian_class_functions_get(klass, EOLIAN_METHOD)) +, last; first != last; ++first) { -const Eolian_Implement impl = *itr; -assert(!!implement_function(impl)); -assert(!!implement_class(impl)); -Eolian_Function const func = *implement_function(impl); -Eolian_Class const icls = *implement_class(impl); +Eolian_Function const func = *first; +Eolian_Function_Type const func_type = function_op_type(func); -if (implement_is_property_get(impl)) - { - cls.functions.push_back - (_convert_property_get_to_function(icls, func)); - } -else if (implement_is_property_set(impl)) - { - cls.functions.push_back - (_convert_property_set_to_function(icls, func)); - } -else if (function_op_type(func) == eolian_cxx::property.value) - { - cls.functions.push_back - (_convert_property_get_to_function(icls, func)); - cls.functions.push_back - (_convert_property_set_to_function(icls, func)); - } -else if (function_is_constructor(klass, func)) +if (function_is_constructor(klass, func)) { cls.constructors.push_back({ function_impl(func), _convert_eolian_parameters(func), - convert_comments_function(icls, func) + convert_comments_function(klass, func) }); } -else if (implement_is_visible(impl)) +else if (function_is_visible(func, func_type)) { cls.functions.push_back({ function_type(func), @@ -251,10 +229,38 @@ convert_eolian_implements(efl::eolian::eo_class cls,
[EGIT] [core/efl] master 01/20: eina_cxx: Fix eina::accessor for C++ Eo wrappers
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ee81566ac891162ce4fb56da7648de31f0bbe7a7 commit ee81566ac891162ce4fb56da7648de31f0bbe7a7 Author: Vitor Sousa vitorsousasi...@gmail.com Date: Mon Nov 3 11:38:17 2014 -0200 eina_cxx: Fix eina::accessor for C++ Eo wrappers Created a specialization of the eina::accessor for C++ Eo wrappers. Created an override of the accessor methods in the eina::list specialization for Eo wrappers (in eina_list.hh). It is necessary to create accessors with the correct type. Created specializations of std::is_base_of to avoid compilation errors related with _Eo_Opaque type. Added new test cases in eina_cxx_test_accessor.cc to test the accessor specialization. Added efl::eina::eina_init to the existing test cases to correctly do the on demand initialization required by the tests. @fix --- src/bindings/eina_cxx/eina_accessor.hh | 549 ++- src/bindings/eina_cxx/eina_eo_base_fwd.hh| 23 ++ src/bindings/eina_cxx/eina_list.hh | 21 + src/tests/eina_cxx/eina_cxx_test_accessor.cc | 86 + 4 files changed, 592 insertions(+), 87 deletions(-) diff --git a/src/bindings/eina_cxx/eina_accessor.hh b/src/bindings/eina_cxx/eina_accessor.hh index 98be3af..e64d0ef 100644 --- a/src/bindings/eina_cxx/eina_accessor.hh +++ b/src/bindings/eina_cxx/eina_accessor.hh @@ -4,6 +4,7 @@ #include Eina.h #include eina_error.hh #include eina_throw.hh +#include eina_eo_base_fwd.hh #include memory #include iterator @@ -37,7 +38,7 @@ namespace efl { namespace eina { * Wraps an native Eina_Accessor and provide random access to data structures. */ template typename T -struct accessor +struct accessor_common_base { typedef unsigned int key_type; /** Type for accessor key. */ typedef T mapped_type; /** Type for accessor mapped elements. */ @@ -47,7 +48,7 @@ struct accessor /** * @brief Default constructor. Creates an empty accessor. */ - accessor() : _impl(0) {} + accessor_common_base() : _impl(0) {} /** * @brief Create an accessor object that wraps the given Eina accessor. @@ -60,7 +61,7 @@ struct accessor * gains ownership of the given handle, deallocating it at destruction * time. */ - explicit accessor(Eina_Accessor* impl) + explicit accessor_common_base(Eina_Accessor* impl) : _impl(impl) { assert(_impl != 0); @@ -74,7 +75,7 @@ struct accessor * accessor object, so that the newly created object can be used * freely. */ - accessor(accessorT const other) + accessor_common_base(accessor_common_baseT const other) : _impl(eina_accessor_clone(other._impl)) {} @@ -86,7 +87,7 @@ struct accessor * This operator replaces the current native Eina accessor by a copy * of the native accessor inside the given object. */ - accessorT operator=(accessorT const other) + accessor_common_baseT operator=(accessor_common_baseT const other) { eina_accessor_free(_impl); _impl = eina_accessor_clone(other._impl); @@ -98,12 +99,119 @@ struct accessor /** * @brief Destructor. Free the internal @c Eina_Acessor. */ - ~accessor() + ~accessor_common_base() { eina_accessor_free(_impl); } /** + * @brief Get the handle for the wrapped @c Eina_Accessor. + * @return Internal handle for the native Eina accessor. + * + * This member function returns the native @c Eina_Accessor handle + * that is wrapped inside this object. + * + * @warning It is important to take care when using it, since the + * handle will be automatically release upon object destruction. + */ + Eina_Accessor* native_handle() const; + + /** + * @brief Swap content between both objects. + * @param other Other accessor object. + * + * This member function swaps the internal @c Eina_Acessor with the + * given accessor object. + */ + void swap(accessor_common_baseT other) + { +std::swap(_impl, other._impl); + } + /** + * @brief Cast to @c boolean based on the wrapped @c Eina_Accessor. + * @return @c true if the wrapped handle is not @c NULL, @c false otherwise. + * + * Boolean typecast overload for easy validation of the accessor + * object. Returns @c false if it does not have an internal + * @c Eina_Accessor, i.e. if the current handle is not @c NULL. + */ + explicit operator bool() const + { +return native_handle() ? accessor_common_baseT::native_handle : 0 ; + } + + /** + * @internal + * Member variable for storing the native Eina_Accessor pointer. + */ + Eina_Accessor* _impl; +}; + +template typename T, typename Enable = T +struct accessor; + +template typename T +struct accessorT, typename std::enable_if ! std::is_base_ofefl::eo::base, T::value, T::type + : accessor_common_baseT +{ + typedef accessor_common_baseT _base_type; + typedef accessorT _self_type; + + typedef typename
[EGIT] [core/efl] master 09/20: eolian-cxx: Fixed C++ conversion for lists
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=890ce1f9cf902ccd0011a4041fd90d05f93f3c8a commit 890ce1f9cf902ccd0011a4041fd90d05f93f3c8a Author: Felipe Magno de Almeida fel...@expertisesolutions.com.br Date: Sun Oct 26 19:42:55 2014 -0200 eolian-cxx: Fixed C++ conversion for lists Signed-off-by: Vitor Sousa vitorsousasi...@gmail.com --- src/bin/eolian_cxx/type_lookup.hh | 1 + src/bin/eolian_cxx/type_lookup_table.cc | 33 + src/lib/eolian_cxx/eo_types.hh | 8 ++-- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/bin/eolian_cxx/type_lookup.hh b/src/bin/eolian_cxx/type_lookup.hh index 006201c..1b64bbb 100644 --- a/src/bin/eolian_cxx/type_lookup.hh +++ b/src/bin/eolian_cxx/type_lookup.hh @@ -35,6 +35,7 @@ type_from_eolian(Eolian_Type const type) efl::eolian::eolian_type x; x.native = normalize_spaces(safe_str(::eolian_type_c_type_get(type))); x.is_own = ::eolian_type_is_own(type); + x.is_const = ::eolian_type_is_const(type); return x; } diff --git a/src/bin/eolian_cxx/type_lookup_table.cc b/src/bin/eolian_cxx/type_lookup_table.cc index bb14d95..d4e7c1e 100644 --- a/src/bin/eolian_cxx/type_lookup_table.cc +++ b/src/bin/eolian_cxx/type_lookup_table.cc @@ -13,24 +13,25 @@ type_lookup_table {Ecore_Task_Cb, eolian_type::callback_, {Ecore.h}}, {Ecore_Timeline_Cb, eolian_type::callback_, {Ecore.h}}, {Edje_Signal_Cb, eolian_type::callback_, {Edje.h}}, - {Eina_Accessor *, eolian_type::complex_, false, efl::eina::accessor, {eina-cxx/eina_accessor.hh}}, - {Eina_Bool, eolian_type::simple_, false, bool, {}}, - {Eina_Bool *, eolian_type::simple_, false, bool*, {}}, - {Eina_Inlist *, eolian_type::complex_, false, efl::eina::range_inlist, {eina-cxx/eina_inlist.hh}}, - {Eina_Inlist *, eolian_type::complex_, true, efl::eina::inlist, {eina-cxx/eina_inlist.hh}}, - {Eina_Iterator *, eolian_type::complex_, false, efl::eina::iterator, {eina-cxx/eina_iterator.hh}}, - {Eina_List *, eolian_type::complex_, false, efl::eina::range_list, {eina-cxx/eina_list.hh}}, - {Eina_List *, eolian_type::complex_, true, efl::eina::list, {eina-cxx/eina_list.hh}}, + {Eina_Accessor *, eolian_type::complex_, false, false, efl::eina::accessor, {eina-cxx/eina_accessor.hh}}, + {Eina_Bool, eolian_type::simple_, false, false, bool, {}}, + {Eina_Bool *, eolian_type::simple_, false, false, bool*, {}}, + {Eina_Inlist *, eolian_type::complex_, false, false, efl::eina::range_inlist, {eina-cxx/eina_inlist.hh}}, + {Eina_Inlist *, eolian_type::complex_, false, true, efl::eina::inlist, {eina-cxx/eina_inlist.hh}}, + {Eina_Iterator *, eolian_type::complex_, false, false, efl::eina::iterator, {eina-cxx/eina_iterator.hh}}, + {Eina_List *, eolian_type::complex_, false, false, efl::eina::range_list, {eina-cxx/eina_list.hh}}, + {Eina_List *, eolian_type::complex_, false, true, efl::eina::list, {eina-cxx/eina_list.hh}}, + {const Eina_List *, eolian_type::complex_, true, false, efl::eina::crange_list, {eina-cxx/eina_list.hh}}, {Eio_Filter_Direct_Cb, eolian_type::callback_, {Eio.h}}, - {Emodel *, eolian_type::simple_, false, emodel, {Emodel.hh}}, - {Eo *, eolian_type::simple_, true, efl::eo::base, {eo_base.hh}}, - {Eo *, eolian_type::simple_, false, efl::eo::base, {eo_base.hh}}, + {Emodel *, eolian_type::simple_, false, false, emodel, {Emodel.hh}}, + {Eo *, eolian_type::simple_, false, true, efl::eo::base, {eo_base.hh}}, + {Eo *, eolian_type::simple_, false, false, efl::eo::base, {eo_base.hh}}, //{Evas_Object_Box_Layout, eolian_type::callback_, {Evas.h}}, - {Evas_Object *, eolian_type::simple_, false, evas::object, {canvas/evas_object.eo.hh}}, - {char *, eolian_type::simple_, true, std::unique_ptrchar*, {memory}}, - {const Eina_Inlist *, eolian_type::complex_, false, efl::eina::range_inlist, {eina-cxx/eina_inlist.hh}}, - {const Eina_List *, eolian_type::complex_, false, efl::eina::crange_list, {eina-cxx/eina_ptrlist.hh}}, - {const char *, eolian_type::simple_, false, std::string, {string}} + {Evas_Object *, eolian_type::simple_, false, false, evas::object, {canvas/evas_object.eo.hh}}, + {char *, eolian_type::simple_, false, true, std::unique_ptrchar*, {memory}}, + {const Eina_Inlist *, eolian_type::complex_, false, false, efl::eina::range_inlist, {eina-cxx/eina_inlist.hh}}, + {const Eina_List *, eolian_type::complex_, false, false, efl::eina::range_list, {eina-cxx/eina_ptrlist.hh}}, + {const char *, eolian_type::simple_, false, false, std::string, {string}}, }; } diff --git a/src/lib/eolian_cxx/eo_types.hh b/src/lib/eolian_cxx/eo_types.hh index 3ce3e09..9223779 100644 --- a/src/lib/eolian_cxx/eo_types.hh +++ b/src/lib/eolian_cxx/eo_types.hh @@ -31,6 +31,7 @@ struct eolian_type eolian_type() : native() , category(unknown_) + , is_const(false) , is_own(false) , binding() , includes() @@ -38,11 +39,13 @@
[EGIT] [core/efl] master 16/20: eolian_cxx: Fix compilation of inheritance from Eolian generated classes
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4222cd3f50042452893bc24e85376f3c1b4ce748 commit 4222cd3f50042452893bc24e85376f3c1b4ce748 Author: Vitor Sousa vitorsousasi...@gmail.com Date: Tue Dec 30 21:18:40 2014 -0200 eolian_cxx: Fix compilation of inheritance from Eolian generated classes Updated the code for the inheritance helper functions and classes to be in conformance with the new wrapper architecture. Member variable parents of efl::eo::eo_class struct was split in two member variables, ancestors and parents, the former containing all Eo class ancestors and the later only the direct bases. Changed all required files accordingly. Check to avoid using biding string when the parameter is @out now matches any variation of char. Add default constructor to efl::eo::concrete in order to allow it to be NULL initialized in the inheritance helper classes. Removed conflicting parent_set member function in the efl::eo::inherit class. Removed the inheritance_extension_function generator since it is no longer used. --- src/bin/eolian_cxx/convert.cc | 14 ++- src/bin/eolian_cxx/eolian_wrappers.hh | 2 +- src/bindings/eo_cxx/eo_concrete.hh | 9 ++ src/bindings/eo_cxx/eo_cxx_interop.hh | 8 ++ src/bindings/eo_cxx/eo_inherit.hh | 6 - src/bindings/eo_cxx/eo_private.hh | 7 +- src/lib/eolian_cxx/eo_types.hh | 5 +- .../grammar/eo_class_constructors_generator.hh | 6 +- src/lib/eolian_cxx/grammar/eo_class_generator.hh | 2 +- .../grammar/inheritance_base_generator.hh | 131 +++-- .../eolian_cxx/eolian_cxx_test_inheritance.cc | 2 +- src/tests/eolian_cxx/simple.eo | 4 +- 12 files changed, 59 insertions(+), 137 deletions(-) diff --git a/src/bin/eolian_cxx/convert.cc b/src/bin/eolian_cxx/convert.cc index 2fa45b5..fab4c16 100644 --- a/src/bin/eolian_cxx/convert.cc +++ b/src/bin/eolian_cxx/convert.cc @@ -24,7 +24,7 @@ namespace eolian_cxx { extern efl::eina::log_domain domain; void -add_parent_recursive(const char* klass_name, std::setstd::string parents) +add_ancestor_recursive(const char* klass_name, std::setstd::string ancestor) { if (!klass_name) return; @@ -36,14 +36,14 @@ add_parent_recursive(const char* klass_name, std::setstd::string parents) return; } - parents.insert(class_format_cxx(safe_lower(klass_name))); + ancestor.insert(class_format_cxx(safe_lower(klass_name))); Eina_Iterator* inheritances = ::eolian_class_inherits_get(klass); void* curr = 0; EINA_ITERATOR_FOREACH(inheritances, curr) { -add_parent_recursive(static_castconst char*(curr), parents); +add_ancestor_recursive(static_castconst char*(curr), ancestor); } eina_iterator_free(inheritances); } @@ -182,15 +182,17 @@ convert_eolian_inheritances(efl::eolian::eo_class cls, Eolian_Class const klas ::eolian_class_inherits_get(klass); void *curr; - std::setstd::string parents; + std::setstd::string ancestors; EINA_ITERATOR_FOREACH(inheritances, curr) { -add_parent_recursive(static_castconst char*(curr), parents); +const char* klass_name = static_castconst char*(curr); +cls.parents.push_back(class_format_cxx(safe_lower(klass_name))); +add_ancestor_recursive(klass_name, ancestors); } eina_iterator_free(inheritances); - cls.parents.assign(parents.begin(), parents.end()); + cls.ancestors.assign(ancestors.begin(), ancestors.end()); } void diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh index 6b0211e..4771739 100644 --- a/src/bin/eolian_cxx/eolian_wrappers.hh +++ b/src/bin/eolian_cxx/eolian_wrappers.hh @@ -348,7 +348,7 @@ parameter_type(Eolian_Function_Parameter const parameter, assert(!type.empty()); if (parameter_is_out(parameter)) { -if (type.front().native == char *) +if (type.front().native.find(char) != std::string::npos) type = { efl::eolian::type_to_native(type) }; type.is_out = true; type.front().native += *; diff --git a/src/bindings/eo_cxx/eo_concrete.hh b/src/bindings/eo_cxx/eo_concrete.hh index d92fe7b..cd72dd7 100644 --- a/src/bindings/eo_cxx/eo_concrete.hh +++ b/src/bindings/eo_cxx/eo_concrete.hh @@ -47,6 +47,15 @@ struct concrete { } + + /// @brief Default constructor. + /// + /// Constructs a NULL initialized efl::eo::concrete object. + /// + concrete() : _eo_raw(nullptr) + { + } + /// @brief Class destructor. /// ~concrete() diff --git a/src/bindings/eo_cxx/eo_cxx_interop.hh b/src/bindings/eo_cxx/eo_cxx_interop.hh index b0ca1ed..ddf4375 100644 --- a/src/bindings/eo_cxx/eo_cxx_interop.hh +++
[EGIT] [core/efl] master 03/20: eina_cxx: Using eina::eina_init in all tests cases
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1cbbb9a577eb2dbbfebb441702635b2245840d1c commit 1cbbb9a577eb2dbbfebb441702635b2245840d1c Author: Vitor Sousa vitorsousasi...@gmail.com Date: Mon Nov 3 14:26:08 2014 -0200 eina_cxx: Using eina::eina_init in all tests cases Removed the eina_init call from the test suite main function to enforce that each test case creates an instance of the eina::eina_init object. Added an eina::eina_init object instanciation for each test case that were lacking this code. --- src/tests/eina_cxx/eina_cxx_suite.cc | 2 -- src/tests/eina_cxx/eina_cxx_test_thread.cc | 2 ++ src/tests/eina_cxx/eina_cxx_test_value.cc | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tests/eina_cxx/eina_cxx_suite.cc b/src/tests/eina_cxx/eina_cxx_suite.cc index 7555805..9ee1082 100644 --- a/src/tests/eina_cxx/eina_cxx_suite.cc +++ b/src/tests/eina_cxx/eina_cxx_suite.cc @@ -121,8 +121,6 @@ int main(int argc, char* argv[]) srunner_set_xml(sr, TESTS_BUILD_DIR /check-results.xml); - eina_init(); - srunner_run_all(sr, CK_ENV); failed_count = srunner_ntests_failed(sr); srunner_free(sr); diff --git a/src/tests/eina_cxx/eina_cxx_test_thread.cc b/src/tests/eina_cxx/eina_cxx_test_thread.cc index 11a8f39..abf1c7a 100644 --- a/src/tests/eina_cxx/eina_cxx_test_thread.cc +++ b/src/tests/eina_cxx/eina_cxx_test_thread.cc @@ -68,6 +68,7 @@ END_TEST START_TEST(eina_cxx_thread_mutexes) { + efl::eina::eina_init init; efl::eina::mutex m; { @@ -103,6 +104,7 @@ void condition_thread(efl::eina::mutex condition_mutex START_TEST(eina_cxx_thread_conditional) { + efl::eina::eina_init init; efl::eina::mutex m; efl::eina::mutex condition_mutex; diff --git a/src/tests/eina_cxx/eina_cxx_test_value.cc b/src/tests/eina_cxx/eina_cxx_test_value.cc index 61ccbed..d57980a 100644 --- a/src/tests/eina_cxx/eina_cxx_test_value.cc +++ b/src/tests/eina_cxx/eina_cxx_test_value.cc @@ -167,6 +167,7 @@ END_TEST START_TEST(eina_cxx_value_copying) { + efl::eina::eina_init init; char c = 5; efl::eina::value vchar(c); @@ -186,6 +187,7 @@ END_TEST START_TEST(eina_cxx_value_temporaries) { + efl::eina::eina_init init; efl::eina::getstd::string(efl::eina::value(std::string(Matroska))); } END_TEST --
[EGIT] [core/efl] master 04/20: eolian_cxx: Assertions to ensure C++ wrapper compatibility with Eo*
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ed8ce801cb56644c12b395797c3f9e22a508811f commit ed8ce801cb56644c12b395797c3f9e22a508811f Author: Vitor Sousa vitorsousasi...@gmail.com Date: Tue Nov 11 13:03:59 2014 -0200 eolian_cxx: Assertions to ensure C++ wrapper compatibility with Eo* Added static assertion in the generated header to ensure that the wrapper have the same size of Eo*, thus grating compatibility between these types. Added static assertion in the generated header to ensure that the wrapper have standard layout. This should ensure correct type sizes when dealing with inheritance. Created a test to ensure that eo::base and the eolian wrappers have the same size of a Eo*. Added eolian_cxx_test_wrapper.cc to the list of test source files in Makefile_Eolian_Cxx.am. --- src/Makefile_Eolian_Cxx.am | 1 + src/lib/eolian_cxx/grammar/eo_class_generator.hh | 5 +++- src/tests/eolian_cxx/eolian_cxx_suite.cc | 2 ++ src/tests/eolian_cxx/eolian_cxx_test_wrapper.cc | 29 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am index a2d0766..14cf493 100644 --- a/src/Makefile_Eolian_Cxx.am +++ b/src/Makefile_Eolian_Cxx.am @@ -62,6 +62,7 @@ tests/eolian_cxx/eolian_cxx_suite.cc \ tests/eolian_cxx/eolian_cxx_test_parse.cc \ tests/eolian_cxx/callback.c \ tests/eolian_cxx/eolian_cxx_test_callback.cc \ +tests/eolian_cxx/eolian_cxx_test_wrapper.cc \ tests/eolian_cxx/eolian_cxx_test_generate.cc tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-eolian_cxx_test_callback.$(OBJEXT): tests/eolian_cxx/callback.eo.hh diff --git a/src/lib/eolian_cxx/grammar/eo_class_generator.hh b/src/lib/eolian_cxx/grammar/eo_class_generator.hh index 2b2233b..656a791 100644 --- a/src/lib/eolian_cxx/grammar/eo_class_generator.hh +++ b/src/lib/eolian_cxx/grammar/eo_class_generator.hh @@ -46,7 +46,10 @@ eo_class_generator(std::ostream out, eo_class const cls) eo_class_getter(cls) private: endl eo_class_constructors(cls) -}; endl; +}; endl +static_assert(sizeof( cls.name ) == sizeof(Eo*), \sizeof( cls.name ) != sizeof(Eo*)\); endl +static_assert(std::is_standard_layout cls.name ::value, \' cls.name ' is not standard layout\); +endl endl; } } } } // namespace efl { namespace eolian { namespace grammar { diff --git a/src/tests/eolian_cxx/eolian_cxx_suite.cc b/src/tests/eolian_cxx/eolian_cxx_suite.cc index bd08e9b..20a8c34 100644 --- a/src/tests/eolian_cxx/eolian_cxx_suite.cc +++ b/src/tests/eolian_cxx/eolian_cxx_suite.cc @@ -4,6 +4,7 @@ #include cassert void eolian_cxx_test_parse(TCase* tc); +void eolian_cxx_test_wrapper(TCase* tc); void eolian_cxx_test_generate(TCase* tc); void eolian_cxx_test_callback(TCase* tc); @@ -16,6 +17,7 @@ struct _Eolian_Cxx_Test_Case static const Eolian_Cxx_Test_Case etc[] = { { Eolian-Cxx Parsing, eolian_cxx_test_parse }, + { Eolian-Cxx Wrapper, eolian_cxx_test_wrapper }, { Eolian-Cxx Generation, eolian_cxx_test_generate }, { Eolian-Cxx Callback, eolian_cxx_test_callback }, { NULL, NULL } diff --git a/src/tests/eolian_cxx/eolian_cxx_test_wrapper.cc b/src/tests/eolian_cxx/eolian_cxx_test_wrapper.cc index fb680a5..123b508 100644 --- a/src/tests/eolian_cxx/eolian_cxx_test_wrapper.cc +++ b/src/tests/eolian_cxx/eolian_cxx_test_wrapper.cc @@ -1,2 +1,31 @@ // Test Eolian-Cxx wrappers + +#ifdef HAVE_CONFIG_H +# include config.h +#endif + +#include Eo.h +#include Ecore.h + +#include callback.eo.hh + +#include check.h + +START_TEST(eolian_cxx_test_wrapper_size) +{ + efl::eo::eo_init init; + + ::efl::eo::base b(nullptr); + ::callback c; + + fail_if(sizeof(b) != sizeof(Eo*)); + fail_if(sizeof(b) != sizeof(c)); +} +END_TEST + +void +eolian_cxx_test_wrapper(TCase* tc) +{ + tcase_add_test(tc, eolian_cxx_test_wrapper_size); +} --
[EGIT] [core/efl] master 12/20: cxx: General C++ Eo wrapper generation improvement
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ed75aa32d6ccdea66a952ed5c82203b0cd1961b2 commit ed75aa32d6ccdea66a952ed5c82203b0cd1961b2 Author: Vitor Sousa vitorsousasi...@gmail.com Date: Wed Dec 17 11:47:19 2014 -0200 cxx: General C++ Eo wrapper generation improvement Using a new architecture in the generated files that simplify multiple inheritance and allows the use of interface types as parameters. No longer using a hand-crafted C++ header for eo_base.eo. This file was added to the generation process. Updated all files that are dependent in the hand-crafted eo_base C++ header. Now there is a class that contains the essentials functions of the former eo::base wrapper and that is used to create (through inheritance) the concrete classes for all Eo generated wrappers. No longer binding any function or property that are protected, private or legacy for now. eolian_type_instance is now a struct with general information for the whole type. Added the new header file namespace_generator.hh to hold namespace generation grammars. Separated declaration and definition of Eo wrappers methods. Referring for most objects by its full name (starting at the global namespace ::) in the generated files. Created additional helper grammars to avoid code replication. Removed a TODO comment referring to a doubt about inheritance of constructor methods. Added a TODO comment regarding memory allocation for callbacks in static member functions. --- src/Makefile_Eina_Cxx.am | 2 +- src/Makefile_Eo_Cxx.am | 13 ++- src/Makefile_Eolian_Cxx.am | 1 + src/bin/eolian_cxx/convert.cc | 69 src/bin/eolian_cxx/eolian_cxx.cc | 9 +- src/bin/eolian_cxx/eolian_wrappers.hh | 8 +- src/bin/eolian_cxx/type_lookup.hh | 6 +- src/bin/eolian_cxx/type_lookup_table.cc| 34 +++--- src/bindings/eina_cxx/eina_accessor.hh | 12 +-- src/bindings/eina_cxx/eina_array.hh| 4 +- src/bindings/eina_cxx/eina_eo_base_fwd.hh | 33 -- src/bindings/eina_cxx/eina_eo_concrete_fwd.hh | 33 ++ src/bindings/eina_cxx/eina_list.hh | 4 +- src/bindings/eina_cxx/eina_ptrlist.hh | 2 +- src/bindings/eo_cxx/Eo.hh | 2 +- src/bindings/eo_cxx/{eo_base.hh = eo_concrete.hh} | 117 + src/bindings/eo_cxx/eo_cxx_interop.hh | 12 +-- src/bindings/eo_cxx/eo_inherit.hh | 2 +- src/lib/eolian_cxx/eo_types.hh | 63 --- src/lib/eolian_cxx/eo_validate.hh | 2 +- .../grammar/eo_class_constructors_generator.hh | 113 +++- .../grammar/eo_class_events_generator.hh | 13 +-- .../grammar/eo_class_functions_generator.hh| 103 +- src/lib/eolian_cxx/grammar/eo_class_generator.hh | 105 -- src/lib/eolian_cxx/grammar/eo_header_generator.hh | 38 +-- .../grammar/inheritance_base_generator.hh | 26 ++--- src/lib/eolian_cxx/grammar/namespace_generator.hh | 68 src/lib/eolian_cxx/grammar/parameters_generator.hh | 2 +- src/lib/eolian_cxx/grammar/type_generator.hh | 63 --- src/tests/eina_cxx/eina_cxx_test_accessor.cc | 4 +- src/tests/eina_cxx/eina_cxx_test_ptrarray.cc | 4 +- src/tests/eina_cxx/eina_cxx_test_ptrlist.cc| 4 +- src/tests/eolian_cxx/eolian_cxx_test_wrapper.cc| 2 +- 33 files changed, 599 insertions(+), 374 deletions(-) diff --git a/src/Makefile_Eina_Cxx.am b/src/Makefile_Eina_Cxx.am index 5c5e2db..77cf577 100644 --- a/src/Makefile_Eina_Cxx.am +++ b/src/Makefile_Eina_Cxx.am @@ -12,7 +12,7 @@ bindings/eina_cxx/eina_accessor.hh \ bindings/eina_cxx/eina_array.hh \ bindings/eina_cxx/eina_clone_allocators.hh \ bindings/eina_cxx/eina_error.hh \ -bindings/eina_cxx/eina_eo_base_fwd.hh \ +bindings/eina_cxx/eina_eo_concrete_fwd.hh \ bindings/eina_cxx/eina_fold.hh \ bindings/eina_cxx/eina_inarray.hh \ bindings/eina_cxx/eina_inlist.hh \ diff --git a/src/Makefile_Eo_Cxx.am b/src/Makefile_Eo_Cxx.am index 21987b5..81c8826 100644 --- a/src/Makefile_Eo_Cxx.am +++ b/src/Makefile_Eo_Cxx.am @@ -1,4 +1,15 @@ +### Generated Headers + +generated_eo_cxx_bindings = \ +lib/eo/eo_base.eo.hh \ +lib/eo/eo_abstract_class.eo.hh + +CLEANFILES += $(generated_eo_cxx_bindings) + +installed_eocxxheadersdir = $(includedir)/eo-cxx-@VMAJ@ +nodist_installed_eocxxheaders_DATA = $(generated_eo_cxx_bindings) + ### Library if HAVE_CXX11 @@ -9,7 +20,7 @@ bindings/eo_cxx/Eo.hh installed_eocxxheadersdir = $(includedir)/eo-cxx-@VMAJ@/
[EGIT] [core/efl] master 07/20: eolian_cxx: Fix callback handling on generated wrappers
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=64dede1cf1d0ab84bb8b0acfb76637621ddcdc8c commit 64dede1cf1d0ab84bb8b0acfb76637621ddcdc8c Author: Vitor Sousa vitorsousasi...@gmail.com Date: Wed Nov 19 13:59:21 2014 -0200 eolian_cxx: Fix callback handling on generated wrappers Added callbacks to the event EO_EV_DEL for deleting heap-allocated function objects. This will enforce that the allocated memory, necessary for maintaining these callable objects alive, is freed at least when the underlaying Eo object is destroyed. Functions and constructor methods are now able to have multiple callback types. Removed some unused generators, since they become inconsistent now that functions are required to handle multiple callback types. Allocating callback objects in the constructor methods instead of delaying it until the final constructor is called. Created some generators to avoid code repetition. Now the generator parameters_forward_to_c replicate the behavior of the generator parameters_list. The generator parameters_list was, then, removed since it have a less intuitive name. Added a TODO comment regarding the behaviour of simple not translating callbacks that are not followed by a user data pointer. The generator parameter_type was moved from parameters_generator.hh to type_generator.hh for more consistency and convenience. --- src/bindings/eo_cxx/eo_cxx_interop.hh | 9 + .../grammar/eo_class_constructors_generator.hh | 259 +++-- .../grammar/eo_class_functions_generator.hh| 16 +- .../grammar/inheritance_base_generator.hh | 27 +-- src/lib/eolian_cxx/grammar/parameters_generator.hh | 228 +++--- src/lib/eolian_cxx/grammar/type_generator.hh | 78 ++- 6 files changed, 375 insertions(+), 242 deletions(-) diff --git a/src/bindings/eo_cxx/eo_cxx_interop.hh b/src/bindings/eo_cxx/eo_cxx_interop.hh index 174d543..fa3e44b 100644 --- a/src/bindings/eo_cxx/eo_cxx_interop.hh +++ b/src/bindings/eo_cxx/eo_cxx_interop.hh @@ -234,6 +234,15 @@ C get_callback() (tagtypename callback_args_typeC::type()); } +template typename F +Eina_Bool free_callback_calback(void* data, Eo* obj EINA_UNUSED +, Eo_Event_Description const* e EINA_UNUSED +, void* event_info EINA_UNUSED) +{ + delete (F*) data; + return EO_CALLBACK_CONTINUE; +} + } } // namespace efl { namespace eolian { #endif // EFL_EOLIAN_INTEROP_HH diff --git a/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh b/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh index f02ca7b..c7a9bbb 100644 --- a/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh +++ b/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh @@ -104,12 +104,25 @@ inline std::ostream operator(std::ostream out, constructor_functor_type_decl const x) { out constructor_functor_type_name(x._ctor); - auto cb_it = parameters_find_callback(x._ctor.params); - if(cb_it != x._ctor.params.cend()) + + if (parameters_count_callbacks(x._ctor.params) == 0) + return out; + + bool comma = false; + out ; + auto first = x._ctor.params.cbegin(), last = x._ctor.params.cend(); + for(auto it = first; it != last; ++it) { -out F; +if (type_is_callback((*it).type) it+1 != last) + { + if (comma) + out , ; + else + comma = true; + out template_parameter_type((*it).type, (*it).name); + } } - return out; + return out ; } struct functors_constructor_methods @@ -127,17 +140,24 @@ operator(std::ostream out, functors_constructor_methods const x) for (it = first; it != last; ++it) { eo_constructor const c = *it; -auto cb_it = parameters_find_callback(c.params); -bool has_callback = (cb_it != c.params.cend()); // Struct declaration -if(has_callback) - { - out tab(1) template typename F endl; - } -out tab(1) struct constructor_functor_type_name(c) endl +out template_parameters_declaration(c.params, 1) + tab(1) struct constructor_functor_type_name(c) endl tab(1) { endl; +// Callbacks typedefs +out parameters_cxx_generic(c.params, + [](param_data d) + { +if (d.is_cb) + d.out tab(2) + parameter_remove_reference_typedef(d.type, d.name) + endl; + } + ) + endl; + // Struct constructor out tab(2) constructor_functor_type_name(c) ( parameters_declaration(c.params) ) @@ -148,7
[EGIT] [core/efl] master 15/20: allow C++ user create new classes inheriting from Eolian generated Classes
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2b12114777cc9e0b7db3894f37dd71f6b5b073b4 commit 2b12114777cc9e0b7db3894f37dd71f6b5b073b4 Author: Larry Jr larry@gmail.com Date: Tue Aug 26 15:54:28 2014 -0300 allow C++ user create new classes inheriting from Eolian generated Classes --- src/Makefile.am| 2 +- src/Makefile_Eolian_Cxx.am | 13 - src/bindings/eo_cxx/eo_private.hh | 17 ++ src/examples/eolian_cxx/eolian_cxx_inherit_01.cc | 24 +++- .../grammar/inheritance_base_generator.hh | 67 +- src/tests/eolian_cxx/eolian_cxx_suite.cc | 2 + .../eolian_cxx/eolian_cxx_test_inheritance.cc | 44 ++ src/tests/eolian_cxx/simple.c | 38 src/tests/eolian_cxx/simple.eo | 19 ++ 9 files changed, 221 insertions(+), 5 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 57b56b7..b0b4884 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,7 @@ MAINTAINERCLEANFILES = Makefile.in CLEANFILES = BUILT_SOURCES = -EOLIAN_FLAGS = \ +EOLIAN_FLAGS = -I$(srcdir)\ -I$(srcdir)/lib/eo \ -I$(srcdir)/lib/evas/canvas \ -I$(srcdir)/lib/edje \ diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am index 88f1186..d0b8450 100644 --- a/src/Makefile_Eolian_Cxx.am +++ b/src/Makefile_Eolian_Cxx.am @@ -72,6 +72,8 @@ tests/eolian_cxx/d.c \ tests/eolian_cxx/eolian_cxx_test_callback.cc \ tests/eolian_cxx/eolian_cxx_test_address_of.cc \ tests/eolian_cxx/eolian_cxx_test_wrapper.cc \ +tests/eolian_cxx/simple.c \ +tests/eolian_cxx/eolian_cxx_test_inheritance.cc \ tests/eolian_cxx/eolian_cxx_test_generate.cc tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-eolian_cxx_test_callback.$(OBJEXT): tests/eolian_cxx/callback.eo.hh @@ -83,7 +85,15 @@ tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-b.$(OBJEXT): tests/eolian_cxx tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-c.$(OBJEXT): tests/eolian_cxx/c.eo.c tests/eolian_cxx/c.eo.h tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-d.$(OBJEXT): tests/eolian_cxx/d.eo.c tests/eolian_cxx/d.eo.h -CLEANFILES += tests/eolian_cxx/callback.eo.hh tests/eolian_cxx/callback.eo.c tests/eolian_cxx/callback.eo.h \ +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-eolian_cxx_test_inheritance.$(OBJEXT): tests/eolian_cxx/simple.eo.hh + +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-simple.$(OBJEXT): tests/eolian_cxx/simple.eo.c tests/eolian_cxx/simple.eo.h + +CLEANFILES += tests/eolian_cxx/callback.eo.hh tests/eolian_cxx/callback.eo.c \ +tests/eolian_cxx/callback.eo.h \ +tests/eolian_cxx/simple.eo.c \ +tests/eolian_cxx/simple.eo.h \ +tests/eolian_cxx/simple.eo.hh \ tests/eolian_cxx/a.eo.hh tests/eolian_cxx/a.eo.c tests/eolian_cxx/a.eo.h \ tests/eolian_cxx/b.eo.hh tests/eolian_cxx/b.eo.c tests/eolian_cxx/b.eo.h \ tests/eolian_cxx/c.eo.hh tests/eolian_cxx/c.eo.c tests/eolian_cxx/c.eo.h \ @@ -111,6 +121,7 @@ tests_eolian_cxx_eolian_cxx_suite_DEPENDENCIES = @USE_EOLIAN_INTERNAL_LIBS@ endif EXTRA_DIST += tests/eolian_cxx/callback.eo \ +tests/eolian_cxx/simple.eo \ tests/eolian_cxx/a.eo \ tests/eolian_cxx/b.eo \ tests/eolian_cxx/c.eo \ diff --git a/src/bindings/eo_cxx/eo_private.hh b/src/bindings/eo_cxx/eo_private.hh index a227173..7640890 100644 --- a/src/bindings/eo_cxx/eo_private.hh +++ b/src/bindings/eo_cxx/eo_private.hh @@ -86,6 +86,9 @@ Eo_Class const* do_eo_class_new(Eo_Class_Description class_desc) template typename T struct operation_description_class_size; +template +struct operation_description_class_sizeefl::eo::base { static const int value = 0; }; + /// @internal /// /// @brief Provides the operator to convert @p T to @p D. @@ -130,6 +133,9 @@ namespace detail { /// template typename T struct operations; +template +struct operationsefl::eo::base { template typename T struct type {}; }; + /// @internal /// /// @brief Provides the operations of an extension as well as its @@ -153,6 +159,17 @@ struct Inherit_Private_Data void* this_; }; +} } } // namespace efl { namespace eo { namespace detail { + +namespace efl { namespace eo { namespace detail { +template typename T +int initialize_operation_description(efl::eo::detail::tagefl::eo::base + , Eo_Op_Description* ops) +{ + (void)ops; + return 0; +} + /// @} } } } // namespace efl { namespace eo { namespace detail { diff --git a/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc b/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc index b258f05..0e6fce9 100644 --- a/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc +++ b/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc @@ -30,7 +30,7 @@ struct ColourableCircle } }; - +/* struct ColourableFoo : efl::eo::inheritColourableFoo,
[EGIT] [core/efl] master 13/20: eolian_cxx: Fix dreaded diamond inheritance problem for C++ wrappers
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6519ae6ed98789857722cd1d6e3c1c254ad229e7 commit 6519ae6ed98789857722cd1d6e3c1c254ad229e7 Author: Vitor Sousa vitorsousasi...@gmail.com Date: Fri Dec 19 14:34:15 2014 -0200 eolian_cxx: Fix dreaded diamond inheritance problem for C++ wrappers Solved diamond inheritance problem by completely removing inheritance in the abstract class. All ancestors are inherited directly in the concrete class. The algorithm that list the ancestors also avoid repetition. Now concrete classes define methods too. This helps referring the correct method directly by the object type (when there are methods with the same name). Moved the declaration and definition of constructor methods to the concrete class, since they should not be used in derived classes. Updated example that call color_set. With this model, if two ancestor classes have a method with the same name, to call one of them from a derived class you must write the scoped name of the member function in the wrapper. In this case, either Evas.Object and Evas.SmartObject have a property named color. Added from_global option to the full_name grammar too. --- src/bin/eolian_cxx/convert.cc | 34 -- .../eolian_cxx/eolian_cxx_complex_types_01.cc | 2 +- .../grammar/eo_class_constructors_generator.hh | 7 ++--- .../grammar/eo_class_functions_generator.hh| 21 + src/lib/eolian_cxx/grammar/eo_class_generator.hh | 16 ++ src/lib/eolian_cxx/grammar/type_generator.hh | 10 +-- 6 files changed, 48 insertions(+), 42 deletions(-) diff --git a/src/bin/eolian_cxx/convert.cc b/src/bin/eolian_cxx/convert.cc index 8f5cec8..2fa45b5 100644 --- a/src/bin/eolian_cxx/convert.cc +++ b/src/bin/eolian_cxx/convert.cc @@ -1,5 +1,6 @@ #include vector +#include set #include algorithm #include cassert #include cstddef @@ -23,8 +24,11 @@ namespace eolian_cxx { extern efl::eina::log_domain domain; void -remove_repeated_base(const char* klass_name, efl::eolian::parents_container_type cont) +add_parent_recursive(const char* klass_name, std::setstd::string parents) { + if (!klass_name) + return; + Eolian_Class const* klass = ::eolian_class_get_by_name(klass_name); if (!klass) { @@ -32,20 +36,14 @@ remove_repeated_base(const char* klass_name, efl::eolian::parents_container_type return; } + parents.insert(class_format_cxx(safe_lower(klass_name))); + Eina_Iterator* inheritances = ::eolian_class_inherits_get(klass); void* curr = 0; EINA_ITERATOR_FOREACH(inheritances, curr) { -if (!curr) - continue; - -const char* parent = static_castconst char*(curr); -cont.erase( - std::remove(cont.begin(), cont.end(), safe_lower(class_format_cxx(parent))) - , cont.end()); - -remove_repeated_base(parent, cont); +add_parent_recursive(static_castconst char*(curr), parents); } eina_iterator_free(inheritances); } @@ -184,23 +182,15 @@ convert_eolian_inheritances(efl::eolian::eo_class cls, Eolian_Class const klas ::eolian_class_inherits_get(klass); void *curr; - EINA_ITERATOR_FOREACH(inheritances, curr) - { -std::string parent = safe_lower(static_castconst char*(curr)); -cls.parents.push_back(class_format_cxx(parent)); - } - eina_iterator_free(inheritances); + std::setstd::string parents; - if (cls.parents.empty()) - return; - - inheritances = ::eolian_class_inherits_get(klass); EINA_ITERATOR_FOREACH(inheritances, curr) { -if (curr) - remove_repeated_base(static_castconst char*(curr), cls.parents); +add_parent_recursive(static_castconst char*(curr), parents); } eina_iterator_free(inheritances); + + cls.parents.assign(parents.begin(), parents.end()); } void diff --git a/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc b/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc index 264ece2..8dd5d29 100644 --- a/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc +++ b/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc @@ -74,7 +74,7 @@ example_complex_types() efl::evas::grid grid(efl::eo::parent = canvas); grid.position_set(0, 0); - grid.color_set(0, 0, 0, 255); + grid.object_smart::color_set(0, 0, 0, 255); grid.size_set(5, 5); grid.visibility_set(true); diff --git a/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh b/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh index 9e1ab58..9ffed75 100644 --- a/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh +++ b/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh @@ -46,8 +46,7 @@ operator(std::ostream out, class_inheritance const x) last = cls.parents.cend();
[EGIT] [core/efl] master 19/20: eolian_cxx: Using eina::optional to handle parameters without @nonull property
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=666b0da912db102c048cd2fd5a964dedfd956b56 commit 666b0da912db102c048cd2fd5a964dedfd956b56 Author: Vitor Sousa vitorsousasi...@gmail.com Date: Mon Jan 5 15:41:37 2015 -0200 eolian_cxx: Using eina::optional to handle parameters without @nonull property --- src/bin/eolian_cxx/eolian_wrappers.hh| 4 + src/bindings/eo_cxx/eo_cxx_interop.hh| 134 +++ src/lib/eolian_cxx/eo_types.hh | 13 ++- src/lib/eolian_cxx/grammar/type_generator.hh | 2 + 4 files changed, 152 insertions(+), 1 deletion(-) diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh index 4771739..d1b28a6 100644 --- a/src/bin/eolian_cxx/eolian_wrappers.hh +++ b/src/bin/eolian_cxx/eolian_wrappers.hh @@ -359,6 +359,10 @@ parameter_type(Eolian_Function_Parameter const parameter, if (!type.front().binding.empty()) type.front().binding.insert(0, const ); } + if (::eolian_parameter_is_nonull(parameter)) + { +type.is_nonull = true; + } return type; } diff --git a/src/bindings/eo_cxx/eo_cxx_interop.hh b/src/bindings/eo_cxx/eo_cxx_interop.hh index ddf4375..ba6a473 100644 --- a/src/bindings/eo_cxx/eo_cxx_interop.hh +++ b/src/bindings/eo_cxx/eo_cxx_interop.hh @@ -20,11 +20,27 @@ to_c(std::string const x) } inline const char* +to_c(eina::optionalstd::string const x) +{ + if (!x) + return nullptr; + return x-c_str(); +} + +inline const char* to_c(efl::eina::stringshare const x) { return x.c_str(); } +inline const char* +to_c(eina::optionalefl::eina::stringshare const x) +{ + if (!x) + return nullptr; + return x-c_str(); +} + inline Eina_Bool to_c(bool x) { @@ -51,6 +67,14 @@ Eo* to_c(T const v, typename std::enable_ifstd::is_convertibleT*, ::efl::eo:: } template typename T +Eo* to_c(eina::optionalT const v, typename std::enable_ifstd::is_convertibleT*, ::efl::eo::concrete*::value::type* = 0) +{ + if (!v) + return nullptr; + return v-_eo_ptr(); +} + +template typename T Eo** to_c(T* v, typename std::enable_ifstd::is_convertibleT*, ::efl::eo::concrete*::value::type* = 0) { static_assert(sizeof(T) == sizeof(Eo*), ); @@ -65,6 +89,15 @@ R to_native(T const v) } template typename R, typename T +R to_native(eina::optionalT const v) +{ + static_assert(sizeof(T) == sizeof(R), ); + if (!v) + return nullptr; + return v-native_handle(); +} + +template typename R, typename T R to_native(T* v) { static_assert(sizeof(T) == sizeof(typename std::remove_pointerR::type), ); @@ -109,6 +142,24 @@ to_cxx(Eo* x, std::tuplestd::false_type, tagT) } template typename T +inline eina::optionalT +to_cxx(Eo* x, std::tuplestd::true_type, tageina::optionalT ) +{ + if (!x) + return nullptr; + return T(x); +} + +template typename T +inline eina::optionalT +to_cxx(Eo* x, std::tuplestd::false_type, tageina::optionalT ) +{ + if (!x) + return nullptr; + return T(::eo_ref(x)); +} + +template typename T inline T to_cxx(Eo** x, std::tuplestd::false_type, tagT) { @@ -137,6 +188,14 @@ to_cxx(const char* x, std::tuplestd::false_type, tagstd::string) return std::string(x); } +inline eina::optionalstd::string +to_cxx(const char* x, std::tuplestd::false_type, tageina::optionalstd::string ) +{ + if (!x) + return nullptr; + return std::string(x); +} + template typename T, typename Enable = void struct traits { @@ -165,6 +224,15 @@ to_cxx(const Eina_List* x, std::tuplestd::false_type, Args..., tag efl::eina: } template typename T, typename ...Args +inline eina::optionalefl::eina::range_listT const +to_cxx(const Eina_List* x, std::tuplestd::false_type, Args..., tag eina::optionalefl::eina::range_listT ) +{ + if (!x) + return nullptr; + return efl::eina::range_listT const {x}; +} + +template typename T, typename ...Args inline efl::eina::range_listT to_cxx(Eina_List* x, std::tuplestd::false_type, Args..., tag efl::eina::range_listT ) { @@ -172,18 +240,44 @@ to_cxx(Eina_List* x, std::tuplestd::false_type, Args..., tag efl::eina::range } template typename T, typename ...Args +inline eina::optionalefl::eina::range_listT +to_cxx(Eina_List* x, std::tuplestd::false_type, Args..., tag eina::optionalefl::eina::range_listT ) +{ + if (!x) + return nullptr; + return efl::eina::range_listT{x}; +} + +template typename T, typename ...Args inline efl::eina::listT to_cxx(Eina_List* x, std::tuplestd::true_type, Args..., tag efl::eina::listT ) { return efl::eina::listT {x}; } +template typename T, typename ...Args +inline eina::optionalefl::eina::listT +to_cxx(Eina_List* x, std::tuplestd::true_type, Args..., tag eina::optionalefl::eina::listT ) +{ + if (!x) + return nullptr; + return efl::eina::listT {x}; +} + inline eina::stringshare to_cxx(Eina_Stringshare const* x, const std::false_type,
[EGIT] [core/efl] master 17/20: eo_cxx: Implicit conversion from C++ wrapper to void* via address_of operator
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=11eff05ead1f2f21a0ab11faaedac642d9b63dd4 commit 11eff05ead1f2f21a0ab11faaedac642d9b63dd4 Author: Vitor Sousa vitorsousasi...@gmail.com Date: Mon Jan 5 15:26:11 2015 -0200 eo_cxx: Implicit conversion from C++ wrapper to void* via address_of operator --- src/bindings/eo_cxx/eo_concrete.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bindings/eo_cxx/eo_concrete.hh b/src/bindings/eo_cxx/eo_concrete.hh index cd72dd7..63029a1 100644 --- a/src/bindings/eo_cxx/eo_concrete.hh +++ b/src/bindings/eo_cxx/eo_concrete.hh @@ -213,12 +213,14 @@ struct extension_inheritanceconcrete struct concrete_address_of { explicit concrete_address_of(void* p) : p(p) {} + operator void*() { return p; } void* p; }; struct concrete_address_const_of { explicit concrete_address_const_of(void const* p) : p(p) {} + operator void const*() { return p; } void const* p; }; --
[EGIT] [core/efl] master 14/20: eolian_cxx: Add implicit conversion of the returned pointer of C++ wrappers
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0685885c2a488c41f118118de8506f8d286e3eea commit 0685885c2a488c41f118118de8506f8d286e3eea Author: Vitor Sousa vitorsousasi...@gmail.com Date: Tue Dec 23 17:40:11 2014 -0200 eolian_cxx: Add implicit conversion of the returned pointer of C++ wrappers Overloaded address-of operator for C++ Eolian wrappers for implicit converting to any ancestor pointer type when getting the object memory address. Added new grammars to aid the creation of the pointer wrappers responsible of doing the implicit conversions. Added a unit test which checks the address-of overload for arbitrary classes. Added new .eo files to be used in it. --- src/Makefile_Eolian_Cxx.am | 26 +- src/bindings/eo_cxx/eo_concrete.hh | 12 +++ src/lib/eolian_cxx/grammar/eo_class_generator.hh | 100 + src/tests/eolian_cxx/a.c | 24 + src/tests/eolian_cxx/a.eo | 8 ++ src/tests/eolian_cxx/b.c | 25 ++ src/tests/eolian_cxx/b.eo | 8 ++ src/tests/eolian_cxx/c.c | 25 ++ src/tests/eolian_cxx/c.eo | 8 ++ src/tests/eolian_cxx/d.c | 27 ++ src/tests/eolian_cxx/d.eo | 8 ++ src/tests/eolian_cxx/eolian_cxx_suite.cc | 2 + src/tests/eolian_cxx/eolian_cxx_test_address_of.cc | 34 +++ 13 files changed, 305 insertions(+), 2 deletions(-) diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am index ebedc3d..88f1186 100644 --- a/src/Makefile_Eolian_Cxx.am +++ b/src/Makefile_Eolian_Cxx.am @@ -55,6 +55,9 @@ bin_eolian_cxx_eolian_cxx_DEPENDENCIES = @USE_EOLIAN_INTERNAL_LIBS@ if EFL_ENABLE_TESTS +EOLIAN_FLAGS += \ + -I$(srcdir) + check_PROGRAMS += tests/eolian_cxx/eolian_cxx_suite TESTS += tests/eolian_cxx/eolian_cxx_suite @@ -62,15 +65,29 @@ tests_eolian_cxx_eolian_cxx_suite_SOURCES = \ tests/eolian_cxx/eolian_cxx_suite.cc \ tests/eolian_cxx/eolian_cxx_test_parse.cc \ tests/eolian_cxx/callback.c \ +tests/eolian_cxx/a.c \ +tests/eolian_cxx/b.c \ +tests/eolian_cxx/c.c \ +tests/eolian_cxx/d.c \ tests/eolian_cxx/eolian_cxx_test_callback.cc \ +tests/eolian_cxx/eolian_cxx_test_address_of.cc \ tests/eolian_cxx/eolian_cxx_test_wrapper.cc \ tests/eolian_cxx/eolian_cxx_test_generate.cc tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-eolian_cxx_test_callback.$(OBJEXT): tests/eolian_cxx/callback.eo.hh +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-eolian_cxx_test_address_of.$(OBJEXT): tests/eolian_cxx/a.eo.hh tests/eolian_cxx/b.eo.hh tests/eolian_cxx/c.eo.hh tests/eolian_cxx/d.eo.hh tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-callback.$(OBJEXT): tests/eolian_cxx/callback.eo.c tests/eolian_cxx/callback.eo.h +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-a.$(OBJEXT): tests/eolian_cxx/a.eo.c tests/eolian_cxx/a.eo.h +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-b.$(OBJEXT): tests/eolian_cxx/b.eo.c tests/eolian_cxx/b.eo.h +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-c.$(OBJEXT): tests/eolian_cxx/c.eo.c tests/eolian_cxx/c.eo.h +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-d.$(OBJEXT): tests/eolian_cxx/d.eo.c tests/eolian_cxx/d.eo.h -CLEANFILES += tests/eolian_cxx/callback.eo.hh tests/eolian_cxx/callback.eo.c tests/eolian_cxx/callback.eo.h +CLEANFILES += tests/eolian_cxx/callback.eo.hh tests/eolian_cxx/callback.eo.c tests/eolian_cxx/callback.eo.h \ +tests/eolian_cxx/a.eo.hh tests/eolian_cxx/a.eo.c tests/eolian_cxx/a.eo.h \ +tests/eolian_cxx/b.eo.hh tests/eolian_cxx/b.eo.c tests/eolian_cxx/b.eo.h \ +tests/eolian_cxx/c.eo.hh tests/eolian_cxx/c.eo.c tests/eolian_cxx/c.eo.h \ +tests/eolian_cxx/d.eo.hh tests/eolian_cxx/d.eo.c tests/eolian_cxx/d.eo.h tests_eolian_cxx_eolian_cxx_suite_CXXFLAGS = \ -I$(top_builddir)/src/lib/efl \ @@ -93,7 +110,12 @@ tests_eolian_cxx_eolian_cxx_suite_DEPENDENCIES = @USE_EOLIAN_INTERNAL_LIBS@ endif -EXTRA_DIST += tests/eolian_cxx/callback.eo +EXTRA_DIST += tests/eolian_cxx/callback.eo \ +tests/eolian_cxx/a.eo \ +tests/eolian_cxx/b.eo \ +tests/eolian_cxx/c.eo \ +tests/eolian_cxx/d.eo + include Makefile_Eolian_Cxx_Helper.am endif diff --git a/src/bindings/eo_cxx/eo_concrete.hh b/src/bindings/eo_cxx/eo_concrete.hh index 4d379a6..d92fe7b 100644 --- a/src/bindings/eo_cxx/eo_concrete.hh +++ b/src/bindings/eo_cxx/eo_concrete.hh @@ -201,6 +201,18 @@ struct extension_inheritanceconcrete }; }; +struct concrete_address_of +{ + explicit concrete_address_of(void* p) : p(p) {} + void* p; +}; + +struct concrete_address_const_of +{ + explicit concrete_address_const_of(void const* p) : p(p) {} + void const* p; +}; + } /// @brief Downcast @p U to @p T. diff --git
[EGIT] [core/efl] master 06/20: eo_cxx: Fix leakage of eo objects by removing unnecessary eo_ref
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2b94d874fec07f3a9defee7e8d3737610af691bd commit 2b94d874fec07f3a9defee7e8d3737610af691bd Author: Vitor Sousa vitorsousasi...@gmail.com Date: Tue Nov 11 20:54:15 2014 -0200 eo_cxx: Fix leakage of eo objects by removing unnecessary eo_ref Removed the call to eo_ref in the conversion from eo::base to the native Eo* (in to_c function) in order to avoid eo objects being leaked. --- src/bindings/eo_cxx/eo_cxx_interop.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings/eo_cxx/eo_cxx_interop.hh b/src/bindings/eo_cxx/eo_cxx_interop.hh index 3e1d88b..174d543 100644 --- a/src/bindings/eo_cxx/eo_cxx_interop.hh +++ b/src/bindings/eo_cxx/eo_cxx_interop.hh @@ -16,7 +16,7 @@ namespace efl { namespace eolian { inline Eo* to_c(efl::eo::base const x) { - return ::eo_ref(x._eo_ptr()); + return x._eo_ptr(); } inline const char* --
[EGIT] [core/efl] master 11/20: catch exceptions in cxx wrappers and throw a eina_error
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ebebcf64389d4e362ee9efaaf8aad4a1e76149e4 commit ebebcf64389d4e362ee9efaaf8aad4a1e76149e4 Author: Larry Jr larry@gmail.com Date: Thu Aug 14 15:20:49 2014 -0300 catch exceptions in cxx wrappers and throw a eina_error --- .../grammar/inheritance_base_generator.hh | 24 ++ 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh b/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh index 36d0821..31539c6 100644 --- a/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh +++ b/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh @@ -107,12 +107,28 @@ operator(std::ostream out, inheritance_wrappers const x) (func.params.size() ? , : ) parameters_c_declaration(func.params) ) endl - { endl - tab(1) - (!function_is_void(func) ? return : ) + { endl; + +if (!function_is_void(func)) + out tab(1) reinterpret_type(func.ret) _tmp_ret{}; endl; + +out tab(1) + try endl + tab(2) { endl + tab(3) + (!function_is_void(func) ? _tmp_ret = : ) static_castT*(self-this_)- func.name ( parameters_cxx_list(func.params) ); endl - } endl endl; + tab(2) } endl + tab(1) catch (...) endl + tab(2) { endl + tab(3) eina_error_set( efl::eina::unknown_error() ); endl + tab(2) } endl; + +if (!function_is_void(func)) + out tab(1) return _tmp_ret; endl; + +out } endl endl; } return out; } --
[EGIT] [core/efl] master 08/20: added new types in lookup table
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=dff706f123789a3df0f370abe470c383ffbdb55c commit dff706f123789a3df0f370abe470c383ffbdb55c Author: Larry Jr larry@gmail.com Date: Tue Oct 7 15:06:01 2014 -0300 added new types in lookup table Signed-off-by: Vitor Sousa vitorsousasi...@gmail.com --- src/bin/eolian_cxx/type_lookup_table.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/eolian_cxx/type_lookup_table.cc b/src/bin/eolian_cxx/type_lookup_table.cc index 2702225..bb14d95 100644 --- a/src/bin/eolian_cxx/type_lookup_table.cc +++ b/src/bin/eolian_cxx/type_lookup_table.cc @@ -12,6 +12,7 @@ type_lookup_table {Ecore_Cb, eolian_type::callback_, {Ecore.h}}, {Ecore_Task_Cb, eolian_type::callback_, {Ecore.h}}, {Ecore_Timeline_Cb, eolian_type::callback_, {Ecore.h}}, + {Edje_Signal_Cb, eolian_type::callback_, {Edje.h}}, {Eina_Accessor *, eolian_type::complex_, false, efl::eina::accessor, {eina-cxx/eina_accessor.hh}}, {Eina_Bool, eolian_type::simple_, false, bool, {}}, {Eina_Bool *, eolian_type::simple_, false, bool*, {}}, @@ -20,6 +21,8 @@ type_lookup_table {Eina_Iterator *, eolian_type::complex_, false, efl::eina::iterator, {eina-cxx/eina_iterator.hh}}, {Eina_List *, eolian_type::complex_, false, efl::eina::range_list, {eina-cxx/eina_list.hh}}, {Eina_List *, eolian_type::complex_, true, efl::eina::list, {eina-cxx/eina_list.hh}}, + {Eio_Filter_Direct_Cb, eolian_type::callback_, {Eio.h}}, + {Emodel *, eolian_type::simple_, false, emodel, {Emodel.hh}}, {Eo *, eolian_type::simple_, true, efl::eo::base, {eo_base.hh}}, {Eo *, eolian_type::simple_, false, efl::eo::base, {eo_base.hh}}, //{Evas_Object_Box_Layout, eolian_type::callback_, {Evas.h}}, --
[EGIT] [core/efl] master 02/20: eina_cxx: Fix eina::array cend method recursive calling itself
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fb5ba0f758edd4b5a501c48d828958989bb65e0c commit fb5ba0f758edd4b5a501c48d828958989bb65e0c Author: Vitor Sousa vitorsousasi...@gmail.com Date: Mon Nov 3 11:47:17 2014 -0200 eina_cxx: Fix eina::array cend method recursive calling itself @fix --- src/bindings/eina_cxx/eina_array.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings/eina_cxx/eina_array.hh b/src/bindings/eina_cxx/eina_array.hh index eea64fc..75346bc 100644 --- a/src/bindings/eina_cxx/eina_array.hh +++ b/src/bindings/eina_cxx/eina_array.hh @@ -305,7 +305,7 @@ public: } const_iterator cend() const { -return cend(); +return end(); } const_reverse_iterator crbegin() const { --
[EGIT] [core/efl] master 20/20: eolian-cxx: Fixed mixed inheritance between C and C++ classes
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c57fa54fc80f99cb36c1e1d3e4bf16c22ec2a969 commit c57fa54fc80f99cb36c1e1d3e4bf16c22ec2a969 Author: Felipe Magno de Almeida fel...@expertisesolutions.com.br Date: Mon Jan 5 18:59:09 2015 -0200 eolian-cxx: Fixed mixed inheritance between C and C++ classes Removed genereation for Eo.Base primitive methods which segfault'ed on parent_set function. --- src/bindings/eo_cxx/eo_inherit.hh | 2 +- src/bindings/eo_cxx/eo_private.hh | 15 --- .../eolian_cxx/grammar/inheritance_base_generator.hh | 18 +- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/bindings/eo_cxx/eo_inherit.hh b/src/bindings/eo_cxx/eo_inherit.hh index d4512a9..734b6b6 100644 --- a/src/bindings/eo_cxx/eo_inherit.hh +++ b/src/bindings/eo_cxx/eo_inherit.hh @@ -81,7 +81,7 @@ struct inherit (_eo_cls, NULL, detail::inherit_constructor tuple_type, E... - (static_castvoid*(this), tuple_type(std::move(args)...))); + (static_castvoid*(this), tuple_type(std::forwardArgs(args)...))); } /// @brief Class destructor. diff --git a/src/bindings/eo_cxx/eo_private.hh b/src/bindings/eo_cxx/eo_private.hh index 344b1c5..5f1448a 100644 --- a/src/bindings/eo_cxx/eo_private.hh +++ b/src/bindings/eo_cxx/eo_private.hh @@ -7,7 +7,10 @@ #define EFL_CXX_EO_PRIVATE_HH #include eo_ops.hh -#include eo_concrete.hh + +namespace eo { +struct base; +} namespace efl { namespace eo { namespace detail { @@ -86,9 +89,7 @@ Eo_Class const* do_eo_class_new(Eo_Class_Description class_desc) } template typename T struct operation_description_class_size; - -template -struct operation_description_class_sizeefl::eo::concrete { static const int value = 0; }; +template struct operation_description_class_size ::eo::base : std::integral_constantstd::size_t, 0u {}; /// @internal /// @@ -135,8 +136,8 @@ namespace detail { template typename T struct operations; template -struct operationsefl::eo::concrete { template typename T struct type {}; }; - +struct operations ::eo::base { template typename T struct type {}; }; + /// @internal /// /// @brief Provides the operations of an extension as well as its @@ -164,7 +165,7 @@ struct Inherit_Private_Data namespace efl { namespace eo { namespace detail { template typename T -int initialize_operation_description(efl::eo::detail::tagefl::eo::concrete +int initialize_operation_description(efl::eo::detail::tag ::eo::base , Eo_Op_Description* ops) { (void)ops; diff --git a/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh b/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh index 30ee36d..8267849 100644 --- a/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh +++ b/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh @@ -333,7 +333,6 @@ operator(std::ostream out, inheritance_call_constructors const x) full_name(x._cls) , ::std::tuple::efl::eo::parent_type const args) endl { endl -tab(1) eo_do_super(eo, cls, ::eo_constructor()); endl tab(1) eo_do(eo, ::eo_parent_set(args.get0()._eo_raw)); endl } endl endl; @@ -362,14 +361,15 @@ operator(std::ostream out, inheritance_eo_class_getter const x) inline void eo_inheritance_detail_generator(std::ostream out, eo_class const cls) { - out inheritance_wrappers(cls) -namespace efl { namespace eo { namespace detail { endl endl -inheritance_base_operations(cls) endl -inheritance_base_operations_size(cls) -inheritance_operations_description(cls) -inheritance_call_constructors(cls) -inheritance_eo_class_getter(cls) - } } } endl; + if(cls.eo_name != EO_BASE_CLASS) + out inheritance_wrappers(cls) + namespace efl { namespace eo { namespace detail { endl endl + inheritance_base_operations(cls) endl + inheritance_base_operations_size(cls) + inheritance_operations_description(cls) + inheritance_call_constructors(cls) + inheritance_eo_class_getter(cls) + } } } endl; } } } } // namespace efl { namespace eolian { namespace grammar { --
[EGIT] [core/efl] master 18/20: eina_cxx: Allow creating an eina::optionalT from a type convertible to T
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b713342987703e08b455b1c579084b35c41c6169 commit b713342987703e08b455b1c579084b35c41c6169 Author: Vitor Sousa vitorsousasi...@gmail.com Date: Mon Jan 5 15:35:49 2015 -0200 eina_cxx: Allow creating an eina::optionalT from a type convertible to T --- src/bindings/eina_cxx/eina_optional.hh | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/bindings/eina_cxx/eina_optional.hh b/src/bindings/eina_cxx/eina_optional.hh index 2517412..64e42d7 100644 --- a/src/bindings/eina_cxx/eina_optional.hh +++ b/src/bindings/eina_cxx/eina_optional.hh @@ -4,6 +4,7 @@ #include cstddef #include algorithm #include utility +#include type_traits /** * @addtogroup Eina_Cxx_Data_Types_Group @@ -86,7 +87,7 @@ struct optional */ optional(T other) : engaged(false) { - _construct(std::move(other)); + _construct(std::forwardT(other)); } /** @@ -99,7 +100,35 @@ struct optional */ optional(T const other) : engaged(false) { - _construct(std::move(other)); + _construct(other); + } + + /** +* @brief Create an engaged object by moving @p other content. +* @param other R-value reference to the desired type. +* +* This constructor creates an tteina::optional/tt object in an +* engaged state. The contained value is initialized by moving +* @p other. +*/ + template typename U + optional(U other, typename std::enable_ifstd::is_convertibleU, T::value::type* = 0) : engaged(false) + { + _construct(std::forwardU(other)); + } + + /** +* @brief Create an engaged object by copying @p other content. +* @param other Constant reference to the desired type. +* +* This constructor creates an tteina::optional/tt object in an +* engaged state. The contained value is initialized by copying +* @p other. +*/ + template typename U + optional(U const other, typename std::enable_ifstd::is_convertibleU, T::value::type* = 0) : engaged(false) + { + _construct(other); } /** --
[EGIT] [core/efl] master 10/20: eolian_cxx: Fix: Using binding type for @out parameter instead of native type
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d5ec6c41d9bbd9e028503fe98dc6679f8c754140 commit d5ec6c41d9bbd9e028503fe98dc6679f8c754140 Author: Vitor Sousa vitorsousasi...@gmail.com Date: Tue Nov 25 16:18:08 2014 -0200 eolian_cxx: Fix: Using binding type for @out parameter instead of native type No longer reverting to the native type when the parameter has @out direction. Added is_out member variable to eolian_type class. With that, generators can keep track of the direction of the parameters. Also added helper functions type_is_out and type_is_complex. Created to_native functions in eo_cxx_interop.hh to convert binding types from C++ arguments to the actual C function arguments. Added static assertions in these functions to enforce compatibility between the binding and the native type (Required by @out parameters). Reworked the overload of the to_c function for eo::base derivated objects. Now there is a overload that rely in the compatibility between the native type and the wrapper, enabling a wrapper to be used as an output parameter. --- src/bin/eolian_cxx/eolian_wrappers.hh| 4 +++- src/bindings/eo_cxx/eo_cxx_interop.hh| 36 ++-- src/lib/eolian_cxx/eo_types.hh | 23 ++ src/lib/eolian_cxx/grammar/type_generator.hh | 10 +--- 4 files changed, 62 insertions(+), 11 deletions(-) diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh index 3dcb5e3..d563793 100644 --- a/src/bin/eolian_cxx/eolian_wrappers.hh +++ b/src/bin/eolian_cxx/eolian_wrappers.hh @@ -348,7 +348,9 @@ parameter_type(Eolian_Function_Parameter const parameter, assert(!type.empty()); if (parameter_is_out(parameter)) { -type = { efl::eolian::type_to_native(type) }; +if (type.front().native == char *) + type = { efl::eolian::type_to_native(type) }; +type.front().is_out = true; type.front().native += *; } if (parameter_is_const(parameter, func_type)) diff --git a/src/bindings/eo_cxx/eo_cxx_interop.hh b/src/bindings/eo_cxx/eo_cxx_interop.hh index fa3e44b..d829296 100644 --- a/src/bindings/eo_cxx/eo_cxx_interop.hh +++ b/src/bindings/eo_cxx/eo_cxx_interop.hh @@ -13,12 +13,6 @@ namespace efl { namespace eolian { From C++ to C -inline Eo* -to_c(efl::eo::base const x) -{ - return x._eo_ptr(); -} - inline const char* to_c(std::string const x) { @@ -45,10 +39,38 @@ to_c(bool* x) } template typename T -T to_c(T const v, typename std::enable_if!std::is_base_ofefl::eo::base, T::value::type* = 0) +T to_c(T const v, typename std::enable_if!std::is_convertibleT*, efl::eo::base*::value::type* = 0) { return v; } + +template typename T +Eo* to_c(T const v, typename std::enable_ifstd::is_convertibleT*, efl::eo::base*::value::type* = 0) +{ + return v._eo_ptr(); +} + +template typename T +Eo** to_c(T* v, typename std::enable_ifstd::is_convertibleT*, efl::eo::base*::value::type* = 0) +{ + static_assert(sizeof(T) == sizeof(Eo*), ); + return static_castEo**(static_castvoid*(v)); +} + +template typename R, typename T +R to_native(T const v) +{ + static_assert(sizeof(T) == sizeof(R), ); + return v.native_handle(); +} + +template typename R, typename T +R to_native(T* v) +{ + static_assert(sizeof(T) == sizeof(typename std::remove_pointerR::type), ); + return static_castR(static_castvoid*(v)); +} + From C to C++ diff --git a/src/lib/eolian_cxx/eo_types.hh b/src/lib/eolian_cxx/eo_types.hh index 9223779..15f88e2 100644 --- a/src/lib/eolian_cxx/eo_types.hh +++ b/src/lib/eolian_cxx/eo_types.hh @@ -33,6 +33,7 @@ struct eolian_type , category(unknown_) , is_const(false) , is_own(false) + , is_out(false) , binding() , includes() {} @@ -47,6 +48,7 @@ struct eolian_type , category(category_) , is_const(is_const_) , is_own(is_own_) + , is_out(false) , binding(binding_) , includes(includes_) { @@ -66,6 +68,7 @@ struct eolian_type category_type category; bool is_const; bool is_own; + bool is_out; std::string binding; includes_container_type includes; }; @@ -94,6 +97,19 @@ type_is_binding(eolian_type_instance const type) return type_is_binding(type.front()); } +inline bool +type_is_out(eolian_type const type) +{ + return type.is_out; +} + +inline bool +type_is_out(eolian_type_instance const type) +{ + assert(!type.empty()); + return type_is_out(type.front()); +} + inline eolian_type type_to_native(eolian_type const type) { @@ -122,6 +138,13 @@ type_is_complex(eolian_type const type) return type.category == eolian_type::complex_; } +inline bool +type_is_complex(eolian_type_instance const type_ins) +{ + assert(!type_ins.empty()); + return type_is_complex(type_ins.front()); +} + template typename
Re: [E-devel] enlightenment-devel Digest, Vol 105, Issue 4
Unsubscribe it. On Mon, Jan 5, 2015 at 10:49 PM, enlightenment-devel-requ...@lists.sourceforge.net wrote: Send enlightenment-devel mailing list submissions to enlightenment-devel@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/enlightenment-devel or, via email, send a message with subject or body 'help' to enlightenment-devel-requ...@lists.sourceforge.net You can reach the person managing the list at enlightenment-devel-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than Re: Contents of enlightenment-devel digest... Today's Topics: 1. Weekly news from the automated build and QA front (Stefan Schmidt) 2. Re: [EGIT] [bindings/python/python-efl] master 08/08: Provide the uninstall command for python-efl itself (Sebastian Dransfeld) 3. Re: [EGIT] [bindings/python/python-efl] master 08/08: Provide the uninstall command for python-efl itself (Davide Andreoli) 4. Re: [EGIT] [core/elementary] master 01/01: genlist: exceptional handling. (Cedric BAIL) 5. Re: [EGIT] [core/efl] master 01/01: curl usage better accounts for timeouts (Tom Hacohen) 6. Re: PATCH: duplicated XDG_DATA_DIRS fix (Thanatermesis) -- Message: 1 Date: Mon, 05 Jan 2015 08:52:02 +0100 From: Stefan Schmidt ste...@datenfreihafen.org Subject: [E-devel] Weekly news from the automated build and QA front To: 'Enlightenment developer list' enlightenment-devel@lists.sourceforge.net Message-ID: 54aa42a2.10...@datenfreihafen.org Content-Type: text/plain; charset=windows-1252 Hello. Summary: o Its been a few weeks since the last QA report o Most of the new coverity issues are coming from new tests that came with the updated coverity client on jenkins. This should give everyone an overview over what has happened in the last week on the QA front. The numbers in parentheses reflect the values from last week to give you a trend. CI: o Overall build statistic: 13.76% (10.15%) failed. https://build.enlightenment.org/ clang scan-build: o EFL scan-build reports NA (454) issues. https://build.enlightenment.org/job/nightly_efl_clang_x86_64/lastSuccessfu lBuild/artifact/scan-build/build/ o Elementary scan-build reports 78 (79) issues. https://build.enlightenment.org/job/nightly_elm_clang_x86_64/lastSuccessfulBuild/artifact/scan-build/build Unit tests: o 416 (416) unit tests for efl and none failing Coverage: o EFL total coverage is at 34.2% (34.1%) lines and 37.3% (37.2%) functions https://build.enlightenment.org/view/Test%20Coverage/ Coverity: o EFL: Outstanding defects 71 (47) with a density of 0.10 (0.07) o Elm: Outstanding defects 6 (0) with a density of 0.02 (0) o Evas Generic Loaders: Outstanding defects 2 (0) with a density of 0.02 (0) o Emotion Generic Players: Outstanding defects 0 (0) with a density of 0 (0) o Enlightenment: Outstanding defects 40 (36) with a density of 0.15 (0.13) o Terminology: Outstanding defects 1 (0) with a density of 0.01 (0) Phab: o Total bug count: 514 (488) https://phab.enlightenment.org/maniphest/report/burn/ o Pending patch reviews: 52 (57) regards Stefan Schmidt -- Message: 2 Date: Mon, 05 Jan 2015 09:38:03 +0100 From: Sebastian Dransfeld s...@tango.flipp.net Subject: Re: [E-devel] [EGIT] [bindings/python/python-efl] master 08/08: Provide the uninstall command for python-efl itself To: Enlightenment developer list enlightenment-devel@lists.sourceforge.net Message-ID: 54aa4d6b.7080...@tango.flipp.net Content-Type: text/plain; charset=utf-8; format=flowed On 01/04/2015 03:56 PM, Dave Andreoli wrote: -python setup.py install +(sido) python setup.py install sido? S. -- Message: 3 Date: Mon, 5 Jan 2015 10:25:39 +0100 From: Davide Andreoli d...@gurumeditation.it Subject: Re: [E-devel] [EGIT] [bindings/python/python-efl] master 08/08: Provide the uninstall command for python-efl itself To: Enlightenment developer list enlightenment-devel@lists.sourceforge.net Message-ID: CAA65Se_3bZ1yqw6bBWKco+gmTs+515XOGaLCHbZqx= kjnbr...@mail.gmail.com Content-Type: text/plain; charset=UTF-8 2015-01-05 9:38 GMT+01:00 Sebastian Dransfeld s...@tango.flipp.net: On 01/04/2015 03:56 PM, Dave Andreoli wrote: -python setup.py install +(sido) python setup.py install sido? Don't you know sido? it's the sudo of 2015 :D fixed, thanks for reporting S. -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things
[EGIT] [bindings/elev8] master 02/02: Remove deprecation warnings.
sanjeev pushed a commit to branch master. http://git.enlightenment.org/bindings/elev8.git/commit/?id=cfef6c1fbc127e94c4e1d640b66178e4b283b954 commit cfef6c1fbc127e94c4e1d640b66178e4b283b954 Author: Sanjeev BA as290...@samsung.com Date: Tue Jan 6 11:52:15 2015 +0900 Remove deprecation warnings. Signed-off-by: Sanjeev BA as290...@samsung.com --- src/modules/elm/CElmFileSelectorButton.cc | 16 src/modules/elm/CElmFileSelectorEntry.cc | 20 ++-- src/modules/elm/CElmWeb.cc| 6 +++--- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/modules/elm/CElmFileSelectorButton.cc b/src/modules/elm/CElmFileSelectorButton.cc index 8ba4e8d..0110c57 100644 --- a/src/modules/elm/CElmFileSelectorButton.cc +++ b/src/modules/elm/CElmFileSelectorButton.cc @@ -51,13 +51,13 @@ void CElmFileSelectorButton::win_title_set(HandleValue val) HandleValue CElmFileSelectorButton::path_get() const { - return String::New(elm_fileselector_button_path_get(eo)); + return String::New(elm_fileselector_path_get(eo)); } void CElmFileSelectorButton::path_set(HandleValue val) { if (val-IsString() || val-IsNumber()) - elm_fileselector_button_path_set(eo, *String::Utf8Value(val)); + elm_fileselector_path_set(eo, *String::Utf8Value(val)); } void CElmFileSelectorButton::win_size_set(HandleValue val) @@ -88,32 +88,32 @@ HandleValue CElmFileSelectorButton::win_size_get(void) const HandleValue CElmFileSelectorButton::expandable_get() const { - return Boolean::New(elm_fileselector_button_expandable_get(eo)); + return Boolean::New(elm_fileselector_expandable_get(eo)); } void CElmFileSelectorButton::expandable_set(HandleValue val) { - elm_fileselector_button_expandable_set(eo, val-BooleanValue()); + elm_fileselector_expandable_set(eo, val-BooleanValue()); } HandleValue CElmFileSelectorButton::folder_only_get() const { - return Boolean::New(elm_fileselector_button_folder_only_get(eo)); + return Boolean::New(elm_fileselector_folder_only_get(eo)); } void CElmFileSelectorButton::folder_only_set(HandleValue val) { - elm_fileselector_button_folder_only_set(eo, val-BooleanValue()); + elm_fileselector_folder_only_set(eo, val-BooleanValue()); } HandleValue CElmFileSelectorButton::is_save_get() const { - return Boolean::New(elm_fileselector_button_is_save_get (eo)); + return Boolean::New(elm_fileselector_is_save_get (eo)); } void CElmFileSelectorButton::is_save_set(HandleValue val) { - elm_fileselector_button_is_save_set(eo, val-BooleanValue()); + elm_fileselector_is_save_set(eo, val-BooleanValue()); } HandleValue CElmFileSelectorButton::inwin_mode_get() const diff --git a/src/modules/elm/CElmFileSelectorEntry.cc b/src/modules/elm/CElmFileSelectorEntry.cc index 8e33cc0..6d0961c 100644 --- a/src/modules/elm/CElmFileSelectorEntry.cc +++ b/src/modules/elm/CElmFileSelectorEntry.cc @@ -68,26 +68,26 @@ void CElmFileSelectorEntry::win_title_set(HandleValue val) HandleValue CElmFileSelectorEntry::selected_get() const { - const char *entry_selected = elm_fileselector_entry_selected_get(eo); + const char *entry_selected = elm_fileselector_selected_get(eo); return entry_selected ? String::New(entry_selected) : Undefined(); } void CElmFileSelectorEntry::selected_set(HandleValue val) { if (val-IsString()) - elm_fileselector_entry_selected_set(eo, *String::Utf8Value(val)); + elm_fileselector_selected_set(eo, *String::Utf8Value(val)); } HandleValue CElmFileSelectorEntry::path_get() const { - const char *entry_path = elm_fileselector_entry_path_get(eo); + const char *entry_path = elm_fileselector_path_get(eo); return entry_path ? String::New(entry_path) : Undefined(); } void CElmFileSelectorEntry::path_set(HandleValue val) { if (val-IsString()) - elm_fileselector_entry_path_set(eo, *String::Utf8Value(val)); + elm_fileselector_path_set(eo, *String::Utf8Value(val)); } void CElmFileSelectorEntry::win_size_set(HandleValue val) @@ -116,30 +116,30 @@ HandleValue CElmFileSelectorEntry::win_size_get(void) const HandleValue CElmFileSelectorEntry::expandable_get() const { - return Boolean::New(elm_fileselector_entry_expandable_get(eo)); + return Boolean::New(elm_fileselector_expandable_get(eo)); } void CElmFileSelectorEntry::expandable_set(HandleValue val) { - elm_fileselector_entry_expandable_set(eo, val-BooleanValue()); + elm_fileselector_expandable_set(eo, val-BooleanValue()); } HandleValue CElmFileSelectorEntry::folder_only_get() const { - return Boolean::New(elm_fileselector_entry_folder_only_get(eo)); + return Boolean::New(elm_fileselector_folder_only_get(eo)); } void CElmFileSelectorEntry::folder_only_set(HandleValue val) { - elm_fileselector_entry_folder_only_set(eo, val-BooleanValue()); + elm_fileselector_folder_only_set(eo, val-BooleanValue()); } HandleValue CElmFileSelectorEntry::is_save_get() const { -
[EGIT] [bindings/elev8] master 01/02: Update gitignore.
sanjeev pushed a commit to branch master. http://git.enlightenment.org/bindings/elev8.git/commit/?id=353cbe0866b69608df2d9c6fb454cda5707f496e commit 353cbe0866b69608df2d9c6fb454cda5707f496e Author: Sanjeev BA as290...@samsung.com Date: Tue Jan 6 11:51:30 2015 +0900 Update gitignore. Signed-off-by: Sanjeev BA as290...@samsung.com --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e0040c5..8705290 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ Makefile.in .*.swp cscope.out tag +compile --
[EGIT] [bindings/python/python-efl] master 01/01: Provide a new distutils Command: build_fdo
davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=d368d64d3fa792a45dfb4fdc199469a4903d00dd commit d368d64d3fa792a45dfb4fdc199469a4903d00dd Author: Dave Andreoli d...@gurumeditation.it Date: Mon Jan 5 19:08:49 2015 +0100 Provide a new distutils Command: build_fdo This will take care of installing any icons and .desktop files found --- efl/utils/setup.py | 44 +++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/efl/utils/setup.py b/efl/utils/setup.py index ec4f799..0c1c58f 100644 --- a/efl/utils/setup.py +++ b/efl/utils/setup.py @@ -28,11 +28,13 @@ class build_extra(distutils.command.build.build): self.run_command('build_i18n') if 'build_edc' in self.distribution.cmdclass: self.run_command('build_edc') +if 'build_fdo' in self.distribution.cmdclass: +self.run_command('build_fdo') distutils.command.build.build.run(self) class build_edc(distutils.cmd.Command): -description = 'Compile all the edje themes using edje_cc' +description = 'compile all the edje themes using edje_cc' user_options = [('themes-dir=', 'd', 'directory that holds the themes ' '(default: data/themes)'), ('main-name=', 'n', 'main edc file name of the themes ' @@ -170,6 +172,46 @@ class build_i18n(distutils.cmd.Command): _data_files_append(self.distribution, target, mo_file) +class build_fdo(distutils.cmd.Command): +description = 'select freedesktop files to install (icons and desktop)' +user_options= [('icon-dir=', 'i', +'icons directory (default: data/icons)'), + ('desk-dir=', 'd', +'desktop file directory (default: data/desktop)')] + +def initialize_options(self): +self.icon_dir = None +self.desk_dir = None + +def finalize_options(self): +if self.icon_dir is None: +self.icon_dir = os.path.join('data', 'icons') +if self.desk_dir is None: +self.desk_dir = os.path.join('data', 'desktop') + +def run(self): +self.do_desktops() +self.do_icons() + +def do_desktops(self): +for f in os.listdir(os.path.join(self.desk_dir)): +if f.endswith('.desktop'): +desktop = os.path.join(self.desk_dir, f) +target = 'share/applications' +info('found desktop file: %s - %s' % (desktop, target)) +_data_files_append(self.distribution, target, desktop) + +def do_icons(self): +for root, dirs, files in os.walk(self.icon_dir): +for f in files: +if f.endswith(('.png', '.xpm', '.svg')): +icon = os.path.join(root, f) +size, cat = icon.split('/')[-3:-1] +target = 'share/icons/hicolor/%s/%s' % (size, cat) +info('found icon: %s - %s' % (icon, target)) +_data_files_append(self.distribution, target, icon) + + class uninstall(distutils.cmd.Command): description = 'remove all the installed files recorded at installation time' user_options = [('record=', None, 'filename with list of files ' --
[EGIT] [core/elementary] master 01/01: elementary: Fix issue with event data causing an invalid free
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=209c058122a478938e2594e72e48d7d5ca09ce70 commit 209c058122a478938e2594e72e48d7d5ca09ce70 Author: Chris Michael cp.mich...@samsung.com Date: Mon Jan 5 13:48:45 2015 -0500 elementary: Fix issue with event data causing an invalid free Summary: Since we end up calling free on the event-data parameter after a drop is completed, we should actually be allocating a string for this data (to be free'd later). This also fixes an issue where the event length was not being set. @fix Signed-off-by: Chris Michael cp.mich...@samsung.com --- src/lib/elm_cnp.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c index 1957418..ee44a3c 100644 --- a/src/lib/elm_cnp.c +++ b/src/lib/elm_cnp.c @@ -3284,18 +3284,24 @@ _wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data) Dropable *drop; unsigned int win = 0; Elm_Selection_Data sdata; - static const char *tagstring = - item absize=240x180 href=file://%s/item; + int len = 0; + char *s = NULL; win = _wl_elm_widget_window_get(sel-requestwidget); drop = _wl_dropable_find_geom(win, savedtypes.x, savedtypes.y); + len = strlen(data); + if (!(s = malloc(len + 1))) return; + memcpy(s, data, len); + s[len] = 0; + if (savedtypes.textreq) { savedtypes.textreq = 0; -savedtypes.imgfile = data; +savedtypes.imgfile = s; } + sdata.len = len; sdata.x = savedtypes.x; sdata.y = savedtypes.y; --
[EGIT] [core/efl] master 01/01: edje: fix @since to match the next release.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3be1c0b7cf2fc38b456505dc690fb4542df836db commit 3be1c0b7cf2fc38b456505dc690fb4542df836db Author: Cedric BAIL ced...@osg.samsung.com Date: Mon Jan 5 16:51:34 2015 +0100 edje: fix @since to match the next release. Damn we release to fast ! Thanks davemds ! --- src/lib/edje/Edje_Edit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h index ebc3dc8..053a511 100644 --- a/src/lib/edje/Edje_Edit.h +++ b/src/lib/edje/Edje_Edit.h @@ -4675,7 +4675,7 @@ EAPI Eina_Bool edje_edit_image_replace(Evas_Object *obj, const char *name, const * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise.(including the * case when one of the names is not valid) * - * @since 1.12 + * @since 1.13 */ EAPI Eina_Bool edje_edit_image_rename(Evas_Object *obj, const char *name, const char *new_name); --
[EGIT] [core/enlightenment] master 02/05: remove e_comp_list(), deprecate all related functions for pending removal
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=922af2c52f781b97261c76bff3c01a3bc7b6ff8d commit 922af2c52f781b97261c76bff3c01a3bc7b6ff8d Author: Mike Blumenkrantz zm...@osg.samsung.com Date: Mon Jan 5 15:27:41 2015 -0500 remove e_comp_list(), deprecate all related functions for pending removal there is only one E_Comp which can now be accessed by the e_comp global. if you're editing a file with some uses of these deprecated functions, replace their usages with appropriate references to this variable pass -Wno-deprecated-declarations to ignore these warnings during build --- src/bin/e_actions.c| 21 +- src/bin/e_backlight.c | 8 +- src/bin/e_bg.c | 8 +- src/bin/e_client.c | 243 -- src/bin/e_client.h | 2 +- src/bin/e_comp.c | 272 +--- src/bin/e_comp.h | 6 +- src/bin/e_comp_canvas.c| 64 +++-- src/bin/e_comp_canvas.h| 3 +- src/bin/e_comp_x.c | 170 ++--- src/bin/e_desk.c | 100 src/bin/e_desklock.c | 26 +- src/bin/e_dnd.c| 8 +- src/bin/e_exec.c | 28 +-- src/bin/e_font.c | 9 +- src/bin/e_gadcon.c | 15 +- src/bin/e_hints.c | 85 +++ src/bin/e_init.c | 21 +- src/bin/e_int_client_remember.c| 86 --- src/bin/e_main.c | 46 ++-- src/bin/e_msgbus.c | 24 +- src/bin/e_remember.c | 58 ++--- src/bin/e_sys.c| 63 ++--- src/bin/e_test.c | 40 +-- src/bin/e_utils.c | 40 ++- src/bin/e_utils.h | 4 +- src/bin/e_win.c| 14 +- src/bin/e_xsettings.c | 24 +- src/bin/e_zone.c | 276 ++--- src/modules/access/e_mod_main.c| 18 +- .../conf_bindings/e_int_config_edgebindings.c | 10 +- src/modules/conf_display/e_int_config_desklock.c | 39 +-- src/modules/conf_display/e_int_config_desks.c | 26 +- src/modules/conf_interaction/e_int_config_mouse.c | 14 +- src/modules/contact/e_edges.c | 14 +- src/modules/contact/e_policy.c | 18 +- src/modules/fileman/e_fwin.c | 14 +- src/modules/fileman/e_mod_main.c | 24 +- src/modules/ibox/e_mod_config.c| 5 +- src/modules/illume2/e_mod_main.c | 45 ++-- src/modules/lokker/lokker.c| 26 +- src/modules/notification/e_mod_popup.c | 52 ++-- src/modules/pager_plain/e_mod_main.c | 5 +- src/modules/policy_mobile/e_mod_config.c | 4 +- src/modules/policy_mobile/e_mod_main.c | 67 +++-- src/modules/quickaccess/e_mod_quickaccess.c| 23 +- src/modules/tiling/e_mod_tiling.c | 16 +- src/modules/wizard/e_wizard.c | 16 +- 48 files changed, 884 insertions(+), 1316 deletions(-) diff --git a/src/bin/e_actions.c b/src/bin/e_actions.c index 98b9c76..6f2d4cf 100644 --- a/src/bin/e_actions.c +++ b/src/bin/e_actions.c @@ -1573,14 +1573,11 @@ ACT_FN_GO(desk_linear_flip_to, ) #define DESK_ACTION_ALL(zone, act) \ E_Zone * zone; \ - const Eina_List *lc, *lz; \ - E_Comp *c;\ + const Eina_List *lz; \ \ - EINA_LIST_FOREACH(e_comp_list(), lc, c) { \ -EINA_LIST_FOREACH(c-zones, lz, zone) { \ +EINA_LIST_FOREACH(e_comp-zones, lz, zone) { \ act; \ }\ - } /***/ ACT_FN_GO(desk_flip_by_all, ) @@ -1717,24 +1714,20 @@ ACT_FN_GO(screen_send_by, ) #define ZONE_DESK_ACTION(con_num, zone_num, zone, act)\ E_Zone * zone; \ if ((con_num 0) || (zone_num 0)) { \ - Eina_List *l, *ll;
[EGIT] [core/enlightenment] master 04/05: remove some e_comp_get() usage in core comp/client files
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=0bac8752909b61aac0035049de1cd6d14ace1c96 commit 0bac8752909b61aac0035049de1cd6d14ace1c96 Author: Mike Blumenkrantz zm...@osg.samsung.com Date: Mon Jan 5 15:35:11 2015 -0500 remove some e_comp_get() usage in core comp/client files --- src/bin/e_client.c | 10 +- src/bin/e_comp.c| 5 ++--- src/bin/e_comp_canvas.c | 43 +-- src/bin/e_hints.c | 2 +- 4 files changed, 25 insertions(+), 35 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index df3a7c6..3a3ba69 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -385,7 +385,7 @@ static void _e_client_action_finish(void) { if (comp_grabbed) - _e_client_action_input_win_del(action_client ? action_client-comp : e_comp_get(NULL)); + _e_client_action_input_win_del(e_comp); E_FREE_FUNC(action_timer, ecore_timer_del); E_FREE_FUNC(action_handler_key, ecore_event_handler_del); @@ -3961,8 +3961,8 @@ e_client_urgent_set(E_Client *ec, Eina_Bool urgent) if (urgent e_screensaver_on_get() e_config-screensaver_wake_on_urgent) { int x, y; -ecore_evas_pointer_xy_get(e_comp_get(NULL)-ee, x, y); -ecore_evas_pointer_warp(e_comp_get(NULL)-ee, x, y); +ecore_evas_pointer_xy_get(e_comp-ee, x, y); +ecore_evas_pointer_warp(e_comp-ee, x, y); } } @@ -4687,9 +4687,9 @@ e_client_under_pointer_get(E_Desk *desk, E_Client *exclude) * zone of either the given desk or the desk of the excluded * window, so return if neither is given */ if (desk) - ecore_evas_pointer_xy_get(e_comp_get(desk)-ee, x, y); + ecore_evas_pointer_xy_get(e_comp-ee, x, y); else if (exclude) - ecore_evas_pointer_xy_get(exclude-comp-ee, x, y); + ecore_evas_pointer_xy_get(e_comp-ee, x, y); else return NULL; diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 3ea3b3e..30b85ac 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -1387,12 +1387,11 @@ e_comp_top_window_at_xy_get(E_Comp *c, Evas_Coord x, Evas_Coord y) } EAPI void -e_comp_util_wins_print(const E_Comp *c) +e_comp_util_wins_print(const E_Comp *c EINA_UNUSED) { Evas_Object *o; - if (!c) c = e_comp_get(NULL); - o = evas_object_top_get(c-evas); + o = evas_object_top_get(e_comp-evas); while (o) { E_Client *ec; diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c index 607ee66..61e82bf 100644 --- a/src/bin/e_comp_canvas.c +++ b/src/bin/e_comp_canvas.c @@ -73,24 +73,24 @@ _e_comp_canvas_cb_mouse_in(E_Comp *c EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Obje } static void -_e_comp_canvas_cb_mouse_down(E_Comp *c, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) +_e_comp_canvas_cb_mouse_down(E_Comp *c EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) { if (e_client_action_get()) return; - e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(c), event_info); + e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info); } static void -_e_comp_canvas_cb_mouse_up(E_Comp *c, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) +_e_comp_canvas_cb_mouse_up(E_Comp *c EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) { if (e_client_action_get()) return; - e_bindings_mouse_up_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(c), event_info); + e_bindings_mouse_up_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info); } static void -_e_comp_canvas_cb_mouse_wheel(E_Comp *c, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) +_e_comp_canvas_cb_mouse_wheel(E_Comp *c EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) { if (e_client_action_get()) return; - e_bindings_wheel_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(c), event_info); + e_bindings_wheel_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info); } @@ -105,14 +105,12 @@ _e_comp_cb_zone_change() static void -_e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED) +_e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED, const char *src EINA_UNUSED) { - E_Comp *c; /* thawed in _e_comp_screensaver_off() */ ecore_animator_frametime_set(10.0); - c = e_comp_util_evas_object_comp_get(obj); - if (!c-nocomp) - ecore_evas_manual_render_set(c-ee, EINA_TRUE); + if (!e_comp-nocomp) + ecore_evas_manual_render_set(e_comp-ee, EINA_TRUE); } @@ -216,26
[EGIT] [core/enlightenment] master 05/05: unused param--
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=7732bcef3b5b7cebef07967400ed20270e6f465d commit 7732bcef3b5b7cebef07967400ed20270e6f465d Author: Mike Blumenkrantz zm...@osg.samsung.com Date: Mon Jan 5 15:38:51 2015 -0500 unused param-- --- src/modules/conf_display/e_int_config_desk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/conf_display/e_int_config_desk.c b/src/modules/conf_display/e_int_config_desk.c index 48dd28c..c05b949 100644 --- a/src/modules/conf_display/e_int_config_desk.c +++ b/src/modules/conf_display/e_int_config_desk.c @@ -161,7 +161,7 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) } static Evas_Object * -_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) +_basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata) { Evas_Object *o, *of, *ol, *ob; E_Zone *zone; --
[EGIT] [core/enlightenment] master 03/05: disable client stack debugging
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f4d376be2f567c39c37f5693a19fc564f615f450 commit f4d376be2f567c39c37f5693a19fc564f615f450 Author: Mike Blumenkrantz zm...@osg.samsung.com Date: Mon Jan 5 15:29:41 2015 -0500 disable client stack debugging this should have been turned off for e19 release but I forgot --- src/bin/e_hints.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c index ba1260a..8361bc2 100644 --- a/src/bin/e_hints.c +++ b/src/bin/e_hints.c @@ -336,7 +336,7 @@ e_hints_client_stacking_set(void) unsigned int c, i = 0, non_x = 0; Ecore_X_Window *clients = NULL; -#define CLIENT_STACK_DEBUG +//#define CLIENT_STACK_DEBUG /* Get client count */ c = e_clients_count(e_comp); if (c) --
[EGIT] [core/enlightenment] master 01/05: enforce no multihead in X compositor
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=2d580a2f87b660f5ddfc7dfa94e31bb1e93fc131 commit 2d580a2f87b660f5ddfc7dfa94e31bb1e93fc131 Author: Mike Blumenkrantz zm...@osg.samsung.com Date: Mon Jan 5 15:26:47 2015 -0500 enforce no multihead in X compositor this hasn't worked since E17, may was well stop trying --- src/bin/e_comp_x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index c147497..3722756 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -5127,7 +5127,7 @@ _e_comp_x_screens_setup(void) n); return 0; } - for (i = 0; i n; i++) + for (i = 0; i 1; i++) { int rw, rh; Ecore_X_Window root = roots[i]; --
[EGIT] [core/enlightenment] master 01/01: add E_VERSION_MAJOR define for external module usage
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=ba5c0791528ef8870a4ac430de7c6f69590f673a commit ba5c0791528ef8870a4ac430de7c6f69590f673a Author: Mike Blumenkrantz zm...@osg.samsung.com Date: Mon Jan 5 15:49:57 2015 -0500 add E_VERSION_MAJOR define for external module usage this should simplify writing modules with conditional code for different versions of e --- src/bin/e.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/e.h b/src/bin/e.h index e73d8a0..299eb6d 100644 --- a/src/bin/e.h +++ b/src/bin/e.h @@ -1,6 +1,8 @@ #ifndef E_H # define E_H +# define E_VERSION_MAJOR 20 + /** * @defgroup API Enlightenment API * --
[EGIT] [core/enlightenment] enlightenment-0.19 01/02: disable client stack debugging
discomfitor pushed a commit to branch enlightenment-0.19. http://git.enlightenment.org/core/enlightenment.git/commit/?id=963d033699e3425008e95306c847631afb0d798b commit 963d033699e3425008e95306c847631afb0d798b Author: Mike Blumenkrantz zm...@osg.samsung.com Date: Mon Jan 5 15:29:41 2015 -0500 disable client stack debugging this should have been turned off for e19 release but I forgot --- src/bin/e_hints.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c index 7b8cd09..f2601df 100644 --- a/src/bin/e_hints.c +++ b/src/bin/e_hints.c @@ -326,7 +326,7 @@ e_hints_client_stacking_set(void) E_Comp *comp; const Eina_List *l; -#define CLIENT_STACK_DEBUG +//#define CLIENT_STACK_DEBUG /* Get client count */ EINA_LIST_FOREACH(e_comp_list(), l, comp) { --
[EGIT] [core/enlightenment] enlightenment-0.19 02/02: add E_VERSION_MAJOR define for external module usage
discomfitor pushed a commit to branch enlightenment-0.19. http://git.enlightenment.org/core/enlightenment.git/commit/?id=be0d07877e561edd7242368797a90c36c4e77ee4 commit be0d07877e561edd7242368797a90c36c4e77ee4 Author: Mike Blumenkrantz zm...@osg.samsung.com Date: Mon Jan 5 15:51:35 2015 -0500 add E_VERSION_MAJOR define for external module usage this should simplify writing modules with conditional code for different versions of e --- src/bin/e.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/e.h b/src/bin/e.h index e430a5a..f940939 100644 --- a/src/bin/e.h +++ b/src/bin/e.h @@ -1,6 +1,8 @@ #ifndef E_H # define E_H +# define E_VERSION_MAJOR 19 + /** * @defgroup API Enlightenment API * --