[EGIT] [core/efl] master 01/01: layout: Fix compilation break

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 63f0dcc5fcf6433a745e3f457fc692f641dda534
Author: Jean-Philippe Andre 
Date:   Fri Aug 4 12:31:14 2017 +0900

layout: Fix compilation break

Oooops! This broke external apps!
---
 src/lib/elementary/elm_layout_legacy.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/elementary/elm_layout_legacy.h 
b/src/lib/elementary/elm_layout_legacy.h
index 5f0df2bc48..c894e41816 100644
--- a/src/lib/elementary/elm_layout_legacy.h
+++ b/src/lib/elementary/elm_layout_legacy.h
@@ -71,7 +71,7 @@ EAPI const char *elm_layout_data_get(const Evas_Object *obj, 
const char *key);
  *
  * @ingroup Elm_Layout
  */
-EAPI void elm_layout_signal_callback_add(Elm_Layout *obj, const char 
*emission, const char *source, Edje_Signal_Cb func, void *data);
+EAPI void elm_layout_signal_callback_add(Evas_Object *obj, const char 
*emission, const char *source, Edje_Signal_Cb func, void *data);
 
 /**
  * @brief Remove a signal-triggered callback from a given layout widget.
@@ -92,7 +92,7 @@ EAPI void elm_layout_signal_callback_add(Elm_Layout *obj, 
const char *emission,
  *
  * @ingroup Elm_Layout
  */
-EAPI void *elm_layout_signal_callback_del(Elm_Layout *obj, const char 
*emission, const char *source, Edje_Signal_Cb func);
+EAPI void *elm_layout_signal_callback_del(Evas_Object *obj, const char 
*emission, const char *source, Edje_Signal_Cb func);
 
 /**
  * @brief Send a (Edje) signal to a given layout widget's underlying Edje
@@ -107,7 +107,7 @@ EAPI void *elm_layout_signal_callback_del(Elm_Layout *obj, 
const char *emission,
  *
  * @ingroup Elm_Layout
  */
-EAPI void elm_layout_signal_emit(Elm_Layout *obj, const char *emission, const 
char *source);
+EAPI void elm_layout_signal_emit(Evas_Object *obj, const char *emission, const 
char *source);
 
 /**
  * @brief Get the edje layout

-- 




[EGIT] [core/efl] master 06/16: scroller: Implement default content part

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit ed94e8b535f5ece4934aa22583bcef79601e13ad
Author: Jean-Philippe Andre 
Date:   Wed Aug 2 20:55:20 2017 +0900

scroller: Implement default content part

This:
  efl_content_set(efl_part(scroller, "default"), obj)
worked fine, but, this:
  efl_content_set(scroller, obj)
didn't work as expected.

Thanks @JackDanielz for the report.

Note: There is a problem still... "default" should not work
  with efl_part. This is quite bad, actually. It should
  probably be "content" instead.
---
 src/lib/elementary/elm_scroller.c  | 19 +++
 src/lib/elementary/elm_scroller.eo |  4 +++-
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_scroller.c 
b/src/lib/elementary/elm_scroller.c
index d736884fa2..7e98eebca8 100644
--- a/src/lib/elementary/elm_scroller.c
+++ b/src/lib/elementary/elm_scroller.c
@@ -869,6 +869,24 @@ _elm_scroller_content_unset(Eo *obj, Elm_Scroller_Data 
*sd, const char *part)
return ret;
 }
 
+EOLIAN static Eina_Bool
+_elm_scroller_efl_container_content_set(Eo *obj, Elm_Scroller_Data *sd, Eo 
*content)
+{
+   return _elm_scroller_content_set(obj, sd, "default", content);
+}
+
+EOLIAN static Eo *
+_elm_scroller_efl_container_content_get(Eo *obj, Elm_Scroller_Data *sd)
+{
+   return _elm_scroller_content_get(obj, sd, "default");
+}
+
+EOLIAN static Eo *
+_elm_scroller_efl_container_content_unset(Eo *obj, Elm_Scroller_Data *sd)
+{
+   return _elm_scroller_content_unset(obj, sd, "default");
+}
+
 static void
 _elm_scroller_content_min_limit_cb(Evas_Object *obj,
Eina_Bool w,
@@ -1462,6 +1480,7 @@ ELM_PART_OVERRIDE(elm_scroller, ELM_SCROLLER, ELM_LAYOUT, 
Elm_Scroller_Data, Elm
 ELM_PART_OVERRIDE_CONTENT_SET(elm_scroller, ELM_SCROLLER, ELM_LAYOUT, 
Elm_Scroller_Data, Elm_Part_Data)
 ELM_PART_OVERRIDE_CONTENT_GET(elm_scroller, ELM_SCROLLER, ELM_LAYOUT, 
Elm_Scroller_Data, Elm_Part_Data)
 ELM_PART_OVERRIDE_CONTENT_UNSET(elm_scroller, ELM_SCROLLER, ELM_LAYOUT, 
Elm_Scroller_Data, Elm_Part_Data)
+// FIXME: should be "content" but "default" was legacy API
 ELM_PART_CONTENT_DEFAULT_SET(elm_scroller, "default")
 #include "elm_scroller_internal_part.eo.c"
 
diff --git a/src/lib/elementary/elm_scroller.eo 
b/src/lib/elementary/elm_scroller.eo
index 7f0a6cf290..2bb9c3cdb5 100644
--- a/src/lib/elementary/elm_scroller.eo
+++ b/src/lib/elementary/elm_scroller.eo
@@ -1,6 +1,6 @@
 class Elm.Scroller (Elm.Layout, Elm.Interface_Scrollable,
 Elm.Interface.Atspi_Widget_Action,
-Efl.Ui.Scrollable)
+Efl.Ui.Scrollable, Efl.Container)
 {
[[Elementary scroller class]]
legacy_prefix: elm_scroller;
@@ -45,6 +45,8 @@ class Elm.Scroller (Elm.Layout, Elm.Interface_Scrollable,
   Efl.Gfx.position { set; }
   Efl.Gfx.size { set; }
   Efl.Canvas.Group.group_member_add;
+  Efl.Container.content { get; set; }
+  Efl.Container.content_unset;
   Elm.Widget.theme_apply;
   Elm.Widget.activate;
   Elm.Widget.focus_next_manager_is;

-- 




[EGIT] [core/efl] master 13/16: edje: Move signal APIs to an interface

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit efac7d523ac4be16e1d81541a887dd847c7d9d2c
Author: Jean-Philippe Andre 
Date:   Thu Aug 3 17:23:21 2017 +0900

edje: Move signal APIs to an interface

This interface will be used by elm_layout as well.

Ref T5315
---
 src/Makefile_Edje.am   |   1 +
 src/examples/elementary/layout_model_connect.c |   2 +-
 src/lib/edje/Edje_Common.h |   3 +-
 src/lib/edje/Edje_Eo.h |   1 +
 src/lib/edje/Edje_Legacy.h |  58 +
 src/lib/edje/edje_legacy.c |  66 ++-
 src/lib/edje/edje_message_queue.c  |  13 +--
 src/lib/edje/edje_object.eo| 156 ++---
 src/lib/edje/edje_private.h|  14 +--
 src/lib/edje/edje_program.c|  97 ++-
 src/lib/edje/edje_signal.c |  41 +++
 src/lib/edje/edje_smart.c  |   1 +
 src/lib/edje/efl_canvas_layout_signal.eo   | 146 +++
 src/tests/edje/edje_test_edje.c|   8 +-
 src/tests/emotion/emotion_test_main-eo.c   |  30 ++---
 15 files changed, 359 insertions(+), 278 deletions(-)

diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index bf1a7f9a25..15c3f5cdfa 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -3,6 +3,7 @@
 
 edje_eolian_files = \
lib/edje/efl_canvas_layout_calc.eo \
+   lib/edje/efl_canvas_layout_signal.eo \
lib/edje/edje_object.eo \
lib/edje/efl_canvas_layout_internal.eo \
lib/edje/efl_canvas_layout_internal_box.eo \
diff --git a/src/examples/elementary/layout_model_connect.c 
b/src/examples/elementary/layout_model_connect.c
index 120ef5f852..b710b49bca 100644
--- a/src/examples/elementary/layout_model_connect.c
+++ b/src/examples/elementary/layout_model_connect.c
@@ -146,7 +146,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
elm_box_pack_end(bxr, priv->bt);
elm_object_text_set(priv->bt, "update model");
evas_object_smart_callback_add(priv->bt, "clicked", _update_cb, priv);
-   edje_obj_signal_callback_add(priv->bt, "test*" , "*", _signal_cb, priv);
+   edje_object_signal_callback_add(priv->bt, "test*" , "*", _signal_cb, priv);
efl_ui_model_connect(priv->bt, "signal/test-%v", "size");
evas_object_show(priv->bt);
 
diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h
index 31b38c7882..cbc40f0e1e 100644
--- a/src/lib/edje/Edje_Common.h
+++ b/src/lib/edje/Edje_Common.h
@@ -89,7 +89,8 @@ struct _Edje_Size_Class
  * @{
  */
 
-typedef void (*Edje_Signal_Cb)  (void *data, Evas_Object *obj, 
const char *emission, const char *source); /**< Edje signal callback 
functions's prototype definition. @c data will have the auxiliary data pointer 
set at the time the callback registration. @c obj will be a pointer the Edje 
object where the signal comes from. @c emission will identify the exact 
signal's emission string and @c source the exact signal's source one. */
+typedef void (*Efl_Signal_Cb) (void *data, Evas_Object *obj, const char 
*emission, const char *source); /**< Edje signal callback functions's prototype 
definition. @c data will have the auxiliary data pointer set at the time the 
callback registration. @c obj will be a pointer the Edje object where the 
signal comes from. @c emission will identify the exact signal's emission string 
and @c source the exact signal's source one. */
+typedef Efl_Signal_Cb Edje_Signal_Cb;
 
 /**
  * @brief Gets extra data passed to callbacks.
diff --git a/src/lib/edje/Edje_Eo.h b/src/lib/edje/Edje_Eo.h
index 44dd896db0..e59610b2bc 100644
--- a/src/lib/edje/Edje_Eo.h
+++ b/src/lib/edje/Edje_Eo.h
@@ -1,6 +1,7 @@
 #include 
 
 #include "efl_canvas_layout_calc.eo.h"
+#include "efl_canvas_layout_signal.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 2adee590bf..0ffbc28135 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -52,6 +52,64 @@
 EAPI Evas_Object *edje_object_add (Evas *evas);
 
 /**
+ * @brief Adds a callback for an arriving Edje signal, emitted by a given Edje
+ * object.
+ *
+ * Edje signals are one of the communication interfaces between code and a
+ * given Edje object's theme. With signals, one can communicate two string
+ * values at a time, which are: - "emission" value: the name of the signal, in
+ * general - "source" value: a name for the signal's context, in general
+ *
+ * Though there are those common uses for the two strings, one is free to use
+ * them however they like.
+ *
+ * Signal callback registration is powerful, in the way that  blobs may be used
+ * to match multiple signals at once. All the 

[EGIT] [core/efl] master 12/16: layout: Use only legacy "elm_layout_sizing_eval"

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit ad7e16bcf4af199645da45989e866cb50ced6344
Author: Jean-Philippe Andre 
Date:   Thu Aug 3 15:20:58 2017 +0900

layout: Use only legacy "elm_layout_sizing_eval"

This removes all uses of elm_obj_layout_sizing_eval.

Ref T5315
---
 src/lib/elementary/efl_ui_button.c|  2 +-
 src/lib/elementary/efl_ui_check.c |  4 ++--
 src/lib/elementary/efl_ui_nstate.c|  2 +-
 src/lib/elementary/efl_ui_radio.c |  2 +-
 src/lib/elementary/elc_fileselector.c |  2 +-
 src/lib/elementary/elm_genlist.c  |  2 +-
 src/lib/elementary/elm_label.c|  2 +-
 src/lib/elementary/elm_layout.c   | 26 +-
 8 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/lib/elementary/efl_ui_button.c 
b/src/lib/elementary/efl_ui_button.c
index e4794be62c..1a3c8fb085 100644
--- a/src/lib/elementary/efl_ui_button.c
+++ b/src/lib/elementary/efl_ui_button.c
@@ -114,7 +114,7 @@ _icon_signal_emit(Evas_Object *obj)
 
elm_layout_signal_emit(obj, buf, "elm");
edje_object_message_signal_process(elm_layout_edje_get(obj));
-   elm_obj_layout_sizing_eval(obj);
+   elm_layout_sizing_eval(obj);
 }
 
 /* FIXME: replicated from elm_layout just because button's icon spot
diff --git a/src/lib/elementary/efl_ui_check.c 
b/src/lib/elementary/efl_ui_check.c
index 3c97830819..87ed3d5a34 100644
--- a/src/lib/elementary/efl_ui_check.c
+++ b/src/lib/elementary/efl_ui_check.c
@@ -126,7 +126,7 @@ _efl_ui_check_elm_widget_sub_object_del(Eo *obj, 
Efl_Ui_Check_Data *_pd EINA_UNU
 
_icon_signal_emit(obj);
 
-   elm_obj_layout_sizing_eval(obj);
+   elm_layout_sizing_eval(obj);
 
return EINA_TRUE;
 }
@@ -188,7 +188,7 @@ _efl_ui_check_elm_widget_theme_apply(Eo *obj, 
Efl_Ui_Check_Data *sd EINA_UNUSED)
 * we can changed the theme API */
_icon_signal_emit(obj);
 
-   elm_obj_layout_sizing_eval(obj);
+   elm_layout_sizing_eval(obj);
 
return int_ret;
 }
diff --git a/src/lib/elementary/efl_ui_nstate.c 
b/src/lib/elementary/efl_ui_nstate.c
index fc5a56fb70..3f9b6c3a58 100644
--- a/src/lib/elementary/efl_ui_nstate.c
+++ b/src/lib/elementary/efl_ui_nstate.c
@@ -57,7 +57,7 @@ _state_active(Evas_Object *obj, Efl_Ui_Nstate_Data *sd)
sprintf(buf, "elm,state,changed,%d", sd->state);
elm_layout_signal_emit(obj, buf, "elm");
edje_object_message_signal_process(elm_layout_edje_get(obj));
-   elm_obj_layout_sizing_eval(obj);
+   elm_layout_sizing_eval(obj);
efl_event_callback_legacy_call(obj, EFL_UI_NSTATE_EVENT_STATE_CHANGED, 
NULL);
 }
 
diff --git a/src/lib/elementary/efl_ui_radio.c 
b/src/lib/elementary/efl_ui_radio.c
index 2838771794..166bd4c8a1 100644
--- a/src/lib/elementary/efl_ui_radio.c
+++ b/src/lib/elementary/efl_ui_radio.c
@@ -182,7 +182,7 @@ _efl_ui_radio_elm_widget_theme_apply(Eo *obj, 
Efl_Ui_Radio_Data *sd)
 * whenever we can changed the theme API */
_icon_signal_emit(obj);
 
-   elm_obj_layout_sizing_eval(obj);
+   elm_layout_sizing_eval(obj);
 
return int_ret;
 }
diff --git a/src/lib/elementary/elc_fileselector.c 
b/src/lib/elementary/elc_fileselector.c
index 117e3c87bf..a599b4bed7 100644
--- a/src/lib/elementary/elc_fileselector.c
+++ b/src/lib/elementary/elc_fileselector.c
@@ -2013,7 +2013,7 @@ _elm_fileselector_efl_canvas_group_group_add(Eo *obj, 
Elm_Fileselector_Data *pri
priv->files_view = _files_list_add(obj);
elm_object_part_content_set(obj, "elm.swallow.files", priv->files_view);
 
-   elm_obj_layout_sizing_eval(obj);
+   elm_layout_sizing_eval(obj);
 
_focus_chain_update(obj, priv);
 }
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 9e8f80d31d..38b5d6b0d7 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -440,7 +440,7 @@ _item_content_realize(Elm_Gen_Item *it,
 
   // FIXME : Layout need sizing eval before group calculate
   if (efl_class_get(content) == ELM_LAYOUT_CLASS)
-elm_obj_layout_sizing_eval(content);
+elm_layout_sizing_eval(content);
 
   _widget_calculate_recursive(content);
}
diff --git a/src/lib/elementary/elm_label.c b/src/lib/elementary/elm_label.c
index 77f2a90566..b488ce9928 100644
--- a/src/lib/elementary/elm_label.c
+++ b/src/lib/elementary/elm_label.c
@@ -347,7 +347,7 @@ _elm_label_text_set(Eo *obj, Elm_Label_Data *sd, const char 
*part, const char *l
if (int_ret)
  {
 sd->lastw = -1;
-elm_obj_layout_sizing_eval(obj);
+elm_layout_sizing_eval(obj);
 _label_slide_change(obj);
  }
return int_ret;
diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 21ece8b98b..a3b843eb75 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -125,7 +125,7 @@ 

[EGIT] [core/efl] master 04/16: layout: Implement cursor part APIs with efl_part

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit a4c392989400e428cc043bf0f2b44a2465095606
Author: Jean-Philippe Andre 
Date:   Wed Aug 2 19:41:47 2017 +0900

layout: Implement cursor part APIs with efl_part

This makes layout parts implement Efl.Ui.Cursor.
This also adds the missing bool returns from that interface.

This removes 7 APIs from Elm.Layout.

Ref T5315
---
 src/lib/elementary/efl_ui_cursor.eo|  19 +++-
 src/lib/elementary/elm_layout.c| 117 +
 src/lib/elementary/elm_layout.eo   |  69 ---
 src/lib/elementary/elm_layout_internal_part.eo |   6 +-
 src/lib/elementary/elm_layout_legacy.h |  91 +++
 src/lib/elementary/elm_part_helper.h   |   2 +-
 src/lib/elementary/els_cursor.c|  28 --
 7 files changed, 235 insertions(+), 97 deletions(-)

diff --git a/src/lib/elementary/efl_ui_cursor.eo 
b/src/lib/elementary/efl_ui_cursor.eo
index 9bb73c0a02..ddbffc6d17 100644
--- a/src/lib/elementary/efl_ui_cursor.eo
+++ b/src/lib/elementary/efl_ui_cursor.eo
@@ -38,8 +38,11 @@ interface Efl.Ui.Cursor ()
   If $cursor is $null this function will reset the cursor
   to the default one.
 ]]
+return: bool; [[$true if successful.]]
+ }
+ get {
+[[Returns the current cursor name.]]
  }
- get { [[Returns the current cursor name.]] }
  values {
 cursor: string @nullable; [[The cursor name, defined either
 by the display system or the theme.]]
@@ -52,6 +55,13 @@ interface Efl.Ui.Cursor ()
The cursor should be set with @.cursor.set first before
setting its style with this property.
  ]]
+ set {
+[[Sets a style for the current cursor. Call after @.cursor.set.]]
+return: bool; [[$true if successful.]]
+ }
+ get {
+[[Returns the current cursor style name.]]
+ }
  values {
 style: string; [[A specific style to use, eg. default,
  transparent, ]]
@@ -63,6 +73,13 @@ interface Efl.Ui.Cursor ()
If $false, the cursor may only come from the render engine,
i.e. from the display manager.
  ]]
+ set {
+[[Enables or disables theme cursors.]]
+return: bool; [[$true if successful.]]
+ }
+ get {
+[[Returns the current state of theme cursors search.]]
+ }
  values {
 allow: bool(true); [[Whether to use theme cursors.]]
  }
diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 66922ce911..0d7f5eeb28 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -24,6 +24,7 @@
 
 Eo *_elm_layout_pack_proxy_get(Elm_Layout *obj, Edje_Part_Type type, const 
char *part);
 static void _efl_model_properties_changed_cb(void *, const Efl_Event *);
+static Eina_Bool _elm_layout_part_cursor_unset(Elm_Layout_Smart_Data *sd, 
const char *part_name);
 
 static const char SIG_THEME_CHANGED[] = "theme,changed";
 const char SIG_LAYOUT_FOCUSED[] = "focused";
@@ -1729,14 +1730,17 @@ _elm_layout_thaw(Eo *obj, Elm_Layout_Smart_Data *_pd 
EINA_UNUSED)
return 0;
 }
 
-EOLIAN static Eina_Bool
-_elm_layout_part_cursor_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char 
*part_name, const char *cursor)
+static Eina_Bool
+_elm_layout_part_cursor_set(Elm_Layout_Smart_Data *sd, const char *part_name, 
const char *cursor)
 {
+   Evas_Object *part_obj;
+   Elm_Layout_Sub_Object_Cursor *pc;
+   Eo *obj = sd->obj;
+
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(part_name, EINA_FALSE);
 
-   Evas_Object *part_obj;
-   Elm_Layout_Sub_Object_Cursor *pc;
+   if (!cursor) return _elm_layout_part_cursor_unset(sd, part_name);
 
part_obj = (Evas_Object *)edje_object_part_object_get
(wd->resize_obj, part_name);
@@ -1782,8 +1786,8 @@ _elm_layout_part_cursor_set(Eo *obj, 
Elm_Layout_Smart_Data *sd, const char *part
return EINA_TRUE;
 }
 
-EOLIAN static const char*
-_elm_layout_part_cursor_get(const Eo *obj EINA_UNUSED, Elm_Layout_Smart_Data 
*sd, const char *part_name)
+static const char *
+_elm_layout_part_cursor_get(Elm_Layout_Smart_Data *sd, const char *part_name)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(part_name, NULL);
 
@@ -1794,8 +1798,8 @@ _elm_layout_part_cursor_get(const Eo *obj EINA_UNUSED, 
Elm_Layout_Smart_Data *sd
return elm_object_cursor_get(pc->obj);
 }
 
-EOLIAN static Eina_Bool
-_elm_layout_part_cursor_unset(Eo *obj EINA_UNUSED, Elm_Layout_Smart_Data *sd, 
const char *part_name)
+static Eina_Bool
+_elm_layout_part_cursor_unset(Elm_Layout_Smart_Data *sd, 

[EGIT] [core/efl] master 15/16: edje: Move size_min/max and data to an interface

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 240cc9e5012a08b89711cfd5be102c0efdf20b6b
Author: Jean-Philippe Andre 
Date:   Thu Aug 3 17:50:01 2017 +0900

edje: Move size_min/max and data to an interface

The new interface is:
  Efl.Canvas.Layout_Group

I'm not fan of the name.

Ref T5315
---
 src/Makefile_Edje.am|   1 +
 src/lib/edje/Edje_Eo.h  |   1 +
 src/lib/edje/Edje_Legacy.h  |   1 +
 src/lib/edje/edje_object.eo | 103 ++-
 src/lib/edje/edje_smart.c   |   1 +
 src/lib/edje/edje_util.c|   6 +-
 src/lib/edje/efl_canvas_layout_group.eo | 105 
 src/lib/elementary/efl_ui_image.c   |   4 +-
 src/lib/elementary/efl_ui_image.eo  |  10 +--
 src/lib/elementary/efl_ui_image_zoomable.c  |   4 +-
 src/lib/elementary/efl_ui_image_zoomable.eo |   5 +-
 11 files changed, 129 insertions(+), 112 deletions(-)

diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index 15c3f5cdfa..c1fb5236f4 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -4,6 +4,7 @@
 edje_eolian_files = \
lib/edje/efl_canvas_layout_calc.eo \
lib/edje/efl_canvas_layout_signal.eo \
+   lib/edje/efl_canvas_layout_group.eo \
lib/edje/edje_object.eo \
lib/edje/efl_canvas_layout_internal.eo \
lib/edje/efl_canvas_layout_internal_box.eo \
diff --git a/src/lib/edje/Edje_Eo.h b/src/lib/edje/Edje_Eo.h
index e59610b2bc..1d3d4e4cd1 100644
--- a/src/lib/edje/Edje_Eo.h
+++ b/src/lib/edje/Edje_Eo.h
@@ -2,6 +2,7 @@
 
 #include "efl_canvas_layout_calc.eo.h"
 #include "efl_canvas_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.h b/src/lib/edje/Edje_Legacy.h
index 0ffbc28135..d62c53ff97 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -2161,3 +2161,4 @@ EAPI void edje_object_part_text_insert(Edje_Object *obj, 
const char *part, const
  */
 #include "edje_object.eo.legacy.h"
 #include "edje_edit.eo.legacy.h"
+#include "efl_canvas_layout_group.eo.legacy.h"
diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index 6f403ba0fe..90e82ba7be 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.Clipped, Efl.File, Efl.Container, Efl.Part,
Efl.Observer, Efl.Ui.Base, Efl.Canvas.Layout_Calc,
-   Efl.Canvas.Layout_Signal)
+   Efl.Canvas.Layout_Signal, Efl.Canvas.Layout_Group)
 {
[[Edje object class]]
legacy_prefix: edje_object;
@@ -141,104 +141,6 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, 
Efl.Container, Efl.Part,
  }
   }
 
