[EGIT] [core/efl] master 03/03: els_tooltip: Fix to use some functions before tooltip_test_set or tooltip_content_cb_set

2017-09-19 Thread Jeonghyun Yun
jpeg pushed a commit to branch master.

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

commit cc691776f31f09e3012272c5bb02579efaaf1dc7
Author: Jeonghyun Yun <jh0506@samsung.com>
Date:   Tue Sep 19 17:05:15 2017 +0900

els_tooltip: Fix to use some functions before tooltip_test_set or 
tooltip_content_cb_set

Summary:
If user call tooltip_orient_set or tooltip_style_set or 
tooltip_window_mode_set
before tooltip_test_set or tooltip_content_cb_set, those functions doesn't 
work.
Because elm_tooltip will be created when tooltip_content_cb_set is called.
I fixed logic to use some functions before tooltip_test_set or 
tooltip_content_cb_set.

Test Plan: elementary_test -> Popups -> Tooltip

Reviewers: jpeg, Jaehyun

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5183
---
 src/bin/elementary/test_tooltip.c |  8 ++---
 src/lib/elementary/els_tooltip.c  | 69 +++
 2 files changed, 53 insertions(+), 24 deletions(-)

diff --git a/src/bin/elementary/test_tooltip.c 
b/src/bin/elementary/test_tooltip.c
index b93ffcc2a6..eb4ce890c1 100644
--- a/src/bin/elementary/test_tooltip.c
+++ b/src/bin/elementary/test_tooltip.c
@@ -231,8 +231,8 @@ _tt_orient_text_replace(void *data   EINA_UNUSED,
  {
   case ELM_TOOLTIP_ORIENT_TOP_LEFT:
 {
-   elm_object_tooltip_text_set(obj, "Top Left");
elm_object_tooltip_orient_set(obj, ELM_TOOLTIP_ORIENT_TOP_LEFT);
+   elm_object_tooltip_text_set(obj, "Top Left");
printf("elm_object_tooltip_orient_get :: Orientation: 
ELM_TOOLTIP_ORIENT_TOP_LEFT\n");
break;
 }
@@ -526,8 +526,8 @@ test_tooltip(void *data   EINA_UNUSED,
 
bt = elm_button_add(win);
elm_object_text_set(bt, "Orient Tooltip, click to change");
-   elm_object_tooltip_text_set(bt, "Top Left");
elm_object_tooltip_orient_set(bt, ELM_TOOLTIP_ORIENT_TOP_LEFT);
+   elm_object_tooltip_text_set(bt, "Top Left");
evas_object_smart_callback_add(bt, "clicked", _tt_orient_text_replace, 
NULL);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
@@ -572,8 +572,8 @@ test_tooltip(void *data   EINA_UNUSED,
 
bt = elm_button_add(win);
elm_object_text_set(bt, "Transparent Icon tooltip");
-   elm_object_tooltip_content_cb_set(bt, _tt_icon, NULL, NULL);
elm_object_tooltip_style_set(bt, "transparent");
+   elm_object_tooltip_content_cb_set(bt, _tt_icon, NULL, NULL);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
 
@@ -611,8 +611,8 @@ test_tooltip(void *data   EINA_UNUSED,
 
lst = elm_list_add(win);
lit = elm_list_item_append(lst, "Hello", NULL, NULL, NULL, NULL);
-   elm_object_item_tooltip_content_cb_set(lit, _tt_item_label, NULL, NULL);
elm_object_item_tooltip_window_mode_set(lit, EINA_TRUE);
+   elm_object_item_tooltip_content_cb_set(lit, _tt_item_label, NULL, NULL);
lit = elm_list_item_append(lst, "Icon Tooltip", NULL, NULL, NULL, NULL);
elm_object_item_tooltip_content_cb_set(lit, _tt_item_icon, NULL, NULL);
lit = elm_list_item_append(lst, "Big Icon Tooltip", NULL, NULL, NULL, NULL);
diff --git a/src/lib/elementary/els_tooltip.c b/src/lib/elementary/els_tooltip.c
index 16c1fe9ace..4865d7c9db 100644
--- a/src/lib/elementary/els_tooltip.c
+++ b/src/lib/elementary/els_tooltip.c
@@ -34,6 +34,23 @@ static const char _tooltip_key[] = "_elm_tooltip";
 }   \
   while (0)
 
+#define ELM_TOOLTIP_GET_OR_CREATE(tt, obj, ...) \
+  Elm_Tooltip *tt;  \
+  do\
+{   \
+   if (!(obj))  \
+ {  \
+CRI("Null pointer: " #obj);\
+return __VA_ARGS__; \
+ }  \
+   tt = evas_object_data_get((obj), _tooltip_key);  \
+   if (!tt) \
+ {  \
+tt = _elm_tooltip_create((obj)); \
+ }  \
+}   \
+  while (0)
+
 struct _Elm_Tooltip
 {
Elm_Tooltip_Content_Cb   func;
@@ -734,6 +751,28 @@ _elm_tooltip_obj_free_cb(void *data, Evas *e  EINA_UNUSED, 
Evas_Object *obj, voi
_elm_tooltip_unset(tt);
 }
 
+static Elm_Tooltip *
+_elm_tooltip_create(Evas_Object *eventarea)
+{
+   Elm_Tooltip *tt = NULL;
+
+   tt = ELM_NEW(Elm_Tooltip);
+   if (!tt) return NULL;
+
+   tt->eventarea = event

[EGIT] [core/efl] master 01/01: elm_scroller: focus_direction should not be called when scroller focusable and no focusable child

2017-08-10 Thread Jeonghyun Yun
woohyun pushed a commit to branch master.

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

commit c208e1b8bf27e79fe7af8a6106f2776df6563e71
Author: Jeonghyun Yun <jh0506@samsung.com>
Date:   Fri Aug 11 13:55:22 2017 +0900

elm_scroller: focus_direction should not be called when scroller focusable 
and no focusable child

Summary:
when scroller can have focus and scroller's child can't have focus,
there is a problem that scroller is always selected to next focus object.
In this case, it should not enter into 
_elm_scroller_elm_widget_focus_direction()

Reviewers: woohyun

Subscribers: cedric, jpeg

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

diff --git a/src/lib/elementary/elm_scroller.c 
b/src/lib/elementary/elm_scroller.c
index d0593b55ed..417d84e4aa 100644
--- a/src/lib/elementary/elm_scroller.c
+++ b/src/lib/elementary/elm_scroller.c
@@ -487,8 +487,11 @@ _elm_scroller_elm_widget_focus_next(Eo *obj EINA_UNUSED, 
Elm_Scroller_Data *sd,
 }
 
 EOLIAN static Eina_Bool
-_elm_scroller_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, 
Elm_Scroller_Data *_pd EINA_UNUSED)
+_elm_scroller_elm_widget_focus_direction_manager_is(Eo *obj, Elm_Scroller_Data 
*_pd EINA_UNUSED)
 {
+   if (!elm_widget_child_can_focus_get(obj))
+ return EINA_FALSE;
+
return EINA_TRUE;
 }
 

-- 




[EGIT] [core/efl] master 14/14: elm_ctxpopup: Implemented elm_widget_item_part_content_unset for elm_ctxpopup_item

2017-08-09 Thread JEONGHYUN YUN
jpeg pushed a commit to branch master.

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

commit 8546ff727f9ee60ac0a662611d606e0d608e8c3d
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Thu Aug 10 14:13:51 2017 +0900

elm_ctxpopup: Implemented elm_widget_item_part_content_unset for 
elm_ctxpopup_item

Summary:
ctxpopup item have elm_list item internally.
item_part_content_unset need to pass on content part to elm_list item.

Test Plan:
1. launch elementary_test - ctxpopup
2. click Ctxpopup with part text & content function
3. press "Icon Set" and press "Icon Unset"

Reviewers: jpeg, woohyun, herb, Blackmole

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5018
---
 src/bin/elementary/test_ctxpopup.c  | 65 +
 src/lib/elementary/elc_ctxpopup.c   | 25 +
 src/lib/elementary/elm_ctxpopup_item.eo |  1 +
 3 files changed, 91 insertions(+)

diff --git a/src/bin/elementary/test_ctxpopup.c 
b/src/bin/elementary/test_ctxpopup.c
index 9fc3de3d39..8fc85f8f5d 100644
--- a/src/bin/elementary/test_ctxpopup.c
+++ b/src/bin/elementary/test_ctxpopup.c
@@ -374,6 +374,69 @@ _list_item_cb8(void *data EINA_UNUSED, Evas_Object *obj, 
void *event_info EINA_U
 }
 
 static void
+_ctxpopup_item_select_cb(void *data, Evas_Object *obj, void *event_info)
+{
+   const char *text = NULL;
+   Evas_Object *icon = NULL;
+   Elm_Object_Item *it = (Elm_Object_Item *)data;
+
+   text = elm_object_item_part_text_get((Elm_Object_Item *)event_info, 
"default");
+
+   if (!strcmp(text, "Text NULL"))
+ {
+elm_object_item_part_text_set(it, "default", NULL);
+ }
+   else if (!strcmp(text, "Text Set"))
+ {
+elm_object_item_part_text_set(it, "default", "Save file");
+ }
+   else if (!strcmp(text, "Icon NULL"))
+ {
+elm_object_item_part_content_set(it, "icon", NULL);
+ }
+   else if (!strcmp(text, "Icon Set"))
+ {
+icon = elm_icon_add(obj);
+elm_icon_standard_set(icon, "file");
+elm_image_resizable_set(icon, EINA_FALSE, EINA_FALSE);
+
+elm_object_item_part_content_set(it, "icon", icon);
+ }
+   else
+ {
+icon = elm_object_item_part_content_unset(it, "icon");
+if (icon) evas_object_del(icon);
+ }
+}
+
+static void
+_list_item_cb9(void *data EINA_UNUSED, Evas_Object *obj, void *event_info 
EINA_UNUSED)
+{
+   Evas_Object *ctxpopup;
+   Elm_Object_Item *it = NULL;
+   Evas_Coord x,y;
+
+   if (list_mouse_down > 0) return;
+
+   ctxpopup = elm_ctxpopup_add(obj);
+   evas_object_smart_callback_add(ctxpopup, "dismissed", _dismissed, NULL);
+   evas_object_smart_callback_add(ctxpopup, "geometry,update", 
_geometry_update, NULL);
+
+   it = elm_ctxpopup_item_append(ctxpopup, NULL, NULL, _ctxpopup_item_cb, 
NULL);
+   elm_ctxpopup_item_append(ctxpopup, "Text NULL", NULL, 
_ctxpopup_item_select_cb, it);
+   elm_ctxpopup_item_append(ctxpopup, "Text Set", NULL, 
_ctxpopup_item_select_cb, it);
+   elm_ctxpopup_item_append(ctxpopup, "Icon NULL", NULL, 
_ctxpopup_item_select_cb, it);
+   elm_ctxpopup_item_append(ctxpopup, "Icon Set", NULL, 
_ctxpopup_item_select_cb, it);
+   elm_ctxpopup_item_append(ctxpopup, "Icon Unset", NULL, 
_ctxpopup_item_select_cb, it);
+
+   evas_pointer_canvas_xy_get(evas_object_evas_get(obj), , );
+   evas_object_size_hint_max_set(ctxpopup, 240, 240);
+   evas_object_move(ctxpopup, x, y);
+   evas_object_show(ctxpopup);
+   _print_current_dir(ctxpopup);
+}
+
+static void
 _list_clicked(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info)
 {
elm_list_item_selected_set(event_info, EINA_FALSE);
@@ -432,6 +495,8 @@ test_ctxpopup(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_
 _list_item_cb7, NULL);
elm_list_item_append(list, "Ctxpopup with auto hide disabled mode", NULL, 
NULL,
 _list_item_cb8, NULL);
+   elm_list_item_append(list, "Ctxpopup with part text & content function", 
NULL, NULL,
+_list_item_cb9, NULL);
evas_object_show(list);
elm_list_go(list);
 
diff --git a/src/lib/elementary/elc_ctxpopup.c 
b/src/lib/elementary/elc_ctxpopup.c
index ecf418fdb2..f2010b515f 100644
--- a/src/lib/elementary/elc_ctxpopup.c
+++ b/src/lib/elementary/elc_ctxpopup.c
@@ -899,6 +899,31 @@ _elm_ctxpopup_item_elm_widget_item_part_content_get(Eo 
*eo_ctxpopup_it EINA_UNUS
  return elm_object_item_part_content_get(ctxpopup_it->list_item, "start");
 }
 
+EOLIAN static Evas_Object *
+_elm_ctxpopup_item_elm_widget_item_part_content_unset(Eo *eo_ctxpopup_it 
EINA_UNUSED,
+  

[EGIT] [core/efl] master 13/14: elm_ctxpopup: Add APIs to insert before/after item to a ctxpopup object.

2017-08-09 Thread JEONGHYUN YUN
jpeg pushed a commit to branch master.

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

commit bf0b3e0b75f5c6ebc5cb96211b3b21235422e358
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Thu Aug 10 14:12:08 2017 +0900

elm_ctxpopup: Add APIs to insert before/after item to a ctxpopup object.

Summary:
There were only 2 APIs (item_append, item_prepend) for ctxpopup item add.
Added more item add APIs (item_insert_before and item_insert_after) for 
convenience.

Test Plan:
1. launch elementary_test - ctxpopup
2. click Ctxpopup with callback function sample
3. check whether there are 3 items on ctxpopup

Reviewers: woohyun, Jaehyun, jpeg, cedric

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5004
---
 src/bin/elementary/test_ctxpopup.c |  7 ++---
 src/lib/elementary/elc_ctxpopup.c  | 52 ++
 src/lib/elementary/elm_ctxpopup.eo | 35 -
 3 files changed, 90 insertions(+), 4 deletions(-)

diff --git a/src/bin/elementary/test_ctxpopup.c 
b/src/bin/elementary/test_ctxpopup.c
index 6be16a50f1..9fc3de3d39 100644
--- a/src/bin/elementary/test_ctxpopup.c
+++ b/src/bin/elementary/test_ctxpopup.c
@@ -327,15 +327,16 @@ _list_item_cb7(void *data EINA_UNUSED, Evas_Object *obj, 
void *event_info EINA_U
 {
Evas_Object *ctxpopup;
Evas_Coord x,y;
+   Elm_Object_Item *item;
 
if (list_mouse_down > 0) return;
ctxpopup = elm_ctxpopup_add(obj);
evas_object_smart_callback_add(ctxpopup, "dismissed", _dismissed, NULL);
evas_object_smart_callback_add(ctxpopup, "geometry,update", 
_geometry_update, NULL);
 
-   elm_ctxpopup_item_append(ctxpopup, "Disable this item", NULL, 
_ctxpopup_item_disable_cb, ctxpopup);
-   elm_ctxpopup_item_append(ctxpopup, "Delete this ctxpopup", NULL, 
_ctxpopup_item_delete_cb, ctxpopup);
-   elm_ctxpopup_item_append(ctxpopup, "Another item", NULL, _ctxpopup_item_cb, 
NULL);
+   item = elm_ctxpopup_item_prepend(ctxpopup, "Disable this item", NULL, 
_ctxpopup_item_disable_cb, ctxpopup);
+   elm_ctxpopup_item_insert_before(ctxpopup, item, "Delete this ctxpopup", 
NULL, _ctxpopup_item_delete_cb, ctxpopup);
+   elm_ctxpopup_item_insert_after(ctxpopup, item, "Another item", NULL, 
_ctxpopup_item_cb, NULL);
 
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), , );
evas_object_size_hint_max_set(ctxpopup, 240, 240);
diff --git a/src/lib/elementary/elc_ctxpopup.c 
b/src/lib/elementary/elc_ctxpopup.c
index 9b42539d6b..ecf418fdb2 100644
--- a/src/lib/elementary/elc_ctxpopup.c
+++ b/src/lib/elementary/elc_ctxpopup.c
@@ -1326,6 +1326,58 @@ _elm_ctxpopup_item_efl_object_constructor(Eo *obj, 
Elm_Ctxpopup_Item_Data *it)
 }
 
 EOLIAN static Elm_Object_Item*
+_elm_ctxpopup_item_insert_before(Eo *obj, Elm_Ctxpopup_Data *sd, 
Elm_Object_Item *eo_before, const char *label, Evas_Object *icon, Evas_Smart_Cb 
func, const void *data)
+{
+   Eo *eo_item;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(eo_before, NULL);
+   ELM_CTXPOPUP_ITEM_DATA_GET(eo_before, before_it);
+   ELM_CTXPOPUP_ITEM_CHECK_OR_RETURN(before_it,  NULL);
+
+   if (!before_it->list_item) return NULL;
+
+   eo_item = efl_add(ELM_CTXPOPUP_ITEM_CLASS, obj, 
elm_obj_ctxpopup_item_init(efl_added, func, data));
+   if (!eo_item) return NULL;
+
+   ELM_CTXPOPUP_ITEM_DATA_GET(eo_item, item);
+
+   item->list_item =
+ elm_list_item_insert_before(sd->list, before_it->list_item, label, icon, 
NULL, _item_wrap_cb, item);
+   efl_ref(item->list_item);
+   sd->items = eina_list_prepend_relative(sd->items, eo_item, eo_before);
+
+   if (sd->visible) elm_layout_sizing_eval(obj);
+
+   return eo_item;
+}
+
+EOLIAN static Elm_Object_Item*
+_elm_ctxpopup_item_insert_after(Eo *obj, Elm_Ctxpopup_Data *sd, 
Elm_Object_Item *eo_after, const char *label, Evas_Object *icon, Evas_Smart_Cb 
func, const void *data)
+{
+   Eo *eo_item;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(eo_after, NULL);
+   ELM_CTXPOPUP_ITEM_DATA_GET(eo_after, after_it);
+   ELM_CTXPOPUP_ITEM_CHECK_OR_RETURN(after_it,  NULL);
+
+   if (!after_it->list_item) return NULL;
+
+   eo_item = efl_add(ELM_CTXPOPUP_ITEM_CLASS, obj, 
elm_obj_ctxpopup_item_init(efl_added, func, data));
+   if (!eo_item) return NULL;
+
+   ELM_CTXPOPUP_ITEM_DATA_GET(eo_item, item);
+
+   item->list_item =
+ elm_list_item_insert_after(sd->list, after_it->list_item, label, icon, 
NULL, _item_wrap_cb, item);
+   efl_ref(item->list_item);
+   sd->items = eina_list_append_relative(sd->items, eo_item, eo_after);
+
+   if (sd->visible) elm_layout_sizing_eval(obj);
+
+   return eo_item;
+}
+
+EOLIAN static Elm_Object_Item*
 _elm_ctxpopup_item_append(Eo *obj, Elm_Ctxpopup_Data *sd, const char *label, 
Evas_Object *icon, Evas_Smart_Cb func, const void *data)
 {
 

[EGIT] [core/efl] master 03/07: edje_edit: add NULL check for eina_mempool_malloc in _edje_edit_state_alloc()

2017-04-06 Thread JEONGHYUN YUN
cedric pushed a commit to branch master.

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

commit 5ed7378303c5f7ed3efeab307b57dcadfa00f7f5
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Thu Apr 6 14:23:19 2017 -0700

edje_edit: add NULL check for eina_mempool_malloc in 
_edje_edit_state_alloc()

Summary: Pointer eina_mempool_malloc return value may have NULL value when
module aren't properly installed. This reduce the chance of a crash and 
increase
the likelyness of properly handling the failure.

Reviewers: jpeg, jypark

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4763

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/edje/edje_edit.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index d2616fc..ac387b3 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -6307,31 +6307,36 @@ _edje_edit_state_alloc(int type, Edje *ed)
  {
   case EDJE_PART_TYPE_RECTANGLE:
 pd = eina_mempool_malloc(ce->mp->mp.RECTANGLE, sizeof 
(Edje_Part_Description_Common));
+if (!pd) return NULL;
 ce->count.RECTANGLE++;
 break;
 
   case EDJE_PART_TYPE_SPACER:
 pd = eina_mempool_malloc(ce->mp->mp.SPACER, sizeof 
(Edje_Part_Description_Common));
+if (!pd) return NULL;
 ce->count.SPACER++;
 break;
 
   case EDJE_PART_TYPE_SWALLOW:
 pd = eina_mempool_malloc(ce->mp->mp.SWALLOW, sizeof 
(Edje_Part_Description_Common));
+if (!pd) return NULL;
 ce->count.SWALLOW++;
 break;
 
   case EDJE_PART_TYPE_GROUP:
 pd = eina_mempool_malloc(ce->mp->mp.GROUP, sizeof 
(Edje_Part_Description_Common));
+if (!pd) return NULL;
 ce->count.GROUP++;
 break;
 
 #define EDIT_ALLOC_POOL(Short, Type, Name)\
 case EDJE_PART_TYPE_##Short:  \
 { \
-   Edje_Part_Description_##Type * Name;   \
+   Edje_Part_Description_##Type *Name = NULL; \
   \
Name = eina_mempool_malloc(ce->mp->mp.Short,   \
   sizeof (Edje_Part_Description_##Type)); \
+   if (!Name) return NULL;\
memset(Name, 0, sizeof(Edje_Part_Description_##Type)); \
pd = >common;\
ce->count.Short++; \

-- 




[EGIT] [core/efl] master 05/07: edje_program: add NULL check for ed->callbacks in edje_program

2017-04-06 Thread JEONGHYUN YUN
cedric pushed a commit to branch master.

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

commit 73c232e0312c350b8700ec632cb6c9fbb3619554
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Thu Apr 6 14:26:35 2017 -0700

edje_program: add NULL check for ed->callbacks in edje_program

Summary: Pointer ed->callbacks may have NULL value in callback add 
functions.

This reduce the chance of continue to kind of work for longer in case of 
memory
constrain. Maybe using Eina macro would be better.

Reviewers: jpeg, jypark

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4761

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/edje/edje_program.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index 25f8179..2889ed1 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -239,6 +239,7 @@ edje_object_propagate_callback_add(Evas_Object *obj, void 
(*func)(void *data, Ev
 
if (!ed->callbacks)
  ed->callbacks = _edje_signal_callback_alloc();
+   if (!ed->callbacks) return;
 
sig = eina_stringshare_add("*");
src = eina_stringshare_add("*");
@@ -266,6 +267,7 @@ _edje_object_signal_callback_add(Eo *obj EINA_UNUSED, Edje 
*ed, const char *emis
 
if (!ed->callbacks)
  ed->callbacks = _edje_signal_callback_alloc();
+   if (!ed->callbacks) return;
 
_edje_signal_callback_push(ed->callbacks,
   emission, source,

-- 




[EGIT] [core/efl] master 04/07: edje: fix name check matching correctly

2017-04-06 Thread JEONGHYUN YUN
cedric pushed a commit to branch master.

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

commit 5fe350d2f79823a8fc57fc827b4c3be249638a6d
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Thu Apr 6 14:24:45 2017 -0700

edje: fix name check matching correctly

Reviewers: jpeg, jypark

This could lead to a crash as we were checking against NULL on
the wrong pointer.

@fix

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4762

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/bin/edje/edje_cc_handlers.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index b93077e..91c08c2 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -4149,8 +4149,8 @@ _link_combine(void)
   if (fabs(ell->ed->state.value - el->ed->state.value) > 
DBL_EPSILON) continue;
   if ((!!ell->ed->state.name) != (!!el->ed->state.name))
 {
-  if (((!!ell->ed->state.name) && 
strcmp(el->ed->state.name, "default")) ||
- ((!!el->ed->state.name) && 
strcmp(ell->ed->state.name, "default")))
+  if (((!!ell->ed->state.name) && 
strcmp(ell->ed->state.name, "default")) ||
+ ((!!el->ed->state.name) && strcmp(el->ed->state.name, 
"default")))
continue;
 }
   else if (ell->ed->state.name && strcmp(ell->ed->state.name, 
el->ed->state.name))

-- 




[EGIT] [core/efl] master 02/02: multibuttonentry : fix box indicated item correctly in item_insert_before and item_insert_after

2017-03-08 Thread JEONGHYUN YUN
jpeg pushed a commit to branch master.

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

commit 3147066865907479d928d1e7958731d347589d85
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Thu Mar 9 16:11:33 2017 +0900

multibuttonentry : fix box indicated item correctly in item_insert_before 
and item_insert_after

Summary:
If user added item with item_insert_before and item_insert_after, item was 
not displayed.
For this reason, fixed box indicated item correctly from reference->button 
to VIEW(reference).
Additionally, remove the unused variable button in _Multibuttonentry_Item 
struct.

Reviewers: woohyun, CHAN, cedric, jpeg

Reviewed By: CHAN

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4708
---
 src/bin/elementary/test_multibuttonentry.c   | 6 +-
 src/lib/elementary/elc_multibuttonentry.c| 4 ++--
 src/lib/elementary/elm_widget_multibuttonentry.h | 1 -
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/bin/elementary/test_multibuttonentry.c 
b/src/bin/elementary/test_multibuttonentry.c
index e9738f3..cea77e8 100644
--- a/src/bin/elementary/test_multibuttonentry.c
+++ b/src/bin/elementary/test_multibuttonentry.c
@@ -184,6 +184,7 @@ _add_multibuttonentry(Evas_Object *parent)
Evas_Object *scr = NULL;
Evas_Object *mbe = NULL;
Evas_Object *btn = NULL;
+   Elm_Object_Item *item = NULL;
void *data = NULL;
 
scr = elm_scroller_add(parent);
@@ -197,7 +198,10 @@ _add_multibuttonentry(Evas_Object *parent)
evas_object_size_hint_weight_set(mbe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(mbe, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_content_set(scr, mbe);
-   elm_multibuttonentry_item_append(mbe, "mbe", _select_cb, NULL);
+   item = elm_multibuttonentry_item_append(mbe, "mbe3", _select_cb, NULL);
+   elm_multibuttonentry_item_prepend(mbe, "mbe1", _select_cb, NULL);
+   elm_multibuttonentry_item_insert_before(mbe, item, "mbe2", _select_cb, 
NULL);
+   elm_multibuttonentry_item_insert_after(mbe, item, "mbe4", _select_cb, NULL);
 
// Add item verify callback to Multibuttonentry
elm_multibuttonentry_item_filter_append(mbe, _item_filter_cb, data);
diff --git a/src/lib/elementary/elc_multibuttonentry.c 
b/src/lib/elementary/elc_multibuttonentry.c
index 729fa41..29a4c1e 100644
--- a/src/lib/elementary/elc_multibuttonentry.c
+++ b/src/lib/elementary/elc_multibuttonentry.c
@@ -891,7 +891,7 @@ _item_new(Elm_Multibuttonentry_Data *sd,
 else
   {
  if (efl_reference)
-   elm_box_pack_before(sd->box, VIEW(item), reference->button);
+   elm_box_pack_before(sd->box, VIEW(item), VIEW(reference));
  else
{
   if (sd->view_state == MULTIBUTTONENTRY_VIEW_GUIDETEXT)
@@ -919,7 +919,7 @@ _item_new(Elm_Multibuttonentry_Data *sd,
 else
   {
  if (efl_reference)
-   elm_box_pack_after(sd->box, VIEW(item), reference->button);
+   elm_box_pack_after(sd->box, VIEW(item), VIEW(reference));
  else
{
   if (sd->view_state == MULTIBUTTONENTRY_VIEW_GUIDETEXT)
diff --git a/src/lib/elementary/elm_widget_multibuttonentry.h 
b/src/lib/elementary/elm_widget_multibuttonentry.h
index d996a43..87b90d6 100644
--- a/src/lib/elementary/elm_widget_multibuttonentry.h
+++ b/src/lib/elementary/elm_widget_multibuttonentry.h
@@ -59,7 +59,6 @@ struct _Multibuttonentry_Item
 {
Elm_Widget_Item_Data *base;
 
-   Evas_Object  *button;
Evas_Coordvw, rw; // vw: visual width, real width
Eina_Bool visible : 1;
Evas_Smart_Cb func;

-- 




[EGIT] [core/efl] master 03/03: elm_panel: Add _scrollable_layout_resize internal funcion for refactoring

2017-01-05 Thread JEONGHYUN YUN
jpeg pushed a commit to branch master.

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

commit e998529f2e20ca70bf1ebc463473aedab153f84e
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Thu Jan 5 17:26:32 2017 +0900

elm_panel: Add _scrollable_layout_resize internal funcion for refactoring

Summary:
Remove duplicated code in _elm_panel_efl_gfx_size_set
and _elm_panel_scrollable_content_size_set.

Reviewers: jpeg, woohyun, eunue, jypark

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4553
---
 src/lib/elementary/elm_panel.c | 58 +-
 1 file changed, 23 insertions(+), 35 deletions(-)

diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c
index e8e0fd4..30e4773 100644
--- a/src/lib/elementary/elm_panel.c
+++ b/src/lib/elementary/elm_panel.c
@@ -1121,18 +1121,9 @@ _elm_panel_efl_gfx_position_set(Eo *obj, Elm_Panel_Data 
*sd, Evas_Coord x, Evas_
evas_object_move(sd->hit_rect, x, y);
 }
 
-EOLIAN static void
-_elm_panel_efl_gfx_size_set(Eo *obj, Elm_Panel_Data *sd, Evas_Coord w, 
Evas_Coord h)
+static void
+_scrollable_layout_resize(Eo *obj, Elm_Panel_Data *sd, Evas_Coord w, 
Evas_Coord h)
 {
-   if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, 
h))
- return;
-
-   efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
-
-   if (!sd->scrollable) return;
-
-   evas_object_resize(sd->hit_rect, w, h);
-
switch (sd->orient)
  {
   case ELM_PANEL_ORIENT_TOP:
@@ -1155,6 +1146,21 @@ _elm_panel_efl_gfx_size_set(Eo *obj, Elm_Panel_Data *sd, 
Evas_Coord w, Evas_Coor
 }
 
 EOLIAN static void
+_elm_panel_efl_gfx_size_set(Eo *obj, Elm_Panel_Data *sd, Evas_Coord w, 
Evas_Coord h)
+{
+   if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, 
h))
+ return;
+
+   efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+
+   if (!sd->scrollable) return;
+
+   evas_object_resize(sd->hit_rect, w, h);
+
+   _scrollable_layout_resize(obj, sd, w, h);
+}
+
+EOLIAN static void
 _elm_panel_efl_canvas_group_group_member_add(Eo *obj, Elm_Panel_Data *sd, 
Evas_Object *member)
 {
efl_canvas_group_member_add(efl_super(obj, MY_CLASS), member);
@@ -1420,30 +1426,12 @@ _elm_panel_scrollable_content_size_set(Eo *obj, 
Elm_Panel_Data *sd, double ratio
sd->content_size_ratio = ratio;
 
if (sd->scrollable)
-   {
-  Evas_Coord w, h;
-  evas_object_geometry_get(obj, NULL, NULL, , );
-
-  switch (sd->orient)
-{
- case ELM_PANEL_ORIENT_TOP:
- case ELM_PANEL_ORIENT_BOTTOM:
-// vertical
-evas_object_resize(sd->scr_ly, w, (1 + sd->content_size_ratio) * 
h);
-evas_object_size_hint_min_set(sd->scr_panel, w, 
(sd->content_size_ratio * h));
-evas_object_size_hint_min_set(sd->scr_event, w, h);
-break;
- case ELM_PANEL_ORIENT_LEFT:
- case ELM_PANEL_ORIENT_RIGHT:
-// horizontal
-evas_object_resize(sd->scr_ly, (1 + sd->content_size_ratio) * w, 
h);
-evas_object_size_hint_min_set(sd->scr_panel, 
(sd->content_size_ratio * w), h);
-evas_object_size_hint_min_set(sd->scr_event, w, h);
-break;
-}
-
-  elm_layout_sizing_eval(obj);
-   }
+ {
+Evas_Coord w, h;
+evas_object_geometry_get(obj, NULL, NULL, , );
+
+_scrollable_layout_resize(obj, sd, w, h);
+ }
 }
 
 EOLIAN static Eina_Bool

-- 




[EGIT] [core/efl] master 01/01: elm_panel: Add get function in scrollable_content_size property

2017-01-04 Thread JEONGHYUN YUN
jpeg pushed a commit to branch master.

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

commit 401488cea707ff48ce5e56ce656b5f6571f3b798
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Thu Jan 5 10:26:29 2017 +0900

elm_panel: Add get function in scrollable_content_size property

Summary:
Added get function for getting the size of the scrollable panel.
Additionally, added some exception handling code in 
scrollable_content_size_set

Reviewers: woohyun, eunue

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4549
---
 src/lib/elementary/elm_panel.c  | 55 +
 src/lib/elementary/elm_panel.eo |  6 +
 2 files changed, 40 insertions(+), 21 deletions(-)

diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c
index 1226b9c..e8e0fd4 100644
--- a/src/lib/elementary/elm_panel.c
+++ b/src/lib/elementary/elm_panel.c
@@ -1405,32 +1405,45 @@ _elm_panel_elm_widget_disable(Eo *obj, Elm_Panel_Data 
*sd)
return EINA_TRUE;
 }
 
+EOLIAN static double
+_elm_panel_scrollable_content_size_get(Eo *obj EINA_UNUSED, Elm_Panel_Data *sd)
+{
+   return sd->content_size_ratio;
+}
+
 EOLIAN static void
 _elm_panel_scrollable_content_size_set(Eo *obj, Elm_Panel_Data *sd, double 
ratio)
 {
-   Evas_Coord w, h;
-   sd->content_size_ratio = ratio;
-   evas_object_geometry_get(obj, NULL, NULL, , );
+   if (ratio < 0) ratio = 0;
+   else if (ratio > 1.0) ratio = 1.0;
 
-   switch (sd->orient)
- {
-  case ELM_PANEL_ORIENT_TOP:
-  case ELM_PANEL_ORIENT_BOTTOM:
- // vertical
- evas_object_resize(sd->scr_ly, w, (1 + sd->content_size_ratio) * h);
- evas_object_size_hint_min_set(sd->scr_panel, w, 
(sd->content_size_ratio * h));
- evas_object_size_hint_min_set(sd->scr_event, w, h);
- break;
-  case ELM_PANEL_ORIENT_LEFT:
-  case ELM_PANEL_ORIENT_RIGHT:
- // horizontal
- evas_object_resize(sd->scr_ly, (1 + sd->content_size_ratio) * w, h);
- evas_object_size_hint_min_set(sd->scr_panel, (sd->content_size_ratio 
* w), h);
- evas_object_size_hint_min_set(sd->scr_event, w, h);
- break;
- }
+   sd->content_size_ratio = ratio;
 
-   elm_layout_sizing_eval(obj);
+   if (sd->scrollable)
+   {
+  Evas_Coord w, h;
+  evas_object_geometry_get(obj, NULL, NULL, , );
+
+  switch (sd->orient)
+{
+ case ELM_PANEL_ORIENT_TOP:
+ case ELM_PANEL_ORIENT_BOTTOM:
+// vertical
+evas_object_resize(sd->scr_ly, w, (1 + sd->content_size_ratio) * 
h);
+evas_object_size_hint_min_set(sd->scr_panel, w, 
(sd->content_size_ratio * h));
+evas_object_size_hint_min_set(sd->scr_event, w, h);
+break;
+ case ELM_PANEL_ORIENT_LEFT:
+ case ELM_PANEL_ORIENT_RIGHT:
+// horizontal
+evas_object_resize(sd->scr_ly, (1 + sd->content_size_ratio) * w, 
h);
+evas_object_size_hint_min_set(sd->scr_panel, 
(sd->content_size_ratio * w), h);
+evas_object_size_hint_min_set(sd->scr_event, w, h);
+break;
+}
+
+  elm_layout_sizing_eval(obj);
+   }
 }
 
 EOLIAN static Eina_Bool
diff --git a/src/lib/elementary/elm_panel.eo b/src/lib/elementary/elm_panel.eo
index 090aebd..c7fe451 100644
--- a/src/lib/elementary/elm_panel.eo
+++ b/src/lib/elementary/elm_panel.eo
@@ -59,6 +59,12 @@ class Elm.Panel (Elm.Layout, Elm.Interface_Scrollable,
  set {
 [[Set the size of the scrollable panel.]]
  }
+ get {
+[[Get the size of the scrollable panel.
+
+  @since 1.19
+]]
+ }
  values {
 ratio: double; [[Size ratio]]
  }

-- 




[EGIT] [core/efl] master 01/01: elm_entry: Init cursor position when entry text set.

2016-12-08 Thread JEONGHYUN YUN
woohyun pushed a commit to branch master.

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

commit 8784ba97ad2adea5b3709e35c90da56ad9a6d702
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Fri Dec 9 11:33:26 2016 +0900

elm_entry: Init cursor position when entry text set.

Summary: Cursor position should be initialized because entry will be 
cleared when entry text set.

Reviewers: woohyun, id213sin

Reviewed By: id213sin

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4469
---
 src/lib/elementary/elm_entry.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 812b140..dd71ffc 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -3220,6 +3220,8 @@ _elm_entry_elm_layout_text_set(Eo *obj, Elm_Entry_Data 
*sd, const char *part, co
  }
 
/* Need to clear the entry first */
+   sd->cursor_pos = edje_object_part_text_cursor_pos_get
+   (sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN);
edje_object_part_text_set(sd->entry_edje, "elm.text", "");
_entry_text_append(obj, entry, EINA_TRUE);
 

-- 




[EGIT] [core/efl] master 02/03: elm/calendar: add APIs for minimum and maximum values for the date

2016-11-17 Thread JEONGHYUN YUN
cedric pushed a commit to branch master.

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

commit 3f76638b37ac8ebf715782512c3c36308cf70a62
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Thu Nov 17 16:39:42 2016 -0800

elm/calendar: add APIs for minimum and maximum values for the date

Summary:
elm_calendar already have minimum and maximum year set/get APIs.
I've added new APIs that exapanded from the year to the date.
These APIs help us not only set min/max month but also set min/max day.
If you set the minimum date, changing the displayed month or year if needed.
Displayed day also to be disabled if it is smaller than minimum date.

Reviewers: woohyun, Hermet, jpeg, CHAN, cedric

Reviewed By: CHAN, cedric

Subscribers: CHAN, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4226

Signed-off-by: Cedric Bail <ced...@osg.samsung.com>
---
 src/bin/elementary/test_calendar.c   |  22 ++-
 src/lib/elementary/elm_calendar.c| 251 +++
 src/lib/elementary/elm_calendar.eo   |  76 +++---
 src/lib/elementary/elm_calendar_legacy.h |  30 
 src/lib/elementary/elm_widget_calendar.h |   4 +-
 5 files changed, 319 insertions(+), 64 deletions(-)

diff --git a/src/bin/elementary/test_calendar.c 
b/src/bin/elementary/test_calendar.c
index 6f3eb56..35e1bf9 100644
--- a/src/bin/elementary/test_calendar.c
+++ b/src/bin/elementary/test_calendar.c
@@ -38,7 +38,6 @@ set_api_state(api_data *api)
{
   Evas_Object *cal = eina_list_nth(items, 0);
   time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 9); /* 
Set date to DEC 31, 2010 */
-  elm_calendar_min_max_year_set(cal, 2010, 2011);
   m = elm_calendar_mark_add(cal, "checked", gmtime(_time), 
ELM_CALENDAR_MONTHLY);
   elm_calendar_selected_time_set(cal, gmtime(_time));
}
@@ -143,7 +142,6 @@ test_calendar(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_
 
time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 9); /* Set date to 
DEC 31, 2010 */
elm_calendar_selected_time_set(cal, gmtime(_time));
-   elm_calendar_min_max_year_set(cal, 2010, 2012);
 
evas_object_show(cal);
 
@@ -155,25 +153,30 @@ _print_cal_info(Evas_Object *cal, Evas_Object *en)
 {
char info[1024];
double interval;
-   int year_min, year_max;
Eina_Bool sel_enabled;
const char **wds;
struct tm stm;
+   const struct tm *mintm, *maxtm;
 
if (!elm_calendar_selected_time_get(cal, ))
  return;
 
interval = elm_calendar_interval_get(cal);
-   elm_calendar_min_max_year_get(cal, _min, _max);
+   mintm = elm_calendar_date_min_get(cal);
+   maxtm = elm_calendar_date_max_get(cal);
sel_enabled = !!(elm_calendar_select_mode_get(cal) != 
ELM_CALENDAR_SELECT_MODE_NONE);
wds = elm_calendar_weekdays_names_get(cal);
 
snprintf(info, sizeof(info),
 "  Day: %i, Mon: %i, Year %i, WeekDay: %i"
-"  Interval: %0.2f, Year_Min: %i, Year_Max %i, Sel Enabled : 
%i"
+"  Interval: %0.2f, Sel Enabled : %i"
+"  Day_Min : %i, Mon_Min : %i, Year_Min : %i"
+"  Day_Max : %i, Mon_Max : %i, Year_Max : %i"
 "  Weekdays: %s, %s, %s, %s, %s, %s, %s",
 stm.tm_mday, stm.tm_mon, stm.tm_year + 1900, stm.tm_wday,
-interval, year_min, year_max, sel_enabled,
+interval, sel_enabled,
+mintm->tm_mday, mintm->tm_mon + 1, mintm->tm_year + 1900,
+maxtm->tm_mday, maxtm->tm_mon + 1, maxtm->tm_year + 1900,
 wds[0], wds[1], wds[2], wds[3], wds[4], wds[5], wds[6]);
 
elm_object_text_set(en, info);
@@ -231,7 +234,11 @@ _calendar_create(Evas_Object *parent)
elm_calendar_first_day_of_week_set(cal, ELM_DAY_SATURDAY);
elm_calendar_interval_set(cal, 0.4);
elm_calendar_format_function_set(cal, _format_month_year);
-   elm_calendar_min_max_year_set(cal, 2010, 2020);
+
+   time_t the_time = (SEC_PER_YEAR * 40) + (SEC_PER_DAY * 24); /* Set min date 
to JAN 15, 2010 */
+   elm_calendar_date_min_set(cal, gmtime(_time));
+   the_time = (SEC_PER_YEAR * 42) + (SEC_PER_DAY * 3); /* Set max date to DEC 
25, 2011 */
+   elm_calendar_date_max_set(cal, gmtime(_time));
 
current_time = time(NULL) + 4 * SEC_PER_DAY;
localtime_r(_time, _time);
@@ -327,7 +334,6 @@ test_calendar2(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event
elm_calendar_marks_draw(cal3);
evas_object_show(cal3);
elm_box_pack_end(bxh, cal3);
-   elm_calendar_min_max_year_set(cal3, -1, -1);
 
evas_object_show(win);
 }
diff --git a/src/lib/elementary/elm_calendar.c 
b/src/lib/elementary/elm_calendar.c
index 1d2a514..587f993 100644
--- a/src/lib/elementary/elm_calendar.c
+++ b/s

[EGIT] [core/efl] master 01/01: elm_panel : Fix bug with set scrollable panel orient.

2016-09-27 Thread JEONGHYUN YUN
hermet pushed a commit to branch master.

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

commit 490220273111c784341d99cc178db9f01b10aafe
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Tue Sep 27 17:11:03 2016 +0900

elm_panel : Fix bug with set scrollable panel orient.

Summary:
1. Fix wrong logic of ELM_PANEL_ORIENT_RIGHT case in _state_sync.
2. Move pre calc function in anim_cb to sizing_eval function.
   This code have caused problem that scrollable panel is not animated 
during drawer open and close.
3. Maintain content size ratio when orient is changed.
4. Freeze scroller when orient is changed.
   This code will need to change orientation when drawer opened.

Reviewers: cedric, eunue

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4320
---
 src/lib/elementary/elm_panel.c | 62 +++---
 1 file changed, 40 insertions(+), 22 deletions(-)

diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c
index 0568892..2cbeebf 100644
--- a/src/lib/elementary/elm_panel.c
+++ b/src/lib/elementary/elm_panel.c
@@ -62,6 +62,15 @@ _elm_panel_elm_layout_sizing_eval(Eo *obj, Elm_Panel_Data 
*sd)
 
if (sd->delete_me) return;
 
+   if (sd->scrollable)
+ {
+int w, h;
+evas_object_geometry_get(obj, NULL, NULL, , );
+
+if (sd->hidden) _drawer_close(obj, w, h, EINA_FALSE);
+else _drawer_open(obj, w, h, EINA_FALSE);
+ }
+
evas_object_smart_calculate(sd->bx);
edje_object_size_min_calc(wd->resize_obj, , );
evas_object_size_hint_min_set(obj, mw, mh);
@@ -555,7 +564,7 @@ _state_sync(Evas_Object *obj)
  elm_interface_scrollable_content_pos_get(obj, , NULL);
  horizontal = EINA_TRUE;
 
- if (!elm_widget_mirrored_get(obj))
+ if (elm_widget_mirrored_get(obj))
{
   if (pos == 0) open = EINA_TRUE;
   else if (pos == panel_size) open = EINA_FALSE;
@@ -1095,23 +1104,6 @@ _elm_panel_efl_canvas_group_group_move(Eo *obj, 
Elm_Panel_Data *sd, Evas_Coord x
evas_object_move(sd->hit_rect, x, y);
 }
 
-// FIXME: This is definitively not an animator, but a pre calc function
-// Not sure if I can hook on smart calc or on RENDER_PRE, will be left for 
later
-static void
-_elm_panel_anim_cb(void *data, const Efl_Event *event EINA_UNUSED)
-{
-   Evas_Object *obj = data;
-   ELM_PANEL_DATA_GET(obj, sd);
-   int w, h;
-
-   evas_object_geometry_get(obj, NULL, NULL, , );
-
-   if (sd->hidden) _drawer_close(obj, w, h, EINA_FALSE);
-   else _drawer_open(obj, w, h, EINA_FALSE);
-
-   efl_event_callback_stop(event->object);
-}
-
 EOLIAN static void
 _elm_panel_efl_canvas_group_group_resize(Eo *obj, Elm_Panel_Data *sd, 
Evas_Coord w, Evas_Coord h)
 {
@@ -1139,7 +1131,7 @@ _elm_panel_efl_canvas_group_group_resize(Eo *obj, 
Elm_Panel_Data *sd, Evas_Coord
  break;
  }
 
-   efl_event_callback_add(obj, EFL_EVENT_ANIMATOR_TICK, _elm_panel_anim_cb, 
obj);
+   elm_layout_sizing_eval(obj);
 }
 
 EOLIAN static void
@@ -1199,8 +1191,34 @@ _elm_panel_orient_set(Eo *obj, Elm_Panel_Data *sd, 
Elm_Panel_Orient orient)
if (sd->orient == orient) return;
sd->orient = orient;
 
-   if (sd->scrollable) _scrollable_layout_theme_set(obj, sd);
-   else _orient_set_do(obj);
+   if (sd->scrollable)
+ {
+_scrollable_layout_theme_set(obj, sd);
+
+if (!sd->freeze)
+  {
+ switch (sd->orient)
+   {
+  case ELM_PANEL_ORIENT_TOP:
+  case ELM_PANEL_ORIENT_BOTTOM:
+ elm_interface_scrollable_movement_block_set
+   (obj, ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL);
+ break;
+  case ELM_PANEL_ORIENT_LEFT:
+  case ELM_PANEL_ORIENT_RIGHT:
+ elm_interface_scrollable_movement_block_set
+   (obj, ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL);
+ break;
+   }
+
+ sd->freeze = EINA_TRUE;
+ elm_layout_signal_emit(sd->scr_ly, "elm,state,content,hidden", 
"elm");
+  }
+
+elm_panel_scrollable_content_size_set(obj, sd->content_size_ratio);
+ }
+   else
+ _orient_set_do(obj);
 
elm_layout_sizing_eval(obj);
 }
@@ -1392,7 +1410,7 @@ _elm_panel_scrollable_content_size_set(Eo *obj, 
Elm_Panel_Data *sd, double ratio
  break;
  }
 
-   efl_event_callback_add(obj, EFL_EVENT_ANIMATOR_TICK, _elm_panel_anim_cb, 
obj);
+   elm_layout_sizing_eval(obj);
 }
 
 EOLIAN static Eina_Bool

-- 




[EGIT] [core/efl] master 01/01: embryo : Prevent buffer overflow in embryo_cc_sc2

2016-09-20 Thread JEONGHYUN YUN
jypark pushed a commit to branch master.

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

commit 078c4a9f11b2d13805b52b7664485516103b
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Tue Sep 20 15:31:16 2016 +0830

embryo : Prevent buffer overflow in embryo_cc_sc2

Reviewers: jypark

Reviewed By: jypark

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4304
---
 src/bin/embryo/embryo_cc_sc2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/embryo/embryo_cc_sc2.c b/src/bin/embryo/embryo_cc_sc2.c
index 6956a80..fddc102 100644
--- a/src/bin/embryo/embryo_cc_sc2.c
+++ b/src/bin/embryo/embryo_cc_sc2.c
@@ -1005,7 +1005,7 @@ command(void)
int i;
 
for (i = 0; 
- (i < (int)(sizeof(name))) && 
+ (i < (int)(sizeof(name)) - 1) && 
  (alphanum(*lptr));
 i++, lptr++)
   name[i] = *lptr;

-- 




[EGIT] [core/efl] master 03/08: elm_panel : add a toggled event triggered when panel toggled in any way.

2016-08-16 Thread JEONGHYUN YUN
jpeg pushed a commit to branch master.

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

commit f00c078b9b08bdd14f9d8922f9b2c550e5e93bbf
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Mon Aug 1 15:38:50 2016 +0900

elm_panel : add a toggled event triggered when panel toggled in any way.

Summary:
There are 2 ways to toogle the panel, by using elm_panel_toggle API and by 
interaction such as flick or click on panel.
This toggled event can help us to know the time when the panel toggled by 
all case.

Reviewers: woohyun, kimcinoo, Hermet, jypark

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4180
---
 src/lib/elementary/elm_panel.c  | 16 ++--
 src/lib/elementary/elm_panel.eo |  5 +
 src/lib/elementary/elm_panel.h  |  1 +
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c
index 826e8c3..6b66825 100644
--- a/src/lib/elementary/elm_panel.c
+++ b/src/lib/elementary/elm_panel.c
@@ -22,9 +22,11 @@
 
 static const char ACCESS_OUTLINE_PART[] = "access.outline";
 
+static const char SIG_TOGGLED[] = "toggled";
 static const char SIG_SCROLL[] = "scroll";
 
 static const Evas_Smart_Cb_Description _smart_callbacks[] = {
+   {SIG_TOGGLED, ""},
{SIG_SCROLL, ""},
{SIG_LAYOUT_FOCUSED, ""}, /**< handled by elm_layout */
{SIG_LAYOUT_UNFOCUSED, ""}, /**< handled by elm_layout */
@@ -496,6 +498,8 @@ _panel_toggle(void *data EINA_UNUSED,
 
 edje_object_message_signal_process(wd->resize_obj);
  }
+
+   efl_event_callback_call(obj, ELM_PANEL_EVENT_TOGGLED, NULL);
 }
 
 static Eina_Bool
@@ -568,7 +572,11 @@ _state_sync(Evas_Object *obj)
 
if (open)
  {
-if (sd->hidden) sd->hidden = EINA_FALSE;
+if (sd->hidden)
+  {
+ sd->hidden = EINA_FALSE;
+ efl_event_callback_call(obj, ELM_PANEL_EVENT_TOGGLED, NULL);
+  }
 elm_interface_scrollable_single_direction_set
   (obj, ELM_SCROLLER_SINGLE_DIRECTION_HARD);
 
@@ -585,7 +593,11 @@ _state_sync(Evas_Object *obj)
  }
else
  {
-if (!sd->hidden) sd->hidden = EINA_TRUE;
+if (!sd->hidden)
+  {
+ sd->hidden = EINA_TRUE;
+ efl_event_callback_call(obj, ELM_PANEL_EVENT_TOGGLED, NULL);
+  }
 
 if (horizontal)
   elm_interface_scrollable_movement_block_set
diff --git a/src/lib/elementary/elm_panel.eo b/src/lib/elementary/elm_panel.eo
index 0a0d1c6..98df79a 100644
--- a/src/lib/elementary/elm_panel.eo
+++ b/src/lib/elementary/elm_panel.eo
@@ -13,6 +13,7 @@ class Elm.Panel (Elm.Layout, Elm.Interface_Scrollable,
 {
legacy_prefix: elm_panel;
eo_prefix: elm_obj_panel;
+   event_prefix: elm_panel;
methods {
   @property orient {
  set {
@@ -84,4 +85,8 @@ class Elm.Panel (Elm.Layout, Elm.Interface_Scrollable,
   Elm.Interface.Atspi_Widget_Action.elm_actions.get;
   Efl.Part.part;
}
+   events {
+  toggled;
+   }
+
 }
diff --git a/src/lib/elementary/elm_panel.h b/src/lib/elementary/elm_panel.h
index 1a9c5d0..9dde778 100644
--- a/src/lib/elementary/elm_panel.h
+++ b/src/lib/elementary/elm_panel.h
@@ -23,6 +23,7 @@
  *
  * This widget emits the following signals, besides the ones sent from
  * @ref Layout:
+ * @li @c "toggled" : When the panel has been toggled. (since 1.18)
  * @li @c "scroll" : When the content has been scrolled (moved). (since 1.10)
  *This signal is emitted only when the panel is scrollable.
  *Elm_Panel_Scroll_Info will be passed by @p event_info argument.

-- 




[EGIT] [core/efl] master 01/01: elm_panes : modified to keep panes content left size after orientation changed

2016-07-07 Thread JEONGHYUN YUN
woohyun pushed a commit to branch master.

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

commit 5ada22613fc27780cbd35e7aede6bc40ccff1587
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Fri Jul 8 09:49:50 2016 +0900

elm_panes : modified to keep panes content left size after orientation 
changed

Reviewers: woohyun

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4141
---
 src/lib/elementary/elm_panes.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_panes.c b/src/lib/elementary/elm_panes.c
index a54d646..6fcaab0 100644
--- a/src/lib/elementary/elm_panes.c
+++ b/src/lib/elementary/elm_panes.c
@@ -425,11 +425,13 @@ _elm_panes_efl_orientation_orientation_set(Eo *obj, 
Elm_Panes_Data *sd, Efl_Orie
if ((dir != EFL_ORIENT_HORIZONTAL) && (dir != EFL_ORIENT_VERTICAL))
  return;
 
+   double size = elm_panes_content_left_size_get(obj);
+
sd->orientation = dir;
elm_obj_widget_theme_apply(obj);
_update_fixed_sides(obj);
 
-   elm_panes_content_left_size_set(obj, 0.5);
+   elm_panes_content_left_size_set(obj, size);
 }
 
 EOLIAN static Efl_Orient

-- 




[EGIT] [core/efl] master 01/01: evas : evas_object_key_grab exclusive option logic is changed.

2016-06-01 Thread JEONGHYUN YUN
jypark pushed a commit to branch master.

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

commit 26b2e73d56efe2f73348253d24b03274c66d7bdf
Author: JEONGHYUN YUN <jh0506@samsung.com>
Date:   Wed Jun 1 17:14:12 2016 +0830

evas : evas_object_key_grab exclusive option logic is changed.

Summary:
 - added is_active property in Evas_Key_Grab.
 - Evas key down and key up events transferred to active grabs only.
 - If evas grabs has a exclusive grab, other grabs will be deactivated.
 - If a exclusive grab is ungrabbed, remained grabs will be activated.

Reviewers: jypark

Reviewed By: jypark

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3996
---
 src/lib/evas/canvas/evas_events.c   |  2 ++
 src/lib/evas/canvas/evas_key_grab.c | 69 ++---
 src/lib/evas/include/evas_private.h |  1 +
 3 files changed, 59 insertions(+), 13 deletions(-)

diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index 516bce6..25bbb43 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -2681,6 +2681,7 @@ _canvas_event_feed_key_down_internal(Eo *eo_e,
}
  if (g->delete_me) continue;
  if (!g->object) continue;
+ if (!g->is_active) continue;
  if (((e->modifiers.mask & g->modifiers) ||
   (g->modifiers == e->modifiers.mask)) &&
  (!strcmp(keyname, g->keyname)))
@@ -2786,6 +2787,7 @@ _canvas_event_feed_key_up_internal(Eo *eo_e,
}
  if (g->delete_me) continue;
  if (!g->object) continue;
+ if (!g->is_active) continue;
  if (((e->modifiers.mask & g->modifiers) ||
   (g->modifiers == e->modifiers.mask)) &&
  (!(e->modifiers.mask & g->not_modifiers)) &&
diff --git a/src/lib/evas/canvas/evas_key_grab.c 
b/src/lib/evas/canvas/evas_key_grab.c
index 7dfafeb..8a1575c 100644
--- a/src/lib/evas/canvas/evas_key_grab.c
+++ b/src/lib/evas/canvas/evas_key_grab.c
@@ -8,13 +8,29 @@
 /* modifiers/not_modifers they use */
 
 static Evas_Key_Grab *evas_key_grab_new  (Evas_Object *eo_obj, 
Evas_Object_Protected_Data *obj, const char *keyname, Evas_Modifier_Mask 
modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive);
-static Evas_Key_Grab *evas_key_grab_find (Evas_Object *eo_obj, 
Evas_Object_Protected_Data *obj, const char *keyname, Evas_Modifier_Mask 
modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive);
+static Evas_Key_Grab *evas_key_grab_find (Evas_Object *eo_obj, 
Evas_Object_Protected_Data *obj, const char *keyname, Evas_Modifier_Mask 
modifiers, Evas_Modifier_Mask not_modifiers);
 
 static Evas_Key_Grab *
 evas_key_grab_new(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, const 
char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, 
Eina_Bool exclusive)
 {
/* MEM OK */
+   Eina_List *l;
Evas_Key_Grab *g;
+   Eina_Bool have_exclusion = EINA_FALSE;
+
+   EINA_LIST_FOREACH(obj->layer->evas->grabs, l, g)
+ {
+if ((g->modifiers == modifiers) &&
+(g->not_modifiers == not_modifiers) &&
+(!strcmp(g->keyname, keyname)) &&
+(g->exclusive))
+  {
+ have_exclusion = EINA_TRUE;
+ break;
+  }
+ }
+
+   if (have_exclusion && exclusive) return NULL;
 
g = evas_mem_calloc(sizeof(Evas_Key_Grab));
if (!g) return NULL;
@@ -25,6 +41,7 @@ evas_key_grab_new(Evas_Object *eo_obj, 
Evas_Object_Protected_Data *obj, const ch
g->keyname = strdup(keyname);
if (obj->layer->evas->walking_grabs)
  g->just_added = EINA_TRUE;
+   g->is_active = EINA_TRUE;
if (!g->keyname)
  {
 if (!evas_mem_free(strlen(keyname) + 1))
@@ -39,13 +56,29 @@ evas_key_grab_new(Evas_Object *eo_obj, 
Evas_Object_Protected_Data *obj, const ch
  return NULL;
   }
  }
+
+   if (exclusive)
+ {
+Evas_Key_Grab *ge;
+EINA_LIST_FOREACH(obj->layer->evas->grabs, l, ge)
+  {
+ if ((ge->modifiers == modifiers) &&
+ (ge->not_modifiers == not_modifiers) &&
+ (!strcmp(ge->keyname, keyname)))
+   {
+  ge->is_active = EINA_FALSE;
+   }
+  }
+ }
+   if (have_exclusion) g->is_active = EINA_FALSE;
+
obj->grabs = eina_list_append(obj->grabs, g);
obj->layer->evas->grabs = eina_list_append(obj->layer->evas->grabs, g);
return g;
 }
 
 static Evas_Key_Grab *
-evas_key_grab_find(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, c

Re: [E-devel] [Patch] elm_gengrid reorder bug patch

2011-09-29 Thread Jeonghyun Yun
I updated patch against current svn  trunk.

Thank you.

-Original Message-
From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
Sent: Thursday, September 29, 2011 2:39 PM
To: Enlightenment developer list
Cc: Jeonghyun Yun
Subject: Re: [E-devel] [Patch] elm_gengrid reorder bug patch

On Fri, 16 Sep 2011 19:00:55 +0900 Jeonghyun Yun jh0506@samsung.com
said:

hmm. i'm looking at it now and hunk #2 has had some context changes and it's
a
bit time consuming to figure out whats what... could you send an updated
patch
against current svn trunk?

 Can anybody check about this patch?
 
  
 
 From: Jeonghyun Yun [mailto:jh0506@samsung.com] 
 Sent: Friday, September 02, 2011 11:40 AM
 To: 'enlightenment-devel@lists.sourceforge.net'
 Subject: [E-devel] [Patch] elm_gengrid reorder bug patch
 
  
 
 Dear All.
 
  
 
 I found a gengrid bug about reordering.
 
  
 
 It sometimes happens that some gengrid item disappear when reorder item.
 
  
 
 I fixed bug, please review this patch.
 
  
 
 Thanks.
 
  
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


elm_gengrid.patch
Description: Binary data
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] elm_gengrid reorder bug patch

2011-09-01 Thread Jeonghyun Yun
Dear All.

 

I found a gengrid bug about reordering.

 

It sometimes happens that some gengrid item disappear when reorder item.

 

I fixed bug, please review this patch.

 

Thanks.

 



elm_gengrid.patch
Description: Binary data
--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] elm_gengrid reorder mode moving effect added

2011-06-09 Thread Jeonghyun Yun
Dear All.

I made a patch for elm_gengrid moving effect on reorder mode.

You can see reorder moving effect when you reorder item.

Please review this patch.

Thanks.


elm_gengrid.patch
Description: Binary data
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] elm_gengrid - added new feature : gengrid reorder mode

2011-06-03 Thread Jeonghyun Yun
Hello,

I added theme stuff to handle the reorder mode.
Please check this patch again.

Thanks, raster.


-Original Message-
From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
Sent: Thursday, June 02, 2011 4:10 PM
To: Jeonghyun Yun
Cc: enlightenment-devel@lists.sourceforge.net
Subject: Re: [E-devel] [Patch] elm_gengrid - added new feature : gengrid
reorder mode

On Mon, 30 May 2011 19:41:24 +0900 Jeonghyun Yun jh0506@samsung.com
said:

this seems good. no theme stuff to handle the reorder mode change on the
item
tho.. shame :(

 Dear All.
 
 I added a new feature reorder mode of gengrid refer to genlist reorder
 mode.
 
 After set this reorder API, if user press an item (long press), the item
can
 be moved another position.
 Then if the user releases the item, the item will be reordered in gengrid.
 
 Please review this patch.
 
 Thanks.
 
 [API]
 ==
 /**
  * Set the reorder mode
  *
  * @param obj The Gengrid object
  * @param reorder_mode The reorder mode
  * (EINA_TRUE = on, EINA_FALSE = off)
  *
  * @ingroup Gengrid
  */
 EAPI void
 elm_gengrid_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode)
 
 /**
  * Get the reorder mode
  *
  * @param obj The Gengrid object
  * @return The reorder mode
  * (EINA_TRUE = on, EINA_FALSE = off)
  *
  * @ingroup Gengrid
  */
 EAPI Eina_Bool
 elm_gengrid_reorder_mode_get(const Evas_Object *obj)
 ==


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


elm_gengrid.patch
Description: Binary data
--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 ___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] elm_gengrid - added new feature : gengrid reorder mode

2011-05-30 Thread Jeonghyun Yun
Dear All.

I added a new feature reorder mode of gengrid refer to genlist reorder
mode.

After set this reorder API, if user press an item (long press), the item can
be moved another position.
Then if the user releases the item, the item will be reordered in gengrid.

Please review this patch.

Thanks.

[API]
==
/**
 * Set the reorder mode
 *
 * @param obj The Gengrid object
 * @param reorder_mode The reorder mode
 * (EINA_TRUE = on, EINA_FALSE = off)
 *
 * @ingroup Gengrid
 */
EAPI void
elm_gengrid_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode)

/**
 * Get the reorder mode
 *
 * @param obj The Gengrid object
 * @return The reorder mode
 * (EINA_TRUE = on, EINA_FALSE = off)
 *
 * @ingroup Gengrid
 */
EAPI Eina_Bool
elm_gengrid_reorder_mode_get(const Evas_Object *obj)
==


elm_gengrid.patch
Description: Binary data
--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] elm_gengrid calc_job bug patch

2011-04-29 Thread Jeonghyun Yun
Hello.

I attached the patch file for calc_job bug.

I found ecore_magic_fail problem when ecore_job_del(wd-calc_job).
wd-calc_job should also to be NULL when pan_smart's cvw and cvh is 0 in
calc_job().

Please check about this patch.

Thanks.
Index: src/lib/elm_gengrid.c
===
--- src/lib/elm_gengrid.c   (revision 59028)
+++ src/lib/elm_gengrid.c   (working copy)
@@ -1339,9 +1339,9 @@ _calc_job(void *data)
   }
 
 wd-nmax = nmax;
-wd-calc_job = NULL;
 evas_object_smart_changed(wd-pan_smart);
  }
+   wd-calc_job = NULL;
 }
 
 static void
--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] elm_gengrid bug patch

2011-03-02 Thread Jeonghyun Yun

I resubmit the patch file.
Thank you.

-Original Message-
From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
Sent: Monday, February 28, 2011 12:14 AM
To: Jeonghyun Yun
Cc: enlightenment-devel@lists.sourceforge.net
Subject: Re: [E-devel] [Patch] elm_gengrid bug patch

On Fri, 25 Feb 2011 13:42:21 +0900 Jeonghyun Yun jh0506@samsung.com
said:

 Hello.
 
 I attached the modified patch about calc_job problem.
 
 When I tested gengrid, sometimes gengrid renderd two times in different
 shape in a moment.
 So I checked gengrid code, I found cause in calc_job function.
 
 calc_job added to ecore job after elm_gengrid_item_size_set and 
 elm_gengrid_item_append(,prepend,insert_before,insert_after) and etc.
 Sometimes pan_smart's cvw and cvh is 0 at this time.
 
 I think, No need to calc_job when pan_smart's cvw and cvh is 0.
 
 Please check about this patch.

ok - but your formatting/code style are a bit off:

  if (cvw != 0 || cvh != 0)
should be
  if ((cvw != 0) || (cvh != 0))

resubmit? :)

-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com
Index: src/lib/elm_gengrid.c
===
--- src/lib/elm_gengrid.c   (revision 57464)
+++ src/lib/elm_gengrid.c   (working copy)
@@ -1281,36 +1281,39 @@ _calc_job(void *data)
int count;
 
evas_object_geometry_get(wd-pan_smart, NULL, NULL, cvw, cvh);
-   if ((wd-horizontal)  (wd-item_height  0))
- nmax = cvh / wd-item_height;
-   else if (wd-item_width  0)
- nmax = cvw / wd-item_width;
+   if ((cvw != 0) || (cvh != 0))
+ {
+if ((wd-horizontal)  (wd-item_height  0))
+  nmax = cvh / wd-item_height;
+else if (wd-item_width  0)
+  nmax = cvw / wd-item_width;
 
-   if (nmax  1)
- nmax = 1;
+if (nmax  1)
+  nmax = 1;
 
-   count = wd-count;
-   if (wd-horizontal)
- {
-minw = ceil(count / (float)nmax) * wd-item_width;
-minh = nmax * wd-item_height;
- }
-   else
- {
-minw = nmax * wd-item_width;
-minh = ceil(count / (float)nmax) * wd-item_height;
- }
+count = wd-count;
+if (wd-horizontal)
+  {
+ minw = ceil(count / (float)nmax) * wd-item_width;
+ minh = nmax * wd-item_height;
+  }
+else
+  {
+ minw = nmax * wd-item_width;
+ minh = ceil(count / (float)nmax) * wd-item_height;
+  }
 
-   if ((minw != wd-minw) || (minh != wd-minh))
- {
-wd-minh = minh;
-wd-minw = minw;
-evas_object_smart_callback_call(wd-pan_smart, changed, NULL);
+if ((minw != wd-minw) || (minh != wd-minh))
+  {
+ wd-minh = minh;
+ wd-minw = minw;
+ evas_object_smart_callback_call(wd-pan_smart, changed, NULL);
+  }
+
+wd-nmax = nmax;
+wd-calc_job = NULL;
+evas_object_smart_changed(wd-pan_smart);
  }
-
-   wd-nmax = nmax;
-   wd-calc_job = NULL;
-   evas_object_smart_changed(wd-pan_smart);
 }
 
 static void
--
Free Software Download: Index, Search  Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] elm_gengrid bug patch

2011-03-02 Thread Jeonghyun Yun

I resubmit the patch file.
Thank you.

-Original Message-
From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com]
Sent: Monday, February 28, 2011 12:14 AM
To: Jeonghyun Yun
Cc: enlightenment-devel@lists.sourceforge.net
Subject: Re: [E-devel] [Patch] elm_gengrid bug patch

On Fri, 25 Feb 2011 13:42:21 +0900 Jeonghyun Yun jh0506@samsung.com
said:

 Hello.
 
 I attached the modified patch about calc_job problem.
 
 When I tested gengrid, sometimes gengrid renderd two times in 
 different shape in a moment.
 So I checked gengrid code, I found cause in calc_job function.
 
 calc_job added to ecore job after elm_gengrid_item_size_set and
 elm_gengrid_item_append(,prepend,insert_before,insert_after) and etc.
 Sometimes pan_smart's cvw and cvh is 0 at this time.
 
 I think, No need to calc_job when pan_smart's cvw and cvh is 0.
 
 Please check about this patch.

ok - but your formatting/code style are a bit off:

  if (cvw != 0 || cvh != 0)
should be
  if ((cvw != 0) || (cvh != 0))

resubmit? :)

--
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com
Index: src/lib/elm_gengrid.c
===
--- src/lib/elm_gengrid.c   (revision 57464)
+++ src/lib/elm_gengrid.c   (working copy)
@@ -1281,36 +1281,39 @@ _calc_job(void *data)
int count;
 
evas_object_geometry_get(wd-pan_smart, NULL, NULL, cvw, cvh);
-   if ((wd-horizontal)  (wd-item_height  0))
- nmax = cvh / wd-item_height;
-   else if (wd-item_width  0)
- nmax = cvw / wd-item_width;
+   if ((cvw != 0) || (cvh != 0))
+ {
+if ((wd-horizontal)  (wd-item_height  0))
+  nmax = cvh / wd-item_height;
+else if (wd-item_width  0)
+  nmax = cvw / wd-item_width;
 
-   if (nmax  1)
- nmax = 1;
+if (nmax  1)
+  nmax = 1;
 
-   count = wd-count;
-   if (wd-horizontal)
- {
-minw = ceil(count / (float)nmax) * wd-item_width;
-minh = nmax * wd-item_height;
- }
-   else
- {
-minw = nmax * wd-item_width;
-minh = ceil(count / (float)nmax) * wd-item_height;
- }
+count = wd-count;
+if (wd-horizontal)
+  {
+ minw = ceil(count / (float)nmax) * wd-item_width;
+ minh = nmax * wd-item_height;
+  }
+else
+  {
+ minw = nmax * wd-item_width;
+ minh = ceil(count / (float)nmax) * wd-item_height;
+  }
 
-   if ((minw != wd-minw) || (minh != wd-minh))
- {
-wd-minh = minh;
-wd-minw = minw;
-evas_object_smart_callback_call(wd-pan_smart, changed, NULL);
+if ((minw != wd-minw) || (minh != wd-minh))
+  {
+ wd-minh = minh;
+ wd-minw = minw;
+ evas_object_smart_callback_call(wd-pan_smart, changed, NULL);
+  }
+
+wd-nmax = nmax;
+wd-calc_job = NULL;
+evas_object_smart_changed(wd-pan_smart);
  }
-
-   wd-nmax = nmax;
-   wd-calc_job = NULL;
-   evas_object_smart_changed(wd-pan_smart);
 }
 
 static void
--
Free Software Download: Index, Search  Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] elm_gengrid bug patch

2011-03-02 Thread Jeonghyun Yun
I resubmit the patch file.
Thank you.

-Original Message-
From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
Sent: Monday, February 28, 2011 12:14 AM
To: Jeonghyun Yun
Cc: enlightenment-devel@lists.sourceforge.net
Subject: Re: [E-devel] [Patch] elm_gengrid bug patch

On Fri, 25 Feb 2011 13:42:21 +0900 Jeonghyun Yun jh0506@samsung.com
said:

 Hello.
 
 I attached the modified patch about calc_job problem.
 
 When I tested gengrid, sometimes gengrid renderd two times in different
 shape in a moment.
 So I checked gengrid code, I found cause in calc_job function.
 
 calc_job added to ecore job after elm_gengrid_item_size_set and 
 elm_gengrid_item_append(,prepend,insert_before,insert_after) and etc.
 Sometimes pan_smart's cvw and cvh is 0 at this time.
 
 I think, No need to calc_job when pan_smart's cvw and cvh is 0.
 
 Please check about this patch.

ok - but your formatting/code style are a bit off:

  if (cvw != 0 || cvh != 0)
should be
  if ((cvw != 0) || (cvh != 0))

resubmit? :)

-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com
Index: src/lib/elm_gengrid.c
===
--- src/lib/elm_gengrid.c   (revision 57464)
+++ src/lib/elm_gengrid.c   (working copy)
@@ -1281,36 +1281,39 @@ _calc_job(void *data)
int count;
 
evas_object_geometry_get(wd-pan_smart, NULL, NULL, cvw, cvh);
-   if ((wd-horizontal)  (wd-item_height  0))
- nmax = cvh / wd-item_height;
-   else if (wd-item_width  0)
- nmax = cvw / wd-item_width;
+   if ((cvw != 0) || (cvh != 0))
+ {
+if ((wd-horizontal)  (wd-item_height  0))
+  nmax = cvh / wd-item_height;
+else if (wd-item_width  0)
+  nmax = cvw / wd-item_width;
 
-   if (nmax  1)
- nmax = 1;
+if (nmax  1)
+  nmax = 1;
 
-   count = wd-count;
-   if (wd-horizontal)
- {
-minw = ceil(count / (float)nmax) * wd-item_width;
-minh = nmax * wd-item_height;
- }
-   else
- {
-minw = nmax * wd-item_width;
-minh = ceil(count / (float)nmax) * wd-item_height;
- }
+count = wd-count;
+if (wd-horizontal)
+  {
+ minw = ceil(count / (float)nmax) * wd-item_width;
+ minh = nmax * wd-item_height;
+  }
+else
+  {
+ minw = nmax * wd-item_width;
+ minh = ceil(count / (float)nmax) * wd-item_height;
+  }
 
-   if ((minw != wd-minw) || (minh != wd-minh))
- {
-wd-minh = minh;
-wd-minw = minw;
-evas_object_smart_callback_call(wd-pan_smart, changed, NULL);
+if ((minw != wd-minw) || (minh != wd-minh))
+  {
+ wd-minh = minh;
+ wd-minw = minw;
+ evas_object_smart_callback_call(wd-pan_smart, changed, NULL);
+  }
+
+wd-nmax = nmax;
+wd-calc_job = NULL;
+evas_object_smart_changed(wd-pan_smart);
  }
-
-   wd-nmax = nmax;
-   wd-calc_job = NULL;
-   evas_object_smart_changed(wd-pan_smart);
 }
 
 static void
--
Free Software Download: Index, Search  Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] elm_gengrid bug patch

2011-02-24 Thread Jeonghyun Yun
Hello.

I attached the modified patch about calc_job problem.

When I tested gengrid, sometimes gengrid renderd two times in different
shape in a moment.
So I checked gengrid code, I found cause in calc_job function.

calc_job added to ecore job after elm_gengrid_item_size_set and 
elm_gengrid_item_append(,prepend,insert_before,insert_after) and etc.
Sometimes pan_smart's cvw and cvh is 0 at this time.

I think, No need to calc_job when pan_smart's cvw and cvh is 0.

Please check about this patch.

Thanks.
Index: src/lib/elm_gengrid.c
===
--- src/lib/elm_gengrid.c   (revision 57314)
+++ src/lib/elm_gengrid.c   (working copy)
@@ -1281,36 +1281,39 @@ _calc_job(void *data)
int count;
 
evas_object_geometry_get(wd-pan_smart, NULL, NULL, cvw, cvh);
-   if ((wd-horizontal)  (wd-item_height  0))
- nmax = cvh / wd-item_height;
-   else if (wd-item_width  0)
- nmax = cvw / wd-item_width;
+   if (cvw != 0 || cvh != 0)
+ {
+if ((wd-horizontal)  (wd-item_height  0))
+  nmax = cvh / wd-item_height;
+else if (wd-item_width  0)
+  nmax = cvw / wd-item_width;
 
-   if (nmax  1)
- nmax = 1;
+if (nmax  1)
+  nmax = 1;
 
-   count = wd-count;
-   if (wd-horizontal)
- {
-minw = ceil(count / (float)nmax) * wd-item_width;
-minh = nmax * wd-item_height;
- }
-   else
- {
-minw = nmax * wd-item_width;
-minh = ceil(count / (float)nmax) * wd-item_height;
- }
+count = wd-count;
+if (wd-horizontal)
+  {
+ minw = ceil(count / (float)nmax) * wd-item_width;
+ minh = nmax * wd-item_height;
+  }
+else
+  {
+ minw = nmax * wd-item_width;
+ minh = ceil(count / (float)nmax) * wd-item_height;
+  }
 
-   if ((minw != wd-minw) || (minh != wd-minh))
- {
-wd-minh = minh;
-wd-minw = minw;
-evas_object_smart_callback_call(wd-pan_smart, changed, NULL);
+if ((minw != wd-minw) || (minh != wd-minh))
+  {
+ wd-minh = minh;
+ wd-minw = minw;
+ evas_object_smart_callback_call(wd-pan_smart, changed, NULL);
+  }
+
+wd-nmax = nmax;
+wd-calc_job = NULL;
+evas_object_smart_changed(wd-pan_smart);
  }
-
-   wd-nmax = nmax;
-   wd-calc_job = NULL;
-   evas_object_smart_changed(wd-pan_smart);
 }
 
 static void
--
Free Software Download: Index, Search  Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] elm_gengrid calc_job patch

2011-02-22 Thread Jeonghyun Yun
Can anybody check about this?

-Original Message-
From: Jeonghyun Yun [mailto:jh0506@samsung.com] 
Sent: Friday, February 11, 2011 11:15 AM
To: 'enlightenment-devel@lists.sourceforge.net'
Subject: [E-devel] [Patch] elm_gengrid calc_job patch

Hello.

When I tested gengrid, sometimes gengrid renderd two times in different
shape in a moment.
So I checked gengrid code, I found cause in calc_job function.

calc_job added to ecore job after elm_gengrid_item_size_set and
elm_gengrid_item_append(,prepend,insert_before,insert_after).
Sometimes pan_smart's cvw and cvh is 0 at this time.

For Example,

If (item_width = 120, item_height = 120, horizontal = EINA_FALSE, item_count
= 8, cvw = 0, cvh = 0) 
Then, nmax = 0 but nmax  1 then nmax = 1 
Then, minw = 120 (1*120), minh = 960 (8*120), and then pan_smart changed
callback called.

I don't know why this code is added.
if (nmax  1) nmax = 1;

I attached patch file for this problem.
Can anybody check about this ?

Thanks.


--
Index, Search  Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] evas_image_load_bmp small patch

2011-02-15 Thread Jeonghyun Yun
Hello.

I agree to your comment. 
I implemented the same logic change both rle 4bit and rle 8bit.
But I can't find another path any more.

Please check this patch again.

Thanks.

-Original Message-
From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
Sent: Tuesday, February 15, 2011 8:35 PM
To: Jeonghyun Yun
Cc: enlightenment-devel@lists.sourceforge.net
Subject: Re: [E-devel] [Patch] evas_image_load_bmp small patch

On Thu, 10 Feb 2011 12:00:13 +0900 Jeonghyun Yun jh0506@samsung.com
said:

 Hello.
 
 When I tested some bmp files on evas, I found one bmp file is not
displayed.
 But this bmp file is displayed on windows and linux gimp and etc.
 So I checked this bmp file, this file have 208 data per line despite 207
 pixel per line!!
 
 I fixed code to skip the data when data is more than width instead of
break.
 I think this is not bug but evas policy problem.
 
 I attached patch and bmp file.
 Can anybody check this issue?

what kind of nutty app produced such a bmp? thats a pretty broken bmp... but
i
guess there is no harm in making it more robust to handle such unsociable
bmp
files... but still.. thats one rude bmp! :)

now about the patch - you only change the rle 8bit/pixel path -w hat about
all
the other modes/paths? it's a bit poor to have 1 path work differently to
all
the other ones? could you also implement the same logic change in the other
decode paths? (rle 4bit is what i'm looking at specifically as it has the
same
logic/issue)

-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com
Index: src/modules/loaders/bmp/evas_image_load_bmp.c
===
--- src/modules/loaders/bmp/evas_image_load_bmp.c   (revision 57074)
+++ src/modules/loaders/bmp/evas_image_load_bmp.c   (working copy)
@@ -681,32 +681,34 @@ evas_image_load_file_data_bmp(Image_Entry *ie, con
 {
if (p[0])
  {
-unsigned int col1 = pal[p[1]  4];
-unsigned int col2 = pal[p[1]  0xf];
+   if ((x + p[0]) = wpad)
+ {
+ unsigned int col1 = pal[p[1]  4];
+ unsigned int col2 = pal[p[1]  0xf];
 
-if ((x + p[0])  wpad) break;
-count = p[0] / 2;
-while (count  0)
-  {
- if (x  w)
+ count = p[0] / 2;
+ while (count  0)
{
-  pix[0] = col1;
-  x++;
+  if (x  w)
+{
+   pix[0] = col1;
+   x++;
+}
+  if (x  w)
+{
+   pix[1] = col2;
+   x++;
+}
+  pix += 2;
+  count--;
}
- if (x  w)
+ if (p[0]  0x1)
{
-  pix[1] = col2;
+  *pix = col1;
   x++;
+  pix++;
}
- pix += 2;
- count--;
-  }
-if (p[0]  0x1)
-  {
- *pix = col1;
- x++;
- pix++;
-  }
+ }
 p += 2;
  }
else
@@ -809,17 +811,19 @@ evas_image_load_file_data_bmp(Image_Entry *ie, con
 {
if (p[0])
  {
-unsigned int col = pal[p[1]];
+   if ((x + p[0]) = w)
+ {
+ unsigned int col = pal[p[1]];
 
-count = p[0];
-if ((x + p[0])  w) break;
-while (count  0)
-  {
- *pix = col

[E-devel] [Patch] evas_image_load_bmp small patch

2011-02-10 Thread Jeonghyun Yun
Hello.

When I tested some bmp files on evas, I found one bmp file is not displayed.
But this bmp file is displayed on windows and linux gimp and etc.
So I checked this bmp file, this file have 208 data per line despite 207
pixel per line!!

I fixed code to skip the data when data is more than width instead of break.
I think this is not bug but evas policy problem.

Can anybody check this patch?

Thanks.
Index: src/modules/loaders/bmp/evas_image_load_bmp.c
===
--- src/modules/loaders/bmp/evas_image_load_bmp.c   (revision 56885)
+++ src/modules/loaders/bmp/evas_image_load_bmp.c   (working copy)
@@ -812,12 +812,14 @@ evas_image_load_file_data_bmp(Image_Entry *ie, con
 unsigned int col = pal[p[1]];
 
 count = p[0];
-if ((x + p[0])  w) break;
-while (count  0)
+if ((x + p[0]) = w)
   {
- *pix = col;
- pix++;
- count--;
+ while (count  0)
+   {
+  *pix = col;
+  pix++;
+  count--;
+   }
   }
 x += p[0];
 p += 2;
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] elm_gengrid calc_job patch

2011-02-10 Thread Jeonghyun Yun
Hello.

When I tested gengrid, sometimes gengrid renderd two times in different
shape in a moment.
So I checked gengrid code, I found cause in calc_job function.

calc_job added to ecore job after elm_gengrid_item_size_set and
elm_gengrid_item_append(,prepend,insert_before,insert_after).
Sometimes pan_smart's cvw and cvh is 0 at this time.

For Example,

If (item_width = 120, item_height = 120, horizontal = EINA_FALSE, item_count
= 8, cvw = 0, cvh = 0)
Then, nmax = 0 but nmax  1 then nmax = 1
Then, minw = 120 (1*120), minh = 960 (8*120), and then pan_smart changed
callback called.

I don't know why this code is added.
if (nmax  1) nmax = 1;

I attached patch file for this problem.
Can anybody check about this ?

Thanks.
Index: src/lib/elm_gengrid.c
===
--- src/lib/elm_gengrid.c   (revision 56944)
+++ src/lib/elm_gengrid.c   (working copy)
@@ -1280,20 +1280,20 @@ _calc_job(void *data)
else if (wd-item_width  0)
  nmax = cvw / wd-item_width;
 
-   if (nmax  1)
- nmax = 1;
-
-   count = wd-count;
-   if (wd-horizontal)
+   if (nmax)
  {
-minw = ceil(count / (float)nmax) * wd-item_width;
-minh = nmax * wd-item_height;
+count = wd-count;
+if (wd-horizontal)
+  {
+ minw = ceil(count / (float)nmax) * wd-item_width;
+ minh = nmax * wd-item_height;
+  }
+else
+  {
+ minw = nmax * wd-item_width;
+ minh = ceil(count / (float)nmax) * wd-item_height;
+  }
  }
-   else
- {
-minw = nmax * wd-item_width;
-minh = ceil(count / (float)nmax) * wd-item_height;
- }
 
if ((minw != wd-minw) || (minh != wd-minh))
  {
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] elm_gengrid small patch

2011-02-09 Thread Jeonghyun Yun
Hello

 

I fixed one small strange code in elm_gengrid.

 

item null checked after used item in elm_gengrid_item_selected_set()
function.

 

I deleted null checking code because already done in
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN.

 

Can anybody check about this ? 

 

Thanks. 

 

Index: src/lib/elm_gengrid.c
===
--- src/lib/elm_gengrid.c   (revision 56885)
+++ src/lib/elm_gengrid.c   (working copy)
@@ -2206,7 +2206,7 @@ elm_gengrid_item_selected_set(Elm_Gengrid_Item *it
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(item);
Widget_Data *wd = item-wd;
if (!wd) return;
-   if ((!item) || (item-delete_me)) return;
+   if (item-delete_me) return;
selected = !!selected;
if (item-selected == selected) return;
 
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks added

2011-01-05 Thread Jeonghyun Yun
Oh. I mistake when I made patch. Sorry~
I tested my code in my target device.

I attach a patch again. 

Thanks.

-Original Message-
From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
Sent: Tuesday, January 04, 2011 5:34 PM
To: Jeonghyun Yun
Cc: enlightenment-devel@lists.sourceforge.net
Subject: Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks added

On Mon, 03 Jan 2011 17:23:14 +0900 Jeonghyun Yun jh0506@samsung.com
said:

you're going to hate this...

you didnt hook up the multi down/up/move callbacks to anything... how will
they
ever get called? :)

 Hello.
 
 I re-attached elm_genlist multi-touch smart callbacks patch.
 
 multi,swipe,left - This is called when the genlist is multi-touch swiped
 left.
 multi,swipe,right - This is called when the genlist is multi-touch
swiped
 right.
 multi,swipe,up - This is called when the genlist is multi-touch swiped
up.
 multi,swpie,down - This is called when the genlist is multi-touch swiped
 down.
 multi,pinch,out - This is called when the genlist is multi-touch pinched
 out.
 multi,pinch,in - This is called when the genlist is multi-touch pinched
 in.
 
 I added Ecore_Timer *multi_timer for multi-touch gesture evaluation.
 
 If this patch have any issue, please let me know.
 
 Thanks.


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com
Index: src/lib/elm_genlist.c
===
--- src/lib/elm_genlist.c   (revision 55875)
+++ src/lib/elm_genlist.c   (working copy)
@@ -91,6 +91,24 @@
  * scroll,edge,right - This is called when the genlist is scrolled until the
  * right edge.
  *
+ * multi,swipe,left - This is called when the genlist is multi-touch swiped
+ * left.
+ *
+ * multi,swipe,right - This is called when the genlist is multi-touch swiped
+ * right.
+ *
+ * multi,swipe,up - This is called when the genlist is multi-touch swiped
+ * up.
+ *
+ * multi,swipe,down - This is called when the genlist is multi-touch swiped
+ * down.
+ *
+ * multi,pinch,out - This is called when the genlist is multi-touch pinched
+ * out.
+ *
+ * multi,pinch,in - This is called when the genlist is multi-touch pinched
+ * in.
+ *
  * Genlist has a fairly large API, mostly because it's relatively complex,
  * trying to be both expansive, powerful and efficient. First we will begin
  * an overview o the theory behind genlist.
@@ -283,6 +301,13 @@ struct _Widget_Data
Elm_Genlist_Item *anchor_item;
Evas_Coordanchor_y;
Elm_List_Mode mode;
+   Ecore_Timer  *multi_timer;
+   Evas_Coordprev_x, prev_y, prev_mx, prev_my;
+   Evas_Coordcur_x, cur_y, cur_mx, cur_my;
+   Eina_Bool mouse_down : 1;
+   Eina_Bool multi_down : 1;
+   Eina_Bool multi_timeout : 1;
+   Eina_Bool multitouched : 1;
Eina_Bool on_hold : 1;
Eina_Bool multi : 1;
Eina_Bool always_select : 1;
@@ -299,6 +324,7 @@ struct _Widget_Data
{
   Evas_Coord x, y;
} history[SWIPE_MOVES];
+   int   multi_device;
int   item_cache_count;
int   item_cache_max;
int   movements;
@@ -966,6 +992,12 @@ _mouse_move(void*data,
_item_unselect(it);
   }
  }
+   if (it-wd-multitouched)
+ {
+it-wd-cur_x = ev-cur.canvas.x;
+it-wd-cur_y = ev-cur.canvas.y;
+return;
+ }
if ((it-dragging)  (it-down))
  {
 if (it-wd-movements == SWIPE_MOVES) it-wd-swipe = EINA_TRUE;
@@ -1094,7 +1126,150 @@ _swipe_cancel(void *data)
return ECORE_CALLBACK_RENEW;
 }
 
+static Eina_Bool
+_multi_cancel(void *data)
+{
+   Elm_Genlist_Item *it = data;
+
+   if (!it) return ECORE_CALLBACK_CANCEL;
+   it-wd-multi_timeout = EINA_TRUE;
+   return ECORE_CALLBACK_RENEW;
+}
+
 static void
+_multi_touch_gesture_eval(void *data)
+{
+   Elm_Genlist_Item *it = data;
+
+   it-wd-multitouched = EINA_FALSE;
+   if (it-wd-multi_timer)
+ {
+ecore_timer_del(it-wd-multi_timer);
+it-wd-multi_timer = NULL;
+ }
+   if (it-wd-multi_timeout)
+ {
+ it-wd-multi_timeout = EINA_FALSE;
+ return;
+ }
+
+   Evas_Coord minw = 0, minh = 0;
+   Evas_Coord off_x, off_y, off_mx, off_my;
+
+   elm_coords_finger_size_adjust(1, minw, 1, minh);
+   off_x = abs(it-wd-cur_x - it-wd-prev_x);
+   off_y = abs(it-wd-cur_y - it-wd-prev_y);
+   off_mx = abs(it-wd-cur_mx - it-wd-prev_mx);
+   off_my = abs(it-wd-cur_my - it-wd-prev_my);
+
+   if (((off_x  minw) || (off_y  minh))  ((off_mx  minw) || (off_my  
minh)))
+ {
+if ((off_x + off_mx)  (off_y + off_my))
+  {
+ if ((it-wd-cur_x  it-wd-prev_x)  (it-wd-cur_mx  
it-wd-prev_mx))
+   evas_object_smart_callback_call(it-base.widget,
+   multi,swipe,right, it);
+ else if ((it-wd-cur_x

[E-devel] [Patch] elm_genlist multi-touch smart callbacks added

2011-01-03 Thread Jeonghyun Yun
,
+   multi,swipe,down, it);
+ else if ((it-wd-cur_y  it-wd-prev_y)  (it-wd-cur_my  
it-wd-prev_my))
+   evas_object_smart_callback_call(it-base.widget,
+   multi,swipe,up, it);
+ else if (abs(it-wd-cur_y - it-wd-cur_my)  abs(it-wd-prev_y 
- it-wd-prev_my))
+   evas_object_smart_callback_call(it-base.widget,
+   multi,pinch,out, it);
+ else
+   evas_object_smart_callback_call(it-base.widget,
+   multi,pinch,in, it);
+  }
+ }
+ it-wd-multi_timeout = EINA_FALSE;
+}
+
+static void
+_multi_down(void*data,
+Evas *evas  __UNUSED__,
+Evas_Object *obj,
+void*event_info)
+{
+   Elm_Genlist_Item *it = data;
+   Evas_Event_Multi_Down *ev = event_info;
+
+   if ((it-wd-multi_device != 0) || (it-wd-multitouched) || 
(it-wd-multi_timeout)) return;
+   it-wd-multi_device = ev-device;
+   it-wd-multi_down = EINA_TRUE;
+   it-wd-multitouched = EINA_TRUE;
+   it-wd-prev_mx = ev-canvas.x;
+   it-wd-prev_my = ev-canvas.y;
+   if (!it-wd-wasselected) _item_unselect(it);
+   it-wd-wasselected = EINA_FALSE;
+   it-wd-longpressed = EINA_FALSE;
+   if (it-long_timer)
+ {
+ecore_timer_del(it-long_timer);
+it-long_timer = NULL;
+ }
+   if (it-dragging)
+ {
+it-dragging = EINA_FALSE;
+evas_object_smart_callback_call(it-base.widget, drag,stop, it);
+ }
+   if (it-swipe_timer)
+ {
+ecore_timer_del(it-swipe_timer);
+it-swipe_timer = NULL;
+ }
+   if (it-wd-on_hold)
+ {
+it-wd-swipe = EINA_FALSE;
+it-wd-movements = 0;
+it-wd-on_hold = EINA_FALSE;
+ }
+}
+
+static void
+_multi_up(void*data,
+  Evas *evas  __UNUSED__,
+  Evas_Object *obj,
+  void*event_info)
+{
+   Elm_Genlist_Item *it = data;
+   Evas_Event_Multi_Up *ev = event_info;
+
+   if (it-wd-multi_device != ev-device) return;
+   it-wd-multi_device = 0;
+   it-wd-multi_down = EINA_FALSE;
+   if (it-wd-mouse_down) return;
+   _multi_touch_gesture_eval(data);
+}
+
+static void
+_multi_move(void*data,
+Evas *evas  __UNUSED__,
+Evas_Object *obj,
+void*event_info)
+{
+   Elm_Genlist_Item *it = data;
+   Evas_Event_Multi_Move *ev = event_info;
+
+   if (it-wd-multi_device != ev-device) return;
+   it-wd-cur_mx = ev-cur.canvas.x;
+   it-wd-cur_my = ev-cur.canvas.y;
+}
+
+static void
 _mouse_down(void*data,
 Evas *evas   __UNUSED__,
 Evas_Object *obj,
@@ -1115,6 +1290,15 @@ _mouse_down(void*data,
evas_object_geometry_get(obj, x, y, NULL, NULL);
it-dx = ev-canvas.x - x;
it-dy = ev-canvas.y - y;
+   it-wd-mouse_down = EINA_TRUE;
+   if (!it-wd-multitouched)
+ {
+it-wd-prev_x = ev-canvas.x;
+it-wd-prev_y = ev-canvas.y;
+it-wd-multi_timeout = EINA_FALSE;
+if (it-wd-multi_timer) ecore_timer_del(it-wd-multi_timer);
+it-wd-multi_timer = ecore_timer_add(1, _multi_cancel, it);
+ }
it-wd-longpressed = EINA_FALSE;
if (ev-event_flags  EVAS_EVENT_FLAG_ON_HOLD) it-wd-on_hold = EINA_TRUE;
else it-wd-on_hold = EINA_FALSE;
@@ -1147,6 +1331,13 @@ _mouse_up(void*data,
 
if (ev-button != 1) return;
it-down = EINA_FALSE;
+   it-wd-mouse_down = EINA_FALSE;
+   if (it-wd-multitouched)
+ {
+if (it-wd-multi_down) return;
+_multi_touch_gesture_eval(data);
+return;
+ }
if (ev-event_flags  EVAS_EVENT_FLAG_ON_HOLD) it-wd-on_hold = EINA_TRUE;
else it-wd-on_hold = EINA_FALSE;
if (it-long_timer)
@@ -1165,6 +1356,12 @@ _mouse_up(void*data,
 ecore_timer_del(it-swipe_timer);
 it-swipe_timer = NULL;
  }
+   if (it-wd-multi_timer)
+ {
+ecore_timer_del(it-wd-multi_timer);
+it-wd-multi_timer = NULL;
+it-wd-multi_timeout = EINA_FALSE;
+ }
if (it-wd-on_hold)
  {
 if (it-wd-swipe) _swipe(data);
Index: AUTHORS
===
--- AUTHORS (revision 55814)
+++ AUTHORS (working copy)
@@ -31,3 +31,4 @@ Daniel Juyung Seo (SeoZ) juyung@samsung.com
 Sangho Park sangho.g.p...@samsung.com gouach...@gmail.com
 Rajeev Ranjan (Rajeev) rajee...@samsung.com rajeev.jn...@gmail.com
 Seunggyun Kim sgyun@samsung.com tmd...@gmail.com
+Jeonghyun Yun (arosis) jh0506@samsung.com
--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle

[E-devel] [Patch] small patch for elm_gengrid.c

2010-12-30 Thread Jeonghyun Yun
Hello All.

I re-attach patch.

I found one small bug in elm_gengrid.c

item is used after free(item) in elm_gengrid_item_del() function.

Can anybody check about this ? 

Thanks.
Index: src/lib/elm_gengrid.c
===
--- src/lib/elm_gengrid.c   (revision 55786)
+++ src/lib/elm_gengrid.c   (working copy)
@@ -242,6 +242,7 @@ static void  _item_hilight(Elm_Gengrid_Item *i
 static void  _item_unrealize(Elm_Gengrid_Item *item);
 static void  _item_select(Elm_Gengrid_Item *item);
 static void  _item_unselect(Elm_Gengrid_Item *item);
+static void  _calc_job(void *data);
 static void  _on_focus_hook(void*data,
 Evas_Object *obj);
 static Eina_Bool _item_multi_select_up(Widget_Data *wd);
@@ -1177,6 +1178,8 @@ _item_del(Elm_Gengrid_Item *item)
  item-tooltip.del_cb((void *)item-tooltip.data, item-base.widget, item);
item-wd-walking -= item-walking;
item-wd-count--;
+   if (item-wd-calc_job) ecore_job_del(item-wd-calc_job);
+   item-wd-calc_job = ecore_job_add(_calc_job, item-wd);
elm_widget_item_del(item);
 }
 
@@ -1859,9 +1862,6 @@ elm_gengrid_item_del(Elm_Gengrid_Item *item)
  }
 
_item_del(item);
-
-   if (item-wd-calc_job) ecore_job_del(item-wd-calc_job);
-   item-wd-calc_job = ecore_job_add(_calc_job, item-wd);
 }
 
 /**
--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks added

2010-12-28 Thread Jeonghyun Yun
Thanks for your advice.

1. if( it-wd-prev_mx * it-wd-prev_my == 0 ) return;
Sometimes MULTI_MOVE callback called before MULTI_DOWN so I added this
code for prevention.
But this code no longer need because device id checking. I removed code
in patch.
Please forget formatting mistake. :)

2. OK. I agree you.
I added reset device id code to 0 in multi_up

3. Is device id 0 the mouse?? 
I don't understand above. For example, my host-pc mouse device id is 9.
Can you explain detail?

I attached patch.
If this patch have another issue, please let me know.

Thanks.

-Original Message-
From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
Sent: Tuesday, December 28, 2010 4:09 PM
To: Jeonghyun Yun
Cc: 'Daniel Juyung Seo'; enlightenment-devel@lists.sourceforge.net
Subject: Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks added

On Thu, 23 Dec 2010 17:32:16 +0900 Jeonghyun Yun jh0506@samsung.com
said:

hey jeonghyun!

some more issues :)

formatting and... why? this line makes little sense. can you explain given
that prev_mx/my are set on a multitouch-down event and this COULD be at 0,0
-
legitimately:
+   if( it-wd-prev_mx * it-wd-prev_my == 0 ) return;

also here you take the device id of the first non-zero multi-touch id, but
then
only use that one during the life of the widget. it doesn't seem right:
+   if (it-wd-multi_device == 0) it-wd-multi_device = ev-device;
if you want to do this kind of dynamic device id recognition at least reset
device id in widget to 0 each multi up (of the selected device id that was
down) so it can re-select each multi-press and not once ever. also device id
0
is the mouse so ignore device id 0 stuck if u are handling mouse
down/up/move
events too.

other than that it's improved - can you fix these above?


 Thanks for your advice about patch.
 
 I fixed below according to your advice.
 
 1. check device id in multi up/down/move callbacks.
 2. I made _multi_touch_motion_eval() function, 
 this function called by both mouse_up and multi_up.
 
 If this patch have another issue, please let me know.
 
 Thank you.
 
 -Original Message-
 From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
 Sent: Tuesday, December 21, 2010 5:54 PM
 To: Jeonghyun Yun
 Cc: 'Daniel Juyung Seo'; enlightenment-devel@lists.sourceforge.net
 Subject: Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks
added
 
 On Mon, 20 Dec 2010 15:56:11 +0900 Jeonghyun Yun jh0506@samsung.com
 said:
 
 problem in code for patch... in your multi up/dwon/move callbacks you
don't
 check the device id. as such the core mouse or first touch is device 0
so
 you
 don't see multi events for it, but devices 1, 2, 3 etc. are the extra
touch
 points. your patch will get confused if you have 3 fingers on the screen
as
 it
 will handle both finger #2 and #3 in those events, so you should have a if
 (ev-device != 1) return; or something like that (to only handle the 2nd
 touch
 point).
 
 another problem. you trigger this only on the up of the 2nd
 finger (assuming the above is fixed). what you need to do it handling
this
 on
 ALL up events - mouse AND multi.. and IF no more fingers are touching on
 one
 of those up events (that means its the last finger to release), THEN
figure
 out
 what to do. so you need to track the down state of main mouse and multi
 event
 with some flags/booleans and when both are false/0/off then both fingers
are
 released and you can check what to do. you already do it for multi with
 wd-multitouched. make this as above for both mouse and multi and then a
 separate eval call to evaluate what kind of motion the fingers did and
 you're
 looking good.
 
 can you re-submit the patch with the above fixes?
 
  Hello,
  
  I modified name and added doxyen. Please refer to below.
  
  multi,swipe,left - This is called when the genlist is multi-touch
swiped
  left.
  multi,swipe,right - This is called when the genlist is multi-touch
 swiped
  right.
  multi,swipe,up - This is called when the genlist is multi-touch swiped
 up.
  multi,swpie,down - This is called when the genlist is multi-touch
swiped
  down.
  multi,pinch,out - This is called when the genlist is multi-touch
pinched
  out.
  multi,pinch,in - This is called when the genlist is multi-touch
pinched
  in.
  
  If this patch have any issue, please let me know.
  
  Thank you.
  
  -Original Message-
  From: Daniel Juyung Seo [mailto:seojuyu...@gmail.com] 
  Sent: Monday, December 20, 2010 2:53 PM
  To: Jeonghyun Yun
  Cc: enlightenment-devel@lists.sourceforge.net
  Subject: Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks
 added
  
  Hello,
  
  How about using below names for smart callbacks?
  
  multi,swipe,left - Genlist has been multi-touch swept left.
  multi,swipe,right - Genlist has been multi-touch swept right.
  multi,swipe,up - Genlist has been multi-touch swept top.
  multi,swpie,down - Genlist has been multi-touch swept

[E-devel] [Patch] small patch for elm_gengrid.c

2010-12-26 Thread Jeonghyun Yun
Hello

I found one small bug in elm_gengrid.c

item is used after free(item) in elm_gengrid_item_del() function.

Can anybody check about this ? 

Thanks. 

Index: src/lib/elm_gengrid.c
===
--- src/lib/elm_gengrid.c   (revision 55760)
+++ src/lib/elm_gengrid.c   (working copy)
@@ -1177,6 +1177,8 @@ _item_del(Elm_Gengrid_Item *item)
  item-tooltip.del_cb((void *)item-tooltip.data, item-base.widget, item);
item-wd-walking -= item-walking;
item-wd-count--;
+   if (item-wd-calc_job) ecore_job_del(item-wd-calc_job);
+   item-wd-calc_job = ecore_job_add(_calc_job, item-wd);
elm_widget_item_del(item);
 }
 
@@ -1859,9 +1861,6 @@ elm_gengrid_item_del(Elm_Gengrid_Item *item)
  }
 
_item_del(item);
-
-   if (item-wd-calc_job) ecore_job_del(item-wd-calc_job);
-   item-wd-calc_job = ecore_job_add(_calc_job, item-wd);
 }
 
 /**
--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] small patch for elm_gengrid.c

2010-12-26 Thread Jeonghyun Yun
Some mistake in patch file.
I re-attached

Thanks.



-Original Message-
From: Jeonghyun Yun [mailto:jh0506@samsung.com] 
Sent: Monday, December 27, 2010 12:38 PM
To: 'enlightenment-devel@lists.sourceforge.net'
Subject: [E-devel] [Patch] small patch for elm_gengrid.c

Hello

I found one small bug in elm_gengrid.c

item is used after free(item) in elm_gengrid_item_del() function.

Can anybody check about this ? 

Thanks. 

Index: src/lib/elm_gengrid.c
===
--- src/lib/elm_gengrid.c   (revision 55760)
+++ src/lib/elm_gengrid.c   (working copy)
@@ -242,6 +242,7 @@ static void  _item_hilight(Elm_Gengrid_Item *i
 static void  _item_unrealize(Elm_Gengrid_Item *item);
 static void  _item_select(Elm_Gengrid_Item *item);
 static void  _item_unselect(Elm_Gengrid_Item *item);
+static void  _calc_job(void *data);
 static void  _on_focus_hook(void*data,
 Evas_Object *obj);
 static Eina_Bool _item_multi_select_up(Widget_Data *wd);
@@ -1177,6 +1178,8 @@ _item_del(Elm_Gengrid_Item *item)
  item-tooltip.del_cb((void *)item-tooltip.data, item-base.widget, item);
item-wd-walking -= item-walking;
item-wd-count--;
+   if (item-wd-calc_job) ecore_job_del(item-wd-calc_job);
+   item-wd-calc_job = ecore_job_add(_calc_job, item-wd);
elm_widget_item_del(item);
 }
 
@@ -1859,9 +1862,6 @@ elm_gengrid_item_del(Elm_Gengrid_Item *item)
  }
 
_item_del(item);
-
-   if (item-wd-calc_job) ecore_job_del(item-wd-calc_job);
-   item-wd-calc_job = ecore_job_add(_calc_job, item-wd);
 }
 
 /**
--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks added

2010-12-23 Thread Jeonghyun Yun
Thanks for your advice about patch.

I fixed below according to your advice.

1. check device id in multi up/down/move callbacks.
2. I made _multi_touch_motion_eval() function, 
this function called by both mouse_up and multi_up.

If this patch have another issue, please let me know.

Thank you.

-Original Message-
From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
Sent: Tuesday, December 21, 2010 5:54 PM
To: Jeonghyun Yun
Cc: 'Daniel Juyung Seo'; enlightenment-devel@lists.sourceforge.net
Subject: Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks added

On Mon, 20 Dec 2010 15:56:11 +0900 Jeonghyun Yun jh0506@samsung.com
said:

problem in code for patch... in your multi up/dwon/move callbacks you don't
check the device id. as such the core mouse or first touch is device 0 so
you
don't see multi events for it, but devices 1, 2, 3 etc. are the extra touch
points. your patch will get confused if you have 3 fingers on the screen as
it
will handle both finger #2 and #3 in those events, so you should have a if
(ev-device != 1) return; or something like that (to only handle the 2nd
touch
point).

another problem. you trigger this only on the up of the 2nd
finger (assuming the above is fixed). what you need to do it handling this
on
ALL up events - mouse AND multi.. and IF no more fingers are touching on
one
of those up events (that means its the last finger to release), THEN figure
out
what to do. so you need to track the down state of main mouse and multi
event
with some flags/booleans and when both are false/0/off then both fingers are
released and you can check what to do. you already do it for multi with
wd-multitouched. make this as above for both mouse and multi and then a
separate eval call to evaluate what kind of motion the fingers did and
you're
looking good.

can you re-submit the patch with the above fixes?

 Hello,
 
 I modified name and added doxyen. Please refer to below.
 
 multi,swipe,left - This is called when the genlist is multi-touch swiped
 left.
 multi,swipe,right - This is called when the genlist is multi-touch
swiped
 right.
 multi,swipe,up - This is called when the genlist is multi-touch swiped
up.
 multi,swpie,down - This is called when the genlist is multi-touch swiped
 down.
 multi,pinch,out - This is called when the genlist is multi-touch pinched
 out.
 multi,pinch,in - This is called when the genlist is multi-touch pinched
 in.
 
 If this patch have any issue, please let me know.
 
 Thank you.
 
 -Original Message-
 From: Daniel Juyung Seo [mailto:seojuyu...@gmail.com] 
 Sent: Monday, December 20, 2010 2:53 PM
 To: Jeonghyun Yun
 Cc: enlightenment-devel@lists.sourceforge.net
 Subject: Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks
added
 
 Hello,
 
 How about using below names for smart callbacks?
 
 multi,swipe,left - Genlist has been multi-touch swept left.
 multi,swipe,right - Genlist has been multi-touch swept right.
 multi,swipe,up - Genlist has been multi-touch swept top.
 multi,swpie,down - Genlist has been multi-touch swept bottom.
 multi,pinch,out - Genlist has been multi-touch pinched out.
 multi,pinch,in - Genlist has been multi-touch pinched in.
 
 Because there is a swipe smart callbacks, I think we can use the
 name swipe here too.
 
 And Mr. Yun, can you add doxygen for those events as well?
 Please add smart callback doxygen to elm_genlist.c.
 You can see existing doxygens at the top of elm_genlist.c
 So you may add multi,** doxygens around line number 78~80.
 
 Thank you.
 Daniel Juyung Seo (SeoZ)
 
 
 
 On Fri, Dec 17, 2010 at 5:28 PM, Jeonghyun Yun jh0506@samsung.com
 wrote:
  Dear SeoZ,
 
  Yes. I agree about using up  down instead of top  bottom.
 
  And I'm also not sure but 'sweep' is not bad.
  Also 'move' is a good name. Then how about 'dragged'?
 
  I don't know well. Anybody please suggest a good name.
 
  Thanks.
 
  -Original Message-
  From: Daniel Juyung Seo [mailto:seojuyu...@gmail.com]
  Sent: Friday, December 17, 2010 4:40 PM
  To: Jeonghyun Yun
  Cc: enlightenment-devel@lists.sourceforge.net
  Subject: Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks
 added
 
  Dear Yun,
 
  How about renaming some callbacks?
  multi,sweep,top = multi,sweep,up
  multi,sweep,bottom = multi,sweep,down
  Multi touch event cares only for the touch behavior not the callback's
  behavior.
 
  And I'm not sure it is ok to use the word 'sweep'.
  Anybody please suggest a good name for this. Maybe 'move'?
  I'm not sure about this.
 
  Anyway thanks for your effort.
  Daniel Juyung Seo. (SeoZ)
 
 
  On Fri, Dec 17, 2010 at 11:48 AM, Jeonghyun Yun jh0506@samsung.com
  wrote:
  Dear all,
 
  I added 6 multi-touch smart callbacks in elm_genlist, please refer to
  below.
 
  multi,sweep,left - Genlist has been multi-touch swept left.
  multi,sweep,right - Genlist has been multi-touch swept right.
  multi,sweep,top - Genlist has been multi-touch swept top.
  multi,sweep,bottom

Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks added

2010-12-19 Thread Jeonghyun Yun
Hello,

I modified name and added doxyen. Please refer to below.

multi,swipe,left - This is called when the genlist is multi-touch swiped
left.
multi,swipe,right - This is called when the genlist is multi-touch swiped
right.
multi,swipe,up - This is called when the genlist is multi-touch swiped up.
multi,swpie,down - This is called when the genlist is multi-touch swiped
down.
multi,pinch,out - This is called when the genlist is multi-touch pinched
out.
multi,pinch,in - This is called when the genlist is multi-touch pinched
in.

If this patch have any issue, please let me know.

Thank you.

-Original Message-
From: Daniel Juyung Seo [mailto:seojuyu...@gmail.com] 
Sent: Monday, December 20, 2010 2:53 PM
To: Jeonghyun Yun
Cc: enlightenment-devel@lists.sourceforge.net
Subject: Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks added

Hello,

How about using below names for smart callbacks?

multi,swipe,left - Genlist has been multi-touch swept left.
multi,swipe,right - Genlist has been multi-touch swept right.
multi,swipe,up - Genlist has been multi-touch swept top.
multi,swpie,down - Genlist has been multi-touch swept bottom.
multi,pinch,out - Genlist has been multi-touch pinched out.
multi,pinch,in - Genlist has been multi-touch pinched in.

Because there is a swipe smart callbacks, I think we can use the
name swipe here too.

And Mr. Yun, can you add doxygen for those events as well?
Please add smart callback doxygen to elm_genlist.c.
You can see existing doxygens at the top of elm_genlist.c
So you may add multi,** doxygens around line number 78~80.

Thank you.
Daniel Juyung Seo (SeoZ)



On Fri, Dec 17, 2010 at 5:28 PM, Jeonghyun Yun jh0506@samsung.com
wrote:
 Dear SeoZ,

 Yes. I agree about using up  down instead of top  bottom.

 And I'm also not sure but 'sweep' is not bad.
 Also 'move' is a good name. Then how about 'dragged'?

 I don't know well. Anybody please suggest a good name.

 Thanks.

 -Original Message-
 From: Daniel Juyung Seo [mailto:seojuyu...@gmail.com]
 Sent: Friday, December 17, 2010 4:40 PM
 To: Jeonghyun Yun
 Cc: enlightenment-devel@lists.sourceforge.net
 Subject: Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks
added

 Dear Yun,

 How about renaming some callbacks?
 multi,sweep,top = multi,sweep,up
 multi,sweep,bottom = multi,sweep,down
 Multi touch event cares only for the touch behavior not the callback's
 behavior.

 And I'm not sure it is ok to use the word 'sweep'.
 Anybody please suggest a good name for this. Maybe 'move'?
 I'm not sure about this.

 Anyway thanks for your effort.
 Daniel Juyung Seo. (SeoZ)


 On Fri, Dec 17, 2010 at 11:48 AM, Jeonghyun Yun jh0506@samsung.com
 wrote:
 Dear all,

 I added 6 multi-touch smart callbacks in elm_genlist, please refer to
 below.

 multi,sweep,left - Genlist has been multi-touch swept left.
 multi,sweep,right - Genlist has been multi-touch swept right.
 multi,sweep,top - Genlist has been multi-touch swept top.
 multi,sweep,bottom - Genlist has been multi-touch swept bottom.
 multi,pinch,out - Genlist has been multi-touch pinched out.
 multi,pinch,in - Genlist has been multi-touch pinched in.

 I think these smart callbacks are very useful for elm_genlist multi-touch
 effect.

 If this patch have any issue, please let me know.

 Thanks.




 --
 Lotusphere 2011
 Register now for Lotusphere 2011 and learn how
 to connect the dots, take your collaborative environment
 to the next level, and enter the era of Social Business.
 http://p.sf.net/sfu/lotusphere-d2d
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel




Index: src/lib/elm_genlist.c
===
--- src/lib/elm_genlist.c   (revision 55652)
+++ src/lib/elm_genlist.c   (working copy)
@@ -91,6 +91,24 @@
  * scroll,edge,right - This is called when the genlist is scrolled until the
  * right edge.
  *
+ * multi,swipe,left - This is called when the genlist is multi-touch swiped 
+ * left.
+ *
+ * multi,swipe,right - This is called when the genlist is multi-touch swiped 
+ * right.
+ *
+ * multi,swipe,up - This is called when the genlist is multi-touch swiped 
+ * up.
+ * 
+ * multi,swipe,down - This is called when the genlist is multi-touch swiped 
+ * down.
+ *
+ * multi,pinch,out - This is called when the genlist is multi-touch pinched 
+ * out.
+ *
+ * multi,pinch,in - This is called when the genlist is multi-touch pinched 
+ * in.
+ *
  * Genlist has a fairly large API, mostly because it's relatively complex,
  * trying to be both expansive, powerful and efficient. First we will begin
  * an overview o the theory behind genlist.
@@ -283,6 +301,9 @@ struct _Widget_Data
Elm_Genlist_Item *anchor_item;
Evas_Coordanchor_y;
Elm_List_Mode

Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks added

2010-12-17 Thread Jeonghyun Yun
Dear SeoZ,

Yes. I agree about using up  down instead of top  bottom.

And I'm also not sure but 'sweep' is not bad.
Also 'move' is a good name. Then how about 'dragged'?

I don't know well. Anybody please suggest a good name.

Thanks.

-Original Message-
From: Daniel Juyung Seo [mailto:seojuyu...@gmail.com] 
Sent: Friday, December 17, 2010 4:40 PM
To: Jeonghyun Yun
Cc: enlightenment-devel@lists.sourceforge.net
Subject: Re: [E-devel] [Patch] elm_genlist multi-touch smart callbacks added

Dear Yun,

How about renaming some callbacks?
multi,sweep,top = multi,sweep,up
multi,sweep,bottom = multi,sweep,down
Multi touch event cares only for the touch behavior not the callback's
behavior.

And I'm not sure it is ok to use the word 'sweep'.
Anybody please suggest a good name for this. Maybe 'move'?
I'm not sure about this.

Anyway thanks for your effort.
Daniel Juyung Seo. (SeoZ)


On Fri, Dec 17, 2010 at 11:48 AM, Jeonghyun Yun jh0506@samsung.com
wrote:
 Dear all,

 I added 6 multi-touch smart callbacks in elm_genlist, please refer to
below.

 multi,sweep,left - Genlist has been multi-touch swept left.
 multi,sweep,right - Genlist has been multi-touch swept right.
 multi,sweep,top - Genlist has been multi-touch swept top.
 multi,sweep,bottom - Genlist has been multi-touch swept bottom.
 multi,pinch,out - Genlist has been multi-touch pinched out.
 multi,pinch,in - Genlist has been multi-touch pinched in.

 I think these smart callbacks are very useful for elm_genlist multi-touch
 effect.

 If this patch have any issue, please let me know.

 Thanks.



--
 Lotusphere 2011
 Register now for Lotusphere 2011 and learn how
 to connect the dots, take your collaborative environment
 to the next level, and enter the era of Social Business.
 http://p.sf.net/sfu/lotusphere-d2d
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel




--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] elm_genlist multi-touch smart callbacks added

2010-12-16 Thread Jeonghyun Yun
, it);
+ else
+   evas_object_smart_callback_call(it-base.widget,
+   multi,pinch,in, it);
+  }
+ }
+
+   it-wd-multitouched = EINA_FALSE;
+   it-wd-prev_mx = 0;
+   it-wd-prev_my = 0;
+}
+
+static void
 _signal_expand_toggle(void*data,
   Evas_Object *obj __UNUSED__,
   const char *emission __UNUSED__,
@@ -1350,6 +1447,12 @@ _item_cache_add(Elm_Genlist_Item *it)
_mouse_up, it);
evas_object_event_callback_del_full(itc-base_view, 
EVAS_CALLBACK_MOUSE_MOVE,
_mouse_move, it);
+   evas_object_event_callback_del_full(itc-base_view, 
EVAS_CALLBACK_MULTI_DOWN,
+   _multi_down, it);
+   evas_object_event_callback_del_full(itc-base_view, EVAS_CALLBACK_MULTI_UP,
+   _multi_up, it);
+   evas_object_event_callback_del_full(itc-base_view, 
EVAS_CALLBACK_MULTI_MOVE,
+   _multi_move, it);
_item_cache_clean(it-wd);
 }
 
@@ -1466,6 +1569,12 @@ _item_realize(Elm_Genlist_Item *it,
_mouse_up, it);
 evas_object_event_callback_add(it-base.view, EVAS_CALLBACK_MOUSE_MOVE,
_mouse_move, it);
+evas_object_event_callback_add(it-base.view, EVAS_CALLBACK_MULTI_DOWN,
+   _multi_down, it);
+evas_object_event_callback_add(it-base.view, EVAS_CALLBACK_MULTI_UP,
+   _multi_up, it);
+evas_object_event_callback_add(it-base.view, EVAS_CALLBACK_MULTI_MOVE,
+   _multi_move, it);
 if (itc)
   {
  if (it-selected != itc-selected)
Index: AUTHORS
===
--- AUTHORS (revision 55601)
+++ AUTHORS (working copy)
@@ -28,3 +28,4 @@ Tiago Falcão ti...@profusion.mobi
 Otavio Pontes ota...@profusion.mobi
 Viktor Kojouharov vkojouha...@gmail.com
 Daniel Juyung Seo (SeoZ) juyung@samsung.com seojuyu...@gmail.com
+Jeonghyun Yun (arosis) jh0506@samsung.com
--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel