[EGIT] [core/efl] master 01/01: ecore_audio - save 232k of real RAM by dlopening depednecies

2016-07-31 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d27f5fcab78cabe880e9b3f2a62ac633d97ce381

commit d27f5fcab78cabe880e9b3f2a62ac633d97ce381
Author: Carsten Haitzler (Rasterman) 
Date:   Mon Aug 1 14:37:10 2016 +0900

ecore_audio - save 232k of real RAM by dlopening depednecies

so libpuls and libsndfile suck in dependencies. they suck in so much
that by the time linking is done we've written to about 230kb of
PRIVATE MEMORY as dirty pages in symbol tablesm global veriables etc.
etc. - this is just horrible. especially if an app never makes any
sound... it's just wasted memory. this stuff is invisible to normal
memory debug tools. so this begins to address things. please see
T4227. my numbers now put me at:

1780Kb total dirty writable mapped from library file pages. down from
2012Kb.

This fixes some memory bloat reported in the above ticket, but there
is more to fix for sure.

@fix
---
 configure.ac  |  19 ++-
 src/Makefile_Ecore_Audio.am   |   4 +-
 src/lib/ecore_audio/ecore_audio.c | 175 ++
 src/lib/ecore_audio/ecore_audio_obj_in_sndfile.c  |  19 ++-
 src/lib/ecore_audio/ecore_audio_obj_out_pulse.c   |  50 ---
 src/lib/ecore_audio/ecore_audio_obj_out_sndfile.c |  16 +-
 src/lib/ecore_audio/ecore_audio_private.h |  70 -
 7 files changed, 308 insertions(+), 45 deletions(-)

diff --git a/configure.ac b/configure.ac
index 630417a..aba9f8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3932,9 +3932,22 @@ EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [emile])
 
 EFL_ADD_LIBS([ECORE_AUDIO], [-lm])
 
-EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_alsa}], [ALSA], [alsa])
-EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_pulseaudio}], [PULSE], 
[libpulse])
-EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_sndfile}], [SNDFILE], [sndfile])
+if test "x${want_alsa}" = "xyes" ; then
+  PKG_CHECK_MODULES([ECORE_AUDIO_ALSA], [alsa])
+  AC_DEFINE([HAVE_ALSA], [1], [Alsa support])
+fi
+if test "x${want_pulseaudio}" = "xyes" ; then
+  PKG_CHECK_MODULES([ECORE_AUDIO_PULSE], [libpulse])
+  AC_DEFINE([HAVE_PULSE], [1], [Pulseaudio support])
+fi
+if test "x${want_sndfile}" = "xyes" ; then
+  PKG_CHECK_MODULES([ECORE_AUDIO_SNDFILE], [sndfile])
+  AC_DEFINE([HAVE_SNDFILE], [1], [Sndfile support])
+fi
+
+dnl EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO_ALSA], [${want_alsa}], [ALSA], [alsa])
+dnl EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO_PULSE], [${want_pulseaudio}], 
[PULSE], [libpulse])
+dnl EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO_SNDFILE], [${want_sndfile}], 
[SNDFILE], [sndfile])
 
 EFL_EVAL_PKGS([ECORE_AUDIO])
 
diff --git a/src/Makefile_Ecore_Audio.am b/src/Makefile_Ecore_Audio.am
index 99f1ba4..55c439f 100644
--- a/src/Makefile_Ecore_Audio.am
+++ b/src/Makefile_Ecore_Audio.am
@@ -53,8 +53,8 @@ lib/ecore_audio/ecore_audio_obj_out.c \
 lib/ecore_audio/ecore_audio_obj_in_tone.c \
 lib/ecore_audio/ecore_audio_private.h
 
-lib_ecore_audio_libecore_audio_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl 
@ECORE_AUDIO_CFLAGS@
-lib_ecore_audio_libecore_audio_la_LIBADD = @ECORE_AUDIO_LIBS@
+lib_ecore_audio_libecore_audio_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl 
@ECORE_AUDIO_CFLAGS@ @ECORE_AUDIO_ALSA_CFLAGS@ @ECORE_AUDIO_PULSE_CFLAGS@ 
@ECORE_AUDIO_SNDFILE_CFLAGS@
+lib_ecore_audio_libecore_audio_la_LIBADD = @ECORE_AUDIO_LIBS@ 
@ECORE_AUDIO_ALSA_LIBS@
 lib_ecore_audio_libecore_audio_la_DEPENDENCIES = @ECORE_AUDIO_INTERNAL_LIBS@
 lib_ecore_audio_libecore_audio_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
 