-  /* EDJE GROUP DATA APIS BEGIN  */
-  @property group_size_min {
- get {
-[[Gets the minimum size specified -- as an EDC property -- for a
-  given Edje object
-
-  This function retrieves the obj object's minimum size values,
-  as declared in its EDC group definition. For instance, for an
-  Edje object of minimum size 100x100 pixels:
-  collections {
- group {
-name: "a_group";
-min: 100 100;
- }
-  }
-
-  Note: If the $min EDC property was not declared for this object,
-  this call will return 0x0.
-
-  Note: On failure, this function also return 0x0.
-
-  See also @.group_size_max.
-]]
-legacy: edje_object_size_min_get;
- }
- values {
-minw: int; [[Pointer to a variable where to store the minimum 
width]]
-minh: int; [[Pointer to a variable where to store the minimum 
height]]
- }
-  }
-  @property group_size_max {
- get {
-[[Gets the maximum size specified -- as an EDC property -- for a
-  given Edje object
-
-  This function retrieves the object's maximum size values,
-  as declared in its EDC group definition. For instance, for an
-  Edje object of maximum size 100x100 pixels:
-  collections {
- group {
-name: "a_group";
-max: 100 100;
- }
-  }
-
-  Note: If the $max EDC property was not declared for the object,
-  this call will return the maximum size a given Edje object may
-  have, for each axis.
-
-  Note: On failure, this function will return 0x0.
-
-  See also 

[EGIT] [core/efl] master 08/16: layout: Remove sub_object_add_enable

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit aebd37cab88c5e64cc3e63a218af24100718140b
Author: Jean-Philippe Andre 
Date:   Wed Aug 2 21:39:25 2017 +0900

layout: Remove sub_object_add_enable

Same as the previous patch. This was an ugly hack. Use another
one instead.

Ref T5315
---
 src/lib/elementary/elc_ctxpopup.c  |  7 +--
 src/lib/elementary/elm_ctxpopup.eo |  2 +-
 src/lib/elementary/elm_genlist.c   | 21 ++---
 src/lib/elementary/elm_genlist.eo  |  1 -
 src/lib/elementary/elm_layout.c| 16 +++-
 src/lib/elementary/elm_layout.eo   |  5 -
 6 files changed, 11 insertions(+), 41 deletions(-)

diff --git a/src/lib/elementary/elc_ctxpopup.c 
b/src/lib/elementary/elc_ctxpopup.c
index e51ed06873..71de4ff5ec 100644
--- a/src/lib/elementary/elc_ctxpopup.c
+++ b/src/lib/elementary/elc_ctxpopup.c
@@ -615,9 +615,12 @@ _base_shift_by_arrow(Evas_Object *arrow,
 }
 
 EOLIAN static Eina_Bool
-_elm_ctxpopup_elm_layout_sub_object_add_enable(Eo *obj EINA_UNUSED, 
Elm_Ctxpopup_Data *_pd EINA_UNUSED)
+_elm_ctxpopup_elm_widget_sub_object_add(Eo *obj, Elm_Ctxpopup_Data *_pd 
EINA_UNUSED, Evas_Object *sobj)
 {
-   return EINA_FALSE;
+   /* Skipping elm_layout sub_object_add in order to ignore size hint changes.
+* Note: It is not clear WHY we are doing this. Same reason as genlist?
+*/
+   return elm_obj_widget_sub_object_add(efl_cast(obj, ELM_WIDGET_CLASS), sobj);
 }
 
 EOLIAN static void
diff --git a/src/lib/elementary/elm_ctxpopup.eo 
b/src/lib/elementary/elm_ctxpopup.eo
index bec4e67ae1..e2eff8541d 100644
--- a/src/lib/elementary/elm_ctxpopup.eo
+++ b/src/lib/elementary/elm_ctxpopup.eo
@@ -160,6 +160,7 @@ class Elm.Ctxpopup (Elm.Layout, 
Elm.Interface.Atspi_Widget_Action,
   Elm.Widget.focus_next_manager_is;
   Elm.Widget.focus_next;
   Elm.Widget.disable;
+  Elm.Widget.sub_object_add;
   Elm.Widget.translate;
   Elm.Widget.theme_apply;
   Elm.Widget.widget_event;
@@ -167,7 +168,6 @@ class Elm.Ctxpopup (Elm.Layout, 
Elm.Interface.Atspi_Widget_Action,
   Efl.Ui.Menu.first_item { get; }
   Efl.Ui.Menu.last_item { get; }
   Efl.Ui.Menu.items { get; }
-  Elm.Layout.sub_object_add_enable;
   Elm.Layout.sizing_eval;
   Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
   Elm.Interface.Atspi_Accessible.state_set { get; }
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 73b5fc086f..9e8f80d31d 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -3210,27 +3210,16 @@ _elm_genlist_elm_widget_widget_event(Eo *obj, 
Elm_Genlist_Data *sd, Evas_Object
return EINA_TRUE;
 }
 
-/* This function disables the specific code of the layout sub object add.
- * Only the widget sub_object_add is called.
- */
-EOLIAN static Eina_Bool
-_elm_genlist_elm_layout_sub_object_add_enable(Eo *obj EINA_UNUSED, 
Elm_Genlist_Data *_pd EINA_UNUSED)
-{
-   return EINA_FALSE;
-}
-
 EOLIAN static Eina_Bool
 _elm_genlist_elm_widget_sub_object_add(Eo *obj, Elm_Genlist_Data *_pd 
EINA_UNUSED, Evas_Object *sobj)
 {
-   // FIXME: THIS COMMENT IS INVALID! WE ARE NOT SKIPPING ELM_LAYOUT!
-
/* skipping layout's code, which registers size hint changing
 * callback on sub objects. this is here because items'
 * content_get() routines may change hints on the objects after
 * creation, thus issuing TOO MANY sizing_eval()'s here. they are
 * not needed at here anyway, so let's skip listening to those
 * hints changes */
-   return elm_obj_widget_sub_object_add(efl_super(obj, MY_CLASS), sobj);
+   return elm_obj_widget_sub_object_add(efl_cast(obj, ELM_WIDGET_CLASS), sobj);
 }
 
 EOLIAN static Eina_Bool
@@ -3238,20 +3227,14 @@ _elm_genlist_elm_widget_sub_object_del(Eo *obj, 
Elm_Genlist_Data *sd, Evas_Objec
 {
Eina_Bool int_ret = EINA_FALSE;
 
-   // FIXME: THIS COMMENT IS INVALID! WE ARE NOT SKIPPING ELM_LAYOUT!
-
/* XXX: hack -- also skipping sizing recalculation on
 * sub-object-del. genlist's crazy code paths (like groups and
 * such) seem to issue a whole lot of deletions and Evas bitches
 * about too many recalculations */
sd->on_sub_del = EINA_TRUE;
-
int_ret = elm_obj_widget_sub_object_del(efl_super(obj, MY_CLASS), sobj);
-   if (!int_ret) return EINA_FALSE;
-
sd->on_sub_del = EINA_FALSE;
-
-   return EINA_TRUE;
+   return int_ret;
 }
 
 /*
diff --git a/src/lib/elementary/elm_genlist.eo 
b/src/lib/elementary/elm_genlist.eo
index 9b88715199..9d08cd4e9f 100644
--- a/src/lib/elementary/elm_genlist.eo
+++ b/src/lib/elementary/elm_genlist.eo
@@ -544,7 +544,6 @@ class Elm.Genlist (Elm.Layout, Elm.Interface_Scrollable, 
Efl.Ui.Clickable,
   Elm.Widget.widget_event;
   Elm.Widget.focused_item { get; }
   Elm.Widget.item_loop_enabled { get; set; }
-  Elm.Layout.sub_object_add_enable;
   

[EGIT] [core/efl] master 03/16: cursor: EO-ify elm_cursor API

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit aeacb54c35a62aac62e8cb5c4d2f40354ea4590b
Author: Jean-Philippe Andre 
Date:   Wed Aug 2 18:35:57 2017 +0900

cursor: EO-ify elm_cursor API

This creates an interface and makes Elm.Widget implement it.
Next step: make elm_layout parts implement it.

Ref T5315
---
 src/Makefile_Elementary.am  |   1 +
 src/lib/elementary/efl_ui_cursor.eo |  71 
 src/lib/elementary/elm_cursor.h | 104 +++-
 src/lib/elementary/elm_widget.eo|   5 +-
 src/lib/elementary/els_cursor.c |  28 +-
 5 files changed, 99 insertions(+), 110 deletions(-)

diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 993e13032e..20cd18884c 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -122,6 +122,7 @@ elm_public_eolian_files = \
lib/elementary/efl_ui_text_editable.eo \
lib/elementary/efl_config_global.eo \
lib/elementary/efl_ui_clock.eo \
+   lib/elementary/efl_ui_cursor.eo \
lib/elementary/efl_ui_image_factory.eo \
lib/elementary/efl_ui_focus_manager.eo \
lib/elementary/efl_ui_focus_manager_sub.eo \
diff --git a/src/lib/elementary/efl_ui_cursor.eo 
b/src/lib/elementary/efl_ui_cursor.eo
new file mode 100644
index 00..9bb73c0a02
--- /dev/null
+++ b/src/lib/elementary/efl_ui_cursor.eo
@@ -0,0 +1,71 @@
+interface Efl.Ui.Cursor ()
+{
+   [[An interface to define mouse cursors to use when hovering
+ over UI widgets.
+
+ The Elementary cursor is an internal smart object used to customize the
+ mouse cursor displayed over objects (or widgets). In the most common
+ scenario, the cursor decoration comes from the graphical engine Elementary
+ is running on. Those engines may provide different decorations for 
cursors,
+ and Elementary provides functions to choose them (think of X11 cursors, as
+ an example).
+
+ By default, Elementary searches cursors only from engine. There's also the
+ possibility of, besides using engine provided cursors, also use the ones
+ coming from Edje theme files. Both globally and per widget, Elementary
+ makes it possible for one to make the cursors lookup to be held on engines
+ only or on Elementary's theme file, too. To set cursor's hot spot, two 
data
+ items should be added to cursor's theme: "hot_x" and "hot_y", that are the
+ offset from upper-left corner of the cursor (coordinates 0,0).
+   ]]
+   legacy_prefix: elm_object;
+   methods {
+  @property cursor {
+ [[The cursor to be shown when mouse is over the object
+
+   This is the cursor that will be displayed when mouse is over the
+   object. The object can have only one cursor set to it, so if
+   @.cursor.set is called twice for an object, the previous set
+   will be unset.
+
+   If using X cursors, a definition of all the valid cursor names
+   is listed on Elementary_Cursors.h. If an invalid name is set
+   the default cursor will be used.
+ ]]
+ set {
+[[Sets or unsets the current cursor.
+
+  If $cursor is $null this function will reset the cursor
+  to the default one.
+]]
+ }
+ get { [[Returns the current cursor name.]] }
+ values {
+cursor: string @nullable; [[The cursor name, defined either
+by the display system or the theme.]]
+ }
+  }
+  @property cursor_style {
+ [[A different style for the cursor.
+
+   This only makes sense if theme cursors are used.
+   The cursor should be set with @.cursor.set first before
+   setting its style with this property.
+ ]]
+ values {
+style: string; [[A specific style to use, eg. default,
+ transparent, ]]
+ }
+  }
+  @property cursor_theme_search_enabled {
+ [[Whether the cursor may be looked in the theme or not.
+
+   If $false, the cursor may only come from the render engine,
+   i.e. from the display manager.
+ ]]
+ values {
+allow: bool(true); [[Whether to use theme cursors.]]
+ }
+  }
+   }
+}
diff --git a/src/lib/elementary/elm_cursor.h b/src/lib/elementary/elm_cursor.h
index a7495c4f40..a3e983a1de 100644
--- a/src/lib/elementary/elm_cursor.h
+++ b/src/lib/elementary/elm_cursor.h
@@ -1,55 +1,14 @@
 /**
  * @defgroup Elm_Cursors Cursors
  * @ingroup Elementary
- *
- * The Elementary cursor is an internal smart object used to
- * customize the mouse cursor displayed over objects (or
- * widgets). In the most common scenario, the cursor decoration
- * comes from the graphical @b engine Elementary 

[EGIT] [core/efl] master 16/16: layout: Implement data_get from edje

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 4c8f87974c675497cce9e461cd064bac1d9f08c0
Author: Jean-Philippe Andre 
Date:   Thu Aug 3 18:22:29 2017 +0900

layout: Implement data_get from edje

This also implements size_min and size_max get.

Ref T5315
---
 src/lib/elementary/elm_layout.c| 28 +---
 src/lib/elementary/elm_layout.eo   | 20 +---
 src/lib/elementary/elm_layout_legacy.h | 15 +++
 3 files changed, 45 insertions(+), 18 deletions(-)

diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 500dabd8ad..0a78126c4c 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -1616,12 +1616,28 @@ elm_layout_edje_get(const Eo *obj)
return wd->resize_obj;
 }
 
-EOLIAN static const char*
-_elm_layout_data_get(const Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED, 
const char *key)
+EOLIAN static const char *
+_elm_layout_efl_canvas_layout_group_group_data_get(Eo *obj, 
Elm_Layout_Smart_Data *_pd EINA_UNUSED, const char *key)
 {
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
 
-   return edje_object_data_get(wd->resize_obj, key);
+   return efl_canvas_layout_group_data_get(wd->resize_obj, key);
+}
+
+EOLIAN static void
+_elm_layout_efl_canvas_layout_group_group_size_min_get(Eo *obj, 
Elm_Layout_Smart_Data *_pd EINA_UNUSED, int *w, int *h)
+{
+   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
+
+   efl_canvas_layout_group_size_min_get(wd->resize_obj, w, h);
+}
+
+EOLIAN static void
+_elm_layout_efl_canvas_layout_group_group_size_max_get(Eo *obj, 
Elm_Layout_Smart_Data *_pd EINA_UNUSED, int *w, int *h)
+{
+   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
+
+   efl_canvas_layout_group_size_max_get(wd->resize_obj, w, h);
 }
 
 /* layout's sizing evaluation is deferred. evaluation requests are
@@ -2444,6 +2460,12 @@ elm_layout_signal_emit(Elm_Layout *obj, const char 
*emission, const char *source
efl_canvas_layout_signal_emit(obj, emission, source);
 }
 
+EAPI const char *
+elm_layout_data_get(const Evas_Object *obj, const char *key)
+{
+   return efl_canvas_layout_group_data_get(obj, key);
+}
+
 /* End of legacy only */
 
 
diff --git a/src/lib/elementary/elm_layout.eo b/src/lib/elementary/elm_layout.eo
index 99920ee7be..d2b5e3ab6e 100644
--- a/src/lib/elementary/elm_layout.eo
+++ b/src/lib/elementary/elm_layout.eo
@@ -2,7 +2,8 @@ import edje_types;
 
 class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
   Efl.Ui.View, Efl.Ui.Model.Connect, 
Efl.Ui.Model.Factory.Connect,
-  Efl.Canvas.Layout_Calc, Efl.Canvas.Layout_Signal)
+  Efl.Canvas.Layout_Calc, Efl.Canvas.Layout_Signal,
+  Efl.Canvas.Layout_Group)
 {
[[Elementary layout class]]
legacy_prefix: elm_layout;
@@ -70,20 +71,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, 
Efl.File,
 @in height: bool; [[Restrict minimum size ot the current height.]]
  }
   }
-  data_get @const {
- [[Get the edje data from the given layout.
-
-   This function fetches data specified inside the edje theme of
-   this layout. This function return NULL if data is not found.
-
-   In EDC this comes from a data block within the group block that
-   $obj was loaded from.
- ]]
- return: string; [[The edje data string.]]
- params {
-@in key: string; [[The data key.]]
- }
-  }
}
implements {
   class.constructor;
@@ -98,6 +85,9 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, 
Efl.File,
   Efl.Canvas.Layout_Signal.signal_emit;
   //Efl.Canvas.Layout_Signal.message_send;
   //Efl.Canvas.Layout_Signal.signal_process;
+  Efl.Canvas.Layout_Group.group_data { get; }
+  Efl.Canvas.Layout_Group.group_size_min { get; }
+  Efl.Canvas.Layout_Group.group_size_max { get; }
   Elm.Widget.focus_direction;
   Elm.Widget.sub_object_add;
   Elm.Widget.theme_apply;
diff --git a/src/lib/elementary/elm_layout_legacy.h 
b/src/lib/elementary/elm_layout_legacy.h
index e26a6be06b..5f0df2bc48 100644
--- a/src/lib/elementary/elm_layout_legacy.h
+++ b/src/lib/elementary/elm_layout_legacy.h
@@ -41,6 +41,21 @@ typedef struct _Elm_Layout_Part_Alias_Description 
Elm_Layout_Part_Alias_Descript
 EAPI Evas_Object *elm_layout_add(Evas_Object *parent);
 
 /**
+ * @brief Get the edje data from the given layout.
+ *
+ * This function fetches data specified inside the edje theme of this layout.
+ * This function return NULL if data is not found.
+ *
+ * In EDC this comes from a data block within the group block that @c obj was
+ * loaded from.
+ *
+ * @param[in] key The data key.
+ *
+ * @return The edje data string.
+ */
+EAPI const char *elm_layout_data_get(const Evas_Object *obj, const char 

[EGIT] [core/efl] master 10/16: layout: Move Part_Alias struct to legacy

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 82e610032229b7d2cf71e7b8940fb5c10f67b8df
Author: Jean-Philippe Andre 
Date:   Thu Aug 3 11:19:52 2017 +0900

layout: Move Part_Alias struct to legacy

Part aliases need to be handled differently in EO.

Ref T5315
---
 src/lib/elementary/elm_layout.eo   | 17 -
 src/lib/elementary/elm_layout_legacy.h | 29 +
 2 files changed, 29 insertions(+), 17 deletions(-)

diff --git a/src/lib/elementary/elm_layout.eo b/src/lib/elementary/elm_layout.eo
index 4a13d85cb8..4e6695ff3d 100644
--- a/src/lib/elementary/elm_layout.eo
+++ b/src/lib/elementary/elm_layout.eo
@@ -1,22 +1,5 @@
 import edje_types;
 
-struct Elm.Layout_Part_Alias_Description
-{
-   [[
- Elementary Layout-based widgets may declare part proxies, i.e., aliases
- for real theme part names to expose to the API calls:
- - elm_layout_text_set()
- - elm_layout_text_get()
- - elm_layout_content_set()
- - elm_layout_content_get()
- - elm_layout_content_unset()
- and their equivalents. This list must be set on the "_smart_set_user()" 
function of inheriting widgets,
- so that part aliasing is handled automatically for them.
-   ]]
-   alias: string; [[Alternate name for a given (real) part. Calls receiving 
this string as a part name will be translated to the string at 
Elm.Layout_Part_Proxies_Description::real_part]]
-   real_part: string; [[Target part name for the alias set on 
Elm.Layout_Part_Proxies_Description::real_part. An example of usage would be 
"default" on that field, with "elm.content.swallow" on this one]]
-}
-
 class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
   Efl.Ui.View, Efl.Ui.Model.Connect, 
Efl.Ui.Model.Factory.Connect,
   Efl.Canvas.Layout_Calc)
diff --git a/src/lib/elementary/elm_layout_legacy.h 
b/src/lib/elementary/elm_layout_legacy.h
index 3fd1058a69..a7b61d038d 100644
--- a/src/lib/elementary/elm_layout_legacy.h
+++ b/src/lib/elementary/elm_layout_legacy.h
@@ -1,4 +1,33 @@
 /**
+ * Elementary Layout-based widgets may declare part proxies, i.e., aliases for
+ * real theme part names to expose to the API calls:
+ * - elm_layout_text_set()
+ * - elm_layout_text_get()
+ * - elm_layout_content_set()
+ * - elm_layout_content_get()
+ * - elm_layout_content_unset()
+ * and their equivalents. This list must be set on the "_smart_set_user()"
+ * function of inheriting widgets, so that part aliasing is handled
+ * automatically for them.
+ *
+ * @deprecated Should not be used outside of EFL internal code.
+ */
+
+struct _Elm_Layout_Part_Alias_Description
+{
+  const char *alias; /**< Alternate name for a given (real) part. Calls
+  * receiving this string as a part name will be translated
+  * to the string at
+  * Elm.Layout_Part_Proxies_Description::real_part */
+  const char *real_part; /**< Target part name for the alias set on
+  * Elm.Layout_Part_Proxies_Description::real_part. An
+  * example of usage would be "default" on that field,
+  * with "elm.content.swallow" on this one */
+};
+
+typedef struct _Elm_Layout_Part_Alias_Description 
Elm_Layout_Part_Alias_Description;
+
+/**
  * Add a new layout to the parent
  *
  * @param parent The parent object

-- 




[EGIT] [core/efl] master 11/16: layout: Improve doc for theme_set

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit fb941c457c9cf62700a2843e9f5839f707de0b49
Author: Jean-Philippe Andre 
Date:   Thu Aug 3 11:28:29 2017 +0900

layout: Improve doc for theme_set

Ref T5315
---
 src/lib/elementary/elm_layout.eo | 21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/lib/elementary/elm_layout.eo b/src/lib/elementary/elm_layout.eo
index 4e6695ff3d..d5049814ab 100644
--- a/src/lib/elementary/elm_layout.eo
+++ b/src/lib/elementary/elm_layout.eo
@@ -11,19 +11,28 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, 
Efl.File,
data: Elm_Layout_Smart_Data;
methods {
   @property theme {
+ [[The theme of this widget, defines which edje group will be used.
+
+   Based on the type of widget ($klass), a given $group and a
+   $style (usually "default"), the edje group name will be formed
+   for this object.
+ ]]
  set {
-[[Set the edje group from the elementary theme that will be used
+[[Sets the edje group from the elementary theme that will be used
   as layout.
 
-  Note that $style will be the new style of $obj too, as in an
-  \@ref elm_object_style_set call.
+  Note that $style will be the new style of this object, as in an
+  @Elm.Widget.style.
+
+  If this returns $false the widget is very likely to become
+  non-functioning.
 ]]
 return: bool; [[$true on success, $false otherwise]]
  }
  values {
-klass: string; [[The class of the group.]]
-group: string; [[The group.]]
-style: string; [[The style to used.]]
+klass: string; [[The class of the group, eg. "button".]]
+group: string("base"); [[The group, eg. "base".]]
+style: string("default"); [[The style to used, eg "default".]]
  }
   }
   sizing_eval {

-- 




[EGIT] [core/efl] master 07/16: layout: Remove method theme_enable

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit a4940ae6c98072687f1ce0442278551c4b03d06e
Author: Jean-Philippe Andre 
Date:   Wed Aug 2 21:15:50 2017 +0900

layout: Remove method theme_enable

This was an internal thing, ugly, replaced by another ugly
solution, but maybe less ugly.

Ref T5315
---
 src/lib/elementary/efl_ui_text.c  | 16 ++--
 src/lib/elementary/efl_ui_text.eo |  1 -
 src/lib/elementary/elm_entry.c| 16 ++--
 src/lib/elementary/elm_entry.eo   |  1 -
 src/lib/elementary/elm_layout.c   | 22 +-
 src/lib/elementary/elm_layout.eo  |  5 -
 6 files changed, 17 insertions(+), 44 deletions(-)

diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index 16ae6f6917..64a4935c6a 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -912,12 +912,14 @@ _efl_ui_text_elm_widget_theme_apply(Eo *obj, 
Efl_Ui_Text_Data *sd)
 {
const char *str;
const char *style = elm_widget_style_get(obj);
+   Elm_Theme_Apply theme_apply;
 
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
 
-   Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED;
-   int_ret = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
-   if (!int_ret) return ELM_THEME_APPLY_FAILED;
+   // Note: We are skipping elm_layout here! This is by design.
+   // This assumes the following inheritance: my_class -> layout -> widget ...
+   theme_apply = elm_obj_widget_theme_apply(efl_cast(obj, ELM_WIDGET_CLASS));
+   if (!theme_apply) return ELM_THEME_APPLY_FAILED;
 
evas_event_freeze(evas_object_evas_get(obj));
 
@@ -1031,7 +1033,7 @@ _efl_ui_text_elm_widget_theme_apply(Eo *obj, 
Efl_Ui_Text_Data *sd)
 
evas_object_unref(obj);
 
-   return int_ret;
+   return theme_apply;
 }
 
 static void
@@ -3328,12 +3330,6 @@ _efl_ui_text_efl_canvas_group_group_member_add(Eo *obj, 
Efl_Ui_Text_Data *sd, Ev
  evas_object_raise(sd->hit_rect);
 }
 
-EOLIAN static Eina_Bool
-_efl_ui_text_elm_layout_theme_enable(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd 
EINA_UNUSED)
-{
-   return EINA_FALSE;
-}
-
 static void
 _cb_added(void *data EINA_UNUSED, const Efl_Event *ev)
 {
diff --git a/src/lib/elementary/efl_ui_text.eo 
b/src/lib/elementary/efl_ui_text.eo
index 9793c5146f..d06700e922 100644
--- a/src/lib/elementary/efl_ui_text.eo
+++ b/src/lib/elementary/efl_ui_text.eo
@@ -412,7 +412,6 @@ class Efl.Ui.Text (Elm.Layout, Elm.Interface_Scrollable, 
Efl.Ui.Clickable,
   Elm.Widget.disable;
   Elm.Widget.sub_object_del;
   Elm.Widget.focus_next_manager_is;
-  Elm.Layout.theme_enable;
   Elm.Layout.sizing_eval;
   Elm.Layout.signal_callback_add;
   Elm.Layout.signal_callback_del;
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 09de69e8eb..677cd8e0a7 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -862,12 +862,14 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data 
*sd)
const char *t;
const char *stl_user;
const char *style = elm_widget_style_get(obj);
+   Elm_Theme_Apply theme_apply;
 
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, ELM_THEME_APPLY_FAILED);
 
-   Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED;
-   int_ret = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
-   if (!int_ret) return ELM_THEME_APPLY_FAILED;
+   // Note: We are skipping elm_layout here! This is by design.
+   // This assumes the following inheritance: my_class -> layout -> widget ...
+   theme_apply = elm_obj_widget_theme_apply(efl_cast(obj, ELM_WIDGET_CLASS));
+   if (!theme_apply) return ELM_THEME_APPLY_FAILED;
 
evas_event_freeze(evas_object_evas_get(obj));
 
@@ -1001,7 +1003,7 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data 
*sd)
 
evas_object_unref(obj);
 
-   return int_ret;
+   return theme_apply;
 }
 
 static void
@@ -4010,12 +4012,6 @@ _elm_entry_efl_canvas_group_group_member_add(Eo *obj, 
Elm_Entry_Data *sd, Evas_O
  evas_object_raise(sd->hit_rect);
 }
 
-EOLIAN static Eina_Bool
-_elm_entry_elm_layout_theme_enable(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd 
EINA_UNUSED)
-{
-   return EINA_FALSE;
-}
-
 EAPI Evas_Object *
 elm_entry_add(Evas_Object *parent)
 {
diff --git a/src/lib/elementary/elm_entry.eo b/src/lib/elementary/elm_entry.eo
index 3eb3b3533e..92978ad681 100644
--- a/src/lib/elementary/elm_entry.eo
+++ b/src/lib/elementary/elm_entry.eo
@@ -962,7 +962,6 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, 
Efl.Ui.Clickable,
   Elm.Widget.disable;
   Elm.Widget.sub_object_del;
   Elm.Widget.focus_next_manager_is;
-  Elm.Layout.theme_enable;
   Elm.Layout.sizing_eval;
   Elm.Layout.signal_callback_add;
   Elm.Layout.signal_callback_del;
diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 1dabb1f356..df3a35dfe8 

[EGIT] [core/efl] master 02/16: layout: Move edje_object_can_access to legacy

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit f63a5648179bec9e9d817cdb7227d1d902b3c439
Author: Jean-Philippe Andre 
Date:   Wed Aug 2 15:17:54 2017 +0900

layout: Move edje_object_can_access to legacy

This is an API enabling accessibility on text(block) parts
in a layout. But it is said to have many issues. I can already
see that it only changes a flag but doesn't trigger any code
to create the appropriate objects, so definitely not fully
working.

According to @kimcinoo this may remain in legacy land for now.
---
 src/lib/elementary/elm_layout.c| 12 
 src/lib/elementary/elm_layout.eo   | 23 ---
 src/lib/elementary/elm_layout_legacy.h | 28 
 3 files changed, 36 insertions(+), 27 deletions(-)

diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index c4a33568f3..66922ce911 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -1870,16 +1870,20 @@ _elm_layout_part_cursor_engine_only_get(const Eo *obj 
EINA_UNUSED, Elm_Layout_Sm
return !elm_object_cursor_theme_search_enabled_get(pc->obj);
 }
 
-EOLIAN static Eina_Bool
-_elm_layout_edje_object_can_access_set(Eo *obj EINA_UNUSED, 
Elm_Layout_Smart_Data *sd, Eina_Bool can_access)
+EAPI Eina_Bool
+elm_layout_edje_object_can_access_set(Eo *obj, Eina_Bool can_access)
 {
+   Elm_Layout_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE);
sd->can_access = !!can_access;
return EINA_TRUE;
 }
 
-EOLIAN static Eina_Bool
-_elm_layout_edje_object_can_access_get(Eo *obj EINA_UNUSED, 
Elm_Layout_Smart_Data *sd)
+EAPI Eina_Bool
+elm_layout_edje_object_can_access_get(const Eo *obj)
 {
+   Elm_Layout_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE);
return sd->can_access;
 }
 
diff --git a/src/lib/elementary/elm_layout.eo b/src/lib/elementary/elm_layout.eo
index b03518dbfd..0e11461bf4 100644
--- a/src/lib/elementary/elm_layout.eo
+++ b/src/lib/elementary/elm_layout.eo
@@ -26,29 +26,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, 
Efl.File,
event_prefix: elm_layout;
data: Elm_Layout_Smart_Data;
methods {
-  @property edje_object_can_access {
- set {
-[[Set accessibility to all texblock(text) parts in the layout
-  object.
-
-  @since 1.7
-]]
-return: bool; [[$true on success or $false on failure. If $obj
-is not a proper layout object, $false is 
returned.]]
- }
- get {
-[[Get accessibility state of texblock(text) parts in the layout
-  object
-
-  @since 1.7
-]]
- }
- values {
-can_access: bool; [[Makes all textblock(text) parts in the layout
-$obj possible to have accessibility. $true
-means textblock(text) parts can be 
accessible.]]
- }
-  }
   @property theme {
  set {
 [[Set the edje group from the elementary theme that will be used
diff --git a/src/lib/elementary/elm_layout_legacy.h 
b/src/lib/elementary/elm_layout_legacy.h
index dc245f8fe2..24228ed861 100644
--- a/src/lib/elementary/elm_layout_legacy.h
+++ b/src/lib/elementary/elm_layout_legacy.h
@@ -391,4 +391,32 @@ EAPI Eina_Bool elm_layout_text_set(Evas_Object *obj, const 
char * part, const ch
  */
 EAPI const char *elm_layout_text_get(const Evas_Object *obj, const char * 
part);
 
+/**
+ * @brief Set accessibility to all texblock(text) parts in the layout object.
+ *
+ * @param[in] can_access Makes all textblock(text) parts in the layout @c obj
+ * possible to have accessibility. @c true means textblock(text) parts can be
+ * accessible.
+ *
+ * @return @c true on success or @c false on failure. If @c obj is not a proper
+ * layout object, @c false is returned.
+ *
+ * @since 1.7
+ *
+ * @ingroup Elm_Layout
+ */
+EAPI Eina_Bool elm_layout_edje_object_can_access_set(Evas_Object *obj, 
Eina_Bool can_access);
+
+/**
+ * @brief Get accessibility state of texblock(text) parts in the layout object
+ *
+ * @return Makes all textblock(text) parts in the layout @c obj possible to
+ * have accessibility. @c true means textblock(text) parts can be accessible.
+ *
+ * @since 1.7
+ *
+ * @ingroup Elm_Layout
+ */
+EAPI Eina_Bool elm_layout_edje_object_can_access_get(const Evas_Object *obj);
+
 #include "elm_layout.eo.legacy.h"

-- 




[EGIT] [core/efl] master 05/16: layout: Implement freeze and thaw from interface

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 7ba0ab5182aaff4d90d9ccabe00a33933fc475df
Author: Jean-Philippe Andre 
Date:   Wed Aug 2 20:46:16 2017 +0900

layout: Implement freeze and thaw from interface

This implements part of the interface
  Efl.Canvas.Layout_Calc
---
 src/lib/elementary/elm_layout.c| 20 +++-
 src/lib/elementary/elm_layout.eo   | 28 
 src/lib/elementary/elm_layout_legacy.h | 26 ++
 3 files changed, 45 insertions(+), 29 deletions(-)

diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 0d7f5eeb28..1dabb1f356 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -1703,10 +1703,9 @@ _elm_layout_sizing_restricted_eval(Eo *obj, 
Elm_Layout_Smart_Data *sd, Eina_Bool
 }
 
 EOLIAN static int
-_elm_layout_freeze(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
+_elm_layout_efl_canvas_layout_calc_calc_freeze(Eo *obj, Elm_Layout_Smart_Data 
*sd)
 {
-   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 1);
-   ELM_LAYOUT_DATA_GET(obj, sd);
+   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 0);
 
if ((sd->frozen)++ != 0) return sd->frozen;
 
@@ -1716,10 +1715,9 @@ _elm_layout_freeze(Eo *obj, Elm_Layout_Smart_Data *_pd 
EINA_UNUSED)
 }
 
 EOLIAN static int
-_elm_layout_thaw(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
+_elm_layout_efl_canvas_layout_calc_calc_thaw(Eo *obj, Elm_Layout_Smart_Data 
*sd)
 {
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 0);
-   ELM_LAYOUT_DATA_GET(obj, sd);
 
if (--(sd->frozen) != 0) return sd->frozen;
 
@@ -2390,6 +2388,18 @@ elm_layout_part_cursor_unset(Elm_Layout *obj, const char 
*part)
return efl_ui_cursor_set(efl_part(obj, part), NULL);
 }
 
+EAPI int
+elm_layout_freeze(Evas_Object *obj)
+{
+   return efl_canvas_layout_calc_freeze(obj);
+}
+
+EAPI int
+elm_layout_thaw(Evas_Object *obj)
+{
+   return efl_canvas_layout_calc_thaw(obj);
+}
+
 /* End of legacy only */
 
 
diff --git a/src/lib/elementary/elm_layout.eo b/src/lib/elementary/elm_layout.eo
index 66e8699f57..8d82f96a1a 100644
--- a/src/lib/elementary/elm_layout.eo
+++ b/src/lib/elementary/elm_layout.eo
@@ -18,7 +18,8 @@ struct Elm.Layout_Part_Alias_Description
 }
 
 class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
- Efl.Ui.View, Efl.Ui.Model.Connect, 
Efl.Ui.Model.Factory.Connect)
+  Efl.Ui.View, Efl.Ui.Model.Connect, 
Efl.Ui.Model.Factory.Connect,
+  Efl.Canvas.Layout_Calc)
 {
[[Elementary layout class]]
legacy_prefix: elm_layout;
@@ -61,16 +62,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, 
Efl.File,
  settings loaded \@ref 
elm_layout_file_set.]]
  }
   }
-  freeze {
- [[Freezes the Elementary layout object.
-
-   This function puts all changes on hold. Successive freezes will
-   nest, requiring an equal number of thaws.
-
-   See also @.thaw.
- ]]
- return: int; [[The frozen state or 0 on error.]]
-  }
   theme_enable {
 [[Enable theme]]
  legacy: null;
@@ -178,19 +169,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, 
Efl.File,
 when the signal was emitted.]]
  }
   }
