[EGIT] [core/efl] master 01/01: ecore_input: support Xbox One joystick
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5c9617c2cfda6dfffc26c90b212581013786262f commit 5c9617c2cfda6dfffc26c90b212581013786262f Author: Shinwoo Kim Date: Wed Feb 1 16:33:52 2017 +0900 ecore_input: support Xbox One joystick Add joystick mapper for Microsoft X-Box One pad (Covert Forces) --- src/lib/ecore_input/ecore_input_joystick.c | 111 - 1 file changed, 108 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_input/ecore_input_joystick.c b/src/lib/ecore_input/ecore_input_joystick.c index 7913a0e..33ce129 100644 --- a/src/lib/ecore_input/ecore_input_joystick.c +++ b/src/lib/ecore_input/ecore_input_joystick.c @@ -23,7 +23,8 @@ static int _ecore_input_joystick_init_count = 0; #ifdef HAVE_EEZE typedef void (*Joystick_Mapper)(struct js_event *event, Ecore_Event_Joystick *e); -static void _joystick_xiinput_mapper(struct js_event *event, Ecore_Event_Joystick *e); +static void _joystick_xbox360_mapper(struct js_event *event, Ecore_Event_Joystick *e); +static void _joystick_xboxone_mapper(struct js_event *event, Ecore_Event_Joystick *e); static void _joystick_ps4_mapper(struct js_event *event, Ecore_Event_Joystick *e); struct _Joystick_Info @@ -41,7 +42,8 @@ struct _Joystick_Mapping_Info const char *product; Joystick_Mapper mapper; } Joystick_Mapping_Info[] = { - {"045e", "028e", _joystick_xiinput_mapper}, /* Microsoft X-Box 360 pad */ + {"045e", "028e", _joystick_xbox360_mapper}, /* Microsoft X-Box 360 pad */ + {"045e", "02dd", _joystick_xboxone_mapper}, /* Microsoft X-Box One pad (Covert Forces) */ {"054c", "05c4", _joystick_ps4_mapper} /* Sony Computer Entertainment Wireless Controller */ }; @@ -169,7 +171,7 @@ _joystick_ps4_mapper(struct js_event *event, Ecore_Event_Joystick *e) } static void -_joystick_xiinput_mapper(struct js_event *event, Ecore_Event_Joystick *e) +_joystick_xbox360_mapper(struct js_event *event, Ecore_Event_Joystick *e) { if (event->type == JS_EVENT_BUTTON) { @@ -272,6 +274,109 @@ _joystick_xiinput_mapper(struct js_event *event, Ecore_Event_Joystick *e) } static void +_joystick_xboxone_mapper(struct js_event *event, Ecore_Event_Joystick *e) +{ + if (event->type == JS_EVENT_BUTTON) + { +e->type = ECORE_EVENT_JOYSTICK_EVENT_TYPE_BUTTON; +e->button.value = event->value; +switch (event->number) + { + case 0: + e->button.index = ECORE_EVENT_JOYSTICK_BUTTON_FACE_0; + break; + + case 1: + e->button.index = ECORE_EVENT_JOYSTICK_BUTTON_FACE_1; + break; + + case 2: + e->button.index = ECORE_EVENT_JOYSTICK_BUTTON_FACE_2; + break; + + case 3: + e->button.index = ECORE_EVENT_JOYSTICK_BUTTON_FACE_3; + break; + + case 4: + e->button.index = ECORE_EVENT_JOYSTICK_BUTTON_LEFT_SHOULDER; + break; + + case 5: + e->button.index = ECORE_EVENT_JOYSTICK_BUTTON_RIGHT_SHOULDER; + break; + + case 6: + e->button.index = ECORE_EVENT_JOYSTICK_BUTTON_META; + break; + + case 7: + e->button.index = ECORE_EVENT_JOYSTICK_BUTTON_SELECT; + break; + + case 8: + e->button.index = ECORE_EVENT_JOYSTICK_BUTTON_START; + break; + + case 9: + e->button.index = ECORE_EVENT_JOYSTICK_BUTTON_LEFT_ANALOG_STICK; + break; + + case 10: + e->button.index = ECORE_EVENT_JOYSTICK_BUTTON_RIGHT_ANALOG_STICK; + break; + + default: + ERR("Unsupported joystick event: %d", event->number); + break; + } + } + else + { +e->type = ECORE_EVENT_JOYSTICK_EVENT_TYPE_AXIS; +e->axis.value = event->value / 32767.0f;; +switch (event->number) + { + case 0: + e->axis.index = ECORE_EVENT_JOYSTICK_AXIS_LEFT_ANALOG_HOR; + break; + + case 1: + e->axis.index = ECORE_EVENT_JOYSTICK_AXIS_LEFT_ANALOG_VER; + break; + + case 2: + e->axis.index = ECORE_EVENT_JOYSTICK_AXIS_LEFT_SHOULDER; + break; + + case 3: + e->axis.index = ECORE_EVENT_JOYSTICK_AXIS_RIGHT_ANALOG_HOR; + break; + + case 4: + e->axis.index = ECORE_EVENT_JOYSTICK_AXIS_RIGHT_ANALOG_VER; + break; + + case 5: + e->axis.index = ECORE_EVENT_JOYSTICK_AXIS_RIGHT_SHOULDER; + break; + + case 6: + e->axis.index = ECORE_EVENT_JOYSTICK_AXIS_HAT_X; + break; + + case 7: + e->axis.index = ECORE_EVENT_JOYSTICK_AXIS_HAT_Y; + break; + + default: + ERR("Unsupported joystick event: %d", e
[EGIT] [core/efl] master 02/02: evas gl common - reduce data structure sizes got gl common context
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1d60f42e63930a26272df0b025cabc5c93dd0c73 commit 1d60f42e63930a26272df0b025cabc5c93dd0c73 Author: Carsten Haitzler (Rasterman) Date: Wed Feb 1 16:08:04 2017 +0900 evas gl common - reduce data structure sizes got gl common context this reduced pipes to 32 as default max pipes is 32 and we never actually go up beyond 32 unless oyu use env vars to expand... and no one will... and actual testing shows us top out at about 30 pipes usage in anything i can find/test. this packs more bool flags together as bits instead of itns or chars to save memory. @optimize --- .../evas/engines/gl_common/evas_gl_common.h| 267 ++--- 1 file changed, 131 insertions(+), 136 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h index 55f5ab9..00945a0 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_common.h +++ b/src/modules/evas/engines/gl_common/evas_gl_common.h @@ -107,9 +107,9 @@ struct _Evas_GL_Program struct { GLuint mvp, rotation_id; } uniform; - GLuint prog; + GLuintprog; - Eina_Bool reset : 1; + Eina_Bool reset : 1; Eina_Bool bin_saved : 1; Eina_Bool delete_me : 1; }; @@ -121,62 +121,62 @@ struct _Evas_GL_Shared int images_size; struct { - GLint max_texture_units; - GLint max_texture_size; - GLint max_vertex_elements; - GLfloat anisotropic; - Eina_Bool rgb : 1; - Eina_Bool bgra : 1; - Eina_Bool tex_npo2 : 1; - Eina_Bool tex_rect : 1; - Eina_Bool sec_image_map : 1; - Eina_Bool sec_tbm_surface : 1; - Eina_Bool egl_tbm_ext : 1; - Eina_Bool bin_program : 1; + GLint max_texture_units; + GLint max_texture_size; + GLint max_vertex_elements; + GLfloat anisotropic; + Eina_Bool rgb : 1; + Eina_Bool bgra : 1; + Eina_Bool tex_npo2 : 1; + Eina_Bool tex_rect : 1; + Eina_Bool sec_image_map : 1; + Eina_Bool sec_tbm_surface : 1; + Eina_Bool egl_tbm_ext : 1; + Eina_Bool bin_program : 1; Eina_Bool unpack_row_length : 1; - Eina_Bool etc1 : 1; - Eina_Bool etc2 : 1; - Eina_Bool etc1_subimage : 1; - Eina_Bool s3tc : 1; + Eina_Bool etc1 : 1; + Eina_Bool etc2 : 1; + Eina_Bool etc1_subimage : 1; + Eina_Bool s3tc : 1; // tuning params - per gpu/cpu combo? -#define DEF_CUTOUT 4096 +#define DEF_CUTOUT 4096 -#define MAX_PIPES 128 +#define MAX_PIPES32 #define DEF_PIPES32 #define DEF_PIPES_SGX_54024 #define DEF_PIPES_TEGRA_2 8 #define DEF_PIPES_TEGRA_324 -#define MIN_ATLAS_ALLOC 16 -#define MAX_ATLAS_ALLOC 1024 -#define DEF_ATLAS_ALLOC256 +#define MIN_ATLAS_ALLOC 16 +#define MAX_ATLAS_ALLOC1024 +#define DEF_ATLAS_ALLOC 256 -#define MIN_ATLAS_ALLOC_ALPHA 16 -#define MAX_ATLAS_ALLOC_ALPHA 4096 -#define DEF_ATLAS_ALLOC_ALPHA 512 +#define MIN_ATLAS_ALLOC_ALPHA16 +#define MAX_ATLAS_ALLOC_ALPHA 4096 +#define DEF_ATLAS_ALLOC_ALPHA 512 -#define MAX_ATLAS_W512 +#define MAX_ATLAS_W 512 #define DEF_ATLAS_W 512 -#define MAX_ATLAS_H512 +#define MAX_ATLAS_H 512 #define DEF_ATLAS_H 512 -#define ATLAS_FORMATS_COUNT12 +#define ATLAS_FORMATS_COUNT 12 Eina_List *cspaces; // depend on the values of etc1, etc2 and st3c struct { struct { -int max; +intmax; } cutout; struct { -int max; +intmax; } pipes; struct { -int max_alloc_size; -int max_alloc_alpha_size; -int max_w; -int max_h; +intmax_alloc_size; +intmax_alloc_alpha_size; +intmax_w; +intmax_h; } atlas; } tune; } info; @@ -210,7 +210,6 @@ struct _Evas_GL_Shared int ax, ay; int offx, offy; GLfloat proj[16]; - Eina_Bool needs_shaders_flush : 1; }; @@ -263,77 +262,77 @@ struct _Evas_Engine_GL_Context Evas_GL_Program *prog; GLuint cur_tex, cur_texu, cur_texv, cur_texa, cur_texm; int tex_target; - int render_op; int cx, cy, cw, ch; - int smooth; - int blend; - int clip; + unsigned char render_op; + Eina_Bool smooth : 1; +
[EGIT] [core/efl] master 01/02: Eldbus: add test suite for eldbus (eldbus_object*)
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5b8e1a38f562ee3f1dd09075530ae155a16b0a99 commit 5b8e1a38f562ee3f1dd09075530ae155a16b0a99 Author: Mykola Solyanko Date: Wed Feb 1 13:10:18 2017 +0900 Eldbus: add test suite for eldbus (eldbus_object*) Summary: add tests for next API: eldbus_object_bus_name_get eldbus_object_connection_get eldbus_object_method_call_new eldbus_object_path_get eldbus_object_ref eldbus_object_send eldbus_object_get eldbus_object_introspect eldbus_object_peer_ping eldbus_object_peer_machine_id_get eldbus_object_get Reviewers: cedric, NikaWhite, myoungwoon, raster Subscribers: m.solyanko, jpeg, artem.popov Differential Revision: https://phab.enlightenment.org/D4635 --- src/Makefile_Eldbus.am | 1 + src/tests/eldbus/CMakeLists.txt | 1 + src/tests/eldbus/eldbus_suite.c | 1 + src/tests/eldbus/eldbus_suite.h | 1 + src/tests/eldbus/eldbus_test_eldbus_object.c | 409 +++ 5 files changed, 413 insertions(+) diff --git a/src/Makefile_Eldbus.am b/src/Makefile_Eldbus.am index b4e646c..e602042 100644 --- a/src/Makefile_Eldbus.am +++ b/src/Makefile_Eldbus.am @@ -131,6 +131,7 @@ tests/eldbus/eldbus_test_eldbus_model_object.c \ tests/eldbus/eldbus_test_eldbus_model_proxy.c \ tests/eldbus/eldbus_test_eldbus_model_method.c \ tests/eldbus/eldbus_test_eldbus_model_signal.c \ +tests/eldbus/eldbus_test_eldbus_object.c \ tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c \ tests/eldbus/eldbus_fake_server.c \ tests/eldbus/eldbus_suite.h diff --git a/src/tests/eldbus/CMakeLists.txt b/src/tests/eldbus/CMakeLists.txt index df058f9..9192690 100644 --- a/src/tests/eldbus/CMakeLists.txt +++ b/src/tests/eldbus/CMakeLists.txt @@ -11,6 +11,7 @@ set(SOURCES eldbus_test_eldbus_model_object.c eldbus_test_eldbus_model_proxy.c eldbus_test_eldbus_model_signal.c + eldbus_test_eldbus_object.c eldbus_test_fake_server_eldbus_model_proxy.c ) diff --git a/src/tests/eldbus/eldbus_suite.c b/src/tests/eldbus/eldbus_suite.c index dd79e33..4f3c6bb 100644 --- a/src/tests/eldbus/eldbus_suite.c +++ b/src/tests/eldbus/eldbus_suite.c @@ -14,6 +14,7 @@ static const Efl_Test_Case etc[] = { { "eldbus_test_fake_server_eldbus_model_proxy", eldbus_test_fake_server_eldbus_model_proxy }, { "eldbus_model_method", eldbus_test_eldbus_model_method }, { "eldbus_model_signal", eldbus_test_eldbus_model_signal }, + { "eldbus_test_eldbus_object", eldbus_test_eldbus_object }, { NULL, NULL } }; diff --git a/src/tests/eldbus/eldbus_suite.h b/src/tests/eldbus/eldbus_suite.h index 5410fe4..efc47b3 100644 --- a/src/tests/eldbus/eldbus_suite.h +++ b/src/tests/eldbus/eldbus_suite.h @@ -11,5 +11,6 @@ void eldbus_test_eldbus_model_proxy(TCase *tc); void eldbus_test_fake_server_eldbus_model_proxy(TCase *tc); void eldbus_test_eldbus_model_method(TCase *tc); void eldbus_test_eldbus_model_signal(TCase *tc); +void eldbus_test_eldbus_object(TCase *tc); #endif diff --git a/src/tests/eldbus/eldbus_test_eldbus_object.c b/src/tests/eldbus/eldbus_test_eldbus_object.c new file mode 100644 index 000..c679da4 --- /dev/null +++ b/src/tests/eldbus/eldbus_test_eldbus_object.c @@ -0,0 +1,409 @@ +#include +#include +#include +#include +#include + +#include "eldbus_suite.h" + +static Eina_Bool is_success = EINA_FALSE; +static Eina_Bool is_register_service = EINA_FALSE; +static Eina_Bool is_peer_ping = EINA_FALSE; + +static Ecore_Timer *timeout = NULL; + +static const char *empty_string = ""; + +static const char *bus = "org.freedesktop.DBus"; +static const char *interface = "org.freedesktop.DBus"; +static const char *path = "/org/freedesktop/DBus"; +static const char *method_name = "GetId"; + +static int cb_data = 5; + +/** +* @addtogroup eldbus +* @{ +* @defgroup eldbus_object +* +* @precondition +* @step 1 Initialize ecore with ecore_init() +* @step 2 Initialize eldbus with eldbus_init() +*/ + +static void +_setup(void) +{ + ecore_init(); + int ret = eldbus_init(); + ck_assert_int_ge(ret, 1); +} + +static void +_teardown(void) +{ + ecore_shutdown(); + int ret = eldbus_shutdown(); + ck_assert_int_eq(ret, 0); +} + +static Eina_Bool +_ecore_loop_close(void *data EINA_UNUSED) +{ + ecore_main_loop_quit(); + + return ECORE_CALLBACK_CANCEL; +} + +static void +_object_message_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED) +{ + if (timeout != NULL) + { +ecore_timer_del(timeout); +timeout = NULL; + } + + const char *errname, *errmsg; + int *user_data = data; + + if ((user_data) && (*user_data == cb_data)) + { +if (!eldbus_message_error_get(msg, &errname, &errmsg)) + { + char *txt; + if (eldbus_message_arguments_get(msg, "s", &txt)) + { + if
Re: [E-devel] Weekend project: distro-builder
On 01/31/2017 10:37 PM, ani...@astier.eu wrote: > Over the years, the dependency list for EFL has grown quite a bit. As a > results, it's often been a pain to build the whole thing from git as a > new developer (if you don't want to use your distro packages). > You have to figure out what to install, by finding which package > correspond to the libs described in the Requirements section of the > README[1]. Or to apt-get build-dep old dependencies based on the current > package. Or, you can try to follow the outdated docs on the wiki[2] > for your distro. > > I have tried updating those docs once[3] using a bare distro, in order > to make sure we have the full list of needed dependencies. > > What would be better would be to make sure the process I used to verify > the dependency list is reproductible, so that we could simply document > the dependencies for each distro. That's where distro-builder comes in: > https://github.com/anisse/distro-builder > > It's a relatively simple script that currently builds efl and > terminology on fedora 24/25, debian stretch and ubuntu 16.04/16.10. > > The final goal would be to have this script and the dependency files in > the efl tree, and running it regularly, possibly on CI. > > It could even help making sure the current cmake transition goes > smoothly on different distros :-) > > I'm looking forward to your feedback. > > Anisse > > [1] https://git.enlightenment.org/core/efl.git/tree/README?h=v1.18.4#n444 > [2] https://www.enlightenment.org/docs > [3] > https://git.enlightenment.org/website/www-content.git/commit/pages/distros/fedora-start.txt?id=a640068093a40797386716d500484ffc2b325fec > On openSUSE atleast you can just install then uninstall efl-devel this will pull in all the deps automatically as the packages are kept up to date. Alternately the current list is available here, https://build.opensuse.org/package/view_file/X11:Enlightenment:Factory/efl/efl.spec?expand=1 Cheers -- Simon Lees (Simotek)http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B signature.asc Description: OpenPGP digital signature -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [tools/edi] master 01/01: syntax: Still ask clang to highlight preprocessor/macros
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=13c7c1fcab5d802f15c6ca54e0dc11c7326defac commit 13c7c1fcab5d802f15c6ca54e0dc11c7326defac Author: Andy Williams Date: Tue Jan 31 20:09:02 2017 + syntax: Still ask clang to highlight preprocessor/macros --- src/bin/editor/edi_editor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c index f218bc8..8737880 100644 --- a/src/bin/editor/edi_editor.c +++ b/src/bin/editor/edi_editor.c @@ -716,6 +716,7 @@ _clang_show_highlighting(Edi_Editor *editor) case CXCursor_InclusionDirective: case CXCursor_PreprocessingDirective: case CXCursor_MacroExpansion: + type = ELM_CODE_TOKEN_TYPE_PREPROCESSOR; break; case CXCursor_TypeRef: type = ELM_CODE_TOKEN_TYPE_TYPE; --
[EGIT] [core/efl] master 01/01: elm_code: fix that selected code can't undo
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=928091bedbcb1bb3166f680bcd192ef32677fc3b commit 928091bedbcb1bb3166f680bcd192ef32677fc3b Author: YeongJong Lee Date: Tue Jan 31 19:04:33 2017 + elm_code: fix that selected code can't undo Summary: Change some undo logic and remove unused function Test Plan: 1. elementary_test - Code Editor 2. Select lines. 3. Remove selected lines. 4. undo removed lines( + ) Reviewers: ajwillia.ms Reviewed By: ajwillia.ms Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4631 --- src/lib/elementary/elm_code_widget.c | 83 ++ src/lib/elementary/elm_code_widget_selection.c | 23 +++ src/lib/elementary/elm_code_widget_selection.h | 2 + src/lib/elementary/elm_code_widget_undo.c | 37 +++- 4 files changed, 118 insertions(+), 27 deletions(-) diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c index 98799d5..6d17db2 100644 --- a/src/lib/elementary/elm_code_widget.c +++ b/src/lib/elementary/elm_code_widget.c @@ -1206,25 +1206,6 @@ _elm_code_widget_cursor_move_pagedown(Elm_Code_Widget *widget) _elm_code_widget_cursor_move(widget, pd, col, row, EINA_TRUE); } -static Eina_Bool -_elm_code_widget_delete_selection(Elm_Code_Widget *widget) -{ - Elm_Code_Widget_Data *pd; - Elm_Code_Widget_Selection_Data *selection; - - pd = efl_data_scope_get(widget, ELM_CODE_WIDGET_CLASS); - - if (!pd->selection) - return EINA_FALSE; - - selection = elm_code_widget_selection_normalized_get(widget); - elm_code_widget_selection_delete(widget); - elm_code_widget_cursor_position_set(widget, selection->start_line, selection->start_col); - free(selection); - - return EINA_TRUE; -} - static Elm_Code_Widget_Change_Info * _elm_code_widget_change_create(unsigned int start_col, unsigned int start_line, unsigned int end_col, unsigned int end_line, @@ -1256,6 +1237,32 @@ _elm_code_widget_change_free(Elm_Code_Widget_Change_Info *info) } void +_elm_code_widget_change_selection_add(Evas_Object *widget) +{ + Elm_Code_Widget_Change_Info *change; + Elm_Code_Widget_Selection_Data *selection; + char *selection_text; + + if (elm_code_widget_selection_is_empty(widget)) + return; + + selection_text = elm_code_widget_selection_text_get(widget); + selection = elm_code_widget_selection_normalized_get(widget); + + change = _elm_code_widget_change_create(selection->start_col, + selection->start_line, + selection->end_col, + selection->end_line, + selection_text, + strlen(selection_text), + EINA_FALSE); + _elm_code_widget_undo_change_add(widget, change); + _elm_code_widget_change_free(change); + free(selection_text); + free(selection); +} + +void _elm_code_widget_text_at_cursor_insert_do(Elm_Code_Widget *widget, const char *text, int length, Eina_Bool undo) { Elm_Code *code; @@ -1264,7 +1271,12 @@ _elm_code_widget_text_at_cursor_insert_do(Elm_Code_Widget *widget, const char *t unsigned int row, col, position, col_width, curlen, indent; const char *curtext, *indent_text; - _elm_code_widget_delete_selection(widget); + if (undo) + { +_elm_code_widget_change_selection_add(widget); +elm_code_widget_selection_delete(widget); + } + code = elm_obj_code_widget_code_get(widget); elm_obj_code_widget_cursor_position_get(widget, &row, &col); line = elm_code_file_line_get(code->file, row); @@ -1353,7 +1365,9 @@ _elm_code_widget_newline(Elm_Code_Widget *widget) unsigned int row, col, position, oldlen, width, indent; char *oldtext, *leading; - _elm_code_widget_delete_selection(widget); + _elm_code_widget_change_selection_add(widget); + elm_code_widget_selection_delete(widget); + code = elm_obj_code_widget_code_get(widget); elm_obj_code_widget_cursor_position_get(widget, &row, &col); line = elm_code_file_line_get(code->file, row); @@ -1400,18 +1414,27 @@ _elm_code_widget_backspaceline(Elm_Code_Widget *widget, Eina_Bool nextline) if (nextline) { +elm_code_widget_selection_start(widget, row, col); +elm_code_widget_selection_end(widget, row + 1, 0); +_elm_code_widget_change_selection_add(widget); + elm_code_line_merge_down(line); } else { oldline = elm_code_file_line_get(code->file, row - 1); elm_code_line_text_get(oldline, &oldlength); -elm_code_line_merge_up(line); position = elm_code_widget_line_text_column_width_to_position(widget, oldline, oldlength); +elm_code_widg
[EGIT] [tools/edi] master 02/02: filepanel: remove unneeded vars
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=fd6584f8b66d040421a8a2204d4fab63201d9cb7 commit fd6584f8b66d040421a8a2204d4fab63201d9cb7 Author: Andy Williams Date: Tue Jan 31 18:46:19 2017 + filepanel: remove unneeded vars --- src/bin/edi_filepanel.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/bin/edi_filepanel.c b/src/bin/edi_filepanel.c index fede545..705cd19 100644 --- a/src/bin/edi_filepanel.c +++ b/src/bin/edi_filepanel.c @@ -347,12 +347,8 @@ _on_list_contracted(void *data EINA_UNUSED, _file_listing_empty(sd, it); } -static Elm_Object_Item *_file_listing_item_find(const char *path, Elm_Object_Item *root) +static Elm_Object_Item *_file_listing_item_find(const char *path) { - Elm_Object_Item *item; - Edi_Dir_Data *sd; - const Eina_List *itemlist, *l; - return eina_hash_find(_list_items, path); } @@ -363,7 +359,7 @@ _file_listing_item_insert(const char *path, Eina_Bool isdir, Elm_Object_Item *pa Edi_Dir_Data *sd; Elm_Object_Item *item; - item = _file_listing_item_find(path, parent_it); + item = _file_listing_item_find(path); if (item) return; @@ -385,11 +381,11 @@ _file_listing_item_insert(const char *path, Eina_Bool isdir, Elm_Object_Item *pa } static void -_file_listing_item_delete(const char *path, Elm_Object_Item *parent_it) +_file_listing_item_delete(const char *path) { Elm_Object_Item *item; - item = _file_listing_item_find(path, parent_it); + item = _file_listing_item_find(path); if (!item) return; @@ -480,16 +476,16 @@ _file_listing_updated(void *data EINA_UNUSED, int type EINA_UNUSED, if (strncmp(edi_project_get(), dir, strlen(edi_project_get( return; - parent_it = _file_listing_item_find(dir, NULL); + parent_it = _file_listing_item_find(dir); if (type == EIO_MONITOR_FILE_CREATED) _file_listing_item_insert(ev->filename, EINA_FALSE, parent_it); else if (type == EIO_MONITOR_FILE_DELETED) - _file_listing_item_delete(ev->filename, parent_it); + _file_listing_item_delete(ev->filename); if (type == EIO_MONITOR_DIRECTORY_CREATED) _file_listing_item_insert(ev->filename, EINA_TRUE, parent_it); else if (type == EIO_MONITOR_DIRECTORY_DELETED) - _file_listing_item_delete(ev->filename, parent_it); + _file_listing_item_delete(ev->filename); else DBG("Ignoring file update event for %s", ev->filename); } --
[EGIT] [tools/edi] master 01/02: filepanel: Don't apply filter to folders
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=9631552eaa7e138ae76260432e703d45fba4ea48 commit 9631552eaa7e138ae76260432e703d45fba4ea48 Author: Andy Williams Date: Tue Jan 31 18:44:58 2017 + filepanel: Don't apply filter to folders This way we can browse around looking for matching files :) --- src/bin/edi_filepanel.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/edi_filepanel.c b/src/bin/edi_filepanel.c index 8d2dd33..fede545 100644 --- a/src/bin/edi_filepanel.c +++ b/src/bin/edi_filepanel.c @@ -41,7 +41,7 @@ static void _file_listing_empty(Edi_Dir_Data *dir, Elm_Object_Item *parent_it); static Eina_Bool -_file_path_hidden(const char *path) +_file_path_hidden(const char *path, Eina_Bool filter) { Edi_Build_Provider *provider; const char *relative; @@ -53,7 +53,7 @@ _file_path_hidden(const char *path) if (ecore_file_file_get(path)[0] == '.') return EINA_TRUE; - if (!_filter_set) + if (!filter || !_filter_set) return EINA_FALSE; relative = path + strlen(_root_path); @@ -374,7 +374,7 @@ _file_listing_item_insert(const char *path, Eina_Bool isdir, Elm_Object_Item *pa sd->isdir = EINA_TRUE; } - if (_file_path_hidden(path)) + if (_file_path_hidden(path, !isdir)) return; sd->path = eina_stringshare_add(path); @@ -501,7 +501,7 @@ _filter_get(void *data, Evas_Object *obj EINA_UNUSED, void *key EINA_UNUSED) { Edi_Dir_Data *sd = data; - return !_file_path_hidden(sd->path); + return !_file_path_hidden(sd->path, EINA_TRUE); } static void --
[EGIT] [tools/edi] master 01/01: ui: Bring in current tab
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=36a5bb1410f3e69d8ef22be21f2d1ad20a592fe1 commit 36a5bb1410f3e69d8ef22be21f2d1ad20a592fe1 Author: YeongJong Lee Date: Tue Jan 31 18:32:59 2017 + ui: Bring in current tab Summary: Bring in current tab if it is not in the scope of scroller. Test Plan: 1. Open project 2. Open several file 3. Check current tab is in the scope of scroller Reviewers: ajwillia.ms Reviewed By: ajwillia.ms Differential Revision: https://phab.enlightenment.org/D4416 --- src/bin/mainview/edi_mainview.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/bin/mainview/edi_mainview.c b/src/bin/mainview/edi_mainview.c index c35844c..04c44c5 100644 --- a/src/bin/mainview/edi_mainview.c +++ b/src/bin/mainview/edi_mainview.c @@ -17,7 +17,7 @@ #include "edi_private.h" #include "edi_config.h" -static Evas_Object *_content_frame, *_current_view, *tb, *_main_win, *_welcome_panel; +static Evas_Object *_content_frame, *_current_view, *tb, *_main_win, *_welcome_panel, *_tab_scroller; static Evas_Object *_edi_mainview_choose_popup, *_edi_mainview_goto_popup; static Edi_Path_Options *_edi_mainview_choose_options; @@ -117,6 +117,7 @@ edi_mainview_item_select(Edi_Mainview_Item *item) { Eina_List *list; Edi_Mainview_Item *it; + Evas_Coord tabw, region_x = 0, w, total_w = 0; if (item->win) { @@ -127,10 +128,16 @@ edi_mainview_item_select(Edi_Mainview_Item *item) EINA_LIST_FOREACH(_edi_mainview_items, list, it) { elm_object_signal_emit(it->tab, "mouse,up,1", "base"); + evas_object_geometry_get(it->tab, NULL, NULL, &w, NULL); + if (item == it) region_x = total_w; + total_w += w; } _edi_mainview_view_show(item->view); elm_object_signal_emit(item->tab, "mouse,down,1", "base"); + +evas_object_geometry_get(item->tab, NULL, NULL, &tabw, NULL); +elm_scroller_region_bring_in(_tab_scroller, region_x, 0, tabw, 0); } } @@ -244,6 +251,7 @@ _edi_mainview_item_tab_add(Edi_Path_Options *options, const char *mime) elm_box_pack_end(tb, tab); evas_object_show(tab); + elm_box_recalculate(tb); item->tab = tab; edi_mainview_item_select(item); @@ -738,6 +746,7 @@ edi_mainview_add(Evas_Object *parent, Evas_Object *win) elm_scroller_policy_set(scr, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); elm_table_pack(tabs, scr, 0, 0, 1, 1); evas_object_show(scr); + _tab_scroller = scr; tb = elm_box_add(scr); evas_object_size_hint_weight_set(tb, 0.0, 0.0); --
[EGIT] [core/efl] master 02/03: elput: Don't add devices which we are not going to use
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=df1a1e05a95e24ef7d9704362b6c35e5ae8678e6 commit df1a1e05a95e24ef7d9704362b6c35e5ae8678e6 Author: Chris Michael Date: Tue Jan 31 10:54:09 2017 -0500 elput: Don't add devices which we are not going to use If an input device is not a pointer, keyboard, or touch device then we are not going to be handling events for it, so do not create a new Elput device for it. @fix Signed-off-by: Chris Michael --- src/lib/elput/elput_evdev.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c index 8bbb591..c769853 100644 --- a/src/lib/elput/elput_evdev.c +++ b/src/lib/elput/elput_evdev.c @@ -1239,6 +1239,7 @@ _evdev_device_create(Elput_Seat *seat, struct libinput_device *device) edev->seat = seat; edev->device = device; + edev->caps = 0; if ((libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_KEYBOARD)) && (libinput_device_keyboard_has_key(device, KEY_ENTER))) @@ -1260,6 +1261,11 @@ _evdev_device_create(Elput_Seat *seat, struct libinput_device *device) edev->caps |= EVDEV_SEAT_TOUCH; } + if (!((edev->caps & EVDEV_SEAT_KEYBOARD) || + (edev->caps & EVDEV_SEAT_POINTER) || + (edev->caps & EVDEV_SEAT_TOUCH))) + goto err; + libinput_device_set_user_data(device, edev); libinput_device_ref(edev->device); @@ -1277,6 +1283,10 @@ _evdev_device_create(Elput_Seat *seat, struct libinput_device *device) * elput would handle outputs, and make calls to calibrate */ return edev; + +err: + free(edev); + return NULL; } void --
[EGIT] [core/efl] master 03/03: elput: Improve debug output for added devices
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e483e35f3dd898085eadf1f70a94e80bbd987759 commit e483e35f3dd898085eadf1f70a94e80bbd987759 Author: Chris Michael Date: Tue Jan 31 10:55:55 2017 -0500 elput: Improve debug output for added devices Small patch which does not print out debug info for devices we do not handle, and adds the 'type' of device to the debug output (pointer, keyboard, etc). @fix Signed-off-by: Chris Michael --- src/lib/elput/elput_input.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index 6bb5b57..c854fc9 100644 --- a/src/lib/elput/elput_input.c +++ b/src/lib/elput/elput_input.c @@ -176,6 +176,12 @@ _device_add(Elput_Manager *em, struct libinput_device *dev) edev = _evdev_device_create(eseat, dev); if (!edev) return; + oname = libinput_device_get_output_name(dev); + eina_stringshare_replace(&edev->output_name, oname); + + eseat->devices = eina_list_append(eseat->devices, edev); + + DBG("Input Device Added: %s", libinput_device_get_name(dev)); if (edev->caps & EVDEV_SEAT_KEYBOARD) DBG("\tDevice added as Keyboard device"); if (edev->caps & EVDEV_SEAT_POINTER) @@ -183,11 +189,6 @@ _device_add(Elput_Manager *em, struct libinput_device *dev) if (edev->caps & EVDEV_SEAT_TOUCH) DBG("\tDevice added as Touch device"); - oname = libinput_device_get_output_name(dev); - eina_stringshare_replace(&edev->output_name, oname); - - eseat->devices = eina_list_append(eseat->devices, edev); - _device_event_send(edev, ELPUT_DEVICE_ADDED); } @@ -199,6 +200,8 @@ _device_remove(Elput_Manager *em EINA_UNUSED, struct libinput_device *device) edev = libinput_device_get_user_data(device); if (!edev) return; + DBG("Input Device Removed: %s", libinput_device_get_name(device)); + _device_event_send(edev, ELPUT_DEVICE_REMOVED); } @@ -217,11 +220,9 @@ _udev_process_event(struct libinput_event *event) switch (libinput_event_get_type(event)) { case LIBINPUT_EVENT_DEVICE_ADDED: -DBG("Input Device Added: %s", libinput_device_get_name(dev)); _device_add(em, dev); break; case LIBINPUT_EVENT_DEVICE_REMOVED: -DBG("Input Device Removed: %s", libinput_device_get_name(dev)); _device_remove(em, dev); break; default: --
Re: [E-devel] Weekend project: distro-builder
Awesome ! This is currently out-of-scope since this script relies on linux-only systemd-nspawn. I've pondered doing a qemu-based version for cross-compiling, but even then I only thought of Linux (with qemu-user-static/binfmt). I'm not really knowledgeable on BSD stuff, but I think it would be great if you could copy this over to the Enlightenment wiki: https://www.enlightenment.org/docs Regards, Anisse On Tue, Jan 31, 2017 at 03:45:16PM +, Al Poole wrote: > Hey, > > I'm not sure if this helps. But I've a list of dependencies and build > instructions for OpenBSD, FreeBSD, DragonFly BSD and Debian here: > > http://efl.haxlab.org/ > > Hope it helps. > -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 01/03: Revert "elput: Change return of device_add/remove functions"
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d90be60e474e40ecd314367c35168a727a8c6c0c commit d90be60e474e40ecd314367c35168a727a8c6c0c Author: Chris Michael Date: Tue Jan 31 10:53:30 2017 -0500 Revert "elput: Change return of device_add/remove functions" Reverting this in favor of a better way to improve debug output This reverts commit cee7ee39932c31a21d3dd90e19703371a946a0c0. --- src/lib/elput/elput_input.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index 5f5168e..6bb5b57 100644 --- a/src/lib/elput/elput_input.c +++ b/src/lib/elput/elput_input.c @@ -163,7 +163,7 @@ _device_event_send(Elput_Device *edev, Elput_Device_Change_Type type) ecore_event_add(ELPUT_EVENT_DEVICE_CHANGE, ev, _device_event_cb_free, NULL); } -static Eina_Bool +static void _device_add(Elput_Manager *em, struct libinput_device *dev) { Elput_Seat *eseat; @@ -171,10 +171,10 @@ _device_add(Elput_Manager *em, struct libinput_device *dev) const char *oname; eseat = _udev_seat_get(em, dev); - if (!eseat) return EINA_FALSE; + if (!eseat) return; edev = _evdev_device_create(eseat, dev); - if (!edev) return EINA_FALSE; + if (!edev) return; if (edev->caps & EVDEV_SEAT_KEYBOARD) DBG("\tDevice added as Keyboard device"); @@ -189,21 +189,17 @@ _device_add(Elput_Manager *em, struct libinput_device *dev) eseat->devices = eina_list_append(eseat->devices, edev); _device_event_send(edev, ELPUT_DEVICE_ADDED); - - return EINA_TRUE; } -static Eina_Bool +static void _device_remove(Elput_Manager *em EINA_UNUSED, struct libinput_device *device) { Elput_Device *edev; edev = libinput_device_get_user_data(device); - if (!edev) return EINA_FALSE; + if (!edev) return; _device_event_send(edev, ELPUT_DEVICE_REMOVED); - - return EINA_TRUE; } static int @@ -221,12 +217,12 @@ _udev_process_event(struct libinput_event *event) switch (libinput_event_get_type(event)) { case LIBINPUT_EVENT_DEVICE_ADDED: -if (_device_add(em, dev)) - DBG("Input Device Added: %s", libinput_device_get_name(dev)); +DBG("Input Device Added: %s", libinput_device_get_name(dev)); +_device_add(em, dev); break; case LIBINPUT_EVENT_DEVICE_REMOVED: -if (_device_remove(em, dev)) - DBG("Input Device Removed: %s", libinput_device_get_name(dev)); +DBG("Input Device Removed: %s", libinput_device_get_name(dev)); +_device_remove(em, dev); break; default: ret = 0; --
Re: [E-devel] Weekend project: distro-builder
Hey, I'm not sure if this helps. But I've a list of dependencies and build instructions for OpenBSD, FreeBSD, DragonFly BSD and Debian here: http://efl.haxlab.org/ Hope it helps. On Tue, Jan 31, 2017 at 2:29 PM, wrote: > Hi Andrew, > > On Tue, Jan 31, 2017 at 12:47:08PM +, Andrew Williams wrote: > > Hi, > > > > It sounds like it would be really great to perhaps bring that into efler? > > Efler is a boostrapper and app discovery / install manager platform that > > has similar aims. > > It aims to have a 1 line install command that you can read more about > here: > > http://bit.ly/efler > > > > Currently efler can bootstrap Arch/Manjaro and OSX - Ubuntu was next on > my > > list. > > Upon a successful bootstrap you have efl and efler installed and you are > > handed over to the efler UI to pick other apps for your install pleasure > :) > > > > Let me know what you think! > > Andrew > > > > I think the motivations are orthogonal. My goal is to make sure the list > of dependencies is up-to-date, and still works. Hopefully once this > works, you can just "pacman -i $(cat deps/archlinux)" instead of > hardcoding[1] the list of dependencies. > > efler's goal is to make sure anyone can install the EFLs easily. > distro-builder's goal is to make sure devs and CI can verify EFLs still > build on all distros given a dependency list. > > Regards, > > Anisse > > [1] https://git.enlightenment.org/devs/ajwillia-ms/efler.git/ > tree/bootscripts/os/arch.sh > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 01/01: elput: Change return of device_add/remove functions
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cee7ee39932c31a21d3dd90e19703371a946a0c0 commit cee7ee39932c31a21d3dd90e19703371a946a0c0 Author: Chris Michael Date: Tue Jan 31 10:34:22 2017 -0500 elput: Change return of device_add/remove functions Minor change on the return value of the device_add and device_remove functions so that we can avoid debug output for devices which we do not deal with. Signed-off-by: Chris Michael --- src/lib/elput/elput_input.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index 6bb5b57..5f5168e 100644 --- a/src/lib/elput/elput_input.c +++ b/src/lib/elput/elput_input.c @@ -163,7 +163,7 @@ _device_event_send(Elput_Device *edev, Elput_Device_Change_Type type) ecore_event_add(ELPUT_EVENT_DEVICE_CHANGE, ev, _device_event_cb_free, NULL); } -static void +static Eina_Bool _device_add(Elput_Manager *em, struct libinput_device *dev) { Elput_Seat *eseat; @@ -171,10 +171,10 @@ _device_add(Elput_Manager *em, struct libinput_device *dev) const char *oname; eseat = _udev_seat_get(em, dev); - if (!eseat) return; + if (!eseat) return EINA_FALSE; edev = _evdev_device_create(eseat, dev); - if (!edev) return; + if (!edev) return EINA_FALSE; if (edev->caps & EVDEV_SEAT_KEYBOARD) DBG("\tDevice added as Keyboard device"); @@ -189,17 +189,21 @@ _device_add(Elput_Manager *em, struct libinput_device *dev) eseat->devices = eina_list_append(eseat->devices, edev); _device_event_send(edev, ELPUT_DEVICE_ADDED); + + return EINA_TRUE; } -static void +static Eina_Bool _device_remove(Elput_Manager *em EINA_UNUSED, struct libinput_device *device) { Elput_Device *edev; edev = libinput_device_get_user_data(device); - if (!edev) return; + if (!edev) return EINA_FALSE; _device_event_send(edev, ELPUT_DEVICE_REMOVED); + + return EINA_TRUE; } static int @@ -217,12 +221,12 @@ _udev_process_event(struct libinput_event *event) switch (libinput_event_get_type(event)) { case LIBINPUT_EVENT_DEVICE_ADDED: -DBG("Input Device Added: %s", libinput_device_get_name(dev)); -_device_add(em, dev); +if (_device_add(em, dev)) + DBG("Input Device Added: %s", libinput_device_get_name(dev)); break; case LIBINPUT_EVENT_DEVICE_REMOVED: -DBG("Input Device Removed: %s", libinput_device_get_name(dev)); -_device_remove(em, dev); +if (_device_remove(em, dev)) + DBG("Input Device Removed: %s", libinput_device_get_name(dev)); break; default: ret = 0; --
[EGIT] [core/efl] master 02/02: ecore-evas-wayland: Minor formatting fix
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7b8343253970f8a98d1386a9a354529274c3cd2b commit 7b8343253970f8a98d1386a9a354529274c3cd2b Author: Chris Michael Date: Tue Jan 31 10:29:50 2017 -0500 ecore-evas-wayland: Minor formatting fix NB: No functional changes, just formatting Signed-off-by: Chris Michael --- src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 3 +-- 1 file changed, 1 insertion(+), 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 4bdbd6e..5d82867 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 @@ -553,8 +553,7 @@ _ecore_evas_wl_common_device_event_add(int event_type, Ecore_Wl2_Device_Type dev } static EE_Wl_Device * -_ecore_evas_wl_common_seat_add(Ecore_Evas *ee, - unsigned int id) +_ecore_evas_wl_common_seat_add(Ecore_Evas *ee, unsigned int id) { Ecore_Evas_Engine_Wl_Data *wdata; EE_Wl_Device *device; --
[EGIT] [core/efl] master 01/02: elput: Add more robust debugging output for input devices
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ea3c1d17dac7227f5982cef6d3182f8b5c6c4c5d commit ea3c1d17dac7227f5982cef6d3182f8b5c6c4c5d Author: Chris Michael Date: Tue Jan 31 10:29:25 2017 -0500 elput: Add more robust debugging output for input devices Signed-off-by: Chris Michael --- src/lib/elput/elput_input.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index 706e4f7..6bb5b57 100644 --- a/src/lib/elput/elput_input.c +++ b/src/lib/elput/elput_input.c @@ -176,6 +176,13 @@ _device_add(Elput_Manager *em, struct libinput_device *dev) edev = _evdev_device_create(eseat, dev); if (!edev) return; + if (edev->caps & EVDEV_SEAT_KEYBOARD) + DBG("\tDevice added as Keyboard device"); + if (edev->caps & EVDEV_SEAT_POINTER) + DBG("\tDevice added as Pointer device"); + if (edev->caps & EVDEV_SEAT_TOUCH) + DBG("\tDevice added as Touch device"); + oname = libinput_device_get_output_name(dev); eina_stringshare_replace(&edev->output_name, oname); --
Re: [E-devel] Weekend project: distro-builder
Hi Andrew, On Tue, Jan 31, 2017 at 12:47:08PM +, Andrew Williams wrote: > Hi, > > It sounds like it would be really great to perhaps bring that into efler? > Efler is a boostrapper and app discovery / install manager platform that > has similar aims. > It aims to have a 1 line install command that you can read more about here: > http://bit.ly/efler > > Currently efler can bootstrap Arch/Manjaro and OSX - Ubuntu was next on my > list. > Upon a successful bootstrap you have efl and efler installed and you are > handed over to the efler UI to pick other apps for your install pleasure :) > > Let me know what you think! > Andrew > I think the motivations are orthogonal. My goal is to make sure the list of dependencies is up-to-date, and still works. Hopefully once this works, you can just "pacman -i $(cat deps/archlinux)" instead of hardcoding[1] the list of dependencies. efler's goal is to make sure anyone can install the EFLs easily. distro-builder's goal is to make sure devs and CI can verify EFLs still build on all distros given a dependency list. Regards, Anisse [1] https://git.enlightenment.org/devs/ajwillia-ms/efler.git/tree/bootscripts/os/arch.sh -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 04/05: evas gl common - have a gl array buffer pool to avoid hitting malloc
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8467d65b23f8b18d053a470fb78d71b5087da37a commit 8467d65b23f8b18d053a470fb78d71b5087da37a Author: Carsten Haitzler (Rasterman) Date: Tue Jan 31 18:04:47 2017 +0900 evas gl common - have a gl array buffer pool to avoid hitting malloc this improves performance a bit by avoding libc's malloc and the heap by using a custom buffer pool thathas basically immediate O(1) lookup time (in real life) that baloons out and contracts back as time goes on. @optimize --- .../evas/engines/gl_common/evas_gl_context.c | 395 + 1 file changed, 250 insertions(+), 145 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index dc04597..e3589a2 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -9,7 +9,6 @@ #define PRG_INVALID NULL #define GLPIPES 1 -#define FREE(a) do { if (a) { free(a); } a = NULL; } while(0) static int tbm_sym_done = 0; int _evas_engine_GL_common_log_dom = -1; @@ -1097,6 +1096,233 @@ error: return NULL; } +#define VERTEX_CNT 3 +#define COLOR_CNT 4 +#define TEX_CNT2 +#define SAM_CNT2 +#define MASK_CNT 4 + +#define PUSH_VERTEX(n, x, y, z) do { \ + gc->pipe[n].array.vertex[nv++] = x; \ + gc->pipe[n].array.vertex[nv++] = y; \ + gc->pipe[n].array.vertex[nv++] = z; } while(0) +#define PUSH_COLOR(n, r, g, b, a) do { \ + gc->pipe[n].array.color[nc++] = r; \ + gc->pipe[n].array.color[nc++] = g; \ + gc->pipe[n].array.color[nc++] = b; \ + gc->pipe[n].array.color[nc++] = a; } while(0) +#define PUSH_TEXUV(n, u, v) do { \ + gc->pipe[n].array.texuv[nu++] = u; \ + gc->pipe[n].array.texuv[nu++] = v; } while(0) +#define PUSH_TEXUV2(n, u, v) do { \ + gc->pipe[n].array.texuv2[nu2++] = u; \ + gc->pipe[n].array.texuv2[nu2++] = v; } while(0) +#define PUSH_TEXUV3(n, u, v) do { \ + gc->pipe[n].array.texuv3[nu3++] = u; \ + gc->pipe[n].array.texuv3[nu3++] = v; } while(0) +#define PUSH_TEXA(n, u, v) do { \ + gc->pipe[n].array.texa[na++] = u; \ + gc->pipe[n].array.texa[na++] = v; } while(0) +#define PUSH_TEXM(n, u, v, w, z) do { \ + gc->pipe[n].array.mask[nm++] = u; \ + gc->pipe[n].array.mask[nm++] = v; \ + gc->pipe[n].array.mask[nm++] = w; \ + gc->pipe[n].array.mask[nm++] = z; } while(0) +#define PUSH_TEXSAM(n, x, y) do { \ + gc->pipe[n].array.texsam[ns++] = x; \ + gc->pipe[n].array.texsam[ns++] = y; } while(0) + +#define PUSH_6_VERTICES(pn, x, y, w, h) do { \ + PUSH_VERTEX(pn, x, y, 0); PUSH_VERTEX(pn, x + w, y, 0); \ + PUSH_VERTEX(pn, x, y + h, 0); PUSH_VERTEX(pn, x + w, y, 0); \ + PUSH_VERTEX(pn, x + w, y + h, 0); PUSH_VERTEX(pn, x, y + h, 0); \ + } while (0) +#define PUSH_6_QUAD(pn, x1, y1, x2, y2, x3, y3, x4, y4) \ + PUSH_TEXUV(pn, x1, y1); PUSH_TEXUV(pn, x2, y2); PUSH_TEXUV(pn, x4, y4);\ + PUSH_TEXUV(pn, x2, y2); PUSH_TEXUV(pn, x3, y3); PUSH_TEXUV(pn, x4, y4); + +#define PUSH_6_TEXUV(pn, x1, y1, x2, y2)\ + PUSH_6_QUAD(pn, x1, y1, x2, y1, x2, y2, x1, y2); + +#define PUSH_6_TEXUV2(pn, x1, y1, x2, y2) do { \ + PUSH_TEXUV2(pn, x1, y1); PUSH_TEXUV2(pn, x2, y1); PUSH_TEXUV2(pn, x1, y2); \ + PUSH_TEXUV2(pn, x2, y1); PUSH_TEXUV2(pn, x2, y2); PUSH_TEXUV2(pn, x1, y2); \ + } while (0) +#define PUSH_6_TEXUV3(pn, x1, y1, x2, y2) do { \ + PUSH_TEXUV3(pn, x1, y1); PUSH_TEXUV3(pn, x2, y1); PUSH_TEXUV3(pn, x1, y2); \ + PUSH_TEXUV3(pn, x2, y1); PUSH_TEXUV3(pn, x2, y2); PUSH_TEXUV3(pn, x1, y2); \ + } while (0) +#define PUSH_6_TEXA(pn, x1, y1, x2, y2) do { \ + PUSH_TEXA(pn, x1, y1); PUSH_TEXA(pn, x2, y1); PUSH_TEXA(pn, x1, y2); \ + PUSH_TEXA(pn, x2, y1); PUSH_TEXA(pn, x2, y2); PUSH_TEXA(pn, x1, y2); \ + } while (0) +#define PUSH_SAMPLES(pn, dx, dy) do { \ + PUSH_TEXSAM(pn, dx, dy); PUSH_TEXSAM(pn, dx, dy); PUSH_TEXSAM(pn, dx, dy); \ + PUSH_TEXSAM(pn, dx, dy); PUSH_TEXSAM(pn, dx, dy); PUSH_TEXSAM(pn, dx, dy); \ + } while (0) +#define PUSH_MASKSAM(pn, x, y, cnt) do { int _i; for (_i = 0; _i < cnt; _i++) { \ + gc->pipe[pn].array.masksam[nms++] = x; gc->pipe[pn].array.masksam[nms++] = y; \ + } } while (0) +#define PUSH_6_COLORS(pn, r, g, b, a) \ + do { int i; for (i = 0; i < 6; i++) PUSH_COLOR(pn, r, g, b, a); } while(0) + +#define PIPE_GROW(gc, pn, inc) \ + int nv = gc->pipe[pn].array.num * VERTEX_CNT; (void) nv; \ + int nc = gc->pipe[pn].array.num * COLOR_CNT; (void) nc; \ + int nu = gc->pipe[pn].array.num * TEX_CNT; (void) nu; \ + int nu2 = gc->pipe[pn].array.num * TEX_CNT; (void) nu2; \ + int nu3 = gc->pipe[pn].array.num * TEX_CNT; (void) nu3; \ + int na = gc->pipe[pn].array.num * TEX_CNT; (void) na; \ + int ns = gc->pipe[pn].array.num * SAM_CNT; (void) ns; \ + int nm = gc->pipe[pn].array.num * MASK_CNT; (void) nm; \ + int nms = gc->pipe[pn].array.num * SAM_CN
[EGIT] [core/efl] master 01/05: evas async preload - fix valgrind issue in accessing image after free
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e2fe31fc09fa4622a7c1e2591db15a98cec6aca0 commit e2fe31fc09fa4622a7c1e2591db15a98cec6aca0 Author: Carsten Haitzler (Rasterman) Date: Tue Jan 31 14:47:36 2017 +0900 evas async preload - fix valgrind issue in accessing image after free cache flish and async end ended up dropping some cacneled images that were then accessed further in the cancel func for the thread. this fixes that @fix --- src/lib/evas/cache/evas_cache_image.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c index 3c46d4a..14940d9 100644 --- a/src/lib/evas/cache/evas_cache_image.c +++ b/src/lib/evas/cache/evas_cache_image.c @@ -462,13 +462,6 @@ _evas_cache_image_async_cancel(void *data) _evas_cache_image_entry_delete(ie->cache, ie); return; } - if (ie->flags.loaded) _evas_cache_image_async_end(ie); - if (ie->references == 0) - { -_evas_cache_image_lru_add(ie); -cache = ie->cache; - } - if (cache) evas_cache_image_flush(cache); SLKL(ie->lock_task); if (ie->targets) { @@ -483,6 +476,13 @@ _evas_cache_image_async_cancel(void *data) ie); } SLKU(ie->lock_task); + if (ie->references == 0) + { +_evas_cache_image_lru_add(ie); +cache = ie->cache; + } + if (ie->flags.loaded) _evas_cache_image_async_end(ie); + if (cache) evas_cache_image_flush(cache); } // note - preload_add assumes a target is ONLY added ONCE to the image --
[EGIT] [core/efl] master 03/05: evas draw context - reduce size and allocations and frees
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a909ca1f68e178f54c5cc047ddff79d25b2c34c6 commit a909ca1f68e178f54c5cc047ddff79d25b2c34c6 Author: Carsten Haitzler (Rasterman) Date: Tue Jan 31 14:50:52 2017 +0900 evas draw context - reduce size and allocations and frees so a little perf fun shows malloc/free/realloc/etc. are, combined a reasonable overhead. this reduced malloc overhead for draw contexts so whne we duplicate them or create new ones, we re-use a small cache of 8 of them to avoid re-allocation. just take the first one from the list as it really is that simple. mempool would not have helped more here and cost more overhead. @optimize --- src/bin/evas/evas_cserve2_scale.c | 1 - src/lib/evas/common/evas_draw.h| 1 - src/lib/evas/common/evas_draw_main.c | 117 - src/lib/evas/filters/evas_filter_utils.c | 1 - src/lib/evas/include/evas_common_private.h | 55 +++--- 5 files changed, 107 insertions(+), 68 deletions(-) diff --git a/src/bin/evas/evas_cserve2_scale.c b/src/bin/evas/evas_cserve2_scale.c index bf6e940..4a877d8 100644 --- a/src/bin/evas/evas_cserve2_scale.c +++ b/src/bin/evas/evas_cserve2_scale.c @@ -47,7 +47,6 @@ cserve2_rgba_image_scale_do(void *src_data, int src_full_w, int src_full_h, dst.flags = RGBA_IMAGE_NOTHING; memset(&ct, 0, sizeof(ct)); - ct.sli.h = 1; ct.render_op = _EVAS_RENDER_COPY; if (smooth) diff --git a/src/lib/evas/common/evas_draw.h b/src/lib/evas/common/evas_draw.h index 374b2c7..6323e8d 100644 --- a/src/lib/evas/common/evas_draw.h +++ b/src/lib/evas/common/evas_draw.h @@ -33,7 +33,6 @@ EAPI void evas_common_draw_context_apply_clean_cutouts (Cutout EAPI void evas_common_draw_context_set_anti_alias (RGBA_Draw_Context *dc, unsigned char aa); EAPI void evas_common_draw_context_set_color_interpolation (RGBA_Draw_Context *dc, int color_space); EAPI void evas_common_draw_context_set_render_op (RGBA_Draw_Context *dc, int op); -EAPI void evas_common_draw_context_set_sli (RGBA_Draw_Context *dc, int y, int h); EAPI void evas_common_draw_context_target_set (RGBA_Draw_Context *dc, int x, int y, int w, int h); #endif /* _EVAS_DRAW_H */ diff --git a/src/lib/evas/common/evas_draw_main.c b/src/lib/evas/common/evas_draw_main.c index 60ab694..6a7c0f7 100644 --- a/src/lib/evas/common/evas_draw_main.c +++ b/src/lib/evas/common/evas_draw_main.c @@ -18,13 +18,14 @@ evas_common_draw_context_cutouts_dup(Cutout_Rects *rects2, const Cutout_Rects *r rects2->active = rects->active; rects2->max = rects->active; rects2->last_add = rects->last_add; - rects2->rects = NULL; if (rects2->max > 0) { const size_t sz = sizeof(Cutout_Rect) * rects2->max; rects2->rects = malloc(sz); memcpy(rects2->rects, rects->rects, sz); +return; } + else rects2->rects = NULL; } EAPI void @@ -59,12 +60,73 @@ evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx) } static int _init_count = 0; +static int _ctxt_spares_count = 0; +static Eina_List *_ctxt_spares = NULL; +static SLK(_ctx_spares_lock); + +static void +_evas_common_draw_context_real_free(RGBA_Draw_Context *dc) +{ +#ifdef HAVE_PIXMAN +# if defined(PIXMAN_FONT) || defined(PIXMAN_RECT) || defined(PIXMAN_LINE) || defined(PIXMAN_POLY) + if (dc->col.pixman_color_image) + pixman_image_unref(dc->col.pixman_color_image); +# endif +#endif + evas_common_draw_context_apply_clean_cutouts(&dc->cutout); + evas_common_draw_context_cutouts_real_free(dc->cache.rects); + free(dc); +} + +static void +_evas_common_draw_context_stash(RGBA_Draw_Context *dc) +{ + if (_ctxt_spares_count < 8) + { +#ifdef HAVE_PIXMAN +# if defined(PIXMAN_FONT) || defined(PIXMAN_RECT) || defined(PIXMAN_LINE) || defined(PIXMAN_POLY) +if (dc->col.pixman_color_image) + { + pixman_image_unref(dc->col.pixman_color_image); + dc->col.pixman_color_image = NULL; + } +# endif +#endif +evas_common_draw_context_apply_clean_cutouts(&dc->cutout); +evas_common_draw_context_cutouts_real_free(dc->cache.rects); +SLKL(_ctx_spares_lock); +_ctxt_spares = eina_list_prepend(_ctxt_spares, dc); +_ctxt_spares_count++; +SLKU(_ctx_spares_lock); +return; + } + _evas_common_draw_context_real_free(dc); +} + +static RGBA_Draw_Context * +_evas_common_draw_context_find(void) +{ + RGBA_Draw_Context *dc; + + if (_ctxt_spares) + { +SLKL(_ctx_spares_lock); +dc = _ctxt_spares->data; +_ctxt_spares = eina_list_remove_list(_ctxt_spares, _ctxt_spares); +_ctxt_spares_count--; +SLKU(_ctx_spares_lock); +return dc; + } + dc = malloc(sizeof(
[EGIT] [core/efl] master 02/05: evlog - remove setting stack var to 0 until it is needed later
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b38c610c7e60cbdcb45fd6d27450e39e3a9c9dd1 commit b38c610c7e60cbdcb45fd6d27450e39e3a9c9dd1 Author: Carsten Haitzler (Rasterman) Date: Tue Jan 31 14:48:36 2017 +0900 evlog - remove setting stack var to 0 until it is needed later we set stack var to 0 even if evlog was off and thus didn't use it. this cleans up the evlog func a bit and also moves locking until later so it's locked for the minimum period to punt something into the log buffer. it's an improvement, but no bug fix. --- src/lib/eina/eina_evlog.c | 38 ++ 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/lib/eina/eina_evlog.c b/src/lib/eina/eina_evlog.c index 7fec809..359badb 100644 --- a/src/lib/eina/eina_evlog.c +++ b/src/lib/eina/eina_evlog.c @@ -131,35 +131,33 @@ eina_evlog(const char *event, void *obj, double srctime, const char *detail) int size; char *strings; double now; - unsigned short detail_offset = 0; - unsigned short event_size; + unsigned short detail_offset, event_size; if (!_evlog_go) return; - now = get_time(); - eina_spinlock_take(&_evlog_lock); - size = sizeof(Eina_Evlog_Item); + + now= get_time(); event_size = strlen(event) + 1; - size += event_size; + size = sizeof(Eina_Evlog_Item) + event_size; if (detail) { -detail_offset = size; -size += strlen(detail) + 1; +detail_offset = size; +size += strlen(detail) + 1; } + else detail_offset = 0; size = sizeof(double) * ((size + sizeof(double) - 1) / sizeof(double)); - strings = push_buf(buf, size); - item = (Eina_Evlog_Item *)strings; - item->tim = now; - item->srctim = srctime; - item->thread = (unsigned long long)pthread_self(); - item->obj = (unsigned long long)obj; - item->event_offset = sizeof(Eina_Evlog_Item); - item->detail_offset = detail_offset; - item->event_next = size; - - strcpy(strings + sizeof(Eina_Evlog_Item), event); + eina_spinlock_take(&_evlog_lock); + strings = push_buf(buf, size); + item = (Eina_Evlog_Item *)strings; + item->tim= now; + item->srctim = srctime; + item->thread = (unsigned long long)pthread_self(); + item->obj= (unsigned long long)obj; + item->event_offset = sizeof(Eina_Evlog_Item); + item->detail_offset = detail_offset; + item->event_next = size; + strcpy(strings + size, event); if (detail_offset > 0) strcpy(strings + detail_offset, detail); - eina_spinlock_release(&_evlog_lock); } --
[EGIT] [core/efl] master 05/05: eina log bt - make it an eaven easier copy & paste to get a bt now
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b44093c193ab3c563eaa955f57b98a21dbeaf3a7 commit b44093c193ab3c563eaa955f57b98a21dbeaf3a7 Author: Carsten Haitzler (Rasterman) Date: Tue Jan 31 19:30:41 2017 +0900 eina log bt - make it an eaven easier copy & paste to get a bt now just copy & paste into a terminal and hit enter. --- src/lib/eina/eina_log.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/eina/eina_log.c b/src/lib/eina/eina_log.c index 098abc1..21553b6 100644 --- a/src/lib/eina/eina_log.c +++ b/src/lib/eina/eina_log.c @@ -1366,11 +1366,11 @@ eina_log_domain_unregister_unlocked(int domain) # define DISPLAY_BACKTRACE(File, Level) \ if (EINA_UNLIKELY(Level <= _backtrace_level)) { \ fprintf(File, \ - "## Backtrace --- Run eina_btlog then paste this, then hit CTRL+D\n" \ - "## Use eina_btlog -n to remove color. Btlog makes it human-readable.\n" \ - "## Please provide the human readable log along with any bug reports.\n" \ - ); \ + "## Copy & Paste the below (until EOF) into a terminal, then hit Enter\n\n" \ + "eina_btlog << EOF\n"); \ EINA_BT(File); \ + fprintf(File, \ + "EOF\n\n"); \ } #else # define DISPLAY_BACKTRACE(File, Level) --
Re: [E-devel] Weekend project: distro-builder
Hi, It sounds like it would be really great to perhaps bring that into efler? Efler is a boostrapper and app discovery / install manager platform that has similar aims. It aims to have a 1 line install command that you can read more about here: http://bit.ly/efler Currently efler can bootstrap Arch/Manjaro and OSX - Ubuntu was next on my list. Upon a successful bootstrap you have efl and efler installed and you are handed over to the efler UI to pick other apps for your install pleasure :) Let me know what you think! Andrew On Tue, 31 Jan 2017 at 12:08 wrote: > Over the years, the dependency list for EFL has grown quite a bit. As a > results, it's often been a pain to build the whole thing from git as a > new developer (if you don't want to use your distro packages). > You have to figure out what to install, by finding which package > correspond to the libs described in the Requirements section of the > README[1]. Or to apt-get build-dep old dependencies based on the current > package. Or, you can try to follow the outdated docs on the wiki[2] > for your distro. > > I have tried updating those docs once[3] using a bare distro, in order > to make sure we have the full list of needed dependencies. > > What would be better would be to make sure the process I used to verify > the dependency list is reproductible, so that we could simply document > the dependencies for each distro. That's where distro-builder comes in: > https://github.com/anisse/distro-builder > > It's a relatively simple script that currently builds efl and > terminology on fedora 24/25, debian stretch and ubuntu 16.04/16.10. > > The final goal would be to have this script and the dependency files in > the efl tree, and running it regularly, possibly on CI. > > It could even help making sure the current cmake transition goes > smoothly on different distros :-) > > I'm looking forward to your feedback. > > Anisse > > [1] https://git.enlightenment.org/core/efl.git/tree/README?h=v1.18.4#n444 > [2] https://www.enlightenment.org/docs > [3] > https://git.enlightenment.org/website/www-content.git/commit/pages/distros/fedora-start.txt?id=a640068093a40797386716d500484ffc2b325fec > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- http://andywilliams.me http://ajwillia.ms -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Weekend project: distro-builder
Over the years, the dependency list for EFL has grown quite a bit. As a results, it's often been a pain to build the whole thing from git as a new developer (if you don't want to use your distro packages). You have to figure out what to install, by finding which package correspond to the libs described in the Requirements section of the README[1]. Or to apt-get build-dep old dependencies based on the current package. Or, you can try to follow the outdated docs on the wiki[2] for your distro. I have tried updating those docs once[3] using a bare distro, in order to make sure we have the full list of needed dependencies. What would be better would be to make sure the process I used to verify the dependency list is reproductible, so that we could simply document the dependencies for each distro. That's where distro-builder comes in: https://github.com/anisse/distro-builder It's a relatively simple script that currently builds efl and terminology on fedora 24/25, debian stretch and ubuntu 16.04/16.10. The final goal would be to have this script and the dependency files in the efl tree, and running it regularly, possibly on CI. It could even help making sure the current cmake transition goes smoothly on different distros :-) I'm looking forward to your feedback. Anisse [1] https://git.enlightenment.org/core/efl.git/tree/README?h=v1.18.4#n444 [2] https://www.enlightenment.org/docs [3] https://git.enlightenment.org/website/www-content.git/commit/pages/distros/fedora-start.txt?id=a640068093a40797386716d500484ffc2b325fec -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 01/01: edje_pick: implement fonts copy
rimmed pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3f92bfc45bae5f74b18ac98b989da4e7a14c1fd1 commit 3f92bfc45bae5f74b18ac98b989da4e7a14c1fd1 Author: Vyacheslav Reutskiy Date: Tue Jan 31 10:11:36 2017 +0200 edje_pick: implement fonts copy Previously this functional was miss. Edje_Pick was tried to copy fonts from data block "edje_source_fontmap" what always empty because edje_cc never fill it. This patch rework the fonts copy from input files. @fix --- src/bin/edje/edje_pick.c | 112 +++ 1 file changed, 55 insertions(+), 57 deletions(-) diff --git a/src/bin/edje/edje_pick.c b/src/bin/edje/edje_pick.c index c7d41f6..44c43b8 100644 --- a/src/bin/edje/edje_pick.c +++ b/src/bin/edje/edje_pick.c @@ -68,6 +68,7 @@ struct _Edje_Pick_File_Params Eina_List *samplelist; Eina_List *tonelist; Eina_List *vibrationlist; + Eina_List *fontlist; }; typedef struct _Edje_Pick_File_Params Edje_Pick_File_Params; @@ -92,6 +93,9 @@ typedef struct _Edje_Pick_Tone Edje_Pick_Tone; struct _Edje_Pick_Font { Edje_Font *f; + + void *data; /* Font data as take from source edj file */ + int size; /* data size */ Eina_Bool used; }; typedef struct _Edje_Pick_Font Edje_Pick_Font; @@ -100,11 +104,10 @@ struct _Edje_Pick { Eina_Bool v; /* Verbose */ Edje_Pick_File_Params *current_file; - Eina_List *fontlist; }; typedef struct _Edje_Pick Edje_Pick; -static Edje_Pick context = { EINA_FALSE, NULL, NULL }; +static Edje_Pick context = { EINA_FALSE, NULL }; #define VERBOSE(COMMAND) if (context.v) { COMMAND; } @@ -256,12 +259,13 @@ _edje_pick_cleanup(Eina_List *ifs, Edje_File *out_file, Edje_Pick_Status s) free(p); } - EINA_LIST_FREE(context.fontlist, ft) + EINA_LIST_FREE(p->fontlist, ft) { Edje_Font *st = ft->f; eina_stringshare_del(st->name); eina_stringshare_del(st->file); +free(ft->data); free(st); free(ft); } @@ -536,6 +540,7 @@ _edje_pick_output_prepare(Edje_File *o, Edje_File *edf, char *name) o->base_scale = edf->base_scale; o->collection = eina_hash_string_small_new(NULL); o->data = eina_hash_string_small_new(NULL); +o->fonts = eina_hash_string_small_new(NULL); /* Open output file */ o->ef = eet_open(name, EET_FILE_MODE_WRITE); @@ -1103,38 +1108,49 @@ _font_cmp(const void *d1, const void *d2) } static int -_Edje_Pick_Fonts_add(Edje_File *edf) +_Edje_Pick_Fonts_add(Edje_File *out_file, Edje_File *edf) { - Eet_Data_Descriptor *_font_list_edd = NULL; - Eet_Data_Descriptor *_font_edd; - Edje_Font_List *fl; + Eina_Iterator *it; Edje_Font *f; - Eina_List *l; + char buf[1024]; + + if (!edf->fonts) return -1; - _edje_data_font_list_desc_make(&_font_list_edd, &_font_edd); - fl = eet_data_read(edf->ef, _font_list_edd, "edje_source_fontmap"); + it = eina_hash_iterator_data_new(edf->fonts); + if (!it) return -1; - EINA_LIST_FOREACH(fl->list, l, f) + EINA_ITERATOR_FOREACH(it, f) { -if (!eina_list_search_unsorted(context.fontlist, - _font_cmp, f)) +if (!eina_list_search_unsorted(context.current_file->fontlist, _font_cmp, f)) + continue; +/* Add only fonts that are NOT regestered in our list */ +Edje_Pick_Font *ft = malloc(sizeof(*ft)); +Edje_Font *st = malloc(sizeof(*st)); +ft->size = 0; + +st->name = (char *) eina_stringshare_add(f->name); +st->file = (char *) eina_stringshare_add(f->file); + +snprintf(buf, sizeof(buf), "edje/fonts/%s", f->name); +VERBOSE(EINA_LOG_INFO("Trying to read <%s>\n", f->name)); +ft->data = eet_read(edf->ef, buf, &ft->size); +if (!ft->size) { - /* Add only fonts that are NOT regestered in our list */ - Edje_Pick_Font *ft = malloc(sizeof(*ft)); - Edje_Font *st = malloc(sizeof(*st)); - - st->name = (char *) eina_stringshare_add(f->name); - st->file = (char *) eina_stringshare_add(f->file); - - ft->f = st; - ft->used = EINA_TRUE; /* TODO: Fix this later */ - context.fontlist = eina_list_append(context.fontlist, ft); + eina_stringshare_del(st->name); + eina_stringshare_del(st->file); + free(st); + free(ft); + VERBOSE(EINA_LOG_INFO("Enable to read <%s>. Skip.\n", f->name)); + continue; } - } - free(fl); - eet_data_descriptor_free(_font_list_edd); - eet_data_descriptor_free(_font_edd); +ft->f = st; +ft->used = EINA_TRUE; /* TODO: Fix this later */ +context.current_file->fontlist = eina_list_append(context.current_file->fontlist, ft); +eina_hash_direct_add(out_file