diff --git a/src/lib/ecore_audio/ecore_audio.c 
b/src/lib/ecore_audio/ecore_audio.c
index 4d38c13..d09d656 100644
--- a/src/lib/ecore_audio/ecore_audio.c
+++ b/src/lib/ecore_audio/ecore_audio.c
@@ -18,6 +18,12 @@ int _ecore_audio_log_dom = -1;
 static int _ecore_audio_init_count = 0;
 Eina_List *ecore_audio_modules;
 
+#ifdef HAVE_PULSE
+Ecore_Audio_Lib_Pulse *ecore_audio_pulse_lib = NULL;
+#endif /* HAVE_PULSE */
+#ifdef HAVE_SNDFILE
+Ecore_Audio_Lib_Sndfile *ecore_audio_sndfile_lib = NULL;
+#endif /* HAVE_SNDFILE */
 
 /* externally accessible functions */
 
@@ -61,6 +67,13 @@ ecore_audio_shutdown(void)
if (--_ecore_audio_init_count != 0)
  return _ecore_audio_init_count;
 
+#ifdef HAVE_SNDFILE
+   ecore_audio_sndfile_lib_unload();
+#endif /* HAVE_SNDFILE */
+#ifdef HAVE_PULSE
+   ecore_audio_pulse_lib_unload();
+#endif /* HAVE_PULSE */
+
/* FIXME: Shutdown all the inputs and outputs first */
eina_log_timing(_ecore_audio_log_dom,
   EINA_LOG_STATE_START,
@@ -78,6 +91,168 @@ ecore_audio_shutdown(void)
return _ecore_audio_init_count;
 }
 
+#ifdef HAVE_PULSE
+Eina_Bool
+ecore_audio_pulse_lib_load(void)
+{
+   if (ecore_audio_pulse_lib)
+ {
+if (!ecore_audio_pulse_lib->mod)
+  {
+ ERR("Cannot find libpulse!");
+ return EINA_FALSE;
+  }
+ 

[EGIT] [core/efl] master 01/05: scrollable: Avoid useless connect to animator

2016-07-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b3293408a4a02ad08727d4ac134795caaf4ef6ca

commit b3293408a4a02ad08727d4ac134795caaf4ef6ca
Author: Jean-Philippe Andre 
Date:   Fri Jul 29 17:28:27 2016 +0900

scrollable: Avoid useless connect to animator

If scrolling Y no need to register X animators. And vice
versa. It's a minor optimization.
---
 src/lib/elementary/elm_interface_scrollable.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/elementary/elm_interface_scrollable.c 
b/src/lib/elementary/elm_interface_scrollable.c
index 32c2b3d..a92a503 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -2356,6 +2356,7 @@ 
_elm_scroll_scroll_to_y(Elm_Scrollable_Smart_Interface_Data *sid,
  }
t = ecore_loop_time_get();
elm_obj_pan_pos_get(sid->pan_obj, , );
+   if (py == pos_y) return;
sid->scrollto.y.start = py;
sid->scrollto.y.end = pos_y;
sid->scrollto.y.t_start = t;
@@ -2399,6 +2400,7 @@ 
_elm_scroll_scroll_to_x(Elm_Scrollable_Smart_Interface_Data *sid,
  }
t = ecore_loop_time_get();
elm_obj_pan_pos_get(sid->pan_obj, , );
+   if (px == pos_x) return;
sid->scrollto.x.start = px;
sid->scrollto.x.end = pos_x;
sid->scrollto.x.t_start = t;

-- 




[EGIT] [core/efl] master 05/05: edje: throw error when vector resource not found.

2016-07-31 Thread Subhransu Mohanty
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e077e923722be0e4a674f0ac3dc07814b3c96003

commit e077e923722be0e4a674f0ac3dc07814b3c96003
Author: Subhransu Mohanty 
Date:   Mon Aug 1 13:24:34 2016 +0900

edje: throw error when vector resource not found.

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4202
---
 src/bin/edje/edje_cc_handlers.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 6f91af6..2f6481c 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -2330,7 +2330,7 @@ _handle_vector_image(void)
 
name = parse_str(0);
 
-   ed->vg.id = -1;
+   ed->vg.id = 0;
 
for (i = 0; i < edje_file->image_dir->vectors_count; ++i)
  {
@@ -2342,6 +2342,9 @@ _handle_vector_image(void)
   }
  }
 
+   if (!ed->vg.id)
+ error_and_abort(NULL, "Failed to find the vector resource :%s", name);
+
free(name);
 }
 

