[EGIT] [core/efl] master 03/04: genlist: Fix more tree issues (expanded state)

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

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

commit 3f41cdf59b091644675f438a21cba5b69e9cdc8e
Author: Jean-Philippe Andre 
Date:   Wed Feb 22 13:53:03 2017 +0900

genlist: Fix more tree issues (expanded state)

This fixes a lot of cases where a genlist node (of any type)
with children may have appeared in the invalid expanded or
contracted state.

Before this patch, the test case "Genlist tree, Relative insert"
looked like below (all items are programmatically added):

> A
  > 1
  > 2
> B
  > 3
  > 4

The problem above is that A and B have visible children but
still believe they are in contracted state. This patch ensures
that A and B will be marked as expanded, but will do so without
firing an "expanded" signal and definitely without the
"expand,request" signal.

After this patch, the test case will look like this:

v A
  > 1
  > 2
v B
  > 3
  > 4

Which is more correct. Note that this test case does not handle
any expand/contract signal.

NOTE: This is a behaviour break!
---
 src/lib/elementary/elm_genlist.c| 97 +
 src/lib/elementary/elm_widget_genlist.h |  2 +-
 2 files changed, 74 insertions(+), 25 deletions(-)

diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index e624afe..ebc2bc7 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -165,6 +165,8 @@ static Eina_Bool _item_filtered_get(Elm_Gen_Item *it);
 static void _elm_genlist_tree_effect_stop(Elm_Genlist_Data *sd);
 static Eina_Bool _elm_genlist_tree_effect_setup(Elm_Genlist_Data *sd);
 
