[EGIT] [core/efl] master 01/02: evas: gif loader - fix out of bounds access on cmap of invalid pixels

2016-04-01 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit dd90b6afadf706aafec9e53a6b1efa8f899ab277
Author: Carsten Haitzler (Rasterman) 
Date:   Sat Apr 2 12:25:52 2016 +0900

evas: gif loader - fix out of bounds access on cmap of invalid pixels

if gif has example 4 colors in colormap, pixels provided still can
hold values higher than 3 (4, 8, 255 etc.) ass a pixel is still a
byte. it should not, but it could. technically it'd be nice for gitlib
to pad its palette out to 256 entires to ensure this cant be a
problem, but it doesn't have to , so make a local copy of the cmap
when decoding pixels and pad out to 256 entires (using color 0 as any
value > pallette ize is invalid anyway so any color will do).

this fixes a possible security attack vector in reading memory out of
bounds of an allocated array. not very far out of bounds - but enough
to cause a crash - ie a dos attack, (not to inject code though).

@fix
---
 .../evas/image_loaders/gif/evas_image_load_gif.c  | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/modules/evas/image_loaders/gif/evas_image_load_gif.c 
b/src/modules/evas/image_loaders/gif/evas_image_load_gif.c
index a9f67f7..5110158 100644
--- a/src/modules/evas/image_loaders/gif/evas_image_load_gif.c
+++ b/src/modules/evas/image_loaders/gif/evas_image_load_gif.c
@@ -46,7 +46,7 @@ do { \
goto on_error; \
 } while (0)
 #define PIX(_x, _y) rows[yin + _y][xin + _x]
-#define CMAP(_v) cmap->Colors[_v]
+#define CMAP(_v) colors[_v]
 #define PIXLK(_p) ARGB_JOIN(0xff, CMAP(_p).Red, CMAP(_p).Green, CMAP(_p).Blue)
 
 // utility funcs...
