[EGIT] [core/enlightenment] master 04/04: do not apply max client geometry restriction if max geometry is not set

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit ea8e88b5921c69114e581bebb1771a584e1ad829
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 17:34:03 2015 -0500

do not apply max client geometry restriction if max geometry is not set

default values for these is set to a very high value, but it's possible
(and guaranteed) for some clients to set them to a value <= 0, which results
in a broken window
---
 src/bin/e_remember.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_remember.c b/src/bin/e_remember.c
index 1beb10b..62147f4 100644
--- a/src/bin/e_remember.c
+++ b/src/bin/e_remember.c
@@ -743,11 +743,11 @@ _e_remember_cb_hook_pre_post_fetch(void *data 
EINA_UNUSED, E_Client *ec)
}
  if (ec->icccm.min_w > ec->client.w)
ec->client.w = ec->icccm.min_w;
- if (ec->icccm.max_w < ec->client.w)
+ if ((ec->icccm.max_w > 0) && (ec->icccm.max_w < ec->client.w))
ec->client.w = ec->icccm.max_w;
  if (ec->icccm.min_h > ec->client.h)
ec->client.h = ec->icccm.min_h;
- if (ec->icccm.max_h < ec->client.h)
+ if ((ec->icccm.max_h > 0) && (ec->icccm.max_h < ec->client.h))
ec->client.h = ec->icccm.max_h;
   }
 e_comp_object_frame_wh_adjust(ec->frame, ec->client.w, ec->client.h, 
>w, >h);

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Use multi select with control in grid. Fix zoom fit so it fits.

2015-11-24 Thread Stephen Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=3812d7b246509d2443748eedb71e5bfb99bc04f6

commit 3812d7b246509d2443748eedb71e5bfb99bc04f6
Author: Stephen Houston 
Date:   Tue Nov 24 17:17:55 2015 -0600

Ephoto: Use multi select with control in grid.  Fix zoom fit so it fits.
---
 src/bin/ephoto_single_browser.c |  4 ++--
 src/bin/ephoto_thumb_browser.c  | 13 ++---
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 7c5f9f0..371db45 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -223,8 +223,8 @@ _viewer_zoom_fit_apply(Ephoto_Viewer *v)
EINA_SAFETY_ON_TRUE_RETURN(iw <= 0);
EINA_SAFETY_ON_TRUE_RETURN(ih <= 0);
 
-   zx = (double) cw / (double) iw;
-   zy = (double) ch / (double) ih;
+   zx = (double) (cw-10) / (double) iw;
+   zy = (double) (ch-10) / (double) ih;
 
zoom = (zx < zy) ? zx : zy;
_viewer_zoom_apply(v, zoom);
diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 7f9ab6b..1f039a2 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -162,13 +162,16 @@ _ephoto_dir_item_icon_get(void *data EINA_UNUSED, 
Evas_Object *obj,
 
 static Evas_Object *
 _ephoto_thumb_file_icon_get(void *data, Evas_Object *obj,
-const char *part EINA_UNUSED)
+const char *part)
 {
Ephoto_Entry *e = data;
Evas_Object *thumb = NULL;
 
+   if (strcmp(part, "elm.swallow.icon"))
+ return NULL;
+
if (e)
-  thumb = ephoto_thumb_add(e->ephoto, obj, e->path);
+ thumb = ephoto_thumb_add(e->ephoto, obj, e->path);
return thumb;
 }
 