-- 




[EGIT] [core/efl] master 04/05: edje: Fix handling of polygon and polyline node.

2016-07-31 Thread Subhransu Mohanty
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7af272d93ce49bcddb4f5171da1180a2157bf6c9

commit 7af272d93ce49bcddb4f5171da1180a2157bf6c9
Author: Subhransu Mohanty 
Date:   Mon Aug 1 13:23:44 2016 +0900

edje: Fix handling of polygon and polyline node.

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4203
---
 src/bin/edje/edje_svg_loader.c | 12 +++-
 src/lib/edje/edje_data.c   |  4 +++-
 src/lib/edje/edje_load.c   |  3 ++-
 src/lib/edje/edje_private.h|  1 +
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/bin/edje/edje_svg_loader.c b/src/bin/edje/edje_svg_loader.c
index 93e30b8..bf9c37d 100644
--- a/src/bin/edje/edje_svg_loader.c
+++ b/src/bin/edje/edje_svg_loader.c
@@ -1134,7 +1134,13 @@ static Eina_Bool
 _attr_parse_polygon_node(void *data, const char *key, const char *value)
 {
Svg_Node *node = data;
-   Svg_Polygon_Node *polygon = &(node->node.polygon);
+   Svg_Polygon_Node *polygon = NULL;
+
+   if (node->type == SVG_NODE_POLYGON)
+ polygon = &(node->node.polygon);
+   else
+ polygon = &(node->node.polyline);
+
 
if (!strcmp(key, "points"))
  {
@@ -1368,6 +1374,10 @@ _copy_attribute(Svg_Node *to, Svg_Node *from)
to->node.polygon.points_count = from->node.polygon.points_count;
to->node.polygon.points = calloc(to->node.polygon.points_count, 
sizeof(double));
break;
+case SVG_NODE_POLYLINE:
+   to->node.polyline.points_count = from->node.polyline.points_count;
+   to->node.polyline.points = calloc(to->node.polyline.points_count, 
sizeof(double));
+   break;
 default:
break;
  }
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index a2f4a77..b5e7b7f 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -361,6 +361,7 @@ _eet_for_polygon_node(void)
 
EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(, Svg_Polygon_Node);
eet = eet_data_descriptor_stream_new();
+   EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Svg_Polygon_Node, "points_count", 
points_count, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC_VAR_ARRAY(eet, Svg_Polygon_Node, "points", 
points, EET_T_DOUBLE);
return eet;
 }
@@ -389,7 +390,7 @@ struct
{ SVG_NODE_CIRCLE, "circle" },
{ SVG_NODE_ELLIPSE, "ellipse" },
{ SVG_NODE_POLYGON, "polygon" },
-   { SVG_NODE_POLYLINE, "polygon" },
+   { SVG_NODE_POLYLINE, "polyline" },
{ SVG_NODE_RECT, "rect" },
{ SVG_NODE_PATH, "path" },
{ SVG_NODE_UNKNOWN, NULL }
@@ -474,6 +475,7 @@ _edje_svg_node_eet(void)
EET_DATA_DESCRIPTOR_ADD_MAPPING(eet_union, "rect", 
_edje_edd_edje_rect_node);
EET_DATA_DESCRIPTOR_ADD_MAPPING(eet_union, "path", 
_edje_edd_edje_path_node);
EET_DATA_DESCRIPTOR_ADD_MAPPING(eet_union, "polygon", 
_edje_edd_edje_polygon_node);
+   EET_DATA_DESCRIPTOR_ADD_MAPPING(eet_union, "polyline", 
_edje_edd_edje_polygon_node);
 