@@ -120,11 +120,19 @@ _fill_frame(DATA32 *data, int rowpix, GifFileType *gif, 
Frame_Info *finfo,
  {
 ColorMapObject *cmap;
 int bg;
-
+GifColorType colors[256];
+int cnum;
+
 // work out color to use from cmap
 if (gif->Image.ColorMap) cmap = gif->Image.ColorMap;
 else cmap = gif->SColorMap;
 bg = gif->SBackGroundColor;
+
+// fill in local color table of guaranteed 256 entires with cmap & pad
+for (cnum = 0; cnum < cmap->ColorCount; cnum++)
+  colors[cnum] = cmap->Colors[cnum];
+for (cnum = cmap->ColorCount; cnum < 256; cnum++)
+  colors[cnum] = cmap->Colors[0];
 // and do the fill
 _fill_image
   (data, rowpix,
@@ -208,6 +216,8 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, 
int xin, int yin,
Eina_Bool ret = EINA_FALSE;
ColorMapObject *cmap;
DATA32 *p;
+   GifColorType colors[256];
+   int cnum;
 
// build a blob of memory to have pointers to rows of pixels
// AND store the decoded gif pixels (1 byte per pixel) as welll
@@ -247,6 +257,11 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, 
int xin, int yin,
if (gif->Image.ColorMap) cmap = gif->Image.ColorMap;
else cmap = gif->SColorMap;
 
+   // fill in local color table of guaranteed 256 entires with cmap & pad
+   for (cnum = 0; cnum < cmap->ColorCount; cnum++)
+ colors[cnum] = cmap->Colors[cnum];
+   for (cnum = cmap->ColorCount; cnum < 256; cnum++)
+ colors[cnum] = cmap->Colors[0];
// if we need to deal with transparent pixels at all...
if (transparent >= 0)
  {

-- 




[EGIT] [core/efl] master 02/02: evas - gif loader - be a little more optimal in pixel lookups on decode

2016-04-01 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit f56e33f429cfc165a5a7e7c75c5b2271ba8b58d8
Author: Carsten Haitzler (Rasterman) 
Date:   Sat Apr 2 13:22:11 2016 +0900

evas - gif loader - be a little more optimal in pixel lookups on decode
---
 src/modules/evas/image_loaders/gif/evas_image_load_gif.c | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/modules/evas/image_loaders/gif/evas_image_load_gif.c 
b/src/modules/evas/image_loaders/gif/evas_image_load_gif.c
index 5110158..09d3b27 100644
--- a/src/modules/evas/image_loaders/gif/evas_image_load_gif.c
+++ b/src/modules/evas/image_loaders/gif/evas_image_load_gif.c
@@ -213,6 +213,7 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, 
int xin, int yin,
int intjump[] = { 8, 8, 4, 2 };
int i, xx, yy, pix;
GifRowType *rows;
+   GifPixelType *pixels;
Eina_Bool ret = EINA_FALSE;
ColorMapObject *cmap;
DATA32 *p;
@@ -270,10 +271,12 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, 
int xin, int yin,
   {
  for (yy = 0; yy < h; yy++)
{
+  pixels = &(PIX(0, yy));
   p = data + ((y + yy) * rowpix) + x;
   for (xx = 0; xx < w; xx++)
 {
-   pix = PIX(xx, yy);
+   pix = *pixels;
+   pixels++;
if (pix != transparent) *p = PIXLK(pix);
else *p = 0;
p++;
@@ -285,10 +288,12 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, 
int xin, int yin,
   {
  for (yy = 0; yy < h; yy++)
{
+  pixels = &(PIX(0, yy));
   p = data + ((y + yy) * rowpix) + x;
   for (xx = 0; xx < w; xx++)
 {
-   pix = PIX(xx, yy);
+   pix = *pixels;
+   pixels++;
if (pix != transparent) *p = PIXLK(pix);
p++;
 }
@@ -300,10 +305,12 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, 
int xin, int yin,
 // walk pixels without worring about transparency at all
 for (yy = 0; yy < h; yy++)
   {
+ pixels = &(PIX(0, yy));
  p = data + ((y + yy) * rowpix) + x;
  for (xx = 0; xx < w; xx++)
{
-  pix = PIX(xx, yy);
+  pix = *pixels;
+  pixels++;
   *p = PIXLK(pix);
   p++;
}

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Don't search when typing in the file selector entry

2016-04-01 Thread Stephen Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=1aafc222ef9610ddf9a210168ef707ebd43cf6ab

commit 1aafc222ef9610ddf9a210168ef707ebd43cf6ab
Author: Stephen Houston 
Date:   Fri Apr 1 22:15:26 2016 -0500

Ephoto: Don't search when typing in the file selector entry
---
 src/bin/ephoto_single_browser.c |  6 ++
 src/bin/ephoto_thumb_browser.c  | 12 +++-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 31e4cd7..853c113 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -1391,11 +1391,9 @@ _add_edit_menu_items(Ephoto_Single_Browser *sb, 
Evas_Object *menu)
_zoom_fit_cb, sb);
elm_menu_item_add(menu, menu_itt, "zoom-original", _("Zoom 1:1"),
_zoom_1_cb, sb);
-   elm_menu_item_separator_add(menu, menu_it);
-   elm_menu_item_add(menu, menu_it, "media-playback-start", _("Slideshow"),
-   _slideshow, sb);
-
elm_menu_item_separator_add(menu, NULL);
+   elm_menu_item_add(menu, NULL, "media-playback-start", _("Slideshow"),
+   _slideshow, sb);
elm_menu_item_add(menu, NULL, "preferences-system", _("Settings"),
_settings, sb);
 }
diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index af25e4e..520105d 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -944,8 +944,6 @@ _ephoto_search_cancel(void *data, Evas_Object *obj 
EINA_UNUSED,
 tb->original_grid = NULL;
 tb->totimages = tb->totimages_old;
 tb->totsize = tb->totsize_old;
-tb->totimages_old = 0;
-tb->totsize_old = 0;
  }
if (!tb->ephoto->entries)
  {
@@ -959,6 +957,8 @@ _ephoto_search_cancel(void *data, Evas_Object *obj 
EINA_UNUSED,
evas_object_del(hbox);
tb->searching = 0;
_update_info_label(tb);
+   tb->totimages_old = 0;
+   tb->totsize_old = 0;
 }
 
 static void
@@ -1956,6 +1956,7 @@ _grid_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
 elm_menu_item_separator_add(menu, NULL);
 elm_menu_item_add(menu, menu_it, "system-search", _("Search"),
 _search, tb);
+elm_menu_item_separator_add(menu, menu_it);
 elm_menu_item_add(menu, menu_it, "edit-select-all", _("Select All"),
 _grid_menu_select_all_cb, tb);
  }
@@ -1967,6 +1968,7 @@ _grid_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
  {
elm_menu_item_add(menu, menu_it, "edit-clear", _("Select None"),
_grid_menu_clear_cb, tb);
+elm_menu_item_separator_add(menu, menu_it);
 if (item)
   {
  evas_object_data_set(item, "thumb_browser", tb);
@@ -2002,7 +2004,7 @@ _grid_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
elm_menu_item_add(menu, NULL, "preferences-system", _("Settings"),
_settings, tb);
evas_object_smart_callback_add(menu, "dismissed", _menu_dismissed_cb,
-tb);
+   tb);
evas_object_show(menu);
 }
 
@@ -2014,8 +2016,6 @@ _grid_mouse_wheel(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED,
Evas_Event_Mouse_Wheel *ev = event_info;
Eina_Bool ctrl = evas_key_modifier_is_set(ev->modifiers, "Control");
 
-   printf("No\n");
-
if (ctrl)
  {
 if (ev->z > 0)
@@ -2219,6 +2219,8 @@ _key_down(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
else if (ev->compose && (((ev->compose[0] != '\\')
&& (ev->compose[0] >= ' ')) || ev->compose[1]))
  {
+if (elm_object_focus_get(tb->direntry))
+  return;
 if (!tb->searching)
   {
  _search(tb, NULL, NULL);

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Cleanup autofoo warnings, Improve typing search.

2016-04-01 Thread Stephen Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=76478ee5cefa0a299777e259850e7ec8a4403cbe

commit 76478ee5cefa0a299777e259850e7ec8a4403cbe
Author: Stephen Houston 
Date:   Fri Apr 1 19:09:44 2016 -0500

Ephoto: Cleanup autofoo warnings, Improve typing search.
---
 configure.ac   |  5 ++---
 src/bin/ephoto_thumb_browser.c | 37 +
 2 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/configure.ac b/configure.ac
index 90a7c2c..866b6e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,12 +5,9 @@ rm -f config.cache
 
 AC_INIT([ephoto], [0.9.99], [enlightenment-de...@lists.sourceforge.net])
 
-AC_CHECK_HEADERS([dirent.h limits.h math.h arpa/inet.h netinet/in.h])
-
 AC_PREREQ([2.60])
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_MACRO_DIR([m4])
-
 AC_CONFIG_HEADERS(src/bin/config.h)
 
 AM_INIT_AUTOMAKE(1.6 dist-xz)
@@ -21,6 +18,8 @@ AC_PROG_CC
 AM_PROG_CC_C_O
 AC_C___ATTRIBUTE__
 
+AC_CHECK_HEADERS([dirent.h limits.h math.h arpa/inet.h netinet/in.h])
+
 m4_ifdef([AM_GNU_GETTEXT_VERSION],[
 AM_GNU_GETTEXT_VERSION([0.18])
 ])
diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 85b38cf..af25e4e 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -952,13 +952,13 @@ _ephoto_search_cancel(void *data, Evas_Object *obj 
EINA_UNUSED,
 tb->totimages = 0;
 tb->totsize = 0;
  }
-   _update_info_label(tb);
elm_object_focus_set(tb->main, EINA_TRUE);
evas_object_del(tb->search);
tb->search = NULL;
elm_box_unpack(tb->gridbox, hbox);
evas_object_del(hbox);
tb->searching = 0;
+   _update_info_label(tb);
 }
 
 static void
@@ -2041,7 +2041,7 @@ _key_down(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
  {
 if (shift)
   {
- if (!strcmp(k, "f"))
+ if (!strcasecmp(k, "f"))
{
   if (evas_object_visible_get(tb->leftbox))
 _ephoto_dir_hide_folders(tb, NULL, NULL);
@@ -2049,19 +2049,19 @@ _key_down(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
 _ephoto_dir_show_folders(tb, NULL, NULL);
}
   }
-   else if ((!strcmp(k, "plus")) || (!strcmp(k, "equal")))
+   else if ((!strcasecmp(k, "plus")) || (!strcasecmp(k, "equal")))
  {
 int zoom = tb->ephoto->config->thumb_size + ZOOM_STEP;
 
 _zoom_set(tb, zoom);
  }
-   else if ((!strcmp(k, "minus")) || (!strcmp(k, "underscore")))
+   else if ((!strcasecmp(k, "minus")) || (!strcasecmp(k, "underscore")))
  {
 int zoom = tb->ephoto->config->thumb_size - ZOOM_STEP;
 
 _zoom_set(tb, zoom);
  }
-   else if (!strcmp(k, "Tab"))
+   else if (!strcasecmp(k, "Tab"))
  {
 Elm_Object_Item *it = elm_gengrid_selected_item_get(tb->grid);
 Ephoto_Entry *entry;
@@ -2103,30 +2103,30 @@ _key_down(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
   evas_object_smart_callback_call(tb->main, "view", entry);
}
  }
-else if (!strcmp(k, "c"))
+else if (!strcasecmp(k, "c"))
   {
  _grid_menu_copy_cb(tb, NULL, NULL);
   }
-else if (!strcmp(k, "x"))
+else if (!strcasecmp(k, "x"))
   {
  _grid_menu_cut_cb(tb, NULL, NULL);
   }
-else if (!strcmp(k, "v"))
+else if (!strcasecmp(k, "v"))
   {
  _grid_menu_paste_cb(tb, NULL, NULL);
   }
-else if (!strcmp(k, "a"))
+else if (!strcasecmp(k, "a"))
   {
  _grid_menu_select_all_cb(tb, NULL, NULL);
   }
-else if (!strcmp(k, "f") && !tb->processing)
+else if (!strcasecmp(k, "f") && !tb->processing)
   {
  if (tb->searching)
_ephoto_search_cancel(tb->search, NULL, NULL);
  else
_search(tb, NULL, NULL);
   }
-else if (!strcmp(k, "Delete"))
+else if (!strcasecmp(k, "Delete"))
   {
  char path[PATH_MAX];
  char *trash;
@@ -2148,11 +2148,11 @@ _key_down(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
  free(trash);
   }
  }
-   else if (!strcmp(k, "F1"))
+   else if (!strcasecmp(k, "F1"))
  {
 _settings(tb, NULL, NULL);
  }
-   else if (!strcmp(k, "F2"))
+   else if (!strcasecmp(k, "F2"))
  {
 Elm_Object_Item *it = NULL;
 
@@ -2164,7 +2164,7 @@ _key_down(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
  _grid_menu_rename_cb(it, NULL, NULL);
   }
  }
-   else if (!strcmp(k, "F5"))
+   else if (!strcasecmp(k, "F5"))
  {
Elm_Object_Item *it = elm_gengrid_selected_item_get(tb->grid);
Ephoto_Ent

[EGIT] [core/efl] master 02/02: elementary: install elementary cxx pkgconfig file.

2016-04-01 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit 8330c2086830d32b05431ebb0ddfd3abf57ba86e
Author: Cedric BAIL 
Date:   Fri Apr 1 13:54:40 2016 -0700

elementary: install elementary cxx pkgconfig file.

T3397
---
 Makefile.am | 3 ++-
 configure.ac| 1 +
 pc/.gitignore   | 1 +
 pc/elementary-cxx.pc.in | 6 +++---
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 73102da..c2422db 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -166,7 +166,8 @@ pc/eolian-cxx.pc \
 pc/edje-cxx.pc \
 pc/eet-cxx.pc \
 pc/eo-cxx.pc \
-pc/eio-cxx.pc
+pc/eio-cxx.pc \
+pc/elementary-cxx.pc
 endif
 
 if HAVE_ELUA
diff --git a/configure.ac b/configure.ac
index cc12979..b4b270b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5487,6 +5487,7 @@ pc/ethumb_client.pc
 pc/elocation.pc
 pc/elua.pc
 pc/elementary.pc
+pc/elementary-cxx.pc
 dbus-services/org.enlightenment.Ethumb.service
 systemd-services/ethumb.service
 $po_makefile_in
diff --git a/pc/.gitignore b/pc/.gitignore
index e6bcdb0..bacff7b 100644
--- a/pc/.gitignore
+++ b/pc/.gitignore
@@ -72,3 +72,4 @@
 /elua.pc
 /emile.pc
 /efl-js.pc
+/elementary-cxx.pc
diff --git a/pc/elementary-cxx.pc.in b/pc/elementary-cxx.pc.in
index 1478975..aa6ce8c 100644
--- a/pc/elementary-cxx.pc.in
+++ b/pc/elementary-cxx.pc.in
@@ -4,14 +4,14 @@ libdir=@libdir@
 includedir=@includedir@
 datarootdir=@datarootdir@
 datadir=@datadir@
-pkgdatadir=@pkgdatadir@
+pkgdatadir=@pkgdatadir@/elementary
 themes=${pkgdatadir}/themes
 eoincludedir=${datadir}/eolian/include
 eolian_flags=-I${eoincludedir}/elementary-@VMAJ@
 
 Name: elementary++
 Description: Elementary C++ bindings
-Requires.private: @requirement_elm_pc@
+Requires.private: @requirements_pc_elementary@
 Version: @VERSION@
-Libs: -L${libdir} -lelementary @ELEMENTARY_PC_LIBS@
+Libs: -L${libdir} -lelementary -lefl -leina -lpthread -leet -levas -lecore 
-lecore_evas -lecore_file -lecore_input -ledje -leo -lethumb_client -lemotion 
-lecore_imf -lecore_con -leldbus -lefreet -lefreet_mime -lefreet_trash -leio 
@requirements_public_libs_elementary@  @requirements_public_libs_eina@ 
@requirements_libs_eina@
 Cflags: -I${includedir}/elementary-@VMAJ@ -I${includedir}/elementary-cxx-@VMAJ@

-- 




[EGIT] [core/efl] master 01/02: elementary: install desktop files in the correct directory.

2016-04-01 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit cf81840db55c3e8bdc5352aba2c490570647fe00
Author: Cedric BAIL 
Date:   Fri Apr 1 11:50:20 2016 -0700

elementary: install desktop files in the correct directory.

Fix for T3397.
---
 data/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/data/Makefile.am b/data/Makefile.am
index 484cf39..21aa8c9 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -135,10 +135,10 @@ elementary/themes/default.edj: 
elementary/themes/default.edc $(elementary_themes
 
 # desktop files
 
-elementarydesktopdir = $(datadir)/elementary/applications
+elementarydesktopdir = $(datadir)/applications
 elementarydesktop_DATA = elementary/desktop/elementary_test.desktop 
elementary/desktop/elementary_config.desktop
 
-elementaryicondir = $(datadir)/elementary/icons
+elementaryicondir = $(datadir)/icons
 elementaryicon_DATA = elementary/desktop/elementary.png
 
 EXTRA_DIST += $(elementarydesktop_DATA) $(elementaryicon_DATA)

-- 




[EGIT] [core/enlightenment] master 01/01: delete internal wayland elm windows in wl client delete request callback

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit dead7646d476598c4ede6a2760ca41e718412c7c
Author: Mike Blumenkrantz 
Date:   Fri Apr 1 16:48:50 2016 -0400

delete internal wayland elm windows in wl client delete request callback

fix T2874
---
 src/bin/e_comp_wl.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 1500f03..73cc1be 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -684,13 +684,12 @@ _e_comp_wl_evas_cb_delete_request(void *data, Evas_Object 
*obj EINA_UNUSED, void
if (!e_client_has_xwindow(ec))
  {
 if (ec->netwm.ping) e_client_ping(ec);
+if (ec->internal_elm_win)
+  E_FREE_FUNC(ec->internal_elm_win, evas_object_del);
 e_object_del(E_OBJECT(ec));
  }
 
_e_comp_wl_focus_check();
-
-   /* TODO: Delete request send ??
-* NB: No such animal wrt wayland */
 }
 
 static void

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Clean up menus, remove toolbars, work on focus, start search on type.

2016-04-01 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=469ce75485e1aa986b5c45467c0151ffccd3642a

commit 469ce75485e1aa986b5c45467c0151ffccd3642a
Author: Stephen okra Houston 
Date:   Fri Apr 1 15:29:46 2016 -0500

Ephoto: Clean up menus, remove toolbars, work on focus, start search on 
type.

Screenshots:
http://www.enlightenment.org/ss/e-56feda88450023.78697698.jpg
http://www.enlightenment.org/ss/e-56fedac3d198f2.43263458.jpg
---
 src/bin/ephoto.h|   1 +
 src/bin/ephoto_config.c |   3 +
 src/bin/ephoto_main.c   |  17 +++
 src/bin/ephoto_single_browser.c | 216 
 src/bin/ephoto_thumb_browser.c  | 239 +---
 5 files changed, 242 insertions(+), 234 deletions(-)

diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h
index a76ac92..0375768 100644
--- a/src/bin/ephoto.h
+++ b/src/bin/ephoto.h
@@ -70,6 +70,7 @@ void ephoto_config_main(Ephoto *em);
 Evas_Object *ephoto_single_browser_add(Ephoto *ephoto, Evas_Object *parent);
 void ephoto_single_browser_entries_set(Evas_Object *obj, Eina_List *entries);
 void ephoto_single_browser_entry_set(Evas_Object *obj, Ephoto_Entry *entry);
+void ephoto_single_browser_focus_set(Ephoto *ephoto);
 void ephoto_single_browser_path_pending_set(Evas_Object *obj,
 const char *path);
 void ephoto_single_browser_path_pending_unset(Evas_Object *obj);
diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index 2a9fbfd..1873e06 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -82,8 +82,10 @@ static void
 _config_close_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
Evas_Object *popup = data;
+   Ephoto *ephoto = evas_object_data_get(popup, "ephoto");
 
evas_object_del(popup);
+   elm_object_focus_set(ephoto->pager, EINA_TRUE);
 }
 
 static void
@@ -118,6 +120,7 @@ _config_save_cb(void *data, Evas_Object *obj EINA_UNUSED,
   elm_object_text_get(ephoto->config->slide_trans));
 
evas_object_del(popup);
+   elm_object_focus_set(ephoto->pager, EINA_TRUE);
 }
 
 static void
diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 34a3b86..6241281 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -203,6 +203,20 @@ _resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
  }
 }
 
+static void
+_pager_focused(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+void *event_info EINA_UNUSED)
+{
+   Ephoto *ephoto = data;
+
+   if (ephoto->state == EPHOTO_STATE_THUMB)
+ elm_object_focus_set(ephoto->tb, EINA_TRUE);
+   else if (ephoto->state == EPHOTO_STATE_SINGLE)
+ ephoto_single_browser_focus_set(ephoto);
+   else
+ elm_object_focus_set(ephoto->sl, EINA_TRUE);
+}
+
 Evas_Object *
 ephoto_window_add(const char *path)
 {
@@ -245,11 +259,14 @@ ephoto_window_add(const char *path)
   ephoto_thumb_size_set(ephoto, ephoto->config->thumb_size);
 
ephoto->pager = elm_naviframe_add(ephoto->win);
+   elm_object_focus_allow_set(ephoto->pager, EINA_FALSE);
elm_naviframe_prev_btn_auto_pushed_set(ephoto->pager, EINA_FALSE);
evas_object_size_hint_weight_set(ephoto->pager, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_fill_set(ephoto->pager, EVAS_HINT_FILL,
EVAS_HINT_FILL);
+   evas_object_event_callback_add(ephoto->pager, EVAS_CALLBACK_FOCUS_IN,
+   _pager_focused, ephoto);
elm_win_resize_object_add(ephoto->win, ephoto->pager);
evas_object_show(ephoto->pager);
 
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 26fd13f..31e4cd7 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -51,6 +51,8 @@ static void _key_down(void *data, Evas *e EINA_UNUSED,
 static void _edit_menu(Ephoto_Single_Browser *sb);
 static void _back(void *data, Evas_Object *obj EINA_UNUSED, 
 void *event_info EINA_UNUSED);
+static char *_ephoto_get_file_size(const char *path);
+static void _update_bottom_bar(Ephoto_Single_Browser *sb);
 
 static void
 _viewer_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
@@ -140,7 +142,7 @@ _image_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
 }
 
 static void
-_scroller_mouse_up(void *data, Evas *e EINA_UNUSED,
+_scroller_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
 Evas_Object *obj EINA_UNUSED, void *event_info)
 {
Ephoto_Single_Browser *sb = data;
@@ -149,6 +151,7 @@ _scroller_mouse_up(void *data, Evas *e EINA_UNUSED,
if (ev->button == 3)
  {
 _edit_menu(sb);
+_update_bottom_bar(sb);
  }
 }
 
@@ -227,8 +230,8 @@ _viewer_add(Evas_Object *parent, const char *path, 
Ephoto_Single_Browser *sb)
evas_object_size_hint_align_set(v->scroller,
EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_data_set(v->scroller, "viewer", v);
-   evas_object_event_callback_add(v->scroller, EVAS_CALLBACK_MOUSE_UP, 
_scroller_

[EGIT] [core/enlightenment] master 02/02: restrict shelf border_fix to only affect clients affected by the shelf

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 8b8abb436d24b40fe8c19b4ba158f2465e8fd888
Author: Mike Blumenkrantz 
Date:   Fri Apr 1 16:26:41 2016 -0400

restrict shelf border_fix to only affect clients affected by the shelf

fixes random other clients changing sizes based on irrelevant shelf hiding
---
 src/bin/e_shelf.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c
index 9fe04a1..8992f7a 100644
--- a/src/bin/e_shelf.c
+++ b/src/bin/e_shelf.c
@@ -1466,7 +1466,6 @@ _e_shelf_gadcon_frame_request(void *data, E_Gadcon_Client 
*gcc, const char *styl
 static void
 _e_shelf_toggle_client_fix(E_Shelf *es)
 {
-   Eina_List *l;
E_Client *ec;
 
if (!e_config->border_fix_on_shelf_toggle)
@@ -1474,8 +1473,10 @@ _e_shelf_toggle_client_fix(E_Shelf *es)
if (es->cfg->overlap)
  return;
 
-   EINA_LIST_FOREACH(e_comp->clients, l, ec)
+   E_CLIENT_FOREACH(ec)
  {
+if ((!ec->sticky) && (!e_shelf_desk_visible(es, ec->desk ?: 
e_desk_current_get(es->zone
+  continue;
 if ((ec->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_NONE)
   {
  if (ec->lock_client_location) continue;

-- 




[EGIT] [core/enlightenment] master 01/02: do not incrementally remaximize clients during shelf hide animation

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 37c506320018a23df8b800a24f6fd0a538affc7d
Author: Mike Blumenkrantz 
Date:   Fri Apr 1 16:26:06 2016 -0400

do not incrementally remaximize clients during shelf hide animation

this looks really bad and forces unnecessary spinning
---
 src/bin/e_shelf.c | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c
index 6a0d135..9fe04a1 100644
--- a/src/bin/e_shelf.c
+++ b/src/bin/e_shelf.c
@@ -551,7 +551,8 @@ e_shelf_move(E_Shelf *es, int x, int y)
es->y = y;
evas_object_move(es->comp_object, es->zone->x + es->x, es->zone->y + es->y);
_e_shelf_obstacles_update(es);
-   _e_shelf_remaximize(es);
+   if (!es->hide_animator)
+ _e_shelf_remaximize(es);
 }
 
 E_API void
@@ -564,7 +565,8 @@ e_shelf_resize(E_Shelf *es, int w, int h)
es->h = h;
evas_object_resize(es->comp_object, es->w, es->h);
_e_shelf_obstacles_update(es);
-   _e_shelf_remaximize(es);
+   if (!es->hide_animator)
+ _e_shelf_remaximize(es);
 }
 
 E_API void
@@ -580,7 +582,8 @@ e_shelf_move_resize(E_Shelf *es, int x, int y, int w, int h)
evas_object_move(es->comp_object, es->zone->x + es->x, es->zone->y + es->y);
evas_object_resize(es->comp_object, es->w, es->h);
_e_shelf_obstacles_update(es);
-   _e_shelf_remaximize(es);
+   if (!es->hide_animator)
+ _e_shelf_remaximize(es);
 }
 
 E_API void

-- 




[EGIT] [core/efl] master 01/01: theme: fix a bunch of the fixed: X Y edje errors

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 56fcdd51508b09cb8504ee70bfc293105a6f1877
Author: Mike Blumenkrantz 
Date:   Fri Apr 1 16:22:45 2016 -0400

theme: fix a bunch of the fixed: X Y edje errors
---
 data/elementary/themes/edc/border.edc | 5 +
 data/elementary/themes/edc/deskmirror.edc | 1 +
 data/elementary/themes/edc/ibar-ibox.edc  | 4 ++--
 data/elementary/themes/edc/mixer.edc  | 1 +
 data/elementary/themes/edc/pointer.edc| 3 +++
 5 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/data/elementary/themes/edc/border.edc 
b/data/elementary/themes/edc/border.edc
index 33e48fd..f200d7b 100644
--- a/data/elementary/themes/edc/border.edc
+++ b/data/elementary/themes/edc/border.edc
@@ -339,6 +339,7 @@ group { name: "e/widgets/border/default/border";
   }
   part { name: "e.event.icon"; type: RECT;
  description { state: "default" 0.0;
+fixed: 1 0;
 rel1.relative: 0.0 0.0;
 rel2.relative: 0.0 1.0;
 rel2.to_y: "top";
@@ -349,6 +350,7 @@ group { name: "e/widgets/border/default/border";
   }
   part { name: "e.event.close"; type: RECT;
  description { state: "default" 0.0;
+fixed: 1 0;
 rel1.relative: 1.0 0.0;
 rel2.relative: 1.0 1.0;
 rel2.to_y: "top";
@@ -385,6 +387,7 @@ group { name: "e/widgets/border/default/border";
   }
   part { name: "e.event.resize.tl"; type: RECT;
  description { state: "default" 0.0;
+fixed: 1 1;
 rel2.relative: 0.0 0.0;
 min: 32 4;
 align: 0.0 0.0;
@@ -393,6 +396,7 @@ group { name: "e/widgets/border/default/border";
   }
   part { name: "e.event.resize.t"; type: RECT;
  description { state: "default" 0.0;
+fixed: 0 1;
 rel1.relative: 1.0 0.0;
 rel1.to_x: "e.event.resize.tl";
 rel2.relative: 0.0 0.0;
@@ -404,6 +408,7 @@ group { name: "e/widgets/border/default/border";
   }
   part { name: "e.event.resize.tr"; type: RECT;
  description { state: "default" 0.0;
+fixed: 1 1;
 rel1.relative: 1.0 0.0;
 rel2.relative: 1.0 0.0;
 min: 32 4;
diff --git a/data/elementary/themes/edc/deskmirror.edc 
b/data/elementary/themes/edc/deskmirror.edc
index 94e2316..90ba72d 100644
--- a/data/elementary/themes/edc/deskmirror.edc
+++ b/data/elementary/themes/edc/deskmirror.edc
@@ -206,6 +206,7 @@ group { name: "e/deskmirror/frame/default";
   }
   part { name: "shine"; mouse_events: 0;
  description { state: "default" 0.0;
+fixed: 0 1;
 image.normal: "shine.png";
 rel1.offset: 0 -1;
 rel1.to: "top";
diff --git a/data/elementary/themes/edc/ibar-ibox.edc 
b/data/elementary/themes/edc/ibar-ibox.edc
index d0b12d46..3d34f3c 100644
--- a/data/elementary/themes/edc/ibar-ibox.edc
+++ b/data/elementary/themes/edc/ibar-ibox.edc
@@ -170,6 +170,7 @@ group { name: "e/modules/ibar/menu";
   part { name: "sizer"; type: SPACER;
  description { state: "default"; }
  description { state: "hidden";
+fixed: 1 1;
 rel1.relative: 0.5 1.0;
 rel2.relative: 0.5 1.0;
 minmul: 0 0;
@@ -406,7 +407,6 @@ group { name: "e/modules/ibar/menu/item";
   program {
  signal: "mouse,in"; source: "event";
  action: STATE_SET "focus" 0.0;
- target: "e.swallow.icon";
  target: "e.text.title";
  target: "title2";
  target: "icon_clip";
@@ -416,7 +416,6 @@ group { name: "e/modules/ibar/menu/item";
   program {
  signal: "mouse,out"; source: "event";
  action: STATE_SET "default" 0.0;
- target: "e.swallow.icon";
  target: "e.text.title";
  target: "title2";
  target: "icon_clip";
@@ -544,6 +543,7 @@ group { name: "e/modules/ibox/icon_overlay";
  effect: SHADOW BOTTOM;
  scale: 1;
  description { state: "default" 0.0;
+fixed: 0 1;
 rel1.to_x: "spacer";
 rel2.to_x: "spacer";
 rel1.relative: 0 1;
diff --git a/data/elementary/themes/edc/mixer.edc 
b/data/elementary/themes/edc/mixer.edc
index c9b5cc6..149820b 100644
--- a/data/elementary/themes/edc/mixer.edc
+++ b/data/elementary/themes/edc/mixer.edc
@@ -141,6 +141,7 @@ group { name: "e/modules/mixer/main";
   part { name: _NAME; type: RECT; \
  clip_to: "state"; \
  description { state: "default" 0.0; \
+fixed: 1 1; \
 rel1.relative: ((_BASE+(_X*8))/160) (80/160); \
 rel2.relative: ((_BASE+(_X*8))/160) (80/160); \
 min: 1 1; \
diff --git a/data/elementary/themes/edc/pointer.edc 
b/data/elementary/themes/edc/pointer.edc
index 2226471..493e5ea 100644
--- a/data/elementary/themes/edc/poin

[EGIT] [core/efl] master 01/01: ecore-drm: do not attempt to destroy sprite outputs which have never repainted

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit c854b91c5ace6daa104d5c2af0d6926a7aa9ca08
Author: Mike Blumenkrantz 
Date:   Fri Apr 1 15:54:37 2016 -0400

ecore-drm: do not attempt to destroy sprite outputs which have never 
repainted

silences a surprisingly large number of errors on shutdown

@fix
---
 src/lib/ecore_drm/ecore_drm_sprites.c | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore_drm/ecore_drm_sprites.c 
b/src/lib/ecore_drm/ecore_drm_sprites.c
index e8d807c..bcc6669 100644
--- a/src/lib/ecore_drm/ecore_drm_sprites.c
+++ b/src/lib/ecore_drm/ecore_drm_sprites.c
@@ -94,10 +94,13 @@ ecore_drm_sprites_destroy(Ecore_Drm_Device *dev)
 
EINA_LIST_FREE(dev->sprites, sprite)
  {
-ecore_drm_sprites_fb_set(sprite, 0, 0);
+if (sprite->output)
+  {
+ ecore_drm_sprites_fb_set(sprite, 0, 0);
 
-_ecore_drm_output_fb_release(sprite->output, sprite->current_fb);
-_ecore_drm_output_fb_release(sprite->output, sprite->next_fb);
+ _ecore_drm_output_fb_release(sprite->output, sprite->current_fb);
+ _ecore_drm_output_fb_release(sprite->output, sprite->next_fb);
+  }
 
 free(sprite);
  }

-- 




[EGIT] [core/enlightenment] master 01/01: set ELM_ACCEL=gl upon successfully creating a gl wayland compositor

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 4aecb7ad1465c9cf82773e2006ebd03dc37e09e5
Author: Mike Blumenkrantz 
Date:   Fri Apr 1 15:14:46 2016 -0400

set ELM_ACCEL=gl upon successfully creating a gl wayland compositor
---
 src/bin/e_comp_wl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 84f1066..1500f03 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2465,6 +2465,7 @@ _e_comp_wl_gl_init(void *d EINA_UNUSED)
 {
e_comp_wl->wl.gl = evas_gl_new(e_comp->evas);
if (!e_comp_wl->wl.gl) return;
+   e_util_env_set("ELM_ACCEL", "gl");
e_comp_wl->wl.glctx = evas_gl_context_create(e_comp_wl->wl.gl, NULL);
e_comp_wl->wl.glcfg = evas_gl_config_new();
e_comp_wl->wl.glsfc = evas_gl_surface_create(e_comp_wl->wl.gl, 
e_comp_wl->wl.glcfg, 1, 1);

-- 




[EGIT] [editors/geany-configs] master 01/01: .eo syntax for the Geany editor.

2016-04-01 Thread Dave Andreoli
davemds pushed a commit to branch master.

http://git.enlightenment.org/editors/geany-configs.git/commit/?id=a998a9f2f1043103e4710a4b701d168f046fe823

commit a998a9f2f1043103e4710a4b701d168f046fe823
Author: Dave Andreoli 
Date:   Fri Apr 1 21:02:33 2016 +0200

.eo syntax for the Geany editor.
---
 filedefs/filetypes.Eo.conf | 55 ++
 snippets.conf  |  5 +
 2 files changed, 60 insertions(+)

diff --git a/filedefs/filetypes.Eo.conf b/filedefs/filetypes.Eo.conf
new file mode 100644
index 000..ed4264e
--- /dev/null
+++ b/filedefs/filetypes.Eo.conf
@@ -0,0 +1,55 @@
+#
+# Eo (eolian) filetype definition for Geany.
+#
+# This file enable hilight of eo files
+#
+# Usage:
+#
+# 1. Copy this file to "~/.config/geany/filedefs/" folder (or just link it).
+#
+# 2. To make geany automatically recognize .eo extension as Eo file:
+#Eo=*.eo;in filetype_extensions.conf
+#
+
+
+# For complete documentation of this file, please see Geany's main 
documentation
+[styling=Lua]
+
+[keywords]
+# dark blu - main keywords
+keywords=return import abstract class methods set get values legacy_ctor 
params implements legacy_prefix eo_prefix data legacy type
+# light blu - basic types
+function_basic=null void bool double char Eo Eo.Base Evas Evas.Object 
Evas.Coord Evas.Real Evas.Aspect_Control
+# hi blu - still free
+function_other=property protected in out nonull warn_unused virtual
+coroutines=closefile coroutine.create coroutine.resume coroutine.running 
coroutine.status coroutine.wrap coroutine.yield date difftime execute exit 
flush getenv io.close io.flush io.input io.lines io.open io.output io.popen 
io.read io.stderr io.stdin io.stdout io.tmpfile io.type io.write openfile 
os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename 
os.setlocale os.time os.tmpname package.cpath package.loaded package.loadlib 
package.path package.preload package.se [...]
+# red - @tags
+user2=
+# dark blue
+user1=
+user3=
+user4=
+
+[settings]
+lexer_filetype=Lua
+
+
+# default extension used when saving files
+extension=eo
+
+# context action command (please see Geany's main documentation for details)
+context_action_cmd=
+
+[indentation]
+width=3
+# 0 is spaces, 1 is tabs, 2 is tab & spaces
+type=0
+
+[build_settings]
+# %f will be replaced by the complete filename
+# %e will be replaced by the filename without extension
+# (use only one of it at one time)
+# compiler=edje_cc -v "%f"
+# linker=g++ -Wall -o "%e" "%f"
+# run_cmd=edje_player "%f"
+
diff --git a/snippets.conf b/snippets.conf
index 08de7c4..3e7132d 100644
--- a/snippets.conf
+++ b/snippets.conf
@@ -12,6 +12,11 @@
 #
 
 [Python]
+# generic python
+prop=@property\ndef %cursor%(self):\n\treturn
+class=class %cursor%(object):\n\tdef __init__(self):\n\t\tpass
+
+
 # Python-EFL
 expand=size_hint_expand=EXPAND_BOTH
 fill=size_hint_fill=FILL_BOTH

-- 




[EGIT] [apps/empc] master 01/01: reject non-printable characters when beginning filesystem search

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 1e8a11ad2f6d8b968c43d063c07fcabf7a0f8026
Author: Mike Blumenkrantz 
Date:   Fri Apr 1 14:55:27 2016 -0400

reject non-printable characters when beginning filesystem search

 #okra
---
 src/bin/empc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/empc.c b/src/bin/empc.c
index dc8585c..d68efa5 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -1301,7 +1301,7 @@ filesystem_key(void *data EINA_UNUSED, Evas *e 
EINA_UNUSED, Evas_Object *obj, vo
 if (eina_list_count(filesystems) > 1)
   filesystem_prev();
  }
-   else if (ev->compose && ((ev->compose[0] != '\\') || ev->compose[1]))
+   else if (ev->compose && (((ev->compose[0] != '\\') && (ev->compose[0] >= ' 
')) || ev->compose[1]))
  {
 str = elm_entry_entry_get(filesystem_entry);
 if ((!str) || (!str[0]))

-- 




[EGIT] [core/enlightenment] master 01/01: move x11 client icon caching to private functions in comp_x

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 3cb11abb254ddeb9ca5f4dfe812325a784570293
Author: Mike Blumenkrantz 
Date:   Fri Apr 1 14:16:21 2016 -0400

move x11 client icon caching to private functions in comp_x

ref 57ce6419e5c257e6fee6809cdb9c63d39c0b0a98
---
 src/bin/e_client.c | 103 +---
 src/bin/e_client.h |   2 --
 src/bin/e_comp_x.c | 104 +++--
 3 files changed, 103 insertions(+), 106 deletions(-)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index e2a2bf6..3d52984 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -532,12 +532,7 @@ _e_client_free(E_Client *ec)
ec->group = eina_list_free(ec->group);
ec->transients = eina_list_free(ec->transients);
ec->stick_desks = eina_list_free(ec->stick_desks);
-   if (ec->netwm.icons)
- {
-e_client_icon_free(ec->netwm.icons, ec->netwm.num_icons);
-ec->netwm.icons = NULL;
-ec->netwm.num_icons = 0;
- }
+
E_FREE(ec->netwm.extra_types);
eina_stringshare_replace(&ec->border.name, NULL);
eina_stringshare_replace(&ec->bordername, NULL);
@@ -5022,99 +5017,3 @@ e_client_layout_cb_set(E_Client_Layout_Cb cb)
  CRI("ATTEMPTING TO OVERWRITE EXISTING CLIENT LAYOUT HOOK!!!");
_e_client_layout_cb = cb;
 }
-
-
-static Eina_List *iconshare = NULL;
-
-typedef struct _E_Client_Icon_Entry E_Client_Icon_Entry;
-
-struct _E_Client_Icon_Entry
-{
-   Ecore_X_Icon *icons;
-   int num_icons;
-   int ref;
-};
-
-E_API Ecore_X_Icon *
-e_client_icon_deduplicate(Ecore_X_Icon *icons, int num_icons)
-{
-   int i;
-   Eina_List *l;
-   E_Client_Icon_Entry *ie;
-
-   // unless the rest of e uses border icons OTHER than icon #0
-   // then free the rest that we don't need anymore.
-   for (i = 1; i < num_icons; i++)
- {
-free(icons[i].data);
-icons[i].data = NULL;
- }
-   // lookup icon data in icons cache/share
-   EINA_LIST_FOREACH(iconshare, l, ie)
- {
-if ((ie->num_icons == num_icons) &&
-(num_icons  > 0) &&
-(ie->icons[0].width == icons[0].width) &&
-(ie->icons[0].height == icons[0].height) &&
-(!memcmp(ie->icons[0].data, icons[0].data,
- icons[0].width * icons[0].height * 4)))
-  {
- // found so free the input icons
- for (i = 0; i < num_icons; i++)
-   free(icons[i].data);
- free(icons);
- // ref the shared/cached one
- ie->ref++;
- iconshare = eina_list_promote_list(iconshare, l);
- // and return that
- return ie->icons;
-  }
- }
-   // no hit - new entry to cache. add it
-   ie = calloc(1, sizeof(E_Client_Icon_Entry));
-   if (ie)
- {
-ie->icons = icons;
-ie->num_icons = num_icons;
-ie->ref = 1;
-iconshare = eina_list_prepend(iconshare, ie);
- }
-   return icons;
-}
-
-E_API void
-e_client_icon_free(Ecore_X_Icon *icons, int num_icons)
-{
-   int i;
-   Eina_List *l;
-   E_Client_Icon_Entry *ie;
-
-   // lookup in icon share cache
-   EINA_LIST_FOREACH(iconshare, l, ie)
- {
-if ((ie->num_icons == num_icons) &&
-(num_icons  > 0) &&
-(ie->icons[0].width == icons[0].width) &&
-(ie->icons[0].height == icons[0].height) &&
-(!memcmp(ie->icons[0].data, icons[0].data,
- icons[0].width * icons[0].height * 4)))
-  {
- // found so deref
- ie->ref--;
- if (ie->ref <= 0)
-   {
-  // no refs left - free the icon from the share/cache
-  iconshare = eina_list_remove_list(iconshare, l);
-  for (i = 0; i < ie->num_icons; i++)
-free(ie->icons[i].data);
-  free(ie->icons);
-  free(ie);
-   }
- return;
-  }
- }
-   // not found - so just free it ... odd - we should never be here
-   for (i = 0; i < num_icons; i++)
- free(icons[i].data);
-   free(icons);
-}
diff --git a/src/bin/e_client.h b/src/bin/e_client.h
index 94ef059..13d24fd 100644
--- a/src/bin/e_client.h
+++ b/src/bin/e_client.h
@@ -827,8 +827,6 @@ E_API Eina_Bool e_client_has_xwindow(const E_Client *ec);
 E_API Eina_Bool e_client_desk_window_profile_available_check(E_Client *ec, 
const char *profile);
 E_API void  e_client_desk_window_profile_wait_desk_set(E_Client *ec, 
E_Desk *desk);
 E_API void  e_client_layout_cb_set(E_Client_Layout_Cb cb);
-E_API Ecore_X_Icon *e_client_icon_deduplicate(Ecore_X_Icon *icons, int 
num_icons);
-E_API void  e_client_icon_free(Ecore_X_Icon *icons, int num_icons);
 
 YOLO E_API void e_client_focus_stack_set(Eina_List *l);
 
diff -

[EGIT] [core/enlightenment] master 01/01: wayland: Fix xdg-popup crash

2016-04-01 Thread Derek Foreman
discomfitor pushed a commit to branch master.

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

commit 8f0f9ce4f7aa5e7325153560ff5c8ea440b885d3
Author: Derek Foreman 
Date:   Fri Apr 1 13:03:54 2016 -0500

wayland: Fix xdg-popup crash

We need to remove the destroy listener when we delete a pixmap or it
leaves an invalid node on the signal list.
---
 src/bin/e_pixmap.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c
index c429d81..2bd94a7 100644
--- a/src/bin/e_pixmap.c
+++ b/src/bin/e_pixmap.c
@@ -209,6 +209,11 @@ _e_pixmap_free(E_Pixmap *cp)
   case E_PIXMAP_TYPE_WL:
 #ifdef HAVE_WAYLAND
 _e_pixmap_wayland_image_clear(cp);
+if (cp->buffer_destroy_listener.notify)
+  {
+ wl_list_remove(&cp->buffer_destroy_listener.link);
+ cp->buffer_destroy_listener.notify = NULL;
+  }
 #endif
 break;
   default:

-- 




[EGIT] [core/efl] master 01/01: ecore-wl2: Enable releasing keyboard, pointer, and touch if supported

2016-04-01 Thread Chris Michael
devilhorns pushed a commit to branch master.

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

commit 5713463ff378cbb6e18504d930f0237ef8a14499
Author: Chris Michael 
Date:   Fri Apr 1 12:22:02 2016 -0400

ecore-wl2: Enable releasing keyboard, pointer, and touch if supported

This removes a fixme where we were not using wl_(pointer, keyboard,
touch)_release functions as they rely on newer versions of the wayland
protocol. As we now rely on 1.10 of wayland, these can be enabled now.

@fix

Signed-off-by: Chris Michael 
---
 src/lib/ecore_wl2/ecore_wl2_input.c | 27 +++
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index f362325..14a7e82 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1099,10 +1099,11 @@ _seat_cb_capabilities(void *data, struct wl_seat *seat, 
enum wl_seat_capability
 if (input->cursor.surface) wl_surface_destroy(input->cursor.surface);
 input->cursor.surface = NULL;
 
-/* FIXME: Enable these when new wayland git is released */
-/* if (input->seat_version >= WL_POINTER_RELEASE_SINCE_VERSION) */
-/*   wl_pointer_release(input->wl.pointer); */
-/* else */
+#ifdef WL_POINTER_RELEASE_SINCE_VERSION
+if (input->seat_version >= WL_POINTER_RELEASE_SINCE_VERSION)
+  wl_pointer_release(input->wl.pointer);
+else
+#endif
   wl_pointer_destroy(input->wl.pointer);
 input->wl.pointer = NULL;
  }
@@ -1115,10 +1116,11 @@ _seat_cb_capabilities(void *data, struct wl_seat *seat, 
enum wl_seat_capability
  }
else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && (input->wl.keyboard))
  {
-/* FIXME: Enable these when new wayland git is released */
-/* if (input->seat_version >= WL_KEYBOARD_RELEASE_SINCE_VERSION) */
-/*   wl_keyboard_release(input->wl.keyboard); */
-/* else */
+#ifdef WL_KEYBOARD_RELEASE_SINCE_VERSION
+if (input->seat_version >= WL_KEYBOARD_RELEASE_SINCE_VERSION)
+  wl_keyboard_release(input->wl.keyboard);
+else
+#endif
   wl_keyboard_destroy(input->wl.keyboard);
 input->wl.keyboard = NULL;
  }
@@ -1131,10 +1133,11 @@ _seat_cb_capabilities(void *data, struct wl_seat *seat, 
enum wl_seat_capability
  }
else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && (input->wl.touch))
  {
-/* FIXME: Enable these when new wayland git is released */
-/* if (input->seat_version >= WL_TOUCH_RELEASE_SINCE_VERSION) */
-/*   wl_touch_release(input->wl.touch); */
-/* else */
+#ifdef WL_TOUCH_RELEASE_SINCE_VERSION
+if (input->seat_version >= WL_TOUCH_RELEASE_SINCE_VERSION)
+  wl_touch_release(input->wl.touch);
+else
+#endif
   wl_touch_destroy(input->wl.touch);
 input->wl.touch = NULL;
  }

-- 




[EGIT] [core/efl] master 01/01: ecore_timer: remove redundancy in property docs

2016-04-01 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit dac047a5fcbffb4562fd64b9cc84d6095a0c4891
Author: Stefan Schmidt 
Date:   Fri Apr 1 15:40:01 2016 +0200

ecore_timer: remove redundancy in property docs

Streamline this a bit to document the property itself and only extra 
information
the the methods if needed.
---
 src/lib/ecore/ecore_timer.eo | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/lib/ecore/ecore_timer.eo b/src/lib/ecore/ecore_timer.eo
index 781ef7f..78cb4aa 100644
--- a/src/lib/ecore/ecore_timer.eo
+++ b/src/lib/ecore/ecore_timer.eo
@@ -16,12 +16,9 @@ class Ecore.Timer (Eo.Base)
   @property interval {
  [[Interval the timer ticks on.]]
  set {
-[[Change the interval the timer ticks off. If set during
-  a timer call, this will affect the next interval.
-]]
+[[If set during a timer call, this will affect the next interval.]]
  }
  get {
-[[Get the interval the timer ticks on.]]
  }
  values {
 in: double(-1); [[The new interval in seconds]]
@@ -30,7 +27,6 @@ class Ecore.Timer (Eo.Base)
   @property pending {
  [[Pending time regarding a timer.]]
  get {
-[[Get the pending time regarding a timer.]]
 return: double;
  }
   }

-- 




[EGIT] [core/efl] master 01/01: ecore_timer: document properties

2016-04-01 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 1a4674dfc835d1587c18d262a8658383ae00b749
Author: Stefan Schmidt 
Date:   Fri Apr 1 15:01:48 2016 +0200

ecore_timer: document properties

Make sure that we actually document the property itself and not only the
property methods.
---
 src/lib/ecore/ecore_timer.eo | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/ecore/ecore_timer.eo b/src/lib/ecore/ecore_timer.eo
index 99f30a8..781ef7f 100644
--- a/src/lib/ecore/ecore_timer.eo
+++ b/src/lib/ecore/ecore_timer.eo
@@ -14,6 +14,7 @@ class Ecore.Timer (Eo.Base)
eo_prefix: ecore_obj_timer;
methods {
   @property interval {
+ [[Interval the timer ticks on.]]
  set {
 [[Change the interval the timer ticks off. If set during
   a timer call, this will affect the next interval.
@@ -27,6 +28,7 @@ class Ecore.Timer (Eo.Base)
  }
   }
   @property pending {
+ [[Pending time regarding a timer.]]
  get {
 [[Get the pending time regarding a timer.]]
 return: double;

-- 




[EGIT] [core/efl] master 01/01: evas-software-generic: remove native.func.data variable and data argument of native calblacks.

2016-04-01 Thread Chris Michael
devilhorns pushed a commit to branch master.

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

commit e84b2e50f733bae57fa78ed459d66f85e2aa9947
Author: Chris Michael 
Date:   Fri Apr 1 07:56:54 2016 -0400

evas-software-generic: remove native.func.data variable and data argument 
of native calblacks.

Evas Image should be independent of render engine.
So remove native.func.data member of RGBA_Image, Evas_GL_Image
struct. And remove data argument,too.

ref f10672dd7429dd98dd3b7d88d9c3c63aac392a40

@fix

Signed-off-by: Chris Michael 
---
 src/modules/evas/engines/software_generic/evas_native_tbm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modules/evas/engines/software_generic/evas_native_tbm.c 
b/src/modules/evas/engines/software_generic/evas_native_tbm.c
index c17d77d..752d750 100644
--- a/src/modules/evas/engines/software_generic/evas_native_tbm.c
+++ b/src/modules/evas/engines/software_generic/evas_native_tbm.c
@@ -205,7 +205,7 @@ _evas_video_nv12(unsigned char *evas_data, const unsigned 
char *source_data, uns
 }
 
 static void
-_native_bind_cb(void *data EINA_UNUSED, void *image, int x EINA_UNUSED, int y 
EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED)
+_native_bind_cb(void *image, int x EINA_UNUSED, int y EINA_UNUSED, int w 
EINA_UNUSED, int h EINA_UNUSED)
 {
RGBA_Image *im = image;
Native *n = im->native.data;
@@ -224,7 +224,7 @@ _native_bind_cb(void *data EINA_UNUSED, void *image, int x 
EINA_UNUSED, int y EI
 }
 
 static void
-_native_unbind_cb(void *data EINA_UNUSED, void *image)
+_native_unbind_cb(void *image)
 {
RGBA_Image *im = image;
Native *n = im->native.data;
@@ -239,7 +239,7 @@ _native_unbind_cb(void *data EINA_UNUSED, void *image)
 }
 
 static void
-_native_free_cb(void *data EINA_UNUSED, void *image)
+_native_free_cb(void *image)
 {
RGBA_Image *im = image;
Native *n = im->native.data;

-- 




[EGIT] [core/efl] master 01/01: ecore-wl2: Move structures above functions

2016-04-01 Thread Chris Michael
devilhorns pushed a commit to branch master.

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

commit 2035931ba712a75fe1a26a5f2aca6e7c60da70db
Author: Chris Michael 
Date:   Fri Apr 1 07:34:43 2016 -0400

ecore-wl2: Move structures above functions

NB: This is just a cosmetic issue, no functional changes

Signed-off-by: Chris Michael 
---
 src/lib/ecore_wl2/ecore_wl2_private.h | 28 +++-
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index 58e8744..d3a00de 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -397,6 +397,20 @@ struct _Ecore_Wl2_Input
unsigned int seat_version;
 };
 
+typedef struct Ecore_Wl2_Event_Window_WWW
+{
+   unsigned int window;
+   int x_rel;
+   int y_rel;
+   uint32_t timestamp;
+} Ecore_Wl2_Event_Window_WWW;
+
+typedef struct Ecore_Wl2_Event_Window_WWW_Drag
+{
+   unsigned int window;
+   Eina_Bool dragging;
+} Ecore_Wl2_Event_Window_WWW_Drag;
+
 Ecore_Wl2_Window *_ecore_wl2_display_window_surface_find(Ecore_Wl2_Display 
*display, struct wl_surface *wl_surface);
 
 void _ecore_wl2_output_add(Ecore_Wl2_Display *display, unsigned int id);
@@ -424,19 +438,7 @@ void _ecore_wl2_subsurf_free(Ecore_Wl2_Subsurface 
*subsurf);
 void _ecore_wl2_window_shell_surface_init(Ecore_Wl2_Window *window);
 void _ecore_wl2_window_www_surface_init(Ecore_Wl2_Window *window);
 
-typedef struct Ecore_Wl2_Event_Window_WWW
-{
-   unsigned int window;
-   int x_rel;
-   int y_rel;
-   uint32_t timestamp;
-} Ecore_Wl2_Event_Window_WWW;
-
-typedef struct Ecore_Wl2_Event_Window_WWW_Drag
-{
-   unsigned int window;
-   Eina_Bool dragging;
-} Ecore_Wl2_Event_Window_WWW_Drag;
 EAPI extern int _ecore_wl2_event_window_www;
 EAPI extern int _ecore_wl2_event_window_www_drag;
+
 #endif

-- 




[EGIT] [core/enlightenment] master 01/01: e icons: reduce mem usage (in x11) by a fair bit by de-duplicating

2016-04-01 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 57ce6419e5c257e6fee6809cdb9c63d39c0b0a98
Author: Carsten Haitzler (Rasterman) 
Date:   Fri Apr 1 20:29:04 2016 +0900

e icons: reduce mem usage (in x11) by a fair bit by de-duplicating

so i was profiling today .. leak hunting .. and i noticed. if you have
enough appss open - eg terminology, e uses a huge amount of memory...
for icons. terminology is 128x128 ...  thats 64k per icon. open up a
lot of terminology windows and we duplicate that 64k per every window
on the wm sside because we get the data. it would apply for any app
that sets a netwm icon. this can be come rather silly if you have like
100 terminals. it's worse with larger icons (eg 256x256 - 256k per
icon).

this puts in a simply list for shared icons and a lookup on fetch to
de-duplicate and share icon data. this should drop memory usage
nicely.

@improvement
---
 src/bin/e_client.c | 103 ++---
 src/bin/e_client.h |   2 ++
 src/bin/e_comp_x.c |  22 +++-
 3 files changed, 105 insertions(+), 22 deletions(-)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index 1d24366..e2a2bf6 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -534,10 +534,9 @@ _e_client_free(E_Client *ec)
ec->stick_desks = eina_list_free(ec->stick_desks);
if (ec->netwm.icons)
  {
-int i;
-for (i = 0; i < ec->netwm.num_icons; i++)
-  free(ec->netwm.icons[i].data);
-E_FREE(ec->netwm.icons);
+e_client_icon_free(ec->netwm.icons, ec->netwm.num_icons);
+ec->netwm.icons = NULL;
+ec->netwm.num_icons = 0;
  }
E_FREE(ec->netwm.extra_types);
eina_stringshare_replace(&ec->border.name, NULL);
@@ -5023,3 +5022,99 @@ e_client_layout_cb_set(E_Client_Layout_Cb cb)
  CRI("ATTEMPTING TO OVERWRITE EXISTING CLIENT LAYOUT HOOK!!!");
_e_client_layout_cb = cb;
 }
+
+
+static Eina_List *iconshare = NULL;
+
+typedef struct _E_Client_Icon_Entry E_Client_Icon_Entry;
+
+struct _E_Client_Icon_Entry
+{
+   Ecore_X_Icon *icons;
+   int num_icons;
+   int ref;
+};
+
+E_API Ecore_X_Icon *
+e_client_icon_deduplicate(Ecore_X_Icon *icons, int num_icons)
+{
+   int i;
+   Eina_List *l;
+   E_Client_Icon_Entry *ie;
+
+   // unless the rest of e uses border icons OTHER than icon #0
+   // then free the rest that we don't need anymore.
+   for (i = 1; i < num_icons; i++)
+ {
+free(icons[i].data);
+icons[i].data = NULL;
+ }
+   // lookup icon data in icons cache/share
+   EINA_LIST_FOREACH(iconshare, l, ie)
+ {
+if ((ie->num_icons == num_icons) &&
+(num_icons  > 0) &&
+(ie->icons[0].width == icons[0].width) &&
+(ie->icons[0].height == icons[0].height) &&
+(!memcmp(ie->icons[0].data, icons[0].data,
+ icons[0].width * icons[0].height * 4)))
+  {
+ // found so free the input icons
+ for (i = 0; i < num_icons; i++)
+   free(icons[i].data);
+ free(icons);
+ // ref the shared/cached one
+ ie->ref++;
+ iconshare = eina_list_promote_list(iconshare, l);
+ // and return that
+ return ie->icons;
+  }
+ }
+   // no hit - new entry to cache. add it
+   ie = calloc(1, sizeof(E_Client_Icon_Entry));
+   if (ie)
+ {
+ie->icons = icons;
+ie->num_icons = num_icons;
+ie->ref = 1;
+iconshare = eina_list_prepend(iconshare, ie);
+ }
+   return icons;
+}
+
+E_API void
+e_client_icon_free(Ecore_X_Icon *icons, int num_icons)
+{
+   int i;
+   Eina_List *l;
+   E_Client_Icon_Entry *ie;
+
+   // lookup in icon share cache
+   EINA_LIST_FOREACH(iconshare, l, ie)
+ {
+if ((ie->num_icons == num_icons) &&
+(num_icons  > 0) &&
+(ie->icons[0].width == icons[0].width) &&
+(ie->icons[0].height == icons[0].height) &&
+(!memcmp(ie->icons[0].data, icons[0].data,
+ icons[0].width * icons[0].height * 4)))
+  {
+ // found so deref
+ ie->ref--;
+ if (ie->ref <= 0)
+   {
+  // no refs left - free the icon from the share/cache
+  iconshare = eina_list_remove_list(iconshare, l);
+  for (i = 0; i < ie->num_icons; i++)
+free(ie->icons[i].data);
+  free(ie->icons);
+  free(ie);
+   }
+ return;
+  }
+ }
+   // not found - so just free it ... odd - we should never be here
+   for (i = 0; i < num_icons; i++)
+ free(icons[i].data);
+   free(icons);
+}
diff --git a/src/bin/e_client.h b/src/bin/e_client.h
index 13d24fd..9

[EGIT] [tools/eflete] master 12/16: property_demo_swallow: change stlye and image path to utf8

2016-04-01 Thread Vitalii Vorobiov
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=a646d1dbbf0b22b9b00dab88408b34475f914c74

commit a646d1dbbf0b22b9b00dab88408b34475f914c74
Author: Vitalii Vorobiov 
Date:   Thu Mar 31 14:02:14 2016 +0300

property_demo_swallow: change stlye and image path to utf8

Or else such constructions like on&off will be ignored and won't work at all
---
 src/bin/ui/property_demo_swallow.c | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/bin/ui/property_demo_swallow.c 
b/src/bin/ui/property_demo_swallow.c
index 34766e2..b9a6314 100644
--- a/src/bin/ui/property_demo_swallow.c
+++ b/src/bin/ui/property_demo_swallow.c
@@ -269,7 +269,7 @@ _on_image_done(void *data,
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
 {
-   const char *value;
+   char *value;
const char *selected;
Eina_List *list_selected = (Eina_List *)event_info;
Demo_Swallow_Prop_Data *pd = (Demo_Swallow_Prop_Data *)data;
@@ -278,9 +278,10 @@ _on_image_done(void *data,
 
if (!list_selected) return false;
 
-   value = elm_entry_entry_get(pd->picture);
+   value = elm_entry_markup_to_utf8(elm_entry_entry_get(obj));
selected = eina_list_data_get(list_selected);
-   if (strcmp(value, selected) == 0) return true;
+   if (strcmp(value, selected) == 0)
+ goto end;
 
elm_entry_entry_set(pd->picture, selected);
 
@@ -290,6 +291,8 @@ _on_image_done(void *data,
 
evas_object_smart_callback_call(ap.win, SIGNAL_DEMO_SWALLOW_SET, pd->part);
 
+end:
+   free(value);
return true;
 }
 
@@ -332,15 +335,17 @@ _on_style_change(void *data,
 {
Demo_Swallow_Prop_Data *pd = (Demo_Swallow_Prop_Data *)data;
assert(pd != NULL);
-   const char *value;
+   char *value;
 
-   value = elm_entry_entry_get(pd->content_style);
+   value = elm_entry_markup_to_utf8(elm_entry_entry_get(obj));
 
eina_stringshare_del(pd->part->content_style);
+
pd->part->content_style = eina_stringshare_add(value);
pd->part->change = true;
 
evas_object_smart_callback_call(ap.win, SIGNAL_DEMO_SWALLOW_SET, pd->part);
+   free(value);
 }
 static Evas_Object *
 prop_style_set_add(Evas_Object *parent,

-- 




[EGIT] [tools/eflete] master 15/16: workspace: recalc the relative scale of ruler if object area shown

2016-04-01 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=50d2bbfd6843e4f87f7a5f643735209b1ce138e1

commit 50d2bbfd6843e4f87f7a5f643735209b1ce138e1
Author: Vyacheslav Reutskiy 
Date:   Fri Apr 1 13:13:58 2016 +0300

workspace: recalc the relative scale of ruler if object area shown

Change-Id: Id10d7bb8845ae26a58b8144adf280c92ded9647d
---
 src/bin/ui/workspace/workspace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index 8ace046..90806be 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -968,6 +968,7 @@ workspace_object_area_visible_set(Evas_Object *obj, 
Eina_Bool visible)
area = _scroll_area_get(wd);
 
groupview_part_object_area_visible_set(area->content, visible);
+   _container_changed(wd, NULL, container_geom_get(area->container));
 }
 
 Eina_Bool

-- 




[EGIT] [tools/eflete] master 09/16: regexp: allow the symbol '-' in hhe style name

2016-04-01 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=74c6a42abd326d390d59cf1d551813e6cdd79c6f

commit 74c6a42abd326d390d59cf1d551813e6cdd79c6f
Author: Vyacheslav Reutskiy 
Date:   Fri Apr 1 07:00:21 2016 +0300

regexp: allow the symbol '-' in hhe style name

Change-Id: I84715b8dd128b7871f978161d9bd76fcb7bd0f3e
---
 src/bin/common/string_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/common/string_common.h b/src/bin/common/string_common.h
index 882867f..f49b20b 100644
--- a/src/bin/common/string_common.h
+++ b/src/bin/common/string_common.h
@@ -31,7 +31,7 @@
free(arr); \
 }
 
-#define LAYOUT_NAME_REGEX "^[a-zA-Z0-9_\\.\\/]+$"
+#define LAYOUT_NAME_REGEX "^[a-zA-Z0-9_\\.\\/-]+$"
 #define NAME_REGEX "^[a-zA-Z0-9_]+$"
 #define STATE_VALUE_REGEX "^((0?(\\.[0-9]+)?|1(\\.0+)?))?$"
 #define PART_NAME_REGEX "^[a-zA-Z0-9_\\.]+$"

-- 




[EGIT] [core/enlightenment] master 01/01: reapply client focus after input grab, only handle focus for wayland compositors

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 7f20ff52c9b51f8dc5a9c2bdba52d2622d9759a8
Author: Mike Blumenkrantz 
Date:   Fri Apr 1 06:56:47 2016 -0400

reapply client focus after input grab, only handle focus for wayland 
compositors

this was looking too weird

ref 4a73e9f29ac5a3bafdff8d05c2f544ab47d4000b
---
 src/bin/e_comp.c | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index 79ffe83..7c1fe65 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -1653,11 +1653,22 @@ e_comp_grab_input(Eina_Bool mouse, Eina_Bool kbd)
if ((e_comp->input_mouse_grabs && e_comp->input_key_grabs) ||
e_grabinput_get(mwin, 0, kwin))
  {
-if (e_client_focused_get())
-  evas_object_focus_set(e_client_focused_get()->frame, 0);
+E_Client *ec = e_client_focused_get();
+
+if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
+  {
+ if (ec)
+   evas_object_focus_set(ec->frame, 0);
+  }
+
 ret = EINA_TRUE;
 e_comp->input_mouse_grabs += mouse;
 e_comp->input_key_grabs += kbd;
+if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
+  {
+ if (ec)
+   evas_object_focus_set(ec->frame, 1);
+  }
  }
return ret;
 }

-- 




[EGIT] [tools/eflete] master 01/16: property_demo_swallow: field to set widget content's style

2016-04-01 Thread Vitalii Vorobiov
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=406a3fae35b87d1bc297854c0533086219fd0b4d

commit 406a3fae35b87d1bc297854c0533086219fd0b4d
Author: Vitalii Vorobiov 
Date:   Thu Mar 31 13:07:31 2016 +0300

property_demo_swallow: field to set widget content's style
---
 src/bin/ui/property_demo_swallow.c | 33 +
 src/bin/ui/workspace/demo_group.c  |  4 
 src/bin/ui/workspace/demo_group.h  |  1 +
 3 files changed, 38 insertions(+)

diff --git a/src/bin/ui/property_demo_swallow.c 
b/src/bin/ui/property_demo_swallow.c
index 04fa87c..34766e2 100644
--- a/src/bin/ui/property_demo_swallow.c
+++ b/src/bin/ui/property_demo_swallow.c
@@ -45,6 +45,7 @@ struct _Demo_Swallow_Prop_Data
Evas_Object *color_obj;
Evas_Object *picture;
Evas_Object *widget;
+   Evas_Object *content_style;
 
Evas_Object *max_w, *max_h;
Evas_Object *min_w, *min_h;
@@ -324,6 +325,35 @@ prop_image_path_add(Evas_Object *parent,
return item;
 }
 
+static void
+_on_style_change(void *data,
+ Evas_Object *obj __UNUSED__,
+ void *ei __UNUSED__)
+{
+   Demo_Swallow_Prop_Data *pd = (Demo_Swallow_Prop_Data *)data;
+   assert(pd != NULL);
+   const char *value;
+
+   value = elm_entry_entry_get(pd->content_style);
+
+   eina_stringshare_del(pd->part->content_style);
+   pd->part->content_style = eina_stringshare_add(value);
+   pd->part->change = true;
+
+   evas_object_smart_callback_call(ap.win, SIGNAL_DEMO_SWALLOW_SET, pd->part);
+}
+static Evas_Object *
+prop_style_set_add(Evas_Object *parent,
+   Demo_Swallow_Prop_Data *pd)
+{
+   PROPERTY_ITEM_ADD(parent, "Content Style:", "1swallow")
+   ENTRY_ADD(item, pd->content_style, true)
+   elm_entry_entry_set(pd->content_style, "default");
+   evas_object_smart_callback_add(pd->content_style, "changed,user", 
_on_style_change, pd);
+   elm_layout_content_set(item, NULL, pd->content_style);
+   return item;
+}
+
 void
 ui_property_demo_swallow_part_set(Evas_Object *property, Demo_Part *part)
 {
@@ -339,6 +369,7 @@ ui_property_demo_swallow_part_set(Evas_Object *property, 
Demo_Part *part)
   part->b,
   part->a);
 elm_entry_entry_set(pd->picture, part->image_path);
+elm_entry_entry_set(pd->content_style, part->content_style);
 
 elm_spinner_value_set(pd->min_w, part->min_w);
 elm_spinner_value_set(pd->min_h, part->min_h);
@@ -390,6 +421,8 @@ ui_property_demo_swallow_add(Evas_Object *parent)
elm_box_pack_end(pd->box, item);
item = prop_widget_add(pd->box, pd);
elm_box_pack_end(pd->box, item);
+   item = prop_style_set_add(pd->box, pd);
+   elm_box_pack_end(pd->box, item);
 
item = prop_rectangle_color_add(pd->box, pd);
elm_box_pack_end(pd->box, item);
diff --git a/src/bin/ui/workspace/demo_group.c 
b/src/bin/ui/workspace/demo_group.c
index 19bbc20..2a855a6 100644
--- a/src/bin/ui/workspace/demo_group.c
+++ b/src/bin/ui/workspace/demo_group.c
@@ -476,6 +476,7 @@ demo_group_add(Group *group)
  demo_part = mem_calloc(1, sizeof(Demo_Part));
  demo_part->name = eina_stringshare_add(part->name);
  demo_part->type = part->type;
+ demo_part->content_style = eina_stringshare_add("default");
  pl->text_list = eina_list_append(pl->text_list, demo_part);
  elm_genlist_item_append(pl->genlist,
  itc_part,
@@ -490,6 +491,7 @@ demo_group_add(Group *group)
  demo_part = mem_calloc(1, sizeof(Demo_Part));
  demo_part->name = eina_stringshare_add(part->name);
  demo_part->type = part->type;
+ demo_part->content_style = eina_stringshare_add("default");
  demo_part->a = 255;
  demo_part->r = 255;
  demo_part->g = 255;
@@ -596,6 +598,7 @@ demo_group_part_add(Evas_Object *demo, Part *part)
 demo_part = mem_calloc(1, sizeof(Demo_Part));
 demo_part->name = eina_stringshare_add(part->name);
 demo_part->type = part->type;
+demo_part->content_style = eina_stringshare_add("default");
 pl->text_list = eina_list_append(pl->text_list, demo_part);
 elm_genlist_item_append(pl->genlist,
 itc_part,
@@ -610,6 +613,7 @@ demo_group_part_add(Evas_Object *demo, Part *part)
 demo_part = mem_calloc(1, sizeof(Demo_Part));
 demo_part->name = eina_stringshare_add(part->name);
 demo_part->type = part->type;
+demo_part->content_style = eina_stringshare_add("default");
 demo_part->a = 255;
 demo_part->r = 255;
 demo_part->g = 255;
diff --git a/src/bin/ui/workspace/demo_group.h 
b/src/bin/ui/workspace/demo_group.h
index bbd77e5..1b28f8a 100644
--- a/src/bin/ui/workspace/demo_group.h
+++ b/src/bin/ui/workspace/demo_group.h
@@ -100,6 +100,7 @@ struct Demo_Part_
int swallo

[EGIT] [tools/eflete] master 07/16: menu: add item "Fit container in workpace"

2016-04-01 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=69ebe9efac0714633fdf2857fca9eb11eefcd9e1

commit 69ebe9efac0714633fdf2857fca9eb11eefcd9e1
Author: Vyacheslav Reutskiy 
Date:   Thu Mar 31 16:22:35 2016 +0300

menu: add item "Fit container in workpace"

Change-Id: I63d01f49988164ecb3bc1c4269639b91cd851317
---
 src/bin/common/signals.h |  1 +
 src/bin/ui/main_window.h |  1 +
 src/bin/ui/menu.c|  5 +
 src/bin/ui/tabs.c| 10 ++
 src/bin/ui/workspace/workspace.c |  2 ++
 5 files changed, 19 insertions(+)

diff --git a/src/bin/common/signals.h b/src/bin/common/signals.h
index e8af42e..9d54a23 100644
--- a/src/bin/common/signals.h
+++ b/src/bin/common/signals.h
@@ -474,6 +474,7 @@ typedef struct {
 #define SIGNAL_SHORTCUT_ZOOM_OUT "SIGNAL_SHORTCUT_ZOOM_OUT"
 #define SIGNAL_SHORTCUT_ZOOM_RESET "SIGNAL_SHORTCUT_ZOOM_RESET"
 #define SIGNAL_SHORTCUT_FILL "SIGNAL_SHORTCUT_FILL"
+#define SIGNAL_SHORTCUT_FIT "SIGNAL_SHORTCUT_FIT"
 #define SIGNAL_SHORTCUT_OBJECT_AREA "SIGNAL_SHORTCUT_OBJECT_AREA"
 
 /**
diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h
index 94738e5..dce5fdb 100644
--- a/src/bin/ui/main_window.h
+++ b/src/bin/ui/main_window.h
@@ -75,6 +75,7 @@ enum Menu_Item
   MENU_VIEW_WORKSPACE_ZOOM_IN,
   MENU_VIEW_WORKSPACE_ZOOM_OUT,
   MENU_VIEW_WORKSPACE_ZOOM_RESET,
+  MENU_VIEW_WORKSPACE_FIT,
   MENU_VIEW_WORKSPACE_FILL,
   MENU_VIEW_WORKSPACE_OBJECT_AREA,
   MENU_VIEW_RULERS_SHOW,
diff --git a/src/bin/ui/menu.c b/src/bin/ui/menu.c
index 873d3e9..4832912 100644
--- a/src/bin/ui/menu.c
+++ b/src/bin/ui/menu.c
@@ -47,6 +47,7 @@ int MENU_ITEMS_LIST_STYLE_ONLY[] = {
MENU_VIEW_WORKSPACE_ZOOM_IN,
MENU_VIEW_WORKSPACE_ZOOM_OUT,
MENU_VIEW_WORKSPACE_ZOOM_RESET,
+   MENU_VIEW_WORKSPACE_FIT,
MENU_VIEW_WORKSPACE_FILL,
MENU_VIEW_WORKSPACE_OBJECT_AREA,
MENU_VIEW_RULERS_SHOW,
@@ -145,6 +146,9 @@ _menu_cb(void *data __UNUSED__,
   case MENU_VIEW_WORKSPACE_ZOOM_RESET:
  evas_object_smart_callback_call(ap.win, SIGNAL_SHORTCUT_ZOOM_RESET, 
NULL);
  break;
+  case MENU_VIEW_WORKSPACE_FIT:
+ evas_object_smart_callback_call(ap.win, SIGNAL_SHORTCUT_FIT, NULL);
+ break;
   case MENU_VIEW_WORKSPACE_FILL:
  evas_object_smart_callback_call(ap.win, SIGNAL_SHORTCUT_FILL, NULL);
  break;
@@ -305,6 +309,7 @@ ui_menu_add(void)
   ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_WORKSPACE_ZOOM_IN, NULL, _("Zoom 
in"), "+")
   ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_WORKSPACE_ZOOM_OUT, NULL, _("Zoom 
out"), "-")
   ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_WORKSPACE_ZOOM_RESET, NULL, _("Reset 
zoom"), "/")
+  ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_WORKSPACE_FIT, NULL, _("Fit container 
in Workspace"), NULL)
   ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_WORKSPACE_FILL, NULL, _("Fill 
workspace"), NULL)
   ___(MENU_VIEW);
   ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_WORKSPACE_OBJECT_AREA, NULL, _("Show 
object area"), "o")
diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c
index 3ee13c7..c8ff9cc 100644
--- a/src/bin/ui/tabs.c
+++ b/src/bin/ui/tabs.c
@@ -798,6 +798,15 @@ _shortcut_fill_cb(void *data __UNUSED__,
 }
 
 static void
+_shortcut_fit_cb(void *data __UNUSED__,
+ Evas_Object *obj __UNUSED__,
+ void *event_info __UNUSED__)
+{
+   if (tabs.current_workspace)
+ workspace_container_fit(tabs.current_workspace);
+}
+
+static void
 _shortcut_object_area_cb(void *data __UNUSED__,
  Evas_Object *obj __UNUSED__,
  void *event_info __UNUSED__)
@@ -933,6 +942,7 @@ tabs_add(void)
evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_ZOOM_IN, 
_shortcut_zoom_in_cb, NULL);
evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_ZOOM_OUT, 
_shortcut_zoom_out_cb, NULL);
evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_ZOOM_RESET, 
_shortcut_zoom_reset_cb, NULL);
+   evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_FIT, 
_shortcut_fit_cb, NULL);
evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_FILL, 
_shortcut_fill_cb, NULL);
evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_OBJECT_AREA, 
_shortcut_object_area_cb, NULL);
return tabs.layout;
diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index 5adff82..fc2342d 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -609,6 +609,7 @@ _mode_cb(void *data,
  evas_object_smart_callback_call(ap.win, SIGNAL_TAB_CHANGED, 
wd->group);
 
  area = &wd->normal;
+ ui_menu_disable_set(ap.menu, MENU_VIEW_WORKSPACE_FIT, false);
  break;
   case MODE_DEMO:
  if (!wd->demo.layout) _scroll_area_add(wd, &wd->demo, false);
@@ -627,6 +628,7 @@ _mode_cb(void *data,
  evas_object_smart_callback_call(ap.win, SIGNAL_DIFFERENT_TAB_CLICKED, 
NULL);
 
  area = &

[EGIT] [tools/eflete] master 14/16: container: add getter for container geometry

2016-04-01 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=094931ca956afd0811b8ad3e08bde74942d75623

commit 094931ca956afd0811b8ad3e08bde74942d75623
Author: Vyacheslav Reutskiy 
Date:   Fri Apr 1 13:03:47 2016 +0300

container: add getter for container geometry

Change-Id: If9fa16787c64133cd3659071f5a14a818ebe268b
---
 src/bin/ui/workspace/container.c |  8 
 src/bin/ui/workspace/container.h | 10 ++
 src/bin/ui/workspace/workspace.c |  3 ++-
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/workspace/container.c b/src/bin/ui/workspace/container.c
index e37e06a..c20ee03 100644
--- a/src/bin/ui/workspace/container.c
+++ b/src/bin/ui/workspace/container.c
@@ -488,6 +488,14 @@ container_container_size_set(Evas_Object *obj, int w, int 
h)
return true;
 }
 
+Container_Geom *
+container_geom_get(Evas_Object *obj)
+{
+   CONTAINER_DATA_GET(obj, sd);
+
+   return &sd->size;
+}
+
 Eina_Bool
 container_container_size_get(Evas_Object *obj, int *w, int *h)
 {
diff --git a/src/bin/ui/workspace/container.h b/src/bin/ui/workspace/container.h
index 22349d6..d4c37e7 100644
--- a/src/bin/ui/workspace/container.h
+++ b/src/bin/ui/workspace/container.h
@@ -157,6 +157,16 @@ Eina_Bool
 container_container_size_get(Evas_Object *obj, int *w, int *h);
 
 /**
+ * Get the container geom
+ *
+ * @param obj The Container object.
+ *
+ * @ingroup Container
+ */
+Container_Geom *
+container_geom_get(Evas_Object *obj);
+
+/**
  * Set the new style to Container object.
  *
  * @param obj The Container object,
diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index fc2342d..8ace046 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -497,7 +497,8 @@ _container_changed(void *data,
evas_object_geometry_get(area->ruler_v.obj, NULL, &y, NULL, NULL);
 
if (((MODE_NORMAL == wd->mode) || (MODE_CODE == wd->mode)) && area->content)
- part_geom = groupview_part_selected_object_area_geom_get(area->content);
+ if (groupview_part_object_area_visible_get(area->content))
+   part_geom = groupview_part_selected_object_area_geom_get(area->content);
if (part_geom)
  {
 scale_x = part_geom->x - x;

-- 




[EGIT] [tools/eflete] master 04/16: menu: add item "Fill workpace"

2016-04-01 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=0ba1fb379db5a32ef541c6d5220e7c52ef78d65b

commit 0ba1fb379db5a32ef541c6d5220e7c52ef78d65b
Author: Vyacheslav Reutskiy 
Date:   Thu Mar 31 12:10:05 2016 +0300

menu: add item "Fill workpace"

Change-Id: Iacdbc68166b012401b6b8b6e5810db787ceac4b1
---
 src/bin/common/signals.h |  1 +
 src/bin/ui/main_window.h |  1 +
 src/bin/ui/menu.c|  5 +
 src/bin/ui/tabs.c| 10 ++
 src/bin/ui/workspace/workspace.c |  2 +-
 src/bin/ui/workspace/workspace.h |  7 +++
 6 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/src/bin/common/signals.h b/src/bin/common/signals.h
index 4b7b3f9..e8af42e 100644
--- a/src/bin/common/signals.h
+++ b/src/bin/common/signals.h
@@ -473,6 +473,7 @@ typedef struct {
 #define SIGNAL_SHORTCUT_ZOOM_IN "SIGNAL_SHORTCUT_ZOOM_IN"
 #define SIGNAL_SHORTCUT_ZOOM_OUT "SIGNAL_SHORTCUT_ZOOM_OUT"
 #define SIGNAL_SHORTCUT_ZOOM_RESET "SIGNAL_SHORTCUT_ZOOM_RESET"
+#define SIGNAL_SHORTCUT_FILL "SIGNAL_SHORTCUT_FILL"
 #define SIGNAL_SHORTCUT_OBJECT_AREA "SIGNAL_SHORTCUT_OBJECT_AREA"
 
 /**
diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h
index a1d4fd5..94738e5 100644
--- a/src/bin/ui/main_window.h
+++ b/src/bin/ui/main_window.h
@@ -75,6 +75,7 @@ enum Menu_Item
   MENU_VIEW_WORKSPACE_ZOOM_IN,
   MENU_VIEW_WORKSPACE_ZOOM_OUT,
   MENU_VIEW_WORKSPACE_ZOOM_RESET,
+  MENU_VIEW_WORKSPACE_FILL,
   MENU_VIEW_WORKSPACE_OBJECT_AREA,
   MENU_VIEW_RULERS_SHOW,
   MENU_VIEW_RULERS_ABS,
diff --git a/src/bin/ui/menu.c b/src/bin/ui/menu.c
index 4c805a8..873d3e9 100644
--- a/src/bin/ui/menu.c
+++ b/src/bin/ui/menu.c
@@ -47,6 +47,7 @@ int MENU_ITEMS_LIST_STYLE_ONLY[] = {
MENU_VIEW_WORKSPACE_ZOOM_IN,
MENU_VIEW_WORKSPACE_ZOOM_OUT,
MENU_VIEW_WORKSPACE_ZOOM_RESET,
+   MENU_VIEW_WORKSPACE_FILL,
MENU_VIEW_WORKSPACE_OBJECT_AREA,
MENU_VIEW_RULERS_SHOW,
MENU_VIEW_RULERS_ABS,
@@ -144,6 +145,9 @@ _menu_cb(void *data __UNUSED__,
   case MENU_VIEW_WORKSPACE_ZOOM_RESET:
  evas_object_smart_callback_call(ap.win, SIGNAL_SHORTCUT_ZOOM_RESET, 
NULL);
  break;
+  case MENU_VIEW_WORKSPACE_FILL:
+ evas_object_smart_callback_call(ap.win, SIGNAL_SHORTCUT_FILL, NULL);
+ break;
   case MENU_VIEW_RULERS_SHOW:
  evas_object_smart_callback_call(tabs_current_workspace_get(), 
"ruler,toggle", strdup("rulers"));
  break;
@@ -301,6 +305,7 @@ ui_menu_add(void)
   ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_WORKSPACE_ZOOM_IN, NULL, _("Zoom 
in"), "+")
   ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_WORKSPACE_ZOOM_OUT, NULL, _("Zoom 
out"), "-")
   ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_WORKSPACE_ZOOM_RESET, NULL, _("Reset 
zoom"), "/")
+  ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_WORKSPACE_FILL, NULL, _("Fill 
workspace"), NULL)
   ___(MENU_VIEW);
   ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_WORKSPACE_OBJECT_AREA, NULL, _("Show 
object area"), "o")
   ___(MENU_VIEW);
diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c
index a132945..3ee13c7 100644
--- a/src/bin/ui/tabs.c
+++ b/src/bin/ui/tabs.c
@@ -789,6 +789,15 @@ _shortcut_zoom_reset_cb(void *data __UNUSED__,
 }
 
 static void
+_shortcut_fill_cb(void *data __UNUSED__,
+  Evas_Object *obj __UNUSED__,
+  void *event_info __UNUSED__)
+{
+   if (tabs.current_workspace)
+ workspace_container_fill(tabs.current_workspace);
+}
+
+static void
 _shortcut_object_area_cb(void *data __UNUSED__,
  Evas_Object *obj __UNUSED__,
  void *event_info __UNUSED__)
@@ -924,6 +933,7 @@ tabs_add(void)
evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_ZOOM_IN, 
_shortcut_zoom_in_cb, NULL);
evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_ZOOM_OUT, 
_shortcut_zoom_out_cb, NULL);
evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_ZOOM_RESET, 
_shortcut_zoom_reset_cb, NULL);
+   evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_FILL, 
_shortcut_fill_cb, NULL);
evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_OBJECT_AREA, 
_shortcut_object_area_cb, NULL);
return tabs.layout;
 }
diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index 0801243..2b1a677 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -1215,7 +1215,7 @@ workspace_zoom_factor_get(Evas_Object *obj)
 void
 workspace_container_fill(Evas_Object *obj)
 {
-   Evas_Coord w, h;
+   int w, h;
int r, t, l, b;
Scroll_Area *area;
 
diff --git a/src/bin/ui/workspace/workspace.h b/src/bin/ui/workspace/workspace.h
index 45229dd..8194211 100644
--- a/src/bin/ui/workspace/workspace.h
+++ b/src/bin/ui/workspace/workspace.h
@@ -251,6 +251,13 @@ workspace_zoom_factor_set(Evas_Object *obj, double factor);
 double
 workspace_zoom_factor_get(Evas_Object *obj);
 
+/**
+ * Resize the container to workspac

[EGIT] [tools/eflete] master 16/16: workspace: use the container_geom_get instead container_content_size_get

2016-04-01 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=da1b6b31cdef8f9b44fc4480469f364b68f3d843

commit da1b6b31cdef8f9b44fc4480469f364b68f3d843
Author: Vyacheslav Reutskiy 
Date:   Fri Apr 1 13:20:14 2016 +0300

workspace: use the container_geom_get instead container_content_size_get

Change-Id: I99a87f93cd432deb8ab674978bcf7eb4e551378b
---
 src/bin/ui/workspace/container.c | 11 ---
 src/bin/ui/workspace/container.h | 14 --
 src/bin/ui/workspace/workspace.c | 19 ++-
 3 files changed, 10 insertions(+), 34 deletions(-)

diff --git a/src/bin/ui/workspace/container.c b/src/bin/ui/workspace/container.c
index c20ee03..b242845 100644
--- a/src/bin/ui/workspace/container.c
+++ b/src/bin/ui/workspace/container.c
@@ -497,17 +497,6 @@ container_geom_get(Evas_Object *obj)
 }
 
 Eina_Bool
-container_container_size_get(Evas_Object *obj, int *w, int *h)
-{
-   CONTAINER_DATA_GET(obj, sd);
-
-   if (w) *w = sd->size.w;
-   if (h) *h = sd->size.h;
-
-   return true;
-}
-
-Eina_Bool
 container_style_set(Evas_Object *obj, const char *style)
 {
CONTAINER_DATA_GET(obj, sd);
diff --git a/src/bin/ui/workspace/container.h b/src/bin/ui/workspace/container.h
index d4c37e7..f735531 100644
--- a/src/bin/ui/workspace/container.h
+++ b/src/bin/ui/workspace/container.h
@@ -143,20 +143,6 @@ Eina_Bool
 container_container_size_set(Evas_Object *obj, int w, int h);
 
 /**
- * Get the size of container.
- *
- * @param obj The Container object,
- * @param w The int pointer where width will be set,
- * @param h The int pointer where height will be set.
- *
- * @return EINA_TRUE on success or EINA_FALSE, on errors.
- *
- * @ingroup Container
- */
-Eina_Bool
-container_container_size_get(Evas_Object *obj, int *w, int *h);
-
-/**
  * Get the container geom
  *
  * @param obj The Container object.
diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index 90806be..c7c57d5 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -574,7 +574,7 @@ _mode_cb(void *data,
Workspace_Mode mode;
Evas_Object *content;
Scroll_Area *area = NULL;
-   int w = 0, h = 0;
+   const Container_Geom *geom;
 
mode = elm_radio_value_get(obj);
if (mode == wd->mode) return;
@@ -642,9 +642,9 @@ _mode_cb(void *data,
 
elm_check_state_set(wd->toolbar.container_sizer.check_lock, 
container_lock_get(area->container));
 
-   container_container_size_get(area->container, &w, &h);
-   elm_spinner_value_set(wd->toolbar.container_sizer.spinner_w, w);
-   elm_spinner_value_set(wd->toolbar.container_sizer.spinner_h, h);
+   geom = container_geom_get(area->container);
+   elm_spinner_value_set(wd->toolbar.container_sizer.spinner_w, geom->w);
+   elm_spinner_value_set(wd->toolbar.container_sizer.spinner_h, geom->h);
 }
 
 static void
@@ -1250,10 +1250,11 @@ workspace_container_fill(Evas_Object *obj)
 void
 workspace_container_fit(Evas_Object *obj)
 {
-   int w, h, cw, ch;
+   int w, h;
double zoom;
int r, t, l, b;
Scroll_Area *area;
+   const Container_Geom *geom;
 
WS_DATA_GET(obj);
 
@@ -1262,13 +1263,13 @@ workspace_container_fit(Evas_Object *obj)
area = _scroll_area_get(wd);
/* get the bg size, because bg size not included the scrollbar size */
evas_object_geometry_get(area->bg, NULL, NULL, &w, &h);
-   container_container_size_get(area->container, &cw, &ch);
+   geom = container_geom_get(area->container);
container_padding_size_get(area->container, &r, &t, &l, &b);
 
-   if (cw >= ch)
- zoom = (w - l - r) / (double)cw;
+   if (geom->w >= geom->h)
+ zoom = (w - l - r) / (double)geom->w;
else
- zoom = (h - t - b) / (double)ch;
+ zoom = (h - t - b) / (double)geom->h;
 
workspace_zoom_factor_set(obj, zoom);
 }

-- 




[EGIT] [tools/eflete] master 06/16: workspace: implement workspace_container_fit

2016-04-01 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=60247dae6bdd7d50d685ece4f96d970a648251b9

commit 60247dae6bdd7d50d685ece4f96d970a648251b9
Author: Vyacheslav Reutskiy 
Date:   Thu Mar 31 16:21:35 2016 +0300

workspace: implement workspace_container_fit

Change-Id: I0b7df46d8947f616f068241303646a8326e2c6a8
---
 src/bin/ui/workspace/workspace.c | 47 
 src/bin/ui/workspace/workspace.h | 10 +
 2 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index 2b1a677..5adff82 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -72,7 +72,7 @@ struct _Workspace_Data
   Evas_Object *layout;
   Evas_Object *obj;
   struct {
- Evas_Object *fill;
+ Evas_Object *fit;
  Evas_Object *z100;
  Evas_Object *slider;
   } zoom;
@@ -286,6 +286,16 @@ _zoom100_cb(void *data,
 }
 
 static void
+_fit_cb(void *data,
+Evas_Object *obj __UNUSED__,
+void *event_info __UNUSED__)
+{
+   Workspace_Data *wd = data;
+
+   workspace_container_fit(wd->panes);
+}
+
+static void
 _slider_zoom_cb(void *data,
 Evas_Object *obj __UNUSED__,
 void *event_info __UNUSED__)
@@ -299,7 +309,7 @@ _slider_zoom_cb(void *data,
 static void
 _zoom_controls_disabled_set(Workspace_Data *wd, Eina_Bool disabled)
 {
-   elm_object_disabled_set(wd->toolbar.zoom.fill, disabled);
+   elm_object_disabled_set(wd->toolbar.zoom.fit, disabled);
elm_object_disabled_set(wd->toolbar.zoom.z100, disabled);
elm_object_disabled_set(wd->toolbar.zoom.slider, disabled);
 }
@@ -310,9 +320,12 @@ _zoom_controls_add(Workspace_Data *wd)
Elm_Object_Item *tb_it;
Evas_Object *img;
 
-   wd->toolbar.zoom.fill = elm_button_add(wd->toolbar.obj);
+   wd->toolbar.zoom.fit = elm_button_add(wd->toolbar.obj);
+   evas_object_smart_callback_add(wd->toolbar.zoom.fit, "clicked", _fit_cb, 
wd);
+   IMAGE_ADD_NEW(wd->toolbar.zoom.fit, img, "icon", "fit")
+   elm_object_part_content_set(wd->toolbar.zoom.fit, NULL, img);
tb_it = elm_toolbar_item_append(wd->toolbar.obj, NULL, NULL, NULL, NULL);
-   elm_object_item_part_content_set(tb_it, NULL, wd->toolbar.zoom.fill);
+   elm_object_item_part_content_set(tb_it, NULL, wd->toolbar.zoom.fit);
 
wd->toolbar.zoom.z100 = elm_button_add(wd->toolbar.obj);
elm_object_text_set(wd->toolbar.zoom.z100, _("100%"));
@@ -1231,6 +1244,32 @@ workspace_container_fill(Evas_Object *obj)
 }
 
 void
+workspace_container_fit(Evas_Object *obj)
+{
+   int w, h, cw, ch;
+   double zoom;
+   int r, t, l, b;
+   Scroll_Area *area;
+
+   WS_DATA_GET(obj);
+
+   if ((MODE_NORMAL != wd->mode) && (MODE_CODE != wd->mode)) return;
+
+   area = _scroll_area_get(wd);
+   /* get the bg size, because bg size not included the scrollbar size */
+   evas_object_geometry_get(area->bg, NULL, NULL, &w, &h);
+   container_container_size_get(area->container, &cw, &ch);
+   container_padding_size_get(area->container, &r, &t, &l, &b);
+
+   if (cw >= ch)
+ zoom = (w - l - r) / (double)cw;
+   else
+ zoom = (h - t - b) / (double)ch;
+
+   workspace_zoom_factor_set(obj, zoom);
+}
+
+void
 workspace_state_next_request(Evas_Object *obj)
 {
WS_DATA_GET(obj);
diff --git a/src/bin/ui/workspace/workspace.h b/src/bin/ui/workspace/workspace.h
index 8194211..2af77ec 100644
--- a/src/bin/ui/workspace/workspace.h
+++ b/src/bin/ui/workspace/workspace.h
@@ -262,6 +262,16 @@ void
 workspace_container_fill(Evas_Object *obj);
 
 /**
+ * Fill the workspace
+ *
+ * @param obj The workspace object.
+ *
+ * @ingroup Workspace
+ */
+void
+workspace_container_fit(Evas_Object *obj);
+
+/**
  * Switch beetwen show or hide mode of legend in workspace object.
  *
  * @param obj The workspace object.

-- 




[EGIT] [tools/eflete] master 13/16: live_list: set up into list's swallows

2016-04-01 Thread Vitalii Vorobiov
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=2e7a95fb57b7860870a2e5a3aaf7d5d7ad5a937a

commit 2e7a95fb57b7860870a2e5a3aaf7d5d7ad5a937a
Author: Vitalii Vorobiov 
Date:   Thu Mar 31 16:24:58 2016 +0300

live_list: set up into list's swallows

somehow it ignores true names of swallows if they are elm.swallow.icon/end
to set content into such swallows list require part's name "start" and "end"
instead
---
 src/bin/ui/live_view/elementary/live_list.c | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/live_view/elementary/live_list.c 
b/src/bin/ui/live_view/elementary/live_list.c
index 155c7ad..26ba442 100644
--- a/src/bin/ui/live_view/elementary/live_list.c
+++ b/src/bin/ui/live_view/elementary/live_list.c
@@ -29,8 +29,17 @@ _on_list_swallow_check(void *data,
 
Elm_Object_Item *item = elm_list_first_item_get(object);
 
+   const char *part_name = part->name;
+
+   /* because elm_list is weird */
+   if (!strcmp(part_name, "elm.swallow.icon"))
+ part_name = "start";
+   else if (!strcmp(part_name, "elm.swallow.end"))
+ part_name = "end";
+
while (item)
  {
+part->object = elm_object_item_part_content_unset(item, part_name);
 if (part->object)
   {
  evas_object_del(part->object);
@@ -55,7 +64,8 @@ _on_list_swallow_check(void *data,
part->max_w,
part->max_h);
   }
-elm_object_item_part_content_set(item, part->name, part->object);
+
+elm_object_item_part_content_set(item, part_name, part->object);
 item = elm_list_item_next(item);
  }
 }

-- 




[EGIT] [tools/eflete] master 11/16: live_widget_common: apply style to created content

2016-04-01 Thread Vitalii Vorobiov
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=76a2250a8b97adb1d1ff2858fb0a1344e76f08cd

commit 76a2250a8b97adb1d1ff2858fb0a1344e76f08cd
Author: Vitalii Vorobiov 
Date:   Thu Mar 31 13:51:40 2016 +0300

live_widget_common: apply style to created content
---
 src/bin/ui/live_view/elementary/live_widget_common.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/bin/ui/live_view/elementary/live_widget_common.c 
b/src/bin/ui/live_view/elementary/live_widget_common.c
index 0ecff75..fae8b52 100644
--- a/src/bin/ui/live_view/elementary/live_widget_common.c
+++ b/src/bin/ui/live_view/elementary/live_widget_common.c
@@ -370,7 +370,14 @@ object_generate(Demo_Part *part, Evas_Object *object)
   evas_object_smart_callback_add(bt2, "clicked", _next_page_cb, 
content);
   break;
   }
+Elm_Theme *theme = elm_theme_new();
+elm_theme_set(theme, ap.project->dev);
+elm_object_theme_set(content, theme);
+elm_theme_free(theme);
+
+elm_object_style_set(content, part->content_style);
  }
+
return content;
 }
 

-- 




[EGIT] [tools/eflete] master 03/16: workpsace: implement the workspace_container_fill

2016-04-01 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=81da5edfc28d4717e46f60eeb45ad5c55e1407d5

commit 81da5edfc28d4717e46f60eeb45ad5c55e1407d5
Author: Vyacheslav Reutskiy 
Date:   Thu Mar 31 12:07:10 2016 +0300

workpsace: implement the workspace_container_fill

Change-Id: If99e7057e615627ff2da3b69b9e7d6862f337c74
---
 src/bin/ui/workspace/workspace.c | 18 ++
 src/bin/ui/workspace/workspace.h |  3 +++
 2 files changed, 21 insertions(+)

diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index de8eebe..0801243 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -1213,6 +1213,24 @@ workspace_zoom_factor_get(Evas_Object *obj)
 }
 
 void
+workspace_container_fill(Evas_Object *obj)
+{
+   Evas_Coord w, h;
+   int r, t, l, b;
+   Scroll_Area *area;
+
+   WS_DATA_GET(obj);
+
+   area = _scroll_area_get(wd);
+   /* get the bg size, because bg size not included the scrollbar size */
+   evas_object_geometry_get(area->bg, NULL, NULL, &w, &h);
+   container_padding_size_get(area->container, &r, &t, &l, &b);
+   w = (w - l - r) / wd->zoom_factor;
+   h = (h - t - b) / wd->zoom_factor;
+   container_container_size_set(area->container, w, h);
+}
+
+void
 workspace_state_next_request(Evas_Object *obj)
 {
WS_DATA_GET(obj);
diff --git a/src/bin/ui/workspace/workspace.h b/src/bin/ui/workspace/workspace.h
index f8f817d..45229dd 100644
--- a/src/bin/ui/workspace/workspace.h
+++ b/src/bin/ui/workspace/workspace.h
@@ -251,6 +251,9 @@ workspace_zoom_factor_set(Evas_Object *obj, double factor);
 double
 workspace_zoom_factor_get(Evas_Object *obj);
 
+void
+workspace_container_fill(Evas_Object *obj);
+
 /**
  * Switch beetwen show or hide mode of legend in workspace object.
  *

-- 




[EGIT] [tools/eflete] master 08/16: container: clean up from dead members

2016-04-01 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=f6643abccab6620a93513c413014cbd42f5262f1

commit f6643abccab6620a93513c413014cbd42f5262f1
Author: Vyacheslav Reutskiy 
Date:   Thu Mar 31 16:35:47 2016 +0300

container: clean up from dead members

Change-Id: Ieb8b6ba42cfc9dafa4c5750eace557a29a24e5e4
---
 src/bin/ui/workspace/container.c | 51 
 src/bin/ui/workspace/container.h | 26 
 2 files changed, 4 insertions(+), 73 deletions(-)

diff --git a/src/bin/ui/workspace/container.c b/src/bin/ui/workspace/container.c
index 972dc21..e37e06a 100644
--- a/src/bin/ui/workspace/container.c
+++ b/src/bin/ui/workspace/container.c
@@ -55,14 +55,6 @@ struct _Container_Smart_Data
   Evas_Coord w; /* default: -1, size is not limited */
   Evas_Coord h; /* default: -1, size is not limited */
} con_size_max;
-   struct {
-  Evas_Coord w;
-  Evas_Coord h;
-   } pad_left_top;
-   struct {
-  Evas_Coord w;
-  Evas_Coord h;
-   } pad_right_bottom;
Container_Geom size;
struct{
   Evas_Object *obj;
@@ -200,10 +192,6 @@ _container_smart_add(Evas_Object *o)
priv->con_size_min.h = 0;
priv->con_size_max.w = -1;
priv->con_size_max.h = -1;
-   priv->pad_left_top.w = 0;
-   priv->pad_left_top.h = 0;
-   priv->pad_right_bottom.w = 0;
-   priv->pad_right_bottom.h = 0;
priv->size.x = 0;
priv->size.y = 0;
priv->size.w = 0;
@@ -264,8 +252,8 @@ _container_smart_move(Evas_Object *o,
CONTAINER_DATA_GET(o, sd)
 
if (sd->func) geom = sd->func(sd->content);
-   sd->size.x = ox + BASE_PADDING + sd->pad_left_top.w + (geom ? geom->x : 0);
-   sd->size.y = oy + BASE_PADDING + sd->pad_left_top.h + (geom ? geom->y : 0);
+   sd->size.x = ox + BASE_PADDING + (geom ? geom->x : 0);
+   sd->size.y = oy + BASE_PADDING + (geom ? geom->y : 0);
 
evas_object_move(sd->container, sd->size.x, sd->size.y);
evas_object_move(sd->handler_BR.obj, sd->size.x + sd->size.w, sd->size.y + 
sd->size.h);
@@ -343,8 +331,8 @@ _container_smart_calculate(Evas_Object *o)
if (sd->func) geom = sd->func(sd->content);
 
/* 3. calculate the container position relative to content protrusion */
-   sd->size.x = x + BASE_PADDING + sd->pad_left_top.w + (geom ? geom->x : 0);
-   sd->size.y = y + BASE_PADDING + sd->pad_left_top.h + (geom ? geom->y : 0);
+   sd->size.x = x + BASE_PADDING + (geom ? geom->x : 0);
+   sd->size.y = y + BASE_PADDING + (geom ? geom->y : 0);
evas_object_move(sd->container, sd->size.x, sd->size.y);
 
/* 4. move the handler */
@@ -578,37 +566,6 @@ container_lock_get(Evas_Object *obj)
 }
 
 Eina_Bool
-container_padding_size_set(Evas_Object *obj, int tl_w, int tl_h, int rb_w, int 
rb_h)
-{
-   CONTAINER_DATA_GET(obj, sd);
-
-   Evas_Coord x, y, w, h;
-   Evas_Coord tlw, tlh, rbw, rbh;
-   evas_object_geometry_get(obj, &x, &y, &w, &h);
-
-   tlw = sd->pad_left_top.w;
-   tlh = sd->pad_left_top.h;
-   rbw = sd->pad_right_bottom.w;
-   rbh = sd->pad_right_bottom.h;
-
-   if (tl_w < 0) sd->pad_left_top.w = 0;
-   else sd->pad_left_top.w = tl_w;
-   if (tl_h < 0) sd->pad_left_top.h = 0;
-   else sd->pad_left_top.h = tl_h;
-   if (rb_w < 0) sd->pad_right_bottom.w = 0;
-   else sd->pad_right_bottom.w = rb_w;
-   if (rb_h < 0) sd->pad_right_bottom.h = 0;
-   else sd->pad_right_bottom.h = rb_h;
-
-   evas_object_resize(obj, w + (rb_w - rbw) + (tl_w - tlw),
-   h + (rb_h - rbh) + (tl_h - tlh));
-
-   evas_object_smart_changed(obj);
-
-   return true;
-}
-
-Eina_Bool
 container_padding_size_get(Evas_Object *obj, int *tl_w, int *tl_h, int *br_w, 
int *br_h)
 {
CONTAINER_DATA_GET(obj, sd);
diff --git a/src/bin/ui/workspace/container.h b/src/bin/ui/workspace/container.h
index d7be77e..22349d6 100644
--- a/src/bin/ui/workspace/container.h
+++ b/src/bin/ui/workspace/container.h
@@ -232,32 +232,6 @@ Eina_Bool
 container_lock_get(Evas_Object *obj);
 
 /**
- * Set the size of paddings before top left handler and after bottom right
- * handler.
- *
- * @param obj The Container object,
- * @param htl_w wigth of top-left padding,
- * @param htl_h height of top-left padding,
- * @param hbr_w wigth of bottom-right padding,
- * @param hbr_h height of bottom-tight padding.
- *
- * @warning Container will be having unexpected behaviour when paddings are way
- *  bigger than the size of Container.
- *  For example, it might happen when:
- *  (left top padding + right bottom padding) > (size of object).
- *  In previous case that is (15 + 15 > 20).
- *
- * @note if trying to set the htl_w, htl_h, hbr_w, hbr_h < 0, will be set 0.
- *
- * @return EINA_TRUE on success or EINA_FALSE, on errors and if paddings are
- * bigger than container object.
- *
- * @ingroup Container
- */
-Eina_Bool
-container_padding_size_set(Evas_Object *obj, int tl_w, int tl_h, int rb_w, int 
rb_h);
-
-/**
  * Get the size of paddings before top le

[EGIT] [tools/eflete] master 05/16: image.edc: add 'fit' image

2016-04-01 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=62ed32cec4e7dd3419f71f8e4057283ce53ef38c

commit 62ed32cec4e7dd3419f71f8e4057283ce53ef38c
Author: Vyacheslav Reutskiy 
Date:   Thu Mar 31 16:20:00 2016 +0300

image.edc: add 'fit' image

Change-Id: I47fc1c61343c57d50c94368d76837b966211d1ea
---
 data/themes/default/images/fit.png| Bin 0 -> 299 bytes
 data/themes/default/widgets/image.edc |   1 +
 2 files changed, 1 insertion(+)

diff --git a/data/themes/default/images/fit.png 
b/data/themes/default/images/fit.png
new file mode 100644
index 000..3b123c9
Binary files /dev/null and b/data/themes/default/images/fit.png differ
diff --git a/data/themes/default/widgets/image.edc 
b/data/themes/default/widgets/image.edc
index 838ce2c..e7a3534 100644
--- a/data/themes/default/widgets/image.edc
+++ b/data/themes/default/widgets/image.edc
@@ -41,6 +41,7 @@ IM("icon", "offset", "icon_offset.png", 
15 15,   0 0 0 0,
 
 IM("icon", "scale_smaller",  "scale_smaller.png",   15 12,   0 0 0 0,  
  SCALE,   SOLID)
 IM("icon", "scale_larger",   "scale_larger.png",26 12,   0 0 0 0,  
  SCALE,   SOLID)
+IM("icon", "fit","fit.png", 10 11,   0 0 0 0,  
  SCALE,   SOLID)
 
 IM("bg",   "tile",   "bg_demo.png", -1 -1,   0 0 0 0,  
  TILE,SOLID)
 IM("bg",   "box","bg_box.png",  -1 -1,   0 0 0 0,  
  TILE,SOLID)

-- 




[EGIT] [tools/eflete] master 10/16: demo_group: fix copy&paste mistake (Demo_Signal, but not Demo_Part)

2016-04-01 Thread Vitalii Vorobiov
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=1d486528ab2d7ff5b1b1757b75e8751a60dde739

commit 1d486528ab2d7ff5b1b1757b75e8751a60dde739
Author: Vitalii Vorobiov 
Date:   Thu Mar 31 13:08:40 2016 +0300

demo_group: fix copy&paste mistake (Demo_Signal, but not Demo_Part)
---
 src/bin/ui/workspace/demo_group.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/workspace/demo_group.c 
b/src/bin/ui/workspace/demo_group.c
index 2a855a6..a1f4bab 100644
--- a/src/bin/ui/workspace/demo_group.c
+++ b/src/bin/ui/workspace/demo_group.c
@@ -264,7 +264,7 @@ _program_add(void *data,
/* if program is not exist */
if ((!part_item) && (correct))
  {
-demo_sig = mem_calloc(1, sizeof(Demo_Part));
+demo_sig = mem_calloc(1, sizeof(Demo_Signal));
 demo_sig->prog_name = eina_stringshare_add(program_name);
 demo_sig->sig_name = eina_stringshare_add(sig_name);
 demo_sig->source_name = eina_stringshare_add(source_name);

-- 




[EGIT] [tools/eflete] master 02/16: container: return the BASE_PADDING

2016-04-01 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=402d4af416a6baf7399f292958709a6581fdf657

commit 402d4af416a6baf7399f292958709a6581fdf657
Author: Vyacheslav Reutskiy 
Date:   Thu Mar 31 11:53:24 2016 +0300

container: return the BASE_PADDING

Now we not use the container padding, as it planed. Container have the
base, fixed, padding, so this padding should return.

TODO: clean up the code from old, unused, padding members

Change-Id: I4dbfecea2ab5ecc115c1899934a29d5e3f0e556e
---
 src/bin/ui/workspace/container.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/ui/workspace/container.c b/src/bin/ui/workspace/container.c
index f444834..972dc21 100644
--- a/src/bin/ui/workspace/container.c
+++ b/src/bin/ui/workspace/container.c
@@ -613,10 +613,10 @@ container_padding_size_get(Evas_Object *obj, int *tl_w, 
int *tl_h, int *br_w, in
 {
CONTAINER_DATA_GET(obj, sd);
 
-   if (tl_w) *tl_w = sd->pad_left_top.w;
-   if (tl_h) *tl_h = sd->pad_left_top.h;
-   if (br_w) *br_w = sd->pad_right_bottom.w;
-   if (br_h) *br_h = sd->pad_right_bottom.h;
+   if (tl_w) *tl_w = BASE_PADDING;
+   if (tl_h) *tl_h = BASE_PADDING;
+   if (br_w) *br_w = BASE_PADDING;
+   if (br_h) *br_h = BASE_PADDING;
 
return true;
 }

-- 




[EGIT] [core/efl] master 03/05: ecore_evas wayland: store relevant www data in engine info

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 17bb2d60caa9680f6265163c67e4208f3826b18c
Author: Mike Blumenkrantz 
Date:   Thu Mar 24 12:46:42 2016 -0500

ecore_evas wayland: store relevant www data in engine info

this accumulates all data relevant to client-side www into
the Evas_Engine_Info_Wayland_Egl struct so the client can react to it.

Signed-off-by: Derek Foreman 
---
 .../engines/wayland/ecore_evas_wayland_egl.c   | 64 ++
 .../engines/wayland_egl/Evas_Engine_Wayland_Egl.h  | 13 +
 2 files changed, 77 insertions(+)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
index 46e9e03..47904d2 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
@@ -173,6 +173,8 @@ _ee_cb_sync_done(void *data, int type EINA_UNUSED, void 
*event EINA_UNUSED)
evas_engine_info_set(ee->evas, (Evas_Engine_Info 
*)einfo);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, 
ee->h + fh);
 }
+  einfo->www_avail = !!wdata->win->www_surface;
+  einfo->just_mapped = EINA_TRUE;
}
   }
 
@@ -197,6 +199,62 @@ _ee_cb_sync_done(void *data, int type EINA_UNUSED, void 
*event EINA_UNUSED)
return ECORE_CALLBACK_PASS_ON;
 }
 
+static void
+_ecore_evas_wl_egl_render_flush_pre(void *data, Evas *e, void *event_info 
EINA_UNUSED)
+{
+   Ecore_Evas *ee = data;
+   Evas_Engine_Info_Wayland_Egl *einfo;
+   Ecore_Evas_Engine_Wl_Data *wdata;
+   int fx, fy;
+
+   einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(e);
+   wdata = ee->engine.data;
+   einfo->window.x = wdata->win->geometry.x;
+   einfo->window.y = wdata->win->geometry.y;
+   einfo->window.w = wdata->win->geometry.w;
+   einfo->window.h = wdata->win->geometry.h;
+   if (einfo->resizing)
+ {
+einfo->x_rel = 0;
+einfo->y_rel = 0;
+ }
+   else
+ {
+einfo->x_rel = wdata->x_rel;
+einfo->y_rel = wdata->y_rel;
+ }
+   einfo->timestamp = wdata->timestamp;
+   evas_canvas_pointer_canvas_xy_get(e, &einfo->x_cursor, &einfo->y_cursor);
+   evas_output_framespace_get(e, &fx, &fy, NULL, NULL);
+   einfo->x_cursor -= fx;
+   einfo->y_cursor -= fy;
+   wdata->x_rel = wdata->y_rel = 0;
+   einfo->resizing = wdata->win->resizing;
+   einfo->dragging = wdata->dragging;
+   einfo->drag_start = EINA_FALSE;
+   einfo->drag_stop = EINA_FALSE;
+   if (einfo->drag_ack && !einfo->dragging) einfo->drag_stop = EINA_TRUE;
+   if (einfo->dragging && !einfo->drag_ack) einfo->drag_start = EINA_TRUE;
+   einfo->drag_ack = wdata->dragging;
+}
+
+static void
+_ecore_evas_wl_egl_render_post(void *data, Evas *e, void *event_info 
EINA_UNUSED)
+{
+   Ecore_Evas *ee = data;
+   Evas_Engine_Info_Wayland_Egl *einfo;
+   Ecore_Evas_Engine_Wl_Data *wdata;
+   int fw, fh;
+
+   einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(e);
+   wdata = ee->engine.data;
+   if (!einfo->wobbling) return;
+   evas_output_framespace_get(e, NULL, NULL, &fw, &fh);
+   evas_damage_rectangle_add(e, 0, 0, ee->w + fw, ee->h + fh);
+   ecore_wl2_window_opaque_region_set(wdata->win,
+ wdata->win->opaque.x, wdata->win->opaque.y, wdata->win->opaque.w, 
wdata->win->opaque.h);
+}
+
 /* external functions */
 EAPI Ecore_Evas *
 ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent,
@@ -319,6 +377,10 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name, 
unsigned int parent,
 
evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
_ecore_evas_wl_common_render_flush_pre, ee);
+   evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
+   _ecore_evas_wl_egl_render_flush_pre, ee);
+   evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST,
+   _ecore_evas_wl_egl_render_post, ee);
 
/* FIXME: This needs to be set based on theme & scale */
if (ee->prop.draw_frame)
@@ -452,6 +514,8 @@ _ecore_evas_wl_show(Ecore_Evas *ee)
   evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
   evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h 
+ fh);
}
+ einfo->www_avail = !!wdata->win->www_surface;
+ einfo->just_mapped = EINA_TRUE;
   }
  }
 
diff --git a/src/modules/evas/engines/wayland_egl/Evas_Engine_Wayland_Egl.h 
b/src/modules/evas/engines/wayland_egl/Evas_Engine_Wayland_Egl.h
index e06f82c..54dee26 100644
--- a/src/modules/evas/engines/wayland_egl/Evas_Engine_Wayland_Egl.h
+++ b/src/modules/evas/engines/wayland_egl/Evas_Engine_Wayland_Egl.h
@@ -44,6 +44,19 @@ struct _Evas_Engine_Info_Wayland_

[EGIT] [core/efl] master 01/05: ecore_wl2: implement www extension for client-side use

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit eb1a422d6312f0a2ab03a4e9710a84b9b669fd45
Author: Mike Blumenkrantz 
Date:   Thu Mar 24 12:19:42 2016 -0500

ecore_wl2: implement www extension for client-side use

handling for global binding and signal prop

Signed-off-by: Derek Foreman 
---
 src/Makefile_Ecore_Wl2.am |   2 +
 src/lib/ecore_wl2/ecore_wl2.c |   5 ++
 src/lib/ecore_wl2/ecore_wl2_display.c |   8 ++
 src/lib/ecore_wl2/ecore_wl2_private.h |  34 +
 src/lib/ecore_wl2/ecore_wl2_window.c  |  71 +-
 src/lib/ecore_wl2/www-protocol.c  |  41 +++
 src/lib/ecore_wl2/www-protocol.h  | 134 ++
 7 files changed, 294 insertions(+), 1 deletion(-)

diff --git a/src/Makefile_Ecore_Wl2.am b/src/Makefile_Ecore_Wl2.am
index d08414b..1263ea2 100644
--- a/src/Makefile_Ecore_Wl2.am
+++ b/src/Makefile_Ecore_Wl2.am
@@ -12,6 +12,8 @@ lib/ecore_wl2/subsurface-client-protocol.h \
 lib/ecore_wl2/subsurface-protocol.c \
 lib/ecore_wl2/xdg-shell-client-protocol.h \
 lib/ecore_wl2/xdg-shell-protocol.c \
+lib/ecore_wl2/www-protocol.h \
+lib/ecore_wl2/www-protocol.c \
 lib/ecore_wl2/ecore_wl2_seat.c \
 lib/ecore_wl2/ecore_wl2_subsurf.c \
 lib/ecore_wl2/ecore_wl2_dnd.c \
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c
index a8d328b..b31b2de 100644
--- a/src/lib/ecore_wl2/ecore_wl2.c
+++ b/src/lib/ecore_wl2/ecore_wl2.c
@@ -27,6 +27,9 @@ EAPI int ECORE_WL2_EVENT_SELECTION_DATA_READY = 0;
 EAPI int ECORE_WL2_EVENT_WINDOW_CONFIGURE = 0;
 EAPI int ECORE_WL2_EVENT_SYNC_DONE = 0;
 
+EAPI int _ecore_wl2_event_window_www = -1;
+EAPI int _ecore_wl2_event_window_www_drag = -1;
+
 /* public API functions */
 EAPI int
 ecore_wl2_init(void)
@@ -77,6 +80,8 @@ ecore_wl2_init(void)
 ECORE_WL2_EVENT_SELECTION_DATA_READY = ecore_event_type_new();
 ECORE_WL2_EVENT_WINDOW_CONFIGURE = ecore_event_type_new();
 ECORE_WL2_EVENT_SYNC_DONE = ecore_event_type_new();
+_ecore_wl2_event_window_www = ecore_event_type_new();
+_ecore_wl2_event_window_www_drag = ecore_event_type_new();
  }
 
return _ecore_wl2_init_count;
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c 
b/src/lib/ecore_wl2/ecore_wl2_display.c
index 6569a43..d141250 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -119,6 +119,13 @@ _cb_global_add(void *data, struct wl_registry *registry, 
unsigned int id, const
 EINA_INLIST_FOREACH(ewd->windows, window)
   _ecore_wl2_window_shell_surface_init(window);
  }
+   else if (eina_streq(interface, "www"))
+ {
+Ecore_Wl2_Window *window;
+ewd->wl.www = wl_registry_bind(registry, id, &www_interface, 1);
+EINA_INLIST_FOREACH(ewd->windows, window)
+  _ecore_wl2_window_www_surface_init(window);
+ }
else if (!strcmp(interface, "wl_output"))
  _ecore_wl2_output_add(ewd, id);
else if (!strcmp(interface, "wl_seat"))
@@ -364,6 +371,7 @@ _ecore_wl2_display_cleanup(Ecore_Wl2_Display *ewd)
 
eina_hash_free(ewd->globals);
 
+   if (ewd->wl.www) www_destroy(ewd->wl.www);
if (ewd->wl.xdg_shell) xdg_shell_destroy(ewd->wl.xdg_shell);
if (ewd->wl.wl_shell) wl_shell_destroy(ewd->wl.wl_shell);
if (ewd->wl.shm) wl_shm_destroy(ewd->wl.shm);
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index a31e650..58e8744 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -4,6 +4,7 @@
 # include 
 # include "Ecore_Wl2.h"
 # include "Ecore_Input.h"
+# include "www-protocol.h"
 
 /* NB: Test if subsurface protocol is part of wayland code, if not then
  * include our own copy */
@@ -16,6 +17,20 @@
 
 extern int _ecore_wl2_log_dom;
 
+# ifdef EAPI
+#  undef EAPI
+# endif
+
+# ifdef __GNUC__
+#  if __GNUC__ >= 4
+#   define EAPI __attribute__ ((visibility("default")))
+#  else
+#   define EAPI
+#  endif
+# else
+#  define EAPI
+# endif
+
 # ifdef ECORE_WL2_DEFAULT_LOG_COLOR
 #  undef ECORE_WL2_DEFAULT_LOG_COLOR
 # endif
@@ -62,6 +77,7 @@ struct _Ecore_Wl2_Display
 struct wl_shm *shm;
 struct wl_shell *wl_shell;
 struct xdg_shell *xdg_shell;
+struct www *www;
 int compositor_version;
  } wl;
 
@@ -117,6 +133,7 @@ struct _Ecore_Wl2_Window
struct wl_shell_surface *wl_shell_surface;
struct xdg_surface *xdg_surface;
struct xdg_popup *xdg_popup;
+   struct www_surface *www_surface;
 
uint32_t configure_serial;
void (*configure_ack)(struct xdg_surface *surface, uint32_t serial);
@@ -405,4 +422,21 @@ void _ecore_wl2_dnd_del(Ecore_Wl2_Dnd_Source *source);
 void _ecore_wl2_subsurf_free(Ecore_Wl2_Subsurface *subsurf);
 
 void _ecore_wl2_window_shell_surface_init(Ecore_Wl2_Window *window);
+void _ecore_wl2_window_www_surface_init(Ecore_Wl2

[EGIT] [core/efl] master 05/05: evas-wayland-egl: Add www protocol handling to wayland-egl engine

2016-04-01 Thread Derek Foreman
discomfitor pushed a commit to branch master.

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

commit c67f50b40aaf2595e21373bf89b53bc1edec44a4
Author: Derek Foreman 
Date:   Mon Mar 28 12:56:23 2016 -0500

evas-wayland-egl: Add www protocol handling to wayland-egl engine

Use the new post-processing API and www extension to implement
CSS effects for wayland-egl applications.

Signed-off-by: Derek Foreman 
Signed-off-by: Mike Blumenkrantz 
---
 src/Makefile_Evas.am   |   4 +-
 src/modules/evas/engines/wayland_egl/evas_engine.c |  43 +
 src/modules/evas/engines/wayland_egl/evas_engine.h |  25 +
 .../evas/engines/wayland_egl/evas_wl_main.c|  58 +-
 src/modules/evas/engines/wayland_egl/www.c | 885 +
 src/modules/evas/engines/wayland_egl/www.h |  52 ++
 6 files changed, 1064 insertions(+), 3 deletions(-)

diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 0769220..d2e15de 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -1193,7 +1193,9 @@ dist_installed_evasmainheaders_DATA += 
modules/evas/engines/wayland_egl/Evas_Eng
 WAYLAND_EGL_SOURCES = \
 modules/evas/engines/wayland_egl/evas_engine.c \
 modules/evas/engines/wayland_egl/evas_wl_main.c \
-modules/evas/engines/wayland_egl/evas_engine.h
+modules/evas/engines/wayland_egl/evas_engine.h \
+modules/evas/engines/wayland_egl/www.c \
+modules/evas/engines/wayland_egl/www.h
 if EVAS_STATIC_BUILD_WAYLAND_EGL
 lib_evas_libevas_la_SOURCES += $(WAYLAND_EGL_SOURCES)
 lib_evas_libevas_la_CPPFLAGS += @evas_engine_wayland_egl_cflags@
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c 
b/src/modules/evas/engines/wayland_egl/evas_engine.c
index 0e27ade..aef2120 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -62,6 +62,11 @@ Evas_GL_Common_Context_Call 
glsym_evas_gl_common_context_newframe = NULL;
 Evas_GL_Common_Context_Call glsym_evas_gl_common_context_done = NULL;
 Evas_GL_Common_Context_Resize_Call glsym_evas_gl_common_context_resize = NULL;
 Evas_GL_Common_Buffer_Dump_Call glsym_evas_gl_common_buffer_dump = NULL;
+Evas_GL_Common_Context_Call glsym_evas_gl_common_context_unredirect = NULL;
+Evas_GL_Common_Context_Call glsym_evas_gl_common_context_redirect = NULL;
+Evas_GL_Common_Context_Call glsym_evas_gl_common_context_redirect_bind = NULL;
+Evas_GL_Common_Context_Call glsym_evas_gl_common_context_redirect_unbind = 
NULL;
+Evas_GL_Common_Context_Call_GLuint_Return 
glsym_evas_gl_common_context_redirect_texture_get = NULL;
 Evas_GL_Preload_Render_Call glsym_evas_gl_preload_render_lock = NULL;
 Evas_GL_Preload_Render_Call glsym_evas_gl_preload_render_unlock = NULL;
 Evas_GL_Preload_Render_Call glsym_evas_gl_preload_render_relax = NULL;
@@ -73,6 +78,17 @@ void (*glsym_glEGLImageTargetTexture2DOES) (int a, void *b)  
= NULL;
 unsigned int (*glsym_eglSwapBuffersWithDamage) (EGLDisplay a, void *b, const 
EGLint *d, EGLint c) = NULL;
 unsigned int (*glsym_eglSetDamageRegionKHR) (EGLDisplay a, EGLSurface b, 
EGLint *c, EGLint d) = NULL;
 unsigned int (*glsym_eglQueryWaylandBufferWL)(EGLDisplay a, struct wl_resource 
*b, EGLint c, EGLint *d) = NULL;
+GLuint   (*glsym_glCreateShader) (GLenum a) = NULL;
+void (*glsym_glShaderSource) (GLuint a, GLsizei b, const GLchar **c, 
const GLint *d) = NULL;
+void (*glsym_glCompileShader) (GLuint a) = NULL;
+void (*glsym_glGetShaderiv) (GLuint a, GLenum b, GLint *c) = NULL;
+void (*glsym_glGetShaderInfoLog) (GLuint a, GLsizei b, GLsizei *c, 
GLchar *d) = NULL;
+GLuint   (*glsym_glCreateProgram) (void) = NULL;
+void (*glsym_glAttachShader) (GLuint a, GLuint b) = NULL;
+void (*glsym_glBindAttribLocation) (GLuint a, GLuint b, const GLchar 
*c) = NULL;
+void (*glsym_glLinkProgram) (GLuint a) = NULL;
+void (*glsym_glGetProgramiv) (GLuint a, GLenum b, GLint *c) = NULL;
+void (*glsym_glGetProgramInfoLog) (GLuint a, GLsizei b, GLsizei *c, 
GLchar *d) = NULL;
 
 /* local variables */
 static Eina_Bool initted = EINA_FALSE;
@@ -124,6 +140,11 @@ gl_symbols(void)
LINK2GENERIC(evas_gl_common_context_newframe);
LINK2GENERIC(evas_gl_common_context_done);
LINK2GENERIC(evas_gl_common_context_resize);
+   LINK2GENERIC(evas_gl_common_context_unredirect);
+   LINK2GENERIC(evas_gl_common_context_redirect);
+   LINK2GENERIC(evas_gl_common_context_redirect_bind);
+   LINK2GENERIC(evas_gl_common_context_redirect_unbind);
+   LINK2GENERIC(evas_gl_common_context_redirect_texture_get);
LINK2GENERIC(evas_gl_common_buffer_dump);
LINK2GENERIC(evas_gl_preload_render_lock);
LINK2GENERIC(evas_gl_preload_render_unlock);
@@ -174,6 +195,28 @@ gl_symbols(void)
FINDSYM(glsym_eglQueryWaylandBufferWL, "eglQueryWaylandBufferWL",
glsym_func_uint);
 
+   FINDSYM(glsym_glCreateShader, "glCreateShader", glsym_fu

[EGIT] [core/efl] master 02/05: ecore-evas wayland: use www protocol when available

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit afd083788b40e465955176be7c2e4458f2a9ec6a
Author: Mike Blumenkrantz 
Date:   Thu Mar 24 12:44:21 2016 -0500

ecore-evas wayland: use www protocol when available

handle www protocol events and store the provided data into engine data

Signed-off-by: Derek Foreman 
---
 .../engines/wayland/ecore_evas_wayland_common.c| 48 --
 .../engines/wayland/ecore_evas_wayland_private.h   |  4 ++
 2 files changed, 49 insertions(+), 3 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index a43209d..5d17831 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -34,7 +34,7 @@ EVAS_SMART_SUBCLASS_NEW(_smart_frame_type, 
_ecore_evas_wl_frame,
 
 /* local variables */
 static int _ecore_evas_wl_init_count = 0;
-static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[5];
+static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[7];
 
 static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
 
@@ -382,6 +382,43 @@ _ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int 
rotation, int resize)
_rotation_do(ee, rotation, resize);
 }
 
+static Eina_Bool
+_ecore_evas_wl_common_cb_www_drag(void *d EINA_UNUSED, int t EINA_UNUSED, void 
*event)
+{
+   Ecore_Wl2_Event_Window_WWW_Drag *ev = event;
+   Ecore_Evas_Engine_Wl_Data *wdata;
+   Ecore_Evas *ee;
+
+   ee = ecore_event_window_match(ev->window);
+   if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
+   if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+
+   wdata = ee->engine.data;
+   wdata->dragging = !!ev->dragging;
+   if (!ev->dragging)
+ evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
+   return ECORE_CALLBACK_RENEW;
+}
+
+static Eina_Bool
+_ecore_evas_wl_common_cb_www(void *d EINA_UNUSED, int t EINA_UNUSED, void 
*event)
+{
+   Ecore_Wl2_Event_Window_WWW *ev = event;
+   Ecore_Evas_Engine_Wl_Data *wdata;
+   Ecore_Evas *ee;
+
+   ee = ecore_event_window_match(ev->window);
+   if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
+   if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+
+   wdata = ee->engine.data;
+   wdata->x_rel += ev->x_rel;
+   wdata->y_rel += ev->y_rel;
+   wdata->timestamp = ev->timestamp;
+   evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
+   return ECORE_CALLBACK_RENEW;
+}
+
 int
 _ecore_evas_wl_common_init(void)
 {
@@ -405,7 +442,12 @@ _ecore_evas_wl_common_init(void)
_ecore_evas_wl_event_hdls[4] =
  ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE,
  _ecore_evas_wl_common_cb_window_configure, NULL);
-
+   _ecore_evas_wl_event_hdls[5] =
+ ecore_event_handler_add(_ecore_wl2_event_window_www,
+ _ecore_evas_wl_common_cb_www, NULL);
+   _ecore_evas_wl_event_hdls[6] =
+ ecore_event_handler_add(_ecore_wl2_event_window_www_drag,
+ _ecore_evas_wl_common_cb_www_drag, NULL);
ecore_event_evas_init();
 
return _ecore_evas_wl_init_count;
@@ -421,7 +463,7 @@ _ecore_evas_wl_common_shutdown(void)
if (--_ecore_evas_wl_init_count != 0)
  return _ecore_evas_wl_init_count;
 
-   for (i = 0; i < sizeof(_ecore_evas_wl_event_hdls) / 
sizeof(Ecore_Event_Handler *); i++)
+   for (i = 0; i < EINA_C_ARRAY_LENGTH(_ecore_evas_wl_event_hdls); i++)
  {
 if (_ecore_evas_wl_event_hdls[i])
   ecore_event_handler_del(_ecore_evas_wl_event_hdls[i]);
diff --git 
a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
index ecbaede..6aafa84 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
@@ -39,6 +39,10 @@ struct _Ecore_Evas_Engine_Wl_Data
struct wl_egl_window *egl_win;
 #endif
struct wl_callback *anim_callback;
+   int x_rel;
+   int y_rel;
+   uint32_t timestamp;
+   Eina_Bool dragging : 1;
 
Eina_Bool sync_done : 1;
Eina_Bool defer_show : 1;

-- 




[EGIT] [core/enlightenment] master 01/01: implement www wayland extension handling for clients

2016-04-01 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit c70054174ed9814a9e6ffc83d64df952112958c7
Author: Mike Blumenkrantz 
Date:   Mon Mar 28 13:16:04 2016 -0500

implement www wayland extension handling for clients

Signed-off-by: Derek Foreman 
---
 src/bin/Makefile.mk  |  2 +
 src/bin/e_comp_wl.c  | 11 ++
 src/bin/e_comp_wl.h  | 10 +
 src/bin/e_comp_wl_extensions.c   | 81 
 src/bin/generated/www-protocol.c | 41 
 src/bin/generated/www-protocol.h | 77 ++
 6 files changed, 222 insertions(+)

diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk
index 9c6ea40..c7d04fc 100644
--- a/src/bin/Makefile.mk
+++ b/src/bin/Makefile.mk
@@ -395,6 +395,8 @@ endif
 if HAVE_WAYLAND
 enlightenment_src += \
 src/bin/e_uuid_store.c \
+src/bin/generated/www-protocol.c \
+src/bin/generated/www-protocol.h \
 src/bin/generated/session-recovery-protocol.c \
 src/bin/generated/session-recovery-server-protocol.h \
 src/bin/generated/e_comp_wl_screenshooter_server.c \
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index af84ef4..84f1066 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -5,6 +5,8 @@
 #define __STDC_FORMAT_MACROS
 #include 
 
+#include "www-protocol.h"
+
 /* When a wayland is released with this macro we can remove the ifdefs */
 #ifdef WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION
 # define COMPOSITOR_VERSION 4
@@ -581,6 +583,15 @@ _e_comp_wl_evas_cb_move(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_U
Eina_List *l;
 
if (e_object_is_del(E_OBJECT(ec))) return;
+   if (ec->comp_data->www.surface)
+ {
+if (ec->comp_data->moved && (!ec->maximized) && (!ec->fullscreen))
+  www_surface_send_status(ec->comp_data->www.surface,
+ec->x - ec->comp_data->www.x, ec->y - ec->comp_data->www.y, 
lround(ecore_loop_time_get()));
+ec->comp_data->www.x = ec->x;
+ec->comp_data->www.y = ec->y;
+ }
+   ec->comp_data->moved = 1;
EINA_LIST_FOREACH(ec->comp_data->sub.list, l, sec)
  {
 if (!sec->comp_data->sub.data->position.set)
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index ac63aa0..d6a52d3 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -104,6 +104,10 @@ typedef struct E_Comp_Wl_Extension_Data
 {
struct wl_resource *global;
 } session_recovery;
+   struct
+   {
+   struct wl_resource *global;
+   } www;
 } E_Comp_Wl_Extension_Data;
 
 struct _E_Comp_Wl_Data
@@ -283,6 +287,11 @@ struct _E_Comp_Wl_Client_Data
 Eina_Rectangle window;
 E_Shell_Data *data;
  } shell;
+   struct
+   {
+  struct wl_resource *surface;
+  int x, y;
+   } www;
 
E_Comp_Wl_Surface_State pending;
 
@@ -304,6 +313,7 @@ struct _E_Comp_Wl_Client_Data
Eina_Bool set_win_type : 1;
Eina_Bool frame_update : 1;
Eina_Bool cursor : 1;
+   Eina_Bool moved : 1;
 };
 
 struct _E_Comp_Wl_Output
diff --git a/src/bin/e_comp_wl_extensions.c b/src/bin/e_comp_wl_extensions.c
index 57644ac..b09348e 100644
--- a/src/bin/e_comp_wl_extensions.c
+++ b/src/bin/e_comp_wl_extensions.c
@@ -3,6 +3,25 @@
 
 #include "e_comp_wl_screenshooter_server.h"
 #include "session-recovery-server-protocol.h"
+#include "www-protocol.h"
+
+static void
+_e_comp_wl_extensions_client_move_begin(void *d EINA_UNUSED, E_Client *ec)
+{
+   if (e_client_has_xwindow(ec) || e_object_is_del(E_OBJECT(ec))) return;
+
+   if (ec->comp_data->www.surface)
+ www_surface_send_start_drag(ec->comp_data->www.surface);
+}
+
+static void
+_e_comp_wl_extensions_client_move_end(void *d EINA_UNUSED, E_Client *ec)
+{
+   if (e_client_has_xwindow(ec) || e_object_is_del(E_OBJECT(ec))) return;
+
+   if (ec->comp_data->www.surface)
+ www_surface_send_end_drag(ec->comp_data->www.surface);
+}
 
 static void
 _e_comp_wl_sr_cb_provide_uuid(struct wl_client *client EINA_UNUSED, struct 
wl_resource *resource EINA_UNUSED, const char *uuid)
@@ -71,6 +90,57 @@ _e_comp_wl_screenshooter_cb_shoot(struct wl_client *client 
EINA_UNUSED, struct w
screenshooter_send_done(resource);
 }
 
+static void
+_e_comp_wl_www_surface_del(struct wl_resource *res)
+{
+   E_Client *ec;
+
+   ec = wl_resource_get_user_data(res);
+   if (!e_object_is_del(E_OBJECT(ec)))
+ ec->comp_data->www.surface = NULL;
+   e_object_unref(E_OBJECT(ec));
+}
+
+static void
+_e_comp_wl_www_surface_destroy(struct wl_client *client EINA_UNUSED, struct 
wl_resource *resource)
+{
+   wl_resource_destroy(resource);
+}
+
+static const struct www_surface_interface _e_www_surface_interface =
+{
+   _e_comp_wl_www_surface_destroy,
+};
+
+static void
+_e_comp_wl_www_cb_create(struct wl_client *client, struct wl_resource 
*resource, uint32_t id, struct wl_resource *surface)
+{
+struct wl_resource *ww;
+E_Client *ec;
+
+ec = wl_resour

[EGIT] [core/efl] master 04/05: gl_common: Add API for redirecting render to texture

2016-04-01 Thread Derek Foreman
discomfitor pushed a commit to branch master.

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

commit 0f7f4b6de07707031482f6e3e7f7c69f7fb7e855
Author: Derek Foreman 
Date:   Mon Mar 28 12:06:46 2016 -0500

gl_common: Add API for redirecting render to texture

New API allows a context to be redirected to texture.  When rendering is
complete the texture can be unbound from the frame buffer and used for
post-processing effects.

Signed-off-by: Derek Foreman 
Signed-off-by: Mike Blumenkrantz 
---
 .../evas/engines/gl_common/evas_gl_common.h| 15 +
 .../evas/engines/gl_common/evas_gl_context.c   | 68 +-
 2 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h 
b/src/modules/evas/engines/gl_common/evas_gl_common.h
index 4acb119..e16076d 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -348,6 +348,13 @@ struct _Evas_Engine_GL_Context
int gles_version;
 
RGBA_Image *font_surface;
+
+   struct {
+  GLuint fb;
+  GLuint texture;
+  GLuint depth_buffer;
+  Eina_Bool active : 1;
+   } redirect;
 };
 
 struct _Evas_GL_Texture_Pool
@@ -525,6 +532,7 @@ EAPI void*evas_gl_common_current_context_get(void);
 typedef int (*Evas_GL_Preload)(void);
 typedef void (*Evas_GL_Common_Image_Call)(Evas_GL_Image *im);
 typedef void (*Evas_GL_Common_Context_Call)(Evas_Engine_GL_Context *gc);
+typedef GLuint 
(*Evas_GL_Common_Context_Call_GLuint_Return)(Evas_Engine_GL_Context *gc);
 typedef Evas_GL_Image 
*(*Evas_GL_Common_Image_New_From_Data)(Evas_Engine_GL_Context *gc, unsigned int 
w, unsigned int h, DATA32 *data, int alpha, Evas_Colorspace cspace);
 typedef void (*Evas_GL_Preload_Render_Call)(evas_gl_make_current_cb 
make_current, void *engine_data);
 typedef Evas_Engine_GL_Context *(*Evas_GL_Common_Context_New)(void);
@@ -534,6 +542,13 @@ typedef void (*Evas_Gl_Symbols)(void 
*(*GetProcAddress)(const char *sym));
 
 EAPI void __evas_gl_err(int err, const char *file, const char *func, int line, 
const char *op);
 
+EAPI void evas_gl_common_context_unredirect(Evas_Engine_GL_Context 
*gc);
+EAPI void evas_gl_common_context_redirect(Evas_Engine_GL_Context *gc);
+EAPI GLuint   
evas_gl_common_context_redirect_texture_get(Evas_Engine_GL_Context *gc);
+EAPI void evas_gl_common_context_redirect_bind(Evas_Engine_GL_Context 
*gc);
+EAPI void 
evas_gl_common_context_redirect_unbind(Evas_Engine_GL_Context *gc);
+
+
 void  evas_gl_common_tiling_start(Evas_Engine_GL_Context *gc,
   int rot, int gw, int gh,
   int cx, int cy, int cw, int ch,
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c 
b/src/modules/evas/engines/gl_common/evas_gl_context.c
index 9d5ffb0..53810b7 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -1164,6 +1164,7 @@ EAPI void
 evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int 
rot)
 {
if ((gc->w == w) && (gc->h == h) && (gc->rot == rot)) return;
+   if (gc->redirect.active) evas_gl_common_context_redirect(gc);
evas_gl_common_context_flush(gc);
gc->change.size = 1;
gc->rot = rot;
@@ -1172,6 +1173,68 @@ evas_gl_common_context_resize(Evas_Engine_GL_Context 
*gc, int w, int h, int rot)
if (_evas_gl_common_context == gc) _evas_gl_common_viewport_set(gc);
 }
 
+EAPI void
+evas_gl_common_context_unredirect(Evas_Engine_GL_Context *gc)
+{
+   glBindFramebuffer(GL_FRAMEBUFFER, 0);
+   glDeleteTextures(1, &gc->redirect.texture);
+   glDeleteRenderbuffers(1, &gc->redirect.depth_buffer);
+   glDeleteFramebuffers(1, &gc->redirect.fb);
+   gc->redirect.active = EINA_FALSE;
+}
+
+EAPI void
+evas_gl_common_context_redirect(Evas_Engine_GL_Context *gc)
+{
+   if (gc->redirect.active) evas_gl_common_context_unredirect(gc);
+
+   /* Create a framebuffer object for RTT */
+   glGenTextures(1, &gc->redirect.texture);
+   glBindTexture(GL_TEXTURE_2D, gc->redirect.texture);
+   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+
+   glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, gc->w, gc->h,
+0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+
+   glGenFramebuffers(1, &gc->redirect.fb);
+   glBindFramebuffer(GL_FRAMEBUFFER, gc->redirect.fb);
+
+   glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+  GL_TEXTURE_2D, gc->redirect.texture, 0);
+
+   glGenRenderbuffers(1, &gc->redirect.depth_buffer);
+   glBindRenderbuffer(GL_RENDERBUFFER, gc->redirect.depth_buffer

[EGIT] [core/efl] master 01/01: evas - fix leak because cutouts_fre .. doesnt free - it just resets to 0

2016-04-01 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit b132ce65ec755e282291f4fa8da46eafcc2af942
Author: Carsten Haitzler (Rasterman) 
Date:   Fri Apr 1 17:37:37 2016 +0900

evas - fix leak because cutouts_fre .. doesnt free - it just resets to 0

this works with 7166e6b85994b19a29f05c9e2b6d75a314a3cb91 and fixes a
leak added because ... free does not free!
evas_common_draw_context_cutouts_real_free(0 now actually frees the
rects, but evas_common_draw_context_cutouts_free() before did not.

@fix (follow on from 7166e6b85994b19a29f05c9e2b6d75a314a3cb91)
---
 src/lib/evas/common/evas_draw.h   |  1 +
 src/lib/evas/common/evas_draw_main.c  |  8 
 src/lib/evas/common/evas_font_draw.c  |  5 +++--
 src/lib/evas/common/evas_map_image.c  | 10 ++
 src/lib/evas/common/evas_rectangle_main.c |  5 +++--
 src/lib/evas/common/evas_scale_main.c |  5 +++--
 6 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/src/lib/evas/common/evas_draw.h b/src/lib/evas/common/evas_draw.h
index 0beb84c..0623ea4 100644
--- a/src/lib/evas/common/evas_draw.h
+++ b/src/lib/evas/common/evas_draw.h
@@ -23,6 +23,7 @@ EAPI void   
evas_common_draw_context_set_multiplier  (RGBA_D
 EAPI void   evas_common_draw_context_unset_multiplier
(RGBA_Draw_Context *dc);
 EAPI Cutout_Rects  *evas_common_draw_context_cutouts_new 
(void);
 EAPI void   evas_common_draw_context_cutouts_free
(Cutout_Rects* rects);
+EAPI void   evas_common_draw_context_cutouts_real_free   
(Cutout_Rects* rects);
 EAPI void   evas_common_draw_context_cutouts_del 
(Cutout_Rects* rects, int idx);
 EAPI void   evas_common_draw_context_add_cutout  
(RGBA_Draw_Context *dc, int x, int y, int w, int h);
 EAPI void   evas_common_draw_context_clear_cutouts   
(RGBA_Draw_Context *dc);
diff --git a/src/lib/evas/common/evas_draw_main.c 
b/src/lib/evas/common/evas_draw_main.c
index 460a296..289d6df 100644
--- a/src/lib/evas/common/evas_draw_main.c
+++ b/src/lib/evas/common/evas_draw_main.c
@@ -36,6 +36,14 @@ evas_common_draw_context_cutouts_free(Cutout_Rects* rects)
 }
 
 EAPI void
+evas_common_draw_context_cutouts_real_free(Cutout_Rects* rects)
+{
+   if (!rects) return;
+   free(rects->rects);
+   free(rects);
+}
+
+EAPI void
 evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx)
 {
if ((idx >= 0) && (idx < rects->active))
diff --git a/src/lib/evas/common/evas_font_draw.c 
b/src/lib/evas/common/evas_font_draw.c
index c61e921..79c8900 100644
--- a/src/lib/evas/common/evas_font_draw.c
+++ b/src/lib/evas/common/evas_font_draw.c
@@ -421,11 +421,12 @@ evas_common_font_draw_cb(RGBA_Image *dst, 
RGBA_Draw_Context *dc, int x, int y, E
  rects_used++;
  if (rects_used >= 4096)
{
-  evas_common_draw_context_cutouts_free(rects);
+  evas_common_draw_context_cutouts_real_free(rects);
   rects = NULL;
+  rects_used = 0;
}
 #else
- evas_common_draw_context_cutouts_free(rects);
+ evas_common_draw_context_cutouts_real_free(rects);
 #endif
   }
 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; 
dc->clip.h = ch;
diff --git a/src/lib/evas/common/evas_map_image.c 
b/src/lib/evas/common/evas_map_image.c
index f5b1a32..252bd3b 100644
--- a/src/lib/evas/common/evas_map_image.c
+++ b/src/lib/evas/common/evas_map_image.c
@@ -793,11 +793,12 @@ evas_common_map_rgba_cb(RGBA_Image *src, RGBA_Image *dst,
rects_used++;
if (rects_used >= 4096)
  {
-evas_common_draw_context_cutouts_free(rects);
+evas_common_draw_context_cutouts_real_free(rects);
 rects = NULL;
+rects_used = 0;
  }
 #else
-   evas_common_draw_context_cutouts_free(rects);
+   evas_common_draw_context_cutouts_real_free(rects);
 #endif
/* restore clip info */
dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; 
dc->clip.h = ch;
@@ -857,11 +858,12 @@ evas_common_map_thread_rgba_cb(RGBA_Image *src, 
RGBA_Image *dst, RGBA_Draw_Conte
rects_used++;
if (rects_used >= 4096)
  {
-evas_common_draw_context_cutouts_free(rects);
+evas_common_draw_context_cutouts_real_free(rects);
 rects = NULL;
+rects_used = 0;
  }
 #else
-   evas_common_draw_context_cutouts_free(rects);
+   evas_common_draw_context_cutouts_real_free(rects);
 #endif
/* restore clip info */
dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; 
dc->clip.h = ch;
diff --git a/src/lib/evas/common/evas_rectangle_main.c 
b/src/lib/evas/common/evas_rectangle_main.c
index 388fba6..ed78cca 100644
--- a/src/lib/evas/common/evas_rectangle_main.c
+++ b/src/l

[EGIT] [core/efl] master 01/01: Elm_image: remove object_get from eo and object_size_get to view.size.get

2016-04-01 Thread Ji-Youn Park
jypark pushed a commit to branch master.

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

commit e438bd09b2642308112b31b8349235f0b850cb9c
Author: Ji-Youn Park 
Date:   Fri Apr 1 17:19:14 2016 +0830

Elm_image: remove object_get from eo and object_size_get to 
view.size.get

remove elm_image_object_get frome eo.
change elm_image_object_size_get to efl_gfx_view_size_get
---
 src/lib/elementary/elm_image.c| 32 +++-
 src/lib/elementary/elm_image.eo   | 32 
 src/lib/elementary/elm_image_legacy.h | 27 +++
 3 files changed, 50 insertions(+), 41 deletions(-)

diff --git a/src/lib/elementary/elm_image.c b/src/lib/elementary/elm_image.c
index 35dbea9..af3e906 100644
--- a/src/lib/elementary/elm_image.c
+++ b/src/lib/elementary/elm_image.c
@@ -822,7 +822,7 @@ _elm_image_sizing_eval(Eo *obj, Elm_Image_Data *sd)
 
ts = sd->scale;
sd->scale = 1.0;
-   elm_obj_image_object_size_get(obj, &w, &h);
+   efl_gfx_view_size_get(obj, &w, &h);
 
sd->scale = ts;
evas_object_size_hint_min_get(obj, &minw, &minh);
@@ -887,7 +887,7 @@ _elm_image_file_set_do(Evas_Object *obj)
  evas_object_image_load_size_set(sd->img, sd->load_size, sd->load_size);
else
  {
-elm_obj_image_object_size_get((Eo *) obj, &w, &h);
+efl_gfx_view_size_get((Eo *) obj, &w, &h);
 evas_object_image_load_size_set(sd->img, w, h);
  }
 }
@@ -1170,13 +1170,13 @@ _elm_image_efl_file_async_set(Eo *obj, Elm_Image_Data 
*pd, Eina_Bool async)
 }
 
 EOLIAN static Eina_Bool
-_elm_image_efl_file_async_get(Eo *obj EINA_UNUSED, Elm_Image_Data *pd)
+_elm_image_efl_file_async_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd)
 {
-   return pd->async_enable;
+   return sd->async_enable;
 }
 
 EOLIAN static void
-_elm_image_object_size_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, 
int *h)
+_elm_image_efl_gfx_view_view_size_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, 
int *w, int *h)
 {
int tw, th;
int cw = 0, ch = 0;
@@ -1321,12 +1321,6 @@ _elm_image_evas_draggable_interface_drag_target_get(Eo 
*obj EINA_UNUSED, Elm_Ima
return sd->edit;
 }
 
-EOLIAN static Evas_Object*
-_elm_image_object_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd)
-{
-   return sd->img;
-}
-
 EOLIAN static void
 _elm_image_aspect_fixed_set(Eo *obj, Elm_Image_Data *sd, Eina_Bool fixed)
 {
@@ -1608,12 +1602,12 @@ elm_image_memfile_set(Evas_Object *obj, const void 
*img, size_t size, const char
 EAPI void
 elm_image_scale_set(Evas_Object *obj,
  double   scale)
-{  
+{
ELM_IMAGE_CHECK(obj);
ELM_IMAGE_DATA_GET(obj, sd);
 
sd->scale = scale;
-   
+
_elm_image_internal_sizing_eval(obj, sd);
 }
 
@@ -1684,6 +1678,18 @@ elm_image_orient_get(const Evas_Object *obj)
return (Elm_Image_Orient) efl_image_orientation_get(obj);
 }
 
+EAPI Evas_Object*
+elm_image_object_get(const Evas_Object *obj)
+{
+   ELM_IMAGE_CHECK(obj) NULL;
+   ELM_IMAGE_DATA_GET(obj, sd);
+   return sd->img;
+}
 
+EAPI void
+elm_image_object_size_get(const Evas_Object *obj, int *w, int *h)
+{
+   efl_gfx_view_size_get(obj, w, h);
+}
 
 #include "elm_image.eo.c"
diff --git a/src/lib/elementary/elm_image.eo b/src/lib/elementary/elm_image.eo
index 9d12d95..bea774e 100644
--- a/src/lib/elementary/elm_image.eo
+++ b/src/lib/elementary/elm_image.eo
@@ -20,10 +20,10 @@ struct Elm.Image.Error
open_error: Eina.Bool;
 }
 
-class Elm.Image (Elm.Widget, Efl.File, Efl.Image_Load, 
Evas.Clickable_Interface,
- Edje.Object, Efl.Image, Evas.Draggable_Interface,
+class Elm.Image (Elm.Widget, Evas.Clickable_Interface, 
Evas.Draggable_Interface,
+ Efl.File, Efl.Image, Efl.Image_Load, Efl.Player, 
Efl.Gfx.View, Efl.Player,
  Elm.Interface_Atspi_Image, Elm.Interface_Atspi_Widget_Action,
- Efl.Player)
+ Edje.Object)
 {
eo_prefix: elm_obj_image;
methods {
@@ -122,31 +122,6 @@ class Elm.Image (Elm.Widget, Efl.File, Efl.Image_Load, 
Evas.Clickable_Interface,
 down: bool; [[A bool to set if the object is resizable down. 
Default is $true.]]
  }
   }
-  @property object {
- get {
-[[Get the inlined image object of the image widget.
-
-  This function allows one to get the underlying $Evas_Object of 
type
-  Image from this elementary widget. It can be useful to do things 
like get
-  the pixel data, save the image to a file, etc.
-
-  Note: Be careful to not manipulate it, as it is under control of
-  elementary.]]
-
-return: Evas.Object *; [[The inlined image object, or NULL if none 
exists]]
- }
-  }
-  @property object_size {
- get {
-[[Get the current size of the image.
-
-  This is the real size of the image, not the size of the objec

[EGIT] [core/efl] master 01/01: support elm_object_item_style_set/get on genlist items

2016-04-01 Thread SangHyeon Lee
sanghyeonlee pushed a commit to branch master.

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

commit c0bbf53cb9b0aa397042b0349476c4642b5b3586
Author: SangHyeon Lee 
Date:   Fri Apr 1 16:53:57 2016 +0900

support elm_object_item_style_set/get on genlist items
---
 src/bin/elementary/test_genlist.c  |  4 
 src/lib/elementary/elm_genlist.c   | 33 +
 src/lib/elementary/elm_genlist_item.eo |  2 ++
 3 files changed, 39 insertions(+)

diff --git a/src/bin/elementary/test_genlist.c 
b/src/bin/elementary/test_genlist.c
index 4c69be2..0f8636f 100644
--- a/src/bin/elementary/test_genlist.c
+++ b/src/bin/elementary/test_genlist.c
@@ -35,6 +35,7 @@ enum _api_state
SCROLLER_POLICY_SET,
TOOLTIP_TEXT_SET,
ITEM_CURSOR_SET,
+   ITEM_STYLE_SET,
API_STATE_LAST
 };
 typedef enum _api_state api_state;
@@ -92,6 +93,9 @@ set_api_state(api_data *api)
  elm_genlist_item_cursor_set(elm_genlist_first_item_get(gl), 
ELM_CURSOR_HAND2);
  break;
 
+  case ITEM_STYLE_SET: /* 8 */
+elm_object_item_style_set(elm_genlist_first_item_get(gl), 
"double_label");
+ break;
   default:
  return;
  }
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index d5f5649..b5137fc 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -5958,6 +5958,39 @@ _elm_genlist_item_elm_widget_item_signal_emit(Eo *eo_it 
EINA_UNUSED, Elm_Gen_Ite
 }
 
 EOLIAN static void
+_elm_genlist_item_elm_widget_item_style_set(Eo *eo_it,
+Elm_Gen_Item *it,
+const char *style)
+{
+   if (it->itc && !strcmp(it->itc->item_style, style)) return;
+
+   Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
+
+   itc->item_style = style;
+   if (it->itc)
+ {
+itc->func.text_get = it->itc->func.text_get;
+itc->func.content_get = it->itc->func.content_get;
+itc->func.state_get = it->itc->func.state_get;
+itc->func.filter_get = it->itc->func.filter_get;
+itc->func.reusable_content_get = it->itc->func.reusable_content_get;
+itc->decorate_item_style = it->itc->decorate_item_style;
+itc->decorate_all_item_style = it->itc->decorate_all_item_style;
+ }
+
+   elm_genlist_item_item_class_update(eo_it, itc);
+   elm_genlist_item_class_free(itc);
+}
+
+EOLIAN static const char *
+_elm_genlist_item_elm_widget_item_style_get(Eo *eo_it EINA_UNUSED,
+Elm_Gen_Item *it)
+{
+   if (it->itc) return it->itc->item_style;
+   else return NULL;
+}
+
+EOLIAN static void
 _elm_genlist_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Gen_Item *it, 
Eina_Bool focused)
 {
Evas_Object *obj = WIDGET(it);
diff --git a/src/lib/elementary/elm_genlist_item.eo 
b/src/lib/elementary/elm_genlist_item.eo
index 5a966c0..fd06afa 100644
--- a/src/lib/elementary/elm_genlist_item.eo
+++ b/src/lib/elementary/elm_genlist_item.eo
@@ -422,6 +422,8 @@ class Elm.Genlist_Item(Elm.Widget_Item)
Elm.Widget_Item.del_pre;
Elm.Widget_Item.disable;
Elm.Widget_Item.signal_emit;
+   Elm.Widget_Item.style.get;
+   Elm.Widget_Item.style.set;
Elm.Widget_Item.focus.set;
Elm.Widget_Item.focus.get;
Elm.Widget_Item.part_text.get;

-- 




[EGIT] [tools/enventor] master 02/02: add missing images part in a group template code.

2016-04-01 Thread Hermet Park
hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=9caad87f12cc75df607c1bc27fcf78c25119c46f

commit 9caad87f12cc75df607c1bc27fcf78c25119c46f
Author: Hermet Park 
Date:   Fri Apr 1 16:42:28 2016 +0900

add missing images part in a group template code.

@fix
---
 src/lib/template_code.h | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/template_code.h b/src/lib/template_code.h
index efa735d..c0f1a7b 100644
--- a/src/lib/template_code.h
+++ b/src/lib/template_code.h
@@ -1,7 +1,11 @@
-#define TEMPLATE_GROUP_LINE_CNT 26
+#define TEMPLATE_GROUP_LINE_CNT 30
 
 const char *TEMPLATE_GROUP[TEMPLATE_GROUP_LINE_CNT] =
 {
+   "   /* TODO: Please replace embedded image files to your application image 
files. */",
+   "   images {",
+   "  image: \"ENVENTOR_EMBEDDED_LOGO.png\" COMP;",
+   "   }",
"   parts {",
"  image { \"XXX\";",
" scale: 1;",

-- 




[EGIT] [tools/enventor] master 01/02: template: improve adding template of image resource do not duplicate

2016-04-01 Thread Taehyub Kim
hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=3b038768f506f984565aa3c37308660d07df7214

commit 3b038768f506f984565aa3c37308660d07df7214
Author: Taehyub Kim 
Date:   Fri Apr 1 16:33:34 2016 +0900

template: improve adding template of image resource do not duplicate

Summary:
when we insert image template or live view item,
the template code of image resource will be duplicated.
so, I added the code checking template image resource not to be duplicate

Test Plan:
1. launch enventor
2. add image part twice using ctrl + t or live view item
3. see the images block has an ENVENTOR_EMBEDDED_LOGO.png

Reviewers: Hermet, Jaehyun_Cho, NikaWhite

Differential Revision: https://phab.enlightenment.org/D3851
---
 src/lib/edc_parser.c   | 28 
 src/lib/enventor_private.h |  1 +
 src/lib/template.c | 11 +--
 3 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/src/lib/edc_parser.c b/src/lib/edc_parser.c
index a8a4863..d46aed1 100644
--- a/src/lib/edc_parser.c
+++ b/src/lib/edc_parser.c
@@ -2186,6 +2186,34 @@ parser_styles_pos_get(const Evas_Object *entry, int *ret)
return parser_collections_block_pos_get(entry, "styles", ret);
 }
 
+Eina_Bool
+parser_is_image_name(const Evas_Object *entry, const char *str)
+{
+   int start_pos, end_pos, i;
+   if (!parser_collections_block_pos_get(entry, "images", &start_pos))
+ return EINA_FALSE;
+
+   const char *text = elm_entry_entry_get(entry);
+   char *utf8 = elm_entry_markup_to_utf8(text);
+
+   for (i = start_pos ; i < strlen(utf8); i++)
+  if (utf8[i] == '}')
+{
+   end_pos = i;
+   break;
+}
+
+   char *candidate_str = alloca(end_pos - start_pos + 1);
+   const char *src_str = elm_entry_markup_to_utf8(str);
+   strncpy(candidate_str, utf8 + start_pos, end_pos - start_pos);
+   candidate_str[end_pos - start_pos] = '\0';
+
+   if (strstr(candidate_str, src_str))
+ return EINA_TRUE;
+   else
+ return EINA_FALSE;
+}
+
 void
 parser_macro_update(parser_data *pd, Eina_Bool macro_update)
 {
diff --git a/src/lib/enventor_private.h b/src/lib/enventor_private.h
index 7b3a37d..2054c50 100644
--- a/src/lib/enventor_private.h
+++ b/src/lib/enventor_private.h
@@ -138,6 +138,7 @@ int parser_line_cnt_get(parser_data *pd EINA_UNUSED, const 
char *src);
 Eina_List *parser_states_filtered_name_get(Eina_List *states);
 int parser_end_of_parts_block_pos_get(const Evas_Object *entry, const char 
*group_name);
 Eina_Bool parser_images_pos_get(const Evas_Object *entry, int *ret);
+Eina_Bool parser_is_image_name(const Evas_Object *entry, const char *str);
 Eina_Bool parser_styles_pos_get(const Evas_Object *entry, int *ret);
 const char *parser_colon_pos_get(parser_data *pd EINA_UNUSED, const char *cur);
 Eina_Bool parser_state_info_get(Evas_Object *entry, state_info *info);
diff --git a/src/lib/template.c b/src/lib/template.c
index 9480c8b..52ae193 100644
--- a/src/lib/template.c
+++ b/src/lib/template.c
@@ -49,8 +49,15 @@ image_description_add(edit_data *ed)
int cursor_pos2;
if (images_block)
  {
-template_insert(ed, ENVENTOR_TEMPLATE_INSERT_LIVE_EDIT, NULL, 0);
-cursor_pos2 = elm_entry_cursor_pos_get(edit_entry);
+// the first line of TEMPLATE_IMG to check it is already exist
+const char *template_image_str = TEMPLATE_IMG[0];
+if (parser_is_image_name(edit_entry, template_image_str))
+  cursor_pos2 = cursor_pos1;
+else
+  {
+ template_insert(ed, ENVENTOR_TEMPLATE_INSERT_LIVE_EDIT, NULL, 0);
+ cursor_pos2 = elm_entry_cursor_pos_get(edit_entry);
+  }
  }
else
  {

-- 




[EGIT] [core/efl] master 01/01: fix item_class refcount bug when class updated

2016-04-01 Thread SangHyeon Lee
sanghyeonlee pushed a commit to branch master.

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

commit fc2f341e412df4e60a98996f8639fe2b12333be2
Author: SangHyeon Lee 
Date:   Fri Apr 1 16:40:16 2016 +0900

fix item_class refcount bug when class updated
---
 src/lib/elementary/elm_genlist.c | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 6a8e8a2..d5f5649 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -7070,7 +7070,15 @@ _elm_genlist_item_item_class_update(Eo *eo_it, 
Elm_Gen_Item *it,
 {
ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
EINA_SAFETY_ON_NULL_RETURN(itc);
-   it->itc = itc;
+
+   /* Decrease the orignal item class refcount to prevent memory leak */
+   if (it->itc != itc)
+ {
+elm_genlist_item_class_unref((Elm_Genlist_Item_Class *)it->itc);
+it->itc = itc;
+elm_genlist_item_class_ref((Elm_Genlist_Item_Class *)it->itc);
+ }
+
if (!it->item->block) return;
it->item->nocache_once = EINA_TRUE;
 

-- 




[EGIT] [core/efl] master 01/01: fix genlist content leak in reausable case

2016-04-01 Thread SangHyeon Lee
sanghyeonlee pushed a commit to branch master.

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

commit e8c3346379638f085613df61277ebd784faf235a
Author: SangHyeon Lee 
Date:   Fri Apr 1 16:26:57 2016 +0900

fix genlist content leak in reausable case
---
 src/lib/elementary/elm_genlist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 3af6491..6a8e8a2 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -410,7 +410,6 @@ _item_content_realize(Elm_Gen_Item *it,
evas_object_size_hint_min_set(content, minw, minh);
 }
 
-  *contents = eina_list_append(*contents, content);
   if (!edje_object_part_swallow(target, key, content))
 {
ERR("%s (%p) can not be swallowed into %s",
@@ -420,6 +419,7 @@ _item_content_realize(Elm_Gen_Item *it,
 }
   elm_widget_sub_object_add(WIDGET(it), content);
}
+ *contents = eina_list_append(*contents, content);
 
  if (elm_wdg_item_disabled_get(EO_OBJ(it)))
elm_widget_disabled_set(content, EINA_TRUE);

-- 




[EGIT] [tools/enventor] master 01/02: console: hide unnecessary console error line

2016-04-01 Thread Taehyub Kim
hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=a360601aa437fabe4adff2a0b3a8ea82b4706964

commit a360601aa437fabe4adff2a0b3a8ea82b4706964
Author: Taehyub Kim 
Date:   Fri Apr 1 16:12:20 2016 +0900

console: hide unnecessary console error line

Summary:
Actually it is unnecessary error log below the first line.
so I skipped the log

Test Plan:
1. launch enventor
2. make an error
3. see the console log in single line

Reviewers: Jaehyun_Cho, NikaWhite, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D3845
---
 src/bin/console.c | 21 ++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/bin/console.c b/src/bin/console.c
index 29e7b33..8f5b21d 100644
--- a/src/bin/console.c
+++ b/src/bin/console.c
@@ -32,9 +32,9 @@ error_word_select(Evas_Object *console)
 
//parse error word
if ((error_token = strstr(console_text, "keyword")))
- token_value_get(error_token, "keyword", '<', 1, error_word);
+ token_value_get(error_token, "keyword", '\0', 1, error_word);
else if ((error_token = strstr(console_text, "name")))
- token_value_get(error_token, "name", '<', 1, error_word);
+ token_value_get(error_token, "name", '\0', 1, error_word);
else return;
 
 //find error word position
@@ -63,6 +63,17 @@ error_word_select(Evas_Object *console)
 enventor_object_select_region_set(base_enventor_get(), start, end);
 }
 
+static void
+make_single_error_msg(const char *src, char *dst)
+{
+   /* We cut a error messages since it contains unnecessary information.
+  Most of the time, first one line has a practical information. */
+   const char *new_line  = "";
+   const char *eol = strstr(src, new_line);
+   if (!eol) return;
+   strncpy(dst, src, eol - src);
+   dst[eol - src] = '\0';
+}
 /*/
 /* Externally accessible calls   */
 /*/
@@ -70,7 +81,11 @@ error_word_select(Evas_Object *console)
 void
 console_text_set(Evas_Object *console, const char *text)
 {
-   elm_entry_entry_set(console, text);
+   char * single_error_msg = NULL;
+   single_error_msg = alloca(strlen(text) + 1);
+   if (!single_error_msg) return;
+   make_single_error_msg(text, single_error_msg);
+   elm_entry_entry_set(console, single_error_msg);
error_word_select(console);
 }
 

-- 




[EGIT] [tools/enventor] master 02/02: refactoring console code.

2016-04-01 Thread Hermet Park
hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=09bf899aed6892202af2be07a14d9937862bcab9

commit 09bf899aed6892202af2be07a14d9937862bcab9
Author: Hermet Park 
Date:   Fri Apr 1 16:21:38 2016 +0900

refactoring console code.

just rewrite code for readibility.

no logic change.
---
 src/bin/console.c | 21 -
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/bin/console.c b/src/bin/console.c
index 8f5b21d..dbdeb8b 100644
--- a/src/bin/console.c
+++ b/src/bin/console.c
@@ -64,16 +64,23 @@ error_word_select(Evas_Object *console)
 }
 
 static void
-make_single_error_msg(const char *src, char *dst)
+set_console_error_msg(Evas_Object *console, const char *src)
 {
-   /* We cut a error messages since it contains unnecessary information.
+   /* We cut error messages since it contains unnecessary information.
   Most of the time, first one line has a practical information. */
const char *new_line  = "";
const char *eol = strstr(src, new_line);
if (!eol) return;
-   strncpy(dst, src, eol - src);
-   dst[eol - src] = '\0';
+
+   char * single_error_msg = alloca((eol - src) + 1);
+   if (!single_error_msg) return;
+
+   strncpy(single_error_msg, src, eol - src);
+   single_error_msg[eol - src] = '\0';
+
+   elm_entry_entry_set(console, single_error_msg);
 }
+
 /*/
 /* Externally accessible calls   */
 /*/
@@ -81,11 +88,7 @@ make_single_error_msg(const char *src, char *dst)
 void
 console_text_set(Evas_Object *console, const char *text)
 {
-   char * single_error_msg = NULL;
-   single_error_msg = alloca(strlen(text) + 1);
-   if (!single_error_msg) return;
-   make_single_error_msg(text, single_error_msg);
-   elm_entry_entry_set(console, single_error_msg);
+   set_console_error_msg(console, text);
error_word_select(console);
 }
 

--