@@ -3340,15 +3343,11 @@ ephoto_thumb_browser_add(Ephoto *ephoto, Evas_Object 
*parent)
evas_object_size_hint_weight_set(tb->grid, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(tb->grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
elm_gengrid_align_set(tb->grid, 0.5, 0.0);
elm_gengrid_multi_select_set(tb->grid, EINA_TRUE);
elm_gengrid_multi_select_mode_set(tb->grid,
-   ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT);
+   ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL);
elm_scroller_bounce_set(tb->grid, EINA_FALSE, EINA_TRUE);
-   evas_object_size_hint_align_set(tb->grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
-   evas_object_size_hint_weight_set(tb->grid, EVAS_HINT_EXPAND,
-   EVAS_HINT_EXPAND);
evas_object_smart_callback_add(tb->grid, "activated",
_ephoto_thumb_activated, tb);
evas_object_event_callback_add(tb->grid, EVAS_CALLBACK_MOUSE_UP,

-- 




[EGIT] [core/efl] master 02/02: evas: avoid double eet_close call while caching GL shader.

2015-11-24 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit 49b8d0e852fee17c7fe2452875eb79af21f37b88
Author: Cedric BAIL 
Date:   Tue Nov 24 14:33:20 2015 -0800

evas: avoid double eet_close call while caching GL shader.
---
 src/modules/evas/engines/gl_common/evas_gl_shader.c | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c 
b/src/modules/evas/engines/gl_common/evas_gl_shader.c
index c5ef0b9..3b7986d 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_shader.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c
@@ -317,12 +317,15 @@ _evas_gl_common_shader_binary_save(Evas_GL_Shared *shared)
 eet_shutdown();
  }
 
-   if (eet_close(ef) != EET_ERROR_NONE) goto error;
-   if (rename(tmp_file, bin_file_path) < 0) goto error;
+   if (eet_close(ef) != EET_ERROR_NONE) goto destroyed;
+   if (rename(tmp_file, bin_file_path) < 0) goto destroyed;
+
eet_shutdown();
return 1;
 
-error:
+ destroyed:
+   ef = NULL;
+ error:
if (ef) eet_close(ef);
if (evas_gl_common_file_cache_file_exists(tmp_file)) unlink(tmp_file);
eet_shutdown();

-- 




[EGIT] [core/enlightenment] master 02/04: adjust for SSD geometry during wayland client resize

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit e8f4f30f40a60cf5dd122833d59185d8a18b8f34
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 17:29:53 2015 -0500

adjust for SSD geometry during wayland client resize

client moveinfo includes the frame geometry, so this must be taken
into account when resizing a client which has a frame

fix T2863
---
 src/bin/e_comp_wl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 7ed06db..4c644b3 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -580,6 +580,8 @@ _e_comp_wl_evas_cb_resize(void *data, Evas_Object *obj 
EINA_UNUSED, void *event
 
 x = ec->mouse.last_down[ec->moveinfo.down.button - 1].w;
 y = ec->mouse.last_down[ec->moveinfo.down.button - 1].h;
+if (e_comp_object_frame_exists(ec->frame))
+  e_comp_object_frame_wh_unadjust(ec->frame, x, y, , );
 
 switch (ec->resize_mode)
   {

-- 




[EGIT] [core/enlightenment] master 01/04: avoid setting incorrect geometry during new_client frame calc

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 0ed63ede7cce8d712f07f0e184e52aa59ec8aabb
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 17:28:08 2015 -0500

avoid setting incorrect geometry during new_client frame calc

in the case where a client has no geometry set, attempting to update
the client's geometry during frame recalc will guarantee that wrong
geometry is set, resulting in a bad first frame
---
 src/bin/e_comp_object.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c
index b754cb8..924b861 100644
--- a/src/bin/e_comp_object.c
+++ b/src/bin/e_comp_object.c
@@ -1788,6 +1788,7 @@ _e_comp_smart_cb_frame_recalc(void *data, Evas_Object 
*obj, void *event_info EIN
  evas_object_resize(cw->ec->frame, cw->ec->zone->w, cw->ec->zone->h);
else if (cw->ec->new_client)
  {
+if ((cw->ec->w < 1) || (cw->ec->h < 1)) return;
 e_comp_object_frame_wh_adjust(obj, pw, ph, , );
 evas_object_resize(cw->ec->frame, w, h);
  }

-- 




[EGIT] [core/enlightenment] master 03/04: use CSD geometry during move/resize display

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=60269f3ecfc648bee3e7d81cad8f27874b98a0c3

commit 60269f3ecfc648bee3e7d81cad8f27874b98a0c3
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 17:31:47 2015 -0500

use CSD geometry during move/resize display

this should provide more user-relevant information
---
 src/bin/e_moveresize.c | 20 
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/bin/e_moveresize.c b/src/bin/e_moveresize.c
index d78d65b..9b9ce8e 100644
--- a/src/bin/e_moveresize.c
+++ b/src/bin/e_moveresize.c
@@ -56,28 +56,24 @@ e_moveresize_replace(Eina_Bool enable)
 E_API void
 e_moveresize_client_extents(const E_Client *ec, int *w, int *h)
 {
+   if (e_comp_object_frame_allowed(ec->frame))
+ *w = ec->client.w, *h = ec->client.h;
+   else
+ *w = ec->w, *h = ec->h;
if ((ec->icccm.base_w >= 0) &&
(ec->icccm.base_h >= 0))
  {
 if (ec->icccm.step_w > 0)
-  *w = (ec->client.w - ec->icccm.base_w) / ec->icccm.step_w;
-else
-  *w = ec->client.w;
+  *w = (*w - ec->icccm.base_w) / ec->icccm.step_w;
 if (ec->icccm.step_h > 0)
-  *h = (ec->client.h - ec->icccm.base_h) / ec->icccm.step_h;
-else
-  *h = ec->client.h;
+  *h = (*h - ec->icccm.base_h) / ec->icccm.step_h;
  }
else
  {
 if (ec->icccm.step_w > 0)
-  *w = (ec->client.w - ec->icccm.min_w) / ec->icccm.step_w;
-else
-  *w = ec->client.w;
+  *w = (*w - ec->icccm.min_w) / ec->icccm.step_w;
 if (ec->icccm.step_h > 0)
-  *h = (ec->client.h - ec->icccm.min_h) / ec->icccm.step_h;
-else
-  *h = ec->client.h;
+  *h = (*h - ec->icccm.min_h) / ec->icccm.step_h;
  }
 }
 

-- 




[EGIT] [apps/ephoto] master 01/02: Ephoto: Add file operations, context menus, sorting, and more.

2015-11-24 Thread Stephen Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=0b62428e24d75d749f20204a5fc51f37490f5d35

commit 0b62428e24d75d749f20204a5fc51f37490f5d35
Author: Stephen Houston 
Date:   Tue Nov 24 16:20:06 2015 -0600

Ephoto: Add file operations, context menus, sorting, and more.
---
 src/bin/gettext.h | 272 --
 1 file changed, 272 deletions(-)

diff --git a/src/bin/gettext.h b/src/bin/gettext.h
deleted file mode 100644
index 8a90d49..000
--- a/src/bin/gettext.h
+++ /dev/null
@@ -1,272 +0,0 @@
-/* Convenience header for conditional use of GNU .
-   Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without enjoyn the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-   USA.  */
-
-#ifndef _LIBGETTEXT_H
-#define _LIBGETTEXT_H 1
-
-#define _(x)  gettext(x)
-#define N_(x) gettext_noop(x)
-
-/* NLS can be disabled through the configure --disable-nls option.  */
-#if ENABLE_NLS
-
-/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
-   the gettext() and ngettext() macros.  This is an alternative to calling
-   textdomain(), and is useful for libraries.  */
-# ifdef DEFAULT_TEXT_DOMAIN
-#  undef gettext
-#  define gettext(Msgid)\
-   dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
-#  undef ngettext
-#  define ngettext(Msgid1, Msgid2, N)\
-   dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
-# endif
-
-#else
-
-/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
-   chokes if dcgettext is defined as a macro.  So include it now, to make
-   later inclusions of  a NOP.  We don't include 
-   as well because people using "gettext.h" will not include ,
-   and also including  would fail on SunOS 4, whereas 
-   is OK.  */
-#if defined(__sun)
-# include 
-#endif
-
-/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
-   , which chokes if dcgettext is defined as a macro.  So include
-   it now, to make later inclusions of  a NOP.  */
-#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
-# include 
-#endif
-
-/* Disabled NLS.
-   The casts to 'const char *' serve the purpose of producing warnings
-   for invalid uses of the value returned from these functions.
-   On pre-ANSI systems without 'const', the config.h file is supposed to
-   contain "#define const".  */
-# define gettext(Msgid)  ((const char *)(Msgid))
-# define dgettext(Domainname, Msgid) ((void)(Domainname), gettext (Msgid))
-# define dcgettext(Domainname, Msgid, Category)\
-   ((void)(Category), dgettext (Domainname, Msgid))
-# define ngettext(Msgid1, Msgid2, N)\
-   ((N) == 1\
-? ((void)(Msgid2), (const char *)(Msgid1))\
-: ((void)(Msgid1), (const char *)(Msgid2)))
-# define dngettext(Domainname, Msgid1, Msgid2, N)\
-   ((void)(Domainname), ngettext (Msgid1, Msgid2, N))
-# define dcngettext(Domainname, Msgid1, Msgid2, N, Category)\
-   ((void)(Category), dngettext(Domainname, Msgid1, Msgid2, N))
-# define textdomain(Domainname) ((const char *)(Domainname))
-# define bindtextdomain(Domainname, Dirname)\
-   ((void)(Domainname), (const char *)(Dirname))
-# define bind_textdomain_codeset(Domainname, Codeset)\
-   ((void)(Domainname), (const char *)(Codeset))
-
-#endif
-
-/* A pseudo function call that serves as a marker for the automated
-   extraction of messages, but does not call gettext().  The run-time
-   translation is done at a different place in the code.
-   The argument, String, should be a literal string.  Concatenated strings
-   and other string expressions won't work.
-   The macro's expansion is not parenthesized, so that it is suitable as
-   initializer for static 'char[]' or 'const char[]' variables.  */
-#define gettext_noop(String) String
-
-/* The separator between msgctxt and msgid in a .mo file.  */
-#define GETTEXT_CONTEXT_GLUE "\004"
-
-/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
-   MSGID.  MSGCTXT and MSGID must be string literals.  MSGCTXT should be
-   short and rarely need to change.
-   The letter 'p' stands for 'particular' or 'special'.  */
-#ifdef DEFAULT_TEXT_DOMAIN
-# define pgettext(Msgctxt, Msgid)\
-   pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, 
Msgid, LC_MESSAGES)
-#else
-# define 

[EGIT] [core/efl] master 03/07: efl: quick code cleanup.

2015-11-24 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit abe21101527c7f31e8c948b9d55306ed11c65e83
Author: Cedric BAIL 
Date:   Tue Nov 24 14:57:58 2015 -0800

efl: quick code cleanup.
---
 src/lib/efl/interfaces/efl_gfx_shape.c | 27 ---
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/src/lib/efl/interfaces/efl_gfx_shape.c 
b/src/lib/efl/interfaces/efl_gfx_shape.c
index 7533040..723ee67 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.c
+++ b/src/lib/efl/interfaces/efl_gfx_shape.c
@@ -280,18 +280,21 @@ typedef struct _Efl_Gfx_Property Efl_Gfx_Property;
 struct _Efl_Gfx_Property
 {
double scale;
-   int r, g, b, a;
-   int fr, fg, fb, fa; 
double w;
double centered;
-   const Efl_Gfx_Dash *dash;
-   unsigned int dash_length;
+
Efl_Gfx_Cap c;
Efl_Gfx_Join j;
+
+   const Efl_Gfx_Dash *dash;
+   unsigned int dash_length;
+
+   int r, g, b, a;
+   int fr, fg, fb, fa;
 };
 
 static inline void
-gfx_property_get(const Eo *obj, Efl_Gfx_Property *property)
+_efl_gfx_property_get(const Eo *obj, Efl_Gfx_Property *property)
 {
eo_do(obj,
  property->scale = efl_gfx_shape_stroke_scale_get(),
@@ -310,21 +313,23 @@ _efl_gfx_shape_interpolate(Eo *obj, Efl_Gfx_Shape_Data 
*pd,
 {
Efl_Gfx_Shape_Data *from_pd, *to_pd;
Efl_Gfx_Path_Command *cmds;
-   double *pts, *from_pts, *to_pts;
-   unsigned int i, j;
Efl_Gfx_Property property_from, property_to;
Efl_Gfx_Dash *dash = NULL;
+   double *pts, *from_pts, *to_pts;
+   unsigned int i, j;
 
from_pd = eo_data_scope_get(from, EFL_GFX_SHAPE_MIXIN);
to_pd = eo_data_scope_get(to, EFL_GFX_SHAPE_MIXIN);
if (!eo_isa(from, EFL_GFX_SHAPE_MIXIN) ||
-   !eo_isa(to, EFL_GFX_SHAPE_MIXIN)) return EINA_FALSE;
-   if (pd == from_pd || pd == to_pd) return EINA_FALSE;
+   !eo_isa(to, EFL_GFX_SHAPE_MIXIN))
+ return EINA_FALSE;
+   if (pd == from_pd || pd == to_pd)
+ return EINA_FALSE;
if (!_efl_gfx_shape_equal_commands_internal(from_pd, to_pd))
  return EINA_FALSE;
 
-   gfx_property_get(from, _from);
-   gfx_property_get(to, _to);
+   _efl_gfx_property_get(from, _from);
+   _efl_gfx_property_get(to, _to);
 
if (property_from.dash_length != property_to.dash_length) return EINA_FALSE;
 

-- 




[EGIT] [core/efl] master 05/07: efl: added fill_rule property in efl_gfx_shape class

2015-11-24 Thread Subhransu Mohanty
cedric pushed a commit to branch master.

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

commit b1b0679daaa3ddf81363812061eeb008a2efbf96
Author: Subhransu Mohanty 
Date:   Wed Nov 18 14:25:09 2015 +0900

efl: added fill_rule property in efl_gfx_shape class

Open question, should fill rule be part of the public data ? Let's
say no for now.

Signed-off-by: Cedric BAIL 
---
 src/lib/efl/Efl.h   | 10 ++
 src/lib/efl/interfaces/efl_gfx_shape.c  | 24 ++--
 src/lib/efl/interfaces/efl_gfx_shape.eo | 19 +++
 3 files changed, 51 insertions(+), 2 deletions(-)

diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 8bc30b2..aa09157 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -125,6 +125,16 @@ typedef enum _Efl_Gfx_Gradient_Spread
 
 
 /**
+ * Type defining how an image content get filled.
+ * @since 1.14
+ */
+typedef enum _Efl_Gfx_Fill_Rule
+{
+   EFL_GFX_FILL_RULE_WINDING = 0, /**< Draw a horizontal line from the point 
to a location outside the shape. Determine whether the direction of the line at 
each intersection point is up or down. The winding number is determined by 
summing the direction of each intersection. If the number is non zero, the 
point is inside the shape. This mode is the default */
+   EFL_GFX_FILL_RULE_ODD_EVEN = 1,  /**< Draw a horizontal line from the point 
to a location outside the shape, and count the number of intersections. If the 
number of intersections is an odd number, the point is inside the shape. */
+} Efl_Gfx_Fill_Rule;
+
+/**
  * Type defining stroke information.
  * @note Describe the properties to define the path stroke.
  * @since 1.14
diff --git a/src/lib/efl/interfaces/efl_gfx_shape.c 
b/src/lib/efl/interfaces/efl_gfx_shape.c
index 4ff8ceb..8ffdb76 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.c
+++ b/src/lib/efl/interfaces/efl_gfx_shape.c
@@ -13,6 +13,8 @@ struct _Efl_Gfx_Shape_Data
 {
Efl_Gfx_Shape_Public public;
 
+   Efl_Gfx_Fill_Rule fill_rule;
+
struct {
   double x;
   double y;
@@ -435,6 +437,7 @@ _efl_gfx_shape_dup(Eo *obj, Efl_Gfx_Shape_Data *pd, const 
Eo *dup_from)
 {
const Efl_Gfx_Dash *dash = NULL;
Efl_Gfx_Shape_Data *from;
+   Efl_Gfx_Fill_Rule fill_rule;
unsigned int dash_length = 0;
Efl_Gfx_Cap cap;
Efl_Gfx_Join j;
@@ -453,7 +456,8 @@ _efl_gfx_shape_dup(Eo *obj, Efl_Gfx_Shape_Data *pd, const 
Eo *dup_from)
  location = efl_gfx_shape_stroke_location_get(),
  efl_gfx_shape_stroke_dash_get(, _length),
  cap = efl_gfx_shape_stroke_cap_get(),
- j = efl_gfx_shape_stroke_join_get());
+ j = efl_gfx_shape_stroke_join_get(),
+ fill_rule = efl_gfx_shape_fill_rule_get());
eo_do(obj,
  efl_gfx_shape_stroke_scale_set(scale),
  efl_gfx_shape_stroke_color_set(sr, sg, sb, sa),
@@ -461,7 +465,8 @@ _efl_gfx_shape_dup(Eo *obj, Efl_Gfx_Shape_Data *pd, const 
Eo *dup_from)
  efl_gfx_shape_stroke_location_set(location),
  efl_gfx_shape_stroke_dash_set(dash, dash_length),
  efl_gfx_shape_stroke_cap_set(cap),
- efl_gfx_shape_stroke_join_set(j));
+ efl_gfx_shape_stroke_join_set(j),
+ efl_gfx_shape_fill_rule_set(fill_rule));
 
_efl_gfx_shape_path_set(obj, pd, from->commands, from->points);
 
@@ -1497,4 +1502,19 @@ _efl_gfx_shape_stroke_join_get(Eo *obj EINA_UNUSED,
return pd->public.stroke.join;
 }
 
+static void
+_efl_gfx_shape_fill_rule_set(Eo *obj EINA_UNUSED,
+ Efl_Gfx_Shape_Data *pd,
+ Efl_Gfx_Fill_Rule fill_rule)
+{
+   pd->fill_rule = fill_rule;
+}
+
+static Efl_Gfx_Fill_Rule
+_efl_gfx_shape_fill_rule_get(Eo *obj EINA_UNUSED,
+ Efl_Gfx_Shape_Data *pd)
+{
+   return pd->fill_rule;
+}
+
 #include "interfaces/efl_gfx_shape.eo.c"
diff --git a/src/lib/efl/interfaces/efl_gfx_shape.eo 
b/src/lib/efl/interfaces/efl_gfx_shape.eo
index 395e542..4943522 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.eo
+++ b/src/lib/efl/interfaces/efl_gfx_shape.eo
@@ -125,6 +125,25 @@ mixin Efl.Gfx.Shape
 j: Efl_Gfx_Join; [[join style to use, default is 
EFL_GFX_JOIN_MITER]]
  }
   }
+  @property fill_rule {
+ set {
+[[Sets the fill rule of the given shape object.
+  $EFL_GFX_FILL_RULE_WINDING, or $EFL_GFX_FILL_RULE_ODD_EVEN.
+
+  @since 1.14
+]]
+ }
+ get {
+[[Retrieves the fill rule for the given shape object.
+
+  @since 1.14
+]]
+ }
+ values {
+fill_rule: Efl_Gfx_Fill_Rule; [[The current fill rule of the shape 
object.
+   One of $EFL_GFX_FILL_RULE_WINDING, 
$EFL_GFX_FILL_RULE_ODD_EVEN]]
+ }
+  }
   @property path {
  set {
 

[EGIT] [core/efl] master 06/07: ector: support fill rule for shape object.

2015-11-24 Thread Subhransu Mohanty
cedric pushed a commit to branch master.

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

commit 055354050e7e7c43a67c7361b9edba9fc9e56314
Author: Subhransu Mohanty 
Date:   Wed Nov 18 14:45:16 2015 +0900

ector: support fill rule for shape object.

Signed-off-by: Cedric BAIL 
---
 src/lib/ector/cairo/ector_renderer_cairo_shape.c   | 15 +++
 src/lib/ector/software/ector_renderer_software_shape.c | 10 +-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.c 
b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
index cd9f9d3..a174cd1 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
@@ -26,6 +26,11 @@ typedef enum _cairo_line_join {
   CAIRO_LINE_JOIN_BEVEL
 } cairo_line_join_t;
 
+typedef enum _cairo_fill_rule {
+  CAIRO_FILL_RULE_WINDING,
+  CAIRO_FILL_RULE_EVEN_ODD
+} cairo_fill_rule_t;
+
 static void (*cairo_move_to)(cairo_t *cr, double x, double y) = NULL;
 static void (*cairo_line_to)(cairo_t *cr, double x, double y) = NULL;
 static void (*cairo_curve_to)(cairo_t *cr,
@@ -56,6 +61,7 @@ static void (*cairo_save)(cairo_t *cr) = NULL;
 static void (*cairo_restore)(cairo_t *cr) = NULL;
 
 static void (*cairo_set_dash) (cairo_t *cr, const double *dashes, int 
num_dashes, double offset) = NULL;
+static void (*cairo_set_fill_rule) (cairo_t *cr, cairo_fill_rule_t fill_rule);
 
 typedef struct _Ector_Renderer_Cairo_Shape_Data 
Ector_Renderer_Cairo_Shape_Data;
 struct _Ector_Renderer_Cairo_Shape_Data
@@ -153,6 +159,7 @@ 
_ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rend
 {
int r, g, b, a;
unsigned i;
+   Efl_Gfx_Fill_Rule fill_rule;
 
if (pd->path == NULL) return EINA_FALSE;
 
@@ -163,6 +170,12 @@ 
_ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rend
cairo_new_path(pd->parent->cairo);
cairo_append_path(pd->parent->cairo, pd->path);
 
+   eo_do(obj, fill_rule = efl_gfx_shape_fill_rule_get());
+   if (fill_rule == EFL_GFX_FILL_RULE_ODD_EVEN)
+ cairo_set_fill_rule(pd->parent->cairo, CAIRO_FILL_RULE_EVEN_ODD);
+  else
+cairo_set_fill_rule(pd->parent->cairo, CAIRO_FILL_RULE_WINDING);
+
if (pd->shape->fill)
  eo_do(pd->shape->fill, ector_renderer_cairo_base_fill(mul_col));
 
@@ -240,6 +253,7 @@ Eo *
 _ector_renderer_cairo_shape_eo_base_constructor(Eo *obj, 
Ector_Renderer_Cairo_Shape_Data *pd)
 {
eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, obj = eo_constructor());
+
if (!obj) return NULL;
 
pd->public_shape = eo_data_xref(obj, EFL_GFX_SHAPE_MIXIN, obj);
@@ -276,6 +290,7 @@ _ector_renderer_cairo_shape_eo_base_finalize(Eo *obj, 
Ector_Renderer_Cairo_Shape
USE(pd->base, cairo_curve_to, NULL);
USE(pd->base, cairo_line_to, NULL);
USE(pd->base, cairo_move_to, NULL);
+   USE(pd->base, cairo_set_fill_rule, NULL);
 
return obj;
 }
diff --git a/src/lib/ector/software/ector_renderer_software_shape.c 
b/src/lib/ector/software/ector_renderer_software_shape.c
index 5497dda..a9a8c95 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -520,13 +520,21 @@ _update_rle(Eo *obj, Ector_Renderer_Software_Shape_Data 
*pd)
const Efl_Gfx_Path_Command *cmds = NULL;
const double *pts = NULL;
Eina_Bool close_path;
+   Efl_Gfx_Fill_Rule fill_rule;
Outline *outline, *dash_outline;
 
-   eo_do(obj, efl_gfx_shape_path_get(, ));
+   eo_do(obj,
+ efl_gfx_shape_path_get(, ),
+ fill_rule = efl_gfx_shape_fill_rule_get());
if (cmds && (_generate_stroke_data(pd) || _generate_shape_data(pd)))
  {
 outline = _outline_create();
 close_path = _generate_outline(cmds, pts, outline);
+if (fill_rule == EFL_GFX_FILL_RULE_ODD_EVEN)
+  outline->ft_outline.flags = SW_FT_OUTLINE_EVEN_ODD_FILL;
+else
+  outline->ft_outline.flags = SW_FT_OUTLINE_NONE; // default is 
winding fill
+
 _outline_transform(outline, pd->base->m);
 
 //shape data generation 

-- 




[EGIT] [core/efl] master 07/07: ector: cleanup freetype raster

2015-11-24 Thread Subhransu Mohanty
cedric pushed a commit to branch master.

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

commit 1aa1bbc131e1bdd0b20acb1db43134d38858c604
Author: Subhransu Mohanty 
Date:   Thu Oct 29 17:20:09 2015 +0900

ector: cleanup freetype raster

Signed-off-by: Cedric BAIL 
---
 src/static_libs/freetype/sw_ft_raster.c | 41 -
 1 file changed, 41 deletions(-)

diff --git a/src/static_libs/freetype/sw_ft_raster.c 
b/src/static_libs/freetype/sw_ft_raster.c
index 4a41c3a..b2d96aa 100644
--- a/src/static_libs/freetype/sw_ft_raster.c
+++ b/src/static_libs/freetype/sw_ft_raster.c
@@ -101,9 +101,6 @@ typedef ptrdiff_t  SW_FT_PtrDist;
 #define SW_FT_UNUSED( x )  (x) = (x)
 
 
-#define SW_FT_TRACE5( x )  do { } while ( 0 ) /* nothing */
-#define SW_FT_TRACE7( x )  do { } while ( 0 ) /* nothing */
-#define SW_FT_ERROR( x )   do { } while ( 0 ) /* nothing */
 #define SW_FT_THROW( e )   SW_FT_ERR_CAT( ErrRaster_, e )
 
   /* The size in bytes of the render pool used by the scan-line converter  */
@@ -350,10 +347,8 @@ typedef struct  SW_FT_Outline_Funcs_
 SW_FT_PtrDist  max_cells;
 SW_FT_PtrDist  num_cells;
 
-TCoord  cx, cy;
 TPosx,  y;
 
-TPoslast_ey;
 
 SW_FT_Vector   bez_stack[32 * 3 + 1];
 int lev_stack[32];
@@ -588,7 +583,6 @@ typedef struct  SW_FT_Outline_Funcs_
 ras.cover   = 0;
 ras.ex  = ex - ras.min_ex;
 ras.ey  = ey - ras.min_ey;
-ras.last_ey = SUBPIXELS( ey );
 ras.invalid = 0;
 
 gray_set_cell( RAS_VAR_ ex, ey );
@@ -1238,8 +1232,6 @@ typedef struct  SW_FT_Outline_Funcs_
   int  last;  /* index of last point in contour */
 
 
-  SW_FT_TRACE5(( "SW_FT_Outline_Decompose: Outline %d\n", n ));
-
   last  = outline->contours[n];
   if ( last < 0 )
 goto Invalid_Outline;
@@ -1287,8 +1279,6 @@ typedef struct  SW_FT_Outline_Funcs_
 tags--;
   }
 
-  SW_FT_TRACE5(( "  move to (%.2f, %.2f)\n",
-  v_start.x / 64.0, v_start.y / 64.0 ));
   error = func_interface->move_to( _start, user );
   if ( error )
 goto Exit;
@@ -1309,8 +1299,6 @@ typedef struct  SW_FT_Outline_Funcs_
 vec.x = SCALED( point->x );
 vec.y = SCALED( point->y );
 
-SW_FT_TRACE5(( "  line to (%.2f, %.2f)\n",
-vec.x / 64.0, vec.y / 64.0 ));
 error = func_interface->line_to( , user );
 if ( error )
   goto Exit;
@@ -1337,10 +1325,6 @@ typedef struct  SW_FT_Outline_Funcs_
 
 if ( tag == SW_FT_CURVE_TAG_ON )
 {
-  SW_FT_TRACE5(( "  conic to (%.2f, %.2f)"
-  " with control (%.2f, %.2f)\n",
-  vec.x / 64.0, vec.y / 64.0,
-  v_control.x / 64.0, v_control.y / 64.0 ));
   error = func_interface->conic_to( _control, , user );
   if ( error )
 goto Exit;
@@ -1353,10 +1337,6 @@ typedef struct  SW_FT_Outline_Funcs_
 v_middle.x = ( v_control.x + vec.x ) / 2;
 v_middle.y = ( v_control.y + vec.y ) / 2;
 
-SW_FT_TRACE5(( "  conic to (%.2f, %.2f)"
-" with control (%.2f, %.2f)\n",
-v_middle.x / 64.0, v_middle.y / 64.0,
-v_control.x / 64.0, v_control.y / 64.0 ));
 error = func_interface->conic_to( _control, _middle, user );
 if ( error )
   goto Exit;
@@ -1365,10 +1345,6 @@ typedef struct  SW_FT_Outline_Funcs_
 goto Do_Conic;
   }
 
-  SW_FT_TRACE5(( "  conic to (%.2f, %.2f)"
-  " with control (%.2f, %.2f)\n",
-  v_start.x / 64.0, v_start.y / 64.0,
-  v_control.x / 64.0, v_control.y / 64.0 ));
   error = func_interface->conic_to( _control, _start, user );
   goto Close;
 
@@ -1398,22 +1374,12 @@ typedef struct  SW_FT_Outline_Funcs_
   vec.x = SCALED( point->x );
   vec.y = SCALED( point->y );
 
-  SW_FT_TRACE5(( "  cubic to (%.2f, %.2f)"
-  " with controls (%.2f, %.2f) and (%.2f, %.2f)\n",
-  vec.x / 64.0, vec.y / 64.0,
-  vec1.x / 64.0, vec1.y / 64.0,
-  vec2.x / 64.0, vec2.y / 64.0 ));
   error = func_interface->cubic_to( , , , user );
   if ( error )
 goto Exit;
   continue;
 }
 
-SW_FT_TRACE5(( "  cubic to (%.2f, %.2f)"
-" with controls (%.2f, %.2f) and (%.2f, %.2f)\n",
-v_start.x / 64.0, v_start.y / 64.0,
-vec1.x / 64.0, vec1.y / 64.0,
-vec2.x / 64.0, vec2.y / 64.0 ));
 error = 

[EGIT] [core/efl] master 04/07: efl: make path stroke related api as non virtual.

2015-11-24 Thread Subhransu Mohanty
cedric pushed a commit to branch master.

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

commit 609f74994bbb7d054fde95f7b284cebb949b2ad0
Author: Subhransu Mohanty 
Date:   Wed Nov 18 11:13:00 2015 +0900

efl: make path stroke related api as non virtual.

Signed-off-by: Cedric BAIL 
---
 src/lib/ector/cairo/ector_renderer_cairo_shape.c   |  44 +++---
 src/lib/ector/ector_private.h  |  14 --
 src/lib/ector/ector_renderer_generic_shape.eo  |   9 --
 src/lib/ector/ector_renderer_shape.c   | 131 
 .../ector/software/ector_renderer_software_shape.c |  70 +
 src/lib/efl/Efl.h  |  31 +++-
 src/lib/efl/interfaces/efl_gfx_shape.c | 131 
 src/lib/efl/interfaces/efl_gfx_shape.eo|  16 --
 src/lib/evas/canvas/efl_vg_shape.eo|   7 -
 src/lib/evas/canvas/evas_vg_shape.c| 170 ++---
 10 files changed, 238 insertions(+), 385 deletions(-)

diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.c 
b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
index a78ddaf..cd9f9d3 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
@@ -60,9 +60,12 @@ static void (*cairo_set_dash) (cairo_t *cr, const double 
*dashes, int num_dashes
 typedef struct _Ector_Renderer_Cairo_Shape_Data 
Ector_Renderer_Cairo_Shape_Data;
 struct _Ector_Renderer_Cairo_Shape_Data
 {
+   Efl_Gfx_Shape_Public *public_shape;
+
Ector_Cairo_Surface_Data *parent;
Ector_Renderer_Generic_Shape_Data *shape;
Ector_Renderer_Generic_Base_Data *base;
+
cairo_path_t *path;
 };
 
@@ -163,7 +166,7 @@ 
_ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rend
if (pd->shape->fill)
  eo_do(pd->shape->fill, ector_renderer_cairo_base_fill(mul_col));
 
-   if (pd->shape->stroke.fill || pd->shape->stroke.color.a > 0)
+   if (pd->shape->stroke.fill || pd->public_shape->stroke.color.a > 0)
  {
 cairo_fill_preserve(pd->parent->cairo);
 
@@ -171,31 +174,31 @@ 
_ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rend
   eo_do(pd->shape->stroke.fill, 
ector_renderer_cairo_base_fill(mul_col));
else
  {
-r = (((pd->shape->stroke.color.r * R_VAL(_col)) + 0xff) >> 8);
-g = (((pd->shape->stroke.color.g * G_VAL(_col)) + 0xff) >> 8);
-b = (((pd->shape->stroke.color.b * B_VAL(_col)) + 0xff) >> 8);
-a = (((pd->shape->stroke.color.a * A_VAL(_col)) + 0xff) >> 8);
+r = (((pd->public_shape->stroke.color.r * R_VAL(_col)) + 0xff) 
>> 8);
+g = (((pd->public_shape->stroke.color.g * G_VAL(_col)) + 0xff) 
>> 8);
+b = (((pd->public_shape->stroke.color.b * B_VAL(_col)) + 0xff) 
>> 8);
+a = (((pd->public_shape->stroke.color.a * A_VAL(_col)) + 0xff) 
>> 8);
 ector_color_argb_unpremul(a, , , );
 cairo_set_source_rgba(pd->parent->cairo, r/255.0, g/255.0, 
b/255.0, a/255.0);
-if (pd->shape->stroke.dash)
+if (pd->public_shape->stroke.dash)
   {
  double *dashinfo;
 
- dashinfo = (double *) malloc(2 * 
pd->shape->stroke.dash_length * sizeof(double));
- for (i = 0; i < pd->shape->stroke.dash_length; i++)
+ dashinfo = (double *) malloc(2 * 
pd->public_shape->stroke.dash_length * sizeof(double));
+ for (i = 0; i < pd->public_shape->stroke.dash_length; i++)
{
-  dashinfo[i*2] = pd->shape->stroke.dash[i].length;
-  dashinfo[i*2 + 1] = pd->shape->stroke.dash[i].gap;
+  dashinfo[i*2] = pd->public_shape->stroke.dash[i].length;
+  dashinfo[i*2 + 1] = pd->public_shape->stroke.dash[i].gap;
}
- cairo_set_dash(pd->parent->cairo, dashinfo, 
pd->shape->stroke.dash_length * 2, 0);
+ cairo_set_dash(pd->parent->cairo, dashinfo, 
pd->public_shape->stroke.dash_length * 2, 0);
  free(dashinfo);
   }
  }
 
// Set dash, cap and join
-   cairo_set_line_width(pd->parent->cairo, (pd->shape->stroke.width * 
pd->shape->stroke.scale * 2));
-   cairo_set_line_cap(pd->parent->cairo, (cairo_line_cap_t) 
pd->shape->stroke.cap);
-   cairo_set_line_join(pd->parent->cairo, (cairo_line_join_t) 
pd->shape->stroke.join);
+   cairo_set_line_width(pd->parent->cairo, (pd->public_shape->stroke.width 
* pd->public_shape->stroke.scale * 2));
+   cairo_set_line_cap(pd->parent->cairo, (cairo_line_cap_t) 
pd->public_shape->stroke.cap);
+   cairo_set_line_join(pd->parent->cairo, (cairo_line_join_t) 
pd->public_shape->stroke.join);

[EGIT] [core/efl] master 02/07: ector: updated the freetype raster with faster line renderer.

2015-11-24 Thread Subhransu Mohanty
cedric pushed a commit to branch master.

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

commit da47b4df13272cc5a1be3dfd1a827b92aa606c41
Author: Subhransu Mohanty 
Date:   Thu Oct 29 16:59:51 2015 +0900

ector: updated the freetype raster with faster line renderer.

Merged from freetype repo with 'smooth', faster, alternative line renderer.

Signed-off-by: Cedric BAIL 
---
 src/static_libs/freetype/sw_ft_raster.c | 327 +++-
 1 file changed, 113 insertions(+), 214 deletions(-)

diff --git a/src/static_libs/freetype/sw_ft_raster.c 
b/src/static_libs/freetype/sw_ft_raster.c
index 38b8539..4a41c3a 100644
--- a/src/static_libs/freetype/sw_ft_raster.c
+++ b/src/static_libs/freetype/sw_ft_raster.c
@@ -71,8 +71,10 @@
 #include 
 #include 
 #include 
-#define SW_FT_UINT_MAX  UINT_MAX
-#define SW_FT_INT_MAX   INT_MAX
+#define SW_FT_UINT_MAX   UINT_MAX
+#define SW_FT_INT_MAXINT_MAX
+#define SW_FT_ULONG_MAX  ULONG_MAX
+#define SW_FT_CHAR_BIT   CHAR_BIT
 
 #define ft_memset   memset
 
@@ -268,6 +270,14 @@ typedef struct  SW_FT_Outline_Funcs_
   SW_FT_END_STMNT
 #endif /* __arm__ */
 
+  /* These macros speed up repetitive divisions by replacing them */
+  /* with multiplications and right shifts.   */ 
+#define SW_FT_UDIVPREP( b )   \
+  long  b ## _r = (long)( SW_FT_ULONG_MAX >> PIXEL_BITS ) / ( b )
+#define SW_FT_UDIV( a, b )\
+  ( ( (unsigned long)( a ) * (unsigned long)( b ## _r ) ) >>   \
+( sizeof( long ) * SW_FT_CHAR_BIT - PIXEL_BITS ) )
+
 
   /*/
   /*   */
@@ -584,251 +594,140 @@ typedef struct  SW_FT_Outline_Funcs_
 gray_set_cell( RAS_VAR_ ex, ey );
   }
 
-
   /*/
   /*   */
-  /* Render a scanline as one or more cells.   */
-  /*   */
-  static void
-  gray_render_scanline( RAS_ARG_ TCoord  ey,
- TPosx1,
- TCoord  y1,
- TPosx2,
- TCoord  y2 )
-  {
-TCoord  ex1, ex2, fx1, fx2, delta, mod;
-longp, first, dx;
-int incr;
-
-
-dx = x2 - x1;
-
-ex1 = TRUNC( x1 );
-ex2 = TRUNC( x2 );
-fx1 = (TCoord)( x1 - SUBPIXELS( ex1 ) );
-fx2 = (TCoord)( x2 - SUBPIXELS( ex2 ) );
-
-/* trivial case.  Happens often */
-if ( y1 == y2 )
-{
-  gray_set_cell( RAS_VAR_ ex2, ey );
-  return;
-}
-
-/* everything is located in a single cell.  That is easy! */
-/**/
-if ( ex1 == ex2 )
-{
-  delta  = y2 - y1;
-  ras.area  += (TArea)(( fx1 + fx2 ) * delta);
-  ras.cover += delta;
-  return;
-}
-
-/* ok, we'll have to render a run of adjacent cells on the same */
-/* scanline...  */
-/*  */
-p = ( ONE_PIXEL - fx1 ) * ( y2 - y1 );
-first = ONE_PIXEL;
-incr  = 1;
-
-if ( dx < 0 )
-{
-  p = fx1 * ( y2 - y1 );
-  first = 0;
-  incr  = -1;
-  dx= -dx;
-}
-
-SW_FT_DIV_MOD( TCoord, p, dx, delta, mod );
-
-ras.area  += (TArea)(( fx1 + first ) * delta);
-ras.cover += delta;
-
-ex1 += incr;
-gray_set_cell( RAS_VAR_ ex1, ey );
-y1  += delta;
-
-if ( ex1 != ex2 )
-{
-  TCoord  lift, rem;
-
-
-  p = ONE_PIXEL * ( y2 - y1 + delta );
-  SW_FT_DIV_MOD( TCoord, p, dx, lift, rem );
-
-  mod -= (int)dx;
-
-  while ( ex1 != ex2 )
-  {
-delta = lift;
-mod  += rem;
-if ( mod >= 0 )
-{
-  mod -= (TCoord)dx;
-  delta++;
-}
-
-ras.area  += (TArea)(ONE_PIXEL * delta);
-ras.cover += delta;
-y1+= delta;
-ex1   += incr;
-gray_set_cell( RAS_VAR_ ex1, ey );
-  }
-}
-
-delta  = y2 - y1;
-ras.area  += (TArea)(( fx2 + ONE_PIXEL - first ) * delta);
-ras.cover += delta;
-  }
-
-
-  /*/
-  /*   */
-  /* Render a given line as a series of scanlines. */
+  /* Render a straight line across multiple cells in any direction.*/
   /*   */
   static void
   gray_render_line( RAS_ARG_ 

[EGIT] [core/efl] master 01/07: ector: fix the rounding issue when applying transformation to shape data in freetype backend.

2015-11-24 Thread Subhransu Mohanty
cedric pushed a commit to branch master.

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

commit a6e168675dfc908216d16fe0e405ba0b7e49c0cc
Author: Subhransu Mohanty 
Date:   Wed Oct 21 16:00:28 2015 +0900

ector: fix the rounding issue when applying transformation to shape data in 
freetype backend.

@fix

Signed-off-by: Cedric BAIL 
---
 src/lib/ector/software/ector_renderer_software_shape.c | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/lib/ector/software/ector_renderer_software_shape.c 
b/src/lib/ector/software/ector_renderer_software_shape.c
index 71c2898..1198fb2 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -31,7 +31,7 @@ typedef struct _Outline
 }Outline;
 
 
-#define TO_FT_COORD(x) ((x) * 64); // to freetype 26.6 coordinate.
+#define TO_FT_COORD(x) ((x) * 64) // to freetype 26.6 coordinate.
 
 static inline void
 _grow_outline_contour(Outline *outline, int num)
@@ -185,14 +185,15 @@ static void _outline_transform(Outline *outline, 
Eina_Matrix3 *m)
double x, y;
SW_FT_Outline *ft_outline = >ft_outline;
 
-   if (m)
+   if (m && (eina_matrix3_type_get(m) != EINA_MATRIX_TYPE_IDENTITY))
  {
 for (i = 0; i < ft_outline->n_points; i++)
   {
  eina_matrix3_point_transform(m,
-  ft_outline->points[i].x/64,/* 
convert back to normal coord.*/
-  ft_outline->points[i].y/64,/* 
convert back to normal coord.*/
+  ft_outline->points[i].x/64.0,/* 
convert back to normal coord.*/
+  ft_outline->points[i].y/64.0,/* 
convert back to normal coord.*/
   , );
+
  ft_outline->points[i].x = TO_FT_COORD(x);
  ft_outline->points[i].y = TO_FT_COORD(y);
   }

-- 




[EGIT] [core/enlightenment] master 01/01: declare xwayland functions prior to using them

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=913e04bda71918f0d529e22833e4df2d5ac2aa78

commit 913e04bda71918f0d529e22833e4df2d5ac2aa78
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 15:46:10 2015 -0500

declare xwayland functions prior to using them

 #CompileFail
---
 src/modules/xwayland/e_mod_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/modules/xwayland/e_mod_main.c 
b/src/modules/xwayland/e_mod_main.c
index eed026d..5f28e1e 100644
--- a/src/modules/xwayland/e_mod_main.c
+++ b/src/modules/xwayland/e_mod_main.c
@@ -8,6 +8,9 @@
 
 EINTERN void dnd_init(void);
 EINTERN void dnd_shutdown(void);
+E_API int e_modapi_shutdown(E_Module *m EINA_UNUSED);
+
+E_API void *e_modapi_init(E_Module *m);
 
 /* local structures */
 typedef struct _E_XWayland_Server E_XWayland_Server;

-- 




[EGIT] [core/enlightenment] master 01/02: add mechanism for preventing unload of important modules during runtime

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit ef09d3e620d0bd08be990dad1276da6ec5c21a32
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 15:26:10 2015 -0500

add mechanism for preventing unload of important modules during runtime

if a wayland output module is unloaded while the compositor is still
active, bad things will happen
---
 src/bin/e_module.c | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/src/bin/e_module.c b/src/bin/e_module.c
index ffae12f..c211b93 100644
--- a/src/bin/e_module.c
+++ b/src/bin/e_module.c
@@ -147,6 +147,27 @@ _module_is_nosave(const char *name)
return !strncmp(name, "wl_", 3); //block wl_* modules from being saved
 }
 
+static Eina_Bool
+_module_is_important(const char *name)
+{
+   const char *list[] =
+   {
+  "xwayland",
+  "wl_desktop_shell",
+  "wl_drm",
+  "wl_fb",
+  "wl_text_input",
+  "wl_weekeyboard",
+  "wl_wl",
+  "wl_x11",
+   };
+   unsigned int i;
+
+   for (i = 0; i < EINA_C_ARRAY_LENGTH(list); i++)
+ if (eina_streq(name, list[i])) return EINA_TRUE;
+   return EINA_FALSE;
+}
+
 /* externally accessible functions */
 EINTERN int
 e_module_init(void)
@@ -535,6 +556,7 @@ e_module_disable(E_Module *m)
E_OBJECT_CHECK_RETURN(m, 0);
E_OBJECT_TYPE_CHECK_RETURN(m, E_MODULE_TYPE, 0);
if ((!m->enabled) || (m->error)) return 0;
+   if ((!stopping) && _module_is_important(m->name)) return 0;
ret = m->func.shutdown ? m->func.shutdown(m) : 1;
m->data = NULL;
m->enabled = 0;

-- 




[EGIT] [core/enlightenment] master 02/02: use separate handler for x11 fatal errors when using xwayland

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=70c6dc30d19b98cb11ff806d8ad8b42cff7bc11a

commit 70c6dc30d19b98cb11ff806d8ad8b42cff7bc11a
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 15:34:42 2015 -0500

use separate handler for x11 fatal errors when using xwayland

a fatal error with xwayland is not a fatal error for the compositor,
so this should not result in a dead session
---
 src/bin/e_comp_x.c| 3 ++-
 src/modules/xwayland/e_mod_main.c | 9 +
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 2fedda4..fde492e 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -5333,7 +5333,8 @@ e_comp_x_init(void)
 return EINA_FALSE;
  }
 
-   ecore_x_io_error_handler_set(_e_main_cb_x_fatal, NULL);
+   if (e_comp->comp_type == E_PIXMAP_TYPE_X)
+ ecore_x_io_error_handler_set(_e_main_cb_x_fatal, NULL);
 
if (!ecore_x_composite_query())
  {
diff --git a/src/modules/xwayland/e_mod_main.c 
b/src/modules/xwayland/e_mod_main.c
index e73e254..eed026d 100644
--- a/src/modules/xwayland/e_mod_main.c
+++ b/src/modules/xwayland/e_mod_main.c
@@ -253,6 +253,14 @@ fail:
 }
 
 static void
+xwayland_fatal(void *d EINA_UNUSED)
+{
+   /* on xwayland fatal, attempt to restart it */
+   e_modapi_shutdown(NULL);
+   e_modapi_init(NULL);
+}
+
+static void
 xnotify(void *d EINA_UNUSED, Ecore_Thread *eth EINA_UNUSED, void *disp)
 {
if (!disp)
@@ -263,6 +271,7 @@ xnotify(void *d EINA_UNUSED, Ecore_Thread *eth EINA_UNUSED, 
void *disp)
assert(ecore_x_init_from_display(disp));
e_comp_x_init();
dnd_init();
+   ecore_x_io_error_handler_set(xwayland_fatal, NULL);
 }
 
 static void

-- 




[EGIT] [apps/empc] master 01/01: exit without crashing when empdd is run manually with --option

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=fd7ae69962c40dd5c2928e61a07850c997355a6e

commit fd7ae69962c40dd5c2928e61a07850c997355a6e
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 21:31:38 2015 -0500

exit without crashing when empdd is run manually with --option

fix T2591
---
 src/bin/empdd.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/bin/empdd.c b/src/bin/empdd.c
index 63442a3..bdc3ada 100644
--- a/src/bin/empdd.c
+++ b/src/bin/empdd.c
@@ -1387,6 +1387,14 @@ main(int argc, char *argv[])
 {
struct mpd_settings *settings = NULL;
const char *h, *pass, *p = NULL;
+   int i;
+
+   for (i = 0; i < argc; i++)
+ if (argv[i][0] == '-')
+   {
+  fprintf(stderr, "USAGE: %s > \n", argv[0]);
+  return 1;
+   }
 
pass = getenv("MPD_PASSWORD");
p = getenv("MPD_PORT");

-- 




[EGIT] [apps/empc] master 01/02: update gitignore

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=c6ecd8c4c8ce4faaf33e018375109d99bc5247d2

commit c6ecd8c4c8ce4faaf33e018375109d99bc5247d2
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 21:18:41 2015 -0500

update gitignore
---
 .gitignore | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 8220b86..0ca78f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -62,7 +62,7 @@ install-sh
 libtool
 ltmain.sh
 stamp-h1
-org.empd.empc.service
+org.empd.empdd.service
 Lyricwiki*
 *.gmo
 *.po~

-- 




[EGIT] [apps/empc] master 02/02: fix module file build dependencies to include empc.h

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=fc7b9ff717b272295d097588db43b6df7116f2ac

commit fc7b9ff717b272295d097588db43b6df7116f2ac
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 21:26:09 2015 -0500

fix module file build dependencies to include empc.h
---
 src/modules/Makefile.mk | 22 +++---
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/modules/Makefile.mk b/src/modules/Makefile.mk
index ff50952..d925895 100644
--- a/src/modules/Makefile.mk
+++ b/src/modules/Makefile.mk
@@ -9,7 +9,8 @@ if MOD_GLYR_GMPC
 mod_LTLIBRARIES += src/modules/glyr_gmpc.la
 
 src_modules_glyr_gmpc_la_SOURCES = \
-src/modules/glyr_gmpc.c
+src/modules/glyr_gmpc.c \
+src/bin/empc.h
 
 src_modules_glyr_gmpc_la_CPPFLAGS = \
 $(AM_CFLAGS) \
@@ -35,7 +36,8 @@ if MOD_GLYR
 mod_LTLIBRARIES += src/modules/glyr.la
 
 src_modules_glyr_la_SOURCES = \
-src/modules/glyr.c
+src/modules/glyr.c \
+src/bin/empc.h
 
 src_modules_glyr_la_CPPFLAGS = \
 $(AM_CFLAGS) \
@@ -58,7 +60,8 @@ if MOD_GOOGLE_IMAGE
 mod_LTLIBRARIES += src/modules/google_image.la
 
 src_modules_google_image_la_SOURCES = \
-src/modules/google_image.c
+src/modules/google_image.c \
+src/bin/empc.h
 
 src_modules_google_image_la_CPPFLAGS = \
 $(AM_CFLAGS) \
@@ -96,6 +99,7 @@ mod_LTLIBRARIES += src/modules/elyr.la
 
 src_modules_elyr_la_SOURCES = \
 src/modules/elyr.c \
+src/bin/empc.h \
 src/modules/excetra.c \
 src/modules/excetra.h \
 $(ELYR_AZY_SRC)
@@ -127,7 +131,8 @@ mod_LTLIBRARIES += src/modules/eet_saver.la
 
 src_modules_eet_saver_la_SOURCES = \
 src/modules/eet_saver.c \
-src/modules/eet_hash.c
+src/modules/eet_hash.c \
+src/bin/empc.h
 
 src_modules_eet_saver_la_CPPFLAGS = \
 $(AM_CFLAGS) \
@@ -153,7 +158,8 @@ mod_LTLIBRARIES += src/modules/eet_loader.la
 
 src_modules_eet_loader_la_SOURCES = \
 src/modules/eet_loader.c \
-src/modules/eet_hash.c
+src/modules/eet_hash.c \
+src/bin/empc.h
 
 src_modules_eet_loader_la_CPPFLAGS = \
 $(AM_CFLAGS) \
@@ -176,7 +182,8 @@ if MOD_FILESYSTEM_LOADER
 mod_LTLIBRARIES += src/modules/filesystem_loader.la
 
 src_modules_filesystem_loader_la_SOURCES = \
-src/modules/filesystem_loader.c
+src/modules/filesystem_loader.c \
+src/bin/empc.h
 
 src_modules_filesystem_loader_la_CPPFLAGS = \
 $(AM_CFLAGS) \
@@ -199,7 +206,8 @@ if MOD_ID3_LOADER
 mod_LTLIBRARIES += src/modules/id3_loader.la
 
 src_modules_id3_loader_la_SOURCES = \
-src/modules/id3_loader.c
+src/modules/id3_loader.c \
+src/bin/empc.h
 
 src_modules_id3_loader_la_CPPFLAGS = \
 $(AM_CFLAGS) \

-- 




[EGIT] [core/enlightenment] enlightenment-0.19 01/04: avoid setting incorrect geometry during new_client frame calc

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.19.

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

commit c685d799c171037370ece78d670b6203372c71e9
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 17:28:08 2015 -0500

avoid setting incorrect geometry during new_client frame calc

in the case where a client has no geometry set, attempting to update
the client's geometry during frame recalc will guarantee that wrong
geometry is set, resulting in a bad first frame
---
 src/bin/e_comp_object.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c
index bcbe8c0..ab4385c 100644
--- a/src/bin/e_comp_object.c
+++ b/src/bin/e_comp_object.c
@@ -1615,6 +1615,7 @@ _e_comp_smart_cb_frame_recalc(void *data, Evas_Object 
*obj, void *event_info EIN
  evas_object_resize(cw->ec->frame, cw->ec->zone->w, cw->ec->zone->h);
else if (cw->ec->new_client)
  {
+if ((cw->ec->w < 1) || (cw->ec->h < 1)) return;
 e_comp_object_frame_wh_adjust(obj, pw, ph, , );
 evas_object_resize(cw->ec->frame, w, h);
  }

-- 




[EGIT] [core/enlightenment] enlightenment-0.19 04/04: allow more client hooks to bypass delete check

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.19.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=28a40d359f75380e6950a1294d433a4ad07d827a

commit 28a40d359f75380e6950a1294d433a4ad07d827a
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 21:41:48 2015 -0500

allow more client hooks to bypass delete check

failing to propagate these signals can result in a broken compositor
when a client is deleted before/during an operation
---
 src/bin/e_client.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index b8e8c36..80a8ce6 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -323,6 +323,9 @@ _e_client_hook_call(E_Client_Hook_Point hookpoint, E_Client 
*ec)
 if (ch->delete_me) continue;
 ch->func(ch->data, ec);
 if ((hookpoint != E_CLIENT_HOOK_DEL) &&
+  (hookpoint != E_CLIENT_HOOK_MOVE_END) &&
+  (hookpoint != E_CLIENT_HOOK_RESIZE_END) &&
+  (hookpoint != E_CLIENT_HOOK_FOCUS_UNSET) &&
   e_object_is_del(E_OBJECT(ec)))
   break;
  }

-- 




[EGIT] [core/enlightenment] master 01/01: allow more client hooks to bypass delete check

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit ac0cc26765086d3651dccb98e6f96db9a5d97462
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 21:41:48 2015 -0500

allow more client hooks to bypass delete check

failing to propagate these signals can result in a broken compositor
when a client is deleted before/during an operation
---
 src/bin/e_client.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index d393ebe..28191e9 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -315,6 +315,9 @@ _e_client_hook_call(E_Client_Hook_Point hookpoint, E_Client 
*ec)
 if (ch->delete_me) continue;
 ch->func(ch->data, ec);
 if ((hookpoint != E_CLIENT_HOOK_DEL) &&
+  (hookpoint != E_CLIENT_HOOK_MOVE_END) &&
+  (hookpoint != E_CLIENT_HOOK_RESIZE_END) &&
+  (hookpoint != E_CLIENT_HOOK_FOCUS_UNSET) &&
   e_object_is_del(E_OBJECT(ec)))
   break;
  }

-- 




[EGIT] [core/enlightenment] enlightenment-0.19 02/04: use CSD geometry during move/resize display

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.19.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=1ae6f76d7d79533ee453ef242e5ca0c3a3c3b525

commit 1ae6f76d7d79533ee453ef242e5ca0c3a3c3b525
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 17:31:47 2015 -0500

use CSD geometry during move/resize display

this should provide more user-relevant information
---
 src/bin/e_moveresize.c | 20 
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/bin/e_moveresize.c b/src/bin/e_moveresize.c
index 83a6786..6750933 100644
--- a/src/bin/e_moveresize.c
+++ b/src/bin/e_moveresize.c
@@ -56,28 +56,24 @@ e_moveresize_replace(Eina_Bool enable)
 E_API void
 e_moveresize_client_extents(const E_Client *ec, int *w, int *h)
 {
+   if (e_comp_object_frame_allowed(ec->frame))
+ *w = ec->client.w, *h = ec->client.h;
+   else
+ *w = ec->w, *h = ec->h;
if ((ec->icccm.base_w >= 0) &&
(ec->icccm.base_h >= 0))
  {
 if (ec->icccm.step_w > 0)
-  *w = (ec->client.w - ec->icccm.base_w) / ec->icccm.step_w;
-else
-  *w = ec->client.w;
+  *w = (*w - ec->icccm.base_w) / ec->icccm.step_w;
 if (ec->icccm.step_h > 0)
-  *h = (ec->client.h - ec->icccm.base_h) / ec->icccm.step_h;
-else
-  *h = ec->client.h;
+  *h = (*h - ec->icccm.base_h) / ec->icccm.step_h;
  }
else
  {
 if (ec->icccm.step_w > 0)
-  *w = (ec->client.w - ec->icccm.min_w) / ec->icccm.step_w;
-else
-  *w = ec->client.w;
+  *w = (*w - ec->icccm.min_w) / ec->icccm.step_w;
 if (ec->icccm.step_h > 0)
-  *h = (ec->client.h - ec->icccm.min_h) / ec->icccm.step_h;
-else
-  *h = ec->client.h;
+  *h = (*h - ec->icccm.min_h) / ec->icccm.step_h;
  }
 }
 

-- 




[EGIT] [core/enlightenment] enlightenment-0.19 03/04: do not apply max client geometry restriction if max geometry is not set

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.19.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=3732a233e254525d3216132d7cc14e29b0fc1ab6

commit 3732a233e254525d3216132d7cc14e29b0fc1ab6
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 17:34:03 2015 -0500

do not apply max client geometry restriction if max geometry is not set

default values for these is set to a very high value, but it's possible
(and guaranteed) for some clients to set them to a value <= 0, which results
in a broken window
---
 src/bin/e_remember.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_remember.c b/src/bin/e_remember.c
index 5791b92..9b8d5d2 100644
--- a/src/bin/e_remember.c
+++ b/src/bin/e_remember.c
@@ -733,11 +733,11 @@ _e_remember_cb_hook_pre_post_fetch(void *data __UNUSED__, 
E_Client *ec)
}
  if (ec->icccm.min_w > ec->client.w)
ec->client.w = ec->icccm.min_w;
- if (ec->icccm.max_w < ec->client.w)
+ if ((ec->icccm.max_w > 0) && (ec->icccm.max_w < ec->client.w))
ec->client.w = ec->icccm.max_w;
  if (ec->icccm.min_h > ec->client.h)
ec->client.h = ec->icccm.min_h;
- if (ec->icccm.max_h < ec->client.h)
+ if ((ec->icccm.max_h > 0) && (ec->icccm.max_h < ec->client.h))
ec->client.h = ec->icccm.max_h;
   }
 e_comp_object_frame_wh_adjust(ec->frame, ec->client.w, ec->client.h, 
>w, >h);

-- 




[EGIT] [core/efl] master 01/01: Evas: Temporarily hack OT_SUPPORT to fix textgrid

2015-11-24 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 8ccea8233c144f723470da09a01487484c269440
Author: Jean-Philippe Andre 
Date:   Wed Nov 25 15:42:29 2015 +0900

Evas: Temporarily hack OT_SUPPORT to fix textgrid

See T2865.
Since Harfbuzz 1.1.0, terminology displays fonts funnily aligned to
the top. This is apparently because until 1.0.6 the y_offset was
always 0 for all glyphs, but since 1.1.1 the offset is actually
set.

This is a TEMPORARY fix. There might be an underlying issue left
here.

Harfbuzz changed behaviour in this commit:

  commit 44f82750807475aa5b16099d917d488df703
  Author: Behdad Esfahbod 
  Date:   Wed Nov 4 20:40:05 2015 -0800

  [ft] Remove font funcs that do nothing
---
 src/lib/evas/common/evas_font_ot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/common/evas_font_ot.c 
b/src/lib/evas/common/evas_font_ot.c
index a5fe5b2..f24009e 100644
--- a/src/lib/evas/common/evas_font_ot.c
+++ b/src/lib/evas/common/evas_font_ot.c
@@ -318,7 +318,7 @@ evas_common_font_ot_populate_text_props(const Eina_Unicode 
*text,
 Evas_Coord adv;
 ot_itr->source_cluster = infos->cluster;
 ot_itr->x_offset = positions->x_offset;
-ot_itr->y_offset = positions->y_offset;
+ot_itr->y_offset = 0; // FIXME positions->y_offset; FIXME//
 gl_itr->index = infos->codepoint;
 adv = positions->x_advance;
 

-- 




[EGIT] [tools/erigo] master 01/03: Revert "Force Naviframe to be item container"

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=16d2625778f93c5491cbf56f83e31da6745ff7db

commit 16d2625778f93c5491cbf56f83e31da6745ff7db
Author: Yakov Goldberg 
Date:   Tue Nov 24 18:35:22 2015 +0200

Revert "Force Naviframe to be item container"

This reverts commit 95cf8bff8fa231ee6d3bb4cbff645430e4878621.
---
 src/lib/gui_widget.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lib/gui_widget.c b/src/lib/gui_widget.c
index f7bc4e0..95dcf38 100644
--- a/src/lib/gui_widget.c
+++ b/src/lib/gui_widget.c
@@ -1088,8 +1088,7 @@ wdg_new(Gui_Context *ctx, const char *class_name, Eid 
*name_id)
wdg->name_id = name_id;
 
/*If current class inherits from container, create stucture to keep 
content. */
-   if (db_class_inherit_containers_list_get(class_name) &&
-   strcmp(class_name, DB_DEF_NAVIFRAME_CLASS))
+   if (db_class_inherit_containers_list_get(class_name))
  {
 Object_Container *c = _obj_container_new();
 wdg_obj_container_set(wdg, c);

-- 




[EGIT] [tools/erigo] master 03/03: Use proper API to check type of container

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=3ba9fa11c13ea0f601c97e515425d3b1ac7c351f

commit 3ba9fa11c13ea0f601c97e515425d3b1ac7c351f
Author: Yakov Goldberg 
Date:   Tue Nov 24 18:37:58 2015 +0200

Use proper API to check type of container
---
 src/bin/gui/editor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 946476f..00f41ab 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -3529,7 +3529,7 @@ _field_update_from_itemview(void *data EINA_UNUSED, Eo 
*obj, const Eo_Event_Desc
 
   Eid *prev_parent_cont_eid = wdg_parent_container_eid_get(w);
   Gui_Widget *prev_wdg_container = prev_parent_cont_eid ? 
wdg_get(prev_parent_cont_eid) : NULL;
-  if (prev_wdg_container && 
wdg_obj_container_get(prev_wdg_container))
+  if (prev_wdg_container && 
(wdg_container_type_get(prev_wdg_container) == OBJ_CONTAINER))
 {
Object_Container *_old_prev_container, 
*_new_prev_container;
_old_prev_container = (Object_Container *) 
wdg_obj_container_get((Gui_Widget *) prev_wdg_container);

-- 




[EGIT] [tools/erigo] master 01/01: Use proper API to get type of container

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=58e8ef4251a9a8efecfc0c4ce93551eb1c04f9d3

commit 58e8ef4251a9a8efecfc0c4ce93551eb1c04f9d3
Author: Yakov Goldberg 
Date:   Tue Nov 24 18:48:12 2015 +0200

Use proper API to get type of container
---
 src/bin/gui/editor.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 00f41ab..6f12383 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -4007,12 +4007,11 @@ _content_change_from_propview(void *data EINA_UNUSED, 
Eo *obj, const Eo_Event_De
  /* Check if new_widget was packed previously: take it's parent 
and check
   * if widget is packed into it's parent.
   * If so, we need to unpack widget and delete from contents*/
- Gui_Widget *prev_wdg_container = (Gui_Widget *) 
wdg_parent_get(new_param_wdg);
- if (!wdg_obj_container_item_get(prev_wdg_container, -1, 
new_value))
-   prev_wdg_container = NULL;
+ Eid *prev_parent_cont_eid = 
wdg_parent_container_eid_get(new_param_wdg);
+ Gui_Widget *prev_wdg_container = prev_parent_cont_eid ? 
wdg_get(prev_parent_cont_eid) : NULL;
 
  Gui_Session *session = (Gui_Session *) 
gui_context_editor_session_get(ctx);
- if (prev_wdg_container)
+ if (prev_wdg_container && 
(wdg_container_type_get(prev_wdg_container) == OBJ_CONTAINER))
{
   Object_Container *_old_prev_container, *_new_prev_container;
   _old_prev_container = (Object_Container *) 
wdg_obj_container_get((Gui_Widget *) prev_wdg_container);

-- 




[EGIT] [core/enlightenment] master 02/02: fix all shadow warnings in msgbus module

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit ba53e6937b56e25b31e9d9ef63091967b4ab705e
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 12:01:01 2015 -0500

fix all shadow warnings in msgbus module

ref cdb436ee8602728e18a63244988da22b25477819
---
 src/modules/msgbus/msgbus_module.c  | 26 +-
 src/modules/msgbus/msgbus_profile.c | 28 ++--
 2 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/src/modules/msgbus/msgbus_module.c 
b/src/modules/msgbus/msgbus_module.c
index 7a56196..f1823cc 100644
--- a/src/modules/msgbus/msgbus_module.c
+++ b/src/modules/msgbus/msgbus_module.c
@@ -33,14 +33,14 @@ static Eldbus_Message *
 _e_msgbus_module_load_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
  const Eldbus_Message *msg)
 {
-   char *module;
+   char *mod;
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
 
-   if (!eldbus_message_arguments_get(msg, "s", )) return reply;
+   if (!eldbus_message_arguments_get(msg, "s", )) return reply;
 
-   if (!e_module_find(module))
+   if (!e_module_find(mod))
  {
-e_module_new(module);
+e_module_new(mod);
 e_config_save_queue();
  }
 
@@ -51,13 +51,13 @@ static Eldbus_Message *
 _e_msgbus_module_unload_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
const Eldbus_Message *msg)
 {
-   char *module;
+   char *mod;
E_Module *m;
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
 
-   if (!eldbus_message_arguments_get(msg, "s", )) return reply;
+   if (!eldbus_message_arguments_get(msg, "s", )) return reply;
 
-   if ((m = e_module_find(module)))
+   if ((m = e_module_find(mod)))
  {
 e_module_disable(m);
 e_object_del(E_OBJECT(m));
@@ -71,13 +71,13 @@ static Eldbus_Message *
 _e_msgbus_module_enable_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
const Eldbus_Message *msg)
 {
-   char *module;
+   char *mod;
E_Module *m;
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
 
-   if (!eldbus_message_arguments_get(msg, "s", )) return reply;
+   if (!eldbus_message_arguments_get(msg, "s", )) return reply;
 
-   if ((m = e_module_find(module)))
+   if ((m = e_module_find(mod)))
  {
 e_module_enable(m);
 e_config_save_queue();
@@ -90,13 +90,13 @@ static Eldbus_Message *
 _e_msgbus_module_disable_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
 const Eldbus_Message *msg)
 {
-   char *module;
+   char *mod;
E_Module *m;
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
 
-   if (!eldbus_message_arguments_get(msg, "s", )) return reply;
+   if (!eldbus_message_arguments_get(msg, "s", )) return reply;
 
-   if ((m = e_module_find(module)))
+   if ((m = e_module_find(mod)))
  {
 e_module_disable(m);
 e_config_save_queue();
diff --git a/src/modules/msgbus/msgbus_profile.c 
b/src/modules/msgbus/msgbus_profile.c
index 24b2913..84fd910 100644
--- a/src/modules/msgbus/msgbus_profile.c
+++ b/src/modules/msgbus/msgbus_profile.c
@@ -34,14 +34,14 @@ static Eldbus_Message *
 _e_msgbus_profile_set_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
  const Eldbus_Message *msg)
 {
-   char *profile;
+   char *prof;
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
 
-   if (!eldbus_message_arguments_get(msg, "s", ))
+   if (!eldbus_message_arguments_get(msg, "s", ))
  return reply;
 
e_config_save_flush();
-   e_config_profile_set(profile);
+   e_config_profile_set(prof);
e_config_profile_save();
e_config_save_block_set(1);
e_sys_action_do(E_SYS_RESTART, NULL);
@@ -54,11 +54,11 @@ _e_msgbus_profile_get_cb(const Eldbus_Service_Interface 
*iface EINA_UNUSED,
  const Eldbus_Message *msg)
 {
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
-   const char *profile;
+   const char *prof;
 
EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
-   profile = e_config_profile_get();
-   eldbus_message_arguments_append(reply, "s", profile);
+   prof = e_config_profile_get();
+   eldbus_message_arguments_append(reply, "s", prof);
return reply;
 }
 
@@ -95,12 +95,12 @@ static Eldbus_Message *
 _e_msgbus_profile_add_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
  const Eldbus_Message *msg)
 {
-   char *profile;
+   char *prof;
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
 
-   if (!eldbus_message_arguments_get(msg, "s", ))
+   if (!eldbus_message_arguments_get(msg, "s", ))
  return reply;
-   e_config_profile_add(profile);
+   e_config_profile_add(prof);
 
return reply;
 }
@@ -109,15 +109,15 @@ static Eldbus_Message *
 _e_msgbus_profile_delete_cb(const 

[EGIT] [core/enlightenment] master 01/02: reenable restart/shutdown dbus methods under x11

2015-11-24 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit e01b594fbdb345634695836a293fd9d4ef78ff4e
Author: Mike Blumenkrantz 
Date:   Tue Nov 24 11:49:15 2015 -0500

reenable restart/shutdown dbus methods under x11
---
 src/bin/e_msgbus.c | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/bin/e_msgbus.c b/src/bin/e_msgbus.c
index 16f7944..6cc7025 100644
--- a/src/bin/e_msgbus.c
+++ b/src/bin/e_msgbus.c
@@ -110,8 +110,10 @@ static Eldbus_Message *
 _e_msgbus_core_restart_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
   const Eldbus_Message *msg)
 {
-   ERR("DBus restart API disabled for security reasons");
-//   e_sys_action_do(E_SYS_RESTART, NULL);
+   if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
+ ERR("DBus restart API disabled for security reasons");
+   else
+ e_sys_action_do(E_SYS_RESTART, NULL);
return eldbus_message_method_return_new(msg);
 }
 
@@ -119,7 +121,9 @@ static Eldbus_Message *
 _e_msgbus_core_shutdown_cb(const Eldbus_Service_Interface *iface EINA_UNUSED,
const Eldbus_Message *msg)
 {
-   ERR("DBus shutdown API disabled for security reasons");
-//   e_sys_action_do(E_SYS_EXIT, NULL);
+   if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
+ ERR("DBus shutdown API disabled for security reasons");
+   else
+ e_sys_action_do(E_SYS_EXIT, NULL);
return eldbus_message_method_return_new(msg);
 }

-- 




[EGIT] [tools/erigo] master 01/02: Fix bug introduced in prev commit

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=96350acd08b75c803b46345e3279da5355068622

commit 96350acd08b75c803b46345e3279da5355068622
Author: Yakov Goldberg 
Date:   Tue Nov 24 18:12:03 2015 +0200

Fix bug introduced in prev commit
---
 src/bin/gui/editor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index aaf5f52..946476f 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -3527,7 +3527,7 @@ _field_update_from_itemview(void *data EINA_UNUSED, Eo 
*obj, const Eo_Event_Desc
* if widget is packed into it's parent.
* If so, we need to unpack widget and delete from contents*/
 
-  Eid *prev_parent_cont_eid = 
wdg_parent_container_eid_get(wdg);
+  Eid *prev_parent_cont_eid = wdg_parent_container_eid_get(w);
   Gui_Widget *prev_wdg_container = prev_parent_cont_eid ? 
wdg_get(prev_parent_cont_eid) : NULL;
   if (prev_wdg_container && 
wdg_obj_container_get(prev_wdg_container))
 {

-- 




[EGIT] [tools/erigo] master 02/03: Add API to get Container_Type from widget

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=f9659e0f33bf01e9bedb8cb53f0fddd857870825

commit f9659e0f33bf01e9bedb8cb53f0fddd857870825
Author: Yakov Goldberg 
Date:   Tue Nov 24 18:32:00 2015 +0200

Add API to get Container_Type from widget
---
 src/lib/gui_widget.c | 12 
 src/lib/gui_widget.h |  3 +++
 2 files changed, 15 insertions(+)

diff --git a/src/lib/gui_widget.c b/src/lib/gui_widget.c
index 95dcf38..a917e03 100644
--- a/src/lib/gui_widget.c
+++ b/src/lib/gui_widget.c
@@ -1370,6 +1370,18 @@ wdg_copy(const Gui_Widget *src, Eid *dest_id, Eina_Bool 
full)
return dest;
 }
 
+Container_Type
+wdg_container_type_get(const Gui_Widget *wdg)
+{
+   Container_Desc *c_desc = db_container_desc_get(wdg_class_name_get(wdg));
+   if (c_desc)
+ {
+const Op_Desc *op_pack = db_container_desc_op_desc_get(c_desc, 
CONTAINER_PACK);
+if (op_pack) return db_op_desc_container_type_get(op_pack);
+ }
+   return NOT_CONTAINER;
+}
+
 /* Get list of properties of widget. */
 Eina_List *
 wdg_prop_list_get(const Gui_Widget *wdg)
diff --git a/src/lib/gui_widget.h b/src/lib/gui_widget.h
index 20c5fa5..1062a2c 100644
--- a/src/lib/gui_widget.h
+++ b/src/lib/gui_widget.h
@@ -404,6 +404,9 @@ wdg_prop_add(Gui_Widget *wdg, Gui_Widget_Property *prop);
 
 void
 wdg_orphans_check(Gui_Widget *wdg);
+
+Container_Type
+wdg_container_type_get(const Gui_Widget *wdg);
 /* /
 /* Callback Container*/
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Whoops.. Fix Makefile.am

2015-11-24 Thread Stephen Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=70d48d19205224d72963acfb030dd9e37c479c06

commit 70d48d19205224d72963acfb030dd9e37c479c06
Author: Stephen Houston 
Date:   Tue Nov 24 16:34:47 2015 -0600

Ephoto: Whoops.. Fix Makefile.am
---
 src/bin/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 89e7d08..cefe3b6 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -29,5 +29,5 @@ ephoto_SOURCES = \
 ephoto_filters.c \
 ephoto_color.c
 
-noinst_HEADERS = ephoto.h gettext.h
-EXTRA_DIST = ephoto.h gettext.h
+noinst_HEADERS = ephoto.h
+EXTRA_DIST = ephoto.h

-- 




[EGIT] [core/efl] master 01/02: eet: improve error message during eet_close.

2015-11-24 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit 6a7257f5a7c8cbcfc35772dd0f385888b9196203
Author: Cedric BAIL 
Date:   Tue Nov 24 14:27:13 2015 -0800

eet: improve error message during eet_close.
---
 src/lib/eet/eet_lib.c | 30 +-
 1 file changed, 21 insertions(+), 9 deletions(-)

diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c
index 11d0706..4d0dfba 100644
--- a/src/lib/eet/eet_lib.c
+++ b/src/lib/eet/eet_lib.c
@@ -340,17 +340,25 @@ eet_flush2(Eet_File *ef)
 /* opening for write - delete old copy of file right away */
 unlink(ef->path);
 fd = open(ef->path, O_CREAT | O_TRUNC | O_RDWR | O_BINARY, S_IRUSR | 
S_IWUSR);
-if (fd < 0) 
-  return EET_ERROR_NOT_WRITABLE;
+if (fd < 0)
+  {
+ ERR("Can't write file '%s'.", ef->path);
+ return EET_ERROR_NOT_WRITABLE;
+  }
 
 fp = fdopen(fd, "wb");
 if (!fp)
-  return EET_ERROR_NOT_WRITABLE;
+  {
+ ERR("Can't write file '%s'.", ef->path);
+ return EET_ERROR_NOT_WRITABLE;
+  }
 
 if (fcntl(fd, F_SETFD, FD_CLOEXEC)) ERR("can't set CLOEXEC on write 
fd");
  }
else
- return EET_ERROR_NOT_WRITABLE;
+ {
+return EET_ERROR_NOT_WRITABLE;
+ }
 
/* calculate string base offset and data base offset */
num = (1 << ef->header->directory->size);
@@ -436,11 +444,11 @@ eet_flush2(Eet_File *ef)
 for (j = 0; j < ef->ed->count; ++j)
   {
  int sbuf[EET_FILE2_DICTIONARY_ENTRY_COUNT];
-int prev = 0;
+ int prev = 0;
 
  // We still use the prev as an hint for knowing if it is the head 
of the hash
-if (ef->ed->hash[ef->ed->all_hash[j]] == j)
-  prev = -1;
+ if (ef->ed->hash[ef->ed->all_hash[j]] == j)
+   prev = -1;
 
  sbuf[0] = (int)htonl((unsigned int)ef->ed->all_hash[j]);
  sbuf[1] = (int)htonl((unsigned int)offset);
@@ -521,6 +529,7 @@ eet_flush2(Eet_File *ef)
 write_error:
if (ferror(fp))
  {
+ERR("Error during write on '%s'.", ef->path);
 switch (errno)
   {
case EFBIG: error = EET_ERROR_WRITE_ERROR_FILE_TOO_BIG; break;
@@ -1256,11 +1265,14 @@ static Eet_Error
 eet_internal_close(Eet_File *ef,
Eina_Bool locked)
 {
-   Eet_Error err;
+   Eet_Error err = EET_ERROR_NONE;
 
/* check to see its' an eet file pointer */
if (eet_check_pointer(ef))
- return EET_ERROR_BAD_OBJECT;
+ {
+ERR("Bad file descriptor '%p'\n", ef);
+return EET_ERROR_BAD_OBJECT;
+ }
 
if (!locked)
  LOCK_CACHE;

-- 




[EGIT] [tools/erigo] master 01/06: Forbid drop into dummy objects.

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=ee6166365f554e4dcb36677a9144a17698e2bf0e

commit ee6166365f554e4dcb36677a9144a17698e2bf0e
Author: Yakov Goldberg 
Date:   Wed Nov 18 18:01:03 2015 +0200

Forbid drop into dummy objects.

Dummy objects will be ignored during drop target search (iteration)
---
 src/bin/gui/dnd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/bin/gui/dnd.c b/src/bin/gui/dnd.c
index b327917..078716b 100644
--- a/src/bin/gui/dnd.c
+++ b/src/bin/gui/dnd.c
@@ -282,8 +282,7 @@ _drop_target_iterate(Gui_Widget **drop_candidate, const 
Gui_Session *session, Ev
  {
 Gui_Widget *w = wdg_get(wdg_id);
 /* If widget is not active, or is not a drop target, continue. */
-if (!w)
-   continue;
+if (!w || eid_is_dummy(wdg_id)) continue;
 if (wdg_data_get(w, DROP_TARGET))
   {
  o = session_eo_get(session, w);

-- 




[EGIT] [tools/erigo] master 03/06: Set parent_container_eid to widget, when pack it into item container

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=f9e31122ffb445e53a47cfa9a2fd41689f62aa5f

commit f9e31122ffb445e53a47cfa9a2fd41689f62aa5f
Author: Yakov Goldberg 
Date:   Mon Nov 23 19:21:18 2015 +0200

Set parent_container_eid to widget, when pack it into item container
---
 src/bin/gui/editor.c |  2 ++
 src/lib/gui_widget.c | 13 +
 2 files changed, 15 insertions(+)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 0508855..107d3bf 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -3314,6 +3314,7 @@ _field_update_from_itemview(void *data EINA_UNUSED, Eo 
*obj, const Eo_Event_Desc
{
   Gui_Widget *w = wdg_get(name_id);
   wdg_parent_set(w, wdg_name_get(wdg));
+  wdg_parent_container_eid_set(w, wdg_eid_get(wdg));
}
   }
 /* If old_value is some widget, set main_obj as it's parent. */
@@ -3324,6 +3325,7 @@ _field_update_from_itemview(void *data EINA_UNUSED, Eo 
*obj, const Eo_Event_Desc
   Eid *old_name_id = 
gui_context_eid_get_by_name(_active_context_get(), old_value);
   Gui_Widget *w = wdg_get(old_name_id);
   wdg_parent_set(w, wdg_name_get(wdg_main_wdg_get(wdg)));
+  wdg_parent_container_eid_set(w, NULL);
}
   }
 objtree_item_selected_set(wdg);
diff --git a/src/lib/gui_widget.c b/src/lib/gui_widget.c
index 326a9b4..d1c9818 100644
--- a/src/lib/gui_widget.c
+++ b/src/lib/gui_widget.c
@@ -2408,6 +2408,19 @@ wdg_item_insert_after(Gui_Widget *wdg, 
Item_Container_Item *parent_item, Item_Co
 {
_item_container_item_add(wdg, parent_item, after, item);
 
+   const Gui_Widget_Property *prop = item_container_item_prop_get(item);
+   Eina_List *values = prop_value_get(prop), *itr;
+   Gui_Value *val;
+   Eid *weid = NULL;
+   EINA_LIST_FOREACH(values, itr, val)
+ {
+if (gui_value_type_get(val) == GUI_TYPE_OBJECT)
+  {
+ weid = EID_ID_GET(val);
+ if (weid)
+   wdg_parent_container_eid_set(wdg_get(weid), wdg_eid_get(wdg));
+  }
+ }
return EINA_TRUE;
 }
 

-- 




[EGIT] [tools/erigo] master 04/06: Refactoring structure DnD_Main_Obj_Info

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=d8031f06b8fb27df582c849703ce265652139f68

commit d8031f06b8fb27df582c849703ce265652139f68
Author: Yakov Goldberg 
Date:   Thu Nov 19 13:15:16 2015 +0200

Refactoring structure DnD_Main_Obj_Info
---
 src/bin/gui/editor.c | 29 +++--
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 107d3bf..2b167e5 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -41,20 +41,29 @@
 typedef struct
 {
Eo *eo_cur;
-
Eina_Bool packed; /* Need this, because no API to check if object is packed 
into table
 and unpack causes error message. */
-   int box_pack_idx;
-
-   int cell_part_x; /* Which fifth part of sell was selected*/
-   int cell_part_y; /* Used in order to check if need to repack or not. */
+   union
+ {
+/* Box packing data. */
+struct
+  {
+ int box_pack_idx;
+  };
+/* Table packing data. */
+struct
+  {
+ int cell_part_x; /* Which fifth part of sell was selected*/
+ int cell_part_y; /* Used in order to check if need to repack or 
not. */
 
-   int table_w; /* Table width/height. Calculate it once in the beginning. */
-   int table_h;
+ int table_w; /* Table width/height. Calculate it once in the 
beginning. */
+ int table_h;
 
-   int table_pack_x;
-   int table_pack_y;
-   Eina_List *table_borders;
+ int table_pack_x;
+ int table_pack_y;
+ Eina_List *table_borders;
+  };
+ };
 
int pointer_x;
int pointer_y;

-- 




[EGIT] [tools/erigo] master 06/06: Use proper API to detect if object is packed into container

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=a7ee58bf7208764dfb99591229c914f4cef55dd5

commit a7ee58bf7208764dfb99591229c914f4cef55dd5
Author: Yakov Goldberg 
Date:   Tue Nov 24 10:56:01 2015 +0200

Use proper API to detect if object is packed into container
---
 src/bin/gui/editor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 8774555..3bd2ad7 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -2471,8 +2471,8 @@ _drag_start_post(const Gui_Widget *wdg, const Eo *_wdg_eo)
/* Unset selected widget. */
_editor_wdg_selected_set(NULL);
 
-   if (wdg_parent && wdg_obj_container_item_get(wdg_parent, -1, 
wdg_name_get(wdg)))
- wdg_container = wdg_parent;
+   Eid *wdg_parent_cont_eid = wdg_parent_container_eid_get(wdg);
+   wdg_container = wdg_parent_cont_eid ? wdg_get(wdg_parent_cont_eid) : NULL;
 
/* Explicitly call enter cb in order to create object, which will be 
dragged. */
if (IS_MAIN(wdg))

-- 




[EGIT] [tools/erigo] master 01/01: Refactoring/clean up code

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=8e96ecdbd8dbe7156f947dbb14df7b3bfa6c7880

commit 8e96ecdbd8dbe7156f947dbb14df7b3bfa6c7880
Author: Yakov Goldberg 
Date:   Tue Nov 24 16:39:29 2015 +0200

Refactoring/clean up code

use API instead of looking for item manually
---
 src/bin/gui/editor.c | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 28b2014..8340450 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -1817,14 +1817,7 @@ _drop_target_drop(Gui_Widget *drop_target_wdg, Eo 
*canvas_drop_target, const cha
   {
  if (di->drop_to_item)
{
-  const Eina_List *citems = 
wdg_obj_container_contents_list_get(drop_target_wdg), *itr;
-  Object_Container_Item *cit = NULL;
-  EINA_LIST_FOREACH(citems, itr, cit)
-{
-   if (di->drop_to_item == 
obj_container_item_eid_get(cit)) break;
-   cit = NULL;
-}
-
+  Object_Container_Item *cit = 
wdg_obj_container_item_get(drop_target_wdg, -1, eid_name_get(di->drop_to_item));
   if (cit)
 {
Object_Container *_old_container, *_new_container;

-- 




[EGIT] [tools/erigo] master 01/01: Fix behavior widget packing behavior

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=2081557688ab7719d3d602d462964076670bd995

commit 2081557688ab7719d3d602d462964076670bd995
Author: Yakov Goldberg 
Date:   Tue Nov 24 17:19:36 2015 +0200

Fix behavior widget packing behavior

When adding widget into container, need to check if it was previously
packed. If so need to unpack it from previous container and add memento.
---
 src/bin/gui/editor.c | 29 +
 1 file changed, 29 insertions(+)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 0bc4f73..aaf5f52 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -3523,6 +3523,35 @@ _field_update_from_itemview(void *data EINA_UNUSED, Eo 
*obj, const Eo_Event_Desc
  if (type == GUI_TYPE_OBJECT)
{
   Gui_Widget *w = wdg_get(name_id);
+  /* Check if new_widget was packed previously: take it's 
parent and check
+   * if widget is packed into it's parent.
+   * If so, we need to unpack widget and delete from contents*/
+
+  Eid *prev_parent_cont_eid = 
wdg_parent_container_eid_get(wdg);
+  Gui_Widget *prev_wdg_container = prev_parent_cont_eid ? 
wdg_get(prev_parent_cont_eid) : NULL;
+  if (prev_wdg_container && 
wdg_obj_container_get(prev_wdg_container))
+{
+   Object_Container *_old_prev_container, 
*_new_prev_container;
+   _old_prev_container = (Object_Container *) 
wdg_obj_container_get((Gui_Widget *) prev_wdg_container);
+   _new_prev_container = 
obj_container_copy(_old_prev_container);
+
+   memento_command_add(wdg_eid_get(prev_wdg_container),
+   MEMENTO_OBJ_CONTAINER,
+   _old_prev_container, 
_new_prev_container);
+   wdg_obj_container_unset((Gui_Widget *) 
prev_wdg_container);
+   wdg_obj_container_set((Gui_Widget *) 
prev_wdg_container, _new_prev_container);
+
+   /* Take old container's class name from 
content-property. */
+   Object_Container_Item *_ci = 
wdg_obj_container_item_get(prev_wdg_container, -1, new_value);
+   Gui_Widget_Property *old_prop = 
obj_container_item_prop_get(_ci);
+
+   const Op_Desc *old_op_desc = prop_op_desc_get(old_prop);
+   const char *old_container_name = 
db_op_desc_class_name_get(old_op_desc);
+
+   Gui_Session *session = (Gui_Session *) 
gui_context_editor_session_get(_active_context_get());
+   manager_widget_content_unset(session, 
prev_wdg_container, old_container_name, old_prop, NULL);
+   wdg_obj_container_item_remove(prev_wdg_container, _ci);
+}
   wdg_parent_set(w, wdg_name_get(wdg));
   wdg_parent_container_eid_set(w, wdg_eid_get(wdg));
}

-- 




[EGIT] [tools/erigo] master 02/02: Add debug messages for updater

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=5dc71cfc9b8080d84e5a817e96e253d619fb9500

commit 5dc71cfc9b8080d84e5a817e96e253d619fb9500
Author: Yakov Goldberg 
Date:   Tue Nov 24 11:32:58 2015 +0200

Add debug messages for updater
---
 src/lib/updater.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/lib/updater.c b/src/lib/updater.c
index c9a5a90..bcb9ec2 100644
--- a/src/lib/updater.c
+++ b/src/lib/updater.c
@@ -5,6 +5,13 @@
 #include "ffi_glue.h"
 #include "updater.h"
 
+#define DEBUGON 1
+#ifdef DEBUGON
+# define updater_debug(fmt, args...) fprintf(stderr, __FILE__":%s/%d : " fmt 
"\n", __FUNCTION__, __LINE__, ##args)
+#else
+# define updater_debug(x...) do { } while (0)
+#endif
+
 static int _init_counter = 0;
 
 static Ecore_Idler *_idler = NULL;
@@ -178,6 +185,9 @@ _update_check(void *data EINA_UNUSED)
 from = memento_command_new_pointer_get(cmd);
 to = memento_command_old_pointer_get(cmd);
  }
+   updater_debug("Updating %s on %s: %p -> %p",
+ memento_type_get_as_string(type),
+ eid_name_get_internal(eid), from, to);
switch(type)
  {
   case MEMENTO_WIDGET:

-- 




[EGIT] [core/elementary] master 01/01: notify: remove duplicate call of _sizing_eval.

2015-11-24 Thread Amitesh Singh
ami pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=8eff7ce777b30097e5d135efe5d96ce822d80dfe

commit 8eff7ce777b30097e5d135efe5d96ce822d80dfe
Author: Amitesh Singh 
Date:   Tue Nov 24 16:28:01 2015 +0530

notify: remove duplicate call of _sizing_eval.

we are already calling _sizing_eval() inside _calc().
---
 src/lib/elm_notify.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c
index cec6104..5014585 100644
--- a/src/lib/elm_notify.c
+++ b/src/lib/elm_notify.c
@@ -382,7 +382,6 @@ _elm_notify_elm_container_content_set(Eo *obj, 
Elm_Notify_Data *sd, const char *
 edje_object_part_swallow(sd->notify, "elm.swallow.content", content);
  }
 
-   _sizing_eval(obj);
_calc(obj);
 
return EINA_TRUE;
@@ -515,7 +514,6 @@ _elm_notify_elm_widget_parent_set(Eo *obj, Elm_Notify_Data 
*sd, Evas_Object *par
   (parent, EVAS_CALLBACK_DEL, _parent_del_cb, obj);
 evas_object_event_callback_add
   (parent, EVAS_CALLBACK_HIDE, _parent_hide_cb, obj);
-_sizing_eval(obj);
  }
 
_calc(obj);

-- 




[EGIT] [tools/erigo] master 01/03: Fix full widget copy

2015-11-24 Thread Daniel Zaoui
jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=26f304bc60b58afddcaff525bb4db462ebe4eb2f

commit 26f304bc60b58afddcaff525bb4db462ebe4eb2f
Author: Daniel Zaoui 
Date:   Tue Nov 24 13:45:36 2015 +0200

Fix full widget copy

- The previous parent was given for the new widget
- The new child was added twice during copy ( the second one is in
parent_set)
---
 src/lib/gui_widget.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/lib/gui_widget.c b/src/lib/gui_widget.c
index d1c9818..95dcf38 100644
--- a/src/lib/gui_widget.c
+++ b/src/lib/gui_widget.c
@@ -1307,7 +1307,6 @@ wdg_copy(const Gui_Widget *src, Eid *dest_id, Eina_Bool 
full)
if (full)
  {
 Eid *child_id;
-const char *wdg_name = wdg_name_get(src);
 EINA_LIST_FOREACH(src->props_list, itr, prop)
   {
  Gui_Widget_Property *new_prop = prop_copy(prop);
@@ -1322,8 +1321,7 @@ wdg_copy(const Gui_Widget *src, Eid *dest_id, Eina_Bool 
full)
  free(new_name);
  wdg_data_set(child, "_copy", eid);
  child = wdg_copy(child, eid, EINA_TRUE);
- dest->children = eina_list_append(dest->children, eid);
- wdg_parent_set(child, wdg_name);
+ wdg_parent_set(child, eid_name_get(dest_id));
   }
 if (src->obj_container)
   {
@@ -1341,7 +1339,7 @@ wdg_copy(const Gui_Widget *src, Eid *dest_id, Eina_Bool 
full)
eid = eid_new(ctx, new_name, EID_TYPE_WIDGET);
free(new_name);
child = wdg_copy(child, eid, EINA_TRUE);
-   wdg_parent_set(child, wdg_name);
+   wdg_parent_set(child, eid_name_get(dest_id));
 }
   if (eid)
 {

-- 




[EGIT] [tools/erigo] master 02/03: Update basic widget properties

2015-11-24 Thread Daniel Zaoui
jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=def505d39df80c8dea6f9c5a23175fbdc1cad6ae

commit def505d39df80c8dea6f9c5a23175fbdc1cad6ae
Author: Daniel Zaoui 
Date:   Tue Nov 24 14:17:27 2015 +0200

Update basic widget properties
---
 data/layouts/factory.json | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/data/layouts/factory.json b/data/layouts/factory.json
index a0e3406..25ce811 100644
--- a/data/layouts/factory.json
+++ b/data/layouts/factory.json
@@ -63,6 +63,7 @@
  {
 "Elm.Widget.part_text":[null, "Label"],
 "Evas.Object.size_hint_weight":[1, 1],
+"Evas.Object.size_hint_align":[-1, -1],
 "Efl.Gfx.Base.visible":[true],
 "Efl.Gfx.Base.size":[60, 30]
  }
@@ -220,6 +221,7 @@
 "Elm.Entry.scrollable":[true],
 "Elm.Widget.part_text":[null, "Entry"],
 "Evas.Object.size_hint_weight":[1, 1],
+"Evas.Object.size_hint_align":[-1, -1],
 "Efl.Gfx.Base.visible":[true],
 "Efl.Gfx.Base.size":[65, 35]
  }

-- 




[EGIT] [tools/erigo] master 01/02: Convert memento_type_get_as_string() to public API

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=913208d4749bf0b2e297c3028cfe50e83e33f866

commit 913208d4749bf0b2e297c3028cfe50e83e33f866
Author: Yakov Goldberg 
Date:   Tue Nov 24 11:44:49 2015 +0200

Convert memento_type_get_as_string() to public API
---
 src/lib/undoredo.c | 14 +++---
 src/lib/undoredo.h |  3 +++
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/lib/undoredo.c b/src/lib/undoredo.c
index 22bddf2..7fe9686 100644
--- a/src/lib/undoredo.c
+++ b/src/lib/undoredo.c
@@ -79,8 +79,8 @@ struct _Memento
Eina_Bool finalized : 1;
 };
 
-static const char *
-_memento_type_get_as_string(Memento_Type type)
+const char *
+memento_type_get_as_string(Memento_Type type)
 {
switch(type)
  {
@@ -321,7 +321,7 @@ memento_finalize(Memento *memento)
 cmd->new_ptr == cmd_next->old_ptr)
 {
undo_debug("Merging %s on %s: %p -> %p -> %p",
- _memento_type_get_as_string(cmd->type),
+ memento_type_get_as_string(cmd->type),
  eid_name_get_internal(cmd->eid), cmd->old_ptr, 
cmd->new_ptr,
  cmd_next->new_ptr);
/* Swap pointers in order to properly unref data. */
@@ -338,7 +338,7 @@ memento_finalize(Memento *memento)
  if (cmd->old_ptr == cmd->new_ptr)
{
   undo_debug("Deleting %s on %s: %p -> %p",
-_memento_type_get_as_string(cmd->type),
+memento_type_get_as_string(cmd->type),
 eid_name_get_internal(cmd->eid), cmd->old_ptr, 
cmd->new_ptr);
   cmd_del = EINA_TRUE;
   break;
@@ -367,7 +367,7 @@ memento_finalize(Memento *memento)
   if (cmd_del)
 {
undo_debug("Deleting %s on %s: %p -> %p",
- _memento_type_get_as_string(cmd->type),
+ memento_type_get_as_string(cmd->type),
  eid_name_get_internal(cmd->eid), cmd->old_ptr, 
cmd->new_ptr);
break;
 }
@@ -388,7 +388,7 @@ memento_finalize(Memento *memento)
wdg_prop_add(wdg, cmd->old_ptr);
cmd_del = EINA_TRUE;
undo_debug("Deleting %s on %p: %p -> %p",
- _memento_type_get_as_string(cmd->type),
+ memento_type_get_as_string(cmd->type),
  cmd->eid, cmd->old_ptr, cmd->new_ptr);
break;
 }
@@ -584,7 +584,7 @@ context_undo_redo_apply(const Gui_Context *ctx, Eina_Bool 
memento_redo)
   }
 undo_debug("%s : %s on %s: %p -> %p",
memento_redo ? "Redo" : "Undo",
-   _memento_type_get_as_string(cmd->type),
+   memento_type_get_as_string(cmd->type),
eid_name_get_internal(cmd->eid), from, to);
 
 switch (type)
diff --git a/src/lib/undoredo.h b/src/lib/undoredo.h
index 71036eb..7316a55 100644
--- a/src/lib/undoredo.h
+++ b/src/lib/undoredo.h
@@ -64,4 +64,7 @@ memento_command_new_pointer_get(const Memento_Command *cmd);
 Eina_Bool
 context_undo_redo_apply(const Gui_Context *ctx, Eina_Bool memento_redo);
 
+const char *
+memento_type_get_as_string(Memento_Type type);
+
 #endif

-- 




[EGIT] [core/efl] master 04/04: Edje: Add example for hyphenation style

2015-11-24 Thread Daniel Hirt
herdsman pushed a commit to branch master.

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

commit 699a57c7e46e13476b88aa37a0342722919c56d6
Author: Daniel Hirt 
Date:   Thu Nov 19 16:25:04 2015 +0200

Edje: Add example for hyphenation style

A small example how hyphenation is set as a style in TEXTBLOCK parts.
---
 src/examples/edje/Makefile.am  |   9 +-
 src/examples/edje/edje-textblock-hyphenation.c | 114 +
 src/examples/edje/textblock-hyphen.edc |  29 +++
 3 files changed, 149 insertions(+), 3 deletions(-)

diff --git a/src/examples/edje/Makefile.am b/src/examples/edje/Makefile.am
index cdf1ac3..8ffc20a 100644
--- a/src/examples/edje/Makefile.am
+++ b/src/examples/edje/Makefile.am
@@ -49,7 +49,8 @@ toggle_using_filter.edc \
 box_example.edc \
 embryo_tween_anim.edc \
 embryo_set_state_anim.edc \
-bezier-transition-example.edc
+bezier-transition-example.edc \
+textblock-hyphen.edc
 
 DIST_EDCS = $(EDCS)
 
@@ -106,7 +107,8 @@ edje-basic2.c \
 signals2.c \
 edje-swallow2.c \
 edje-multisense.c \
-edje-edit-part-box.c
+edje-edit-part-box.c \
+edje-textblock-hyphenation.c
 
 EXTRA_DIST = $(DIST_EDCS) $(DATA_FILES)
 
@@ -175,7 +177,8 @@ animations2 \
 edje-basic2 \
 signals2 \
 edje-swallow2 \
-edje-edit-part-box
+edje-edit-part-box \
+edje-textblock-hyphenation
 
 if ENABLE_MULTISENSE
 EXTRA_PROGRAMS += edje-multisense
diff --git a/src/examples/edje/edje-textblock-hyphenation.c 
b/src/examples/edje/edje-textblock-hyphenation.c
new file mode 100644
index 000..3bc53ca
--- /dev/null
+++ b/src/examples/edje/edje-textblock-hyphenation.c
@@ -0,0 +1,114 @@
+/**
+ * Edje example for hyphenation option with TEXTBLOCK parts
+ *
+ * You'll need at least one Evas engine built for it (excluding the
+ * buffer one). See stdout/stderr for output.
+ *
+ * @verbatim
+ * edje_cc swallow.edc && gcc -o edje-textblock-hyphenation 
edje-textblock-hyphenation.c `pkg-config --libs --cflags evas ecore ecore-evas 
edje`
+ * @endverbatim
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#else
+# define EINA_UNUSED
+#endif
+
+#ifndef PACKAGE_DATA_DIR
+#define PACKAGE_DATA_DIR "."
+#endif
+
+#include 
+#include 
+#include 
+#include 
+
+#define WIDTH  (300)
+#define HEIGHT (300)
+
+static void
+_on_delete(Ecore_Evas *ee EINA_UNUSED)
+{
+   ecore_main_loop_quit();
+}
+
+/* here just to keep our example's window size and background image's
+ * size in synchrony */
+static void
+_on_canvas_resize(Ecore_Evas *ee)
+{
+   Evas_Object *bg, *edj;
+   int  w;
+   int  h;
+
+   ecore_evas_geometry_get(ee, NULL, NULL, , );
+   bg = ecore_evas_data_get(ee, "background");
+   evas_object_resize(bg, w, h);
+   edj = ecore_evas_data_get(ee, "edje_obj");
+   evas_object_resize(edj, w, h);
+}
+
+int
+main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
+{
+   const char  *edje_file = PACKAGE_DATA_DIR"/textblock-hyphen.edj";
+   Ecore_Evas  *ee;
+   Evas*evas;
+   Evas_Object *bg;
+   Evas_Object *edje_obj;
+
+   if (!ecore_evas_init())
+ return EXIT_FAILURE;
+
+   if (!edje_init())
+ goto shutdown_ecore_evas;
+
+   /* this will give you a window with an Evas canvas under the first
+* engine available */
+   ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
+   if (!ee) goto shutdown_edje;
+
+   ecore_evas_callback_delete_request_set(ee, _on_delete);
+   ecore_evas_callback_resize_set(ee, _on_canvas_resize);
+   ecore_evas_title_set(ee, "Edje Textblock Hyphenation");
+
+   evas = ecore_evas_get(ee);
+
+   bg = evas_object_rectangle_add(evas);
+   evas_object_color_set(bg, 255, 255, 255, 255); /* white bg */
+   evas_object_move(bg, 0, 0); /* at canvas' origin */
+   evas_object_resize(bg, WIDTH, HEIGHT); /* covers full canvas */
+   evas_object_show(bg);
+   ecore_evas_data_set(ee, "background", bg);
+
+   setlocale(LC_MESSAGES, "en_US.UTF-8");
+
+   edje_obj = edje_object_add(evas);
+
+   edje_object_file_set(edje_obj, edje_file, "example_textblock_hyphenation");
+   evas_object_move(edje_obj, 0, 0); /* at canvas' origin */
+   evas_object_resize(edje_obj, WIDTH, HEIGHT);
+   evas_object_show(edje_obj);
+   ecore_evas_data_set(ee, "edje_obj", edje_obj);
+
+   edje_object_part_text_set(edje_obj, "text_part", "Hello world hyphenation 
world");
+
+   ecore_evas_show(ee);
+
+   ecore_main_loop_begin();
+
+   ecore_evas_free(ee);
+   ecore_evas_shutdown();
+   edje_shutdown();
+
+   return EXIT_SUCCESS;
+
+ shutdown_edje:
+   edje_shutdown();
+ shutdown_ecore_evas:
+   ecore_evas_shutdown();
+
+   return EXIT_FAILURE;
+}
+
diff --git a/src/examples/edje/textblock-hyphen.edc 
b/src/examples/edje/textblock-hyphen.edc
new file mode 100644
index 000..6b698e1
--- /dev/null
+++ b/src/examples/edje/textblock-hyphen.edc
@@ -0,0 +1,29 @@
+collections {
+   styles {
+  style { name: "entry_style";
+ base: "font="DejavuSans" font_size=10 color=#000 wrap=hyphenation 

[EGIT] [core/enlightenment] master 02/02: e - efm - rate limit dbus requests to open dirs or files to avoid dos

2015-11-24 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=255d227ac8a2e6f8b7c890cf2900a4f2616c6719

commit 255d227ac8a2e6f8b7c890cf2900a4f2616c6719
Author: Carsten Haitzler (Rasterman) 
Date:   Tue Nov 24 22:06:54 2015 +0900

e - efm - rate limit dbus requests to open dirs or files to avoid dos

in a wayland wold we dont want to trust clients on the other side of a
dbus connection - so rate limit what you can do with efm dbus requests

@fix
---
 src/modules/fileman/e_mod_dbus.c | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/src/modules/fileman/e_mod_dbus.c b/src/modules/fileman/e_mod_dbus.c
index 93a8a7d..2f291c0 100644
--- a/src/modules/fileman/e_mod_dbus.c
+++ b/src/modules/fileman/e_mod_dbus.c
@@ -56,6 +56,21 @@ _e_fileman_dbus_daemon_free(E_Fileman_DBus_Daemon *d)
free(d);
 }
 
+static Eina_Bool
+_e_fileman_dbus_call_rate_limit(void)
+{
+   static double last_call = 0.0;
+   static unsigned long long last_calls = 0;
+   double t = ecore_time_get();
+
+   if ((t - last_call) < 0.5) last_calls++;
+   else last_calls = 0;
+   last_call = t;
+   // if we get more than 10 requests over 0.5 sec - rate limit
+   if (last_calls > 10) return EINA_TRUE;
+   return EINA_FALSE;
+}
+
 static Eldbus_Message *
 _e_fileman_dbus_daemon_open_directory_cb(const Eldbus_Service_Interface *iface 
EINA_UNUSED,
  const Eldbus_Message *msg)
@@ -64,6 +79,12 @@ _e_fileman_dbus_daemon_open_directory_cb(const 
Eldbus_Service_Interface *iface E
char *dev, *to_free = NULL;
E_Zone *zone;
 
+
+   if (_e_fileman_dbus_call_rate_limit())
+ {
+fprintf(stderr, "EFM remote call rate limiting to avoid DOS attacks");
+return eldbus_message_method_return_new(msg);
+ }
if (!eldbus_message_arguments_get(msg, "s", ))
  {
 fprintf(stderr, "Error: getting arguments of OpenDirectory call.\n");
@@ -159,6 +180,11 @@ _e_fileman_dbus_daemon_open_file_cb(const 
Eldbus_Service_Interface *iface EINA_U
char *real_file, *to_free = NULL;
E_Zone *zone;
 
+   if (_e_fileman_dbus_call_rate_limit())
+ {
+fprintf(stderr, "EFM remote call rate limiting to avoid DOS attacks");
+return eldbus_message_method_return_new(msg);
+ }
if (!eldbus_message_arguments_get(msg, "s", _file))
  {
 fprintf(stderr, "ERROR: getting arguments of OpenFile call.\n");

-- 




[EGIT] [core/efl] master 03/04: Evas textblock: add hyphenation tests

2015-11-24 Thread Daniel Hirt
herdsman pushed a commit to branch master.

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

commit a7b0b13c439106a82c2c93096c86f5c128e091a9
Author: Daniel Hirt 
Date:   Thu Nov 12 09:49:08 2015 +0200

Evas textblock: add hyphenation tests
---
 src/tests/evas/evas_test_textblock.c | 67 
 1 file changed, 67 insertions(+)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 61f1431..70592b9 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -16,6 +16,8 @@
 
 #include "evas_tests_helpers.h"
 
+#include 
+
 /* Functions defined in evas_object_textblock.c */
 EAPI Eina_Bool
 _evas_textblock_check_item_node_link(Evas_Object *obj);
@@ -3620,6 +3622,70 @@ START_TEST(evas_textblock_obstacle)
 }
 END_TEST;
 
+static void
+_hyphenation_width_stress(Evas_Object *tb, Evas_Textblock_Cursor *cur)
+{
+   Evas_Coord bw, bh, iw, nw, nh, w, h;
+
+   evas_object_resize(tb, 10, 1000);
+   evas_object_textblock_size_native_get(tb, , );
+   evas_object_resize(tb, 1, 1000);
+   evas_textblock_cursor_format_prepend(cur, 

[EGIT] [core/efl] master 02/04: Evas textblock: add support for hyphenation wrap style

2015-11-24 Thread Daniel Hirt
herdsman pushed a commit to branch master.

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

commit 40dfc4a45dd076465ea36cfb9e7229da58a907f4
Author: Daniel Hirt 
Date:   Tue Oct 13 10:59:19 2015 +0300

Evas textblock: add support for hyphenation wrap style

We now support hyphenation in style. Use "wrap=hyphenation" to use this
wrap option. It will hyphenate based on explicit SOFT HYPHEN ()
placement in the text, and with the (optional) assistance of dictionaries
compatible with Hunspell's "hyphen" library.

This wrap mode favors breaking at hyphen positions in a word, over moving
the whole word to the next line. It will put an additional "-" at the
break position if it was hyphened.

Enabling the hyphen dictionaries is done by adding these configure
options:
  --enable-hyphen (requires Hunspell's "hyphen" library installed)
  --with-dictionaries-hyphen-dir=DIR (specifies the install location of
  the actual .dic dictionary files e.g. /usr/share/hyphen)

Note that dictionary files are expected to be in the form of "en_US.dic"
or anything that ends with it e.g. "hyph_en_US.dic" (this how they are
named in Arch Linux).

@feature
---
 configure.ac |  34 +++
 src/Makefile_Evas.am |   1 +
 src/lib/evas/canvas/evas_object_textblock.c  | 318 ++-
 src/lib/evas/canvas/evas_textblock_hyphenation.x | 148 +++
 4 files changed, 492 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5c46f8f..d6933be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -878,6 +878,9 @@ EINA_CONFIG([MAGIC_DEBUG], [test "x${have_magic_debug}" = 
"xyes"])
 AC_ARG_WITH([xattr-tests-path],
[AS_HELP_STRING([--with-xattr-tests-path=DIR],[path of xattr enabled 
directory to create test 
files])],[XATTR_TEST_DIR=${withval}][AC_DEFINE_UNQUOTED([XATTR_TEST_DIR],["$withval"],
 [xattr enabled directory])])
 
+AC_ARG_WITH([dictionaries-hyphen-dir],
+   [AS_HELP_STRING([--with-dictionaries-hyphen-dir=DIR],[path of 
hunspell-compatible hyphen 
dictionaries])],[EVAS_DICTS_HYPHEN_DIR=${withval}][AC_DEFINE_UNQUOTED([EVAS_DICTS_HYPHEN_DIR],["$withval"],
 [Hunspell-compatible hyphen dictionaries install directory])])
+
 ### Checks for programs
 
 ### Checks for libraries
@@ -1609,6 +1612,18 @@ AC_ARG_ENABLE([harfbuzz],
],
[want_harfbuzz="no"])
 
+# Hyphenation
+AC_ARG_ENABLE([hyphen],
+   [AS_HELP_STRING([--enable-hyphen],[enable text hyphenation support. 
@<:@default=disabled@:>@])],
+   [
+if test "x${enableval}" = "xyes" ; then
+   want_hyphen="yes"
+else
+   want_hyphen="no"
+fi
+   ],
+   [want_hyphen="no"])
+
 # Egl
 AC_ARG_ENABLE([egl],
[AS_HELP_STRING([--enable-egl],[enable EGL rendering. 
@<:@default=disabled@:>@])],
@@ -2066,6 +2081,25 @@ EFL_EVAL_PKGS([EVAS])
 
 ### Checks for header files
 
+if test "x$want_hyphen" = "xyes" ; then
+
+   EFL_CHECK_LIB_CODE([EVAS], [-lhyphen], [have_fct], [[
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
+   ]], [[
+   HyphenDict *dict;
+   ]])
+
+   if test "${have_fct}" = "no"; then
+ AC_MSG_ERROR([Cannot find the hyphen library.])
+   else
+ AC_DEFINE([HAVE_HYPHEN], [1], [have hunspell hyphen support])
+   fi
+fi
+
 if test "x$have_harfbuzz" = "xyes" ; then
 
CPPFLAGS_SAVE="$CPPFLAGS"
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index e5abebc..9cc57a5 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -148,6 +148,7 @@ lib/evas/canvas/evas_object_box.c \
 lib/evas/canvas/evas_object_table.c \
 lib/evas/canvas/evas_object_text.c \
 lib/evas/canvas/evas_object_textblock.c \
+lib/evas/canvas/evas_textblock_hyphenation.x \
 lib/evas/canvas/evas_object_textgrid.c \
 lib/evas/canvas/evas_object_grid.c \
 lib/evas/canvas/evas_font_dir.c \
diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index c559ed2..7a9aafc 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -453,6 +453,7 @@ struct _Evas_Object_Textblock_Format
Eina_Boolwrap_word : 1;  /**< EINA_TRUE if only wraps lines at 
word boundaries, else EINA_FALSE. */
Eina_Boolwrap_char : 1;  /**< EINA_TRUE if wraps at any 
character, else EINA_FALSE. */
Eina_Boolwrap_mixed : 1;  /**< EINA_TRUE if wrap at words if 
possible, else EINA_FALSE. */
+   Eina_Boolwrap_hyphenation : 1;  /**< EINA_TRUE if wrap at mixed 
and hyphenate if possible, else EINA_FALSE. */
Eina_Boolunderline : 1;  /**< EINA_TRUE if a single line under 
the text, else EINA_FALSE */
Eina_Boolunderline2 : 1;  /**< EINA_TRUE if two lines under the 
text, else EINA_FALSE */
Eina_Boolunderline_dash : 1;  /**< 

[EGIT] [core/efl] master 01/04: Eina unicode: add eina_unicode_unicode_to_utf8_range

2015-11-24 Thread Daniel Hirt
herdsman pushed a commit to branch master.

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

commit 89ef4b70b8b6a04a911da8ef94c2124fab031032
Author: Daniel Hirt 
Date:   Sat Nov 21 12:39:00 2015 +0200

Eina unicode: add eina_unicode_unicode_to_utf8_range

Required some special treatment to get words (substring) out of an
input Unicode string to a utf8 one. This saves the trouble converting
the whole string: you input an offset in the Eina_Unicode array, and
provide the required length. That's is, now you can extract words and
whatnot in utf8 form.

To save code I wrapped the original one to get the whole length.
---
 src/lib/eina/eina_unicode.c | 14 +-
 src/lib/eina/eina_unicode.h | 11 +++
 src/tests/eina/eina_test_ustr.c | 17 +
 3 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/src/lib/eina/eina_unicode.c b/src/lib/eina/eina_unicode.c
index c8fddd0..adec87a 100644
--- a/src/lib/eina/eina_unicode.c
+++ b/src/lib/eina/eina_unicode.c
@@ -341,21 +341,20 @@ eina_unicode_utf8_to_unicode(const char *utf, int *_len)
 }
 
 EAPI char *
-eina_unicode_unicode_to_utf8(const Eina_Unicode *uni, int *_len)
+eina_unicode_unicode_to_utf8_range(const Eina_Unicode *uni, int ulen, int 
*_len)
 {
char *buf, *buf2;
const Eina_Unicode *uind;
char *ind;
-   int ulen, len;
+   int i, len;
 
EINA_SAFETY_ON_NULL_RETURN_VAL(uni, NULL);
 
-   ulen = eina_unicode_strlen(uni);
buf = malloc((ulen + 1) * EINA_UNICODE_UTF8_BYTES_PER_CHAR);
if (!buf) return NULL;
 
len = 0;
-   for (uind = uni, ind = buf ; *uind ; uind++)
+   for (uind = uni, ind = buf, i = 0 ; *uind && (i < ulen) ; uind++, i++)
  {
 if (*uind <= 0x7F) /* 1 byte char */
   {
@@ -424,5 +423,10 @@ eina_unicode_unicode_to_utf8(const Eina_Unicode *uni, int 
*_len)
return buf2;
 }
 
+EAPI char *
+eina_unicode_unicode_to_utf8(const Eina_Unicode *uni, int *_len)
+{
+   int len = eina_unicode_strlen(uni);
 
-
+   return eina_unicode_unicode_to_utf8_range(uni, len, _len);
+}
diff --git a/src/lib/eina/eina_unicode.h b/src/lib/eina/eina_unicode.h
index e58b853..7bf4f83 100644
--- a/src/lib/eina/eina_unicode.h
+++ b/src/lib/eina/eina_unicode.h
@@ -179,6 +179,17 @@ EAPI int eina_unicode_utf8_get_len(const char *buf) 
EINA_ARG_NONNULL(1);
 EAPI Eina_Unicode *eina_unicode_utf8_to_unicode(const char *utf, int *_len) 
EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
 
 /**
+ * Converts an Eina_Unicode string to a newly allocated utf-8 substring at 
given length.
+ *
+ * @param uni the Eina_Unicode string
+ * @param ulen the length in the unicode string to convert.
+ * @param _len the length byte length of the return utf8 substring.
+ * @return the newly allocated utf-8 substring.
+ * @since 1.17
+ */
+EAPI char * eina_unicode_unicode_to_utf8_range(const Eina_Unicode *uni, int 
ulen, int *_len) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+/**
  * Converts an Eina_Unicode string to a newly allocated utf-8 string.
  *
  * @param uni the Eina_Unicode string
diff --git a/src/tests/eina/eina_test_ustr.c b/src/tests/eina/eina_test_ustr.c
index f9c28d3..fb36fd9 100644
--- a/src/tests/eina/eina_test_ustr.c
+++ b/src/tests/eina/eina_test_ustr.c
@@ -585,6 +585,10 @@ START_TEST(eina_unicode_utf8_conversion)
char c_in[] = "\xD7\x90""\xEF\xB7\xB6""\x80""\xF0\x9F\x91\x99"
   "\xFB\xBF\xBF\xBF\xBF""\xFD\xBF\xBF\xBF\xBF\xBF""abc";
char *c_out;
+
+   /* Substring of c_in (offset = 2, length = 3) */
+   char c_sub[] = "\x80""\xF0\x9F\x91\x99""\xFB\xBF\xBF\xBF\xBF";
+   char *c_sub_out;
int len;
 
eina_init();
@@ -597,6 +601,19 @@ START_TEST(eina_unicode_utf8_conversion)
fail_if((len != 24) || strcmp(c_in, c_out));
free(c_out);
 
+   /* Range conversion */
+   c_sub_out = eina_unicode_unicode_to_utf8_range(uni_in + 2, 3, );
+   ck_assert_int_eq(len, 10);
+   ck_assert_str_eq(c_sub, c_sub_out);
+
+   c_sub_out = eina_unicode_unicode_to_utf8_range(uni_in, 100, );
+   ck_assert_int_eq(len, 24);
+   ck_assert_str_eq(c_in, c_sub_out);
+
+   c_sub_out = eina_unicode_unicode_to_utf8_range(uni_in, 0, );
+   ck_assert_int_eq(len, 0);
+   ck_assert_str_eq("", c_sub_out);
+
eina_shutdown();
 }
 END_TEST

-- 




[EGIT] [core/enlightenment] master 01/02: e msgbus - move almost all of core dbus methods to msgbus module

2015-11-24 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit cdb436ee8602728e18a63244988da22b25477819
Author: Carsten Haitzler (Rasterman) 
Date:   Tue Nov 24 21:55:10 2015 +0900

e msgbus - move almost all of core dbus methods to msgbus module

for security reaons, all the dbus methods that allow you to mess with
e are now in the msgbus module - load at your own risk. this is
irrelevant in x11, but in wayland this matters as wayland is actually
secure.

this also disables restart and shutdown dbus methods still in core.
they are there but non-functional due to possibly being able to be
abused in a wayland universe to "dos attack" the wm.

@fix
---
 src/bin/e_msgbus.c  | 422 ++--
 src/modules/Makefile_msgbus.mk  |   5 +-
 src/modules/msgbus/e_mod_main.c |  12 +-
 src/modules/msgbus/e_mod_main.h |   3 +
 src/modules/msgbus/msgbus_audit.c   |  17 +-
 src/modules/msgbus/msgbus_desktop.c |  62 ++
 src/modules/msgbus/msgbus_lang.c|  15 +-
 src/modules/msgbus/msgbus_module.c  | 156 +
 src/modules/msgbus/msgbus_profile.c | 137 
 src/modules/msgbus/msgbus_window.c  | 133 
 10 files changed, 494 insertions(+), 468 deletions(-)

diff --git a/src/bin/e_msgbus.c b/src/bin/e_msgbus.c
index 03f8828..16f7944 100644
--- a/src/bin/e_msgbus.c
+++ b/src/bin/e_msgbus.c
@@ -1,115 +1,28 @@
 #include "e.h"
 
-/* local subsystem functions */
-static void   _e_msgbus_request_name_cb(void *data, const 
Eldbus_Message *msg,
-Eldbus_Pending *pending);
-
-static Eldbus_Message *_e_msgbus_core_version_cb(const 
Eldbus_Service_Interface *iface,
-const Eldbus_Message *msg);
-static Eldbus_Message *_e_msgbus_core_restart_cb(const 
Eldbus_Service_Interface *iface,
-const Eldbus_Message *msg);
-static Eldbus_Message *_e_msgbus_core_shutdown_cb(const 
Eldbus_Service_Interface *iface,
- const Eldbus_Message *msg);
-
-static Eldbus_Message *_e_msgbus_module_load_cb(const Eldbus_Service_Interface 
*iface,
-   const Eldbus_Message *msg);
-static Eldbus_Message *_e_msgbus_module_unload_cb(const 
Eldbus_Service_Interface *iface,
- const Eldbus_Message *msg);
-static Eldbus_Message *_e_msgbus_module_enable_cb(const 
Eldbus_Service_Interface *iface,
- const Eldbus_Message *msg);
-static Eldbus_Message *_e_msgbus_module_disable_cb(const 
Eldbus_Service_Interface *iface,
-  const Eldbus_Message *msg);
-static Eldbus_Message *_e_msgbus_module_list_cb(const Eldbus_Service_Interface 
*iface,
-   const Eldbus_Message *msg);
-
-static Eldbus_Message *_e_msgbus_profile_set_cb(const Eldbus_Service_Interface 
*iface,
-   const Eldbus_Message *msg);
-static Eldbus_Message *_e_msgbus_profile_get_cb(const Eldbus_Service_Interface 
*iface,
-   const Eldbus_Message *msg);
-static Eldbus_Message *_e_msgbus_profile_list_cb(const 
Eldbus_Service_Interface *iface,
-const Eldbus_Message *msg);
-static Eldbus_Message *_e_msgbus_profile_add_cb(const Eldbus_Service_Interface 
*iface,
-   const Eldbus_Message *msg);
-static Eldbus_Message *_e_msgbus_profile_delete_cb(const 
Eldbus_Service_Interface *iface,
-  const Eldbus_Message *msg);
-
-#define E_MSGBUS_WIN_ACTION_CB_PROTO(NAME) 
  \
-  static Eldbus_Message * _e_msgbus_window_##NAME##_cb(const 
Eldbus_Service_Interface * iface, \
-  const Eldbus_Message * 
msg)
+#define PATH "/org/enlightenment/wm/RemoteObject"
 
-E_MSGBUS_WIN_ACTION_CB_PROTO(list);
-E_MSGBUS_WIN_ACTION_CB_PROTO(close);
-E_MSGBUS_WIN_ACTION_CB_PROTO(kill);
-E_MSGBUS_WIN_ACTION_CB_PROTO(focus);
-E_MSGBUS_WIN_ACTION_CB_PROTO(iconify);
-E_MSGBUS_WIN_ACTION_CB_PROTO(uniconify);
-E_MSGBUS_WIN_ACTION_CB_PROTO(maximize);
-E_MSGBUS_WIN_ACTION_CB_PROTO(unmaximize);
+/* local subsystem functions */
+static void_e_msgbus_request_name_cb(void *data, const 
Eldbus_Message *msg, Eldbus_Pending *pending);
 
-/* local subsystem globals */
-static E_Msgbus_Data *_e_msgbus_data = NULL;
+static Eldbus_Message *_e_msgbus_core_version_cb(const 
Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
+static Eldbus_Message 

[EGIT] [tools/erigo] master 01/01: Unset old content from container before setting new one

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=d74e3480c353eb93df95124ac2f9c223dc03042d

commit d74e3480c353eb93df95124ac2f9c223dc03042d
Author: Yakov Goldberg 
Date:   Tue Nov 24 15:11:23 2015 +0200

Unset old content from container before setting new one
---
 src/bin/gui/editor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 3bd2ad7..0ade7a6 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -2547,6 +2547,7 @@ _drag_start_post(const Gui_Widget *wdg, const Eo *_wdg_eo)
 
  manager_widget_create((Gui_Session *) session, wi, NULL);
  Eo *dummy_eo = session_eo_get(session, wi);
+ eo_do(wdg_cont_eo, elm_obj_container_content_unset(part));
  eo_do(wdg_cont_eo, elm_obj_container_content_set(part, dummy_eo));
   }
 

-- 




[EGIT] [tools/erigo] master 01/01: Unset old content from container before setting new one 2

2015-11-24 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=026c86ecfed66bec5ca3b8a4d76622d815187f7b

commit 026c86ecfed66bec5ca3b8a4d76622d815187f7b
Author: Yakov Goldberg 
Date:   Tue Nov 24 15:25:55 2015 +0200

Unset old content from container before setting new one 2
---
 src/bin/gui/editor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 0ade7a6..28b2014 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -2433,9 +2433,9 @@ _drop_target_pos(void *data, Eo *obj, Evas_Coord x, 
Evas_Coord y, Elm_Xdnd_Actio
   Eo *ieo = session_eo_get(session, iw);
   Gui_Widget_Property *i_prop = 
obj_container_item_prop_get(cit);
   part = STRING_GET(prop_value_nth_get(i_prop, 0));
+  eo_do(o_container, elm_obj_container_content_unset(part));
   if (ieid == di->drop_to_item)
 {
-   eo_do(o_container, 
elm_obj_container_content_unset(part));
eo_do(ieo, efl_gfx_visible_set(EINA_FALSE));
eo_do(o_container, elm_obj_container_content_set(part, 
di->eo_cur));
di->packed = EINA_TRUE;

--