[EGIT] [core/efl] master 01/03: edje: rename intf Efl.Canvas.Layout.Signal to Efl.Layout.Signal

2017-12-04 Thread Amitesh Singh
ami pushed a commit to branch master.

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

commit 7b3fde4d4b9047b39a1dc0c7794500364f689325
Author: Amitesh Singh 
Date:   Tue Dec 5 14:39:20 2017 +0900

edje: rename intf Efl.Canvas.Layout.Signal to Efl.Layout.Signal
---
 src/Makefile_Edje.am   |  2 +-
 src/lib/edje/Edje_Eo.h |  2 +-
 src/lib/edje/edje_legacy.c |  8 +++---
 src/lib/edje/edje_message_queue.c  |  6 ++---
 src/lib/edje/edje_object.eo| 12 -
 src/lib/edje/edje_program.c|  6 ++---
 src/lib/edje/edje_smart.c  |  2 +-
 ...anvas_layout_signal.eo => efl_layout_signal.eo} |  2 +-
 src/lib/elementary/efl_ui_check.c  |  6 ++---
 src/lib/elementary/efl_ui_image.c  |  2 +-
 src/lib/elementary/efl_ui_image.eo |  4 +--
 src/lib/elementary/efl_ui_layout.c | 26 +--
 src/lib/elementary/efl_ui_layout.eo| 12 -
 src/lib/elementary/efl_ui_nstate.c |  2 +-
 src/lib/elementary/efl_ui_text.c   | 22 
 src/lib/elementary/efl_ui_text.eo  |  6 ++---
 src/lib/elementary/elc_naviframe.c |  4 +--
 src/lib/elementary/elc_popup.c |  2 +-
 src/lib/elementary/elm_entry.c | 22 
 src/lib/elementary/elm_entry.eo|  6 ++---
 src/lib/elementary/elm_naviframe.eo|  2 +-
 src/lib/elementary/elm_popup.eo|  2 +-
 src/tests/edje/edje_test_edje.c|  8 +++---
 src/tests/emotion/emotion_test_main-eo.c   | 30 +++---
 24 files changed, 98 insertions(+), 98 deletions(-)

diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index fd7c903e38..2c1921a7e3 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -3,7 +3,7 @@
 
 edje_eolian_files = \
lib/edje/efl_canvas_layout_calc.eo \
-   lib/edje/efl_canvas_layout_signal.eo \
+   lib/edje/efl_layout_signal.eo \
lib/edje/efl_canvas_layout_group.eo \
lib/edje/edje_object.eo \
lib/edje/efl_canvas_layout_part.eo \
diff --git a/src/lib/edje/Edje_Eo.h b/src/lib/edje/Edje_Eo.h
index 877f3bea07..9f3c7bc3bc 100644
--- a/src/lib/edje/Edje_Eo.h
+++ b/src/lib/edje/Edje_Eo.h
@@ -1,7 +1,7 @@
 #include 
 
 #include "efl_canvas_layout_calc.eo.h"
-#include "efl_canvas_layout_signal.eo.h"
+#include "efl_layout_signal.eo.h"
 #include "efl_canvas_layout_group.eo.h"
 #include "edje_object.eo.h"
 #include "edje_edit.eo.h"
diff --git a/src/lib/edje/edje_legacy.c b/src/lib/edje/edje_legacy.c
index 4bf32aa0f6..700d17cbd6 100644
--- a/src/lib/edje/edje_legacy.c
+++ b/src/lib/edje/edje_legacy.c
@@ -64,20 +64,20 @@ edje_object_part_state_get(const Edje_Object *obj, const 
char * part, double *va
 EAPI void
 edje_object_message_signal_process(Edje_Object *obj)
 {
-   efl_canvas_layout_signal_process(obj, EINA_FALSE);
+   efl_layout_signal_process(obj, EINA_FALSE);
 }
 
 /* since 1.20 */
 EAPI void
 edje_object_message_signal_recursive_process(Edje_Object *obj)
 {
-   efl_canvas_layout_signal_process(obj, EINA_TRUE);
+   efl_layout_signal_process(obj, EINA_TRUE);
 }
 
 EAPI void
 edje_object_signal_callback_add(Evas_Object *obj, const char *emission, const 
char *source, Edje_Signal_Cb func, void *data)
 {
-   efl_canvas_layout_signal_callback_add(obj, emission, source, 
(Efl_Signal_Cb) func, data);
+   efl_layout_signal_callback_add(obj, emission, source, (Efl_Signal_Cb) func, 
data);
 }
 
 EAPI void *
@@ -133,7 +133,7 @@ edje_object_signal_callback_del(Evas_Object *obj, const 
char *emission, const ch
 EAPI void
 edje_object_signal_emit(Evas_Object *obj, const char *emission, const char 
*source)
 {
-   efl_canvas_layout_signal_emit(obj, emission, source);
+   efl_layout_signal_emit(obj, emission, source);
 }
 
 EAPI Eina_Bool
diff --git a/src/lib/edje/edje_message_queue.c 
b/src/lib/edje/edje_message_queue.c
index 4e132154ec..d971582e4d 100644
--- a/src/lib/edje/edje_message_queue.c
+++ b/src/lib/edje/edje_message_queue.c
@@ -32,7 +32,7 @@ _edje_object_message_propagate_send(Evas_Object *obj, 
Edje_Message_Type type, in
 }
 
 EOLIAN void
-_edje_object_efl_canvas_layout_signal_message_send(Eo *obj, Edje *pd 
EINA_UNUSED, int id, const Eina_Value val)
+_edje_object_efl_layout_signal_message_send(Eo *obj, Edje *pd EINA_UNUSED, int 
id, const Eina_Value val)
 {
const Eina_Value_Type *valtype;
Edje_Message_Type msgtype;
@@ -228,7 +228,7 @@ end:
 }
 
 EOLIAN void
-_edje_object_efl_canvas_layout_signal_signal_process(Eo *obj, Edje *ed, 
Eina_Bool recurse)
+_edje_object_efl_layout_signal_signal_process(Eo *obj, Edje *ed, Eina_Bool 
recurse)
 {
Eina_List *l;
Evas_Object *o;
@@ -238,7 +238,7 @@ 

[EGIT] [core/efl] master 02/03: edje: rename intf Efl.Canvas.Layout_Calc to Efl.Layout.Calc

2017-12-04 Thread Amitesh Singh
ami pushed a commit to branch master.

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

commit c7aa3b2f83bfed886cf5bcd53dea21d0c9d11a99
Author: Amitesh Singh 
Date:   Tue Dec 5 15:29:07 2017 +0900

edje: rename intf Efl.Canvas.Layout_Calc to Efl.Layout.Calc
---
 src/Makefile_Edje.am   |  2 +-
 src/lib/edje/Edje_Eo.h |  2 +-
 src/lib/edje/edje_legacy.c | 14 +++---
 src/lib/edje/edje_object.eo| 14 +++---
 src/lib/edje/edje_private.h|  2 +-
 src/lib/edje/edje_smart.c  |  2 +-
 src/lib/edje/edje_util.c   | 14 +++---
 .../edje/{efl_canvas_layout_calc.eo => efl_layout_calc.eo} |  2 +-
 src/lib/elementary/efl_ui_image.c  |  8 
 src/lib/elementary/efl_ui_image.eo |  6 +++---
 src/lib/elementary/efl_ui_layout.c |  8 
 src/lib/elementary/efl_ui_layout.eo|  6 +++---
 src/tests/edje/edje_test_edje.c|  4 ++--
 13 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index 2c1921a7e3..e87c45e9e6 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -2,7 +2,7 @@
 ### Library
 
 edje_eolian_files = \
-   lib/edje/efl_canvas_layout_calc.eo \
+   lib/edje/efl_layout_calc.eo \
lib/edje/efl_layout_signal.eo \
lib/edje/efl_canvas_layout_group.eo \
lib/edje/edje_object.eo \
diff --git a/src/lib/edje/Edje_Eo.h b/src/lib/edje/Edje_Eo.h
index 9f3c7bc3bc..cd2465e7ee 100644
--- a/src/lib/edje/Edje_Eo.h
+++ b/src/lib/edje/Edje_Eo.h
@@ -1,6 +1,6 @@
 #include 
 
-#include "efl_canvas_layout_calc.eo.h"
+#include "efl_layout_calc.eo.h"
 #include "efl_layout_signal.eo.h"
 #include "efl_canvas_layout_group.eo.h"
 #include "edje_object.eo.h"
diff --git a/src/lib/edje/edje_legacy.c b/src/lib/edje/edje_legacy.c
index 700d17cbd6..526b31a113 100644
--- a/src/lib/edje/edje_legacy.c
+++ b/src/lib/edje/edje_legacy.c
@@ -1090,13 +1090,13 @@ edje_object_part_text_insert(Eo *obj, const char *part, 
const char *text)
 EAPI void
 edje_object_update_hints_set(Edje_Object *obj, Eina_Bool update)
 {
-   efl_canvas_layout_calc_auto_update_hints_set(obj, update);
+   efl_layout_calc_auto_update_hints_set(obj, update);
 }
 
 EAPI Eina_Bool
 edje_object_update_hints_get(const Edje_Object *obj)
 {
-   return efl_canvas_layout_calc_auto_update_hints_get(obj);
+   return efl_layout_calc_auto_update_hints_get(obj);
 }
 
 EAPI void
@@ -1118,7 +1118,7 @@ edje_object_size_min_restricted_calc(Edje_Object *obj, 
int *minw, int *minh, int
 if (minh) *minh = sz.h;
 return;
  }
-   sz = efl_canvas_layout_calc_size_min(obj, EINA_SIZE2D(restrictedw, 
restrictedh));
+   sz = efl_layout_calc_size_min(obj, EINA_SIZE2D(restrictedw, restrictedh));
if (minw) *minw = sz.w;
if (minh) *minh = sz.h;
 }
@@ -1130,7 +1130,7 @@ edje_object_parts_extends_calc(Edje_Object *obj, int *x, 
int *y, int *w, int *h)
Edje *ed;
 
ed = _edje_fetch(obj);
-   if (ed) r = efl_canvas_layout_calc_parts_extends(obj);
+   if (ed) r = efl_layout_calc_parts_extends(obj);
if (x) *x = r.x;
if (y) *y = r.y;
if (w) *w = r.w;
@@ -1141,19 +1141,19 @@ edje_object_parts_extends_calc(Edje_Object *obj, int 
*x, int *y, int *w, int *h)
 EAPI int
 edje_object_freeze(Edje_Object *obj)
 {
-   return efl_canvas_layout_calc_freeze(obj);
+   return efl_layout_calc_freeze(obj);
 }
 
 EAPI int
 edje_object_thaw(Edje_Object *obj)
 {
-   return efl_canvas_layout_calc_thaw(obj);
+   return efl_layout_calc_thaw(obj);
 }
 
 EAPI void
 edje_object_calc_force(Edje_Object *obj)
 {
-   efl_canvas_layout_calc_force(obj);
+   efl_layout_calc_force(obj);
 }
 
 EAPI void
diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index af514c52e2..a23fb94aca 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -3,7 +3,7 @@ import edje_types;
 // FIXME: This EO doc needs a direct link to the "edcref" doc
 
 class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
-   Efl.Observer, Efl.Ui.Base, Efl.Canvas.Layout_Calc,
+   Efl.Observer, Efl.Ui.Base, Efl.Layout.Calc,
Efl.Layout.Signal, Efl.Canvas.Layout_Group,
Efl.Player, Efl.Gfx.Color_Class, Efl.Gfx.Text_Class,
Efl.Gfx.Size_Class)
@@ -109,12 +109,12 @@ class Edje.Object (Efl.Canvas.Group, Efl.File, 
Efl.Container, Efl.Part,
   Efl.Gfx.Size_Class.size_class { get; set; }
   Efl.Gfx.Size_Class.size_class_del;
   Efl.Canvas.Group.group_calculate;
-  Efl.Canvas.Layout_Calc.calc_auto_update_hints { get; set; }
-  

[EGIT] [core/efl] master 03/03: edje: rename intf Efl.Canvas.Layout_Group to Efl.Layout.Group

2017-12-04 Thread Amitesh Singh
ami pushed a commit to branch master.

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

commit bdc396945281290c3d4b0622d9f9a3945af01097
Author: Amitesh Singh 
Date:   Tue Dec 5 16:00:08 2017 +0900

edje: rename intf Efl.Canvas.Layout_Group to Efl.Layout.Group
---
 src/Makefile_Edje.am   |  2 +-
 src/lib/edje/Edje_Eo.h |  2 +-
 src/lib/edje/Edje_Legacy.h |  2 +-
 src/lib/edje/edje_legacy.c |  4 ++--
 src/lib/edje/edje_object.eo|  8 
 src/lib/edje/edje_smart.c  |  2 +-
 src/lib/edje/edje_util.c   |  6 +++---
 .../{efl_canvas_layout_group.eo => efl_layout_group.eo}|  2 +-
 src/lib/elementary/efl_ui_image.c  |  8 
 src/lib/elementary/efl_ui_image.eo |  6 +++---
 src/lib/elementary/efl_ui_image_zoomable.c |  8 
 src/lib/elementary/efl_ui_image_zoomable.eo|  4 ++--
 src/lib/elementary/efl_ui_layout.c | 14 +++---
 src/lib/elementary/efl_ui_layout.eo|  8 
 14 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index e87c45e9e6..1f7ffe980f 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -4,7 +4,7 @@
 edje_eolian_files = \
lib/edje/efl_layout_calc.eo \
lib/edje/efl_layout_signal.eo \
-   lib/edje/efl_canvas_layout_group.eo \
+   lib/edje/efl_layout_group.eo \
lib/edje/edje_object.eo \
lib/edje/efl_canvas_layout_part.eo \
lib/edje/efl_canvas_layout_part_box.eo \
diff --git a/src/lib/edje/Edje_Eo.h b/src/lib/edje/Edje_Eo.h
index cd2465e7ee..663d6c5244 100644
--- a/src/lib/edje/Edje_Eo.h
+++ b/src/lib/edje/Edje_Eo.h
@@ -2,7 +2,7 @@
 
 #include "efl_layout_calc.eo.h"
 #include "efl_layout_signal.eo.h"
-#include "efl_canvas_layout_group.eo.h"
+#include "efl_layout_group.eo.h"
 #include "edje_object.eo.h"
 #include "edje_edit.eo.h"
 
diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h
index aaecf138bc..730b6ff64b 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -3111,4 +3111,4 @@ typedef Efl_Canvas_Layout_Part_Type Edje_Part_Type;
  */
 #include "edje_object.eo.legacy.h"
 #include "edje_edit.eo.legacy.h"
-#include "efl_canvas_layout_group.eo.legacy.h"
+#include "efl_layout_group.eo.legacy.h"
diff --git a/src/lib/edje/edje_legacy.c b/src/lib/edje/edje_legacy.c
index 526b31a113..2ead3b40be 100644
--- a/src/lib/edje/edje_legacy.c
+++ b/src/lib/edje/edje_legacy.c
@@ -1188,7 +1188,7 @@ EAPI void
 edje_object_size_min_get(const Edje_Object *obj, int *minw, int *minh)
 {
Eina_Size2D sz;
-   sz = efl_canvas_layout_group_size_min_get(obj);
+   sz = efl_layout_group_size_min_get(obj);
if (minw) *minw = sz.w;
if (minh) *minh = sz.h;
 }
@@ -1197,7 +1197,7 @@ EAPI void
 edje_object_size_max_get(const Edje_Object *obj, int *maxw, int *maxh)
 {
Eina_Size2D sz;
-   sz = efl_canvas_layout_group_size_max_get(obj);
+   sz = efl_layout_group_size_max_get(obj);
if (maxw) *maxw = sz.w;
if (maxh) *maxh = sz.h;
 }
diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index a23fb94aca..5af4a417b5 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -4,7 +4,7 @@ import edje_types;
 
 class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
Efl.Observer, Efl.Ui.Base, Efl.Layout.Calc,
-   Efl.Layout.Signal, Efl.Canvas.Layout_Group,
+   Efl.Layout.Signal, Efl.Layout.Group,
Efl.Player, Efl.Gfx.Color_Class, Efl.Gfx.Text_Class,
Efl.Gfx.Size_Class)
 {
@@ -115,9 +115,9 @@ class Edje.Object (Efl.Canvas.Group, Efl.File, 
Efl.Container, Efl.Part,
   Efl.Layout.Calc.calc_freeze;
   Efl.Layout.Calc.calc_thaw;
   Efl.Layout.Calc.calc_force;
-  Efl.Canvas.Layout_Group.group_size_min { get; }
-  Efl.Canvas.Layout_Group.group_size_max { get; }
-  Efl.Canvas.Layout_Group.group_data { get; }
+  Efl.Layout.Group.group_size_min { get; }
+  Efl.Layout.Group.group_size_max { get; }
+  Efl.Layout.Group.group_data { get; }
   Efl.Layout.Signal.message_send;
   Efl.Layout.Signal.signal_callback_add;
   Efl.Layout.Signal.signal_callback_del;
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index 2a029d7839..6c2406d13a 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -546,4 +546,4 @@ _edje_object_efl_player_play_speed_get(Eo *obj EINA_UNUSED, 
Edje *pd)
 #include "edje_global.eo.c"
 #include "efl_layout_calc.eo.c"
 #include "efl_layout_signal.eo.c"
-#include 

[EGIT] [core/efl] master 07/39: format: Use strbuf builtin type instead of ptr()

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 22919b2050e4c8cb84454c7d47bb935bec957ad2
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 16:28:56 2017 +0900

format: Use strbuf builtin type instead of ptr()
---
 src/lib/efl/interfaces/efl_ui_format.eo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/efl/interfaces/efl_ui_format.eo 
b/src/lib/efl/interfaces/efl_ui_format.eo
index 2f386dafa7..38647d33fb 100644
--- a/src/lib/efl/interfaces/efl_ui_format.eo
+++ b/src/lib/efl/interfaces/efl_ui_format.eo
@@ -3,7 +3,7 @@ import eina_types;
 function Efl.Ui.Format_Func_Cb {
[[Function pointer for format function hook]]
params {
-  @in str: ptr(Eina.Strbuf); [[the formated string to be appended by 
user.]]
+  @in str: strbuf; [[the formated string to be appended by user.]]
   @in value: const(any_value); [[The Eina.Value passed by $obj.]]
}
 };

-- 




[EGIT] [core/efl] master 04/39: cxx: No need to declare the current class twice

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit be267a071ecb66f339e461f5b95b2e0fae40c98d
Author: Jean-Philippe Andre 
Date:   Tue Nov 14 17:41:24 2017 +0900

cxx: No need to declare the current class twice

This avoids double _FWD_GUARD for the current class in a .eo.hh header.
---
 src/bin/eolian_cxx/eolian_cxx.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index 34b8bbc3ab..3fab179cae 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -72,7 +72,7 @@ generate(const Eolian_Class* klass, eolian_cxx::options_type 
const& opts)
 
efl::eolian::grammar::attributes::klass_def klass_def(klass, opts.unit);
std::vector klasses{klass_def};
-   std::vector 
forward_klasses{klass_def};
+   std::vector forward_klasses{};
 
std::set c_headers;
std::set cpp_headers;

-- 




[EGIT] [core/efl] master 32/39: cxx: Update slider example

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 08918e3285e75d6eb89df2848854a4b2d4eba3b8
Author: Jean-Philippe Andre 
Date:   Tue Nov 28 17:24:06 2017 +0900

cxx: Update slider example
---
 src/examples/elementary/slider_cxx_example.cc | 35 +++
 1 file changed, 20 insertions(+), 15 deletions(-)

diff --git a/src/examples/elementary/slider_cxx_example.cc 
b/src/examples/elementary/slider_cxx_example.cc
index 036dadcd1a..959fe256f0 100644
--- a/src/examples/elementary/slider_cxx_example.cc
+++ b/src/examples/elementary/slider_cxx_example.cc
@@ -4,6 +4,7 @@
 
 #include 
 
+using namespace std::placeholders;
 using efl::eo::instantiate;
 
 static efl::ui::Win win;
@@ -11,10 +12,11 @@ static efl::ui::Win win;
 static void
 efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
 {
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+
win = efl::ui::Win(instantiate);
win.text_set("Slider example");
-   efl::eolian::event_add(efl::ui::Win::delete_request_event, win,
-  std::bind([](){ win = nullptr; ::efl_exit(0); }));
+   win.delete_request_event_cb_add([](){ win._delete(); });
 
efl::ui::Box bx(instantiate, win);
win.content_set(bx);
@@ -62,17 +64,20 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev 
EINA_UNUSED)
bx.pack_end(sl5);
 
efl::ui::Slider sl6(instantiate, win);
-   sl4.direction_set(EFL_UI_DIR_HORIZONTAL);
-
-// FIXME
-//   auto indicator_format = [] (double val) {
-//char *indicator = new char[32];
-//snprintf(indicator, 32, "%1.2f 
u", val);
-//return indicator;
-//   };
-//   auto indicator_free = [] (char *obj) {delete obj;} ;
-//   sl6.indicator_format_function_set(indicator_format, indicator_free);
-
+   sl6.direction_set(EFL_UI_DIR_HORIZONTAL);
+   sl6.range_min_max_set(0, 10);
+   auto format_cb = std::bind([](
+  efl::eina::strbuf_wrapper& sb,
+  efl::eina::value_view const& value) {
+ try {
+int d = int(efl::eina::get(value));
+if (d >= 2) sb.append_printf("%d things", d);
+else if (!d) sb.append("nothing");
+else sb.append("one thing");
+ } catch (std::system_error const&)  {
+sb.append(value.to_string());
+ } }, _1, _2);
+   sl6.format_cb_set(format_cb);
sl6.hint_align_set(0.5, EFL_GFX_SIZE_HINT_FILL);
sl6.hint_weight_set(0, EFL_GFX_SIZE_HINT_EXPAND);
bx.pack_end(sl6);
@@ -91,7 +96,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev 
EINA_UNUSED)
{ std::cout << "Delay changed to " << obj.range_value_get() << std::endl; }
  , std::placeholders::_1);
 
-   efl::eolian::event_add(sl7.changed_event, sl7, changed);
-   efl::eolian::event_add(sl7.delay_changed_event, sl7, delay);
+   sl7.changed_event_cb_add(changed);
+   sl7.delay_changed_event_cb_add(delay);
 }
 EFL_MAIN()

-- 




[EGIT] [core/efl] master 28/39: cxx: Add header guards for manual definitions

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit cb7f2d0dd5da40be7ae0bcaf89ceebe3c0d32b6d
Author: Jean-Philippe Andre 
Date:   Tue Nov 28 15:32:02 2017 +0900

cxx: Add header guards for manual definitions

This will be used for things like efl_del

efl_part was a lucky case where the entire class was to be implemented
manually, thus the global header guard was sufficient.
---
 src/lib/eolian_cxx/grammar/function_declaration.hpp | 13 +
 src/lib/eolian_cxx/grammar/function_definition.hpp  | 11 +++
 2 files changed, 24 insertions(+)

diff --git a/src/lib/eolian_cxx/grammar/function_declaration.hpp 
b/src/lib/eolian_cxx/grammar/function_declaration.hpp
index fe3ad732f1..634642eabc 100644
--- a/src/lib/eolian_cxx/grammar/function_declaration.hpp
+++ b/src/lib/eolian_cxx/grammar/function_declaration.hpp
@@ -44,6 +44,11 @@ struct function_declaration_generator
 .generate(sink, std::make_tuple(_klass_name.namespaces, 
_klass_name.eolian_name, suffix), add_upper_case_context(ctx)))
 return false;
 
+  if(!as_generator
+("#ifndef EOLIAN_CXX_" << string << "_DECLARATION\n")
+.generate(sink, f.c_name, add_upper_case_context(ctx)))
+return false;
+
   std::string template_statement(f.template_statement());
   if (!template_statement.empty() &&
   !as_generator(template_statement << " ")
@@ -58,9 +63,17 @@ struct function_declaration_generator
  << string << "(" << (parameter % ", ") << ")" << const_flag << 
";\n")
 .generate(sink, std::make_tuple(f.return_type, 
escape_keyword(f.name), f.parameters), ctx))
 return false;
+
+  if(!as_generator
+("#else\n" << scope_tab << "EOLIAN_CXX_" << string << 
"_DECLARATION\n"
+ "#endif\n")
+.generate(sink, f.c_name, add_upper_case_context(ctx)))
+return false;
+
   if(f.is_beta &&
 !as_generator("#endif\n").generate(sink, attributes::unused, ctx))
 return false;
+
   return true;
}
 
diff --git a/src/lib/eolian_cxx/grammar/function_definition.hpp 
b/src/lib/eolian_cxx/grammar/function_definition.hpp
index 1ffbed4bb3..46df876b33 100644
--- a/src/lib/eolian_cxx/grammar/function_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/function_definition.hpp
@@ -54,6 +54,11 @@ struct function_definition_generator
  .generate(sink, std::make_tuple(_klass_name.namespaces, 
_klass_name.eolian_name), add_upper_case_context(ctx)))
 return false;
 
+  if(!as_generator
+("#ifndef EOLIAN_CXX_" << string << "_IMPLEMENTATION\n")
+.generate(sink, f.c_name, add_upper_case_context(ctx)))
+return false;
+
   std::string template_statement(f.template_statement());
   if (!template_statement.empty() &&
   !as_generator(template_statement << "\n")
@@ -161,6 +166,12 @@ struct function_definition_generator
   if(!as_generator("}\n").generate(sink, attributes::unused, ctx))
 return false;
 
+  if(!as_generator
+("#else\n" << scope_tab << "EOLIAN_CXX_" << string << 
"_IMPLEMENTATION\n"
+ "#endif\n")
+.generate(sink, f.c_name, add_upper_case_context(ctx)))
+return false;
+
   if(f.is_beta &&
  !as_generator("#endif\n").generate(sink, attributes::unused, ctx))
 return false;

-- 




[EGIT] [core/efl] master 38/39: ecore_wl2: Fix a warning

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit b867b6aa244e52033d0a6b50cde7100f5c4c3464
Author: Jean-Philippe Andre 
Date:   Tue Dec 5 14:33:03 2017 +0900

ecore_wl2: Fix a warning
---
 src/lib/ecore_wl2/ecore_wl2_window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index 8f6a579a4a..37282400a8 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1035,7 +1035,7 @@ ecore_wl2_window_display_get(const Ecore_Wl2_Window 
*window)
EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(window->display, NULL);
 
-   if (window->display->recovering) return EINA_FALSE;
+   if (window->display->recovering) return NULL;
 
return window->display;
 }

-- 




[EGIT] [core/efl] master 12/39: cxx: Add define EFL_CXXPERIMENTAL for testing

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 753304c69d27a5303e742dffaaff6f6230c3211b
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 17:17:04 2017 +0900

cxx: Add define EFL_CXXPERIMENTAL for testing

I'll hide some controversial features behind this, until we come to an
agreement with @felipealmeida and people who actually know C++ (iow: not
just me^^).

Features protected:
 - easy wref (using -> without locking)
 - xxx_event_cb_add() functions in object classes
 - instantiate(obj) to create a new object
 - add as a synonym for instantiate (both in efl::eo)
---
 src/bindings/cxx/eo_cxx/eo_concrete.hh |  6 ++
 src/bindings/cxx/eo_cxx/eo_wref.hh |  2 +-
 src/examples/elementary/bg_cxx_example_02.cc   |  4 +++-
 src/examples/elementary/button_cxx_example_00.cc   |  2 +-
 src/examples/elementary/button_cxx_example_01.cc   |  2 +-
 src/examples/elementary/calendar_cxx_example_02.cc |  8 
 src/examples/elementary/radio_cxx_example_01.cc|  2 +-
 src/lib/eolian_cxx/grammar/class_definition.hpp| 12 ++--
 8 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/src/bindings/cxx/eo_cxx/eo_concrete.hh 