-  thaw {
- [[Thaws the Elementary object.
-
-   This function thaws the given Edje object and the Elementary
-   sizing calc.
-
-   Note: If sucessives freezes were done, an equal number of
-   thaws will be required.
-
-   See also @.freeze.
- ]]
- return: int; [[The frozen state or 0 if the object is not frozen or 
on error.]]
-  }
   signal_emit {
  [[Send a (Edje) signal to a given layout widget's underlying Edje
object.
@@ -212,6 +190,8 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, 
Efl.File,
   Efl.File.file { get; set; }
   Efl.File.mmap { get; set; }
   Efl.Canvas.Group.group_calculate;
+  Efl.Canvas.Layout_Calc.calc_freeze;
+  Efl.Canvas.Layout_Calc.calc_thaw;
   Elm.Widget.focus_direction;
   Elm.Widget.sub_object_add;
   Elm.Widget.theme_apply;
diff --git a/src/lib/elementary/elm_layout_legacy.h 
b/src/lib/elementary/elm_layout_legacy.h
index d619dd54de..0769014eaf 100644
--- a/src/lib/elementary/elm_layout_legacy.h
+++ b/src/lib/elementary/elm_layout_legacy.h
@@ -128,6 +128,32 @@ EAPI Eina_Bool elm_layout_mmap_set(Eo *obj, const 
Eina_File *file, const char *g
 EAPI void elm_layout_mmap_get(Eo *obj, const Eina_File **file, const char 
**group);
 
 /**
+ * @brief Freezes the Elementary layout object.
+ *
+ * This function puts all changes on hold. Successive freezes will nest,
+ * requiring an equal number of thaws.
+ *
+ * See also @ref 

[EGIT] [core/efl] master 14/16: elm: Remove custom layout signal APIs

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 3e5cfb83c092652cf0306b7f4b1a0b230fdf21bf
Author: Jean-Philippe Andre 
Date:   Thu Aug 3 17:24:50 2017 +0900

elm: Remove custom layout signal APIs

This merges them with the now standard interface:
  Efl.Canvas.Layout_Signal

Some wrapping work was required for legacy API which
takes no user_data in del() but instead returns it. The
new EO function, while harder to use, is more correct
(you can't delete the invalid callback by accident, and
this follows EO events design).

Another crazy wrapping was done in entry/text in order
to add the callbacks to 2 objects instead of just one,
and still return the user data.

As for Naviframe and Popup, those two widgets override
signal_emit to forward the call to another object than
the resize object, but not callback_add/del. So they
are definitely broken.

Ref T5315
---
 src/lib/elementary/efl_ui_image.c  |   2 +-
 src/lib/elementary/efl_ui_image.eo |   2 +-
 src/lib/elementary/efl_ui_text.c   |  64 -
 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 |  76 ---
 src/lib/elementary/elm_entry.eo|   6 +-
 src/lib/elementary/elm_layout.c| 169 +++--
 src/lib/elementary/elm_layout.eo   |  69 ++
 src/lib/elementary/elm_layout_legacy.h |  54 +++
 src/lib/elementary/elm_naviframe.eo|   2 +-
 src/lib/elementary/elm_popup.eo|   2 +-
 src/lib/elementary/elm_priv.h  |   7 ++
 src/lib/elementary/elm_widget_entry.h  |   1 +
 src/tests/elementary/elm_test_entry.c  |  48 ++
 16 files changed, 306 insertions(+), 208 deletions(-)

diff --git a/src/lib/elementary/efl_ui_image.c 
b/src/lib/elementary/efl_ui_image.c
index ef433b034b..c779ff17dd 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -1168,7 +1168,7 @@ _efl_ui_image_efl_file_file_set(Eo *obj, 
Efl_Ui_Image_Data *sd, const char *file
 }
 
 EOLIAN static void
-_efl_ui_image_edje_object_signal_emit(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data 
*sd, const char *emission, const char *source)
+_efl_ui_image_efl_canvas_layout_signal_signal_emit(Eo *obj EINA_UNUSED, 
Efl_Ui_Image_Data *sd, const char *emission, const char *source)
 {
if (sd->edje)
  edje_object_signal_emit(sd->img, emission, source);
diff --git a/src/lib/elementary/efl_ui_image.eo 
b/src/lib/elementary/efl_ui_image.eo
index 62747bec83..973c8c932b 100644
--- a/src/lib/elementary/efl_ui_image.eo
+++ b/src/lib/elementary/efl_ui_image.eo
@@ -135,7 +135,7 @@ class Efl.Ui.Image (Elm.Widget, Efl.Ui.Clickable, 
Efl.Ui.Draggable,
   Efl.Flipable.flip { get; set; }
   Efl.Player.playable { get; }
   Efl.Player.play { get; set; }
-  Edje.Object.signal_emit;
+  Efl.Canvas.Layout_Signal.signal_emit;
   Edje.Object.group_size_min { get; }
   Edje.Object.group_size_max { get; }
   Efl.Canvas.Layout_Calc.calc_size_min;
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index 64a4935c6a..311a5bebbb 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -2573,69 +2573,43 @@ _markup_filter_cb(void *data,
 }
 
 EOLIAN static void
-_efl_ui_text_elm_layout_signal_emit(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, 
const char *emission, const char *source)
+_efl_ui_text_efl_canvas_layout_signal_signal_emit(Eo *obj EINA_UNUSED, 
Efl_Ui_Text_Data *sd, const char *emission, const char *source)
 {
/* always pass to both edje objs */
-   edje_object_signal_emit(sd->entry_edje, emission, source);
-   edje_object_message_signal_process(sd->entry_edje);
+   efl_canvas_layout_signal_emit(sd->entry_edje, emission, source);
+
+   // FIXME: This should not be here!
+   efl_canvas_layout_signal_process(sd->entry_edje, EINA_TRUE);
 
if (sd->scr_edje)
  {
-edje_object_signal_emit(sd->scr_edje, emission, source);
-edje_object_message_signal_process(sd->scr_edje);
+efl_canvas_layout_signal_emit(sd->scr_edje, emission, source);
+efl_canvas_layout_signal_process(sd->scr_edje, EINA_TRUE); // FIXME
  }
 }
 
-EOLIAN static void
-_efl_ui_text_elm_layout_signal_callback_add (Eo *obj, Efl_Ui_Text_Data *sd, 
const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)
+EOLIAN static Eina_Bool
+_efl_ui_text_efl_canvas_layout_signal_signal_callback_add(Eo *obj EINA_UNUSED, 
Efl_Ui_Text_Data *sd, const char *emission, const char *source, Edje_Signal_Cb 
func_cb, void *data)
 {
-   Evas_Object *ro;
-
-   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
-
-   ro = wd->resize_obj;
-
-   wd->resize_obj = sd->entry_edje;
-
-   

[EGIT] [core/efl] master 01/16: edje: Split off calc APIs to an interface (EO)

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 6df17b2ed00bb8cfc3ec414d452253d39d22b075
Author: Jean-Philippe Andre 
Date:   Tue Aug 1 18:15:34 2017 +0900

edje: Split off calc APIs to an interface (EO)

Those APIs can then be used by Elm.Layout, hopefully
simplifying the API.

I wonder if the APIs should be prefixed "calc_" (as is)
or "layout_calc_". The extra "layout_" prefix would make
it common with other layout APIs (eg. signals, data,
size min/max, ...).

Ref T5315
---
 src/Makefile_Edje.am   |   1 +
 src/lib/edje/Edje_Eo.h |   1 +
 src/lib/edje/Edje_Legacy.h | 149 +
 src/lib/edje/edje_legacy.c |  50 +++
 src/lib/edje/edje_object.eo| 136 ++
 src/lib/edje/edje_private.h|   1 +
 src/lib/edje/edje_smart.c  |   1 +
 src/lib/edje/edje_util.c   |  16 ++--
 src/lib/edje/efl_canvas_layout_calc.eo | 131 +
 src/lib/elementary/efl_ui_image.c  |   5 +-
 src/lib/elementary/efl_ui_image.eo |   6 +-
 11 files changed, 356 insertions(+), 141 deletions(-)

diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index 4ca20e570b..bf1a7f9a25 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -2,6 +2,7 @@
 ### Library
 
 edje_eolian_files = \
+   lib/edje/efl_canvas_layout_calc.eo \
lib/edje/edje_object.eo \
lib/edje/efl_canvas_layout_internal.eo \
lib/edje/efl_canvas_layout_internal_box.eo \
diff --git a/src/lib/edje/Edje_Eo.h b/src/lib/edje/Edje_Eo.h
index 23d836646c..44dd896db0 100644
--- a/src/lib/edje/Edje_Eo.h
+++ b/src/lib/edje/Edje_Eo.h
@@ -1,5 +1,6 @@
 #include 
 
+#include "efl_canvas_layout_calc.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 c37c9068e7..2adee590bf 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -214,6 +214,155 @@ EAPI const char *edje_object_part_state_get(const 
Edje_Object *obj, const char *
 EAPI const Efl_Canvas_Object *edje_object_part_object_get(const Edje_Object 
*obj, const char * part);
 
 /**
+ * @brief Whether this object updates its size hints automatically.
+ *
+ * By default edje doesn't set size hints on itself. If this property is set to
+ * @c true, size hints will be updated after recalculation. Be careful, as
+ * recalculation may happen often, enabling this property may have a
+ * considerable performance impact as other widgets will be notified of the
+ * size hints changes.
+ *
+ * A layout recalculation can be triggered by @ref edje_object_size_min_calc(),
+ * @ref edje_object_size_min_restricted_calc(),
+ * @ref edje_object_parts_extends_calc() or even any other internal event.
+ *
+ * Enable or disable auto-update of size hints.
+ *
+ * @param[in] update Whether or not update the size hints.
+ *
+ * @ingroup Edje_Object
+ */
+EAPI void edje_object_update_hints_set(Edje_Object *obj, Eina_Bool update);
+
+/**
+ * @brief Whether this object updates its size hints automatically.
+ *
+ * By default edje doesn't set size hints on itself. If this property is set to
+ * @c true, size hints will be updated after recalculation. Be careful, as
+ * recalculation may happen often, enabling this property may have a
+ * considerable performance impact as other widgets will be notified of the
+ * size hints changes.
+ *
+ * A layout recalculation can be triggered by @ref edje_object_size_min_calc(),
+ * @ref edje_object_size_min_restricted_calc(),
+ * @ref edje_object_parts_extends_calc() or even any other internal event.
+ *
+ * Whether this object updates its size hints automatically.
+ *
+ * @return Whether or not update the size hints.
+ *
+ * @ingroup Edje_Object
+ */
+EAPI Eina_Bool edje_object_update_hints_get(const Edje_Object *obj);
+
+/**
+ * @brief Calculates the minimum required size for a given Edje object.
+ *
+ * This call works exactly as edje_object_size_min_restricted_calc(), with the
+ * last two arguments set to 0. Please refer to its documentation, then.
+ *
+ * @param[out] minw The minimum required width (return value)
+ * @param[out] minh The minimum required height (return value)
+ *
+ * @ingroup Edje_Object
+ */
+EAPI void edje_object_size_min_calc(Edje_Object *obj, int *minw, int *minh);
+
+/**
+ * @brief Calculates the minimum required size for a given Edje object.
+ *
+ * This call will trigger an internal recalculation of all parts of the object,
+ * in order to return its minimum required dimensions for width and height. The
+ * user might choose to impose those minimum sizes, making the resulting
+ * calculation to get to values equal or larger than @c restrictedw and
+ * @c restrictedh, for width and height, respectively.
+ *
+ * 

[EGIT] [core/efl] master 09/16: layout: Move edje_get to legacy only

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit f0730f6f4ce7e9da485a6b9ddf0f5571c4b1a93e
Author: Jean-Philippe Andre 
Date:   Thu Aug 3 10:29:21 2017 +0900

layout: Move edje_get to legacy only

Here's the reasoning:
 1. We will expose as many edje APIs as possible (and meaningful)
through the elm layout class.
 2. Access to internal objects is usually risky, as it allows apps
to bypass EFL in some ways, leading to potentially undefined
behaviours.
 3. If the need arises we can still add a similar API back to EO,
later.

Back to #1, it seems that the need for edje_get() was mostly to
call manual sizing functions, or the missing message_send(). I will
make sure these are accessible from the layout itself.

Ref T5315
---
 src/lib/elementary/elm_layout.c|  5 +++--
 src/lib/elementary/elm_layout.eo   | 19 ---
 src/lib/elementary/elm_layout_legacy.h | 20 
 3 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 1e3962b7a3..21ece8b98b 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -1641,9 +1641,10 @@ _elm_layout_table_clear(Eo *obj, Elm_Layout_Smart_Data 
*sd, const char *part, Ei
return EINA_TRUE;
 }
 
-EOLIAN static Evas_Object*
-_elm_layout_edje_get(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
+EAPI Evas_Object*
+elm_layout_edje_get(const Eo *obj)
 {
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(obj, MY_CLASS), NULL);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
 
return wd->resize_obj;
diff --git a/src/lib/elementary/elm_layout.eo b/src/lib/elementary/elm_layout.eo
index bdd91673a6..4a13d85cb8 100644
--- a/src/lib/elementary/elm_layout.eo
+++ b/src/lib/elementary/elm_layout.eo
@@ -43,25 +43,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, 
Efl.File,
 style: string; [[The style to used.]]
  }
   }
-  @property edje {
- get {
-[[Get the edje layout
-
-  This returns the edje object. It is not expected to be used
-  to then swallow objects via \@ref edje_object_part_swallow
-  for example. Use \@ref elm_layout_content_set instead so
-  child object handling and sizing is done properly.
-
-  Note: This function should only be used if you really need
-  to call some low level Edje function on this edje object.
-  All the common stuff (setting text, emitting signals,
-  hooking callbacks to signals, etc.) can be done with
-  proper elementary functions.
-]]
-return: Efl.Canvas.Object; [[An Evas_Object with the edje layout
- settings loaded \@ref 
elm_layout_file_set.]]
- }
-  }
   sizing_eval {
  [[Eval sizing.
 
diff --git a/src/lib/elementary/elm_layout_legacy.h 
b/src/lib/elementary/elm_layout_legacy.h
index 0769014eaf..3fd1058a69 100644
--- a/src/lib/elementary/elm_layout_legacy.h
+++ b/src/lib/elementary/elm_layout_legacy.h
@@ -12,6 +12,26 @@
 EAPI Evas_Object *elm_layout_add(Evas_Object *parent);
 
 /**
+ * @brief Get the edje layout
+ *
+ * This returns the edje object. It is not expected to be used to then swallow
+ * objects via @ref edje_object_part_swallow for example. Use @ref
+ * elm_layout_content_set instead so child object handling and sizing is done
+ * properly.
+ *
+ * @note This function should only be used if you really need to call some low
+ * level Edje function on this edje object. All the common stuff (setting text,
+ * emitting signals, hooking callbacks to signals, etc.) can be done with
+ * proper elementary functions.
+ *
+ * @return An Evas_Object with the edje layout settings loaded @ref
+ * elm_layout_file_set.
+ *
+ * @ingroup Elm_Layout
+ */
+EAPI Efl_Canvas_Object *elm_layout_edje_get(const Evas_Object *obj);
+
+/**
  * Get the list of swallow parts of a given container widget
  *
  * @param obj The layout object

-- 




Re: [E-devel] [EGIT] [core/efl] master 04/12: eo: Add debug_name read-only property to ease debugging

2017-08-03 Thread Jean-Philippe André
Hi,

Here's a new feature:
  efl_debug_name_get(obj);

This returns a temporary string (eina_slstr) that you can use in debug logs.
Don't abuse it, but I find it extremely useful when debugging stuff in EFL.

You can improve the debug string by overriding "debug_name_override" in
subclasses. Follow the examples & the doc.

Hope you guys like it!


2017-08-04 11:02 GMT+09:00 Jean-Philippe ANDRÉ <j...@videolan.org>:

> jpeg pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=
> c4769ff8989bab2b745017b843f073e5737e91e0
>
> commit c4769ff8989bab2b745017b843f073e5737e91e0
> Author: Jean-Philippe Andre <jp.an...@samsung.com>
> Date:   Fri Jul 14 15:57:36 2017 +0900
>
> eo: Add debug_name read-only property to ease debugging
>
> This will include the following information, by default:
>  - class name
>  - whether the class is an override
>  - eo id (pointer)
>  - refcount
>  - name if one was set (Efl.Object property)
>
> This also supports classes, which is why it's an EAPI in eo.c
> and not only a method of Efl.Object
>
> This can be overriden by subclasses using the empty method
> Efl.Object.debug_name_override.get
>
> If the function is overriden, then the returned string is used
> as is and so it is left to the subclass to include all the
> necessary information (as above). This can easily be achieved
> by calling efl_debug_name_get(efl_super()) and then concatenating
> the strings.
>
> Think of this function as something like Java's toString(), but
> only for debugging (i.e. a string class should not just return
> its string value).
>
> @feature
> ---
>  src/lib/eo/Eo.h | 17 
>  src/lib/eo/efl_object.eo| 10 +++
>  src/lib/eo/eo.c | 61 ++
> +++
>  src/lib/eo/eo_base_class.c  |  6 
>  src/lib/eo/eo_ptr_indirection.h |  2 +-
>  5 files changed, 95 insertions(+), 1 deletion(-)
>
> diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
> index 44610e410c..16617e9dfd 100644
> --- a/src/lib/eo/Eo.h
> +++ b/src/lib/eo/Eo.h
> @@ -691,6 +691,23 @@ EAPI Eina_Bool efl_isa(const Eo *obj, const Efl_Class
> *klass);
>  EAPI const char *efl_class_name_get(const Efl_Class *klass);
>
>  /**
> + * @brief Gets a debug name for this object
> + * @param obj_id The object (or class)
> + * @return A name to use in logs and for other debugging purposes
> + *
> + * Note that subclasses can override Efl.Object "debug_name_override" to
> + * provide more meaningful debug strings. The standard format includes the
> + * class name, the object ID (this @p obj_id), the reference count and
> + * optionally the object name (as defined by Efl.Object.name).
> + *
> + * This might return a temporary string, as created by eina_slstr, which
> means
> + * that a main loop should probably be running.
> + *
> + * @since 1.21
> + */
> +EAPI const char *efl_debug_name_get(const Eo *obj_id);
> +
> +/**
>   * @}
>   */
>
> diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo
> index 33188756f5..31861a61c9 100644
> --- a/src/lib/eo/efl_object.eo
> +++ b/src/lib/eo/efl_object.eo
> @@ -81,6 +81,16 @@ abstract Efl.Object ()
> comment: string @nullable; [[The comment]]
>   }
>}
> +  @property debug_name_override {
> + [[ A read-only name for this object used for debugging.
> +
> +@since 1.21
> + ]]
> + get {}
> + values {
> +name: string; [[A name including class name and object name.]]
> + }
> +  }
>@property event_global_freeze_count @class {
>   get {
>  [[Return freeze events of object.
> diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
> index 50d8de..72db1dd0a9 100644
> --- a/src/lib/eo/eo.c
> +++ b/src/lib/eo/eo.c
> @@ -2476,6 +2476,67 @@ err:
> return EINA_FALSE;
>  }
>
> +EAPI const char *
> +efl_debug_name_get(const Eo *obj_id)
> +{
> +   const char *override = "";
> +   const char *name, *clsname, *ret;
> +
> +   if (!obj_id) return "(null)";
> +
> +   if (_eo_is_a_class(obj_id))
> + {
> +const char *clstype;
> +
> +EO_CLASS_POINTER(obj_id, klass);
> +if (!klass || !klass->desc)
> +  return eina_slstr_printf("Invalid_Class_ID(invalid)@%p",
> obj_id);
> +
> +switch (klass->desc->type)
> +  {
> +   case EFL_CLASS_TYPE_REGULAR: clstype = "regular"; break;
> +   case EFL_CLASS_TYPE_RE

Re: [E-devel] [EGIT] [core/efl] master 01/12: evas: Make all EO canvas objects visible by default

2017-08-03 Thread Jean-Philippe André
Hi,

Here's a slightly experimental patch to make EO object visible by default.
In order to not break everything, the visibility is delayed until the
beginning of render. This means that an object may appear as invisible
(visible_get() returns false) even though it will in fact be visible.

This definitely helps cutting lines of code when writing apps.

This should in theory only affect EO objects (i.e. created with efl_add()).

Please let me know if that works for you, or causes problems, or is a
terrible idea in itself.
I have a similar patch for EXPAND by default (but unlike visible, not
delayed).

Thanks,



2017-08-04 11:02 GMT+09:00 Jean-Philippe ANDRÉ <j...@videolan.org>:

> jpeg pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=
> fd9cf1d3b628f70d66ec85a4f2433c675d9ad243
>
> commit fd9cf1d3b628f70d66ec85a4f2433c675d9ad243
> Author: Jean-Philippe Andre <jp.an...@samsung.com>
> Date:   Thu Jul 6 16:29:20 2017 +0900
>
> evas: Make all EO canvas objects visible by default
>
> All legacy objects remain invisible by default. Any call to
> visible_set() will prevent the automatic show() to happen.
>
> show() will be done just before render time, which may be a
> bit too late in order to propagate the necessary changes.
>
> This may break some things where some objects are created
> internally using efl_add() instead of the legacy API, and
> the intent was not to show the object.
>
> @feature
> ---
>  src/lib/evas/canvas/efl_canvas_object.eo |  1 +
>  src/lib/evas/canvas/evas_object_image.c  |  2 +-
>  src/lib/evas/canvas/evas_object_main.c   | 36
> +---
>  src/lib/evas/canvas/evas_render.c| 25 ++
>  src/lib/evas/include/evas_private.h  | 10 +++--
>  5 files changed, 68 insertions(+), 6 deletions(-)
>
> diff --git a/src/lib/evas/canvas/efl_canvas_object.eo
> b/src/lib/evas/canvas/efl_canvas_object.eo
> index a284a43e93..b49a42addf 100644
> --- a/src/lib/evas/canvas/efl_canvas_object.eo
> +++ b/src/lib/evas/canvas/efl_canvas_object.eo
> @@ -660,6 +660,7 @@ abstract Efl.Canvas.Object (Efl.Object, Efl.Gfx,
> Efl.Gfx.Stack, Efl.Animator,
> implements {
>Efl.Object.constructor;
>Efl.Object.destructor;
> +  Efl.Object.finalize;
>Efl.Object.provider_find;
>Efl.Gfx.visible { get; set; }
>Efl.Gfx.color { get; set; }
> diff --git a/src/lib/evas/canvas/evas_object_image.c
> b/src/lib/evas/canvas/evas_object_image.c
> index 9d1440573d..269898c6b2 100644
> --- a/src/lib/evas/canvas/evas_object_image.c
> +++ b/src/lib/evas/canvas/evas_object_image.c
> @@ -1443,7 +1443,7 @@ _efl_canvas_image_internal_efl_object_destructor(Eo
> *eo_obj, Evas_Image_Data *o
>  {
> Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj,
> EFL_CANVAS_OBJECT_CLASS);
>
> -   if (obj->legacy)
> +   if (obj->legacy.ctor)
>   evas_object_image_video_surface_set(eo_obj, NULL);
> evas_object_image_free(eo_obj, obj);
> efl_destructor(efl_super(eo_obj, MY_CLASS));
> diff --git a/src/lib/evas/canvas/evas_object_main.c
> b/src/lib/evas/canvas/evas_object_main.c
> index e0a3013edf..f1fef26b00 100644
> --- a/src/lib/evas/canvas/evas_object_main.c
> +++ b/src/lib/evas/canvas/evas_object_main.c
> @@ -197,6 +197,27 @@ _efl_canvas_object_efl_object_constructor(Eo
> *eo_obj, Evas_Object_Protected_Data
> return eo_obj;
>  }
>
> +EOLIAN static Eo *
> +_efl_canvas_object_efl_object_finalize(Eo *eo_obj,
> Evas_Object_Protected_Data *obj)
> +{
> +   Evas_Public_Data *e;
> +
> +   if (!EVAS_OBJECT_DATA_ALIVE(obj)) goto end;
> +   if (obj->legacy.ctor) goto end;
> +
> +   if (obj->legacy.visible_set /* && ... */)
> + {
> +obj->legacy.finalized = EINA_TRUE;
> +goto end;
> + }
> +
> +   e = obj->layer->evas;
> +   e->finalize_objects = eina_list_prepend(e->finalize_objects, eo_obj);
> +
> +end:
> +   return efl_finalize(efl_super(eo_obj, MY_CLASS));
> +}
> +
>  void
>  evas_object_change_reset(Evas_Object_Protected_Data *obj)
>  {
> @@ -1833,6 +1854,9 @@ EOLIAN static void
>  _efl_canvas_object_efl_gfx_visible_set(Eo *eo_obj,
> Evas_Object_Protected_Data *obj,
> Eina_Bool vis)
>  {
> +   if (!obj->legacy.visible_set)
> + obj->legacy.visible_set = EINA_TRUE;
> +
> if (_evas_object_intercept_call_evas(obj, 
> EVAS_OBJECT_INTERCEPT_CB_VISIBLE,
> 1, vis))
>   return;
>
> @@ -1840,11 +1864,17 @@ _efl_canvas_object_efl_gfx_visible_set(Eo
> *eo_obj, Evas_Object_Protected_Data *o
> else _hide(eo_obj, 

[EGIT] [core/efl] master 06/12: eo debug name: Use strbuf instead of slstr

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 999dbd9764426890c0e11841358f9219082b89b2
Author: Jean-Philippe Andre 
Date:   Fri Jul 21 15:24:08 2017 +0900

eo debug name: Use strbuf instead of slstr

This should be a little bit more efficient, even if more "risky"
in terms of leaks. The final API still looks exactly the same.
---
 src/lib/edje/edje_object.eo  |  2 +-
 src/lib/edje/edje_smart.c| 15 +++
 src/lib/elementary/efl_ui_win.c  | 11 +--
 src/lib/elementary/efl_ui_win.eo |  2 +-
 src/lib/elementary/elm_widget.c  | 11 ++-
 src/lib/elementary/elm_widget.eo |  2 +-
 src/lib/eo/efl_object.eo | 21 +++-
 src/lib/eo/eina_types.eot|  1 +
 src/lib/eo/eo.c  | 33 
 src/lib/eo/eo_base_class.c   |  6 +++---
 src/lib/evas/canvas/efl_canvas_group.eo  |  2 +-
 src/lib/evas/canvas/efl_canvas_object.eo |  2 +-
 src/lib/evas/canvas/evas_main.c  |  8 
 src/lib/evas/canvas/evas_name.c  | 16 
 src/lib/evas/canvas/evas_object_smart.c  | 11 +--
 15 files changed, 76 insertions(+), 67 deletions(-)

diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index c294d43f66..be6d2e2a00 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -1176,7 +1176,7 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, 
Efl.Container, Efl.Part,
   Efl.Gfx.size { set; }
   Efl.Object.constructor;
   Efl.Object.destructor;
-  Efl.Object.debug_name_override { get; }
+  Efl.Object.debug_name_override;
   Efl.Canvas.Object.no_render { set; }
   Efl.Canvas.Object.paragraph_direction { set; }
   Efl.Canvas.Group.group_calculate;
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index 4f105ff595..070efff883 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -60,15 +60,14 @@ _edje_object_efl_object_destructor(Eo *obj, Edje 
*class_data)
efl_data_unref(obj, class_data->base);
 }
 
-EOLIAN static const char *
-_edje_object_efl_object_debug_name_override_get(Eo *obj, Edje *ed)
+EOLIAN static Eina_Strbuf *
+_edje_object_efl_object_debug_name_override(Eo *obj, Edje *ed, Eina_Strbuf *sb)
 {
-   const char *base;
-
-   base = efl_debug_name_get(efl_super(obj, MY_CLASS));
-   return eina_slstr_printf("%s:file='%s':group='%s'", base,
-ed->file ? eina_file_filename_get(ed->file->f) : 
NULL,
-ed->group);
+   sb = efl_debug_name_override(efl_super(obj, MY_CLASS), sb);
+   eina_strbuf_append_printf(sb, ":file='%s':group='%s'",
+ ed->file ? eina_file_filename_get(ed->file->f) : 
NULL,
+ ed->group);
+   return sb;
 }
 
 EOLIAN static void
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 7456cb87d4..e9ecc3c145 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -6608,13 +6608,12 @@ _efl_ui_win_class_constructor(Efl_Class *klass)
  }
 }
 
-EOLIAN static const char *
-_efl_ui_win_efl_object_debug_name_override_get(Eo *obj, Efl_Ui_Win_Data *pd)
+EOLIAN static Eina_Strbuf *
+_efl_ui_win_efl_object_debug_name_override(Eo *obj, Efl_Ui_Win_Data *pd, 
Eina_Strbuf *sb)
 {
-   const char *base;
-
-   base = efl_debug_name_get(efl_super(obj, MY_CLASS));
-   return eina_slstr_printf("%s:'%s':'%s'", base, pd->name, pd->title);
+   sb = efl_debug_name_override(efl_super(obj, MY_CLASS), sb);
+   eina_strbuf_append_printf(sb, ":'%s':'%s'", pd->name, pd->title);
+   return sb;
 }
 
 EOLIAN static Eo*
diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo
index 21b8d86c5a..91863a848d 100644
--- a/src/lib/elementary/efl_ui_win.eo
+++ b/src/lib/elementary/efl_ui_win.eo
@@ -930,7 +930,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, 
Elm.Interface.Atspi.Window,
   Efl.Object.constructor;
   Efl.Object.destructor;
   Efl.Object.finalize;
-  Efl.Object.debug_name_override { get; }
+  Efl.Object.debug_name_override;
   Efl.Gfx.visible { set; }
   Efl.Gfx.position { set; }
   Efl.Gfx.size { set; }
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 7e5380de9c..0c84c5792d 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -6234,14 +6234,15 @@ _elm_widget_efl_object_destructor(Eo *obj, 
Elm_Widget_Smart_Data *sd)
sd->on_destroy = EINA_FALSE;
 }
 
-EOLIAN static const char *
-_elm_widget_efl_object_debug_name_override_get(Eo *obj, Elm_Widget_Smart_Data 
*sd EINA_UNUSED)
+EOLIAN static Eina_Strbuf *
+_elm_widget_efl_object_debug_name_override(Eo *obj, Elm_Widget_Smart_Data *sd 

[EGIT] [core/efl] master 01/12: evas: Make all EO canvas objects visible by default

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit fd9cf1d3b628f70d66ec85a4f2433c675d9ad243
Author: Jean-Philippe Andre 
Date:   Thu Jul 6 16:29:20 2017 +0900

evas: Make all EO canvas objects visible by default

All legacy objects remain invisible by default. Any call to
visible_set() will prevent the automatic show() to happen.

show() will be done just before render time, which may be a
bit too late in order to propagate the necessary changes.

This may break some things where some objects are created
internally using efl_add() instead of the legacy API, and
the intent was not to show the object.

@feature
---
 src/lib/evas/canvas/efl_canvas_object.eo |  1 +
 src/lib/evas/canvas/evas_object_image.c  |  2 +-
 src/lib/evas/canvas/evas_object_main.c   | 36 +---
 src/lib/evas/canvas/evas_render.c| 25 ++
 src/lib/evas/include/evas_private.h  | 10 +++--
 5 files changed, 68 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/canvas/efl_canvas_object.eo 
b/src/lib/evas/canvas/efl_canvas_object.eo
index a284a43e93..b49a42addf 100644
--- a/src/lib/evas/canvas/efl_canvas_object.eo
+++ b/src/lib/evas/canvas/efl_canvas_object.eo
@@ -660,6 +660,7 @@ abstract Efl.Canvas.Object (Efl.Object, Efl.Gfx, 
Efl.Gfx.Stack, Efl.Animator,
implements {
   Efl.Object.constructor;
   Efl.Object.destructor;
+  Efl.Object.finalize;
   Efl.Object.provider_find;
   Efl.Gfx.visible { get; set; }
   Efl.Gfx.color { get; set; }
diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 9d1440573d..269898c6b2 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -1443,7 +1443,7 @@ _efl_canvas_image_internal_efl_object_destructor(Eo 
*eo_obj, Evas_Image_Data *o
 {
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
 
-   if (obj->legacy)
+   if (obj->legacy.ctor)
  evas_object_image_video_surface_set(eo_obj, NULL);
evas_object_image_free(eo_obj, obj);
efl_destructor(efl_super(eo_obj, MY_CLASS));
diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index e0a3013edf..f1fef26b00 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -197,6 +197,27 @@ _efl_canvas_object_efl_object_constructor(Eo *eo_obj, 
Evas_Object_Protected_Data
return eo_obj;
 }
 
+EOLIAN static Eo *
+_efl_canvas_object_efl_object_finalize(Eo *eo_obj, Evas_Object_Protected_Data 
*obj)
+{
+   Evas_Public_Data *e;
+
+   if (!EVAS_OBJECT_DATA_ALIVE(obj)) goto end;
+   if (obj->legacy.ctor) goto end;
+
+   if (obj->legacy.visible_set /* && ... */)
+ {
+obj->legacy.finalized = EINA_TRUE;
+goto end;
+ }
+
+   e = obj->layer->evas;
+   e->finalize_objects = eina_list_prepend(e->finalize_objects, eo_obj);
+
+end:
+   return efl_finalize(efl_super(eo_obj, MY_CLASS));
+}
+
 void
 evas_object_change_reset(Evas_Object_Protected_Data *obj)
 {
@@ -1833,6 +1854,9 @@ EOLIAN static void
 _efl_canvas_object_efl_gfx_visible_set(Eo *eo_obj, Evas_Object_Protected_Data 
*obj,
Eina_Bool vis)
 {
+   if (!obj->legacy.visible_set)
+ obj->legacy.visible_set = EINA_TRUE;
+
if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_VISIBLE, 
1, vis))
  return;
 
@@ -1840,11 +1864,17 @@ _efl_canvas_object_efl_gfx_visible_set(Eo *eo_obj, 
Evas_Object_Protected_Data *o
else _hide(eo_obj, obj);
 }
 
-static Eina_Bool
+EOLIAN static Eina_Bool
 _efl_canvas_object_efl_gfx_visible_get(Eo *eo_obj EINA_UNUSED,
Evas_Object_Protected_Data *obj)
 {
-   if (obj->delete_me) return EINA_FALSE;
+   if (!EVAS_OBJECT_DATA_ALIVE(obj)) return EINA_FALSE;
+#if 0
+   // Try to return TRUE when an object is an EO object but not yet finalized.
+   // This is disabled as it leads to render bugs.
+   if (!obj->legacy.ctor && !obj->legacy.finalized && !obj->legacy.visible_set)
+ return EINA_TRUE;
+#endif
return obj->cur->visible;
 }
 
@@ -2506,7 +2536,7 @@ EOLIAN static void
 _efl_canvas_object_legacy_ctor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
 {
EINA_SAFETY_ON_FALSE_RETURN(!efl_finalized_get(eo_obj));
-   obj->legacy = EINA_TRUE;
+   obj->legacy.ctor = EINA_TRUE;
 }
 
 
diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 7d66296f01..aaa519b36d 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -2860,6 +2860,29 @@ end:
eina_tiler_free(tiler);
 }
 
+static void
+evas_render_pre(Evas *eo_e, Evas_Public_Data *evas)
+{
+   Eo *eo_obj;
+
+   // Finalize EO objects now
+   eina_evlog("+render_pre_objects_finalize", eo_e, 

[EGIT] [core/efl] master 04/12: eo: Add debug_name read-only property to ease debugging

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit c4769ff8989bab2b745017b843f073e5737e91e0
Author: Jean-Philippe Andre 
Date:   Fri Jul 14 15:57:36 2017 +0900

eo: Add debug_name read-only property to ease debugging

This will include the following information, by default:
 - class name
 - whether the class is an override
 - eo id (pointer)
 - refcount
 - name if one was set (Efl.Object property)

This also supports classes, which is why it's an EAPI in eo.c
and not only a method of Efl.Object

This can be overriden by subclasses using the empty method
Efl.Object.debug_name_override.get

If the function is overriden, then the returned string is used
as is and so it is left to the subclass to include all the
necessary information (as above). This can easily be achieved
by calling efl_debug_name_get(efl_super()) and then concatenating
the strings.

Think of this function as something like Java's toString(), but
only for debugging (i.e. a string class should not just return
its string value).

@feature
---
 src/lib/eo/Eo.h | 17 
 src/lib/eo/efl_object.eo| 10 +++
 src/lib/eo/eo.c | 61 +
 src/lib/eo/eo_base_class.c  |  6 
 src/lib/eo/eo_ptr_indirection.h |  2 +-
 5 files changed, 95 insertions(+), 1 deletion(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 44610e410c..16617e9dfd 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -691,6 +691,23 @@ EAPI Eina_Bool efl_isa(const Eo *obj, const Efl_Class 
*klass);
 EAPI const char *efl_class_name_get(const Efl_Class *klass);
 
 /**
+ * @brief Gets a debug name for this object
+ * @param obj_id The object (or class)
+ * @return A name to use in logs and for other debugging purposes
+ *
+ * Note that subclasses can override Efl.Object "debug_name_override" to
+ * provide more meaningful debug strings. The standard format includes the
+ * class name, the object ID (this @p obj_id), the reference count and
+ * optionally the object name (as defined by Efl.Object.name).
+ *
+ * This might return a temporary string, as created by eina_slstr, which means
+ * that a main loop should probably be running.
+ *
+ * @since 1.21
+ */
+EAPI const char *efl_debug_name_get(const Eo *obj_id);
+
+/**
  * @}
  */
 
diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo
index 33188756f5..31861a61c9 100644
--- a/src/lib/eo/efl_object.eo
+++ b/src/lib/eo/efl_object.eo
@@ -81,6 +81,16 @@ abstract Efl.Object ()
comment: string @nullable; [[The comment]]
  }
   }
+  @property debug_name_override {
+ [[ A read-only name for this object used for debugging.
+
+@since 1.21
+ ]]
+ get {}
+ values {
+name: string; [[A name including class name and object name.]]
+ }
+  }
   @property event_global_freeze_count @class {
  get {
 [[Return freeze events of object.
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 50d8de..72db1dd0a9 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -2476,6 +2476,67 @@ err:
return EINA_FALSE;
 }
 
+EAPI const char *
+efl_debug_name_get(const Eo *obj_id)
+{
+   const char *override = "";
+   const char *name, *clsname, *ret;
+
+   if (!obj_id) return "(null)";
+
+   if (_eo_is_a_class(obj_id))
+ {
+const char *clstype;
+
+EO_CLASS_POINTER(obj_id, klass);
+if (!klass || !klass->desc)
+  return eina_slstr_printf("Invalid_Class_ID(invalid)@%p", obj_id);
+
+switch (klass->desc->type)
+  {
+   case EFL_CLASS_TYPE_REGULAR: clstype = "regular"; break;
+   case EFL_CLASS_TYPE_REGULAR_NO_INSTANT: clstype = "abstract"; break;
+   case EFL_CLASS_TYPE_INTERFACE: clstype = "interface"; break;
+   case EFL_CLASS_TYPE_MIXIN: clstype = "mixin"; break;
+   default: clstype = "invalid"; break;
+  }
+
+return eina_slstr_printf("%s(%s)@%p", klass->desc->name, clstype, 
obj_id);
+ }
+
+   EO_OBJ_POINTER(obj_id, obj);
+   if (!obj) return eina_slstr_printf("Invalid_Object_ID@%p", obj_id);
+
+   if (!obj->cur_klass)
+ {
+ret = efl_debug_name_override_get(obj_id);
+if (ret) goto end;
+ }
+   else
+ {
+if (obj->super)
+  ret = efl_debug_name_override_get(efl_super(obj_id, (Efl_Class *) 
obj->cur_klass->header.id));
+else
+  ret = efl_debug_name_override_get(efl_cast(obj_id, (Efl_Class *) 
obj->cur_klass->header.id));
+obj->super = EINA_FALSE;
+obj->cur_klass = NULL;
+if (ret) goto end;
+ }
+
+   name = efl_name_get(obj_id);
+   clsname = obj->klass->desc->name;
+   if (_obj_is_override(obj)) override = "(override)";
+
+   if 

[EGIT] [core/efl] master 09/12: evas: More debug_name information

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 1990104b5f351ad40367d46a99374cb0ca8234df
Author: Jean-Philippe Andre 
Date:   Thu Jul 27 15:33:22 2017 +0900

evas: More debug_name information
---
 src/lib/evas/canvas/evas_name.c | 7 +++
 src/lib/evas/canvas/evas_object_smart.c | 9 -
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_name.c b/src/lib/evas/canvas/evas_name.c
index 8f26e5c2c5..b02e4a7a94 100644
--- a/src/lib/evas/canvas/evas_name.c
+++ b/src/lib/evas/canvas/evas_name.c
@@ -79,6 +79,13 @@ _efl_canvas_object_efl_object_debug_name_override(Eo 
*eo_obj, Evas_Object_Protec
 eina_strbuf_append_printf(sb, "%s%s:(%d,%d %dx%d)", norend, clip,
   obj->cur->geometry.x, obj->cur->geometry.y,
   obj->cur->geometry.w, obj->cur->geometry.h);
+if ((obj->cur->color.r != 255) || (obj->cur->color.g != 255) ||
+(obj->cur->color.b != 255) || (obj->cur->color.a != 255))
+  {
+ eina_strbuf_append_printf(sb, ":rgba(%d,%d,%d,%d)",
+   obj->cur->color.r, obj->cur->color.g,
+   obj->cur->color.b, obj->cur->color.a);
+  }
  }
else
  {
diff --git a/src/lib/evas/canvas/evas_object_smart.c 
b/src/lib/evas/canvas/evas_object_smart.c
index 55dc84d497..98ef3a3403 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -650,8 +650,15 @@ _efl_canvas_group_efl_object_destructor(Eo *eo_obj, 
Evas_Smart_Data *o)
 EOLIAN static Eina_Strbuf *
 _efl_canvas_group_efl_object_debug_name_override(Eo *eo_obj, Evas_Smart_Data 
*o, Eina_Strbuf *sb)
 {
+   Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
+   const char *smart_class = NULL;
+
+   if (obj->smart.smart && obj->smart.smart->smart_class)
+ smart_class = obj->smart.smart->smart_class->name;
+
sb = efl_debug_name_override(efl_super(eo_obj, MY_CLASS), sb);
-   eina_strbuf_append_printf(sb, ":children=%d", 
eina_inlist_count(o->contained));
+   eina_strbuf_append_printf(sb, ":children=%d:smart_class=%s",
+ eina_inlist_count(o->contained), smart_class);
return sb;
 }
 

-- 




[EGIT] [core/efl] master 07/12: eina_slstr: Fix leak in an error case

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit b290cb5de001bcbf73b8ccea7651d78f12d512ef
Author: Jean-Philippe Andre 
Date:   Fri Jul 21 15:47:10 2017 +0900

eina_slstr: Fix leak in an error case

This function takes ownership of the incoming strbuf
---
 src/lib/eina/eina_slstr.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_slstr.c b/src/lib/eina/eina_slstr.c
index 5367db010f..143965a7e3 100644
--- a/src/lib/eina/eina_slstr.c
+++ b/src/lib/eina/eina_slstr.c
@@ -172,7 +172,7 @@ eina_slstr_strbuf_new(Eina_Strbuf *string)
if (!string) return NULL;
 
fq = _slstr_freeq_get(EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(fq, NULL);
+   EINA_SAFETY_ON_NULL_GOTO(fq, error);
 
str = eina_strbuf_release(string);
 #ifdef DEBUG
@@ -180,6 +180,10 @@ eina_slstr_strbuf_new(Eina_Strbuf *string)
 #endif
eina_freeq_ptr_add(fq, str, free, len);
return str;
+
+error:
+   eina_strbuf_free(string);
+   return NULL;
 }
 
 EAPI Eina_Slstr *

-- 




[EGIT] [core/efl] master 05/12: evas/edje/elm: Override debug_name in core classes

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 569ad0bac4590e8a18800741ea2345174c3683f3
Author: Jean-Philippe Andre 
Date:   Fri Jul 14 16:55:10 2017 +0900

evas/edje/elm: Override debug_name in core classes

This is really only a demonstration of what kind of information
we can print with efl_debug_name_get(). Hopefully this can help
debugging with printf/ERR logs and even help with live debugging
inside gdb.

This shouldn't be used for other purposes than debugging, as the
exact string format is not defined.

@feature
---
 src/lib/edje/edje_object.eo  |  1 +
 src/lib/edje/edje_smart.c| 11 +++
 src/lib/elementary/efl_ui_win.c  |  9 +
 src/lib/elementary/efl_ui_win.eo |  1 +
 src/lib/elementary/elm_widget.c  | 10 ++
 src/lib/elementary/elm_widget.eo |  1 +
 src/lib/evas/canvas/efl_canvas_group.eo  |  1 +
 src/lib/evas/canvas/efl_canvas_object.eo |  1 +
 src/lib/evas/canvas/evas_main.c  |  5 -
 src/lib/evas/canvas/evas_name.c  | 20 
 src/lib/evas/canvas/evas_object_smart.c  |  9 +
 11 files changed, 68 insertions(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index 42314c3555..c294d43f66 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -1176,6 +1176,7 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, 
Efl.Container, Efl.Part,
   Efl.Gfx.size { set; }
   Efl.Object.constructor;
   Efl.Object.destructor;
+  Efl.Object.debug_name_override { get; }
   Efl.Canvas.Object.no_render { set; }
   Efl.Canvas.Object.paragraph_direction { set; }
   Efl.Canvas.Group.group_calculate;
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index 8c6800fded..4f105ff595 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -60,6 +60,17 @@ _edje_object_efl_object_destructor(Eo *obj, Edje *class_data)
efl_data_unref(obj, class_data->base);
 }
 
+EOLIAN static const char *
+_edje_object_efl_object_debug_name_override_get(Eo *obj, Edje *ed)
+{
+   const char *base;
+
+   base = efl_debug_name_get(efl_super(obj, MY_CLASS));
+   return eina_slstr_printf("%s:file='%s':group='%s'", base,
+ed->file ? eina_file_filename_get(ed->file->f) : 
NULL,
+ed->group);
+}
+
 EOLIAN static void
 _edje_object_efl_object_dbg_info_get(Eo *eo_obj, Edje *_pd EINA_UNUSED, 
Efl_Dbg_Info *root) EINA_ARG_NONNULL(3)
 {
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 63f3957dd5..7456cb87d4 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -6608,6 +6608,15 @@ _efl_ui_win_class_constructor(Efl_Class *klass)
  }
 }
 
+EOLIAN static const char *
+_efl_ui_win_efl_object_debug_name_override_get(Eo *obj, Efl_Ui_Win_Data *pd)
+{
+   const char *base;
+
+   base = efl_debug_name_get(efl_super(obj, MY_CLASS));
+   return eina_slstr_printf("%s:'%s':'%s'", base, pd->name, pd->title);
+}
+
 EOLIAN static Eo*
 _efl_ui_win_elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *sd EINA_UNUSED)
 {
diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo
index bbc1a7f4fc..21b8d86c5a 100644
--- a/src/lib/elementary/efl_ui_win.eo
+++ b/src/lib/elementary/efl_ui_win.eo
@@ -930,6 +930,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, 
Elm.Interface.Atspi.Window,
   Efl.Object.constructor;
   Efl.Object.destructor;
   Efl.Object.finalize;
+  Efl.Object.debug_name_override { get; }
   Efl.Gfx.visible { set; }
   Efl.Gfx.position { set; }
   Efl.Gfx.size { set; }
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 3780475bdf..7e5380de9c 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -6234,6 +6234,16 @@ _elm_widget_efl_object_destructor(Eo *obj, 
Elm_Widget_Smart_Data *sd)
sd->on_destroy = EINA_FALSE;
 }
 
+EOLIAN static const char *
+_elm_widget_efl_object_debug_name_override_get(Eo *obj, Elm_Widget_Smart_Data 
*sd EINA_UNUSED)
+{
+   const char *base, *focus = "";
+
+   if (elm_obj_widget_focus_get(obj)) focus = ":focused";
+   base = efl_debug_name_get(efl_super(obj, MY_CLASS));
+   return eina_slstr_printf("%s%s", base, focus);
+}
+
 EOLIAN static Eina_Bool
 _elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Object_Item *item 
EINA_UNUSED)
 {
diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo
index 5efd4ddb89..9dfda78bc5 100644
--- a/src/lib/elementary/elm_widget.eo
+++ b/src/lib/elementary/elm_widget.eo
@@ -787,6 +787,7 @@ abstract Elm.Widget (Efl.Canvas.Group, 
Elm.Interface.Atspi_Accessible,
   Efl.Object.finalize;
   

[EGIT] [core/efl] master 10/12: frame: Implement text set/get (EO only)

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit a1509ab98d8c959a1e235715ccbdd0c273cb9c2a
Author: Jean-Philippe Andre 
Date:   Fri Jul 28 12:10:27 2017 +0900

frame: Implement text set/get (EO only)

This is required for the default style which has a title.
---
 src/lib/elementary/efl_ui_frame.c  | 12 
 src/lib/elementary/efl_ui_frame.eo |  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_frame.c 
b/src/lib/elementary/efl_ui_frame.c
index 3b3373a1e8..800d13e724 100644
--- a/src/lib/elementary/efl_ui_frame.c
+++ b/src/lib/elementary/efl_ui_frame.c
@@ -209,6 +209,18 @@ _efl_ui_frame_efl_object_constructor(Eo *obj, 
Efl_Ui_Frame_Data *_pd EINA_UNUSED
 }
 
 EOLIAN static void
+_efl_ui_frame_efl_text_text_set(Eo *obj, Efl_Ui_Frame_Data *pd EINA_UNUSED, 
const char *text)
+{
+   efl_text_set(efl_part(obj, _text_aliases[0].real_part), text);
+}
+
+EOLIAN static const char *
+_efl_ui_frame_efl_text_text_get(Eo *obj, Efl_Ui_Frame_Data *pd EINA_UNUSED)
+{
+   return efl_text_get(efl_part(obj, _text_aliases[0].real_part));
+}
+
+EOLIAN static void
 _efl_ui_frame_autocollapse_set(Eo *obj EINA_UNUSED, Efl_Ui_Frame_Data *sd, 
Eina_Bool autocollapse)
 {
 
diff --git a/src/lib/elementary/efl_ui_frame.eo 
b/src/lib/elementary/efl_ui_frame.eo
index 7050d4850d..126d99dd8c 100644
--- a/src/lib/elementary/efl_ui_frame.eo
+++ b/src/lib/elementary/efl_ui_frame.eo
@@ -1,4 +1,4 @@
-class Efl.Ui.Frame (Elm.Layout, Efl.Ui.Clickable)
+class Efl.Ui.Frame (Elm.Layout, Efl.Ui.Clickable, Efl.Text)
 {
[[Frame widget
 
@@ -62,5 +62,6 @@ class Efl.Ui.Frame (Elm.Layout, Efl.Ui.Clickable)
   Elm.Widget.focus_direction_manager_is;
   Elm.Layout.text_aliases { get; }
   Elm.Layout.content_aliases { get; }
+  Efl.Text.text { get; set; }
}
 }

-- 




[EGIT] [core/efl] master 08/12: evas: Add debug_name to image objects

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 0353eb5b7f86684690b306922013fda987aaa700
Author: Jean-Philippe Andre 
Date:   Tue Jul 25 14:42:54 2017 +0900

evas: Add debug_name to image objects
---
 src/lib/evas/canvas/efl_canvas_image_internal.eo |  1 +
 src/lib/evas/canvas/evas_image_private.h |  4 ++--
 src/lib/evas/canvas/evas_object_image.c  | 26 
 3 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/efl_canvas_image_internal.eo 
b/src/lib/evas/canvas/efl_canvas_image_internal.eo
index 2f65a48a63..f21053a371 100644
--- a/src/lib/evas/canvas/efl_canvas_image_internal.eo
+++ b/src/lib/evas/canvas/efl_canvas_image_internal.eo
@@ -10,6 +10,7 @@ abstract Efl.Canvas.Image.Internal (Efl.Canvas.Object, 
Efl.Canvas.Filter.Interna
   Efl.Object.constructor;
   Efl.Object.destructor;
   Efl.Object.finalize;
+  Efl.Object.debug_name_override;
   Efl.File.save;
   Efl.Orientation.orientation { get; set; }
   Efl.Flipable.flip { get; set; }
diff --git a/src/lib/evas/canvas/evas_image_private.h 
b/src/lib/evas/canvas/evas_image_private.h
index 91c7e22af1..4c35d5ca62 100644
--- a/src/lib/evas/canvas/evas_image_private.h
+++ b/src/lib/evas/canvas/evas_image_private.h
@@ -84,8 +84,8 @@ struct _Evas_Object_Image_State
Evas_Canvas3D_Scene *scene;
 
union {
-  const char*file;
-  Eina_File *f;
+  const char*file; // used if !mmaped_source
+  Eina_File *f; // used if mmaped_source
} u;
const char*key;
intframe;
diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 269898c6b2..802177501d 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -3664,6 +3664,32 @@ 
_evas_object_image_surface_get(Evas_Object_Protected_Data *obj, Eina_Bool create
return pd->engine_data;
 }
 
+EOLIAN static Eina_Strbuf *
+_efl_canvas_image_internal_efl_object_debug_name_override(Eo *eo_obj, 
Evas_Image_Data *o, Eina_Strbuf *sb)
+{
+   sb = efl_debug_name_override(efl_super(eo_obj, MY_CLASS), sb);
+   if (o->cur->u.f)
+ {
+const char *fname = o->cur->mmaped_source ?
+ eina_file_filename_get(o->cur->u.f) : o->cur->u.file;
+eina_strbuf_append_printf(sb, ":file='%s',key='%s'", fname, 
o->cur->key);
+ }
+   else if (o->pixels && o->pixels->func.get_pixels)
+ {
+eina_strbuf_append_printf(sb, ":get_pixels=%p:dirty=%d",
+  o->pixels->func.get_pixels, o->dirty_pixels);
+ }
+   else if (o->cur->source)
+ {
+eina_strbuf_append_printf(sb, ":proxy_source=%p", o->cur->source);
+ }
+   else
+ {
+eina_strbuf_append_printf(sb, ":unknown_image");
+ }
+   return sb;
+}
+
 #define EFL_CANVAS_IMAGE_INTERNAL_EXTRA_OPS \
EFL_OBJECT_OP_FUNC(efl_dbg_info_get, 
_efl_canvas_image_internal_efl_object_dbg_info_get)
 

-- 




[EGIT] [core/efl] master 02/12: elm_test: Remove calls to visible_set for EO objects

2017-08-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 83a4c3e3e2c1503f32aff81b46cc9c486a35ebd2
Author: Jean-Philippe Andre 
Date:   Thu Jul 6 17:22:41 2017 +0900

elm_test: Remove calls to visible_set for EO objects
---
 src/bin/elementary/test_bg.c| 16 
 src/bin/elementary/test_box.c   | 10 +++---
 src/bin/elementary/test_code.c  |  5 -
 src/bin/elementary/test_efl_gfx_map.c   |  4 +---
 src/bin/elementary/test_efl_ui_text.c   |  2 --
 src/bin/elementary/test_evas_map.c  |  4 +---
 src/bin/elementary/test_evas_mask.c | 16 +---
 src/bin/elementary/test_evas_snapshot.c | 25 
 src/bin/elementary/test_events.c|  2 --
 src/bin/elementary/test_gfx_filters.c   | 34 ++---
 src/bin/elementary/test_glview.c|  1 -
 src/bin/elementary/test_grid_static.c   |  7 ---
 src/bin/elementary/test_nstate.c|  1 -
 src/bin/elementary/test_photocam.c  |  8 +---
 src/bin/elementary/test_ui_box.c|  9 -
 src/bin/elementary/test_ui_clock.c  |  5 -
 src/bin/elementary/test_ui_grid.c   |  9 -
 src/bin/elementary/test_win_dialog.c|  5 -
 src/bin/elementary/test_win_inline.c|  1 -
 src/bin/elementary/test_win_stack.c |  1 -
 20 files changed, 33 insertions(+), 132 deletions(-)

diff --git a/src/bin/elementary/test_bg.c b/src/bin/elementary/test_bg.c
index 2ca9980fc9..4fe764c640 100644
--- a/src/bin/elementary/test_bg.c
+++ b/src/bin/elementary/test_bg.c
@@ -335,8 +335,7 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event
 
box = efl_add(EFL_UI_BOX_CLASS, win,
  efl_gfx_size_hint_weight_set(efl_added, 1, 1),
- efl_content_set(win, efl_added),
- efl_gfx_visible_set(efl_added, 1));
+ efl_content_set(win, efl_added));
 
efl_add(ELM_COLORSELECTOR_CLASS, win,
elm_colorselector_mode_set(efl_added, ELM_COLORSELECTOR_PALETTE),
@@ -346,9 +345,7 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event
elm_colorselector_palette_color_add(efl_added, 0, 0, 0, 0),
efl_event_callback_add(efl_added, 
ELM_COLORSELECTOR_EVENT_COLOR_ITEM_SELECTED, _colorsel_cb, win),
efl_gfx_size_hint_weight_set(efl_added, 1.0, 1.0),
-   efl_pack(box, efl_added),
-   efl_gfx_visible_set(efl_added, 1)
-   );
+   efl_pack(box, efl_added));
 
snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", 
elm_app_data_dir_get());
efl_add(EFL_UI_IMAGE_CLASS, win,
@@ -356,9 +353,7 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event
efl_gfx_size_hint_min_set(efl_added, 64, 64),
efl_gfx_size_hint_weight_set(efl_added, 1.0, 1.0),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _file_cb, 
win),
-   efl_pack(box, efl_added),
-   efl_gfx_visible_set(efl_added, 1)
-   );
+   efl_pack(box, efl_added));
 
snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", elm_app_data_dir_get());
efl_add(EFL_UI_IMAGE_CLASS, win,
@@ -366,10 +361,7 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event
efl_gfx_size_hint_min_set(efl_added, 64, 64),
efl_gfx_size_hint_weight_set(efl_added, 1.0, 1.0),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _image_cb, 
win),
-   efl_pack(box, efl_added),
-   efl_gfx_visible_set(efl_added, 1)
-   );
+   efl_pack(box, efl_added));
 
efl_gfx_size_set(win, 300, 200);
-   efl_gfx_visible_set(win, 1);
 }
diff --git a/src/bin/elementary/test_box.c b/src/bin/elementary/test_box.c
index 395c82486c..d06b6347dc 100644
--- a/src/bin/elementary/test_box.c
+++ b/src/bin/elementary/test_box.c
@@ -904,8 +904,7 @@ test_box_stack(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED,
o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win,
efl_gfx_color_set(efl_added, 0, 64, 128, 255),
efl_gfx_size_hint_align_set(efl_added, EFL_GFX_SIZE_HINT_FILL, 
EFL_GFX_SIZE_HINT_FILL),
-   efl_gfx_size_hint_weight_set(efl_added, 
EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND),
-   efl_gfx_visible_set(efl_added, EINA_TRUE));
+   efl_gfx_size_hint_weight_set(efl_added, 
EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND));
efl_pack(bx, o);
 
/* rectangle with a max size */
@@ -913,8 +912,7 @@ test_box_stack(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED,
efl_gfx_color_set(efl_added, 64, 128, 64, 255),
efl_gfx_size_hint_align_set(efl_added, EFL_GFX_SIZE_HINT_FILL, 
EFL_GFX_SIZE_HINT_FILL),

[EGIT] [core/efl] master 01/02: evas filters: Shut up coverity

2017-08-02 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit de99a71c4393e68725882babcf6f736222055475
Author: Jean-Philippe Andre 
Date:   Wed Aug 2 19:58:02 2017 +0900

evas filters: Shut up coverity

Add some safety checks.

CID 1374271
---
 src/lib/evas/filters/evas_filter.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 0dc50aaf9c..18969ecaaa 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -295,6 +295,8 @@ 
evas_filter_context_buffers_allocate_all(Evas_Filter_Context *ctx)
 Evas_Filter_Buffer *in, *out;
 
 in = cmd->input;
+EINA_SAFETY_ON_NULL_GOTO(in, alloc_fail);
+
 in->cleanup = EINA_FALSE;
 if (!in->w && !in->h)
   {
@@ -325,6 +327,7 @@ 
evas_filter_context_buffers_allocate_all(Evas_Filter_Context *ctx)
   return EINA_FALSE;
}
 
+ EINA_SAFETY_ON_NULL_GOTO(in, alloc_fail);
  if (in->w) sw = in->w;
  if (in->h) sh = in->h;
 

-- 




[EGIT] [core/efl] master 02/02: evas filters: Disable extra debug

2017-08-02 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit b10be4e2ed76e7ff7d5d038c21b69c34dc0b196b
Author: Jean-Philippe Andre 
Date:   Wed Aug 2 20:00:49 2017 +0900

evas filters: Disable extra debug

Forgot to remove that! It's better to disable for the release,
DBG() and XDBG() are disabled anyway.

CID 1308611
---
 src/lib/evas/filters/evas_filter_parser.c | 23 +--
 src/lib/evas/include/evas_filter.h|  4 ++--
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index ce1e25ac9d..df68b03580 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -2231,26 +2231,29 @@ static inline void
 _lua_import_path_get(char *path, size_t len, const char *name)
 {
const char *pfx = _evas_module_datadir_get();
-   size_t r;
+   size_t r = 0;
 
 #ifdef FILTERS_DEBUG
// This is a hack to fetch the most recent file from source
char *sep = evas_file_path_join("", "");
char *src = strdup(__FILE__);
-   char *slash = strrchr(src, *sep);
struct stat st;
-   if (slash)
+   if (sep && src)
  {
-*slash = '\0';
-if (*src == '/')
-  r = snprintf(path, len - 1, "%s/lua/%s.lua", src, name);
-else // abs_srcdir is unknown here
-   r =  snprintf(path, len - 1, "%s/src/%s/lua/%s.lua", 
PACKAGE_BUILD_DIR, src, name);
-if (r >= len) path[len - 1] = '\0';
+char *slash = strrchr(src, *sep);
+if (slash)
+  {
+ *slash = '\0';
+ if (*src == '/')
+   r = snprintf(path, len - 1, "%s/lua/%s.lua", src, name);
+ else // abs_srcdir is unknown here
+   r = snprintf(path, len - 1, "%s/src/%s/lua/%s.lua", 
PACKAGE_BUILD_DIR, src, name);
+ if (r >= len) path[len - 1] = '\0';
+  }
  }
free(sep);
free(src);
-   if (!stat(path, )) return;
+   if (r && !stat(path, )) return;
 #endif
 
r = snprintf(path, len - 1, "%s/filters/lua/%s.lua", pfx ? pfx : ".", name);
diff --git a/src/lib/evas/include/evas_filter.h 
b/src/lib/evas/include/evas_filter.h
index c4da4e75c3..3f88970dc0 100644
--- a/src/lib/evas/include/evas_filter.h
+++ b/src/lib/evas/include/evas_filter.h
@@ -32,9 +32,9 @@
 # endif
 #endif /* ! _WIN32 */
 
-//#ifdef DEBUG
+#ifdef DEBUG
 # define FILTERS_DEBUG
-//#endif
+#endif
 
 typedef struct _Evas_Filter_Instruction Evas_Filter_Instruction;
 typedef struct _Evas_Filter_Buffer Evas_Filter_Buffer;

-- 




[EGIT] [core/efl] master 01/01: evas: Rename calculate property to calculating

2017-08-02 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 4299905996dc1a26664e87a113202b9a8981ade3
Author: Jean-Philippe Andre 
Date:   Wed Aug 2 19:04:06 2017 +0900

evas: Rename calculate property to calculating

Recently introduced by @cedric
I think the name is not very clear, and is clashing with the
actual method of the same name.
---
 src/lib/evas/canvas/evas_canvas.eo  | 12 ++--
 src/lib/evas/canvas/evas_object_smart.c |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/lib/evas/canvas/evas_canvas.eo 
b/src/lib/evas/canvas/evas_canvas.eo
index 94dee0fc77..1f837907cc 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -757,13 +757,13 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, 
Efl.Input.Interface,
all smart objects in the canvas.
  ]]
   }
-  @property smart_objects_calculate {
+  @property smart_objects_calculating {
  get {
-   [[Get if the canvas is currently calculating smart objects.]]
-}
-values {
-   calculating: bool; [[The state of computation of smart objects.]]
-}
+[[Get if the canvas is currently calculating smart objects.]]
+ }
+ values {
+calculating: bool; [[$true if currently calculating smart 
objects.]]
+ }
   }
   /* FIXME: The below function is only for efl.ui.win */
   touch_point_list_nth_xy_get {
diff --git a/src/lib/evas/canvas/evas_object_smart.c 
b/src/lib/evas/canvas/evas_object_smart.c
index b754320955..6dfbf35338 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -987,8 +987,8 @@ _evas_canvas_smart_objects_calculate(Eo *eo_e, 
Evas_Public_Data *o EINA_UNUSED)
evas_call_smarts_calculate(eo_e);
 }
 
-Eina_Bool
-_evas_canvas_smart_objects_calculate_get(Eo *eo_e EINA_UNUSED, 
Evas_Public_Data *e)
+EOLIAN Eina_Bool
+_evas_canvas_smart_objects_calculating_get(Eo *eo_e EINA_UNUSED, 
Evas_Public_Data *e)
 {
return !!e->in_smart_calc;
 }

-- 




[EGIT] [core/efl] master 01/01: ecore_x: Avoid crash on NULL

2017-08-01 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 5c8670fb2b956f0040b675311f13ab6a4008b040
Author: Jean-Philippe Andre 
Date:   Wed Aug 2 11:15:08 2017 +0900

ecore_x: Avoid crash on NULL

This happens in E with software compositing, since E's commit
5702f0975e890f07cfb. E should be fixed shortly but segv is not
acceptable. Without segv E is still massively broken so it's
not like the bug would be hidden (large black areas in windows,
after switch vdesks with enough windows).
---
 src/lib/ecore_x/ecore_x_image.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/ecore_x/ecore_x_image.c b/src/lib/ecore_x/ecore_x_image.c
index 016323c175..3b7030863f 100644
--- a/src/lib/ecore_x/ecore_x_image.c
+++ b/src/lib/ecore_x/ecore_x_image.c
@@ -502,6 +502,9 @@ ecore_x_image_to_argb_convert(void *src,
};
int mode = 0;
 
+   EINA_SAFETY_ON_NULL_RETURN_VAL(src, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(dst, EINA_FALSE);
+
sbpp *= 8;
 
n = vis->map_entries;

-- 




[EGIT] [core/efl] master 02/02: edje_svg: Fix handling of realloc

2017-08-01 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit ae443173ec2a7941200943c09fa7dbddc2e605e1
Author: Jean-Philippe Andre 
Date:   Tue Aug 1 19:51:03 2017 +0900

edje_svg: Fix handling of realloc

This amends 8e311db414950e399099acc1c0a as the logic
was badly broken. A "shadow" variable warning
clearly showed that "tmp" was not used properly.

This fixes the "IBM" logo in svg-test (the only one
using polygon/polyline, it seems).
---
 src/bin/edje/edje_svg_loader.c | 31 ---
 1 file changed, 12 insertions(+), 19 deletions(-)

diff --git a/src/bin/edje/edje_svg_loader.c b/src/bin/edje/edje_svg_loader.c
index 65e17f1094..03088ca638 100644
--- a/src/bin/edje/edje_svg_loader.c
+++ b/src/bin/edje/edje_svg_loader.c
@@ -1106,22 +1106,16 @@ _attr_parse_polygon_points(const char *str, double 
**points, int *point_count)
int tmp_count=0;
int count = 0;
double num;
-   double *point_array = NULL;
+   double *point_array = NULL, *tmp_array;
 
while (_parse_number(, ))
  {
 tmp[tmp_count++] = num;
 if (tmp_count == 50)
   {
- double *tmp;
-
- tmp = realloc(point_array, (count + tmp_count) * sizeof(double));
- if (!tmp)
-   {
-  ERR("allocation for point array failed. out of memory");
-  abort();
-   }
- point_array = tmp;
+ tmp_array = realloc(point_array, (count + tmp_count) * 
sizeof(double));
+ if (!tmp_array) goto error_alloc;
+ point_array = tmp_array;
  memcpy(_array[count], tmp, tmp_count * sizeof(double));
  count += tmp_count;
  tmp_count = 0;
@@ -1130,20 +1124,19 @@ _attr_parse_polygon_points(const char *str, double 
**points, int *point_count)
 
if (tmp_count > 0)
  {
-double *tmp;
-
-tmp = realloc(point_array, (count + tmp_count) * sizeof(double));
-if (!tmp)
-  {
- ERR("allocation for point array failed. out of memory");
- abort();
-  }
-point_array = tmp;
+tmp_array = realloc(point_array, (count + tmp_count) * sizeof(double));
+if (!tmp_array) goto error_alloc;
+point_array = tmp_array;
 memcpy(_array[count], tmp, tmp_count * sizeof(double));
 count += tmp_count;
  }
*point_count = count;
*points = point_array;
+   return;
+
+error_alloc:
+   ERR("allocation for point array failed. out of memory");
+   abort();
 }
 
 /* parse the attributes for a polygon element.

-- 




[EGIT] [core/efl] master 01/02: Revert "elm gesture layer - use fabs not abs when actually comparing floats"

2017-08-01 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 3b8c60954e2b64aa87810f083b1ae3fda473a7cb
Author: Jean-Philippe Andre 
Date:   Tue Aug 1 19:35:14 2017 +0900

Revert "elm gesture layer - use fabs not abs when actually comparing floats"

This reverts commit 2d4d836018387470b5df2c59119ab6cc81188e94.

Don't pretend to fix an issue found by a static analyzer by
introducing another issue that even clang warns about.

Fixes:
elm_gesture_layer.c:2533: warning: using floating point absolute value
  function 'fabs' when argument is of integer type [-Wabsolute-value]
if ((fabs(st->info.mx) > ELM_GESTURE_MINIMUM_MOMENTUM) ||
 ^
---
 src/lib/elementary/elm_gesture_layer.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_gesture_layer.c 
b/src/lib/elementary/elm_gesture_layer.c
index 3a29734216..6baa8417cb 100644
--- a/src/lib/elementary/elm_gesture_layer.c
+++ b/src/lib/elementary/elm_gesture_layer.c
@@ -2530,8 +2530,9 @@ _momentum_test(Evas_Object *obj,
 st->line_end.y = pe_local.y;
 st->t_end = pe_local.timestamp;
 
-if ((fabs(st->info.mx) > ELM_GESTURE_MINIMUM_MOMENTUM) ||
-(fabs(st->info.my) > ELM_GESTURE_MINIMUM_MOMENTUM))
+// FIXME: mx,my are int while the momentum is float. Fishy logic here.
+if ((abs(st->info.mx) > ELM_GESTURE_MINIMUM_MOMENTUM) ||
+(abs(st->info.my) > ELM_GESTURE_MINIMUM_MOMENTUM))
   state_to_report = ELM_GESTURE_STATE_END;
 else
   state_to_report = ELM_GESTURE_STATE_ABORT;

-- 




Re: [E-devel] EO API: Orientation vs. Direction

2017-07-31 Thread Jean-Philippe André
2017-07-31 18:24 GMT+09:00 Simon Lees <sfl...@suse.de>:

>
>
> On 31/07/17 18:23, Jean-Philippe André wrote:
> > Hello,
> >
> >
> > I was talking with Sanghyeon last week and realized that our use of
> > Efl.Orientation (interface) and Efl.Orient (enum) for UI elements did not
> > actually make perfect sense:
> >
> > 1. UI objects tend to have a default direction which is more like
> > "downwards" or "to the right". Not UP (which is orientation 0)
> >
> > 2. UI objects tend to be either horizontal or vertical, not necessarily
> > right/left/up/down
> >
> > 3. The degree value (0, 90, 180, 270) is not necessarily meaningful as
> > we're not rotating the objects, just defining a general direction in
> which
> > they work.
> >
> >
> > Are there any objections into splitting Orientation (for images, video
> and
> > probably the window itself, ...) and something like Direction (for UI
> > widgets, like box, panes, etc...)?
> >
> >
> > TIA,
> >
>
> Just remember for Right to Left languages UI elements that would
> normally be on the Left end up on the Right so left and right isn't
> really the best language either I think Qt uses something like Leading
> and Trailing for stuff that swaps properly for right to left and Left
> and Right if you wanted it fixed. I don't remember how well elm handles
> that though.
>
>
Very good point. I'll check what conventions are used elsewhere.
Thanks,

-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] EO API: Orientation vs. Direction

2017-07-31 Thread Jean-Philippe André
Hello,


I was talking with Sanghyeon last week and realized that our use of
Efl.Orientation (interface) and Efl.Orient (enum) for UI elements did not
actually make perfect sense:

1. UI objects tend to have a default direction which is more like
"downwards" or "to the right". Not UP (which is orientation 0)

2. UI objects tend to be either horizontal or vertical, not necessarily
right/left/up/down

3. The degree value (0, 90, 180, 270) is not necessarily meaningful as
we're not rotating the objects, just defining a general direction in which
they work.


Are there any objections into splitting Orientation (for images, video and
probably the window itself, ...) and something like Direction (for UI
widgets, like box, panes, etc...)?


TIA,

-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/enlightenment] enlightenment-0.21 04/48: pulse: do not leak strbuf

2017-07-28 Thread Jean-Philippe ANDRÉ
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 457843b005974a6f86f191c6ae8043124d42ee85
Author: Jean-Philippe Andre 
Date:   Tue Jul 11 10:45:26 2017 +0900

pulse: do not leak strbuf

See also ac92ff52567293399060bfd35b22ae86fe.
- eina_strbuf_string_get() returns the internally stored string as
  a const char *, and does not free the strbuf itself
- eina_strbuf_string_steal() returns the internal string as a
  char *, giving ownership to the caller, and frees the strbuf
  itself
- eina_stringshare_add() takes a const char * as input and makes a
  copy of the string

As a consequence, ss_add(sb_string_steal()) leaks the internal
string from the strbuf, while ss_add(sb_string_get()) leaks the
strbuf structure.

A one liner here would require either an eina_slstr based API or
an API in stringshare to take ownership of a given string. Both
would be useful APIs :)
---
 src/modules/mixer/lib/backends/pulseaudio/pulse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/modules/mixer/lib/backends/pulseaudio/pulse.c 
b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
index e07e8a674..3c9c96338 100644
--- a/src/modules/mixer/lib/backends/pulseaudio/pulse.c
+++ b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
@@ -337,6 +337,7 @@ _sink_input_cb(pa_context *c EINA_UNUSED, const 
pa_sink_input_info *info,
eina_strbuf_append(input_name, ":");
eina_strbuf_append(input_name, info->name);
input->base.name = eina_stringshare_add(eina_strbuf_string_get(input_name));
+   eina_strbuf_free(input_name);
input->base.volume = _pa_cvolume_convert(>volume);
input->base.mute = !!info->mute;
EINA_LIST_FOREACH(ctx->sinks, l, s)

-- 




[EGIT] [core/efl] master 01/01: evas: Always call show/hide intercept

2017-07-27 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 936ea58cb9ac3e93aaabb6ec731fc3845cf95826
Author: Jean-Philippe Andre 
Date:   Thu Jul 27 15:45:37 2017 +0900

evas: Always call show/hide intercept

Ref T5370
---
 src/lib/evas/canvas/evas_object_intercept.c | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_intercept.c 
b/src/lib/evas/canvas/evas_object_intercept.c
index e627daab97..9ce9d0b5a2 100644
--- a/src/lib/evas/canvas/evas_object_intercept.c
+++ b/src/lib/evas/canvas/evas_object_intercept.c
@@ -100,10 +100,13 @@ _evas_object_intercept_call_internal(Evas_Object *eo_obj,
  {
   case EVAS_OBJECT_INTERCEPT_CB_VISIBLE:
 i = !!va_arg(args, int);
-if (i == obj->cur->visible) return 1;
-if (!obj->interceptors) return 0;
-if (i) blocked = evas_object_intercept_call_show(eo_obj, obj);
-else blocked = evas_object_intercept_call_hide(eo_obj, obj);
+if (obj->interceptors)
+  {
+ if (i) blocked = evas_object_intercept_call_show(eo_obj, obj);
+ else blocked = evas_object_intercept_call_hide(eo_obj, obj);
+  }
+if (!blocked && (i == obj->cur->visible))
+  blocked = 1;
 break;
 
   case EVAS_OBJECT_INTERCEPT_CB_MOVE:

-- 




[EGIT] [core/efl] master 01/02: elm: Move calls to efl_destructor(efl_super()) to the end

2017-07-25 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit d4b2eb1e7feb18094f293b38e5a84453d43cd84a
Author: Jean-Philippe Andre 
Date:   Thu Jul 20 18:00:15 2017 +0900

elm: Move calls to efl_destructor(efl_super()) to the end

When destroying any object, its parent class destructor should
be called after the subclass destructor has been called. Only
some extremely limited work may be done after the super call.

This commit makes sure that all efl_destructor() overrides in
elementary are doing operations in the right order.

Also, remove a return void.
---
 src/lib/elementary/efl_ui_focus_manager_sub.c |  2 +-
 src/lib/elementary/elm_flipselector.c |  4 ++--
 src/lib/elementary/elm_widget.c   | 16 +---
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c 
b/src/lib/elementary/efl_ui_focus_manager_sub.c
index 02f0898a8c..c7a167892f 100644
--- a/src/lib/elementary/efl_ui_focus_manager_sub.c
+++ b/src/lib/elementary/efl_ui_focus_manager_sub.c
@@ -246,7 +246,7 @@ _efl_ui_focus_manager_sub_efl_object_destructor(Eo *obj, 
Efl_Ui_Focus_Manager_Su
 {
_border_unregister(obj, pd);
 
-   return efl_destructor(efl_super(obj, MY_CLASS));
+   efl_destructor(efl_super(obj, MY_CLASS));
 }
 
 
diff --git a/src/lib/elementary/elm_flipselector.c 
b/src/lib/elementary/elm_flipselector.c
index e5711e0790..8864277ad3 100644
--- a/src/lib/elementary/elm_flipselector.c
+++ b/src/lib/elementary/elm_flipselector.c
@@ -287,7 +287,6 @@ _elm_flipselector_item_efl_object_destructor(Eo *eo_item, 
Elm_Flipselector_Item_
 eina_stringshare_del(item->label);
 sd->items = eina_list_remove(sd->items, eo_item);
 efl_destructor(efl_super(eo_item, ELM_FLIPSELECTOR_ITEM_CLASS));
-
 return;
  }
 
@@ -302,7 +301,6 @@ _elm_flipselector_item_efl_object_destructor(Eo *eo_item, 
Elm_Flipselector_Item_
 
eina_stringshare_del(item->label);
sd->items = eina_list_remove(sd->items, eo_item);
-   efl_destructor(efl_super(eo_item, ELM_FLIPSELECTOR_ITEM_CLASS));
 
_sentinel_eval(sd);
 
@@ -311,6 +309,8 @@ _elm_flipselector_item_efl_object_destructor(Eo *eo_item, 
Elm_Flipselector_Item_
 if (sd->view_update) ecore_job_del(sd->view_update);
 sd->view_update = ecore_job_add(_view_update, WIDGET(item));
  }
+
+   efl_destructor(efl_super(eo_item, ELM_FLIPSELECTOR_ITEM_CLASS));
 }
 
 EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 8b758a940b..422bfdddf9 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -6214,15 +6214,13 @@ _elm_widget_efl_object_finalize(Eo *obj, 
Elm_Widget_Smart_Data *pd)
 
 
 EOLIAN static void
-_elm_widget_efl_object_destructor(Eo *obj, Elm_Widget_Smart_Data *sd 
EINA_UNUSED)
+_elm_widget_efl_object_destructor(Eo *obj, Elm_Widget_Smart_Data *sd)
 {
-   sd->on_destroy = EINA_TRUE;
-   efl_destructor(efl_super(obj, ELM_WIDGET_CLASS));
-   sd->on_destroy = EINA_FALSE;
-
if (sd->manager.provider)
- efl_event_callback_del(sd->manager.provider, 
EFL_UI_FOCUS_USER_EVENT_MANAGER_CHANGED, _manager_changed_cb, obj);
-   sd->manager.provider = NULL;
+ {
+efl_event_callback_del(sd->manager.provider, 
EFL_UI_FOCUS_USER_EVENT_MANAGER_CHANGED, _manager_changed_cb, obj);
+sd->manager.provider = NULL;
+ }
 
elm_interface_atspi_accessible_removed(obj);
if (sd->logical.parent)
@@ -6230,6 +6228,10 @@ _elm_widget_efl_object_destructor(Eo *obj, 
Elm_Widget_Smart_Data *sd EINA_UNUSED
 efl_weak_unref(>logical.parent);
 sd->logical.parent = NULL;
  }
+
+   sd->on_destroy = EINA_TRUE;
+   efl_destructor(efl_super(obj, ELM_WIDGET_CLASS));
+   sd->on_destroy = EINA_FALSE;
 }
 
 EOLIAN static Eina_Bool

-- 




[EGIT] [core/efl] master 09/09: hover: Return valid slot for main_menu_submenu

2017-07-21 Thread Jean-Philippe ANDRÉ
discomfitor pushed a commit to branch master.

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

commit dcf751bd3d79aed31470b2147c95a5f53663e7de
Author: Jean-Philippe Andre 
Date:   Fri Jul 21 12:14:44 2017 +0900

hover: Return valid slot for main_menu_submenu

Fixes T5760
---
 src/lib/elementary/elm_hover.c | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c
index defe5d5430..6a150d21ba 100644
--- a/src/lib/elementary/elm_hover.c
+++ b/src/lib/elementary/elm_hover.c
@@ -47,6 +47,12 @@ const Elm_Layout_Part_Alias_Description _content_aliases[] =
{NULL, NULL}
 };
 
+const Elm_Layout_Part_Alias_Description _content_aliases_main_menu_submenu[] =
+{
+   {"bottom", "elm.swallow.slot.bottom"},
+   {NULL, NULL}
+};
+
 #define ELM_PRIV_HOVER_SIGNALS(cmd) \
cmd(SIG_CLICKED, "clicked", "") \
cmd(SIG_DISMISSED, "dismissed", "") \
@@ -674,8 +680,13 @@ _elm_hover_efl_gfx_visible_set(Eo *obj, Elm_Hover_Data 
*pd, Eina_Bool vis)
 }
 
 EOLIAN static const Elm_Layout_Part_Alias_Description*
-_elm_hover_elm_layout_content_aliases_get(Eo *obj EINA_UNUSED, Elm_Hover_Data 
*_pd EINA_UNUSED)
+_elm_hover_elm_layout_content_aliases_get(Eo *obj, Elm_Hover_Data *_pd 
EINA_UNUSED)
 {
+   const char *style = elm_widget_style_get(obj);
+
+   // main_menu_submenu only has a single slot "bottom"
+   if (style && strstr(style, "main_menu_submenu"))
+ return _content_aliases_main_menu_submenu;
return _content_aliases;
 }
 
@@ -806,7 +817,7 @@ _elm_hover_best_content_location_get(const Eo *obj 
EINA_UNUSED, Elm_Hover_Data *
  }
else if (pref_axis == ELM_HOVER_AXIS_VERTICAL)
  {
-if (spc_t < spc_b) return (_HOV_BOTTOM)->swallow;
+if (spc_t <= spc_b) return (_HOV_BOTTOM)->swallow;
 else return (_HOV_TOP)->swallow;
  }
 

-- 




Re: [E-devel] ABI/API checker results from abi-laboratory for 1.20 beta1

2017-07-20 Thread Jean-Philippe André
2017-07-21 5:38 GMT+09:00 Cedric BAIL <cedric.b...@free.fr>:

> Hi,
>
> On Sun, Jul 16, 2017 at 7:19 PM, Jean-Philippe André <j...@videolan.org>
> wrote:
> > I spotted 3 new APIs in evas object:
> >
> > efl_canvas_object.eo.legacy.h, libevas.so.1.20.0
> > evas_object_pointer_coords_inside_get ( Efl_Canvas_Object* obj, int x,
> int
> > y )
> > evas_object_pointer_inside_by_device_get ( Efl_Canvas_Object const* obj,
> > Efl_Input_Device* dev )
> > evas_object_pointer_inside_get ( Efl_Canvas_Object const* obj )
> >
> > There is no need for both evas_object_pointer_inside_get() and
> > evas_object_pointer_inside_by_device_get(), just use NULL as device.
>
> Well, the reasonning is that legacy API are not exposing the device,
> so to keep things coherent, they are duplicated here. I guess we could
> get rid of the duplication, it would be fine by me.
>

That's right. This form is indeed consistent with other legacy APIs.


> > evas_object_pointer_coords_inside_get() also has nothing to do with
> > pointer, it's just comparing geometries. I wonder if we shouldn't instead
> > explicitely expose the bounding box as a public API on all objects, and
> > then let the app do the comparison. Why? Because it's not clear what
> > "logically inside" (as per the doc) really means: what if the smart obj
> is
> > full of "holes" and the given point is inside one of those holes? Then
> the
> > API would return true, even though it could be considered not "logically
> > inside".
>
> I am not a fan of exposing the bounding box as the logic behind it is
> not really related to the object size (If you have a smart object that
> has children getting out of it, they would increase the bounding box,
> but if you are using map, they wouldn't) and could get confusing.
> Anyway. I see your point here, and I see why it should get more
> documentation at a minimum. Would that be good enough or do you really
> prefer to expose the including limit of an object (which is what the
> bounding box is really).
>
>
Yeah the bounding box can get weird sometimes. In fact we can have issues
with map & proxies. Example a proxy of an edje object may not have the
proper geometry to reflect the full contents of the edje.
See e81be3a664737dd5743552578e832656e9c5b87e which transformed a proxy into
a full edje because of that limitation.

Well, then let's keep those APIs as they are now.
Thanks.

-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: eina_list: Ensure single init

2017-07-20 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 5db3e557c5614d97f8c6089158f117cce8b85254
Author: Jean-Philippe Andre 
Date:   Thu Jul 20 17:42:14 2017 +0900

eina_list: Ensure single init

This fixes a crash in make check when --profile=dev is explicitely
enabled. eina_list_init() is called by the standard eina_init() loop
and by eina_debug_init() as well.

Honestly I'm not sure why it doesn't crash for other people as
well...

The crash was in eolian_suite during the second eina_init (called
from eolian_init).
---
 src/lib/eina/eina_list.c | 13 +
 1 file changed, 13 insertions(+)

diff --git a/src/lib/eina/eina_list.c b/src/lib/eina/eina_list.c
index 979e484aa4..72dc8134bf 100644
--- a/src/lib/eina/eina_list.c
+++ b/src/lib/eina/eina_list.c
@@ -473,6 +473,8 @@ eina_list_sort_merge(Eina_List *a, Eina_List *b, 
Eina_Compare_Cb func)
  * Global *
  
**/
 
+static int _eina_list_init = 0;
+
 /**
  * @internal
  * @brief Initialize the list module.
@@ -493,6 +495,9 @@ eina_list_init(void)
 {
const char *choice, *tmp;
 
+   if ((_eina_list_init++) > 0)
+ return _eina_list_init;
+
_eina_list_log_dom = eina_log_domain_register("eina_list",
  EINA_LOG_COLOR_DEFAULT);
if (_eina_list_log_dom < 0)
@@ -557,9 +562,17 @@ on_init_fail:
 Eina_Bool
 eina_list_shutdown(void)
 {
+   if ((--_eina_list_init) != 0)
+ {
+if (_eina_list_init < 0) _eina_list_init = 0;
+return _eina_list_init;
+ }
+
eina_freeq_clear(eina_freeq_main_get());
eina_mempool_del(_eina_list_accounting_mp);
eina_mempool_del(_eina_list_mp);
+   _eina_list_accounting_mp = NULL;
+   _eina_list_mp = NULL;
 
eina_log_domain_unregister(_eina_list_log_dom);
_eina_list_log_dom = -1;

-- 




[EGIT] [core/efl] master 01/01: evas: Fix a crash in emotion with GL

2017-07-20 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 7bb14727afc115baa4ab5145ebbee4b1f1eaeb44
Author: Jean-Philippe Andre 
Date:   Thu Jul 20 16:43:52 2017 +0900

evas: Fix a crash in emotion with GL

Ooops! When mapping for writing we can't use the same code
path as when tofree is true. This restores the path for image
writing. This basically fixes rage with GL engine.

See also 45c8e5e983
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 152f323eac..42bdde5d49 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -876,7 +876,7 @@ eng_image_data_get(void *engine, void *image, int to_write, 
DATA32 **image_data,
 
if (error != EVAS_LOAD_ERROR_NONE)
  {
-if (tofree)
+if (tofree && !to_write)
   goto rotate_image;
  }
 

-- 




[EGIT] [core/efl] master 01/04: elm: Fix a safety error message

2017-07-20 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit dccdd203358b68bb7f01d694f7dfa67e38639015
Author: Jean-Philippe Andre 
Date:   Wed Jul 19 17:12:35 2017 +0900

elm: Fix a safety error message

Happens when shutting down E
---
 src/lib/elementary/efl_ui_win.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 47c85ef2b4..50c9c1cc08 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5343,7 +5343,10 @@ _efl_ui_win_efl_object_destructor(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *pd EINA_
 {
 #ifdef HAVE_ELEMENTARY_WL2
if (pd->type == ELM_WIN_FAKE)
- ecore_wl2_window_free(pd->wl.win);
+ {
+if (pd->wl.win)
+  ecore_wl2_window_free(pd->wl.win);
+ }
 #endif
efl_destructor(efl_super(obj, MY_CLASS));
 }

-- 




[EGIT] [core/efl] master 02/04: evas focus: Fix crash when shutting down with errors

2017-07-20 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit bbfdf8909b52cbcd1c0454e7473cf1ed061fe6d3
Author: Jean-Philippe Andre 
Date:   Thu Jul 20 14:22:07 2017 +0900

evas focus: Fix crash when shutting down with errors

Example test: add many evas_object_ref() to a window and click
on its X to close it.
---
 src/lib/evas/canvas/evas_focus.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/evas/canvas/evas_focus.c b/src/lib/evas/canvas/evas_focus.c
index 2dd137d19e..65df3183af 100644
--- a/src/lib/evas/canvas/evas_focus.c
+++ b/src/lib/evas/canvas/evas_focus.c
@@ -44,6 +44,7 @@ _evas_focus_set(Eo *evas_obj, Efl_Input_Device *key, 
Eina_Bool focus)
Evas_Public_Data *edata;
Evas *evas = evas_object_evas_get(evas_obj);
 
+   EINA_SAFETY_ON_NULL_RETURN(evas);
edata = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
 
if (focus)
@@ -58,6 +59,7 @@ _current_focus_get(Eo *evas_obj, Efl_Input_Device *key)
Evas_Public_Data *edata;
Evas *evas = evas_object_evas_get(evas_obj);
 
+   EINA_SAFETY_ON_NULL_RETURN_VAL(evas, NULL);
edata = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
 
return eina_hash_find(edata->focused_objects, );
@@ -71,6 +73,7 @@ _evas_focus_dispatch_event(Evas_Object_Protected_Data *obj, 
Efl_Input_Device *se
Evas_Callback_Type cb_evas, cb_obj_evas;
const Efl_Event_Description *efl_object_focus_event;
 
+   EVAS_OBJECT_DATA_VALID_CHECK(obj);
evt = efl_input_instance_get(EFL_INPUT_FOCUS_CLASS,
 efl_provider_find(obj->object, 
EVAS_CANVAS_CLASS),
 (void **) _data);
@@ -106,6 +109,7 @@ _evas_object_unfocus(Evas_Object_Protected_Data *obj, 
Efl_Input_Device *seat)
 {
int event_id = _evas_event_counter;
 
+   EVAS_OBJECT_DATA_VALID_CHECK(obj);
EINA_COW_WRITE_BEGIN(evas_object_events_cow, obj->events, 
Evas_Object_Events_Data, events)
  events->focused_by_seats = eina_list_remove(events->focused_by_seats, 
seat);
EINA_COW_WRITE_END(evas_object_events_cow, obj->events, events);

-- 




[EGIT] [core/efl] master 04/04: evas: Restore flag pre_render_done in render_mapped

2017-07-20 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 7243b71a19500e72780dc684bd7b2094b9bd5050
Author: Jean-Philippe Andre 
Date:   Thu Jul 20 14:35:48 2017 +0900

evas: Restore flag pre_render_done in render_mapped

Some objects don't go through render_pre (unchanged, child
of mapped parents), even though they will go through
evas_render_mapped. Those were marked as pre_render_done
inside evas_render_mapped since it seemed to fix some issues
a long time ago.

Unfortunately, if those objects are changed their flag may
not be reset to false, which means they never go through
render_pre, leading to render issues.

I believe simply restoring the value of the pre_render_done
flag should be good enough. I don't know why it is set to
true inside evas_render_mapped but I also don't want to find
out :)

See 9ac13e4aec83ea6dadfa62e4253b1db4ffe167e8 (old)
See 87e5e70a9d888ce93ed807bb0d39d1738241ad9b (older)

Patch made with @jiin.moon
---
 src/lib/evas/canvas/evas_render.c | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index b994aa29cd..1f2602adbc 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1725,6 +1725,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
Evas_Object_Protected_Data *obj2;
Eina_Bool clean_them = EINA_FALSE;
Eina_Bool proxy_src_clip = EINA_TRUE;
+   Eina_Bool was_pre_render_done = obj->pre_render_done;
void *ctx;
 
if (!proxy_render_data)
@@ -1876,12 +1877,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
 sw = obj->cur->geometry.w;
 sh = obj->cur->geometry.h;
 RD(level, "  surf size: %ix%i\n", sw, sh);
-if ((sw <= 0) || (sh <= 0))
-  {
- RD(level, "}\n");
- eina_evlog("-render_object", eo_obj, 0.0, NULL);
- return clean_them;
-  }
+if ((sw <= 0) || (sh <= 0)) goto end;
 
 changed = evas_object_map_update(eo_obj, off_x, off_y, sw, sh, sw, sh);
 
@@ -2298,8 +2294,10 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
 on_empty_clip:
 ENFN->context_free(ENDT, ctx);
  }
-   RD(level, "}\n");
 
+end:
+   RD(level, "}\n");
+   obj->pre_render_done = was_pre_render_done;
eina_evlog("-render_object", eo_obj, 0.0, NULL);
return clean_them;
 }

-- 




[EGIT] [core/efl] master 03/04: evas: Avoid infinite loop on evas shutdown

2017-07-20 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit cb19c77558079e5faa37c27f5db02879b664c63e
Author: Jean-Philippe Andre 
Date:   Thu Jul 20 14:04:10 2017 +0900

evas: Avoid infinite loop on evas shutdown

If an object fails to call efl_destructor() on all the parent
classes, then it may never be removed from the layer object
inlist and never would its data be deleted either (eo keeps
it safely alive).

Here's how to test: add a "return;" statement inside an object's
destructor (eg. the window class).

Fixes T5680
---
 src/lib/evas/canvas/evas_main.c | 56 +
 1 file changed, 40 insertions(+), 16 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index ae83bbe3d9..1a6f22a337 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -277,6 +277,7 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, 
Evas_Public_Data *e)
Evas_Post_Render_Job *job;
Evas_Layer *lay;
Efl_Canvas_Output *evo;
+   unsigned int prev_zombie_count = UINT_MAX;
int i;
Eina_Bool del;
 
@@ -295,13 +296,14 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, 
Evas_Public_Data *e)
e->cleanup = 1;
while (del)
  {
+Eina_Bool detach_zombies = EINA_FALSE;
+Evas_Object_Protected_Data *o;
+Eina_List *unrefs = NULL;
+Eo *eo_obj;
+
 del = EINA_FALSE;
 EINA_INLIST_FOREACH(e->layers, lay)
   {
- Eo *eo_obj;
- Evas_Object_Protected_Data *o;
- Eina_List *unrefs = NULL;
-
  evas_layer_pre_free(lay);
 
  EINA_INLIST_FOREACH(lay->objects, o)
@@ -313,21 +315,43 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, 
Evas_Public_Data *e)
 ERR("obj(%p, %s) ref count(%d) is bigger than 0. 
This object couldn't be deleted", o, o->type, efl_ref_get(o->object));
 continue;
  }
-   else
- {
-unrefs = eina_list_append(unrefs, o->object);
- }
+   unrefs = eina_list_append(unrefs, o->object);
del = EINA_TRUE;
 }
}
- EINA_LIST_FREE(unrefs, eo_obj)
-   {
-  ERR("Killing Zombie Object [%p] ref=%i:%i\n", eo_obj, 
efl_ref_get(eo_obj), ___efl_ref2_get(eo_obj));
-  ___efl_ref2_reset(eo_obj);
-  while (efl_ref_get(eo_obj) > 1) efl_unref(eo_obj);
-  while (efl_ref_get(eo_obj) < 1) efl_ref(eo_obj);
-  efl_del(eo_obj);
-   }
+  }
+
+if (eina_list_count(unrefs) >= prev_zombie_count)
+  detach_zombies = EINA_TRUE;
+prev_zombie_count = eina_list_count(unrefs);
+
+EINA_LIST_FREE(unrefs, eo_obj)
+  {
+ ERR("Killing Zombie Object [%s@%p]. Refs: %i:%i",
+ efl_class_name_get(eo_obj), eo_obj, efl_ref_get(eo_obj), 
___efl_ref2_get(eo_obj));
+ ___efl_ref2_reset(eo_obj);
+ while (efl_ref_get(eo_obj) > 1) efl_unref(eo_obj);
+ while (efl_ref_get(eo_obj) < 1) efl_ref(eo_obj);
+ efl_del(eo_obj);
+
+ if (!detach_zombies) continue;
+
+ EINA_INLIST_FOREACH(e->layers, lay)
+   EINA_INLIST_FOREACH(lay->objects, o)
+ if (o && (o->object == eo_obj))
+   {
+  ERR("Zombie Object [%s@%p] could not be removed "
+  "from the list of objects. Maybe this object "
+  "was deleted but the call to efl_destructor() "
+  "was not propagated to all the parent classes? "
+  "Forcibly removing it. This may leak! Refs: %i:%i",
+  efl_class_name_get(eo_obj), eo_obj, 
efl_ref_get(eo_obj), ___efl_ref2_get(eo_obj));
+  lay->objects = (Evas_Object_Protected_Data *)
+eina_inlist_remove(EINA_INLIST_GET(lay->objects), 
EINA_INLIST_GET(o));
+  goto next_zombie;
+   }
+next_zombie:
+ continue;
   }
  }
EINA_INLIST_FOREACH(e->layers, lay)

-- 




[EGIT] [core/efl] master 02/02: evas gl: Rename secsym_ to eglsym_

2017-07-19 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit d6c95d1e4b5fd5adbef7e193cc5f6851749ef19f
Author: Jean-Philippe Andre 
Date:   Thu Jul 20 13:25:16 2017 +0900

evas gl: Rename secsym_ to eglsym_

eglDestroyImage has nothing to do with SEC...
This is a cosmetic change.
---
 src/modules/evas/engines/gl_common/evas_gl_common.h  |  4 ++--
 src/modules/evas/engines/gl_common/evas_gl_context.c | 16 
 src/modules/evas/engines/gl_common/evas_gl_texture.c |  4 ++--
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h 
b/src/modules/evas/engines/gl_common/evas_gl_common.h
index c5df435ca3..75acb7e221 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -774,7 +774,7 @@ extern void   
(*glsym_glRenderbufferStorageMultisample)(GLenum target, GLsiz
 #ifdef GL_GLES
 EAPI void *   evas_gl_common_eglCreateImage  (EGLDisplay dpy, 
EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib 
*attrib_list);
 EAPI int  evas_gl_common_eglDestroyImage (EGLDisplay dpy, 
void *im);
-extern unsigned int   (*secsym_eglDestroyImage)  (void *a, void 
*b);
+extern unsigned int   (*eglsym_eglDestroyImage)  (void *a, void 
*b);
 extern void   (*secsym_glEGLImageTargetTexture2DOES) (int a, void *b);
 extern void  *(*secsym_eglMapImageSEC)   (void *a, void 
*b, int c, int d);
 extern unsigned int   (*secsym_eglUnmapImageSEC) (void *a, void 
*b, int c);
@@ -935,7 +935,7 @@ __evas_gl_errdyn(int err, const char *file, const char 
*func, int line, const ch
 #  define glsym_glUnmapBuffer(...) GL_ERROR_TRACE_RET(unsigned int, 
glsym_glUnmapBuffer, #__VA_ARGS__, __VA_ARGS__)
 #  define eglsym_eglCreateImage(...) GL_ERROR_TRACE_RET(void *, 
eglsym_eglCreateImage, #__VA_ARGS__, __VA_ARGS__)
 #  define eglsym_eglCreateImageKHR(...) GL_ERROR_TRACE_RET(void *, 
eglsym_eglCreateImageKHR, #__VA_ARGS__, __VA_ARGS__)
-#  define secsym_eglDestroyImage(...) GL_ERROR_TRACE_RET(unsigned int, 
secsym_eglDestroyImage, #__VA_ARGS__, __VA_ARGS__)
+#  define eglsym_eglDestroyImage(...) GL_ERROR_TRACE_RET(unsigned int, 
eglsym_eglDestroyImage, #__VA_ARGS__, __VA_ARGS__)
 #  define secsym_glEGLImageTargetTexture2DOES(...) 
GL_ERROR_TRACE(secsym_glEGLImageTargetTexture2DOES, #__VA_ARGS__, __VA_ARGS__)
 #  define secsym_eglMapImageSEC(...) GL_ERROR_TRACE_RET(void *, 
secsym_eglMapImageSEC, #__VA_ARGS__, __VA_ARGS__)
 #  define secsym_eglUnmapImageSEC(...) GL_ERROR_TRACE_RET(unsigned int, 
secsym_eglUnmapImageSEC, #__VA_ARGS__, __VA_ARGS__)
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c 
b/src/modules/evas/engines/gl_common/evas_gl_context.c
index 4ba070a574..317363e3b8 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -49,7 +49,7 @@ typedef int  (*secsym_func_int) ();
 typedef unsigned int  (*secsym_func_uint) ();
 typedef void *(*secsym_func_void_ptr) ();
 
-unsigned int   (*secsym_eglDestroyImage)  (void *a, void *b) = 
NULL;
+unsigned int   (*eglsym_eglDestroyImage)  (void *a, void *b) = 
NULL;
 void   (*secsym_glEGLImageTargetTexture2DOES) (int a, void *b) = NULL;
 void  *(*secsym_eglMapImageSEC)   (void *a, void *b, int 
c, int d) = NULL;
 unsigned int   (*secsym_eglUnmapImageSEC) (void *a, void *b, int 
c) = NULL;
@@ -152,8 +152,8 @@ evas_gl_common_eglCreateImage(EGLDisplay dpy, EGLContext 
ctx, EGLenum target, EG
 EAPI int
 evas_gl_common_eglDestroyImage(EGLDisplay dpy, void *im)
 {
-   if (secsym_eglDestroyImage)
- return secsym_eglDestroyImage(dpy, im);
+   if (eglsym_eglDestroyImage)
+ return eglsym_eglDestroyImage(dpy, im);
return EGL_FALSE;
 }
 
@@ -335,16 +335,16 @@ evas_gl_symbols(void *(*GetProcAddress)(const char 
*name), const char *extsn)
   if ((vmaj > 1) || (vmaj == 1 && vmin >= 5))
 {
eglsym_eglCreateImage = dlsym(RTLD_DEFAULT, "eglCreateImage");
-   secsym_eglDestroyImage = dlsym(RTLD_DEFAULT, "eglDestroyImage");
+   eglsym_eglDestroyImage = dlsym(RTLD_DEFAULT, "eglDestroyImage");
 }
 
   // For EGL <= 1.4 only the KHR extension exists: "EGL_KHR_image_base"
-  if (!eglsym_eglCreateImage || !secsym_eglDestroyImage)
+  if (!eglsym_eglCreateImage || !eglsym_eglDestroyImage)
 {
eglsym_eglCreateImage = NULL;
-   secsym_eglDestroyImage = NULL;
+   eglsym_eglDestroyImage = NULL;
FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", 
"EGL_KHR_image_base", secsym_func_void_ptr);
-   FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", 
"EGL_KHR_image_base", 

[EGIT] [core/efl] master 01/02: evas gl: Check EGL version before using dlsym

2017-07-19 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 0c78783045e1b6b26133350865a910f97031ad02
Author: Jean-Philippe Andre 
Date:   Thu Jul 20 13:16:50 2017 +0900

evas gl: Check EGL version before using dlsym

A recent commit broke texture_from_pixmap for NVIDIA EGL
(again), because eglCreateImage is a symbol in libEGL.so
but isn't in fact implemented by the driver.

That's because eglCreateImage() is exposed by libglvnd but
the underlying EGL implementation is NVIDIA and its version
is only 1.4, not 1.5 (where the API was introduced as core).

Instead of reverting the patch, it's better to cover our
bases properly and use dlsym() only if the version is right.

Note that GetProcAddress() may return garbage function
pointers for ALL functions as dynamic virtual functions may
be created on the fly by libglvnd. So it is absolutely
necessary to check the extension string as well.

See 0255f14dc2189c71776408b00307b8488bfa4dc5
---
 .../evas/engines/gl_common/evas_gl_context.c   | 32 --
 1 file changed, 23 insertions(+), 9 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c 
b/src/modules/evas/engines/gl_common/evas_gl_context.c
index c3534a5149..4ba070a574 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -324,15 +324,29 @@ evas_gl_symbols(void *(*GetProcAddress)(const char 
*name), const char *extsn)
 // wrong as this is not x11 (output) layer specific like the native surface
 // stuff. this is generic zero-copy textures for gl
 
-   FINDSYMN(eglsym_eglCreateImage, "eglCreateImage", NULL, 
secsym_func_void_ptr);
-   FINDSYMN(secsym_eglDestroyImage, "eglDestroyImage", NULL, secsym_func_uint);
-   if (!eglsym_eglCreateImage || !secsym_eglDestroyImage)
- {
-eglsym_eglCreateImage = NULL;
-secsym_eglDestroyImage = NULL;
-FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", 
"EGL_KHR_image_base", secsym_func_void_ptr);
-FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", 
"EGL_KHR_image_base", secsym_func_uint);
- }
+   {
+  const char *egl_version = eglQueryString(eglGetCurrentDisplay(), 
EGL_VERSION);
+  int vmin = 1, vmaj = 0;
+
+  if (!egl_version || (sscanf(egl_version, "%d.%d", , ) != 2))
+vmaj = 0;
+
+  // Verify that EGL is >= 1.5 before looking up core function
+  if ((vmaj > 1) || (vmaj == 1 && vmin >= 5))
+{
+   eglsym_eglCreateImage = dlsym(RTLD_DEFAULT, "eglCreateImage");
+   secsym_eglDestroyImage = dlsym(RTLD_DEFAULT, "eglDestroyImage");
+}
+
+  // For EGL <= 1.4 only the KHR extension exists: "EGL_KHR_image_base"
+  if (!eglsym_eglCreateImage || !secsym_eglDestroyImage)
+{
+   eglsym_eglCreateImage = NULL;
+   secsym_eglDestroyImage = NULL;
+   FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", 
"EGL_KHR_image_base", secsym_func_void_ptr);
+   FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", 
"EGL_KHR_image_base", secsym_func_uint);
+}
+   }
 
FINDSYM(glsym_glProgramParameteri, "glProgramParameteri", NULL, 
glsym_func_void);
FINDSYM(glsym_glProgramParameteri, "glProgramParameteriEXT", 
"GL_EXT_geometry_shader4", glsym_func_void);

-- 




[EGIT] [core/efl] master 01/01: eo: Fix deadlock due to the shared mutex

2017-07-19 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 7231a3295bc2d6238d2e95999be7f642d4b6730a
Author: Jean-Philippe Andre 
Date:   Wed Jul 19 15:25:46 2017 +0900

eo: Fix deadlock due to the shared mutex

Explicit lock / unlock of the shared mutex mixed with implicit
lock / unlock when accessing the internal Eo_Object data lead
to uncaught issues such as these.

This was found by trying to run E with gfx filters under eo_debug.
---
 src/lib/eo/eo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 2345fd3196..5af21f5f74 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1695,12 +1695,14 @@ efl_isa(const Eo *eo_id, const Efl_Class *klass_id)
 // Currently implemented by reusing the LAST op id. Just marking it 
with
 // _eo_class_isa_func.
 isa = tdata->cache.isa = (func && (func->func == _eo_class_isa_func));
+EO_OBJ_DONE(eo_id);
 eina_lock_release(&(_eo_table_data_shared_data->obj_lock));
  }
return isa;
 
 err_shared_class:
_EO_POINTER_ERR(klass_id, "Class (%p) is an invalid ref.", klass_id);
+   EO_OBJ_DONE(eo_id);
 err_shared_obj:
eina_lock_release(&(_eo_table_data_shared_data->obj_lock));
return EINA_FALSE;

-- 




Re: [E-devel] Builds

2017-07-18 Thread Jean-Philippe André
Just one comment.

2017-07-19 14:01 GMT+09:00 Cedric BAIL <cedric.b...@free.fr>:

> On Tue, Jul 18, 2017 at 7:57 PM, Carsten Haitzler <ras...@rasterman.com>
> wrote:


[...]

>
> > i think efl is more easily moved than cedric says. it can be done in
> stages.
> > just have the core build work with default + commonly enabled options
> only.
> > forget examples, tests, docs etc. ... THEN add in these bit by bit until
> it is
> > fully featured.
>
> I disagree with this view completely. It will never be finished and we
> won't ever have all our needs addressed. People and most dev will stay
> on autotools and won't ever be moving. It needs to be done in two
> release. First we do side by side feature equivalent and deprecate
> autotools, then for the next release we phase out autotools
> completely. Any other approach will lead to failure in my opinion.
>

We saw what happened with the dual main Makefile + per directory Makefile.
Even those of us who wanted it the most forgot about it quickly and just
let those Makefiles rot.

So, yeah. :)

[...]

-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: evas: Fix cmopilation warning

2017-07-18 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit b98bc51968a8a0f8cdfb7d29cf93e207ba47c253
Author: Jean-Philippe Andre 
Date:   Wed Jul 19 14:01:07 2017 +0900

evas: Fix cmopilation warning

Oops I forgot to add that to the previous commit!
---
 src/lib/evas/canvas/evas_object_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 5506290ba6..9d1440573d 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -88,7 +88,7 @@ static const Evas_Object_Image_Load_Opts default_load_opts = {
 };
 
 static const Evas_Object_Image_Pixels default_pixels = {
-  NULL, { NULL, NULL }, { 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, ~0x0
+  NULL, { NULL, NULL }, NULL, { 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, 
~0x0
 };
 
 static const Evas_Object_Image_State default_state = {

-- 




[EGIT] [core/efl] master 02/03: evas engine gl: Add missing image unlock

2017-07-18 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 897d81acb1f7dc20b05b82697e703688990fed1e
Author: Jean-Philippe Andre 
Date:   Wed Jul 19 13:19:24 2017 +0900

evas engine gl: Add missing image unlock

This is a rare error path. Unlikely and not very important as
the lock/unlock doesn't actually perform any meaningful operation.
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index cee394eb21..152f323eac 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -831,6 +831,7 @@ eng_image_data_get(void *engine, void *image, int to_write, 
DATA32 **image_data,
eng_image_alpha_get(engine, image), EVAS_COLORSPACE_ARGB);
 if (!im_new)
   {
+ eng_gl_surface_unlock(engine, im);
  if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
  ERR("Allocation failed.");
  return NULL;

-- 




[EGIT] [core/efl] master 03/03: evas: Fix support for image_data_get on snapshot

2017-07-18 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 45c8e5e983d24b23b244513087799edcda862411
Author: Jean-Philippe Andre 
Date:   Wed Jul 19 11:43:35 2017 +0900

evas: Fix support for image_data_get on snapshot

evas_object_image_data_get() is a legacy API that I made work
with snapshot objects (evas_object_image_snapshot_set()). Some
changes in the engine broke the behaviour and this patch fixes
it.

When getting the pixels from an FBO, in read-only mode, we need
to create a temporary image (pixels surface) that contains the
copy of the pixels we get from glReadPixels. This image needs
to be deleted afterwards. It is thus stored by the image object
and freed upon _image_data_set() (good) or object deletion (bad).

FBO + read-write is not supported by this API (it is supported
through buffer_map as the filters had to use that).

Fixes T5754
---
 src/lib/evas/canvas/evas_image_legacy.c  | 84 +++-
 src/lib/evas/canvas/evas_image_private.h |  1 +
 src/lib/evas/canvas/evas_object_image.c  |  7 +++
 3 files changed, 79 insertions(+), 13 deletions(-)

diff --git a/src/lib/evas/canvas/evas_image_legacy.c 
b/src/lib/evas/canvas/evas_image_legacy.c
index a8593db29b..3f69dca4e6 100644
--- a/src/lib/evas/canvas/evas_image_legacy.c
+++ b/src/lib/evas/canvas/evas_image_legacy.c
@@ -14,6 +14,14 @@
EVAS_IMAGE_API(_o, __VA_ARGS__); \
} while (0)
 
+typedef struct _Evas_Image_Legacy_Pixels_Entry Evas_Image_Legacy_Pixels_Entry;
+
+struct _Evas_Image_Legacy_Pixels_Entry
+{
+   Eo*object;
+   void  *image;
+};
+
 EAPI Evas_Object *
 evas_object_image_add(Evas *eo_e)
 {
@@ -552,7 +560,7 @@ evas_object_image_data_set(Eo *eo_obj, void *data)
 
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
Evas_Image_Data *o = efl_data_scope_get(eo_obj, 
EFL_CANVAS_IMAGE_INTERNAL_CLASS);
-   void *p_data;
+   void *p_data, *pixels;
Eina_Bool resize_call = EINA_FALSE;
 
 
@@ -563,6 +571,13 @@ evas_object_image_data_set(Eo *eo_obj, void *data)
p_data = o->engine_data;
if (data)
  {
+// r/o FBO data_get: only free the image, don't update pixels
+if ((pixels = eina_hash_find(o->pixels->images_to_free, data)) != NULL)
+  {
+ eina_hash_del(o->pixels->images_to_free, data, pixels);
+ return;
+  }
+
 if (o->engine_data)
   {
  o->engine_data = ENFN->image_data_put(ENDT, o->engine_data, data);
@@ -640,14 +655,28 @@ evas_object_image_data_set(Eo *eo_obj, void *data)
if (resize_call) evas_object_inform_call_image_resize(eo_obj);
 }
 
+static void
+_image_to_free_del_cb(void *data)
+{
+   Evas_Image_Legacy_Pixels_Entry *px_entry = data;
+   Evas_Object_Protected_Data *obj;
+
+   obj = efl_data_scope_safe_get(px_entry->object, EFL_CANVAS_OBJECT_CLASS);
+   EINA_SAFETY_ON_NULL_RETURN(obj);
+   ENFN->image_free(ENDT, px_entry->image);
+   free(px_entry);
+}
+
 EAPI void*
 evas_object_image_data_get(const Eo *eo_obj, Eina_Bool for_writing)
 {
EVAS_IMAGE_API(eo_obj, NULL);
 
Evas_Image_Data *o = efl_data_scope_get(eo_obj, 
EFL_CANVAS_IMAGE_INTERNAL_CLASS);
+   Evas_Image_Legacy_Pixels_Entry *px_entry = NULL;
+   Eina_Bool tofree = 0;
+   void *pixels = NULL;
int stride = 0;
-   void *pixels;
DATA32 *data;
 
if (!o->engine_data) return NULL;
@@ -662,25 +691,48 @@ evas_object_image_data_get(const Eo *eo_obj, Eina_Bool 
for_writing)
  ENFN->image_scale_hint_set(ENDT, o->engine_data, o->scale_hint);
if (ENFN->image_content_hint_set)
  ENFN->image_content_hint_set(ENDT, o->engine_data, o->content_hint);
-   pixels = ENFN->image_data_get(ENDT, o->engine_data, for_writing, , 
>load_error, NULL);
+   pixels = ENFN->image_data_get(ENDT, o->engine_data, for_writing, , 
>load_error, );
 
/* if we fail to get engine_data, we have to return NULL */
if (!pixels) return NULL;
 
-   o->engine_data = pixels;
-   if (ENFN->image_stride_get)
- ENFN->image_stride_get(ENDT, o->engine_data, );
-   else
- stride = o->cur->image.w * 4;
+   if (!tofree)
+ {
+o->engine_data = pixels;
+if (ENFN->image_stride_get)
+  ENFN->image_stride_get(ENDT, o->engine_data, );
+else
+   stride = o->cur->image.w * 4;
 
-   if (o->cur->image.stride != stride)
+if (o->cur->image.stride != stride)
+  {
+ EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
+   state_write->image.stride = stride;
+ EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
+  }
+
+o->pixels_checked_out++;
+ }
+   else
  {
-EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
-  state_write->image.stride = stride;
-EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
+Eina_Hash 

Re: [E-devel] Builds

2017-07-18 Thread Jean-Philippe André
2017-07-19 13:22 GMT+09:00 Vincent Torri <vincent.to...@gmail.com>:

> On Wed, Jul 19, 2017 at 2:23 AM, Cedric BAIL <cedric.b...@free.fr> wrote:
> > Hi,
> >
> > On Jul 18, 2017 16:47, "Carsten Haitzler" <ras...@rasterman.com> wrote:
> >
> > On Tue, 18 Jul 2017 22:13:30 + Mike Blumenkrantz
> > <michael.blumenkra...@gmail.com> said:
> >
> >> Hi,
> >>
> >> I've spent some time over the past couple days investigating ways to
> >> improve efficiency during development. I came across the meson build
> > system
> >> (http://mesonbuild.com/), and the time comparisons to autotools made
> meson
> >> seem staggeringly fast. Additionally, it seems to be quite flexible and
> >> have cross-compilation support.
> >>
> >> A fully functional meson build system for enlightenment can now be found
> > in
> >> my "meson" branch. My current benchmarks with it:
> >
> > oh. so here it is.
> >
> >> meson:
> >> meson . build  2.05s user 0.64s system 103% cpu 2.607 total
> >> ninja  379.02s user 60.36s system 347% cpu 2:06.31 total
> >> sudo ninja install  2.36s user 0.35s system 98% cpu 2.746 total
> >>
> >> autotools:
> >> ( autoreconf -fi && ./configure --prefix=/usr --libdir=/usr/lib64 )
> > 16.46s
> >> user 2.74s system 96% cpu 19.830 total
> >> make -j16  536.93s user 145.03s system 349% cpu 3:15.22 total
> >> sudo make -j16 install  11.75s user 2.16s system 165% cpu 8.427 total
> >>
> >>
> >> As seen above, this saves me over a minute for each rebuild, and I will
> >> likely merge it into the main tree soon if no major issues are reported.
> >
> > more strategically... shouldn't we discuss this also for efl? i'd like
> us to
> > keep the same build systems for both efl and e. they are our 2 major core
> > flagship projects. i do not think they should diverge.
> >
>
> big work here
>
> >
> > Migrating simpler project like e is easier. It does also give a very good
> > view of what problem we could run in.
>
> I agree, echart is a good simple example of use of the efl with meson.
>
> VIncent
>
> >
> > i think it's cool to experiment and look into build systems. there was
> work
> > with cmake for efl. you're looking at meson for e.
> >
> >
> > Moving efl to any new build system, even a simple one like meson, will
> take
> > month of full time work just to make sure we do support all the platform
> we
> > do,
> >
> > have proper tests in place, have proper cross compilation and so on.
> > Let's say we shouldn't limit what we improve in other project due to the
> > size of work in efl.
> >
> > Cmake was only a proof of concept and there are a lot of work to be done
> > with it to say it's done.
> >
> > I also dislike cmake for its syntax and its limited support for cross
> > compilation. Also none of our dependencies have managed to move to cmake,
> > while the one who tried meson managed in no time. Give a look at
> > enlightenment meson files and at efl cmake file to make your own opinion
> > there. My opinion here is that meson is on track to be the replacement of
> > autotools in the open source community.
> >
> > Cedric
> >
> >
> >>
> >> Known (unfixable) issue:
> >> * If you have a configured source directory (ie. you have run
> > ./configure),
> >> the build may error due to inclusion of conflicting headers generated
> from
> >> autotools and headers generated from meson. make clean will not delete
> >> these headers; they require manual deletion or maintainer-clean.
> >>
> >>
> >> To use after pulling meson branch:
> >> 1. 
> >> 2. cd enlightenment
> >> 3. meson . build && cd build
> >> 3.5. [optional] mesonconf -D[option]=[value] (most options are now,
> > instead
> >> of --enable-option, -Doption=true; all options listed when running
> >> mesonconf with no params)
> >> 4. ninja
> >> 5. sudo ninja install
>

I just tried this and I can only say I'm very impressed. It not only
configures fast, builds extremely fast, and installs like a breeze, E
actually even runs, proving that this is not just fluff.

I had tried meson for an elementary hello world project, and that required
only 3 lines of really easy code. Comparing that to cmake or autotools I
know there is good potential here. The syntax is nice, too...

-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/02: win: Fix main menu when not in framespace

2017-07-18 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 521f41f536efcd5e269dcc4279d88348173933e2
Author: Jean-Philippe Andre 
Date:   Tue Jul 18 14:35:40 2017 +0900

win: Fix main menu when not in framespace

On OSX the framespace and CSD (Client-Side Decorations) are not
supported at all... I am not able to test this case. This patch
restores the main menu functionality based on pre 1.19 themes,
where it was located inside win.edc (app content) and not in
border.edc (framespace).

Note that the initial size of a window may be wrong, eg as in
  elementary_test -to "Main Menu"

Fixes T5734 (hopefully!)
---
 data/elementary/themes/edc/elm/win.edc | 22 --
 src/lib/elementary/efl_ui_win.c| 26 +-
 2 files changed, 45 insertions(+), 3 deletions(-)

diff --git a/data/elementary/themes/edc/elm/win.edc 
b/data/elementary/themes/edc/elm/win.edc
index a9c98a0bfa..cabb49 100644
--- a/data/elementary/themes/edc/elm/win.edc
+++ b/data/elementary/themes/edc/elm/win.edc
@@ -1,13 +1,31 @@
 group { name: "elm/win/base/default";
data.item: "version" "119";
parts {
-  rect { "client_clip"; nomouse;
+  rect { "client_clip"; nomouse; }
+  swallow { "elm.swallow.menu";
+ clip_to: "client_clip";
  desc { "default";
-rel.to: "elm.swallow.contents";
+rel2.relative: 1 0;
+link.base: "elm,action,hide" "elm";
+align: 0.5 0.0;
+hid;
+ }
+ desc { "visible";
+inherit: "default";
+link.base: "elm,action,show_menu" "elm";
+fixed: 0 1;
+vis;
  }
   }
   swallow { "elm.swallow.contents";
  clip_to: "client_clip";
+ desc { "default";
+ }
+ desc { "with_menu";
+rel1.to: "elm.swallow.menu";
+rel1.relative: 0 1;
+link.base: "elm,action,show_menu" "elm";
+ }
   }
}
 }
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index c7cfa7f67d..47c85ef2b4 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5659,7 +5659,19 @@ _efl_ui_win_fullscreen_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *sd)
 static inline Eo *
 _main_menu_swallow_get(Efl_Ui_Win_Data *sd)
 {
-   if (edje_object_part_exists(sd->legacy.edje, "elm.swallow.menu"))
+   Eina_Bool legacy_menu_swallow = EINA_TRUE;
+   const char *data;
+   int version;
+
+   data = edje_object_data_get(sd->legacy.edje, "version");
+   version = data ? atoi(data) : 0;
+   if (version >= 119) legacy_menu_swallow = EINA_FALSE;
+
+#ifdef HAVE_ELEMENTARY_COCOA
+   if (sd->cocoa.win) legacy_menu_swallow = EINA_TRUE;
+#endif
+
+   if (legacy_menu_swallow)
  {
 DBG("Detected legacy theme, using legacy swallows.");
 return sd->legacy.edje;
@@ -5688,6 +5700,13 @@ _dbus_menu_set(Eina_Bool dbus_connect, void *data)
 sd->csd.need_menu = EINA_FALSE;
 _elm_menu_menu_bar_hide(sd->main_menu);
 _elm_win_resize_objects_eval(sd->obj, EINA_FALSE);
+if (swallow != sd->frame_obj)
+  {
+ // Note: Based on EFL 1.18 the signal was "elm,action,hide"
+ // and not "elm,action,hide_menu" as expected.
+ edje_object_signal_emit(swallow, "elm,action,hide", "elm");
+ edje_object_message_signal_recursive_process(swallow);
+  }
  }
else
  {
@@ -5700,6 +5719,11 @@ _dbus_menu_set(Eina_Bool dbus_connect, void *data)
  efl_canvas_object_is_frame_object_set(sd->main_menu, EINA_TRUE);
  sd->csd.need_menu = EINA_TRUE;
   }
+else
+  {
+ edje_object_signal_emit(swallow, "elm,action,show_menu", "elm");
+ edje_object_message_signal_recursive_process(swallow);
+  }
  }
_elm_win_frame_style_update(sd, 0, 1);
//sd->deferred_resize_job = EINA_TRUE;

-- 




[EGIT] [core/efl] master 02/02: elm_test: Set label as word wrap

2017-07-18 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit f1bcd804eccef1778873598d073d8fb2e550f275
Author: Jean-Philippe Andre 
Date:   Tue Jul 18 18:06:17 2017 +0900

elm_test: Set label as word wrap

This exposes an elm_win sizing bug. To test (under X):
  ELM_DISABLE_EXTERNAL_MENU=1 elementary_test -to "Main Menu"

The layout is not completely wrong 100% of the time, but it is
exactly correct 0% of the time. Window sizing is our flying
spaghetti monster.
---
 src/bin/elementary/test_main_menu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bin/elementary/test_main_menu.c 
b/src/bin/elementary/test_main_menu.c
index 40a52c5328..bb52527031 100644
--- a/src/bin/elementary/test_main_menu.c
+++ b/src/bin/elementary/test_main_menu.c
@@ -50,8 +50,9 @@ test_main_menu(void *data EINA_UNUSED,
 label = elm_label_add(win);
 elm_object_text_set(label, "(ELM_DISABLE_EXTERNAL_MENU environment "
 "variable is set. Using local menu instead)");
-evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
+evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
+elm_label_line_wrap_set(label, ELM_WRAP_WORD);
 elm_box_pack_end(bx, label);
 evas_object_show(label);
  }

-- 




Re: [E-devel] EFL 1.20.0 beta 2

2017-07-17 Thread Jean-Philippe André
I poked the guy who broke it but didn't get a patch yet. Will poke more
today and revert if necessary.

2017-07-17 21:35 GMT+09:00 Andrew Williams <a...@andywilliams.me>:

> Hi,
>
> Did you get anywhere with this one? I think I see that across Linux and OS
> X but I don't know where to start debugging.
>
> Thanks,
> Andy
>
> On Thu, 13 Jul 2017 at 06:12 Jean-Philippe André <j...@videolan.org>
> wrote:
>
> > 2017-07-13 8:57 GMT+09:00 Carsten Haitzler <ras...@rasterman.com>:
> >
> > > On Wed, 12 Jul 2017 16:13:48 + Andrew Williams <
> a...@andywilliams.me
> > >
> > > said:
> > >
> > > > On Linux and on OS X the scrollbars in Elementary now jump when
> dragged
> > > so
> > > > that the top of the bar is under the cursor. This happened in the
> last
> > 2
> > > > days as far as I can tell.
> > >
> > > yeah. i see that... that's bad... :(
> > >
> > > Yeah I see it as well and I think I know the culprit.
> > I'll have a look, thanks for the report.
> >
> >
> > > > Andy
> > > >
> > > > On Wed, 12 Jul 2017 at 14:12 Jean Guyomarc'h <
> jean.guyoma...@gmail.com
> > >
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I haven't tested the beta2 on osx, but it was "fine" (except the
> > > infamous
> > > > > segfault when ending a graphical program) during alpha phase.
> > > > > I'll try to have a look during the week, but since my hardware is
> > > dying,
> > > > > build times are terrible, which make development harder.
> > > > >
> > > > > Jean
> > > > >
> > > > > On Wed, Jul 12, 2017 at 12:50 PM, Andrew Williams <
> > > a...@andywilliams.me>
> > > > > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Have people been testing on OS X in the last week? I just updated
> > to
> > > > > master
> > > > > > (almost the same as beta2?) and I see many new issues /
> > regressions.
> > > Will
> > > > > > document them in tickets and link here later.
> > > > > >
> > > > > > Thanks,
> > > > > > Andy
> > > > > > On Wed, 12 Jul 2017 at 11:02, Stefan Schmidt <
> > ste...@osg.samsung.com
> > > >
> > > > > > wrote:
> > > > > >
> > > > > > > Hello.
> > > > > > >
> > > > > > > On 07/12/2017 02:49 AM, William L. Thomson Jr. wrote:
> > > > > > > > On Tue, 11 Jul 2017 23:51:54 +0200
> > > > > > > > Stefan Schmidt <ste...@osg.samsung.com> wrote:
> > > > > > > >
> > > > > > > >> Second beta release for the 1.20 release cycle. Please give
> it
> > > some
> > > > > > > >> good testing
> > > > > > > >>
> > > > > > > >> **Download**
> > > > > > > >>
> > > > > > > >> http://download.enlightenment.org/rel/libs/efl/efl-1.20.0-
> > > > > > beta2.tar.gz
> > > > > > > >> 1a845c6cfdb139d25bc29d7bfdbc15
> bcf7d246aad2d1f6be3218f7925cfd
> > > 7078
> > > > > > > >>
> > > > > > > >> http://download.enlightenment.org/rel/libs/efl/efl-1.20.0-
> > > > > > beta2.tar.xz
> > > > > > > >> b0f33bc39b28ea13c2581326b2544f
> 8a75935f0c877ba2db790531021764
> > > f82b
> > > > > > > >
> > > > > > > > Failed to build with same issue as beta1. Which I thought was
> > > fixed?
> > > > > > >
> > > > > > > I was under the same impression. That this was fixed.
> > > > > > >
> > > > > > > > make[4]: *** No rule to make target
> > 'lib/efl_wl/copiedfromweston.
> > > x',
> > > > > > > > needed by ' lib/efl_wl/libefl_wl.la'.  Stop.
> > > > > > > >
> > > > > > > >   * ERROR: dev-libs/efl-1.20.0_beta2::os-xtoo failed
> (compile
> > > phase):
> > > > > > > >   *   emake failed
> > > > > > >
> &g

Re: [E-devel] Unwanted artifacts on clock

2017-07-17 Thread Jean-Philippe André
2017-07-18 8:28 GMT+09:00 William L. Thomson Jr. <wlt...@o-sinc.com>:

> This looks horrible! Not to mention even with my glasses on I have a
> hard time reading. But we have established no one cares about the
> vision impaired running E.
> https://www.enlightenment.org/ss/e-596cffc4015e98.11705649.jpg
>
> I have spent well over an entire day now trying to replace this stupid
> clock look. I have already fixed it in my theme, eminence. Now I am
> having to figure out how I can fix this for entrance default theme.
>
> Which seems because edje has some serious limitations. I cannot easily
> inherit the default look, and override/replace an element. Such that I
> am now having to copy the entire clock theme. Which I am running into a
> series of other problems in doing such. With nothing working or any
> signs of progress.
>
> It is making me hate edje with a passion!!! Not to mention this damn
> clock. Why must people spend hours of their time trying to change the
> look? I thuoght theming supposed to be easy? How the heck is a graphic
> artist supposed to do this stuff?
>
> Ones personal preference should not cost others time like this to
> change. At this point I am having to entirely re-do the clock,
> replacing images with text. Otherwise I have to copy the clock images
> from the default them into entrance theme for no reason. Duplicating
> the default images is stupid. Even more so that I cannot use them
> without copying into entrance theme.
>
> Thus far nothing works and seems using elm_clock is a horrible waste of
> time. I am not sure if it can be themed looking at the source code. I
> can only get pieces of it to show up with my modifications and its not
> functioning. The most frustrating thing I have touched thus far in EFL.
>
> I seriously hate this clock!
>

There's also an analog mode, which has pretty high contrast. :-)

-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: win: Amend previous commit about modifiers

2017-07-17 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 9dddc075d4a26c199477a23735fe81918e32dd39
Author: Jean-Philippe Andre 
Date:   Mon Jul 17 16:36:19 2017 +0900

win: Amend previous commit about modifiers

The code was invalid, so making it valid now. Explicitely marking
the modifiers as unused, as mentionned in the documentation as
well.

See 9baa8752a9170e68e9430474f26cc1e672677d8e
---
 src/lib/elementary/efl_ui_win.c | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index dd23d99061..c7cfa7f67d 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -8073,21 +8073,26 @@ elm_win_resize_object_del(Eo *obj, Evas_Object *subobj)
 
 EAPI Eina_Bool
 elm_win_keygrab_set(Elm_Win *obj, const char *key,
-Evas_Modifier_Mask modifiers, Evas_Modifier_Mask 
not_modifiers,
+Evas_Modifier_Mask modifiers EINA_UNUSED,
+Evas_Modifier_Mask not_modifiers EINA_UNUSED,
 int priority, Elm_Win_Keygrab_Mode grab_mode)
 {
+   // Note: Not converting modifiers as they are not used in the implementation
return efl_ui_win_keygrab_set(obj, key,
- (Efl_Input_Modifier) modifiers,
- (Efl_Input_Modifier) not_modifiers,
+ EFL_INPUT_MODIFIER_NONE,
+ EFL_INPUT_MODIFIER_NONE,
  priority, grab_mode);
 }
 
 EAPI Eina_Bool
-elm_win_keygrab_unset(Elm_Win *obj, const char *key, Evas_Modifier_Mask 
modifiers, Evas_Modifier_Mask not_modifiers)
+elm_win_keygrab_unset(Elm_Win *obj, const char *key,
+  Evas_Modifier_Mask modifiers EINA_UNUSED,
+  Evas_Modifier_Mask not_modifiers EINA_UNUSED)
 {
+   // Note: Not converting modifiers as they are not used in the implementation
return efl_ui_win_keygrab_unset(obj, key,
-   (Efl_Input_Modifier) modifiers,
-   (Efl_Input_Modifier) not_modifiers);
+   EFL_INPUT_MODIFIER_NONE,
+   EFL_INPUT_MODIFIER_NONE);
 }
 
 // deprecated

-- 




[EGIT] [core/efl] master 01/03: ecore joystick: Use const char * in API, not slstr

2017-07-17 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 9c18f0d00ac530563547706b603c62e7e25d9b47
Author: Jean-Philippe Andre 
Date:   Mon Jul 17 11:00:23 2017 +0900

ecore joystick: Use const char * in API, not slstr

The API eina_slstr_ is meant to look just like const
strings, wihch means here there could instead be an internal
struct holding the name, and the API would behave the same.

Note: This API is new in 1.20
---
 src/lib/ecore_input/Ecore_Input.h  | 2 +-
 src/lib/ecore_input/ecore_input_joystick.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_input/Ecore_Input.h 
b/src/lib/ecore_input/Ecore_Input.h
index 8139f563d7..6853e764b5 100644
--- a/src/lib/ecore_input/Ecore_Input.h
+++ b/src/lib/ecore_input/Ecore_Input.h
@@ -489,7 +489,7 @@ extern "C" {
 * @return name of joystick.
 * @since 1.20
 */
-   EAPI Eina_Slstr *ecore_input_joystick_name_get(int index);
+   EAPI const char *ecore_input_joystick_name_get(int index);
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/lib/ecore_input/ecore_input_joystick.c 
b/src/lib/ecore_input/ecore_input_joystick.c
index 58fbedef67..28f527bc89 100644
--- a/src/lib/ecore_input/ecore_input_joystick.c
+++ b/src/lib/ecore_input/ecore_input_joystick.c
@@ -622,7 +622,7 @@ ecore_input_joystick_event_axis_deadzone_get(void)
return _event_axis_deadzone;
 }
 
-EAPI Eina_Slstr *
+EAPI const char *
 ecore_input_joystick_name_get(int index)
 {
 #if defined(HAVE_EEZE) && defined(JSIOCGNAME)

-- 




[EGIT] [core/efl] master 02/03: win: Fix ABI compatibility for grab modifiers

2017-07-17 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 9baa8752a9170e68e9430474f26cc1e672677d8e
Author: Jean-Philippe Andre 
Date:   Mon Jul 17 14:24:30 2017 +0900

win: Fix ABI compatibility for grab modifiers

This fixes an ABI change when moving from unsigned long long
modifier mask to a simple enum. This is a fix for the release
of EFL 1.20.
---
 src/lib/elementary/efl_ui_win.c | 18 ++
 src/lib/elementary/efl_ui_win.eo|  2 ++
 src/lib/elementary/elm_win_legacy.h | 33 +
 3 files changed, 53 insertions(+)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index cd54c583ca..dd23d99061 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -8071,6 +8071,24 @@ elm_win_resize_object_del(Eo *obj, Evas_Object *subobj)
  ERR("could not remove sub object %p from window %p", subobj, obj);
 }
 
+EAPI Eina_Bool
+elm_win_keygrab_set(Elm_Win *obj, const char *key,
+Evas_Modifier_Mask modifiers, Evas_Modifier_Mask 
not_modifiers,
+int priority, Elm_Win_Keygrab_Mode grab_mode)
+{
+   return efl_ui_win_keygrab_set(obj, key,
+ (Efl_Input_Modifier) modifiers,
+ (Efl_Input_Modifier) not_modifiers,
+ priority, grab_mode);
+}
+
+EAPI Eina_Bool
+elm_win_keygrab_unset(Elm_Win *obj, const char *key, Evas_Modifier_Mask 
modifiers, Evas_Modifier_Mask not_modifiers)
+{
+   return efl_ui_win_keygrab_unset(obj, key,
+   (Efl_Input_Modifier) modifiers,
+   (Efl_Input_Modifier) not_modifiers);
+}
 
 // deprecated
 EAPI void
diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo
index 21de1d4f1e..431f73ace1 100644
--- a/src/lib/elementary/efl_ui_win.eo
+++ b/src/lib/elementary/efl_ui_win.eo
@@ -859,6 +859,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, 
Elm.Interface.Atspi.Window,
 @in grab_mode: Efl.Ui.Win.Keygrab_Mode; [[Describes how the key 
should
  be grabbed, wrt. focus and stacking.]]
  }
+ legacy: null;
   }
   keygrab_unset {
  [[Unset keygrab value of the window
@@ -873,6 +874,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, 
Elm.Interface.Atspi.Window,
 @in not_modifiers: Efl.Input.Modifier; [[A combinaison of modifier 
keys
  that must not be present to trigger the event. Not supported 
yet.]]
  }
+ legacy: null;
   }
   move_resize_start {
  [[Start moving or resizing the window.
diff --git a/src/lib/elementary/elm_win_legacy.h 
b/src/lib/elementary/elm_win_legacy.h
index ebb4ff5cf0..0c8c290fff 100644
--- a/src/lib/elementary/elm_win_legacy.h
+++ b/src/lib/elementary/elm_win_legacy.h
@@ -1090,6 +1090,39 @@ EAPI void elm_win_aspect_set(Elm_Win *obj, double 
aspect);
 EAPI double elm_win_aspect_get(const Elm_Win *obj);
 
 /**
+ * @brief Set keygrab value of the window
+ *
+ * This function grabs the @c key of window using @c grab_mode.
+ *
+ * @param[in] key This string is the keyname to grab.
+ * @param[in] modifiers A combinaison of modifier keys that must be present to
+ * trigger the event. Not supported yet.
+ * @param[in] not_modifiers A combinaison of modifier keys that must not be
+ * present to trigger the event. Not supported yet.
+ * @param[in] priority Not supported yet.
+ * @param[in] grab_mode Describes how the key should be grabbed, wrt. focus and
+ * stacking.
+ *
+ * @return @c true on success, @c false otherwise
+ */
+EAPI Eina_Bool elm_win_keygrab_set(Elm_Win *obj, const char *key, 
Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, int priority, 
Elm_Win_Keygrab_Mode grab_mode);
+
+/**
+ * @brief Unset keygrab value of the window
+ *
+ * This function unset keygrab value. Ungrab @c key of window.
+ *
+ * @param[in] key This string is the keyname to grab.
+ * @param[in] modifiers A combinaison of modifier keys that must be present to
+ * trigger the event. Not supported yet.
+ * @param[in] not_modifiers A combinaison of modifier keys that must not be
+ * present to trigger the event. Not supported yet.
+ *
+ * @return @c true on success, @c false otherwise
+ */
+EAPI Eina_Bool elm_win_keygrab_unset(Elm_Win *obj, const char *key, 
Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
+
+/**
  * @brief Get the elm_win object from any child object
  * 
  * @return The elm_win, or @c NULL on failure

-- 




Re: [E-devel] ABI/API checker results from abi-laboratory for 1.20 beta1

2017-07-16 Thread Jean-Philippe André
Hi,

Cedric, Mike,

I spotted 3 new APIs in evas object:

efl_canvas_object.eo.legacy.h, libevas.so.1.20.0
evas_object_pointer_coords_inside_get ( Efl_Canvas_Object* obj, int x, int
y )
evas_object_pointer_inside_by_device_get ( Efl_Canvas_Object const* obj,
Efl_Input_Device* dev )
evas_object_pointer_inside_get ( Efl_Canvas_Object const* obj )

There is no need for both evas_object_pointer_inside_get() and
evas_object_pointer_inside_by_device_get(), just use NULL as device.

evas_object_pointer_coords_inside_get() also has nothing to do with
pointer, it's just comparing geometries. I wonder if we shouldn't instead
explicitely expose the bounding box as a public API on all objects, and
then let the app do the comparison. Why? Because it's not clear what
"logically inside" (as per the doc) really means: what if the smart obj is
full of "holes" and the given point is inside one of those holes? Then the
API would return true, even though it could be considered not "logically
inside".

I'll have a closer look at the rest of the APIs soon.


2017-07-14 17:19 GMT+09:00 Stefan Schmidt <ste...@osg.samsung.com>:

> Hello.
>
> On 07/13/2017 02:41 PM, Stefan Schmidt wrote:
>
>> Hello.
>>
>> On 07/07/2017 04:40 PM, Stefan Schmidt wrote:
>>
>>> I will also look through it next week and run our own checker as it had
>>> slightly different results in the past and I want to be sure be cover both.
>>>
>>
>> And here is the version from our own checker scripts:
>> https://devs.enlightenment.org/~stefan/compat_reports/efl/1.
>> 19.0_to_1.20.0/compat_report.html
>>
>
> On the same URL you will now find an updated report. Seems I had a 1.19
> dump around which was not from the final release but a few days before. The
> emile API change was never in the final 1.19 release as Cedric pointed out
> to me.
>
> The good thing is that I can see no difference between our report and the
> one from ABI labs anymore now. :) Sorry for the hassle.
>
>
> regards
> Stefan Schmidt
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>


-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: win: fix compiler warning

2017-07-13 Thread Jean-Philippe André
2017-07-13 16:35 GMT+09:00 Stefan Schmidt <ste...@osg.samsung.com>:

> Hello.
>
> On 07/13/2017 04:18 AM, Amitesh Singh wrote:
>
>> ami pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=98b9bb0
>> da519c3ac9eb1c33caad79e54349e5a7f
>>
>> commit 98b9bb0da519c3ac9eb1c33caad79e54349e5a7f
>> Author: Amitesh Singh <amitesh...@samsung.com>
>> Date:   Thu Jul 13 11:16:48 2017 +0900
>>
>>  win: fix compiler warning
>> ---
>>   src/lib/elementary/efl_ui_win.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/lib/elementary/efl_ui_win.c
>> b/src/lib/elementary/efl_ui_win.c
>> index 90bdb2c145..cd54c583ca 100644
>> --- a/src/lib/elementary/efl_ui_win.c
>> +++ b/src/lib/elementary/efl_ui_win.c
>> @@ -5339,7 +5339,7 @@ _efl_ui_win_elm_widget_focus_manager_factory(Eo
>> *obj EINA_UNUSED, Efl_Ui_Win_Dat
>>   }
>> EOLIAN static void
>> -_efl_ui_win_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data
>> *pd)
>> +_efl_ui_win_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data
>> *pd EINA_UNUSED)
>>   {
>>   #ifdef HAVE_ELEMENTARY_WL2
>>  if (pd->type == ELM_WIN_FAKE)
>>
>
> As you can see in this line pd is actually used with HAVE_ELEMENTARY_WL2.
>

I think the hint EINA_UNUSED is fine here, as the only other solution is
something like:

#else
(void) pd;
#endif

Which I find uglier. EINA_UNUSED does not change anything in the binary
code.

-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] main menu breakage

2017-07-13 Thread Jean-Philippe André
2017-07-13 16:52 GMT+09:00 Andrew Williams <a...@andywilliams.me>:

> Thanks. Happy to apply patches locally to help test :)
>

Hey. I failed to reply yesterday but I am not able to reproduce on Ubuntu.
Let's move this conversation to Phab: T5734

On Thu, 13 Jul 2017 at 02:14, Jean-Philippe André <j...@videolan.org> wrote:
>
> > 2017-07-13 6:18 GMT+09:00 Andrew Williams <a...@andywilliams.me>:
> >
> > > Hi,
> > >
> > > Thanks for the fixage.
> > > I have noticed that there is still an outstanding issue on OS X
> > > unfortunately.
> > > If you have a main menu in the window then on OSX the window is too
> short
> > > by the height of a menu.
> > > Check it out in elementary_test or in edi too.
> > > I could look at addressing it but I don't know where to start :)
> > >
> >
> > Thanks for the report. I'm not too surprised and will look into it.
> > I can test with Ubuntu's Unity desktop I think. I can't test OSX.
> >
> >
> > >
> > > Thanks,
> > > Andy
> > >
> > > On Tue, 4 Jul 2017 at 12:42 Andrew Williams <a...@andywilliams.me>
> > wrote:
> > >
> > > > Great thanks.
> > > > I look forward to seeing how the api was misused as well - it seemed
> > like
> > > > such a simple concept :)
> > > >
> > > > Andy
> > > > On Tue, 4 Jul 2017 at 05:27, Jean-Philippe André <j...@videolan.org>
> > > > wrote:
> > > >
> > > >> Hi Andy,
> > > >>
> > > >> I've just pushed some patches in my efl dev branch.
> > > >> Not merging to master right now but will do tomorrow unless I find
> new
> > > >> issues.
> > > >>
> > > >> Also I will push some pathes for edi itself (misuse of the main menu
> > > api).
> > > >>
> > > >> Hopefully this solves everything. Resizing seems faster but it's
> still
> > > >> quite slow, so I guess we can still improve a lot there.
> > > >>
> > > >> Best regards,
> > > >>
> > > >>
> > > >> 2017-07-04 0:48 GMT+09:00 Andrew Williams <a...@andywilliams.me>:
> > > >>
> > > >> > Let's get that in to the the next release at least and we can
> figure
> > > the
> > > >> > rest based on that. Edi did have a workaround applied that I
> removed
> > > so
> > > >> I
> > > >> > may need to play with things a little to see if there is
> strangeness
> > > at
> > > >> > that end too.
> > > >> >
> > > >> > Thanks,
> > > >> > Andy
> > > >> > On Mon, 3 Jul 2017 at 02:43, Jean-Philippe André <
> j...@videolan.org
> > >
> > > >> > wrote:
> > > >> >
> > > >> > > Hi,
> > > >> > >
> > > >> > > 2017-06-29 20:57 GMT+09:00 Andrew Williams <
> a...@andywilliams.me
> > >:
> > > >> > >
> > > >> > > > Hi,
> > > >> > > >
> > > >> > > > I meant to get this resolved at the weekend but we ran out of
> > the
> > > >> time.
> > > >> > > > Some strange sizing issues have been haunting us (
> > > >> > > > https://phab.enlightenment.org/T5482) I have tracked it down
> > to a
> > > >> main
> > > >> > > > menu
> > > >> > > > that's bigger than the window content.
> > > >> > > >
> > > >> > > > If someone can help please apply the attached patch to EFL
> then
> > > run
> > > >> > > > elementary_test and click "Main menu" - you will see a very
> > > unhappy
> > > >> > > > window...
> > > >> > > >
> > > >> > > > First to solve this get's a special prize!
> > > >> > > >
> > > >> > >
> > > >> > > I've got a pending patch for that but I'm not too happy with it
> > and
> > > it
> > > >> > also
> > > >> > > doesn't solve your issues with EDI.
> > > >> > > I'll keep investigating.
> > > >> > >
> > > >> > > --
> > > >> > > Jean-Philippe André
&g

Re: [E-devel] EFL 1.20.0 beta 2

2017-07-12 Thread Jean-Philippe André
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > >
> > >
> > > 
> --
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > > ___
> > > enlightenment-devel mailing list
> > > enlightenment-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > >
> > --
> > http://andywilliams.me
> > http://ajwillia.ms
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
>
>
> --
> - Codito, ergo sum - "I code, therefore I am" --
> The Rasterman (Carsten Haitzler)ras...@rasterman.com
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>


-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] main menu breakage

2017-07-12 Thread Jean-Philippe André
2017-07-13 6:18 GMT+09:00 Andrew Williams <a...@andywilliams.me>:

> Hi,
>
> Thanks for the fixage.
> I have noticed that there is still an outstanding issue on OS X
> unfortunately.
> If you have a main menu in the window then on OSX the window is too short
> by the height of a menu.
> Check it out in elementary_test or in edi too.
> I could look at addressing it but I don't know where to start :)
>

Thanks for the report. I'm not too surprised and will look into it.
I can test with Ubuntu's Unity desktop I think. I can't test OSX.


>
> Thanks,
> Andy
>
> On Tue, 4 Jul 2017 at 12:42 Andrew Williams <a...@andywilliams.me> wrote:
>
> > Great thanks.
> > I look forward to seeing how the api was misused as well - it seemed like
> > such a simple concept :)
> >
> > Andy
> > On Tue, 4 Jul 2017 at 05:27, Jean-Philippe André <j...@videolan.org>
> > wrote:
> >
> >> Hi Andy,
> >>
> >> I've just pushed some patches in my efl dev branch.
> >> Not merging to master right now but will do tomorrow unless I find new
> >> issues.
> >>
> >> Also I will push some pathes for edi itself (misuse of the main menu
> api).
> >>
> >> Hopefully this solves everything. Resizing seems faster but it's still
> >> quite slow, so I guess we can still improve a lot there.
> >>
> >> Best regards,
> >>
> >>
> >> 2017-07-04 0:48 GMT+09:00 Andrew Williams <a...@andywilliams.me>:
> >>
> >> > Let's get that in to the the next release at least and we can figure
> the
> >> > rest based on that. Edi did have a workaround applied that I removed
> so
> >> I
> >> > may need to play with things a little to see if there is strangeness
> at
> >> > that end too.
> >> >
> >> > Thanks,
> >> > Andy
> >> > On Mon, 3 Jul 2017 at 02:43, Jean-Philippe André <j...@videolan.org>
> >> > wrote:
> >> >
> >> > > Hi,
> >> > >
> >> > > 2017-06-29 20:57 GMT+09:00 Andrew Williams <a...@andywilliams.me>:
> >> > >
> >> > > > Hi,
> >> > > >
> >> > > > I meant to get this resolved at the weekend but we ran out of the
> >> time.
> >> > > > Some strange sizing issues have been haunting us (
> >> > > > https://phab.enlightenment.org/T5482) I have tracked it down to a
> >> main
> >> > > > menu
> >> > > > that's bigger than the window content.
> >> > > >
> >> > > > If someone can help please apply the attached patch to EFL then
> run
> >> > > > elementary_test and click "Main menu" - you will see a very
> unhappy
> >> > > > window...
> >> > > >
> >> > > > First to solve this get's a special prize!
> >> > > >
> >> > >
> >> > > I've got a pending patch for that but I'm not too happy with it and
> it
> >> > also
> >> > > doesn't solve your issues with EDI.
> >> > > I'll keep investigating.
> >> > >
> >> > > --
> >> > > Jean-Philippe André
> >> > >
> >> > > 
> >> > --
> >> > > Check out the vibrant tech community on one of the world's most
> >> > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >> > > ___
> >> > > enlightenment-devel mailing list
> >> > > enlightenment-devel@lists.sourceforge.net
> >> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >> > >
> >> > --
> >> > http://andywilliams.me
> >> > http://ajwillia.ms
> >> > 
> >> > --
> >> > Check out the vibrant tech community on one of the world's most
> >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >> > ___
> >> > enlightenment-devel mailing list
> >> > enlightenment-devel@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >> >
> >>
> >>
> >>
> >> --
> 

[EGIT] [core/efl] master 01/01: evas_smart: Fix evas_smart_callback_description_find

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

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

commit 9513fed85ea00637745362a5a34083da3d230f22
Author: Jean-Philippe Andre 
Date:   Wed Jul 12 17:19:28 2017 +0900

evas_smart: Fix evas_smart_callback_description_find

bsearch was returnign a cb** not a cb*

Fixes T4540
---
 src/lib/evas/canvas/evas_smart.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_smart.c b/src/lib/evas/canvas/evas_smart.c
index ccd9a69855..a070c98a95 100644
--- a/src/lib/evas/canvas/evas_smart.c
+++ b/src/lib/evas/canvas/evas_smart.c
@@ -326,7 +326,11 @@ _evas_smart_cb_description_cmp_search(const void *p1, 
const void *p2)
 const Evas_Smart_Cb_Description *
 evas_smart_cb_description_find(const Evas_Smart_Cb_Description_Array *a, const 
char *name)
 {
+   const Evas_Smart_Cb_Description **found = NULL;
+
if (!a->array) return NULL;
-   return bsearch(name, a->array, a->size, sizeof(Evas_Smart_Cb_Description *),
-  _evas_smart_cb_description_cmp_search);
+   found = bsearch(name, a->array, a->size, sizeof(Evas_Smart_Cb_Description 
*),
+   _evas_smart_cb_description_cmp_search);
+
+   return found ? (*found) : NULL;
 }

-- 




[EGIT] [core/efl] master 02/02: Revert "colorselector: Avoid API call on NULL object"

2017-07-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 2ee389c54bbab49d8a3124d455125393d4b07aa7
Author: Jean-Philippe Andre 
Date:   Wed Jul 12 10:55:44 2017 +0900

Revert "colorselector: Avoid API call on NULL object"

This reverts commit b156f606e4fefb9b1d3ac0ca6d180e0d70e0140c.
The change should have been in EO itself. See the previous
patch.

Ref T5715
---
 src/lib/elementary/elm_colorselector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_colorselector.c 
b/src/lib/elementary/elm_colorselector.c
index 5f6d9c1ea3..5744118ed4 100644
--- a/src/lib/elementary/elm_colorselector.c
+++ b/src/lib/elementary/elm_colorselector.c
@@ -1507,7 +1507,7 @@ _elm_colorselector_elm_layout_sizing_eval(Eo *obj, 
Elm_Colorselector_Data *sd)
 return;
  }
 
-   if (sd->palette_box) efl_pack_layout_request(sd->palette_box);
+   efl_pack_layout_request(sd->palette_box);
edje_object_size_min_calc(wd->resize_obj, , );
evas_object_size_hint_min_set(obj, minw, minh);
 }

-- 




[EGIT] [core/efl] master 01/02: eo: Don't resolve function calls for NULL objects

2017-07-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 40029ce70a7b57352e7070825bf8b15490f2d2e8
Author: Jean-Philippe Andre 
Date:   Wed Jul 12 10:43:07 2017 +0900

eo: Don't resolve function calls for NULL objects

eo_function(NULL) always leads to a no-operation. A this
point it is basically considered the normal operation
with EO to just silently ignore NULL errors.

If the API function "eo_function" belongs to a class that
has not been loaded yet (eg. no object of this type has
been created yet), then the op associated to the API func
may not be defined yet.

Fixes T5715
---
 src/lib/eo/eo.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index e4f767b687..2345fd3196 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -691,8 +691,12 @@ _efl_object_api_op_id_get(const void *api_func)
 EAPI Efl_Object_Op
 _efl_object_op_api_id_get(const void *api_func, const Eo *obj, const char 
*api_func_name, const char *file, int line)
 {
-   Efl_Object_Op op = _efl_object_api_op_id_get_internal(api_func);
+   Efl_Object_Op op;
 
+#ifndef EO_DEBUG
+   if (!obj) return EFL_NOOP;
+#endif
+   op = _efl_object_api_op_id_get_internal(api_func);
if (op == EFL_NOOP)
  {
 eina_log_print(_eo_log_dom, EINA_LOG_LEVEL_ERR,

-- 




Re: [E-devel] Evas_Event_Mouse_Move missing data

2017-07-11 Thread Jean-Philippe André
I couldn't reproduce that with today's git.
Can you provide me with some test code? Maybe in EDI?

2017-07-12 4:57 GMT+09:00 Andrew Williams <a...@andywilliams.me>:

> Hi,
>
> Thanks for the help - I will test it shortly.
> Unfortunately I have also found that Mouse_Wheel data structures always
> seem to have canvas.x and .y are always 0 :(
>
> I assume this is a different issue as it's broken on git master.
>
> Thanks,
> Andy
>
> On Mon, 10 Jul 2017 at 08:04 Jean-Philippe André <j...@videolan.org>
> wrote:
>
> > Hi Andy,
> >
> > 2017-07-10 11:56 GMT+09:00 Jean-Philippe André <j...@videolan.org>:
> >
> > >
> > >
> > >
> > > 2017-07-09 2:19 GMT+09:00 Andrew Williams <a...@andywilliams.me>:
> > >
> > >> Hi,
> > >>
> > >> I was trying to use a mouse_move event earlier but found it was
> missing
> > >> critical info:
> > >>
> > >> event->buttons
> > >> event->prev.canvas.x
> > >> event->prev.canvas.y
> > >>
> > >> Were always 0.
> > >> Am I missing something obvious? I had to code up the gesture using
> > >> mouse_down/up to capture the missing info instead...
> > >>
> > >
> > > I'll have a look, thanks.
> > >
> >
> > I assume you set up a callback on the window or the evas? And you had no
> > problems with normal objects?
> > If that is so, then this should be fixed. Please let me know if you are
> > still having issues.
> >
> > --
> > Jean-Philippe André
> >
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> --
> http://andywilliams.me
> http://ajwillia.ms
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: colorselector: Avoid API call on NULL object

2017-07-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit b156f606e4fefb9b1d3ac0ca6d180e0d70e0140c
Author: Jean-Philippe Andre 
Date:   Wed Jul 12 10:24:11 2017 +0900

colorselector: Avoid API call on NULL object

Solves this error:
  ERR<2321>:eo ../src/lib/efl/interfaces/efl_pack_layout.eo.c:1
  efl_pack_layout_request() Unable to resolve op for api func
  0x7fffed16dba0 for obj=(nil) ((null))

Fixes T5715
---
 src/lib/elementary/elm_colorselector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_colorselector.c 
b/src/lib/elementary/elm_colorselector.c
index 5744118ed4..5f6d9c1ea3 100644
--- a/src/lib/elementary/elm_colorselector.c
+++ b/src/lib/elementary/elm_colorselector.c
@@ -1507,7 +1507,7 @@ _elm_colorselector_elm_layout_sizing_eval(Eo *obj, 
Elm_Colorselector_Data *sd)
 return;
  }
 
-   efl_pack_layout_request(sd->palette_box);
+   if (sd->palette_box) efl_pack_layout_request(sd->palette_box);
edje_object_size_min_calc(wd->resize_obj, , );
evas_object_size_hint_min_set(obj, minw, minh);
 }

-- 




[EGIT] [core/efl] master 01/01: elm: Fix fileselector button "hidden files"

2017-07-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 231ef8142b7bd9882557a17960631aed1a57acc9
Author: Jean-Philippe Andre 
Date:   Tue Jul 11 18:58:51 2017 +0900

elm: Fix fileselector button "hidden files"

Fixes T5465

@fix
---
 src/lib/elementary/elc_fileselector_button.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/elc_fileselector_button.c 
b/src/lib/elementary/elc_fileselector_button.c
index 24d7b8af6a..3ee7116434 100644
--- a/src/lib/elementary/elc_fileselector_button.c
+++ b/src/lib/elementary/elc_fileselector_button.c
@@ -175,6 +175,7 @@ _activate(Elm_Fileselector_Button_Data *sd)
  sd->fsw = _new_window_add(sd);
 
sd->fs = elm_fileselector_add(sd->fsw);
+   elm_fileselector_hidden_visible_set(sd->fs, sd->fsd.hidden_visible);
efl_ui_mirrored_set
  (sd->fs, efl_ui_mirrored_get(sd->obj));
efl_ui_mirrored_automatic_set(sd->fs, EINA_FALSE);

-- 




[EGIT] [core/efl] master 02/02: evas: Add a test case with a custom font

2017-07-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit e8b35c779e7d7bba86172d00612fe08abee6c920
Author: Jean-Philippe Andre 
Date:   Tue Jul 11 16:02:59 2017 +0900

evas: Add a test case with a custom font

The font is **ugly** and was created with birdfont. Its license
shall be anything EFL requires (public domain in the ttf file).
---
 src/Makefile_Evas.am|   1 +
 src/tests/evas/evas_test_filters.c  |   2 +-
 src/tests/evas/evas_test_mask.c |   2 +-
 src/tests/evas/evas_test_object_smart.c |   2 +-
 src/tests/evas/evas_test_text.c |  31 ++-
 src/tests/evas/evas_test_textblock.c|   2 +-
 src/tests/evas/{ => fonts}/TestFont.eet | Bin
 src/tests/evas/fonts/evas_test_font.ttf | Bin 0 -> 16744 bytes
 8 files changed, 35 insertions(+), 5 deletions(-)

diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index fc477e8351..d3b3bcbb92 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -2391,6 +2391,7 @@ endif
 
 EXTRA_DIST2 += \
 tests/evas/TestFont.eet \
+tests/evas/fonts/evas_test_font.ttf \
 tests/evas/images/HM7Y9233-50.tgv \
 tests/evas/images/HM7Y9233.jpg \
 tests/evas/images/Light-50.png \
diff --git a/src/tests/evas/evas_test_filters.c 
b/src/tests/evas/evas_test_filters.c
index f6d4ccd77a..07e2928092 100644
--- a/src/tests/evas/evas_test_filters.c
+++ b/src/tests/evas/evas_test_filters.c
@@ -18,7 +18,7 @@
 #include "evas_suite.h"
 
 #define TEST_FONT_NAME "DejaVuSans,UnDotum"
-#define TEST_FONT_SOURCE TESTS_SRC_DIR "/TestFont.eet"
+#define TEST_FONT_SOURCE TESTS_SRC_DIR "/fonts/TestFont.eet"
 #define EVAS_DATA_DIR TESTS_SRC_DIR "/../../lib/evas"
 
 #define START_FILTER_TEST() \
diff --git a/src/tests/evas/evas_test_mask.c b/src/tests/evas/evas_test_mask.c
index 35d665e847..1f160444e4 100644
--- a/src/tests/evas/evas_test_mask.c
+++ b/src/tests/evas/evas_test_mask.c
@@ -11,7 +11,7 @@
 #include "evas_tests_helpers.h"
 
 #define TEST_FONT_NAME "DejaVuSans,UnDotum"
-#define TEST_FONT_SOURCE TESTS_SRC_DIR "/TestFont.eet"
+#define TEST_FONT_SOURCE TESTS_SRC_DIR "/fonts/TestFont.eet"
 
 #define START_MASK_TEST(w, h) \
Ecore_Evas *ee; Evas *e; \
diff --git a/src/tests/evas/evas_test_object_smart.c 
b/src/tests/evas/evas_test_object_smart.c
index 23a43b7ac3..dbf88e0a7a 100644
--- a/src/tests/evas/evas_test_object_smart.c
+++ b/src/tests/evas/evas_test_object_smart.c
@@ -15,7 +15,7 @@
 #include "evas_suite.h"
 #include "evas_tests_helpers.h"
 
-#define TEST_FONT_SOURCE TESTS_SRC_DIR "/TestFont.eet"
+#define TEST_FONT_SOURCE TESTS_SRC_DIR "/fonts/TestFont.eet"
 #define TEST_TEXTBLOCK_FONT "font=DejaVuSans font_source=" TEST_FONT_SOURCE
 #define TEST_TEXTBLOCK_FONT_SIZE "14"
 #define TEST_TEXT_FONT "DejaVuSans,UnDotum"
diff --git a/src/tests/evas/evas_test_text.c b/src/tests/evas/evas_test_text.c
index 951e4c2039..f8508ec289 100644
--- a/src/tests/evas/evas_test_text.c
+++ b/src/tests/evas/evas_test_text.c
@@ -11,8 +11,10 @@
 #include "evas_suite.h"
 #include "evas_tests_helpers.h"
 
+#define TEST_FONT_DIR TESTS_SRC_DIR "/fonts/"
 #define TEST_FONT_NAME "DejaVuSans,UnDotum"
-#define TEST_FONT_SOURCE TESTS_SRC_DIR "/TestFont.eet"
+#define TEST_FONT_SOURCE TEST_FONT_DIR "TestFont.eet"
+#define TEST_FONT_TTF_NAME "Evas Test Font"
 
 #define START_TEXT_TEST() \
Evas *evas; \
@@ -654,6 +656,32 @@ START_TEST(evas_text_render)
 }
 END_TEST
 
+START_TEST(evas_text_font_load)
+{
+   Ecore_Evas *ee = ecore_evas_buffer_new(500, 500);
+   Evas *evas = ecore_evas_get(ee);
+   const char *font, *match;
+   Eina_List *list, *li;
+   int found = 0;
+
+   evas_font_path_global_append(TEST_FONT_DIR);
+   match = eina_stringshare_printf("%s:style=Regular", TEST_FONT_TTF_NAME);
+   list = evas_font_available_list(evas);
+   EINA_LIST_FOREACH(list, li, font)
+ if (eina_streq(font, match))
+   {
+  found = 1;
+  break;
+   }
+   evas_font_available_list_free(evas, list);
+   eina_stringshare_del(match);
+
+   ck_assert_int_eq(found, 1);
+
+   ecore_evas_free(ee);
+}
+END_TEST
+
 void evas_test_text(TCase *tc)
 {
tcase_add_test(tc, evas_text_simple);
@@ -668,4 +696,5 @@ void evas_test_text(TCase *tc)
 
tcase_add_test(tc, evas_text_unrelated);
tcase_add_test(tc, evas_text_render);
+   tcase_add_test(tc, evas_text_font_load);
 }
diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 196ef2fb2a..827cda8569 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -23,7 +23,7 @@ EAPI int
 _evas_textblock_format_offset_get(const Evas_Object_Textblock_Node_Format *n);
 /* end of functions defined in evas_object_textblock.c */
 
-#define TEST_FONT "font=DejaVuSans,UnDotum,malayalam font_source=" 
TESTS_SRC_DIR "/TestFont.eet"
+#define TEST_FONT "font=DejaVuSans,UnDotum,malayalam font_source=" 
TESTS_SRC_DIR 

[EGIT] [core/enlightenment] master 01/01: pulse: do not leak strbuf

2017-07-10 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit b173ed7be6beee016d96d4c78eaad641507fbe2c
Author: Jean-Philippe Andre 
Date:   Tue Jul 11 10:45:26 2017 +0900

pulse: do not leak strbuf

See also ac92ff52567293399060bfd35b22ae86fe.
- eina_strbuf_string_get() returns the internally stored string as
  a const char *, and does not free the strbuf itself
- eina_strbuf_string_steal() returns the internal string as a
  char *, giving ownership to the caller, and frees the strbuf
  itself
- eina_stringshare_add() takes a const char * as input and makes a
  copy of the string

As a consequence, ss_add(sb_string_steal()) leaks the internal
string from the strbuf, while ss_add(sb_string_get()) leaks the
strbuf structure.

A one liner here would require either an eina_slstr based API or
an API in stringshare to take ownership of a given string. Both
would be useful APIs :)
---
 src/modules/mixer/lib/backends/pulseaudio/pulse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/modules/mixer/lib/backends/pulseaudio/pulse.c 
b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
index 56446fcf4..ec1bdc1b4 100644
--- a/src/modules/mixer/lib/backends/pulseaudio/pulse.c
+++ b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
@@ -338,6 +338,7 @@ _sink_input_cb(pa_context *c EINA_UNUSED, const 
pa_sink_input_info *info,
eina_strbuf_append(input_name, ":");
eina_strbuf_append(input_name, info->name);
input->base.name = eina_stringshare_add(eina_strbuf_string_get(input_name));
+   eina_strbuf_free(input_name);
input->base.volume = _pa_cvolume_convert(>volume);
input->base.mute = !!info->mute;
EINA_LIST_FOREACH(ctx->sinks, l, s)

-- 




[EGIT] [core/efl] master 01/01: evas: Fix mouse event info in global events

2017-07-10 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 7f724f6c5db1127a6dd5786791f495b58910e9a9
Author: Jean-Philippe Andre 
Date:   Mon Jul 10 14:21:13 2017 +0900

evas: Fix mouse event info in global events

When using the legacy API (and in fact also with the EO API) to
listen to mouse events (move, in, out...) on a window instead
of an actual evas object, some information was missing:
 - buttons (bitmask of pressed buttons)
 - prev.x/y (previous position)

This is because Evas had not handled the event yet at this
point, it was coming directly from ecore_evas with incomplete
information. This patch involves evas a little bit earlier, and
also fixes evas_events_legacy.c to have consistent values for
cur/prev canvas/ouput coordinates. See also 890a91785 and
484dae76e675318. Those commits were making the pointer coord
a seat-based property (instead of canvas-based) but the event
should already have those proper values before converting to
a legacy struct. This patch restores the meaning of the DUP
macros, as I observed 4 different coordinates from the app side
(instead of just 2: prev and cur).

Thanks to Andy for reporting the original issue on the ML!
---
 src/lib/ecore_evas/ecore_evas.c  |  7 ++
 src/lib/evas/Evas_Internal.h |  1 +
 src/lib/evas/canvas/efl_input_pointer.c  | 39 
 src/lib/evas/canvas/evas_events_legacy.c | 10 +++-
 4 files changed, 40 insertions(+), 17 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index b6d82c55f9..280e82d609 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -3481,6 +3481,8 @@ _ecore_evas_mouse_move_process_internal(Ecore_Evas *ee,
ev->timestamp = timestamp;
ev->cur.x = evt_x;
ev->cur.y = evt_y;
+   efl_input_pointer_finalize(evt);
+
efl_event_callback_legacy_call(ee->evas,
   _event_description_get(ev->action), evt);
efl_del(evt);
@@ -4640,6 +4642,7 @@ _direct_mouse_updown(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Button *info, Efl_P
ev->angle = info->multi.angle - ee->rotation;
if (info->dev) ev->device = efl_ref(info->dev);
else ev->device = efl_ref(evas_default_device_get(e, 
EFL_INPUT_DEVICE_TYPE_MOUSE));
+   efl_input_pointer_finalize(evt);
 
efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
@@ -4701,6 +4704,7 @@ _direct_mouse_move_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Move *info)
ev->angle = info->multi.angle - ee->rotation;
if (info->dev) ev->device = efl_ref(info->dev);
else ev->device = efl_ref(evas_default_device_get(e, 
EFL_INPUT_DEVICE_TYPE_MOUSE));
+   efl_input_pointer_finalize(evt);
 
efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
@@ -4735,6 +4739,7 @@ _direct_mouse_wheel_cb(Ecore_Evas *ee, const 
Ecore_Event_Mouse_Wheel *info)
ev->wheel.dir = info->direction ? EFL_ORIENT_HORIZONTAL : 
EFL_ORIENT_VERTICAL;
if (info->dev) ev->device = efl_ref(info->dev);
else ev->device = efl_ref(evas_default_device_get(e, 
EFL_INPUT_DEVICE_TYPE_MOUSE));
+   efl_input_pointer_finalize(evt);
 
efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
@@ -4764,6 +4769,7 @@ _direct_mouse_inout(Ecore_Evas *ee, const 
Ecore_Event_Mouse_IO *info, Efl_Pointe
_pointer_position_set(ev, ee, info->x, info->y, info->x, info->y);
if (info->dev) ev->device = efl_ref(info->dev);
else ev->device = efl_ref(evas_default_device_get(e, 
EFL_INPUT_DEVICE_TYPE_MOUSE));
+   efl_input_pointer_finalize(evt);
 
efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
@@ -4893,6 +4899,7 @@ _direct_axis_update_cb(Ecore_Evas *ee, const 
Ecore_Event_Axis_Update *info)
_pointer_position_set(ev, ee, x, y, x, y);
if (info->dev) ev->device = efl_ref(info->dev);
else ev->device = efl_ref(evas_default_device_get(e, 
EFL_INPUT_DEVICE_TYPE_MOUSE));
+   efl_input_pointer_finalize(evt);
 
efl_event_callback_legacy_call(e, _event_description_get(ev->action), evt);
processed = ev->evas_done;
diff --git a/src/lib/evas/Evas_Internal.h b/src/lib/evas/Evas_Internal.h
index 47aeb0e55d..28702ef65c 100644
--- a/src/lib/evas/Evas_Internal.h
+++ b/src/lib/evas/Evas_Internal.h
@@ -46,6 +46,7 @@ EAPI Evas_Engine_Info 
*efl_canvas_output_engine_info_get(Efl_Canvas_Output *outp
 EAPI Eina_Bool efl_canvas_output_lock(Efl_Canvas_Output *output);
 EAPI Eina_Bool efl_canvas_output_unlock(Efl_Canvas_Output *output);
 
+EAPI void efl_input_pointer_finalize(Efl_Input_Pointer *obj);
 
 /* Internal EO APIs */
 EOAPI void efl_canvas_object_legacy_ctor(Eo 

Re: [E-devel] Evas_Event_Mouse_Move missing data

2017-07-10 Thread Jean-Philippe André
Hi Andy,

2017-07-10 11:56 GMT+09:00 Jean-Philippe André <j...@videolan.org>:

>
>
>
> 2017-07-09 2:19 GMT+09:00 Andrew Williams <a...@andywilliams.me>:
>
>> Hi,
>>
>> I was trying to use a mouse_move event earlier but found it was missing
>> critical info:
>>
>> event->buttons
>> event->prev.canvas.x
>> event->prev.canvas.y
>>
>> Were always 0.
>> Am I missing something obvious? I had to code up the gesture using
>> mouse_down/up to capture the missing info instead...
>>
>
> I'll have a look, thanks.
>

I assume you set up a callback on the window or the evas? And you had no
problems with normal objects?
If that is so, then this should be fixed. Please let me know if you are
still having issues.

-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] ABI/API checker results from abi-laboratory for 1.20 beta1

2017-07-09 Thread Jean-Philippe André
2017-07-10 13:30 GMT+09:00 Andrew Williams <a...@andywilliams.me>:

> I'm curious as to why we've gone from named types back to primitive - is
> this just for C bindings?
>

I was in fact curious as to why we have typedefs for int. IMHO it in fact
harmed readability as you wouldn't know if the type was an integral,
floating point or even a vector (coord could very well have been the 2D x,y
position).
Also there is no way we ever change Evas_Coord to anything else than int
since so much of the internal code assumes 32 bit signed integers.

So I made this call and decided to move to primitive types for our EO API,
where applicable (I also asked around and there was no strong opinion
against).

This was part of a series of patches trying to remove "unnecessary" types
from EO.

Best regards,


> Andy
> On Mon, 10 Jul 2017 at 03:56, Jean-Philippe André <j...@videolan.org>
> wrote:
>
> > Hi,
> >
> > 2017-07-08 0:32 GMT+09:00 Andrew Williams <a...@andywilliams.me>:
> >
> > > It looks like some eo change moved many Evas_Coord to int - is that
> > correct
> > > or did we miss something?
> > >
> >
> > I changed that in commit af3cb1018584e3c403024b.
> > ABI wise this doesn't change anything at all.
> >
> > Since the legacy APIs are automatically generated they also use int
> instead
> > of Evas_Coord now.
> >
> > Hope that's not a problem?
> >
> >
> > >
> > > Andy
> > > On Fri, 7 Jul 2017 at 10:41, Stefan Schmidt <ste...@osg.samsung.com>
> > > wrote:
> > >
> > > > Hello.
> > > >
> > > > Andrey V. Ponomarenko from ABI Laboratory keeps up the great work of
> > > > running his tools on EFL on a regular basis.
> > > >
> > > > For the upcoming 1.20 release he has reports for all changes between
> > > > 1.19.1 and 1.20-beta1
> > > >
> > > > https://abi-laboratory.pro/tracker/timeline/efl/
> > > >
> > > > https://abi-laboratory.pro/tracker/objects_report/efl/1.
> > > 19.1/1.20.0-beta1/report.html
> > > >
> > > > Please have a look at your respective areas and things you changed on
> > > > this cycle.
> > > >
> > > > I will also look through it next week and run our own checker as it
> had
> > > > slightly different results in the past and I want to be sure be cover
> > > both.
> > > >
> > > > regards
> > > > Stefan Schmidt
> > > >
> > > >
> > > > 
> > > --
> > > > Check out the vibrant tech community on one of the world's most
> > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > > > ___
> > > > enlightenment-devel mailing list
> > > > enlightenment-devel@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > >
> > > --
> > > http://andywilliams.me
> > > http://ajwillia.ms
> > > 
> > > --
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > > ___
> > > enlightenment-devel mailing list
> > > enlightenment-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > >
> > >
> >
> >
> > --
> > Jean-Philippe André
> >
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> --
> http://andywilliams.me
> http://ajwillia.ms
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas_Event_Mouse_Move missing data

2017-07-09 Thread Jean-Philippe André
2017-07-09 2:19 GMT+09:00 Andrew Williams <a...@andywilliams.me>:

> Hi,
>
> I was trying to use a mouse_move event earlier but found it was missing
> critical info:
>
> event->buttons
> event->prev.canvas.x
> event->prev.canvas.y
>
> Were always 0.
> Am I missing something obvious? I had to code up the gesture using
> mouse_down/up to capture the missing info instead...
>

I'll have a look, thanks.

-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] ABI/API checker results from abi-laboratory for 1.20 beta1

2017-07-09 Thread Jean-Philippe André
Hi,

2017-07-08 0:32 GMT+09:00 Andrew Williams <a...@andywilliams.me>:

> It looks like some eo change moved many Evas_Coord to int - is that correct
> or did we miss something?
>

I changed that in commit af3cb1018584e3c403024b.
ABI wise this doesn't change anything at all.

Since the legacy APIs are automatically generated they also use int instead
of Evas_Coord now.

Hope that's not a problem?


>
> Andy
> On Fri, 7 Jul 2017 at 10:41, Stefan Schmidt <ste...@osg.samsung.com>
> wrote:
>
> > Hello.
> >
> > Andrey V. Ponomarenko from ABI Laboratory keeps up the great work of
> > running his tools on EFL on a regular basis.
> >
> > For the upcoming 1.20 release he has reports for all changes between
> > 1.19.1 and 1.20-beta1
> >
> > https://abi-laboratory.pro/tracker/timeline/efl/
> >
> > https://abi-laboratory.pro/tracker/objects_report/efl/1.
> 19.1/1.20.0-beta1/report.html
> >
> > Please have a look at your respective areas and things you changed on
> > this cycle.
> >
> > I will also look through it next week and run our own checker as it had
> > slightly different results in the past and I want to be sure be cover
> both.
> >
> > regards
> > Stefan Schmidt
> >
> >
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> --
> http://andywilliams.me
> http://ajwillia.ms
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>


-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 02/02: win: Avoid CRI message before finalized

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

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

commit f8d8136b2ce997f6f23c54b6d27b66504a91faf4
Author: Jean-Philippe Andre 
Date:   Fri Jul 7 15:34:02 2017 +0900

win: Avoid CRI message before finalized

Test case was Bg EO API in elm_test
---
 src/lib/elementary/efl_ui_win.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index a6a1090367..b763f21bdb 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -4393,6 +4393,7 @@ _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, 
Eina_Bool force_emit, Eina_Bool
if (!sd->frame_obj)
  {
 if (EINA_LIKELY(sd->type == ELM_WIN_FAKE)) return;
+if (!efl_finalized_get(sd->obj)) return;
 CRI("Window has no frame object!");
 return;
  }

-- 




[EGIT] [core/efl] master 01/03: evas, edje, elm: Mark all legacy objects as such

2017-07-06 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 242127a96be0eb78791f48fae7c44f0f16248add
Author: Jean-Philippe Andre 
Date:   Thu Jul 6 16:47:41 2017 +0900

evas,edje,elm: Mark all legacy objects as such
---
 src/lib/edje/edje_edit.c  |  4 +---
 src/lib/edje/edje_smart.c |  4 +---
 src/lib/elementary/efl_ui_button.c|  3 +--
 src/lib/elementary/efl_ui_check.c |  3 +--
 src/lib/elementary/efl_ui_flip.c  |  3 +--
 src/lib/elementary/efl_ui_frame.c |  3 +--
 src/lib/elementary/efl_ui_image.c |  2 +-
 src/lib/elementary/efl_ui_image_zoomable.c|  3 +--
 src/lib/elementary/efl_ui_progressbar.c   |  3 +--
 src/lib/elementary/efl_ui_radio.c |  3 +--
 src/lib/elementary/efl_ui_slider.c|  3 +--
 src/lib/elementary/efl_ui_video.c |  3 +--
 src/lib/elementary/elc_combobox.c |  3 +--
 src/lib/elementary/elc_ctxpopup.c |  2 +-
 src/lib/elementary/elc_fileselector.c |  3 +--
 src/lib/elementary/elc_fileselector_button.c  |  3 +--
 src/lib/elementary/elc_fileselector_entry.c   |  2 +-
 src/lib/elementary/elc_hoversel.c |  3 +--
 src/lib/elementary/elc_multibuttonentry.c |  3 +--
 src/lib/elementary/elc_naviframe.c|  3 +--
 src/lib/elementary/elc_player.c   |  2 +-
 src/lib/elementary/elc_popup.c|  2 +-
 src/lib/elementary/elm_access.c   |  3 +--
 src/lib/elementary/elm_actionslider.c |  3 +--
 src/lib/elementary/elm_bg.c   |  3 +--
 src/lib/elementary/elm_box.c  |  3 +--
 src/lib/elementary/elm_bubble.c   |  3 +--
 src/lib/elementary/elm_calendar.c |  3 +--
 src/lib/elementary/elm_clock.c|  3 +--
 src/lib/elementary/elm_code_widget.c  |  5 ++---
 src/lib/elementary/elm_colorselector.c|  6 +++---
 src/lib/elementary/elm_conform.c  |  3 +--
 src/lib/elementary/elm_datetime.c |  3 +--
 src/lib/elementary/elm_dayselector.c  |  3 +--
 src/lib/elementary/elm_diskselector.c |  3 +--
 src/lib/elementary/elm_entry.c|  3 +--
 src/lib/elementary/elm_flipselector.c |  3 +--
 src/lib/elementary/elm_gengrid.c  |  3 +--
 src/lib/elementary/elm_genlist.c  |  3 +--
 src/lib/elementary/elm_gesture_layer.c|  3 +--
 src/lib/elementary/elm_glview.c   | 10 ++
 src/lib/elementary/elm_grid.c |  3 +--
 src/lib/elementary/elm_hover.c|  3 +--
 src/lib/elementary/elm_icon.c |  3 +--
 src/lib/elementary/elm_index.c|  3 +--
 src/lib/elementary/elm_interface_scrollable.c |  3 +--
 src/lib/elementary/elm_inwin.c|  3 +--
 src/lib/elementary/elm_label.c|  3 +--
 src/lib/elementary/elm_layout.c   |  3 +--
 src/lib/elementary/elm_list.c |  3 +--
 src/lib/elementary/elm_map.c  |  3 +--
 src/lib/elementary/elm_mapbuf.c   |  3 +--
 src/lib/elementary/elm_menu.c |  2 +-
 src/lib/elementary/elm_notify.c   |  3 +--
 src/lib/elementary/elm_panel.c|  2 +-
 src/lib/elementary/elm_panes.c|  3 +--
 src/lib/elementary/elm_photo.c|  3 +--
 src/lib/elementary/elm_plug.c |  3 +--
 src/lib/elementary/elm_prefs.c|  3 +--
 src/lib/elementary/elm_route.c|  3 +--
 src/lib/elementary/elm_scroller.c |  3 +--
 src/lib/elementary/elm_segment_control.c  |  3 +--
 src/lib/elementary/elm_separator.c|  3 +--
 src/lib/elementary/elm_slideshow.c|  3 +--
 src/lib/elementary/elm_spinner.c  |  3 +--
 src/lib/elementary/elm_table.c|  3 +--
 src/lib/elementary/elm_thumb.c|  3 +--
 src/lib/elementary/elm_toolbar.c  |  3 +--
 src/lib/elementary/elm_web2.c |  2 +-
 src/lib/emotion/emotion_smart.c   |  4 +---
 src/lib/evas/canvas/evas_canvas3d_camera.c|  3 +--
 src/lib/evas/canvas/evas_canvas3d_light.c |  3 +--
 src/lib/evas/canvas/evas_canvas3d_material.c  |  3 +--
 src/lib/evas/canvas/evas_canvas3d_mesh.c  |  3 +--
 src/lib/evas/canvas/evas_canvas3d_node.c  |  3 +--
 src/lib/evas/canvas/evas_canvas3d_primitive.c |  3 +--
 src/lib/evas/canvas/evas_canvas3d_scene.c |  3 +--
 src/lib/evas/canvas/evas_canvas3d_texture.c   |  3 +--
 src/lib/evas/canvas/evas_object_box.c |  3 +--
 src/lib/evas/canvas/evas_object_grid.c|  3 +--
 src/lib/evas/canvas/evas_object_line.c|  3 +--
 src/lib/evas/canvas/evas_object_polygon.c |  2 +-
 src/lib/evas/canvas/evas_object_rectangle.c   |  3 +--
 

Re: [E-devel] [EGIT] [core/efl] master 01/01: elm test: image - use table to align image swallowed in layout

2017-07-06 Thread Jean-Philippe André
; > > +   return mso;
> > > > +}
> > > > +
> > > > +static void
> > > > +_cleanup_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
> > > > EINA_UNUSED, void *event_info EINA_UNUSED)
> > > > +{
> > > > +   min_size_obj *mso = data;
> > > > +
> > > > +   free(mso);
> > > > +}
> > > > +
> > > >  void
> > > >  test_image_swallow_align(void *data EINA_UNUSED, Evas_Object *obj
> > > > EINA_UNUSED, void *event_info EINA_UNUSED)
> > > >  {
> > > > Evas_Object *win, *box, *im, *ly, *sl;
> > > > char buf[PATH_MAX];
> > > > +   min_size_obj *mso;
> > > >
> > > > win = elm_win_util_standard_add("image align", "Test Align
> Inside
> > > > Layout");
> > > > elm_win_autodel_set(win, EINA_TRUE);
> > > > @@ -125,9 +165,11 @@ test_image_swallow_align(void *data EINA_UNUSED,
> > > > Evas_Object *obj  EINA_UNUSED,
> > > > elm_image_file_set(im, buf, NULL);
> > > > evas_object_size_hint_weight_set(im, EVAS_HINT_EXPAND,
> > > > EVAS_HINT_EXPAND);
> > > > evas_object_size_hint_align_set(im, EVAS_HINT_FILL,
> > EVAS_HINT_FILL);
> > > > -   elm_layout_content_set(ly, "swallow", im);
> > > > evas_object_show(im);
> > > > -   evas_object_data_set(win, "im", im);
> > > > +
> > > > +   mso = _min_size_obj_set(win, im, 50, 50);
> > > > +   elm_layout_content_set(ly, "swallow", mso->tb);
> > > > +   evas_object_data_set(win, "mso", mso);
> > > >
> > > > sl = elm_slider_add(win);
> > > > elm_slider_value_set(sl, 0.5);
> > > > @@ -151,6 +193,7 @@ test_image_swallow_align(void *data EINA_UNUSED,
> > > > Evas_Object *obj  EINA_UNUSED,
> > > >
> > > > evas_object_resize(win, 300, 600);
> > > > evas_object_show(win);
> > > > +   evas_object_event_callback_add(win, EVAS_CALLBACK_FREE,
> > _cleanup_cb,
> > > > mso);
> > > >  }
> > > >
> > > >  static void
> > > >
> > > > --
> > > >
> > > >
> > > >
> > > 
> > --
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > > ___
> > > enlightenment-devel mailing list
> > > enlightenment-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > >
> >
> >
> > --
> > - Codito, ergo sum - "I code, therefore I am" --
> > The Rasterman (Carsten Haitzler)ras...@rasterman.com
> >
> >
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>


-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 03/05: elm: Remove EOLIAN tags in some files

2017-07-05 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 075b4a7a0c9966539e80fba491f7a5d384d5f2ca
Author: Jean-Philippe Andre 
Date:   Wed Jul 5 20:06:24 2017 +0900

elm: Remove EOLIAN tags in some files

Some functions were marked as EOLIAN when in fact they were
used by the ELM_PART override APIs.
---
 src/lib/elementary/elc_fileselector.c   | 2 +-
 src/lib/elementary/elc_fileselector_entry.c | 4 ++--
 src/lib/elementary/elc_naviframe.c  | 6 +++---
 src/lib/elementary/elc_popup.c  | 2 +-
 src/lib/elementary/elm_actionslider.c   | 4 ++--
 src/lib/elementary/elm_bubble.c | 2 +-
 src/lib/elementary/elm_entry.c  | 4 ++--
 src/lib/elementary/elm_label.c  | 2 +-
 8 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/lib/elementary/elc_fileselector.c 
b/src/lib/elementary/elc_fileselector.c
index 78e015277f..6a3a73b817 100644
--- a/src/lib/elementary/elc_fileselector.c
+++ b/src/lib/elementary/elc_fileselector.c
@@ -3151,7 +3151,7 @@ _elm_fileselector_elm_widget_focus_direction(Eo *obj 
EINA_UNUSED, Elm_Fileselect
return EINA_TRUE;
 }
 
-EOLIAN static Eina_Bool
+static Eina_Bool
 _elm_fileselector_text_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Data *sd, 
const char *part, const char *label)
 {
if (!part) return EINA_FALSE;
diff --git a/src/lib/elementary/elc_fileselector_entry.c 
b/src/lib/elementary/elc_fileselector_entry.c
index 9d5684243a..a44a676012 100644
--- a/src/lib/elementary/elc_fileselector_entry.c
+++ b/src/lib/elementary/elc_fileselector_entry.c
@@ -255,7 +255,7 @@ _elm_fileselector_entry_elm_widget_disable(Eo *obj, 
Elm_Fileselector_Entry_Data
return EINA_TRUE;
 }
 
-EOLIAN static Eina_Bool
+static Eina_Bool
 _elm_fileselector_entry_text_set(Eo *obj, Elm_Fileselector_Entry_Data *sd, 
const char *part, const char *label)
 {
if (part && strcmp(part, "default"))
@@ -267,7 +267,7 @@ _elm_fileselector_entry_text_set(Eo *obj, 
Elm_Fileselector_Entry_Data *sd, const
return EINA_TRUE;
 }
 
-EOLIAN static const char *
+static const char *
 _elm_fileselector_entry_text_get(Eo *obj, Elm_Fileselector_Entry_Data *sd, 
const char *part)
 {
if (part && strcmp(part, "default"))
diff --git a/src/lib/elementary/elc_naviframe.c 
b/src/lib/elementary/elc_naviframe.c
index 45f41bba31..e9ee09f94d 100644
--- a/src/lib/elementary/elc_naviframe.c
+++ b/src/lib/elementary/elc_naviframe.c
@@ -459,7 +459,7 @@ _access_obj_process(Elm_Naviframe_Item_Data *it, Eina_Bool 
is_access)
  }
 }
 
-EOLIAN static void
+static void
 _elm_naviframe_item_elm_widget_item_part_text_set(Eo *eo_it,
   Elm_Naviframe_Item_Data *it,
   const char *part,
@@ -1027,7 +1027,7 @@ _elm_naviframe_elm_layout_signal_emit(Eo *obj, 
Elm_Naviframe_Data *sd EINA_UNUSE
 
 /* content/text smart functions proxying things to the top item, which
  * is the resize object of the layout */
-EOLIAN static Eina_Bool
+static Eina_Bool
 _elm_naviframe_text_set(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const 
char *part, const char *label)
 {
Elm_Object_Item *it;
@@ -1043,7 +1043,7 @@ _elm_naviframe_text_set(Eo *obj, Elm_Naviframe_Data *sd 
EINA_UNUSED, const char
return EINA_FALSE;
 }
 
-EOLIAN static const char*
+static const char *
 _elm_naviframe_text_get(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const 
char *part)
 {
Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index 2369edf6be..2e7c0946af 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -1094,7 +1094,7 @@ _content_text_get(const Elm_Popup_Data *sd)
return str;
 }
 
-EOLIAN static const char*
+static const char *
 _elm_popup_text_get(Eo *obj EINA_UNUSED, Elm_Popup_Data *_pd, const char *part)
 {
const char *text = NULL;
diff --git a/src/lib/elementary/elm_actionslider.c 
b/src/lib/elementary/elm_actionslider.c
index 77396840d1..f13a7291eb 100644
--- a/src/lib/elementary/elm_actionslider.c
+++ b/src/lib/elementary/elm_actionslider.c
@@ -451,7 +451,7 @@ _mirrored_part_fix(const Evas_Object *obj,
  }
 }
 
-EOLIAN static Eina_Bool
+static Eina_Bool
 _elm_actionslider_text_set(Eo *obj, Elm_Actionslider_Data *_pd EINA_UNUSED, 
const char *part, const char *text)
 {
Eina_Bool int_ret = EINA_TRUE;
@@ -466,7 +466,7 @@ _elm_actionslider_text_set(Eo *obj, Elm_Actionslider_Data 
*_pd EINA_UNUSED, cons
return int_ret;
 }
 
-EOLIAN static const char*
+static const char *
 _elm_actionslider_text_get(Eo *obj, Elm_Actionslider_Data *_pd EINA_UNUSED, 
const char *part)
 {
const char *text = NULL;
diff --git a/src/lib/elementary/elm_bubble.c b/src/lib/elementary/elm_bubble.c
index 084fcd72b6..e35ad7736d 100644
--- a/src/lib/elementary/elm_bubble.c
+++ 

[EGIT] [core/efl] master 04/05: elm: Forbid calls to efl_part(obj, NULL)

2017-07-05 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 9b667ed06292bc4dfe4e67a69788f5961893a9bf
Author: Jean-Philippe Andre 
Date:   Wed Jul 5 20:12:14 2017 +0900

elm: Forbid calls to efl_part(obj, NULL)

This in theory should only affect the EO API usage. In EO
we don't want efl_part() to be used for NULL part. In other
words, there is no "default" part in EO objects. Instead, those
functions like text_set or content_set should simply be
implemented by the object themselves.

The legacy API on the other hand will make sure that the
"part" argument is set to a non-NULL value before reaching
this point.
---
 src/lib/elementary/elm_layout.c  | 2 +-
 src/lib/elementary/elm_part_helper.h | 6 --
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 5353a7c745..1f7e929a24 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -2381,7 +2381,7 @@ _elm_layout_efl_part_part(const Eo *obj, 
Elm_Layout_Smart_Data *sd EINA_UNUSED,
  {
 pd->obj = (Eo *) obj;
 pd->sd = efl_data_xref(pd->obj, ELM_LAYOUT_CLASS, proxy);
-pd->part = part ? strdup(part) : NULL;
+pd->part = strdup(part);
 pd->temp = 1;
  }
 
diff --git a/src/lib/elementary/elm_part_helper.h 
b/src/lib/elementary/elm_part_helper.h
index 55c50f33aa..3f4ae43f76 100644
--- a/src/lib/elementary/elm_part_helper.h
+++ b/src/lib/elementary/elm_part_helper.h
@@ -43,13 +43,14 @@ _ ## type ## _efl_part_part(const Eo *obj, typedata *priv 
EINA_UNUSED, const cha
partdata *pd; \
Eo *proxy; \
 \
+   EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL); \
proxy = efl_add(TYPE ## _INTERNAL_PART_CLASS, (Eo *) obj); \
pd = efl_data_scope_get(proxy, TYPE ## _INTERNAL_PART_CLASS); \
if (pd) \
  { \
 pd->obj = (Eo *) obj; \
 pd->sd = efl_data_xref(pd->obj, TYPE ## _CLASS, proxy); \
-pd->part = part ? strdup(part) : NULL; \
+pd->part = strdup(part); \
 pd->temp = 1; \
  } \
 \
@@ -111,13 +112,14 @@ _ ## type ## _efl_part_part(const Eo *obj, typedata *priv 
EINA_UNUSED, const cha
partdata *pd; \
Eo *proxy; \
 \
+   EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL); \
proxy = efl_add(TYPE ## _INTERNAL_PART_CLASS, (Eo *) obj); \
pd = efl_data_scope_get(proxy, SUPER ## _INTERNAL_PART_CLASS); \
if (pd) \
  { \
 pd->obj = (Eo *) obj; \
 pd->sd = efl_data_xref(pd->obj, SUPER ## _CLASS, proxy); \
-pd->part = part ? strdup(part) : NULL; \
+pd->part = strdup(part); \
 pd->temp = 1; \
  } \
 \

-- 




[EGIT] [core/efl] master 05/05: elm: Don't alias in efl_part()

2017-07-05 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 5a922f4afaf7edcbb1313f9aa8d5de187fe7b0d8
Author: Jean-Philippe Andre 
Date:   Wed Jul 5 20:30:21 2017 +0900

elm: Don't alias in efl_part()

Inside efl_part() we don't know whether we are dealing with a text
or content API, so we can't actually guess the proper alias.

The legacy API should have already dealt with aliasing at this point.
The EO API should not use those aliases.
---
 src/lib/elementary/elm_layout.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 1f7e929a24..b281329be6 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -2363,9 +2363,6 @@ _elm_layout_efl_part_part(const Eo *obj, 
Elm_Layout_Smart_Data *sd EINA_UNUSED,
Eo *proxy;
 
EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL);
-   if (!_elm_layout_part_aliasing_eval(obj, , EINA_FALSE))
- return NULL;
-
ELM_WIDGET_DATA_GET_OR_RETURN((Eo *) obj, wd, NULL);
 
// Check part type with edje_edit, as edje_object_part_object_get()

-- 




[EGIT] [core/efl] master 01/05: edje: Fix some API issues (missing const)

2017-07-05 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 4f9cfc22bcb872a77261258cde91c9414b3fd37e
Author: Jean-Philippe Andre 
Date:   Wed Jul 5 19:44:30 2017 +0900

edje: Fix some API issues (missing const)
---
 src/lib/edje/Edje_Legacy.h |  8 
 src/lib/edje/edje_legacy.c | 24 ++--
 2 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h
index b2e8dae8b8..c37c9068e7 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -1591,7 +1591,7 @@ EAPI Eina_Bool 
edje_object_part_text_hide_visible_password(Edje_Object *obj, con
  *
  * @ingroup Edje_Object
  */
-EAPI Eina_Bool edje_object_part_text_cursor_is_format_get(Edje_Object *obj, 
const char * part, Edje_Cursor cur);
+EAPI Eina_Bool edje_object_part_text_cursor_is_format_get(const Edje_Object 
*obj, const char * part, Edje_Cursor cur);
 
 /**
  * @brief Returns @c true if the cursor points to a visible format For example
@@ -1605,7 +1605,7 @@ EAPI Eina_Bool 
edje_object_part_text_cursor_is_format_get(Edje_Object *obj, cons
  *
  * @ingroup Edje_Object
  */
-EAPI Eina_Bool edje_object_part_text_cursor_is_visible_format_get(Edje_Object 
*obj, const char * part, Edje_Cursor cur);
+EAPI Eina_Bool edje_object_part_text_cursor_is_visible_format_get(const 
Edje_Object *obj, const char * part, Edje_Cursor cur);
 
 /**
  * @brief Returns a list of Evas_Textblock_Rectangle anchor rectangles.
@@ -1620,7 +1620,7 @@ EAPI Eina_Bool 
edje_object_part_text_cursor_is_visible_format_get(Edje_Object *o
  *
  * @ingroup Edje_Object
  */
-EAPI const Eina_List *edje_object_part_text_anchor_geometry_get(Edje_Object 
*obj, const char * part, const char * anchor);
+EAPI const Eina_List *edje_object_part_text_anchor_geometry_get(const 
Edje_Object *obj, const char * part, const char * anchor);
 
 /**
  * @brief Returns a list of char anchor names.
@@ -1633,7 +1633,7 @@ EAPI const Eina_List 
*edje_object_part_text_anchor_geometry_get(Edje_Object *obj
  *
  * @ingroup Edje_Object
  */
-EAPI const Eina_List *edje_object_part_text_anchor_list_get(Edje_Object *obj, 
const char * part);
+EAPI const Eina_List *edje_object_part_text_anchor_list_get(const Edje_Object 
*obj, const char * part);
 
 /**
  * @brief Returns the text of the object part.
diff --git a/src/lib/edje/edje_legacy.c b/src/lib/edje/edje_legacy.c
index 76586080d2..256f468fe9 100644
--- a/src/lib/edje/edje_legacy.c
+++ b/src/lib/edje/edje_legacy.c
@@ -341,14 +341,13 @@ edje_object_part_text_hide_visible_password(Eo *obj, 
const char *part)
return int_ret;
 }
 
-EOLIAN Eina_Bool
-edje_object_part_text_cursor_is_format_get(Eo *obj, const char *part, 
Edje_Cursor cur)
+EAPI Eina_Bool
+edje_object_part_text_cursor_is_format_get(const Eo *obj, const char *part, 
Edje_Cursor cur)
 {
Edje_Real_Part *rp;
Edje *ed;
 
-   ed = efl_data_scope_get(obj, EDJE_OBJECT_CLASS);
-
+   ed = _edje_fetch(obj);
if ((!ed) || (!part)) return EINA_FALSE;
rp = _edje_real_part_recursive_get(, part);
if (!rp) return EINA_FALSE;
@@ -359,14 +358,13 @@ edje_object_part_text_cursor_is_format_get(Eo *obj, const 
char *part, Edje_Curso
return EINA_FALSE;
 }
 
-EOLIAN Eina_Bool
-edje_object_part_text_cursor_is_visible_format_get(Eo *obj EINA_UNUSED, const 
char *part, Edje_Cursor cur)
+EAPI Eina_Bool
+edje_object_part_text_cursor_is_visible_format_get(const Eo *obj, const char 
*part, Edje_Cursor cur)
 {
Edje_Real_Part *rp;
Edje *ed;
 
-   ed = efl_data_scope_get(obj, EDJE_OBJECT_CLASS);
-
+   ed = _edje_fetch(obj);
if ((!ed) || (!part)) return EINA_FALSE;
rp = _edje_real_part_recursive_get(, part);
if (!rp) return EINA_FALSE;
@@ -379,13 +377,12 @@ edje_object_part_text_cursor_is_visible_format_get(Eo 
*obj EINA_UNUSED, const ch
 }
 
 EAPI const Eina_List *
-edje_object_part_text_anchor_list_get(Eo *obj EINA_UNUSED, const char *part)
+edje_object_part_text_anchor_list_get(const Eo *obj, const char *part)
 {
Edje_Real_Part *rp;
Edje *ed;
 
-   ed = efl_data_scope_get(obj, EDJE_OBJECT_CLASS);
-
+   ed = _edje_fetch(obj);
if ((!ed) || (!part)) return NULL;
rp = _edje_real_part_recursive_get(, part);
if (!rp) return NULL;
@@ -396,13 +393,12 @@ edje_object_part_text_anchor_list_get(Eo *obj 
EINA_UNUSED, const char *part)
 }
 
 EAPI const Eina_List *
-edje_object_part_text_anchor_geometry_get(Eo *obj EINA_UNUSED, const char 
*part, const char *anchor)
+edje_object_part_text_anchor_geometry_get(const Eo *obj, const char *part, 
const char *anchor)
 {
Edje_Real_Part *rp;
Edje *ed;
 
-   ed = efl_data_scope_get(obj, EDJE_OBJECT_CLASS);
-
+   ed = _edje_fetch(obj);
if ((!ed) || (!part)) return NULL;
rp = _edje_real_part_recursive_get(, part);
if (!rp) return NULL;

-- 




[EGIT] [core/efl] master 05/05: win: Try to fix some resizing issues with main menus

2017-07-05 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 68ad235f4e5fa1cc96d309e82ac70ae8ce9b0736
Author: Jean-Philippe Andre 
Date:   Tue Jul 4 18:18:07 2017 +0900

win: Try to fix some resizing issues with main menus

Omg this was a pain... The code is complete spaghetti and the
fact that the main menu is now in the framespace doesn't help
either. With this patch and the previous one (about ecore_evas_x)
Edi should be able to open correctly at the proper size and with
a visible menu.

This patch introduces a lot of changes so it'll need testing
before we accept it fully.

Fixes T5482
---
 src/lib/elementary/efl_ui_win.c | 32 +---
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index f7b20b8b26..a6a1090367 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -351,7 +351,7 @@ static Elm_Theme_Apply _elm_win_theme_internal(Eo *obj, 
Efl_Ui_Win_Data *sd);
 static void _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *element, const 
char *style);
 static void _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool 
force_emit, Eina_Bool calc);
 static inline void _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const char 
*engine);
-static void _elm_win_resize_objects_eval(Evas_Object *obj);
+static void _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool 
force_resize);
 static void _elm_win_opaque_update(Efl_Ui_Win_Data *sd, Eina_Bool force_alpha);
 static void _elm_win_frame_obj_update(Efl_Ui_Win_Data *sd);
 
@@ -1461,7 +1461,7 @@ _elm_win_frame_obj_update(Efl_Ui_Win_Data *sd)
evas_object_geometry_get(sd->frame_obj, , , , );
edje_object_part_geometry_get(sd->frame_obj, "elm.spacer.content", , 
, , );
if (_elm_win_framespace_set(sd, cx, cy, ow - cw, oh - ch))
- _elm_win_resize_objects_eval(sd->obj);
+ _elm_win_resize_objects_eval(sd->obj, EINA_TRUE);
 }
 
 static void
@@ -3428,7 +3428,7 @@ _elm_win_xwin_update(Efl_Ui_Win_Data *sd)
   * @param obj window object
   */
 static void
-_elm_win_resize_objects_eval(Evas_Object *obj)
+_elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize)
 {
Efl_Ui_Win_Data *sd = efl_data_scope_get(obj, MY_CLASS);
Evas_Coord w, h, minw, minh, maxw, maxh, ow, oh;
@@ -3490,7 +3490,9 @@ _elm_win_resize_objects_eval(Evas_Object *obj)
if (h < minh) h = minh;
if (w > maxw) w = maxw;
if (h > maxh) h = maxh;
-   //if ((w == ow) && (h == oh)) return;
+   if (!force_resize && (w == ow) && (h == oh))
+ return;
+
sd->req_wh = EINA_FALSE;
if (sd->img_obj) evas_object_resize(obj, w, h);
else
@@ -3512,7 +3514,7 @@ _elm_win_on_resize_obj_changed_size_hints(void *data,
   Evas_Object *obj EINA_UNUSED,
   void *event_info EINA_UNUSED)
 {
-   _elm_win_resize_objects_eval(data);
+   _elm_win_resize_objects_eval(data, EINA_FALSE);
 }
 
 void
@@ -5512,7 +5514,7 @@ _efl_ui_win_center(Eo *obj, Efl_Ui_Win_Data *sd, 
Eina_Bool h, Eina_Bool v)
if (sd->deferred_resize_job) _elm_win_resize_job(sd->obj);
if (sd->frame_obj) edje_object_message_signal_process(sd->frame_obj);
evas_smart_objects_calculate(evas_object_evas_get(obj));
-   _elm_win_resize_objects_eval(obj);
+   _elm_win_resize_objects_eval(obj, EINA_FALSE);
if ((trap) && (trap->center) && (!trap->center(sd->trap_data, obj, h, v)))
  return;
 
@@ -5556,7 +5558,7 @@ _efl_ui_win_borderless_set(Eo *obj, Efl_Ui_Win_Data *sd, 
Eina_Bool borderless)
 #endif
  TRAP(sd, borderless_set, borderless);
 
-   _elm_win_resize_objects_eval(obj);
+   _elm_win_resize_objects_eval(obj, EINA_FALSE);
 #ifdef HAVE_ELEMENTARY_X
_elm_win_xwin_update(sd);
 #endif
@@ -5648,7 +5650,7 @@ static void
 _main_menu_resize_cb(void *data EINA_UNUSED, const Efl_Event *ev)
 {
// After resize, the framespace size has changed, so update the win geometry
-   _elm_win_resize_objects_eval(ev->object);
+   _elm_win_resize_objects_eval(ev->object, EINA_FALSE);
efl_event_callback_del(ev->object, EFL_GFX_EVENT_RESIZE, 
_main_menu_resize_cb, NULL);
 }
 
@@ -5664,7 +5666,7 @@ _dbus_menu_set(Eina_Bool dbus_connect, void *data)
 edje_object_part_unswallow(swallow, sd->main_menu);
 sd->csd.need_menu = EINA_FALSE;
 _elm_menu_menu_bar_hide(sd->main_menu);
-_elm_win_resize_objects_eval(sd->obj);
+_elm_win_resize_objects_eval(sd->obj, EINA_FALSE);
  }
else
  {
@@ -5679,7 +5681,7 @@ _dbus_menu_set(Eina_Bool dbus_connect, void *data)
   }
  }
_elm_win_frame_style_update(sd, 0, 1);
-   sd->deferred_resize_job = EINA_TRUE;
+   //sd->deferred_resize_job = EINA_TRUE;
 }
 
 EOLIAN static void
@@ -5907,7 +5909,7 @@ 

[EGIT] [core/efl] master 03/05: win: Fix some sizing issues with main menu

2017-07-05 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 4488c51c5fb8d2a5e06bbfdfe622af11bc78c296
Author: Jean-Philippe Andre 
Date:   Fri Jun 30 17:26:16 2017 +0900

win: Fix some sizing issues with main menu

This should fix issues when the main menu is wider than the
window content. This assumes that the menu is horizontal and
aligned with the client content.

The theme should probably handle this case better but right
now I am lost in the spaghetti resizes happening between
edje, elm, evas and X...

I am not very happy with this patch, and I think border.edc
needs some love in order to make it more robust and simpler
to read.

Ref T5482
---
 src/bin/elementary/test_main_menu.c | 5 +++--
 src/lib/elementary/efl_ui_win.c | 8 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/bin/elementary/test_main_menu.c 
b/src/bin/elementary/test_main_menu.c
index 507a138709..40a52c5328 100644
--- a/src/bin/elementary/test_main_menu.c
+++ b/src/bin/elementary/test_main_menu.c
@@ -35,8 +35,9 @@ test_main_menu(void *data EINA_UNUSED,
label = elm_label_add(win);
elm_object_text_set(label, "Note: the D-Bus menu example requires support 
from the "
   "desktop environment to display the application 
menu");
-   evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND,
-EVAS_HINT_EXPAND);
+   evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   elm_label_line_wrap_set(label, ELM_WRAP_WORD);
elm_box_pack_end(bx, label);
evas_object_show(label);
 
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index a87985ff11..f7b20b8b26 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -7962,12 +7962,16 @@ _window_layout_stack(Evas_Object *o, 
Evas_Object_Box_Data *p, void *data)
const Eina_List *l;
Evas_Object *child;
Evas_Object_Box_Option *opt;
-   Evas_Coord x, y, w, h;
+   Evas_Coord x, y, w, h, menuw = 0;
double wx, wy;
Evas_Coord minw = -1, minh = -1;
double weight_x = EVAS_HINT_EXPAND;
double weight_y = EVAS_HINT_EXPAND;
 
+   ELM_WIN_DATA_GET(data, sd);
+   if (sd->main_menu && efl_gfx_visible_get(sd->main_menu))
+ efl_gfx_size_hint_combined_min_get(sd->main_menu, , NULL);
+
EINA_LIST_FOREACH(p->children, l, opt)
  {
 child = opt->obj;
@@ -7980,6 +7984,7 @@ _window_layout_stack(Evas_Object *o, Evas_Object_Box_Data 
*p, void *data)
 if (h > minh) minh = h;
  }
 
+   if (minw < menuw) minw = menuw;
efl_gfx_size_hint_restricted_min_set(o, minw, minh);
evas_object_geometry_get(o, , , , );
if (w < minw) w = minw;
@@ -7993,7 +7998,6 @@ _window_layout_stack(Evas_Object *o, Evas_Object_Box_Data 
*p, void *data)
 evas_object_resize(child, w, h);
  }
 
-   ELM_WIN_DATA_GET(data, sd);
efl_gfx_size_hint_weight_set(sd->legacy.edje, weight_x, weight_y);
evas_object_smart_changed(sd->legacy.edje);
 }

-- 




[EGIT] [core/efl] master 01/05: evas: Add internal type documentation (event grabber)

2017-07-05 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 45c4f67b2803891e4f1d0d02d632b50b85d40323
Author: Jean-Philippe Andre 
Date:   Wed Jul 5 17:23:45 2017 +0900

evas: Add internal type documentation (event grabber)
---
 src/lib/evas/include/evas_private.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 0358c903fc..15322f18e8 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1106,12 +1106,12 @@ struct _Evas_Object_Events_Data
   The list below contain the seats (Efl.Input.Devices) which this
   object allows events to be reported (Mouse, Keybord and focus events).
 */
-   Eina_List *events_whitelist;
+   Eina_List *events_whitelist; /* Efl_Input_Device */
 
-   Eina_List *focused_by_seats;
-   Eina_Inlist   *pointer_grabs;
+   Eina_List *focused_by_seats; /* Efl_Input_Device */
+   Eina_Inlist   *pointer_grabs; /* Evas_Object_Pointer_Data */
 
-   Evas_Object   *parent;
+   Evas_Object   *parent; /* An Efl.Canvas.Object.Event.Grabber */
 };
 
 struct _Evas_Object_Protected_State

-- 




[EGIT] [core/efl] master 02/05: evas: Fix a crash in textblock

2017-07-05 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 722725dfc53e4f0b9d719e2f58bc63e38385d0d6
Author: Jean-Philippe Andre 
Date:   Wed Jul 5 17:39:55 2017 +0900

evas: Fix a crash in textblock

I could not reproduce it but the case should not happen,
so I'm adding a safety check rather than a silent return.

The private data should be NULL only after evas_object_free()
or before construction...

Fixes T5656
---
 src/lib/evas/canvas/evas_object_textblock.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index aea815f884..59a58514bc 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -14208,7 +14208,7 @@ done:
 static void
 evas_object_textblock_render_post(Evas_Object *eo_obj EINA_UNUSED,
   Evas_Object_Protected_Data *obj,
-  void *type_private_data EINA_UNUSED)
+  void *type_private_data)
 {
/*   Efl_Canvas_Text_Data *o; */
 
@@ -14221,6 +14221,7 @@ evas_object_textblock_render_post(Evas_Object *eo_obj 
EINA_UNUSED,
/* move cur to prev safely for object data */
evas_object_cur_prev(obj);
 /*   o->prev = o->cur; */
+   EINA_SAFETY_ON_NULL_RETURN(type_private_data);
_filter_output_cache_prune(obj, type_private_data);
 }
 

-- 




[EGIT] [core/efl] master 04/05: ecore_evas_x: Track changes in framespace size

2017-07-05 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 76a668f022fca3c0e9f0394e6bb09b9fc8542d7b
Author: Jean-Philippe Andre 
Date:   Tue Jul 4 18:11:32 2017 +0900

ecore_evas_x: Track changes in framespace size

If the framespace size has changed and by accident (or in fact, by
design) the evas size + framespace size is equal to the size sent
by the X server, ecore_evas_x was skipping the resize event. This
patch adds a tracking of the framespace size so that we redraw the
canvas if it changed.

This will fix issues with the main menu (since it's in the framespace,
23 pixels tall with the default theme & scale).

Note that all this is partly because the ecore evas size is the size
without the framespace, so weird calculations are made during resize...

Ref T5482
---
 src/lib/ecore_evas/ecore_evas_private.h |  4 
 src/modules/ecore_evas/engines/x/ecore_evas_x.c | 11 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_evas/ecore_evas_private.h 
b/src/lib/ecore_evas/ecore_evas_private.h
index 08fed6f9dd..2beabab84c 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -236,6 +236,10 @@ struct _Ecore_Evas
} expecting_resize;
 
struct {
+  int  w, h;
+   } framespace;
+
+   struct {
   Eina_Hash  *cursors;
   char   *title;
   char   *name;
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c 
b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index 6f7b8a07b1..f300805eb7 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -1612,6 +1612,7 @@ _ecore_evas_x_event_window_configure(void *data 
EINA_UNUSED, int type EINA_UNUSE
Ecore_Evas *ee;
Ecore_X_Event_Window_Configure *e;
Ecore_Evas_Engine_Data_X11 *edata;
+   Eina_Bool framespace_resized = EINA_FALSE;
int fw = 0, fh = 0, w, h;
 
e = event;
@@ -1646,8 +1647,16 @@ _ecore_evas_x_event_window_configure(void *data 
EINA_UNUSED, int type EINA_UNUSE
if (!ECORE_EVAS_PORTRAIT(ee))
  SWAP_INT(fw, fh);
 
+   if ((fw != ee->framespace.w) || (fh != ee->framespace.h))
+ {
+ee->framespace.w = fw;
+ee->framespace.h = fh;
+framespace_resized = EINA_TRUE;
+ }
+
if (((ee->w + fw) != e->w) || ((ee->h + fh) != e->h) ||
-   ((ee->req.w + fw) != e->w) || ((ee->req.h + fh) != e->h))
+   ((ee->req.w + fw) != e->w) || ((ee->req.h + fh) != e->h) ||
+   framespace_resized)
  {
 w = e->w;
 h = e->h;

-- 




Re: [E-devel] main menu breakage

2017-07-04 Thread Jean-Philippe André
Hi Andy,

I've just pushed some patches in my efl dev branch.
Not merging to master right now but will do tomorrow unless I find new
issues.

Also I will push some pathes for edi itself (misuse of the main menu api).

Hopefully this solves everything. Resizing seems faster but it's still
quite slow, so I guess we can still improve a lot there.

Best regards,


2017-07-04 0:48 GMT+09:00 Andrew Williams <a...@andywilliams.me>:

> Let's get that in to the the next release at least and we can figure the
> rest based on that. Edi did have a workaround applied that I removed so I
> may need to play with things a little to see if there is strangeness at
> that end too.
>
> Thanks,
> Andy
> On Mon, 3 Jul 2017 at 02:43, Jean-Philippe André <j...@videolan.org>
> wrote:
>
> > Hi,
> >
> > 2017-06-29 20:57 GMT+09:00 Andrew Williams <a...@andywilliams.me>:
> >
> > > Hi,
> > >
> > > I meant to get this resolved at the weekend but we ran out of the time.
> > > Some strange sizing issues have been haunting us (
> > > https://phab.enlightenment.org/T5482) I have tracked it down to a main
> > > menu
> > > that's bigger than the window content.
> > >
> > > If someone can help please apply the attached patch to EFL then run
> > > elementary_test and click "Main menu" - you will see a very unhappy
> > > window...
> > >
> > > First to solve this get's a special prize!
> > >
> >
> > I've got a pending patch for that but I'm not too happy with it and it
> also
> > doesn't solve your issues with EDI.
> > I'll keep investigating.
> >
> > --
> > Jean-Philippe André
> >
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> --
> http://andywilliams.me
> http://ajwillia.ms
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 03/03: build: enable examples build by default

2017-07-04 Thread Jean-Philippe André
autogen.sh now fails with:
config.status: error: cannot find input file:
`src/examples/eina/Makefile.in'

So this "fix" just broke compilation.

2017-07-04 4:08 GMT+09:00 Mike Blumenkrantz <michael.blumenkra...@gmail.com>
:

> While fixing Wayland build today I noticed that the examples build system
> is Not Good. The following are issues which still exist related to the
> configure/build stages of examples:
>
> * Use of SUBDIRS
>   Ideally everything in src/ should be included into a single makefile to
> improve build times, but somehow this (and benchmarks) still uses SUBDIRS.
> * Conditional dist of sources
>   As a result of SUBDIR use, sources for examples have never been
> distributed if example build is configured to be disabled, guaranteeing
> dist build failures in this case.
> * Conditional creation of makefiles
>   I've made changes so that now the corresponding makefiles are only
> generated when examples are enabled, since this was the simplest workaround
> to the above issue and I didn't want to spend an entire (holi)day rewriting
> the examples build.
>
> Note that it will now be necessary to pass --disable-always-build-examples
> in order to prevent the examples build, since this is now enabled by
> default to reduce the odds of shipping a dist without examples
> sources/makefiles.
>
> On Mon, Jul 3, 2017 at 3:02 PM Mike Blumenkrantz <
> michael.blumenkra...@gmail.com> wrote:
>
> > discomfitor pushed a commit to branch master.
> >
> >
> > http://git.enlightenment.org/core/efl.git/commit/?id=
> b58629bbbef3d811700b016eb9fa97e2af71e1a1
> >
> > commit b58629bbbef3d811700b016eb9fa97e2af71e1a1
> > Author: Mike Blumenkrantz <zm...@osg.samsung.com>
> > Date:   Mon Jul 3 15:01:59 2017 -0400
> >
> > build: enable examples build by default
> >
> > the previous method of forcing this to be enabled for dist builds
> > caused
> > breaks when the original configure disabled examples, as the
> > little-known
> > DISTCHECK_CONFIGURE_FLAGS variable would need to also be set to
> disable
> > examples even though the user would think they were disabled based on
> > configure
> > output
> > ---
> >  Makefile.am  | 3 +--
> >  configure.ac | 4 ++--
> >  2 files changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/Makefile.am b/Makefile.am
> > index a818b4e353..591cf998c6 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -2,8 +2,7 @@ ACLOCAL_AMFLAGS = -I m4
> >  AM_MAKEFLAGS = --no-print-directory
> >  AM_DISTCHECK_CONFIGURE_FLAGS = \
> >  --with-tests=regular \
> > ---with-systemdunitdir=. \
> > ---enable-always-build-examples
> > +--with-systemdunitdir=.
> >
> >  SUBDIRS = src data config doc
> >
> > diff --git a/configure.ac b/configure.ac
> > index 72c4d6c78b..2efd94dec3 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -5226,7 +5226,7 @@ if test "x${want_tests}" = "xyes" -a
> > "x${want_wayland}" = "xyes"; then
> >  fi
> >
> >  AC_ARG_ENABLE([always-build-examples],
> > -   [AS_HELP_STRING([--enable-always-build-examples],[always build
> > examples. @<:@default=disabled@:>@])],
> > +   [AS_HELP_STRING([--enable-always-build-examples],[always build
> > examples. @<:@default=enabled@:>@])],
> > [
> >  if test "x${enableval}" = "xyes" ; then
> > want_always_build_examples="yes"
> > @@ -5234,7 +5234,7 @@ AC_ARG_ENABLE([always-build-examples],
> > want_always_build_examples="no"
> >  fi
> > ],
> > -   [want_always_build_examples="no"])
> > +   [want_always_build_examples="yes"])
> >  AM_CONDITIONAL([ALWAYS_BUILD_EXAMPLES], [test
> > "${want_always_build_examples}" = "yes"])
> >
> >  BARF_OK="xno"
> >
> > --
> >
> >
> >
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>


-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] elm_layout_content_set(NULL, obj) is broken since a week

2017-07-03 Thread Jean-Philippe André
Should be fixed now. Thanks again.

2017-07-04 11:33 GMT+09:00 Jean-Philippe André <j...@videolan.org>:

> Hi,
>
> This is most likely due to my changes. I'll check that!
> Thanks for the report.
>
> 2017-07-04 5:00 GMT+09:00 Davide Andreoli <d...@gurumeditation.it>:
>
>> Hi,
>>
>> I'm facing this breakage since some few days:
>>
>> pseudo code:
>>
>> ic = Elm.Icon(...)
>> bt = Elm.Button(...)
>> elm_layout_content_set(bt, NULL, ic)
>>
>> content_set now fail !
>>
>> if I change NULL to "elm.swallow.content" or "icon" it works again.
>>
>> I didn't found the offending commit, but maybe we need to do the same as:
>> https://git.enlightenment.org/core/efl.git/commit/?id=c0e4a2
>> 18dd06ecf790a5338c4fcc09a4073dba0c
>> ?
>> <https://git.enlightenment.org/core/efl.git/commit/?id=c0e4a218dd06ecf790a5338c4fcc09a4073dba0c?>
>> ?
>>
>> Thanks
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___________
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>>
>
>
> --
> Jean-Philippe André
>



-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 02/02: layout: Fix default content part

2017-07-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit a4b79fdbe16e1495c187dc4f9da99924cf51e539
Author: Jean-Philippe Andre 
Date:   Tue Jul 4 11:37:37 2017 +0900

layout: Fix default content part

This fixes call to:
  elm_layout_content_set(ly, NULL, obj);

This only affect this legacy API, not the EO interface.

Thanks Dave for the report!

Ref 59081043a892f6db74a1d557c7422c7a543c909d
---
 src/lib/elementary/elm_layout.c | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 84ec27f52a..ad5de01f60 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -1012,7 +1012,11 @@ elm_layout_content_set(Evas_Object *obj,
Evas_Object *content)
 {
ELM_LAYOUT_CHECK(obj) EINA_FALSE;
-
+   if (!swallow)
+ {
+swallow = elm_widget_default_content_part_get(obj);
+if (!swallow) return EINA_FALSE;
+ }
return efl_content_set(efl_part(obj, swallow), content);
 }
 
@@ -1089,7 +1093,11 @@ elm_layout_content_get(const Evas_Object *obj,
const char *swallow)
 {
ELM_LAYOUT_CHECK(obj) NULL;
-
+   if (!swallow)
+ {
+swallow = elm_widget_default_content_part_get(obj);
+if (!swallow) return NULL;
+ }
return efl_content_get(efl_part(obj, swallow));
 }
 

-- 




Re: [E-devel] elm_layout_content_set(NULL, obj) is broken since a week

2017-07-03 Thread Jean-Philippe André
Hi,

This is most likely due to my changes. I'll check that!
Thanks for the report.

2017-07-04 5:00 GMT+09:00 Davide Andreoli <d...@gurumeditation.it>:

> Hi,
>
> I'm facing this breakage since some few days:
>
> pseudo code:
>
> ic = Elm.Icon(...)
> bt = Elm.Button(...)
> elm_layout_content_set(bt, NULL, ic)
>
> content_set now fail !
>
> if I change NULL to "elm.swallow.content" or "icon" it works again.
>
> I didn't found the offending commit, but maybe we need to do the same as:
> https://git.enlightenment.org/core/efl.git/commit/?id=
> c0e4a218dd06ecf790a5338c4fcc09a4073dba0c
> ??
>
> Thanks
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>


-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/03: eina file: Fix rare crash in line iteration

2017-07-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit daf87093f85972fc595560a3ac8537b6c74e01b0
Author: Jean-Philippe Andre 
Date:   Mon Jul 3 16:22:01 2017 +0900

eina file: Fix rare crash in line iteration

I'm not sure about the rest of this code, so it's possible that
the index is increased even if it shouldn't. But I've observed
a crash at this line, apparently when reaching the end pointer.
---
 src/lib/eina/eina_file_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c
index 4b94d1d20c..8d7472bdd3 100644
--- a/src/lib/eina/eina_file_common.c
+++ b/src/lib/eina/eina_file_common.c
@@ -606,8 +606,8 @@ _eina_file_map_lines_iterator_next(Eina_Lines_Iterator *it, 
void **data)
match = *it->current.end;
if (it->current.index > 0)
  it->current.end++;
-   while ((*it->current.end == '\n' || *it->current.end == '\r')
-  && it->current.end < it->end)
+   while (it->current.end < it->end &&
+  (*it->current.end == '\n' || *it->current.end == '\r'))
  {
 if (match == *it->current.end)
   break;

-- 




[EGIT] [core/efl] master 02/03: drm: Fix compilation warnings

2017-07-03 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit b0caec04fbb1679573784382a95e182635a54120
Author: Jean-Philippe Andre 
Date:   Mon Jul 3 16:23:12 2017 +0900

drm: Fix compilation warnings
---
 src/modules/evas/engines/drm/evas_engine.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/modules/evas/engines/drm/evas_engine.c 
b/src/modules/evas/engines/drm/evas_engine.c
index f5474ab503..e54b809b5a 100644
--- a/src/modules/evas/engines/drm/evas_engine.c
+++ b/src/modules/evas/engines/drm/evas_engine.c
@@ -179,16 +179,16 @@ eng_image_plane_assign(void *data, void *image, int x, 
int y)
RGBA_Image *img;
Native *n;
Ecore_Drm2_Fb *fb = NULL;
-   Ecore_Drm2_Plane *plane;
+   Ecore_Drm2_Plane *plane = NULL;
struct scanout_handle *g;
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(image, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(image, NULL);
 
re = (Render_Engine *)data;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(re, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(re, NULL);
 
ob = re->generic.ob;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ob, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(ob, NULL);
 
img = image;
n = img->native.data;
@@ -198,7 +198,6 @@ eng_image_plane_assign(void *data, void *image, int x, int 
y)
if (n->ns.type != EVAS_NATIVE_SURFACE_WL_DMABUF) return NULL;
 
fb = drm_import_simple_dmabuf(re->fd, >ns_data.wl_surface_dmabuf.attr);
-
if (!fb) return NULL;
 
g = calloc(1, sizeof(struct scanout_handle));

-- 




Re: [E-devel] main menu breakage

2017-07-03 Thread Jean-Philippe André
Hi,

2017-06-29 20:57 GMT+09:00 Andrew Williams <a...@andywilliams.me>:

> Hi,
>
> I meant to get this resolved at the weekend but we ran out of the time.
> Some strange sizing issues have been haunting us (
> https://phab.enlightenment.org/T5482) I have tracked it down to a main
> menu
> that's bigger than the window content.
>
> If someone can help please apply the attached patch to EFL then run
> elementary_test and click "Main menu" - you will see a very unhappy
> window...
>
> First to solve this get's a special prize!
>

I've got a pending patch for that but I'm not too happy with it and it also
doesn't solve your issues with EDI.
I'll keep investigating.

-- 
Jean-Philippe André
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


<    1   2   3   4   5   6   7   8   9   10   >