[EGIT] [core/efl] master 01/01: eet - add new api to verify eet file against stored cert
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8669ab8a98ac36db6c228bcc1bb4688c25d1dccc commit 8669ab8a98ac36db6c228bcc1bb4688c25d1dccc Author: Carsten Haitzler (Rasterman) ras...@rasterman.com Date: Fri Nov 28 17:54:39 2014 +0900 eet - add new api to verify eet file against stored cert this api makes it far more obvious as to how to verify an eet file via the eet identify mechanisms that use x509 certificates to sign files. this is consistent with the api used to generate the key for sigining thus you can use the same certificate file to compare against for identify. @feature --- src/lib/eet/Eet.h | 20 +++ src/lib/eet/eet_lib.c | 148 ++ src/tests/eet/eet_suite.c | 3 + 3 files changed, 171 insertions(+) diff --git a/src/lib/eet/Eet.h b/src/lib/eet/Eet.h index b3451fa..de56b18 100644 --- a/src/lib/eet/Eet.h +++ b/src/lib/eet/Eet.h @@ -2063,6 +2063,26 @@ eet_identity_print(Eet_Key *key, FILE *out); /** + * Compare the identify certificate of an eet file against a stored one + * + * @param ef The file handle to check the identify of + * @param certificate_file The path to the certificate file + * @return EINA_TRUE if the certificates match, otherwise EINA_FALSE; + * + * The @p ef file handle mus be valid, and a signed file, otherwise + * checking will fail. The path to the certificate file must be a valid + * file path to a 'pem' format file (the same used for siging with + * eet_identity_open() as a certificate file). + * + * @warning You need to compile signature support in EET. + * @since 1.13 + * @ingroup Eet_Cipher_Group + */ +EAPI Eina_Bool +eet_identity_verify(Eet_File *ef, +const char *certificate_file); + +/** * Get the x509 der certificate associated with an Eet_File. Will return NULL * if the file is not signed. * diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c index daa6d3b..ed610f6 100644 --- a/src/lib/eet/eet_lib.c +++ b/src/lib/eet/eet_lib.c @@ -1676,6 +1676,154 @@ eet_mode_get(Eet_File *ef) return ef-mode; } +static const char *_b64_table = + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/; + +static Eina_Bool +_b64_is(char c) +{ + const char *p; + + if (!c) return EINA_FALSE; + p = strchr(_b64_table, c); + if (p = _b64_table) return EINA_TRUE; + return EINA_FALSE; +} + +static unsigned char +_b64_val(char c) +{ + const char *p = strchr(_b64_table, c); + if (p) return p - _b64_table; + return 0; +} + +static int +_b64_dec(unsigned char *dst, const char *src, int len) +{ + unsigned char *p = dst; + *dst = 0; + + if (!*src) return 0; + do + { +unsigned char a = _b64_val(src[0]); +unsigned char b = _b64_val(src[1]); +unsigned char c = _b64_val(src[2]); +unsigned char d = _b64_val(src[3]); + +*p++ = (a 2) | (b 4); +*p++ = (b 4) | (c 2); +*p++ = (c 6) | d; + +if (!_b64_is(src[1])) + { + p -= 2; + break; + } +else if (!_b64_is(src[2])) + { + p -= 2; + break; + } +else if (!_b64_is(src[3])) + { + p--; + break; + } +src += 4; +while (*src ((*src == 13) || (*src == 10))) src++; + } + while ((len -= 4)); + *p = 0; + return (int)(p - dst); +} + +static unsigned char * +_base64_dec(const char *file, int *size_ret) +{ + char buf[4096], *p, *end; + unsigned char *data = NULL; + Eina_Binbuf *binbuf; + FILE *f; + + f = fopen(file, rb); + if (!f) return NULL; + binbuf = eina_binbuf_new(); + if (!binbuf) + { +fclose(f); +return NULL; + } + while (fgets(buf, sizeof(buf) - 1, f)) + { +buf[sizeof(buf) - 1] = 0; +// check where first invalid char in a line is +for (p = buf; *p; p++) + { + // this is the first invalid char + if ((*p != '=') (!_b64_is(*p))) break; + } +end = p; +// go from line start to (but not including) first invalid char +if (((end - buf) 0) (((end - buf) % 4) == 0)) + { + unsigned char *tmp = malloc((end - buf + 4) * 2); + + if (tmp) + { + int len = _b64_dec(tmp, buf, end - buf); + char *str = malloc(end - buf + 1); + strncpy(str, buf, end - buf); + str[end - buf] = 0; + free(str); + eina_binbuf_append_length(binbuf, tmp, len); + free(tmp); + } + } + } + fclose(f); + // as long as data is less than a mb - we have a cert that is possibly ok + if (eina_binbuf_length_get(binbuf) (1 * 1024 * 1024)) + { +*size_ret = eina_binbuf_length_get(binbuf); +
Re: [E-devel] [EGIT] [core/efl] master 01/01: eet - add new api to verify eet file against stored cert
Yay! \o/ On 28/11/14 08:54, Carsten Haitzler wrote: raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8669ab8a98ac36db6c228bcc1bb4688c25d1dccc commit 8669ab8a98ac36db6c228bcc1bb4688c25d1dccc Author: Carsten Haitzler (Rasterman) ras...@rasterman.com Date: Fri Nov 28 17:54:39 2014 +0900 eet - add new api to verify eet file against stored cert this api makes it far more obvious as to how to verify an eet file via the eet identify mechanisms that use x509 certificates to sign files. this is consistent with the api used to generate the key for sigining thus you can use the same certificate file to compare against for identify. @feature --- src/lib/eet/Eet.h | 20 +++ src/lib/eet/eet_lib.c | 148 ++ src/tests/eet/eet_suite.c | 3 + 3 files changed, 171 insertions(+) diff --git a/src/lib/eet/Eet.h b/src/lib/eet/Eet.h index b3451fa..de56b18 100644 --- a/src/lib/eet/Eet.h +++ b/src/lib/eet/Eet.h @@ -2063,6 +2063,26 @@ eet_identity_print(Eet_Key *key, FILE *out); /** + * Compare the identify certificate of an eet file against a stored one + * + * @param ef The file handle to check the identify of + * @param certificate_file The path to the certificate file + * @return EINA_TRUE if the certificates match, otherwise EINA_FALSE; + * + * The @p ef file handle mus be valid, and a signed file, otherwise + * checking will fail. The path to the certificate file must be a valid + * file path to a 'pem' format file (the same used for siging with + * eet_identity_open() as a certificate file). + * + * @warning You need to compile signature support in EET. + * @since 1.13 + * @ingroup Eet_Cipher_Group + */ +EAPI Eina_Bool +eet_identity_verify(Eet_File *ef, +const char *certificate_file); + +/** * Get the x509 der certificate associated with an Eet_File. Will return NULL * if the file is not signed. * diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c index daa6d3b..ed610f6 100644 --- a/src/lib/eet/eet_lib.c +++ b/src/lib/eet/eet_lib.c @@ -1676,6 +1676,154 @@ eet_mode_get(Eet_File *ef) return ef-mode; } +static const char *_b64_table = + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/; + +static Eina_Bool +_b64_is(char c) +{ + const char *p; + + if (!c) return EINA_FALSE; + p = strchr(_b64_table, c); + if (p = _b64_table) return EINA_TRUE; + return EINA_FALSE; +} + +static unsigned char +_b64_val(char c) +{ + const char *p = strchr(_b64_table, c); + if (p) return p - _b64_table; + return 0; +} + +static int +_b64_dec(unsigned char *dst, const char *src, int len) +{ + unsigned char *p = dst; + *dst = 0; + + if (!*src) return 0; + do + { +unsigned char a = _b64_val(src[0]); +unsigned char b = _b64_val(src[1]); +unsigned char c = _b64_val(src[2]); +unsigned char d = _b64_val(src[3]); + +*p++ = (a 2) | (b 4); +*p++ = (b 4) | (c 2); +*p++ = (c 6) | d; + +if (!_b64_is(src[1])) + { + p -= 2; + break; + } +else if (!_b64_is(src[2])) + { + p -= 2; + break; + } +else if (!_b64_is(src[3])) + { + p--; + break; + } +src += 4; +while (*src ((*src == 13) || (*src == 10))) src++; + } + while ((len -= 4)); + *p = 0; + return (int)(p - dst); +} + +static unsigned char * +_base64_dec(const char *file, int *size_ret) +{ + char buf[4096], *p, *end; + unsigned char *data = NULL; + Eina_Binbuf *binbuf; + FILE *f; + + f = fopen(file, rb); + if (!f) return NULL; + binbuf = eina_binbuf_new(); + if (!binbuf) + { +fclose(f); +return NULL; + } + while (fgets(buf, sizeof(buf) - 1, f)) + { +buf[sizeof(buf) - 1] = 0; +// check where first invalid char in a line is +for (p = buf; *p; p++) + { + // this is the first invalid char + if ((*p != '=') (!_b64_is(*p))) break; + } +end = p; +// go from line start to (but not including) first invalid char +if (((end - buf) 0) (((end - buf) % 4) == 0)) + { + unsigned char *tmp = malloc((end - buf + 4) * 2); + + if (tmp) + { + int len = _b64_dec(tmp, buf, end - buf); + char *str = malloc(end - buf + 1); + strncpy(str, buf, end - buf); + str[end - buf] = 0; + free(str); + eina_binbuf_append_length(binbuf, tmp, len); + free(tmp); + } + }
Re: [E-devel] EO for non-EFL/Enlightenment use
On 25/11/14 21:58, Chris Marshall wrote: I would like to support perl5 roles which are also known as traits: http://scg.unibe.ch/archive/papers/Scha03aTraits.pdf From the positive experience with roles in perl5 modern OO developments, there is reason to believe that their support in EO might be equally useful and maybe an improvement over the mixin functionality. Thanks, will read into that. Will reply to the rest of your emails in a second. -- Tom. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] EO for non-EFL/Enlightenment use
On 25/11/14 20:39, Chris Marshall wrote: I was very interested to read the recent blog about the new Enlightenment Object model: https://phab.enlightenment.org/phame/live/1//post/yet_another_c_object_model_but_better/ and am interested in applying to to a non-Enlightenment application (the Perl Data Language, http://pdl.perl.org). The idea is to make the C-level computation able to mirror the higher-level perl OO abstraction to allow both improved performance and flexibility. Specifically, the same functionality should be available from the perl level as well as from the C level. I'm in the process of trying to build the current EFL release to get at the EO and Eolian for that work but not having much luck on this cygwin/win7 platform. Given that the EO framework is the foundation of the new Enlightenment implementation it would be nice if it were possible to build EO without requiring window/graphics/multimedia/... configuration and libraries. Suggestions for how best to proceed are welcome. I'll keep you posted on my progress in the case it is of interest or relevant to your further EO development. I don't think we have a way to build just Eo at the moment, however, since you are evaluating the solution, you can just hack around it at the moment, I think the easiest way is to open src/Makefile.am and remove all the includes that are not Eina.am or Eo.am. Possibly removing related stuff from configure.ac if they break. Let me know if you are having any issues and I'll happily help. -- Tom. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] EO for non-EFL/Enlightenment use
On 28/11/14 10:05, Tom Hacohen wrote: On 25/11/14 21:58, Chris Marshall wrote: I would like to support perl5 roles which are also known as traits: http://scg.unibe.ch/archive/papers/Scha03aTraits.pdf From the positive experience with roles in perl5 modern OO developments, there is reason to believe that their support in EO might be equally useful and maybe an improvement over the mixin functionality. Thanks, will read into that. Will reply to the rest of your emails in a second. I don't see how they are different from mixins with 0 associated data. They just seem like a more restricted version of mixins. -- Tom. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 01/01: evas/map: remove old comments.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=405d30617ab418c56cc858dc818ab9198ff5ee3b commit 405d30617ab418c56cc858dc818ab9198ff5ee3b Author: ChunEon Park her...@hermet.pe.kr Date: Fri Nov 28 20:33:49 2014 +0900 evas/map: remove old comments. It's been so long. even SLP is not a valid name anymore. No idea whether the problem still exist or not. If it is then it should be reported and fixed. --- src/lib/evas/canvas/evas_map.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_map.c b/src/lib/evas/canvas/evas_map.c index 90c236b..f0a18ac 100644 --- a/src/lib/evas/canvas/evas_map.c +++ b/src/lib/evas/canvas/evas_map.c @@ -40,8 +40,6 @@ _evas_map_calc_map_geometry(Evas_Object *eo_obj) Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); if (!obj) return; if (!obj-map-cur.map) return; - // WARN: Do not merge below code to SLP until it is fixed. - // It has an infinite loop bug. if (obj-map-prev.map) { if (obj-map-prev.map != obj-map-cur.map) --
[EGIT] [bindings/ruby/ffi-efl] master 01/01: Example code for list with buttons
thanatermesis pushed a commit to branch master. http://git.enlightenment.org/bindings/ruby/ffi-efl.git/commit/?id=63951e9d43b56080c118a517f002fc00243ff0ba commit 63951e9d43b56080c118a517f002fc00243ff0ba Author: Thanatermesis thanaterme...@gmail.com Date: Fri Nov 28 12:36:06 2014 +0100 Example code for list with buttons This example is very simple and plain but can be used as a demo of how to make a list with buttons --- test/test_list_buttons-native.rb | 71 1 file changed, 71 insertions(+) diff --git a/test/test_list_buttons-native.rb b/test/test_list_buttons-native.rb new file mode 100644 index 000..3e6607f --- /dev/null +++ b/test/test_list_buttons-native.rb @@ -0,0 +1,71 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +# This is a very simple, plain and no-dynamic code that shows how to make a simple list with buttons on it +# +# +require 'efl/elm/elm_win' +require 'efl/elm/elm_icon' +require 'efl/elm/elm_button' +require 'efl/elm/elm_object' +require 'efl/elm/elm_bg' +require 'efl/elm/elm_list' +# +include Efl::Native + +def bt_clicked data, object, event + puts button clicked +end + +def it_clicked data, object, event + puts item clicked +end + + +# +elm_init 0, FFI::MemoryPointer::NULL +# +win = elm_win_add(nil, list button, 0) +elm_win_title_set(win, ListButton) +elm_policy_set(0, 1) +elm_win_autodel_set(win, true) +# +bg = elm_bg_add(win) +elm_bg_color_set(bg, 255, 255, 255) +evas_object_size_hint_weight_set(bg, 1.0, 1.0) +elm_win_resize_object_add(win, bg) +evas_object_show(bg) + +li = elm_list_add(win) +evas_object_size_hint_weight_set(li, 1.0, 1.0) +elm_win_resize_object_add(win, li) +elm_list_mode_set(li, 1) +evas_object_show(li) + +#ic = elm_icon_add(win) +##snprintf(buf, sizeof(buf), %s/images/logo_small.png, elm_app_data_dir_get()) +#elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE) +#elm_image_file_set(ic, buf, NULL) +ic2 = elm_button_add(win) +elm_object_part_text_set(ic2, nil, Click me) +evas_object_smart_callback_add(ic2, clicked, method(:bt_clicked), nil) +evas_object_propagate_events_set(ic2, false) +elm_list_item_append(li, Hello, nil, ic2, method(:it_clicked), nil) +evas_object_show(ic2) + +ic3 = elm_button_add(win) +elm_object_part_text_set(ic3, nil, Click me) +evas_object_smart_callback_add(ic3, clicked, method(:bt_clicked), nil) +evas_object_propagate_events_set(ic3, false) + +# elm_list_item_append is what adds entries, you can add optionally evas objetcts like buttons or icons in the start and/or the end of each entry +elm_list_item_append(li, Hello, nil, ic3, method(:it_clicked), nil) +evas_object_show(ic3) + +# +evas_object_resize(win, 200, 300) +evas_object_show(win) +# +elm_run +elm_shutdown +# --
Re: [E-devel] EO for non-EFL/Enlightenment use
On Nov 28, 2014 4:12 AM, Tom Hacohen tom.haco...@samsung.com wrote: On 28/11/14 10:05, Tom Hacohen wrote: On 25/11/14 21:58, Chris Marshall wrote: I would like to support perl5 roles which are also known as traits: http://scg.unibe.ch/archive/papers/Scha03aTraits.pdf From the positive experience with roles in perl5 modern OO developments, there is reason to believe that their support in EO might be equally useful and maybe an improvement over the mixin functionality. Thanks, will read into that. Will reply to the rest of your emails in a second. I don't see how they are different from mixins with 0 associated data. They just seem like a more restricted version of mixins. The main difference is that they get composed into the class as they are applied so there is no further MRO or inheritance. This gives the good parts of multiple inheritance without the pathologies. -- Tom. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/enlightenment] master 01/02: clean up E ptrace detection and usage
q66 pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=db49bda75dd913934fbf78d2020c463b940bc26a commit db49bda75dd913934fbf78d2020c463b940bc26a Author: Daniel Kolesa d.kol...@samsung.com Date: Fri Nov 28 15:04:35 2014 + clean up E ptrace detection and usage --- src/bin/e_start_main.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c index 571477f..5b59aa3 100644 --- a/src/bin/e_start_main.c +++ b/src/bin/e_start_main.c @@ -8,9 +8,21 @@ #include sys/wait.h #include sys/stat.h #include sys/utsname.h + +/* the ptrace interface used here is really linux specific - + * FreeBSD, NetBSD and Mac OS X use slightly different ptrace API that should + * still be feasible to use (but not compatible), OpenBSD uses a really old + * version of the FreeBSD API that lacks required functionality we need, and + * Solaris doesn't have ptrace at all + */ #ifdef HAVE_SYS_PTRACE_H -# include sys/ptrace.h +# ifdef __linux__ +# include sys/ptrace.h +# else +# undef HAVE_SYS_PTRACE_H +# endif #endif + #include limits.h #include fcntl.h #ifdef HAVE_ALLOCA_H @@ -279,10 +291,7 @@ main(int argc, char **argv) pid_t cs_child = -1; Eina_Bool cs_use = EINA_FALSE; #endif -#if !defined(__OpenBSD__) !defined(__NetBSD__) !defined(__FreeBSD__) \ - !defined(__FreeBSD_kernel__) !(defined (__MACH__) defined (__APPLE__)) Eina_Bool restart = EINA_TRUE; -#endif unsetenv(NOTIFY_SOCKET); @@ -448,16 +457,7 @@ main(int argc, char **argv) if (valgrind_tool || valgrind_mode) really_know = EINA_TRUE; -#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || \ - defined(__FreeBSD_kernel__) || (defined (__MACH__) defined (__APPLE__)) - execv(args[0], args); -#endif - /* not run at the moment !! */ - -#if !defined(__OpenBSD__) !defined(__NetBSD__) !defined(__FreeBSD__) \ - !defined(__FreeBSD_kernel__) !(defined (__MACH__) defined (__APPLE__)) - #ifdef E_CSERVE if (getenv(E_CSERVE)) { @@ -676,7 +676,6 @@ main(int argc, char **argv) } } } -#endif #ifdef E_CSERVE if (cs_child 0) --
[EGIT] [core/enlightenment] master 02/02: detab e_start_main.c; spank spank spank
q66 pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=245d26c7c70eac83173da9f36836313e56512bbd commit 245d26c7c70eac83173da9f36836313e56512bbd Author: Daniel Kolesa d.kol...@samsung.com Date: Fri Nov 28 15:08:24 2014 + detab e_start_main.c; spank spank spank --- src/bin/e_start_main.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c index 5b59aa3..328cc4c 100644 --- a/src/bin/e_start_main.c +++ b/src/bin/e_start_main.c @@ -494,7 +494,7 @@ main(int argc, char **argv) Eina_Bool done = EINA_FALSE; Eina_Bool remember_sigill = EINA_FALSE; Eina_Bool remember_sigusr1 = EINA_FALSE; -Eina_Bool bad_kernel = EINA_FALSE; + Eina_Bool bad_kernel = EINA_FALSE; #ifdef HAVE_SYS_PTRACE_H if (!really_know) @@ -567,19 +567,19 @@ main(int argc, char **argv) /* And call gdb if available */ r = 0; - /* Check if patch to prevent ptrace to another process is present in the kernel. */ - { - int fd; - char c; +/* Check if patch to prevent ptrace to another process is present in the kernel. */ +{ + int fd; + char c; - fd = open(/proc/sys/kernel/yama/ptrace_scope, O_RDONLY); - if (fd != -1) -{ - if (read(fd, c, sizeof (c)) == sizeof (c) c != '0') - bad_kernel = EINA_TRUE; -} - close(fd); - } + fd = open(/proc/sys/kernel/yama/ptrace_scope, O_RDONLY); + if (fd != -1) + { +if (read(fd, c, sizeof (c)) == sizeof (c) c != '0') + bad_kernel = EINA_TRUE; + } + close(fd); +} if (home !bad_kernel) { @@ -589,7 +589,7 @@ main(int argc, char **argv) --pid=%i -batch -ex 'set logging file %s/.e-crashdump.txt' - -ex 'set logging on' + -ex 'set logging on' -ex 'thread apply all backtrace full' -ex detach /dev/null 21 /dev/zero, child, @@ -603,7 +603,7 @@ main(int argc, char **argv) %s/.e-crashdump.txt, home); -backtrace_str = strdup(buffer); + backtrace_str = strdup(buffer); r = WEXITSTATUS(r); } --
Re: [E-devel] EO for non-EFL/Enlightenment use
On Nov 28, 2014 2:41 AM, Adrien Nader adr...@notk.org wrote: Hi, On Tue, Nov 25, 2014, Chris Marshall wrote: I'm in the process of trying to build the current EFL release to get at the EO and Eolian for that work but not having much luck on this cygwin/win7 platform. Given that the EO framework is the foundation of the new Enlightenment implementation it would be nice if it were possible to build EO without requiring window/graphics/multimedia/... configuration and libraries. cygwin/win7 or windows? Cygwin platform running on a win7 PC. In other words: a cygwin application which is built with the cygwin headers which are posix, which is linked against and depends upon cygwin1.dll and which is therefore bound to the GPL, or an application built from cygwin but not tied to it otherwise? If it's a cygwin application, I have no idea what the overall status is. If it's merely an application built for Windows from Cygwin (i.e. cross-compilation), then EO works and I'm using it daily as part of an EFL application and in which case it would be good to try to have more logs. -- Adrien Nader -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] EO for non-EFL/Enlightenment use
On 28/11/14 13:36, Chris Marshall wrote: On Nov 28, 2014 4:12 AM, Tom Hacohen tom.haco...@samsung.com wrote: On 28/11/14 10:05, Tom Hacohen wrote: On 25/11/14 21:58, Chris Marshall wrote: I would like to support perl5 roles which are also known as traits: http://scg.unibe.ch/archive/papers/Scha03aTraits.pdf From the positive experience with roles in perl5 modern OO developments, there is reason to believe that their support in EO might be equally useful and maybe an improvement over the mixin functionality. Thanks, will read into that. Will reply to the rest of your emails in a second. I don't see how they are different from mixins with 0 associated data. They just seem like a more restricted version of mixins. The main difference is that they get composed into the class as they are applied so there is no further MRO or inheritance. This gives the good parts of multiple inheritance without the pathologies. OK, so they are a way to add methods to a class directly? Interesting. Though I don't see the benefits over mixins. They integrate well into the MRO and let you do a bit more (have data) that we actually use (though could refactor to avoid). -- Tom. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 01/01: ecore_evas_x: Fixed strange condition.
seoz pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cc89a541de241f50c35b51485cf44e0ce82d6551 commit cc89a541de241f50c35b51485cf44e0ce82d6551 Author: Hosang Kim hosang12@samsung.com Date: Sat Nov 29 01:10:39 2014 +0900 ecore_evas_x: Fixed strange condition. Summary: To satisfy this condition, ee-visible will be EINA_FALSE. But when iconify is requested, ee-visible is usually EINA_TRUE. @fix Reviewers: raster, Hermet, seoz Reviewed By: seoz Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1710 --- src/modules/ecore_evas/engines/x/ecore_evas_x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c index 17dfadb..8f74321 100644 --- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c +++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c @@ -3051,7 +3051,7 @@ _ecore_evas_x_iconified_set(Ecore_Evas *ee, Eina_Bool on) Ecore_Evas_Engine_Data_X11 *edata = ee-engine.data; if (ee-prop.iconified == on) return; - if (((ee-should_be_visible) (!ee-visible)) || (!ee-visible)) + if (((ee-should_be_visible) (!ee-visible)) || (ee-visible)) ee-prop.iconified = on; _ecore_evas_x_hints_update(ee); if (on) --
[E-devel] Problem with ecore_file_monitor
Hi all, I'm facing a stupid problem with ecore inotify, the bug is quite simple: if you set 2 different monitors on the same folder only the first callback will be called when something in the folder change. This is really annoying, I'm developing a classic 2 panes filemanager and I have 2 monitors for the 2 view, when they point to the same folder only one gets updated. The problem in the code is quite simple as you can see in ecore_file_monitor_inotify.c (around line 170), we infact search for just the first attached monitor using the _ecore_file_monitor_inotify_monitor_find() function. Here a simple patch that fix the problem for me: http://pastebin.com/e5gE7tNd What do you think? is the right solution? what about the other backend? thanks davemds -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [enlightenment/modules/edgar] master 01/01: Fix for recent changes in e19
davemds pushed a commit to branch master. http://git.enlightenment.org/enlightenment/modules/edgar.git/commit/?id=f36ea5a7c24fab678fe7fdde43e41484bf81a6a4 commit f36ea5a7c24fab678fe7fdde43e41484bf81a6a4 Author: Dave Andreoli d...@gurumeditation.it Date: Fri Nov 28 20:17:40 2014 +0100 Fix for recent changes in e19 --- src/e_mod_edgar.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/e_mod_edgar.c b/src/e_mod_edgar.c index d6234a0..1b83784 100644 --- a/src/e_mod_edgar.c +++ b/src/e_mod_edgar.c @@ -448,8 +448,7 @@ edgar_menu_info_cb(void *data, E_Menu *m, E_Menu_Item *mi) // dialog #ifdef HAVE_E19 - E_Comp *con; - con = e_manager_current_get()-comp; + Evas_Object *con = NULL; #else E_Container *con; con = e_container_current_get(e_manager_current_get()); @@ -459,18 +458,24 @@ edgar_menu_info_cb(void *data, E_Menu *m, E_Menu_Item *mi) e_dialog_title_set(dia, Gadget info); e_dialog_button_add(dia, Close, NULL, NULL, NULL); +#ifdef HAVE_E19 + Evas *evas = evas_object_evas_get(dia-win); +#else + Evas *evas = dia-win-evas; +#endif + // hbox - hbox = e_widget_list_add(dia-win-evas, 0, 1); + hbox = e_widget_list_add(evas, 0, 1); // icon - icon = edje_object_add(dia-win-evas); + icon = edje_object_add(evas); edgar_theme_object_set(gadget, icon, icon); - img = e_widget_image_add_from_object(dia-win-evas, icon, + img = e_widget_image_add_from_object(evas, icon, 70 * e_scale, 70 * e_scale); e_widget_list_object_append(hbox, img, 1, 0, 0.0); // text - tb = e_widget_textblock_add(dia-win-evas); + tb = e_widget_textblock_add(evas); e_widget_textblock_markup_set(tb, eina_strbuf_string_get(strbuf)); e_widget_size_min_set(tb, 250 * e_scale, 100 * e_scale); e_widget_list_object_append(hbox, tb, 1, 1, 0.0); --
[EGIT] [core/enlightenment] master 01/01: apply pointer warp effects immediately when instant warping
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f4b8e9563cf836d1abdea9598f9110f6a51300d4 commit f4b8e9563cf836d1abdea9598f9110f6a51300d4 Author: Mike Blumenkrantz zm...@osg.samsung.com Date: Fri Nov 28 15:06:47 2014 -0500 apply pointer warp effects immediately when instant warping fix T1462 --- src/bin/e_client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index e3168d0..8bf2fe5 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -4742,6 +4742,7 @@ e_client_pointer_warp_to_center_now(E_Client *ec) { ecore_evas_pointer_warp(ec-comp-ee, warp_to_x, warp_to_y); warp_to = 0; +_e_client_pointer_warp_to_center_timer(NULL); } else { --
[EGIT] [core/enlightenment] enlightenment-0.19 01/01: apply pointer warp effects immediately when instant warping
discomfitor pushed a commit to branch enlightenment-0.19. http://git.enlightenment.org/core/enlightenment.git/commit/?id=50f5b74cd8a7752d78eb1b1ff9e7fc23091fb2b9 commit 50f5b74cd8a7752d78eb1b1ff9e7fc23091fb2b9 Author: Mike Blumenkrantz zm...@osg.samsung.com Date: Fri Nov 28 15:06:47 2014 -0500 apply pointer warp effects immediately when instant warping fix T1462 --- src/bin/e_client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 376afd1..c462dc9 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -4753,6 +4753,7 @@ e_client_pointer_warp_to_center_now(E_Client *ec) { ecore_evas_pointer_warp(ec-comp-ee, warp_to_x, warp_to_y); warp_to = 0; +_e_client_pointer_warp_to_center_timer(NULL); } else { --
[EGIT] [tools/edi] master 01/03: Use an in-memory file for new elm_codes by default. This is overridden as before by calling elm_code_file_open which will free the previously set file on that elm_code
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=04dda232b6ca216ab8f6e99ed2752fad8a673d8f commit 04dda232b6ca216ab8f6e99ed2752fad8a673d8f Author: Andy Williams a...@andywilliams.me Date: Fri Nov 28 08:55:42 2014 + Use an in-memory file for new elm_codes by default. This is overridden as before by calling elm_code_file_open which will free the previously set file on that elm_code instance --- elm_code/bin/elm_code_test_main.c | 1 - elm_code/lib/Elm_Code.h| 9 + elm_code/lib/elm_code.c| 2 ++ elm_code/lib/elm_code_diff_widget.c| 2 -- elm_code/lib/elm_code_file.c | 3 +++ elm_code/tests/elm_code_file_test_memory.c | 11 --- elm_code/tests/elm_code_test_widget.c | 2 +- src/bin/edi_consolepanel.c | 1 - src/bin/edi_logpanel.c | 1 - 9 files changed, 15 insertions(+), 17 deletions(-) diff --git a/elm_code/bin/elm_code_test_main.c b/elm_code/bin/elm_code_test_main.c index 38c5ab0..698e411 100644 --- a/elm_code/bin/elm_code_test_main.c +++ b/elm_code/bin/elm_code_test_main.c @@ -38,7 +38,6 @@ _elm_code_test_welcome_setup(Evas_Object *parent) Evas_Object *widget; code = elm_code_create(); - elm_code_file_new(code); widget = elm_code_widget_add(parent, code); elm_code_widget_font_size_set(widget, 14); _append_line(code-file, Hello World, Elm Code!); diff --git a/elm_code/lib/Elm_Code.h b/elm_code/lib/Elm_Code.h index 30f323a..866ccc7 100644 --- a/elm_code/lib/Elm_Code.h +++ b/elm_code/lib/Elm_Code.h @@ -86,7 +86,7 @@ EAPI int elm_code_init(void); * * @return Elm Code's init counter value. * - * @see elm_code_init(). + * @see elm_code_init() * * @ingroup Init */ @@ -95,11 +95,12 @@ EAPI int elm_code_shutdown(void); /** * Create a new Elm Code instance * - * This method creates a new Elm Code instance which will need a - * backing file set for storage. + * This method creates a new Elm Code instance using an in-memory file for backing changes. + * A regular file can be set after creation if required. * Once an Elm Code has been created you can create widgets that render the content. * - * return an allocated Elm_Code that references the given file + * @return an allocated Elm_Code that references the given file + * @see elm_code_file_open() */ EAPI Elm_Code *elm_code_create(); diff --git a/elm_code/lib/elm_code.c b/elm_code/lib/elm_code.c index 1c04f53..9b895f5 100644 --- a/elm_code/lib/elm_code.c +++ b/elm_code/lib/elm_code.c @@ -72,6 +72,8 @@ elm_code_create() ret = calloc(1, sizeof(Elm_Code)); + // create an in-memory backing for this elm_code by default + elm_code_file_new(ret); return ret; } diff --git a/elm_code/lib/elm_code_diff_widget.c b/elm_code/lib/elm_code_diff_widget.c index e833f85..7e577ed 100644 --- a/elm_code/lib/elm_code_diff_widget.c +++ b/elm_code/lib/elm_code_diff_widget.c @@ -94,7 +94,6 @@ EAPI Evas_Object *elm_code_diff_widget_add(Evas_Object *parent, Elm_Code *code) // left side of diff wcode1 = elm_code_create(); - elm_code_file_new(wcode1); widget_left = elm_code_widget_add(parent, wcode1); evas_object_size_hint_weight_set(widget_left, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -105,7 +104,6 @@ EAPI Evas_Object *elm_code_diff_widget_add(Evas_Object *parent, Elm_Code *code) // right side of diff wcode2 = elm_code_create(); - elm_code_file_new(wcode2); widget_right = elm_code_widget_add(parent, wcode2); evas_object_size_hint_weight_set(widget_right, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); diff --git a/elm_code/lib/elm_code_file.c b/elm_code/lib/elm_code_file.c index 9a431d0..6c1944e 100644 --- a/elm_code/lib/elm_code_file.c +++ b/elm_code/lib/elm_code_file.c @@ -53,6 +53,9 @@ EAPI Elm_Code_File *elm_code_file_new(Elm_Code *code) { Elm_Code_File *ret; + if (code-file) + elm_code_file_free(code-file); + ret = calloc(1, sizeof(Elm_Code_File)); code-file = ret; ret-parent = code; diff --git a/elm_code/tests/elm_code_file_test_memory.c b/elm_code/tests/elm_code_file_test_memory.c index ab7c063..cf4de29 100644 --- a/elm_code/tests/elm_code_file_test_memory.c +++ b/elm_code/tests/elm_code_file_test_memory.c @@ -6,16 +6,14 @@ START_TEST (elm_code_file_memory_lines) { - Elm_Code_File *file; Elm_Code *code; code = elm_code_create(); - file = elm_code_file_new(code); - ck_assert_uint_eq(0, elm_code_file_lines_get(file)); + ck_assert_uint_eq(0, elm_code_file_lines_get(code-file)); - elm_code_file_line_append(file, a line, 6); + elm_code_file_line_append(code-file, a line, 6); - ck_assert_uint_eq(1, elm_code_file_lines_get(file)); + ck_assert_uint_eq(1, elm_code_file_lines_get(code-file)); elm_code_free(code); } END_TEST @@ -27,8 +25,7 @@ START_TEST (elm_code_file_memory_tokens) Elm_Code *code; code =
[EGIT] [tools/edi] master 03/03: Merging in refactoring of elm_code file lookups and edi mime lookups. Elm_Code file no longer required for elm_code to function (in memory is created automatically).
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=896452e55917321f310993b6cce2ac43ac4eef1b commit 896452e55917321f310993b6cce2ac43ac4eef1b Merge: c9c2b59 2538f6c Author: Andy Williams a...@andywilliams.me Date: Fri Nov 28 23:53:23 2014 + Merging in refactoring of elm_code file lookups and edi mime lookups. Elm_Code file no longer required for elm_code to function (in memory is created automatically). elm_code/bin/elm_code_test_main.c | 1 - elm_code/lib/Elm_Code.h| 9 +-- elm_code/lib/elm_code.c| 2 + elm_code/lib/elm_code_diff_widget.c| 2 - elm_code/lib/elm_code_file.c | 3 + elm_code/tests/elm_code_file_test_memory.c | 11 ++-- elm_code/tests/elm_code_test_widget.c | 2 +- src/bin/Makefile.am| 1 + src/bin/edi_consolepanel.c | 1 - src/bin/edi_content_provider.c | 89 ++ src/bin/edi_content_provider.h | 70 +++ src/bin/edi_logpanel.c | 1 - src/bin/mainview/edi_mainview.c| 78 +- src/tests/Makefile.am | 7 ++- src/tests/edi_suite.c | 3 +- src/tests/edi_suite.h | 1 + src/tests/edi_test_content_provider.c | 36 17 files changed, 234 insertions(+), 83 deletions(-) --
[EGIT] [tools/edi] master 02/03: Refactor mime type lookup and UI creation code to use a content_provider registry.
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=2538f6cf900b58ee75a745c2327e24df84c71414 commit 2538f6cf900b58ee75a745c2327e24df84c71414 Author: Andy Williams a...@andywilliams.me Date: Fri Nov 28 23:34:36 2014 + Refactor mime type lookup and UI creation code to use a content_provider registry. This is static at the moment but could be made dynamic to allow code to hook in new views --- src/bin/Makefile.am | 1 + src/bin/edi_content_provider.c| 89 +++ src/bin/edi_content_provider.h| 70 +++ src/bin/mainview/edi_mainview.c | 78 ++ src/tests/Makefile.am | 7 ++- src/tests/edi_suite.c | 3 +- src/tests/edi_suite.h | 1 + src/tests/edi_test_content_provider.c | 36 ++ 8 files changed, 219 insertions(+), 66 deletions(-) diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index 35bc17f..043e645 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -14,6 +14,7 @@ AM_CPPFLAGS = -DPACKAGE_DATA_DIR=\$(datadir)/$(PACKAGE)\ \ edi_SOURCES = \ editor/edi_editor_search.c \ editor/edi_editor.c \ +edi_content_provider.c \ welcome/edi_welcome.c \ edi_filepanel.c \ edi_logpanel.c \ diff --git a/src/bin/edi_content_provider.c b/src/bin/edi_content_provider.c new file mode 100644 index 000..80025ba --- /dev/null +++ b/src/bin/edi_content_provider.c @@ -0,0 +1,89 @@ +#ifdef HAVE_CONFIG_H +# include config.h +#endif + +#include Evas.h +#include Elm_Code.h + +#include edi_content_provider.h +#include editor/edi_editor.h + +#include edi_private.h + +// TODO move out to edi_content.c ot similar just like the editor type +// (and the Evas include) + +static Evas_Object * +_edi_content_provider_image_add(Evas_Object *parent, Edi_Mainview_Item *item) +{ + Evas_Object *img, *scroll; + + scroll = elm_scroller_add(parent); + evas_object_size_hint_weight_set(scroll, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(scroll, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(scroll); + img = elm_image_add(scroll); + elm_image_file_set(img, item-path, NULL); + elm_image_no_scale_set(img, EINA_TRUE); + elm_object_content_set(scroll, img); + evas_object_show(img); + + return scroll; +} + +static Evas_Object * +_edi_content_provider_diff_add(Evas_Object *parent, Edi_Mainview_Item *item) +{ + Elm_Code *code; + Evas_Object *diff; + + code = elm_code_create(); + elm_code_file_open(code, item-path); + diff = elm_code_diff_widget_add(parent, code); + elm_code_diff_widget_font_size_set(diff, 12); + + return diff; +} + +static Edi_Content_Provider _edi_content_provider_registry[] = +{ + {text, EINA_TRUE, EINA_TRUE, edi_editor_add}, + {image, EINA_FALSE, EINA_FALSE, _edi_content_provider_image_add}, + {diff, EINA_TRUE, EINA_FALSE, _edi_content_provider_diff_add}, + + {NULL, EINA_FALSE, EINA_FALSE, NULL} +}; + +EAPI Edi_Content_Provider *edi_content_provider_for_mime_get(const char *mime) +{ + char *id; + + if (!strcasecmp(mime, text/plain) || !strcasecmp(mime, application/x-shellscript)) + id = text; + else if (!strcasecmp(mime, text/x-chdr) || !strcasecmp(mime, text/x-csrc)) + id = text; // TODO make a code view + else if (!strncasecmp(mime, image/, 6)) + id = image; + else if (!strcasecmp(mime, text/x-diff) || !strcasecmp(mime, text/x-patch)) + id = diff; + else + return NULL; + + return edi_content_provider_for_id_get(id); +} + +EAPI Edi_Content_Provider *edi_content_provider_for_id_get(const char *id) +{ + Edi_Content_Provider *provider; + + provider = _edi_content_provider_registry; + while (provider != NULL provider-id != NULL) + { +if (!strncmp(id, provider-id, strlen(provider-id))) + return provider; + +provider++; + } + + return NULL; +} diff --git a/src/bin/edi_content_provider.h b/src/bin/edi_content_provider.h new file mode 100644 index 000..4dbba7b --- /dev/null +++ b/src/bin/edi_content_provider.h @@ -0,0 +1,70 @@ +#ifndef EDI_CONTENT_PROVIDER_H_ +# define EDI_CONTENT_PROVIDER_H_ + +#include Evas.h + +#include mainview/edi_mainview_item.h + +#ifdef __cplusplus +extern C { +#endif + +/** + * @file + * @brief These routines are used for managing information about supported content. + */ + +typedef struct _Edi_Content_Provider +{ + const char *id; + + Eina_Bool is_text; + Eina_Bool is_editable; + + Evas_Object *(*content_ui_add)(Evas_Object *parent, Edi_Mainview_Item *item); +} Edi_Content_Provider; + +/** + * @brief Lookup information in content provider registry. + * @defgroup Lookup + * + * @{ + * + * Looking up content providers based on mime or id etc. + * + */ + +/** + * Look up a content provider based on a mime type. + * + * @param mime the mime type of a file you wish to get a content
Re: [E-devel] EO for non-EFL/Enlightenment use
On Fri, Nov 28, 2014 at 11:01 AM, Tom Hacohen tom.haco...@samsung.com wrote: On 28/11/14 13:36, Chris Marshall wrote: On Nov 28, 2014 4:12 AM, Tom Hacohen tom.haco...@samsung.com wrote: On 28/11/14 10:05, Tom Hacohen wrote: On 25/11/14 21:58, Chris Marshall wrote: I would like to support perl5 roles which are also known as traits: http://scg.unibe.ch/archive/papers/Scha03aTraits.pdf From the positive experience with roles in perl5 modern OO developments, there is reason to believe that their support in EO might be equally useful and maybe an improvement over the mixin functionality. Thanks, will read into that. Will reply to the rest of your emails in a second. I don't see how they are different from mixins with 0 associated data. They just seem like a more restricted version of mixins. The main difference is that they get composed into the class as they are applied so there is no further MRO or inheritance. This gives the good parts of multiple inheritance without the pathologies. OK, so they are a way to add methods to a class directly? Interesting. Though I don't see the benefits over mixins. They integrate well into the MRO and let you do a bit more (have data) that we actually use (though could refactor to avoid). Here are a couple of pages that give some explanation of roles in perl5 and the comparison of roles versus interfaces, mixins, and traits in some other languages. http://search.cpan.org/~ether/Moose-2.1402/lib/Moose/Manual/Roles.pod http://radar.oreilly.com/2014/01/horizontal-reuse-an-alternative-to-inheritance.html For the purposes of the Perl Data Language, the use of roles, method modifiers (before, around, after other methods), together with the ability to apply roles to objects form the basis for the PDL3 JIT support in the works. --Chris -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/enlightenment] master 01/01: e - randr - stop saving config using XID - this is utterly WRONG
raster pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=70753a79037ee627f86036f2460ce6b9787440f4 commit 70753a79037ee627f86036f2460ce6b9787440f4 Author: Carsten Haitzler (Rasterman) ras...@rasterman.com Date: Wed Nov 26 19:17:02 2014 +0900 e - randr - stop saving config using XID - this is utterly WRONG so e was storing randr config using XIDs to match outputs etc. this is all kinds of wrong. XIDs are NOT STATIC. they change from xserver to xserver and from run to run. they MAY be the same. they may not. so this was just broken. use output name + edid as a big string (name.edid) as a way ofr identifying config for a specific combination of output plus monitor and to find/identify the corrent output+monitor to apply it to (of course missing edid gets replaced with ??? and missing output name is ??? too - i have never seen a missing output name so you get this at least). so this FIXES restore of screen mode on login for starters. this does nothing to fix the screen setup dialog in any way. there are separate issues there. this also breaks e_randr config compat so i bumped epoch so your old config is rejected. i don't see a sensible way of porting the config forward. --- src/bin/e_randr.c| 169 +++ src/bin/e_randr.h| 10 +- src/modules/conf_randr/e_smart_monitor.c | 8 +- src/modules/conf_randr/e_smart_randr.c | 4 +- 4 files changed, 119 insertions(+), 72 deletions(-) diff --git a/src/bin/e_randr.c b/src/bin/e_randr.c index b668f9d..3b88ab9 100644 --- a/src/bin/e_randr.c +++ b/src/bin/e_randr.c @@ -15,8 +15,8 @@ static Eina_Bool _e_randr_config_cb_timer(void *data); static void _e_randr_load(void); static void _e_randr_apply(void); static void _e_randr_output_mode_update(E_Randr_Output *cfg); -static E_Config_Randr_Output *_e_randr_config_output_new(Ecore_X_Window root, unsigned int id); -static E_Config_Randr_Output *_e_randr_config_output_find(Ecore_X_Randr_Output output); +static E_Config_Randr_Output *_e_randr_config_output_new(void); +static E_Config_Randr_Output *_e_randr_config_output_find(E_Randr_Output *output); static E_Randr_Crtc *_e_randr_crtc_find(Ecore_X_Randr_Crtc xid); static E_Randr_Output*_e_randr_output_find(Ecore_X_Randr_Output xid); static E_Randr_Crtc *_e_randr_output_crtc_find(E_Randr_Output *output); @@ -34,7 +34,7 @@ static void _e_randr_crtc_from_outputs_set(E_Randr_Crtc *crtc); static Eina_Bool _e_randr_lid_update(void); static Eina_Bool _e_randr_output_mode_valid(Ecore_X_Randr_Mode mode, Ecore_X_Randr_Mode *modes, int nmodes); static void _e_randr_output_active_set(E_Randr_Output *output, Eina_Bool connected); -static int _e_randr_config_output_cmp(const void *a, const void *b); +//static int _e_randr_config_output_cmp(const void *a, const void *b); static char *_e_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output); /* local variables */ @@ -189,8 +189,8 @@ _e_randr_config_load(void) #undef D #define T E_Config_Randr_Output #define D _e_randr_output_edd - E_CONFIG_VAL(D, T, xid, UINT); - E_CONFIG_VAL(D, T, crtc, UINT); + E_CONFIG_VAL(D, T, name, STR); + E_CONFIG_VAL(D, T, edid, STR); E_CONFIG_VAL(D, T, orient, UINT); E_CONFIG_VAL(D, T, geo.x, INT); E_CONFIG_VAL(D, T, geo.y, INT); @@ -272,7 +272,9 @@ _e_randr_config_load(void) e_randr_config_save(); if ((do_restore) (e_randr_cfg-restore)) - _e_randr_apply(); + { +_e_randr_apply(); + } return EINA_TRUE; } @@ -339,6 +341,7 @@ _e_randr_free(void) EINA_LIST_FREE(e_randr-outputs, output) { free(output-name); +free(output-edid); free(output); } @@ -353,6 +356,36 @@ _e_randr_config_cb_timer(void *data) return EINA_FALSE; } +static char * +_e_randr_output_edid_string_get(Ecore_X_Window root, Ecore_X_Randr_Output output) +{ + unsigned char *edid = NULL; + unsigned long edid_len = 0; + char *edid_str = NULL; + + edid = ecore_x_randr_output_edid_get(root, output, edid_len); + if (edid) + { +int k, kk; + +edid_str = malloc((edid_len * 2) + 1); +if (edid_str) + { + const char *hexch = 0123456789abcdef; + + for (kk = 0, k = 0; k edid_len; k++) + { + edid_str[kk] = hexch[(edid[k] 4) 0xf]; + edid_str[kk + 1] = hexch[ edid[k]0xf]; + kk += 2; + } + edid_str[kk] = 0; + } +free(edid); + } + return edid_str; +} + /* function to map X's settings with E's settings */ static void _e_randr_load(void) @@ -407,30 +440,30 @@ _e_randr_load(void) for (j = 0; j noutputs; j++) { -
[EGIT] [apps/rage] master 01/02: Delete current media from playlist
raster pushed a commit to branch master. http://git.enlightenment.org/apps/rage.git/commit/?id=05608eec3a7634b712576409f487d84f48de1b4a commit 05608eec3a7634b712576409f487d84f48de1b4a Author: Carsten Haitzler (Rasterman) ras...@rasterman.com Date: Sat Nov 29 10:47:12 2014 +0900 Delete current media from playlist Summary: So you have unorganized files, or pseudo-organized files, and you dump them into rage. A song or video comes up that you don't want to bother with, so you want to hit delete to not play it. This will be more useful later with a loop all feature, but I implemented it now because I often bump into this situation. Reviewers: etrunko, raster Projects: #rage Differential Revision: https://phab.enlightenment.org/D1486 * also fix mem leak in not freeing vid struct content --- src/bin/key.c | 4 src/bin/win.c | 35 +++ src/bin/win.h | 1 + 3 files changed, 40 insertions(+) diff --git a/src/bin/key.c b/src/bin/key.c index d18730a..7079c86 100644 --- a/src/bin/key.c +++ b/src/bin/key.c @@ -130,6 +130,10 @@ key_handle(Evas_Object *win, Evas_Event_Key_Down *ev) if (win_video_have_next(win)) win_video_last(win); else win_video_next(win); } + else if (!strcmp(ev-key, Delete)) + { +win_video_delete(win); + } else if ((!strcmp(ev-keyname, m)) || (!strcmp(ev-key, XF86AudioMute))) { diff --git a/src/bin/win.c b/src/bin/win.c index 1dc4f07..9904ef4 100644 --- a/src/bin/win.c +++ b/src/bin/win.c @@ -250,6 +250,41 @@ win_video_last(Evas_Object *win) win_list_sel_update(win); } +void +win_video_delete(Evas_Object *win) +{ + Inf *inf = evas_object_data_get(win, inf); + Eina_List *l, *l_next; + Winvid_Entry *vid; + + int direction = NULL; // -1 prev, 1 next + + if (!inf-file_list) return; + + // If we're able to delete something, do it, + // and decide on next/prev + if (win_video_have_next(win) || win_video_have_prev(win)) + { +EINA_LIST_FOREACH_SAFE(inf-file_list, l, l_next, vid) + { + if (l == inf-file_cur) + { + if (vid-file) eina_stringshare_del(vid-file); + if (vid-sub) eina_stringshare_del(vid-sub); + free(vid); + inf-file_list = eina_list_remove_list(inf-file_list, l); + direction = (l_next == NULL ? -1 : 1); + break; + } + } + } + + // Move to a direction and update playlist, which is confused + if (direction == -1) win_do_prev(win); + else if (direction == 1) win_do_next(win); + win_list_content_update(win); +} + Eina_Bool win_video_have_next(Evas_Object *win) { diff --git a/src/bin/win.h b/src/bin/win.h index 8c96245..23e4f16 100644 --- a/src/bin/win.h +++ b/src/bin/win.h @@ -37,6 +37,7 @@ void win_video_next(Evas_Object *win); void win_video_prev(Evas_Object *win); void win_video_first(Evas_Object *win); void win_video_last(Evas_Object *win); +void win_video_delete(Evas_Object *win); Eina_Bool win_video_have_next(Evas_Object *win); Eina_Bool win_video_have_prev(Evas_Object *win); Evas_Object *win_add(void); --
[EGIT] [apps/rage] master 01/01: rage - add missing include
raster pushed a commit to branch master. http://git.enlightenment.org/apps/rage.git/commit/?id=27f478403344dfa5765f6c03d00c2e5a6947a472 commit 27f478403344dfa5765f6c03d00c2e5a6947a472 Author: Carsten Haitzler (Rasterman) ras...@rasterman.com Date: Sat Nov 29 10:53:12 2014 +0900 rage - add missing include --- src/bin/key.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/key.c b/src/bin/key.c index 997ec81..7fab4c2 100644 --- a/src/bin/key.c +++ b/src/bin/key.c @@ -1,6 +1,7 @@ #include Elementary.h #include main.h #include win.h +#include winvid.h #include video.h #include key.h #include winlist.h --
[EGIT] [apps/rage] master 02/02: Keybind c to clear playlist
raster pushed a commit to branch master. http://git.enlightenment.org/apps/rage.git/commit/?id=873ed3c4b612c637e17eb282a9d8ec9cec3e66a7 commit 873ed3c4b612c637e17eb282a9d8ec9cec3e66a7 Author: Carsten Haitzler (Rasterman) ras...@rasterman.com Date: Sat Nov 29 10:47:40 2014 +0900 Keybind c to clear playlist Summary: It's somewhat annoying to keep restarting rage in order to manipulate the playlist. Having a keybind for clearing it goes a long way for usability. Test Plan: Add files. Hit c. Add more files. Skip around in the playlist. Clear. Add. Reviewers: etrunko, raster Projects: #rage Differential Revision: https://phab.enlightenment.org/D1484 * fix mem leak of vid content --- src/bin/key.c| 7 +++ src/bin/winvid.c | 29 + src/bin/winvid.h | 1 + 3 files changed, 37 insertions(+) diff --git a/src/bin/key.c b/src/bin/key.c index 7079c86..997ec81 100644 --- a/src/bin/key.c +++ b/src/bin/key.c @@ -110,6 +110,13 @@ key_handle(Evas_Object *win, Evas_Event_Key_Down *ev) video_stop(inf-vid); elm_layout_signal_emit(inf-lay, action,stop, rage); } + else if (!strcmp(ev-keyname, c)) + { +printf((c)lear!\n); +video_stop(inf-vid); +elm_layout_signal_emit(inf-lay, action,stop, rage); +win_video_free(win); + } else if ((!strcmp(ev-key, Prior)) || (!strcmp(ev-key, XF86AudioPrev))) { diff --git a/src/bin/winvid.c b/src/bin/winvid.c index e30a776..aa97b32 100644 --- a/src/bin/winvid.c +++ b/src/bin/winvid.c @@ -240,6 +240,35 @@ win_video_insert(Evas_Object *win, const char *file) } void +win_video_free(Evas_Object *win) +{ + Winvid_Entry *vid; + Inf *inf = evas_object_data_get(win, inf); + if (!inf-file_list) + { +printf(IEE, no file_list\n); +return; + } + + EINA_LIST_FREE(inf-file_list, vid) + { +printf([%p] Free %s\n, vid, vid-file); +if (vid-file) eina_stringshare_del(vid-file); +if (vid-sub) eina_stringshare_del(vid-sub); +free(vid); + } + + // Clean up inf state and reinit window + // to not confuse rage + inf-file_cur = NULL; + inf-vid = NULL; + win_video_init(win); + + // Refresh to get rid of playlist icons/preview videos + win_list_content_update(win); +} + +void win_video_goto(Evas_Object *win, Eina_List *l) { Inf *inf = evas_object_data_get(win, inf); diff --git a/src/bin/winvid.h b/src/bin/winvid.h index 9e0a804..f7f6e42 100644 --- a/src/bin/winvid.h +++ b/src/bin/winvid.h @@ -10,6 +10,7 @@ typedef struct _Winvid_Entry void win_video_init(Evas_Object *win); void win_video_file_list_set(Evas_Object *win, Eina_List *list); void win_video_insert(Evas_Object *win, const char *file); +void win_video_free(Evas_Object *win); void win_video_goto(Evas_Object *win, Eina_List *l); #endif --
[EGIT] [core/efl] master 01/01: evas - gl - fix warning for unused var in glx build
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8fcfae57d18510c2c283108a42d638e7513a9af8 commit 8fcfae57d18510c2c283108a42d638e7513a9af8 Author: Carsten Haitzler (Rasterman) ras...@rasterman.com Date: Sat Nov 29 12:07:33 2014 +0900 evas - gl - fix warning for unused var in glx build --- src/modules/evas/engines/gl_x11/evas_engine.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c index 5a36125..0ed2018 100644 --- a/src/modules/evas/engines/gl_x11/evas_engine.c +++ b/src/modules/evas/engines/gl_x11/evas_engine.c @@ -866,12 +866,14 @@ evgl_eng_pbuffer_surface_destroy(void *data, void *surface) // be shared with Evas. // FIXME: Avoid passing evgl_engine around like that. static void * -evgl_eng_gles1_surface_create(EVGL_Engine *evgl, void *data, +evgl_eng_gles1_surface_create(EVGL_Engine *evgl EINA_UNUSED, void *data, EVGL_Surface *evgl_sfc, Evas_GL_Config *cfg, int w, int h) { Render_Engine *re = data; +#ifdef GL_GLES Eina_Bool alpha = EINA_FALSE; +#endif int colordepth; Pixmap px; @@ -891,7 +893,9 @@ evgl_eng_gles1_surface_create(EVGL_Engine *evgl, void *data, /* Choose appropriate pixmap depth */ if (cfg-color_format == EVAS_GL_RGBA_) { +#ifdef GL_GLES alpha = EINA_TRUE; +#endif colordepth = 32; } else if (cfg-color_format == EVAS_GL_RGB_888) --
[EGIT] [core/elementary] master 01/01: elm config: add key bindings for elm_actionslider
raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=96c80e7162aaa43ae53e0080c2610bbdd9312292 commit 96c80e7162aaa43ae53e0080c2610bbdd9312292 Author: Lukasz Stanislawski l.stanisl...@samsung.com Date: Sat Nov 29 15:31:25 2014 +0900 elm config: add key bindings for elm_actionslider Allow changing value of actionslider with keyboard. Make actionslider focusable widget. @feature Conflicts: config/default/base.src.in config/mobile/base.src.in config/standard/base.src.in --- config/default/base.src.in | 2 +- config/mobile/base.src.in | 2 +- config/standard/base.src.in | 2 +- src/lib/elm_config.c| 117 +++- src/lib/elm_priv.h | 3 +- 5 files changed, 24 insertions(+), 102 deletions(-) diff --git a/config/default/base.src.in b/config/default/base.src.in index 0f4fcb3..64b2783 100644 --- a/config/default/base.src.in +++ b/config/default/base.src.in @@ -1,5 +1,5 @@ group Elm_Config struct { - value config_version int: 65539; + value config_version int: 131073; value engine string: ; value vsync uchar: 0; value thumbscroll_enable uchar: 1; diff --git a/config/mobile/base.src.in b/config/mobile/base.src.in index 6a7f665..ff66243 100644 --- a/config/mobile/base.src.in +++ b/config/mobile/base.src.in @@ -1,5 +1,5 @@ group Elm_Config struct { - value config_version int: 65539; + value config_version int: 131073; value engine string: ; value vsync uchar: 0; value thumbscroll_enable uchar: 1; diff --git a/config/standard/base.src.in b/config/standard/base.src.in index 91656a0..7df9437 100644 --- a/config/standard/base.src.in +++ b/config/standard/base.src.in @@ -1,5 +1,5 @@ group Elm_Config struct { - value config_version int: 65539; + value config_version int: 131073; value engine string: ; value vsync uchar: 0; value thumbscroll_enable uchar: 0; diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c index e4b72da..661aaf8 100644 --- a/src/lib/elm_config.c +++ b/src/lib/elm_config.c @@ -1477,19 +1477,18 @@ _config_load(void) _elm_config = _config_user_load(); if (_elm_config) { -if (_elm_config-config_version ELM_CONFIG_VERSION) - _config_update(); - -/* set the default value if the configuration was just added and the - * value is zero which means it was not supported before and invalid. */ -if (_elm_config-thumbscroll_min_friction == 0.0) - _elm_config-thumbscroll_min_friction = 0.5; -if (_elm_config-thumbscroll_friction_standard == 0.0) - _elm_config-thumbscroll_friction_standard = 1000.0; -if (_elm_config-thumbscroll_flick_distance_tolerance == 0) - _elm_config-thumbscroll_flick_distance_tolerance = 1000; - -return; +if ((_elm_config-config_version ELM_CONFIG_VERSION_EPOCH_OFFSET) ELM_CONFIG_EPOCH) + { + WRN(User's elementary config seems outdated and unusable. Fallback to load system config.); + _config_free(_elm_config); + _elm_config = NULL; + } +else + { + if (_elm_config-config_version ELM_CONFIG_VERSION) + _config_update(); + return; + } } /* no user config, fallback for system. No need to check version for @@ -1813,8 +1812,6 @@ static void _config_update(void) { Elm_Config *tcfg; - const char *s = NULL; - tcfg = _config_system_load(); if (!tcfg) { @@ -1829,89 +1826,13 @@ _config_update(void) #define COPYPTR(x) do {_elm_config-x = tcfg-x; tcfg-x = NULL; } while (0) #define COPYSTR(x) COPYPTR(x) - /* we also need to update for property changes in the root window - * if needed, but that will be dependent on new properties added - * with each version */ - - IFCFG(0x0003); - COPYVAL(longpress_timeout); - IFCFGEND; - - IFCFG(0x0004); -#define PREFS_IFACE_MODULE_STR prefsprefs_iface - if (!_elm_config-modules) - s = eina_stringshare_add(PREFS_IFACE_MODULE_STR); - else - { - if (!strstr(_elm_config-modules, PREFS_IFACE_MODULE_STR)) -s = eina_stringshare_printf -(%s:%s, _elm_config-modules, PREFS_IFACE_MODULE_STR); - } - if (s) - { - eina_stringshare_del(_elm_config-modules); - _elm_config-modules = s; - } - IFCFGEND; - - IFCFG(0x0005); - COPYVAL(magnifier_scale); - if (!_elm_config-bindings) - { - Elm_Config_Bindings_Widget *wb; - Eina_List *l; - - EINA_LIST_FOREACH(tcfg-bindings, l, wb) -{ - Elm_Config_Bindings_Widget *wb2; - - wb2 = calloc(1, sizeof(Elm_Config_Bindings_Widget)); - if (wb2) - { -Elm_Config_Binding_Key *kb; -Eina_List
[EGIT] [core/elementary] master 01/01: config: do not use elm_config from previous epoch.
raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=7380d2674a7f338b0b6a1140c135863256ffef18 commit 7380d2674a7f338b0b6a1140c135863256ffef18 Author: Lukasz Stanislawski l.stanisl...@samsung.com Date: Sat Nov 29 15:40:35 2014 +0900 config: do not use elm_config from previous epoch. Summary: This commit fixes elm_config version mismatch occuring after b8606d93. Config version in config source files has been set to proper values. Patch deletes also previous code used to update config from previous epoch. Current behavior when elm config is outdated: 1. if epoch is outdated - do not use user config - load system config instead. Leave it to user to recreate elm_config using elementary_config. Act like it was no config in user directory. 2. if generation is outdated and epoch is up-to-date - try to update user config. Reviewers: raster, seoz, z.kosinski Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D1223 Conflicts: config/default/base.src.in config/mobile/base.src.in config/standard/base.src.in --
[EGIT] [core/efl] master 01/01: Use intrinsics for scaling up instead of inline asm
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ac7d7c9cbed92f21aa4a7555c4fee701227559a8 commit ac7d7c9cbed92f21aa4a7555c4fee701227559a8 Author: Carsten Haitzler (Rasterman) ras...@rasterman.com Date: Sat Nov 29 15:50:03 2014 +0900 Use intrinsics for scaling up instead of inline asm Summary: Rewrite linline assembly in scaling func using NEON intrinsics. Reviewers: raster Differential Revision: https://phab.enlightenment.org/D1666 --- src/lib/evas/common/evas_scale_smooth.c | 3 ++ src/lib/evas/common/evas_scale_smooth_scaler_up.c | 66 --- 2 files changed, 50 insertions(+), 19 deletions(-) diff --git a/src/lib/evas/common/evas_scale_smooth.c b/src/lib/evas/common/evas_scale_smooth.c index b4b4db5..a1957f1 100644 --- a/src/lib/evas/common/evas_scale_smooth.c +++ b/src/lib/evas/common/evas_scale_smooth.c @@ -1,6 +1,9 @@ #include evas_common_private.h #include evas_scale_smooth.h #include evas_blend_private.h +#ifdef BUILD_NEON +#include arm_neon.h +#endif #define SCALE_CALC_X_POINTS(P, SW, DW, CX, CW) \ P = alloca((CW + 1) * sizeof (int)); \ diff --git a/src/lib/evas/common/evas_scale_smooth_scaler_up.c b/src/lib/evas/common/evas_scale_smooth_scaler_up.c index 3921d01..44bfbfa 100644 --- a/src/lib/evas/common/evas_scale_smooth_scaler_up.c +++ b/src/lib/evas/common/evas_scale_smooth_scaler_up.c @@ -173,9 +173,23 @@ pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) #elif defined SCALE_USING_NEON - FPU_NEON; - VDUP_NEON(d12, ay); - VMOV_I2R_NEON(q2, #255); + uint16x4_t ay_16x4; + uint16x4_t p0_16x4; + uint16x4_t p2_16x4; + uint16x8_t ax_16x8; + uint16x8_t p0_p2_16x8; + uint16x8_t p1_p3_16x8; + uint16x8_t x255_16x8; + uint32x2_t p0_p2_32x2; + uint32x2_t p1_p3_32x2; + uint32x2_t res_32x2; + uint8x8_t p0_p2_8x8; + uint8x8_t p1_p3_8x8; + uint8x8_t p2_8x8; + uint16x4_t temp_16x4; + + ay_16x4 = vdup_n_u16(ay); + x255_16x8 = vdupq_n_u16(0xff); #endif pbuf = buf; pbuf_end = buf + dst_clip_w; sxx = sxx0; @@ -217,22 +231,36 @@ #elif defined SCALE_USING_NEON if (p0 | p1 | p2 | p3) { - FPU_NEON; - VMOV_M2R_NEON(d8, p0); - VEOR_NEON(q0); - VMOV_M2R_NEON(d9, p2); - VMOV_M2R_NEON(d10, p1); - VEOR_NEON(q1); - VMOV_M2R_NEON(d11, p3); - VDUP_NEON(q3, ax); - VZIP_NEON(q4, q0); - VZIP_NEON(q5, q1); - VMOV_R2R_NEON(d9, d0); - VMOV_R2R_NEON(d11, d2); - INTERP_256_NEON(q3, q5, q4, q2); - INTERP_256_NEON(d12, d9, d8, d5); - VMOV_R2M_NEON(q4, d8, pbuf); - pbuf++; + ax_16x8 = vdupq_n_u16(ax); + + p0_p2_32x2 = vset_lane_u32(p0, p0_p2_32x2, 0); + p0_p2_32x2 = vset_lane_u32(p2, p0_p2_32x2, 1); + p1_p3_32x2 = vset_lane_u32(p1, p1_p3_32x2, 0); + p1_p3_32x2 = vset_lane_u32(p3, p1_p3_32x2, 1); + + p0_p2_8x8 = vreinterpret_u8_u32(p0_p2_32x2); + p1_p3_8x8 = vreinterpret_u8_u32(p1_p3_32x2); + p1_p3_16x8 = vmovl_u8(p1_p3_8x8); + p0_p2_16x8 = vmovl_u8(p0_p2_8x8); + + p1_p3_16x8 = vsubq_u16(p1_p3_16x8, p0_p2_16x8); + p1_p3_16x8 = vmulq_u16(p1_p3_16x8, ax_16x8); + p1_p3_16x8 = vshrq_n_u16(p1_p3_16x8, 8); + p1_p3_16x8 = vaddq_u16(p1_p3_16x8, p0_p2_16x8); + p1_p3_16x8 = vandq_u16(p1_p3_16x8, x255_16x8); + + p0_16x4 = vget_low_u16(p1_p3_16x8); + p2_16x4 = vget_high_u16(p1_p3_16x8); + + p2_16x4 = vsub_u16(p2_16x4, p0_16x4); + p2_16x4 = vmul_u16(p2_16x4, ay_16x4); + p2_16x4 = vshr_n_u16(p2_16x4, 8); + p2_16x4 = vadd_u16(p2_16x4, p0_16x4); + + p1_p3_16x8 = vcombine_u16(temp_16x4, p2_16x4); + p2_8x8 = vmovn_u16(p1_p3_16x8); + res_32x2 = vreinterpret_u32_u8(p2_8x8); + vst1_lane_u32(pbuf++, res_32x2, 1); } else *pbuf++ = p0; --
[EGIT] [core/elementary] master 01/01: Slider: Added APIs to set/get slider's indicator visibility mode.
raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=65240b5327e5ab1eb8f77835b4729444fe1f02df commit 65240b5327e5ab1eb8f77835b4729444fe1f02df Author: Anil Kumar Nahak ak.na...@samsung.com Date: Sat Nov 29 15:56:45 2014 +0900 Slider: Added APIs to set/get slider's indicator visibility mode. Summary: elm_config_slider_indicator_visible_mode_set elm_config_slider_indicator_visible_mode_get The patch will enable the slider's indicator to get visible always visible on focus visible never visible on slider value change Reviewers: raster, seoz Subscribers: sachin.dev Differential Revision: https://phab.enlightenment.org/D1558 --- config/default/base.src.in | 1 + config/mobile/base.src.in | 1 + config/standard/base.src.in | 1 + src/lib/elm_config.c| 26 +- src/lib/elm_config.h| 40 src/lib/elm_priv.h | 1 + src/lib/elm_slider.c| 36 ++-- 7 files changed, 95 insertions(+), 11 deletions(-) diff --git a/config/default/base.src.in b/config/default/base.src.in index 64b2783..35f9984 100644 --- a/config/default/base.src.in +++ b/config/default/base.src.in @@ -27,6 +27,7 @@ group Elm_Config struct { value scroll_smooth_future_time double: 0.0; value scroll_smooth_time_window double: 0.01; value focus_autoscroll_mode uchar: 0; + value slider_indicator_visible_mode int: 0; value scale double: 1.0; value bgpixmap int: 0; value compositing int: 1; diff --git a/config/mobile/base.src.in b/config/mobile/base.src.in index ff66243..4e4afd4 100644 --- a/config/mobile/base.src.in +++ b/config/mobile/base.src.in @@ -27,6 +27,7 @@ group Elm_Config struct { value scroll_smooth_future_time double: 0.0; value scroll_smooth_time_window double: 0.01; value focus_autoscroll_mode uchar: 0; + value slider_indicator_visible_mode int: 0; value scale double: 1.0; value bgpixmap int: 0; value compositing int: 1; diff --git a/config/standard/base.src.in b/config/standard/base.src.in index 7df9437..e55f879 100644 --- a/config/standard/base.src.in +++ b/config/standard/base.src.in @@ -27,6 +27,7 @@ group Elm_Config struct { value scroll_smooth_future_time double: 0.0; value scroll_smooth_time_window double: 0.01; value focus_autoscroll_mode uchar: 0; + value slider_indicator_visible_mode int: 0; value scale double: 1.0; value bgpixmap int: 0; value compositing int: 1; diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c index 661aaf8..5ddea1e 100644 --- a/src/lib/elm_config.c +++ b/src/lib/elm_config.c @@ -529,6 +529,7 @@ _desc_init(void) ELM_CONFIG_VAL(D, T, focus_highlight_clip_disable, T_UCHAR); ELM_CONFIG_VAL(D, T, focus_move_policy, T_UCHAR); ELM_CONFIG_VAL(D, T, focus_autoscroll_mode, T_UCHAR); + ELM_CONFIG_VAL(D, T, slider_indicator_visible_mode, T_INT); ELM_CONFIG_VAL(D, T, item_select_on_focus_disable, T_UCHAR); ELM_CONFIG_VAL(D, T, first_item_focus_on_first_focus_in, T_UCHAR); ELM_CONFIG_VAL(D, T, toolbar_shrink_mode, T_INT); @@ -1992,7 +1993,18 @@ _env_get(void) else _elm_config-focus_autoscroll_mode = ELM_FOCUS_AUTOSCROLL_MODE_SHOW; } - + s = getenv(ELM_SLIDER_INDICATOR_VISIBLE_MODE); + if (s) + { +if (!strcmp(s, ELM_SLIDER_INDICATOR_VISIBLE_MODE_DEFAULT)) + _elm_config-slider_indicator_visible_mode = ELM_SLIDER_INDICATOR_VISIBLE_MODE_DEFAULT; +else if (!strcmp(s, ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS)) + _elm_config-slider_indicator_visible_mode = ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS; +else if (!strcmp(s, ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS)) + _elm_config-slider_indicator_visible_mode = ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS; +else + _elm_config-slider_indicator_visible_mode = ELM_SLIDER_INDICATOR_VISIBLE_MODE_NONE; + } s = getenv(ELM_THEME); if (s) eina_stringshare_replace(_elm_config-theme, s); @@ -2957,6 +2969,18 @@ elm_config_focus_autoscroll_mode_get(void) } EAPI void +elm_config_slider_indicator_visible_mode_set(Elm_Slider_Indicator_Visible_Mode mode) +{ + _elm_config-slider_indicator_visible_mode = mode; +} + +EAPI Elm_Slider_Indicator_Visible_Mode +elm_config_slider_indicator_visible_mode_get(void) +{ +return _elm_config-slider_indicator_visible_mode; +} + +EAPI void elm_config_focus_autoscroll_mode_set(Elm_Focus_Autoscroll_Mode mode) { _elm_config-focus_autoscroll_mode = mode; diff --git a/src/lib/elm_config.h b/src/lib/elm_config.h index ae16b4d..7da1f58 100644 --- a/src/lib/elm_config.h +++ b/src/lib/elm_config.h @@ -595,6 +595,46 @@ EAPI Elm_Focus_Autoscroll_Mode elm_config_focus_autoscroll_mode_get(void); EAPI void elm_config_focus_autoscroll_mode_set(Elm_Focus_Autoscroll_Mode mode); /** + * Slider's
[EGIT] [apps/rage] master 01/01: rage - add un/fullscreen on double mouse click.
raster pushed a commit to branch master. http://git.enlightenment.org/apps/rage.git/commit/?id=9bd2dfbd46c1c9bd24582249f3340ad8e4ce370b commit 9bd2dfbd46c1c9bd24582249f3340ad8e4ce370b Author: Amitesh Singh singh.amit...@gmail.com Date: Sat Nov 29 16:00:56 2014 +0900 rage - add un/fullscreen on double mouse click. Test Plan: rage - double mouse click Reviewers: etrunko, seoz, raster Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D1430 --- src/bin/win.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/bin/win.c b/src/bin/win.c index 9904ef4..017c752 100644 --- a/src/bin/win.c +++ b/src/bin/win.c @@ -73,6 +73,15 @@ _cb_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, evas_object_hide(inf-event2); } +static void +_cb_mouse_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) +{ + Evas_Event_Mouse_Down *m_info = event_info; + + if (m_info-flags EVAS_BUTTON_DOUBLE_CLICK) + elm_win_fullscreen_set(data, !elm_win_fullscreen_get(data)); +} + void win_do_play(Evas_Object *win) { @@ -357,6 +366,8 @@ win_add(void) _cb_mouse_move, win); evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_IN, _cb_mouse_move, win); + evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, + _cb_mouse_down, win); elm_object_part_content_set(inf-lay, rage.gesture, o); gesture_init(win, o); dnd_init(win, o); --
[EGIT] [core/elementary] master 01/01: elm_cnp: decode escaped ASCII-encoded URI for dnd
raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=6de31e88b5b299dd1063419b2131402dc789d53e commit 6de31e88b5b299dd1063419b2131402dc789d53e Author: Wonguk Jeong wonguk.je...@samsung.com Date: Sat Nov 29 16:06:50 2014 +0900 elm_cnp: decode escaped ASCII-encoded URI for dnd Summary: encoded URI is pasted in terminology on dnd with file which has blank in name ex. Test Blank.avi - Test%20Blank.avi Therefore, decode it when we extract file uris from uri list by using efreet. by the way, copy and paste code likely needs refactoring.. Reviewers: raster, cedric Subscribers: billiob, seoz Differential Revision: https://phab.enlightenment.org/D1384 --- src/lib/elm_cnp.c | 62 +++ 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c index 0e98d8e..dcc484b 100644 --- a/src/lib/elm_cnp.c +++ b/src/lib/elm_cnp.c @@ -2,6 +2,7 @@ # include elementary_config.h #endif #include Elementary.h +#include Efreet.h #include elm_priv.h #ifdef HAVE_MMAN_H # include sys/mman.h @@ -888,6 +889,7 @@ _x11_notify_handler_uri(X11_Cnp_Selection *sel, Ecore_X_Event_Selection_Notify * if (data-content == ECORE_X_SELECTION_CONTENT_FILES) { int i, len = 0; +Efreet_Uri **uri; cnp_debug(got a files list\n); files = notify-data; @@ -900,11 +902,29 @@ _x11_notify_handler_uri(X11_Cnp_Selection *sel, Ecore_X_Event_Selection_Notify * } stripstr = p = strdup(files-files[0]); */ + +uri = calloc(1, sizeof(*uri) * files-num_files); +if (!uri) return 0; + for (i = 0; i files-num_files ; i++) { - p = files-files[i]; - if ((strncmp(p, file:/, 6)) (p[0] != '/')) continue; - len += strlen(files-files[i]) + 1; + uri[i] = efreet_uri_decode(files-files[i]); + if (!uri[i]) + { + /* Is there any reason why we care of URI without scheme? */ + if (files-files[i][0] != '/') continue; + len += strlen(files-files[i]) + 1; + } + else + { + if (strcmp(uri[i]-protocol, file)) +{ + efreet_uri_free(uri[i]); + uri[i] = NULL; + continue; +} + len += strlen(uri[i]-path) + 1; + } } p = NULL; if (len 0) @@ -912,9 +932,11 @@ _x11_notify_handler_uri(X11_Cnp_Selection *sel, Ecore_X_Event_Selection_Notify * s = stripstr = malloc(len + 1); for (i = 0; i files-num_files ; i++) { - p = files-files[i]; - if (!strncmp(p, file:/, 6)) p += 5; - else if (p[0] != '/') continue; + if (uri[i]) +p = (char *)uri[i]-path; + else +p = files-files[i]; + len = strlen(p); strcpy(s, p); if (i (files-num_files - 1)) @@ -928,26 +950,40 @@ _x11_notify_handler_uri(X11_Cnp_Selection *sel, Ecore_X_Event_Selection_Notify * s[len] = 0; s += len; } + + if (uri[i]) +efreet_uri_free(uri[i]); } } +free(uri); } else { +Efreet_Uri *uri; +int len = 0; + p = (char *)data-data; -if ((!strncmp(p, file:/, 6)) || (p[0] == '/')) +uri = efreet_uri_decode(p); +if (!uri) + { + /* Is there any reason why we care of URI without scheme? */ + if (p[0] == '/') + len = data-length; + } +else + { + p = (char *)uri-path; + len = strlen(p); + } +if (len 0) { - int len = data-length; - if (!strncmp(p, file:/, 6)) - { - p += 5; - len -= 5; - } stripstr = malloc(len + 1); if (!stripstr) return 0; memcpy(stripstr, p, len); stripstr[len] = 0; } } + if (!stripstr) { cnp_debug(Couldn't find a file\n); --
[EGIT] [apps/eterm] master 01/01: doc typos: occurances, seperators and suppliment
raster pushed a commit to branch master. http://git.enlightenment.org/apps/eterm.git/commit/?id=898bd8e33a17066eb6d1f59308ff4a3989ac7d81 commit 898bd8e33a17066eb6d1f59308ff4a3989ac7d81 Author: Stéphane Aulery saul...@free.fr Date: Sat Nov 29 16:27:10 2014 +0900 doc typos: occurances, seperators and suppliment Maniphest Tasks: T1737 Differential Revision: https://phab.enlightenment.org/D1668 --- doc/Eterm.1.in | 4 ++-- doc/Eterm_reference.html | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/Eterm.1.in b/doc/Eterm.1.in index f55f580..fd81d17 100644 --- a/doc/Eterm.1.in +++ b/doc/Eterm.1.in @@ -694,7 +694,7 @@ By convention and default, Eterm themes should be stored under ~/.Eterm/themes/theme_name/ or @THEMEDIR@/theme_name. Eterm now supports the existence of a user configuration file as a -suppliment to the theme configuration file. The default name for this +supplement to the theme configuration file. The default name for this file is user.cfg, and it follows the exact same syntax as any other configuration file. It is searched for using the same algorithm used for the theme.cfg file, and any settings in the user.cfg will override @@ -2255,7 +2255,7 @@ to scroll down half a page. The default unit if not specified is Presents a dialog box into which the user may enter a search term. The default value is set to .IR str . -All occurances of the specified search string are highlighted in the +All occurrences of the specified search string are highlighted in the scrollback buffer, and Eterm jumps back to the most recent one. Searching again with the same keyword will clear the previous highlighting. diff --git a/doc/Eterm_reference.html b/doc/Eterm_reference.html index 072836e..842e354 100644 --- a/doc/Eterm_reference.html +++ b/doc/Eterm_reference.html @@ -50,7 +50,7 @@ Portions of this document were taken from the XTerm documentation./P /TR TR TD{ ... | ... }/TD - TDItems inclosed in braces and separated by pipes indicate that exactly one + TDItems enclosed in braces and separated by pipes indicate that exactly one of the items should be chosen./TD /TR /TABLE @@ -185,7 +185,7 @@ Portions of this document were taken from the XTerm documentation./P /TR TR TDTTESC BZ/B/TT/TD - TDObselete form of Send Device Attributes (DA), which is TTESC B[ c/B/TT/TD + TDObsolete form of Send Device Attributes (DA), which is TTESC B[ c/B/TT/TD /TR TR TDTTESC B[/B [ In/I ] B@/B/TT/TD @@ -1278,7 +1278,7 @@ are: TTB1/B/TT, TTBon/B/TT, TTByes/B/TT, or (of course) /TR TR TDTTESC B] 6 ; 72/B [ ;/B Istring/I ] BEL/TT/TD - TDSearch for and highlight any occurances of Istring/I in the + TDSearch for and highlight any occurrences of Istring/I in the scrollback buffer. /TD /TR --
[EGIT] [core/enlightenment] master 01/02: cpufreq: teach cpuinfo_{min, max}_freq as available frequencies
raster pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=6601c09f82e2496754a9e54ad6867cb77e38bf01 commit 6601c09f82e2496754a9e54ad6867cb77e38bf01 Author: Takeshi Banse tak...@laafc.net Date: Sat Nov 29 16:39:41 2014 +0900 cpufreq: teach cpuinfo_{min,max}_freq as available frequencies Summary: The intel_pstate scaling driver exposes the `scaling_cur_freq` since kernel 3.17 [*], it would be fine that the min and max frequencies are known even without the `scaling_available_frequencie`. This commit teaches to use the cpuinfo_{min,max}_freq as fallback in case the `scaling_available_frequencies` is not available within intel pstate. [*] https://lkml.org/lkml/2014/11/11/1060 Signed-off-by: Takeshi Banse tak...@laafc.net Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1686 --- src/modules/cpufreq/e_mod_main.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c index 7ffdcbe..ea09eea 100644 --- a/src/modules/cpufreq/e_mod_main.c +++ b/src/modules/cpufreq/e_mod_main.c @@ -301,7 +301,8 @@ _button_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_ } if ((cpufreq_config-status-frequencies) -(cpufreq_config-status-can_set_frequency)) +(cpufreq_config-status-can_set_frequency) +(!cpufreq_config-status-pstate)) { mo = e_menu_new(); cpufreq_config-menu_frequency = mo; @@ -766,6 +767,42 @@ _cpufreq_status_check_available(Cpu_Status *s) eina_list_count(s-frequencies), _cpufreq_cb_sort); } + else + do + { +#define CPUFREQ_SYSFSDIR /sys/devices/system/cpu/cpu0/cpufreq + f = fopen(CPUFREQ_SYSFSDIR /scaling_cur_freq, r); + if (!f) break; + fclose(f); + + f = fopen(CPUFREQ_SYSFSDIR /scaling_driver, r); + if (!f) break; + if (fgets(buf, sizeof(buf), f) == NULL) +{ + fclose(f); + break; +} + fclose(f); + if (strcmp(buf, intel_pstate\n)) break; + + if (s-frequencies) +{ + eina_list_free(s-frequencies); + s-frequencies = NULL; +} +#define CPUFREQ_ADDF(filename) \ + f = fopen(CPUFREQ_SYSFSDIR filename, r); \ + if (f) \ +{ \ + if (fgets(buf, sizeof(buf), f) != NULL) \ + s-frequencies = eina_list_append(s-frequencies, \ + (void *)(long)(atoi(buf))); \ + fclose(f); \ +} + CPUFREQ_ADDF(/cpuinfo_min_freq); + CPUFREQ_ADDF(/cpuinfo_max_freq); + } + while (0); f = fopen(/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors, r); if (f) --
[EGIT] [core/enlightenment] master 02/02: e randr - fix warning (signed vs unsigned cmp)
raster pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=48023b9ce37c0802234bd2c6ccae02d46046aa11 commit 48023b9ce37c0802234bd2c6ccae02d46046aa11 Author: Carsten Haitzler (Rasterman) ras...@rasterman.com Date: Sat Nov 29 16:44:41 2014 +0900 e randr - fix warning (signed vs unsigned cmp) --- src/bin/e_randr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e_randr.c b/src/bin/e_randr.c index 3b88ab9..a7b76ea 100644 --- a/src/bin/e_randr.c +++ b/src/bin/e_randr.c @@ -366,7 +366,7 @@ _e_randr_output_edid_string_get(Ecore_X_Window root, Ecore_X_Randr_Output output edid = ecore_x_randr_output_edid_get(root, output, edid_len); if (edid) { -int k, kk; +unsigned int k, kk; edid_str = malloc((edid_len * 2) + 1); if (edid_str) --