+static void _item_expanded_set_noevent(Elm_Gen_Item *it, Eina_Bool expanded);
+
 static const Elm_Action key_actions[] = {
{"move", _key_action_move},
{"select", _key_action_select},
@@ -3610,8 +3612,12 @@ _item_block_del(Elm_Gen_Item *it)
 il = EINA_INLIST_GET(itb);
 itbn = (Item_Block *)(il->next);
 if (it->parent)
-  it->parent->item->items =
-eina_list_remove(it->parent->item->items, EO_OBJ(it));
+  {
+ it->parent->item->items =
+   eina_list_remove(it->parent->item->items, EO_OBJ(it));
+ if (!it->parent->item->items)
+   sd->top_level_parent_items--;
+  }
 else
   {
  _item_block_position_update(il->next, itb->position);
@@ -3797,7 +3803,11 @@ _item_del(Elm_Gen_Item *it)
if (sd->expanded_next_item == it) sd->expanded_next_item = NULL;
if (sd->move_items) sd->move_items = eina_list_remove(sd->move_items, it);
if (it->parent)
- it->parent->item->items = eina_list_remove(it->parent->item->items, 
EO_OBJ(it));
+ {
+it->parent->item->items = eina_list_remove(it->parent->item->items, 
EO_OBJ(it));
+if (!it->parent->item->items)
+  sd->top_level_parent_items--;
+ }
ELM_SAFE_FREE(it->item->swipe_timer, ecore_timer_del);
_elm_genlist_item_del_serious(it);
 
@@ -6252,6 +6262,8 @@ _elm_genlist_item_append(Eo *obj EINA_UNUSED, 
Elm_Genlist_Data *sd, const Elm_Ge
 Eina_List *ll = _list_last_recursive(it->parent->item->items);
 
 if (ll) eo_it2 = ll->data;
+if (!it->parent->item->items)
+  sd->top_level_parent_items++;
 it->parent->item->items =
   eina_list_append(it->parent->item->items, EO_OBJ(it));
 if (!eo_it2) eo_it2 = EO_OBJ(it->parent);
@@ -6264,6 +6276,7 @@ _elm_genlist_item_append(Eo *obj EINA_UNUSED, 
Elm_Genlist_Data *sd, const Elm_Ge
  (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(it2));
 it->item->rel = it2;
 it2->item->rel_revs = eina_list_append(it2->item->rel_revs, it);
+_item_expanded_set_noevent(it->parent, EINA_TRUE);
  }
it->item->before = EINA_FALSE;
_item_queue(sd, it, NULL);
@@ -6303,6 +6316,8 @@ _elm_genlist_item_prepend(Eo *obj EINA_UNUSED, 
Elm_Genlist_Data *sd, const Elm_G
 Eina_List *ll = it->parent->item->items;
 
 if (ll) eo_it2 = ll->data;
+if (!it->parent->item->items)
+  sd->top_level_parent_items++;
 it->parent->item->items =
   eina_list_prepend(it->parent->item->items, EO_OBJ(it));
 if (!eo_it2) eo_it2 = EO_OBJ(it->parent);
@@ -6311,6 +6326,7 @@ _elm_genlist_item_prepend(Eo *obj EINA_UNUSED, 
Elm_Genlist_Data *sd, const Elm_G
(sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(it2));
 it->item->rel = it2;
 it2->item->rel_revs = eina_list_append(it2->item->rel_revs, it);
+_item_expanded_set_noevent(it->parent, EINA_TRUE);
  }
it->item->before = EINA_TRUE;
_item_queue(sd, it, NULL);
@@ -6353,15 +6369,23 @@ _elm_genlist_item_insert_after(Eo *obj EINA_UNUSED, 
Elm_Genlist_Data *sd, const
  }
else
 

[EGIT] [core/efl] master 04/04: genlist: Simplify code (remove one argument)

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

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

commit 6245639b9c0c847abaafd845b630c27e633e37c7
Author: Jean-Philippe Andre 
Date:   Wed Feb 22 15:34:34 2017 +0900

genlist: Simplify code (remove one argument)

Parameter "qadd" is always true when calling _item_process_post(),
so simplify the code by removing it.
---
 src/lib/elementary/elm_genlist.c | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index ebc2bc7..1e4df6d 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -4625,16 +4625,14 @@ _item_process(Elm_Genlist_Data *sd,
 }
 
 static void
-_item_process_post(Elm_Genlist_Data *sd,
-   Elm_Gen_Item *it,
-   Eina_Bool qadd)
+_item_process_post(Elm_Genlist_Data *sd, Elm_Gen_Item *it)
 {
Eina_Bool show_me = EINA_FALSE;
 
if (it->item->block->changed)
  {
 show_me = _item_block_recalc
-(it->item->block, it->item->block->num, qadd);
+(it->item->block, it->item->block->num, EINA_TRUE);
 it->item->block->changed = 0;
 if (sd->pan_changed)
   {
@@ -4686,7 +4684,7 @@ _queue_process(Elm_Genlist_Data *sd)
 it->item->queued = EINA_FALSE;
 if (!_item_process(sd, it)) continue;
 t = ecore_time_get();
-_item_process_post(sd, it, EINA_TRUE);
+_item_process_post(sd, it);
 /* same as eina_inlist_count > 1 */
 if (sd->blocks && sd->blocks->next)
   {
@@ -7706,7 +7704,7 @@ _item_filtered_get(Elm_Gen_Item *it)
  sd->queue = eina_list_remove_list(sd->queue, l);
  it->item->queued = EINA_FALSE;
  _item_process(sd, it);
- _item_process_post(sd, it, EINA_TRUE);
+ _item_process_post(sd, it);
   }
 
 _filter_item_internal(it);

-- 




[EGIT] [core/efl] master 01/04: genlist: Fix sorted_insert with tree

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

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

commit fe6bdf30cdf3e21cc3c17ea7546eca3cc5e2c6cb
Author: Jean-Philippe Andre 
Date:   Tue Feb 21 21:48:11 2017 +0900

genlist: Fix sorted_insert with tree

This fixes the test case "Genlist Tree, Insert Sorted".
This is a pretty ugly patch... but the genlist code is already
pretty ugly, as it keeps a flat inlist of items (sd->items)
as well as a tree structure in parallel.

Before this patch, the following configuration led to issues:

 1
 3
 - A
 - B

Adding item "2" led to a crash. Adding item 4 led to this:

 1
 3
 4
 - A
 - B

Items A and B lost their parent "3". Subsequent sorted inserts
would lead to insane bahaviour, where for instance "8" would
appear before "3".

This patch fixes all sorted inserts, at the cost of performance
(an optimized code path is avoided). Subsequent patches will
increase the robustness of the tree structure.

NOTE: This is a behaviour break!

Fixes T4850
---
 src/lib/elementary/elm_genlist.c| 87 +
 src/lib/elementary/elm_widget_genlist.h |  1 +
 2 files changed, 68 insertions(+), 20 deletions(-)

diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 8b6ef4e..a04edbb 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -6419,9 +6419,11 @@ _elm_genlist_item_insert_before(Eo *obj, 
Elm_Genlist_Data *sd, const Elm_Genlist
 EOLIAN static Elm_Object_Item*
 _elm_genlist_item_sorted_insert(Eo *obj, Elm_Genlist_Data *sd, const 
Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *eo_parent, 
Elm_Genlist_Item_Type type, Eina_Compare_Cb comp, Evas_Smart_Cb func, const 
void *func_data)
 {
+   Elm_Object_Item *eo_rel = NULL;
Elm_Gen_Item *rel = NULL;
Elm_Gen_Item *it;
 
+   EINA_SAFETY_ON_NULL_RETURN_VAL(comp, NULL);
if (eo_parent)
  {
 ELM_GENLIST_ITEM_DATA_GET(eo_parent, parent);
@@ -6438,8 +6440,7 @@ _elm_genlist_item_sorted_insert(Eo *obj, Elm_Genlist_Data 
*sd, const Elm_Genlist
 
if (it->parent)
  {
-Elm_Object_Item *eo_rel = NULL;
-Eina_List *l, *last;
+Eina_List *l;
 int cmp_result;
 
 l = eina_list_search_sorted_near_list
@@ -6465,8 +6466,7 @@ _elm_genlist_item_sorted_insert(Eo *obj, Elm_Genlist_Data 
*sd, const Elm_Genlist
   (it->parent->item->items, eo_it, l);
   if (rel->item->items && rel->item->expanded)
 {
-   last = eina_list_last(rel->item->items);
-   eo_rel = eina_list_data_get(last);
+   eo_rel = eina_list_last_data_get(rel->item->items);
rel = efl_data_scope_get(eo_rel, 
ELM_GENLIST_ITEM_CLASS);
 }
   sd->items = eina_inlist_append_relative
@@ -6478,17 +6478,20 @@ _elm_genlist_item_sorted_insert(Eo *obj, 
Elm_Genlist_Data *sd, const Elm_Genlist
   {
  rel = it->parent;
 
- // ignoring the comparison
- it->parent->item->items = eina_list_prepend_relative_list
- (it->parent->item->items, eo_it, l);
- sd->items = eina_inlist_prepend_relative
- (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(rel));
+ it->parent->item->items = eina_list_prepend
+   (it->parent->item->items, eo_it);
+ sd->items = eina_inlist_append_relative
+   (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(rel));
  it->item->before = EINA_FALSE;
+ it->parent->item->expanded = EINA_TRUE;
   }
+
+sd->has_tree_items = EINA_TRUE;
+ELM_SAFE_FREE(sd->state, eina_inlist_sorted_state_free);
  }
else
  {
-if (!sd->state)
+if (!sd->state && !sd->has_tree_items)
   {
  sd->state = eina_inlist_sorted_state_new();
  eina_inlist_sorted_state_init(sd->state, sd->items);
@@ -6498,19 +6501,63 @@ _elm_genlist_item_sorted_insert(Eo *obj, 
Elm_Genlist_Data *sd, const Elm_Genlist
 if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP)
   sd->group_items = eina_list_append(sd->group_items, it);
 
-sd->items = eina_inlist_sorted_state_insert
-(sd->items, EINA_INLIST_GET(it), _elm_genlist_item_compare,
-sd->state);
-
-if (EINA_INLIST_GET(it)->next)
+if (!sd->items) sd->has_tree_items = EINA_FALSE;
+if (!sd->has_tree_items)
   {
- rel = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
- it->item->before = EINA_TRUE;
+ sd->items = eina_inlist_sorted_state_insert
+   (sd->items, EINA_INLIST_GET(it), _elm_genlist_item_compare,
+ 

[EGIT] [core/efl] master 02/04: genlist: Fix insert after with a tree

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

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

commit aa5414f95d37e285b4af5a5f080daf8f900b9e99
Author: Jean-Philippe Andre 
Date:   Tue Feb 21 22:04:10 2017 +0900

genlist: Fix insert after with a tree

This fixes a case where inserting item "C" after item "B" in this
tree would go wrong:

A
B
- 1
- 2

Before this patch, 1 and 2 lose their parent:

A
B
C
- 1
- 2

After this patch, 1 and 2 retain their parent:

A
B
- 1
- 2
C

Insert before worked by luck, no need to fix it.
Note that this patch may require the next one to actually
work (ensuring expanded state flag).

NOTE: This is a behaviour break!
---
 src/lib/elementary/elm_genlist.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index a04edbb..e624afe 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -6356,6 +6356,12 @@ _elm_genlist_item_insert_after(Eo *obj EINA_UNUSED, 
Elm_Genlist_Data *sd, const
 it->parent->item->items =
   eina_list_append_relative(it->parent->item->items, EO_OBJ(it), 
eo_after);
  }
+
+   if (after->item->items && after->item->expanded)
+ {
+eo_after = eina_list_last_data_get(after->item->items);
+after = efl_data_scope_get(eo_after, ELM_GENLIST_ITEM_CLASS);
+ }
sd->items = eina_inlist_append_relative
(sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(after));
 

-- 




[E-devel] ABI Navigator for EFL

2017-02-22 Thread Andrey Ponomarenko
Hello,

I'd like to present a new project called "ABI Navigator" for searching binary 
symbols (functions, global data, etc.) in EFL and other open-source libraries: 
https://abi-laboratory.pro/index.php?view=navigator

The project allows to find out in which versions of the library some symbol is 
defined, added, removed or changed. The data is taken from the ABI Tracker 
project: https://abi-laboratory.pro/tracker/timeline/efl/

Example for symbol _eo_do_end from libeo.so: 
https://abi-laboratory.pro/index.php?view=navigator&symbol=_eo_do_end#result

The project aims to help library users and maintainers to resolve issues with 
missed symbols and navigate through the reports in the ABI Tracker.

Have you ever encountered the "undefined reference" error or want to know 
whether the symbol is _stable_ enough to import in your code? Try to find it in 
the ABI Navigator!

Enjoy!

--
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] efl-1.18 01/01: edje_edit: fix scripts compilation

2017-02-22 Thread Andrii Kroitor
lorddrew pushed a commit to branch efl-1.18.

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

commit 3c5d814da688f2f4515d8f4eec9411b5cf3583bb
Author: Andrii Kroitor 
Date:   Tue Feb 21 19:33:51 2017 +0200

edje_edit: fix scripts compilation

@fix
---
 src/lib/edje/edje_edit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index f704a05..ade3b5d 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -11803,7 +11803,7 @@ __part_replace(Edje_Edit *eed, char *pcode, char *name)
 {
int id;
 
-   id = _edje_part_id_find((Edje *)eed, name);
+   id = _edje_part_id_find(eed->base, name);
if (id < 0)
  return 0;
return eina_convert_itoa(id, pcode);
@@ -12223,7 +12223,7 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed)
embryo_program_free(edc->script);
edc->script = embryo_program_new(eed->bytecode, eed->bytecode_size);
_edje_embryo_script_init(edc);
-   _edje_var_init((Edje *)eed);
+   _edje_var_init(eed->base);
 
 the_way_out:
fclose(f);

-- 




[EGIT] [apps/rage] master 01/01: silence title change printfs that are noise

2017-02-22 Thread Carsten Haitzler (Rasterman)
raster pushed a commit to branch master.

http://git.enlightenment.org/apps/rage.git/commit/?id=94f181f3b43c8f2135c6a9f15a393a90b7eed3c1

commit 94f181f3b43c8f2135c6a9f15a393a90b7eed3c1
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 22 21:55:12 2017 +0900

silence title change printfs that are noise
---
 src/bin/winvid.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/winvid.c b/src/bin/winvid.c
index 55348e0..77beaf7 100644
--- a/src/bin/winvid.c
+++ b/src/bin/winvid.c
@@ -66,6 +66,7 @@ _cb_length(void *data, Evas_Object *obj EINA_UNUSED, void 
*event EINA_UNUSED)
 static void
 _cb_title(void *data, Evas_Object *obj, void *event EINA_UNUSED)
 {
+#if 0
printf("title change\n");
printf("  meta title:   %s\n", video_meta_title_get(obj));
printf("  meta album:   %s\n", video_meta_album_get(obj));
@@ -79,6 +80,7 @@ _cb_title(void *data, Evas_Object *obj, void *event 
EINA_UNUSED)
printf("  audio: %i/%i [%s]\n", video_audio_channel_get(obj), 
video_audio_channel_count(obj), video_audio_channel_name_get(obj, 
video_audio_channel_get(obj)));
printf("  video: %i/%i [%s]\n", video_video_channel_get(obj), 
video_video_channel_count(obj), video_video_channel_name_get(obj, 
video_video_channel_get(obj)));
printf("  spu  : %i/%i [%s]\n", video_spu_channel_get(obj), 
video_spu_channel_count(obj), video_spu_channel_name_get(obj, 
video_spu_channel_get(obj)));
+#endif
win_title_update(data);
 }
 

-- 




[EGIT] [core/enlightenment] master 01/01: e client volume - use the overall state of all sinks for display

2017-02-22 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit a534433a914c333b1a036217685af709e9fc994f
Author: Carsten Haitzler (Rasterman) 
Date:   Tue Feb 21 16:34:07 2017 +0900

e client volume - use the overall state of all sinks for display

improve mixer volume display in titlebar now to show a unified
display. average volume of all non-muted sinks for volume display and
if at least 1 sink is non-muted display as not muted as some sound is
coming from that app... somwhere...
---
 src/bin/e_client_volume.c | 79 ++-
 1 file changed, 58 insertions(+), 21 deletions(-)

diff --git a/src/bin/e_client_volume.c b/src/bin/e_client_volume.c
index bdc54e3..3c41765 100644
--- a/src/bin/e_client_volume.c
+++ b/src/bin/e_client_volume.c
@@ -219,11 +219,63 @@ e_client_volume_sink_name_get(const E_Client_Volume_Sink 
*sink)
return NULL;
 }
 
+static void
+_e_client_volume_update(E_Client *ec)
+{
+   E_Client_Volume_Sink *sink;
+   Eina_List *l;
+   int volume_min, volume_max, volume, count;
+   Eina_Bool mute;
+
+   mute = EINA_TRUE;
+   volume = 0;
+   volume_min = 999;
+   volume_max = 0;
+   count = 0;
+   EINA_LIST_FOREACH(ec->sinks, l, sink)
+ {
+int volume_min2, volume_max2, volume2;
+Eina_Bool mute2;
+
+volume_min2 = e_client_volume_sink_min_get(sink);
+volume_max2 = e_client_volume_sink_max_get(sink);
+if (volume_min2 < volume_min) volume_min = volume_min2;
+if (volume_max2 > volume_max) volume_max = volume_max2;
+e_client_volume_sink_get(sink, &volume2, &mute2);
+if (!mute2)
+  {
+ mute = EINA_FALSE;
+ volume += volume2;
+ count++;
+  }
+ }
+   if (ec->sinks)
+ {
+ec->volume_min = volume_min;
+ec->volume_max = volume_max;
+if (count > 0) ec->volume = volume / count;
+else ec->volume = volume_max;
+ec->mute = mute;
+ec->volume_control_enabled = EINA_TRUE;
+ }
+   else
+ {
+ec->volume_min = 0;
+ec->volume_max = 0;
+ec->volume = 0;
+ec->mute = EINA_FALSE;
+ec->volume_control_enabled = EINA_FALSE;
+ }
+   if (ec->volume_control_enabled)
+ {
+e_comp_object_frame_volume_update(ec->frame);
+e_client_volume_display_set(ec, ec->volume, ec->mute);
+ }
+}
+
 E_API void
 e_client_volume_sink_append(E_Client *ec, E_Client_Volume_Sink *sink)
 {
-   int volume_min;
-   int volume_max;
int volume;
Eina_Bool mute;
 
@@ -231,18 +283,7 @@ e_client_volume_sink_append(E_Client *ec, 
E_Client_Volume_Sink *sink)
 
ec->sinks = eina_list_append(ec->sinks, sink);
sink->clients = eina_list_append(sink->clients, ec);
-   if (ec->volume_control_enabled)
- {
-volume_min = e_client_volume_sink_min_get(sink);
-if (ec->volume_min < volume_min)
-  ec->volume_min = volume_min;
-volume_max = e_client_volume_sink_max_get(sink);
-if (ec->volume_max > volume_max)
-  ec->volume_max = volume_max;
-e_client_volume_sink_get(sink, &volume, &mute);
-e_client_volume_display_set(ec, volume, mute);
- }
-   else
+   if (!ec->volume_control_enabled)
  {
 ec->volume_min = e_client_volume_sink_min_get(sink);
 ec->volume_max = e_client_volume_sink_max_get(sink);
@@ -251,7 +292,7 @@ e_client_volume_sink_append(E_Client *ec, 
E_Client_Volume_Sink *sink)
 ec->mute = !!mute;
 ec->volume_control_enabled = EINA_TRUE;
  }
-   e_comp_object_frame_volume_update(ec->frame);
+   _e_client_volume_update(ec);
_e_client_volume_sink_event_simple(ec, sink,
   E_EVENT_CLIENT_VOLUME_SINK_ADD);
 }
@@ -262,7 +303,7 @@ e_client_volume_sink_remove(E_Client *ec, 
E_Client_Volume_Sink *sink)
EINA_SAFETY_ON_NULL_RETURN(ec);
ec->sinks = eina_list_remove(ec->sinks, sink);
sink->clients = eina_list_remove(sink->clients, ec);
-   e_comp_object_frame_volume_update(ec->frame);
+   _e_client_volume_update(ec);
_e_client_volume_sink_event_simple(ec, sink,
   E_EVENT_CLIENT_VOLUME_SINK_DEL);
 }
@@ -271,17 +312,13 @@ E_API void
 e_client_volume_sink_update(E_Client_Volume_Sink *sink)
 {
Eina_List *l;
-   int volume;
-   Eina_Bool mute;
E_Client *ec;
 
EINA_SAFETY_ON_NULL_RETURN(sink);
 
-   e_client_volume_sink_get(sink, &volume, &mute);
EINA_LIST_FOREACH(sink->clients, l, ec)
  {
-if (eina_list_count(ec->sinks) == 1)
-  e_client_volume_display_set(ec, volume, mute);
+_e_client_volume_update(ec);
 _e_client_volume_sink_event_simple(ec, sink,
E_EVENT_CLIENT_VOLUME_SINK_CHANGED);
  }

-- 




[EGIT] [core/enlightenment] master 01/01: Luncher: Unify icon image file setting code.

2017-02-22 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

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

commit 3ce76c66d22be70c9d009b3cb5ec4c783d403e2c
Author: Stephen 'Okra' Houston 
Date:   Wed Feb 22 11:05:27 2017 -0600

Luncher: Unify icon image file setting code.
---
 src/modules/luncher/bar.c  | 253 +++--
 src/modules/luncher/grid.c | 189 ++---
 2 files changed, 184 insertions(+), 258 deletions(-)

diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c
index d5d9fa1..1ae1e48 100644
--- a/src/modules/luncher/bar.c
+++ b/src/modules/luncher/bar.c
@@ -954,6 +954,110 @@ _bar_exec_new_show(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj, void *even
 }
 
 static void
+_bar_icon_file_set(Icon *ic, Efreet_Desktop *desktop, E_Client 
*non_desktop_client)
+{
+   const char *path = NULL, *k = NULL;
+   char buf[4096];
+   int len = 0;
+   if (desktop)
+ {
+if (!desktop->icon)
+  path = NULL;
+else if (strncmp(desktop->icon, "/", 1) && 
!ecore_file_exists(desktop->icon))
+  {
+ path = efreet_icon_path_find(e_config->icon_theme, desktop->icon, 
ic->inst->size);
+ if (!path)
+   {
+  if (e_util_strcmp(e_config->icon_theme, "hicolor"))
+path = efreet_icon_path_find("hicolor", desktop->icon, 
ic->inst->size);
+   }
+  }
+else if (ecore_file_exists(desktop->icon))
+  {
+ path = desktop->icon;
+  }
+if (!path && desktop->icon)
+  {
+ snprintf(buf, sizeof(buf), "e/icons/%s", desktop->icon);
+ if 
(eina_list_count(e_theme_collection_items_find("base/theme/icons", buf)))
+   {
+  path = e_theme_edje_file_get("base/theme/icons", buf);
+  k = buf;
+   }
+ else
+   {
+  path = e_theme_edje_file_get("base/theme/icons", 
"e/icons/unknown");
+  k =  "e/icons/unknown";
+   }
+  }
+else if (!path && !desktop->icon)
+  {
+ path = e_theme_edje_file_get("base/theme/icons", 
"e/icons/unknown");
+ k = "e/icons/unknown";
+  }
+if (path && desktop->icon && !k)
+  {
+ len = strlen(desktop->icon);
+ if ((len > 4) && (!strcasecmp(desktop->icon + len - 4, ".edj")))
+   k = "icon";
+  }
+ }
+   else if (non_desktop_client)
+ {
+Evas_Object *tmp;
+const char *file, *group;
+Eina_Bool ret = EINA_FALSE;
+
+tmp = e_client_icon_add(non_desktop_client, 
evas_object_evas_get(ic->o_layout));
+if (isedje(tmp))
+  {
+ edje_object_file_get(tmp, &file, &group);
+ if (file && group)
+   ret = EINA_TRUE;
+  }
+else
+  ret = e_icon_file_get(tmp, &file, &group);
+if (ret)
+  {
+ eina_stringshare_replace(&ic->icon, file);
+ eina_stringshare_replace(&ic->key, group);
+ path = ic->icon;
+ k = ic->key;
+  }
+evas_object_del(tmp);
+ }
+   else if (ic->icon)
+ {
+if (strncmp(ic->icon, "/", 1) && !ecore_file_exists(ic->icon))
+  {
+ path = efreet_icon_path_find(e_config->icon_theme, ic->icon, 
ic->inst->size);
+ if (!path)
+   {
+  if (e_util_strcmp(e_config->icon_theme, "hicolor"))
+path = efreet_icon_path_find("hicolor", ic->icon, 
ic->inst->size);
+   }
+  }
+else if (ecore_file_exists(ic->icon))
+  {
+ path = ic->icon;
+ k = ic->key;
+  }
+if (!path)
+  {
+ path = e_theme_edje_file_get("base/theme/icons", 
"e/icons/unknown");
+ k = "e/icons/unknown";
+  }
+ }
+   else
+ {
+path = e_theme_edje_file_get("base/theme/icons", "e/icons/unknown");
+k = "e/icons/unknown";
+ }
+   elm_image_file_set(ic->o_icon, path, k);
+   elm_image_file_set(ic->o_overlay, path, k);
+}
+
+static void
 _bar_icon_resized(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const 
char *emission EINA_UNUSED, const char *source EINA_UNUSED)
 {
//This code is supposed to adjust aspect correctly when there is an effect 
happening.  Uncomment to test.
@@ -990,9 +1094,7 @@ _bar_icon_resized(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, const ch
 static Icon *
 _bar_icon_add(Instance *inst, Efreet_Desktop *desktop, E_Client 
*non_desktop_client)
 {
-   const char *path = NULL, *k = NULL;
-   char buf[4096], ori[32];
-   int len = 0;
+   char ori[32];
Icon *ic;
const Eina_List *l;
Edje_Message_String *msg;
@@ -1035,74 +1137,7 @@ _bar_icon_add(Instance *inst, Efreet_Desktop *desk

[EGIT] [core/efl] master 02/02: docgen: add a way to get numerical id of a function

2017-02-22 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 7249dd94ab41145c9a137e9420ea654955de39ce
Author: Daniel Kolesa 
Date:   Wed Feb 22 18:29:07 2017 +0100

docgen: add a way to get numerical id of a function
---
 src/scripts/elua/apps/docgen/doctree.lua | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/scripts/elua/apps/docgen/doctree.lua 
b/src/scripts/elua/apps/docgen/doctree.lua
index 1a3061b..a3a7573 100644
--- a/src/scripts/elua/apps/docgen/doctree.lua
+++ b/src/scripts/elua/apps/docgen/doctree.lua
@@ -326,6 +326,8 @@ local func_type_str = {
 [eolian.function_type.METHOD] = "method"
 }
 
+local ffi = require("ffi")
+
 M.Function = Node:clone {
 -- function types
 UNRESOLVED = eolian.function_type.UNRESOLVED,
@@ -443,6 +445,10 @@ M.Function = Node:clone {
 
 is_same = function(self, other)
 return self.func == other.func
+end,
+
+id_get = function(self)
+return tonumber(ffi.cast("uintptr_t", self.func))
 end
 }
 

-- 




[EGIT] [core/efl] master 01/02: docgen: more useful function listings in class pages

2017-02-22 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 967af33da2d778afbcc7e21fc515728a2c0e0ea6
Author: Daniel Kolesa 
Date:   Wed Feb 22 15:54:36 2017 +0100

docgen: more useful function listings in class pages

Now there are C signatures visible.
---
 src/scripts/elua/apps/docgen/writer.lua |  4 ++-
 src/scripts/elua/apps/gendoc.lua| 53 +
 2 files changed, 43 insertions(+), 14 deletions(-)

diff --git a/src/scripts/elua/apps/docgen/writer.lua 
b/src/scripts/elua/apps/docgen/writer.lua
index fc3e423..17238ee 100644
--- a/src/scripts/elua/apps/docgen/writer.lua
+++ b/src/scripts/elua/apps/docgen/writer.lua
@@ -340,7 +340,9 @@ M.Writer = util.Object:clone {
 end,
 
 write_table = function(self, titles, tbl)
-self:write_raw("^ ", table.concat(titles, " ^ "), " ^\n")
+if titles then
+self:write_raw("^ ", table.concat(titles, " ^ "), " ^\n")
+end
 for i, v in ipairs(tbl) do
 self:write_raw("| ", table.concat(v,  " | "), " |\n")
 end
diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua
index 7f6a397..4dbd433 100644
--- a/src/scripts/elua/apps/gendoc.lua
+++ b/src/scripts/elua/apps/gendoc.lua
@@ -33,12 +33,14 @@ local get_func_csig_part = function(cn, tp)
 return dtree.type_cstr_get(tp, cn)
 end
 
-local gen_func_csig = function(f, ns, ftype)
+local gen_func_csig = function(f, ftype, ns)
 ftype = ftype or f.METHOD
 assert(ftype ~= f.PROPERTY)
 
 local cn = f:full_c_name_get(ftype)
-keyref.add(cn, ns, "c")
+if ns then
+keyref.add(cn, ns, "c")
+end
 local rtype = f:return_type_get(ftype)
 
 local fparam = "Eo *obj"
@@ -696,7 +698,7 @@ find_parent_briefdoc = function(fulln, cl)
 return pdoc:brief_get(pdocf)
 end
 
-local build_functable = function(f, title, ctitle, cl, tbl, over)
+local build_functable = function(f, title, cl, tbl, over)
 if #tbl == 0 then
 return
 end
@@ -705,7 +707,9 @@ local build_functable = function(f, title, ctitle, cl, tbl, 
over)
 for i, impl in ipairs(tbl) do
 local lbuf = writer.Buffer()
 local func = impl:function_get()
-lbuf:write_link(func:nspaces_get(cl, true), func:name_get())
+local llbuf = writer.Buffer()
+llbuf:write_link(func:nspaces_get(cl, true), func:name_get())
+lbuf:write_b(llbuf:finish())
 
 local ft = dtree.Function.METHOD
 if impl:is_prop_get() and impl:is_prop_set() then
@@ -742,7 +746,25 @@ local build_functable = function(f, title, ctitle, cl, 
tbl, over)
 else
 bdoc = doc:brief_get(docf)
 end
-nt[#nt + 1] = { lbuf:finish(), bdoc }
+
+lbuf:write_nl()
+local codes = {}
+if ft ~= dtree.Function.PROPERTY then
+codes[#codes + 1] = gen_func_csig(func, ft)
+else
+codes[#codes + 1] = gen_func_csig(func, dtree.Function.PROP_GET)
+codes[#codes + 1] = gen_func_csig(func, dtree.Function.PROP_SET)
+end
+lbuf:write_code(table.concat(codes, "\n"), "c")
+
+if bdoc ~= "No description supplied." then
+lbuf:write_nl()
+lbuf:write_raw(bdoc)
+lbuf:write_br()
+end
+
+nt[#nt + 1] = { lbuf:finish() }
+
 if impl:is_prop_get() or impl:is_prop_set() then
 build_property(impl, cl)
 else
@@ -750,7 +772,12 @@ local build_functable = function(f, title, ctitle, cl, 
tbl, over)
 end
 end
 table.sort(nt, function(v1, v2) return v1[1] < v2[1] end)
-f:write_table({ ctitle, "Brief description" }, nt)
+for i, item in ipairs(nt) do
+f:write_raw(item[1])
+f:write_nl()
+f:write_br()
+f:write_nl()
+end
 f:write_nl()
 end
 
@@ -798,10 +825,10 @@ local build_class = function(cl)
 end
 end
 
-build_functable(f, "Methods", "Method name", cl, meths, false)
-build_functable(f, "Properties", "Property name", cl, props, false)
-build_functable(f, "Overridden Methods", "Method name", cl, methos, true)
-build_functable(f, "Overridden Properties", "Property name", cl, propos, 
true)
+build_functable(f, "Methods", cl, meths, false)
+build_functable(f, "Properties", cl, props, false)
+build_functable(f, "Overridden Methods", cl, methos, true)
+build_functable(f, "Overridden Properties", cl, propos, true)
 
 f:write_h("Events", 2)
 local evs = cl:events_get()
@@ -1117,7 +1144,7 @@ build_method = function(impl, cl)
 f:write_nl()
 
 f:write_h("C signature", 2)
-f:write_code(gen_func_csig(fn, mns), "c")
+f:write_code(gen_func_csig(fn, nil, mns), "c")
 f:write_nl()
 
 local pars = fn:parameters_get()
@@ -1181,10 +1208,10 @@ build_property = function(impl, cl)
 f:write_h("C signature", 2)
 local codes = {}
 if i

Re: [E-devel] [EGIT] [core/efl] master 02/02: docgen: add a way to get numerical id of a function

2017-02-22 Thread Gustavo Sverzut Barbieri
On Wed, Feb 22, 2017 at 2:29 PM, Daniel Kolesa  wrote:
> q66 pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=7249dd94ab41145c9a137e9420ea654955de39ce
>
> commit 7249dd94ab41145c9a137e9420ea654955de39ce
> Author: Daniel Kolesa 
> Date:   Wed Feb 22 18:29:07 2017 +0100
>
> docgen: add a way to get numerical id of a function
> ---
>  src/scripts/elua/apps/docgen/doctree.lua | 6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/scripts/elua/apps/docgen/doctree.lua 
> b/src/scripts/elua/apps/docgen/doctree.lua
> index 1a3061b..a3a7573 100644
> --- a/src/scripts/elua/apps/docgen/doctree.lua
> +++ b/src/scripts/elua/apps/docgen/doctree.lua
> @@ -326,6 +326,8 @@ local func_type_str = {
>  [eolian.function_type.METHOD] = "method"
>  }
>
> +local ffi = require("ffi")
> +
>  M.Function = Node:clone {
>  -- function types
>  UNRESOLVED = eolian.function_type.UNRESOLVED,
> @@ -443,6 +445,10 @@ M.Function = Node:clone {
>
>  is_same = function(self, other)
>  return self.func == other.func
> +end,
> +
> +id_get = function(self)
> +return tonumber(ffi.cast("uintptr_t", self.func))

not good...use a hash of function name, at least will survive rebuilds


-- 
Gustavo Sverzut Barbieri
--
Mobile: +55 (16) 99354-9890

--
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/02: docgen: more useful function listings in class pages

2017-02-22 Thread Gustavo Sverzut Barbieri
On Wed, Feb 22, 2017 at 2:29 PM, Daniel Kolesa  wrote:
> q66 pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=967af33da2d778afbcc7e21fc515728a2c0e0ea6
>
> commit 967af33da2d778afbcc7e21fc515728a2c0e0ea6
> Author: Daniel Kolesa 
> Date:   Wed Feb 22 15:54:36 2017 +0100
>
> docgen: more useful function listings in class pages
>
> Now there are C signatures visible.

MANY THANKS :-)


> +build_functable(f, "Methods", cl, meths, false)
> +build_functable(f, "Properties", cl, props, false)
> +build_functable(f, "Overridden Methods", cl, methos, true)
> +build_functable(f, "Overridden Properties", cl, propos, true)

but I still don't know what's useful in segmenting "Overridden
methods" and "Overridden Properties", simply list them alongside
regular methods... if you wish you can mark them in the comments or
name as such (this information should be irrelevant to documentation
user).

-- 
Gustavo Sverzut Barbieri
--
Mobile: +55 (16) 99354-9890

--
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] master 01/01: e_askpass: compliant with GIT_ASKPASS for querying username

2017-02-22 Thread Michael Bouchaud
yoz pushed a commit to branch master.

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

commit 31d3b5914f8923a449fe6ef71572e2b96663950e
Author: Michael Bouchaud 
Date:   Wed Feb 22 21:04:34 2017 +0100

e_askpass: compliant with GIT_ASKPASS for querying username

It isn't well documented but git could use SSH_ASKPASS env var for querying
username. So we use the argument passed to the command to know what to do.
---
 src/bin/e_askpass_main.c | 36 +---
 1 file changed, 29 insertions(+), 7 deletions(-)

diff --git a/src/bin/e_askpass_main.c b/src/bin/e_askpass_main.c
index 67b7856..a5d6095 100644
--- a/src/bin/e_askpass_main.c
+++ b/src/bin/e_askpass_main.c
@@ -1,8 +1,11 @@
 #include 
 
-#define TITLE  "Enter Your Password"
+#define TITLE_USER  "Enter Your Username"
+#define TITLE_PWD  "Enter Your Password"
+#define SUDO_LBL "[sudo]"
 #define TEXT   "Please enter your user password"
-#define GUIDE  "Password"
+#define GUIDE_USER  "Username"
+#define GUIDE_PWD  "Password"
 #define OK "OK"
 #define CANCEL "Cancel"
 #define PAD"pad_medium"
@@ -33,9 +36,25 @@ cb_cancel(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info
 }
 
 EAPI int
-elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
+elm_main(int argc, char **argv)
 {
Evas_Object *win, *bx, *fr, *lab, *en, *sep, *bx2, *bt;
+   const char *txt = NULL;
+   Eina_Bool askpass = EINA_TRUE;
+
+   if (argc > 1)
+ {
+/* Git could use SSH_ASKPASS env to query user and password. */
+/* At least git has no i18n, so this should work for all languages */
+/* as long as the string is unchanged. */
+if (!strncmp(argv[1], "Username", sizeof("Username") - 1))
+  askpass = EINA_FALSE;
+/* Sudo prompt [sudo] at the begining of line */
+if (!strncmp(argv[1], SUDO_LBL, sizeof(SUDO_LBL) - 1))
+  txt = &argv[1][sizeof(SUDO_LBL)];
+else
+  txt = argv[1];
+ }
 
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
@@ -45,7 +64,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
elm_app_info_set(elm_main, "enlightenment", "AUTHORS");
 
{
-  win = elm_win_util_standard_add("main", TITLE);
+  win = elm_win_util_standard_add("main", askpass ? TITLE_PWD : TITLE_PWD);
   elm_win_autodel_set(win, EINA_TRUE);
   {
  bx = elm_box_add(win);
@@ -60,7 +79,10 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
 {
lab = elm_label_add(win);
evas_object_size_hint_align_set(lab, EVAS_HINT_FILL, 0.5);
-   elm_object_text_set(lab, TEXT);
+   if (txt)
+ elm_object_text_set(lab, txt);
+   else
+ elm_object_text_set(lab, TEXT);
elm_object_content_set(fr, lab);
evas_object_show(lab);
 }
@@ -78,9 +100,9 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
elm_scroller_policy_set(en, ELM_SCROLLER_POLICY_OFF, 
ELM_SCROLLER_POLICY_OFF);
-   elm_object_part_text_set(en, "guide", GUIDE);
+   elm_object_part_text_set(en, "guide", askpass ? GUIDE_PWD : 
GUIDE_USER);
elm_entry_single_line_set(en, EINA_TRUE);
-   elm_entry_password_set(en, EINA_TRUE);
+   elm_entry_password_set(en, askpass);
evas_object_smart_callback_add(en, "activated", cb_ok, NULL);
evas_object_smart_callback_add(en, "aborted", cb_cancel, NULL);
elm_object_content_set(fr, en);

-- 




[EGIT] [website/www-content] master 01/01: Wiki page docs changed with summary [] by Jean Rene Dawin

2017-02-22 Thread Jean Rene Dawin
WWW-www.enlightenment.org pushed a commit to branch master.

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

commit 46bf7ac786161555f2d28d44f1cf08a213d7bfd7
Author: Jean Rene Dawin 
Date:   Wed Feb 22 13:41:05 2017 -0800

Wiki page docs changed with summary [] by Jean Rene Dawin
---
 pages/docs.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pages/docs.txt b/pages/docs.txt
index 2fbf3d2..470c18a 100644
--- a/pages/docs.txt
+++ b/pages/docs.txt
@@ -45,6 +45,7 @@ A core part of Enlightenment and EFL is the design/theme 
abstraction layer. This
   * [[about-eflete|Eflete]] - GUI Theme design tool
   * [[about-enventor|Enventor]] GUI Edje file design tool
   * [[themes/start|Getting started]] with Edje and themes at the EDC file level
+  * [[themes/knob_example|Edje theme example]] A knob theme for the Elementary 
slider widget
 
 === Debugging ===
 

-- 




[EGIT] [website/www-content] master 01/01: Wiki page knob_example changed with summary [created] by Jean Rene Dawin

2017-02-22 Thread Jean Rene Dawin
WWW-www.enlightenment.org pushed a commit to branch master.

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

commit d38790b2520ae1ee3909b820e9a37e29517bf1f0
Author: Jean Rene Dawin 
Date:   Wed Feb 22 13:48:22 2017 -0800

Wiki page knob_example changed with summary [created] by Jean Rene Dawin
---
 pages/themes/knob_example.txt | 5 +
 1 file changed, 5 insertions(+)

diff --git a/pages/themes/knob_example.txt b/pages/themes/knob_example.txt
new file mode 100644
index 000..4af10bd
--- /dev/null
+++ b/pages/themes/knob_example.txt
@@ -0,0 +1,5 @@
+~~Title: A knob theme for the Elementary slider widget~~
+
+ Elementary slider behaving like a knob 
+
+Here is an example for an edje theme for a knob-like behaviour of an 
elementary slider widget.

-- 




[EGIT] [core/efl] master 01/08: js: Change test eos to ptr()

2017-02-22 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit 7806b4184a35cfd1ae7c01a4b29c7647e96e7f5c
Author: Lauro Moura 
Date:   Fri Feb 10 11:55:43 2017 -0300

js: Change test eos to ptr()
---
 src/tests/eolian_js/test_object.eo | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/tests/eolian_js/test_object.eo 
b/src/tests/eolian_js/test_object.eo
index 38e03b5..98f4447 100644
--- a/src/tests/eolian_js/test_object.eo
+++ b/src/tests/eolian_js/test_object.eo
@@ -57,42 +57,42 @@ class Test.Object (Efl.Object) {
method_uppercase_check {
[[ tests string ]]
params {
-   @inout str: char*;
+   @inout str: ptr(char);
}
}
method_in_null_check {
[[ tests null input ]]
params {
-   a: char*;
+   a: ptr(char);
}
return: bool;
}
method_out_null_check {
[[ tests null output ]]
params {
-   @out a: char*;
+   @out a: ptr(char);
}
return: bool;
}
method_inout_null_check {
[[ tests null output ]]
params {
-   @inout a: char*;
+   @inout a: ptr(char);
}
return: bool;
}
method_return_null_check {
[[ tests null return ]]
-   return: char*;
+   return: ptr(char);
}
method_null_check {
[[ tests null values ]]
params {
-   in: char*;
-   @out out: char*;
-   @inout inout: char*;
+   in: ptr(char);
+   @out out: ptr(char);
+   @inout inout: ptr(char);
}
-   return: char*;
+   return: ptr(char);
}
method_array_at_check {
[[ tests array ]]
@@ -317,15 +317,15 @@ class Test.Object (Efl.Object) {
return: list >;
}
method_list_with_opaque_elements_check {
-   return: const(list);
+   return: const(list);
}
method_in_enum_return_enum_check {
params { e: Test.Enum_Ex; }
return: Test.Enum_Ex;
}
method_in_struct_return_struct_check {
-   params { e: Test.Struct_Ex *; }
-   return: Test.Struct_Ex *;
+   params { e: ptr(Test.Struct_Ex); }
+   return: ptr(Test.Struct_Ex);
}
event_emit {
}

-- 




[EGIT] [core/efl] master 08/08: efl-js: Fix deprecated Set feature of setting non-primitive value

2017-02-22 Thread Felipe Magno de Almeida
felipealmeida pushed a commit to branch master.

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

commit b7780814fb748d947d22db973223edffdb541af5
Author: Felipe Magno de Almeida 
Date:   Wed Feb 22 18:41:32 2017 -0300

efl-js: Fix deprecated Set feature of setting non-primitive value
---
 src/bin/eolian_js/main.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/eolian_js/main.cc b/src/bin/eolian_js/main.cc
index a9b5de4..dff474f 100644
--- a/src/bin/eolian_js/main.cc
+++ b/src/bin/eolian_js/main.cc
@@ -1026,7 +1026,7 @@ int main(int argc, char** argv)
  }
 
functions_ss << "\n  
prototype->Set(::efl::eina::js::compatibility_new(isolate, 
\"cast\"),\n"
-   "  
::efl::eina::js::compatibility_new(isolate, 
&efl::eina::js::cast_function)->GetFunction());\n\n";
+   "  
::efl::eina::js::compatibility_new(isolate, 
&efl::eina::js::cast_function));\n\n";
 
// generate all events
std::stringstream events_ss;

-- 




[EGIT] [core/efl] master 05/08: js: Update examples, including window api changes.

2017-02-22 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit eb041fb6a06296cd7232c53c32fcc81c8c01ec3f
Author: Lauro Moura 
Date:   Wed Dec 7 14:49:43 2016 -0300

js: Update examples, including window api changes.

Window now inherits from Container instead of Pack.

Also removed some deprecated stuff.
---
 src/examples/elementary/bg_example_01.js|   2 +-
 src/examples/elementary/bg_example_02.js|   2 +-
 src/examples/elementary/box_js_example_01.js|   4 +-
 src/examples/elementary/box_js_example_02.js|   7 +-
 src/examples/elementary/bubble_example_01.js|  55 -
 src/examples/elementary/button_example_01.js|  16 ++--
 src/examples/elementary/calendar_example_01.js  |   2 +-
 src/examples/elementary/calendar_example_02.js  |   2 +-
 src/examples/elementary/calendar_example_03.js  |   5 +-
 src/examples/elementary/calendar_example_04.js  |   3 +-
 src/examples/elementary/calendar_example_05.js  |   2 +-
 src/examples/elementary/clock_example.js|   2 +-
 src/examples/elementary/datetime_example.js |  43 --
 src/examples/elementary/icon_example_01.js  |  13 ++-
 src/examples/elementary/layout_example.js   |   6 +-
 src/examples/elementary/menu_example_01.js  |   2 +-
 src/examples/elementary/radio_example_01.js |   6 +-
 src/examples/elementary/separator_example_01.js |  41 --
 src/examples/elementary/slider_example.js   |   6 +-
 src/examples/elementary/spinner_example.js  |   2 +-
 src/examples/elementary/thumb_example_01.js |   6 +-
 src/examples/elementary/twitter_example_01.js   | 104 +---
 22 files changed, 95 insertions(+), 236 deletions(-)

diff --git a/src/examples/elementary/bg_example_01.js 
b/src/examples/elementary/bg_example_01.js
index 2a4e921..5b8756f 100644
--- a/src/examples/elementary/bg_example_01.js
+++ b/src/examples/elementary/bg_example_01.js
@@ -8,7 +8,7 @@ win.setAutohide(true);
 bg = new efl.Elm.Bg(win);
 bg.setColor(255, 0,0,255)
 bg.setHintWeight(1.0, 1.0);
-win.pack(bg);
+win.setContent(bg);
 bg.setVisible(true);
 
 win.setSize(320,320);
diff --git a/src/examples/elementary/bg_example_02.js 
b/src/examples/elementary/bg_example_02.js
index 72a9f49..b38cae9 100644
--- a/src/examples/elementary/bg_example_02.js
+++ b/src/examples/elementary/bg_example_02.js
@@ -12,7 +12,7 @@ bg.setOption(efl.Elm.Bg.Option.CENTER);
 //TODO: elm_app_data_dir_get
 bg.setFile(__dirname + '/../../../data/elementary/images/plant_01.jpg', null);
 bg.setHintWeight(1.0, 1.0);
-win.pack(bg);
+win.setContent(bg);
 bg.setVisible(true);
 
 win.setSize(320, 320);
diff --git a/src/examples/elementary/box_js_example_01.js 
b/src/examples/elementary/box_js_example_01.js
index e09d56a..1cb3b9c 100644
--- a/src/examples/elementary/box_js_example_01.js
+++ b/src/examples/elementary/box_js_example_01.js
@@ -7,12 +7,12 @@ win.setAutohide(true);
 
 bg = new efl.Elm.Bg(win);
 bg.setHintWeight(1.0, 1.0);
-win.pack(bg);
+win.setContent(bg);
 bg.setVisible(true);
 
 bx = new efl.Efl.Ui.Box(win);
 bx.setHintWeight(1.0, 1.0);
-win.pack(bx);
+win.setContent(bx);
 
 entry = new efl.Elm.Label(win);
 entry.setSize(100, 100);
diff --git a/src/examples/elementary/box_js_example_02.js 
b/src/examples/elementary/box_js_example_02.js
index 9966704..156ee16 100644
--- a/src/examples/elementary/box_js_example_02.js
+++ b/src/examples/elementary/box_js_example_02.js
@@ -21,14 +21,9 @@ win = new efl.Efl.Ui.Win.Standard(null);
 win.setText("Box example");
 win.setAutohide(true);
 
-bg = new efl.Elm.Bg(win);
-bg.setHintWeight(1.0, 1.0);
-win.pack(bg);
-bg.setVisible(true);
-
 bigbox = new efl.Efl.Ui.Box(win)
 bigbox.setHintWeight(1.0, 1.0);
-win.pack(bigbox);
+win.setContent(bigbox);
 
 bx = new efl.Efl.Ui.Box(win);
 bx.setHintWeight(1.0, 1.0);
diff --git a/src/examples/elementary/bubble_example_01.js 
b/src/examples/elementary/bubble_example_01.js
deleted file mode 100644
index 9e91202..000
--- a/src/examples/elementary/bubble_example_01.js
+++ /dev/null
@@ -1,55 +0,0 @@
-
-efl = require('efl');
-
-win = new efl.Efl.Ui.Win.Standard(null);
-win.setText("Bg Plain");
-win.setAutohide(true);
-
-bg = new efl.Elm.Bg(win);
-bg.setHintWeight(1.0, 1.0);
-win.pack(bg);
-bg.setVisible(true);
-
-label1 = new efl.Elm.Label(win);
-label1.setText(null, "Bubble with icon, info and label");
-label1.setVisible(true);
-
-console.log(efl);
-
-icon = new efl.Efl.Canvas.Rectangle(win);
-icon.setColor( 0, 0, 255, 255);
-icon.setVisible(true);
-
-bubble1 = new efl.Elm.Bubble(win);
-icon_eo = bubble1.part("icon");
-icon_container = icon_eo.cast("Efl.Container");
-icon_container.setContent(icon);
-bubble1.setText("info", "INFO");
-bubble1.setText(null, "LABEL");
-bubble1.setContent(label1);
-bubble1.setSize(300, 100);
-bubble1.setVisible(true);
-
-corner = 0;
-bubble1.on('clicked',
-  function()
-  {
-  ++corner;
-  if (corner > 3

[EGIT] [core/efl] master 02/08: efl_js: Update register functions.

2017-02-22 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit 4f327dc04e3b986b20e0001577e860084eefc620
Author: Lauro Moura 
Date:   Mon Feb 13 18:04:56 2017 -0300

efl_js: Update register functions.
---
 src/bindings/js/efl_js/efl_js.cc | 66 
 1 file changed, 66 deletions(-)

diff --git a/src/bindings/js/efl_js/efl_js.cc b/src/bindings/js/efl_js/efl_js.cc
index 0976b4c..f1be231 100644
--- a/src/bindings/js/efl_js/efl_js.cc
+++ b/src/bindings/js/efl_js/efl_js.cc
@@ -55,14 +55,6 @@ EAPI void register_poller(v8::Handle global, 
v8::Isolate* isolate);
 EAPI void register_timer(v8::Handle global, v8::Isolate* isolate);
 }
 
-namespace efl { namespace network {
-EAPI void register_base(v8::Handle global, v8::Isolate* isolate);
-EAPI void register_server(v8::Handle global, v8::Isolate* isolate);
-EAPI void register_connector(v8::Handle global, v8::Isolate* 
isolate);
-EAPI void register_client(v8::Handle global, v8::Isolate* isolate);
-EAPI void register_url(v8::Handle global, v8::Isolate* isolate);
-}}
-
 EAPI void register_ecore_audio(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_ecore_audio_in(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_ecore_audio_in_sndfile(v8::Handle global, 
v8::Isolate* isolate);
@@ -164,11 +156,7 @@ EAPI void register_elm_pan(v8::Handle global, 
v8::Isolate* isolate);
 
 namespace elm {
 
-EAPI void register_access(v8::Handle global, v8::Isolate* isolate);
-EAPI void register_actionslider(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_bg(v8::Handle global, v8::Isolate* isolate);
-EAPI void register_box(v8::Handle global, v8::Isolate* isolate);
-EAPI void register_bubble(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_button(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_calendar(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_check(v8::Handle global, v8::Isolate* isolate);
@@ -178,27 +166,18 @@ EAPI void register_conformant(v8::Handle 
global, v8::Isolate* isolat
 EAPI void register_container(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_combobox(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_ctxpopup(v8::Handle global, v8::Isolate* 
isolate);
-EAPI void register_datetime(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_dayselector(v8::Handle global, v8::Isolate* 
isolate);
-EAPI void register_diskselector(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_entry(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_fileselector(v8::Handle global, v8::Isolate* 
isolate);
-EAPI void register_fileselector_button(v8::Handle global, 
v8::Isolate* isolate);
-EAPI void register_fileselector_entry(v8::Handle global, 
v8::Isolate* isolate);
 EAPI void register_flip(v8::Handle global, v8::Isolate* isolate);
-EAPI void register_flipselector(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_gengrid(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_gengrid_pan(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_genlist(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_genlist_pan(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_gesture_layer(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_glview(v8::Handle global, v8::Isolate* isolate);
-EAPI void register_grid(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_hover(v8::Handle global, v8::Isolate* isolate);
-EAPI void register_hoversel(v8::Handle global, v8::Isolate* 
isolate);
-EAPI void register_icon(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_index(v8::Handle global, v8::Isolate* isolate);
-EAPI void register_inwin(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_label(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_layout(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_list(v8::Handle global, v8::Isolate* isolate);
@@ -206,29 +185,21 @@ EAPI void register_map(v8::Handle global, 
v8::Isolate* isolate);
 EAPI void register_map_pan(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_menu(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_multibuttonentry(v8::Handle global, 
v8::Isolate* isolate);
-EAPI void register_naviframe(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_notify(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_panel(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_panes(v8::Handle global, v8::Isolate* isolate);
-EAPI void register_photo(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_photocam(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_photocam_pan(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_player(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_plug(v8::Handle global

[EGIT] [core/efl] master 04/08: js: Raise exception to js instead of crashing

2017-02-22 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit 26f62542250d026269522787a61f807e5e4a1d8a
Author: Lauro Moura 
Date:   Wed Dec 7 18:00:36 2016 -0300

js: Raise exception to js instead of crashing
---
 src/bindings/js/eina_js/eina_js_compatibility.hh   |  2 +-
 .../js/eina_js/eina_js_get_value_from_c.hh | 63 --
 2 files changed, 48 insertions(+), 17 deletions(-)

diff --git a/src/bindings/js/eina_js/eina_js_compatibility.hh 
b/src/bindings/js/eina_js/eina_js_compatibility.hh
index 37a9457..a568995 100644
--- a/src/bindings/js/eina_js/eina_js_compatibility.hh
+++ b/src/bindings/js/eina_js/eina_js_compatibility.hh
@@ -890,7 +890,7 @@ inline v8::Handle 
get_class_constructor(std::string const& class_n
 {
   auto it = constructors_map_.find(class_name);
   if (it == constructors_map_.end())
-throw std::runtime_error("Class not found");
+throw std::runtime_error("Class not found: " + class_name);
   return it->second;
 }
 
diff --git a/src/bindings/js/eina_js/eina_js_get_value_from_c.hh 
b/src/bindings/js/eina_js/eina_js_get_value_from_c.hh
index 7e6499b..581c69c 100644
--- a/src/bindings/js/eina_js/eina_js_get_value_from_c.hh
+++ b/src/bindings/js/eina_js/eina_js_get_value_from_c.hh
@@ -142,34 +142,65 @@ get_value_from_c(T object, v8::Isolate* isolate, const 
char* class_name
 inline v8::Local
 get_value_from_c(Eo* v, v8::Isolate* isolate, const char* class_name)
 {
-  auto ctor = ::efl::eina::js::get_class_constructor(class_name);
-  auto obj = new_v8_external_instance(ctor, ::efl_ref(v), isolate);
-  efl::eina::js::make_weak(isolate, obj, [v]{ ::efl_unref(v); });
-  return obj;
+  try
+{
+   auto ctor = ::efl::eina::js::get_class_constructor(class_name);
+   auto obj = new_v8_external_instance(ctor, ::efl_ref(v), isolate);
+   efl::eina::js::make_weak(isolate, obj, [v]{ ::efl_unref(v); });
+   return obj;
+}
+  catch (std::runtime_error const& error)
+{
+   eina::js::compatibility_throw
+(isolate, v8::Exception::TypeError
+ (eina::js::compatibility_new(isolate, error.what(;
+  return v8::Null(isolate);
+}
 }
 
 inline v8::Local
 get_value_from_c(const Eo* v, v8::Isolate* isolate, const char* class_name)
 {
   // TODO: implement const objects?
-  auto ctor = ::efl::eina::js::get_class_constructor(class_name);
-  auto obj = new_v8_external_instance(ctor, ::efl_ref(v), isolate);
-  efl::eina::js::make_weak(isolate, obj, [v]{ ::efl_unref(v); });
-  return obj;
+  try
+{
+   auto ctor = ::efl::eina::js::get_class_constructor(class_name);
+   auto obj = new_v8_external_instance(ctor, ::efl_ref(v), isolate);
+   efl::eina::js::make_weak(isolate, obj, [v]{ ::efl_unref(v); });
+   return obj;
+}
+  catch (std::runtime_error const& error)
+{
+   eina::js::compatibility_throw
+(isolate, v8::Exception::TypeError
+ (eina::js::compatibility_new(isolate, error.what(;
+  return v8::Null(isolate);
+}
 }
 
 template 
 inline v8::Local
 get_value_from_c(struct_ptr_tag v, v8::Isolate* isolate, const char* 
class_name)
 {
-  using nonconst_type = typename std::remove_const::type;
-  bool own = false; // TODO: handle ownership
-  auto ptr = const_cast(v.value);
-  auto ctor = ::efl::eina::js::get_class_constructor(class_name);
-  auto obj = new_v8_external_instance(ctor, ptr, isolate);
-  if (own)
-efl::eina::js::make_weak(isolate, obj, [ptr]{ free(ptr); });
-  return obj;
+  try
+{
+   using nonconst_type = typename std::remove_const::type;
+   bool own = false; // TODO: handle ownership
+   auto ptr = const_cast(v.value);
+   auto ctor = ::efl::eina::js::get_class_constructor(class_name);
+   auto obj = new_v8_external_instance(ctor, ptr, isolate);
+   if (own)
+  efl::eina::js::make_weak(isolate, obj, [ptr]{ free(ptr); });
+   return obj;
+}
+  catch (std::runtime_error const& error)
+{
+   eina::js::compatibility_throw
+(isolate, v8::Exception::TypeError
+ (eina::js::compatibility_new(isolate, error.what(;
+  return v8::Null(isolate);
+}
+
 }
 
 template 

-- 




[EGIT] [core/efl] master 03/08: eolian_js: Avoid errors when getting function scope

2017-02-22 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit add91ee80e0ba7814ea266a46d5b2a59ac15e6d1
Author: Lauro Moura 
Date:   Mon Feb 13 19:24:53 2017 -0300

eolian_js: Avoid errors when getting function scope
---
 src/bin/eolian_js/main.cc | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/bin/eolian_js/main.cc b/src/bin/eolian_js/main.cc
index db5fa16..a9b5de4 100644
--- a/src/bin/eolian_js/main.cc
+++ b/src/bin/eolian_js/main.cc
@@ -355,6 +355,16 @@ _function_is_generatable(const Eolian_Function *function, 
Eolian_Function_Type f
return rtp ? _type_is_generatable(rtp, false) : true;
 }
 
+bool
+_function_is_public(const Eolian_Function *function, Eolian_Function_Type t)
+{
+if (t == EOLIAN_PROPERTY)
+return _function_is_public(function, EOLIAN_PROP_GET) || 
_function_is_public(function, EOLIAN_PROP_SET);
+else
+return eolian_function_scope_get(function, t) == EOLIAN_SCOPE_PUBLIC;
+}
+
+
 void separate_functions(Eolian_Class const* klass, Eolian_Function_Type t, 
bool ignore_constructors,
 std::vector& 
constructor_functions,
 std::vector& normal_functions)
@@ -364,7 +374,7 @@ void separate_functions(Eolian_Class const* klass, 
Eolian_Function_Type t, bool
for(; first != last; ++first)
  {
 Eolian_Function const* function = &*first;
-if(eolian_function_scope_get(function, t) == EOLIAN_SCOPE_PUBLIC)
+if (_function_is_public(function, t))
   {
  EINA_CXX_DOM_LOG_WARN(eolian::js::domain) << 
::eolian_function_full_c_name_get(function, t, EINA_FALSE);
  if(strcmp("elm_obj_entry_input_panel_imdata_get", 
::eolian_function_full_c_name_get(function, t, EINA_FALSE)) != 0 &&

-- 




[EGIT] [core/efl] master 07/08: efl_js: Export efl.Loop

2017-02-22 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit 52d26818696b54287cc0a77ab92f367713d16060
Author: Lauro Moura 
Date:   Thu Feb 16 18:22:13 2017 -0300

efl_js: Export efl.Loop
---
 src/bindings/js/efl_js/efl_js.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bindings/js/efl_js/efl_js.cc b/src/bindings/js/efl_js/efl_js.cc
index f1be231..bd85703 100644
--- a/src/bindings/js/efl_js/efl_js.cc
+++ b/src/bindings/js/efl_js/efl_js.cc
@@ -70,6 +70,7 @@ EAPI void register_container(v8::Handle global, 
v8::Isolate* isolate
 EAPI void register_control(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_file(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_image(v8::Handle global, v8::Isolate* isolate);
+EAPI void register_loop(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_orientation(v8::Handle global, v8::Isolate* 
isolate);
 EAPI void register_player(v8::Handle global, v8::Isolate* isolate);
 EAPI void register_text(v8::Handle global, v8::Isolate* isolate);
@@ -274,6 +275,7 @@ EAPI void init(v8::Handle exports)
 efl::register_file(exports, v8::Isolate::GetCurrent());
 efl::register_image(exports, v8::Isolate::GetCurrent());
 efl::register_orientation(exports, v8::Isolate::GetCurrent());
+efl::register_loop(exports, v8::Isolate::GetCurrent());
 efl::register_player(exports, v8::Isolate::GetCurrent());
 efl::register_text(exports, v8::Isolate::GetCurrent());
 // efl::register_text_properties(exports, v8::Isolate::GetCurrent());

-- 




[EGIT] [core/enlightenment] master 01/01: e_askpass: fix a typo

2017-02-22 Thread Michael Bouchaud
yoz pushed a commit to branch master.

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

commit f13d9dc8cd5bf65bcb1b19313e24767838c4
Author: Michael Bouchaud 
Date:   Wed Feb 22 22:54:53 2017 +0100

e_askpass: fix a typo
---
 src/bin/e_askpass_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/e_askpass_main.c b/src/bin/e_askpass_main.c
index a5d6095..c9382ff 100644
--- a/src/bin/e_askpass_main.c
+++ b/src/bin/e_askpass_main.c
@@ -64,7 +64,7 @@ elm_main(int argc, char **argv)
elm_app_info_set(elm_main, "enlightenment", "AUTHORS");
 
{
-  win = elm_win_util_standard_add("main", askpass ? TITLE_PWD : TITLE_PWD);
+  win = elm_win_util_standard_add("main", askpass ? TITLE_PWD : 
TITLE_USER);
   elm_win_autodel_set(win, EINA_TRUE);
   {
  bx = elm_box_add(win);

-- 




[EGIT] [core/efl] master 06/08: efl_js: Use efl_add_ref for saner refcount.

2017-02-22 Thread Lauro Moura
felipealmeida pushed a commit to branch master.

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

commit 659edb609abc91ca111cef4c2ac926dc83580417
Author: Lauro Moura 
Date:   Thu Feb 16 18:21:08 2017 -0300

efl_js: Use efl_add_ref for saner refcount.

efl_add was messing up the refcount in objects with parents on the JS
side.
---
 src/bindings/js/eo_js/eo_js_constructor.hh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bindings/js/eo_js/eo_js_constructor.hh 
b/src/bindings/js/eo_js/eo_js_constructor.hh
index e0c0f2f..202ff56 100644
--- a/src/bindings/js/eo_js/eo_js_constructor.hh
+++ b/src/bindings/js/eo_js/eo_js_constructor.hh
@@ -106,7 +106,7 @@ struct constructor_caller
   {
 Eo* parent = eina::js::get_value_from_javascript
   (args[0], args.GetIsolate(), "", eina::js::value_tag());
-Eo* eo = efl_add
+Eo* eo = efl_add_ref
   (klass
, parent
, eina::_mpl::for_each(constructors, call{efl_added, 
¤t_index, &args})

-- 




[EGIT] [website/www-content] master 01/01: Wiki page knob_example changed with summary [] by Jean Rene Dawin

2017-02-22 Thread Jean Rene Dawin
WWW-www.enlightenment.org pushed a commit to branch master.

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

commit f3f1d1e5f7bd61188e72f2f9c193d8a2f2e1d51b
Author: Jean Rene Dawin 
Date:   Wed Feb 22 14:44:08 2017 -0800

Wiki page knob_example changed with summary [] by Jean Rene Dawin
---
 pages/themes/knob_example.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pages/themes/knob_example.txt b/pages/themes/knob_example.txt
index 4af10bd..1076989 100644
--- a/pages/themes/knob_example.txt
+++ b/pages/themes/knob_example.txt
@@ -1,5 +1,5 @@
 ~~Title: A knob theme for the Elementary slider widget~~
 
- Elementary slider behaving like a knob 
+ Make an Elementary slider behave like a knob 
 
-Here is an example for an edje theme for a knob-like behaviour of an 
elementary slider widget.
+Here is an example for an edje theme which makes an Elementary slider widget 
look and behave like a knob. It will look like this: 

-- 




[EGIT] [website/www-content] master 01/01: Wiki media themes:edje-knob.png uploaded by Jean Rene Dawin

2017-02-22 Thread Jean Rene Dawin
WWW-www.enlightenment.org pushed a commit to branch master.

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

commit 2f6a2892e1565095f7c8041d4b8ff6c1534a
Author: Jean Rene Dawin 
Date:   Wed Feb 22 14:45:38 2017 -0800

Wiki media themes:edje-knob.png uploaded by Jean Rene Dawin
---
 media/themes/edje-knob.png | Bin 0 -> 2290 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/media/themes/edje-knob.png b/media/themes/edje-knob.png
new file mode 100644
index 000..f97fa94
Binary files /dev/null and b/media/themes/edje-knob.png differ

-- 




[EGIT] [website/www-content] master 01/01: Wiki page knob_example changed with summary [] by Jean Rene Dawin

2017-02-22 Thread Jean Rene Dawin
WWW-www.enlightenment.org pushed a commit to branch master.

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

commit 89c6cd81bd949cabef8dc179aa546003133e3cfb
Author: Jean Rene Dawin 
Date:   Wed Feb 22 14:54:27 2017 -0800

Wiki page knob_example changed with summary [] by Jean Rene Dawin
---
 pages/themes/knob_example.txt | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pages/themes/knob_example.txt b/pages/themes/knob_example.txt
index 1076989..6a46ce0 100644
--- a/pages/themes/knob_example.txt
+++ b/pages/themes/knob_example.txt
@@ -2,4 +2,8 @@
 
  Make an Elementary slider behave like a knob 
 
-Here is an example for an edje theme which makes an Elementary slider widget 
look and behave like a knob. It will look like this: 
+Here is an example for an edje theme which makes an Elementary slider widget 
look and behave like a knob.
+
+It will look like this {{:themes:edje-knob.png?nolink}} and works by 
displaying one of 60 images, depending on how much you drag the knob (up and 
down). Each of the images corresponds to a different rotation of the knob.
+
+The edc file for this theme will be described below.

-- 




[EGIT] [website/www-content] master 01/01: Wiki page knob_example changed with summary [] by Jean Rene Dawin

2017-02-22 Thread Jean Rene Dawin
WWW-www.enlightenment.org pushed a commit to branch master.

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

commit 7d7457ff92ad7690ef2c310127d80549372fb70b
Author: Jean Rene Dawin 
Date:   Wed Feb 22 15:20:10 2017 -0800

Wiki page knob_example changed with summary [] by Jean Rene Dawin
---
 pages/themes/knob_example.txt | 103 +-
 1 file changed, 102 insertions(+), 1 deletion(-)

diff --git a/pages/themes/knob_example.txt b/pages/themes/knob_example.txt
index 6a46ce0..b7ed9f6 100644
--- a/pages/themes/knob_example.txt
+++ b/pages/themes/knob_example.txt
@@ -6,4 +6,105 @@ Here is an example for an edje theme which makes an 
Elementary slider widget loo
 
 It will look like this {{:themes:edje-knob.png?nolink}} and works by 
displaying one of 60 images, depending on how much you drag the knob (up and 
down). Each of the images corresponds to a different rotation of the knob.
 
-The edc file for this theme will be described below.
+The important parts of the edc file for this theme will be described below.
+In the ''group'' block we define the name we will later use to load the theme 
from within a C program.
+
+collections{
+   group{
+   name: "elm/slider/horizontal/knob";
+   alias: "elm/slider/horizontal/default";
+   min: 64 64;
+
+Next we list the ''images'' we will be using
+
+   images{
+   image: ".png" COMP;
+   image: "0001.png" COMP;
+   image: "0002.png" COMP
+
+//Similar for 0003.png to 0059.png.
+ 
+   image: "0060.png" COMP;
+   image: "knobbg.png" COMP;
+   }
+
+The ''script'' block contains global variables and functions. The function 
''update_knob_state'' is used to load new images when the knob is turned. The 
variables are used to store the state of the knob.
+
+script{ 
+   public knob_pos;
+   public knob_ref;
+   public knob_last;
+   public knob_move;
+   public signal_from_dragger;
+
+
+   public update_knob_state(Float:frac){
+
+new px, py, pw, ph;
+get_geometry(PART:"knob", px, py, pw, ph);
+   new Float:step = ph/60;
+   if(frac > ph) { set_state(PART:"knob", 
"60", 0.0); return;} 
+   if(frac <= 0) { set_state(PART:"knob", 
"default", 0.0); return;}
+   if(frac < step)   { set_state(PART:"knob", "1", 
0.0); return;}
+   if(frac < 2*step) { set_state(PART:"knob", "2", 
0.0); return;}
+
+//Similar "if" statments for frac < 3*step to 
59*step.
+ 
+   if(frac < 60*step) { set_state(PART:"knob", 
"60", 0.0); return;}
+
+   }
+
+   public reset_dragger(){
+   set_drag(PART:"dragger", 0.0, 0.0);
+   set_int(signal_from_dragger, 0);
+   }
+   }
+
+The ''parts'' block contains the functional parts of the knob.
+These are mostly geometric objects that may be moveable and/or visible.
+They may also emit signals which will be important in the ''programs'' block 
below.
+
+   parts{
+   part{
+   name: "knobbase";
+   scale: 1;
+   description{
+   state: "default" 0.0;
+   min: 64 64;
+   image.normal: "knobbg.png";
+   }
+   }
+
+Each part has a one or more descriptions, which represent states of the part. 
+Here each state is associated with one image (position) of the knob.
+
+   part{
+   name: "knob";
+   mouse_events: 0;
+   scale: 1;
+   description{
+   state: "default" 0.0;
+   min: 64 64;
+   rel.to: "knobbase";
+   image.normal: ".png";
+   }
+   description{ 
+   state: "1" 0.0;
+   inherit: "default" 0.0;
+   image.normal: "0001.png";
+   }
+   description{ 
+   state: "2" 0.0;
+

[EGIT] [core/enlightenment] master 03/03: e_client_volume: check volume setted after a slider drag

2017-02-22 Thread Michael Bouchaud
yoz pushed a commit to branch master.

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

commit cb6ea9f747be869612fe7915f5380d9300cc5d83
Author: Michael Bouchaud 
Date:   Thu Feb 23 00:36:17 2017 +0100

e_client_volume: check volume setted after a slider drag
---
 src/bin/e_client_volume.c  | 15 +++
 src/modules/mixer/e_mod_main.c | 33 +
 2 files changed, 48 insertions(+)

diff --git a/src/bin/e_client_volume.c b/src/bin/e_client_volume.c
index 3c41765..187da94 100644
--- a/src/bin/e_client_volume.c
+++ b/src/bin/e_client_volume.c
@@ -11,6 +11,7 @@ static void _e_client_volume_event_simple_free(void *d, 
E_Event_Client *ev);
 static void _e_client_volume_event_simple(E_Client *ec, int type);
 static void _e_client_volume_object_mouse_down_cb(void *data, Evas *e, 
Evas_Object *obj, void *event_info);
 static void _e_client_volume_object_volume_changed(void *data, Evas_Object 
*obj, void *event_info);
+static void _e_client_volume_object_volume_drag_stop(void *data, Evas_Object 
*obj, void *event_info);
 static Eina_Bool _e_client_volume_object_changed(void *data, int type, void 
*event);
 static void _e_client_volume_object_del_cb(void *data, Evas *evas, Evas_Object 
*obj, void *event_info);
 
@@ -77,6 +78,16 @@ _e_client_volume_object_volume_changed(void *data, 
Evas_Object *obj, void *event
e_client_volume_set(ec, elm_slider_value_get(obj));
 }
 
+static void
+_e_client_volume_object_volume_drag_stop(void *data, Evas_Object *obj, void 
*event_info EINA_UNUSED)
+{
+   E_Client *ec;
+
+   ec = data;
+
+   e_client_volume_set(ec, elm_slider_value_get(obj));
+}
+
 static Eina_Bool
 _e_client_volume_object_changed(void *data, int type EINA_UNUSED, void *event)
 {
@@ -353,6 +364,7 @@ e_client_volume_set(E_Client *ec, int volume)
 e_client_volume_sink_set(sink, ec->volume, ec->mute);
  }
 
+   _e_client_volume_update(ec);
_e_client_volume_event_simple(ec, E_EVENT_CLIENT_VOLUME);
 }
 
@@ -423,6 +435,9 @@ e_client_volume_object_add(E_Client *ec, Evas *evas)
 evas_object_smart_callback_add(o, "changed",
_e_client_volume_object_volume_changed,
ec);
+evas_object_smart_callback_add(o, "slider,drag,stop",
+   
_e_client_volume_object_volume_drag_stop,
+   ec);
 elm_slider_value_set(o, ec->volume);
 edje_object_part_swallow(bx, "e.swallow.volume", o);
 evas_object_show(o);
diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index d10bfb6..ac805cc 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -1050,6 +1050,17 @@ _bd_hook_volume_changed(void *data, Evas_Object *obj, 
void *event_info EINA_UNUS
 }
 
 static void
+_bd_hook_volume_drag_stop(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
+{
+   E_Client *ec;
+
+   ec = data;
+
+   elm_slider_value_set(obj, ec->volume);
+}
+
+
+static void
 _bd_hook_mute_changed(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
 {
E_Client *ec;
@@ -1075,6 +1086,24 @@ _bd_hook_sink_volume_changed(void *data, Evas_Object 
*obj, void *event_info EINA
 }
 
 static void
+_bd_hook_sink_volume_drag_stop(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
+{
+   E_Client_Volume_Sink *sink;
+   Evas_Object *check;
+   Eina_Bool mute;
+   int vol;
+
+   sink = data;
+
+   check = evas_object_data_get(obj, "e_sink_check");
+
+   e_client_volume_sink_get(sink, &vol, &mute);
+   elm_slider_value_set(obj, vol);
+   elm_check_state_set(check, mute);
+}
+
+
+static void
 _bd_hook_sink_mute_changed(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
 {
E_Client_Volume_Sink *sink;
@@ -1187,6 +1216,8 @@ _e_client_mixer_sink_append(E_Client_Volume_Sink *sink, 
Client_Mixer *cm)
elm_slider_value_set(slider, volume);
evas_object_smart_callback_add(slider, "changed",
   _bd_hook_sink_volume_changed, sink);
+   evas_object_smart_callback_add(slider, "slider,drag,stop",
+  _bd_hook_sink_volume_drag_stop, sink);
elm_box_pack_end(cm->bx, slider);
evas_object_show(slider);
 
@@ -1379,6 +1410,8 @@ _bd_hook_cb(void *data, E_Menu *m EINA_UNUSED, 
E_Menu_Item *it EINA_UNUSED)
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_slider_value_set(o, ec->volume);
evas_object_smart_callback_add(o, "changed", _bd_hook_volume_changed, ec);
+   evas_object_smart_callback_add(o, "slider,drag,stop",
+  _bd_hook_volume_drag_stop, ec);
elm_box_pack_end(bx, o);
evas_object_show(o);
cm->volume = o;

-- 




[EGIT] [core/enlightenment] master 02/03: Revert "mixer: do not set back the value from emix once the drag is finished"

2017-02-22 Thread yoz
yoz pushed a commit to branch master.

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

commit fba185798cf75eaeaba4a95d2be25fb2fea6ef1a
Author: Michaël Bouchaud (yoz) 
Date:   Mon Oct 31 14:36:23 2016 +0100

Revert "mixer: do not set back the value from emix once the drag is 
finished"

This reverts commit 8724313b8e4c9799c5d20b876d5aaa9e5341d519.
---
 src/modules/mixer/e_mod_main.c | 11 +++
 src/modules/mixer/emixer.c | 13 +
 2 files changed, 24 insertions(+)

diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index 42fc20b..d10bfb6 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -481,6 +481,16 @@ _slider_changed_cb(void *data EINA_UNUSED, Evas_Object 
*obj,
 }
 
 static void
+_slider_drag_stop_cb(void *data EINA_UNUSED, Evas_Object *obj,
+ void *event EINA_UNUSED)
+{
+   EINA_SAFETY_ON_NULL_RETURN(mixer_context->sink_default);
+   Emix_Sink *s = (Emix_Sink *)mixer_context->sink_default;
+   int val = s->volume.volumes[0];
+   elm_slider_value_set(obj, val);
+}
+
+static void
 _sink_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
Emix_Sink *s = data;
@@ -544,6 +554,7 @@ _popup_new(Instance *inst)
evas_object_show(slider);
elm_slider_min_max_set(slider, 0.0, emix_max_volume_get());
evas_object_smart_callback_add(slider, "changed", _slider_changed_cb, NULL);
+   evas_object_smart_callback_add(slider, "slider,drag,stop", 
_slider_drag_stop_cb, NULL);
elm_slider_value_set(slider, volume);
elm_box_pack_end(bx, slider);
evas_object_show(slider);
diff --git a/src/modules/mixer/emixer.c b/src/modules/mixer/emixer.c
index 1bcd96c..5cde881 100644
--- a/src/modules/mixer/emixer.c
+++ b/src/modules/mixer/emixer.c
@@ -49,6 +49,17 @@ _cb_sink_volume_change(void *data,
 }
 
 static void
+_cb_sink_volume_drag_stop(void *data,
+  Evas_Object *obj,
+  void *event EINA_UNUSED)
+{
+   Evas_Object *bxv = data;
+   Emix_Sink *sink = evas_object_data_get(bxv, "sink");
+   int vol = sink->volume.volumes[0];
+   elm_slider_value_set(obj, vol);
+}
+
+static void
 _cb_sink_mute_change(void *data,
  Evas_Object *obj,
  void *event_info EINA_UNUSED)
@@ -123,6 +134,8 @@ _emix_sink_add(Emix_Sink *sink)
elm_box_pack_end(bx, sl);
evas_object_show(sl);
evas_object_smart_callback_add(sl, "changed", _cb_sink_volume_change, bxv);
+   evas_object_smart_callback_add(sl, "slider,drag,stop",
+  _cb_sink_volume_drag_stop, bxv);
 
ck = elm_check_add(win);
evas_object_data_set(bxv, "mute", ck);

-- 




[EGIT] [core/enlightenment] master 01/03: mixer: use VOLSET macro in volume output set

2017-02-22 Thread yoz
yoz pushed a commit to branch master.

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

commit dbdf411b488fd4d3f37a26d8cb142b25aba784d6
Author: Michaël Bouchaud (yoz) 
Date:   Mon Oct 31 14:36:13 2016 +0100

mixer: use VOLSET macro in volume output set
---
 src/modules/mixer/e_mod_main.c | 15 +--
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index 18a8a5f..42fc20b 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -470,27 +470,14 @@ _slider_changed_cb(void *data EINA_UNUSED, Evas_Object 
*obj,
void *event EINA_UNUSED)
 {
int val;
-   Emix_Volume v;
-   unsigned int i;
-   int pval;
 
EINA_SAFETY_ON_NULL_RETURN(mixer_context->sink_default);
Emix_Sink *s = (Emix_Sink *)mixer_context->sink_default;
 
-   pval = s->volume.volumes[0];
-
val = (int)elm_slider_value_get(obj);
-   v.volumes = calloc(s->volume.channel_count, sizeof(int));
-   v.channel_count = s->volume.channel_count;
-   if (BARRIER_CHECK(pval, val))
- val = 100;
-
-   for (i = 0; i < s->volume.channel_count; i++) v.volumes[i] = val;
-   emix_sink_volume_set(s, v);
-   elm_slider_value_set(obj, val);
+   VOLSET(val, s->volume, s, emix_sink_volume_set);
emix_config_save_state_get();
if (emix_config_save_get()) e_config_save_queue();
-   free(v.volumes);
 }
 
 static void

-- 




[EGIT] [website/www-content] master 01/01: Wiki page knob_example changed with summary [] by Jean Rene Dawin

2017-02-22 Thread Jean Rene Dawin
WWW-www.enlightenment.org pushed a commit to branch master.

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

commit b6fb55ca6e88b3b70e1e8fecbe0e9e25febc8063
Author: Jean Rene Dawin 
Date:   Wed Feb 22 15:40:19 2017 -0800

Wiki page knob_example changed with summary [] by Jean Rene Dawin
---
 pages/themes/knob_example.txt | 144 ++
 1 file changed, 144 insertions(+)

diff --git a/pages/themes/knob_example.txt b/pages/themes/knob_example.txt
index b7ed9f6..4a5577b 100644
--- a/pages/themes/knob_example.txt
+++ b/pages/themes/knob_example.txt
@@ -107,4 +107,148 @@ Here each state is associated with one image (position) 
of the knob.
image.normal: "0060.png";
}
}
+
+The following ''part'' is needed so we can set the value of the knob from the 
C source via elm_slider_value_set.
+
+   part{
+   //The real slider for elm_slider
+   name: "elm.dragable.slider";
+   scale: 1;
+   dragable.x: 1 1 0;
+   dragable.y: 1 1 0;
+   type: RECT;
+   description{
+   state: "default" 0.0;
+   visible: 0;
+   }
+   dragable{
+   x: 1 1 0;
+   y: 1 1 0;
+   }
+   }
+
+This ''part'' named "dragger" is the actually draggable part of the slider.
+It's invisible but will measure how much the knob has been turned (or dragged).
+
+   part{ 
+   name: "dragger";
+   type: RECT;
+   description{
+   state: "default" 0.0;
+   rel1.to: "knob";
+   rel2.to: "knob";
+   color: 0 0 0 0;
+   }
+   description{
+   state: "hoki" 0.0;
+   rel1.to: "knob";
+   rel2.to: "knob";
+   color: 0 0 0 0;
+   }
+   dragable{
+   x: 0 0 0;
+   y: 1 1 0;
+   }
+   }
+   }
+
+Now the ''parts'' block is finished and we continue with the ''programs'' 
block which contains small scripts which control the behaviour of our knob. The 
programs are called when a certain signal
+from a certain source is received. Signals can be emitted from inside this edje
+or from outside (C source).
+
+   programs{
+
+The script part of the ''program'' named "on_drag_move" runs when the
+signal "drag" from source "dragger" (the part defined above) is received.
+
+   program{
+   name: "on_drag_move";
+   signal: "drag";
+   source: "dragger";
+   script{
+   new Float:p1;
+   new Float:p2;
+
+//The drag value is subtracted from 
the last knob position
+//because a drag upwards yields 
negative values.
+
+   get_drag(PART:"dragger", p1, p2);
+   set_float(knob_pos, 
get_float(knob_last) - p2);
+   
+   new px, py, pw, ph;
+   get_geometry(PART:"knob", px, py, pw, 
ph);
+   if(get_float(knob_pos) > ph) 
set_float(knob_pos, ph);
+   if(get_float(knob_pos) < 0) 
set_float(knob_pos, 0);
+   
+   update_knob_state(get_float(knob_pos));
+   new Float:sl_val = 
get_float(knob_pos)/ph;
+
+   set_int(signal_from_dragger, 1);
+   set_drag(PART:"elm.dragable.slider", 
sl_val , sl_val);
+   }
+   }
+
+The variable "signal_from_dragger" is used as a guard to distinguish if calls 
of set_drag for "elm.dragable.slider" are made from within the edje theme (then 
it is 1), ore

[EGIT] [website/www-content] master 01/01: Wiki page knob_example changed with summary [] by Jean Rene Dawin

2017-02-22 Thread Jean Rene Dawin
WWW-www.enlightenment.org pushed a commit to branch master.

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

commit f775d385720db48474ac590ccfc05d342b327603
Author: Jean Rene Dawin 
Date:   Wed Feb 22 15:41:58 2017 -0800

Wiki page knob_example changed with summary [] by Jean Rene Dawin
---
 pages/themes/knob_example.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pages/themes/knob_example.txt b/pages/themes/knob_example.txt
index 4a5577b..2e4a465 100644
--- a/pages/themes/knob_example.txt
+++ b/pages/themes/knob_example.txt
@@ -1,6 +1,6 @@
-~~Title: A knob theme for the Elementary slider widget~~
+~~Title: A knob theme for the Elementary slider widget (work in progress)~~
 
- Make an Elementary slider behave like a knob 
+ Make an Elementary slider behave like a knob =(work in progress)===
 
 Here is an example for an edje theme which makes an Elementary slider widget 
look and behave like a knob.
 

-- 




[EGIT] [website/www-content] master 01/01: Wiki page knob_example changed with summary [] by Jean Rene Dawin

2017-02-22 Thread Jean Rene Dawin
WWW-www.enlightenment.org pushed a commit to branch master.

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

commit 24520928baa0f4f7cdae127ed3d48f4754d0e284
Author: Jean Rene Dawin 
Date:   Wed Feb 22 15:42:47 2017 -0800

Wiki page knob_example changed with summary [] by Jean Rene Dawin
---
 pages/themes/knob_example.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pages/themes/knob_example.txt b/pages/themes/knob_example.txt
index 2e4a465..ed69ad5 100644
--- a/pages/themes/knob_example.txt
+++ b/pages/themes/knob_example.txt
@@ -1,6 +1,6 @@
 ~~Title: A knob theme for the Elementary slider widget (work in progress)~~
 
- Make an Elementary slider behave like a knob =(work in progress)===
+ Make an Elementary slider behave like a knob (work in progress)
 
 Here is an example for an edje theme which makes an Elementary slider widget 
look and behave like a knob.
 

-- 




[EGIT] [core/enlightenment] master 01/01: e_client_volume: Don't set client volume to max after a mute.

2017-02-22 Thread Michael Bouchaud
yoz pushed a commit to branch master.

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

commit 2e043e825d1c22de3be0beddd5db43753fde984e
Author: Michael Bouchaud 
Date:   Thu Feb 23 00:51:33 2017 +0100

e_client_volume: Don't set client volume to max after a mute.

Don't set client volume to max after a mute and unmute. Just check if the
volume is within the available limits.
---
 src/bin/e_client_volume.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_client_volume.c b/src/bin/e_client_volume.c
index 187da94..1963648 100644
--- a/src/bin/e_client_volume.c
+++ b/src/bin/e_client_volume.c
@@ -264,8 +264,15 @@ _e_client_volume_update(E_Client *ec)
  {
 ec->volume_min = volume_min;
 ec->volume_max = volume_max;
-if (count > 0) ec->volume = volume / count;
-else ec->volume = volume_max;
+if (count == 0)
+  {
+ if (ec->volume < volume_min)
+   ec->volume = volume_min;
+ if (ec->volume > volume_max)
+   ec->volume = volume_max;
+  }
+else
+  ec->volume = volume / count;
 ec->mute = mute;
 ec->volume_control_enabled = EINA_TRUE;
  }

-- 




[EGIT] [core/efl] master 01/01: emotion XXX - make nv12 709 streams work even with slightly off colors

2017-02-22 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 7d4e417ea8d850abd1a2ac42ee03446cb6766937
Author: Carsten Haitzler (Rasterman) 
Date:   Thu Feb 23 11:43:43 2017 +0900

emotion XXX - make nv12 709 streams work even with slightly off colors

ther eis no 709 nv12 support support in evas but there is 601, so use
that for now until we add the feature of 709 nv12 support.
---
 src/modules/emotion/gstreamer1/emotion_convert.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/modules/emotion/gstreamer1/emotion_convert.c 
b/src/modules/emotion/gstreamer1/emotion_convert.c
index db83477..e92b8c4 100644
--- a/src/modules/emotion/gstreamer1/emotion_convert.c
+++ b/src/modules/emotion/gstreamer1/emotion_convert.c
@@ -162,6 +162,17 @@ const ColorSpace_Format_Convertion 
colorspace_format_convertion[] = {
  EVAS_COLORSPACE_YCBCR422601_PL, _evas_video_yuy2, EINA_FALSE },
   { "NV12", GST_VIDEO_FORMAT_NV12, GST_VIDEO_COLOR_MATRIX_BT601,
  EVAS_COLORSPACE_YCBCR420NV12601_PL, _evas_video_nv12, EINA_TRUE },
+   // XXX:
+   // XXX: need to add nv12 709 colorspace support to evas itself.
+   // XXX: this makes gst streams work when they are nv12 709 but maybe
+   // XXX: will display in slightly off color.. but in the end this needs
+   // XXX: fixing to display correctly.
+   // XXX:
+  { "NV12-709", GST_VIDEO_FORMAT_NV12, GST_VIDEO_COLOR_MATRIX_BT709,
+ EVAS_COLORSPACE_YCBCR420NV12601_PL, _evas_video_nv12, EINA_TRUE },
+   // XXX:
+   // XXX:
+   // XXX:
 
   { "BGR", GST_VIDEO_FORMAT_BGR, GST_VIDEO_COLOR_MATRIX_UNKNOWN,
  EVAS_COLORSPACE_ARGB, _evas_video_bgr, EINA_FALSE },

-- 




Re: [E-devel] ABI report between 1.18 and 1.19 beta1

2017-02-22 Thread Jean-Philippe André
Hi,

@cedric,

On 15 February 2017 at 20:04, Stefan Schmidt  wrote:

> Hello.
>
> On 14/02/17 16:11, Stefan Schmidt wrote:
> > Hello.
> >
> > Taking over the ABI reports from Tom you can now find the latest report
> > here:
> > https://devs.enlightenment.org/~stefan/compat_reports/
> efl/1.18.0_to_1.19.0/compat_report.html
>
> Removed APIs:
>
> elm_pan.eo.legacy.h, libelementary.so.1.18.0
> elm_pan_gravity_get ( Elm_Pan const* obj, double* x, double* y )
> elm_pan_gravity_set ( Elm_Pan* obj, double x, double y )
>

I'll have a look at those.


> evas_out.eo.legacy.h, libevas.so.1.18.0
> evas_output_engine_info_get ( Evas_Out const* obj )
> evas_output_engine_info_set ( Evas_Out* obj, Evas_Engine_Info* info )
> evas_output_view_get ( Evas_Out const* obj, Evas_Coord* x, Evas_Coord*
> y, Evas_Coord* w, Evas_Coord* h )
> evas_output_view_set ( Evas_Out* obj, Evas_Coord x, Evas_Coord y,
> Evas_Coord w, Evas_Coord h )
>

Cedric, I guess those functions were added by accident in EFL 1.18?
We probably need to restore the symbols nonetheless...

-- 
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] efl-1.18 01/01: elementary gengrid: fix for working item reorder mode correctly

2017-02-22 Thread Minkyu Kang
ami pushed a commit to branch efl-1.18.

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

commit d48d326f852c7fee6ce200a4161d721db790c21a
Author: Minkyu Kang 
Date:   Tue Feb 21 15:02:30 2017 +0530

elementary gengrid: fix for working item reorder mode correctly

Summary:
Change the item indexing to start 1 after reordering animation.
Change the logic of edge checking to get the row or col correctly.

Signed-off-by: Minkyu Kang 

Test Plan:
elementary_test -to gengrid2
append 6 items
enable the reorder mode
check reordering is working properly (4 to 1)

@fix

Reviewers: singh.amitesh, cedric

Subscribers: jehun.lim, jpeg

Differential Revision: https://phab.enlightenment.org/D4676
---
 src/lib/elementary/elm_gengrid.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 84cca83..df6c3d2 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -2542,7 +2542,7 @@ _elm_gengrid_item_edge_check(Elm_Object_Item *eo_it,
   {
  row = cvh / sd->item_height;
  if (row <= 0) row = 1;
- col = tmp->position / row;
+ col = (tmp->position - 1) / row;
  if (col == 0)
return EINA_TRUE;
   }
@@ -2550,7 +2550,7 @@ _elm_gengrid_item_edge_check(Elm_Object_Item *eo_it,
   {
  col = cvw / sd->item_width;
  if (col <= 0) col = 1;
- row = tmp->position / col;
+ row = (tmp->position - 1) / col;
  if (row == 0)
return EINA_TRUE;
   }
@@ -2788,7 +2788,7 @@ _anim_end(Elm_Gengrid_Data *sd)
  
EINA_INLIST_GET(sd->reorder.it2));
   }
  }
-   _item_position_update(sd->items, 0);
+   _item_position_update(sd->items, 1);
 
ecore_job_del(sd->calc_job);
sd->calc_job = ecore_job_add(_calc_job, sd->obj);

-- 




Re: [E-devel] ABI report between 1.18 and 1.19 beta1

2017-02-22 Thread Cedric BAIL
On Wed, Feb 22, 2017 at 10:07 PM, Jean-Philippe André  wrote:
> Hi,
>
> @cedric,
>
> On 15 February 2017 at 20:04, Stefan Schmidt  wrote:
>>
>> Hello.
>>
>> On 14/02/17 16:11, Stefan Schmidt wrote:
>> > Hello.
>> >
>> > Taking over the ABI reports from Tom you can now find the latest report
>> > here:
>> >
>> > https://devs.enlightenment.org/~stefan/compat_reports/efl/1.18.0_to_1.19.0/compat_report.html
>>
>> Removed APIs:
>>
>> elm_pan.eo.legacy.h, libelementary.so.1.18.0
>> elm_pan_gravity_get ( Elm_Pan const* obj, double* x, double* y )
>> elm_pan_gravity_set ( Elm_Pan* obj, double x, double y )
>
>
> I'll have a look at those.
>
>>
>> evas_out.eo.legacy.h, libevas.so.1.18.0
>> evas_output_engine_info_get ( Evas_Out const* obj )
>> evas_output_engine_info_set ( Evas_Out* obj, Evas_Engine_Info* info )
>> evas_output_view_get ( Evas_Out const* obj, Evas_Coord* x, Evas_Coord*
>> y, Evas_Coord* w, Evas_Coord* h )
>> evas_output_view_set ( Evas_Out* obj, Evas_Coord x, Evas_Coord y,
>> Evas_Coord w, Evas_Coord h )
>
> Cedric, I guess those functions were added by accident in EFL 1.18?
> We probably need to restore the symbols nonetheless...

Hum, there was no code behind this symbol not sure why they leaked out
of there eo file. I don't think it is a real life problem to have them
gone.
-- 
Cedric BAIL

--
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: elm: Restore ABI compatibility (elm_pan_gravity)

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

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

commit bc31a47fd9b8138b09c45ade703ab0f3736a54dd
Author: Jean-Philippe Andre 
Date:   Thu Feb 23 15:32:17 2017 +0900

elm: Restore ABI compatibility (elm_pan_gravity)

elm_pan_gravity_{set,get} are functions that were generated as
legacy APIs (in other words EAPI), but were never actually exposed
to applications as they were protected behind EFL_EO_API_SUPPORT
(see elm_interfaces.h).

This patch restores the ABI compatibility with elementary 1.18.
---
 src/lib/elementary/elm_interface_scrollable.c | 8 
 src/lib/elementary/elm_interface_scrollable.h | 5 +
 2 files changed, 13 insertions(+)

diff --git a/src/lib/elementary/elm_interface_scrollable.c 
b/src/lib/elementary/elm_interface_scrollable.c
index e931279..d880814 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -4554,5 +4554,13 @@ _elm_interface_scrollable_class_constructor(Efl_Class 
*klass)
evas_smart_legacy_type_register(MY_SCROLLABLE_INTERFACE_NAME_LEGACY, klass);
 }
 
+/* Legacy ABI compatibility - APIs never worked and were hidden behind
+ * EFL_EO_API_SUPPORT (from elm_interface.h) or inside internal headers.
+ * Removed between 1.18 and 1.19. The symbols are kept purely for ABI
+ * compatibility reasons.
+ */
+EAPI void elm_pan_gravity_set(Elm_Pan *obj EINA_UNUSED, double x EINA_UNUSED, 
double y EINA_UNUSED) {}
+EAPI void elm_pan_gravity_get(const Elm_Pan *obj EINA_UNUSED, double *x 
EINA_UNUSED, double *y EINA_UNUSED) {}
+
 #include "elm_interface_scrollable.eo.c"
 #include "elm_pan.eo.c"
diff --git a/src/lib/elementary/elm_interface_scrollable.h 
b/src/lib/elementary/elm_interface_scrollable.h
index 001fb3a..624c921 100644
--- a/src/lib/elementary/elm_interface_scrollable.h
+++ b/src/lib/elementary/elm_interface_scrollable.h
@@ -248,6 +248,11 @@ struct _Elm_Scrollable_Smart_Interface_Data
return __VA_ARGS__;   \
 }
 
+#if defined(EFL_EO_API_SUPPORT) && defined(EFL_BETA_API_SUPPORT)
+EAPI void elm_pan_gravity_set(Elm_Pan *, double x, double) EINA_DEPRECATED;
+EAPI void elm_pan_gravity_get(const Elm_Pan *, double *, double *) 
EINA_DEPRECATED;
+#endif
+
 /**
  * @}
  */

-- 




Re: [E-devel] ABI report between 1.18 and 1.19 beta1

2017-02-22 Thread Jean-Philippe André
On 23 February 2017 at 15:42, Cedric BAIL  wrote:

> On Wed, Feb 22, 2017 at 10:07 PM, Jean-Philippe André 
> wrote:
> > Hi,
> >
> > @cedric,
> >
> > On 15 February 2017 at 20:04, Stefan Schmidt 
> wrote:
> >>
> >> Hello.
> >>
> >> On 14/02/17 16:11, Stefan Schmidt wrote:
> >> > Hello.
> >> >
> >> > Taking over the ABI reports from Tom you can now find the latest
> report
> >> > here:
> >> >
> >> > https://devs.enlightenment.org/~stefan/compat_reports/
> efl/1.18.0_to_1.19.0/compat_report.html
> >>
> >> Removed APIs:
> >>
> >> elm_pan.eo.legacy.h, libelementary.so.1.18.0
> >> elm_pan_gravity_get ( Elm_Pan const* obj, double* x, double* y )
> >> elm_pan_gravity_set ( Elm_Pan* obj, double x, double y )
> >
> >
> > I'll have a look at those.
> >
> >>
> >> evas_out.eo.legacy.h, libevas.so.1.18.0
> >> evas_output_engine_info_get ( Evas_Out const* obj )
> >> evas_output_engine_info_set ( Evas_Out* obj, Evas_Engine_Info* info )
> >> evas_output_view_get ( Evas_Out const* obj, Evas_Coord* x, Evas_Coord*
> >> y, Evas_Coord* w, Evas_Coord* h )
> >> evas_output_view_set ( Evas_Out* obj, Evas_Coord x, Evas_Coord y,
> >> Evas_Coord w, Evas_Coord h )
> >
> > Cedric, I guess those functions were added by accident in EFL 1.18?
> > We probably need to restore the symbols nonetheless...
>
> Hum, there was no code behind this symbol not sure why they leaked out
> of there eo file. I don't think it is a real life problem to have them
> gone.
>

Yeah... Kind of the same applies to elm_pan. elm_pan generated legacy EAPI
but those were behind EFL_EO_API_SUPPORT.
I've just pushed a patch to "fix" this ABI break... not sure it's required
either.

-- 
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 Navigator for EFL

2017-02-22 Thread Jean-Philippe André
Hi Andrey,

On 22 February 2017 at 17:50, Andrey Ponomarenko <
andrewponomare...@yandex.ru> wrote:

> Hello,
>
> I'd like to present a new project called "ABI Navigator" for searching
> binary symbols (functions, global data, etc.) in EFL and other open-source
> libraries: https://abi-laboratory.pro/index.php?view=navigator
>
> The project allows to find out in which versions of the library some
> symbol is defined, added, removed or changed. The data is taken from the
> ABI Tracker project: https://abi-laboratory.pro/tracker/timeline/efl/
>
> Example for symbol _eo_do_end from libeo.so: https://abi-laboratory.pro/
> index.php?view=navigator&symbol=_eo_do_end#result
>
> The project aims to help library users and maintainers to resolve issues
> with missed symbols and navigate through the reports in the ABI Tracker.
>
> Have you ever encountered the "undefined reference" error or want to know
> whether the symbol is _stable_ enough to import in your code? Try to find
> it in the ABI Navigator!
>

This is very cool!
We already check our ABI compatibility before releasing new versions of
EFL, using the same abi check tool that your navigator is based on. But
clearly the tool you provide is a lot more convenient to use. Here's all we
have now:
https://devs.enlightenment.org/~stefan/compat_reports/efl/1.18.0_to_1.19.0/compat_report.html

Do you plan on running the ABI check every time we release a new tarball,
including betas (like you apparently did this time)?

Thanks anyway,

-- 
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