[EGIT] [tools/eflete] master 01/01: project_common: don't show project-save popup in Tizen

2016-11-23 Thread Jaehwan Kim
jaehwan pushed a commit to branch master.

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

commit 22b9ef6410cfb411a6a14c2aca011dad600c10af
Author: Jaehwan Kim 
Date:   Thu Nov 24 14:28:14 2016 +0900

project_common: don't show project-save popup in Tizen
---
 src/bin/ui/main_window.h |  7 +++
 src/bin/ui/project_common.c  | 19 +++
 src/bin/ui/project_common.h  |  2 +-
 src/bin/ui/project_export.c  |  8 
 src/bin/ui/tab_home_import_edc.c |  2 +-
 src/bin/ui/tab_home_import_edj.c |  7 ++-
 src/bin/ui/tab_home_new.c|  2 +-
 7 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h
index c817e2b..9c2edfe 100644
--- a/src/bin/ui/main_window.h
+++ b/src/bin/ui/main_window.h
@@ -104,6 +104,13 @@ typedef enum
BG_PREVIEW_BLACK
 } Bg_Preview;
 
+typedef enum
+{
+   FILE_SAVE_ASK = 1,
+   FILE_SAVE_REPLACE,
+   FILE_SAVE_APPEND
+} File_Save;
+
 /**
  * The validation func for popup action.
  *
diff --git a/src/bin/ui/project_common.c b/src/bin/ui/project_common.c
index b1c5b95..00cabd2 100644
--- a/src/bin/ui/project_common.c
+++ b/src/bin/ui/project_common.c
@@ -69,7 +69,7 @@ end:
 
 Eina_Bool
 exist_permission_check(const char *path, const char *name,
-   const char *title, const char *msg, Eina_Bool append,
+   const char *title, const char *msg, File_Save option,
Ecore_Cb func,
const void *data)
 {
@@ -108,15 +108,26 @@ exist_permission_check(const char *path, const char *name,
 eina_strbuf_free(pcd->buf);
 goto exit;
  }
-   if (!append)
+
+   if (option == FILE_SAVE_ASK)
  {
 popup = popup_add(title, msg, BTN_REPLACE | BTN_CANCEL, NULL, NULL);
 evas_object_smart_callback_add(popup, POPUP_CLOSE_CB, 
_exist_permission_popup_close_cb, pcd);
 return ret;
  }
-   else if (pcd->func)
+   else
  {
-pcd->func((void *)pcd->data);
+if (!ecore_file_can_write(eina_strbuf_string_get(pcd->buf)))
+  {
+ ecore_job_add(_permision_popup_job, pcd);
+ ret = false;
+ goto exit;
+  }
+
+if (option == FILE_SAVE_REPLACE)
+ ecore_file_recursive_rm(eina_strbuf_string_get(pcd->buf));
+if (pcd->func)
+  pcd->func((void *)pcd->data);
  }
 
 exit:
diff --git a/src/bin/ui/project_common.h b/src/bin/ui/project_common.h
index a5a115a..bc127c1 100644
--- a/src/bin/ui/project_common.h
+++ b/src/bin/ui/project_common.h
@@ -21,7 +21,7 @@
 #define PROJECT_COMMON_H
 
 Eina_Bool
-exist_permission_check(const char *path, const char *name, const char *title, 
const char *msg, Eina_Bool append, Ecore_Cb func, const void *data);
+exist_permission_check(const char *path, const char *name, const char *title, 
const char *msg, File_Save option, Ecore_Cb func, const void *data);
 
 Eina_Bool
 progress_print(void *data, Eina_Stringshare *progress_string);
diff --git a/src/bin/ui/project_export.c b/src/bin/ui/project_export.c
index 47e0355..d558aef 100644
--- a/src/bin/ui/project_export.c
+++ b/src/bin/ui/project_export.c
@@ -107,7 +107,7 @@ _export_dev(void *data __UNUSED__,
exist_permission_check(dir,
   name,
   _("Export to develop edj-file"),
-  eina_strbuf_string_get(buf), EINA_TRUE, /* check 
this true on upstream I have doubts about that */
+  eina_strbuf_string_get(buf), FILE_SAVE_APPEND,
   _after_export_dev_check, (void 
*)eina_stringshare_add(path));
free(dir);
eina_strbuf_free(buf);
@@ -185,7 +185,7 @@ _export_release(void *data __UNUSED__,
exist_permission_check(elm_fileselector_path_get(obj),
   elm_fileselector_current_name_get(obj),
   _("Export to release edj-file"),
-  eina_strbuf_string_get(buf), EINA_FALSE,
+  eina_strbuf_string_get(buf), FILE_SAVE_ASK,
   _after_export_release_check, (void 
*)eina_stringshare_add(path));
eina_strbuf_free(buf);
 
@@ -264,7 +264,7 @@ _export_source_code(void *data,
exist_permission_check(exdata->path,
   ap.project->name,
   _("Export to develop edj-file"),
-  eina_strbuf_string_get(buf), EINA_FALSE,
+  eina_strbuf_string_get(buf), FILE_SAVE_ASK,
   _after_export_source_code_check, exdata);
eina_strbuf_free(buf);
 
@@ -338,7 +338,7 @@ _export_group_source_code(void *data __UNUSED__,
  path, name);
exist_permission_check(path, name,
   _("Export group source code"),
-  eina_strbuf_string_get(buf), 

[EGIT] [core/efl] master 01/01: efl path: add missing value intializing.

2016-11-23 Thread ChunEon Park
hermet pushed a commit to branch master.

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

commit 4584fe572166b4a70e1c23222ac0bfb96bc20933
Author: Hermet Park 
Date:   Thu Nov 24 15:56:52 2016 +0900

efl path: add missing value intializing.

It might be broken at some particular vector drawing.
---
 src/lib/efl/interfaces/efl_gfx_path.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/efl/interfaces/efl_gfx_path.c 
b/src/lib/efl/interfaces/efl_gfx_path.c
index 5cb6385..631ec2e 100644
--- a/src/lib/efl/interfaces/efl_gfx_path.c
+++ b/src/lib/efl/interfaces/efl_gfx_path.c
@@ -758,7 +758,7 @@ _efl_gfx_t_for_arc_angle(double angle)
if (angle < 0.1) return 0;
if (angle == 90.0) return 1;
 
-   //FIXME: radians??
+   radians = (angle/180) * M_PI;
 
cos_angle = cos(radians);
sin_angle = sin(radians);

-- 




Re: [E-devel] Windows API & Theme changes

2016-11-23 Thread Jean-Philippe André
Hey,

On 24 November 2016 at 00:09, Mike Blumenkrantz <
michael.blumenkra...@gmail.com> wrote:

> Hi,
>
> Mouse eventing works under Wayland compositors by
> calling wl_pointer_send_button() on a surface resource. The client then
> receives this event and handles it appropriately, in our case by
> propagating it ecore-wl2 -> ecore-input-evas -> evas.
>

Hmm I'm more wondering about how this works for internal windows. There
seems to be an input rectangle for windows that have an input region
different than their actual geometry (shadow, etc...). I'll have a close
look at it this afternoon.


I would hope that in future cases of significant patches being pushed, a
> bit more testing can be done in Wayland mode to avoid noticeable breakages
> like this.
>

Yes, I'm really sorry that this broke those things. I hope you can
understand though that the point of merging my work was to find out those
issues and work on them rather than piling more patches and accumulating
potential issues in my corner. My bad for not testing E Wayland, even
though I have a VM for that.


On Wed, Nov 23, 2016 at 9:56 AM Jean-Philippe André 
> wrote:
>
> > Hi,
> >
> > As of now, I know that these patches have broken the following things:
> > 1. E internal windows in E Wayland. The borders had disappeared ("fixed")
> > but mouse inputs still don't work.
> > 2. Window border shows EFL CSD + system decorations on Ubuntu (?)
> >
> > For 1. I need help from E/WL experts. I can see a MOUSE_DOWN event happen
> > on a single object (the smart obj for the window frame). But I have to
> > admit that I'm very confused. How is this object supposed to propagate
> the
> > event to the window itself? Anyway I pushed a hacky patch. Needs to be
> > properly fixed of course.
> >
> > Best regards,
> >
> >
> >
> > On 23 November 2016 at 14:23, Jean-Philippe André 
> > wrote:
> >
> > > Hello everyone,
> > >
> > >
> > > First of all, sorry to send this mail after pushing my changes, rather
> > > than before. But I prefer spotting issues and fixing them rather than
> > > having to worry about everything during the design & implementation
> > phase.
> > >
> > >
> > > I have been working on a new interface for the Window API, and this
> > > includes a lot of changes to the theme as well. In particular, win.edc
> > (the
> > > win group) is now barely used at all, while border.edc (the CSD frame
> > > group) contains a lot of logic to handle window decorations, client,
> > > background, main menu, etc... All windows now have a frame object.
> > >
> > > I have also bumped the theme version from 110 to 119 but this does not
> > > mean a theme >= 119 is required. 110 is still supported of course. I
> have
> > > added a few fallback mechanisms to handle legacy themes, but this
> > increases
> > > code complexity a bit :(
> > >
> > >
> > >
> > > New features:
> > > - Experimental CSD for X11 (client-side decorations).
> > > - Stacked box class.
> > > - Menu & background are swallowed in the frame. This will allow us to
> > move
> > > them or other widgets (eg. tabs) inside the title bar directl.
> > > - efl_part(win, "background") can be used to set a color, file or
> object
> > > as background
> > > - efl_part(win, "content") is the only slot to be used for a window
> > > content (no more elm_win_resize_object in EO APIs)
> > >
> > >
> > >
> > > How to test CSD on X:
> > > - export EFL_WIN_FRAME_MODE=on
> > >
> > > Things not working yet:
> > > - CSD mode/resize in some X window managers (E works)
> > > - No system menu (icon click / title bar right click). GTK3 implements
> a
> > > custom menu, there doesn't seem to be any existing X protocol to popup
> > the
> > > window manager's window menu.
> > > - Sticky, etc... are thus all lost unless you use a special key to open
> > > the window manager's window menu
> > >
> > >
> > >
> > > Final note:
> > > Please report any issues, especially with non-default themes!
> > >
> > >
> > > Thanks in advance!
> > >
> > > --
> > > Jean-Philippe André
> > >
> > >
> >
> >
> > --
> > Jean-Philippe André
> >
> > 
> --
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> 
> --
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
Jean-Philippe André
--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/03: efl_net_socket_fd: fix copy & paste too much.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 7edc1ef49dec99517a4eba780ac872a9ccc7957c
Author: Gustavo Sverzut Barbieri 
Date:   Thu Nov 24 02:10:42 2016 -0200

efl_net_socket_fd: fix copy & paste too much.
---
 src/lib/ecore_con/efl_net_socket_fd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_con/efl_net_socket_fd.c 
b/src/lib/ecore_con/efl_net_socket_fd.c
index c04f2c8..822154c 100644
--- a/src/lib/ecore_con/efl_net_socket_fd.c
+++ b/src/lib/ecore_con/efl_net_socket_fd.c
@@ -234,7 +234,7 @@ _efl_net_socket_fd_efl_io_reader_can_read_set(Eo *o, 
Efl_Net_Socket_Fd_Data *pd
else
  {
 /* kernel flag is clear, resume monitoring the FD */
-efl_event_callback_del(o, EFL_LOOP_FD_EVENT_READ, 
_efl_net_socket_fd_event_read, NULL);
+efl_event_callback_add(o, EFL_LOOP_FD_EVENT_READ, 
_efl_net_socket_fd_event_read, NULL);
  }
 }
 
@@ -298,7 +298,7 @@ _efl_net_socket_fd_efl_io_writer_can_write_set(Eo *o, 
Efl_Net_Socket_Fd_Data *pd
else
  {
 /* kernel flag is clear, resume monitoring the FD */
-efl_event_callback_del(o, EFL_LOOP_FD_EVENT_WRITE, 
_efl_net_socket_fd_event_write, NULL);
+efl_event_callback_add(o, EFL_LOOP_FD_EVENT_WRITE, 
_efl_net_socket_fd_event_write, NULL);
  }
 }
 

-- 




[EGIT] [core/efl] master 02/03: efl_io_std{in, out, err}: do not spin on fd monitoring events.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 49399b385b8ebb1313a5709ae64c9bc6ebb4474e
Author: Gustavo Sverzut Barbieri 
Date:   Thu Nov 24 01:03:45 2016 -0200

efl_io_std{in,out,err}: do not spin on fd monitoring events.

as soon as we report 'can_read' or 'can_write', stop monitoring the
events until the user executes the operation, which will clear these
flags and we resume monitoring.
---
 src/lib/ecore/efl_io_stderr.c  | 21 -
 src/lib/ecore/efl_io_stderr.eo |  1 +
 src/lib/ecore/efl_io_stdin.c   | 21 -
 src/lib/ecore/efl_io_stdin.eo  |  1 +
 src/lib/ecore/efl_io_stdout.c  | 21 -
 src/lib/ecore/efl_io_stdout.eo |  1 +
 6 files changed, 63 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore/efl_io_stderr.c b/src/lib/ecore/efl_io_stderr.c
index b609028..6992901 100644
--- a/src/lib/ecore/efl_io_stderr.c
+++ b/src/lib/ecore/efl_io_stderr.c
@@ -38,7 +38,6 @@ _efl_io_stderr_efl_object_finalize(Eo *o, void *pd 
EINA_UNUSED)
o = efl_finalize(efl_super(o, MY_CLASS));
if (!o) return NULL;
 
-   // TODO: only register "write" if "can_write" is being monitored?
efl_event_callback_add(o, EFL_LOOP_FD_EVENT_WRITE, 
_efl_io_stderr_event_write, NULL);
efl_event_callback_add(o, EFL_LOOP_FD_EVENT_ERROR, 
_efl_io_stderr_event_error, NULL);
 
@@ -57,4 +56,24 @@ _efl_io_stderr_efl_io_writer_write(Eo *o, void *pd 
EINA_UNUSED, Eina_Slice *ro_s
return ret;
 }
 
+EOLIAN static void
+_efl_io_stderr_efl_io_writer_can_write_set(Eo *o, void *pd EINA_UNUSED, 
Eina_Bool value)
+{
+   Eina_Bool old = efl_io_writer_can_write_get(o);
+   if (old == value) return;
+
+   efl_io_writer_can_write_set(efl_super(o, MY_CLASS), value);
+
+   if (value)
+ {
+/* stop monitoring the FD, we need to wait the user to write and clear 
the kernel flag */
+efl_event_callback_del(o, EFL_LOOP_FD_EVENT_WRITE, 
_efl_io_stderr_event_write, NULL);
+ }
+   else
+ {
+/* kernel flag is clear, resume monitoring the FD */
+efl_event_callback_add(o, EFL_LOOP_FD_EVENT_WRITE, 
_efl_io_stderr_event_write, NULL);
+ }
+}
+
 #include "efl_io_stderr.eo.c"
diff --git a/src/lib/ecore/efl_io_stderr.eo b/src/lib/ecore/efl_io_stderr.eo
index 5da5641..d7ec5d5 100644
--- a/src/lib/ecore/efl_io_stderr.eo
+++ b/src/lib/ecore/efl_io_stderr.eo
@@ -10,5 +10,6 @@ class Efl.Io.Stderr (Efl.Loop.Fd, Efl.Io.Writer.Fd) {
 Efl.Object.finalize;
 Efl.Loop.Fd.fd.set;
 Efl.Io.Writer.write;
+Efl.Io.Writer.can_write.set;
 }
 }
diff --git a/src/lib/ecore/efl_io_stdin.c b/src/lib/ecore/efl_io_stdin.c
index 679068b..6da700e 100644
--- a/src/lib/ecore/efl_io_stdin.c
+++ b/src/lib/ecore/efl_io_stdin.c
@@ -40,7 +40,6 @@ _efl_io_stdin_efl_object_finalize(Eo *o, void *pd EINA_UNUSED)
o = efl_finalize(efl_super(o, MY_CLASS));
if (!o) return NULL;
 
-   // TODO: only register "read" if "can_read" is being monitored?
efl_event_callback_add(o, EFL_LOOP_FD_EVENT_READ, _efl_io_stdin_event_read, 
NULL);
efl_event_callback_add(o, EFL_LOOP_FD_EVENT_ERROR, 
_efl_io_stdin_event_error, NULL);
return o;
@@ -58,4 +57,24 @@ _efl_io_stdin_efl_io_reader_read(Eo *o, void *pd 
EINA_UNUSED, Eina_Rw_Slice *rw_
return ret;
 }
 
+EOLIAN static void
+_efl_io_stdin_efl_io_reader_can_read_set(Eo *o, void *pd EINA_UNUSED, 
Eina_Bool value)
+{
+   Eina_Bool old = efl_io_reader_can_read_get(o);
+   if (old == value) return;
+
+   efl_io_reader_can_read_set(efl_super(o, MY_CLASS), value);
+
+   if (value)
+ {
+/* stop monitoring the FD, we need to wait the user to read and clear 
the kernel flag */
+efl_event_callback_del(o, EFL_LOOP_FD_EVENT_READ, 
_efl_io_stdin_event_read, NULL);
+ }
+   else
+ {
+/* kernel flag is clear, resume monitoring the FD */
+efl_event_callback_add(o, EFL_LOOP_FD_EVENT_READ, 
_efl_io_stdin_event_read, NULL);
+ }
+}
+
 #include "efl_io_stdin.eo.c"
diff --git a/src/lib/ecore/efl_io_stdin.eo b/src/lib/ecore/efl_io_stdin.eo
index 4a86558..421341a 100644
--- a/src/lib/ecore/efl_io_stdin.eo
+++ b/src/lib/ecore/efl_io_stdin.eo
@@ -10,5 +10,6 @@ class Efl.Io.Stdin (Efl.Loop.Fd, Efl.Io.Reader.Fd) {
 Efl.Object.finalize;
 Efl.Loop.Fd.fd.set;
 Efl.Io.Reader.read;
+Efl.Io.Reader.can_read.set;
 }
 }
diff --git a/src/lib/ecore/efl_io_stdout.c b/src/lib/ecore/efl_io_stdout.c
index df20c9fb..026d79b 100644
--- a/src/lib/ecore/efl_io_stdout.c
+++ b/src/lib/ecore/efl_io_stdout.c
@@ -38,7 +38,6 @@ _efl_io_stdout_efl_object_finalize(Eo *o, void *pd 
EINA_UNUSED)
o = efl_finalize(efl_super(o, MY_CLASS));
if (!o) return NULL;
 
-   // TODO: only register "write" if "can_write" is being monitored?
efl_event_callback_add(o, EFL_LOOP_FD_EVENT_WRITE, 
_efl_io_stdout_event_write, NULL);

[EGIT] [core/efl] master 03/03: efl_net_dialer_http: use efl_loop_fd now that it's fixed.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit c2cb5defe36833c855643fee827ea55bf012a1ee
Author: Gustavo Sverzut Barbieri 
Date:   Thu Nov 24 02:13:32 2016 -0200

efl_net_dialer_http: use efl_loop_fd now that it's fixed.

now that efl_loop_fd manages callbacks -> Ecore_Fd_Handler properly,
we can remove the old code.
---
 src/lib/ecore_con/efl_net_dialer_http.c | 95 +++--
 1 file changed, 6 insertions(+), 89 deletions(-)

diff --git a/src/lib/ecore_con/efl_net_dialer_http.c 
b/src/lib/ecore_con/efl_net_dialer_http.c
index 36409df..83c85b0 100644
--- a/src/lib/ecore_con/efl_net_dialer_http.c
+++ b/src/lib/ecore_con/efl_net_dialer_http.c
@@ -173,7 +173,7 @@ typedef struct
 {
CURL *easy;
Efl_Net_Dialer_Http_Curlm *cm;
-   Ecore_Fd_Handler *fdhandler;
+   Eo *fdhandler;
Eina_Stringshare *address_dial;
Eina_Stringshare *proxy;
Eina_Stringshare *cookie_jar;
@@ -367,9 +367,6 @@ _efl_net_dialer_http_curlm_timer_schedule(CURLM *multi 
EINA_UNUSED, long timeout
return 0;
 }
 
-#if 0
-// it seems the Eo_Loop_Fd isn't working properly when we change connections...
-// as it's still built on top of Ecore_Fd_Handler, then use it directly.
 static void
 _efl_net_dialer_http_curlm_event_fd_read(void *data, const Efl_Event *event)
 {
@@ -377,7 +374,6 @@ _efl_net_dialer_http_curlm_event_fd_read(void *data, const 
Efl_Event *event)
SOCKET fd = efl_loop_fd_get(event->object);
CURLMcode r;
 
-   ERR("XXX socket=" SOCKET_FMT " CURL_CSELECT_IN", fd);
r = curl_multi_socket_action(cm->multi, fd, CURL_CSELECT_IN, >running);
if (r != CURLM_OK)
  ERR("socket action CURL_CSELECT_IN fd=" SOCKET_FMT " failed: %s", fd, 
curl_multi_strerror(r));
@@ -392,7 +388,6 @@ _efl_net_dialer_http_curlm_event_fd_write(void *data, const 
Efl_Event *event)
SOCKET fd = efl_loop_fd_get(event->object);
CURLMcode r;
 
-   ERR("XXX socket=" SOCKET_FMT " CURL_CSELECT_OUT", fd);
r = curl_multi_socket_action(cm->multi, fd, CURL_CSELECT_OUT, >running);
if (r != CURLM_OK)
  ERR("socket action CURL_CSELECT_OUT fd=" SOCKET_FMT " failed: %s", fd, 
curl_multi_strerror(r));
@@ -430,7 +425,8 @@ _efl_net_dialer_http_curlm_socket_manage(CURL *e, 
curl_socket_t fd, int what, vo
   flags = (intptr_t)efl_key_data_get(fdhandler, "curl_flags");
 else
   {
- pd->fdhandler = fdhandler = efl_add(EFL_LOOP_FD_CLASS, cm->loop);
+ pd->fdhandler = fdhandler = efl_add(EFL_LOOP_FD_CLASS, cm->loop,
+ efl_loop_fd_set(efl_added, 
fd));
  EINA_SAFETY_ON_NULL_RETURN_VAL(fdhandler, -1);
  curl_multi_assign(cm->multi, fd, fdhandler);
  flags = 0;
@@ -445,108 +441,29 @@ _efl_net_dialer_http_curlm_socket_manage(CURL *e, 
curl_socket_t fd, int what, vo
 is_read = !!(what & CURL_POLL_IN);
 is_write = !!(what & CURL_POLL_OUT);
 
-ERR("changed flags %#x -> %#x, read: %d/%d, write: %d/%d", flags, 
what, was_read, is_read, was_write, is_write);
-
 if (was_read && !is_read)
   {
- //efl_event_callback_del(fdhandler, EFL_LOOP_FD_EVENT_READ, 
_efl_net_dialer_http_curlm_event_fd_read, cm);
- ERR("XXX del %d read cb", fd);
+ efl_event_callback_del(fdhandler, EFL_LOOP_FD_EVENT_READ, 
_efl_net_dialer_http_curlm_event_fd_read, cm);
   }
 else if (!was_read && is_read)
   {
  efl_event_callback_add(fdhandler, EFL_LOOP_FD_EVENT_READ, 
_efl_net_dialer_http_curlm_event_fd_read, cm);
- ERR("XXX add %d read cb", fd);
   }
 
 if (was_write && !is_write)
   {
- //efl_event_callback_del(fdhandler, EFL_LOOP_FD_EVENT_WRITE, 
_efl_net_dialer_http_curlm_event_fd_write, cm);
- ERR("XXX del %d write cb", fd);
+ efl_event_callback_del(fdhandler, EFL_LOOP_FD_EVENT_WRITE, 
_efl_net_dialer_http_curlm_event_fd_write, cm);
   }
 else if (!was_write && is_write)
   {
  efl_event_callback_add(fdhandler, EFL_LOOP_FD_EVENT_WRITE, 
_efl_net_dialer_http_curlm_event_fd_write, cm);
- ERR("XXX add %d write cb", fd);
   }
 
 efl_key_data_set(fdhandler, "curl_flags", (void *)(intptr_t)what);
  }
 
-   ERR("XXX finished manage fd=" SOCKET_FMT ", what=%#x, cm=%p, fdhandler=%p", 
fd, what, cm, fdhandler);
-
return 0;
 }
-#else
-// XXX BEGIN Legacy FD Handler:
-static Eina_Bool
-_efl_net_dialer_http_curlm_event_fd(void *data, Ecore_Fd_Handler *fdhandler)
-{
-   Efl_Net_Dialer_Http_Curlm *cm = data;
-   SOCKET fd;
-   int flags = 0;
-   CURLMcode r;
-
-   if (ecore_main_fd_handler_active_get(fdhandler, ECORE_FD_READ))
- flags |= CURL_CSELECT_IN;
-   if (ecore_main_fd_handler_active_get(fdhandler, ECORE_FD_WRITE))
- flags |= 

[EGIT] [core/efl] master 01/02: scroller: add key action move option.

2016-11-23 Thread Hosang Kim
hermet pushed a commit to branch master.

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

commit 791bdcb7b23e517fc9e2afd68b701323f94d778b
Author: Hosang Kim 
Date:   Thu Nov 24 12:10:45 2016 +0900

scroller: add key action move option.

Summary:
when scroller page is enabled and key is pressed,
scroller will move in page by page.

Test Plan: elementary_test -> scroller

Reviewers: woohyun, cedric, jaehwan, raster, Hermet

Subscribers: akanad, jpeg

Differential Revision: https://phab.enlightenment.org/D4425
---
 src/lib/elementary/elm_scroller.c | 65 +--
 1 file changed, 55 insertions(+), 10 deletions(-)

diff --git a/src/lib/elementary/elm_scroller.c 
b/src/lib/elementary/elm_scroller.c
index 6e64b28..466f54e 100644
--- a/src/lib/elementary/elm_scroller.c
+++ b/src/lib/elementary/elm_scroller.c
@@ -108,6 +108,8 @@ _key_action_move(Evas_Object *obj, const char *params)
Evas_Coord f_y = 0;
Evas_Coord f_w = 0;
Evas_Coord f_h = 0;
+   Evas_Coord pagesize_h = 0, pagesize_v = 0;
+   Evas_Coord pagenumber_h = 0, pagenumber_v = 0;
 
elm_interface_scrollable_content_pos_get(obj, , );
elm_interface_scrollable_step_size_get(obj, _x, _y);
@@ -190,25 +192,52 @@ _key_action_move(Evas_Object *obj, const char *params)
 
eina_list_free(can_focus_list);
 
+   elm_interface_scrollable_paging_get(obj, NULL, NULL, _h, 
_v);
+   elm_interface_scrollable_current_page_get(obj, _h, 
_v);
+
if (!strcmp(dir, "left"))
  {
 if ((x <= 0) && (!sd->loop_h)) return EINA_FALSE;
-x -= step_x;
+if (pagesize_h)
+  {
+ elm_interface_scrollable_page_bring_in(obj, pagenumber_h - 1, 
pagenumber_v);
+ return EINA_TRUE;
+  }
+else
+  x -= step_x;
  }
else if (!strcmp(dir, "right"))
  {
 if ((x >= (max_x - v_w)) && (!sd->loop_h)) return EINA_FALSE;
-x += step_x;
+if (pagesize_h)
+  {
+ elm_interface_scrollable_page_bring_in(obj, pagenumber_h + 1, 
pagenumber_v);
+ return EINA_TRUE;
+  }
+else
+  x += step_x;
  }
else if (!strcmp(dir, "up"))
  {
 if ((y <= 0) && (!sd->loop_v)) return EINA_FALSE;
-y -= step_y;
+if (pagesize_v)
+  {
+ elm_interface_scrollable_page_bring_in(obj, pagenumber_h, 
pagenumber_v - 1);
+ return EINA_TRUE;
+  }
+else
+  y -= step_y;
  }
else if (!strcmp(dir, "down"))
  {
 if ((y >= (max_y - v_h)) && (!sd->loop_v)) return EINA_FALSE;
-y += step_y;
+if (pagesize_v)
+  {
+ elm_interface_scrollable_page_bring_in(obj, pagenumber_h, 
pagenumber_v + 1);
+ return EINA_TRUE;
+  }
+else
+  y += step_y;
  }
else if (!strcmp(dir, "first"))
  {
@@ -220,17 +249,33 @@ _key_action_move(Evas_Object *obj, const char *params)
  }
else if (!strcmp(dir, "prior"))
  {
-if (page_y < 0)
-  y -= -(page_y * v_h) / 100;
+if (pagesize_v)
+  {
+ elm_interface_scrollable_page_bring_in(obj, pagenumber_h, 
pagenumber_v - 1);
+ return EINA_TRUE;
+  }
 else
-  y -= page_y;
+  {
+ if (page_y < 0)
+   y -= -(page_y * v_h) / 100;
+ else
+   y -= page_y;
+  }
  }
else if (!strcmp(dir, "next"))
  {
-if (page_y < 0)
-  y += -(page_y * v_h) / 100;
+if (pagesize_v)
+  {
+ elm_interface_scrollable_page_bring_in(obj, pagenumber_h, 
pagenumber_v + 1);
+ return EINA_TRUE;
+  }
 else
-  y += page_y;
+  {
+ if (page_y < 0)
+   y += -(page_y * v_h) / 100;
+ else
+   y += page_y;
+  }
  }
else return EINA_FALSE;
 

-- 




[EGIT] [core/efl] master 02/02: Edje: add checking on NULL 3-rd parameter in edje_object_part_external_param_type_get() @fix

2016-11-23 Thread Artem Popov
hermet pushed a commit to branch master.

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

commit 7372b1d156ec989655204a2b409281a6996fd88c
Author: Artem Popov 
Date:   Thu Nov 24 12:13:36 2016 +0900

Edje: add checking on NULL 3-rd parameter in 
edje_object_part_external_param_type_get()
@fix

Summary: add checking on NULL 3-rd parameter (param) before strcmp to avoid 
segfault

Reviewers: cedric, jpeg, NikaWhite, myoungwoon, Hermet

Reviewed By: Hermet

Subscribers: Hermet, t.naumenko

Differential Revision: https://phab.enlightenment.org/D4424
---
 src/lib/edje/edje_external.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/edje/edje_external.c b/src/lib/edje/edje_external.c
index 9065f94..8e242f1 100644
--- a/src/lib/edje/edje_external.c
+++ b/src/lib/edje/edje_external.c
@@ -124,7 +124,7 @@ _edje_object_part_external_param_type_get(Eo *obj, Edje 
*ed, const char *part, c
Edje_External_Type *type;
Edje_External_Param_Info *info;
 
-   if ((!ed) || (!part)) return EDJE_EXTERNAL_PARAM_TYPE_MAX;
+   if ((!ed) || (!part) || (!param)) return EDJE_EXTERNAL_PARAM_TYPE_MAX;
 
rp = _edje_real_part_recursive_get(, (char *)part);
if (!rp)
@@ -147,7 +147,7 @@ _edje_object_part_external_param_type_get(Eo *obj, Edje 
*ed, const char *part, c
 return EDJE_EXTERNAL_PARAM_TYPE_MAX;
  }
for (info = type->parameters_info; info->name; info++)
- if (strcmp(info->name, param) == 0) return info->type; ;
+ if (strcmp(info->name, param) == 0) return info->type;
 
ERR("no parameter '%s' external type '%s'", param, type->module_name);
 

-- 




[EGIT] [core/efl] master 03/03: eo: make it possible to disable batch allocation for callbacks.

2016-11-23 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit 6b165089a64251a15c323acb5d5761f8bcd93ea3
Author: Cedric Bail 
Date:   Wed Nov 23 18:49:43 2016 -0800

eo: make it possible to disable batch allocation for callbacks.
---
 src/lib/eo/eo_base_class.c | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index b6b486c..65f43dc 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -76,6 +76,8 @@ typedef struct
unsigned int current;
 } Eo_Current_Callback_Description;
 
+static int _eo_nostep_alloc = -1;
+
 static inline void
 _efl_object_extension_free(Efl_Object_Extension *ext)
 {
@@ -1006,6 +1008,8 @@ _eo_callback_remove(Efl_Object_Data *pd, 
Eo_Callback_Description **cb)
if (length > 1) memmove(cb, cb + 1, (length - 1) * sizeof 
(Eo_Callback_Description*));
pd->callbacks_count--;
 
+   if (_eo_nostep_alloc) pd->callbacks = realloc(pd->callbacks, 
pd->callbacks_count * sizeof (Eo_Callback_Description*));
+
if (pd->callbacks_count == 0)
  {
 free(pd->callbacks);
@@ -1099,11 +1103,15 @@ _eo_callbacks_sorted_insert(Efl_Object_Data *pd, 
Eo_Callback_Description *cb)
 
 
// Increase the callbacks storage by 16 entries at a time
-   if ((pd->callbacks_count & 0xF) == 0x0)
+   if (_eo_nostep_alloc == -1) _eo_nostep_alloc = !!getenv("EO_NOSTEP_ALLOC");
+
+   if (_eo_nostep_alloc || (pd->callbacks_count & 0xF) == 0x0)
  {
 Eo_Callback_Description **tmp;
 unsigned int new_len = (pd->callbacks_count | 0xF) + 1;
 
+if (_eo_nostep_alloc) new_len = pd->callbacks_count + 1;
+
 tmp = realloc(pd->callbacks, new_len * sizeof 
(Eo_Callback_Description*));
 if (!tmp) return ;
 pd->callbacks = tmp;

-- 




[EGIT] [core/efl] master 01/03: ecore: use mempool for legacy idler allocation.

2016-11-23 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit b5fedfad7e7f5b569388a43df5adc5d6cd197bce
Author: Cedric Bail 
Date:   Wed Nov 23 16:50:36 2016 -0800

ecore: use mempool for legacy idler allocation.
---
 src/lib/ecore/ecore_idler.c | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c
index 06f3965..66747dd 100644
--- a/src/lib/ecore/ecore_idler.c
+++ b/src/lib/ecore/ecore_idler.c
@@ -41,6 +41,8 @@ _ecore_factorized_idle_process(void *data, const Efl_Event 
*event EINA_UNUSED)
  _ecore_factorized_idle_del(idler);
 }
 
+static Eina_Mempool *idler_mp = NULL;
+
 void *
 _ecore_factorized_idle_del(Ecore_Idler *idler)
 {
@@ -58,7 +60,7 @@ _ecore_factorized_idle_del(Ecore_Idler *idler)
efl_event_callback_array_del(_mainloop_singleton, idler->desc, idler);
 
data = idler->data;
-   free(idler);
+   eina_mempool_free(idler_mp, idler);
return data;
 }
 
@@ -80,7 +82,13 @@ _ecore_factorized_idle_add(const Efl_Callback_Array_Item 
*desc,
 return NULL;
  }
 
-   ret = malloc(sizeof (Ecore_Idler));
+   if (!idler_mp)
+ {
+idler_mp = eina_mempool_add("chained_mempool", "Ecore_Idle*", NULL, 
sizeof (Ecore_Factorized_Idle), 23);
+if (!idler_mp) return NULL;
+ }
+
+   ret = eina_mempool_malloc(idler_mp, sizeof (Ecore_Factorized_Idle));
if (!ret) return NULL;
 
ret->func = func;

-- 




[EGIT] [core/efl] master 02/03: eo: when there is no more callbacks, let's clean up.

2016-11-23 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit f4527c72833f348fca875ef5ff70cf8aa6146f56
Author: Cedric Bail 
Date:   Wed Nov 23 17:54:50 2016 -0800

eo: when there is no more callbacks, let's clean up.
---
 src/lib/eo/eo_base_class.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 352cb8b..b6b486c 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -1005,6 +1005,12 @@ _eo_callback_remove(Efl_Object_Data *pd, 
Eo_Callback_Description **cb)
length = pd->callbacks_count - (cb - pd->callbacks);
if (length > 1) memmove(cb, cb + 1, (length - 1) * sizeof 
(Eo_Callback_Description*));
pd->callbacks_count--;
+
+   if (pd->callbacks_count == 0)
+ {
+free(pd->callbacks);
+pd->callbacks = NULL;
+ }
 }
 
 /* Actually remove, doesn't care about walking list, or delete_me */

-- 




[EGIT] [core/efl] master 01/03: efl_loop_fd: more efficiently manage the Ecore_Fd_Handler.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 906bf6abf0027c2e9d9f0566ee2af5db874c399c
Author: Gustavo Sverzut Barbieri 
Date:   Thu Nov 24 00:30:02 2016 -0200

efl_loop_fd: more efficiently manage the Ecore_Fd_Handler.

instead of always delete and recreate it, modify if it already exists
and only delete if it's not needed anymore.

This results in epoll_ctl() to modify an existing handle, instead of
add one.
---
 src/lib/ecore/efl_loop_fd.c | 26 +-
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/src/lib/ecore/efl_loop_fd.c b/src/lib/ecore/efl_loop_fd.c
index 7d3cd6a..87cb58c 100644
--- a/src/lib/ecore/efl_loop_fd.c
+++ b/src/lib/ecore/efl_loop_fd.c
@@ -50,15 +50,31 @@ _efl_loop_fd_reset(Eo *obj, Efl_Loop_Fd_Data *pd)
 {
int flags = 0;
 
-   if (pd->handler) ecore_main_fd_handler_del(pd->handler);
-   pd->handler = NULL;
-   if (pd->fd < 0) return ;
+   if (pd->fd < 0)
+ {
+if (pd->handler)
+  {
+ ecore_main_fd_handler_del(pd->handler);
+ pd->handler = NULL;
+  }
+return;
+ }
flags |= pd->references.read > 0 ? ECORE_FD_READ : 0;
flags |= pd->references.write > 0 ? ECORE_FD_WRITE : 0;
flags |= pd->references.error > 0 ? ECORE_FD_ERROR : 0;
-   if (flags == 0) return ;
+   if (flags == 0)
+ {
+if (pd->handler)
+  {
+ ecore_main_fd_handler_del(pd->handler);
+ pd->handler = NULL;
+  }
+return;
+ }
 
-   if (pd->file)
+   if (pd->handler)
+ ecore_main_fd_handler_active_set(pd->handler, flags);
+   else if (pd->file)
  pd->handler = ecore_main_fd_handler_file_add(pd->fd, flags, 
_efl_loop_fd_read_cb, obj, NULL, NULL);
else
  pd->handler = ecore_main_fd_handler_add(pd->fd, flags, 
_efl_loop_fd_read_cb, obj, NULL, NULL);

-- 




[EGIT] [core/efl] master 02/03: efl_net_server_fd: do not spin if clients can be accepted.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 92a3361debf36bfab97ba2023679c2e4b4cf2a8c
Author: Gustavo Sverzut Barbieri 
Date:   Thu Nov 24 00:31:19 2016 -0200

efl_net_server_fd: do not spin if clients can be accepted.

If we have incoming clients but we do not want to drop or handle then,
stop monitoring the fd's read, otherwise we constantly spin the main
loop.
---
 src/lib/ecore_con/efl_net_server_fd.c | 19 ---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore_con/efl_net_server_fd.c 
b/src/lib/ecore_con/efl_net_server_fd.c
index 7f0dfbb..b10a260 100644
--- a/src/lib/ecore_con/efl_net_server_fd.c
+++ b/src/lib/ecore_con/efl_net_server_fd.c
@@ -30,6 +30,7 @@ typedef struct _Efl_Net_Server_Fd_Data
unsigned int clients_count;
unsigned int clients_limit;
Eina_Bool clients_reject_excess;
+   Eina_Bool waiting_accept;
Eina_Bool serving;
Eina_Bool close_on_exec;
Eina_Bool reuse_address;
@@ -82,12 +83,12 @@ _efl_net_server_fd_event_error(void *data EINA_UNUSED, 
const Efl_Event *event)
 }
 
 EOLIAN static Efl_Object *
-_efl_net_server_fd_efl_object_finalize(Eo *o, Efl_Net_Server_Fd_Data *pd 
EINA_UNUSED)
+_efl_net_server_fd_efl_object_finalize(Eo *o, Efl_Net_Server_Fd_Data *pd)
 {
o = efl_finalize(efl_super(o, MY_CLASS));
if (!o) return NULL;
 
-   // TODO: only register "read" if "can_read" is being monitored?
+   pd->waiting_accept = EINA_TRUE;
efl_event_callback_add(o, EFL_LOOP_FD_EVENT_READ, 
_efl_net_server_fd_event_read, NULL);
efl_event_callback_add(o, EFL_LOOP_FD_EVENT_ERROR, 
_efl_net_server_fd_event_error, NULL);
return o;
@@ -164,6 +165,14 @@ EOLIAN static void
 _efl_net_server_fd_efl_net_server_clients_count_set(Eo *o EINA_UNUSED, 
Efl_Net_Server_Fd_Data *pd, unsigned int count)
 {
pd->clients_count = count;
+   if ((pd->clients_limit == 0) || (pd->clients_limit > count))
+ {
+if (!pd->waiting_accept)
+  {
+ pd->waiting_accept = EINA_TRUE;
+ efl_event_callback_add(o, EFL_LOOP_FD_EVENT_READ, 
_efl_net_server_fd_event_read, NULL);
+  }
+ }
 }
 
 EOLIAN static void
@@ -449,7 +458,11 @@ _efl_net_server_fd_process_incoming_data(Eo *o, 
Efl_Net_Server_Fd_Data *pd)
  {
 if (!pd->clients_reject_excess)
   {
- // TODO: disconnect 'read' so stops calling?
+ if (pd->waiting_accept)
+   {
+  pd->waiting_accept = EINA_FALSE;
+  efl_event_callback_del(o, EFL_LOOP_FD_EVENT_READ, 
_efl_net_server_fd_event_read, NULL);
+   }
  return;
   }
 do_reject = EINA_TRUE;

-- 




[EGIT] [core/efl] master 03/03: efl_net_socket_fd: do not spin on fd monitoring.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 35cdde67d2f07f2413fc093fd8c2d100b2daa0b0
Author: Gustavo Sverzut Barbieri 
Date:   Thu Nov 24 00:45:55 2016 -0200

efl_net_socket_fd: do not spin on fd monitoring.

If we let the user know he can read or write, stop monitoring
otherwise fd handler will constanly report of data to read/write until
its actually done, which would clear the kernel flag.

Since we use "can_read" and "can_write" for that, toggle the callback
connection that manages the actual Ecore_Fd_Handler monitor.
---
 src/lib/ecore_con/efl_net_socket_fd.c  | 48 ++
 src/lib/ecore_con/efl_net_socket_fd.eo |  2 ++
 2 files changed, 45 insertions(+), 5 deletions(-)

diff --git a/src/lib/ecore_con/efl_net_socket_fd.c 
b/src/lib/ecore_con/efl_net_socket_fd.c
index 9ce046f..c04f2c8 100644
--- a/src/lib/ecore_con/efl_net_socket_fd.c
+++ b/src/lib/ecore_con/efl_net_socket_fd.c
@@ -37,7 +37,7 @@ static void
 _efl_net_socket_fd_event_read(void *data EINA_UNUSED, const Efl_Event *event)
 {
if (efl_io_closer_closed_get(event->object))
- return; // TODO: unregister READ event
+ return;
efl_io_reader_can_read_set(event->object, EINA_TRUE);
 }
 
@@ -45,7 +45,7 @@ static void
 _efl_net_socket_fd_event_write(void *data EINA_UNUSED, const Efl_Event *event)
 {
if (efl_io_closer_closed_get(event->object))
- return; // TODO: unregister WRITE event
+ return;
efl_io_writer_can_write_set(event->object, EINA_TRUE);
 }
 
@@ -53,7 +53,7 @@ static void
 _efl_net_socket_fd_event_error(void *data EINA_UNUSED, const Efl_Event *event)
 {
if (efl_io_closer_closed_get(event->object))
- return; // TODO: unregister ERROR event
+ return;
efl_io_writer_can_write_set(event->object, EINA_FALSE);
efl_io_reader_can_read_set(event->object, EINA_FALSE);
efl_io_reader_eos_set(event->object, EINA_TRUE);
@@ -65,8 +65,6 @@ _efl_net_socket_fd_efl_object_finalize(Eo *o, 
Efl_Net_Socket_Fd_Data *pd EINA_UN
o = efl_finalize(efl_super(o, MY_CLASS));
if (!o) return NULL;
 
-   // TODO: only register "read" if "can_read" is being monitored?
-   // TODO: only register "write" if "can_write" is being monitored?
efl_event_callback_add(o, EFL_LOOP_FD_EVENT_WRITE, 
_efl_net_socket_fd_event_write, NULL);
efl_event_callback_add(o, EFL_LOOP_FD_EVENT_READ, 
_efl_net_socket_fd_event_read, NULL);
efl_event_callback_add(o, EFL_LOOP_FD_EVENT_ERROR, 
_efl_net_socket_fd_event_error, NULL);
@@ -220,6 +218,26 @@ _efl_net_socket_fd_efl_io_reader_read(Eo *o, 
Efl_Net_Socket_Fd_Data *pd EINA_UNU
return EINVAL;
 }
 
+EOLIAN static void
+_efl_net_socket_fd_efl_io_reader_can_read_set(Eo *o, Efl_Net_Socket_Fd_Data 
*pd EINA_UNUSED, Eina_Bool value)
+{
+   Eina_Bool old = efl_io_reader_can_read_get(o);
+   if (old == value) return;
+
+   efl_io_reader_can_read_set(efl_super(o, MY_CLASS), value);
+
+   if (value)
+ {
+/* stop monitoring the FD, we need to wait the user to read and clear 
the kernel flag */
+efl_event_callback_del(o, EFL_LOOP_FD_EVENT_READ, 
_efl_net_socket_fd_event_read, NULL);
+ }
+   else
+ {
+/* kernel flag is clear, resume monitoring the FD */
+efl_event_callback_del(o, EFL_LOOP_FD_EVENT_READ, 
_efl_net_socket_fd_event_read, NULL);
+ }
+}
+
 EOLIAN static Eina_Error
 _efl_net_socket_fd_efl_io_writer_write(Eo *o, Efl_Net_Socket_Fd_Data *pd 
EINA_UNUSED, Eina_Slice *ro_slice, Eina_Slice *remaining)
 {
@@ -265,6 +283,26 @@ _efl_net_socket_fd_efl_io_writer_write(Eo *o, 
Efl_Net_Socket_Fd_Data *pd EINA_UN
 }
 
 EOLIAN static void
+_efl_net_socket_fd_efl_io_writer_can_write_set(Eo *o, Efl_Net_Socket_Fd_Data 
*pd EINA_UNUSED, Eina_Bool value)
+{
+   Eina_Bool old = efl_io_writer_can_write_get(o);
+   if (old == value) return;
+
+   efl_io_writer_can_write_set(efl_super(o, MY_CLASS), value);
+
+   if (value)
+ {
+/* stop monitoring the FD, we need to wait the user to write and clear 
the kernel flag */
+efl_event_callback_del(o, EFL_LOOP_FD_EVENT_WRITE, 
_efl_net_socket_fd_event_write, NULL);
+ }
+   else
+ {
+/* kernel flag is clear, resume monitoring the FD */
+efl_event_callback_del(o, EFL_LOOP_FD_EVENT_WRITE, 
_efl_net_socket_fd_event_write, NULL);
+ }
+}
+
+EOLIAN static void
 _efl_net_socket_fd_efl_net_socket_address_local_set(Eo *o EINA_UNUSED, 
Efl_Net_Socket_Fd_Data *pd, const char *address)
 {
eina_stringshare_replace(>address_local, address);
diff --git a/src/lib/ecore_con/efl_net_socket_fd.eo 
b/src/lib/ecore_con/efl_net_socket_fd.eo
index 8df4c75..b5973f9 100644
--- a/src/lib/ecore_con/efl_net_socket_fd.eo
+++ b/src/lib/ecore_con/efl_net_socket_fd.eo
@@ -37,7 +37,9 @@ class Efl.Net.Socket.Fd (Efl.Loop.Fd, Efl.Io.Reader.Fd, 
Efl.Io.Writer.Fd, Efl.Io
 Efl.Io.Closer.close;
 

Re: [E-devel] EFL packaging on Debian

2016-11-23 Thread Simon Lees


On 11/12/2016 12:04 AM, Ross Vandegrift wrote:
> On Thu, Nov 10, 2016 at 11:06:04AM +0100, Stefan Schmidt wrote:
>> I did my monthly packaging update again and was hoping this moved to 
>> unstable by now. It is still in experimental only as far as I can see. 
>> Is there an automatic way this packages get from experimental to 
>> unstable, testing stable? Or are you supposed to pursue Albin again to 
>> get it uploaded to unstable?
> 
> A few items on the current status:
> 
> 1) All uploads will go through Albin (or some other sponsor).
> 
> While reviewing, Albin had some questions on the internal EFL deps and
> shared symbol versioning.  The packaging produces unusually strict (for
> Debian) dependencies.  We're working through it.
> 
> 2) experimental -> unstable is a manual migration.  Once in unstable,
> packages automatically migrate to testing, and then to the next stable
> release.  Packages are not normally added to existing stable releases.
> 
> We uploaded to experimental for additional testing opportunity, since
> Debian contains packages which depend on EFL.  When we're happy with the
> status, they'll be uploaded to unstable.
> 
> 3) The packages in experimental break binary compatability with the
> existing unstable packages.  For instance, you can't use the
> experimental packages break the terminology packages in unstable.
> 
> (Why?  The packages in unstable preserve a bit of pre-1.0 eina ABI that
> was released into Debian many years ago.  That requires disabling magic
> debug, and in EFL 1.17 tests break with this config.  We decided the
> eina tests are more valuable than the ancient ABI.)
> 
> So it's going to take some time - sorry.
> 
> Ross
> 

I don't know much of how debian builds work, but if you have some build
files somewhere that I can copy, I can probably get debian builds
working on open build service, so that when we do new efl /
enlightenment builds I can check they atleast compile there. If someone
has similar for arch I might be able to set that up as well, I don't
have time to learn the other build formats in detail but if someone has
something thats there and working I can probably integrate it in.

Cheers

-- 

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

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



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


[EGIT] [core/efl] master 01/01: efl_loop_fd: reduce number of _efl_loop_fd_reset()

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 0a8fd379dbd0c222beffa785bdfb5b1f2509f368
Author: Gustavo Sverzut Barbieri 
Date:   Thu Nov 24 00:21:54 2016 -0200

efl_loop_fd: reduce number of _efl_loop_fd_reset()

When we're adding callbacks in an array, we may reduce 3 epoll_ctl()
to a single one.
---
 src/lib/ecore/efl_loop_fd.c | 20 ++--
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/lib/ecore/efl_loop_fd.c b/src/lib/ecore/efl_loop_fd.c
index 594eea4..7d3cd6a 100644
--- a/src/lib/ecore/efl_loop_fd.c
+++ b/src/lib/ecore/efl_loop_fd.c
@@ -97,6 +97,7 @@ _check_fd_event_catcher_add(void *data, const Efl_Event 
*event)
 {
const Efl_Callback_Array_Item *array = event->info;
Efl_Loop_Fd_Data *fd = data;
+   Eina_Bool need_reset = EINA_FALSE;
int i;
 
for (i = 0; array[i].desc != NULL; i++)
@@ -104,19 +105,22 @@ _check_fd_event_catcher_add(void *data, const Efl_Event 
*event)
 if (array[i].desc == EFL_LOOP_FD_EVENT_READ)
   {
  if (fd->references.read++ > 0) continue;
- _efl_loop_fd_reset(event->object, fd);
+ need_reset = EINA_TRUE;
   }
 else if (array[i].desc == EFL_LOOP_FD_EVENT_WRITE)
   {
  if (fd->references.write++ > 0) continue;
- _efl_loop_fd_reset(event->object, fd);
+ need_reset = EINA_TRUE;
   }
 if (array[i].desc == EFL_LOOP_FD_EVENT_ERROR)
   {
  if (fd->references.error++ > 0) continue;
- _efl_loop_fd_reset(event->object, fd);
+ need_reset = EINA_TRUE;
   }
  }
+
+   if (need_reset)
+ _efl_loop_fd_reset(event->object, fd);
 }
 
 static void
@@ -124,6 +128,7 @@ _check_fd_event_catcher_del(void *data, const Efl_Event 
*event)
 {
const Efl_Callback_Array_Item *array = event->info;
Efl_Loop_Fd_Data *fd = data;
+   Eina_Bool need_reset = EINA_FALSE;
int i;
 
for (i = 0; array[i].desc != NULL; i++)
@@ -131,19 +136,22 @@ _check_fd_event_catcher_del(void *data, const Efl_Event 
*event)
 if (array[i].desc == EFL_LOOP_FD_EVENT_READ)
   {
  if (fd->references.read-- > 1) continue;
- _efl_loop_fd_reset(event->object, fd);
+ need_reset = EINA_TRUE;
   }
 else if (array[i].desc == EFL_LOOP_FD_EVENT_WRITE)
   {
  if (fd->references.write-- > 1) continue;
- _efl_loop_fd_reset(event->object, fd);
+ need_reset = EINA_TRUE;
   }
 if (array[i].desc == EFL_LOOP_FD_EVENT_ERROR)
   {
  if (fd->references.error-- > 1) continue;
- _efl_loop_fd_reset(event->object, fd);
+ need_reset = EINA_TRUE;
   }
  }
+
+   if (need_reset)
+ _efl_loop_fd_reset(event->object, fd);
 }
 
 EFL_CALLBACKS_ARRAY_DEFINE(fd_watch,

-- 




[EGIT] [core/efl] master 01/01: efl_loop_fd: fix comparison that was breaking callback deletion.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit f1b94bdf7b40911a5d00894b8b79494bda5d808b
Author: Gustavo Sverzut Barbieri 
Date:   Thu Nov 24 00:17:59 2016 -0200

efl_loop_fd: fix comparison that was breaking callback deletion.

Either we "--var" or we compare with "> 1" instead of "> 0", otherwise
callback_del will keep the flags set.
---
 src/lib/ecore/efl_loop_fd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore/efl_loop_fd.c b/src/lib/ecore/efl_loop_fd.c
index d1406e7..594eea4 100644
--- a/src/lib/ecore/efl_loop_fd.c
+++ b/src/lib/ecore/efl_loop_fd.c
@@ -130,17 +130,17 @@ _check_fd_event_catcher_del(void *data, const Efl_Event 
*event)
  {
 if (array[i].desc == EFL_LOOP_FD_EVENT_READ)
   {
- if (fd->references.read-- > 0) continue;
+ if (fd->references.read-- > 1) continue;
  _efl_loop_fd_reset(event->object, fd);
   }
 else if (array[i].desc == EFL_LOOP_FD_EVENT_WRITE)
   {
- if (fd->references.write-- > 0) continue;
+ if (fd->references.write-- > 1) continue;
  _efl_loop_fd_reset(event->object, fd);
   }
 if (array[i].desc == EFL_LOOP_FD_EVENT_ERROR)
   {
- if (fd->references.error-- > 0) continue;
+ if (fd->references.error-- > 1) continue;
  _efl_loop_fd_reset(event->object, fd);
   }
  }

-- 




[EGIT] [core/efl] master 01/01: ecore_ipc: isolate legacy within ifdefs.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 9805f4ec36cf329159a974737d7f37c6204ee671
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 22:35:48 2016 -0200

ecore_ipc: isolate legacy within ifdefs.

Compile out the legacy code when running on platforms that support
Efl.Net.Dialer.Unix and Efl.Net.Server.Unix.
---
 src/lib/ecore_ipc/ecore_ipc.c | 78 ++-
 src/lib/ecore_ipc/ecore_ipc_private.h |  7 
 2 files changed, 75 insertions(+), 10 deletions(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 15f8edd..e227251 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -199,12 +199,16 @@ _ecore_ipc_ddlt_int(int in, int prev, int mode)
return 0;
 }
 
+/* EFL_NET_SERVER_UNIX_CLASS and EFL_NET_DIALER_UNIX_CLASS should be defined 
at the same time, we're only checking for EFL_NET_SERVER_UNIX_CLASS in shared 
blocks */
+#ifndef EFL_NET_SERVER_UNIX_CLASS
 static Eina_Bool _ecore_ipc_event_client_add(void *data, int ev_type, void 
*ev);
 static Eina_Bool _ecore_ipc_event_client_del(void *data, int ev_type, void 
*ev);
 static Eina_Bool _ecore_ipc_event_server_add(void *data, int ev_type, void 
*ev);
 static Eina_Bool _ecore_ipc_event_server_del(void *data, int ev_type, void 
*ev);
 static Eina_Bool _ecore_ipc_event_client_data(void *data, int ev_type, void 
*ev);
 static Eina_Bool _ecore_ipc_event_server_data(void *data, int ev_type, void 
*ev);
+#endif
+
 static void _ecore_ipc_event_client_add_free(void *data, void *ev);
 static void _ecore_ipc_event_client_del_free(void *data, void *ev);
 static void _ecore_ipc_event_client_data_free(void *data, void *ev);
@@ -221,7 +225,10 @@ EAPI int ECORE_IPC_EVENT_SERVER_DATA = 0;
 
 static int  _ecore_ipc_init_count = 0;
 static Eina_List   *servers = NULL;
+
+#ifndef EFL_NET_SERVER_UNIX_CLASS
 static Ecore_Event_Handler *handler[6];
+#endif
 
 static void
 ecore_ipc_post_event_server_add(Ecore_Ipc_Server *svr)
@@ -306,7 +313,9 @@ ecore_ipc_client_add(Ecore_Ipc_Server *svr)
 EAPI int
 ecore_ipc_init(void)
 {
+#ifndef EFL_NET_SERVER_UNIX_CLASS
int i = 0;
+#endif
 
if (++_ecore_ipc_init_count != 1)
  return _ecore_ipc_init_count;
@@ -327,6 +336,7 @@ ecore_ipc_init(void)
ECORE_IPC_EVENT_CLIENT_DATA = ecore_event_type_new();
ECORE_IPC_EVENT_SERVER_DATA = ecore_event_type_new();
 
+#ifndef EFL_NET_SERVER_UNIX_CLASS
handler[i++] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_ADD,
   _ecore_ipc_event_client_add, NULL);
handler[i++] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DEL,
@@ -339,13 +349,16 @@ ecore_ipc_init(void)
   _ecore_ipc_event_client_data, NULL);
handler[i] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA,
   _ecore_ipc_event_server_data, NULL);
+#endif
return _ecore_ipc_init_count;
 }
 
 EAPI int
 ecore_ipc_shutdown(void)
 {
+#ifndef EFL_NET_SERVER_UNIX_CLASS
int i;
+#endif
 
if (--_ecore_ipc_init_count != 0)
  return _ecore_ipc_init_count;
@@ -355,8 +368,10 @@ ecore_ipc_shutdown(void)
EINA_LIST_FOREACH_SAFE(servers, l, l2, svr)
  ecore_ipc_server_del(svr);
 
+#ifndef EFL_NET_SERVER_UNIX_CLASS
for (i = 0; i < 6; i++)
  ecore_event_handler_del(handler[i]);
+#endif
 
ecore_con_shutdown();
eina_log_domain_unregister(_ecore_ipc_log_dom);
@@ -384,7 +399,7 @@ EFL_CALLBACKS_ARRAY_DEFINE(_ecore_ipc_server_cbs,
 
 #ifndef EFL_NET_SERVER_UNIX_CLASS
 static Ecore_Ipc_Server *
-ecore_ipc_server_add_legacy(Ecore_Ipc_Type compl_type, char *name, int port, 
const void *data)
+ecore_ipc_server_add_legacy(Ecore_Ipc_Type compl_type, const char *name, int 
port, const void *data)
 {
Ecore_Ipc_Server *svr;
Ecore_Ipc_Type type;
@@ -915,7 +930,9 @@ ecore_ipc_server_del(Ecore_Ipc_Server *svr)
 
 if (svr->dialer.dialer) _ecore_ipc_dialer_del(svr);
 if (svr->server) _ecore_ipc_server_del(svr);
+#ifndef EFL_NET_SERVER_UNIX_CLASS
 if (svr->legacy_server) ecore_con_server_del(svr->legacy_server);
+#endif
 servers = eina_list_remove(servers, svr);
 
 if (svr->buf) free(svr->buf);
@@ -952,9 +969,13 @@ ecore_ipc_server_connected_get(Ecore_Ipc_Server *svr)
if (svr->dialer.dialer)
  return efl_net_dialer_connected_get(svr->dialer.dialer);
else if (svr->server) return EINA_TRUE;
+#ifndef EFL_NET_SERVER_UNIX_CLASS
else if (!svr->legacy_server) return EINA_FALSE;
 
return ecore_con_server_connected_get(svr->legacy_server);
+#else
+   return EINA_FALSE;
+#endif
 }
 
 EAPI Eina_List *
@@ -1006,7 +1027,6 @@ EAPI int
 ecore_ipc_server_send(Ecore_Ipc_Server *svr, int major, int minor, int ref, 
int ref_to, int response, const void *data, int size)
 {

[EGIT] [core/efl] master 01/01: ecore_ipc: fix user after free in error handling.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 400f3932d9a5adb3bc6c360368793a855d5228d8
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 22:15:25 2016 -0200

ecore_ipc: fix user after free in error handling.

Fixes Coverity 1366274.
---
 src/lib/ecore_ipc/ecore_ipc.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 82d5819..15f8edd 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -509,10 +509,7 @@ ecore_ipc_server_add(Ecore_Ipc_Type type, const char 
*name, int port, const void
 EINA_SAFETY_ON_NULL_GOTO(address, error_server);
 
 if (!_ecore_ipc_local_mkpath(address, S_IRUSR | S_IWUSR | S_IXUSR))
-  {
- free(address);
- goto error_server;
-  }
+  goto error_server;
 
 new_mask = S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH;
 

-- 




[EGIT] [core/efl] master 05/05: ecore_ipc: convert ecore_ipc_server_add() to Efl_Net_Server.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 6f3220ffc6140594792c596ebb452149e19be00f
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 19:45:33 2016 -0200

ecore_ipc: convert ecore_ipc_server_add() to Efl_Net_Server.

Each client (Ecore_Ipc_Client) is very similar to the handle
configured by ecore_ipc_server_connect() (the dialer), except we do
not have events such as "connected" and "error", as well as we don't
delete the socket as it's owned by the server, instead we close it.

The UNIX socket is configured similarly to ecore_con, setting the same
masks and mode for directories.
---
 src/lib/ecore_ipc/ecore_ipc.c | 446 +-
 src/lib/ecore_ipc/ecore_ipc_private.h |  10 +
 2 files changed, 450 insertions(+), 6 deletions(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 8a38815..82d5819 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -295,6 +295,8 @@ ecore_ipc_client_add(Ecore_Ipc_Server *svr)
cl = calloc(1, sizeof(Ecore_Ipc_Client));
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
cl->svr = svr;
+   cl->max_buf_size = 32 * 1024;
+
ECORE_MAGIC_SET(cl, ECORE_MAGIC_IPC_CLIENT);
svr->clients = eina_list_append(svr->clients, cl);
 
@@ -362,9 +364,27 @@ ecore_ipc_shutdown(void)
return _ecore_ipc_init_count;
 }
 
-/* FIXME: need to add protocol type parameter */
-EAPI Ecore_Ipc_Server *
-ecore_ipc_server_add(Ecore_Ipc_Type compl_type, const char *name, int port, 
const void *data)
+static void
+_ecore_ipc_server_del(Ecore_Ipc_Server *svr)
+{
+   DBG("server %p del", svr);
+
+   if (svr->server)
+ {
+efl_del(svr->server);
+svr->server = NULL;
+ }
+}
+
+static void _ecore_ipc_server_client_add(void *data, const Efl_Event *event);
+
+EFL_CALLBACKS_ARRAY_DEFINE(_ecore_ipc_server_cbs,
+   { EFL_NET_SERVER_EVENT_CLIENT_ADD, 
_ecore_ipc_server_client_add });
+
+
+#ifndef EFL_NET_SERVER_UNIX_CLASS
+static Ecore_Ipc_Server *
+ecore_ipc_server_add_legacy(Ecore_Ipc_Type compl_type, char *name, int port, 
const void *data)
 {
Ecore_Ipc_Server *svr;
Ecore_Ipc_Type type;
@@ -403,6 +423,190 @@ ecore_ipc_server_add(Ecore_Ipc_Type compl_type, const 
char *name, int port, cons
ECORE_MAGIC_SET(svr, ECORE_MAGIC_IPC_SERVER);
return svr;
 }
+#else
+static Eina_Bool
+_ecore_ipc_local_mkpath(const char *path, mode_t mode)
+{
+   Eina_Bool ret = EINA_FALSE;
+   char *s, *d, *itr;
+
+   if (!path) return EINA_FALSE;
+   EINA_SAFETY_ON_TRUE_RETURN_VAL(path[0] != '/', EINA_FALSE);
+
+   s = strdup(path);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(s, EINA_FALSE);
+   d = dirname(s);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(d, EINA_FALSE);
+
+   for (itr = d + 1; *itr != '\0'; itr++)
+ {
+if (*itr == '/')
+  {
+ *itr = '\0';
+ if (mkdir(d, mode) != 0)
+   {
+  if (errno != EEXIST)
+{
+   ERR("could not create parent directory '%s' of path 
'%s': %s", d, path, strerror(errno));
+   goto end;
+}
+   }
+ *itr = '/';
+  }
+ }
+
+   if (mkdir(d, mode) != 0)
+ {
+if (errno != EEXIST)
+  ERR("could not create parent directory '%s' of path '%s': %s", d, 
path, strerror(errno));
+else
+  {
+ struct stat st;
+ if ((stat(d, ) != 0) || (!S_ISDIR(st.st_mode)))
+   ERR("could not create parent directory '%s' of path '%s': 
exists but is not a directory", d, path);
+ else ret = EINA_TRUE;
+  }
+ }
+   else ret = EINA_TRUE;
+
+ end:
+   free(s);
+   return ret;
+}
+#endif
+
+/* FIXME: need to add protocol type parameter */
+EAPI Ecore_Ipc_Server *
+ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const 
void *data)
+{
+   Ecore_Ipc_Server *svr;
+   Eo *loop = ecore_main_loop_get();
+   char *address = NULL;
+   Eina_Error err;
+#ifdef EFL_NET_SERVER_UNIX_CLASS
+   mode_t old_mask, new_mask = 0;
+#endif
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
+
+#ifndef EFL_NET_SERVER_UNIX_CLASS
+   if (((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_USER) ||
+   ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM))
+ {
+DBG("no 'local' Efl.Net.Server for your system  yet, use legacy 
Ecore_Con");
+return ecore_ipc_server_add_legacy(type, name, port, data);
+ }
+#endif
+
+   svr = calloc(1, sizeof(Ecore_Ipc_Server));
+   EINA_SAFETY_ON_NULL_RETURN_VAL(svr, NULL);
+
+   if (0) { }
+#ifdef EFL_NET_SERVER_UNIX_CLASS
+   if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_USER)
+ {
+address = ecore_con_local_path_new(EINA_FALSE, name, port);
+EINA_SAFETY_ON_NULL_GOTO(address, error_server);
+
+ 

[EGIT] [core/efl] master 02/05: ecore_ipc: dialers should use max_buf_size = -1.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 768e6498b17f28546bf88abd173bb26bb104bd74
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 17:38:18 2016 -0200

ecore_ipc: dialers should use max_buf_size = -1.

nothing appears to break, but let's use the same value as legacy.
---
 src/lib/ecore_ipc/ecore_ipc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 0d073b2..2ea730e 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -667,6 +667,7 @@ ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, 
int port, const void *
efl_class_name_get(efl_class_get(svr->dialer.dialer)),
address);
 
+   svr->max_buf_size = -1;
svr->data = (void *)data;
servers = eina_list_append(servers, svr);
ECORE_MAGIC_SET(svr, ECORE_MAGIC_IPC_SERVER);

-- 




[EGIT] [core/efl] master 01/05: ecore_ipc: rename 'server' to 'legacy_server'.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 3131a966c9eb8b7e4137782d10446ccac8ae7d9a
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 17:09:18 2016 -0200

ecore_ipc: rename 'server' to 'legacy_server'.

Since the plan is to introduce a server based on efl_net_server, first
rename the existing handle with 'legacy_' prefix.
---
 src/lib/ecore_ipc/ecore_ipc.c | 40 +--
 src/lib/ecore_ipc/ecore_ipc_private.h |  2 +-
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index c0f9f5f..0d073b2 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -380,19 +380,19 @@ ecore_ipc_server_add(Ecore_Ipc_Type compl_type, const 
char *name, int port, cons
switch (type)
  {
   case ECORE_IPC_LOCAL_USER:
-svr->server = ecore_con_server_add(ECORE_CON_LOCAL_USER | extra, name, 
port, svr);
+svr->legacy_server = ecore_con_server_add(ECORE_CON_LOCAL_USER | 
extra, name, port, svr);
 break;
   case ECORE_IPC_LOCAL_SYSTEM:
-svr->server = ecore_con_server_add(ECORE_CON_LOCAL_SYSTEM | extra, 
name, port, svr);
+svr->legacy_server = ecore_con_server_add(ECORE_CON_LOCAL_SYSTEM | 
extra, name, port, svr);
 break;
   case ECORE_IPC_REMOTE_SYSTEM:
-svr->server = ecore_con_server_add(ECORE_CON_REMOTE_SYSTEM | extra, 
name, port, svr);
+svr->legacy_server = ecore_con_server_add(ECORE_CON_REMOTE_SYSTEM | 
extra, name, port, svr);
 break;
   default:
 free(svr);
 return NULL;
  }
-   if (!svr->server)
+   if (!svr->legacy_server)
  {
 free(svr);
 return NULL;
@@ -533,19 +533,19 @@ ecore_ipc_server_connect_legacy(Ecore_Ipc_Type 
compl_type, char *name, int port,
switch (type)
  {
   case ECORE_IPC_LOCAL_USER:
-svr->server = ecore_con_server_connect(ECORE_CON_LOCAL_USER | extra, 
name, port, svr);
+svr->legacy_server = ecore_con_server_connect(ECORE_CON_LOCAL_USER | 
extra, name, port, svr);
 break;
   case ECORE_IPC_LOCAL_SYSTEM:
-svr->server = ecore_con_server_connect(ECORE_CON_LOCAL_SYSTEM | extra, 
name, port, svr);
+svr->legacy_server = ecore_con_server_connect(ECORE_CON_LOCAL_SYSTEM | 
extra, name, port, svr);
 break;
   case ECORE_IPC_REMOTE_SYSTEM:
-svr->server = ecore_con_server_connect(ECORE_CON_REMOTE_SYSTEM | 
extra, name, port, svr);
+svr->legacy_server = ecore_con_server_connect(ECORE_CON_REMOTE_SYSTEM 
| extra, name, port, svr);
 break;
   default:
 free(svr);
 return NULL;
  }
-   if (!svr->server)
+   if (!svr->legacy_server)
  {
 free(svr);
 return NULL;
@@ -711,7 +711,7 @@ ecore_ipc_server_del(Ecore_Ipc_Server *svr)
   }
 
 if (svr->dialer.dialer) _ecore_ipc_dialer_del(svr);
-if (svr->server) ecore_con_server_del(svr->server);
+if (svr->legacy_server) ecore_con_server_del(svr->legacy_server);
 servers = eina_list_remove(servers, svr);
 
 if (svr->buf) free(svr->buf);
@@ -747,9 +747,9 @@ ecore_ipc_server_connected_get(Ecore_Ipc_Server *svr)
 
if (svr->dialer.dialer)
  return efl_net_dialer_connected_get(svr->dialer.dialer);
-   else if (!svr->server) return EINA_FALSE;
+   else if (!svr->legacy_server) return EINA_FALSE;
 
-   return ecore_con_server_connected_get(svr->server);
+   return ecore_con_server_connected_get(svr->legacy_server);
 }
 
 EAPI Eina_List *
@@ -874,10 +874,10 @@ ecore_ipc_server_send(Ecore_Ipc_Server *svr, int major, 
int minor, int ref, int
 
 return s + size;
  }
-   else if (!svr->server) return 0;
+   else if (!svr->legacy_server) return 0;
 
-   ret = ecore_con_server_send(svr->server, dat, s);
-   if (size > 0) ret += ecore_con_server_send(svr->server, data, size);
+   ret = ecore_con_server_send(svr->legacy_server, dat, s);
+   if (size > 0) ret += ecore_con_server_send(svr->legacy_server, data, size);
return ret;
 }
 
@@ -890,7 +890,7 @@ ecore_ipc_server_client_limit_set(Ecore_Ipc_Server *svr, 
int client_limit, char
  "ecore_ipc_server_client_limit_set");
 return;
  }
-   ecore_con_server_client_limit_set(svr->server, client_limit, 
reject_excess_clients);
+   ecore_con_server_client_limit_set(svr->legacy_server, client_limit, 
reject_excess_clients);
 }
 
 EAPI void
@@ -935,9 +935,9 @@ ecore_ipc_server_ip_get(Ecore_Ipc_Server *svr)
 /* original IPC just returned IP for remote connections */
 return NULL;
  }
-   else if (!svr->server) return NULL;
+   else if (!svr->legacy_server) return NULL;
 
-   return ecore_con_server_ip_get(svr->server);
+   return ecore_con_server_ip_get(svr->legacy_server);
 }
 
 EAPI void
@@ 

[EGIT] [core/efl] master 03/05: ecore_ipc: free(address) on dialer error.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit fc76abccd6fa694d5fbdc4fc85b65c9004e12271
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 18:22:21 2016 -0200

ecore_ipc: free(address) on dialer error.
---
 src/lib/ecore_ipc/ecore_ipc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 2ea730e..8a38815 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -681,6 +681,7 @@ ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, 
int port, const void *
return NULL; /* dialer will trigger all cleanup on its own callbacks */
 
  error_dialer:
+   free(address);
free(svr);
return NULL;
 }

-- 




[EGIT] [core/efl] master 04/05: efl_net_server_unix: do bind() from serve() method.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit d0b6aa6596884fc4db5287bd8e3c2cee9db1f031
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 18:38:24 2016 -0200

efl_net_server_unix: do bind() from serve() method.

Instead of adding a job to create the socket and call bind(), do it
straight from the serve() method, this allows the caller to set
umask(), permissions and so on.

Document this behavior in the class, since we can't extend the
method's documentation.
---
 src/lib/ecore_con/efl_net_server_unix.c  | 23 ---
 src/lib/ecore_con/efl_net_server_unix.eo |  6 ++
 2 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/src/lib/ecore_con/efl_net_server_unix.c 
b/src/lib/ecore_con/efl_net_server_unix.c
index 7e90bb8..288c530 100644
--- a/src/lib/ecore_con/efl_net_server_unix.c
+++ b/src/lib/ecore_con/efl_net_server_unix.c
@@ -24,7 +24,6 @@
 
 typedef struct _Efl_Net_Server_Unix_Data
 {
-   Efl_Future *bind_job;
Eina_Bool unlink_before_bind;
 } Efl_Net_Server_Unix_Data;
 
@@ -43,11 +42,9 @@ _efl_net_server_unix_efl_object_destructor(Eo *o, 
Efl_Net_Server_Unix_Data *pd E
efl_destructor(efl_super(o, MY_CLASS));
 }
 
-static void
-_efl_net_server_unix_bind_job(void *data, const Efl_Event *event EINA_UNUSED)
+static Eina_Error
+_efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd)
 {
-   Eo *o = data;
-   Efl_Net_Server_Unix_Data *pd = efl_data_scope_get(o, MY_CLASS);
const char *address = efl_net_server_address_get(o);
struct sockaddr_un addr = { .sun_family = AF_UNIX };
socklen_t addrlen;
@@ -55,10 +52,6 @@ _efl_net_server_unix_bind_job(void *data, const Efl_Event 
*event EINA_UNUSED)
Eina_Error err = 0;
int r;
 
-   pd->bind_job = NULL;
-
-   efl_ref(o); /* we're emitting callbacks then continuing the workflow */
-
efl_net_server_fd_family_set(o, AF_UNIX);
 
do
@@ -158,8 +151,7 @@ _efl_net_server_unix_bind_job(void *data, const Efl_Event 
*event EINA_UNUSED)
 if (fd != INVALID_SOCKET) closesocket(fd);
 efl_loop_fd_set(o, SOCKET_TO_LOOP_FD(INVALID_SOCKET));
  }
-
-   efl_unref(o);
+   return err;
 }
 
 EOLIAN static Eina_Error
@@ -228,14 +220,7 @@ _efl_net_server_unix_efl_net_server_serve(Eo *o, 
Efl_Net_Server_Unix_Data *pd, c
 
efl_net_server_address_set(o, address);
 
-   if (pd->bind_job)
- efl_future_cancel(pd->bind_job);
-
-   efl_future_use(>bind_job, efl_loop_job(efl_loop_get(o), o));
-   efl_future_then(pd->bind_job, _efl_net_server_unix_bind_job, NULL, NULL, o);
-   efl_future_link(o, pd->bind_job);
-
-   return 0;
+   return _efl_net_server_unix_bind(o, pd);
 }
 
 static Efl_Callback_Array_Item *_efl_net_server_unix_client_cbs(void);
diff --git a/src/lib/ecore_con/efl_net_server_unix.eo 
b/src/lib/ecore_con/efl_net_server_unix.eo
index 5e87ba5..accd0792 100644
--- a/src/lib/ecore_con/efl_net_server_unix.eo
+++ b/src/lib/ecore_con/efl_net_server_unix.eo
@@ -1,6 +1,12 @@
 class Efl.Net.Server.Unix (Efl.Net.Server.Fd) {
 [[An AF_UNIX server.
 
+  The @Efl.Net.Server.serve method will call bind(2) directly,
+  thus path will be accessed and created in that method. If the
+  created socket must be subject to some special mode or user,
+  change before executing that method, for example calling
+  umask(2).
+
   @since 1.19
 ]]
 

-- 




Re: [E-devel] EGIT emails down?

2016-11-23 Thread Bertrand Jacquin
Hi all,

The emails are back online, we had an issue on the mail relay host. 
Spool directoy has been moved to avoid this to happen again in the 
future.

Cheers,
Betrand

On 23/11/2016 02:30, Michael Blumenkrantz wrote:
> On Wed, 23 Nov 2016 00:03:27 -0200
> Gustavo Sverzut Barbieri  wrote:
> 
>> Hi all,
>> 
>> I'm not receiving any commit emails from EGIT, what's happening?
>> 
> 
> Also nothing from phab since Friday...
> 
> --
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

-- 
Bertrand

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


[EGIT] [core/efl] master 01/01: ecore_file_download: callback completion_cb with status=1.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 4b771d3e1b3fd17ebab6c410b38ef451248a422a
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 16:23:58 2016 -0200

ecore_file_download: callback completion_cb with status=1.

When download is aborted we must call completion_cb using status == 1,
this was checked in the test suite.
---
 src/lib/ecore_file/ecore_file_download.c | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_file/ecore_file_download.c 
b/src/lib/ecore_file/ecore_file_download.c
index 406d6ca..bcb8393 100644
--- a/src/lib/ecore_file/ecore_file_download.c
+++ b/src/lib/ecore_file/ecore_file_download.c
@@ -77,6 +77,7 @@ _ecore_file_download_copier_done(void *data, const Efl_Event 
*event EINA_UNUSED)
  {
 Ecore_File_Download_Completion_Cb cb = job->completion_cb;
 job->completion_cb = NULL;
+ECORE_MAGIC_SET(job, ECORE_MAGIC_NONE);
 cb((void *)job->data, file, status);
  }
 
@@ -298,6 +299,8 @@ ecore_file_download_protocol_available(const char *protocol)
 EAPI void
 ecore_file_download_abort(Ecore_File_Download_Job *job)
 {
+   const char *file;
+
if (!job)
  return;
if (!ECORE_MAGIC_CHECK(job, ECORE_MAGIC_FILE_DOWNLOAD_JOB))
@@ -306,8 +309,19 @@ ecore_file_download_abort(Ecore_File_Download_Job *job)
 return;
  }
 
-   /* don't call it from _ecore_file_download_copier_done() */
-   if (job->completion_cb) job->completion_cb = NULL;
+   efl_file_get(job->output, , NULL);
+   DBG("Aborting download %s -> %s",
+   efl_net_dialer_address_dial_get(job->input),
+   file);
+
+   /* abort should have status = 1 */
+   if (job->completion_cb)
+ {
+Ecore_File_Download_Completion_Cb cb = job->completion_cb;
+job->completion_cb = NULL;
+ECORE_MAGIC_SET(job, ECORE_MAGIC_NONE);
+cb((void *)job->data, file, 1);
+ }
 
/* efl_io_closer_close()
 *  -> _ecore_file_download_copier_done()

-- 




[EGIT] [core/enlightenment] master 01/01: Cpufreq: Don't check for NULL then depend on the value not being NULL. Fixes CID 1365406

2016-11-23 Thread Stephen okra Houston
okra pushed a commit to branch master.

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

commit 975366ba7b15d1b922875168c58932ab2266b1d7
Author: Stephen okra Houston 
Date:   Wed Nov 23 09:59:29 2016 -0600

Cpufreq: Don't check for NULL then depend on the value not being NULL. 
Fixes CID 1365406
---
 src/modules/cpufreq/e_mod_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c
index dfc42c7..685b85e 100644
--- a/src/modules/cpufreq/e_mod_main.c
+++ b/src/modules/cpufreq/e_mod_main.c
@@ -1306,8 +1306,8 @@ _cpufreq_cb_frequency_check_notify(void *data EINA_UNUSED,
 _cpufreq_status_free(status);
 return;
  }
-   if (cpufreq_config->status) _cpufreq_status_free(cpufreq_config->status);
active = cpufreq_config->status->active;
+   _cpufreq_status_free(cpufreq_config->status);
cpufreq_config->status = status;
for (l = cpufreq_config->instances; l; l = l->next)
  {

-- 




[EGIT] [core/efl] master 09/27: win: Move main menu to the border edje group

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit cb172de3dae148c0722b8d7d09aff6af57268637
Author: Jean-Philippe Andre 
Date:   Wed Nov 9 18:25:47 2016 +0900

win: Move main menu to the border edje group

The main menu can now be contained inside the CSD border
rather than inside the win edje group.
---
 data/elementary/themes/edc/elm/border.edc | 45 ++-
 src/lib/elementary/efl_ui_win.c   | 33 ++-
 src/lib/elementary/elm_menu.c |  3 +--
 3 files changed, 71 insertions(+), 10 deletions(-)

diff --git a/data/elementary/themes/edc/elm/border.edc 
b/data/elementary/themes/edc/elm/border.edc
index fff5a31..eb9584e 100644
--- a/data/elementary/themes/edc/elm/border.edc
+++ b/data/elementary/themes/edc/elm/border.edc
@@ -837,11 +837,44 @@ group { name: "elm/border/base/default";
  /*visible: 0; */
  /* } */
   }
+  /* main menu */
+  rect { "menu_bg";
+ desc { "default";
+color: 64 64 64 255; // FIXME color_class
+align: 0.5 0.0;
+rel.to: "elm.swallow.menu";
+ }
+  }
+  swallow { "elm.swallow.menu";
+ required: 1; // since 1.19
+ desc { "default";
+rel.to: "top";
+rel1.relative: 0.0 1.0;
+rel1.offset: 0 -1;
+visible: 0;
+align: 0.5 0.0;
+fixed: 1 1;
+ }
+ desc { "visible"; inherit: "default";
+visible: 1;
+fixed: 0 1;
+ }
+  }
+  /* covers the entire client contents, including the main menu */
+  spacer { "elm.spacer.content";
+ required: 1; // since 1.19
+ desc {
+   rel1.to: "top";
+   rel1.relative: 0.0 1.0;
+   rel2.to: "bottom";
+   rel2.relative: 1.0 0.0;
+}
+  }
   part { name: "elm.swallow.client"; type: SWALLOW;
  clip_to: "client_clip";
  description { state: "default" 0.0;
 rel1.relative: 0.0 1.0;
-rel1.to: "top";
+rel1.to: "elm.swallow.menu";
 rel2.relative: 1.0 0.0;
 rel2.to: "bottom";
  }
@@ -1498,6 +1531,16 @@ group { name: "elm/border/base/default";
  target: "elm.event.resize.b";
  target: "elm.event.resize.br";
   }
+  program { name: "show_menu";
+ signal: "elm,action,show_menu"; source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.swallow.menu";
+  }
+  program { name: "hide_menu";
+ signal: "elm,action,hide"; source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.menu";
+  }
   program {
  signal: "mouse,down,*"; source: "elm.event.close";
  action: STATE_SET "selected" 0.0;
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 7b6688d..65775ce 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1417,9 +1417,16 @@ _elm_win_frame_obj_update(Efl_Ui_Win_Data *sd)
 
if (!sd->frame_obj) return;
evas_object_geometry_get(sd->frame_obj, , , , );
-   evas_object_geometry_get(sd->edje, , , , );
-
-   evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy), (fw - ow), (fh - 
oh));
+   if (edje_object_part_exists(sd->frame_obj, "elm.spacer.content"))
+ {
+edje_object_part_geometry_get(sd->frame_obj, "elm.spacer.content", 
, , , );
+evas_output_framespace_set(sd->evas, ox, oy, fw - ow, fh - oh);
+ }
+   else
+ {
+evas_object_geometry_get(sd->edje, , , , );
+evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy), (fw - ow), 
(fh - oh));
+ }
 }
 
 static void
@@ -5504,23 +5511,35 @@ _efl_ui_win_fullscreen_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *sd)
return sd->fullscreen;
 }
 
+static inline Eo *
+_main_menu_swallow_get(Efl_Ui_Win_Data *sd)
+{
+   if (sd->frame_obj)
+ {
+if (edje_object_part_exists(sd->frame_obj, "elm.swallow.menu"))
+  return sd->frame_obj;
+ }
+   return sd->edje;
+}
+
 static void
 _dbus_menu_set(Eina_Bool dbus_connect, void *data)
 {
ELM_WIN_DATA_GET_OR_RETURN(data, sd);
+   Eo *swallow = _main_menu_swallow_get(sd);
 
if (dbus_connect)
  {
 DBG("Setting menu to D-Bus");
-edje_object_part_unswallow(sd->edje, sd->main_menu);
-edje_object_signal_emit(sd->edje, "elm,action,hide_menu", "elm");
+edje_object_part_unswallow(swallow, sd->main_menu);
+edje_object_signal_emit(swallow, "elm,action,hide_menu", "elm");
 _elm_menu_menu_bar_hide(sd->main_menu);
  }
else
  {
 DBG("Setting menu to local mode");
-edje_object_part_swallow(sd->edje, "elm.swallow.menu", sd->main_menu);
-edje_object_signal_emit(sd->edje, "elm,action,show_menu", "elm");
+ 

[EGIT] [core/efl] master 07/07: ecore_ipc: implement ecore_con_server_connect() using Efl.Net.Dialer.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit e34b07e6e28d8bf40d581e97ce617028b5ecce04
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 12:17:14 2016 -0200

ecore_ipc: implement ecore_con_server_connect() using Efl.Net.Dialer.

Use the new Efl.Net.Dialer classes to implement
ecore_con_server_connect() scenario.

Note that since Windows still doesn't provide any equivalent to
Efl.Net.Dialer.Unix, we keep the legacy code for it.
---
 src/lib/ecore_ipc/ecore_ipc.c | 312 +-
 src/lib/ecore_ipc/ecore_ipc_private.h |   9 +
 2 files changed, 318 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 59e7db6..c0f9f5f 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -404,9 +404,118 @@ ecore_ipc_server_add(Ecore_Ipc_Type compl_type, const 
char *name, int port, cons
return svr;
 }
 
-/* FIXME: need to add protocol type parameter */
-EAPI Ecore_Ipc_Server *
-ecore_ipc_server_connect(Ecore_Ipc_Type compl_type, char *name, int port, 
const void *data)
+static void
+_ecore_ipc_dialer_del(Ecore_Ipc_Server *svr)
+{
+   DBG("dialer %p del", svr);
+
+   if (svr->dialer.recv_copier)
+ {
+efl_del(svr->dialer.recv_copier);
+svr->dialer.recv_copier = NULL;
+ }
+
+   if (svr->dialer.send_copier)
+ {
+efl_del(svr->dialer.send_copier);
+svr->dialer.send_copier = NULL;
+ }
+
+   if (svr->dialer.input)
+ {
+efl_del(svr->dialer.input);
+svr->dialer.input = NULL;
+ }
+
+   if (svr->dialer.dialer)
+ {
+efl_del(svr->dialer.dialer);
+svr->dialer.dialer = NULL;
+ }
+}
+
+static void
+_ecore_ipc_dialer_eos(void *data, const Efl_Event *event EINA_UNUSED)
+{
+   Ecore_Ipc_Server *svr = data;
+
+   DBG("dialer %p %p eos", svr, svr->dialer.dialer);
+
+   _ecore_ipc_dialer_del(svr);
+
+   ecore_ipc_post_event_server_del(svr);
+}
+
+static void
+_ecore_ipc_dialer_error(void *data, const Efl_Event *event)
+{
+   Ecore_Ipc_Server *svr = data;
+   Eina_Error *perr = event->info;
+
+   WRN("dialer %p %p error %s", svr, svr->dialer.dialer, 
eina_error_msg_get(*perr));
+
+   if (!efl_io_closer_closed_get(svr->dialer.dialer))
+ efl_io_closer_close(svr->dialer.dialer); /* triggers EOS */
+}
+
+static void
+_ecore_ipc_dialer_connected(void *data, const Efl_Event *event EINA_UNUSED)
+{
+   Ecore_Ipc_Server *svr = data;
+
+   DBG("connected to %s %s",
+   efl_class_name_get(efl_class_get(svr->dialer.dialer)),
+   efl_net_dialer_address_dial_get(svr->dialer.dialer));
+
+   ecore_ipc_post_event_server_add(svr);
+}
+
+EFL_CALLBACKS_ARRAY_DEFINE(_ecore_ipc_dialer_cbs,
+   { EFL_IO_READER_EVENT_EOS, _ecore_ipc_dialer_eos },
+   { EFL_NET_DIALER_EVENT_ERROR, 
_ecore_ipc_dialer_error },
+   { EFL_NET_DIALER_EVENT_CONNECTED, 
_ecore_ipc_dialer_connected });
+
+static Eina_Bool ecore_ipc_server_data_process(Ecore_Ipc_Server *svr, void 
*data, int size, Eina_Bool *stolen);
+
+static void
+_ecore_ipc_dialer_copier_data(void *data, const Efl_Event *event EINA_UNUSED)
+{
+   Ecore_Ipc_Server *svr = data;
+   Eina_Binbuf *binbuf;
+   uint8_t *mem;
+   int size;
+   Eina_Bool stolen;
+
+   DBG("dialer %p recv_copier %p data", svr, svr->dialer.recv_copier);
+
+   binbuf = efl_io_copier_binbuf_steal(svr->dialer.recv_copier);
+   EINA_SAFETY_ON_NULL_RETURN(binbuf);
+   size = eina_binbuf_length_get(binbuf);
+   mem = eina_binbuf_string_steal(binbuf);
+   eina_binbuf_free(binbuf);
+
+   ecore_ipc_server_data_process(svr, mem, size, );
+   if (!stolen) free(mem);
+}
+
+static void
+_ecore_ipc_dialer_copier_error(void *data, const Efl_Event *event)
+{
+   Ecore_Ipc_Server *svr = data;
+   Eina_Error *perr = event->info;
+
+   WRN("dialer %p %p copier %p error %s", svr, svr->dialer.dialer, 
event->object, eina_error_msg_get(*perr));
+
+   if (!efl_io_closer_closed_get(svr->dialer.dialer))
+ efl_io_closer_close(svr->dialer.dialer);
+}
+
+EFL_CALLBACKS_ARRAY_DEFINE(_ecore_ipc_dialer_copier_cbs,
+   { EFL_IO_COPIER_EVENT_ERROR, 
_ecore_ipc_dialer_copier_error });
+
+#ifndef EFL_NET_DIALER_UNIX_CLASS
+static Ecore_Ipc_Server *
+ecore_ipc_server_connect_legacy(Ecore_Ipc_Type compl_type, char *name, int 
port, const void *data)
 {
Ecore_Ipc_Server *svr;
Ecore_Ipc_Type type;
@@ -447,6 +556,133 @@ ecore_ipc_server_connect(Ecore_Ipc_Type compl_type, char 
*name, int port, const
ECORE_MAGIC_SET(svr, ECORE_MAGIC_IPC_SERVER);
return svr;
 }
+#endif
+
+/* FIXME: need to add protocol type parameter */
+EAPI Ecore_Ipc_Server *
+ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void 
*data)
+{
+   Ecore_Ipc_Server *svr;
+   Eo *loop = ecore_main_loop_get();
+   

[EGIT] [core/efl] master 14/27: evas: Add function on object to check is pointer is in

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit aac8f6f114b0654f16d7f926cbafa979f7b09726
Author: Jean-Philippe Andre 
Date:   Tue Nov 15 12:17:18 2016 +0900

evas: Add function on object to check is pointer is in

This fixes invalid mouse cursor used when windows are
created.

Due to the changes in the border theme and the fact that
a border is now always created, the event region
"elm.resize.bl" contains the point (0,0) when the window
size itself is 1x1. As a consequence every EFL application
would permanently have a cursor like the resize bottom/left
handle.

This fixes that by properly checking whether the pointer is
inside an object based on the ins list, and not just the
object geometry.

@feature

See also: b735386a459d7f432f4aad63c017ede2ae0026d1
---
 src/lib/elementary/els_cursor.c  |  5 +
 src/lib/evas/canvas/efl_canvas_object.eo | 14 +
 src/lib/evas/canvas/evas_events.c| 35 
 src/lib/evas/include/evas_inline.x   |  2 ++
 4 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/src/lib/elementary/els_cursor.c b/src/lib/elementary/els_cursor.c
index 3bb29bf..04f8a28 100644
--- a/src/lib/elementary/els_cursor.c
+++ b/src/lib/elementary/els_cursor.c
@@ -543,10 +543,7 @@ _elm_cursor_cur_set(Elm_Cursor *cur)
   }
  }
 
-   Evas_Coord x, y, w, h, px, py;
-   evas_object_geometry_get(cur->eventarea, , , , );
-   evas_pointer_canvas_xy_get(cur->evas, , );
-   if (IS_INSIDE(px, py, x, y, w, h))
+   if (efl_canvas_object_pointer_in_get(cur->eventarea))
  _elm_cursor_set(cur);
 }
 
diff --git a/src/lib/evas/canvas/efl_canvas_object.eo 
b/src/lib/evas/canvas/efl_canvas_object.eo
index aeb93e9..793a004 100644
--- a/src/lib/evas/canvas/efl_canvas_object.eo
+++ b/src/lib/evas/canvas/efl_canvas_object.eo
@@ -42,6 +42,20 @@ abstract Efl.Canvas.Object (Efl.Object, Efl.Gfx, 
Efl.Gfx.Stack, Efl.Animator,
 pointer_mode: Efl.Input.Object_Pointer_Mode; [[Input pointer mode]]
  }
   }
+  @property pointer_in {
+ [[Read-only value indicating whether the main pointer is in the 
object.
+
+   This shall be true between pointer,in and pointer,out events (coming
+   in matching numbers). Note that group objects may receive multiple
+   pointer,in in a row.
+
+   @since 1.19
+ ]]
+ get{}
+ values {
+in: bool; [[If $true the main pointer has entered this object.]]
+ }
+  }
   @property render_op {
  [[Render mode to be used for compositing the Evas object.
 
diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index d199cfc..7d7492e 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -3304,6 +3304,41 @@ _efl_canvas_object_pointer_mode_get(Eo *eo_obj 
EINA_UNUSED, Evas_Object_Protecte
return obj->pointer_mode;
 }
 
+EOLIAN Eina_Bool
+_efl_canvas_object_pointer_in_get(Eo *eo_obj, Evas_Object_Protected_Data *obj)
+{
+   Evas_Object_Protected_Data *in, *parent;
+   Eo *eo_in, *eo_parent;
+   Eina_List *l;
+
+   EVAS_OBJECT_DATA_ALIVE_CHECK(obj, EINA_FALSE);
+   if (!obj->is_smart)
+ return obj->mouse_in;
+
+   /* For smart objects, this is a bit expensive obj->mouse_in will not be set.
+* Alternatively we could count the number of in and out events propagated
+* to the smart object, assuming they always match. */
+   EINA_LIST_FOREACH(obj->layer->evas->pointer.object.in, l, eo_in)
+ {
+if (EINA_UNLIKELY(eo_in == eo_obj))
+  return EINA_TRUE;
+
+in = EVAS_OBJECT_DATA_GET(eo_in);
+if (!EVAS_OBJECT_DATA_ALIVE(in)) continue;
+eo_parent = in->smart.parent;
+while (eo_parent)
+  {
+ if ((eo_parent == eo_obj) && !in->no_propagate)
+   return EINA_TRUE;
+ parent = EVAS_OBJECT_DATA_GET(eo_parent);
+ if (!EVAS_OBJECT_DATA_ALIVE(parent)) break;
+ eo_parent = parent->smart.parent;
+  }
+ }
+
+   return EINA_FALSE;
+}
+
 EAPI void
 evas_event_refeed_event(Eo *eo_e, void *event_copy, Evas_Callback_Type 
event_type)
 {
diff --git a/src/lib/evas/include/evas_inline.x 
b/src/lib/evas/include/evas_inline.x
index 8adbd73..6939870 100644
--- a/src/lib/evas/include/evas_inline.x
+++ b/src/lib/evas/include/evas_inline.x
@@ -13,6 +13,8 @@
if (EINA_UNLIKELY(!EVAS_OBJECT_DATA_VALID(o))) return __VA_ARGS__; } while 
(0)
 #define EVAS_OBJECT_DATA_ALIVE_CHECK(o, ...) do { \
if (EINA_UNLIKELY(!EVAS_OBJECT_DATA_ALIVE(o))) return __VA_ARGS__; } while 
(0)
+#define EVAS_OBJECT_DATA_GET(eo_o) \
+   efl_data_scope_get((eo_o), EFL_CANVAS_OBJECT_CLASS)
 #define EVAS_OBJECT_DATA_SAFE_GET(eo_o) \
(((eo_o) && efl_isa((eo_o), 

[EGIT] [core/efl] master 06/07: ecore_ipc: check if client is still alive efore emitting 'del' event.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 715c882073aace5c6f77916a11a442718fb91a40
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 12:14:57 2016 -0200

ecore_ipc: check if client is still alive efore emitting 'del' event.

Using the ecore_ipc_server_example with -m/--single-message, if we
deleted the client from the callback it would find a dead "cl".

As the "cl" handle is removed from svr->clients before it's deleted,
it's safe to check if we have that handle in the list before
proceeding.
---
 src/lib/ecore_ipc/ecore_ipc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index d999d58..59e7db6 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -889,6 +889,7 @@ _ecore_ipc_event_client_del(void *data EINA_UNUSED, int 
ev_type EINA_UNUSED, voi
 Ecore_Ipc_Client *cl;
 
 cl = ecore_con_client_data_get(e->client);
+if (!eina_list_data_find(svr->clients, cl)) return 
ECORE_CALLBACK_RENEW;
 cl->client = NULL;
 
 ecore_ipc_post_event_client_del(cl);

-- 




[EGIT] [core/efl] master 04/04: ecore_file: get stat from correct file

2016-11-23 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

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

commit dc18e7190355c933dfb1c2e25d405489566114ef
Author: Vyacheslav Reutskiy 
Date:   Wed Nov 23 16:06:43 2016 +0200

ecore_file: get stat from correct file
---
 src/lib/ecore_file/ecore_file.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index 1b8b10a..f2b5de1 100644
--- a/src/lib/ecore_file/ecore_file.c
+++ b/src/lib/ecore_file/ecore_file.c
@@ -331,7 +331,8 @@ ecore_file_recursive_rm(const char *dir)
 
if (readlink(dir, buf, sizeof(buf) - 1) > 0)
  return ecore_file_unlink(dir);
-   if (!_ecore_file_stat(buf, NULL, NULL, NULL, _dir, NULL))
+
+   if (!_ecore_file_stat(dir, NULL, NULL, NULL, _dir, NULL))
  return EINA_FALSE;
 #else
if (lstat(dir, ) == -1)

-- 




[EGIT] [core/efl] master 03/27: win: Apply alpha for CSD mode, even in X

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit c91360fcbd3ca6a53e15eb40e80d4bf813b1b4dd
Author: Jean-Philippe Andre 
Date:   Thu Oct 27 16:55:16 2016 +0900

win: Apply alpha for CSD mode, even in X
---
 src/lib/elementary/efl_ui_win.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index cd7a4a3..a30d98d 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -418,6 +418,8 @@ _elm_win_apply_alpha(Eo *obj, Efl_Ui_Win_Data *sd)
 {
Eina_Bool enabled;
 
+   if (!sd->ee) return;
+
enabled = sd->theme_alpha | sd->application_alpha;
if (sd->img_obj)
  {
@@ -426,6 +428,7 @@ _elm_win_apply_alpha(Eo *obj, Efl_Ui_Win_Data *sd)
  }
else
  {
+enabled |= (sd->need_frame && !sd->fullscreen);
 #ifdef HAVE_ELEMENTARY_X
 if (sd->x.xwin)
   {
@@ -4642,8 +4645,6 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, 
const char *name, Elm_W
 return NULL;
  }
 
-   _elm_win_need_frame_adjust(sd, engine);
-
if (!sd->accel_pref)
  eina_stringshare_replace(>accel_pref, 
elm_config_accel_preference_get());
 
@@ -4878,6 +4879,9 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, 
const char *name, Elm_W

_elm_win_on_resize_obj_changed_size_hints, obj);
  }
 
+   _elm_win_need_frame_adjust(sd, engine);
+   _elm_win_apply_alpha(obj, sd);
+
/* do not append to list; all windows render as black rects */
if (type != ELM_WIN_FAKE)
  {

-- 




[EGIT] [core/efl] master 12/27: win: Always add a frame object

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 234bc18f02993c29c20120a52079b3081dca0126
Author: Jean-Philippe Andre 
Date:   Fri Nov 11 15:24:00 2016 +0900

win: Always add a frame object

All windows, except for fake, inline & socket images,
should have a frame object to handle all the new APIs and
slots (background, content, indicator, etc...).

The theme will need to handle various modes:
 - full CSD
 - solid CSD without shadows
 - server-side decoration (borderless without shadows)
 - borderless with shadows

This means that the default theme must be used for windows,
so that the required edc parts exist. Apart from the standard
background, it is very unlikely that a theme will have changed
anything in win.edc, conformant.edc or border.edc.

This might prove a controversial move, but the alternative would
be to have increasingly complex code handling new themes with
a single edje object and older themes by swallowing tons of
components magically.

Eventually, the win edje object should also not be used anymore.

By default, windows should not have CSD enabled, except on Wayland.
This patch does not handle frame_obj with server-side decorations
yet.
---
 src/lib/elementary/efl_ui_win.c | 350 
 1 file changed, 136 insertions(+), 214 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 9f29e2a..933c45c 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -102,7 +102,7 @@ struct _Efl_Ui_Win_Data
Evas_Object  *img_obj, *frame_obj;
Eo   *edje; /**< edje object for a window layout */
Eo   *box;
-   Eo /* wref */*bg, *std_bg;
+   Eo /* wref */*bg;
Evas_Object  *obj; /* The object itself */
 #ifdef HAVE_ELEMENTARY_X
struct
@@ -243,6 +243,21 @@ struct _Efl_Ui_Win_Data
   short device_changed;
} event_forward;
 
+   struct {
+  /* frame_obj is always used except for FAKE, SOCKET and INLINE */
+  Eina_Bool need : 1; /**< if true, application draws its own csd */
+  Eina_Bool need_shadow : 1; /**< if true, application draws its csd and 
shadow */
+  Eina_Bool need_borderless : 1;
+  Eina_Bool need_bg_solid : 1;
+  Eina_Bool need_menu : 1;
+  Eina_Bool cur_borderless : 1;
+  Eina_Bool cur_shadow : 1;
+  Eina_Bool cur_focus : 1;
+  Eina_Bool cur_maximized : 1;
+  Eina_Bool cur_bg_solid : 1;
+  Eina_Bool cur_menu : 1;
+   } csd;
+
Eina_Boolurgent : 1;
Eina_Boolmodal : 1;
Eina_Booldemand_attention : 1;
@@ -260,7 +275,6 @@ struct _Efl_Ui_Win_Data
Eina_Boolnoblank : 1;
Eina_Booltheme_alpha : 1; /**< alpha value fetched by a theme. this has 
higher priority than application_alpha */
Eina_Boolapplication_alpha : 1; /**< alpha value set by an 
elm_win_alpha_set() api. this has lower priority than theme_alpha */
-   Eina_Boolneed_frame : 1;
 };
 
 struct _Box_Item_Iterator
@@ -350,7 +364,8 @@ static void
 _elm_win_img_callbacks_del(Evas_Object *obj, Evas_Object *imgobj);
 static Elm_Theme_Apply _elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd);
 static void _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *style);
-static void _elm_win_frame_del(Efl_Ui_Win_Data *sd);
+static void _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool 
force_emit, Eina_Bool calc);
+static inline void _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const char 
*engine);
 
 #ifdef HAVE_ELEMENTARY_X
 static void _elm_win_xwin_update(Efl_Ui_Win_Data *sd);
@@ -432,7 +447,7 @@ _elm_win_apply_alpha(Eo *obj, Efl_Ui_Win_Data *sd)
  }
else
  {
-enabled |= (sd->need_frame && !sd->fullscreen);
+enabled |= (sd->csd.need && !sd->fullscreen);
 #ifdef HAVE_ELEMENTARY_X
 if (sd->x.xwin)
   {
@@ -1199,10 +1214,7 @@ _elm_win_focus_in(Ecore_Evas *ee)
evas_object_smart_callback_call(obj, SIG_FOCUS_IN, NULL);
sd->focus_highlight.cur.visible = EINA_TRUE;
_elm_win_focus_highlight_reconfigure_job_start(sd);
-   if (sd->frame_obj)
- {
-edje_object_signal_emit(sd->frame_obj, "elm,action,focus", "elm");
- }
+   _elm_win_frame_style_update(sd, 0, 1);
 
if (_elm_config->atspi_mode)
  {
@@ -1232,10 +1244,8 @@ _elm_win_focus_out(Ecore_Evas *ee)
evas_object_smart_callback_call(obj, SIG_FOCUS_OUT, NULL);
sd->focus_highlight.cur.visible = EINA_FALSE;
_elm_win_focus_highlight_reconfigure_job_start(sd);
-   if (sd->frame_obj && !sd->resizing)
- {
-edje_object_signal_emit(sd->frame_obj, "elm,action,unfocus", "elm");
- }
+   if (!sd->resizing)
+ _elm_win_frame_style_update(sd, 0, 1);
 
/* access */

[EGIT] [core/efl] master 08/27: win: Fix maximized geometry with CSD in X

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit b2dbf9d9dd52d286e357e988ba55023b7eb9cb13
Author: Jean-Philippe Andre 
Date:   Wed Nov 2 15:04:24 2016 +0900

win: Fix maximized geometry with CSD in X

There is still a geometry issue after un-maximizing.
---
 src/lib/ecore_evas/ecore_evas.c |  3 ++
 src/lib/ecore_evas/ecore_evas_private.h |  1 +
 src/lib/elementary/efl_ui_win.c | 41 +
 src/modules/ecore_evas/engines/x/ecore_evas_x.c | 23 --
 4 files changed, 39 insertions(+), 29 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 4400883..421345d 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2240,10 +2240,13 @@ EAPI void
 ecore_evas_shadow_geometry_set(Ecore_Evas *ee, int l, int r, int t, int b)
 {
ECORE_EVAS_CHECK(ee);
+   if ((ee->shadow.l == l) && (ee->shadow.r == r) &&
+   (ee->shadow.t == t) && (ee->shadow.b == b)) return;
ee->shadow.l = l;
ee->shadow.r = r;
ee->shadow.t = t;
ee->shadow.b = b;
+   ee->shadow.changed = EINA_TRUE;
 }
 
 EAPI void
diff --git a/src/lib/ecore_evas/ecore_evas_private.h 
b/src/lib/ecore_evas/ecore_evas_private.h
index c1ea4c0..5184e94 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -207,6 +207,7 @@ struct _Ecore_Evas
 
struct {
   int  l, r, t, b;
+  int  changed : 1;
} shadow;
 
struct {
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 1353292..7b6688d 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1376,6 +1376,25 @@ _elm_win_opaque_update(Efl_Ui_Win_Data *sd)
 }
 #endif
 
+static inline void
+_elm_win_frame_geometry_adjust(Efl_Ui_Win_Data *sd)
+{
+   int l = 0, t = 0, r = 0, b = 0;
+
+   if (sd->frame_obj && !sd->fullscreen)
+ {
+int fw, fh, ox, oy, ow, oh;
+evas_object_geometry_get(sd->frame_obj, NULL, NULL, , );
+edje_object_part_geometry_get(sd->frame_obj, "elm.spacer.opaque",
+  , , , );
+l = ox;
+t = oy;
+r = fw - ow - l;
+b = fh - oh - t;
+ }
+   ecore_evas_shadow_geometry_set(sd->ee, l, r, t, b);
+}
+
 static void
 _elm_win_frame_obj_update(Efl_Ui_Win_Data *sd)
 {
@@ -1386,6 +1405,7 @@ _elm_win_frame_obj_update(Efl_Ui_Win_Data *sd)
sd->wl.opaque_dirty = 1;
 #endif
 
+   _elm_win_frame_geometry_adjust(sd);
if (sd->fullscreen)
  {
 #ifdef HAVE_ELEMENTARY_WL2
@@ -2864,25 +2884,6 @@ super_skip:
efl_gfx_position_set(efl_super(obj, EFL_CANVAS_GROUP_CLASS), x, y);
 }
 
-static inline void
-_elm_win_frame_geometry_adjust(Efl_Ui_Win_Data *sd)
-{
-   int l = 0, t = 0, r = 0, b = 0;
-
-   if (sd->frame_obj)
- {
-int fw, fh, ox, oy, ow, oh;
-evas_object_geometry_get(sd->frame_obj, NULL, NULL, , );
-edje_object_part_geometry_get(sd->frame_obj, "elm.spacer.opaque",
-  , , , );
-l = ox;
-t = oy;
-r = fw - ow - l;
-b = fh - oh - t;
- }
-   ecore_evas_shadow_geometry_set(sd->ee, l, r, t, b);
-}
-
 EOLIAN static void
 _efl_ui_win_efl_gfx_size_set(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coord w, 
Evas_Coord h)
 {
@@ -3893,7 +3894,7 @@ _elm_win_frame_cb_maximize(void *data,
if (sd->maximized) value = EINA_FALSE;
else value = EINA_TRUE;
 
-   TRAP(sd, maximized_set, value);
+   efl_ui_win_maximized_set(sd->obj, value);
 }
 
 static void
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c 
b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index 118401e..2a71070 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -1608,6 +1608,18 @@ _ecore_evas_x_event_window_destroy(void *data 
EINA_UNUSED, int type EINA_UNUSED,
return ECORE_CALLBACK_PASS_ON;
 }
 
+static inline void
+_ecore_evas_x_shadow_update(Ecore_Evas *ee)
+{
+   if (EINA_LIKELY(!ee->shadow.changed)) return;
+
+   int shadow[4] = { ee->shadow.l, ee->shadow.r, ee->shadow.t, ee->shadow.b };
+   ee->shadow.changed = EINA_FALSE;
+   ecore_x_window_prop_property_set(ee->prop.window,
+ECORE_X_ATOM_GTK_FRAME_EXTENTS,
+ECORE_X_ATOM_CARDINAL, 32, shadow, 4);
+}
+
 static Eina_Bool
 _ecore_evas_x_event_window_configure(void *data EINA_UNUSED, int type 
EINA_UNUSED, void *event)
 {
@@ -1638,6 +1650,7 @@ _ecore_evas_x_event_window_configure(void *data 
EINA_UNUSED, int type EINA_UNUSE
   }
  }
 
+   _ecore_evas_x_shadow_update(ee);
evas_output_framespace_get(ee->evas, NULL, NULL, , );
if (!ECORE_EVAS_PORTRAIT(ee))
  SWAP_INT(fw, fh);
@@ -2170,7 +2183,6 @@ _ecore_evas_x_resize(Ecore_Evas *ee, 

[EGIT] [core/efl] master 02/27: win: Factorize code to select frame mode

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 79b0737b6c7dea93e76e4c840282f79022597865
Author: Jean-Philippe Andre 
Date:   Thu Oct 27 10:32:45 2016 +0900

win: Factorize code to select frame mode

This also adds an env var for debug to force the frame on or off.
---
 src/lib/elementary/efl_ui_win.c | 47 +++--
 1 file changed, 31 insertions(+), 16 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index bff4075..cd7a4a3 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -256,6 +256,7 @@ struct _Efl_Ui_Win_Data
Eina_Boolnoblank : 1;
Eina_Booltheme_alpha : 1; /**< alpha value fetched by a theme. this has 
higher priority than application_alpha */
Eina_Boolapplication_alpha : 1; /**< alpha value set by an 
elm_win_alpha_set() api. this has lower priority than theme_alpha */
+   Eina_Boolneed_frame : 1;
 };
 
 struct _Box_Item_Iterator
@@ -1504,10 +1505,7 @@ _elm_win_state_change(Ecore_Evas *ee)
  }
if (ch_fullscreen)
  {
-const char *engine_name = ecore_evas_engine_name_get(sd->ee);
-Eina_Bool need_frame = eina_streq(engine_name, ELM_WAYLAND_SHM) ||
-   eina_streq(engine_name, ELM_WAYLAND_EGL);
-if (need_frame)
+if (sd->need_frame)
   {
  if ((!sd->fullscreen) && (!sd->frame_obj))
{
@@ -1521,7 +1519,7 @@ _elm_win_state_change(Ecore_Evas *ee)
 if (sd->fullscreen)
   {
 #ifdef HAVE_ELEMENTARY_WL2
- if (need_frame)
+ if (sd->need_frame)
sd->wl.opaque_dirty = 1;
 #endif
  efl_event_callback_legacy_call
@@ -1530,7 +1528,7 @@ _elm_win_state_change(Ecore_Evas *ee)
 else
   {
 #ifdef HAVE_ELEMENTARY_WL2
- if (need_frame)
+ if (sd->need_frame)
{
   _elm_win_opaque_update(sd);
   _elm_win_frame_obj_update(sd);
@@ -4263,6 +4261,27 @@ _accel_is_gl(const char *accel)
return EINA_FALSE;
 }
 
+static inline void
+_elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const char *engine)
+{
+   const char *s;
+
+   /* this is for debug only - don't keep forever, it's not an api! */
+   s = getenv("EFL_WIN_FRAME_MODE");
+
+   if (sd->type == ELM_WIN_INLINED_IMAGE)
+ sd->need_frame = EINA_FALSE;
+   else if (eina_streq(s, "on"))
+ sd->need_frame = EINA_TRUE;
+   else if (eina_streq(s, "off"))
+ sd->need_frame = EINA_FALSE;
+   else
+ {
+sd->need_frame = (eina_streq(engine, ELM_WAYLAND_SHM) ||
+  eina_streq(engine, ELM_WAYLAND_EGL));
+ }
+}
+
 static Eo *
 _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, 
Elm_Win_Type type)
 {
@@ -4623,11 +4642,14 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data 
*sd, const char *name, Elm_W
 return NULL;
  }
 
+   _elm_win_need_frame_adjust(sd, engine);
+
if (!sd->accel_pref)
  eina_stringshare_replace(>accel_pref, 
elm_config_accel_preference_get());
 
efl_parent_set(obj, ecore_evas_get(tmp_sd.ee));
 
+   /* FIXME: Major hack: calling the constructor in the middle of finalize. */
efl_constructor(efl_super(obj, MY_CLASS));
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
@@ -4867,10 +4889,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, 
const char *name, Elm_W
   {
  TRAP(sd, fullscreen_set, 1);
   }
-else if ((type != ELM_WIN_INLINED_IMAGE) &&
- ((engine) &&
-  ((!strcmp(engine, ELM_WAYLAND_SHM) ||
-   (!strcmp(engine, ELM_WAYLAND_EGL))
+else if (sd->need_frame)
   _elm_win_frame_add(sd, "default");
 
 if (_elm_config->focus_highlight_enable)
@@ -5296,13 +5315,8 @@ _efl_ui_win_center(Eo *obj, Efl_Ui_Win_Data *sd, 
Eina_Bool h, Eina_Bool v)
 EOLIAN static void
 _efl_ui_win_borderless_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool 
borderless)
 {
-   const char *engine_name = ecore_evas_engine_name_get(sd->ee);
-   Eina_Bool need_frame = engine_name &&
-  ((!strcmp(engine_name, ELM_WAYLAND_SHM)) ||
-   (!strcmp(engine_name, ELM_WAYLAND_EGL)));
 
-   if (need_frame)
- need_frame = !sd->fullscreen;
+   Eina_Bool need_frame = sd->need_frame && !sd->fullscreen;
 
if (borderless)
  {
@@ -7345,6 +7359,7 @@ elm_win_fake_canvas_set(Evas_Object *obj, Ecore_Evas *oee)
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
 
sd->ee = oee;
+   _elm_win_need_frame_adjust(sd, ecore_evas_engine_name_get(oee));
 }
 
 EAPI Evas_Object *

-- 




[EGIT] [core/efl] master 10/27: win: Add background part to the win border

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 0e52264ae0d0e9197e03115f65f30be1a064b6b9
Author: Jean-Philippe Andre 
Date:   Thu Nov 10 16:10:28 2016 +0900

win: Add background part to the win border

Use Efl.Part for window to manipulate the background.

Two part names are used in EDC:
 - elm.rect.background
 - elm.swallow.background

For apps the part name is only "background".

To set a solid color background (alpha is ok):
 efl_gfx_color_set(efl_part(win, "background"), r, g, b, a);

To set an image:
 efl_file_set(efl_part(win, "background"), "image.jpg", NULL);

To set an object:
 efl_content_set(efl_part(win, "background"), subobj);

The solid bg is invisible by default, will become visible and use
COPY render mode if a color is set. Standard window uses the
swallow part.

@feature
---
 data/elementary/themes/colorclasses.edc|   4 +
 data/elementary/themes/edc/elm/border.edc  |  68 --
 src/Makefile_Elementary.am |   1 +
 src/bin/elementary/test.c  |   2 +
 src/bin/elementary/test_bg.c   | 105 ++
 src/lib/elementary/efl_ui_win.c| 275 +++--
 src/lib/elementary/efl_ui_win.eo   |   4 +-
 src/lib/elementary/efl_ui_win_internal_part.eo |  14 ++
 src/lib/elementary/efl_ui_win_standard.c   |  15 +-
 src/lib/elementary/elm_priv.h  |   2 +
 10 files changed, 442 insertions(+), 48 deletions(-)

diff --git a/data/elementary/themes/colorclasses.edc 
b/data/elementary/themes/colorclasses.edc
index ab6dc07..f273d34 100644
--- a/data/elementary/themes/colorclasses.edc
+++ b/data/elementary/themes/colorclasses.edc
@@ -386,6 +386,10 @@ color_classes {
   color: FN_COL_DISABLE;
   desc: "Text of a disabled multibuttonentry item";
}
+   color_class { "elm/win/background";
+  color: 64 64 64 255;
+  desc: "Background color of a standard window";
+   }

 // modules
color_class { name: "module_label";
diff --git a/data/elementary/themes/edc/elm/border.edc 
b/data/elementary/themes/edc/elm/border.edc
index eb9584e..5f77f53 100644
--- a/data/elementary/themes/edc/elm/border.edc
+++ b/data/elementary/themes/edc/elm/border.edc
@@ -787,6 +787,7 @@ group { name: "elm/border/base/default";
images.image: "win_shadow.png" COMP;
data.item: "shadow" "1";
parts {
+  /* opaque region of the window, to inform the compositor */
   spacer { "elm.spacer.opaque";
  desc {
 rel1.to: "top";
@@ -798,6 +799,16 @@ group { name: "elm/border/base/default";
  }
  desc { "max"; inherit: "shaded"; }
   }
+  /* covers the entire client contents, including the main menu */
+  spacer { "elm.spacer.content";
+ required; // since 1.19
+ desc {
+   rel1.to: "top";
+   rel1.relative: 0.0 1.0;
+   rel2.to: "bottom";
+   rel2.relative: 1.0 0.0;
+}
+  }
   part { name: "shadow_clip"; type: RECT; mouse_events: 0;
  description { state: "default";
 rel1.to: "shadow";
@@ -827,20 +838,42 @@ group { name: "elm/border/base/default";
 rel2.to: "elm.swallow.client";
  }
   }
-  part { name: "client_clip"; type: RECT; mouse_events: 0;
- description { state: "default" 0.0;
+  rect { "client_clip";
+ nomouse;
+ desc { "default";
 rel1.to_y: "elm.swallow.client";
 rel2.to_y: "elm.swallow.client";
  }
- /* description { state: "hidden" 0.0; */
- /*inherit: "default"; */
- /*visible: 0; */
- /* } */
+  }
+  rect { "bg_clip";
+ nomouse;
+desc { "default";
+   rel.to: "elm.spacer.content";
+}
+  }
+  /* window background: solid color */
+  rect { "elm.rect.background";
+ required; // @since 1.19
+ clip: "bg_clip";
+ desc { "default";
+   color: 255 255 255 255;
+   color_class: "elm/win/background"; // FIXME: color_class naming 
scheme
+   visible: 0;
+}
+desc { "visible";
+   inherit: "default";
+   visible: 1;
+}
+  }
+  /* window background: image */
+  swallow { "elm.swallow.background";
+ required; // @since 1.19
+ clip: "client_clip";
   }
   /* main menu */
   rect { "menu_bg";
  desc { "default";
-color: 64 64 64 255; // FIXME color_class
+color: 64 64 64 255; // FIXME: color_class
 align: 0.5 0.0;
 rel.to: "elm.swallow.menu";
  }
@@ -860,16 +893,7 @@ group { name: "elm/border/base/default";
 fixed: 0 1;
  }
   }
-  /* covers the entire client 

[EGIT] [core/efl] master 01/27: ecore_evas/x: Take framespace into account during resize

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 86e18c3f611dd5a4c85a62d064031204557717fe
Author: Jean-Philippe Andre 
Date:   Fri Oct 28 12:20:07 2016 +0900

ecore_evas/x: Take framespace into account during resize

This is another step towards CSD support for X.
---
 src/modules/ecore_evas/engines/x/ecore_evas_x.c | 62 ++---
 1 file changed, 44 insertions(+), 18 deletions(-)

diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c 
b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index 4750073..c9ff1f3 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -152,6 +152,8 @@ static void _transparent_do(Ecore_Evas *, int);
 static void _avoid_damage_do(Ecore_Evas *, int);
 static void _rotation_do(Ecore_Evas *, int, int);
 
+#define SWAP_INT(a, b) do { a ^= b; b ^= a; a ^= b; } while (0)
+
 static void
 _ecore_evas_x_hints_update(Ecore_Evas *ee)
 {
@@ -835,16 +837,19 @@ _resize_shape_do(Ecore_Evas *ee)
if (einfo)
  {
 unsigned int foreground;
+int fw = 0, fh = 0;
 Ecore_X_GC gc;
 
+evas_output_framespace_get(ee->evas, NULL, NULL, , );
+
 if (edata->mask) ecore_x_pixmap_free(edata->mask);
-edata->mask = ecore_x_pixmap_new(ee->prop.window, ee->w, ee->h, 1);
+edata->mask = ecore_x_pixmap_new(ee->prop.window, ee->w + fw, ee->h + 
fh, 1);
 foreground = 0;
 gc = ecore_x_gc_new(edata->mask,
 ECORE_X_GC_VALUE_MASK_FOREGROUND,
 );
 ecore_x_drawable_rectangle_fill(edata->mask, gc,
-0, 0, ee->w, ee->h);
+0, 0, ee->w + fw, ee->h + fh);
 ecore_x_gc_free(gc);
 einfo->info.mask = edata->mask;
 if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
@@ -1609,6 +1614,7 @@ _ecore_evas_x_event_window_configure(void *data 
EINA_UNUSED, int type EINA_UNUSE
Ecore_Evas *ee;
Ecore_X_Event_Window_Configure *e;
Ecore_Evas_Engine_Data_X11 *edata;
+   int fw = 0, fh = 0, w, h;
 
e = event;
ee = ecore_event_window_match(e->win);
@@ -1631,11 +1637,18 @@ _ecore_evas_x_event_window_configure(void *data 
EINA_UNUSED, int type EINA_UNUSE
  if (ee->func.fn_move) ee->func.fn_move(ee);
   }
  }
-   if ((ee->w != e->w) || (ee->h != e->h) ||
-   (ee->req.w != e->w) || (ee->req.h != e->h))
+
+   evas_output_framespace_get(ee->evas, NULL, NULL, , );
+   if (!ECORE_EVAS_PORTRAIT(ee))
+ SWAP_INT(fw, fh);
+
+   if (((ee->w + fw) != e->w) || ((ee->h + fh) != e->h) ||
+   ((ee->req.w + fw) != e->w) || ((ee->req.h + fh) != e->h))
  {
-ee->w = e->w;
-ee->h = e->h;
+w = e->w;
+h = e->h;
+ee->w = w - fw;
+ee->h = h - fh;
 if (edata->configure_reqs == 0)
   {
  ee->req.w = ee->w;
@@ -1643,13 +1656,13 @@ _ecore_evas_x_event_window_configure(void *data 
EINA_UNUSED, int type EINA_UNUSE
   }
 if (ECORE_EVAS_PORTRAIT(ee))
   {
- evas_output_size_set(ee->evas, ee->w, ee->h);
- evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
+ evas_output_size_set(ee->evas, w, h);
+ evas_output_viewport_set(ee->evas, 0, 0, w, h);
   }
 else
   {
- evas_output_size_set(ee->evas, ee->h, ee->w);
- evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
+ evas_output_size_set(ee->evas, h, w);
+ evas_output_viewport_set(ee->evas, 0, 0, h, w);
   }
 if (ee->prop.avoid_damage)
   {
@@ -2156,6 +2169,12 @@ _ecore_evas_x_resize(Ecore_Evas *ee, int w, int h)
 {
Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
Eina_Bool changed = EINA_FALSE;
+   int fw = 0, fh = 0;
+
+   evas_output_framespace_get(ee->evas, NULL, NULL, , );
+   if (ECORE_EVAS_PORTRAIT(ee)) SWAP_INT(fw, fh);
+   w -= fw;
+   h -= fh;
 
if ((ee->req.w != w) || (ee->req.h != h))
  {
@@ -2212,7 +2231,7 @@ _ecore_evas_x_resize(Ecore_Evas *ee, int w, int h)
  {
 edata->configure_coming = 1;
 if (changed) edata->configure_reqs++;
-if (ee->prop.window) ecore_x_window_resize(ee->prop.window, w, h);
+if (ee->prop.window) ecore_x_window_resize(ee->prop.window, w + fw, h 
+ fh);
  }
 }
 
@@ -2310,10 +2329,16 @@ _ecore_evas_x_rotation_set_internal(Ecore_Evas *ee, int 
rotation, int resize,
 {
int rot_dif;
Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
+   int fw = 0, fh = 0;
 
rot_dif = ee->rotation - rotation;
if (rot_dif < 0) rot_dif = -rot_dif;
 
+   evas_output_framespace_get(ee->evas, NULL, NULL, , );
+
+   if (!PORTRAIT_CHECK(rotation))
+ SWAP_INT(fw, fh);
+
if (rot_dif != 

[EGIT] [core/efl] master 13/27: theme: Implement CSD & non-CSD styles in window.edc

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 9fb4f0ab2b27dafccb5fe72a9863b1ba6fb646ec
Author: Jean-Philippe Andre 
Date:   Mon Nov 14 17:53:01 2016 +0900

theme: Implement CSD & non-CSD styles in window.edc

Also converts border.edc to lazEDC (easier to read, imho).

This is still work in progress but currently this supports
CSD & no-CSD modes for normal, maximized, main menu usage, shadow
on and off.

Note that shaded support is not implemented. I've made some
attempts towards this goal, with some success under X but it
was ugly code, and didn't work under Wayland (weston). So, no
extra support for shaded mode yet.
---
 data/elementary/themes/edc/elm/border.edc | 649 ++
 1 file changed, 312 insertions(+), 337 deletions(-)

diff --git a/data/elementary/themes/edc/elm/border.edc 
b/data/elementary/themes/edc/elm/border.edc
index 788e529..ccf0dd2 100644
--- a/data/elementary/themes/edc/elm/border.edc
+++ b/data/elementary/themes/edc/elm/border.edc
@@ -1,3 +1,12 @@
+/* Window client-side decorations and extra slots
+ * Includes swallows for:
+ *  - app content
+ *  - main menu
+ *  - indicator
+ *  - soft key
+ *  - virtual keyboard
+ */
+
 group { name: "elm/border/base/default";
images.image: "vgrad_med_lighter.png" COMP;
images.image: "vgrad_med_dark.png" COMP;
@@ -25,80 +34,57 @@ group { name: "elm/border/base/default";
   /* opaque region of the window, to inform the compositor */
   spacer { "elm.spacer.opaque";
  desc {
-rel1.to: "top";
-rel2.to: "bottom";
+rel1.to: "top_clip";
+rel2.to: "bottom_clip";
  }
- desc { "shaded";
-rel1.to: "top";
-rel2.to: "elm.swallow.client";
- }
- desc { "max"; inherit: "shaded"; }
+ desc { "max"; inherit: "default"; }
   }
   /* covers the entire client contents, including the main menu */
   spacer { "elm.spacer.content";
  required; // since 1.19
  desc {
-   rel1.to: "top";
-   rel1.relative: 0.0 1.0;
-   rel2.to: "bottom";
-   rel2.relative: 1.0 0.0;
-}
-  }
-  part { name: "shadow_clip"; type: RECT; mouse_events: 0;
- description { state: "default";
-rel1.to: "shadow";
-rel2.to: "shadow";
- }
- description { state: "hidden";
-visible: 0;
+rel1.to: "top_clip";
+rel1.relative: 0.0 1.0;
+rel2.to: "bottom_clip";
+rel2.relative: 1.0 0.0;
  }
   }
-  part { name: "shadow_spacer"; type: SPACER;
- description { state: "default";
+  /* shadow spacer and clipper */
+  spacer { "shadow_spacer";
+ desc { "default";
 WIN_SHADOW_SPACER;
  }
- description { state: "max";
+ desc { "hidden";
 rel1.offset: 0 0;
 rel2.offset: -1 -1;
  }
   }
-  part { name: "shadow"; mouse_events: 0; clip_to: "shadow_clip";
- description { state: "default" 0.0;
-rel1.to: "shadow_spacer";
-rel2.to: "shadow_spacer";
+  image { "shadow"; nomouse;
+ desc { "default";
+rel.to: "shadow_spacer";
 WIN_SHADOW;
  }
- description { state: "shaded";
-inherit: "default";
-rel2.to: "elm.swallow.client";
- }
+ desc { "hidden"; inherit: "default"; hid; }
   }
-  rect { "client_clip";
+  /* window background: solid color */
+  rect { "bg_clip";
  nomouse;
  desc { "default";
-rel1.to_y: "elm.swallow.client";
-rel2.to_y: "elm.swallow.client";
+rel.to: "elm.spacer.content";
  }
   }
-  rect { "bg_clip";
- nomouse;
-desc { "default";
-   rel.to: "elm.spacer.content";
-}
-  }
-  /* window background: solid color */
   rect { "elm.rect.background";
  required; // @since 1.19
  clip: "bg_clip";
  desc { "default";
-   color: 255 255 255 255;
-   color_class: "elm/win/background"; // FIXME: color_class naming 
scheme
-   visible: 0;
-}
-desc { "visible";
-   inherit: "default";
-   visible: 1;
-}
+color: 255 255 255 255;
+color_class: "elm/win/background"; // FIXME: color_class naming 
scheme
+visible: 0;
+ }
+ desc { "visible";
+inherit: "default";
+visible: 1;
+ }
   }
   /* window background: image */
   swallow { "elm.swallow.background";
@@ -116,7 +102,7 @@ group { name: "elm/border/base/default";
   swallow { "elm.swallow.menu";
  required: 1; // since 1.19
  

[EGIT] [core/efl] master 02/04: ecore_ipc: refactor code related to event posting.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 89c326cd00e2b2a21ec7529e82a40fa5a14d7826
Author: Gustavo Sverzut Barbieri 
Date:   Tue Nov 22 23:20:40 2016 -0200

ecore_ipc: refactor code related to event posting.

When we move to efl_net we'll reuse the same event posting, thus
refactor the code in their own function so it can be reused.
---
 src/lib/ecore_ipc/ecore_ipc.c | 138 +-
 1 file changed, 83 insertions(+), 55 deletions(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index d8515b0..9d10be7 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -223,6 +223,84 @@ static int  _ecore_ipc_init_count = 0;
 static Eina_List   *servers = NULL;
 static Ecore_Event_Handler *handler[6];
 
+static void
+ecore_ipc_post_event_server_add(Ecore_Ipc_Server *svr)
+{
+   Ecore_Ipc_Event_Server_Add *ev;
+
+   if (svr->delete_me) return;
+
+   ev = calloc(1, sizeof(Ecore_Ipc_Event_Server_Add));
+   EINA_SAFETY_ON_NULL_RETURN(ev);
+
+   svr->event_count++;
+   ev->server = svr;
+   ecore_event_add(ECORE_IPC_EVENT_SERVER_ADD, ev,
+   _ecore_ipc_event_server_add_free, NULL);
+}
+
+static void
+ecore_ipc_post_event_server_del(Ecore_Ipc_Server *svr)
+{
+   Ecore_Ipc_Event_Server_Del *ev;
+
+   if (svr->delete_me) return;
+
+   ev = calloc(1, sizeof(Ecore_Ipc_Event_Server_Del));
+   EINA_SAFETY_ON_NULL_RETURN(ev);
+
+   svr->event_count++;
+   ev->server = svr;
+   ecore_event_add(ECORE_IPC_EVENT_SERVER_DEL, ev,
+   _ecore_ipc_event_server_del_free, NULL);
+}
+
+static void
+ecore_ipc_post_event_client_add(Ecore_Ipc_Client *cl)
+{
+   Ecore_Ipc_Event_Client_Add *ev;
+
+   if (cl->delete_me) return;
+
+   ev = calloc(1, sizeof(Ecore_Ipc_Event_Client_Add));
+   EINA_SAFETY_ON_NULL_RETURN(ev);
+
+   cl->event_count++;
+   ev->client = cl;
+   ecore_event_add(ECORE_IPC_EVENT_CLIENT_ADD, ev,
+   _ecore_ipc_event_client_add_free, NULL);
+}
+
+static void
+ecore_ipc_post_event_client_del(Ecore_Ipc_Client *cl)
+{
+   Ecore_Ipc_Event_Client_Del *ev;
+
+   if (cl->delete_me) return;
+
+   ev = calloc(1, sizeof(Ecore_Ipc_Event_Client_Del));
+   EINA_SAFETY_ON_NULL_RETURN(ev);
+
+   cl->event_count++;
+   ev->client = cl;
+   ecore_event_add(ECORE_IPC_EVENT_CLIENT_DEL, ev,
+   _ecore_ipc_event_client_del_free, NULL);
+}
+
+static Ecore_Ipc_Client *
+ecore_ipc_client_add(Ecore_Ipc_Server *svr)
+{
+   Ecore_Ipc_Client *cl;
+
+   cl = calloc(1, sizeof(Ecore_Ipc_Client));
+   EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
+   cl->svr = svr;
+   ECORE_MAGIC_SET(cl, ECORE_MAGIC_IPC_CLIENT);
+   svr->clients = eina_list_append(svr->clients, cl);
+
+   return cl;
+}
+
 EAPI int
 ecore_ipc_init(void)
 {
@@ -784,29 +862,14 @@ _ecore_ipc_event_client_add(void *data EINA_UNUSED, int 
ev_type EINA_UNUSED, voi
if (!eina_list_data_find(servers, svr)) return ECORE_CALLBACK_RENEW;
/* handling code here */
  {
-Ecore_Ipc_Client *cl;
+Ecore_Ipc_Client *cl = ecore_ipc_client_add(svr);
 
-cl = calloc(1, sizeof(Ecore_Ipc_Client));
 if (!cl) return ECORE_CALLBACK_CANCEL;
-cl->svr = svr;
-ECORE_MAGIC_SET(cl, ECORE_MAGIC_IPC_CLIENT);
 cl->client = e->client;
 cl->max_buf_size = 32 * 1024;
 ecore_con_client_data_set(cl->client, (void *)cl);
-svr->clients = eina_list_append(svr->clients, cl);
-if (!cl->delete_me)
-  {
- Ecore_Ipc_Event_Client_Add *e2;
 
- e2 = calloc(1, sizeof(Ecore_Ipc_Event_Client_Add));
- if (e2)
-   {
-  cl->event_count++;
-  e2->client = cl;
-  ecore_event_add(ECORE_IPC_EVENT_CLIENT_ADD, e2,
-  _ecore_ipc_event_client_add_free, NULL);
-   }
-  }
+ecore_ipc_post_event_client_add(cl);
  }
return ECORE_CALLBACK_CANCEL;
 }
@@ -827,21 +890,8 @@ _ecore_ipc_event_client_del(void *data EINA_UNUSED, int 
ev_type EINA_UNUSED, voi
 
 cl = ecore_con_client_data_get(e->client);
 cl->client = NULL;
-  {
- Ecore_Ipc_Event_Client_Del *e2;
 
- if (!cl->delete_me)
-   {
-  e2 = calloc(1, sizeof(Ecore_Ipc_Event_Client_Del));
-  if (e2)
-{
-   cl->event_count++;
-   e2->client = cl;
-   ecore_event_add(ECORE_IPC_EVENT_CLIENT_DEL, e2,
-   _ecore_ipc_event_client_del_free, NULL);
-}
-   }
-  }
+ecore_ipc_post_event_client_del(cl);
  }
return ECORE_CALLBACK_CANCEL;
 }
@@ -858,19 +908,8 @@ _ecore_ipc_event_server_add(void 

[EGIT] [core/efl] master 03/03: ecore_ipc: remove unused headers.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 54ca7db20b1cc5082496b380c09e1d6e6d34367a
Author: Gustavo Sverzut Barbieri 
Date:   Tue Nov 22 17:31:56 2016 -0200

ecore_ipc: remove unused headers.
---
 src/lib/ecore_ipc/ecore_ipc.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index ed732c4..7c886e9 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -5,14 +5,6 @@
 #include 
 #include 
 
-#ifdef HAVE_NETINET_IN_H
-# include 
-#endif
-
-#ifdef HAVE_WINSOCK2_H
-# include 
-#endif
-
 #include 
 #include 
 #include 

-- 




[EGIT] [core/efl] master 04/27: win: Make X windows border when using CSD mode

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 63fcd3d83114c2220bd9914d105f3a0c94c2f38a
Author: Jean-Philippe Andre 
Date:   Fri Oct 28 15:26:59 2016 +0900

win: Make X windows border when using CSD mode
---
 src/lib/elementary/efl_ui_win.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index a30d98d..fd2752f 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -3234,6 +3234,9 @@ _elm_win_xwin_update(Efl_Ui_Win_Data *sd)
if (sd->wm_rot.preferred_rot != -1)
  ecore_evas_wm_rotation_preferred_rotation_set(sd->ee,
sd->wm_rot.preferred_rot);
+
+   if (sd->need_frame)
+ TRAP(sd, borderless_set, EINA_TRUE);
 }
 
 #endif
@@ -5317,7 +5320,7 @@ _efl_ui_win_center(Eo *obj, Efl_Ui_Win_Data *sd, 
Eina_Bool h, Eina_Bool v)
 }
 
 EOLIAN static void
-_efl_ui_win_borderless_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool 
borderless)
+_efl_ui_win_borderless_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Bool borderless)
 {
 
Eina_Bool need_frame = sd->need_frame && !sd->fullscreen;
@@ -5335,7 +5338,9 @@ _efl_ui_win_borderless_set(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *sd, Eina_Bool b
   evas_object_show(sd->frame_obj);
  }
 
-   TRAP(sd, borderless_set, borderless);
+   if (!sd->need_frame)
+ TRAP(sd, borderless_set, borderless);
+   _elm_win_resize_objects_eval(obj);
 #ifdef HAVE_ELEMENTARY_X
_elm_win_xwin_update(sd);
 #endif

-- 




[EGIT] [core/efl] master 02/02: ecore_ipc_server_example: delete clients when they disconnect.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 7b2faeadb156901fcb972f913e86bb970badc30a
Author: Gustavo Sverzut Barbieri 
Date:   Tue Nov 22 21:58:14 2016 -0200

ecore_ipc_server_example: delete clients when they disconnect.

if a client disconnect we must delete them explicitly.
---
 src/examples/ecore/ecore_ipc_server_example.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/examples/ecore/ecore_ipc_server_example.c 
b/src/examples/ecore/ecore_ipc_server_example.c
index 124e555..1f3ed11 100644
--- a/src/examples/ecore/ecore_ipc_server_example.c
+++ b/src/examples/ecore/ecore_ipc_server_example.c
@@ -32,6 +32,7 @@ _client_del(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event)
Ecore_Ipc_Event_Client_Del *ev = event;
 
printf("INFO: client deleted %p: %s\n", ev->client, 
ecore_ipc_client_ip_get(ev->client));
+   ecore_ipc_client_del(ev->client);
return ECORE_CALLBACK_RENEW;
 }
 

-- 




[EGIT] [core/efl] master 01/04: ecore_ipc: fix copy & paste error.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 915034b9e0574ca98f3397101d08db3cca218058
Author: Gustavo Sverzut Barbieri 
Date:   Tue Nov 22 23:20:22 2016 -0200

ecore_ipc: fix copy & paste error.
---
 src/lib/ecore_ipc/ecore_ipc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 5247839..d8515b0 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -1353,7 +1353,7 @@ _ecore_ipc_event_server_add_free(void *data EINA_UNUSED, 
void *ev)
 static void
 _ecore_ipc_event_server_del_free(void *data EINA_UNUSED, void *ev)
 {
-   Ecore_Ipc_Event_Server_Add *e;
+   Ecore_Ipc_Event_Server_Del *e;
 
e = ev;
e->server->event_count--;

-- 




[EGIT] [core/enlightenment] master 01/01: add missing EINA_UNUSED for unused function parameters

2016-11-23 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit ddaf5b9a20370cef29486abb8f260e60d8a58886
Author: Chris Michael 
Date:   Wed Nov 23 11:02:27 2016 -0500

add missing EINA_UNUSED for unused function parameters

Signed-off-by: Chris Michael 
---
 src/modules/wl_desktop_shell/xdg6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/wl_desktop_shell/xdg6.c 
b/src/modules/wl_desktop_shell/xdg6.c
index 274b453..588ba11 100644
--- a/src/modules/wl_desktop_shell/xdg6.c
+++ b/src/modules/wl_desktop_shell/xdg6.c
@@ -404,7 +404,7 @@ _e_xdg_popup_grab_dismiss(E_Client *ec)
 }
 
 static void
-_e_xdg_popup_cb_grab(struct wl_client *client EINA_UNUSED, struct wl_resource 
*resource, struct wl_resource *seat, uint32_t serial)
+_e_xdg_popup_cb_grab(struct wl_client *client EINA_UNUSED, struct wl_resource 
*resource, struct wl_resource *seat EINA_UNUSED, uint32_t serial EINA_UNUSED)
 {
E_Client *ec;
 

-- 




[EGIT] [core/efl] master 01/03: add ecore_ipc_{client,server}_example.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 06263c9eb38685ec6815622237d203f7e8de5cae
Author: Gustavo Sverzut Barbieri 
Date:   Tue Nov 22 17:27:16 2016 -0200

add ecore_ipc_{client,server}_example.

Ecore_Ipc lacked examples so we can explore its API (and check if it
work :-P)
---
 src/examples/ecore/.gitignore |   2 +
 src/examples/ecore/Makefile.am|  20 ++-
 src/examples/ecore/ecore_ipc_client_example.c | 224 ++
 src/examples/ecore/ecore_ipc_server_example.c | 214 
 4 files changed, 458 insertions(+), 2 deletions(-)

diff --git a/src/examples/ecore/.gitignore b/src/examples/ecore/.gitignore
index a00f15f..e8e8aa9 100644
--- a/src/examples/ecore/.gitignore
+++ b/src/examples/ecore/.gitignore
@@ -63,3 +63,5 @@
 /*.pem
 /efl_net_session_example
 /efl_net_control_example
+/ecore_ipc_server_example
+/ecore_ipc_client_example
diff --git a/src/examples/ecore/Makefile.am b/src/examples/ecore/Makefile.am
index 2fa4350..bd5796a 100644
--- a/src/examples/ecore/Makefile.am
+++ b/src/examples/ecore/Makefile.am
@@ -14,6 +14,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/ecore_imf \
 -I$(top_srcdir)/src/lib/ecore_imf_evas \
 -I$(top_srcdir)/src/lib/ecore_con \
+-I$(top_srcdir)/src/lib/ecore_ipc \
 -I$(top_srcdir)/src/lib/ecore_evas \
 -I$(top_srcdir)/src/lib/ecore_audio \
 -I$(top_builddir)/src/lib/eina \
@@ -29,6 +30,7 @@ AM_CPPFLAGS = \
 -I$(top_builddir)/src/lib/ecore_imf \
 -I$(top_builddir)/src/lib/ecore_imf_evas \
 -I$(top_builddir)/src/lib/ecore_con \
+-I$(top_builddir)/src/lib/ecore_ipc \
 -I$(top_builddir)/src/lib/ecore_evas \
 -I$(top_builddir)/src/lib/ecore_audio \
 -DPACKAGE_EXAMPLES_DIR=\".\" \
@@ -90,7 +92,9 @@ efl_net_dialer_udp_example \
 efl_net_socket_ssl_dialer_example \
 efl_net_socket_ssl_server_example \
 efl_net_session_example \
-efl_net_control_example
+efl_net_control_example \
+ecore_ipc_server_example \
+ecore_ipc_client_example
 
 
 ECORE_COMMON_LDADD = \
@@ -129,6 +133,10 @@ ECORE_CON_COMMON_LDADD = \
 $(top_builddir)/src/lib/ecore_con/libecore_con.la \
 $(ECORE_COMMON_LDADD)
 
+ECORE_IPC_COMMON_LDADD = \
+$(top_builddir)/src/lib/ecore_ipc/libecore_ipc.la \
+$(ECORE_CON_COMMON_LDADD)
+
 ecore_animator_example_SOURCES = ecore_animator_example.c
 ecore_animator_example_LDADD = $(ECORE_EVAS_COMMON_LDADD)
 
@@ -342,6 +350,12 @@ efl_net_session_example_LDADD = $(ECORE_CON_COMMON_LDADD)
 efl_net_control_example_SOURCES = efl_net_control_example.c
 efl_net_control_example_LDADD = $(ECORE_CON_COMMON_LDADD)
 
+ecore_ipc_server_example_SOURCES = ecore_ipc_server_example.c
+ecore_ipc_server_example_LDADD = $(ECORE_IPC_COMMON_LDADD)
+
+ecore_ipc_client_example_SOURCES = ecore_ipc_client_example.c
+ecore_ipc_client_example_LDADD = $(ECORE_IPC_COMMON_LDADD)
+
 SRCS = \
 ecore_animator_example.c \
 ecore_buffer_example.c \
@@ -401,7 +415,9 @@ efl_net_dialer_udp_example.c \
 efl_net_socket_ssl_dialer_example.c \
 efl_net_socket_ssl_server_example.c \
 efl_net_session_example.c \
-efl_net_control_example.c
+efl_net_control_example.c \
+ecore_ipc_server_example.c \
+ecore_ipc_client_example.c
 
 %.pem:
echo -e "US\nOR\nPortland\nXPTO Ltd\n\nlocalhost\nroot@localhost\n" | 
openssl req -new -x509 -days 30 -nodes -out $@ -keyout $@
diff --git a/src/examples/ecore/ecore_ipc_client_example.c 
b/src/examples/ecore/ecore_ipc_client_example.c
new file mode 100644
index 000..a6379a1
--- /dev/null
+++ b/src/examples/ecore/ecore_ipc_client_example.c
@@ -0,0 +1,224 @@
+#include 
+#include 
+#include 
+
+static int retval = EXIT_SUCCESS;
+static Ecore_Ipc_Server *server = NULL;
+static Eina_Bool do_flush = EINA_FALSE;
+
+static Eina_Bool
+_server_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+   Ecore_Ipc_Event_Server_Add *ev = event;
+
+   printf("INFO: server added %p: %s\n", ev->server, 
ecore_ipc_server_ip_get(ev->server));
+
+   puts("INFO: start typing some lines of text to send to server...");
+
+   server = ev->server;
+
+   return ECORE_CALLBACK_RENEW;
+}
+
+static Eina_Bool
+_server_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+   Ecore_Ipc_Event_Server_Del *ev = event;
+
+   printf("INFO: server deleted %p: %s\n", ev->server, 
ecore_ipc_server_ip_get(ev->server));
+
+   server = NULL;
+   ecore_main_loop_quit();
+   return ECORE_CALLBACK_RENEW;
+}
+
+static Eina_Bool
+_server_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+   Ecore_Ipc_Event_Server_Data *ev = event;
+
+   printf("INFO: server data %p: %s\n"
+  "INFO:  - major: %d, minor: %d, ref: %d (to: %d)\n"
+  "INFO:  - response?: %d\n"
+  "INFO:  - size: %d\n"
+  "-- BEGIN DATA --\n",
+  ev->server, ecore_ipc_server_ip_get(ev->server),
+  ev->major, ev->minor, ev->ref, ev->ref_to,
+  ev->response,
+  

[EGIT] [core/efl] master 01/02: ecore_ipc_client_example: better lifecycle management.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit b52a0151b7e729004f3cbcb0e3a2c31da6b52968
Author: Gustavo Sverzut Barbieri 
Date:   Tue Nov 22 21:56:41 2016 -0200

ecore_ipc_client_example: better lifecycle management.

If the server is gone, immediately delete it, this exercises deleting
the server from inside its event.

Then, if the server was already deleted, do not do it again.

Also remove the shadow variable, keep only the global scope.
---
 src/examples/ecore/ecore_ipc_client_example.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/examples/ecore/ecore_ipc_client_example.c 
b/src/examples/ecore/ecore_ipc_client_example.c
index a6379a1..68ca537 100644
--- a/src/examples/ecore/ecore_ipc_client_example.c
+++ b/src/examples/ecore/ecore_ipc_client_example.c
@@ -15,8 +15,6 @@ _server_add(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event)
 
puts("INFO: start typing some lines of text to send to server...");
 
-   server = ev->server;
-
return ECORE_CALLBACK_RENEW;
 }
 
@@ -27,6 +25,7 @@ _server_del(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event)
 
printf("INFO: server deleted %p: %s\n", ev->server, 
ecore_ipc_server_ip_get(ev->server));
 
+   ecore_ipc_server_del(server);
server = NULL;
ecore_main_loop_quit();
return ECORE_CALLBACK_RENEW;
@@ -150,7 +149,6 @@ main(int argc, char **argv)
  ECORE_GETOPT_VALUE_NONE /* sentinel */
};
int args;
-   Ecore_Ipc_Server *server;
Ecore_Event_Handler *handlers[3];
 
ecore_init();
@@ -209,8 +207,11 @@ main(int argc, char **argv)
 
ecore_main_loop_begin();
 
-   ecore_ipc_server_del(server);
-   server = NULL;
+   if (server)
+ {
+ecore_ipc_server_del(server);
+server = NULL;
+ }
 
ecore_event_handler_del(handlers[0]);
ecore_event_handler_del(handlers[1]);

-- 




[EGIT] [core/efl] master 04/04: ecore_ipc: refactor client data processing in its own function.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit e6939ebc90187eb00660f2f3632fa007fa1baa49
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 00:01:14 2016 -0200

ecore_ipc: refactor client data processing in its own function.

When we move to efl_net we'll reuse the same function to process
incoming data, thus refactor the code in their own function so it can
be reused.
---
 src/lib/ecore_ipc/ecore_ipc.c | 48 +++
 1 file changed, 35 insertions(+), 13 deletions(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 296d614..d999d58 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -975,28 +975,23 @@ _ecore_ipc_event_server_del(void *data EINA_UNUSED, int 
ev_type EINA_UNUSED, voi
msg._member = _ecore_ipc_ddlt_int(d, cl->prev.i._member, md);
 
 static Eina_Bool
-_ecore_ipc_event_client_data(void *data EINA_UNUSED, int ev_type EINA_UNUSED, 
void *ev)
+ecore_ipc_client_data_process(Ecore_Ipc_Client *cl, void *data, int size, 
Eina_Bool *stolen)
 {
-   Ecore_Con_Event_Client_Data *e;
-   Ecore_Ipc_Server *svr;
-
-   e = ev;
-   svr = ecore_con_server_data_get(ecore_con_client_server_get(e->client));
-   if (!eina_list_data_find(servers, svr)) return ECORE_CALLBACK_RENEW;
-   /* handling code here */
- {
-Ecore_Ipc_Client *cl;
+   /* use e->data and e->size to reduce diff to original code */
+   struct { void *data; int size; } _e = { data, size }, *e = &_e;
+   Ecore_Ipc_Server *svr = ecore_ipc_client_server_get(cl);
+   *stolen = EINA_FALSE;
+   if (1)
+ { /* keep same identation as original code to help verification */
 Ecore_Ipc_Msg_Head msg;
 int offset = 0;
 unsigned char *buf;
 
-cl = ecore_con_client_data_get(e->client);
-
 if (!cl->buf)
   {
  cl->buf_size = e->size;
  cl->buf = e->data;
- e->data = NULL; /* take it out of the old event */
+ *stolen = EINA_TRUE;
   }
 else
   {
@@ -1126,6 +1121,33 @@ _ecore_ipc_event_client_data(void *data EINA_UNUSED, int 
ev_type EINA_UNUSED, vo
  cl->buf_size -= offset;
   }
  }
+
+   return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool
+_ecore_ipc_event_client_data(void *data EINA_UNUSED, int ev_type EINA_UNUSED, 
void *ev)
+{
+   Ecore_Con_Event_Client_Data *e;
+   Ecore_Ipc_Server *svr;
+
+   e = ev;
+   svr = ecore_con_server_data_get(ecore_con_client_server_get(e->client));
+   if (!eina_list_data_find(servers, svr)) return ECORE_CALLBACK_RENEW;
+   /* handling code here */
+ {
+Ecore_Ipc_Client *cl;
+Eina_Bool stolen;
+
+cl = ecore_con_client_data_get(e->client);
+
+ecore_ipc_client_data_process(cl, e->data, e->size, );
+if (stolen)
+  {
+ e->data = NULL;
+ e->size = 0;
+  }
+ }
return ECORE_CALLBACK_CANCEL;
 }
 

-- 




[EGIT] [core/efl] master 07/27: win: Handle move & resize with CSD on X

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 2147d5cb335840f3cdb3ef99bce1b819ae896fae
Author: Jean-Philippe Andre 
Date:   Mon Oct 31 15:30:18 2016 +0900

win: Handle move & resize with CSD on X

This is for client-side decorations on Xorg.

Mouse-based move and resize of the window now work fine, but
there are still a few glitches:

1- GL resize is awful (nothing much we can do)

2- Move/resize requests trigger a focus out event,
   this in turn changes the style of the window from focussed to
   unfocussed. This is thus different from what we see in Wayland
   (no focus state change at all) and in usual X11 (focus changes,
   but the frame keeps its focussed style).

   To counteract this effect, we prevent the frame from changing
   style on focus,out if we know we are moving or resizing. But
   we don't know that if the compositor moves/resizes (eg. with
   Alt key); The focus event happens too early, before the move
   or resize events. At least in E.
---
 src/lib/elementary/efl_ui_win.c | 86 -
 1 file changed, 60 insertions(+), 26 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index da68b2b..1353292 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -922,7 +922,7 @@ _elm_win_mouse_in(Ecore_Evas *ee)
if (!sd) return;
 
_elm_win_throttle_ok = EINA_TRUE;
-   if (sd->resizing) sd->resizing = EINA_FALSE;
+   sd->resizing = EINA_FALSE;
 #ifdef HAVE_ELEMENTARY_WL2
if ((sd->wl.win) && (sd->pointer.ee))
  {
@@ -1228,7 +1228,7 @@ _elm_win_focus_out(Ecore_Evas *ee)
evas_object_smart_callback_call(obj, SIG_FOCUS_OUT, NULL);
sd->focus_highlight.cur.visible = EINA_FALSE;
_elm_win_focus_highlight_reconfigure_job_start(sd);
-   if (sd->frame_obj)
+   if (sd->frame_obj && !sd->resizing)
  {
 edje_object_signal_emit(sd->frame_obj, "elm,action,unfocus", "elm");
  }
@@ -3609,29 +3609,40 @@ _elm_win_frame_cb_move_start(void *data,
  const char *sig EINA_UNUSED,
  const char *source EINA_UNUSED)
 {
-   int ox, oy;
-
-   ELM_WIN_DATA_GET(data, sd);
-
-   if (!sd) return;
+   ELM_WIN_DATA_GET_OR_RETURN(data, sd);
 
 #ifdef HAVE_ELEMENTARY_WL2
if (sd->wl.win)
- ecore_wl2_window_pointer_set(sd->wl.win, NULL,
-  sd->pointer.hot_x, sd->pointer.hot_y);
-#else
-   (void)source;
-#endif
+ {
+int ox, oy;
 
-   /* NB: Wayland handles moving surfaces by itself so we cannot
+ecore_wl2_window_pointer_set(sd->wl.win, NULL,
+ sd->pointer.hot_x, sd->pointer.hot_y);
+
+/* NB: Wayland handles moving surfaces by itself so we cannot
 * specify a specific x/y we want. Instead, we will pass in the
 * existing x/y values so they can be recorded as 'previous'
 * position. The new position will get updated automatically when
 * the move is finished */
 
-   edje_object_part_geometry_get(sd->frame_obj, "elm.spacer.opaque",
- , , NULL, NULL);
-   ecore_evas_wayland_move(sd->ee, ox, oy);
+edje_object_part_geometry_get(sd->frame_obj, "elm.spacer.opaque",
+  , , NULL, NULL);
+ecore_evas_wayland_move(sd->ee, ox, oy);
+ }
+#endif
+
+#ifdef HAVE_ELEMENTARY_X
+   if (sd->x.xwin)
+ {
+int x, y;
+
+sd->resizing = EINA_TRUE;
+ecore_x_pointer_ungrab();
+ecore_x_pointer_root_xy_get(, );
+ecore_x_netwm_moveresize_request_send(sd->x.xwin, x, y,
+  ECORE_X_NETWM_DIRECTION_MOVE, 1);
+ }
+#endif
 }
 
 static void
@@ -3640,9 +3651,7 @@ _elm_win_frame_cb_move_stop(void *data,
 const char *sig EINA_UNUSED,
 const char *source EINA_UNUSED)
 {
-   ELM_WIN_DATA_GET(data, sd);
-
-   if (!sd) return;
+   ELM_WIN_DATA_GET_OR_RETURN(data, sd);
 
 #ifdef HAVE_ELEMENTARY_WL2
if (sd->pointer.obj)
@@ -3655,7 +3664,6 @@ _elm_win_frame_cb_move_stop(void *data,
 #endif
 }
 
-#ifdef HAVE_ELEMENTARY_WL2
 struct _resize_info
 {
const char *name;
@@ -3677,7 +3685,6 @@ static struct _resize_info _border_corner[4] =
  { ELM_CURSOR_BOTTOM_RIGHT_CORNER, 10 },
  { ELM_CURSOR_TOP_RIGHT_CORNER, 9 },
 };
-#endif
 
 static void
 _elm_win_frame_obj_move(void *data,
@@ -3797,7 +3804,6 @@ _elm_win_frame_cb_resize_start(void *data,
const char *sig EINA_UNUSED,
const char *source)
 {
-#ifdef HAVE_ELEMENTARY_WL2
ELM_WIN_DATA_GET(data, sd);
int i;
 
@@ -3826,11 +3832,39 @@ _elm_win_frame_cb_resize_start(void *data,
  sd->resize_location = 0;
 
if 

[EGIT] [core/enlightenment] master 01/01: removed unused variable from luncher code and add missing EINA_UNUSED

2016-11-23 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit a3f2752fe07a10fa9f8d15858ae64a6b3dd66c4b
Author: Chris Michael 
Date:   Wed Nov 23 11:04:16 2016 -0500

removed unused variable from luncher code and add missing EINA_UNUSED

Signed-off-by: Chris Michael 
---
 src/modules/luncher/grid.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/modules/luncher/grid.c b/src/modules/luncher/grid.c
index 861610f..fb869be 100644
--- a/src/modules/luncher/grid.c
+++ b/src/modules/luncher/grid.c
@@ -6,7 +6,7 @@ static void _grid_resize_job(void *data);
 static void
 _grid_aspect(Instance *inst)
 {
-   Evas_Coord w, h, square, root, cell, size;
+   Evas_Coord w, h, square, size;
 
evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, 1, 
1);
if (!eina_list_count(inst->icons))
@@ -42,7 +42,7 @@ _grid_gadget_configure(Evas_Object *g)
 }
 
 static void
-_grid_instance_watch(void *data, E_Exec_Instance *ex, E_Exec_Watch_Type type)
+_grid_instance_watch(void *data, E_Exec_Instance *ex EINA_UNUSED, 
E_Exec_Watch_Type type)
 {
Icon *ic = data;
 
@@ -233,8 +233,7 @@ _grid_icon_mouse_out(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj, void *ev
 }
 
 static Evas_Object *
-_gengrid_icon_get(void *data, Evas_Object *obj,
-const char *part)
+_gengrid_icon_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part)
 {
Icon *ic = data;
if (strcmp(part, "elm.swallow.icon"))

-- 




[EGIT] [core/efl] master 06/27: win: Set proper cursor for resize borders (CSD in X)

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 2b50d56bba3f81a4183d265113dd260ffba8f9ec
Author: Jean-Philippe Andre 
Date:   Mon Oct 31 13:42:33 2016 +0900

win: Set proper cursor for resize borders (CSD in X)

They look horrible in E (X), why is the cursor theme not applied?
---
 src/lib/elementary/efl_ui_win.c | 31 +++
 1 file changed, 31 insertions(+)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index e3782eb..da68b2b 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -3945,6 +3945,16 @@ _elm_win_frame_pre_render(void *data, Evas *e 
EINA_UNUSED, void *ev EINA_UNUSED)
 }
 #endif
 
+static inline void
+_elm_object_part_cursor_set(Evas_Object *obj, Evas_Object *edj,
+const char *part, const char *cursor)
+{
+   Evas_Object *sub = (Evas_Object *) edje_object_part_object_get(edj, part);
+   if (!sub) return;
+
+   elm_object_sub_cursor_set(sub, obj, cursor);
+}
+
 static void
 _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *style)
 {
@@ -4035,6 +4045,27 @@ _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char 
*style)
edje_object_signal_callback_add
  (sd->frame_obj, "elm,action,menu", "elm", _elm_win_frame_cb_menu, obj);
 
+   if (!sd->pointer.obj)
+ {
+int i = sd->rot / 90;
+_elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.t",
+_border_side[(0 + i) % 4].name);
+_elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.b",
+_border_side[(2 + i) % 4].name);
+_elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.l",
+_border_side[(1 + i) % 4].name);
+_elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.r",
+_border_side[(3 + i) % 4].name);
+_elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.tl",
+_border_corner[(0 + i) % 4].name);
+_elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.tr",
+_border_corner[(3 + i) % 4].name);
+_elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.bl",
+_border_corner[(1 + i) % 4].name);
+_elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.br",
+_border_corner[(2 + i) % 4].name);
+ }
+
if (sd->title)
  {
 edje_object_part_text_escaped_set

-- 




[EGIT] [core/efl] master 03/04: ecore_file: use win api for delete folder

2016-11-23 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

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

commit 5e25b8037ca8858412627d76b6fe72e9c7279021
Author: Vyacheslav Reutskiy 
Date:   Wed Nov 23 15:58:45 2016 +0200

ecore_file: use win api for delete folder

The RemoveDirectory on Windows guarantee that given folder will be
delete.
---
 src/lib/ecore_file/ecore_file.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index 11c03c4..1b8b10a 100644
--- a/src/lib/ecore_file/ecore_file.c
+++ b/src/lib/ecore_file/ecore_file.c
@@ -296,7 +296,11 @@ ecore_file_mksubdirs(const char *base, const char 
**subdirs)
 EAPI Eina_Bool
 ecore_file_rmdir(const char *dir)
 {
+#ifdef _WIN32
+   if (RemoveDirectory(dir) < 0) return EINA_FALSE;
+#else
if (rmdir(dir) < 0) return EINA_FALSE;
+#endif /* _WIN32 */
return EINA_TRUE;
 }
 

-- 




[EGIT] [core/efl] master 02/03: docs: elm_toolbar: fill gaps in elm_toolbar eo file documentation

2016-11-23 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 23c9d74a8ce83a243d06d993100a02205288f7da
Author: Stefan Schmidt 
Date:   Wed Nov 23 11:43:39 2016 +0100

docs: elm_toolbar: fill gaps in elm_toolbar eo file documentation
---
 src/lib/elementary/elm_toolbar.eo  |  6 +++---
 src/lib/elementary/elm_toolbar_item.eo | 11 ++-
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/lib/elementary/elm_toolbar.eo 
b/src/lib/elementary/elm_toolbar.eo
index 783899b..bcaa0c2 100644
--- a/src/lib/elementary/elm_toolbar.eo
+++ b/src/lib/elementary/elm_toolbar.eo
@@ -28,6 +28,7 @@ class Elm.Toolbar (Elm.Widget, Elm.Interface_Scrollable, 
Efl.Orientation,
Elm.Interface.Atspi_Widget_Action, 
Elm.Interface.Atspi.Selection,
Efl.Ui.Clickable, Efl.Ui.Selectable)
 {
+   [[Elementary toolbar class]]
legacy_prefix: elm_toolbar;
eo_prefix: elm_obj_toolbar;
event_prefix: elm_toolbar;
@@ -374,8 +375,7 @@ class Elm.Toolbar (Elm.Widget, Elm.Interface_Scrollable, 
Efl.Orientation,
   Elm.Interface.Atspi.Selection.clear;
}
events {
-  item,focused;
-  item,unfocused;
+  item,focused; [[Called when toolbar item got focus]]
+  item,unfocused; [[Called when toolbar item lost focus]]
}
-
 }
diff --git a/src/lib/elementary/elm_toolbar_item.eo 
b/src/lib/elementary/elm_toolbar_item.eo
index 071d397..a98e1ee 100644
--- a/src/lib/elementary/elm_toolbar_item.eo
+++ b/src/lib/elementary/elm_toolbar_item.eo
@@ -25,6 +25,7 @@ struct Elm.Toolbar.Item.State
 
 class Elm.Toolbar.Item(Elm.Widget.Item)
 {
+  [[Elementary toolbar item class]]
   legacy_prefix: elm_toolbar_item;
   eo_prefix: elm_obj_toolbar_item;
   methods {
@@ -150,7 +151,7 @@ class Elm.Toolbar.Item(Elm.Widget.Item)
  ]]
 }
 values {
- separator: bool;
+ separator: bool; [[$true if the item is a separator, 
$false otherwise]]
 }
}
@property menu {
@@ -176,10 +177,10 @@ class Elm.Toolbar.Item(Elm.Widget.Item)
default item's icon and label will be used. It's the
behavior as \@ref elm_toolbar_item_state_unset.
  ]]
- return: bool;
+ return: bool; [[$true on success, $false otherwise]]
 }
 values {
- state: ptr(Elm.Toolbar.Item.State) @nullable;
+ state: ptr(Elm.Toolbar.Item.State) @nullable; [[Item 
state]]
 }
}
/*  init { FIXME
@@ -200,7 +201,7 @@ class Elm.Toolbar.Item(Elm.Widget.Item)
  @in format: string; [[Optional format of $img to pass to 
the image loader.]]
  @in key: string; [[Optional key of $img to pass to the 
image loader (eg. if $img is an edje file).]]
 }
-return: bool;
+return: bool; [[$true on success, $false otherwise]]
}
icon_file_set {
 [[Set the icon associated with $item to an image in a binary 
buffer.
@@ -212,7 +213,7 @@ class Elm.Toolbar.Item(Elm.Widget.Item)
  @in file: string; [[The file that contains the image.]]
  @in key: string; [[Optional key of $img to pass to the 
image loader (eg. if $img is an edje file).]]
 }
-return: bool;
+return: bool; [[$true on success, $false otherwise]]
}
state_add {
 [[Add a new state to $item.

-- 




[EGIT] [core/efl] master 05/27: ecore_evas/x: Inform WM about borders and shadows

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 4722b685cfb9343ffb240e6655c60cf2af8fcb54
Author: Jean-Philippe Andre 
Date:   Fri Oct 28 16:48:56 2016 +0900

ecore_evas/x: Inform WM about borders and shadows

This exploits the existing X Atom "GTK_FRAME_EXTENTS"
---
 src/lib/ecore_evas/Ecore_Evas.h |  9 +
 src/lib/ecore_evas/ecore_evas.c | 24 
 src/lib/ecore_evas/ecore_evas_private.h |  4 
 src/lib/ecore_x/Ecore_X_Atoms.h |  3 +++
 src/lib/ecore_x/ecore_x_atoms_decl.h|  7 +++
 src/lib/elementary/efl_ui_win.c | 24 
 src/modules/ecore_evas/engines/x/ecore_evas_x.c |  9 +
 7 files changed, 80 insertions(+)

diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index 3ffdab6..45dd047 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -2308,6 +2308,15 @@ EAPI voidecore_evas_draw_frame_set(Ecore_Evas 
*ee, Eina_Bool draw_frame)
 EAPI Eina_Bool   ecore_evas_draw_frame_get(const Ecore_Evas *ee) 
EINA_DEPRECATED;
 
 /**
+ * @brief Set shadow geometry for client-side decorations
+ *
+ * Note that the framespace contains both a shadow or glow around the window,
+ * and the window borders (title bar, etc...).
+ */
+EAPI voidecore_evas_shadow_geometry_set(Ecore_Evas *ee, int x, int y, 
int w, int h);
+EAPI voidecore_evas_shadow_geometry_get(const Ecore_Evas *ee, int *x, 
int *y, int *w, int *h);
+
+/**
  * @brief Associate the given object to this ecore evas.
  *
  * @param ee The Ecore_Evas to associate to @a obj
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index d3187ad..4400883 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2236,6 +2236,30 @@ ecore_evas_draw_frame_get(const Ecore_Evas *ee 
EINA_UNUSED)
return EINA_FALSE;
 }
 
+EAPI void
+ecore_evas_shadow_geometry_set(Ecore_Evas *ee, int l, int r, int t, int b)
+{
+   ECORE_EVAS_CHECK(ee);
+   ee->shadow.l = l;
+   ee->shadow.r = r;
+   ee->shadow.t = t;
+   ee->shadow.b = b;
+}
+
+EAPI void
+ecore_evas_shadow_geometry_get(const Ecore_Evas *ee, int *l, int *r, int *t, 
int *b)
+{
+   if (l) *l = 0;
+   if (r) *r = 0;
+   if (t) *t = 0;
+   if (b) *b = 0;
+   ECORE_EVAS_CHECK(ee);
+   if (l) *l = ee->shadow.l;
+   if (r) *r = ee->shadow.r;
+   if (t) *t = ee->shadow.t;
+   if (b) *b = ee->shadow.b;
+}
+
 EAPI void 
 ecore_evas_pointer_xy_get(const Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y)
 {
diff --git a/src/lib/ecore_evas/ecore_evas_private.h 
b/src/lib/ecore_evas/ecore_evas_private.h
index e4642c7..c1ea4c0 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -206,6 +206,10 @@ struct _Ecore_Evas
} req;
 
struct {
+  int  l, r, t, b;
+   } shadow;
+
+   struct {
   int  x, y;
} mouse;
 
diff --git a/src/lib/ecore_x/Ecore_X_Atoms.h b/src/lib/ecore_x/Ecore_X_Atoms.h
index 8fbe149..69d7f0d 100644
--- a/src/lib/ecore_x/Ecore_X_Atoms.h
+++ b/src/lib/ecore_x/Ecore_X_Atoms.h
@@ -348,4 +348,7 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_OPEN; /**< 
@since 1.18 */
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_COMPLETED; /**< @since 1.18 */
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_PROGRESS; /**< @since 1.18 */
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_STARTED; /**< @since 1.18 */
+
+/* Client-Side Decorations */
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_GTK_FRAME_EXTENTS; /**< @since 1.19 */
 #endif /* _ECORE_X_ATOMS_H */
diff --git a/src/lib/ecore_x/ecore_x_atoms_decl.h 
b/src/lib/ecore_x/ecore_x_atoms_decl.h
index 64b5764..4e95f2c 100644
--- a/src/lib/ecore_x/ecore_x_atoms_decl.h
+++ b/src/lib/ecore_x/ecore_x_atoms_decl.h
@@ -378,6 +378,10 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_COMPLETED = 0;
 EAPI Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_PROGRESS = 0;
 EAPI Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_STARTED = 0;
 
+/* Client-Side Decorations */
+EAPI Ecore_X_Atom ECORE_X_ATOM_GTK_FRAME_EXTENTS = 0;
+//EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_OPAQUE_REGION = 0;
+
 typedef struct _Atom_Item Atom_Item;
 
 struct _Atom_Item
@@ -706,5 +710,8 @@ const Atom_Item atom_items[] =
{ "_TEAMWORK_COMPLETED", _X_ATOM_TEAMWORK_COMPLETED },
{ "_TEAMWORK_PROGRESS", _X_ATOM_TEAMWORK_PROGRESS },
{ "_TEAMWORK_STARTED", _X_ATOM_TEAMWORK_STARTED },
+
+   { "_GTK_FRAME_EXTENTS", _X_ATOM_GTK_FRAME_EXTENTS },
+   //{ "_NET_WM_OPAQUE_REGION", _X_ATOM_NET_WM_OPAQUE_REGION },
 };
 
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index fd2752f..e3782eb 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1370,6 +1370,7 @@ _elm_win_opaque_update(Efl_Ui_Win_Data *sd)
else
  

[EGIT] [core/efl] master 03/03: docs: elm_index: fill gaps in elm_index eo file documentation

2016-11-23 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit ca56059af43ef0c0036922f289168828365cdad2
Author: Stefan Schmidt 
Date:   Wed Nov 23 11:46:01 2016 +0100

docs: elm_index: fill gaps in elm_index eo file documentation
---
 src/lib/elementary/elm_index.eo  | 10 +-
 src/lib/elementary/elm_index_item.eo |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/lib/elementary/elm_index.eo b/src/lib/elementary/elm_index.eo
index 539f691..d35f5f1 100644
--- a/src/lib/elementary/elm_index.eo
+++ b/src/lib/elementary/elm_index.eo
@@ -1,6 +1,7 @@
 class Elm.Index (Elm.Layout, Efl.Orientation,
  Efl.Ui.Clickable, Efl.Ui.Selectable)
 {
+   [[elementary index class]]
legacy_prefix: elm_index;
eo_prefix: elm_obj_index;
event_prefix: elm_index;
@@ -232,10 +233,9 @@ class Elm.Index (Elm.Layout, Efl.Orientation,
   Elm.Interface.Atspi_Accessible.children.get;
}
events {
-  changed;
-  delay,changed;
-  level,up;
-  level,down;
+  changed; [[Called when index changed]]
+  delay,changed; [[Called when delay changed]]
+  level,up; [[Called when level increased]]
+  level,down; [[Called when level decreased]]
}
-
 }
diff --git a/src/lib/elementary/elm_index_item.eo 
b/src/lib/elementary/elm_index_item.eo
index eb804cc..c2a8601 100644
--- a/src/lib/elementary/elm_index_item.eo
+++ b/src/lib/elementary/elm_index_item.eo
@@ -1,5 +1,6 @@
 class Elm.Index.Item(Elm.Widget.Item, Elm.Interface.Atspi_Widget_Action)
 {
+   [[Elementary index item class]]
legacy_prefix: elm_index_item;
eo_prefix: elm_obj_index_item;
methods {

-- 




[EGIT] [core/efl] master 02/03: ecore_ipc: log domain can be static, it's not shared with other files.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 302cf367221e868e79e05e885c54116920f63fa1
Author: Gustavo Sverzut Barbieri 
Date:   Tue Nov 22 17:31:13 2016 -0200

ecore_ipc: log domain can be static, it's not shared with other files.
---
 src/lib/ecore_ipc/ecore_ipc.c | 2 +-
 src/lib/ecore_ipc/ecore_ipc_private.h | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 0e6c286..ed732c4 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -37,7 +37,7 @@
 #define DLT_R1 14
 #define DLT_R2 15
 
-int _ecore_ipc_log_dom = -1;
+static int _ecore_ipc_log_dom = -1;
 
 /** This swap function are around just for backward compatibility do not 
remove ***/
 EAPI unsigned short
diff --git a/src/lib/ecore_ipc/ecore_ipc_private.h 
b/src/lib/ecore_ipc/ecore_ipc_private.h
index 89504d4..9399913 100644
--- a/src/lib/ecore_ipc/ecore_ipc_private.h
+++ b/src/lib/ecore_ipc/ecore_ipc_private.h
@@ -1,9 +1,6 @@
 #ifndef _ECORE_IPC_PRIVATE_H
 #define _ECORE_IPC_PRIVATE_H
 
-
-extern int _ecore_ipc_log_dom;
-
 #ifdef ECORE_IPC_DEFAULT_LOG_COLOR
 # undef ECORE_IPC_DEFAULT_LOG_COLOR
 #endif

-- 




[EGIT] [core/efl] master 01/01: eo: inc the special count

2016-11-23 Thread Marcel Hollerbach
bu5hm4n pushed a commit to branch master.

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

commit 70b24abff754bd39032dcdf94f0fd7ff1ab2402b
Author: Marcel Hollerbach 
Date:   Wed Nov 23 13:39:04 2016 +0100

eo: inc the special count

if there is a event the callback counter should be incremented not
decremented. This should fix a few crashes i found in edje, since edje
did not knew that a element was deletion.
---
 src/lib/eo/eo_base_class.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index ea22bb3..352cb8b 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -1225,7 +1225,7 @@ _efl_object_event_callback_array_priority_add(Eo *obj, 
Efl_Object_Data *pd,
_eo_callbacks_sorted_insert(pd, cb);
 #ifdef EFL_EVENT_SPECIAL_SKIP
for (it = cb->items.item_array; it->func; it++)
- _special_event_count_dec(pd, it);
+ _special_event_count_inc(pd, it);
 #endif
 
efl_event_callback_call(obj, EFL_EVENT_CALLBACK_ADD, (void *)array);

-- 




[EGIT] [core/enlightenment] master 02/02: Luncher: Add the second gadget to luncher: Luncher Grid.

2016-11-23 Thread Stephen okra Houston
okra pushed a commit to branch master.

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

commit 57f854bc594c3978792a3cf323f9858d5f814f52
Author: Stephen okra Houston 
Date:   Tue Nov 22 21:17:22 2016 -0600

Luncher: Add the second gadget to luncher: Luncher Grid.

Use this gadget on your desktop for a grid of icons to be used to launch 
applications.  The grid is simply a launcher and doesn't have all of the 
features that the bar has such as iconify, taskbar, styles, etc...  Please make 
sure to update your efl with this to get the related theme updates.
---
 src/modules/Makefile_luncher.mk |   1 +
 src/modules/luncher/bar.c   |  18 +-
 src/modules/luncher/grid.c  | 789 
 src/modules/luncher/luncher.h   |   4 +
 src/modules/luncher/mod.c   |   2 +
 5 files changed, 806 insertions(+), 8 deletions(-)

diff --git a/src/modules/Makefile_luncher.mk b/src/modules/Makefile_luncher.mk
index b8fa862..f7bcb63 100644
--- a/src/modules/Makefile_luncher.mk
+++ b/src/modules/Makefile_luncher.mk
@@ -15,6 +15,7 @@ src_modules_luncher_module_la_LDFLAGS = $(MOD_LDFLAGS)
 src_modules_luncher_module_la_SOURCES = src/modules/luncher/mod.c \
 src/modules/luncher/luncher.h \
 src/modules/luncher/bar.c \
+ src/modules/luncher/grid.c \
  src/modules/luncher/config.c
 
 PHONIES += luncher install-luncher
diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c
index cb5a5cf..5f34708 100644
--- a/src/modules/luncher/bar.c
+++ b/src/modules/luncher/bar.c
@@ -918,7 +918,8 @@ _bar_icon_add(Instance *inst, Efreet_Desktop *desktop, 
E_Client *non_desktop_cli
snprintf(ori, sizeof(ori), "e,state,off,%s", _bar_location_get(inst));
elm_layout_signal_emit(ic->o_layout, ori, "e");
msg = alloca(sizeof(Edje_Message_Int_Set));
-   msg->str = strdup(inst->cfg->style);
+   if (inst->cfg->style)
+ msg->str = strdup(inst->cfg->style);
edje_object_message_send(elm_layout_edje_get(ic->o_layout), 
EDJE_MESSAGE_STRING, 1, msg);
 
ic->o_icon = elm_icon_add(ic->o_layout);
@@ -1074,9 +1075,8 @@ _bar_cb_client_remove(void *data EINA_UNUSED, int type 
EINA_UNUSED, E_Event_Clie
  {
 Icon *ic = NULL;
 
-if (ev->ec)
-  ic = _bar_icon_match(inst, ev->ec);
-
+if (!inst->bar) continue;
+if (ev->ec) ic = _bar_icon_match(inst, ev->ec);
 if (ic)
   {
  if (ic->starting) elm_layout_signal_emit(ic->o_layout, 
"e,state,started", "e");
@@ -1117,6 +1117,7 @@ _bar_cb_exec_del(void *data EINA_UNUSED, int type 
EINA_UNUSED, E_Exec_Instance *
  {
 Icon *ic = NULL;
 
+if (!inst->bar) continue;
 if (ex->desktop)
   {
  ic = eina_hash_find(inst->icons_desktop_hash, 
ex->desktop->orig_path);
@@ -1181,8 +1182,8 @@ _bar_cb_exec_client_prop(void *data EINA_UNUSED, int type 
EINA_UNUSED, E_Event_C
 Icon *ic = NULL;
 char ori[32];
 
+if (!inst->bar) continue;
 ic = _bar_icon_match(inst, ev->ec);
-
 if (skip && !ic) continue;
 if (!skip)
   {
@@ -1275,9 +1276,8 @@ _bar_cb_exec_new(void *data EINA_UNUSED, int type, 
E_Exec_Instance *ex)
 Icon *ic = NULL;
 char ori[32];
 
-if (ec)
-  ic = _bar_icon_match(inst, ec);
-
+if (!inst->bar) continue;
+if (ec) ic = _bar_icon_match(inst, ec);
 if (ic)
   {
  if (skip) continue;
@@ -1519,6 +1519,7 @@ _bar_cb_update_icons(EINA_UNUSED void *data, EINA_UNUSED 
int ev_type, EINA_UNUSE
 
EINA_LIST_FOREACH(luncher_instances, l, inst)
  {
+if (!inst->bar) continue;
 if (inst->resize_job) return ECORE_CALLBACK_RENEW;
 inst->resize_job = ecore_job_add(_bar_resize_job, inst);
  }
@@ -1922,6 +1923,7 @@ bar_create(Evas_Object *parent, int *id, 
E_Gadget_Site_Orient orient EINA_UNUSED
*id = inst->cfg->id;
inst->inside = EINA_FALSE;
inst->effect = EINA_FALSE;
+   inst->bar = EINA_TRUE;
inst->icons_desktop_hash = eina_hash_string_superfast_new(NULL);
inst->icons_clients_hash = eina_hash_pointer_new(NULL);
inst->o_main = elm_layout_add(parent);
diff --git a/src/modules/luncher/grid.c b/src/modules/luncher/grid.c
new file mode 100644
index 000..861610f
--- /dev/null
+++ b/src/modules/luncher/grid.c
@@ -0,0 +1,789 @@
+#include "luncher.h"
+static Eina_List *handlers;
+static Elm_Gengrid_Item_Class _grid_icon_class;
+static void _grid_resize_job(void *data);
+
+static void
+_grid_aspect(Instance *inst)
+{
+   Evas_Coord w, h, square, root, cell, size;
+
+   evas_object_size_hint_aspect_set(inst->o_main, EVAS_ASPECT_CONTROL_BOTH, 1, 
1);
+   if (!eina_list_count(inst->icons))
+ return;
+   evas_object_geometry_get(inst->o_main, 0, 0, , );
+   size = 0;
+   if ((w + h) > 1)
+   

[EGIT] [core/enlightenment] master 01/02: Luncher: Make sure to correctly create config.

2016-11-23 Thread Stephen okra Houston
okra pushed a commit to branch master.

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

commit 5898477ceef03b91f36dc8d98f83726e302815da
Author: Stephen okra Houston 
Date:   Tue Nov 22 10:45:38 2016 -0600

Luncher: Make sure to correctly create config.
---
 src/modules/luncher/bar.c | 29 +++--
 1 file changed, 11 insertions(+), 18 deletions(-)

diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c
index 575a6f1..cb5a5cf 100644
--- a/src/modules/luncher/bar.c
+++ b/src/modules/luncher/bar.c
@@ -584,7 +584,6 @@ _bar_icon_mouse_up(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED
  }
else if (ev->button == 1 && !ic->in_order)
  {
-_bar_icon_preview_hide(ic);
 _bar_icon_preview_show(ic);
  }
 }
@@ -614,7 +613,7 @@ _bar_icon_preview_mouse_out(void *data, Evas *e 
EINA_UNUSED, Evas_Object *obj EI
if (current_preview_menu)
  return;
E_FREE_FUNC(ic->mouse_out_timer, ecore_timer_del);
-   ic->mouse_out_timer = ecore_timer_add(0.75, _bar_icon_preview_hide, ic);
+   ic->mouse_out_timer = ecore_timer_add(0.25, _bar_icon_preview_hide, ic);
 }
 
 static void
@@ -738,11 +737,7 @@ _bar_icon_preview_show(void *data)
orient = e_gadget_site_orient_get(e_gadget_site_get(ic->inst->o_main));
 
if (current_preview)
- {
-Icon *ico = evas_object_data_get(current_preview, "icon");
-
-_bar_icon_preview_hide(ico);
- }
+ _bar_icon_preview_hide(evas_object_data_get(current_preview, "icon"));
if (!eina_list_count(ic->execs) && !eina_list_count(ic->clients))
  return EINA_FALSE;
 
@@ -799,10 +794,10 @@ _bar_icon_preview_show(void *data)
 
e_gadget_util_ctxpopup_place(ic->inst->o_main, ic->preview, ic->o_layout);
evas_object_layer_set(ic->preview, E_LAYER_POPUP);
-   evas_object_show(ic->preview);
 
evas_object_data_del(ic->preview, "icon");
evas_object_data_set(ic->preview, "icon", ic);
+   evas_object_show(ic->preview);
current_preview = ic->preview;
 
return EINA_FALSE;
@@ -826,13 +821,9 @@ _bar_icon_mouse_in(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj, void *even
E_FREE_FUNC(ic->mouse_in_timer, ecore_timer_del);
if (eina_list_count(ic->execs) || eina_list_count(ic->clients))
  clients = EINA_TRUE;
-   if (current_preview && clients && !current_preview_menu)
- {
-Icon *ico = evas_object_data_get(current_preview, "icon");
-_bar_icon_preview_hide(ico);
-_bar_icon_preview_show(ic);
- }
-   else
+   if (clients && current_preview && !current_preview_menu)
+ _bar_icon_preview_show(ic);
+   else if (clients && !current_preview)
  ic->mouse_in_timer = ecore_timer_add(0.3, _bar_icon_preview_show, ic);
 }
   
@@ -842,8 +833,6 @@ _bar_icon_mouse_out(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj, void *eve
Icon *ic = data;
 
elm_object_tooltip_hide(obj);
-   if (!ic->preview)
- ic->active = EINA_FALSE;
E_FREE_FUNC(ic->mouse_in_timer, ecore_timer_del);
E_FREE_FUNC(ic->mouse_out_timer, ecore_timer_del);
ic->mouse_out_timer = ecore_timer_add(0.25, _bar_icon_preview_hide, ic);
@@ -1784,7 +1773,10 @@ _bar_order_update(void *data, E_Order *eo EINA_UNUSED)
 {
Instance *inst = data;
 
-   bar_recalculate(inst);
+   if (inst && inst->o_icon_con)
+ {
+bar_recalculate(inst);
+ }
 }
 
 static void
@@ -1866,6 +1858,7 @@ _conf_item_get(int *id)
else
  ci->id = -1;
ci->dir = eina_stringshare_add("default");
+   ci->style = eina_stringshare_add("default");
luncher_config->items = eina_list_append(luncher_config->items, ci);
 
return ci;

-- 




[EGIT] [core/efl] master 27/27: elm: Safely delete ecore poller in elm_config_shutdown

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 8c8cb0d34ff90682540bd25731d525578b67a4ea
Author: Jean-Philippe Andre 
Date:   Wed Nov 23 13:53:14 2016 +0900

elm: Safely delete ecore poller in elm_config_shutdown

This prevents some errors after elm_init / elm_shutdown / elm_init
---
 src/lib/elementary/elm_config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index bc3c25d..bd496ee 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -4325,6 +4325,7 @@ _elm_config_shutdown(void)
ELM_SAFE_FREE(_elm_config, _config_free);
ELM_SAFE_FREE(_elm_preferred_engine, eina_stringshare_del);
ELM_SAFE_FREE(_elm_accel_preference, eina_stringshare_del);
+   ELM_SAFE_FREE(_elm_cache_flush_poller, ecore_poller_del);
ELM_SAFE_FREE(_elm_profile, free);
_elm_font_overlays_del_free();
 

-- 




[EGIT] [core/efl] master 02/05: eo: Fix leak during shutdown()

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 3ad4e0bdfc5b989d1905f3f34166eb6291c55812
Author: Jean-Philippe Andre 
Date:   Wed Nov 23 15:24:02 2016 +0900

eo: Fix leak during shutdown()
---
 src/lib/eo/eo_add_fallback.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/eo/eo_add_fallback.c b/src/lib/eo/eo_add_fallback.c
index 63e98a3..e00d7e8 100644
--- a/src/lib/eo/eo_add_fallback.c
+++ b/src/lib/eo/eo_add_fallback.c
@@ -184,5 +184,8 @@ _efl_add_fallback_shutdown(void)
 _eo_call_stack_key = 0;
  }
 
+   _eo_call_stack_free(main_loop_stack);
+   main_loop_stack = NULL;
+
return EINA_TRUE;
 }

-- 




[EGIT] [core/efl] master 01/05: evas: Fix a few issues after init/shutdown/init

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 69a684cf0451fb24bb471e6ba6e32eca2727c49a
Author: Jean-Philippe Andre 
Date:   Wed Nov 23 14:56:44 2016 +0900

evas: Fix a few issues after init/shutdown/init

elm_suite would crash when CK_FORK=no is set, because evas was
badly initializing or shutting down. Note that elm_suite still
crashes with CK_FORK=no but valgrind doesn't complain.
---
 src/lib/evas/canvas/evas_async_events.c  | 12 +++-
 src/lib/evas/canvas/evas_main.c  |  2 +-
 src/lib/evas/common/evas_thread_render.c |  3 ++-
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/lib/evas/canvas/evas_async_events.c 
b/src/lib/evas/canvas/evas_async_events.c
index cdec83e..7d11172 100644
--- a/src/lib/evas/canvas/evas_async_events.c
+++ b/src/lib/evas/canvas/evas_async_events.c
@@ -98,8 +98,8 @@ evas_async_events_init(void)
 {
int filedes[2];
 
-   _init_evas_event++;
-   if (_init_evas_event > 1) return _init_evas_event;
+   if (_init_evas_event++)
+ return _init_evas_event;
 
_fd_pid = getpid();
 
@@ -136,8 +136,8 @@ evas_async_events_init(void)
 int
 evas_async_events_shutdown(void)
 {
-   _init_evas_event--;
-   if (_init_evas_event > 0) return _init_evas_event;
+   if (--_init_evas_event)
+ return _init_evas_event;
 
eina_condition_free(&_thread_cond);
eina_lock_free(&_thread_mutex);
@@ -145,9 +145,11 @@ evas_async_events_shutdown(void)
eina_lock_free(&_thread_feedback_mutex);
eina_spinlock_free(&_thread_id_lock);
 
+   free(async_queue_cache);
+   async_queue_cache = NULL;
+
eina_spinlock_free(_lock);
eina_inarray_flush(_queue);
-   free(async_queue_cache);
 
pipe_close(_fd_read);
pipe_close(_fd_write);
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index d05d754..48048cf 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -160,7 +160,7 @@ evas_shutdown(void)
evas_thread_shutdown();
_evas_preload_thread_shutdown();
evas_async_events_shutdown();
-   evas_common_shutdown();
+   //evas_common_shutdown();
evas_module_shutdown();
 
 #ifdef BUILD_LOADER_EET
diff --git a/src/lib/evas/common/evas_thread_render.c 
b/src/lib/evas/common/evas_thread_render.c
index d2d8581..03812b5 100644
--- a/src/lib/evas/common/evas_thread_render.c
+++ b/src/lib/evas/common/evas_thread_render.c
@@ -226,8 +226,9 @@ timeout_shutdown:
 
 evas_thread_worker = 0;
 
-eina_inarray_flush(_thread_queue);
 free(evas_thread_queue_cache);
+evas_thread_queue_cache = NULL;
+eina_inarray_flush(_thread_queue);
 
 eina_threads_shutdown();
 

-- 




[EGIT] [core/efl] master 01/01: elm: Mark icon as non-atspi

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 4da634c26f05662003f583039994fc92aaa97c2b
Author: Jean-Philippe Andre 
Date:   Wed Nov 23 14:02:01 2016 +0900

elm: Mark icon as non-atspi

This fixes elm_suite
---
 src/lib/elementary/efl_ui_win.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 427cf83..fd044d5 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -4036,6 +4036,7 @@ _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *style)
   efreet_desktop_free(d);
}
   }
+elm_interface_atspi_accessible_type_set(sd->icon, 
ELM_ATSPI_TYPE_DISABLED);
  }
 
edje_object_part_swallow(sd->frame_obj, "elm.swallow.icon", sd->icon);

-- 




[EGIT] [core/efl] master 21/27: win: Fix support for legacy themes (elm_bg)

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 0de72b44c1cc2798329c59bfe3399667c53c4859
Author: Jean-Philippe Andre 
Date:   Tue Nov 22 17:34:17 2016 +0900

win: Fix support for legacy themes (elm_bg)

For standard windows, we want to create an elm_bg object if
the theme is a legacy one. Otherwise the default theme
doesn't require an extra object, just a rectangle.
---
 data/elementary/themes/default.edc|  2 +-
 data/elementary/themes/edc/elm/bg.edc |  1 +
 src/lib/elementary/efl_ui_win.c   | 45 +--
 src/lib/elementary/elm_theme.c|  8 +++
 4 files changed, 53 insertions(+), 3 deletions(-)

diff --git a/data/elementary/themes/default.edc 
b/data/elementary/themes/default.edc
index 1d317c8..f26f8b3 100644
--- a/data/elementary/themes/default.edc
+++ b/data/elementary/themes/default.edc
@@ -4,7 +4,7 @@ externals.external: "elm";
 
 // theme api version. from 1.10 on we will check version to avoid
 // compat issues
-data.item: "version" "110";
+data.item: "version" "119";
 
 collections {
 #include "fonts.edc"
diff --git a/data/elementary/themes/edc/elm/bg.edc 
b/data/elementary/themes/edc/elm/bg.edc
index 2a0edc3..0254099 100644
--- a/data/elementary/themes/edc/elm/bg.edc
+++ b/data/elementary/themes/edc/elm/bg.edc
@@ -7,6 +7,7 @@
 */
 
 group { name: "elm/bg/base/default";
+   data.item: "elm_bg_version" "119";
images.image: "bevel_dark_out.png" COMP;
parts {
   part { name: "base"; type: RECT;
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 56e392a..537e1ae 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -260,6 +260,8 @@ struct _Efl_Ui_Win_Data
struct {
   Evas_Object *box, *edje;
   Eina_Boolforbidden : 1; /**< Marks some legacy APIs as not allowed. 
*/
+  Eina_Boolbg_must_swallow : 1; /**< Legacy theme compatibility 
(elm_bg for standard window) */
+  Eina_Boolbg_must_swallow_init : 1;
} legacy;
 
Eina_Boolurgent : 1;
@@ -6223,6 +6225,35 @@ _elm_win_bg_set(Efl_Ui_Win_Data *sd, Eo *bg)
return EINA_TRUE;
 }
 
+/* Legacy theme compatibility */
+static Eina_Bool
+_elm_win_bg_must_swallow(Efl_Ui_Win_Data *sd)
+{
+   if (EINA_UNLIKELY(!sd->legacy.bg_must_swallow_init))
+ {
+/* Overkill: check which theme version the standard elm_bg uses */
+Elm_Widget_Smart_Data *wd;
+const char *version;
+Eo *bg;
+int v;
+
+sd->legacy.bg_must_swallow = 1;
+sd->legacy.bg_must_swallow_init = 1;
+
+bg = elm_bg_add(sd->obj);
+wd = efl_data_scope_get(bg, ELM_WIDGET_CLASS);
+if (wd)
+  {
+ version = edje_object_data_get(wd->resize_obj, "elm_bg_version");
+ v = version ? atoi(version) : 0;
+ if (v >= 119) sd->legacy.bg_must_swallow = 0;
+  }
+evas_object_del(bg);
+ }
+
+   return sd->legacy.bg_must_swallow;
+}
+
 void
 _elm_win_standard_init(Eo *obj)
 {
@@ -6230,9 +6261,19 @@ _elm_win_standard_init(Eo *obj)
Efl_Ui_Win_Data *sd = efl_data_scope_get(obj, MY_CLASS);
 
ELM_SAFE_DEL(sd->bg);
-   sd->csd.need_bg_solid = EINA_TRUE;
 
-   /* FIXME: We should swallow a legacy elm_bg if not using the default theme 
*/
+   if (!_elm_win_bg_must_swallow(sd))
+ {
+sd->csd.need_bg_solid = EINA_TRUE;
+ }
+   else
+ {
+/* Legacy theme compatibility */
+DBG("Detected legacy theme used for elm_bg. Swallowing object.");
+sd->csd.need_bg_solid = EINA_FALSE;
+_elm_win_bg_set(sd, efl_add(ELM_BG_CLASS, obj));
+ }
+
_elm_win_frame_style_update(sd, 0, 1);
 }
 
diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c
index b57e20d..50f9868 100644
--- a/src/lib/elementary/elm_theme.c
+++ b/src/lib/elementary/elm_theme.c
@@ -33,6 +33,14 @@ _elm_theme_item_finalize(Elm_Theme_Files *files,
  Eina_Bool prepend,
  Eina_Bool istheme)
 {
+   /* Theme version history:
+* <110: legacy, had no version tag
+*  110: first supported version
+*  119: switched windows to always use border
+*   win group has no menu, no blocker
+*   border group has all required swallows (conformant, bg, win)
+*   data: "elm_bg_version" matches "version" ("119")
+*/
if (!f) return;
if (istheme)
  {

-- 




[EGIT] [core/efl] master 03/05: win: Factorize code for move_resize

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit ea7bbfe47dc1df5f51725be05eadf7ebce1d8361
Author: Jean-Philippe Andre 
Date:   Wed Nov 23 16:38:58 2016 +0900

win: Factorize code for move_resize

Oops, I probably went a bit overboard with this ~_~
---
 src/lib/elementary/efl_ui_win.c | 425 ++--
 1 file changed, 190 insertions(+), 235 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index fd044d5..f8a39b0 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -112,7 +112,6 @@ struct _Efl_Ui_Win_Data
   int  repeat_count;
   int  shot_counter;
} shot;
-   intresize_location;
int   *autodel_clear, rot;
struct
{
@@ -3603,88 +3602,81 @@ _elm_win_focus_highlight_init(Efl_Ui_Win_Data *sd)
_elm_win_focus_highlight_reconfigure_job_start(sd);
 }
 
-static void
-_elm_win_frame_cb_move_start(void *data,
- Evas_Object *obj EINA_UNUSED,
- const char *sig EINA_UNUSED,
- const char *source EINA_UNUSED)
-{
-   ELM_WIN_DATA_GET_OR_RETURN(data, sd);
+typedef struct _resize_info {
+   const char *source;
+   const char *cursor;
+   Efl_Ui_Win_Move_Resize_Mode mode;
+   int wl_location;
+#ifdef HAVE_ELEMENTARY_X
+#define XDIR(d) , ECORE_X_NETWM_DIRECTION_##d
+   Ecore_X_Netwm_Direction x_dir;
+#endif
+} resize_info;
+
+static const resize_info _resize_infos[8] = {
+   { "elm.event.resize.t",  ELM_CURSOR_TOP_SIDE, EFL_UI_WIN_MOVE_RESIZE_TOP, 1 
XDIR(SIZE_T) },
+   { "elm.event.resize.b",  ELM_CURSOR_BOTTOM_SIDE, 
EFL_UI_WIN_MOVE_RESIZE_BOTTOM, 2 XDIR(SIZE_B) },
+   { "elm.event.resize.l",  ELM_CURSOR_LEFT_SIDE, EFL_UI_WIN_MOVE_RESIZE_LEFT, 
4 XDIR(SIZE_L) },
+   { "elm.event.resize.r",  ELM_CURSOR_RIGHT_SIDE, 
EFL_UI_WIN_MOVE_RESIZE_RIGHT, 8 XDIR(SIZE_R) },
+   { "elm.event.resize.tl", ELM_CURSOR_TOP_LEFT_CORNER, 
EFL_UI_WIN_MOVE_RESIZE_TOP | EFL_UI_WIN_MOVE_RESIZE_LEFT, 5 XDIR(SIZE_TL) },
+   { "elm.event.resize.bl", ELM_CURSOR_BOTTOM_LEFT_CORNER, 
EFL_UI_WIN_MOVE_RESIZE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_LEFT, 6 XDIR(SIZE_BL) },
+   { "elm.event.resize.br", ELM_CURSOR_BOTTOM_RIGHT_CORNER, 
EFL_UI_WIN_MOVE_RESIZE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_RIGHT, 10 XDIR(SIZE_BR) 
},
+   { "elm.event.resize.tr", ELM_CURSOR_TOP_RIGHT_CORNER, 
EFL_UI_WIN_MOVE_RESIZE_TOP | EFL_UI_WIN_MOVE_RESIZE_RIGHT, 9 XDIR(SIZE_TR) },
+};
 
-#ifdef HAVE_ELEMENTARY_WL2
-   if (sd->wl.win)
- {
-int ox, oy;
+static inline Efl_Ui_Win_Move_Resize_Mode
+_move_resize_mode_rotate(int rotation, Efl_Ui_Win_Move_Resize_Mode mode)
+{
+   const Efl_Ui_Win_Move_Resize_Mode edges[4] = {
+  EFL_UI_WIN_MOVE_RESIZE_TOP,EFL_UI_WIN_MOVE_RESIZE_LEFT,
+  EFL_UI_WIN_MOVE_RESIZE_BOTTOM, EFL_UI_WIN_MOVE_RESIZE_RIGHT
+   };
 
-ecore_wl2_window_pointer_set(sd->wl.win, NULL,
- sd->pointer.hot_x, sd->pointer.hot_y);
+   const Efl_Ui_Win_Move_Resize_Mode corners[4] = {
+  EFL_UI_WIN_MOVE_RESIZE_TOP| EFL_UI_WIN_MOVE_RESIZE_LEFT,
+  EFL_UI_WIN_MOVE_RESIZE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_LEFT,
+  EFL_UI_WIN_MOVE_RESIZE_BOTTOM | EFL_UI_WIN_MOVE_RESIZE_RIGHT,
+  EFL_UI_WIN_MOVE_RESIZE_TOP| EFL_UI_WIN_MOVE_RESIZE_RIGHT,
+   };
 
-/* NB: Wayland handles moving surfaces by itself so we cannot
-* specify a specific x/y we want. Instead, we will pass in the
-* existing x/y values so they can be recorded as 'previous'
-* position. The new position will get updated automatically when
-* the move is finished */
+   const int i = rotation / 90;
+   int k;
 
-edje_object_part_geometry_get(sd->frame_obj, "elm.spacer.opaque",
-  , , NULL, NULL);
-ecore_evas_wayland_move(sd->ee, ox, oy);
- }
-#endif
+   for (k = 0; k < 4; k++)
+ if (mode == edges[k])
+   return edges[(k + i) % 4];
 
-#ifdef HAVE_ELEMENTARY_X
-   if (sd->x.xwin)
- {
-int x, y;
+   for (k = 0; k < 4; k++)
+ if (mode == corners[k])
+   return corners[(k + i) % 4];
 
-sd->resizing = EINA_TRUE;
-ecore_x_pointer_ungrab();
-ecore_x_pointer_root_xy_get(, );
-ecore_x_netwm_moveresize_request_send(sd->x.xwin, x, y,
-  ECORE_X_NETWM_DIRECTION_MOVE, 1);
- }
-#endif
+   return EFL_UI_WIN_MOVE_RESIZE_MOVE;
 }
 
-static void
-_elm_win_frame_cb_move_stop(void *data,
-Evas_Object *obj EINA_UNUSED,
-const char *sig EINA_UNUSED,
-const char *source EINA_UNUSED)
+static const resize_info *
+_resize_info_get(int rotation, Efl_Ui_Win_Move_Resize_Mode mode)
 {
-   

[EGIT] [core/efl] master 01/01: Luncher Theme: Add parts needed for the new Luncher grid.

2016-11-23 Thread Stephen okra Houston
okra pushed a commit to branch master.

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

commit 6a4ae67f63cb03e17bea8d4bbda7e262a1f67c6a
Author: Stephen okra Houston 
Date:   Tue Nov 22 21:20:07 2016 -0600

Luncher Theme:  Add parts needed for the new Luncher grid.
---
 data/elementary/themes/edc/elm/scroller.edc |  1 +
 data/elementary/themes/edc/luncher.edc  | 48 +
 2 files changed, 49 insertions(+)

diff --git a/data/elementary/themes/edc/elm/scroller.edc 
b/data/elementary/themes/edc/elm/scroller.edc
index 0227992..d468945 100644
--- a/data/elementary/themes/edc/elm/scroller.edc
+++ b/data/elementary/themes/edc/elm/scroller.edc
@@ -1343,6 +1343,7 @@ group { name: "elm/scroller/contents/default";
 
 group { name: "elm/scroller/base/popup/no_inset_shadow";
inherit: "elm/scroller/base/default";
+   alias: "elm/gengrid/base/no_inset_shadow";
parts {
   part { name: "elm.swallow.content"; type: SWALLOW;
  description { state: "default" 0.0;
diff --git a/data/elementary/themes/edc/luncher.edc 
b/data/elementary/themes/edc/luncher.edc
index 03278f1..2fc31e5 100644
--- a/data/elementary/themes/edc/luncher.edc
+++ b/data/elementary/themes/edc/luncher.edc
@@ -20,6 +20,25 @@ group { name: "e/gadget/luncher/bar";
}
 }
 
+group { name: "e/gadget/luncher/grid";
+   parts {
+  part { name: "e.swallow.drop"; type: SWALLOW;
+ description { state: "default" 0.0;
+rel1.to: "e.swallow.grid";
+rel2.to: "e.swallow.grid";
+ }
+  }
+  part { name: "e.swallow.grid"; type: SWALLOW;
+ description { state: "default" 0.0;
+rel1.relative: 0.0 0.0;
+rel1.offset: 0 0;
+rel2.relative: 1.0 1.0;
+rel2.offset: -1 -1;
+ }
+  }
+   }
+}
+
 group { name: "e/gadget/luncher/icon";
script {
   public urgent;
@@ -1053,3 +1072,32 @@ group { name: "elm/tooltip/base/luncher";
}
 }
 
+group { name: "elm/gengrid/item/luncher/default";
+   data.item: "contents" "elm.swallow.icon";
+   parts {
+  part { name: "base"; type: RECT;
+ description { state: "default" 0.0;
+rel1.to: "icon_area";
+rel1.offset: 0 0;
+rel2.to: "icon_area";
+rel2.offset: 0 0;
+color: 0 0 0 0;
+ }
+  }
+  part { name: "icon_area"; type: RECT;
+ description { state: "default" 0.0;
+fixed: 1 0;
+aspect: 1.0 1.0; aspect_preference: BOTH;
+rel1.offset: 0 0;
+rel2.offset: 0 0;
+ }
+  }
+  part { name: "elm.swallow.icon"; type: SWALLOW;
+ clip_to: "icon_area";
+ description { state: "default" 0.0;
+rel1.to: "icon_area";
+rel2.to: "icon_area";
+ }
+  }
+   }
+}

-- 




[EGIT] [core/efl] master 20/27: win: Remove menu from EDC group (fixes compatibility)

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 8c505e31917f7607c0b6607bb8c73fb39f1bce9f
Author: Jean-Philippe Andre 
Date:   Tue Nov 22 17:09:48 2016 +0900

win: Remove menu from EDC group (fixes compatibility)

This fixes compatibility with legacy themes (ie. every single
theme in existence beyond the default one, for now), by checking
where to swallow the menu widget. If a legacy theme is used,
the legacy swallow should be used, and it will all look correct.

Moving forward I hope to get rid of the internal edje object
entirely, except for compatibility reasons.
---
 data/elementary/themes/edc/elm/win.edc | 52 +-
 src/lib/elementary/efl_ui_win.c|  6 ++--
 2 files changed, 10 insertions(+), 48 deletions(-)

diff --git a/data/elementary/themes/edc/elm/win.edc 
b/data/elementary/themes/edc/elm/win.edc
index 292ff24..44ae634 100644
--- a/data/elementary/themes/edc/elm/win.edc
+++ b/data/elementary/themes/edc/elm/win.edc
@@ -1,66 +1,28 @@
 group { name: "elm/win/base/default";
parts {
-  part { name: "menu_bg"; type: RECT;
- description { state: "default" 0.0;
-color: 64 64 64 255;
-align: 0.5 0;
-rel2.to: "elm.swallow.menu";
- }
-  }
-  part { name: "elm.swallow.menu"; type: SWALLOW;
- description { state: "default" 0.0;
-rel2.relative: 1.0 0.0;
-visible: 0;
-align: 0.5 0;
-fixed: 1 1;
- }
- description { state: "visible" 0.0;
-inherit: "default" 0.0;
-visible: 1;
-fixed: 0 1;
- }
-  }
-  part { name: "client_clip"; type: RECT; mouse_events: 0;
- description { state: "default" 0.0;
+  rect { "client_clip"; nomouse;
+ desc { "default";
 rel1.to_y: "elm.swallow.contents";
 rel2.to_y: "elm.swallow.contents";
  }
   }
-  part { name: "elm.swallow.contents"; type: SWALLOW;
+  swallow { "elm.swallow.contents";
  clip_to: "client_clip";
- description { state: "default" 0.0;
-rel1 {
-   to_y: "elm.swallow.menu";
-   relative: 0.0 1.0;
-}
- }
   }
-  part { name: "blocker"; type: RECT;
- description { state: "default" 0.0;
+  rect { "blocker";
+ desc { "default";
 rel1.relative : 0.0 0.0;
 rel2.relative : 1.0 1.0;
 color: 64 64 64 150;
 visible: 0;
  }
- description { state: "visible" 0.0;
-inherit: "default" 0.0;
+ desc { "visible";
+inherit: "default";
 visible: 1;
  }
   }
}
programs {
-  program { name: "show_menu";
- signal: "elm,action,show_menu";
- source: "elm";
- action: STATE_SET "visible" 0.0;
- target: "elm.swallow.menu";
-  }
-  program { name: "hide_menu";
- signal: "elm,action,hide";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.swallow.menu";
-  }
   program { name: "hide_blocker";
  signal: "elm,action,hide_blocker";
  source: "elm";
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index ae8cd53..56e392a 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5320,10 +5320,10 @@ _efl_ui_win_fullscreen_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *sd)
 static inline Eo *
 _main_menu_swallow_get(Efl_Ui_Win_Data *sd)
 {
-   if (sd->frame_obj)
+   if (edje_object_part_exists(sd->legacy.edje, "elm.swallow.menu"))
  {
-if (edje_object_part_exists(sd->frame_obj, "elm.swallow.menu"))
-  return sd->frame_obj;
+DBG("Detected legacy theme, using legacy swallows.");
+return sd->legacy.edje;
  }
return sd->legacy.edje;
 }

-- 




[EGIT] [core/efl] master 19/27: win: Add frame to inline and socket windows

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit fc4c07e735efdfaaba07127a9fa3bee51b4ac15b
Author: Jean-Philippe Andre 
Date:   Tue Nov 22 14:23:46 2016 +0900

win: Add frame to inline and socket windows

This simplifies the cases by adding a border edje on all
windows except fake (damn fake windows). Shadows and borders
are always disabled on such windows (but we could easily change
that in the future).
---
 src/lib/elementary/efl_ui_win.c | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 967064c..ae8cd53 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -4113,13 +4113,20 @@ _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, 
Eina_Bool force_emit, Eina_Bool
 
if (!sd->frame_obj)
  {
-if ((sd->type == ELM_WIN_FAKE) ||
-(sd->type == ELM_WIN_INLINED_IMAGE) ||
-(sd->type == ELM_WIN_SOCKET_IMAGE)) return;
+if (sd->type == ELM_WIN_FAKE) return;
 CRI("no frame object!");
 abort(); // FIXME remove this
  }
+
_elm_win_need_frame_adjust(sd, ecore_evas_engine_name_get(sd->ee));
+   if ((sd->type == ELM_WIN_INLINED_IMAGE) ||
+   (sd->type == ELM_WIN_SOCKET_IMAGE))
+ {
+sd->csd.need_shadow = EINA_FALSE;
+sd->csd.need_borderless = EINA_TRUE;
+sd->csd.need_unresizable = EINA_TRUE;
+sd->csd.need_menu = EINA_FALSE;
+ }
 
borderless = sd->csd.need_borderless || (!sd->csd.need) || sd->fullscreen;
maximized = sd->maximized;
@@ -4304,9 +4311,7 @@ _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const 
char *engine)
/* this is for debug only - don't keep forever, it's not an api! */
s = getenv("EFL_WIN_FRAME_MODE");
 
-   if ((sd->type == ELM_WIN_FAKE) ||
-   (sd->type == ELM_WIN_INLINED_IMAGE) ||
-   (sd->type == ELM_WIN_SOCKET_IMAGE))
+   if (sd->type == ELM_WIN_FAKE)
  sd->csd.need = EINA_FALSE;
else if (eina_streq(s, "on"))
  sd->csd.need = EINA_TRUE;

-- 




[EGIT] [core/efl] master 02/04: eina_file_win32: close handler in case of error

2016-11-23 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

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

commit 56c202614b73f0e4c34d7a5cd070fe2b24d9217f
Author: Vyacheslav Reutskiy 
Date:   Wed Nov 23 15:43:40 2016 +0200

eina_file_win32: close handler in case of error

Func _eina_file_win32_first_file try to find the first file in directory
but if any file not found the file handler stay open, and func will
return error. But in this case while handle is open impossible to do
any actions. For example call eina_file_ls for empty folder, func will
return error and fold folder open. And if we try to remove this folder
Windows only mark it to delete, and remove it after the process is
complete.

Solution: close handler in error case.
---
 src/lib/eina/eina_file_win32.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_file_win32.c b/src/lib/eina/eina_file_win32.c
index 2df5956..54b5d90 100644
--- a/src/lib/eina/eina_file_win32.c
+++ b/src/lib/eina/eina_file_win32.c
@@ -160,7 +160,10 @@ _eina_file_win32_first_file(const char *dir, 
WIN32_FIND_DATA *fd)
((fd->cFileName[1] == '.') && (fd->cFileName[2] == '\0'
  {
 if (!FindNextFile(h, fd))
-  return INVALID_HANDLE_VALUE;
+  {
+ FindClose(h);
+ return INVALID_HANDLE_VALUE;
+  }
  }
 
return h;

-- 




[EGIT] [core/efl] master 11/27: theme: Move ews stuff to its own file

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 4b2d822733b4527f81cca2e07848254d361e38a1
Author: Jean-Philippe Andre 
Date:   Mon Nov 14 17:51:11 2016 +0900

theme: Move ews stuff to its own file

This move ews from border.edc to ews.edc
---
 data/elementary/themes/Makefile.am|   1 +
 data/elementary/themes/default.edc|   1 +
 data/elementary/themes/edc/elm/border.edc | 765 --
 data/elementary/themes/edc/elm/ews.edc| 722 
 4 files changed, 724 insertions(+), 765 deletions(-)

diff --git a/data/elementary/themes/Makefile.am 
b/data/elementary/themes/Makefile.am
index 8987864..529a3c7 100644
--- a/data/elementary/themes/Makefile.am
+++ b/data/elementary/themes/Makefile.am
@@ -106,6 +106,7 @@ elementary/themes/edc/elm/cursor.edc \
 elementary/themes/edc/elm/dayselector.edc \
 elementary/themes/edc/elm/diskselector.edc \
 elementary/themes/edc/elm/entry.edc \
+elementary/themes/edc/elm/ews.edc \
 elementary/themes/edc/elm/fileselector.edc \
 elementary/themes/edc/elm/flipselector.edc \
 elementary/themes/edc/elm/focus.edc \
diff --git a/data/elementary/themes/default.edc 
b/data/elementary/themes/default.edc
index 9756132..1d317c8 100644
--- a/data/elementary/themes/default.edc
+++ b/data/elementary/themes/default.edc
@@ -73,6 +73,7 @@ collections {
 #include "edc/elm/hover.edc"
 #include "edc/elm/cursor.edc"
 #include "edc/elm/code.edc"
+#include "edc/elm/ews.edc"
 
 // desktop in general
 #include "edc/wallpaper.edc"
diff --git a/data/elementary/themes/edc/elm/border.edc 
b/data/elementary/themes/edc/elm/border.edc
index 5f77f53..788e529 100644
--- a/data/elementary/themes/edc/elm/border.edc
+++ b/data/elementary/themes/edc/elm/border.edc
@@ -1,768 +1,3 @@
-group { name: "elm/ews/background/default";
-   images.image: "bg_radgrad.png" COMP;
-   images.image: "dot_pattern.png" COMP;
-   parts {
-  part { name: "bg";
- description { state: "default" 0.0;
-image.normal: "bg_radgrad.png";
-image.scale_hint: STATIC;
-fill.smooth: 0;
-ASPECT_FILL((1024/653))
- }
-  }
-  part { name: "pat";
- description { state: "default" 0.0;
-image.normal: "dot_pattern.png";
-TILED_PATTERN(256, 256)
- }
-  }
-   }
-}
-
-group { name: "elm/ews/decoration/default";
-   images.image: "win_shadow.png" COMP;
-   images.image: "win_glow.png" COMP;
-   images.image: "vgrad_med_lighter.png" COMP;
-   images.image: "vgrad_med_dark.png" COMP;
-   images.image: "bevel_out.png" COMP;
-   images.image: "shine.png" COMP;
-   images.image: "bevel_dark_out.png" COMP;
-   images.image: "sym_close_dark_normal.png" COMP;
-   images.image: "sym_close_dark_selected.png" COMP;
-   images.image: "sym_close_light_normal.png" COMP;
-   images.image: "sym_close_light_selected.png" COMP;
-   images.image: "sym_down_dark_normal.png" COMP;
-   images.image: "sym_down_dark_selected.png" COMP;
-   images.image: "sym_down_light_normal.png" COMP;
-   images.image: "sym_down_light_selected.png" COMP;
-   images.image: "sym_up_dark_normal.png" COMP;
-   images.image: "sym_up_dark_selected.png" COMP;
-   images.image: "sym_up_light_normal.png" COMP;
-   images.image: "sym_up_light_selected.png" COMP;
-   images.image: "glow_round_corners_small.png" COMP;
-   images.image: "knob_round_small_busy.png" COMP;
-   parts {
-  part { name: "shadow"; mouse_events: 0;
- description { state: "default" 0.0;
-rel1.to: "top";
-rel2.to: "bottom";
-WIN_SHADOW;
- }
- description { state: "hidden" 0.0;
-inherit: "default" 0.0;
-visible: 0;
- }
-  }
-  part { name: "glow"; mouse_events: 0;
- description { state: "default" 0.0;
-image.normal: "win_glow.png";
-image.border: 9 9 9 9;
-image.middle: 0;
-rel1.offset: -5  -5;
-rel1.to: "top";
-rel2.offset: 4 4;
-rel2.to: "bottom";
-fill.smooth: 0;
-color: 255 255 255 0;
-visible: 0;
- }
- description { state: "focused" 0.0;
-inherit: "default" 0.0;
-color: 255 255 255 255;
-visible: 1;
- }
-  }
-  part { name: "top";
- description { state: "default" 0.0;
-color_class: "border_top";
-image.normal: "vgrad_med_lighter.png";
-rel1.to_y: "title2";
-rel1.offset: -1 0;
-rel2.relative: 1.0 0.0;
-fill.smooth: 0;
-TILED_HORIZ(120)
- }
- description { state: "focused" 0.0;
-inherit: "default" 0.0;
-image.normal: "vgrad_med_dark.png";
- }
-  }
-  part { name: "bevel"; mouse_events: 0;
-  

[EGIT] [core/efl] master 25/27: win: Simplify elm_win_util_dialog_add

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 10e2b4417c44b2ceb01f0a9a7948885b23f81d13
Author: Jean-Philippe Andre 
Date:   Tue Nov 22 21:12:08 2016 +0900

win: Simplify elm_win_util_dialog_add

This now uses a similar code path as standard windows. Shouldn't
there be an EO class for dialogs, too?
---
 src/lib/elementary/efl_ui_win.c | 54 ++---
 1 file changed, 23 insertions(+), 31 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 20481d4..427cf83 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5114,37 +5114,6 @@ _efl_ui_win_noblank_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *pd)
return pd->noblank;
 }
 
-EAPI Evas_Object *
-elm_win_util_standard_add(const char *name, const char *title)
-{
-   return efl_add(EFL_UI_WIN_STANDARD_CLASS, NULL,
-  efl_text_set(efl_added, title),
-  efl_ui_win_name_set(efl_added, name)
-  );
-}
-
-EAPI Evas_Object *
-elm_win_util_dialog_add(Evas_Object *parent, const char *name, const char 
*title)
-{
-   Evas_Object *win, *bg;
-
-   win = elm_win_add(parent, name, ELM_WIN_DIALOG_BASIC);
-   if (!win) return NULL;
-
-   elm_win_title_set(win, title);
-   bg = elm_bg_add(win);
-   if (!bg)
- {
-evas_object_del(win);
-return NULL;
- }
-   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   elm_win_resize_object_add(win, bg);
-   evas_object_show(bg);
-
-   return win;
-}
-
 EOLIAN static void
 _efl_ui_win_role_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char 
*role)
 {
@@ -7583,6 +7552,29 @@ elm_win_aspect_get(const Eo *obj)
 
 /* legacy APIs */
 
+EAPI Evas_Object *
+elm_win_util_standard_add(const char *name, const char *title)
+{
+   return efl_add(EFL_UI_WIN_STANDARD_CLASS, NULL,
+  efl_text_set(efl_added, title),
+  efl_ui_win_name_set(efl_added, name));
+}
+
+EAPI Evas_Object *
+elm_win_util_dialog_add(Evas_Object *parent, const char *name, const char 
*title)
+{
+   Evas_Object *win;
+
+   win = efl_add(EFL_UI_WIN_CLASS, parent,
+ efl_text_set(efl_added, title),
+ efl_ui_win_name_set(efl_added, name),
+ efl_ui_win_type_set(efl_added, EFL_UI_WIN_DIALOG_BASIC));
+   if (!win) return NULL;
+
+   _elm_win_standard_init(win);
+   return win;
+}
+
 /**
   * @internal
   *

-- 




[EGIT] [tools/eflete] master 02/02: UTC: fix ewe_ruler tests

2016-11-23 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

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

commit 99c70042ba0255414571d012f8097eab3e5dcaad
Author: Andrii Kroitor 
Date:   Wed Nov 23 14:04:03 2016 +0200

UTC: fix ewe_ruler tests

Change-Id: Ia099d17f0d8fd17c4e2899e2bfea115e4af05099
---
 tests/test_ewe_ruler/ewe_ruler_add.c   | 4 
 tests/test_ewe_ruler/ewe_ruler_format_get.c| 4 
 tests/test_ewe_ruler/ewe_ruler_format_set.c| 4 
 tests/test_ewe_ruler/ewe_ruler_horizontal_get.c| 4 
 tests/test_ewe_ruler/ewe_ruler_horizontal_set.c| 6 ++
 tests/test_ewe_ruler/ewe_ruler_marker_absolute_get.c   | 4 
 tests/test_ewe_ruler/ewe_ruler_marker_absolute_set.c   | 4 
 tests/test_ewe_ruler/ewe_ruler_marker_add.c| 4 
 tests/test_ewe_ruler/ewe_ruler_marker_del.c| 4 
 tests/test_ewe_ruler/ewe_ruler_marker_relative_get.c   | 4 
 tests/test_ewe_ruler/ewe_ruler_marker_relative_set.c   | 4 
 tests/test_ewe_ruler/ewe_ruler_marker_style_get.c  | 4 
 tests/test_ewe_ruler/ewe_ruler_marker_style_set.c  | 4 
 tests/test_ewe_ruler/ewe_ruler_marker_visible_get.c| 4 
 tests/test_ewe_ruler/ewe_ruler_marker_visible_set.c| 4 
 tests/test_ewe_ruler/ewe_ruler_scale_add.c | 4 
 tests/test_ewe_ruler/ewe_ruler_scale_del.c | 4 
 tests/test_ewe_ruler/ewe_ruler_scale_middle_mark_get.c | 4 
 tests/test_ewe_ruler/ewe_ruler_scale_middle_mark_set.c | 4 
 tests/test_ewe_ruler/ewe_ruler_scale_visible_get.c | 4 
 tests/test_ewe_ruler/ewe_ruler_scale_visible_set.c | 4 
 tests/test_ewe_ruler/ewe_ruler_step_get.c  | 4 
 tests/test_ewe_ruler/ewe_ruler_step_set.c  | 4 
 tests/test_ewe_ruler/ewe_ruler_style_get.c | 4 
 tests/test_ewe_ruler/ewe_ruler_style_set.c | 4 
 tests/test_ewe_ruler/ewe_ruler_value_step_get.c| 4 
 tests/test_ewe_ruler/ewe_ruler_value_step_set.c| 4 
 tests/test_ewe_ruler/ewe_ruler_zero_offset_get.c   | 4 
 tests/test_ewe_ruler/ewe_ruler_zero_offset_set.c   | 4 
 29 files changed, 118 insertions(+)

diff --git a/tests/test_ewe_ruler/ewe_ruler_add.c 
b/tests/test_ewe_ruler/ewe_ruler_add.c
index a5cc33a..90e45f9 100644
--- a/tests/test_ewe_ruler/ewe_ruler_add.c
+++ b/tests/test_ewe_ruler/ewe_ruler_add.c
@@ -53,6 +53,7 @@
 EFLETE_TEST(ewe_ruler_add_test_p)
 {
logger_init();
+   elm_init(0, 0);
app_init();
Evas_Object *result, *parent;
parent = elm_win_add(NULL, "test", ELM_WIN_BASIC);
@@ -62,6 +63,7 @@ EFLETE_TEST(ewe_ruler_add_test_p)
 
evas_object_del(parent);
app_shutdown();
+   elm_shutdown();
 }
 END_TEST
 
@@ -89,6 +91,7 @@ END_TEST
 EFLETE_TEST(ewe_ruler_add_test_n)
 {
logger_init();
+   elm_init(0, 0);
app_init();
Evas_Object *result;
 
@@ -96,6 +99,7 @@ EFLETE_TEST(ewe_ruler_add_test_n)
ck_assert_msg(result == NULL, "Not NULL returned");
 
app_shutdown();
+   elm_shutdown();
 }
 END_TEST
 
diff --git a/tests/test_ewe_ruler/ewe_ruler_format_get.c 
b/tests/test_ewe_ruler/ewe_ruler_format_get.c
index 1a1d5be..d26f6b8 100644
--- a/tests/test_ewe_ruler/ewe_ruler_format_get.c
+++ b/tests/test_ewe_ruler/ewe_ruler_format_get.c
@@ -54,6 +54,7 @@
 EFLETE_TEST(ewe_ruler_format_get_test_p)
 {
logger_init();
+   elm_init(0, 0);
app_init();
Evas_Object *win = elm_win_util_standard_add("test", "test");
Evas_Object *ruler = ewe_ruler_add(win);
@@ -63,6 +64,7 @@ EFLETE_TEST(ewe_ruler_format_get_test_p)
 
evas_object_del(win);
app_shutdown();
+   elm_shutdown();
 }
 END_TEST
 
@@ -91,11 +93,13 @@ END_TEST
 EFLETE_TEST(ewe_ruler_format_get_test_n)
 {
logger_init();
+   elm_init(0, 0);
app_init();
 
ck_assert_msg(ewe_ruler_format_get(NULL, NULL) == NULL, "Getted format from 
NULL ruler object");
 
app_shutdown();
+   elm_shutdown();
 }
 END_TEST
 
diff --git a/tests/test_ewe_ruler/ewe_ruler_format_set.c 
b/tests/test_ewe_ruler/ewe_ruler_format_set.c
index 8ec5a5c..5e125ac 100644
--- a/tests/test_ewe_ruler/ewe_ruler_format_set.c
+++ b/tests/test_ewe_ruler/ewe_ruler_format_set.c
@@ -58,6 +58,7 @@
 EFLETE_TEST(ewe_ruler_format_set_test_p)
 {
logger_init();
+   elm_init(0, 0);
app_init();
Evas_Object *win = elm_win_util_standard_add("test", "test");
Evas_Object *ruler = ewe_ruler_add(win);
@@ -70,6 +71,7 @@ EFLETE_TEST(ewe_ruler_format_set_test_p)
 
evas_object_del(win);
app_shutdown();
+   elm_shutdown();
 }
 END_TEST
 
@@ -98,11 +100,13 @@ END_TEST
 EFLETE_TEST(ewe_ruler_format_set_test_n)
 {
logger_init();
+   elm_init(0, 0);
app_init();
 
ck_assert_msg(ewe_ruler_format_set(NULL, NULL, "%f") == EINA_FALSE, "Setted 
format for NULL ruler object");
 
app_shutdown();
+   elm_shutdown();
 }
 END_TEST
 
diff --git 

[EGIT] [tools/eflete] master 01/01: group_navigator: fix the segmentation fault about vector

2016-11-23 Thread Jaehwan Kim
jaehwan pushed a commit to branch master.

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

commit defc4cd852d3ee0d924eb4a7f228fa70328f3d2b
Author: Jaehwan Kim 
Date:   Wed Nov 23 11:27:52 2016 +0900

group_navigator: fix the segmentation fault about vector
---
 src/bin/common/string_common.c |  5 +++--
 src/bin/ui/workspace/group_navigator.c | 10 ++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/bin/common/string_common.c b/src/bin/common/string_common.c
index 26fb06f..5fd8cf4 100644
--- a/src/bin/common/string_common.c
+++ b/src/bin/common/string_common.c
@@ -118,9 +118,10 @@ static char *part_types[] = {
  "Mesh node",
  "Light",
  "Camera",
- "Snapshot"
+ "Snapshot",
+ "Vector"
 };
-static unsigned int part_types_count = 16;
+static unsigned int part_types_count = 17;
 
 const char *
 part_type_text_get(Edje_Part_Type part_type)
diff --git a/src/bin/ui/workspace/group_navigator.c 
b/src/bin/ui/workspace/group_navigator.c
index 2b7337b..b6e229f 100644
--- a/src/bin/ui/workspace/group_navigator.c
+++ b/src/bin/ui/workspace/group_navigator.c
@@ -98,6 +98,7 @@ static Edje_Part_Type part_types[] = {
  EDJE_PART_TYPE_TABLE,
  EDJE_PART_TYPE_PROXY,
  EDJE_PART_TYPE_SPACER,
+ EDJE_PART_TYPE_VECTOR,
  EDJE_PART_TYPE_NONE
 };
 static const char *program_actions[] = {
@@ -371,6 +372,9 @@ _part_content_get(void *data,
case EDJE_PART_TYPE_EXTERNAL:
   IMAGE_ADD_NEW(obj, content, "icon", "external");
   break;
+   case EDJE_PART_TYPE_VECTOR:
+  IMAGE_ADD_NEW(obj, content, "icon", "vector");
+  break;
   default:
   ERR("Unhandled part type");
   abort();
@@ -414,6 +418,9 @@ _part_content_get(void *data,
case EDJE_PART_TYPE_EXTERNAL:
   IMAGE_ADD_NEW(obj, content, "icon", "external");
   break;
+   case EDJE_PART_TYPE_VECTOR:
+  IMAGE_ADD_NEW(obj, content, "icon", "vector1");
+  break;
   default:
   ERR("Unhandled part type");
   abort();
@@ -456,6 +463,9 @@ _part_content_get(void *data,
case EDJE_PART_TYPE_EXTERNAL:
   IMAGE_ADD_NEW(obj, content, "icon", "external");
   break;
+   case EDJE_PART_TYPE_VECTOR:
+  IMAGE_ADD_NEW(obj, content, "icon", "vector2");
+  break;
   default:
   ERR("Unhandled part type");
   abort();

-- 




[EGIT] [core/efl] master 05/05: win: Add quick hack to restore mouse inputs in E Wayland

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit aaaf77965aae8e901b3f4c18f848cac9a3659ba1
Author: Jean-Philippe Andre 
Date:   Wed Nov 23 20:21:57 2016 +0900

win: Add quick hack to restore mouse inputs in E Wayland

E Wayland internal windows are a special beast. Somehow all their
events are intercepted by a special input_obj... but never get
propagated back to the elm_win.

Major side-effect: you get 2 window decorations. I believe there is
some dark magic inside E that tries to figure out when to show
a decoration and this conflicts with CSD.

But hey, it's late so I want to "fix" this and figure out the details
later.
---
 src/lib/elementary/efl_ui_win.c | 30 --
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 0537f50..9eb043c 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -222,6 +222,7 @@ struct _Efl_Ui_Win_Data
   Eina_Bool cur_bg_solid : 1;
   Eina_Bool cur_menu : 1;
   Eina_Bool cur_unresizable : 1;
+  Eina_Bool wayland : 1;
} csd;
 
struct {
@@ -4152,6 +4153,14 @@ _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, 
Eina_Bool force_emit, Eina_Bool
 sd->csd.need_menu = EINA_FALSE;
  }
 
+   /* TEMPORARY HACK FOR E WAYLAND
+* Hiding the shadows makes the input region (elm.spacer.opaque) have the
+* same geometry as the surface itself. This fixes inputs in E Wayland
+* internal windows. FIXME FIXME FIXME.
+*/
+   if (sd->csd.wayland)
+ sd->csd.need_shadow = EINA_FALSE;
+
borderless = sd->csd.need_borderless || (!sd->csd.need) || sd->fullscreen;
maximized = sd->maximized;
shadow = sd->csd.need_shadow && (!sd->fullscreen) && (!sd->maximized);
@@ -4165,6 +4174,7 @@ _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, 
Eina_Bool force_emit, Eina_Bool
  { \
 const char *sig = state ? s1 : s2; \
 edje_object_signal_emit(sd->frame_obj, sig, "elm"); \
+DBG("frame style emit: %p %s", sd->obj, sig); \
 sd->csd.cur_##state = state; \
 changed = EINA_TRUE; \
  } } while (0)
@@ -4335,6 +4345,9 @@ _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const 
char *engine)
/* this is for debug only - don't keep forever, it's not an api! */
s = getenv("EFL_WIN_FRAME_MODE");
 
+   sd->csd.wayland = (eina_streq(engine, ELM_WAYLAND_SHM) ||
+  eina_streq(engine, ELM_WAYLAND_EGL));
+
if (sd->type == ELM_WIN_FAKE)
  sd->csd.need = EINA_FALSE;
else if (eina_streq(s, "on"))
@@ -4342,10 +4355,7 @@ _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const 
char *engine)
else if (eina_streq(s, "off"))
  sd->csd.need = EINA_FALSE;
else
- {
-sd->csd.need = (eina_streq(engine, ELM_WAYLAND_SHM) ||
-  eina_streq(engine, ELM_WAYLAND_EGL));
- }
+ sd->csd.need = sd->csd.wayland;
 
/* for now CSD implies shadows as well */
sd->csd.need_shadow = sd->csd.need && (!sd->maximized);
@@ -5230,10 +5240,18 @@ EOLIAN static void
 _efl_ui_win_borderless_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Bool borderless)
 {
sd->csd.need_borderless = borderless ? 1 : 0;
+
+   /* TEMPORARY HACK FOR E WAYLAND
+* E Wayland sets the borderless flag on its internal windows, even though
+* it actually expects to "see" borders. Not sure who is supposed to create
+* them (E comp or the window).
+*/
+   if (trap && trap->borderless_set && sd->csd.wayland)
+ sd->csd.need_borderless = 0;
+
_elm_win_frame_style_update(sd, 0, 1);
 
-   if (!sd->csd.need)
- TRAP(sd, borderless_set, borderless);
+   TRAP(sd, borderless_set, borderless);
_elm_win_resize_objects_eval(obj);
 #ifdef HAVE_ELEMENTARY_X
_elm_win_xwin_update(sd);

-- 




[EGIT] [core/efl] master 04/05: win: Fix event forwarder ad//del

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 72694331b4dda53fbd74d68e882f47530097d943
Author: Jean-Philippe Andre 
Date:   Wed Nov 23 22:08:28 2016 +0900

win: Fix event forwarder ad//del

On event listener del we were adding one more forward
callback. Copy & pasta error, obviously.
---
 src/lib/elementary/efl_ui_win.c | 38 +++---
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index f8a39b0..0537f50 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1977,115 +1977,115 @@ _win_event_del_cb(void *data, const Efl_Event *ev)
 if (array[i].desc == EFL_EVENT_POINTER_MOVE)
   {
  if (!(--sd->event_forward.pointer_move))
-   efl_event_callback_add(sd->evas, array[i].desc,
+   efl_event_callback_del(sd->evas, array[i].desc,
  _evas_event_pointer_cb, win);
   }
 else if (array[i].desc == EFL_EVENT_POINTER_DOWN)
   {
  if (!(--sd->event_forward.pointer_down))
-   efl_event_callback_add(sd->evas, array[i].desc,
+   efl_event_callback_del(sd->evas, array[i].desc,
  _evas_event_pointer_cb, win);
   }
 else if (array[i].desc == EFL_EVENT_POINTER_UP)
   {
  if (!(--sd->event_forward.pointer_up))
-   efl_event_callback_add(sd->evas, array[i].desc,
+   efl_event_callback_del(sd->evas, array[i].desc,
  _evas_event_pointer_cb, win);
   }
 else if (array[i].desc == EFL_EVENT_POINTER_IN)
   {
  if (!(--sd->event_forward.pointer_in))
-   efl_event_callback_add(sd->evas, array[i].desc,
+   efl_event_callback_del(sd->evas, array[i].desc,
  _evas_event_pointer_cb, win);
   }
 else if (array[i].desc == EFL_EVENT_POINTER_OUT)
   {
  if (!(--sd->event_forward.pointer_out))
-   efl_event_callback_add(sd->evas, array[i].desc,
+   efl_event_callback_del(sd->evas, array[i].desc,
  _evas_event_pointer_cb, win);
   }
 else if (array[i].desc == EFL_EVENT_POINTER_CANCEL)
   {
  if (!(--sd->event_forward.pointer_cancel))
-   efl_event_callback_add(sd->evas, array[i].desc,
+   efl_event_callback_del(sd->evas, array[i].desc,
  _evas_event_pointer_cb, win);
   }
 else if (array[i].desc == EFL_EVENT_POINTER_WHEEL)
   {
  if (!(--sd->event_forward.pointer_wheel))
-   efl_event_callback_add(sd->evas, array[i].desc,
+   efl_event_callback_del(sd->evas, array[i].desc,
  _evas_event_pointer_cb, win);
   }
 else if (array[i].desc == EFL_EVENT_FINGER_MOVE)
   {
  if (!(--sd->event_forward.finger_move))
-   efl_event_callback_add(sd->evas, array[i].desc,
+   efl_event_callback_del(sd->evas, array[i].desc,
  _evas_event_pointer_cb, win);
   }
 else if (array[i].desc == EFL_EVENT_FINGER_DOWN)
   {
  if (!(--sd->event_forward.finger_down))
-   efl_event_callback_add(sd->evas, array[i].desc,
+   efl_event_callback_del(sd->evas, array[i].desc,
  _evas_event_pointer_cb, win);
   }
 else if (array[i].desc == EFL_EVENT_FINGER_UP)
   {
  if (!(--sd->event_forward.finger_up))
-   efl_event_callback_add(sd->evas, array[i].desc,
+   efl_event_callback_del(sd->evas, array[i].desc,
  _evas_event_pointer_cb, win);
   }
 else if (array[i].desc == EFL_EVENT_KEY_DOWN)
   {
  if (!(--sd->event_forward.key_down))
-   efl_event_callback_add(sd->evas, array[i].desc,
+   efl_event_callback_del(sd->evas, array[i].desc,
  _evas_event_key_cb, win);
   }
 else if (array[i].desc == EFL_EVENT_KEY_UP)
   {
  if (!(--sd->event_forward.key_up))
-   efl_event_callback_add(sd->evas, array[i].desc,
+   efl_event_callback_del(sd->evas, array[i].desc,
  _evas_event_key_cb, win);
   }
 else if (array[i].desc == EFL_CANVAS_EVENT_RENDER_POST)
   {
  if (!(--sd->event_forward.render_post))
-   evas_object_event_callback_add(sd->evas, 

[EGIT] [core/efl] master 02/07: efl_io_copier: do not emit data events if no data is available.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 44d95dd408e1584304e07dc26a5f98a20e351cf9
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 03:36:43 2016 -0200

efl_io_copier: do not emit data events if no data is available.
---
 src/lib/ecore/efl_io_copier.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore/efl_io_copier.c b/src/lib/ecore/efl_io_copier.c
index a47d3df..5646e0d 100644
--- a/src/lib/ecore/efl_io_copier.c
+++ b/src/lib/ecore/efl_io_copier.c
@@ -244,7 +244,7 @@ _efl_io_copier_read(Eo *o, Efl_Io_Copier_Data *pd)
pd->progress.read += rw_slice.len;
pd->done = EINA_FALSE;
 
-   if (!pd->destination)
+   if ((!pd->destination) && (eina_binbuf_length_get(pd->buf) > used))
  {
 /* Note: if there is a destination, dispatch data and line
  * from write since it will remove from binbuf and make it
@@ -303,6 +303,9 @@ _efl_io_copier_write(Eo *o, Efl_Io_Copier_Data *pd)
   efl_event_callback_call(o, EFL_IO_COPIER_EVENT_ERROR, );
 return;
  }
+   if (ro_slice.len == 0)
+ return;
+
pd->progress.written += ro_slice.len;
pd->done = EINA_FALSE;
 

-- 




[EGIT] [tools/enventor] master 02/02: autocomp: Add time with "LINEAR" to "transition".

2016-11-23 Thread Jaehyun Cho
jaehyun pushed a commit to branch master.

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

commit 7be5b79c1727f05e0c273dec3099e897e892f931
Author: Jaehyun Cho 
Date:   Wed Nov 23 21:15:48 2016 +0900

autocomp: Add time with "LINEAR" to "transition".
---
 data/autocomp/autocomp.src | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/data/autocomp/autocomp.src b/data/autocomp/autocomp.src
index 264a353..dfa844d 100644
--- a/data/autocomp/autocomp.src
+++ b/data/autocomp/autocomp.src
@@ -1254,7 +1254,7 @@ group "lexem" struct {
 }
 group "txt" var_array {
 count 1;
-value "string" string: "%s: 
LINEAR ;";
+value "string" string: "%s: 
LINEAR 1.0;";
 }
 value "cursor_offset" int: 1;
 value "line_back" int: 0;
@@ -1696,7 +1696,7 @@ group "lexem" struct {
}
group "txt" var_array {
count 1;
-   value "string" string: "%s: LINEAR ;";
+   value "string" string: "%s: LINEAR 1.0;";
}
value "cursor_offset" int: 1;
value "line_back" int: 0;

-- 




[EGIT] [core/efl] master 03/07: ecore_con: export function to create local path string.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 2f919345028ae54d7d8fa0b1460ab42bc929e6fd
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 12:10:31 2016 -0200

ecore_con: export function to create local path string.

The new efl_net code won't compose any path own its own, allowing the
user to connect to non-EFL systems.

However we need a way to use the same path Ecore_Con_Server does, so
we can reach it. Then export and use ecore_con_local_path_new() to do
exactly that.
---
 src/lib/ecore_con/Ecore_Con.h |  40 ++
 src/lib/ecore_con/ecore_con_local.c   | 220 --
 src/lib/ecore_con/ecore_con_local_win32.c |  52 ---
 3 files changed, 184 insertions(+), 128 deletions(-)

diff --git a/src/lib/ecore_con/Ecore_Con.h b/src/lib/ecore_con/Ecore_Con.h
index 7ed3b48..cc2dd2b 100644
--- a/src/lib/ecore_con/Ecore_Con.h
+++ b/src/lib/ecore_con/Ecore_Con.h
@@ -1098,6 +1098,42 @@ EAPI void 
ecore_con_socks_apply_always(Ecore_Con_Socks *ecs);
  */
 
 /**
+ * @brief Create a local path to connect the socket.
+ *
+ * In the old API, ecore_con_server_add() and
+ * ecore_con_server_connect() calculated a local path for connections
+ * using @c ECORE_CON_LOCAL_USER and @c ECORE_CON_LOCAL_SYSTEM, this
+ * function returns that path allocated so it can be used in
+ * applications that want to connect to that path without replicating
+ * its logic.
+ *
+ * @li If @a type is @c ECORE_CON_LOCAL_USER, the server will conect to
+ * the Unix socket. The path to the socket is taken from XDG_RUNTIME_DIR,
+ * if that is not set, then from HOME, even if this is not set, then from
+ * TMPDIR. If none is set, then path would be /tmp. From this path the
+ * function would connect to socket at "[path]/.ecore/[name]/[port]". If
+ * port is negetive, then to socket at "[path]/.ecore/[name]".
+ * @li If @a type is @c ECORE_CON_LOCAL_SYSTEM, the server will connect to
+ * Unix socket at "/tmp/.ecore_service|[name]|[port]". If port is negetive,
+ * then to Unix socket at "/tmp/.ecore_service|[name]".
+ *
+ * @param  is_system  If #EINA_TRUE, will be a system wide socket
+ *similar to @c ECORE_CON_LOCAL_SYSTEM. If #EINA_FALSE,
+ *then it's similar to @c ECORE_CON_LOCAL_USER.
+ * @param  name   Name to associate with the socket.  It is used when
+ *generating the socket name of a Unix socket,
+ *@c NULL will not be accepted.
+ * @param  port   Number to identify socket.  When a Unix socket is used,
+ *it becomes part of the socket name.
+ *
+ * @return NULL on failure or newly allocated path string on success,
+ * remember to free() it after usage.
+ *
+ * @since 1.19
+ */
+EAPI char *ecore_con_local_path_new(Eina_Bool is_system, const char *name, int 
port) EINA_WARN_UNUSED_RESULT EINA_MALLOC EINA_ARG_NONNULL(2);
+
+/**
  * @brief Create a server to listen for connections.
  *
  * @param  type The connection type.
@@ -1132,6 +1168,8 @@ EAPI void 
ecore_con_socks_apply_always(Ecore_Con_Socks *ecs);
  *
  * The @p data parameter can be fetched later using ecore_con_server_data_get()
  * or changed with ecore_con_server_data_set().
+ *
+ * @see ecore_con_local_path_new()
  */
 EAPI Ecore_Con_Server *ecore_con_server_add(Ecore_Con_Type type,
 const char *name, int port,
@@ -1182,6 +1220,8 @@ EAPI Ecore_Con_Server 
*ecore_con_server_add(Ecore_Con_Type type,
  *
  * The @p data parameter can be fetched later using ecore_con_server_data_get()
  * or changed with ecore_con_server_data_set().
+ *
+ * @see ecore_con_local_path_new()
  */
 EAPI Ecore_Con_Server *ecore_con_server_connect(Ecore_Con_Type type,
 const char *name, int port,
diff --git a/src/lib/ecore_con/ecore_con_local.c 
b/src/lib/ecore_con/ecore_con_local.c
index 546b6e0..3bf9b97 100644
--- a/src/lib/ecore_con/ecore_con_local.c
+++ b/src/lib/ecore_con/ecore_con_local.c
@@ -64,24 +64,15 @@ ecore_con_local_shutdown(void)
return _ecore_con_local_init_count;
 }
 
-int
-ecore_con_local_connect(Ecore_Con_Server *obj,
-Eina_Bool (*cb_done)(void *data, Ecore_Fd_Handler 
*fd_handler),
-void *data EINA_UNUSED)
+EAPI char *
+ecore_con_local_path_new(Eina_Bool is_system, const char *name, int port)
 {
-#ifndef HAVE_LOCAL_SOCKETS
-   return 0;
-#else
-   Efl_Network_Server_Data *svr = efl_data_scope_get(obj, 
EFL_NETWORK_SERVER_CLASS);
char buf[4096];
-   struct sockaddr_un socket_unix;
-   int curstate = 0;
const char *homedir;
-   int socket_unix_len;
 
-   buf[0] = '\0';
+   EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
 
-   if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_USER)
+   if 

[EGIT] [core/efl] master 24/27: win: Move modal blocker to border group

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 0fc049a3212b5a3199c380ea07e1afc03be98e2b
Author: Jean-Philippe Andre 
Date:   Tue Nov 22 20:29:58 2016 +0900

win: Move modal blocker to border group

Legacy themes are still supported with a fallback code.
---
 data/elementary/themes/colorclasses.edc   |   4 +
 data/elementary/themes/edc/elm/border.edc |  36 +
 data/elementary/themes/edc/elm/win.edc|  30 +---
 src/lib/elementary/efl_ui_win.c   | 120 --
 4 files changed, 105 insertions(+), 85 deletions(-)

diff --git a/data/elementary/themes/colorclasses.edc 
b/data/elementary/themes/colorclasses.edc
index f273d34..5c2a572 100644
--- a/data/elementary/themes/colorclasses.edc
+++ b/data/elementary/themes/colorclasses.edc
@@ -390,6 +390,10 @@ color_classes {
   color: 64 64 64 255;
   desc: "Background color of a standard window";
}
+   color_class { "elm/win/blocker";
+  color: 32 32 32 128;
+  desc: "Overlay color for windows with modal children (blocked)";
+   }

 // modules
color_class { name: "module_label";
diff --git a/data/elementary/themes/edc/elm/border.edc 
b/data/elementary/themes/edc/elm/border.edc
index 481dc93..5b2b6bc 100644
--- a/data/elementary/themes/edc/elm/border.edc
+++ b/data/elementary/themes/edc/elm/border.edc
@@ -114,6 +114,7 @@ group { name: "elm/border/base/default";
 fixed: 0 1;
  }
   }
+
   /* application contents - spacer and clipper (without main menu) */
   spacer { "client_spacer";
  desc { "default";
@@ -129,6 +130,7 @@ group { name: "elm/border/base/default";
 rel.to: "client_spacer";
  }
   }
+
   /* application contents */
   swallow { "elm.swallow.client";
  clip: "client_clip";
@@ -136,6 +138,26 @@ group { name: "elm/border/base/default";
 rel.to: "client_spacer";
  }
   }
+
+  /* modal window blocker */
+  rect { "elm.rect.blocker";
+ required;
+ desc { "default";
+rel1.to: "top_clip";
+rel1.relative: 0.0 1.0;
+rel2.to: "bottom_clip";
+rel2.relative: 1.0 0.0;
+color: 0 0 0 0;
+hid;
+ }
+ desc { "visible";
+inherit: "default";
+color_class: "elm/win/blocker";
+color: 255 255 255 255;
+vis;
+ }
+  }
+
   /* top title bar - spacer and clipper */
   rect { "top_clip"; //nomouse;
  desc { "default";
@@ -793,6 +815,20 @@ group { name: "elm/border/base/default";
  target: "elm.swallow.menu";
   }
 
+  /* modal windows */
+  program { name: "hide_blocker";
+ signal: "elm,action,hide_blocker"; source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.rect.blocker";
+ transition: DECELERATE 0.2;
+  }
+  program { name: "show_blocker";
+ signal: "elm,action,show_blocker"; source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.rect.blocker";
+ transition: DECELERATE 0.2;
+  }
+
   /* minimize, maximize & close buttons */
   program {
  signal: "mouse,down,*"; source: "elm.event.close";
diff --git a/data/elementary/themes/edc/elm/win.edc 
b/data/elementary/themes/edc/elm/win.edc
index 44ae634..8c6a08d 100644
--- a/data/elementary/themes/edc/elm/win.edc
+++ b/data/elementary/themes/edc/elm/win.edc
@@ -1,39 +1,13 @@
 group { name: "elm/win/base/default";
+   data.item: "elm_win_version" "119";
parts {
   rect { "client_clip"; nomouse;
  desc { "default";
-rel1.to_y: "elm.swallow.contents";
-rel2.to_y: "elm.swallow.contents";
+rel.to: "elm.swallow.contents";
  }
   }
   swallow { "elm.swallow.contents";
  clip_to: "client_clip";
   }
-  rect { "blocker";
- desc { "default";
-rel1.relative : 0.0 0.0;
-rel2.relative : 1.0 1.0;
-color: 64 64 64 150;
-visible: 0;
- }
- desc { "visible";
-inherit: "default";
-visible: 1;
- }
-  }
-   }
-   programs {
-  program { name: "hide_blocker";
- signal: "elm,action,hide_blocker";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "blocker";
-  }
-  program { name: "show_blocker";
- signal: "elm,action,show_blocker";
- source: "elm";
- action: STATE_SET "visible" 0.0;
- target: "blocker";
-  }
}
 }
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index d7a4296..20481d4 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -56,38 +56,6 @@ static const Elm_Win_Trap *trap = NULL;
   if (!obj 

[EGIT] [core/efl] master 03/05: docs: evas: fill last gaps in evas eo file documentation

2016-11-23 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit bb155657f48b103e80a53c62098d5bea66ed3bef
Author: Stefan Schmidt 
Date:   Wed Nov 23 13:29:25 2016 +0100

docs: evas: fill last gaps in evas eo file documentation
---
 src/lib/evas/canvas/efl_ui_selectable.eo  | 16 
 src/lib/evas/canvas/evas_text.eo  |  8 
 src/lib/evas/include/evas_ector_buffer.eo |  1 +
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/lib/evas/canvas/efl_ui_selectable.eo 
b/src/lib/evas/canvas/efl_ui_selectable.eo
index 16b6a88..b24772e 100644
--- a/src/lib/evas/canvas/efl_ui_selectable.eo
+++ b/src/lib/evas/canvas/efl_ui_selectable.eo
@@ -3,13 +3,13 @@ interface Efl.Ui.Selectable ()
[[Efl UI selectable interface]]
event_prefix: efl_ui;
events {
-  selected;
-  unselected;
-  selection,paste;
-  selection,copy;
-  selection,cut;
-  selection,start;
-  selection,changed;
-  selection,cleared;
+  selected; [[Called when selected]]
+  unselected; [[Called when no longer selected]]
+  selection,paste; [[Called when selection got pasted]]
+  selection,copy; [[Called when selection was copied]]
+  selection,cut; [[Called when selection was cut]]
+  selection,start; [[Called at selection start]]
+  selection,changed; [[Called when selection changed]]
+  selection,cleared; [[Called when selection was cleared]]
}
 }
diff --git a/src/lib/evas/canvas/evas_text.eo b/src/lib/evas/canvas/evas_text.eo
index 83d33c7..039f3c0 100644
--- a/src/lib/evas/canvas/evas_text.eo
+++ b/src/lib/evas/canvas/evas_text.eo
@@ -160,6 +160,7 @@ class Evas.Text (Efl.Canvas.Object, Efl.Text, 
Efl.Text.Properties, Efl.Canvas.Fi
  }
   }
   @property max_descent {
+[[Maximal descent property]]
  get {
 return: Evas.Coord; [[Evas coordinate]]
  }
@@ -184,31 +185,37 @@ class Evas.Text (Efl.Canvas.Object, Efl.Text, 
Efl.Text.Properties, Efl.Canvas.Fi
  }
   }
   @property ascent {
+[[Ascent property]]
  get {
 return: Evas.Coord; [[Evas coordinate]]
  }
   }
   @property horiz_advance {
+[[Horizontal advance property]]
  get {
 return: Evas.Coord; [[Evas coordinate]]
  }
   }
   @property inset {
+[[Inset property]]
  get {
 return: Evas.Coord; [[Evas coordinate]]
  }
   }
   @property max_ascent {
+[[Maximal ascent property]]
  get {
 return: Evas.Coord; [[Evas coordinate]]
  }
   }
   @property vert_advance {
+[[Vertical advance property]]
  get {
 return: Evas.Coord; [[Evas coordinate]]
  }
   }
   @property descent {
+[[descent property]]
  get {
 return: Evas.Coord; [[Evas coordinate]]
  }
@@ -222,6 +229,7 @@ class Evas.Text (Efl.Canvas.Object, Efl.Text, 
Efl.Text.Properties, Efl.Canvas.Fi
  }
   }
   char_coords_get @const {
+[[Get character coordinates]]
  return: int; [[Logical poistion of char]]
  params {
 @in x: Evas.Coord; [[X coordinate]]
diff --git a/src/lib/evas/include/evas_ector_buffer.eo 
b/src/lib/evas/include/evas_ector_buffer.eo
index 5733510..9275e75 100644
--- a/src/lib/evas/include/evas_ector_buffer.eo
+++ b/src/lib/evas/include/evas_ector_buffer.eo
@@ -7,6 +7,7 @@ interface Evas.Ector.Buffer
[[Evas ector buffer interface]]
methods {
   @property engine_image {
+[[Engine image property]]
  get {}
  set { [[This Buffer will hold a reference to the evas image struct.]] 
}
  values {

-- 




[EGIT] [core/efl] master 26/27: elm: Prepare new API for windows, including CSD on X11

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 5173b0d59ebafa78af38ca12eec01522776796f4
Merge: 6a4ae67 10e2b44
Author: Jean-Philippe Andre 
Date:   Wed Nov 23 13:07:18 2016 +0900

elm: Prepare new API for windows, including CSD on X11

This series of patches include:
1. Add experimental Client-Side Decorations (CSD) mode for
   windows on X11 (enabled with EFL_WIN_FRAME_MODE=on).
2. Use Efl.Part to set the content and background of a window.
3. Begin moving elm_win_resize_object APIs to a legacy-only
   set of features.
4. Add a new stacked box class.
5. Fix modal windows.

More patches will follow, to implement support for the conformant
features right inside elm_win, as well as polish existing features.

I am merging this now in order to spot and fix compatibility issues
as early as possible. This patch indeed reworks a lot how the
window and its edje groups work together.

Unfortunately, unless we created a new Window class, the complexity
of the code inside efl_ui_win.c has to increase. On the other hand,
all windows now have a frame object, except fake windows, which
redudes some of the differences between X11 and Wayland.

CSD are not used by default, as their support is still not complete
on X, and totally unimplemented on other platforms (OSX, MS Windows,
etc...). Eventually we could think of moving all windows to use CSD
mode like GTK3 does nowadays.

Note: The theme ABI is changed A LOT, so this may break compatibility
with older themes (I have tested a bit, though^^).

@feature

 data/elementary/themes/Makefile.am  |1 +
 data/elementary/themes/colorclasses.edc |8 +
 data/elementary/themes/default.edc  |3 +-
 data/elementary/themes/edc/elm/bg.edc   |1 +
 data/elementary/themes/edc/elm/border.edc   | 1489 +++
 data/elementary/themes/edc/elm/ews.edc  |  722 +++
 data/elementary/themes/edc/elm/win.edc  |   74 +-
 src/Makefile_Elementary.am  |4 +
 src/bin/elementary/test.c   |6 +
 src/bin/elementary/test_bg.c|  105 ++
 src/bin/elementary/test_box.c   |   53 +
 src/bin/elementary/test_win_dialog.c|   38 +-
 src/bin/elementary/test_win_modal.c |   78 ++
 src/lib/ecore_evas/Ecore_Evas.h |9 +
 src/lib/ecore_evas/ecore_evas.c |   27 +
 src/lib/ecore_evas/ecore_evas_private.h |5 +
 src/lib/ecore_x/Ecore_X_Atoms.h |3 +
 src/lib/ecore_x/ecore_x_atoms_decl.h|7 +
 src/lib/elementary/Elementary.h |1 +
 src/lib/elementary/efl_ui_box_stack.c   |   46 +
 src/lib/elementary/efl_ui_box_stack.eo  |   12 +
 src/lib/elementary/efl_ui_win.c | 1356 +
 src/lib/elementary/efl_ui_win.eo|   14 +-
 src/lib/elementary/efl_ui_win_internal_part.eo  |   14 +
 src/lib/elementary/efl_ui_win_standard.c|   15 +-
 src/lib/elementary/elm_menu.c   |3 +-
 src/lib/elementary/elm_priv.h   |2 +
 src/lib/elementary/elm_theme.c  |8 +
 src/lib/elementary/els_cursor.c |5 +-
 src/lib/evas/canvas/efl_canvas_object.eo|   14 +
 src/lib/evas/canvas/evas_events.c   |   35 +
 src/lib/evas/canvas/evas_object_box.c   |5 +
 src/lib/evas/include/evas_inline.x  |2 +
 src/modules/ecore_evas/engines/x/ecore_evas_x.c |   76 +-
 34 files changed, 2519 insertions(+), 1722 deletions(-)

-- 




[EGIT] [core/efl] master 01/04: ecore_file: update docs for ecore_file_rmdir

2016-11-23 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

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

commit 164ece9e3f9ce0c011255d6f420ba660b48f35a9
Author: Vyacheslav Reutskiy 
Date:   Wed Nov 23 16:18:40 2016 +0200

ecore_file: update docs for ecore_file_rmdir
---
 src/lib/ecore_file/Ecore_File.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_file/Ecore_File.h b/src/lib/ecore_file/Ecore_File.h
index 70c4af7..4e8810b 100644
--- a/src/lib/ecore_file/Ecore_File.h
+++ b/src/lib/ecore_file/Ecore_File.h
@@ -236,7 +236,7 @@ EAPI intecore_file_mkdirs   (const char 
**dirs);
 EAPI intecore_file_mksubdirs(const char *base, const char 
**subdirs);
 
 /**
- * @brief Delete the given directory.
+ * @brief Delete the given empty directory.
  *
  * @param  dir The name of the directory to delete.
  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.

-- 




[EGIT] [core/efl] master 18/27: elm: Add Efl.Ui.Box.Stack for stack boxes (EO only)

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 6bcaa8a0b92f8b50961685231cd6492afcd99fe1
Author: Jean-Philippe Andre 
Date:   Mon Nov 21 19:01:16 2016 +0900

elm: Add Efl.Ui.Box.Stack for stack boxes (EO only)

This is a very simple implementation for EO of the stack mode
of boxes, as implemented in evas_object_box_layout_stack.

@feature
---
 src/Makefile_Elementary.am |  2 ++
 src/bin/elementary/test.c  |  2 ++
 src/bin/elementary/test_box.c  | 53 ++
 src/lib/elementary/Elementary.h|  1 +
 src/lib/elementary/efl_ui_box_stack.c  | 46 +
 src/lib/elementary/efl_ui_box_stack.eo | 12 
 6 files changed, 116 insertions(+)

diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 5488b03..667840e 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -90,6 +90,7 @@ elm_public_eolian_files = \
lib/elementary/elm_popup_item.eo \
lib/elementary/efl_ui_box.eo \
lib/elementary/efl_ui_box_flow.eo \
+   lib/elementary/efl_ui_box_stack.eo \
lib/elementary/efl_ui_grid.eo \
lib/elementary/efl_ui_grid_static.eo \
lib/elementary/efl_ui_layout_internal_box.eo \
@@ -653,6 +654,7 @@ lib_elementary_libelementary_la_SOURCES = \
lib/elementary/elu_ews_wm.c \
lib/elementary/efl_ui_box.c \
lib/elementary/efl_ui_box_flow.c \
+   lib/elementary/efl_ui_box_stack.c \
lib/elementary/efl_ui_box_layout.c \
lib/elementary/efl_ui_box_private.h \
lib/elementary/efl_ui_grid.c \
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index 0a7f042..a250762 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -27,6 +27,7 @@ void test_box_horiz(void *data, Evas_Object *obj, void 
*event_info);
 void test_box_homo(void *data, Evas_Object *obj, void *event_info);
 void test_box_transition(void *data, Evas_Object *obj, void *event_info);
 void test_box_align(void *data, Evas_Object *obj, void *event_info);
+void test_box_stack(void *data, Evas_Object *obj, void *event_info);
 void test_ui_box(void *data, Evas_Object *obj, void *event_info);
 void test_button(void *data, Evas_Object *obj, void *event_info);
 void test_cnp(void *data, Evas_Object *obj, void *event_info);
@@ -666,6 +667,7 @@ add_tests:
ADD_TEST(NULL, "Containers", "Box Homogeneous", test_box_homo);
ADD_TEST(NULL, "Containers", "Box Transition", test_box_transition);
ADD_TEST(NULL, "Containers", "Box Align", test_box_align);
+   ADD_TEST(NULL, "Containers", "Box Stack", test_box_stack);
ADD_TEST(NULL, "Containers", "Table", test_table);
ADD_TEST(NULL, "Containers", "Table Homogeneous", test_table2);
ADD_TEST(NULL, "Containers", "Table 3", test_table3);
diff --git a/src/bin/elementary/test_box.c b/src/bin/elementary/test_box.c
index 6da21d6..395c824 100644
--- a/src/bin/elementary/test_box.c
+++ b/src/bin/elementary/test_box.c
@@ -857,6 +857,7 @@ _align_box_add(Evas_Object *bx_out, Box_Align_Data *bdata)
elm_box_pack_end(bx, bt);
evas_object_show(bt);
 }
+
 void
 test_box_align(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
@@ -880,3 +881,55 @@ test_box_align(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED,
evas_object_resize(win, 300, 400);
evas_object_show(win);
 }
+
+void
+test_box_stack(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+   void *event_info EINA_UNUSED)
+{
+   Evas_Object *win, *bx, *o;
+   char buf[PATH_MAX];
+
+   win = efl_add(EFL_UI_WIN_CLASS, NULL,
+ efl_text_set(efl_added, "Efl.Ui.Box.Stack"),
+ efl_ui_win_autodel_set(efl_added, EINA_TRUE));
+
+   efl_gfx_color_set(efl_part(win, "background"), 24, 24, 64, 255);
+
+   /* stacked box, with items in the center-bottom */
+   bx = efl_add(EFL_UI_BOX_STACK_CLASS, win,
+efl_pack_align_set(efl_added, 0.5, 1.0));
+   efl_content_set(win, bx);
+
+   /* stretched rectangle */
+   o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win,
+   efl_gfx_color_set(efl_added, 0, 64, 128, 255),
+   efl_gfx_size_hint_align_set(efl_added, EFL_GFX_SIZE_HINT_FILL, 
EFL_GFX_SIZE_HINT_FILL),
+   efl_gfx_size_hint_weight_set(efl_added, 
EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND),
+   efl_gfx_visible_set(efl_added, EINA_TRUE));
+   efl_pack(bx, o);
+
+   /* rectangle with a max size */
+   o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win,
+   efl_gfx_color_set(efl_added, 64, 128, 64, 255),
+   efl_gfx_size_hint_align_set(efl_added, EFL_GFX_SIZE_HINT_FILL, 
EFL_GFX_SIZE_HINT_FILL),
+   efl_gfx_size_hint_weight_set(efl_added, 
EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND),
+   

[EGIT] [core/efl] master 02/05: docs: elm_scroller: fill gaps in elm_scroller eo file documentation

2016-11-23 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 34385d1393ad6e9c07a752450ff05d9550faad7b
Author: Stefan Schmidt 
Date:   Wed Nov 23 13:23:26 2016 +0100

docs: elm_scroller: fill gaps in elm_scroller eo file documentation
---
 src/lib/elementary/elm_scroller.eo   | 36 
 src/lib/elementary/elm_scroller_internal_part.eo |  1 +
 2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/src/lib/elementary/elm_scroller.eo 
b/src/lib/elementary/elm_scroller.eo
index 2dcfd90..49a0120 100644
--- a/src/lib/elementary/elm_scroller.eo
+++ b/src/lib/elementary/elm_scroller.eo
@@ -2,6 +2,7 @@ class Elm.Scroller (Elm.Layout, Elm.Interface_Scrollable,
 Elm.Interface.Atspi_Widget_Action,
 Efl.Ui.Scrollable)
 {
+   [[Elementary scroller class]]
legacy_prefix: elm_scroller;
eo_prefix: elm_obj_scroller;
event_prefix: elm_scroller;
@@ -30,8 +31,8 @@ class Elm.Scroller (Elm.Layout, Elm.Interface_Scrollable,
 [[Set custom theme elements for the scroller]]
  }
  values {
-klass: string;
-group: string;
+klass: string; [[Klass name]]
+group: string; [[Group name]]
  }
   }
   page_scroll_limit_set @const {
@@ -80,21 +81,20 @@ class Elm.Scroller (Elm.Layout, Elm.Interface_Scrollable,
   Efl.Part.part;
}
events {
-  scroll,page,changed;
-  hbar,unpress;
-  hbar,press;
-  hbar,drag;
-  vbar,unpress;
-  vbar,press;
-  vbar,drag;
-  scroll,left;
-  scroll,right;
-  scroll,up;
-  scroll,down;
-  edge,left;
-  edge,right;
-  edge,top;
-  edge,bottom;
+  scroll,page,changed; [[Called when scroll page changed]]
+  hbar,unpress; [[Called when horizontal bar is no longer pressed]]
+  hbar,press; [[Called when horizontal bar is pressed]]
+  hbar,drag; [[Called when horizontal bar is dragged]]
+  vbar,unpress; [[Called when vertical bar is no longer pressed]]
+  vbar,press; [[Called when vertical bar is pressed]]
+  vbar,drag; [[Called when vertical bar is dragged]]
+  scroll,left; [[Called when scrolling to left]]
+  scroll,right; [[Called when scrolling to right]]
+  scroll,up;  [[Called scrolled upwards]]
+  scroll,down; [[Called when scrolled downwards]]
+  edge,left; [[Called when hitting the left edge]]
+  edge,right; [[Called when hitting the right edge]]
+  edge,top; [[Called when hitting the top edge]]
+  edge,bottom; [[Called when hitting the bottom edge]]
}
-
 }
diff --git a/src/lib/elementary/elm_scroller_internal_part.eo 
b/src/lib/elementary/elm_scroller_internal_part.eo
index b67a86a..cef7a8f 100644
--- a/src/lib/elementary/elm_scroller_internal_part.eo
+++ b/src/lib/elementary/elm_scroller_internal_part.eo
@@ -1,5 +1,6 @@
 class Elm.Scroller.Internal.Part (Elm.Layout.Internal.Part)
 {
+   [[Elementary scroller internal part class]]
data: null;
implements {
   Efl.Container.content.set;

-- 




[EGIT] [tools/eflete] master 01/02: ewe_ruler: fix theme path

2016-11-23 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

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

commit 063eb75b4b90c7d848cfcdf1146161d0a3242708
Author: Andrii Kroitor 
Date:   Wed Nov 23 14:02:37 2016 +0200

ewe_ruler: fix theme path

elm_app_data_dir_get returns empty string on failure

Change-Id: I99dd51a1ad719bf943113b24e0e0437417e8c03f
---
 src/lib/ewe_ruler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ewe_ruler.c b/src/lib/ewe_ruler.c
index 1fb26b1..3e32f0b 100644
--- a/src/lib/ewe_ruler.c
+++ b/src/lib/ewe_ruler.c
@@ -788,7 +788,7 @@ _ewe_ruler_efl_canvas_group_group_add(Eo *obj, 
Ewe_Ruler_Smart_Data *sd)
elm_widget_sub_object_parent_add(obj);
 
data_dir = elm_app_data_dir_get();
-   if (data_dir)
+   if (data_dir && strcmp(data_dir, ""))
  {
 theme_path = eina_strbuf_new();
 eina_strbuf_append_printf(theme_path,

-- 




[EGIT] [core/efl] master 01/05: docs: elm_player: fill gaps in elm_player eo file documentation

2016-11-23 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit d172e16e3d9c857d844e3466d2cbb592fd0d1cd3
Author: Stefan Schmidt 
Date:   Wed Nov 23 13:22:15 2016 +0100

docs: elm_player: fill gaps in elm_player eo file documentation
---
 src/lib/elementary/elm_player.eo   | 24 
 src/lib/elementary/elm_player_internal_part.eo |  1 +
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/lib/elementary/elm_player.eo b/src/lib/elementary/elm_player.eo
index a930636..ddea400 100644
--- a/src/lib/elementary/elm_player.eo
+++ b/src/lib/elementary/elm_player.eo
@@ -1,5 +1,6 @@
 class Elm.Player (Elm.Layout, Elm.Interface.Atspi_Widget_Action)
 {
+   [[Elementary player class]]
legacy_prefix: elm_player;
eo_prefix: elm_obj_player;
event_prefix: elm_player;
@@ -15,17 +16,16 @@ class Elm.Player (Elm.Layout, 
Elm.Interface.Atspi_Widget_Action)
   Efl.Part.part;
}
events {
-  forward,clicked;
-  info,clicked;
-  next,clicked;
-  pause,clicked;
-  play,clicked;
-  prev,clicked;
-  rewind,clicked;
-  quality,clicked;
-  eject,clicked;
-  volume,clicked;
-  mute,clicked;
+  forward,clicked; [[Called when forward was clicked]]
+  info,clicked; [[Called when info was clicked]]
+  next,clicked; [[Called when next was clicked]]
+  pause,clicked; [[Called when pause was clicked]]
+  play,clicked; [[Called when play was clicked]]
+  prev,clicked; [[Called when previous was clicked]]
+  rewind,clicked; [[Called when rewind was clicked]]
+  quality,clicked; [[Called when quality was clicked]]
+  eject,clicked; [[Called when eject was clicked]]
+  volume,clicked; [[Called when volume was clicked]]
+  mute,clicked; [[Called when mute was clicked]]
}
-
 }
diff --git a/src/lib/elementary/elm_player_internal_part.eo 
b/src/lib/elementary/elm_player_internal_part.eo
index 86dceaa..5a80979 100644
--- a/src/lib/elementary/elm_player_internal_part.eo
+++ b/src/lib/elementary/elm_player_internal_part.eo
@@ -1,5 +1,6 @@
 class Elm.Player.Internal.Part (Elm.Layout.Internal.Part)
 {
+   [[Elementary player internal part class]]
data: null;
implements {
   Efl.Container.content.set;

-- 




[EGIT] [core/efl] master 15/27: win: Add content_set API for window main content

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit c31a70a4f58f1fd796ea32c23204b9ae7ee8b6b2
Author: Jean-Philippe Andre 
Date:   Thu Nov 17 17:46:14 2016 +0900

win: Add content_set API for window main content

The idea is to not have resize object in a stack anymore,
but a couple of swallows in the frame and if the stack of
resize objects is wanted, then the user can still explicitely
create it.
---
 src/bin/elementary/test_win_dialog.c |  38 +++-
 src/lib/elementary/efl_ui_win.c  | 418 +--
 src/lib/elementary/efl_ui_win.eo |  10 +-
 3 files changed, 237 insertions(+), 229 deletions(-)

diff --git a/src/bin/elementary/test_win_dialog.c 
b/src/bin/elementary/test_win_dialog.c
index aa155b1..448fb9e 100644
--- a/src/bin/elementary/test_win_dialog.c
+++ b/src/bin/elementary/test_win_dialog.c
@@ -5,7 +5,7 @@
 
 
 
-void
+static void
 _bt_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
Evas_Object *dia, *lb;
@@ -24,6 +24,34 @@ _bt_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA_U
evas_object_show(dia);
 }
 
+static void
+_bt2_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+{
+   Efl_Canvas_Object *dia, *lb, *parent = data;
+
+   dia = efl_add(EFL_UI_WIN_STANDARD_CLASS, parent,
+ efl_ui_win_type_set(efl_added, EFL_UI_WIN_DIALOG_BASIC),
+ efl_ui_win_name_set(efl_added, "window-dia-2"),
+ efl_ui_win_autodel_set(efl_added, EINA_TRUE),
+ efl_text_set(efl_added, "A Fixed Size Dialog"));
+
+   // Notes:
+   // - All objects have 0 weight, this makes the window not resizable.
+   // - With EO APIs, efl_gfx_size_hint_min_set() is safe to call as EFL will
+   //   only set the restricted min size (and combine them for calculation).
+
+   lb = efl_add(EFL_UI_TEXT_CLASS, dia,
+efl_text_set(efl_added, "This is a non-resizable dialog."),
+efl_gfx_size_hint_min_set(efl_added, 200, 150),
+efl_gfx_size_hint_max_set(efl_added, 200, 150),
+efl_gfx_size_hint_weight_set(efl_added, 0, 0));
+
+   // Swallow in the label as the default content, this will make it visible.
+   efl_content_set(dia, lb);
+
+   efl_gfx_visible_set(dia, EINA_TRUE);
+}
+
 void
 test_win_dialog(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
@@ -36,13 +64,19 @@ test_win_dialog(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *even
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, box);
evas_object_show(box);
-   
+
bt = elm_button_add(win);
elm_object_text_set(bt, "Create a new dialog");
evas_object_smart_callback_add(bt, "clicked", _bt_clicked_cb, win);
elm_box_pack_end(box, bt);
evas_object_show(bt);
 
+   bt = elm_button_add(win);
+   elm_object_text_set(bt, "Create a new unresizable dialog");
+   evas_object_smart_callback_add(bt, "clicked", _bt2_clicked_cb, win);
+   elm_box_pack_end(box, bt);
+   evas_object_show(bt);
+
evas_object_resize(win, 400, 400);
evas_object_show(win);
 }
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 933c45c..70f93d4 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -66,7 +66,7 @@ static const Elm_Win_Trap *trap = NULL;
  }  \
if (cursd->modal_count == 0) \
  {  \
-edje_object_signal_emit(cursd->edje, \
+edje_object_signal_emit(cursd->legacy.edje, \
 "elm,action,hide_blocker", "elm");  \
 efl_event_callback_legacy_call(cursd->main_menu, 
ELM_MENU_EVENT_ELM_ACTION_UNBLOCK_MENU, NULL); \
  }  \
@@ -82,7 +82,7 @@ static const Elm_Win_Trap *trap = NULL;
  }  \
if (cursd->modal_count > 0)  \
  {  \
-edje_object_signal_emit(cursd->edje, \
+edje_object_signal_emit(cursd->legacy.edje, \
  "elm,action,show_blocker", "elm"); \
 efl_event_callback_legacy_call(cursd->main_menu, 
EFL_UI_WIN_EVENT_ELM_ACTION_BLOCK_MENU, NULL); \
  }  \
@@ -91,7 +91,6 @@ static const Elm_Win_Trap *trap = NULL;
 #define ENGINE_GET() (_elm_preferred_engine ? _elm_preferred_engine : 
_elm_config->engine)
 
 typedef struct _Efl_Ui_Win_Data Efl_Ui_Win_Data;
-typedef struct 

[EGIT] [core/efl] master 04/07: ecore_ipc_client_example: test "write & del" using -m/--single-message

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit f7f6847b5a56ee5f2afc71b65d159a457115e923
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 02:26:35 2016 -0200

ecore_ipc_client_example: test "write & del" using -m/--single-message

An use case is to send some message and delete the handle, all data
should be sent to server.
---
 src/examples/ecore/ecore_ipc_client_example.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/src/examples/ecore/ecore_ipc_client_example.c 
b/src/examples/ecore/ecore_ipc_client_example.c
index 68ca537..c3f3708 100644
--- a/src/examples/ecore/ecore_ipc_client_example.c
+++ b/src/examples/ecore/ecore_ipc_client_example.c
@@ -5,6 +5,7 @@
 static int retval = EXIT_SUCCESS;
 static Ecore_Ipc_Server *server = NULL;
 static Eina_Bool do_flush = EINA_FALSE;
+static Eina_Bool single_message = EINA_FALSE;
 
 static Eina_Bool
 _server_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
@@ -72,6 +73,12 @@ _on_stdin(void *data EINA_UNUSED, Ecore_Fd_Handler *fdh 
EINA_UNUSED)
 ecore_ipc_server_send(server, 1, 2, 0, 0, 0, line, r);
 printf("INFO: sent %zd bytes to server.\n", r);
 if (do_flush) ecore_ipc_server_flush(server);
+if (single_message)
+  {
+ ecore_ipc_server_del(server);
+ server = NULL;
+ ecore_main_loop_quit();
+  }
  }
 
free(line);
@@ -103,6 +110,7 @@ static const Ecore_Getopt options = {
 ECORE_GETOPT_STORE_INT('s', "max-size", "Maximum size (in bytes) for 
messages."),
 
 ECORE_GETOPT_STORE_TRUE('f', "flush", "Force a flush after every send 
call."),
+ECORE_GETOPT_STORE_TRUE('m', "single-message", "Send a single message and 
delete the server."),
 
 ECORE_GETOPT_VERSION('V', "version"),
 ECORE_GETOPT_COPYRIGHT('C', "copyright"),
@@ -135,6 +143,7 @@ main(int argc, char **argv)
  ECORE_GETOPT_VALUE_INT(max_size),
 
  ECORE_GETOPT_VALUE_BOOL(do_flush),
+ ECORE_GETOPT_VALUE_BOOL(single_message),
 
  /* standard block to provide version, copyright, license and help */
  ECORE_GETOPT_VALUE_BOOL(quit_option), /* -V/--version quits */

-- 




[EGIT] [core/efl] master 17/27: evas/box: Add support for align with stacked boxes

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 3df7b717c932adac481aa0ec527d4d5893b07bb8
Author: Jean-Philippe Andre 
Date:   Mon Nov 21 19:52:23 2016 +0900

evas/box: Add support for align with stacked boxes

@feature
---
 src/lib/evas/canvas/evas_object_box.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/lib/evas/canvas/evas_object_box.c 
b/src/lib/evas/canvas/evas_object_box.c
index 085ee12..f9952cd 100644
--- a/src/lib/evas/canvas/evas_object_box.c
+++ b/src/lib/evas/canvas/evas_object_box.c
@@ -1632,6 +1632,11 @@ _evas_box_layout_stack(Eo *o, Evas_Object_Box_Data 
*priv, Evas_Object_Box_Data *
 
 if ((new_w != child_w) || (new_h != child_h))
   evas_object_resize(child, new_w, new_h);
+
+if (priv->align.h >= 0.0)
+  off_x += (ow - new_w) * priv->align.h;
+if (priv->align.v >= 0.0)
+  off_y += (oh - new_h) * priv->align.v;
 evas_object_move(child, ox + off_x, oy + off_y);
 
 if (old_child)

-- 




[EGIT] [core/efl] master 22/27: win: Simplify modal legacy API and add test case

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 29e7d477b1001c106dda45dbf434729831cb97a5
Author: Jean-Philippe Andre 
Date:   Tue Nov 22 17:59:33 2016 +0900

win: Simplify modal legacy API and add test case

This fixes the modality of windows shown after setting
the flag.
---
 src/Makefile_Elementary.am  |  1 +
 src/bin/elementary/test.c   |  2 +
 src/bin/elementary/test_win_modal.c | 78 +
 src/lib/elementary/efl_ui_win.c | 36 +
 4 files changed, 90 insertions(+), 27 deletions(-)

diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 667840e..97ff78b 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -836,6 +836,7 @@ bin/elementary/test_win_plug.c \
 bin/elementary/test_win_state.c \
 bin/elementary/test_win_wm_rotation.c \
 bin/elementary/test_win_dialog.c \
+bin/elementary/test_win_modal.c \
 bin/elementary/test.h
 
 bin_elementary_elementary_test_LDADD = @USE_ELEMENTARY_LIBS@
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index a250762..5595d88 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -283,6 +283,7 @@ void test_dnd_multi_features(void *data, Evas_Object *obj, 
void *event_info);
 void test_dnd_types(void *data, Evas_Object *obj, void *event_info);
 void test_task_switcher(void *data, Evas_Object *obj, void *event_info);
 void test_win_dialog(void *data, Evas_Object *obj, void *event_info);
+void test_win_modal(void *data, Evas_Object *obj, void *event_info);
 void test_box_disable(void *data, Evas_Object *obj, void *event_info);
 void test_layout_disable(void *data, Evas_Object *obj, void *event_info);
 
@@ -642,6 +643,7 @@ add_tests:
ADD_TEST(NULL, "Window / Background", "Window WM Rotation", 
test_win_wm_rotation);
ADD_TEST(NULL, "Window / Background", "Window Standard/Dialog", 
test_win_dialog);
ADD_TEST(NULL, "Window / Background", "Window Keygrab Set", 
test_win_keygrab);
+   ADD_TEST(NULL, "Window / Background", "Window Modal", test_win_modal);
 
//--//
ADD_TEST(NULL, "Images", "Icon", test_icon);
diff --git a/src/bin/elementary/test_win_modal.c 
b/src/bin/elementary/test_win_modal.c
new file mode 100644
index 000..b844b8a
--- /dev/null
+++ b/src/bin/elementary/test_win_modal.c
@@ -0,0 +1,78 @@
+#ifdef HAVE_CONFIG_H
+# include "elementary_config.h"
+#endif
+#include 
+
+static Evas_Object *
+_parent_win_get(Evas_Object *obj)
+{
+   Evas_Object *parent = obj;
+
+   while ((parent = elm_object_parent_widget_get(obj)) != NULL)
+ obj = parent;
+
+   return obj;
+}
+
+static void
+_close(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+   Evas_Object *win = data;
+
+   evas_object_del(win);
+}
+
+void
+test_win_modal(void *data EINA_UNUSED, Evas_Object *obj, void *event_info 
EINA_UNUSED)
+{
+   Evas_Object *parent_win, *win, *bg, *txt, *bx, *bt;
+
+   parent_win = _parent_win_get(obj);
+
+   win = elm_win_add(parent_win, "modal", ELM_WIN_BASIC);
+   elm_win_title_set(win, "Window Modal");
+   elm_win_autodel_set(win, EINA_TRUE);
+
+   bg = elm_bg_add(win);
+   elm_win_resize_object_add(win, bg);
+   evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_show(bg);
+
+   bx = elm_box_add(win);
+   elm_win_resize_object_add(win, bx);
+   evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_show(bx);
+
+   txt = elm_label_add(win);
+   elm_object_text_set(txt, "This is a modal window."
+   "It will block all inputs on all the other opened 
windows.");
+   evas_object_size_hint_align_set(txt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(txt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_label_line_wrap_set(txt, ELM_WRAP_WORD);
+   elm_box_pack_end(bx, txt);
+   evas_object_show(txt);
+
+   bt = elm_button_add(win);
+   elm_object_text_set(bt, "Open another modal window");
+   evas_object_size_hint_align_set(bt, 0.5, 0.5);
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
+   evas_object_smart_callback_add(bt, "clicked", test_win_modal, NULL);
+   elm_box_pack_end(bx, bt);
+   evas_object_show(bt);
+
+   bt = elm_button_add(win);
+   elm_object_text_set(bt, "Close");
+   evas_object_size_hint_align_set(bt, 0.5, 0.5);
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
+   evas_object_smart_callback_add(bt, "clicked", _close, win);
+   elm_box_pack_end(bx, bt);
+   evas_object_show(bt);
+
+   /* make the window modal */
+   elm_win_modal_set(win, EINA_TRUE);
+
+   evas_object_resize(win, 250, 150);
+   evas_object_show(win);
+}
diff --git 

[EGIT] [core/efl] master 23/27: win: Code simplification

2016-11-23 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 60308d74218bbb3919b6359cb5ce44ed682ed288
Author: Jean-Philippe Andre 
Date:   Tue Nov 22 19:52:25 2016 +0900

win: Code simplification
---
 src/lib/elementary/efl_ui_win.c | 26 +-
 1 file changed, 5 insertions(+), 21 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 2710fd8..d7a4296 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5893,7 +5893,7 @@ static Elm_Theme_Apply
 _elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd)
 {
Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED;
-   Eina_Bool ret = EINA_FALSE;
+   Eina_Bool ret = EINA_FALSE, prev_alpha;
const char *s;
 
int_ret = _elm_theme_object_set(obj, sd->legacy.edje, "win", "base",
@@ -5909,27 +5909,11 @@ _elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd)
 
if (!ret) int_ret = ELM_THEME_APPLY_FAILED;
 
+   prev_alpha = sd->theme_alpha;
s = edje_object_data_get(sd->legacy.edje, "alpha");
-   if (!sd->theme_alpha)
- {
-if (s)
-  {
- if (!strcmp(s, "1") ||
- !strcmp(s, "true"))
-   {
-  sd->theme_alpha = 1;
-  _elm_win_apply_alpha(obj, sd);
-   }
-  }
- }
-   else
- {
-if (!s || ((strcmp(s, "1") != 0) && (strcmp(s, "false") != 0)))
-  {
- sd->theme_alpha = 0;
- _elm_win_apply_alpha(obj, sd);
-  }
- }
+   sd->theme_alpha = (eina_streq(s, "1") || eina_streq(s, "true"));
+   if (sd->theme_alpha != prev_alpha)
+ _elm_win_apply_alpha(obj, sd);
 
return int_ret;
 }

-- 




[EGIT] [tools/enventor] master 01/02: edc_parser: Append different string to each candidate list.

2016-11-23 Thread Jaehyun Cho
jaehyun pushed a commit to branch master.

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

commit 18bb73f1614f97bc754f762e69b71f755e9b79dd
Author: Jaehyun Cho 
Date:   Wed Nov 23 20:46:17 2016 +0900

edc_parser: Append different string to each candidate list.
---
 src/lib/ctxpopup.c | 36 +++-
 src/lib/edc_parser.c   | 19 ++-
 src/lib/enventor_private.h |  2 ++
 3 files changed, 55 insertions(+), 2 deletions(-)

diff --git a/src/lib/ctxpopup.c b/src/lib/ctxpopup.c
index 44a7aeb..a95d9e6 100644
--- a/src/lib/ctxpopup.c
+++ b/src/lib/ctxpopup.c
@@ -91,15 +91,49 @@ update_preset_colors(Eina_Bool update)
  }
 }
 
+static int
+array_data_idx(const Eina_Array *array, void *data)
+{
+   Eina_Stringshare *array_data;
+   Eina_Array_Iterator itr;
+   int idx;
+
+   if (!array) return -1;
+
+   EINA_ARRAY_ITER_NEXT(array, idx, array_data, itr)
+ {
+if (array_data == data)
+  return idx;
+ }
+
+   return -1;
+}
+
 static void
 ctxpopup_it_cb(void *data, Evas_Object *obj, void *event_info)
 {
ctxpopup_data *ctxdata = data;
Elm_Object_Item *it = event_info;
const char *text = elm_object_item_text_get(it);
+   const Eina_Stringshare *append_str = NULL;
 
+   //Append different string to each candidate list.
+   if (ctxdata->attr->use_append_str_array)
+ {
+int idx = array_data_idx(ctxdata->attr->strs, (void *)text);
+if (idx != -1)
+  {
+ append_str = (const Eina_Stringshare *)
+eina_array_data_get(ctxdata->attr->append_str_array, idx);
+  }
+ }
+   //Append same string to all candidate lists.
+   else
+ {
+append_str = ctxdata->attr->append_str;
+ }
snprintf(ctxdata->candidate, sizeof(ctxdata->candidate), "%s %s%s",
-ctxdata->attr->prepend_str, text, ctxdata->attr->append_str);
+ctxdata->attr->prepend_str, text, append_str);
 
ctxdata->changed_cb(ctxdata->data, obj, ctxdata->candidate);
elm_ctxpopup_dismiss(obj);
diff --git a/src/lib/edc_parser.c b/src/lib/edc_parser.c
index 23b234e..975ed7a 100644
--- a/src/lib/edc_parser.c
+++ b/src/lib/edc_parser.c
@@ -9,6 +9,9 @@ const char ATTR_PREPEND_COLON[] = ":";
 const char ATTR_PREPEND_NONE[] = "";
 const char ATTR_APPEND_SEMICOLON[] = ";";
 const char ATTR_APPEND_TRANSITION_TIME[] = " 1.0;";
+const char ATTR_APPEND_TRANSITION_TIME_FACTOR[] = " 1.0 0.0;";
+const char ATTR_APPEND_TRANSITION_TIME_FACTOR2[] = " 1.0 0.0 0.0;";
+const char ATTR_APPEND_TRANSITION_TIME_FACTOR4[] = " 1.0 0.0 0.0 0.0 0.0;";
 
 typedef struct parser_attr_s
 {
@@ -560,12 +563,26 @@ type_init_thread_blocking(void *data, Ecore_Thread 
*thread EINA_UNUSED)
eina_array_push(trans, eina_stringshare_add("SPRING"));
eina_array_push(trans, eina_stringshare_add("CUBIC_BEZIER"));
 
+   Eina_Array *trans_append_str = eina_array_new(11);
+   eina_array_push(trans_append_str, 
eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME));
+   eina_array_push(trans_append_str, 
eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME));
+   eina_array_push(trans_append_str, 
eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME));
+   eina_array_push(trans_append_str, 
eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME));
+   eina_array_push(trans_append_str, 
eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR));
+   eina_array_push(trans_append_str, 
eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR));
+   eina_array_push(trans_append_str, 
eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR));
+   eina_array_push(trans_append_str, 
eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR2));
+   eina_array_push(trans_append_str, 
eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR2));
+   eina_array_push(trans_append_str, 
eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR2));
+   eina_array_push(trans_append_str, 
eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR4));
+
memset(, 0x00, sizeof(parser_attr));
attr.keyword = eina_stringshare_add("transition");
attr.value.strs = trans;
attr.value.type = ATTR_VALUE_CONSTANT;
attr.value.prepend_str = ATTR_PREPEND_COLON;
-   attr.value.append_str = ATTR_APPEND_TRANSITION_TIME;
+   attr.value.append_str_array = trans_append_str;
+   attr.value.use_append_str_array = EINA_TRUE;
eina_inarray_push(td->attrs, );
 
Eina_Array *aspect_mode = eina_array_new(5);
diff --git a/src/lib/enventor_private.h b/src/lib/enventor_private.h
index dbce81c..00b4c64 100644
--- a/src/lib/enventor_private.h
+++ b/src/lib/enventor_private.h
@@ -69,6 +69,8 @@ struct attr_value_s
attr_value_type type;
const char *prepend_str;
const char *append_str;
+   Eina_Array *append_str_array;
+   Eina_Bool use_append_str_array : 1;
Eina_Bool program : 1;
 };
 

-- 




[EGIT] [core/efl] master 04/05: docs: ecore_con: fill last gaps ion ecore_con eo file documentation

2016-11-23 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 9b0bc5e029f0978aced47986501779224a15fcb0
Author: Stefan Schmidt 
Date:   Wed Nov 23 13:29:53 2016 +0100

docs: ecore_con: fill last gaps ion ecore_con eo file documentation
---
 src/lib/ecore_con/efl_net_server.eo | 2 +-
 src/lib/ecore_con/efl_net_socket_udp.eo | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_con/efl_net_server.eo 
b/src/lib/ecore_con/efl_net_server.eo
index 5781ed3..00084ea 100644
--- a/src/lib/ecore_con/efl_net_server.eo
+++ b/src/lib/ecore_con/efl_net_server.eo
@@ -49,7 +49,7 @@ interface Efl.Net.Server {
 params {
 address: string @nonull; [[Address to run server on]]
 }
-return: Eina.Error;
+return: Eina.Error; [[0 on success, error code otherwise]]
 }
 
 @property address {
diff --git a/src/lib/ecore_con/efl_net_socket_udp.eo 
b/src/lib/ecore_con/efl_net_socket_udp.eo
index c820338..c1e0775 100644
--- a/src/lib/ecore_con/efl_net_socket_udp.eo
+++ b/src/lib/ecore_con/efl_net_socket_udp.eo
@@ -109,7 +109,7 @@ class Efl.Net.Socket.Udp (Efl.Net.Socket.Fd) {
   The iterator is only valid until a new group is joined
   or left using @.multicast_join or @.multicast_leave.
 ]]
-return: free(own(iterator), eina_iterator_free);
+return: free(own(iterator), eina_iterator_free); 
[[Iterator to multicast groups]]
 }
 
 @property multicast_time_to_live {

-- 




[EGIT] [core/efl] master 05/05: docs: edje: fill last gaps in edje eo file documentation

2016-11-23 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 6e86415b13f51b3d95d112c3ce33564cfa0459d1
Author: Stefan Schmidt 
Date:   Wed Nov 23 13:30:47 2016 +0100

docs: edje: fill last gaps in edje eo file documentation
---
 src/lib/edje/edje_object.eo| 2 +-
 src/lib/edje/efl_canvas_layout_internal.eo | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index 66269d3..35ce01e 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -1719,7 +1719,7 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, 
Efl.Container, Efl.Part,
 [[Get the specific data of the current active input panel.
 
   @since 1.2.0]]
-return: void;
+return: void; [[FIXME: void needed here?]]
 keys {
part: string; [[The part name]]
data: void_ptr; [[The specific data to be set to the input 
panel.]]
diff --git a/src/lib/edje/efl_canvas_layout_internal.eo 
b/src/lib/edje/efl_canvas_layout_internal.eo
index 6bcc158..13b8968 100644
--- a/src/lib/edje/efl_canvas_layout_internal.eo
+++ b/src/lib/edje/efl_canvas_layout_internal.eo
@@ -4,6 +4,7 @@ interface Efl.Canvas.Layout_Internal ()
eo_prefix: _edje;
methods {
   @property real_part @protected {
+ [[Real part property]]
  set {}
  values {
 ed: void_ptr; [[Edje object]]

-- 




[EGIT] [tools/enventor] master 01/01: syntax_indent: Insert spaces by tab key.

2016-11-23 Thread Jaehyun Cho
jaehyun pushed a commit to branch master.

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

commit c4d60f326a5b7641bc5e9ddc8799ec91bac715d4
Author: Jaehyun Cho 
Date:   Wed Nov 23 15:53:15 2016 +0900

syntax_indent: Insert spaces by tab key.

Previously, tab key causes that both spaces for indent and spaces for
tab are inserted.
Now, tab key causes that either spaces for indent or spaces for tab are
inserted.

If paragraph is shorter than spaces for indent then only spaces for
indent are inserted. Otherwise, only spaces for tab are inserted.
---
 src/lib/syntax_indent.c | 74 +
 1 file changed, 74 insertions(+)

diff --git a/src/lib/syntax_indent.c b/src/lib/syntax_indent.c
index f040c43..176e643 100644
--- a/src/lib/syntax_indent.c
+++ b/src/lib/syntax_indent.c
@@ -95,6 +95,75 @@ indent_insert_br_case(indent_data *id)
 }
 
 static void
+indent_insert_tab_case(indent_data *id)
+{
+   Evas_Object *entry = id->entry;
+   Evas_Object *tb = elm_entry_textblock_get(entry);
+   Evas_Textblock_Cursor *cur_orig = evas_object_textblock_cursor_get(tb);
+   Evas_Textblock_Cursor *cur = evas_object_textblock_cursor_new(tb);
+   char *utf8 = NULL;
+   int utf8_len = 0;
+   char *p = NULL;
+   Eina_Bool insert_indent_space = EINA_FALSE;
+
+   //Remove inserted "".
+   evas_textblock_cursor_pos_set(cur, evas_textblock_cursor_pos_get(cur_orig));
+   evas_textblock_cursor_char_prev(cur);
+   if (!strncmp(evas_textblock_cursor_content_get(cur), TAB, TAB_LEN))
+ {
+//Cancel added "" from redoundo.
+redoundo_n_diff_cancel(id->rd, 1);
+evas_textblock_cursor_char_delete(cur);
+ }
+   evas_textblock_cursor_pos_set(cur, evas_textblock_cursor_pos_get(cur_orig));
+
+   /* Spaces for indent are not required.
+  Insert spaces for tab. */
+   int space = indent_space_get(id);
+   if (space <= 0) goto end;
+
+   evas_textblock_cursor_paragraph_prev(cur);
+   evas_textblock_cursor_paragraph_next(cur);
+   utf8 = evas_textblock_cursor_range_text_get(cur, cur_orig,
+   EVAS_TEXTBLOCK_TEXT_PLAIN);
+   /* There is no paragraph.
+  Insert spaces for indent. */
+   if (!utf8)
+ {
+insert_indent_space = EINA_TRUE;
+goto end;
+ }
+
+   utf8_len = strlen(utf8);
+   /* Paragraph is shorter than spaces for indent.
+  Insert spaces for indent. */
+   if (utf8_len < space)
+ insert_indent_space = EINA_TRUE;
+
+end:
+   if (insert_indent_space)
+ {
+//Allocate spaces for indent.
+p = alloca(space - utf8_len + 1);
+memset(p, ' ', space - utf8_len);
+p[space - utf8_len] = '\0';
+ }
+   else
+ {
+//Allocate spaces for tab.
+p = alloca(TAB_SPACE + 1);
+memset(p, ' ', TAB_SPACE);
+p[TAB_SPACE] = '\0';
+ }
+
+   redoundo_text_push(id->rd, p, elm_entry_cursor_pos_get(entry), 0, 
EINA_TRUE);
+   elm_entry_entry_insert(entry, p);
+
+   if (utf8) free(utf8);
+   evas_textblock_cursor_free(cur);
+}
+
+static void
 indent_insert_bracket_case(indent_data *id, int cur_line)
 {
Evas_Object *entry = id->entry;
@@ -941,6 +1010,11 @@ indent_insert_apply(indent_data *id, const char *insert, 
int cur_line)
  indent_insert_br_case(id);
  return 1;
   }
+else if (!strcmp(insert, TAB))
+  {
+ indent_insert_tab_case(id);
+ return 0;
+  }
 else if (!strcmp(insert, QUOT))
   return 0;
 else if (!strcmp(insert, LESS))

-- 




[EGIT] [core/efl] master 03/04: ecore_ipc: refactor server data processing in its own function.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 520b57e974192dce8ad9ef130ca87c4a9525cddb
Author: Gustavo Sverzut Barbieri 
Date:   Tue Nov 22 23:55:57 2016 -0200

ecore_ipc: refactor server data processing in its own function.

When we move to efl_net we'll reuse the same function to process
incoming data, thus refactor the code in their own function so it can
be reused.
---
 src/lib/ecore_ipc/ecore_ipc.c | 45 +++
 1 file changed, 33 insertions(+), 12 deletions(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 9d10be7..296d614 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -1171,27 +1171,22 @@ _ecore_ipc_event_client_data(void *data EINA_UNUSED, 
int ev_type EINA_UNUSED, vo
msg._member = _ecore_ipc_ddlt_int(d, svr->prev.i._member, md);
 
 static Eina_Bool
-_ecore_ipc_event_server_data(void *data EINA_UNUSED, int ev_type EINA_UNUSED, 
void *ev)
+ecore_ipc_server_data_process(Ecore_Ipc_Server *svr, void *data, int size, 
Eina_Bool *stolen)
 {
-   Ecore_Con_Event_Server_Data *e;
-
-   e = ev;
-   if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) 
- return ECORE_CALLBACK_RENEW;
-   /* handling code here */
- {
-Ecore_Ipc_Server *svr;
+   /* use e->data and e->size to reduce diff to original code */
+   struct { void *data; int size; } _e = { data, size }, *e = &_e;
+   *stolen = EINA_FALSE;
+   if (1)
+ { /* keep same identation as original code to help verification */
 Ecore_Ipc_Msg_Head msg;
 int offset = 0;
 unsigned char *buf = NULL;
 
-svr = ecore_con_server_data_get(e->server);
-
 if (!svr->buf)
   {
  svr->buf_size = e->size;
  svr->buf = e->data;
- e->data = NULL; /* take it out of the old event */
+ *stolen = EINA_TRUE;
   }
 else
   {
@@ -1326,6 +1321,32 @@ _ecore_ipc_event_server_data(void *data EINA_UNUSED, int 
ev_type EINA_UNUSED, vo
  svr->buf_size -= offset;
   }
  }
+
+   return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool
+_ecore_ipc_event_server_data(void *data EINA_UNUSED, int ev_type EINA_UNUSED, 
void *ev)
+{
+   Ecore_Con_Event_Server_Data *e;
+
+   e = ev;
+   if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) 
+ return ECORE_CALLBACK_RENEW;
+   /* handling code here */
+ {
+Ecore_Ipc_Server *svr;
+Eina_Bool stolen;
+
+svr = ecore_con_server_data_get(e->server);
+
+ecore_ipc_server_data_process(svr, e->data, e->size, );
+if (stolen)
+  {
+ e->data = NULL;
+ e->size = 0;
+  }
+ }
return ECORE_CALLBACK_CANCEL;
 }
 

-- 




[EGIT] [core/efl] master 01/03: docs: elm_widget: fill all gaps in elm_widget eo file documentation

2016-11-23 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit d98db09fe9d1c19d961185111901e506fa49b3d3
Author: Stefan Schmidt 
Date:   Wed Nov 23 11:36:28 2016 +0100

docs: elm_widget: fill all gaps in elm_widget eo file documentation

This one was huge compared to the other areas. This needs a lot more love to
get on a good level docs wise.
---
 src/lib/elementary/elm_widget.eo  | 336 --
 src/lib/elementary/elm_widget_item.eo |   4 +-
 2 files changed, 200 insertions(+), 140 deletions(-)

diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo
index b043c56..7b9e732 100644
--- a/src/lib/elementary/elm_widget.eo
+++ b/src/lib/elementary/elm_widget.eo
@@ -38,6 +38,7 @@ abstract Elm.Widget (Efl.Canvas.Group, 
Elm.Interface.Atspi_Accessible, Elm.Inter
data: Elm_Widget_Smart_Data;
methods {
   @property focus {
+[[Focus property]]
  values {
 focus: bool; [[$true if the widget has focus, $false otherwise]]
  }
@@ -160,8 +161,9 @@ abstract Elm.Widget (Efl.Canvas.Group, 
Elm.Interface.Atspi_Accessible, Elm.Inter
  }
   }
   @property highlight_in_theme {
+[[Highlight in theme property]]
  values {
-highlight: bool;
+highlight: bool; [[$true if widget gets hightlight, $false 
otherwise]]
  }
   }
   @property widget_parent @protected {
@@ -173,77 +175,86 @@ abstract Elm.Widget (Efl.Canvas.Group, 
Elm.Interface.Atspi_Accessible, Elm.Inter
 legacy: elm_widget_parent_get; /* Needed because we don't do 
duplication removal for legacy names. */
  }
  values {
-parent: Efl.Canvas.Object @nullable;
+parent: Efl.Canvas.Object @nullable; [[Widget parent object]]
  }
   }
   @property access_info {
+[[Accessibility information]]
  values {
-txt: string @nullable;
+txt: string @nullable; [[Accessibility text description]]
  }
   }
   @property drag_lock_x {
+[[Drag lock on X axis]]
  values {
-lock: bool;
+lock: bool; [[$true if drag is locked on X axis, $false otherwise]]
  }
   }
   @property access_highlight_in_theme {
+ [[Accessibility highlight in theme]]
  values {
-highlight: bool; [[highlight]]
+highlight: bool; [[$true if highlighted, $false otherwise]]
  }
   }
   @property focus_region_show_mode {
  [[Control the focus_region_show mode.]]
  values {
-mode: Elm.Focus.Region.Show_Mode;
+mode: Elm.Focus.Region.Show_Mode; [[Focus region show mode]]
  }
   }
   @property parent_highlight {
+[[Parent highlight property]]
  set {
  }
  values {
-highlighted: bool;
+highlighted: bool; [[$true if highlighted, $false otherwise]]
  }
   }
   @property theme_object {
+[[Theme object property]]
  set {
-return: Elm.Theme.Apply;
+return: Elm.Theme.Apply; [[Theme apply]]
  }
  values {
-edj: Efl.Canvas.Object;
-wname: string;
-welement: string;
-wstyle: string;
+edj: Efl.Canvas.Object; [[Edje object]]
+wname: string; [[Widget name]]
+welement: string; [[Widget element]]
+wstyle: string; [[Widget style]]
  }
   }
   @property hover_object {
+[[Hover object property]]
  set {
  }
  values {
-sobj: Efl.Canvas.Object @nullable;
+sobj: Efl.Canvas.Object @nullable; [[Hover sub object]]
  }
   }
   @property display_mode {
+[[Display mode property]]
  set {
  }
  values {
-dispmode: Efl.Gfx.Size.Hint.Mode;
+dispmode: Efl.Gfx.Size.Hint.Mode; [[Display mode]]
  }
   }
   @property on_show_region_hook {
+[[Region hook on show property]]
  set {
  }
  values {
-func: region_hook_func_type @nullable;
-data: void_ptr @optional;
+func: region_hook_func_type @nullable; [[Region hook function]]
+data: void_ptr @optional; [[Data pointer]]
  }
   }
   @property domain_part_text_translatable {
+[[Translate domain text part property]]
  set {
  }
  values {
-part: string;
-domain: string;
-translatable: bool;
+part: string; [[Part name]]
+domain: string; [[Domain]]
+translatable: bool; [[$true if translatable, $false otherwise]]
  }
   }
   @property orientation {
@@ -255,59 

[EGIT] [core/efl] master 05/07: ecore_ipc_server_example: test "write & del" using -m/--single-message

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 3bc7c502dbe039d59a11b740b73169775ce0702b
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 02:43:38 2016 -0200

ecore_ipc_server_example: test "write & del" using -m/--single-message

An use case is to send some message and delete the handle, all data
should be sent to client.
---
 src/examples/ecore/ecore_ipc_server_example.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/examples/ecore/ecore_ipc_server_example.c 
b/src/examples/ecore/ecore_ipc_server_example.c
index 1f3ed11..cbbdd66 100644
--- a/src/examples/ecore/ecore_ipc_server_example.c
+++ b/src/examples/ecore/ecore_ipc_server_example.c
@@ -6,6 +6,7 @@ static int retval = EXIT_SUCCESS;
 static int max_size = -1;
 static Eina_Bool echo = EINA_FALSE;
 static Eina_Bool do_flush = EINA_FALSE;
+static Eina_Bool single_message = EINA_FALSE;
 
 static Eina_Bool
 _client_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
@@ -21,6 +22,7 @@ _client_add(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event)
 ecore_ipc_client_send(ev->client, 1, 2, 3, 0, EINA_TRUE,
   "Hello World!", strlen("Hello World!"));
 if (do_flush) ecore_ipc_client_flush(ev->client);
+if (single_message) ecore_ipc_client_del(ev->client);
  }
 
return ECORE_CALLBACK_RENEW;
@@ -60,6 +62,7 @@ _client_data(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event)
   ev->ref + 1,
   ev->ref, 0, ev->data, ev->size);
 if (do_flush) ecore_ipc_client_flush(ev->client);
+if (single_message) ecore_ipc_client_del(ev->client);
  }
 
return ECORE_CALLBACK_RENEW;
@@ -95,6 +98,7 @@ static const Ecore_Getopt options = {
 ECORE_GETOPT_STORE_TRUE('e', "echo",
 "Behave as 'echo' server, send back to client all 
the data receive"),
 ECORE_GETOPT_STORE_TRUE('f', "flush", "Force a flush after every send 
call."),
+ECORE_GETOPT_STORE_TRUE('m', "single-message", "Send a single message and 
delete the client."),
 
 ECORE_GETOPT_VERSION('V', "version"),
 ECORE_GETOPT_COPYRIGHT('C', "copyright"),
@@ -130,6 +134,7 @@ main(int argc, char **argv)
 
  ECORE_GETOPT_VALUE_BOOL(echo),
  ECORE_GETOPT_VALUE_BOOL(do_flush),
+ ECORE_GETOPT_VALUE_BOOL(single_message),
 
  /* standard block to provide version, copyright, license and help */
  ECORE_GETOPT_VALUE_BOOL(quit_option), /* -V/--version quits */

-- 




[EGIT] [core/efl] master 01/01: ecore_ipc: delete if 'delete_me' was set.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 53f1c1ca6efdd96d8be892779f6fec188715b466
Author: Gustavo Sverzut Barbieri 
Date:   Tue Nov 22 19:53:06 2016 -0200

ecore_ipc: delete if 'delete_me' was set.

The flag 'delete_me' is set when there are pending events to be
dispatched. Once these events are freed, they will check if the server
was pending delete and call ecore_ipc_server_del() again, thus we must
not return, otherwise data will be leaked.
---
 src/lib/ecore_ipc/ecore_ipc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 7c886e9..5247839 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -382,7 +382,6 @@ ecore_ipc_server_del(Ecore_Ipc_Server *svr)
  "ecore_ipc_server_del");
 return NULL;
  }
-   if (svr->delete_me) return NULL;
 
data = svr->data;
svr->data = NULL;

-- 




[EGIT] [core/efl] master 01/07: efl_io_copier: add flush method.

2016-11-23 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 5c961bba9b3c724764cbc915a3ed9c1df918d4c8
Author: Gustavo Sverzut Barbieri 
Date:   Wed Nov 23 03:11:26 2016 -0200

efl_io_copier: add flush method.

This method will force a read-write cycle and returns if it's fully
done or not. It may be used to force data to be written before a
handle is deleted (when one can't wait for the data to be written
asynchronously).
---
 src/lib/ecore/efl_io_copier.c  | 37 +
 src/lib/ecore/efl_io_copier.eo | 25 +
 2 files changed, 62 insertions(+)

diff --git a/src/lib/ecore/efl_io_copier.c b/src/lib/ecore/efl_io_copier.c
index d304dfe..a47d3df 100644
--- a/src/lib/ecore/efl_io_copier.c
+++ b/src/lib/ecore/efl_io_copier.c
@@ -704,6 +704,43 @@ _efl_io_copier_inactivity_timeout_get(Eo *o EINA_UNUSED, 
Efl_Io_Copier_Data *pd)
return pd->inactivity_timeout;
 }
 
+EOLIAN static Eina_Bool
+_efl_io_copier_flush(Eo *o, Efl_Io_Copier_Data *pd)
+{
+   uint64_t old_read = pd->progress.read;
+   uint64_t old_written = pd->progress.written;
+   uint64_t old_total = pd->progress.total;
+
+   _COPIER_DBG(o, pd);
+
+   if (pd->source && !efl_io_reader_eos_get(pd->source))
+ _efl_io_copier_read(o, pd);
+
+   if (pd->destination)
+ _efl_io_copier_write(o, pd);
+
+   if ((old_read != pd->progress.read) ||
+   (old_written != pd->progress.written) ||
+   (old_total != pd->progress.total))
+ {
+efl_event_callback_call(o, EFL_IO_COPIER_EVENT_PROGRESS, NULL);
+_efl_io_copier_inactivity_timeout_reschedule(o, pd);
+ }
+
+   if (!pd->source || efl_io_reader_eos_get(pd->source))
+ {
+if ((!pd->done) &&
+((!pd->destination) || (eina_binbuf_length_get(pd->buf) == 0)))
+  {
+ pd->done = EINA_TRUE;
+ if (pd->inactivity_timer) efl_future_cancel(pd->inactivity_timer);
+ efl_event_callback_call(o, EFL_IO_COPIER_EVENT_DONE, NULL);
+  }
+ }
+
+   return pd->done;
+}
+
 EOLIAN static Eo *
 _efl_io_copier_efl_object_constructor(Eo *o, Efl_Io_Copier_Data *pd)
 {
diff --git a/src/lib/ecore/efl_io_copier.eo b/src/lib/ecore/efl_io_copier.eo
index a5e07ac..c19e3b2 100644
--- a/src/lib/ecore/efl_io_copier.eo
+++ b/src/lib/ecore/efl_io_copier.eo
@@ -112,6 +112,31 @@ class Efl.Io.Copier (Efl.Loop_User, Efl.Io.Closer) {
]]
return: free(own(ptr(Eina.Binbuf)), eina_binbuf_free) @warn_unused; 
[[Binbuf]]
 }
+
+flush {
+[[Forces reading from source and writing to destination.
+
+  This executes a single read->write cycle, if more data
+  could be read from source (ie: not EOS) or not all data
+  was written to destination, then $false is
+  returned. Then to forcefully drain source and write all
+  contents to destination, use in a loop until it returns
+  $true.
+
+  The return value matches "done" event, that is, when
+  $true is returned, the "done" event is emitted.
+
+  This function may also emit "progress" and "error"
+  events.
+
+  \@note this function may block the main loop execution
+  until operations complete! This is bad for usability, as
+  user interface or other operations may freeze. A better
+  approach is to operate asynchronously and wait for
+  "done" event.
+]]
+return: bool(true);
+}
 }
 
 events {

-- 




  1   2   >