EET_DATA_DESCRIPTOR_ADD_UNION(_edje_edd_edje_vg_node, Svg_Node, "node", 
node, type, eet_union);
 
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index acacf37..89683a5 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -2518,7 +2518,8 @@ _create_vg_node(Svg_Node *node, Efl_VG *parent)
_add_polyline(vg, node->node.polygon.points, 
node->node.polygon.points_count, EINA_TRUE);
break;
 case SVG_NODE_POLYLINE:
-   _add_polyline(vg, node->node.polygon.points, 
node->node.polygon.points_count, EINA_FALSE);
+   vg = evas_vg_shape_add(parent);
+   _add_polyline(vg, node->node.polyline.points, 
node->node.polyline.points_count, EINA_FALSE);
break;
 case SVG_NODE_ELLIPSE:
vg = evas_vg_shape_add(parent);
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index da75f17..fd53254 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -3247,6 +3247,7 @@ struct _Svg_Node
 Svg_Circle_Node circle;
 Svg_Ellipse_Node ellipse;
 Svg_Polygon_Node polygon;
+Svg_Polygon_Node polyline;
 Svg_Rect_Node rect;
 Svg_Path_Node path;
  }node;

-- 




[EGIT] [core/efl] master 03/05: tests: Place inline window inside a box

2016-07-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=523aea45ced6d4930c384c842a3d9eda28f28cae

commit 523aea45ced6d4930c384c842a3d9eda28f28cae
Author: Jean-Philippe Andre 
Date:   Fri Jul 29 18:20:43 2016 +0900

tests: Place inline window inside a box

This shows off how to properly use an inline window.
I tried to add extra smarts inside elementary to handle those
inline windows like normal objects... but it led to more bugs.

The only way that makes sense to use this inline window
is to separately treat the image object and the window
itself. Any other approach is too tricky.

See T1973
---
 src/bin/elementary/test_win_inline.c | 21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/bin/elementary/test_win_inline.c 