b/src/bindings/cxx/eo_cxx/eo_concrete.hh
index adc33985b7..47013dcbc6 100644
--- a/src/bindings/cxx/eo_cxx/eo_concrete.hh
+++ b/src/bindings/cxx/eo_cxx/eo_concrete.hh
@@ -32,6 +32,7 @@ namespace efl { namespace eo {
 /// @{
 
 struct instantiate_t {
+#ifdef EFL_CXXPERIMENTAL
/// @brief A helper to create objects with a different syntax
///
/// @param obj The object to instantiate
@@ -49,6 +50,7 @@ struct instantiate_t {
   obj = T(*this);
   return obj;
}
+#endif
 };
 
 /// @brief The handle to use to create real EFL objects
@@ -57,6 +59,10 @@ struct instantiate_t {
 /// to trigger a real EFL object creation. The following syntax is preferred:
 ///   T obj(instantiate, ...);
 instantiate_t const instantiate = {};
+
+#ifdef EFL_CXXPERIMENTAL
+instantiate_t const add = {};
+#endif
 
 /// @brief Creates concrete versions for Eo wrappers.
 ///
diff --git a/src/bindings/cxx/eo_cxx/eo_wref.hh 
b/src/bindings/cxx/eo_cxx/eo_wref.hh
index e28409c513..aed6d699d0 100644
--- a/src/bindings/cxx/eo_cxx/eo_wref.hh
+++ b/src/bindings/cxx/eo_cxx/eo_wref.hh
@@ -123,7 +123,7 @@ struct wref
   return *this;
}
 
-#ifdef EFL_CXX_WREF_EASY
+#ifdef EFL_CXXPERIMENTAL
T operator->() const {
   if (!_eo_wref) return T(nullptr);
   return T(detail::ref(_eo_wref));
diff --git a/src/examples/elementary/bg_cxx_example_02.cc 
b/src/examples/elementary/bg_cxx_example_02.cc
index 34016b6c9c..8ef33a8816 100644
--- a/src/examples/elementary/bg_cxx_example_02.cc
+++ b/src/examples/elementary/bg_cxx_example_02.cc
@@ -5,6 +5,8 @@
  * ./bg_cxx_example_02
  */
 
+#define EFL_CXXPERIMENTAL
+
 #include 
 
 #include 
@@ -16,7 +18,7 @@ efl::ui::Win win;
 EAPI_MAIN void
 efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
 {
-   instantiate(win);
+   win = efl::ui::Win(instantiate);
::efl_ref(win._eo_ptr()); // FIXME: Window is doing BAD THINGS™!
win.text_set("Bg Image");
win.autohide_set(true);
diff --git a/src/examples/elementary/button_cxx_example_00.cc 
b/src/examples/elementary/button_cxx_example_00.cc
index 5e899e1591..d44f18a924 100644
--- a/src/examples/elementary/button_cxx_example_00.cc
+++ b/src/examples/elementary/button_cxx_example_00.cc
@@ -1,6 +1,6 @@
 // g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx 
ecore-cxx evas-cxx edje-cxx` button_cxx_example_00.cc -o button_cxx_example_00
 
-#define EFL_CXX_WREF_EASY
+#define EFL_CXXPERIMENTAL
 #include 
 #include 
 
diff --git a/src/examples/elementary/button_cxx_example_01.cc 
b/src/examples/elementary/button_cxx_example_01.cc
index e6b5147af5..7de67d3abb 100644
--- a/src/examples/elementary/button_cxx_example_01.cc
+++ b/src/examples/elementary/button_cxx_example_01.cc
@@ -1,6 +1,6 @@
 // g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx 
ecore-cxx evas-cxx edje-cxx` button_cxx_example_01.cc -o button_cxx_example_01
 
-#define EFL_CXX_WREF_EASY
+#define EFL_CXXPERIMENTAL
 #include 
 
 using efl::eo::instantiate;
diff --git a/src/examples/elementary/calendar_cxx_example_02.cc 
b/src/examples/elementary/calendar_cxx_example_02.cc
index d6cb766f9b..fd001f7184 100644
--- a/src/examples/elementary/calendar_cxx_example_02.cc
+++ b/src/examples/elementary/calendar_cxx_example_02.cc
@@ -1,9 +1,9 @@
-#define EFL_CXX_WREF_EASY
+#define EFL_CXXPERIMENTAL
 
 #include 
 
-using efl::eo::instantiate;
 using namespace std::placeholders;
+using efl::eo::add;
 
 struct appData
 {
@@ -16,11 +16,11 @@ struct appData
void create() {
   std::cout << "Hello!" << std::endl;
 
-  instantiate(m_win);
+  add(m_win);
   m_win.text_set("Calendar Layout 

[EGIT] [core/efl] master 10/39: cxx: Add support for function pointers

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 5425baa9061753356d450a3c736669341e1b1570
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 16:54:57 2017 +0900

cxx: Add support for function pointers

This was tested on the function pointer Efl.Ui.Format_Func_Cb
---
 src/bin/eolian_cxx/eolian_cxx.cc   | 115 ++--
 src/bindings/cxx/eo_cxx/eo_cxx_interop.hh  |  20 +---
 src/lib/eolian_cxx/grammar/converting_argument.hpp |  24 +---
 .../eolian_cxx/grammar/function_declaration.hpp|   8 ++
 src/lib/eolian_cxx/grammar/function_definition.hpp |  19 +++-
 src/lib/eolian_cxx/grammar/header.hpp  |   1 +
 src/lib/eolian_cxx/grammar/klass_def.hpp   |  60 +-
 src/lib/eolian_cxx/grammar/parameter.hpp   |  29 -
 .../grammar/type_function_declaration.hpp  | 121 +
 src/lib/eolian_cxx/grammar/types_definition.hpp|  38 +++
 10 files changed, 386 insertions(+), 49 deletions(-)

diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index 3fab179cae..b67d0442b9 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -25,6 +25,7 @@
 #include "grammar/klass_def.hpp"
 #include "grammar/header.hpp"
 #include "grammar/impl_header.hpp"
+#include "grammar/types_definition.hpp"
 
 namespace eolian_cxx {
 
@@ -58,7 +59,8 @@ opts_check(eolian_cxx::options_type const& opts)
 }
 
 static bool
-generate(const Eolian_Class* klass, eolian_cxx::options_type const& opts)
+generate(const Eolian_Class* klass, eolian_cxx::options_type const& opts,
+ std::string const& cpp_types_header)
 {
std::string header_decl_file_name = opts.out_file.empty()
  ? (::eolian_class_file_get(klass) + std::string(".hh")) : opts.out_file;
@@ -143,9 +145,9 @@ generate(const Eolian_Class* klass, 
eolian_cxx::options_type const& opts)
  }
  };
klass_function(klass);
-   
+
cpp_headers.erase(eolian_class_file_get(klass) + std::string(".hh"));
-   
+
std::string guard_name;
as_generator(*(efl::eolian::grammar::string << "_") << 
efl::eolian::grammar::string << "_EO_HH")
  .generate(std::back_insert_iterator(guard_name)
@@ -153,12 +155,13 @@ generate(const Eolian_Class* klass, 
eolian_cxx::options_type const& opts)
, efl::eolian::grammar::context_null{});
 
std::tuple attributes
-   {guard_name, c_headers, cpp_headers, klasses, forward_klasses, klasses, 
klasses};
+   {guard_name, c_headers, cpp_headers, cpp_types_header, klasses, 
forward_klasses, klasses, klasses};
 
if(opts.out_file == "-")
  {
@@ -205,19 +208,117 @@ generate(const Eolian_Class* klass, 
eolian_cxx::options_type const& opts)
return true;
 }
 
+static bool
+types_generate(std::string const& fname, options_type const& opts,
+   std::string& cpp_types_header)
+{
+   using namespace efl::eolian::grammar::attributes;
+
+   std::vector functions;
+   Eina_Iterator *itr = eolian_declarations_get_by_file(fname.c_str());
+   /* const */ Eolian_Declaration *decl;
+
+   // Build list of functions with their parameters
+   while(::eina_iterator_next(itr, reinterpret_cast()))
+ {
+Eolian_Declaration_Type dt = eolian_declaration_type_get(decl);
+if (dt != EOLIAN_DECL_ALIAS)
+  continue;
+
+const Eolian_Typedecl *tp = eolian_declaration_data_type_get(decl);
+if (!tp || eolian_typedecl_is_extern(tp))
+  continue;
+
+if (::eolian_typedecl_type_get(tp) != EOLIAN_TYPEDECL_FUNCTION_POINTER)
+  continue;
+
+const Eolian_Function *func = eolian_typedecl_function_pointer_get(tp);
+if (!func) return false;
+
+Eina_Iterator *param_itr = eolian_function_parameters_get(func);
+std::vector params;
+
+/* const */ Eolian_Function_Parameter *param;
+while (::eina_iterator_next(param_itr, reinterpret_cast()))
+  {
+ parameter_direction param_dir;
+ switch (eolian_parameter_direction_get(param))
+   {
+/* Note: Inverted on purpose, as the direction objects are
+ * passed is inverted (from C to C++ for function pointers).
+ * FIXME: This is probably not right in all cases. */
+case EOLIAN_IN_PARAM: param_dir = parameter_direction::out; 
break;
+case EOLIAN_INOUT_PARAM: param_dir = 
parameter_direction::inout; break;
+case EOLIAN_OUT_PARAM: param_dir = parameter_direction::in; 
break;
+default: return false;
+   }
+
+ const Eolian_Type 

[EGIT] [core/efl] master 22/39: cxx: Fix evas compile test and Evas.hh

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit f47bb54f4f0960b34050be4342f692f33feedf35
Author: Jean-Philippe Andre 
Date:   Thu Nov 23 14:43:06 2017 +0900

cxx: Fix evas compile test and Evas.hh

The c++ header was checking the wrong header guard. Fixing that would
break the compilation test, as it was doing the wrong thing. Also I
think config.h should not be included for compilation tests. This should
make things slightly better.
---
 src/lib/evas/Evas.hh   | 2 +-
 src/tests/evas_cxx/cxx_compile_test.cc | 8 
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/lib/evas/Evas.hh b/src/lib/evas/Evas.hh
index 893f895ca9..064d8c184e 100644
--- a/src/lib/evas/Evas.hh
+++ b/src/lib/evas/Evas.hh
@@ -1,7 +1,7 @@
 #ifndef EVAS_HH
 #define EVAS_HH
 
-#if defined(EVAS_H)
+#if defined(_EVAS_H)
 #error "Do not include Evas C API headers before including Evas.hh"
 #endif
 
diff --git a/src/tests/evas_cxx/cxx_compile_test.cc 
b/src/tests/evas_cxx/cxx_compile_test.cc
index ba354deb78..90527adf25 100644
--- a/src/tests/evas_cxx/cxx_compile_test.cc
+++ b/src/tests/evas_cxx/cxx_compile_test.cc
@@ -1,13 +1,5 @@
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include 
 #include 
 
-#include 
-
 int main()
 {
return 0;

-- 




[EGIT] [core/efl] master 35/39: cxx: Define types after forward declarations

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 2b0805ddce66903c73c82047772f695b70c3b810
Author: Jean-Philippe Andre 
Date:   Tue Nov 28 21:32:45 2017 +0900

cxx: Define types after forward declarations

This is useful if the types refer to the current class.
---
 src/bin/eolian_cxx/eolian_cxx.cc | 4 ++--
 src/lib/edje/efl_canvas_layout_signal.eo | 2 --
 src/lib/eolian_cxx/grammar/header.hpp| 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index f3f3c36610..3720aa9251 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -161,13 +161,13 @@ generate(const Eolian_Class* klass, 
eolian_cxx::options_type const& opts,
, efl::eolian::grammar::context_null{});
 
std::tuple attributes
-   {guard_name, c_headers, cpp_headers, cpp_types_header, klasses, 
forward_klasses, klasses, klasses};
+   {guard_name, c_headers, cpp_headers, klasses, forward_klasses, 
cpp_types_header, klasses, klasses};
 
if(opts.out_file == "-")
  {
diff --git a/src/lib/edje/efl_canvas_layout_signal.eo 
b/src/lib/edje/efl_canvas_layout_signal.eo
index 67e3f3734d..669c7e4ed9 100644
--- a/src/lib/edje/efl_canvas_layout_signal.eo
+++ b/src/lib/edje/efl_canvas_layout_signal.eo
@@ -8,8 +8,6 @@
   match that.
 */
 
-//type Edje.Signal_Cb: __undefined_type; [[Edje signal callback type]]
-
 type Efl.Signal_Cb: __undefined_type; [[Signal callback.]]
 
 interface Efl.Canvas.Layout_Signal
diff --git a/src/lib/eolian_cxx/grammar/header.hpp 
b/src/lib/eolian_cxx/grammar/header.hpp
index 4f1df9233f..29435404dd 100644
--- a/src/lib/eolian_cxx/grammar/header.hpp
+++ b/src/lib/eolian_cxx/grammar/header.hpp
@@ -24,9 +24,9 @@ auto class_header =
 << "#include \n"
"#include \n"
 << *header_include_directive // sequence
-<<  string   // extra header 
 << *class_declaration  // sequence | class
 << *class_forward_declaration  // sequence | class
+<<  string   // extra header 
 << "\nnamespace eo_cxx {\n"
 << *base_class_definition  // sequence | class
 << "}\n"

-- 




[EGIT] [core/efl] master 34/39: cxx: Include edje from elementary

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 052d9dda448abe4e12c3f4d1a234eb6896f6487b
Author: Jean-Philippe Andre 
Date:   Tue Nov 28 21:18:28 2017 +0900

cxx: Include edje from elementary
---
 src/lib/elementary/Elementary.hh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/Elementary.hh b/src/lib/elementary/Elementary.hh
index 215632bb10..dff82ab28e 100644
--- a/src/lib/elementary/Elementary.hh
+++ b/src/lib/elementary/Elementary.hh
@@ -21,6 +21,7 @@ extern "C" {
 #include "elm_widget.h"
 }
 
+#include 
 #include "Elementary.eo.hh"
 
 #endif

-- 




[EGIT] [core/efl] master 33/39: cxx: Fix one conversion to Eina_Value

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 725026a4bacfe6ddc38101e1f96c5c66711a304b
Author: Jean-Philippe Andre 
Date:   Tue Nov 28 21:17:32 2017 +0900

cxx: Fix one conversion to Eina_Value
---
 src/bindings/cxx/eo_cxx/eo_cxx_interop.hh | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh 
b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
index ffc486e1e3..a83688a3d9 100644
--- a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
+++ b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
@@ -427,6 +427,10 @@ inline Eina_Value const& convert_to_c_impl( 
::efl::eina::value_view const& v, ta
 {
   return *v.native_handle();
 }
+inline const Eina_Value convert_to_c_impl( ::efl::eina::value_view const& v, 
tag::type>)
+{
+  return *v.native_handle();
+}
 inline Eina_Bool convert_to_c_impl( bool b, tag)
 {
   return b;

-- 




[EGIT] [core/efl] master 09/39: cxx: Add strbuf to the list of recognized builtins

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit a597084db7b3a8a4bc7320b68aee7cbb34c6da43
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 16:50:57 2017 +0900

cxx: Add strbuf to the list of recognized builtins
---
 src/lib/eolian_cxx/grammar/type_impl.hpp | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/eolian_cxx/grammar/type_impl.hpp 
b/src/lib/eolian_cxx/grammar/type_impl.hpp
index fb78c1e51b..ebe738abed 100644
--- a/src/lib/eolian_cxx/grammar/type_impl.hpp
+++ b/src/lib/eolian_cxx/grammar/type_impl.hpp
@@ -134,6 +134,12 @@ struct visitor_generate
 r.base_qualifier.qualifier ^= qualifier_info::is_ref;
 return replace_base_type(r, " ::efl::eina::stringshare");
   }}
+   , {"strbuf", nullptr, nullptr, nullptr, [&]
+  {
+regular_type_def r = regular;
+r.base_qualifier.qualifier ^= qualifier_info::is_ref;
+return replace_base_type(r, " ::efl::eina::strbuf");
+  }}
/* FIXME: handle any_value_ptr */
, {"any_value", true, nullptr, nullptr, [&]
   {

-- 




[EGIT] [core/efl] master 27/39: cxx: Give ref to returned objects

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 9d14b4cfe8e7c073952067cd2258b9e09fea4f93
Author: Jean-Philippe Andre 
Date:   Tue Nov 28 14:37:33 2017 +0900

cxx: Give ref to returned objects

This should give a ref to obj in the following scenario:

  auto obj = other.function();

Where obj is an eo object.
---
 src/bindings/cxx/eo_cxx/eo_cxx_interop.hh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh 
b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
index 9181c11875..ffc486e1e3 100644
--- a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
+++ b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
@@ -646,13 +646,13 @@ T& convert_to_return(T* value, tag)
 template 
 T convert_to_return(Eo* value, tag, typename std::enable_if< 
eo::is_eolian_object::value>::type* = 0)
 {
-  T v{value};
+  T v{eo::detail::ref(value)};
   return v;
 }
 template 
 T convert_to_return(Eo const* value, tag, typename 
std::enable_if::type* = 0)
 {
-  return T{const_cast(value)};
+  return T{const_cast(eo::detail::ref(value))};
 }
 template 
 eina::list convert_to_return(Eina_List* value, tag)

-- 




[EGIT] [core/efl] master 25/39: cxx: Fix indentation of ifdef guard

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 0f812f15847e9127b19e9711f9cb1dd26d938f0a
Author: Jean-Philippe Andre 
Date:   Mon Nov 27 23:54:43 2017 +0900

cxx: Fix indentation of ifdef guard
---
 src/lib/eolian_cxx/grammar/base_class_definition.hpp | 4 ++--
 src/lib/eolian_cxx/grammar/class_definition.hpp  | 2 +-
 src/lib/eolian_cxx/grammar/function_declaration.hpp  | 2 +-
 src/lib/eolian_cxx/grammar/part_declaration.hpp  | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lib/eolian_cxx/grammar/base_class_definition.hpp 
b/src/lib/eolian_cxx/grammar/base_class_definition.hpp
index edc6afb86a..f8a704d4fd 100644
--- a/src/lib/eolian_cxx/grammar/base_class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/base_class_definition.hpp
@@ -34,10 +34,10 @@ struct base_class_definition_generator
  "struct " << string << " {\n"
  ).generate(sink, cls.cxx_name, context)) return false;
 
- if(!as_generator(*(scope_tab << 
function_declaration(get_klass_name(cls
+ if(!as_generator(*(function_declaration(get_klass_name(cls
 .generate(sink, cls.functions, context)) return false;
 
- if(!as_generator(*(scope_tab << part_declaration << ";\n"))
+ if(!as_generator(*(part_declaration << ";\n"))
 .generate(sink, cls.parts, context)) return false;
 
  // static Efl_Class const* _eo_class();
diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp 
b/src/lib/eolian_cxx/grammar/class_definition.hpp
index 7367cf7ef0..e7bfaba54d 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -97,7 +97,7 @@ struct class_definition_generator
 ).generate(sink, attributes::make_infinite_tuple(cls.cxx_name), 
context)) return false;
  
 #ifndef USE_EOCXX_INHERIT_ONLY
- if(!as_generator(*(scope_tab << 
function_declaration(get_klass_name(cls
+ if(!as_generator(*(function_declaration(get_klass_name(cls
 .generate(sink, cls.functions, context)) return false;
 #endif
  
diff --git a/src/lib/eolian_cxx/grammar/function_declaration.hpp 
b/src/lib/eolian_cxx/grammar/function_declaration.hpp
index 641ae6560c..04694fa1fb 100644
--- a/src/lib/eolian_cxx/grammar/function_declaration.hpp
+++ b/src/lib/eolian_cxx/grammar/function_declaration.hpp
@@ -51,7 +51,7 @@ struct function_declaration_generator
 return false;
 
   if(!as_generator
-("::efl::eolian::return_traits<" << grammar::type(true) << 
">::type " << string << "(" << (parameter % ", ") << ") const;\n")
+(scope_tab << "::efl::eolian::return_traits<" << 
grammar::type(true) << ">::type " << string << "(" << (parameter % ", ") << ") 
const;\n")
 .generate(sink, std::make_tuple(f.return_type, 
escape_keyword(f.name), f.parameters), ctx))
 return false;
   if(f.is_beta &&
diff --git a/src/lib/eolian_cxx/grammar/part_declaration.hpp 
b/src/lib/eolian_cxx/grammar/part_declaration.hpp
index 383403c6bd..04258c4020 100644
--- a/src/lib/eolian_cxx/grammar/part_declaration.hpp
+++ b/src/lib/eolian_cxx/grammar/part_declaration.hpp
@@ -18,7 +18,7 @@ struct part_declaration_generator
template 
bool generate(OutputIterator sink, attributes::part_def const& part, 
Context const& ctx) const
{
-  if(!as_generator("::efl::eolian::return_traits<::" << *(string << "::"))
+  if(!as_generator(scope_tab << "::efl::eolian::return_traits<::" << 
*(string << "::"))
 .generate(sink, part.klass.namespaces, 
add_lower_case_context(ctx)))
 return false;
   if(!as_generator(string << ">::type " << string << "() const")

-- 




[EGIT] [core/efl] master 20/39: cxx: Implement proper part support (wrt. refs)

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 63725d71fda340986345725e2df3fcbaaa573649
Author: Jean-Philippe Andre 
Date:   Thu Nov 23 13:51:10 2017 +0900

cxx: Implement proper part support (wrt. refs)

It's VERY hacky, but works as expected: no leak, no extra unref. This is
a lucky case of simply overriding efl_part() implementation in C++,
without having to modify the declaration.
---
 src/Makefile_Cxx.am  |  2 +-
 src/examples/elementary/bg_cxx_example_02.cc |  4 
 src/lib/efl/Efl.hh   |  5 +
 src/lib/efl/cxx/efl_part_impl.hh | 26 ++
 4 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/src/Makefile_Cxx.am b/src/Makefile_Cxx.am
index cf99ea3db3..74ac8f7183 100644
--- a/src/Makefile_Cxx.am
+++ b/src/Makefile_Cxx.am
@@ -34,7 +34,7 @@ CLEANFILES += $(elementary_eolian_cxx_hh) 
$(elementary_eolian_cxx_impl_hh) lib/e
 ### Efl C++
 installed_eflcxxmainheadersdir = $(includedir)/efl-cxx-@VMAJ@/
 nodist_installed_eflcxxmainheaders_DATA = $(efl_eolian_cxx_hh) 
$(efl_eolian_cxx_impl_hh) lib/efl/Efl.eo.hh
-dist_installed_eflcxxmainheaders_DATA = lib/efl/Efl.hh
+dist_installed_eflcxxmainheaders_DATA = lib/efl/Efl.hh 
lib/efl/cxx/efl_part_impl.hh
 
 lib/efl/Efl.eo.hh: $(efl_eolian_files) $(_EOLIAN_CXX_DEP)
$(AM_V_EOLCXX) \
diff --git a/src/examples/elementary/bg_cxx_example_02.cc 
b/src/examples/elementary/bg_cxx_example_02.cc
index 8ef33a8816..eb71693242 100644
--- a/src/examples/elementary/bg_cxx_example_02.cc
+++ b/src/examples/elementary/bg_cxx_example_02.cc
@@ -23,10 +23,6 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev 
EINA_UNUSED)
win.text_set("Bg Image");
win.autohide_set(true);
 
-   // FIXME: Part API needs some fixing to be nice in C++ :)
-   //efl::eo::downcast(win.part("background"))
-   //  .file_set("performance/background.png", nullptr);
-
efl::ui::Bg bg(instantiate, win);
bg.scale_type_set(EFL_UI_IMAGE_SCALE_TYPE_FILL);
bg.file_set("performance/background.png", nullptr);
diff --git a/src/lib/efl/Efl.hh b/src/lib/efl/Efl.hh
index 20dfc1a90d..a7efc5f8f6 100644
--- a/src/lib/efl/Efl.hh
+++ b/src/lib/efl/Efl.hh
@@ -3,7 +3,12 @@
 
 #ifdef EFL_BETA_API_SUPPORT
 
+#define EFL_PART_IMPL_HH
+#define EFL_OBJECT_BETA
+#define EFL_OBJECT_PROTECTED
+
 #include 
+#include "cxx/efl_part_impl.hh"
 
 #endif
 #endif
diff --git a/src/lib/efl/cxx/efl_part_impl.hh b/src/lib/efl/cxx/efl_part_impl.hh
new file mode 100644
index 00..c1c99e785a
--- /dev/null
+++ b/src/lib/efl/cxx/efl_part_impl.hh
@@ -0,0 +1,26 @@
+//#ifndef EFL_PART_IMPL_HH
+//#define EFL_PART_IMPL_HH
+
+namespace efl {
+inline ::efl::eolian::return_traits< ::efl::Object>::type Part::part( 
::efl::eolian::in_traits< ::efl::eina::string_view>::type name) const
+{
+   Eo *handle = ::efl_part(this->_eo_ptr(), name.c_str());
+   ::efl_auto_unref_set(handle, false);
+   return ::efl::Object{handle};
+}
+}
+
+namespace eo_cxx {
+namespace efl { 
+inline ::efl::eolian::return_traits< ::efl::Object>::type Part::part( 
::efl::eolian::in_traits< ::efl::eina::string_view>::type name) const
+{
+   Eo *handle = ::efl_part(this->_eo_ptr(), name.c_str());
+   ::efl_auto_unref_set(handle, false);
+   return ::efl::Object{handle};
+}
+inline efl::Part::operator ::efl::Part() const { return *static_cast< 
::efl::Part const*>(static_cast(this)); }
+inline efl::Part::operator ::efl::Part&() { return *static_cast< 
::efl::Part*>(static_cast(this)); }
+inline efl::Part::operator ::efl::Part const&() const { return *static_cast< 
::efl::Part const*>(static_cast(this)); }
+} }
+
+//#endif

-- 




[EGIT] [core/efl] master 02/39: cxx: Add event_cb_add functions to events

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 258a214e0f88915fce7651d4de595a2863716e40
Author: Jean-Philippe Andre 
Date:   Fri Nov 10 19:04:23 2017 +0900

cxx: Add event_cb_add functions to events

This enables a syntax like:

  button.clicked_event_cb_add([]() { std::cout << "Hello" << std::endl; });

I could not manage to pass the std::placeholders inside the template,
depending on whether the lambda has arguments or not. Not sure if
that's even possible.
---
 src/lib/eolian_cxx/grammar/class_definition.hpp | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp 
b/src/lib/eolian_cxx/grammar/class_definition.hpp
index 13349d4007..295662f94d 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -156,6 +156,24 @@ struct class_definition_generator
 << scope_tab << "} const " << string_replace(',', '_') << 
"_event;\n"
  ))).generate(sink, std::vector{e}, 
context))
 return false;
+  if (!as_generator(
+ scope_tab << "template \n"
+ << scope_tab << "typename 
std::enable_if::type\n"
+ << scope_tab << string_replace(',', '_') << "_event_cb_add(F 
function)\n"
+ << scope_tab << "{\n"
+ << scope_tab << scope_tab << "return 
::efl::eolian::event_add(" << string_replace(',', '_') << "_event, *this, 
function);\n"
+ << scope_tab << "}\n")
+  .generate(sink, std::make_tuple(e.name, e.name), context))
+return false;
+  if (!as_generator(
+ scope_tab << "template \n"
+ << scope_tab << "typename 
std::enable_if::value, 
::efl::eolian::signal_connection>::type\n"
+ << scope_tab << string_replace(',', '_') << "_event_cb_add(F 
function)\n"
+ << scope_tab << "{\n"
+ << scope_tab << scope_tab << "return 
::efl::eolian::event_add(" << string_replace(',', '_') << "_event, *this, 
std::bind(function));\n"
+ << scope_tab << "}\n")
+  .generate(sink, std::make_tuple(e.name, e.name), context))
+return false;
   if (e.beta && !as_generator("#endif\n").generate(sink, 
attributes::unused, context))
 return false;
   if (e.protect && !as_generator("#endif\n").generate(sink, 
attributes::unused, context))

-- 




[EGIT] [core/efl] master 29/39: cxx: Include definition header in impl header

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 5d6a5343b7949daf2bdb5c24af8f7dac66519386
Author: Jean-Philippe Andre 
Date:   Tue Nov 28 15:39:39 2017 +0900

cxx: Include definition header in impl header

Good for IDE's. Not extremely useful considering how unreadable those
files are.
---
 src/lib/eolian_cxx/grammar/class_implementation.hpp | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/eolian_cxx/grammar/class_implementation.hpp 
b/src/lib/eolian_cxx/grammar/class_implementation.hpp
index 60eb075073..615ee6022e 100644
--- a/src/lib/eolian_cxx/grammar/class_implementation.hpp
+++ b/src/lib/eolian_cxx/grammar/class_implementation.hpp
@@ -38,6 +38,10 @@ struct class_implementation_generator
 .generate(sink, std::make_tuple(), ctx))
return false;
 
+ if(!as_generator("\n#include \"" << *(string << "_") << string << 
".eo.hh\"\n\n")
+.generate(sink, std::make_tuple(cls.namespaces, cls.cxx_name), 
add_lower_case_context(ctx)))
+   return false;
+
 #ifndef USE_EOCXX_INHERIT_ONLY
  if(!as_generator(
 (namespaces

-- 




[EGIT] [core/efl] master 05/39: cxx: Add strbuf support

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit cfb33650607791567274ee6f9029a9e2c0cb210d
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 15:04:30 2017 +0900

cxx: Add strbuf support

Comes in two fashions:
 - strbuf_view (read-only)
 - strbuf (read/write)
---
 src/Makefile_Cxx.am  |   1 +
 src/bindings/cxx/eina_cxx/Eina.hh|   1 +
 src/bindings/cxx/eina_cxx/eina_strbuf.hh | 384 +++
 3 files changed, 386 insertions(+)

diff --git a/src/Makefile_Cxx.am b/src/Makefile_Cxx.am
index 24978ddcf1..cf99ea3db3 100644
--- a/src/Makefile_Cxx.am
+++ b/src/Makefile_Cxx.am
@@ -151,6 +151,7 @@ bindings/cxx/eina_cxx/eina_ptrlist.hh \
 bindings/cxx/eina_cxx/eina_range_types.hh \
 bindings/cxx/eina_cxx/eina_ref.hh \
 bindings/cxx/eina_cxx/eina_stringshare.hh \
+bindings/cxx/eina_cxx/eina_strbuf.hh \
 bindings/cxx/eina_cxx/eina_string_view.hh \
 bindings/cxx/eina_cxx/eina_thread.hh \
 bindings/cxx/eina_cxx/eina_throw.hh \
diff --git a/src/bindings/cxx/eina_cxx/Eina.hh 
b/src/bindings/cxx/eina_cxx/Eina.hh
index de2f374f69..85226d4b53 100644
--- a/src/bindings/cxx/eina_cxx/Eina.hh
+++ b/src/bindings/cxx/eina_cxx/Eina.hh
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/src/bindings/cxx/eina_cxx/eina_strbuf.hh 
b/src/bindings/cxx/eina_cxx/eina_strbuf.hh
new file mode 100644
index 00..c81a98f95d
--- /dev/null
+++ b/src/bindings/cxx/eina_cxx/eina_strbuf.hh
@@ -0,0 +1,384 @@
+#ifndef EINA_CXX_STRBUF_HH
+#define EINA_CXX_STRBUF_HH
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+// FIXME: Needs doc, I guess :)
+
+namespace efl { namespace eina {
+
+template 
+struct _strbuf_view_trait
+{
+   typedef basic_type value_type;
+   typedef value_type& reference;
+   typedef value_type* pointer;
+   typedef value_type const& const_reference;
+   typedef value_type const* const_pointer;
+   typedef const_pointer const_iterator;
+   typedef std::reverse_iterator const_reverse_iterator;
+   typedef std::ptrdiff_t difference_type;
+   typedef std::size_t size_type;
+
+   _strbuf_view_trait() = delete;
+
+   /** Create a new view from another _strbuf_view_trait */
+   _strbuf_view_trait(_strbuf_view_trait const& other)
+  : _sb(other._sb)
+   {
+   }
+
+   /** Create a new view from an existing Eina_Strbuf */
+   _strbuf_view_trait(Eina_Strbuf const* sb)
+  : _sb(const_cast(sb))
+   {
+   }
+
+   /**
+* @brief Tells whether this object contains a real Eina_Strbuf or not
+* @return true if wrapping an Eina_Strbuf, false if contains nullptr.
+*/
+   bool empty() const
+   {
+  return (_sb != nullptr);
+   }
+
+   /**
+* @brief Get the contained C string
+* @return A C-style string (const char*)
+*/
+   const char * c_str() const
+   {
+  return ::eina_strbuf_string_get(_sb);
+   }
+
+   /**
+* @brief Convert to a string
+* @return A std::string copy
+*/
+   operator std::string() const
+   {
+  return std::string(c_str());
+   }
+
+   /**
+* @brief Get the size of the string.
+* @return Number of characters in the string.
+*/
+   size_type size() const
+   {
+ return eina_strbuf_length_get(_sb);
+   }
+
+   /**
+* @brief Alias to @ref size() const.
+*/
+   size_type length() const
+   {
+ return size();
+   }
+
+   /**
+* @brief Get a constant iterator pointing to the first character of the 
string.
+* @return Constant iterator to the initial position of the string.
+*
+* This member function returns a constant iterator pointing to the
+* first character of the string. If the string is empty the iterator
+* is equal to the one returned by @ref end() const.
+*/
+   const_iterator begin() const
+   {
+  return ::eina_strbuf_string_get(_sb);
+   }
+
+   /**
+* @brief Get a constant iterator to the position following the last 
character of the string.
+* @return Constant iterator to the final position of the string.
+*
+* This member function returns an constant iterator to the position
+* following the last character in the string. If the string is empty
+* the iterator is equal to the one returned by @ref begin().
+*
+* @note Note that attempting to access this position causes undefined
+* behavior.
+*/
+   const_iterator end() const
+   {
+  return begin() + size();
+   }
+
+   /**
+* @brief Get a constant reverse iterator pointing to the reverse begin of 
the string.
+* @return Constant reverse iterator pointing to the reverse begin of the 
string.
+*
+* This member function returns a constant reverse iterator pointing
+* to the last character of the string. If the string is empty the
+* returned reverse iterator is the same as the one returned by
+* @ref rend() const.
+*/
+   

[EGIT] [core/efl] master 30/39: cxx: Use per-function guards in efl object

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 09cf28274166bdf8945cbc3b4083af1f9c6c
Author: Jean-Philippe Andre 
Date:   Tue Nov 28 16:21:40 2017 +0900

cxx: Use per-function guards in efl object

This prevents generation of del().
I also removed constructor, finalize and destructor as I believe this
requires special work with eo_inherit (where did this work go??).
---
 src/Makefile_Cxx.am|  3 +-
 src/bindings/cxx/eo_cxx/Eo.hh  |  5 
 src/bindings/cxx/eo_cxx/efl_object_impl.hh | 23 +++
 src/lib/efl/Efl.hh | 11 ++--
 src/lib/efl/cxx/efl_part_impl.hh   | 33 --
 src/lib/eolian_cxx/grammar/class_definition.hpp|  3 +-
 .../eolian_cxx/grammar/function_declaration.hpp| 11 ++--
 7 files changed, 54 insertions(+), 35 deletions(-)

diff --git a/src/Makefile_Cxx.am b/src/Makefile_Cxx.am
index 74ac8f7183..bc9f3749f7 100644
--- a/src/Makefile_Cxx.am
+++ b/src/Makefile_Cxx.am
@@ -16,7 +16,8 @@ bindings/cxx/eo_cxx/eo_wref.hh \
 bindings/cxx/eo_cxx/eo_future.hh \
 bindings/cxx/eo_cxx/eo_promise.hh \
 bindings/cxx/eo_cxx/eo_promise_meta.hh \
-bindings/cxx/eo_cxx/eo_private.hh
+bindings/cxx/eo_cxx/eo_private.hh \
+bindings/cxx/eo_cxx/efl_object_impl.hh
 
 ### Elementary C++
 installed_elementarycxxmainheadersdir = $(includedir)/elementary-cxx-@VMAJ@/
diff --git a/src/bindings/cxx/eo_cxx/Eo.hh b/src/bindings/cxx/eo_cxx/Eo.hh
index 771ee12da9..bd60f69701 100644
--- a/src/bindings/cxx/eo_cxx/Eo.hh
+++ b/src/bindings/cxx/eo_cxx/Eo.hh
@@ -1,6 +1,8 @@
 #ifndef EFL_CXX_EO_HH
 #define EFL_CXX_EO_HH
 
+#include "efl_object_impl.hh"
+
 #include 
 #include 
 #include 
@@ -10,4 +12,7 @@
 #include 
 #include 
 
+#include "efl_object.eo.hh"
+#include "efl_object.eo.impl.hh"
+
 #endif // EFL_CXX_EO_HH
diff --git a/src/bindings/cxx/eo_cxx/efl_object_impl.hh 
b/src/bindings/cxx/eo_cxx/efl_object_impl.hh
new file mode 100644
index 00..ce61ed6200
--- /dev/null
+++ b/src/bindings/cxx/eo_cxx/efl_object_impl.hh
@@ -0,0 +1,23 @@
+#ifndef EFL_OBJECT_MANUAL_IMPL_HH
+#define EFL_OBJECT_MANUAL_IMPL_HH
+
+#define EFL_OBJECT_BETA
+#define EFL_OBJECT_PROTECTED
+
+// Skip del. Must be implemented in eo::concrete.
+#define EOLIAN_CXX_EFL_DEL_DECLARATION
+#define EOLIAN_CXX_EFL_DEL_IMPLEMENTATION
+
+// Skip constructor, destructor and finalize.
+#define EOLIAN_CXX_EFL_CONSTRUCTOR_DECLARATION
+#define EOLIAN_CXX_EFL_CONSTRUCTOR_IMPLEMENTATION
+#define EOLIAN_CXX_EFL_DESTRUCTOR_DECLARATION
+#define EOLIAN_CXX_EFL_DESTRUCTOR_IMPLEMENTATION
+#define EOLIAN_CXX_EFL_FINALIZE_DECLARATION
+#define EOLIAN_CXX_EFL_FINALIZE_IMPLEMENTATION
+
+// Skip auto_unref
+#define EOLIAN_CXX_EFL_AUTO_UNREF_SET_DECLARATION
+#define EOLIAN_CXX_EFL_AUTO_UNREF_SET_IMPLEMENTATION
+
+#endif
diff --git a/src/lib/efl/Efl.hh b/src/lib/efl/Efl.hh
index a7efc5f8f6..e6473eafce 100644
--- a/src/lib/efl/Efl.hh
+++ b/src/lib/efl/Efl.hh
@@ -1,16 +1,9 @@
 #ifndef EFL_EFL_HH
 #define EFL_EFL_HH
 
-#ifdef EFL_BETA_API_SUPPORT
-
-#define EFL_PART_IMPL_HH
-#define EFL_OBJECT_BETA
-#define EFL_OBJECT_PROTECTED
+#include "cxx/efl_part_impl.hh"
 
+#include 
 #include 
-#include "cxx/efl_part_impl.hh"
 
 #endif
-#endif
-
-
diff --git a/src/lib/efl/cxx/efl_part_impl.hh b/src/lib/efl/cxx/efl_part_impl.hh
index c1c99e785a..f40292c6e0 100644
--- a/src/lib/efl/cxx/efl_part_impl.hh
+++ b/src/lib/efl/cxx/efl_part_impl.hh
@@ -1,26 +1,15 @@
-//#ifndef EFL_PART_IMPL_HH
-//#define EFL_PART_IMPL_HH
+#ifndef EFL_PART_MANUAL_IMPL_HH
+#define EFL_PART_MANUAL_IMPL_HH
 
-namespace efl {
-inline ::efl::eolian::return_traits< ::efl::Object>::type Part::part( 
::efl::eolian::in_traits< ::efl::eina::string_view>::type name) const
-{
-   Eo *handle = ::efl_part(this->_eo_ptr(), name.c_str());
-   ::efl_auto_unref_set(handle, false);
-   return ::efl::Object{handle};
-}
-}
+#define EOLIAN_CXX_EFL_PART_DECLARATION \
+   ::efl::Object part(::efl::eina::string_view const& name) const;
 
-namespace eo_cxx {
-namespace efl { 
-inline ::efl::eolian::return_traits< ::efl::Object>::type Part::part( 
::efl::eolian::in_traits< ::efl::eina::string_view>::type name) const
-{
-   Eo *handle = ::efl_part(this->_eo_ptr(), name.c_str());
-   ::efl_auto_unref_set(handle, false);
-   return ::efl::Object{handle};
+#define EOLIAN_CXX_EFL_PART_IMPLEMENTATION \
+inline ::efl::Object Part::part(::efl::eina::string_view const& name) const \
+{ \
+   ::Eo *handle = ::efl_part(_eo_ptr(), name.c_str()); \
+   ::efl_auto_unref_set(handle, false); \
+   return ::efl::Object{handle}; \
 }
-inline efl::Part::operator ::efl::Part() const { return *static_cast< 
::efl::Part const*>(static_cast(this)); }
-inline efl::Part::operator ::efl::Part&() { return *static_cast< 
::efl::Part*>(static_cast(this)); }
-inline efl::Part::operator ::efl::Part 

[EGIT] [core/efl] master 15/39: cxx: Add implicit conversion to Eo* pointer

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit d887c4de52ed74b33850ece7ca9ad6477aa48712
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 20:25:29 2017 +0900

cxx: Add implicit conversion to Eo* pointer

This is part of the experimental stuff.

Allows calling C functions without using ._eo_ptr() explicitly. Probably
not super useful, assuming the interfaces are done :)
---
 src/examples/elementary/calendar_cxx_example_02.cc | 2 +-
 src/lib/eolian_cxx/grammar/class_definition.hpp| 5 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/examples/elementary/calendar_cxx_example_02.cc 
b/src/examples/elementary/calendar_cxx_example_02.cc
index fd001f7184..047f5841f8 100644
--- a/src/examples/elementary/calendar_cxx_example_02.cc
+++ b/src/examples/elementary/calendar_cxx_example_02.cc
@@ -41,7 +41,7 @@ struct appData
 
void destroy() {
   // FIXME: need del() function and no error on unref().
-  ::efl_allow_parent_unref_set(m_win._eo_ptr(), true);
+  ::efl_allow_parent_unref_set(m_win, true);
   m_win = nullptr;
}
 
diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp 
b/src/lib/eolian_cxx/grammar/class_definition.hpp
index e326c9d0e3..1e21336d9f 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -211,12 +211,17 @@ struct class_definition_generator
 
  // EXPERIMENTAL
  if(!as_generator("#ifdef EFL_CXXPERIMENTAL\n").generate(sink, 
attributes::unused, context)) return false;
+ // For easy wref, operator-> in wref needs to also return a pointer type
  if(!as_generator(   scope_tab << "const " << string << "* operator->() 
const { return this; }\n"
  ).generate(sink, std::make_tuple(cls.cxx_name, 
cls.cxx_name), context)) return false;
  if(!as_generator(   scope_tab << string << "* operator->() { return this; 
}\n"
  ).generate(sink, std::make_tuple(cls.cxx_name, 
cls.cxx_name), context)) return false;
+ // For easy interfacing with C: no need to use _eo_ptr()
+ if(!as_generator(   scope_tab << "operator Eo*() const { return 
_eo_ptr(); }\n"
+ ).generate(sink, attributes::unused, context)) return 
false;
  if(!as_generator("#endif \n").generate(sink, attributes::unused, 
context)) return false;
 
+ // eo_concrete
  if(!as_generator(   scope_tab << "::efl::eo::concrete const& 
_get_concrete() const { return *this; }\n"
   << scope_tab << "::efl::eo::concrete& _get_concrete() { 
return *this; }\n"
  ).generate(sink, attributes::unused, context)) return 
false;

-- 




[EGIT] [core/efl] master 17/39: cxx: Use set for forward classes

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 03af836332b6b80975a402c865542fccf2f56de1
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 20:46:26 2017 +0900

cxx: Use set for forward classes

This avoids duplication. Not very important as there are FWD_GUARD
macros anyway.
---
 src/bin/eolian_cxx/eolian_cxx.cc | 10 --
 src/lib/eolian_cxx/grammar/klass_def.hpp |  6 ++
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index 29c81d32d7..2df5b9ae2d 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -74,7 +74,7 @@ generate(const Eolian_Class* klass, eolian_cxx::options_type 
const& opts,
 
efl::eolian::grammar::attributes::klass_def klass_def(klass, opts.unit);
std::vector klasses{klass_def};
-   std::vector forward_klasses{};
+   std::set forward_klasses{};
 
std::set c_headers;
std::set cpp_headers;
@@ -90,8 +90,7 @@ generate(const Eolian_Class* klass, eolian_cxx::options_type 
const& opts,
 c_headers.insert(eolian_class_file_get(klass2) + std::string(".h"));
 cpp_headers.insert(eolian_class_file_get(klass2) + std::string(".hh"));
 efl::eolian::grammar::attributes::klass_def cls{klass2, opts.unit};
-if(std::find(forward_klasses.begin(), forward_klasses.end(), cls) == 
forward_klasses.end())
-  forward_klasses.push_back(cls);
+forward_klasses.insert(cls);
  };
auto complex_function
  = [&] (efl::eolian::grammar::attributes::complex_type_def const& complex)
@@ -123,8 +122,7 @@ generate(const Eolian_Class* klass, 
eolian_cxx::options_type const& opts,
c_headers.insert(eolian_class_file_get(inherit) + 
std::string(".h"));
cpp_headers.insert(eolian_class_file_get(inherit) + 
std::string(".hh"));
efl::eolian::grammar::attributes::klass_def klass3{inherit, 
opts.unit};
-   if(std::find(forward_klasses.begin(), forward_klasses.end(), 
klass3) == forward_klasses.end())
- forward_klasses.push_back(klass3);
+   forward_klasses.insert(klass3);
 
klass_function(inherit);
  }
@@ -157,7 +155,7 @@ generate(const Eolian_Class* klass, 
eolian_cxx::options_type const& opts,
std::tuple attributes
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp 
b/src/lib/eolian_cxx/grammar/klass_def.hpp
index f7b12af578..739390ddc6 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -719,6 +719,12 @@ struct klass_def
   {
 return !(lhs == rhs);
   }
+  friend inline bool operator<(klass_def const& lhs, klass_def const& rhs)
+  {
+ return lhs.eolian_name < rhs.eolian_name
+   || lhs.cxx_name < rhs.cxx_name
+   || lhs.namespaces < rhs.namespaces;
+  }
 
   klass_def(std::string eolian_name, std::string cxx_name, std::string filename
 , std::vector namespaces

-- 




[EGIT] [core/efl] master 39/39: c#: Fix test case

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit b3435831f71a22c738849ddfa407e9bd7a0f4625
Author: Jean-Philippe Andre 
Date:   Tue Dec 5 14:48:29 2017 +0900

c#: Fix test case

return -1 in a void function breaks the build for me (clang)
---
 src/tests/efl_mono/libefl_mono_native_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/efl_mono/libefl_mono_native_test.c 
b/src/tests/efl_mono/libefl_mono_native_test.c
index 09d0cd418c..0b73d7e76b 100644
--- a/src/tests/efl_mono/libefl_mono_native_test.c
+++ b/src/tests/efl_mono/libefl_mono_native_test.c
@@ -3047,7 +3047,7 @@ void _test_testing_set_callback(EINA_UNUSED Eo *obj, 
Test_Testing_Data *pd, void
if (!pd)
  {
 EINA_LOG_ERR("Null private data");
-return -1;
+return;
  }
 
if (pd->free_cb)

-- 




[EGIT] [core/efl] master 19/39: cxx: Add header guards to .impl.hh

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 0f5d40e6d4628cc38305fe0a72702f58817c9e69
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 22:35:11 2017 +0900

cxx: Add header guards to .impl.hh

Those are included headers after all, even if they're only included once
from Elementary.hh (or whatever Efl_Header.hh).
---
 .../eolian_cxx/grammar/class_implementation.hpp| 32 +-
 1 file changed, 25 insertions(+), 7 deletions(-)

diff --git a/src/lib/eolian_cxx/grammar/class_implementation.hpp 
b/src/lib/eolian_cxx/grammar/class_implementation.hpp
index b2578b5bf2..373f04efef 100644
--- a/src/lib/eolian_cxx/grammar/class_implementation.hpp
+++ b/src/lib/eolian_cxx/grammar/class_implementation.hpp
@@ -25,16 +25,28 @@ struct class_implementation_generator
  std::vector cpp_namespaces = 
attributes::cpp_namespaces(cls.namespaces);
  auto base_class_name = *(lower_case[string] << "::") << string;
  auto class_name = *(lit("::") << lower_case[string]) << "::" << string;
- return as_generator
-   (
+ std::string guard_symbol;
+
+ if(!as_generator(*(string << "_") << string << "_IMPL_HH")
+.generate(std::back_inserter(guard_symbol)
+  , std::make_tuple(cpp_namespaces, cls.cxx_name), 
add_upper_case_context(ctx)))
+   return false;
+
+ if(!as_generator(   "#ifndef " << guard_symbol << "\n"
+  << "#define " << guard_symbol << "\n")
+.generate(sink, std::make_tuple(), ctx))
+   return false;
+
 #ifndef USE_EOCXX_INHERIT_ONLY
+ if(!as_generator(
 (namespaces
  [*function_definition(get_klass_name(cls))]
  << "\n"
-   )).generate(sink, std::make_tuple(cls.namespaces, cls.functions), ctx)
-   && as_generator
-   (
+ )).generate(sink, std::make_tuple(cls.namespaces, cls.functions), 
ctx))
+   return false;
 #endif
+
+ if(!as_generator(
 attribute_reorder<0, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 
3, 2, 3>
 (
  "namespace eo_cxx {\n"
@@ -48,8 +60,14 @@ struct class_implementation_generator
   << "inline " << base_class_name << "::operator " << class_name << " 
const&() const { return *static_cast< "
 << class_name << " const*>(static_cast(this)); }\n"
  ]
- << "}\n\n"
- )).generate(sink, std::make_tuple(cls.namespaces, cls.functions, 
cpp_namespaces, cls.cxx_name), ctx);
+ << "}\n"
+ )).generate(sink, std::make_tuple(cls.namespaces, cls.functions, 
cpp_namespaces, cls.cxx_name), ctx))
+   return false;
+
+ if(!as_generator("#endif\n").generate(sink, std::make_tuple(), ctx))
+   return false;
+
+ return true;
}
 };
 

-- 




[EGIT] [core/efl] master 14/39: cxx: Only use eo_cxx:: for methods

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit a787c3cc07b8ddcc3288091a9d1b9e0eb06582bc
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 20:16:21 2017 +0900

cxx: Only use eo_cxx:: for methods

Add an experimental (disabled) macro to only generate functions inside
the eo_cxx equivalent of a class, instead of inside both the eo_cxx and
the normal class definition.

I guess the duplicated definition had something to do with doxygen, but
I'm not sure this is quite necessary as doc will be generated with
custom scripts.
---
 src/lib/eolian_cxx/grammar/class_definition.hpp | 18 +-
 src/lib/eolian_cxx/grammar/class_implementation.hpp |  2 ++
 src/lib/eolian_cxx/grammar/generator.hpp|  3 +++
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp 
b/src/lib/eolian_cxx/grammar/class_definition.hpp
index a60e18dedf..e326c9d0e3 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -27,15 +27,21 @@ struct class_definition_generator
  auto open_namespace = *("namespace " << string << " { ") << "\n";
  if(!as_generator(open_namespace).generate(sink, cpp_namespaces, 
add_lower_case_context(context))) return false;
 
- if(!as_generator
-(
- "struct " << string << " : private ::efl::eo::concrete"
- )
+#ifdef USE_EOCXX_INHERIT_ONLY
+ if(!as_generator("struct " << string << " : private ::efl::eo::concrete\n"
+  << scope_tab << ", ::eo_cxx"
+  << *("::" << lower_case[string]) << "::" << string)
+   .generate(sink, std::make_tuple(cls.cxx_name, 
attributes::cpp_namespaces(cls.namespaces), cls.cxx_name), context))
+   return false;
+#else
+ if(!as_generator("struct " << string << " : private ::efl::eo::concrete")
 .generate(sink, cls.cxx_name, context))
return false;
+#endif
+
  for(auto&& i : cls.inherits)
{
- if(!as_generator("\n" << scope_tab << ", EO_CXX_INHERIT(" << *(" ::" 
<< lower_case[string]) << "::" << string << ")")
+ if(!as_generator("\n" << scope_tab << ", EO_CXX_INHERIT(" << *("::" 
<< lower_case[string]) << "::" << string << ")")
 .generate(sink, 
std::make_tuple(attributes::cpp_namespaces(i.namespaces), i.eolian_name), 
context))
return false;
}
@@ -89,8 +95,10 @@ struct class_definition_generator
  // << scope_tab << scope_tab << ": ::efl::eo::concrete( 
::efl::eo::do_eo_add( ::efl::eo::concrete{nullptr}, f)) {}\n"
 ).generate(sink, attributes::make_infinite_tuple(cls.cxx_name), 
context)) return false;
  
+#ifndef USE_EOCXX_INHERIT_ONLY
  if(!as_generator(*(scope_tab << 
function_declaration(get_klass_name(cls
 .generate(sink, cls.functions, context)) return false;
+#endif
  
  // static Efl_Class const* _eo_class();
  std::string suffix;
diff --git a/src/lib/eolian_cxx/grammar/class_implementation.hpp 
b/src/lib/eolian_cxx/grammar/class_implementation.hpp
index 0731e3d591..b2578b5bf2 100644
--- a/src/lib/eolian_cxx/grammar/class_implementation.hpp
+++ b/src/lib/eolian_cxx/grammar/class_implementation.hpp
@@ -27,12 +27,14 @@ struct class_implementation_generator
  auto class_name = *(lit("::") << lower_case[string]) << "::" << string;
  return as_generator
(
+#ifndef USE_EOCXX_INHERIT_ONLY
 (namespaces
  [*function_definition(get_klass_name(cls))]
  << "\n"
)).generate(sink, std::make_tuple(cls.namespaces, cls.functions), ctx)
&& as_generator
(
+#endif
 attribute_reorder<0, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 
3, 2, 3>
 (
  "namespace eo_cxx {\n"
diff --git a/src/lib/eolian_cxx/grammar/generator.hpp 
b/src/lib/eolian_cxx/grammar/generator.hpp
index 130ee6859c..10e96c7c13 100644
--- a/src/lib/eolian_cxx/grammar/generator.hpp
+++ b/src/lib/eolian_cxx/grammar/generator.hpp
@@ -3,6 +3,9 @@
 
 #include 
 
+// EXPERIMENTAL
+//#define USE_EOCXX_INHERIT_ONLY
+
 namespace efl { namespace eolian { namespace grammar {
 
 template 

-- 




[EGIT] [core/efl] master 08/39: cxx: Add FIXME note in eina_value.hh

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 488c29febdf58da6644f5def658ed807b6bf6054
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 16:47:27 2017 +0900

cxx: Add FIXME note in eina_value.hh

I think some concepts are not handled properly in this set of classes.
I'll do some more experiments to see if I can find a working solution,
but I think we need 3 variants of eina_value, instead of just the two
provided.
---
 src/bindings/cxx/eina_cxx/eina_value.hh | 72 ++---
 1 file changed, 66 insertions(+), 6 deletions(-)

diff --git a/src/bindings/cxx/eina_cxx/eina_value.hh 
b/src/bindings/cxx/eina_cxx/eina_value.hh
index a529ce23a7..36e6baa92a 100644
--- a/src/bindings/cxx/eina_cxx/eina_value.hh
+++ b/src/bindings/cxx/eina_cxx/eina_value.hh
@@ -13,6 +13,20 @@
  * @{
  */
 
+/* FIXME:
+ *
+ * I think value wrappers have ownership issues. value_view as-is creates and
+ * never destroys an internal Eina_Value object. Leaks happily. value is fine
+ * but can not take ownership of an existing value safely.
+ *
+ * So, I think Eina_Value wrappers should come in three flavors:
+ * - read-only wrapper, "value_view". Can only read from an existing 
Eina_Value.
+ * - read-write wrapper, "value_wrapper". Can write to an existing Eina_Value.
+ * - read-write owner, "value". Creates and destroys the eina_value.
+ *
+ * See strbuf for an example.
+ */
+
 namespace efl { namespace eina {
 
 /**
@@ -281,6 +295,30 @@ struct _eina_value_traits
 /**
  * @internal
  */
+template <>
+struct _eina_value_traits<::tm>
+  : _eina_value_traits_base<::tm>
+{
+  typedef typename  _eina_value_traits_base<::tm>::type type;
+  static ::Eina_Value_Type const* value_type()
+  {
+return EINA_VALUE_TYPE_TM;
+  }
+  static void set( ::Eina_Value* v, type c)
+  {
+::eina_value_set(v, );
+  }
+  static type get( ::Eina_Value* v)
+  {
+ type time = {};
+ ::eina_value_get(v, );
+ return time;
+  }
+};
+
+/**
+ * @internal
+ */
 template 
 struct _eina_value_traits::type>
   : _eina_value_traits_base
@@ -434,9 +472,30 @@ public:
 primitive_init(v);
   }
 
+  // dubious
   value_view(Eina_Value* raw)
 : _raw(raw) {}
 
+  // dubious
+  value_view(Eina_Value const& raw)
+: _raw(const_cast()) {}
+
+  /**
+   * @brief Get this value as a string
+   * @return A new string
+   */
+  std::string to_string() const
+  {
+ char *c_str = ::eina_value_to_string(_raw);
+ std::string str(c_str);
+ free(c_str);
+ return str;
+  }
+
+  operator std::string() const {
+ return to_string();
+  }
+
   /**
* @brief Swap stored values with the given eina::value object.
* @param other Another eina::value object.
@@ -615,19 +674,20 @@ struct value : value_view
using value_view::value_view;
 
value(std::nullptr_t) {}
+
+   // FIXME: dubious - shouldn't be char
value() : value_view(_eina_value_traits::create()) {}
+
explicit value(Eina_Value* raw)
  : value_view(raw) {}
 
value(Eina_Value const* raw)
- : value_view(_eina_value_traits::create())
+ : value_view(::eina_value_dup(raw))
{
- if(!eina_value_copy(raw, _raw))
-   {
-  eina_value_free(_raw);
-  EFL_CXX_THROW(eina::system_error(eina::get_error_code()));
-   }
+ if (!_raw) EFL_CXX_THROW(eina::system_error(eina::get_error_code()));
}
+
+   value(Eina_Value const& raw) : value() {}
   
/**
 * @brief Deallocate stored value.

-- 




[EGIT] [core/efl] master 31/39: cxx: Add global _delete() method to all objects

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit c9322dd56104e6ee23c6840fbb5a202c3218c1e1
Author: Jean-Philippe Andre 
Date:   Tue Nov 28 16:26:25 2017 +0900

cxx: Add global _delete() method to all objects

This is really just calling efl_del() and detaching the internal pointer
from the C++ object. This will not affect other references, which means
after del the object may still be alive, probably without a parent.
---
 src/bindings/cxx/eo_cxx/eo_concrete.hh | 7 +++
 src/bindings/cxx/eo_cxx/eo_ops.hh  | 6 ++
 2 files changed, 13 insertions(+)

diff --git a/src/bindings/cxx/eo_cxx/eo_concrete.hh 
b/src/bindings/cxx/eo_cxx/eo_concrete.hh
index 47013dcbc6..2b29d09545 100644
--- a/src/bindings/cxx/eo_cxx/eo_concrete.hh
+++ b/src/bindings/cxx/eo_cxx/eo_concrete.hh
@@ -167,6 +167,13 @@ struct concrete
  _eo_raw = _ptr;
}
 
+   void _delete()
+   {
+  Eo* tmp = _eo_raw;
+  _eo_raw = nullptr;
+  detail::del(tmp);
+   }
+
explicit operator bool() const
{
   return _eo_raw;
diff --git a/src/bindings/cxx/eo_cxx/eo_ops.hh 
b/src/bindings/cxx/eo_cxx/eo_ops.hh
index 1f08d8d738..4f9c1f79ae 100644
--- a/src/bindings/cxx/eo_cxx/eo_ops.hh
+++ b/src/bindings/cxx/eo_cxx/eo_ops.hh
@@ -39,6 +39,12 @@ unref(const Eo *obj)
::efl_unref(obj);
 }
 
+inline void
+del(Eo *obj)
+{
+   ::efl_del(obj);
+}
+
 inline int
 ref_get(const Eo *obj)
 {

-- 




[EGIT] [core/efl] master 01/39: cxx: Add alternative form to instantiate object

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit db8227a34ad616db95d319430d270c6372485e86
Author: Jean-Philippe Andre 
Date:   Fri Nov 10 18:04:53 2017 +0900

cxx: Add alternative form to instantiate object

This still uses the instantiate object but provides a more convenient
syntax for objects declared before their creation (eg. a global win).

Note: I wonder if we shouldn't rename instantiate to add. It would be
closer to EFL API's while being much much easier to type.
---
 src/bindings/cxx/eo_cxx/eo_concrete.hh | 27 ++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/src/bindings/cxx/eo_cxx/eo_concrete.hh 
b/src/bindings/cxx/eo_cxx/eo_concrete.hh
index 9227445de9..adc33985b7 100644
--- a/src/bindings/cxx/eo_cxx/eo_concrete.hh
+++ b/src/bindings/cxx/eo_cxx/eo_concrete.hh
@@ -31,7 +31,32 @@ namespace efl { namespace eo {
 /// @addtogroup Efl_Cxx_API
 /// @{
 
-struct instantiate_t {} const instantiate = {};
+struct instantiate_t {
+   /// @brief A helper to create objects with a different syntax
+   ///
+   /// @param obj The object to instantiate
+   /// @return obj The newly created object
+   ///
+   /// Consider an object declared by its type T on the stack, like T obj.
+   /// Initially it will be empty (_eo_ptr() is nullptr). It can be created
+   /// in two ways:
+   ///   obj = T(instantiate, obj);
+   /// or:
+   ///   instantiate(obj);
+   ///
+   /// Note that if @c obj is already a valid object, it will be unreferenced.
+   template T& operator()(T& obj) const {
+  obj = T(*this);
+  return obj;
+   }
+};
+
+/// @brief The handle to use to create real EFL objects
+///
+/// Use @c instantiate as first argument of any object constructor in order
+/// to trigger a real EFL object creation. The following syntax is preferred:
+///   T obj(instantiate, ...);
+instantiate_t const instantiate = {};
 
 /// @brief Creates concrete versions for Eo wrappers.
 ///

-- 




[EGIT] [core/efl] master 18/39: cxx: Avoid pedantic warning with -Wold-style-cast

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit b4e3d4d8a4f1e0712dbbd309bf4b2f11e36acef1
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 20:50:11 2017 +0900

cxx: Avoid pedantic warning with -Wold-style-cast

This affects the generated headers.
---
 src/lib/eolian_cxx/grammar/base_class_definition.hpp | 9 +
 src/lib/eolian_cxx/grammar/class_definition.hpp  | 9 +
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/lib/eolian_cxx/grammar/base_class_definition.hpp 
b/src/lib/eolian_cxx/grammar/base_class_definition.hpp
index aa61334020..d5fa914b53 100644
--- a/src/lib/eolian_cxx/grammar/base_class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/base_class_definition.hpp
@@ -64,10 +64,11 @@ struct base_class_definition_generator
return false;
  if(!as_generator(";\n" << scope_tab << "}\n").generate(sink, 
attributes::unused, context)) return false;
 
- if(!as_generator
-(
- scope_tab << "Eo* _eo_ptr() const { return *(Eo**)this; }\n"
-).generate(sink, attributes::unused, context)) return false;
+ if(!as_generator(
+ scope_tab << "Eo* _eo_ptr() const { return *(reinterpret_cast"
+  << "(const_cast<" << string << " *>(this))); }\n"
+).generate(sink, cls.cxx_name, context))
+   return false;
 
  // operator ::ns::Class_Name() const;
  // operator ::ns::Class_Name&();
diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp 
b/src/lib/eolian_cxx/grammar/class_definition.hpp
index 1e21336d9f..30a9daf134 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -128,10 +128,11 @@ struct class_definition_generator
return false;
  if(!as_generator(";\n" << scope_tab << "}\n").generate(sink, 
attributes::unused, context)) return false;
 
- if(!as_generator
-(
- scope_tab << "Eo* _eo_ptr() const { return *(Eo**)this; }\n"
-).generate(sink, attributes::unused, context)) return false;
+ if(!as_generator(
+ scope_tab << "Eo* _eo_ptr() const { return *(reinterpret_cast"
+  << "(const_cast<" << string << " *>(this))); }\n"
+).generate(sink, cls.cxx_name, context))
+   return false;
  
  for (auto&& e : cls.events)
{

-- 




[EGIT] [core/efl] master 11/39: cxx: Showcase function pointer in calendar example

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 425d8db90f9b67ab9645216a71bbba651cc54732
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 17:14:55 2017 +0900

cxx: Showcase function pointer in calendar example

This is just a work-in-progress example.
---
 src/examples/elementary/calendar_cxx_example_02.cc | 78 ++
 1 file changed, 49 insertions(+), 29 deletions(-)

diff --git a/src/examples/elementary/calendar_cxx_example_02.cc 
b/src/examples/elementary/calendar_cxx_example_02.cc
index 5e4683baf6..d6cb766f9b 100644
--- a/src/examples/elementary/calendar_cxx_example_02.cc
+++ b/src/examples/elementary/calendar_cxx_example_02.cc
@@ -1,40 +1,60 @@
+#define EFL_CXX_WREF_EASY
+
 #include 
 
 using efl::eo::instantiate;
+using namespace std::placeholders;
 
-// FIXME: Function callbacks need a lot of love in C++
-static void
-_format_cb(void *data EINA_UNUSED, Eina_Strbuf *str, const Eina_Value value)
+struct appData
 {
-   if (::eina_value_type_get() != ::EINA_VALUE_TYPE_TM)
- {
-// FIXME: val.to_string()
-char *convert = ::eina_value_to_string();
-eina_strbuf_append(str, convert);
-free(convert);
- }
-   else
- {
-struct tm time;
-eina_value_get(, );
-eina_strbuf_append_strftime(str, "%b. %y", );
- }
-}
+   appData() : m_win(nullptr) {}
 
-static void
-efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
-{
-   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
+   ~appData() {
+  std::cout << "Good bye!" << std::endl;
+   }
+
+   void create() {
+  std::cout << "Hello!" << std::endl;
+
+  instantiate(m_win);
+  m_win.text_set("Calendar Layout Formatting Example");
+  m_win.delete_request_event_cb_add([&](){ destroy(); });
 
-   efl::ui::Win win(instantiate);
-   win.text_set("Calendar Layout Formatting Example");
-   win.autohide_set(true);
+  efl::ui::Calendar cal(instantiate, m_win);
+  m_win.content_set(cal);
 
-   efl::ui::Calendar cal(instantiate, win);
-   win.content_set(cal);
+  auto wcal(cal._get_wref());
 
-   // FIXME: Function cb doesn't work (C++ variant)
-   cal.format_cb_set(_format_cb);
-   ::efl_ui_format_cb_set(cal._eo_ptr(), NULL, _format_cb, NULL);
+  // FIXME: How does one figure out the argument types for the function?
+  auto cb_a = std::bind([=](
+efl::eina::strbuf_wrapper& sb,
+efl::eina::value_view const& value) {
+   try {
+  sb.append_strftime("%b. %y", efl::eina::get(value));
+   } catch (std::system_error const&)  {
+  sb.append(value.to_string());
+   }
+   std::cout << "Month: " << std::string(sb) << std::endl;
+}, _1, _2);
+  cal.format_cb_set(cb_a);
+   }
+
+   void destroy() {
+  // FIXME: need del() function and no error on unref().
+  ::efl_allow_parent_unref_set(m_win._eo_ptr(), true);
+  m_win = nullptr;
+   }
+
+private:
+   efl::ui::Win m_win;
+};
+
+static appData app;
+
+static void
+efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
+{
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+   app.create();
 }
 EFL_MAIN()

-- 




[EGIT] [core/efl] master 26/39: cxx: Implement support for @class static functions

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 6653b9e2b1196f6d22ad8733bb67bf94b17e0d12
Author: Jean-Philippe Andre 
Date:   Tue Nov 28 14:17:51 2017 +0900

cxx: Implement support for @class static functions
---
 src/lib/eolian_cxx/grammar/function_declaration.hpp |  8 ++--
 src/lib/eolian_cxx/grammar/function_definition.hpp  | 20 ++--
 src/lib/eolian_cxx/grammar/klass_def.hpp|  6 --
 3 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/src/lib/eolian_cxx/grammar/function_declaration.hpp 
b/src/lib/eolian_cxx/grammar/function_declaration.hpp
index 04694fa1fb..fe3ad732f1 100644
--- a/src/lib/eolian_cxx/grammar/function_declaration.hpp
+++ b/src/lib/eolian_cxx/grammar/function_declaration.hpp
@@ -24,7 +24,7 @@ struct function_declaration_generator
template 
bool generate(OutputIterator sink, attributes::function_def const& f, 
Context const& ctx) const
{
-  std::string suffix;
+  std::string suffix, static_flag, const_flag;
   switch(_klass_name.type)
 {
 case attributes::class_type::regular:
@@ -50,8 +50,12 @@ struct function_declaration_generator
   .generate(sink, attributes::unused, ctx))
 return false;
 
+  if (f.is_static) static_flag = "static ";
+  else const_flag = " const";
+
   if(!as_generator
-(scope_tab << "::efl::eolian::return_traits<" << 
grammar::type(true) << ">::type " << string << "(" << (parameter % ", ") << ") 
const;\n")
+(scope_tab << static_flag << "::efl::eolian::return_traits<" << 
grammar::type(true) << ">::type "
+ << string << "(" << (parameter % ", ") << ")" << const_flag << 
";\n")
 .generate(sink, std::make_tuple(f.return_type, 
escape_keyword(f.name), f.parameters), ctx))
 return false;
   if(f.is_beta &&
diff --git a/src/lib/eolian_cxx/grammar/function_definition.hpp 
b/src/lib/eolian_cxx/grammar/function_definition.hpp
index 55f56216fd..1ffbed4bb3 100644
--- a/src/lib/eolian_cxx/grammar/function_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/function_definition.hpp
@@ -60,9 +60,14 @@ struct function_definition_generator
   .generate(sink, attributes::unused, ctx))
 return false;
 
+  std::string const_flag;
+  if (!f.is_static) const_flag = " const";
+
   if(!as_generator
- ("inline ::efl::eolian::return_traits<" << grammar::type(true) << 
">::type " << string << "::" << string << "(" << (parameter % ", ") << ") 
const\n{\n")
- .generate(sink, std::make_tuple(f.return_type, 
_klass_name.eolian_name, escape_keyword(f.name), f.parameters), ctx))
+ ("inline ::efl::eolian::return_traits<" << grammar::type(true) << 
">::type " << string << "::"
+  << string << "(" << (parameter % ", ") << ")" << string << "\n{\n")
+ .generate(sink, std::make_tuple(f.return_type, 
_klass_name.eolian_name,
+ escape_keyword(f.name), f.parameters, 
const_flag), ctx))
 return false;
 
   std::vector opening_statements(f.opening_statements());
@@ -104,10 +109,13 @@ struct function_definition_generator
  && 
!as_generator(attributes::c_type({attributes::parameter_direction::in, 
f.return_type, ""})
   << " __return_value = "
   ).generate(sink, attributes::unused, ctx)) return 
false;
-  
+
+  std::string object_flag;
+  if (f.is_static) object_flag = "_eo_class()";
+  else object_flag = "_eo_ptr()";
+
   if(!as_generator
- (" ::" << string << "(this->_eo_ptr()"
-  <<
+ (" ::" << string << "(" << string <<
   *(
 "\n" << scope_tab << scope_tab << ", "
 <<
@@ -119,7 +127,7 @@ struct function_definition_generator
 )
   )
   << ");\n"
- ).generate(sink, std::make_tuple(f.c_name, f.parameters), ctx))
+ ).generate(sink, std::make_tuple(f.c_name, object_flag, 
f.parameters), ctx))
 return false;
 
   auto out_assignments =
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp 
b/src/lib/eolian_cxx/grammar/klass_def.hpp
index fc6d62d5b8..b2aae1bbef 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -439,6 +439,7 @@ struct function_def
   bool is_beta;
   bool is_protected;
   bool is_function_pointer;
+  bool is_static;
 
   friend inline bool operator==(function_def const& lhs, function_def const& 
rhs)
   {
@@ -449,7 +450,8 @@ struct function_def
   && lhs.filename == rhs.filename
   && lhs.is_beta == rhs.is_beta
   && lhs.is_protected == rhs.is_protected
-  && lhs.is_function_pointer == rhs.is_function_pointer;
+  && lhs.is_function_pointer == rhs.is_function_pointer
+  && lhs.is_static == rhs.is_static;
   }
   friend inline bool 

[EGIT] [core/efl] master 16/39: cxx: Fix some pedantic warnings from clang

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 4fdc5fd0b20bf9c56248858fb31aa02cad306e77
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 20:35:18 2017 +0900

cxx: Fix some pedantic warnings from clang

Shadow variables, 0 used as nullptr.
clang still complains that usage() is not declared as noreturn.
---
 src/bin/eolian_cxx/eolian_cxx.cc | 40 
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index b67d0442b9..29c81d32d7 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -41,7 +41,7 @@ struct options_type
options_type() : main_header(false) {}
 };
 
-efl::eina::log_domain domain("eolian_cxx");
+static efl::eina::log_domain domain("eolian_cxx");
 
 static bool
 opts_check(eolian_cxx::options_type const& opts)
@@ -85,11 +85,11 @@ generate(const Eolian_Class* klass, 
eolian_cxx::options_type const& opts,
auto klass_name_function
  = [&] (efl::eolian::grammar::attributes::klass_name const& name)
  {
-Eolian_Class const* klass = get_klass(name, opts.unit);
-assert(klass);
-c_headers.insert(eolian_class_file_get(klass) + std::string(".h"));
-cpp_headers.insert(eolian_class_file_get(klass) + std::string(".hh"));
-efl::eolian::grammar::attributes::klass_def cls{klass, opts.unit};
+Eolian_Class const* klass2 = get_klass(name, opts.unit);
+assert(klass2);
+c_headers.insert(eolian_class_file_get(klass2) + std::string(".h"));
+cpp_headers.insert(eolian_class_file_get(klass2) + std::string(".hh"));
+efl::eolian::grammar::attributes::klass_def cls{klass2, opts.unit};
 if(std::find(forward_klasses.begin(), forward_klasses.end(), cls) == 
forward_klasses.end())
   forward_klasses.push_back(cls);
  };
@@ -114,23 +114,23 @@ generate(const Eolian_Class* klass, 
eolian_cxx::options_type const& opts,
  };
 
std::function klass_function
- = [&] (Eolian_Class const* klass)
+ = [&] (Eolian_Class const* klass2)
  {
-   for(efl::eina::iterator inherit_iterator ( 
::eolian_class_inherits_get(klass))
+   for(efl::eina::iterator inherit_iterator ( 
::eolian_class_inherits_get(klass2))
  , inherit_last; inherit_iterator != inherit_last; 
++inherit_iterator)
  {
Eolian_Class const* inherit = &*inherit_iterator;
c_headers.insert(eolian_class_file_get(inherit) + 
std::string(".h"));
cpp_headers.insert(eolian_class_file_get(inherit) + 
std::string(".hh"));
-   efl::eolian::grammar::attributes::klass_def klass{inherit, 
opts.unit};
-   if(std::find(forward_klasses.begin(), forward_klasses.end(), klass) 
== forward_klasses.end())
- forward_klasses.push_back(klass);
+   efl::eolian::grammar::attributes::klass_def klass3{inherit, 
opts.unit};
+   if(std::find(forward_klasses.begin(), forward_klasses.end(), 
klass3) == forward_klasses.end())
+ forward_klasses.push_back(klass3);
 
klass_function(inherit);
  }
 
-   efl::eolian::grammar::attributes::klass_def klass_def(klass, opts.unit);
-   for(auto&& f : klass_def.functions)
+   efl::eolian::grammar::attributes::klass_def klass2_def(klass2, 
opts.unit);
+   for(auto&& f : klass2_def.functions)
  {
variant_function(f.return_type);
for(auto&& p : f.parameters)
@@ -138,7 +138,7 @@ generate(const Eolian_Class* klass, 
eolian_cxx::options_type const& opts,
variant_function(p.type);
  }
  }
-   for(auto&& e : klass_def.events)
+   for(auto&& e : klass2_def.events)
  {
if(e.type)
  variant_function(*e.type);
@@ -463,12 +463,12 @@ opts_get(int argc, char **argv)
 
const struct option long_options[] =
  {
-   { "in",  required_argument, 0,  'I' },
-   { "out-file",required_argument, 0,  'o' },
-   { "version", no_argument,   0,  'v' },
-   { "help",no_argument,   0,  'h' },
-   { "main-header", no_argument,   0,  'm' },
-   { 0, 0, 0,   0  }
+   { "in",  required_argument, nullptr, 'I' },
+   { "out-file",required_argument, nullptr, 'o' },
+   { "version", no_argument,   nullptr, 'v' },
+   { "help",no_argument,   nullptr, 'h' },
+   { "main-header", no_argument,   nullptr, 'm' },
+   { nullptr,   0, nullptr,  0  }
  };
const char* options = "I:D:o:c::marvh";
 

-- 




[EGIT] [core/efl] master 03/39: cxx: Some code style in examples

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 1997e1b3d02f4ff6869775d855bcb80ea89233fc
Author: Jean-Philippe Andre 
Date:   Mon Nov 13 11:43:04 2017 +0900

cxx: Some code style in examples

Use the common form
  Class a(instantiate);
instead of
  auto a = Class(instantiate);

Also modify bg example to not use an policy.
---
 src/examples/elementary/bg_cxx_example_01.cc   |  6 ++
 src/examples/elementary/bg_cxx_example_02.cc   | 22 +++---
 src/examples/elementary/box_cxx_example_02.cc  |  2 +-
 src/examples/elementary/calendar_cxx_example_02.cc |  2 +-
 4 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/src/examples/elementary/bg_cxx_example_01.cc 
b/src/examples/elementary/bg_cxx_example_01.cc
index 290ee57a3f..8fcb78c0ea 100644
--- a/src/examples/elementary/bg_cxx_example_01.cc
+++ b/src/examples/elementary/bg_cxx_example_01.cc
@@ -5,10 +5,8 @@
 EAPI_MAIN int
 elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
 {
-   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
-
-   ::efl::ui::Win win;
-   // win.title_set("Bg Plain");
+   efl::ui::Win win;
+   win.text_set("Bg Plain");
win.autohide_set(true);
 
win.eo_cxx::efl::Gfx::size_set({320,320});
diff --git a/src/examples/elementary/bg_cxx_example_02.cc 
b/src/examples/elementary/bg_cxx_example_02.cc
index 1cc3f7251b..34016b6c9c 100644
--- a/src/examples/elementary/bg_cxx_example_02.cc
+++ b/src/examples/elementary/bg_cxx_example_02.cc
@@ -9,14 +9,15 @@
 
 #include 
 
-EAPI_MAIN int
-elm_main (int argc EINA_UNUSED, char **args EINA_UNUSED)
-{
-   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
+using efl::eo::instantiate;
 
-   using efl::eo::instantiate;
+efl::ui::Win win;
 
-   efl::ui::Win win(instantiate);
+EAPI_MAIN void
+efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
+{
+   instantiate(win);
+   ::efl_ref(win._eo_ptr()); // FIXME: Window is doing BAD THINGS™!
win.text_set("Bg Image");
win.autohide_set(true);
 
@@ -29,9 +30,8 @@ elm_main (int argc EINA_UNUSED, char **args EINA_UNUSED)
bg.file_set("performance/background.png", nullptr);
win.content_set(bg);
 
-   win.eo_cxx::efl::Gfx::size_set({640, 400});
-
-   elm_run();
-   return 0;
+   win.size_set({640, 400});
+   std::cout << "win " << win._eo_ptr() << std::endl;
+   win.delete_request_event_cb_add([](){ win = nullptr; efl_exit(0); });
 }
-ELM_MAIN()
+EFL_MAIN()
diff --git a/src/examples/elementary/box_cxx_example_02.cc 
b/src/examples/elementary/box_cxx_example_02.cc
index 1c0bf81b06..e89007fdec 100644
--- a/src/examples/elementary/box_cxx_example_02.cc
+++ b/src/examples/elementary/box_cxx_example_02.cc
@@ -18,7 +18,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev 
EINA_UNUSED)
 
for (int i = 0; i < 5; i++)
  {
-auto bt = efl::ui::Button(instantiate, win);
+efl::ui::Button bt(instantiate, win);
 bt.text_set("Button " + std::to_string(i));
 box.pack_end(bt);
  }
diff --git a/src/examples/elementary/calendar_cxx_example_02.cc 
b/src/examples/elementary/calendar_cxx_example_02.cc
index cec2342be4..5e4683baf6 100644
--- a/src/examples/elementary/calendar_cxx_example_02.cc
+++ b/src/examples/elementary/calendar_cxx_example_02.cc
@@ -30,7 +30,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev 
EINA_UNUSED)
win.text_set("Calendar Layout Formatting Example");
win.autohide_set(true);
 
-   auto cal = efl::ui::Calendar(instantiate, win);
+   efl::ui::Calendar cal(instantiate, win);
win.content_set(cal);
 
// FIXME: Function cb doesn't work (C++ variant)

-- 




[EGIT] [core/efl] master 06/39: eolian: Add builtin type "strbuf"

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 43a6fddf1f665cb5e936e8b9db51a578b9239d56
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 15:44:06 2017 +0900

eolian: Add builtin type "strbuf"

Refers to Eina_Strbuf*
---
 src/lib/eolian/database_function_api.c | 1 +
 src/lib/eolian/eo_lexer.c  | 2 +-
 src/lib/eolian/eo_lexer.h  | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian/database_function_api.c 
b/src/lib/eolian/database_function_api.c
index 400bd1dffb..fffced476b 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -121,6 +121,7 @@ eolian_function_full_c_name_get(const Eolian_Function 
*foo_id,
  }
 
char tbuf[512];
+   tbuf[0] = '\0';
const char *prefix = (ftype != EOLIAN_FUNCTION_POINTER) ? 
_get_eo_prefix(foo_id, tbuf, use_legacy): tbuf;
 
if (!prefix)
diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index affe61efa7..4da3942c51 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -76,7 +76,7 @@ static const char * const ctypes[] =
"Eina_List *", "Eina_Inarray *", "Eina_Inlist *",
"Efl_Future *",
"Eina_Value", "Eina_Value *",
-   "char *", "const char *", "Eina_Stringshare *",
+   "char *", "const char *", "Eina_Stringshare *", "Eina_Strbuf *",
 
"void *",
 
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 0cf76ce489..b911ddb5f6 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -54,7 +54,7 @@ enum Tokens
 KW(accessor), KW(array), KW(iterator), KW(hash), KW(list), KW(inarray), 
KW(inlist), \
 KW(future),   \
 KW(any_value), KW(any_value_ptr), \
-KW(mstring), KW(string), KW(stringshare), \
+KW(mstring), KW(string), KW(stringshare), KW(strbuf), \
 \
 KW(void_ptr), \
 KW(__builtin_free_cb), \

-- 




[EGIT] [core/efl] master 13/39: cxx: No instantiate ctors for non-regular classes

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 12d50cbe1938a096e8c06674d7b8ee8c33d5c335
Author: Jean-Philippe Andre 
Date:   Wed Nov 22 19:45:56 2017 +0900

cxx: No instantiate ctors for non-regular classes

Only regular classes can be instantiated, this should be reflected in
the C++ binding as well.
---
 src/lib/eolian_cxx/grammar/class_definition.hpp | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp 
b/src/lib/eolian_cxx/grammar/class_definition.hpp
index d5810da033..a60e18dedf 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -42,8 +42,7 @@ struct class_definition_generator
  if(!as_generator("\n{\n").generate(sink, attributes::unused, context)) 
return false;
 
  // constructors
- if(!as_generator
-(
+ if(!as_generator(
 scope_tab << "explicit " << string << "( ::Eo* eo)\n"
  << scope_tab << scope_tab << ": ::efl::eo::concrete(eo) {}\n"
  << scope_tab << string << "(std::nullptr_t)\n"
@@ -57,10 +56,13 @@ struct class_definition_generator
  << scope_tab << string << "(Derived&& derived\n"
  << scope_tab << scope_tab << ", typename std::enable_if<\n"
  << scope_tab << scope_tab << scope_tab << 
"::efl::eo::is_eolian_object::value\n"
- << scope_tab << scope_tab << scope_tab << " && std::is_base_of< " << 
string << ", Derived>::value"
- << scope_tab << scope_tab << scope_tab << ">::type* = 0) : 
::efl::eo::concrete(derived._eo_ptr())\n"
- << scope_tab << "{}\n"
- << scope_tab << string << "( ::efl::eo::instantiate_t)\n"
+ << scope_tab << scope_tab << scope_tab << " && std::is_base_of< " << 
string << ", Derived>::value>::type* = 0)\n"
+ << scope_tab << scope_tab << scope_tab << ": 
::efl::eo::concrete(derived._eo_ptr()) {}\n\n"
+  ).generate(sink, attributes::make_infinite_tuple(cls.cxx_name), 
context))
+   return false;
+
+ if((cls.type == attributes::class_type::regular) && !as_generator(
+scope_tab << string << "( ::efl::eo::instantiate_t)\n"
  << scope_tab << "{\n"
  << scope_tab << scope_tab << "::efl::eolian::do_eo_add( 
::efl::eo::concrete::_eo_raw, ::efl::eo::concrete{nullptr}, _eo_class());\n"
  << scope_tab << "}\n"
@@ -76,7 +78,7 @@ struct class_definition_generator
  << scope_tab << "template  " << string << "(  
::efl::eo::instantiate_t, T&& parent, F&& f, typename ::std::enable_if< 
::efl::eolian::is_constructor_lambda::value && 
::efl::eo::is_eolian_object::value>::type* = 0)\n"
  << scope_tab << "{\n"
  << scope_tab << scope_tab << "::efl::eolian::do_eo_add( 
::efl::eo::concrete::_eo_raw, parent, _eo_class(), *this, 
std::forward(f));\n"
- << scope_tab << "}\n"
+ << scope_tab << "}\n\n"
  // << scope_tab << "explicit " << string << "( ::efl::eo::concrete 
const& parent)\n"
  // << scope_tab << scope_tab << ": ::efl::eo::concrete( 
::efl::eo::do_eo_add(parent)) {}\n"
  // << scope_tab << "template \n"

-- 




[EGIT] [core/efl] master 24/39: win: Allow unref until deletion

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit c372e5e6c77bdd28ac1fd3b922a60d263f7d94ef
Author: Jean-Philippe Andre 
Date:   Mon Nov 27 22:24:01 2017 +0900

win: Allow unref until deletion

This is for bindings. I wish I could actually distinguish the use case
more (between efl_add() from C and instantiation from C++).
---
 src/lib/elementary/efl_ui_win.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 3a3d8230d5..3ebbdb116c 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5406,6 +5406,10 @@ _efl_ui_win_efl_object_constructor(Eo *obj, 
Efl_Ui_Win_Data *pd)
pd->provider = efl_add(EFL_UI_FOCUS_PARENT_PROVIDER_STANDARD_CLASS, obj);
pd->profile.available = eina_array_new(4);
 
+   // For bindings: if no parent, allow simple unref
+   if (!efl_parent_get(obj))
+ efl_allow_parent_unref_set(obj, EINA_TRUE);
+
efl_composite_attach(obj, pd->manager);
_efl_ui_focus_manager_redirect_events_add(pd->manager, obj);
 

-- 




[EGIT] [core/efl] master 36/39: cxx: Fix compilation after merge

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 8cdb3184f8a1f3e5396d953b238ce2e217f0cb1c
Author: Jean-Philippe Andre 
Date:   Tue Dec 5 10:47:09 2017 +0900

cxx: Fix compilation after merge

This resolves a few issues and brings back the experimental features.

Also, disable some of the ugliest experiments:
 - manual function overrides,
 - define APIs only in eo_cxx namespace

Some APIs are generated behind EFL_CXXPERIMENT (eg. event_name_cb_add or
some weak pointer stuff). I believe they are useful but would like to
make sure there are no serious drawbacks with generating those.
---
 src/bin/eolian_cxx/eolian_cxx.cc   | 52 ++
 src/examples/elementary/popup_cxx_example.cc   |  3 +-
 src/lib/eolian_cxx/grammar/class_definition.hpp| 37 ---
 src/lib/eolian_cxx/grammar/context.hpp |  2 +-
 .../eolian_cxx/grammar/function_declaration.hpp|  4 ++
 src/lib/eolian_cxx/grammar/function_definition.hpp |  4 ++
 src/lib/eolian_cxx/grammar/generator.hpp   |  1 +
 src/lib/eolian_cxx/grammar/klass_def.hpp   |  8 ++--
 src/lib/eolian_cxx/grammar/parameter.hpp   | 10 -
 src/lib/eolian_cxx/grammar/part_declaration.hpp|  3 +-
 src/lib/eolian_cxx/grammar/part_implementation.hpp |  3 +-
 .../grammar/type_function_declaration.hpp  |  5 ++-
 12 files changed, 54 insertions(+), 78 deletions(-)

diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index 3720aa9251..134700ae6c 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -241,55 +241,9 @@ types_generate(std::string const& fname, options_type 
const& opts,
 const Eolian_Function *func = eolian_typedecl_function_pointer_get(tp);
 if (!func) return false;
 
-Eina_Iterator *param_itr = eolian_function_parameters_get(func);
-std::vector params;
-
-/* const */ Eolian_Function_Parameter *param;
-while (::eina_iterator_next(param_itr, reinterpret_cast()))
-  {
- parameter_direction param_dir;
- switch (eolian_parameter_direction_get(param))
-   {
-/* Note: Inverted on purpose, as the direction objects are
- * passed is inverted (from C to C++ for function pointers).
- * FIXME: This is probably not right in all cases. */
-case EOLIAN_IN_PARAM: param_dir = parameter_direction::out; 
break;
-case EOLIAN_INOUT_PARAM: param_dir = 
parameter_direction::inout; break;
-case EOLIAN_OUT_PARAM: param_dir = parameter_direction::in; 
break;
-default: return false;
-   }
-
- const Eolian_Type *param_type_eolian = 
eolian_parameter_type_get(param);
- type_def param_type(param_type_eolian, opts.unit, 
EOLIAN_C_TYPE_PARAM);
- std::string param_name = eolian_parameter_name_get(param);
- std::string param_c_type = 
eolian_type_c_type_get(param_type_eolian, EOLIAN_C_TYPE_PARAM);
- parameter_def param_def(param_dir, param_type, param_name, 
param_c_type);
- params.push_back(std::move(param_def));
-  }
-::eina_iterator_free(param_itr);
-
-const Eolian_Type *ret_type_eolian = 
eolian_function_return_type_get(func, EOLIAN_FUNCTION_POINTER);
-
-type_def ret_type = void_;
-if (ret_type_eolian)
-  ret_type = type_def(ret_type_eolian, opts.unit, 
EOLIAN_C_TYPE_RETURN);
-
-/*
-// List namespaces. Not used as function_wrapper lives in efl::eolian.
-std::vector namespaces;
-Eina_Iterator *ns_itr = eolian_typedecl_namespaces_get(tp);
-char *ns;
-while (::eina_iterator_next(ns_itr, reinterpret_cast()))
-  namespaces.push_back(std::string(ns));
-::eina_iterator_free(ns_itr);
-*/
-
-std::string name = eolian_function_name_get(func);
-std::string c_name = eolian_typedecl_full_name_get(tp);
-std::replace(c_name.begin(), c_name.end(), '.', '_');
-bool beta = eolian_function_is_beta(func);
-
-function_def def(ret_type, name, params, c_name, beta, false, true);
+function_def def(func, EOLIAN_FUNCTION_POINTER, opts.unit);
+def.c_name = eolian_typedecl_full_name_get(tp);
+std::replace(def.c_name.begin(), def.c_name.end(), '.', '_');
 functions.push_back(std::move(def));
  }
::eina_iterator_free(itr);
diff --git a/src/examples/elementary/popup_cxx_example.cc 
b/src/examples/elementary/popup_cxx_example.cc
index 8a06a81ac0..7c6d85ce7a 100644
--- a/src/examples/elementary/popup_cxx_example.cc
+++ b/src/examples/elementary/popup_cxx_example.cc
@@ -1,6 +1,7 @@
 // g++ -g `pkg-config --cflags --libs elementary-cxx 

[EGIT] [core/efl] master 23/39: cxx: Implement support for parts

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 5901b4601e3a240f6286ab9396d1ea2967ca61bc
Author: Jean-Philippe Andre 
Date:   Mon Nov 27 19:52:44 2017 +0900

cxx: Implement support for parts

This generates methods like this:

  Part_Class part_name() const;

Which can then be used like:

  slider.indicator().format_string_set("%1.1f");
---
 src/bin/eolian_cxx/eolian_cxx.cc   |  8 +++
 src/examples/elementary/slider_cxx_example.cc  | 11 ++--
 .../eolian_cxx/grammar/base_class_definition.hpp   |  4 ++
 src/lib/eolian_cxx/grammar/class_definition.hpp|  9 ++-
 .../eolian_cxx/grammar/class_implementation.hpp| 11 ++--
 src/lib/eolian_cxx/grammar/klass_def.hpp   | 72 ++
 src/lib/eolian_cxx/grammar/part_declaration.hpp| 44 +
 src/lib/eolian_cxx/grammar/part_implementation.hpp | 72 ++
 8 files changed, 210 insertions(+), 21 deletions(-)

diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index 2df5b9ae2d..f3f3c36610 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -144,6 +144,14 @@ generate(const Eolian_Class* klass, 
eolian_cxx::options_type const& opts,
  };
klass_function(klass);
 
+   for(efl::eina::iterator parts_itr ( 
::eolian_class_parts_get(klass))
+ , parts_last; parts_itr != parts_last; ++parts_itr)
+ {
+Eolian_Class const* eolian_part_klass = 
::eolian_part_class_get(&*parts_itr);
+efl::eolian::grammar::attributes::klass_def 
part_klass(eolian_part_klass, opts.unit);
+forward_klasses.insert(part_klass);
+ }
+
cpp_headers.erase(eolian_class_file_get(klass) + std::string(".hh"));
 
std::string guard_name;
diff --git a/src/examples/elementary/slider_cxx_example.cc 
b/src/examples/elementary/slider_cxx_example.cc
index aa2360ff57..036dadcd1a 100644
--- a/src/examples/elementary/slider_cxx_example.cc
+++ b/src/examples/elementary/slider_cxx_example.cc
@@ -1,5 +1,7 @@
 // g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx 
ecore-cxx evas-cxx edje-cxx` slider_cxx_example.cc -o slider_cxx_example
 
+#define EFL_CXXPERIMENTAL
+
 #include 
 
 using efl::eo::instantiate;
@@ -51,13 +53,12 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev 
EINA_UNUSED)
bx.pack_end(sl4);
 
efl::ui::Slider sl5(instantiate, win);
-
-   // FIXME: C++ part API needs special reference handling! This will show ERR!
-   efl::eo::downcast(sl5.part("indicator"))
- .format_string_set("%1.2f");
-
+   sl5.indicator().format_string_set("%1.0f rabbit(s)");
+   sl5.range_min_max_set(0, 100);
+   sl5.step_set(1);
sl5.direction_set(EFL_UI_DIR_UP);
sl5.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
+   sl5.hint_min_set({0, 120});
bx.pack_end(sl5);
 
efl::ui::Slider sl6(instantiate, win);
diff --git a/src/lib/eolian_cxx/grammar/base_class_definition.hpp 
b/src/lib/eolian_cxx/grammar/base_class_definition.hpp
index d5fa914b53..edc6afb86a 100644
--- a/src/lib/eolian_cxx/grammar/base_class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/base_class_definition.hpp
@@ -14,6 +14,7 @@
 #include "grammar/case.hpp"
 #include "grammar/address_of.hpp"
 #include "grammar/attribute_reorder.hpp"
+#include "grammar/part_declaration.hpp"
 
 namespace efl { namespace eolian { namespace grammar {
 
@@ -36,6 +37,9 @@ struct base_class_definition_generator
  if(!as_generator(*(scope_tab << 
function_declaration(get_klass_name(cls
 .generate(sink, cls.functions, context)) return false;
 
+ if(!as_generator(*(scope_tab << part_declaration << ";\n"))
+.generate(sink, cls.parts, context)) return false;
+
  // static Efl_Class const* _eo_class();
  std::string suffix;
  switch(cls.type)
diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp 
b/src/lib/eolian_cxx/grammar/class_definition.hpp
index 30a9daf134..7367cf7ef0 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -15,6 +15,7 @@
 #include "grammar/attribute_reorder.hpp"
 #include "grammar/attribute_conditional.hpp"
 #include "grammar/attribute_replace.hpp"
+#include "grammar/part_declaration.hpp"
 
 namespace efl { namespace eolian { namespace grammar {
 
@@ -206,11 +207,17 @@ struct class_definition_generator
  // /// @endcond
  if(!as_generator(scope_tab << "/// @endcond\n").generate(sink, 
attributes::unused, context)) return false;
 
+ // EXPERIMENTAL: Parts
+ if(!as_generator("#ifdef EFL_CXXPERIMENTAL\n").generate(sink, 
attributes::unused, context)) return false;
+ if(!as_generator(*(scope_tab << part_declaration << ";\n"))
+   .generate(sink, cls.parts, context)) return false;
+ if(!as_generator("#endif \n").generate(sink, attributes::unused, 
context)) 

[EGIT] [core/efl] master 21/39: cxx: Fix bg examples

2017-12-04 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit e738c5e869e135e599c84001dc3ca3ea0a1b3971
Author: Jean-Philippe Andre 
Date:   Thu Nov 23 14:10:24 2017 +0900

cxx: Fix bg examples

One uses the Bg widget and the other one uses the part.
---
 src/examples/elementary/bg_cxx_example_01.cc | 22 +++---
 src/examples/elementary/bg_cxx_example_02.cc | 20 
 2 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/src/examples/elementary/bg_cxx_example_01.cc 
b/src/examples/elementary/bg_cxx_example_01.cc
index 8fcb78c0ea..c852b07c90 100644
--- a/src/examples/elementary/bg_cxx_example_01.cc
+++ b/src/examples/elementary/bg_cxx_example_01.cc
@@ -1,17 +1,25 @@
-#define EFL_EO_API_SUPPORT
-
 #include 
 
+using efl::eo::instantiate;
+
 EAPI_MAIN int
 elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
 {
-   efl::ui::Win win;
-   win.text_set("Bg Plain");
+   efl::ui::Win win(instantiate);
+   win.text_set("Window Background");
win.autohide_set(true);
+   win.size_set({320,320});
+   try {
+  auto bg = efl::eo::downcast(win.part("background"));
+  bg.color_set(139, 69, 19, 255);
+   } catch (std::exception const) {
+  std::cerr << "Failed to set bg color: " << e.what() << std::endl;
+   }
 
-   win.eo_cxx::efl::Gfx::size_set({320,320});
-   //win.size_set(320,320);
-   win.visible_set(true);
+   // Clean exit
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+   efl::eolian::event_add(efl::ui::Win::delete_request_event, win,
+  std::bind([&](){ win = nullptr; }));
 
elm_run();
return 0;
diff --git a/src/examples/elementary/bg_cxx_example_02.cc 
b/src/examples/elementary/bg_cxx_example_02.cc
index eb71693242..775b8bb92e 100644
--- a/src/examples/elementary/bg_cxx_example_02.cc
+++ b/src/examples/elementary/bg_cxx_example_02.cc
@@ -9,27 +9,31 @@
 
 #include 
 
-#include 
-
 using efl::eo::instantiate;
 
-efl::ui::Win win;
+static efl::ui::Win win;
 
 EAPI_MAIN void
-efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
+efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
 {
+   Efl_Loop_Arguments *args = static_cast(ev->info);
+
win = efl::ui::Win(instantiate);
-   ::efl_ref(win._eo_ptr()); // FIXME: Window is doing BAD THINGS™!
win.text_set("Bg Image");
win.autohide_set(true);
+   win.delete_request_event_cb_add([](){ win = nullptr; efl_exit(0); });
+
+   std::string path;
+   if (eina_array_count(args->argv) > 0)
+ path = static_cast(eina_array_data_get(args->argv, 0));
+   else
+ path = "performance/background.png";
 
efl::ui::Bg bg(instantiate, win);
bg.scale_type_set(EFL_UI_IMAGE_SCALE_TYPE_FILL);
-   bg.file_set("performance/background.png", nullptr);
+   bg.file_set(path, nullptr);
win.content_set(bg);
 
win.size_set({640, 400});
-   std::cout << "win " << win._eo_ptr() << std::endl;
-   win.delete_request_event_cb_add([](){ win = nullptr; efl_exit(0); });
 }
 EFL_MAIN()

-- 




[EGIT] [core/efl] feature/eo_theme 01/01: efl/calendar.edc: fix redefinition error

2017-12-04 Thread WooHyun Jung
woohyun pushed a commit to branch feature/eo_theme.

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

commit ca63650d172f15aa92406cfa895ef6e9fa9faa1e
Author: WooHyun Jung 
Date:   Tue Dec 5 14:02:03 2017 +0900

efl/calendar.edc: fix redefinition error
---
 data/elementary/themes/edc/efl/calendar.edc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/data/elementary/themes/edc/efl/calendar.edc 
b/data/elementary/themes/edc/efl/calendar.edc
index a1c8ffc5b6..86aee2ce42 100644
--- a/data/elementary/themes/edc/efl/calendar.edc
+++ b/data/elementary/themes/edc/efl/calendar.edc
@@ -1,4 +1,4 @@
-#define CIT_STYLES\
+#define CIT_STYLE\
   style { name: "efl_ui_calendar_date_style";\
  base: "font="FN" font_size=10 color=#ff style=shadow,bottom 
shadow_color=#0080 align=center text_class=calendar_day_text 
color_class=calendar_day_text";\
   }\
@@ -437,7 +437,7 @@ group { "efl/calendar";
   public last_focused_item;
}
styles {
-  CIT_STYLES
+  CIT_STYLE
}
parts {
   part { name: "bg"; type: SPACER;

-- 




[EGIT] [apps/terminology] master 01/01: title: set focus to title entry

2017-12-04 Thread Amitesh Singh
ami pushed a commit to branch master.

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

commit 31285fb5dce5de80da82e75ca76b0594c4ef73b2
Author: Amitesh Singh 
Date:   Tue Dec 5 13:41:51 2017 +0900

title: set focus to title entry

Focus was not coming to entry on 'set title' popup.
Set focus to a popup subobject after showing popup.

@fix
---
 src/bin/win.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/win.c b/src/bin/win.c
index 0d9aa29..610f8b7 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -3647,9 +3647,9 @@ term_set_title(Term *term)
 evas_object_smart_callback_add(o, "aborted", _set_title_cancel_cb, popup);
 elm_object_content_set(popup, o);
 evas_object_show(o);
-elm_object_focus_set(o, EINA_TRUE);
-
 evas_object_show(popup);
+
+elm_object_focus_set(o, EINA_TRUE);
 }
 
 static void

-- 




[EGIT] [core/efl] feature/eo_theme 01/01: efl_ui_calendar: apply new theme policy

2017-12-04 Thread WooHyun Jung
taxi2se pushed a commit to branch feature/eo_theme.

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

commit 20555ae125478642528aca9d59470a8d44f3991e
Author: WooHyun Jung 
Date:   Tue Dec 5 11:41:54 2017 +0900

efl_ui_calendar: apply new theme policy

Reviewers: jpeg, taxi2se

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5578
---
 data/elementary/themes/edc/efl/calendar.edc | 550 +++-
 src/lib/elementary/efl_ui_calendar.c|  84 ++---
 2 files changed, 589 insertions(+), 45 deletions(-)

diff --git a/data/elementary/themes/edc/efl/calendar.edc 
b/data/elementary/themes/edc/efl/calendar.edc
index c6b8276bb4..a1c8ffc5b6 100644
--- a/data/elementary/themes/edc/efl/calendar.edc
+++ b/data/elementary/themes/edc/efl/calendar.edc
@@ -1,3 +1,551 @@
+#define CIT_STYLES\
+  style { name: "efl_ui_calendar_date_style";\
+ base: "font="FN" font_size=10 color=#ff style=shadow,bottom 
shadow_color=#0080 align=center text_class=calendar_day_text 
color_class=calendar_day_text";\
+  }\
+  style { name: "efl_ui_calendar_date_today_style";\
+ base: "font="FN" font_size=10 color=#3399ff style=glow 
glow_color=#3399ff18 align=center text_class=calendar_day_text_today 
color_class=calendar_day_text_today";\
+  }\
+  style { name: "efl_ui_calendar_date_disabled_style";\
+ base: "font="FN" font_size=10 color=#151515 style=shadow,bottom 
shadow_color=#ffc0 align=center text_class=calendar_day_text_disabled 
text_class=calendar_day_text_disabled";\
+  }\
+
+#define CAL_SPIN(_sufix, _text, _relative)\
+  part { name: "left_bt"#_sufix; type: SPACER;\
+ scale: 1;\
+ description { state: "default" 0.0;\
+fixed: 1 1;\
+rel1 { to: #_relative;\
+   offset: 0 0;\
+}\
+rel2 { to: #_relative;\
+   offset: 0 -1;\
+}\
+align: 0.0 0.5;\
+min: 15 15;\
+max: 15 15;\
+ }\
+  }\
+  part { name: "right_bt"#_sufix; type: RECT;\
+ scale: 1;\
+ description { state: "default" 0.0;\
+fixed: 1 1;\
+rel1 { to: #_relative;\
+   offset: -1 0;\
+}\
+rel2 { to: #_relative;\
+   offset: -1 -1;\
+}\
+align: 1.0 0.5;\
+min: 15 15;\
+max: 15 15;\
+color: 0 0 0 0;\
+ }\
+  }\
+  part { name: "elm,calendar,button"#_sufix",left";\
+ type: SWALLOW;\
+ scale: 1;\
+ description { state: "default" 0.0;\
+fixed: 1 1;\
+rel1.to: "left_bt"#_sufix;\
+rel2.to: "left_bt"#_sufix;\
+ }\
+ description { state: "rtl" 0.0;\
+inherit: "default" 0.0;\
+rel1.to: "right_bt"#_sufix;\
+rel2.to: "right_bt"#_sufix;\
+ }\
+  }\
+  part { name: "elm,calendar,button"#_sufix",right";\
+ type: SWALLOW;\
+ scale: 1;\
+ description { state: "default" 0.0;\
+fixed: 1 1;\
+rel1.to: "right_bt"#_sufix;\
+rel2.to: "right_bt"#_sufix;\
+ }\
+ description { state: "rtl" 0.0;\
+inherit: "default" 0.0;\
+rel1.to: "left_bt"#_sufix;\
+rel2.to: "left_bt"#_sufix;\
+ }\
+  }\
+  part { name: #_text; type: TEXT; mouse_events: 0;\
+ effect: SHADOW BOTTOM; \
+ scale: 1;\
+ description { state: "default" 0.0;\
+fixed: 1 1;\
+rel1 { relative: 1.0 0.0;\
+   to: "left_bt"#_sufix;\
+}\
+rel2 { relative: 0.0 1.0;\
+   to: "right_bt"#_sufix;\
+}\
+text { font: FNBD; size: 10;\
+   min: 0 1;\
+   text_class: "calendar_"#_text; \
+}\
+color_class: "calendar_"#_text; \
+ }\
+  }
+
+#define CH(_pos) \
+   part { name: "ch_"#_pos".base"; type: SPACER; \
+  description { state: "default" 0.0; \
+ rel1 { \
+relative: (_pos % 7 / 7) 0.0; \
+to: "header"; \
+ } \
+ rel2 { \
+relative: (_pos % 7 / 7 + 1 / 7) 1.0; \
+to: "header"; \
+ } \
+  } \
+   } \
+   part { name: "ch_"#_pos".text"; type: TEXT; mouse_events: 0; \
+  effect: SHADOW BOTTOM; \
+  scale: 1; \
+  clip_to: "ch_"#_pos".clipper"; \
+  description { state: "default" 0.0; \
+ rel1.to: "ch_"#_pos".base"; \
+ rel2.to: "ch_"#_pos".base"; \
+ text { font: FN; size: 8; \
+min: 1 1; \
+ellipsis: -1; \
+text_class: "calendar_weekday_text"; \
+ } \
+ color_class: "calendar_weekday_text"; \
+  } \
+   } \
+   part { name: 

[EGIT] [core/efl] feature/eo_theme 01/01: efl_ui_popup: Fix class names

2017-12-04 Thread Jaehyun Cho
jaehyun pushed a commit to branch feature/eo_theme.

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

commit a1d9d20a5521eb627fe1b88ec0c421b2744da080
Author: Jaehyun Cho 
Date:   Tue Dec 5 11:19:34 2017 +0900

efl_ui_popup: Fix class names
---
 src/lib/elementary/efl_ui_popup_alert.c  |  2 +-
 src/lib/elementary/efl_ui_popup_alert.eo | 12 ++--
 src/lib/elementary/efl_ui_popup_alert_part.eo|  2 +-
 src/lib/elementary/efl_ui_popup_alert_scroll.c   |  2 +-
 src/lib/elementary/efl_ui_popup_alert_scroll.eo  |  2 +-
 src/lib/elementary/efl_ui_popup_alert_scroll_part.eo |  2 +-
 src/lib/elementary/efl_ui_popup_alert_text.c |  2 +-
 src/lib/elementary/efl_ui_popup_alert_text.eo|  2 +-
 src/lib/elementary/efl_ui_popup_alert_text_part.eo   |  2 +-
 src/lib/elementary/efl_ui_popup_anchor.c |  2 +-
 src/lib/elementary/efl_ui_popup_anchor.eo|  2 +-
 11 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/lib/elementary/efl_ui_popup_alert.c 
b/src/lib/elementary/efl_ui_popup_alert.c
index e242a312e3..58922b12d8 100644
--- a/src/lib/elementary/efl_ui_popup_alert.c
+++ b/src/lib/elementary/efl_ui_popup_alert.c
@@ -10,7 +10,7 @@
 #include "elm_part_helper.h"
 
 #define MY_CLASS EFL_UI_POPUP_ALERT_CLASS
-#define MY_CLASS_NAME "Efl.Ui.Popup.Alert"
+#define MY_CLASS_NAME "Efl.Ui.Popup_Alert"
 
 static const char PART_NAME_BUTTON[] = "button";
 static const char PART_NAME_BUTTON_LAYOUT[EFL_UI_POPUP_ALERT_BUTTON_COUNT][15] 
=
diff --git a/src/lib/elementary/efl_ui_popup_alert.eo 
b/src/lib/elementary/efl_ui_popup_alert.eo
index 7d9fb1fbc1..ed27a1198e 100644
--- a/src/lib/elementary/efl_ui_popup_alert.eo
+++ b/src/lib/elementary/efl_ui_popup_alert.eo
@@ -1,16 +1,16 @@
-enum Efl.Ui.Popup.Alert.Button {
+enum Efl.Ui.Popup_Alert.Button {
[[Defines the type of the alert button.]]
positive = 0, [[Button having positive meaning. e.g. "Yes"]]
negative, [[Button having negative meaning. e.g. "No"]]
user [[Button having user-defined meaning. e.g. "Cancel"]]
 }
 
-struct Efl.Ui.Popup.Alert.Clicked_Event {
+struct Efl.Ui.Popup_Alert.Clicked_Event {
[[Information of clicked event]]
-   button_type: Efl.Ui.Popup.Alert.Button; [[Clicked button type]]
+   button_type: Efl.Ui.Popup_Alert.Button; [[Clicked button type]]
 }
 
-class Efl.Ui.Popup.Alert(Efl.Ui.Popup)
+class Efl.Ui.Popup_Alert(Efl.Ui.Popup)
 {
methods {
   @property button {
@@ -18,7 +18,7 @@ class Efl.Ui.Popup.Alert(Efl.Ui.Popup)
 [[Set popup buttons.]]
  }
  keys {
-type: Efl.Ui.Popup.Alert.Button;
+type: Efl.Ui.Popup_Alert.Button;
  }
  values {
 text: string;
@@ -31,6 +31,6 @@ class Efl.Ui.Popup.Alert(Efl.Ui.Popup)
   Efl.Part.part;
}
events {
-  clicked: Efl.Ui.Popup.Alert.Clicked_Event;
+  clicked: Efl.Ui.Popup_Alert.Clicked_Event;
}
 }
diff --git a/src/lib/elementary/efl_ui_popup_alert_part.eo 
b/src/lib/elementary/efl_ui_popup_alert_part.eo
index 31e607023c..31198e1ce0 100644
--- a/src/lib/elementary/efl_ui_popup_alert_part.eo
+++ b/src/lib/elementary/efl_ui_popup_alert_part.eo
@@ -1,4 +1,4 @@
-class Efl.Ui.Popup.Alert.Part (Efl.Ui.Layout.Part_Text)
+class Efl.Ui.Popup_Alert.Part (Efl.Ui.Layout.Part_Text)
 {
[[Efl UI Popup Alert internal part class]]
data: null;
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll.c 
b/src/lib/elementary/efl_ui_popup_alert_scroll.c
index 93b703a51a..7a5dd0b61c 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll.c
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll.c
@@ -10,7 +10,7 @@
 #include "elm_part_helper.h"
 
 #define MY_CLASS EFL_UI_POPUP_ALERT_SCROLL_CLASS
-#define MY_CLASS_NAME "Efl.Ui.Popup.Alert.Scroll"
+#define MY_CLASS_NAME "Efl.Ui.Popup_Alert_Scroll"
 
 static const char PART_NAME_SCROLLER[] = "scroller";
 
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll.eo 
b/src/lib/elementary/efl_ui_popup_alert_scroll.eo
index 641a5d6899..af13c9b395 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll.eo
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll.eo
@@ -1,4 +1,4 @@
-class Efl.Ui.Popup.Alert.Scroll(Efl.Ui.Popup.Alert)
+class Efl.Ui.Popup_Alert_Scroll(Efl.Ui.Popup_Alert)
 {
implements {
   Efl.Object.constructor;
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll_part.eo 
b/src/lib/elementary/efl_ui_popup_alert_scroll_part.eo
index 984f91161a..1514b514df 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll_part.eo
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll_part.eo
@@ -1,4 +1,4 @@
-class Efl.Ui.Popup.Alert.Scroll.Part (Efl.Ui.Layout.Part_Content, 
Efl.Ui.Layout.Part_Text)
+class Efl.Ui.Popup_Alert_Scroll.Part (Efl.Ui.Layout.Part_Content, 
Efl.Ui.Layout.Part_Text)
 {
[[Efl UI Popup Alert Scroll internal part class]]
data: null;
diff --git 

[EGIT] [core/efl] feature/eo_theme 01/01: efl_ui_popup_alert: refactor popup_alert_part

2017-12-04 Thread Sungtaek Hong
jaehyun pushed a commit to branch feature/eo_theme.

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

commit 300961c84b656df2cf4e429f701e6664a8a9342b
Author: Sungtaek Hong 
Date:   Tue Dec 5 10:41:20 2017 +0900

efl_ui_popup_alert: refactor popup_alert_part

Summary: remove redundant logic for button part.

Test Plan: Run elementary_test->Efl.Ui.Popup_alert

Reviewers: jpeg, Jaehyun_Cho, woohyun

Reviewed By: Jaehyun_Cho

Subscribers: cedric, Blackmole, herb

Differential Revision: https://phab.enlightenment.org/D5577
---
 src/lib/elementary/efl_ui_popup_alert.c | 191 
 1 file changed, 72 insertions(+), 119 deletions(-)

diff --git a/src/lib/elementary/efl_ui_popup_alert.c 
b/src/lib/elementary/efl_ui_popup_alert.c
index 4fb26326d8..e242a312e3 100644
--- a/src/lib/elementary/efl_ui_popup_alert.c
+++ b/src/lib/elementary/efl_ui_popup_alert.c
@@ -18,6 +18,11 @@ static const char 
PART_NAME_BUTTON_LAYOUT[EFL_UI_POPUP_ALERT_BUTTON_COUNT][15] =
  "button_layout2",
  "button_layout3"};
 
+static const char BUTTON_SWALLOW_NAME[EFL_UI_POPUP_ALERT_BUTTON_COUNT][20] =
+{"elm.swallow.button1",
+ "elm.swallow.button2",
+ "elm.swallow.button3"};
+
 EOLIAN static void
 _efl_ui_popup_alert_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Data 
*pd EINA_UNUSED)
 {
@@ -37,19 +42,19 @@ _efl_ui_popup_alert_text_set(Eo *obj, 
Efl_Ui_Popup_Alert_Data *pd, const char *p
 {
if (eina_streq(part, "title") || eina_streq(part, "elm.text.title"))
  {
-if (pd->title_text)
+Eina_Bool changed = eina_stringshare_replace(>title_text, label);
+if (changed)
   {
- eina_stringshare_del(pd->title_text);
- pd->title_text = NULL;
+ efl_text_set(efl_part(efl_super(obj, MY_CLASS), "title"), label);
+ if (label)
+   elm_layout_signal_emit(obj, "elm,title,show", "elm");
+ else
+   elm_layout_signal_emit(obj, "elm,title,hide", "elm");
+
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
+ edje_object_message_signal_process(wd->resize_obj);
+ elm_layout_sizing_eval(obj);
   }
-
-pd->title_text = eina_stringshare_add(label);
-efl_text_set(efl_part(efl_super(obj, MY_CLASS), "elm.text.title"), 
label);
-elm_layout_signal_emit(obj, "elm,title,show", "elm");
-
-ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
-edje_object_message_signal_process(wd->resize_obj);
-elm_layout_sizing_eval(obj);
  }
else
  efl_text_set(efl_part(efl_super(obj, MY_CLASS), part), label);
@@ -72,8 +77,7 @@ _efl_ui_popup_alert_text_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Popup_Alert_Data *pd, c
 }
 
 static void
-_positive_button_clicked_cb(void *data, Eo *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
+_positive_button_clicked_cb(void *data, const Efl_Event *ev EINA_UNUSED)
 {
Eo *popup_obj = data;
 
@@ -84,8 +88,7 @@ _positive_button_clicked_cb(void *data, Eo *obj EINA_UNUSED,
 }
 
 static void
-_negative_button_clicked_cb(void *data, Eo *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
+_negative_button_clicked_cb(void *data, const Efl_Event *ev EINA_UNUSED)
 {
Eo *popup_obj = data;
 
@@ -96,8 +99,7 @@ _negative_button_clicked_cb(void *data, Eo *obj EINA_UNUSED,
 }
 
 static void
-_user_button_clicked_cb(void *data, Eo *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
+_user_button_clicked_cb(void *data, const Efl_Event *ev EINA_UNUSED)
 {
Eo *popup_obj = data;
 
@@ -110,117 +112,73 @@ _user_button_clicked_cb(void *data, Eo *obj EINA_UNUSED,
 EOLIAN static void
 _efl_ui_popup_alert_button_set(Eo *obj, Efl_Ui_Popup_Alert_Data *pd, 
Efl_Ui_Popup_Alert_Button type, const char *text)
 {
-   if (pd->button[type])
- {
-efl_del(pd->button[type]);
-pd->button[type] = NULL;
- }
-   pd->button[type] = efl_add(EFL_UI_BUTTON_CLASS, obj,
-  elm_widget_element_update(obj, efl_added, 
PART_NAME_BUTTON),
-  efl_text_set(efl_added, text));
+   int i;
+   Eo *cur_content;
 
-   switch (type)
+   if ((type < EFL_UI_POPUP_ALERT_BUTTON_POSITIVE) || (type > 
EFL_UI_POPUP_ALERT_BUTTON_USER))
  {
-  case EFL_UI_POPUP_ALERT_BUTTON_POSITIVE:
- evas_object_smart_callback_add(pd->button[type], "clicked",
-_positive_button_clicked_cb,
-obj);
- break;
-  case EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE:
- 

[EGIT] [core/efl] master 08/16: efl_mono: Add examples code.

2017-12-04 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit 41c073b2e61e8c0562cbdf25bdad8a3133275f81
Author: Lauro Moura 
Date:   Thu Nov 23 22:01:25 2017 -0300

efl_mono: Add examples code.

Buildsystem support will be enabled in a future commit
---
 src/Makefile.am   |   1 +
 src/examples/ecore/efl_loop_callback_add_event.cs |  43 
 src/examples/ecore/efl_loop_timer_example.cs  |  52 +
 src/examples/efl_mono/.gitignore  |   1 +
 src/examples/efl_mono/EoInherit01.cs  |  64 +++
 src/examples/efl_mono/FunctionPointer01.cs|  45 
 src/examples/efl_mono/Makefile.am | 123 +
 src/examples/efl_mono/example_numberwrapper.c |  87 +++
 src/examples/efl_mono/example_numberwrapper.eo|  30 ++
 src/examples/eina/EinaArray01.cs  |  41 +++
 src/examples/eina/EinaBinbuf01.cs |  65 +++
 src/examples/eina/EinaError01.cs  |  75 +
 src/examples/eina/EinaHash01.cs   |  66 
 src/examples/elementary/efl_ui_slider_mono.cs |  63 +++
 src/examples/evas/evas_mono_box.cs|  73 +
 src/examples/evas/evas_mono_image.cs  |  93 
 src/examples/evas/evas_mono_image2.cs |  83 ++
 src/examples/evas/evas_mono_rectangle.cs  |  47 
 src/examples/evas/evas_mono_table.cs  |  77 +
 src/examples/evas/evas_mono_text.cs   | 126 ++
 20 files changed, 1255 insertions(+)

diff --git a/src/Makefile.am b/src/Makefile.am
index 2651fd89ab..74ec6cdb2b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -125,6 +125,7 @@ examples/emotion \
 examples/emile \
 examples/elocation \
 examples/ethumb_client \
+examples/efl_mono \
 examples/elementary
 
 if HAVE_ELUA
diff --git a/src/examples/ecore/efl_loop_callback_add_event.cs 
b/src/examples/ecore/efl_loop_callback_add_event.cs
new file mode 100644
index 00..fe81bfd9ad
--- /dev/null
+++ b/src/examples/ecore/efl_loop_callback_add_event.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+
+class TestMain
+{
+/* private efl.Loop loop; */
+
+public TestMain(efl.Loop loop)
+{
+/* this.loop = loop; */
+}
+
+static void Main(string[] args)
+{
+efl.All.Init();
+
+efl.Loop loop = new efl.LoopConcrete();
+
+TestMain listener = new TestMain(loop);
+
+loop.CALLBACK_ADD += listener.callback_added_cb;
+
+loop.CALLBACK_ADD += listener.on_idle_enter;
+loop.CALLBACK_ADD -= listener.on_idle_enter;
+
+loop.IDLE += listener.on_idle_enter; // Will trigger CALLBACK_ADD
+
+efl.All.Shutdown();
+}
+
+public void on_idle_enter(object sender, EventArgs e)
+{
+Console.WriteLine("I should not be called while the loop is not 
running...");
+}
+
+public void callback_added_cb(object sender, EventArgs e)
+{
+Console.WriteLine("Looks like we added a new callback.");
+}
+}
+
+
diff --git a/src/examples/ecore/efl_loop_timer_example.cs 
b/src/examples/ecore/efl_loop_timer_example.cs
new file mode 100644
index 00..dd6b2b8606
--- /dev/null
+++ b/src/examples/ecore/efl_loop_timer_example.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+
+class TestMain
+{
+private efl.Loop loop;
+private int count;
+
+public TestMain(efl.Loop loop)
+{
+this.loop = loop;
+this.count = 0;
+}
+
+static void Main(string[] args)
+{
+efl.All.Init();
+
+efl.Loop loop = new efl.LoopConcrete();
+efl.loop.Timer timer = new efl.loop.TimerConcrete(loop);
+
+TestMain listener = new TestMain(loop);
+
+Console.WriteLine("Starting MainLoop");
+
+timer.interval_set(1.0);
+
+timer.TICK += listener.on_tick;
+timer.TICK += listener.another_callback;
+timer.TICK -= listener.another_callback;
+
+loop.begin();
+
+efl.All.Shutdown();
+}
+
+public void on_tick(object sender, EventArgs e)
+{
+Console.WriteLine("on_tick called on listener");
+
+if (count++ == 5)
+loop.quit(0);
+}
+
+public void another_callback(object sender, EventArgs e)
+{
+Console.WriteLine("Ooops. Should not have been called...");
+}
+}
+
+
diff --git a/src/examples/efl_mono/.gitignore b/src/examples/efl_mono/.gitignore
new file mode 100644
index 00..7a426d39c3
--- /dev/null
+++ b/src/examples/efl_mono/.gitignore
@@ -0,0 +1 @@
+/example_numberwrapper.out
diff --git 

[EGIT] [core/efl] master 15/16: efl_mono: fix switched reference to generated and non-generated source file in build system

2017-12-04 Thread Vitor Sousa
felipealmeida pushed a commit to branch master.

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

commit e7803cc429a15e09b60aaff29c98a65064b405be
Author: Vitor Sousa 
Date:   Mon Dec 4 14:11:41 2017 -0200

efl_mono: fix switched reference to generated and non-generated source file 
in build system
---
 src/Makefile_Efl_Mono.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am
index 3101be5ca8..7b90e1834f 100644
--- a/src/Makefile_Efl_Mono.am
+++ b/src/Makefile_Efl_Mono.am
@@ -173,8 +173,8 @@ efl_ecore_evas_mono_files = \
bindings/mono/ecore_evas_mono/ecore_evas.cs
 
 lib_efl_mono_libefl_mono_dll_SOURCES = \
-   $(builddir)/bindings/mono/efl_mono/efl_all.cs \
-   bindings/mono/efl_mono/efl_libs.cs \
+   bindings/mono/efl_mono/efl_all.cs \
+   $(builddir)/bindings/mono/efl_mono/efl_libs.cs \
$(efl_eo_mono_files) \
$(efl_eina_mono_files) \
$(efl_eldbus_mono_files) \

-- 




[EGIT] [core/efl] master 06/16: efl_mono: Add msbuild file generator

2017-12-04 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit aff896d9eb8dfc40090058ce7711aee0c87640db
Author: Lauro Moura 
Date:   Thu Nov 23 21:56:11 2017 -0300

efl_mono: Add msbuild file generator

Buildsystem integration will come in a future commit.
---
 src/bin/efl_mono_msbuild_gen/.gitignore |   1 +
 src/bin/efl_mono_msbuild_gen/main.cc| 262 
 2 files changed, 263 insertions(+)

diff --git a/src/bin/efl_mono_msbuild_gen/.gitignore 
b/src/bin/efl_mono_msbuild_gen/.gitignore
new file mode 100644
index 00..421f9eb915
--- /dev/null
+++ b/src/bin/efl_mono_msbuild_gen/.gitignore
@@ -0,0 +1 @@
+/efl_mono_msbuild_gen
diff --git a/src/bin/efl_mono_msbuild_gen/main.cc 
b/src/bin/efl_mono_msbuild_gen/main.cc
new file mode 100644
index 00..bf3d4db413
--- /dev/null
+++ b/src/bin/efl_mono_msbuild_gen/main.cc
@@ -0,0 +1,262 @@
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#ifdef HAVE_CONFIG_H
+# include 
+#endif
+
+#include 
+
+
+namespace efl_mono_msbuild_gen {
+
+/// Program options.
+struct options_type
+{
+   std::string out_file;
+   std::string out_assembly;
+   std::string target_type;
+   std::string platform;
+   std::vector cs_files;
+   std::vector defines;
+   std::vector references;
+   std::vector lib_paths;
+};
+
+efl::eina::log_domain domain("efl_mono_msbuild_gen");
+
+namespace {
+
+void
+_print_version()
+{
+   std::cerr
+ << "EFL Mono MSBuild Generator (EFL "
+ << PACKAGE_VERSION << ")" << std::endl;
+}
+
+static void
+_usage(const char *progname)
+{
+   std::cerr
+ << progname
+ << " [options] [files]" << std::endl
+ << "Options:" << std::endl
+ << "  -o, --out-fileThe output file name. [default: 
.eo.hh]" << std::endl
+ << "  -v, --version   Print the version." << std::endl
+ << "  -h, --help  Print this help." << std::endl;
+   exit(EXIT_FAILURE);
+}
+
+static void
+_assert_not_dup(std::string option, std::string value)
+{
+   if (value != "")
+ {
+EINA_CXX_DOM_LOG_ERR(efl_mono_msbuild_gen::domain) <<
+  "Option -" + option + " already set (" + value + ")";
+ }
+}
+
+static bool
+opts_check(efl_mono_msbuild_gen::options_type const& opts)
+{
+   if (opts.out_file.empty())
+ {
+EINA_CXX_DOM_LOG_ERR(efl_mono_msbuild_gen::domain)
+  << "Nowhere to generate?" << std::endl;
+ }
+   else
+ return true; // valid.
+   return false;
+}
+
+static efl_mono_msbuild_gen::options_type
+opts_get(int argc, char **argv)
+{
+   efl_mono_msbuild_gen::options_type opts;
+
+   const struct option long_options[] =
+ {
+   { "out-file",  required_argument, 0,  'o' },
+   { "assembly",  required_argument, 0,  'a' },
+   { "target-type", required_argument, 0,  't' },
+   { "platform",  required_argument, 0,  'p' },
+   { "define",required_argument, 0,  'd' },
+   { "reference", required_argument, 0,  'r' },
+   { "lib-path",  required_argument, 0,  'l' },
+   { "version",   no_argument,   0,  'v' },
+   { "help",  no_argument,   0,  'h' },
+   { 0,   0, 0,   0  }
+ };
+   const char* options = "o:a:t:p:d:r:l:vh";
+
+   int c, idx;
+   while ( (c = getopt_long(argc, argv, options, long_options, )) != -1)
+ {
+if (c == 'o')
+  {
+ _assert_not_dup("o", opts.out_file);
+ opts.out_file = optarg;
+  }
+else if (c == 'a')
+  {
+ _assert_not_dup("a", opts.out_assembly);
+ opts.out_assembly = optarg;
+  }
+else if (c == 't')
+  {
+ _assert_not_dup("t", opts.target_type);
+ opts.target_type = optarg;
+  }
+else if (c == 'p')
+  {
+ _assert_not_dup("p", opts.platform);
+ opts.platform = optarg;
+  }
+else if (c == 'd')
+  {
+ opts.defines.push_back(optarg);
+  }
+else if (c == 'r')
+  {
+ opts.references.push_back(optarg);
+  }
+else if (c == 'l')
+  {
+ opts.lib_paths.push_back(optarg);
+  }
+else if (c == 'h')
+  {
+ _usage(argv[0]);
+  }
+else if (c == 'v')
+  {
+ _print_version();
+ if (argc == 2) exit(EXIT_SUCCESS);
+  }
+ }
+
+   for (int i = optind; i < argc; ++i)
+ {
+opts.cs_files.push_back(argv[i]);
+ }
+
+   if (!efl_mono_msbuild_gen::opts_check(opts))
+ {
+_usage(argv[0]);
+assert(false && "Wrong options passed in command-line");
+ }
+
+   return opts;
+}
+
+static void
+run(options_type const& opts)
+{
+   std::ofstream os 

[EGIT] [core/efl] master 14/16: eolian_mono: Add evas_table_mirrored_get/set to bl

2017-12-04 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit 80bbc4b1f991276377b52552360278db66581b05
Author: Lauro Moura 
Date:   Mon Dec 4 15:48:04 2017 -0300

eolian_mono: Add evas_table_mirrored_get/set to bl

Clashing with efl_ui_mirrored/get/set
---
 src/bin/eolian_mono/eolian/mono/function_blacklist.hh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/eolian_mono/eolian/mono/function_blacklist.hh 
b/src/bin/eolian_mono/eolian/mono/function_blacklist.hh
index 9b08295ca4..51e0a433c1 100644
--- a/src/bin/eolian_mono/eolian/mono/function_blacklist.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_blacklist.hh
@@ -22,6 +22,8 @@ inline bool is_function_blacklisted(std::string const& c_name)
 || c_name == "elm_wdg_item_focus_get"
 || c_name == "elm_wdg_item_focus_set"
 || c_name == "elm_interface_scrollable_mirrored_set"
+|| c_name == "evas_obj_table_mirrored_get"
+|| c_name == "evas_obj_table_mirrored_set"
 || c_name == "edje_obj_load_error_get"
 || c_name == "efl_ui_focus_user_parent_get"
 || c_name == "efl_canvas_object_scale_get" // duplicated signature

-- 




[EGIT] [core/efl] master 07/16: efl_mono: Add native support library

2017-12-04 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit 8b1a72e972a3396c51a16654bc05c3a23ad6afc0
Author: Lauro Moura 
Date:   Thu Nov 23 21:57:45 2017 -0300

efl_mono: Add native support library

Buildsystem integration will come in a future commit
---
 src/lib/efl_mono/.gitignore|   1 +
 src/lib/efl_mono/efl_custom_exports_mono.c | 439 +
 2 files changed, 440 insertions(+)

diff --git a/src/lib/efl_mono/.gitignore b/src/lib/efl_mono/.gitignore
new file mode 100644
index 00..b48bfd5fb8
--- /dev/null
+++ b/src/lib/efl_mono/.gitignore
@@ -0,0 +1 @@
+/libefl_mono.dll
diff --git a/src/lib/efl_mono/efl_custom_exports_mono.c 
b/src/lib/efl_mono/efl_custom_exports_mono.c
new file mode 100644
index 00..16b2977db9
--- /dev/null
+++ b/src/lib/efl_mono/efl_custom_exports_mono.c
@@ -0,0 +1,439 @@
+#include "Eo.h"
+#include "Eina.h"
+
+#include 
+#include 
+
+#ifdef EAPI
+# undef EAPI
+#endif
+
+#ifdef _WIN32
+#  define EAPI __declspec(dllexport)
+#else
+# ifdef __GNUC__
+#  if __GNUC__ >= 4
+#   define EAPI __attribute__ ((visibility("default")))
+#  else
+#   define EAPI
+#  endif
+# else
+#  define EAPI
+# endif
+#endif /* ! _WIN32 */
+
+EAPI void *efl_mono_native_alloc(unsigned int size)
+{
+   return malloc(size);
+}
+
+EAPI void efl_mono_native_free(void *ptr)
+{
+   free(ptr);
+}
+
+EAPI void efl_mono_native_free_ref(void **ptr)
+{
+   if (!ptr) return;
+   free(*ptr);
+}
+
+EAPI void *efl_mono_native_alloc_copy(const void *val, unsigned int size)
+{
+if (!val) return NULL;
+void *r = malloc(size);
+memcpy(r, val, size);
+return r;
+}
+
+EAPI const char *efl_mono_native_strdup(const char *str)
+{
+if (!str) return NULL;
+return strdup(str);
+}
+
+EAPI int efl_mono_native_ptr_compare(const void *ptr1, const void *ptr2)
+{
+uintptr_t addr1 = (uintptr_t)ptr1;
+uintptr_t addr2 = (uintptr_t)ptr2;
+return (addr1 > addr2) - (addr1 < addr2);
+}
+
+EAPI Eina_Compare_Cb efl_mono_native_ptr_compare_addr_get()
+{
+return efl_mono_native_ptr_compare;
+}
+
+EAPI Eina_Compare_Cb efl_mono_native_str_compare_addr_get()
+{
+return (Eina_Compare_Cb)strcmp;
+}
+
+EAPI Eina_Free_Cb efl_mono_native_free_addr_get()
+{
+return (Eina_Free_Cb)free;
+}
+
+EAPI Eina_Free_Cb efl_mono_native_efl_unref_addr_get()
+{
+return (Eina_Free_Cb)efl_unref;
+}
+
+// Iterator Wrapper //
+
+typedef struct _Eina_Iterator_Wrapper_Mono
+{
+   Eina_Iterator iterator; // Must be the first
+   Eina_Iterator *internal;
+} Eina_Iterator_Wrapper_Mono;
+
+static void 
*eina_iterator_wrapper_get_container_mono(Eina_Iterator_Wrapper_Mono *it)
+{
+   return eina_iterator_container_get(it->internal);
+}
+
+static void eina_iterator_wrapper_free_mono(Eina_Iterator_Wrapper_Mono *it)
+{
+   eina_iterator_free(it->internal);
+   free(it);
+}
+
+
+static Eina_Iterator *eina_iterator_wrapper_new_mono(Eina_Iterator *internal, 
Eina_Iterator_Next_Callback next_cb)
+{
+   if (!internal) return NULL;
+
+   Eina_Iterator_Wrapper_Mono *it = calloc(1, 
sizeof(Eina_Iterator_Wrapper_Mono));
+   if (!it)
+ {
+eina_iterator_free(internal);
+return NULL;
+ }
+
+   it->internal = internal;
+
+   it->iterator.next = next_cb;
+
+   it->iterator.version = EINA_ITERATOR_VERSION;
+   it->iterator.get_container = 
FUNC_ITERATOR_GET_CONTAINER(eina_iterator_wrapper_get_container_mono);
+   it->iterator.free = FUNC_ITERATOR_FREE(eina_iterator_wrapper_free_mono);
+
+   EINA_MAGIC_SET(>iterator, EINA_MAGIC_ITERATOR);
+
+   return >iterator;
+}
+
+// Array //
+
+EAPI void eina_array_clean_custom_export_mono(Eina_Array *array) 
EINA_ARG_NONNULL(1)
+{
+   eina_array_clean(array);
+}
+
+EAPI Eina_Bool eina_array_push_custom_export_mono(Eina_Array *array, const 
void *data) EINA_ARG_NONNULL(1, 2)
+{
+   return eina_array_push(array, data);
+}
+
+EAPI void *eina_array_pop_custom_export_mono(Eina_Array *array) 
EINA_ARG_NONNULL(1)
+{
+   return eina_array_pop(array);
+}
+
+EAPI void *eina_array_data_get_custom_export_mono(const Eina_Array *array, 
unsigned int idx) EINA_ARG_NONNULL(1)
+{
+   return eina_array_data_get(array, idx);
+}
+
+EAPI void eina_array_data_set_custom_export_mono(const Eina_Array *array, 
unsigned int idx, const void *data) EINA_ARG_NONNULL(1)
+{
+   eina_array_data_set(array, idx, data);
+}
+
+EAPI unsigned int eina_array_count_custom_export_mono(const Eina_Array *array) 
EINA_ARG_NONNULL(1)
+{
+   return eina_array_count(array);
+}
+
+EAPI Eina_Bool eina_array_foreach_custom_export_mono(Eina_Array *array, 
Eina_Each_Cb cb, void *fdata)
+{
+   return eina_array_foreach(array, cb, fdata);
+}
+
+// List //
+
+EAPI Eina_List *eina_list_last_custom_export_mono(const Eina_List *list)
+{
+   return eina_list_last(list);
+}
+
+EAPI Eina_List *eina_list_next_custom_export_mono(const Eina_List *list)
+{
+   

[EGIT] [core/efl] master 13/16: eolian_mono: Generate placeholder fields for empty structs

2017-12-04 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit e19465bc354a8e831581e34a5cefa36950462667
Author: Lauro Moura 
Date:   Fri Dec 1 00:43:12 2017 -0300

eolian_mono: Generate placeholder fields for empty structs

Mono's JIT fails to generate function pointer for delegates with empty
structs in the signature, leading to those mini-amd64.c crashes on empty
fields.

This commit generates a placeholder IntPtr field in empty structs.
---
 src/bin/eolian_mono/eolian/mono/struct_definition.hh | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh 
b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index 1b5e27c8a9..ee05852904 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -50,7 +50,7 @@ struct struct_definition_generator
 .generate(sink, struct_.cxx_name, context))
return false;
 
- // iterate enum fiels
+ // iterate struct fields
  for(auto first = std::begin(struct_.fields)
  , last = std::end(struct_.fields); first != last; ++first)
{
@@ -65,6 +65,16 @@ struct struct_definition_generator
 return false;
}
 
+ // Check whether this is an extern struct without declared fields in .eo 
file and generate a
+ // placeholder field if positive.
+ // Mono's JIT is picky when generating function pointer for delegates 
with empty structs, leading to
+ // those 'mini-amd64.c condition fields not met' crashes.
+ if (struct_.fields.size() == 0)
+   {
+   if (!as_generator("public IntPtr field;\n").generate(sink, nullptr, 
context))
+ return false;
+   }
+
  if(!as_generator("}\n").generate(sink, attributes::unused, context)) 
return false;
 
  auto close_namespace = *(lit("} ")) << "\n";

-- 




[EGIT] [core/efl] master 01/16: eolian: Add inarray and inlist

2017-12-04 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit 0931696a4f8584620e19ca8599feb5b7a4e9110c
Author: Lauro Moura 
Date:   Thu Nov 23 21:46:55 2017 -0300

eolian: Add inarray and inlist
---
 src/lib/eolian/Eolian.h| 2 ++
 src/lib/eolian/database_validate.c | 5 +++--
 src/lib/eolian/eo_lexer.c  | 2 +-
 src/lib/eolian/eo_lexer.h  | 2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 0bd3646f31..6774d6b6b4 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -281,6 +281,8 @@ typedef enum
EOLIAN_TYPE_BUILTIN_ITERATOR,
EOLIAN_TYPE_BUILTIN_HASH,
EOLIAN_TYPE_BUILTIN_LIST,
+   EOLIAN_TYPE_BUILTIN_INARRAY,
+   EOLIAN_TYPE_BUILTIN_INLIST,
 
EOLIAN_TYPE_BUILTIN_FUTURE,
 
diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index da83072d50..7559303e24 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -149,8 +149,9 @@ _validate_typedecl(Eolian_Typedecl *tp)
 
 static const char * const eo_complex_frees[] =
 {
-   "eina_accessor_free", "eina_array_free", "eina_iterator_free",
-   "eina_hash_free", "eina_list_free",
+   "eina_accessor_free", "eina_array_free",
+   "eina_iterator_free", "eina_hash_free",
+   "eina_list_free", "eina_inarray_free", "eina_inlist_free",
 
"efl_del" /* future */
 };
diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index d3f3f09b03..affe61efa7 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -73,7 +73,7 @@ static const char * const ctypes[] =
"void",
 
"Eina_Accessor *", "Eina_Array *", "Eina_Iterator *", "Eina_Hash *",
-   "Eina_List *",
+   "Eina_List *", "Eina_Inarray *", "Eina_Inlist *",
"Efl_Future *",
"Eina_Value", "Eina_Value *",
"char *", "const char *", "Eina_Stringshare *",
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 18d6f7e2f0..0cf76ce489 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -51,7 +51,7 @@ enum Tokens
 \
 KW(void), \
 \
-KW(accessor), KW(array), KW(iterator), KW(hash), KW(list), \
+KW(accessor), KW(array), KW(iterator), KW(hash), KW(list), KW(inarray), 
KW(inlist), \
 KW(future),   \
 KW(any_value), KW(any_value_ptr), \
 KW(mstring), KW(string), KW(stringshare), \

-- 




[EGIT] [core/efl] master 09/16: efl_mono: Add buildystem integration.

2017-12-04 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit b97d3438ebecf57019ee2b593e8c72601b3bf34b
Author: Lauro Moura 
Date:   Thu Nov 23 22:10:05 2017 -0300

efl_mono: Add buildystem integration.

The C# bindings are built using the --enable-csharp-bindings (disabled
by default).
---
 .gitignore  |   2 +
 Makefile.am |  14 ++
 configure.ac| 130 ++
 m4/efl_mono.m4  |  95 
 pc/.gitignore   |   1 +
 pc/efl-mono.pc.in   |  15 ++
 src/Makefile.am |   5 +
 src/Makefile_Efl_Mono.am| 365 
 src/Makefile_Efl_Mono_MSBuild_Gen_Helper.am |  17 ++
 src/Makefile_Eolian_Mono_Helper.am  |  17 ++
 src/examples/eina/Makefile.am   |  56 +
 src/examples/elementary/Makefile.am |  24 ++
 src/examples/evas/Makefile.am   |  55 +
 13 files changed, 796 insertions(+)

diff --git a/.gitignore b/.gitignore
index c10b14de45..b0fe06ce2a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,6 +37,8 @@ tags
 *.eo.hh
 *.eo.impl.hh
 *.eo.js.cc
+*.eo.cs
+*.eot.cs
 *.eo.lua
 *.luac
 .dir-locals.el
diff --git a/Makefile.am b/Makefile.am
index 8fb921c734..8fd7776ff6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -188,6 +188,11 @@ pc/eo-js.pc \
 pc/eina-js.pc
 endif
 
+if HAVE_CSHARP
+pkgconfig_DATA += \
+pc/efl-mono.pc
+endif
+
 if BUILD_ENGINE_SOFTWARE_X11
 pkgconfig_DATA += pc/evas-software-x11.pc
 endif
@@ -434,6 +439,15 @@ EXTRA_DIST += $(systemdunits_DATA)
 
 .PHONY: doc benchmark examples install-examples
 
+# MSBuild C Sharp projects generation:
+
+if HAVE_CSHARP
+
+msbuildcsprojs:
+   @$(MAKE) $(AM_MAKEFLAGS) -C src msbuildcsprojs
+
+endif
+
 # Documentation
 
 doc:
diff --git a/configure.ac b/configure.ac
index 003190ba26..69ea681848 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,6 +163,7 @@ EFL_WITH_BIN([eet], [eet-eet])
 EFL_WITH_BIN([edje], [edje-cc])
 EFL_WITH_BIN([eolian], [eolian-gen])
 EFL_WITH_BIN([eolian_cxx], [eolian-cxx])
+EFL_WITH_BIN([eolian_mono], [eolian-mono])
 EFL_WITH_BIN([eolian-js], [eolian-js])
 EFL_WITH_BIN_SUFFIX([elua], [elua], [_bin])
 EFL_WITH_BIN([eldbus], [eldbus_codegen])
@@ -329,6 +330,7 @@ AC_LANG(C)
 AC_PROG_CC_C99
 AM_PROG_CC_C_O
 AC_PROG_SED
+AC_PROG_MCS
 
 AM_CONDITIONAL([BUILD_EFL_NATIVE], [test "x${cross_compiling}" = "xno"])
 
@@ -1329,6 +1331,129 @@ EFL_EVAL_PKGS([EO_JS])
 EFL_LIB_END_OPTIONAL([Eo_Js])
  End of Eo JS
 
+ Efl C Sharp Bindings
+
+want_csharp="no"
+AC_ARG_ENABLE([csharp-bindings],
+  [AS_HELP_STRING([--enable-csharp-bindings],[enable C Sharp bindings. 
@<:@default=disabled@:>@])],
+  [
+if test "x${enableval}" = "xyes" ; then
+  want_csharp="yes"
+else
+  want_csharp="no"
+fi
+  ],
+  [want_csharp="no"])
+
+if test "x${want_csharp}" = "xyes" -a "x${HAVE_MCS}" != "x1"; then
+  want_csharp="no"
+  AC_MSG_ERROR([C Sharp bindings requested but C Sharp compiler could not be 
found])
+fi
+
+AM_CONDITIONAL([HAVE_CSHARP], [test "x${want_csharp}" = "xyes"])
+AC_DEFINE_IF([HAVE_CSHARP], [test "x${want_csharp}" = "xyes"],
+  [1], [Compiling bindings for C Sharp])
+AC_SUBST([want_csharp])
+
+# Efl Mono
+EFL_LIB_START_OPTIONAL([Efl_Mono], [test "x${want_csharp}" = "xyes"])
+
+EFL_PLATFORM_DEPEND([EFL_MONO], [evil])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Eina])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Eo])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Ecore])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Eet])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Ecore_Evas])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Ecore_Con])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Ecore_Audio])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Efl])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Evas])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Edje])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Emotion])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Eldbus])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Emile])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Ethumb])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Ethumb_Client])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Eio])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Elementary])
+EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Efl_Custom_Exports_Mono])
+
+EFL_EVAL_PKGS([EFL_MONO])
+
+EFL_LIB_END_OPTIONAL([Efl_Mono])
+
+# Efl Custom Exports Mono
+EFL_LIB_START_OPTIONAL([Efl_Custom_Exports_Mono], [test "x${want_csharp}" = 
"xyes"])
+
+EFL_PLATFORM_DEPEND([EFL_CUSTOM_EXPORTS_MONO], [evil])
+EFL_INTERNAL_DEPEND_PKG([EFL_CUSTOM_EXPORTS_MONO], [Eina])
+EFL_INTERNAL_DEPEND_PKG([EFL_CUSTOM_EXPORTS_MONO], [Eo])
+EFL_INTERNAL_DEPEND_PKG([EFL_CUSTOM_EXPORTS_MONO], [Efl])
+EFL_INTERNAL_DEPEND_PKG([EFL_CUSTOM_EXPORTS_MONO], [Eldbus])
+
+EFL_EVAL_PKGS([EFL_CUSTOM_EXPORTS_MONO])
+

[EGIT] [core/efl] master 10/16: elm: Move legacy enums to elm_general.eot.

2017-12-04 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit 09221f8516628291be7d586c96194c2cbee316e8
Author: Lauro Moura 
Date:   Wed Nov 22 16:44:44 2017 -0300

elm: Move legacy enums to elm_general.eot.

efl_ui_text and friends uses some enums currently defined in
elm_entry.eo. The latter is exported outside the elm public eolian eos
and never generated.

This commit moves the enums to the "transition" file elm_general.eot.
---
 src/lib/elementary/elm_entry.eo| 112 
 src/lib/elementary/elm_general.eot | 114 +
 2 files changed, 114 insertions(+), 112 deletions(-)

diff --git a/src/lib/elementary/elm_entry.eo b/src/lib/elementary/elm_entry.eo
index 9bb1d6d3db..a2d9b2db92 100644
--- a/src/lib/elementary/elm_entry.eo
+++ b/src/lib/elementary/elm_entry.eo
@@ -3,118 +3,6 @@ import elm_general;
 type Elm_Entry_Item_Provider_Cb: __undefined_type; [[Elementary entry item 
provider callback type]]
 type Elm_Entry_Filter_Cb: __undefined_type; [[Elementary entry filter callback 
type]]
 
-enum Elm.Text_Format
-{
-   [[Text Format types.
-
- See also @Elm.Entry.file_text_format.
-   ]]
-   plain_utf8, [[ Plain UTF8 type ]]
-   markup_utf8 [[ Markup UTF8 type ]]
-}
-
-enum Elm.Input.Panel.Layout
-{
-   [[Input panel (virtual keyboard) layout types.
- Type of input panel (virtual keyboard) to use - this is a hint and may 
not provide exactly what is desired.
- See also @Elm.Entry.input_panel_layout.set.
-   ]]
-   normal,  [[Default layout.]]
-   number,  [[Number layout.]]
-   email,   [[Email layout.]]
-   url, [[URL layout.]]
-   phonenumber, [[Phone Number layout.]]
-   ip,  [[IP layout.]]
-   month,   [[Month layout.]]
-   numberonly,  [[Number Only layout.]]
-   invalid, [[Never use this.]]
-   hex, [[Hexadecimal layout.]]
-   terminal,[[Command-line terminal layout including esc, alt, ctrl key, 
so on (no auto-correct, no auto-capitalization).]]
-   password,[[Like normal, but no auto-correct, no auto-capitalization 
etc.]]
-   datetime,[[Date and time layout
-
-  @since 1.8]]
-   emoticon,[[Emoticon layout
-
-  @since 1.10]]
-   voice[[Voice layout, but if the IME does not support voice layout, 
then normal layout will be shown.
-
-  @since 1.19]]
-}
-
-enum Elm.Input.Panel.Lang
-{
-   [[Input panel (virtual keyboard) language modes.
-
-  See also @Elm.Entry.input_panel_language.set.
-   ]]
-   automatic,[[Automatic]]
-   alphabet  [[Alphabet]]
-}
-
-enum Elm.Autocapital.Type
-{
-   [[Autocapitalization Types.
- Choose method of auto-capitalization.
-
- See also @Elm.Entry.autocapital_type.set.
-   ]]
-   none, [[No auto-capitalization when typing.]]
-   word, [[Autocapitalize each word typed.]]
-   sentence, [[Autocapitalize the start of each sentence.]]
-   allcharacter  [[Autocapitalize all letters.]]
-}
-
-enum Elm.Input.Panel.Return_Key.Type
-{
-   [["Return" Key types on the input panel (virtual keyboard).
- See also @Elm.Entry.input_panel_return_key_type.set.
-
-   ]]
-   default, [[Default.]]
-   done,[[Done.]]
-   go,  [[Go.]]
-   join,[[Join.]]
-   login,   [[Login.]]
-   next,[[Next.]]
-   search,  [[Search string or magnifier icon.]]
-   send,[[Send.]]
-   signin   [[Sign-in
-
-  @since 1.8]]
-}
-
-enum Elm.Input.Hints
-{
-   [[Enumeration that defines the types of Input Hints.
-
- @since 1.12
-   ]]
-   legacy: elm_input_hint;
-   none= 0,[[No active hints
-
- @since 1.12]]
-   auto_complete   = 1 << 0,   [[Suggest word auto completion
-
- @since 1.12]]
-   sensitive_data  = 1 << 1,   [[Typed text should not be stored.
-
- @since 1.12]]
-}
-
-enum Elm.Cnp_Mode
-{
-   [[
- Enum of entry's copy & paste policy.
-
- See also @Elm.Entry.cnp_mode.set,
- @Elm.Entry.cnp_mode.get.
-   ]]
-   markup,[[ copy & paste text with markup tag ]]
-   no_image,  [[ copy & paste text without item(image) tag ]]
-   plaintext, [[ copy & paste text without markup tag ]]
-}
-
 class Elm.Entry (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
  Efl.Access.Text, Efl.Access.Editable.Text, Efl.File,
  Efl.Ui.Selectable, Efl.Ui.Scrollable, 
Efl.Access.Widget.Action)
diff --git a/src/lib/elementary/elm_general.eot 
b/src/lib/elementary/elm_general.eot
index 73d057c3d6..1a0dfadf68 100644
--- a/src/lib/elementary/elm_general.eot
+++ b/src/lib/elementary/elm_general.eot
@@ -139,3 +139,117 @@ enum Elm.Icon.Type
 /* FIXME: shouldn't exist */
 struct @extern Elm_Gen_Item;
 struct @extern 

[EGIT] [core/efl] master 16/16: eolian: Add inarray and inlist to source generation

2017-12-04 Thread Felipe Magno de Almeida
felipealmeida pushed a commit to branch master.

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

commit 66eb8ddfebf65f944a44f8b8871a8628757fe74e
Author: Felipe Magno de Almeida 
Date:   Mon Dec 4 20:32:06 2017 -0200

eolian: Add inarray and inlist to source generation
---
 src/bin/eolian/sources.c   | 28 ++--
 src/tests/efl_mono/test_testing.eo |  4 ++--
 2 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 2ba900c9bd..a8a349fa86 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -189,14 +189,20 @@ _generate_iterative_free(Eina_Strbuf **buf, const 
Eolian_Type *type, const Eolia
iterator_header = eina_strbuf_new();
iter_param = eina_strbuf_new();
 
+   Eolian_Type_Builtin_Type t = eolian_type_builtin_type_get(type);
+
eina_strbuf_append_printf(iter_param, "%s_iter", 
eolian_parameter_name_get(parameter));
 
//generate the field definition
eina_strbuf_append_printf(*buf, "   %s", eolian_type_c_type_get(inner_type, 
EOLIAN_C_TYPE_DEFAULT));
+   if(t == EOLIAN_TYPE_BUILTIN_INARRAY
+  || t == EOLIAN_TYPE_BUILTIN_INLIST)
+ {
+   eina_strbuf_append(*buf, "*");
+ }
eina_strbuf_append_buffer(*buf, iter_param);
eina_strbuf_append(*buf, ";\n");
 
-   Eolian_Type_Builtin_Type t = eolian_type_builtin_type_get(type);
 
if (t == EOLIAN_TYPE_BUILTIN_LIST)
  {
@@ -207,6 +213,24 @@ _generate_iterative_free(Eina_Strbuf **buf, const 
Eolian_Type *type, const Eolia
 eina_strbuf_append(*buf, ")\n");
 _generate_loop_content(buf, inner_type, iter_param);
  }
+   else if (t == EOLIAN_TYPE_BUILTIN_INARRAY)
+ {
+eina_strbuf_append_printf(*buf, "   EINA_INARRAY_FOREACH(");
+eina_strbuf_append_buffer(*buf, param);
+eina_strbuf_append_char(*buf, ',');
+eina_strbuf_append_buffer(*buf, iter_param);
+eina_strbuf_append(*buf, ")\n");
+_generate_loop_content(buf, inner_type, iter_param);
+ }
+   else if (t == EOLIAN_TYPE_BUILTIN_INLIST)
+ {
+eina_strbuf_append_printf(*buf, "   EINA_INLIST_FREE(");
+eina_strbuf_append_buffer(*buf, param);
+eina_strbuf_append_char(*buf, ',');
+eina_strbuf_append_buffer(*buf, iter_param);
+eina_strbuf_append(*buf, ")\n");
+_generate_loop_content(buf, inner_type, iter_param);
+ }
else if (t == EOLIAN_TYPE_BUILTIN_ITERATOR)
  {
 eina_strbuf_append_printf(*buf, "   EINA_ITERATOR_FOREACH(");
@@ -237,7 +261,7 @@ _generate_iterative_free(Eina_Strbuf **buf, const 
Eolian_Type *type, const Eolia
  }
else
  {
-printf("Error, container unknown?!\n");
+printf("Error, container unknown?! %d\n", (int)t);
  }
 
eina_strbuf_free(iterator_header);
diff --git a/src/tests/efl_mono/test_testing.eo 
b/src/tests/efl_mono/test_testing.eo
index db6f13bcf2..bf13a57283 100644
--- a/src/tests/efl_mono/test_testing.eo
+++ b/src/tests/efl_mono/test_testing.eo
@@ -370,7 +370,7 @@ class Test.Testing (Efl.Object) {
   /* Integer */
   eina_inarray_int_in {
  params {
-@in arr: inarray;
+@in arr: inarray;
  }
  return: bool;
   }
@@ -387,7 +387,7 @@ class Test.Testing (Efl.Object) {
 
   eina_inarray_int_out {
  params {
-@out arr: inarray;
+@out arr: inarray;
  }
  return: bool;
   }

-- 




[EGIT] [core/efl] master 11/16: ecore: Fix compilation for GCC 4

2017-12-04 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit c316a2ef372e53b0c9374b5ddca0f8c33f05d9e2
Author: Lauro Moura 
Date:   Tue Nov 7 17:01:56 2017 -0300

ecore: Fix compilation for GCC 4

Summary:
GCC4 support compound literals for static initializers only in C89. This
commit reverts to the previous behavior when using this version.

Currently we are using it to build on Windows.

Reviewers: felipealmeida, cedric, barbieri

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5518
---
 src/lib/ecore/ecore_main.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index e0099f0033..a854397dab 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -285,7 +285,12 @@ int in_main_loop = 0;
 
 static Eina_List *_pending_futures = NULL;
 static Eina_List *_pending_promises = NULL;
+#if (defined __GNUC__) && (__GNUC__ <= 4)
+// GCC 4 does not support compound literal for statics initializers in C99
+static Eina_Value _ecore_exit_code = {0};
+# else
 static Eina_Value _ecore_exit_code = EINA_VALUE_EMPTY;
+#endif
 static int do_quit = 0;
 static Ecore_Fd_Handler *fd_handlers = NULL;
 static Ecore_Fd_Handler *fd_handler_current = NULL;

-- 




[EGIT] [core/enlightenment] master 01/01: Lunchers: If hide tooltips is set, don't even show them on delay.

2017-12-04 Thread Stephen Houston
okra pushed a commit to branch master.

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

commit 2b165e75e378ae151244bcbfa2daaa768bf0dbbb
Author: Stephen Houston 
Date:   Mon Dec 4 14:44:52 2017 -0600

Lunchers: If hide tooltips is set, don't even show them on delay.
---
 src/modules/luncher/bar.c  | 32 +---
 src/modules/luncher/grid.c |  9 ++---
 2 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c
index 701e412af..e75bdabc3 100644
--- a/src/modules/luncher/bar.c
+++ b/src/modules/luncher/bar.c
@@ -1117,21 +1117,23 @@ _bar_icon_add(Instance *inst, Efreet_Desktop *desktop, 
E_Client *non_desktop_cli
 
_bar_icon_file_set(ic, desktop, non_desktop_client);
 
-   if (desktop)
- elm_object_tooltip_text_set(ic->o_icon, desktop->name);
-   else if (non_desktop_client && non_desktop_client->icccm.class)
- elm_object_tooltip_text_set(ic->o_icon, non_desktop_client->icccm.class);
-   else if (non_desktop_client && non_desktop_client->icccm.name)
- elm_object_tooltip_text_set(ic->o_icon, non_desktop_client->icccm.name);
-   else if (non_desktop_client && non_desktop_client->icccm.title)
- elm_object_tooltip_text_set(ic->o_icon, non_desktop_client->icccm.title);
-   else if (non_desktop_client && non_desktop_client->netwm.name)
- elm_object_tooltip_text_set(ic->o_icon, non_desktop_client->netwm.name);
-   else
- elm_object_tooltip_text_set(ic->o_icon, _("Unknown"));
-
-   elm_object_tooltip_orient_set(ic->o_icon, ELM_TOOLTIP_ORIENT_CENTER);
-   elm_object_tooltip_style_set(ic->o_icon, "luncher");
+   if (!inst->cfg->hide_tooltips)
+ {
+if (desktop)
+  elm_object_tooltip_text_set(ic->o_icon, desktop->name);
+else if (non_desktop_client && non_desktop_client->icccm.class)
+  elm_object_tooltip_text_set(ic->o_icon, 
non_desktop_client->icccm.class);
+else if (non_desktop_client && non_desktop_client->icccm.name)
+  elm_object_tooltip_text_set(ic->o_icon, 
non_desktop_client->icccm.name);
+else if (non_desktop_client && non_desktop_client->icccm.title)
+  elm_object_tooltip_text_set(ic->o_icon, 
non_desktop_client->icccm.title);
+else if (non_desktop_client && non_desktop_client->netwm.name)
+  elm_object_tooltip_text_set(ic->o_icon, 
non_desktop_client->netwm.name);
+else
+  elm_object_tooltip_text_set(ic->o_icon, _("Unknown"));
+elm_object_tooltip_orient_set(ic->o_icon, ELM_TOOLTIP_ORIENT_CENTER);
+elm_object_tooltip_style_set(ic->o_icon, "luncher");
+ }
evas_object_size_hint_aspect_set(ic->o_icon, EVAS_ASPECT_CONTROL_BOTH, 1, 
1);
elm_layout_content_set(ic->o_layout, "e.swallow.icon", ic->o_icon);
evas_object_event_callback_add(ic->o_icon, EVAS_CALLBACK_MOUSE_UP,
diff --git a/src/modules/luncher/grid.c b/src/modules/luncher/grid.c
index f582e2858..a2f2269ab 100644
--- a/src/modules/luncher/grid.c
+++ b/src/modules/luncher/grid.c
@@ -343,9 +343,12 @@ _grid_icon_add(Instance *inst, Efreet_Desktop *desktop)
 
_grid_icon_file_set(ic, desktop);
 
-   elm_object_tooltip_text_set(ic->o_icon, desktop->name);
-   elm_object_tooltip_orient_set(ic->o_icon, ELM_TOOLTIP_ORIENT_CENTER);
-   elm_object_tooltip_style_set(ic->o_icon, "luncher");
+   if (!inst->cfg->hide_tooltips)
+ {
+elm_object_tooltip_text_set(ic->o_icon, desktop->name);
+elm_object_tooltip_orient_set(ic->o_icon, ELM_TOOLTIP_ORIENT_CENTER);
+elm_object_tooltip_style_set(ic->o_icon, "luncher");
+ }
evas_object_size_hint_aspect_set(ic->o_icon, EVAS_ASPECT_CONTROL_BOTH, 1, 
1);
elm_layout_content_set(ic->o_layout, "e.swallow.icon", ic->o_icon);
evas_object_event_callback_add(ic->o_icon, EVAS_CALLBACK_MOUSE_UP,

-- 




[EGIT] [enlightenment/gadgets/wireless] master 01/01: Don't use window mode tooltips until sandbox can handle them. Causes crash.

2017-12-04 Thread Stephen Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/gadgets/wireless.git/commit/?id=8a4802a1f9e411b52df62b870d5b77a6487b9d1b

commit 8a4802a1f9e411b52df62b870d5b77a6487b9d1b
Author: Stephen Houston 
Date:   Mon Dec 4 11:26:14 2017 -0600

Don't use window mode tooltips until sandbox can handle them. Causes crash.
---
 src/wireless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wireless.c b/src/wireless.c
index 3ed18c1..0e4cee8 100644
--- a/src/wireless.c
+++ b/src/wireless.c
@@ -1366,7 +1366,7 @@ _wireless_gadget_icon_add(int type)
 elm_layout_file_set(g, elm_theme_group_path_find(NULL, 
wireless_theme_groups[type]),
 wireless_theme_groups[type]);
 elm_object_tooltip_content_cb_set(g, _wireless_tooltip, inst, NULL);
-elm_object_tooltip_window_mode_set(g, EINA_TRUE);
+//elm_object_tooltip_window_mode_set(g, EINA_TRUE);
 evas_object_event_callback_add(g, EVAS_CALLBACK_MOUSE_DOWN, 
_wireless_gadget_mouse_down, inst);
  }
DBG("Updating icon for %d", type);

-- 




[EGIT] [core/enlightenment] master 01/01: Luncher: Add config options to not show tooltips on mouse in

2017-12-04 Thread Stephen Houston
okra pushed a commit to branch master.

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

commit b19cceb224a81a471faa1a3712e919550cc46a53
Author: Stephen Houston 
Date:   Mon Dec 4 10:35:24 2017 -0600

Luncher: Add config options to not show tooltips on mouse in
---
 src/modules/luncher/bar.c |  6 --
 src/modules/luncher/config.c  | 36 +++-
 src/modules/luncher/grid.c|  6 --
 src/modules/luncher/luncher.h |  1 +
 src/modules/luncher/mod.c |  2 ++
 5 files changed, 46 insertions(+), 5 deletions(-)

diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c
index 68b2057a2..701e412af 100644
--- a/src/modules/luncher/bar.c
+++ b/src/modules/luncher/bar.c
@@ -466,7 +466,8 @@ _bar_icon_mouse_out(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj, void *eve
elm_layout_signal_emit(ic->o_layout, "e,state,default", "e");
elm_layout_signal_emit(ic->o_layout, "e,state,unfocused", "e");
ic->active = EINA_FALSE;
-   elm_object_tooltip_hide(obj);
+   if (!ic->inst->cfg->hide_tooltips)
+ elm_object_tooltip_hide(obj);
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_loop_add(0.25, _bar_icon_preview_hide, 
ic);
@@ -920,7 +921,8 @@ _bar_icon_mouse_in(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj, void *even
 
if (!ic->active)
  {
-elm_object_tooltip_show(obj);
+if (!ic->inst->cfg->hide_tooltips)
+  elm_object_tooltip_show(obj);
 ic->active = EINA_TRUE;
 elm_layout_signal_emit(ic->o_layout, "e,state,focused", "e");
  }
diff --git a/src/modules/luncher/config.c b/src/modules/luncher/config.c
index c4043c0a4..71023f41d 100644
--- a/src/modules/luncher/config.c
+++ b/src/modules/luncher/config.c
@@ -50,6 +50,17 @@ _type_changed(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
 }
 
 static void
+_check_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
+{
+   Instance *inst = data;
+
+   inst->cfg->hide_tooltips = elm_check_state_get(obj);
+
+   e_config_save_queue();
+   bar_config_updated(inst);
+}
+
+static void
 _config_source_changed(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
Instance *inst = data;
@@ -277,7 +288,7 @@ config_luncher(E_Zone *zone, Instance *inst, Eina_Bool bar)
 {
Evas_Object *popup, *tb, *lbl, *fr, *box, *list, *mlist;
Evas_Object *butbox, *sep, *hbox, *img, *but, *o, *group;
-   Evas_Object *slider;
+   Evas_Object *slider, *check;
Elm_Object_Item *it;
 
luncher_config->bar = bar;
@@ -388,6 +399,29 @@ config_luncher(E_Zone *zone, Instance *inst, Eina_Bool bar)
evas_object_show(o);
 
lbl = elm_label_add(box);
+   elm_object_text_set(lbl, _("Tooltips:"));
+   E_ALIGN(lbl, 0.5, 0.5);
+   E_WEIGHT(lbl, EVAS_HINT_EXPAND, 0);
+   elm_box_pack_end(box, lbl);
+   evas_object_show(lbl);
+
+   check = elm_check_add(box);
+   elm_object_text_set(check, _("Hide tooltips"));
+   elm_check_state_set(check, inst->cfg->hide_tooltips);
+   E_ALIGN(check, 0.0, 0.0);
+   E_WEIGHT(check, EVAS_HINT_EXPAND, 0);
+   evas_object_smart_callback_add(check, "changed", _check_changed, inst);
+   elm_box_pack_end(box, check);
+   evas_object_show(check);
+
+   o = elm_separator_add(box);
+   elm_separator_horizontal_set(o, EINA_TRUE);
+   E_EXPAND(o);
+   E_FILL(o);
+   elm_box_pack_end(box, o);
+   evas_object_show(o);
+
+   lbl = elm_label_add(box);
elm_object_text_set(lbl, _("Preview Size:"));
E_ALIGN(lbl, 0.5, 0.5);
E_WEIGHT(lbl, EVAS_HINT_EXPAND, 0);
diff --git a/src/modules/luncher/grid.c b/src/modules/luncher/grid.c
index d3e26a82c..f582e2858 100644
--- a/src/modules/luncher/grid.c
+++ b/src/modules/luncher/grid.c
@@ -216,7 +216,8 @@ _grid_icon_mouse_in(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj, void *eve
if (_grid_check_modifiers(ev->modifiers)) return;
 
evas_object_raise(ic->o_layout);
-   elm_object_tooltip_show(obj);
+   if (!ic->inst->cfg->hide_tooltips)
+ elm_object_tooltip_show(obj);
ic->active = EINA_TRUE;
elm_layout_signal_emit(ic->o_layout, "e,state,focused", "e");
 }
@@ -226,7 +227,8 @@ _grid_icon_mouse_out(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj, void *ev
 {
Icon *ic = data;
 
-   elm_object_tooltip_hide(obj);
+   if (!ic->inst->cfg->hide_tooltips)
+ elm_object_tooltip_hide(obj);
elm_layout_signal_emit(ic->o_layout, "e,state,unfocused", "e");
 }
 
diff --git a/src/modules/luncher/luncher.h b/src/modules/luncher/luncher.h
index ac2935bb8..ef9855073 100644
--- a/src/modules/luncher/luncher.h
+++ b/src/modules/luncher/luncher.h
@@ -40,6 +40,7 @@ struct _Config_Item
int   id;
int   version;
int   preview_size;
+   int   hide_tooltips;
Eina_Stringshare *dir;
Luncher_Type  type;
 };

[EGIT] [enlightenment/gadgets/wireless] master 01/01: Handle the case where wireless is run as an app.

2017-12-04 Thread Stephen Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/gadgets/wireless.git/commit/?id=12b72d465b11d2b642bcbb54286b2be6977857c8

commit 12b72d465b11d2b642bcbb54286b2be6977857c8
Author: Stephen Houston 
Date:   Mon Dec 4 09:58:09 2017 -0600

Handle the case where wireless is run as an app.
---
 src/wireless.c | 43 ++-
 1 file changed, 34 insertions(+), 9 deletions(-)

diff --git a/src/wireless.c b/src/wireless.c
index c5337df..3ed18c1 100644
--- a/src/wireless.c
+++ b/src/wireless.c
@@ -40,6 +40,7 @@ typedef struct Instance
Evas_Object *box;
Evas_Object *icon[WIRELESS_SERVICE_TYPE_LAST];
Eina_Bool popup;
+   Eina_Bool gadget;
Wireless_Connection_Type connection;
 
struct
@@ -1053,8 +1054,10 @@ _wireless_gadget_edit(int type)
_wireless_gadget_edit_array_entry(wc->proxy_excludes, 
_popup.proxy_excludes);
 
wireless_popup.popup = popup = elm_win_add(inst->win, "win", ELM_WIN_BASIC);
-   elm_win_alpha_set(popup, 1);
-
+   if (inst->gadget)
+ elm_win_alpha_set(popup, 1);
+   else
+ elm_win_autodel_set(popup, 1);
box = elm_box_add(popup);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -1211,7 +1214,10 @@ _wireless_gadget_mouse_down(void *data EINA_UNUSED, Evas 
*e EINA_UNUSED, Evas_Ob
wireless_popup.items = eina_hash_pointer_new(NULL);
 
ctx = elm_win_add(inst->win, "win", ELM_WIN_POPUP_MENU);
-   elm_win_alpha_set(ctx, 1);
+   if (inst->gadget)
+ elm_win_alpha_set(ctx, 1);
+   else
+ elm_win_autodel_set(ctx, 1);
evas_object_size_hint_weight_set(ctx, .2, .33);
 
tb = elm_box_add(ctx);
@@ -1467,8 +1473,17 @@ main(int argc, char *argv[])
 
wireless_config = calloc(1, sizeof(Wireless_Config));
inst = calloc(1, sizeof(Instance));
-   snprintf(id, sizeof(id), "%s", getenv("E_GADGET_ID"));
-   inst->id = atoi(id);
+   if (getenv("E_GADGET_ID"))
+ {
+snprintf(id, sizeof(id), "%s", getenv("E_GADGET_ID"));
+inst->id = atoi(id);
+inst->gadget = 1;
+ }
+   else
+ {
+inst->id = 0;
+inst->gadget = 0;
+ }
inst->connection = WIRELESS_CONNECTION_TYPE_CONNMAN;
inst->orient = E_GADGET_SITE_ORIENT_NONE;
wireless_popup.type = inst->tooltip.type = -1;
@@ -1479,7 +1494,6 @@ main(int argc, char *argv[])
_connection_init();
 
inst->win = elm_win_add(NULL, "wireless", ELM_WIN_BASIC);
-   evas_object_size_hint_min_set(inst->win, 100, 100);
evas_object_size_hint_aspect_set(inst->win, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
evas_object_smart_callback_add(inst->win, "gadget_site_anchor", 
_orient_change, NULL);
evas_object_smart_callback_add(inst->win, "gadget_site_orient", 
_orient_change, NULL);
@@ -1510,6 +1524,12 @@ main(int argc, char *argv[])
else
  _wireless_gadget_refresh();
 
+   if (!inst->gadget)
+ {
+elm_win_alpha_set(inst->win, 0);
+evas_object_resize(inst->win, 100, 100);
+ }
+
elm_win_resize_object_add(inst->win, inst->box);
evas_object_show(inst->win);
ecore_main_loop_begin();
@@ -1722,7 +1742,10 @@ wireless_authenticate(const Eina_Array *fields, 
Wireless_Auth_Cb cb, void *data)
  }
 
popup = elm_win_add(inst->win, "win", ELM_WIN_BASIC);
-   elm_win_alpha_set(popup, 1);
+   if (inst->gadget)
+ elm_win_alpha_set(popup, 1);
+   else
+ elm_win_autodel_set(popup, 1);
evas_object_event_callback_add(popup, EVAS_CALLBACK_KEY_DOWN, 
_wireless_auth_key, p);
evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, 
_wireless_auth_del, p);
p->popup = popup;
@@ -1816,8 +1839,10 @@ wireless_authenticate_external(Wireless_Network *wn, 
const char *url)
if (!inst->icon[wn->type]) return;
 
ctx = elm_win_add(inst->win, "win", ELM_WIN_POPUP_MENU);
-   elm_win_alpha_set(ctx, 1);
-
+   if (inst->gadget)
+ elm_win_alpha_set(ctx, 1);
+   else
+ elm_win_autodel_set(ctx, 1);
tb = elm_table_add(ctx);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, 0);
evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);

-- 




[EGIT] [core/efl] master 06/06: docs: fill in missing docs for efl_animation_ eo classes

2017-12-04 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 2631fabcac93ef7edb3dd5e6dd773a528b563fde
Author: Stefan Schmidt 
Date:   Mon Dec 4 16:43:12 2017 +0100

docs: fill in missing docs for efl_animation_ eo classes
---
 src/lib/evas/canvas/efl_animation_alpha.eo | 1 +
 src/lib/evas/canvas/efl_animation_rotate.eo| 2 ++
 src/lib/evas/canvas/efl_animation_scale.eo | 2 ++
 src/lib/evas/canvas/efl_animation_translate.eo | 2 ++
 4 files changed, 7 insertions(+)

diff --git a/src/lib/evas/canvas/efl_animation_alpha.eo 
b/src/lib/evas/canvas/efl_animation_alpha.eo
index de1734a691..d5da203d19 100644
--- a/src/lib/evas/canvas/efl_animation_alpha.eo
+++ b/src/lib/evas/canvas/efl_animation_alpha.eo
@@ -6,6 +6,7 @@ class Efl.Animation.Alpha (Efl.Animation)
data: Efl_Animation_Alpha_Data;
methods {
   @property alpha {
+ [[Alpha property]]
  set {
  }
  get {
diff --git a/src/lib/evas/canvas/efl_animation_rotate.eo 
b/src/lib/evas/canvas/efl_animation_rotate.eo
index aef24fd136..2212de79d8 100644
--- a/src/lib/evas/canvas/efl_animation_rotate.eo
+++ b/src/lib/evas/canvas/efl_animation_rotate.eo
@@ -6,6 +6,7 @@ class Efl.Animation.Rotate (Efl.Animation)
data: Efl_Animation_Rotate_Data;
methods {
   @property rotate {
+ [[Rotate property]]
  set {
  }
  get {
@@ -19,6 +20,7 @@ class Efl.Animation.Rotate (Efl.Animation)
  }
   }
   @property rotate_absolute {
+ [[Rotate absolute property]]
  set {
  }
  get {
diff --git a/src/lib/evas/canvas/efl_animation_scale.eo 
b/src/lib/evas/canvas/efl_animation_scale.eo
index 1bedd18c86..34f1ec1cf4 100644
--- a/src/lib/evas/canvas/efl_animation_scale.eo
+++ b/src/lib/evas/canvas/efl_animation_scale.eo
@@ -6,6 +6,7 @@ class Efl.Animation.Scale (Efl.Animation)
data: Efl_Animation_Scale_Data;
methods {
   @property scale {
+ [[Scale property]]
  set {
  }
  get {
@@ -21,6 +22,7 @@ class Efl.Animation.Scale (Efl.Animation)
  }
   }
   @property scale_absolute {
+ [[Scale absolute property]]
  set {
  }
  get {
diff --git a/src/lib/evas/canvas/efl_animation_translate.eo 
b/src/lib/evas/canvas/efl_animation_translate.eo
index d1265bb5e6..68b7a77710 100644
--- a/src/lib/evas/canvas/efl_animation_translate.eo
+++ b/src/lib/evas/canvas/efl_animation_translate.eo
@@ -6,6 +6,7 @@ class Efl.Animation.Translate (Efl.Animation)
data: Efl_Animation_Translate_Data;
methods {
   @property translate {
+ [[Translate property]]
  set {
  }
  get {
@@ -18,6 +19,7 @@ class Efl.Animation.Translate (Efl.Animation)
  }
   }
   @property translate_absolute {
+ [[Translate absolute property]]
  set {
  }
  get {

-- 




[EGIT] [core/efl] master 04/06: docs: fill in missing docs for efl_animation eo class

2017-12-04 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit c13e2f2be0822897e02c09a219c3048a0e187d11
Author: Stefan Schmidt 
Date:   Mon Dec 4 16:33:57 2017 +0100

docs: fill in missing docs for efl_animation eo class
---
 src/lib/evas/canvas/efl_animation.eo | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/lib/evas/canvas/efl_animation.eo 
b/src/lib/evas/canvas/efl_animation.eo
index 9b5ca30eb7..d8a728d3b9 100644
--- a/src/lib/evas/canvas/efl_animation.eo
+++ b/src/lib/evas/canvas/efl_animation.eo
@@ -6,6 +6,7 @@ class Efl.Animation (Efl.Object)
data: Efl_Animation_Data;
methods {
   @property target {
+ [[Target object property]]
  set {
  }
  get {
@@ -15,6 +16,7 @@ class Efl.Animation (Efl.Object)
  }
   }
   @property final_state_keep {
+ [[Keep final state property]]
  set {
  }
  get {
@@ -24,6 +26,7 @@ class Efl.Animation (Efl.Object)
  }
   }
   @property duration {
+ [[Duration property]]
  set {
  }
  get {
@@ -33,6 +36,7 @@ class Efl.Animation (Efl.Object)
  }
   }
   @property total_duration {
+ [[Total duration property]]
  get {
  }
  values {
@@ -40,6 +44,7 @@ class Efl.Animation (Efl.Object)
  }
   }
   @property repeat_mode {
+ [[Repeat mode property]]
  set {
  }
  get {
@@ -49,6 +54,7 @@ class Efl.Animation (Efl.Object)
  }
   }
   @property repeat_count {
+ [[Repeat count property]]
  set {
  }
  get {
@@ -58,6 +64,7 @@ class Efl.Animation (Efl.Object)
  }
   }
   @property start_delay {
+ [[Start delay property]]
  set {
  }
  get {
@@ -67,6 +74,7 @@ class Efl.Animation (Efl.Object)
  }
   }
   @property interpolator {
+ [[Interpolator property]]
  set {
  }
  get {

-- 




[EGIT] [core/efl] master 01/06: docs: fill in mising eo file docs for efl_ui_popup

2017-12-04 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 110f1b66a61200e1c44376e6fd6699f5f6b0857f
Author: Stefan Schmidt 
Date:   Mon Dec 4 15:17:32 2017 +0100

docs: fill in mising eo file docs for efl_ui_popup
---
 src/lib/elementary/efl_ui_popup.eo | 18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/lib/elementary/efl_ui_popup.eo 
b/src/lib/elementary/efl_ui_popup.eo
index 85bec78996..3c36a4ded0 100644
--- a/src/lib/elementary/efl_ui_popup.eo
+++ b/src/lib/elementary/efl_ui_popup.eo
@@ -1,14 +1,16 @@
 enum Efl.Ui.Popup.Align {
-none = 0,
-center,
-left,
-right,
-top,
-bottom
+[[Popup alignment type]]
+none = 0, [[Popup not aligned]]
+center,   [[Popup aligned to center]]
+left, [[Popup aligned to left]]
+right,[[Popup aligned to right]]
+top,  [[Popup aligned to top]]
+bottom[[Popup aligned to bottom]]
 }
 
 class Efl.Ui.Popup(Efl.Ui.Layout, Efl.Content)
 {
+   [[EFL UI popup class]]
methods {
   @property align {
  set {
@@ -18,7 +20,7 @@ class Efl.Ui.Popup(Efl.Ui.Layout, Efl.Content)
 [[ Get the current popup alignment.]]
  }
  values {
- type: Efl.Ui.Popup.Align;
+ type: Efl.Ui.Popup.Align; [[Alignment type]]
  }
   }
   @property timeout {
@@ -31,7 +33,7 @@ class Efl.Ui.Popup(Efl.Ui.Layout, Efl.Content)
 [[ Get the currently set timeout seconds.]]
  }
  values {
- time: double;
+ time: double; [[Timeout in seconds]]
  }
   }
}

-- 




[EGIT] [core/efl] master 03/06: docs: fill in missing docs for efl_ui_popup_alert eo class

2017-12-04 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 0d0e677431fc38ffb694aaece1fbcda126c70a58
Author: Stefan Schmidt 
Date:   Mon Dec 4 15:42:36 2017 +0100

docs: fill in missing docs for efl_ui_popup_alert eo class
---
 src/lib/elementary/efl_ui_popup_alert.eo | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/lib/elementary/efl_ui_popup_alert.eo 
b/src/lib/elementary/efl_ui_popup_alert.eo
index 7d9fb1fbc1..234b1d0ecc 100644
--- a/src/lib/elementary/efl_ui_popup_alert.eo
+++ b/src/lib/elementary/efl_ui_popup_alert.eo
@@ -12,16 +12,17 @@ struct Efl.Ui.Popup.Alert.Clicked_Event {
 
 class Efl.Ui.Popup.Alert(Efl.Ui.Popup)
 {
+   [[EFL UI Popup Alert class]]
methods {
   @property button {
  set {
 [[Set popup buttons.]]
  }
  keys {
-type: Efl.Ui.Popup.Alert.Button;
+type: Efl.Ui.Popup.Alert.Button; [[Alert popup button type]]
  }
  values {
-text: string;
+text: string; [[Alert string on button]]
  }
   }
}
@@ -31,6 +32,6 @@ class Efl.Ui.Popup.Alert(Efl.Ui.Popup)
   Efl.Part.part;
}
events {
-  clicked: Efl.Ui.Popup.Alert.Clicked_Event;
+  clicked: Efl.Ui.Popup.Alert.Clicked_Event; [[Called when alert popup was 
clicked]]
}
 }

-- 




[EGIT] [core/efl] master 02/06: docs: fill in mising docs for efl_ui_popup_anchor class

2017-12-04 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 5ee90bcd048a0e45f75dceaac38307e69aaab81a
Author: Stefan Schmidt 
Date:   Mon Dec 4 15:32:48 2017 +0100

docs: fill in mising docs for efl_ui_popup_anchor class
---
 src/lib/elementary/efl_ui_popup_anchor.eo | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/lib/elementary/efl_ui_popup_anchor.eo 
b/src/lib/elementary/efl_ui_popup_anchor.eo
index 656f48c45b..21bb1089b1 100644
--- a/src/lib/elementary/efl_ui_popup_anchor.eo
+++ b/src/lib/elementary/efl_ui_popup_anchor.eo
@@ -1,5 +1,6 @@
 class Efl.Ui.Popup.Anchor(Efl.Ui.Popup)
 {
+   [[EFL UI Popup Anchor class]]
methods {
   @property anchor {
  set {
@@ -24,11 +25,11 @@ class Efl.Ui.Popup.Anchor(Efl.Ui.Popup)
 [[Get the align priority of a popup.]]
  }
  values {
-first: Efl.Ui.Popup.Align;
-second: Efl.Ui.Popup.Align;
-third: Efl.Ui.Popup.Align;
-fourth: Efl.Ui.Popup.Align;
-fifth: Efl.Ui.Popup.Align;
+first: Efl.Ui.Popup.Align;  [[First align priority]]
+second: Efl.Ui.Popup.Align; [[Second align priority]]
+third: Efl.Ui.Popup.Align;  [[Third align priority]]
+fourth: Efl.Ui.Popup.Align; [[Fourth align priority]]
+fifth: Efl.Ui.Popup.Align;  [[Fifth align priority]]
  }
   }
}

-- 




[EGIT] [core/efl] master 05/06: docs: fill in missing docs for efl_ui_calendar_item eo class

2017-12-04 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 9cefba4e90656d98741f683d1a0685354d07bb78
Author: Stefan Schmidt 
Date:   Mon Dec 4 16:34:23 2017 +0100

docs: fill in missing docs for efl_ui_calendar_item eo class
---
 src/lib/elementary/efl_ui_calendar_item.eo | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_calendar_item.eo 
b/src/lib/elementary/efl_ui_calendar_item.eo
index 4a4fd78907..d567c5193d 100644
--- a/src/lib/elementary/efl_ui_calendar_item.eo
+++ b/src/lib/elementary/efl_ui_calendar_item.eo
@@ -1,9 +1,11 @@
 class Efl.Ui.Calendar.Item (Efl.Object, Efl.Ui.Focus.Object)
 {
+[[EFL UI Calendar Item class]]
 methods {
@property day_number {
+  [[Day number]]
   values {
-i : int;
+i : int; [[Day number]]
   }
}
 }

-- 




[EGIT] [enlightenment/gadgets/wireless] master 01/01: Make sure wins are alpha.

2017-12-04 Thread Stephen Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/gadgets/wireless.git/commit/?id=4b96e40bc47f439758a06ff8dc57a4e215e26b0a

commit 4b96e40bc47f439758a06ff8dc57a4e215e26b0a
Author: Stephen Houston 
Date:   Mon Dec 4 09:38:33 2017 -0600

Make sure wins are alpha.
---
 src/wireless.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/wireless.c b/src/wireless.c
index 973758e..c5337df 100644
--- a/src/wireless.c
+++ b/src/wireless.c
@@ -1211,6 +1211,7 @@ _wireless_gadget_mouse_down(void *data EINA_UNUSED, Evas 
*e EINA_UNUSED, Evas_Ob
wireless_popup.items = eina_hash_pointer_new(NULL);
 
ctx = elm_win_add(inst->win, "win", ELM_WIN_POPUP_MENU);
+   elm_win_alpha_set(ctx, 1);
evas_object_size_hint_weight_set(ctx, .2, .33);
 
tb = elm_box_add(ctx);
@@ -1815,6 +1816,7 @@ wireless_authenticate_external(Wireless_Network *wn, 
const char *url)
if (!inst->icon[wn->type]) return;
 
ctx = elm_win_add(inst->win, "win", ELM_WIN_POPUP_MENU);
+   elm_win_alpha_set(ctx, 1);
 
tb = elm_table_add(ctx);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, 0);

-- 




[EGIT] [website/www-content] master 01/01: Wiki page main-loop.md changed with summary [Fix eo-intro links] by Xavi Artigas

2017-12-04 Thread Xavi Artigas
WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=1f7e71f8530ce610e8675015a5325a38e1d6fb1e

commit 1f7e71f8530ce610e8675015a5325a38e1d6fb1e
Author: Xavi Artigas 
Date:   Mon Dec 4 07:18:41 2017 -0800

Wiki page main-loop.md changed with summary [Fix eo-intro links] by Xavi 
Artigas
---
 pages/develop/guides/c/core/main-loop.md.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pages/develop/guides/c/core/main-loop.md.txt 
b/pages/develop/guides/c/core/main-loop.md.txt
index 1ef3ebda4..093b7fe96 100644
--- a/pages/develop/guides/c/core/main-loop.md.txt
+++ b/pages/develop/guides/c/core/main-loop.md.txt
@@ -11,7 +11,7 @@ EFL manages timers, file descriptors, user interface events 
amongst other things
 
 ## Prerequisites ##
 
-* Read the [Introduction to Eo](eo-intro.md) to understand how Eo objects are 
created and destroyed.
+* Read the [Introduction to Eo](/develop/tutorials/c/eo-intro.md) to 
understand how Eo objects are created and destroyed.
 
 * Read the [Events Programming Guide](events.md) to learn how to register 
callbacks, which can be triggered by events.
 
@@ -23,7 +23,7 @@ You can find usage examples in the EFL repository: 
[``reference/c/core/src/core_
 
 ### Creating and Destroying Timers ###
 
-Timers are Eo objects. You can create and destroy them with ``efl_add()`` as 
for all other Eo objects (see [Introduction to Eo](eo-intro.md)). Their class 
is `EFL_LOOP_TIMER_CLASS`:
+Timers are Eo objects. You can create and destroy them with ``efl_add()`` as 
for all other Eo objects (see [Introduction to 
Eo](/develop/tutorials/c/eo-intro.md)). Their class is `EFL_LOOP_TIMER_CLASS`:
 
 ```c
 timer_object = efl_add(EFL_LOOP_TIMER_CLASS, ...);
@@ -104,7 +104,7 @@ You can find usage examples in the EFL examples repository: 
[``reference/c/core/
 
 ### Creating and Destroying FD Monitors ###
 
-FD monitors are Eo objects that wrap system file descriptors, and are 
instantiated and destroyed with ``efl_add()`` as for all other Eo objects (see 
[Introduction to Eo](eo-intro.md)). Their class is `EFL_LOOP_FD_CLASS,`:
+FD monitors are Eo objects that wrap system file descriptors, and are 
instantiated and destroyed with ``efl_add()`` as for all other Eo objects (see 
[Introduction to Eo](/develop/tutorials/c/eo-intro.md)). Their class is 
`EFL_LOOP_FD_CLASS,`:
 
 ```c
 fd_object = efl_add(EFL_LOOP_FD_CLASS, ...);

-- 




[EGIT] [website/www-content] master 01/01: Wiki page porting-guide.md changed with summary [Added intro] by Xavi Artigas

2017-12-04 Thread Xavi Artigas
WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=c254e51335931174d97723e67e5ea4e52ab8aa82

commit c254e51335931174d97723e67e5ea4e52ab8aa82
Author: Xavi Artigas 
Date:   Mon Dec 4 06:37:23 2017 -0800

Wiki page porting-guide.md changed with summary [Added intro] by Xavi 
Artigas
---
 pages/develop/guides/c/porting-guide.md.txt | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/pages/develop/guides/c/porting-guide.md.txt 
b/pages/develop/guides/c/porting-guide.md.txt
index fee4b33d6..11ee72d9a 100644
--- a/pages/develop/guides/c/porting-guide.md.txt
+++ b/pages/develop/guides/c/porting-guide.md.txt
@@ -4,11 +4,18 @@
 
 # EFL C Porting Guide #
 
+This document highlights the main differences between the original EFL API 
(known from now on as *Legacy API*) and the new EFL API based on Eo objects 
(dubbed *Unified API*). The Unified API was introduced in EFL 1.22, around 
December 2017.
+
+Both APIs can be used simultaneously, but support for the Legacy one will be 
dropped in the future, and therefore usage of the Unified API is strongly 
recommended in new code.
+
+> **NOTE:**
+> Meanwhile the Legacy API is not completely removed, enabling the Unified API 
requires defining two compilation symbols, ``EFL_EO_API_SUPPORT`` and 
``EFL_BETA_API_SUPPORT``, as can be seen in the tutorials and examples.
+
 ## Main Loop ##
 
 ### Timers ###
 
-Programming guides: [New](/develop/guides/c/core/main-loop.md#Timers), 
[Old](/develop/legacy/program_guide/main_loop/timers)
+Programming guides: [Unified EFL](/develop/guides/c/core/main-loop.md#Timers), 
[Legacy EFL](/develop/legacy/program_guide/main_loop/timers)
 
 * Timers are now regular Eo objects created with 
``efl_add(EFL_LOOP_TIMER_CLASS, ...)`` and destroyed with ``efl_unref()``.
 
@@ -28,7 +35,7 @@ Programming guides: 
[New](/develop/guides/c/core/main-loop.md#Timers), [Old](/de
 
 ### File Descriptors ###
 
-Programming guides: 
[New](/develop/guides/c/core/main-loop.md#File_Descriptor_Monitors), 
[Old](/develop/legacy/program_guide/main_loop/file_descriptors)
+Programming guides: [Unified 
EFL](/develop/guides/c/core/main-loop.md#File_Descriptor_Monitors), [Legacy 
EFL](/develop/legacy/program_guide/main_loop/file_descriptors)
 
 * File Descriptors are now regular Eo objects created with 
``efl_add(EFL_LOOP_FD_CLASS, ...)`` and destroyed with ``efl_unref()``.
 
@@ -40,7 +47,7 @@ Programming guides: 
[New](/develop/guides/c/core/main-loop.md#File_Descriptor_Mo
 
 ### Idlers ###
 
-Programming guides: [New](/develop/guides/c/core/main-loop.md#Idlers), 
[Old](/develop/legacy/program_guide/main_loop/idlers)
+Programming guides: [Unified EFL](/develop/guides/c/core/main-loop.md#Idlers), 
[Legacy EFL](/develop/legacy/program_guide/main_loop/idlers)
 
 * All idler functions are handled through regular events on the Loop object.
 

-- 




[EGIT] [core/efl] master 02/02: ecore: removed warning from ecore_anim

2017-12-04 Thread Pawel Aksiutowicz
jpeg pushed a commit to branch master.

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

commit 767eefbf210574545fe2242271c1b7f16d29954e
Author: Pawel Aksiutowicz 
Date:   Mon Dec 4 19:35:06 2017 +0900

ecore: removed warning from ecore_anim

Reviewers: stanluk, lukasz.stanislawski, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5535
---
 src/lib/ecore/ecore_anim.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c
index d3b4400ae8..dcc89d05cd 100644
--- a/src/lib/ecore/ecore_anim.c
+++ b/src/lib/ecore/ecore_anim.c
@@ -255,7 +255,10 @@ _timer_tick_core(void *data EINA_UNUSED, Ecore_Thread 
*thread)
 {
if (pollincoming[i].data.ptr == INPUT_TIMER_TIMERFD)
  {
-read(timerfd, , sizeof(timerfdbuf));
+if (read(timerfd, , sizeof(timerfdbuf)) 
== -1)
+  {
+ ERR("Cannot read from timer descriptor. %m.");
+  }
 data_timeout = EINA_TRUE;
  }
else if (pollincoming[i].data.ptr == 
INPUT_TIMER_CONTROL)

-- 




[EGIT] [core/efl] master 01/02: ecore: munmap() call get size of the same type as nmap() call in "len" argument

2017-12-04 Thread Pawel Aksiutowicz
jpeg pushed a commit to branch master.

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

commit c41480e46c7d1059a0cc8b6333e59c548ebffd6e
Author: Pawel Aksiutowicz 
Date:   Mon Dec 4 19:32:46 2017 +0900

ecore: munmap() call get size of the same type as nmap() call in "len" 
argument

Reviewers: stanluk, lukasz.stanislawski, jpeg

Reviewed By: jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5553
---
 src/lib/ecore/ecore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index 93a865f325..97dc4b2aa3 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -934,7 +934,7 @@ _ecore_fps_debug_shutdown(void)
 unlink(buf);
 if (_ecore_fps_runtime_mmap)
   {
- munmap(_ecore_fps_runtime_mmap, sizeof(int));
+ munmap(_ecore_fps_runtime_mmap, sizeof(unsigned int));
  _ecore_fps_runtime_mmap = NULL;
   }
 close(_ecore_fps_debug_fd);

--