b/src/bin/elementary/test_win_inline.c
index b9e08ef..1c22214 100644
--- a/src/bin/elementary/test_win_inline.c
+++ b/src/bin/elementary/test_win_inline.c
@@ -211,7 +211,7 @@ create_handles(Evas_Object *obj)
 void
 test_win_inline(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
-   Evas_Object *win, *bg, *win2, *win3;
+   Evas_Object *win, *bg, *win2, *win3, *box;
char buf[PATH_MAX];
 
win = elm_win_add(NULL, "window-inline", ELM_WIN_BASIC);
@@ -225,16 +225,21 @@ test_win_inline(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *even
elm_win_resize_object_add(win, bg);
evas_object_show(bg);
 
+   box = eo_add(EFL_UI_BOX_CLASS, win);
+   evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   efl_pack(win, box);
+   evas_object_show(box);
+
win2 = elm_win_add(win, "inlined", ELM_WIN_INLINED_IMAGE);
evas_object_event_callback_add(elm_win_inlined_image_object_get(win2), 
EVAS_CALLBACK_MOUSE_DOWN, cb_mouse_down, NULL);
-   fill(win2, EINA_TRUE);
+   fill(win2, EINA_FALSE);
+   elm_win_alpha_set(win2, EINA_TRUE);
+   evas_object_size_hint_weight_set(elm_win_inlined_image_object_get(win2), 
EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(elm_win_inlined_image_object_get(win2), 
EVAS_HINT_FILL, EVAS_HINT_FILL);
+   efl_gfx_size_hint_margin_set(elm_win_inlined_image_object_get(win2), 20, 
20, 20, 20);
+   efl_pack(box, elm_win_inlined_image_object_get(win2));
 
-   evas_object_move(win2, 20, 60);
evas_object_resize(win2, 300, 200);
-   // image object for win2 is unlinked to its pos/size - so manual control
-   // this allows also for using map and other things with it.
-   evas_object_move(elm_win_inlined_image_object_get(win2), 20, 40);
-   evas_object_resize(elm_win_inlined_image_object_get(win2), 200, 320);
evas_object_show(win2);
 
win3 = elm_win_add(win, "inlined", ELM_WIN_INLINED_IMAGE);
@@ -243,6 +248,8 @@ test_win_inline(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *even
fill(win3, EINA_FALSE);
 
evas_object_resize(win3, 300, 200);
+   // image object for win2 is unlinked to its pos/size - so manual control
+   // this allows also for using map and other things with it.
evas_object_move(elm_win_inlined_image_object_get(win3), 80, 180);
evas_object_resize(elm_win_inlined_image_object_get(win3), 300, 200);
evas_object_show(win3);

-- 




[EGIT] [core/efl] master 02/05: ecore_evas: Register animators for inline image ee

2016-07-31 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=58c380823181ea75bc9969dc3dfe017d64b9b508

commit 58c380823181ea75bc9969dc3dfe017d64b9b508
Author: Jean-Philippe Andre 
Date:   Fri Jul 29 17:30:25 2016 +0900

ecore_evas: Register animators for inline image ee

In ecore_evas_object_image_new, register animator tick del/add
catchers, so that animators can work. This fixes mouse scroll
in an inline window.
---
 src/lib/ecore_evas/ecore_evas.c | 8 +++-
 src/lib/ecore_evas/ecore_evas_buffer.c  | 2 ++
 src/lib/ecore_evas/ecore_evas_private.h | 1 +
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 1a6bed5..5c6bf83 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -3232,13 +3232,19 @@ EO_CALLBACKS_ARRAY_DEFINE(animator_watch,
   { EO_EVENT_CALLBACK_DEL, 
_check_animator_event_catcher_del });
 
 EAPI void
+_ecore_evas_register_animators(Ecore_Evas *ee)
+{
+   eo_event_callback_array_add(ee->evas, animator_watch(), ee);
+}
+
+EAPI void
 _ecore_evas_register(Ecore_Evas *ee)
 {
ee->registered = 1;
ecore_evases = (Ecore_Evas *)eina_inlist_prepend
  (EINA_INLIST_GET(ecore_evases), EINA_INLIST_GET(ee));
 
-   eo_event_callback_array_add(ee->evas, animator_watch(), ee);
+   _ecore_evas_register_animators(ee);
 
if (_ecore_evas_render_sync) ecore_evas_first = EINA_TRUE;
 }
diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c 
b/src/lib/ecore_evas/ecore_evas_buffer.c
index be87234..795f5b7 100644
--- a/src/lib/ecore_evas/ecore_evas_buffer.c
+++ b/src/lib/ecore_evas/ecore_evas_buffer.c
@@ -910,6 +910,8 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target)
evas_key_lock_add(ee->evas, "Num_Lock");
evas_key_lock_add(ee->evas, "Scroll_Lock");
 
+   _ecore_evas_register_animators(ee);
+
ee_target->sub_ecore_evas = eina_list_append(ee_target->sub_ecore_evas, ee);
 
return o;
diff --git a/src/lib/ecore_evas/ecore_evas_private.h 
b/src/lib/ecore_evas/ecore_evas_private.h
index fea4792..4eaa369 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -361,6 +361,7 @@ EAPI void _ecore_evas_fps_debug_init(void);
 EAPI void _ecore_evas_fps_debug_shutdown(void);
 EAPI void _ecore_evas_fps_debug_rendertime_add(double t);
 EAPI void _ecore_evas_register(Ecore_Evas *ee);
+EAPI void _ecore_evas_register_animators(Ecore_Evas *ee);
 EAPI void _ecore_evas_free(Ecore_Evas *ee);
 EAPI void _ecore_evas_idle_timeout_update(Ecore_Evas *ee);
 EAPI void _ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y, 
unsigned int timestamp);

-- 




Re: [E-devel] [RFC] ecore-con eoify

2016-07-31 Thread David Seikel
On Mon, 1 Aug 2016 00:50:31 -0300 Gustavo Sverzut Barbieri
 wrote:

> Hi all,
> 
> I'm entitled to review the new Eo API for Ecore_Con.h. Find below my
> first draft proposal and after the "code" you can see my detailed
> review of current code and competitors.
> 
> Please reply in line with your points. As the email is super-long,
> PLEASE cut non-relevant points and text so we can easily see what you
> want to mean.



Two things.

Some of those other APIs include a "family", IPv4 or IPv6.  We could
probably figure that out based on the structure of the IP address
passed in, so no need to actually pass the family to API.  Do we
already do that?  (I have public IPv6 addresses at home.)

I want to experiment with other protocols, mostly SCTP, which is
basically a cross between TCP and UDP.  I wonder if we can support that?

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.


signature.asc
Description: PGP signature
--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [RFC] ecore-con eoify

2016-07-31 Thread Gustavo Sverzut Barbieri
Hi all,

I'm entitled to review the new Eo API for Ecore_Con.h. Find below my first
draft proposal and after the "code" you can see my detailed review of
current code and competitors.

Please reply in line with your points. As the email is super-long, PLEASE
cut non-relevant points and text so we can easily see what you want to mean.

You may see this as a Gist at
https://gist.github.com/barbieri/5bdf6c49b207543d764435d2494361ba



/*

This is a draft Eo model to replace ecore_con_{server,client}.

It will address the same usage, but with a new API that is closer
to what other projects do, this will allow easier transition to
EFL, without loosing any feature.

At the of this file you can see a detailed analysis of Ecore_Con.h and
competitors such as node.js, golang, qt and soletta.

NOTE: SSL and Proxy are left out from the initial discussion, Qt is
the only one to provide API for proxy and they are unused in our
repository. SSL is usually handled via a subclass, not an upgrade from
the existing connection.

NOTE: this Eo is not valid or fully complete, it's used as a starting
base.
*/

import eina_types;

struct Efl.Net.Address {
family: Efl.Net.Family;
address: union { in, in6, bt... };
}

struct Efl.Net.SocketAddress {
address: Efl.Net.Address;
port: uint16;
}

/* see http://solettaproject.github.io/docs/c-api/structsol__blob.html
 *
 * The idea is to allow an immutable memory to be reference counted and have
 * parent.
 *
 * Children reference their parent and releases the referece when they
 * die, this allows "windowing" or "slicing" of memory to be handled
 * easily, such as a subsurface keeping the parent framebuffer alive,
 * or a "line" keeping the backing mmap'ed file.
 *
 * Free function allows custom release, such as unloading an image or
 * munmap of a text file.
 *
 * This plays well with bindings, keep the object alive (inc ref) and
 * once the blob dies release them (dec ref).
 */
struct Eina.Blob {
mem: void_ptr;
parent: Eina.Blob;
size: size;
refcount: int;
free: Eina_Blob_Free_Cb;
}

/*
 * Using 'Net' instead of 'Network' since all others use a shorter
 * prefix. Also allows to have a side-by-side implementation without
 * the need to immediately convert the all users and allows changing
 * paradigm of the new class -- of course legacy wrappers will be kept
 * for old users.
 */
abstract Efl.Net.BaseSocket (Eo.Base) {
[[Abstract class representing a network connection socket]]

events {
read @hot: Eina.Binbuf; [[data is available to read,
if consumed use eina_binbuf_remove().]]
sent: Eina.Blob, error; [[data specified by blob was sent,
 if error != 0, contains errno]]
error: int; [[errno]]
}

methods {
send @virtual_pure {
[[Queue data to be sent to remote]]
params {
@in data: Eina.Blob; [[data to queue for sending]]
@out error: int; [[0 on success, ENOSPC if no space left]]
}

/* can provide a helper that sends memory, creating the
   blob internally, such as static-const (no free) or
   allocated memory (call free)
*/
}

flush @virtual_pure {
[[Try to send as much as data without blocking]]
/* NOTE: changes behavior from current flush() that
 * really blocks!
 */
params {
@out fully_done: bool; [[true if all data was sent]]
}
}

@property local_address {
[[the local IP or unix-local address]]
get @virtual_pure {
}
values {
address: Efl.Net.Address;
}
}

@property remote_address {
[[the remote IP or unix-local address]]
get @virtual_pure {
}
values {
address: Efl.Net.Address;
}
}

@property internal_fd {
[[the internal file descriptor (use with caution!)]]
/* it seems the usage is to steal the fd to do something
 * else or set some flags. If so we could expose some
 * primitives such as fcntl_add(type, flags) and
 * fcntl_del(type, flags) as well as a destructor that
 * will return the stolen fd (destroys the object and
 * keeps fd alive).
 */
get @virtual_pure {
}
values {
fd: int;
}
}

@property connected {
[[if the socket is still connected.]]
get @virtual_pure {
}
values {
connected: bool;
}
}

@property timeout { /* this usually doesn't change,
   should be constructor-only */
[[timeout to close the connection.]]

[EGIT] [apps/terminology] master 01/01: win: when closing solo container, dissociate it from its parent

2016-07-31 Thread Boris Faure
billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=dfe57a25a709f78d6417dee62dac0285e4b03d33

commit dfe57a25a709f78d6417dee62dac0285e4b03d33
Author: Boris Faure 
Date:   Sun Jul 31 16:50:13 2016 +0200

win: when closing solo container, dissociate it from its parent

Ref T3509.
---
 src/bin/win.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/bin/win.c b/src/bin/win.c
index 2afbf96..1da46cb 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -246,11 +246,19 @@ _solo_size_eval(Term_Container *container, Sizeinfo *info)
 static void
 _solo_close(Term_Container *tc, Term_Container *child EINA_UNUSED)
 {
+   Solo *solo;
+   Term *term;
+
DBG("close");
+   assert (tc->type == TERM_CONTAINER_TYPE_SOLO);
+   solo = (Solo*) tc;
tc->parent->close(tc->parent, tc);
 
eina_stringshare_del(tc->title);
 
+   term = solo->term;
+   term->container = NULL;
+
free(tc);
 }
 

-- 




[EGIT] [apps/terminology] master 01/01: win: hide tabcount when no longer tabs

2016-07-31 Thread Boris Faure
billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=13c91324facf1a02d2096eb9bb294e84a3b53514

commit 13c91324facf1a02d2096eb9bb294e84a3b53514
Author: Boris Faure 
Date:   Sun Jul 31 15:21:42 2016 +0200

win: hide tabcount when no longer tabs
---
 src/bin/win.c | 28 ++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/src/bin/win.c b/src/bin/win.c
index bc64073..2afbf96 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -2134,6 +2134,7 @@ _tabs_close(Term_Container *tc, Term_Container *child)
  next = tabs->tabs;
next_item = next->data;
next_child = next_item->tc;
+   assert (next_child->type == TERM_CONTAINER_TYPE_SOLO);
tabs->tabs = eina_list_remove_list(tabs->tabs, l);
 
assert (child->type == TERM_CONTAINER_TYPE_SOLO);
@@ -2147,13 +2148,24 @@ _tabs_close(Term_Container *tc, Term_Container *child)
count = eina_list_count(tabs->tabs);
if (count == 1)
  {
+Term *next_term;
+Solo *next_solo;
+
 assert (next_child->type == TERM_CONTAINER_TYPE_SOLO);
-_tabbar_clear(term);
+next_solo = (Solo*)next_child;
+next_term = next_solo->term;
+
+edje_object_signal_emit(next_term->bg, "tabcount,off", "terminology");
+if (next_term->tabcount_spacer)
+  {
+ evas_object_del(next_term->tabcount_spacer);
+ next_term->tabcount_spacer = NULL;
+  }
 
-edje_object_signal_emit(term->bg, "tabcount,off", "terminology");
 if (tabs->selector)
   _tabs_restore(tabs);
 eina_stringshare_del(tc->title);
+
 tc_parent->swallow(tc_parent, tc, next_child);
 if (tc->is_focused)
   next_child->focus(next_child, tc);
@@ -2312,11 +2324,23 @@ _tabs_swallow(Term_Container *tc, Term_Container *orig,
  }
else if (tab_item != tabs->current)
  {
+Term *term;
+Solo *solo;
 Term_Container *tc_parent = tc->parent;
 if (tc->is_focused)
   tabs->current->tc->unfocus(tabs->current->tc, tc);
 tabs->current = tab_item;
 
+assert (orig->type == TERM_CONTAINER_TYPE_SOLO);
+solo = (Solo*)orig;
+term = solo->term;
+edje_object_signal_emit(term->bg, "tabcount,off", "terminology");
+if (term->tabcount_spacer)
+  {
+ evas_object_del(term->tabcount_spacer);
+ term->tabcount_spacer = NULL;
+  }
+
 o = orig->get_evas_object(orig);
 evas_object_geometry_get(o, , , , );
 evas_object_hide(o);

-- 




Re: [E-devel] [EGIT] [core/enlightenment] enlightenment-0.20 01/01: Updating spanish translation

2016-07-31 Thread Massimo Maiurana
I did the commit because one of the spanish translators found that in 
Arch the translation is not updated as it is based on the 
enlightenment-0.20 branch. If i'm not wrong the Arch pkgbuild pulls the 
git branch to build its package, not an official tarball, so the commit 
should be useful to them even if no further releases are planned.

Bye
Massimo

Simon Lees ha scritto il 31/07/2016 alle 09:57:
>
>
> On 07/31/2016 07:20 AM, Massimo Maiurana wrote:
>> maxerba pushed a commit to branch enlightenment-0.20.
>>
>> http://git.enlightenment.org/core/enlightenment.git/commit/?id=59f21dee452a17b56bc98b13977427764c8d3f43
>>
>> commit 59f21dee452a17b56bc98b13977427764c8d3f43
>> Author: maxerba 
>> Date:   Sat Jul 30 23:50:11 2016 +0200
>>
>> Updating spanish translation
>
> Thanks for the update but Currently were not planning another e20 update.
>
>
>
> --
>
>
>
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>


-- 
Massimo Maiurana
Ragusa (RG)

--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/enlightenment] enlightenment-0.20 01/01: Updating spanish translation

2016-07-31 Thread Simon Lees


On 07/31/2016 07:20 AM, Massimo Maiurana wrote:
> maxerba pushed a commit to branch enlightenment-0.20.
> 
> http://git.enlightenment.org/core/enlightenment.git/commit/?id=59f21dee452a17b56bc98b13977427764c8d3f43
> 
> commit 59f21dee452a17b56bc98b13977427764c8d3f43
> Author: maxerba 
> Date:   Sat Jul 30 23:50:11 2016 +0200
> 
> Updating spanish translation

Thanks for the update but Currently were not planning another e20 update.

-- 

Simon Lees (Simotek)http://simotek.net

Emergency Update Team   keybase.io/simotek
SUSE LinuxAdeliade Australia, UTC+9:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B



signature.asc
Description: OpenPGP digital signature
--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: Canvas text: fix range geometry calculation for RTL

2016-07-31 Thread Daniel Hirt
herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0d9ddc45145cbbac5358d3c3cd343e18ddf11a46

commit 0d9ddc45145cbbac5358d3c3cd343e18ddf11a46
Author: Daniel Hirt 
Date:   Sun Jul 31 00:48:12 2016 +0300

Canvas text: fix range geometry calculation for RTL

Fixes T3627.

@fix
---
 src/lib/evas/canvas/evas_object_textblock.c | 27 +++
 src/tests/evas/evas_test_textblock.c|  9 +
 2 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index da4840e..f06d876 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -11772,6 +11772,14 @@ _evas_textblock_cursor_range_in_line_geometry_get(
  return NULL;
   }
 
+#ifdef BIDI_SUPPORT
+if (ti->text_props.bidi_dir == EVAS_BIDI_DIRECTION_RTL)
+  {
+ x1 = x1 + w1;
+ x2 = x2 + w2;
+  }
+#endif
+
 /* Make x2 the one on the right */
 if (x2 < x1)
   {
@@ -11779,24 +11787,11 @@ _evas_textblock_cursor_range_in_line_geometry_get(
  tmp = x1;
  x1 = x2;
  x2 = tmp;
-
- tmp = w1;
- w1 = w2;
- w2 = tmp;
   }
 
-#ifdef BIDI_SUPPORT
-if (ti->text_props.bidi_dir == EVAS_BIDI_DIRECTION_RTL)
-  {
- x = x1 + w1;
- w = x2 + w2 - x;
-  }
-else
-#endif
-  {
- x = x1;
- w = x2 - x1;
-  }
+x = x1;
+w = x2 - x1;
+
 if (w > 0)
   {
  tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 70ba06b..efee1ef 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -2452,6 +2452,15 @@ START_TEST(evas_textblock_geometries)
   free(tr2);
 
/* Same run different scripts */
+   evas_object_textblock_text_markup_set(tb, "עברית");
+   evas_textblock_cursor_pos_set(main_cur, 4); // last character
+   evas_textblock_cursor_pos_set(cur, 5); // after last character
+
+   rects = evas_textblock_cursor_range_geometry_get(cur, main_cur);
+   fail_if(!rects);
+   EINA_LIST_FREE(rects, tr)
+  free(tr);
+
evas_object_textblock_text_markup_set(tb, "עבריתenglishрусскийעברית");
 
evas_textblock_cursor_pos_set(cur, 3);

--